Index: www/wp-includes/class-wp-matchesmapregex.php
===================================================================
--- www/wp-includes/class-wp-matchesmapregex.php	(revision 38565)
+++ www/wp-includes/autoload/WP_MatchesMapRegex.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/Requests/Exception/HTTP/417.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/417.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_417.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/customize/class-wp-customize-background-image-control.php
===================================================================
--- www/wp-includes/autoload/customize/class-wp-customize-background-image-control.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/customize/class-wp-customize-background-image-control.php	(revision UNDEFINED)
@@ -1,49 +0,0 @@
-<?php
-/**
- * Customize API: WP_Customize_Background_Image_Control class
- *
- * @package WordPress
- * @subpackage Customize
- * @since 4.4.0
- */
-
-/**
- * Customize Background Image Control class.
- *
- * @since 3.4.0
- *
- * @see WP_Customize_Image_Control
- */
-class WP_Customize_Background_Image_Control extends WP_Customize_Image_Control {
-	public $type = 'background';
-
-	/**
-	 * Constructor.
-	 *
-	 * @since 3.4.0
-	 * @uses WP_Customize_Image_Control::__construct()
-	 *
-	 * @param WP_Customize_Manager $manager Customizer bootstrap instance.
-	 */
-	public function __construct( $manager ) {
-		parent::__construct( $manager, 'background_image', array(
-			'label'    => __( 'Background Image' ),
-			'section'  => 'background_image',
-		) );
-	}
-
-	/**
-	 * Enqueue control related scripts/styles.
-	 *
-	 * @since 4.1.0
-	 */
-	public function enqueue() {
-		parent::enqueue();
-
-		wp_localize_script( 'customize-controls', '_wpCustomizeBackground', array(
-			'nonces' => array(
-				'add' => wp_create_nonce( 'background-add' ),
-			),
-		) );
-	}
-}
Index: www/wp-includes/class-wp-admin-bar.php
===================================================================
--- www/wp-includes/class-wp-admin-bar.php	(revision 38565)
+++ www/wp-includes/autoload/WP_Admin_Bar.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-user.php
===================================================================
--- www/wp-includes/class-wp-user.php	(revision 38565)
+++ www/wp-includes/autoload/object/WP_User.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/freedoms.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/freedoms.php	(revision 38565)
+++ www/wp-admin/freedoms.php	(revision 38565)
@@ -1,53 +0,0 @@
-<?php
-/**
- * Your Rights administration panel.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-$title = __( 'Freedoms' );
-
-list( $display_version ) = explode( '-', get_bloginfo( 'version' ) );
-
-include( ABSPATH . 'wp-admin/admin-header.php' );
-?>
-<div class="wrap about-wrap">
-
-<h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
-
-<p class="about-text"><?php printf( __( 'Thank you for updating to the latest version. WordPress %s changes a lot behind the scenes to make your WordPress experience even better!' ), $display_version ); ?></p>
-
-<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
-
-<h2 class="nav-tab-wrapper wp-clearfix">
-	<a href="about.php" class="nav-tab"><?php _e( 'What&#8217;s New' ); ?></a>
-	<a href="credits.php" class="nav-tab"><?php _e( 'Credits' ); ?></a>
-	<a href="freedoms.php" class="nav-tab nav-tab-active"><?php _e( 'Freedoms' ); ?></a>
-</h2>
-
-<p class="about-description"><?php printf( __( 'WordPress is Free and open source software, built by a distributed community of mostly volunteer developers from around the world. WordPress comes with some awesome, worldview-changing rights courtesy of its <a href="%s">license</a>, the GPL.' ), 'https://wordpress.org/about/license/' ); ?></p>
-
-<ol start="0">
-	<li><p><?php _e( 'You have the freedom to run the program, for any purpose.' ); ?></p></li>
-	<li><p><?php _e( 'You have access to the source code, the freedom to study how the program works, and the freedom to change it to make it do what you wish.' ); ?></p></li>
-	<li><p><?php _e( 'You have the freedom to redistribute copies of the original program so you can help your neighbor.' ); ?></p></li>
-	<li><p><?php _e( 'You have the freedom to distribute copies of your modified versions to others. By doing this you can give the whole community a chance to benefit from your changes.' ); ?></p></li>
-</ol>
-
-<p><?php printf( __( 'WordPress grows when people like you tell their friends about it, and the thousands of businesses and services that are built on and around WordPress share that fact with their users. We&#8217;re flattered every time someone spreads the good word, just make sure to <a href="%s">check out our trademark guidelines</a> first.' ), 'http://wordpressfoundation.org/trademark-policy/' ); ?></p>
-
-<p><?php
-
-$plugins_url = current_user_can( 'activate_plugins' ) ? admin_url( 'plugins.php' ) : __( 'https://wordpress.org/plugins/' );
-$themes_url = current_user_can( 'switch_themes' ) ? admin_url( 'themes.php' ) : __( 'https://wordpress.org/themes/' );
-
-printf( __( 'Every plugin and theme in WordPress.org&#8217;s directory is 100%% GPL or a similarly free and compatible license, so you can feel safe finding <a href="%1$s">plugins</a> and <a href="%2$s">themes</a> there. If you get a plugin or theme from another source, make sure to <a href="%3$s">ask them if it&#8217;s GPL</a> first. If they don&#8217;t respect the WordPress license, we don&#8217;t recommend them.' ), $plugins_url, $themes_url, 'https://wordpress.org/about/license/' ); ?></p>
-
-<p><?php _e( 'Don&#8217;t you wish all software came with these freedoms? So do we! For more information, check out the <a href="https://www.fsf.org/">Free Software Foundation</a>.' ); ?></p>
-
-</div>
-<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>
Index: www/wp-includes/class-wp-post.php
===================================================================
--- www/wp-includes/class-wp-post.php	(revision 38565)
+++ www/wp-includes/autoload/object/WP_Post.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/json/JsonSerializable.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/json/JsonSerializable.php	(revision )
+++ www/wp-includes/autoload/json/JsonSerializable.php	(revision )
@@ -0,0 +1,14 @@
+<?php
+/**
+ * JsonSerializable interface.
+ *
+ * Compatibility shim for PHP <5.4
+ *
+ * @link https://secure.php.net/jsonserializable
+ * @link https://core.trac.wordpress.org/changeset/34845
+ *
+ * @since 4.4.0
+ */
+interface JsonSerializable {
+	public function jsonSerialize();
+}
Index: www/wp-includes/template-loader.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/template-loader.php	(revision 38565)
+++ www/wp-includes/template-loader.php	(revision 38565)
@@ -1,83 +0,0 @@
-<?php
-/**
- * Loads the correct template based on the visitor's url
- * @package WordPress
- */
-if ( defined('WP_USE_THEMES') && WP_USE_THEMES )
-	/**
-	 * Fires before determining which template to load.
-	 *
-	 * @since 1.5.0
-	 */
-	do_action( 'template_redirect' );
-
-/**
- * Filters whether to allow 'HEAD' requests to generate content.
- *
- * Provides a significant performance bump by exiting before the page
- * content loads for 'HEAD' requests. See #14348.
- *
- * @since 3.5.0
- *
- * @param bool $exit Whether to exit without generating any content for 'HEAD' requests. Default true.
- */
-if ( 'HEAD' === $_SERVER['REQUEST_METHOD'] && apply_filters( 'exit_on_http_head', true ) )
-	exit();
-
-// Process feeds and trackbacks even if not using themes.
-if ( is_robots() ) :
-	/**
-	 * Fired when the template loader determines a robots.txt request.
-	 *
-	 * @since 2.1.0
-	 */
-	do_action( 'do_robots' );
-	return;
-elseif ( is_feed() ) :
-	do_feed();
-	return;
-elseif ( is_trackback() ) :
-	include( ABSPATH . 'wp-trackback.php' );
-	return;
-endif;
-
-if ( defined('WP_USE_THEMES') && WP_USE_THEMES ) :
-	$template = false;
-	if     ( is_embed()          && $template = get_embed_template()          ) :
-	elseif ( is_404()            && $template = get_404_template()            ) :
-	elseif ( is_search()         && $template = get_search_template()         ) :
-	elseif ( is_front_page()     && $template = get_front_page_template()     ) :
-	elseif ( is_home()           && $template = get_home_template()           ) :
-	elseif ( is_post_type_archive() && $template = get_post_type_archive_template() ) :
-	elseif ( is_tax()            && $template = get_taxonomy_template()       ) :
-	elseif ( is_attachment()     && $template = get_attachment_template()     ) :
-		remove_filter('the_content', 'prepend_attachment');
-	elseif ( is_single()         && $template = get_single_template()         ) :
-	elseif ( is_page()           && $template = get_page_template()           ) :
-	elseif ( is_singular()       && $template = get_singular_template()       ) :
-	elseif ( is_category()       && $template = get_category_template()       ) :
-	elseif ( is_tag()            && $template = get_tag_template()            ) :
-	elseif ( is_author()         && $template = get_author_template()         ) :
-	elseif ( is_date()           && $template = get_date_template()           ) :
-	elseif ( is_archive()        && $template = get_archive_template()        ) :
-	elseif ( is_paged()          && $template = get_paged_template()          ) :
-	else :
-		$template = get_index_template();
-	endif;
-	/**
-	 * Filters the path of the current template before including it.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $template The path of the template to include.
-	 */
-	if ( $template = apply_filters( 'template_include', $template ) ) {
-		include( $template );
-	} elseif ( current_user_can( 'switch_themes' ) ) {
-		$theme = wp_get_theme();
-		if ( $theme->errors() ) {
-			wp_die( $theme->errors() );
-		}
-	}
-	return;
-endif;
Index: www/wp-includes/class-wp-query.php
===================================================================
--- www/wp-includes/class-wp-query.php	(revision 38565)
+++ www/wp-includes/autoload/query/WP_Query.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/requests/Exception/HTTP/408.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/408.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/408.php	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-<?php
-/**
- * Exception for 408 Request Timeout responses
- *
- * @package Requests
- */
-
-/**
- * Exception for 408 Request Timeout responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_408 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 408;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Request Timeout';
-}
\ No newline at end of file
Index: www/wp-includes/autoload/text-diff/Text_Diff_Op_add.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/text-diff/Text_Diff_Op_add.php	(revision )
+++ www/wp-includes/autoload/text-diff/Text_Diff_Op_add.php	(revision )
@@ -0,0 +1,33 @@
+<?php
+
+/**
+ * @package Text_Diff
+ * @author  Geoffrey T. Dairiki <dairiki@dairiki.org>
+ *
+ * @access private
+ */
+class Text_Diff_Op_add extends Text_Diff_Op {
+
+	/**
+	 * PHP5 constructor.
+	 */
+    function __construct( $lines )
+    {
+        $this->final = $lines;
+        $this->orig = false;
+    }
+
+	/**
+	 * PHP4 constructor.
+	 */
+	public function Text_Diff_Op_add( $lines ) {
+		self::__construct( $lines );
+	}
+
+    function &reverse()
+    {
+        $reverse = new Text_Diff_Op_delete($this->final);
+        return $reverse;
+    }
+
+}
Index: www/wp-includes/autoload/requests/Auth/Basic.php
===================================================================
--- www/wp-includes/autoload/requests/Auth/Basic.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Auth/Basic.php	(revision UNDEFINED)
@@ -1,88 +0,0 @@
-<?php
-/**
- * Basic Authentication provider
- *
- * @package Requests
- * @subpackage Authentication
- */
-
-/**
- * Basic Authentication provider
- *
- * Provides a handler for Basic HTTP authentication via the Authorization
- * header.
- *
- * @package Requests
- * @subpackage Authentication
- */
-class Requests_Auth_Basic implements Requests_Auth {
-	/**
-	 * Username
-	 *
-	 * @var string
-	 */
-	public $user;
-
-	/**
-	 * Password
-	 *
-	 * @var string
-	 */
-	public $pass;
-
-	/**
-	 * Constructor
-	 *
-	 * @throws Requests_Exception On incorrect number of arguments (`authbasicbadargs`)
-	 * @param array|null $args Array of user and password. Must have exactly two elements
-	 */
-	public function __construct($args = null) {
-		if (is_array($args)) {
-			if (count($args) !== 2) {
-				throw new Requests_Exception('Invalid number of arguments', 'authbasicbadargs');
-			}
-
-			list($this->user, $this->pass) = $args;
-		}
-	}
-
-	/**
-	 * Register the necessary callbacks
-	 *
-	 * @see curl_before_send
-	 * @see fsockopen_header
-	 * @param Requests_Hooks $hooks Hook system
-	 */
-	public function register(Requests_Hooks &$hooks) {
-		$hooks->register('curl.before_send', array(&$this, 'curl_before_send'));
-		$hooks->register('fsockopen.after_headers', array(&$this, 'fsockopen_header'));
-	}
-
-	/**
-	 * Set cURL parameters before the data is sent
-	 *
-	 * @param resource $handle cURL resource
-	 */
-	public function curl_before_send(&$handle) {
-		curl_setopt($handle, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
-		curl_setopt($handle, CURLOPT_USERPWD, $this->getAuthString());
-	}
-
-	/**
-	 * Add extra headers to the request before sending
-	 *
-	 * @param string $out HTTP header string
-	 */
-	public function fsockopen_header(&$out) {
-		$out .= sprintf("Authorization: Basic %s\r\n", base64_encode($this->getAuthString()));
-	}
-
-	/**
-	 * Get the authentication string (user:pass)
-	 *
-	 * @return string
-	 */
-	public function getAuthString() {
-		return $this->user . ':' . $this->pass;
-	}
-}
\ No newline at end of file
Index: www/wp-includes/autoload/text-diff/Text_Diff.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/text-diff/Text_Diff.php	(revision )
+++ www/wp-includes/autoload/text-diff/Text_Diff.php	(revision )
@@ -0,0 +1,289 @@
+<?php
+/**
+ * General API for generating and formatting diffs - the differences between
+ * two sequences of strings.
+ *
+ * The original PHP version of this code was written by Geoffrey T. Dairiki
+ * <dairiki@dairiki.org>, and is used/adapted with his permission.
+ *
+ * Copyright 2004 Geoffrey T. Dairiki <dairiki@dairiki.org>
+ * Copyright 2004-2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you did
+ * not receive this file, see http://opensource.org/licenses/lgpl-license.php.
+ *
+ * @package Text_Diff
+ * @author  Geoffrey T. Dairiki <dairiki@dairiki.org>
+ */
+class Text_Diff {
+
+    /**
+     * Array of changes.
+     *
+     * @var array
+     */
+    var $_edits;
+
+    /**
+     * Computes diffs between sequences of strings.
+     *
+     * @param string $engine     Name of the diffing engine to use.  'auto'
+     *                           will automatically select the best.
+     * @param array $params      Parameters to pass to the diffing engine.
+     *                           Normally an array of two arrays, each
+     *                           containing the lines from a file.
+     */
+    function __construct( $engine, $params )
+    {
+        // Backward compatibility workaround.
+        if (!is_string($engine)) {
+            $params = array($engine, $params);
+            $engine = 'auto';
+        }
+
+        if ($engine == 'auto') {
+            $engine = extension_loaded('xdiff') ? 'xdiff' : 'native';
+        } else {
+            $engine = basename($engine);
+        }
+
+	    $class = "Text_Diff_Engine_{$engine}";
+        require_once dirname(__FILE__) . "/{$class}.php";
+        $diff_engine = new $class();
+
+        $this->_edits = call_user_func_array(array($diff_engine, 'diff'), $params);
+    }
+
+	/**
+	 * PHP4 constructor.
+	 */
+	public function Text_Diff( $engine, $params ) {
+		self::__construct( $engine, $params );
+	}
+
+    /**
+     * Returns the array of differences.
+     */
+    function getDiff()
+    {
+        return $this->_edits;
+    }
+
+    /**
+     * returns the number of new (added) lines in a given diff.
+     *
+     * @since Text_Diff 1.1.0
+     *
+     * @return integer The number of new lines
+     */
+    function countAddedLines()
+    {
+        $count = 0;
+        foreach ($this->_edits as $edit) {
+            if (is_a($edit, 'Text_Diff_Op_add') ||
+                is_a($edit, 'Text_Diff_Op_change')) {
+                $count += $edit->nfinal();
+            }
+        }
+        return $count;
+    }
+
+    /**
+     * Returns the number of deleted (removed) lines in a given diff.
+     *
+     * @since Text_Diff 1.1.0
+     *
+     * @return integer The number of deleted lines
+     */
+    function countDeletedLines()
+    {
+        $count = 0;
+        foreach ($this->_edits as $edit) {
+            if (is_a($edit, 'Text_Diff_Op_delete') ||
+                is_a($edit, 'Text_Diff_Op_change')) {
+                $count += $edit->norig();
+            }
+        }
+        return $count;
+    }
+
+    /**
+     * Computes a reversed diff.
+     *
+     * Example:
+     * <code>
+     * $diff = new Text_Diff($lines1, $lines2);
+     * $rev = $diff->reverse();
+     * </code>
+     *
+     * @return Text_Diff  A Diff object representing the inverse of the
+     *                    original diff.  Note that we purposely don't return a
+     *                    reference here, since this essentially is a clone()
+     *                    method.
+     */
+    function reverse()
+    {
+        if (version_compare(zend_version(), '2', '>')) {
+            $rev = clone($this);
+        } else {
+            $rev = $this;
+        }
+        $rev->_edits = array();
+        foreach ($this->_edits as $edit) {
+            $rev->_edits[] = $edit->reverse();
+        }
+        return $rev;
+    }
+
+    /**
+     * Checks for an empty diff.
+     *
+     * @return boolean  True if two sequences were identical.
+     */
+    function isEmpty()
+    {
+        foreach ($this->_edits as $edit) {
+            if (!is_a($edit, 'Text_Diff_Op_copy')) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Computes the length of the Longest Common Subsequence (LCS).
+     *
+     * This is mostly for diagnostic purposes.
+     *
+     * @return integer  The length of the LCS.
+     */
+    function lcs()
+    {
+        $lcs = 0;
+        foreach ($this->_edits as $edit) {
+            if (is_a($edit, 'Text_Diff_Op_copy')) {
+                $lcs += count($edit->orig);
+            }
+        }
+        return $lcs;
+    }
+
+    /**
+     * Gets the original set of lines.
+     *
+     * This reconstructs the $from_lines parameter passed to the constructor.
+     *
+     * @return array  The original sequence of strings.
+     */
+    function getOriginal()
+    {
+        $lines = array();
+        foreach ($this->_edits as $edit) {
+            if ($edit->orig) {
+                array_splice($lines, count($lines), 0, $edit->orig);
+            }
+        }
+        return $lines;
+    }
+
+    /**
+     * Gets the final set of lines.
+     *
+     * This reconstructs the $to_lines parameter passed to the constructor.
+     *
+     * @return array  The sequence of strings.
+     */
+    function getFinal()
+    {
+        $lines = array();
+        foreach ($this->_edits as $edit) {
+            if ($edit->final) {
+                array_splice($lines, count($lines), 0, $edit->final);
+            }
+        }
+        return $lines;
+    }
+
+    /**
+     * Removes trailing newlines from a line of text. This is meant to be used
+     * with array_walk().
+     *
+     * @param string $line  The line to trim.
+     * @param integer $key  The index of the line in the array. Not used.
+     */
+    static function trimNewlines(&$line, $key)
+    {
+        $line = str_replace(array("\n", "\r"), '', $line);
+    }
+
+    /**
+     * Determines the location of the system temporary directory.
+     *
+     * @static
+     *
+     * @access protected
+     *
+     * @return string  A directory name which can be used for temp files.
+     *                 Returns false if one could not be found.
+     */
+    function _getTempDir()
+    {
+        $tmp_locations = array('/tmp', '/var/tmp', 'c:\WUTemp', 'c:\temp',
+                               'c:\windows\temp', 'c:\winnt\temp');
+
+        /* Try PHP's upload_tmp_dir directive. */
+        $tmp = ini_get('upload_tmp_dir');
+
+        /* Otherwise, try to determine the TMPDIR environment variable. */
+        if (!strlen($tmp)) {
+            $tmp = getenv('TMPDIR');
+        }
+
+        /* If we still cannot determine a value, then cycle through a list of
+         * preset possibilities. */
+        while (!strlen($tmp) && count($tmp_locations)) {
+            $tmp_check = array_shift($tmp_locations);
+            if (@is_dir($tmp_check)) {
+                $tmp = $tmp_check;
+            }
+        }
+
+        /* If it is still empty, we have failed, so return false; otherwise
+         * return the directory determined. */
+        return strlen($tmp) ? $tmp : false;
+    }
+
+    /**
+     * Checks a diff for validity.
+     *
+     * This is here only for debugging purposes.
+     */
+    function _check($from_lines, $to_lines)
+    {
+        if (serialize($from_lines) != serialize($this->getOriginal())) {
+            trigger_error("Reconstructed original doesn't match", E_USER_ERROR);
+        }
+        if (serialize($to_lines) != serialize($this->getFinal())) {
+            trigger_error("Reconstructed final doesn't match", E_USER_ERROR);
+        }
+
+        $rev = $this->reverse();
+        if (serialize($to_lines) != serialize($rev->getOriginal())) {
+            trigger_error("Reversed original doesn't match", E_USER_ERROR);
+        }
+        if (serialize($from_lines) != serialize($rev->getFinal())) {
+            trigger_error("Reversed final doesn't match", E_USER_ERROR);
+        }
+
+        $prevtype = null;
+        foreach ($this->_edits as $edit) {
+            if ($prevtype == get_class($edit)) {
+                trigger_error("Edit sequence is non-optimal", E_USER_ERROR);
+            }
+            $prevtype = get_class($edit);
+        }
+
+        return true;
+    }
+
+}
Index: www/wp-includes/nav-menu.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/nav-menu.php	(revision 38565)
+++ www/wp-includes/nav-menu.php	(revision 38565)
@@ -1,1006 +0,0 @@
-<?php
-/**
- * Navigation Menu functions
- *
- * @package WordPress
- * @subpackage Nav_Menus
- * @since 3.0.0
- */
-
-/**
- * Returns a navigation menu object.
- *
- * @since 3.0.0
- *
- * @param int|string|WP_Term $menu Menu ID, slug, or name - or the menu object.
- * @return WP_Term|false False if $menu param isn't supplied or term does not exist, menu object if successful.
- */
-function wp_get_nav_menu_object( $menu ) {
-	$menu_obj = false;
-
-	if ( is_object( $menu ) ) {
-		$menu_obj = $menu;
-	}
-
-	if ( $menu && ! $menu_obj ) {
-		$menu_obj = get_term( $menu, 'nav_menu' );
-
-		if ( ! $menu_obj ) {
-			$menu_obj = get_term_by( 'slug', $menu, 'nav_menu' );
-		}
-
-		if ( ! $menu_obj ) {
-			$menu_obj = get_term_by( 'name', $menu, 'nav_menu' );
-		}
-	}
-
-	if ( ! $menu_obj || is_wp_error( $menu_obj ) ) {
-		$menu_obj = false;
-	}
-
-	/**
-	 * Filters the nav_menu term retrieved for wp_get_nav_menu_object().
-	 *
-	 * @since 4.3.0
-	 *
-	 * @param object|false $menu_obj Term from nav_menu taxonomy, or false if nothing had been found.
-	 * @param string       $menu     The menu ID, slug, or name passed to wp_get_nav_menu_object().
-	 */
-	return apply_filters( 'wp_get_nav_menu_object', $menu_obj, $menu );
-}
-
-/**
- * Check if the given ID is a navigation menu.
- *
- * Returns true if it is; false otherwise.
- *
- * @since 3.0.0
- *
- * @param int|string $menu The menu to check (ID, slug, or name).
- * @return bool Whether the menu exists.
- */
-function is_nav_menu( $menu ) {
-	if ( ! $menu )
-		return false;
-
-	$menu_obj = wp_get_nav_menu_object( $menu );
-
-	if (
-		$menu_obj &&
-		! is_wp_error( $menu_obj ) &&
-		! empty( $menu_obj->taxonomy ) &&
-		'nav_menu' == $menu_obj->taxonomy
-	)
-		return true;
-
-	return false;
-}
-
-/**
- * Registers navigation menu locations for a theme.
- *
- * @since 3.0.0
- *
- * @global array $_wp_registered_nav_menus
- *
- * @param array $locations Associative array of menu location identifiers (like a slug) and descriptive text.
- */
-function register_nav_menus( $locations = array() ) {
-	global $_wp_registered_nav_menus;
-
-	add_theme_support( 'menus' );
-
-	$_wp_registered_nav_menus = array_merge( (array) $_wp_registered_nav_menus, $locations );
-}
-
-/**
- * Unregisters a navigation menu location for a theme.
- *
- * @global array $_wp_registered_nav_menus
- *
- * @param string $location The menu location identifier.
- * @return bool True on success, false on failure.
- */
-function unregister_nav_menu( $location ) {
-	global $_wp_registered_nav_menus;
-
-	if ( is_array( $_wp_registered_nav_menus ) && isset( $_wp_registered_nav_menus[$location] ) ) {
-		unset( $_wp_registered_nav_menus[$location] );
-		if ( empty( $_wp_registered_nav_menus ) ) {
-			_remove_theme_support( 'menus' );
-		}
-		return true;
-	}
-	return false;
-}
-
-/**
- * Registers a navigation menu location for a theme.
- *
- * @since 3.0.0
- *
- * @param string $location    Menu location identifier, like a slug.
- * @param string $description Menu location descriptive text.
- */
-function register_nav_menu( $location, $description ) {
-	register_nav_menus( array( $location => $description ) );
-}
-/**
- * Retrieves all registered navigation menu locations in a theme.
- *
- * @since 3.0.0
- *
- * @global array $_wp_registered_nav_menus
- *
- * @return array Registered navigation menu locations. If none are registered, an empty array.
- */
-function get_registered_nav_menus() {
-	global $_wp_registered_nav_menus;
-	if ( isset( $_wp_registered_nav_menus ) )
-		return $_wp_registered_nav_menus;
-	return array();
-}
-
-/**
- * Retrieves all registered navigation menu locations and the menus assigned to them.
- *
- * @since 3.0.0
- *
- * @return array Registered navigation menu locations and the menus assigned them.
- *               If none are registered, an empty array.
- */
-
-function get_nav_menu_locations() {
-	$locations = get_theme_mod( 'nav_menu_locations' );
-	return ( is_array( $locations ) ) ? $locations : array();
-}
-
-/**
- * Determines whether a registered nav menu location has a menu assigned to it.
- *
- * @since 3.0.0
- *
- * @param string $location Menu location identifier.
- * @return bool Whether location has a menu.
- */
-function has_nav_menu( $location ) {
-	$has_nav_menu = false;
-
-	$registered_nav_menus = get_registered_nav_menus();
-	if ( isset( $registered_nav_menus[ $location ] ) ) {
-		$locations = get_nav_menu_locations();
-		$has_nav_menu = ! empty( $locations[ $location ] );
-	}
-
-	/**
-	 * Filters whether a nav menu is assigned to the specified location.
-	 *
-	 * @since 4.3.0
-	 *
-	 * @param bool   $has_nav_menu Whether there is a menu assigned to a location.
-	 * @param string $location     Menu location.
-	 */
-	return apply_filters( 'has_nav_menu', $has_nav_menu, $location );
-}
-
-/**
- * Determines whether the given ID is a nav menu item.
- *
- * @since 3.0.0
- *
- * @param int $menu_item_id The ID of the potential nav menu item.
- * @return bool Whether the given ID is that of a nav menu item.
- */
-function is_nav_menu_item( $menu_item_id = 0 ) {
-	return ( ! is_wp_error( $menu_item_id ) && ( 'nav_menu_item' == get_post_type( $menu_item_id ) ) );
-}
-
-/**
- * Creates a navigation menu.
- *
- * Note that `$menu_name` is expected to be pre-slashed.
- *
- * @since 3.0.0
- *
- * @param string $menu_name Menu name.
- * @return int|WP_Error Menu ID on success, WP_Error object on failure.
- */
-function wp_create_nav_menu( $menu_name ) {
-	// expected_slashed ($menu_name)
-	return wp_update_nav_menu_object( 0, array( 'menu-name' => $menu_name ) );
-}
-
-/**
- * Delete a Navigation Menu.
- *
- * @since 3.0.0
- *
- * @param string $menu Menu ID, slug, or name.
- * @return bool|WP_Error True on success, false or WP_Error object on failure.
- */
-function wp_delete_nav_menu( $menu ) {
-	$menu = wp_get_nav_menu_object( $menu );
-	if ( ! $menu )
-		return false;
-
-	$menu_objects = get_objects_in_term( $menu->term_id, 'nav_menu' );
-	if ( ! empty( $menu_objects ) ) {
-		foreach ( $menu_objects as $item ) {
-			wp_delete_post( $item );
-		}
-	}
-
-	$result = wp_delete_term( $menu->term_id, 'nav_menu' );
-
-	// Remove this menu from any locations.
-	$locations = get_nav_menu_locations();
-	foreach ( $locations as $location => $menu_id ) {
-		if ( $menu_id == $menu->term_id )
-			$locations[ $location ] = 0;
-	}
-	set_theme_mod( 'nav_menu_locations', $locations );
-
-	if ( $result && !is_wp_error($result) )
-
-		/**
-		 * Fires after a navigation menu has been successfully deleted.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param int $term_id ID of the deleted menu.
-		 */
-		do_action( 'wp_delete_nav_menu', $menu->term_id );
-
-	return $result;
-}
-
-/**
- * Save the properties of a menu or create a new menu with those properties.
- *
- * Note that `$menu_data` is expected to be pre-slashed.
- *
- * @since 3.0.0
- *
- * @param int   $menu_id   The ID of the menu or "0" to create a new menu.
- * @param array $menu_data The array of menu data.
- * @return int|WP_Error Menu ID on success, WP_Error object on failure.
- */
-function wp_update_nav_menu_object( $menu_id = 0, $menu_data = array() ) {
-	// expected_slashed ($menu_data)
-	$menu_id = (int) $menu_id;
-
-	$_menu = wp_get_nav_menu_object( $menu_id );
-
-	$args = array(
-		'description' => ( isset( $menu_data['description'] ) ? $menu_data['description']  : '' ),
-		'name'        => ( isset( $menu_data['menu-name']   ) ? $menu_data['menu-name']    : '' ),
-		'parent'      => ( isset( $menu_data['parent']      ) ? (int) $menu_data['parent'] : 0  ),
-		'slug'        => null,
-	);
-
-	// double-check that we're not going to have one menu take the name of another
-	$_possible_existing = get_term_by( 'name', $menu_data['menu-name'], 'nav_menu' );
-	if (
-		$_possible_existing &&
-		! is_wp_error( $_possible_existing ) &&
-		isset( $_possible_existing->term_id ) &&
-		$_possible_existing->term_id != $menu_id
-	) {
-		return new WP_Error( 'menu_exists',
-			/* translators: %s: menu name */
-			sprintf( __( 'The menu name %s conflicts with another menu name. Please try another.' ),
-				'<strong>' . esc_html( $menu_data['menu-name'] ) . '</strong>'
-			)
-		);
-	}
-
-	// menu doesn't already exist, so create a new menu
-	if ( ! $_menu || is_wp_error( $_menu ) ) {
-		$menu_exists = get_term_by( 'name', $menu_data['menu-name'], 'nav_menu' );
-
-		if ( $menu_exists ) {
-			return new WP_Error( 'menu_exists',
-				/* translators: %s: menu name */
-				sprintf( __( 'The menu name %s conflicts with another menu name. Please try another.' ),
-					'<strong>' . esc_html( $menu_data['menu-name'] ) . '</strong>'
-				)
-			);
-		}
-
-		$_menu = wp_insert_term( $menu_data['menu-name'], 'nav_menu', $args );
-
-		if ( is_wp_error( $_menu ) )
-			return $_menu;
-
-		/**
-		 * Fires after a navigation menu is successfully created.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param int   $term_id   ID of the new menu.
-		 * @param array $menu_data An array of menu data.
-		 */
-		do_action( 'wp_create_nav_menu', $_menu['term_id'], $menu_data );
-
-		return (int) $_menu['term_id'];
-	}
-
-	if ( ! $_menu || ! isset( $_menu->term_id ) )
-		return 0;
-
-	$menu_id = (int) $_menu->term_id;
-
-	$update_response = wp_update_term( $menu_id, 'nav_menu', $args );
-
-	if ( is_wp_error( $update_response ) )
-		return $update_response;
-
-	$menu_id = (int) $update_response['term_id'];
-
-	/**
-	 * Fires after a navigation menu has been successfully updated.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param int   $menu_id   ID of the updated menu.
-	 * @param array $menu_data An array of menu data.
-	 */
-	do_action( 'wp_update_nav_menu', $menu_id, $menu_data );
-	return $menu_id;
-}
-
-/**
- * Save the properties of a menu item or create a new one.
- *
- * The menu-item-title, menu-item-description, and menu-item-attr-title are expected
- * to be pre-slashed since they are passed directly into `wp_insert_post()`.
- *
- * @since 3.0.0
- *
- * @param int   $menu_id         The ID of the menu. Required. If "0", makes the menu item a draft orphan.
- * @param int   $menu_item_db_id The ID of the menu item. If "0", creates a new menu item.
- * @param array $menu_item_data  The menu item's data.
- * @return int|WP_Error The menu item's database ID or WP_Error object on failure.
- */
-function wp_update_nav_menu_item( $menu_id = 0, $menu_item_db_id = 0, $menu_item_data = array() ) {
-	$menu_id = (int) $menu_id;
-	$menu_item_db_id = (int) $menu_item_db_id;
-
-	// make sure that we don't convert non-nav_menu_item objects into nav_menu_item objects
-	if ( ! empty( $menu_item_db_id ) && ! is_nav_menu_item( $menu_item_db_id ) )
-		return new WP_Error( 'update_nav_menu_item_failed', __( 'The given object ID is not that of a menu item.' ) );
-
-	$menu = wp_get_nav_menu_object( $menu_id );
-
-	if ( ! $menu && 0 !== $menu_id ) {
-		return new WP_Error( 'invalid_menu_id', __( 'Invalid menu ID.' ) );
-	}
-
-	if ( is_wp_error( $menu ) ) {
-		return $menu;
-	}
-
-	$defaults = array(
-		'menu-item-db-id' => $menu_item_db_id,
-		'menu-item-object-id' => 0,
-		'menu-item-object' => '',
-		'menu-item-parent-id' => 0,
-		'menu-item-position' => 0,
-		'menu-item-type' => 'custom',
-		'menu-item-title' => '',
-		'menu-item-url' => '',
-		'menu-item-description' => '',
-		'menu-item-attr-title' => '',
-		'menu-item-target' => '',
-		'menu-item-classes' => '',
-		'menu-item-xfn' => '',
-		'menu-item-status' => '',
-	);
-
-	$args = wp_parse_args( $menu_item_data, $defaults );
-
-	if ( 0 == $menu_id ) {
-		$args['menu-item-position'] = 1;
-	} elseif ( 0 == (int) $args['menu-item-position'] ) {
-		$menu_items = 0 == $menu_id ? array() : (array) wp_get_nav_menu_items( $menu_id, array( 'post_status' => 'publish,draft' ) );
-		$last_item = array_pop( $menu_items );
-		$args['menu-item-position'] = ( $last_item && isset( $last_item->menu_order ) ) ? 1 + $last_item->menu_order : count( $menu_items );
-	}
-
-	$original_parent = 0 < $menu_item_db_id ? get_post_field( 'post_parent', $menu_item_db_id ) : 0;
-
-	if ( 'custom' != $args['menu-item-type'] ) {
-		/* if non-custom menu item, then:
-			* use original object's URL
-			* blank default title to sync with original object's
-		*/
-
-		$args['menu-item-url'] = '';
-
-		$original_title = '';
-		if ( 'taxonomy' == $args['menu-item-type'] ) {
-			$original_parent = get_term_field( 'parent', $args['menu-item-object-id'], $args['menu-item-object'], 'raw' );
-			$original_title = get_term_field( 'name', $args['menu-item-object-id'], $args['menu-item-object'], 'raw' );
-		} elseif ( 'post_type' == $args['menu-item-type'] ) {
-
-			$original_object = get_post( $args['menu-item-object-id'] );
-			$original_parent = (int) $original_object->post_parent;
-			$original_title = $original_object->post_title;
-		} elseif ( 'post_type_archive' == $args['menu-item-type'] ) {
-			$original_object = get_post_type_object( $args['menu-item-object'] );
-			if ( $original_object ) {
-				$original_title = $original_object->labels->archives;
-			}
-		}
-
-		if ( $args['menu-item-title'] == $original_title )
-			$args['menu-item-title'] = '';
-
-		// hack to get wp to create a post object when too many properties are empty
-		if ( '' ==  $args['menu-item-title'] && '' == $args['menu-item-description'] )
-			$args['menu-item-description'] = ' ';
-	}
-
-	// Populate the menu item object
-	$post = array(
-		'menu_order' => $args['menu-item-position'],
-		'ping_status' => 0,
-		'post_content' => $args['menu-item-description'],
-		'post_excerpt' => $args['menu-item-attr-title'],
-		'post_parent' => $original_parent,
-		'post_title' => $args['menu-item-title'],
-		'post_type' => 'nav_menu_item',
-	);
-
-	$update = 0 != $menu_item_db_id;
-
-	// New menu item. Default is draft status
-	if ( ! $update ) {
-		$post['ID'] = 0;
-		$post['post_status'] = 'publish' == $args['menu-item-status'] ? 'publish' : 'draft';
-		$menu_item_db_id = wp_insert_post( $post );
-		if ( ! $menu_item_db_id	|| is_wp_error( $menu_item_db_id ) )
-			return $menu_item_db_id;
-
-		/**
-		 * Fires immediately after a new navigation menu item has been added.
-		 *
-		 * @since 4.4.0
-		 *
-		 * @see wp_update_nav_menu_item()
-		 *
-		 * @param int   $menu_id         ID of the updated menu.
-		 * @param int   $menu_item_db_id ID of the new menu item.
-		 * @param array $args            An array of arguments used to update/add the menu item.
-		 */
-		do_action( 'wp_add_nav_menu_item', $menu_id, $menu_item_db_id, $args );
-	}
-
-	// Associate the menu item with the menu term
-	// Only set the menu term if it isn't set to avoid unnecessary wp_get_object_terms()
-	 if ( $menu_id && ( ! $update || ! is_object_in_term( $menu_item_db_id, 'nav_menu', (int) $menu->term_id ) ) ) {
-		wp_set_object_terms( $menu_item_db_id, array( $menu->term_id ), 'nav_menu' );
-	}
-
-	if ( 'custom' == $args['menu-item-type'] ) {
-		$args['menu-item-object-id'] = $menu_item_db_id;
-		$args['menu-item-object'] = 'custom';
-	}
-
-	$menu_item_db_id = (int) $menu_item_db_id;
-
-	update_post_meta( $menu_item_db_id, '_menu_item_type', sanitize_key($args['menu-item-type']) );
-	update_post_meta( $menu_item_db_id, '_menu_item_menu_item_parent', strval( (int) $args['menu-item-parent-id'] ) );
-	update_post_meta( $menu_item_db_id, '_menu_item_object_id', strval( (int) $args['menu-item-object-id'] ) );
-	update_post_meta( $menu_item_db_id, '_menu_item_object', sanitize_key($args['menu-item-object']) );
-	update_post_meta( $menu_item_db_id, '_menu_item_target', sanitize_key($args['menu-item-target']) );
-
-	$args['menu-item-classes'] = array_map( 'sanitize_html_class', explode( ' ', $args['menu-item-classes'] ) );
-	$args['menu-item-xfn'] = implode( ' ', array_map( 'sanitize_html_class', explode( ' ', $args['menu-item-xfn'] ) ) );
-	update_post_meta( $menu_item_db_id, '_menu_item_classes', $args['menu-item-classes'] );
-	update_post_meta( $menu_item_db_id, '_menu_item_xfn', $args['menu-item-xfn'] );
-	update_post_meta( $menu_item_db_id, '_menu_item_url', esc_url_raw($args['menu-item-url']) );
-
-	if ( 0 == $menu_id )
-		update_post_meta( $menu_item_db_id, '_menu_item_orphaned', (string) time() );
-	elseif ( get_post_meta( $menu_item_db_id, '_menu_item_orphaned' ) )
-		delete_post_meta( $menu_item_db_id, '_menu_item_orphaned' );
-
-	// Update existing menu item. Default is publish status
-	if ( $update ) {
-		$post['ID'] = $menu_item_db_id;
-		$post['post_status'] = 'draft' == $args['menu-item-status'] ? 'draft' : 'publish';
-		wp_update_post( $post );
-	}
-
-	/**
-	 * Fires after a navigation menu item has been updated.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @see wp_update_nav_menu_item()
-	 *
-	 * @param int   $menu_id         ID of the updated menu.
-	 * @param int   $menu_item_db_id ID of the updated menu item.
-	 * @param array $args            An array of arguments used to update a menu item.
-	 */
-	do_action( 'wp_update_nav_menu_item', $menu_id, $menu_item_db_id, $args );
-
-	return $menu_item_db_id;
-}
-
-/**
- * Returns all navigation menu objects.
- *
- * @since 3.0.0
- * @since 4.1.0 Default value of the 'orderby' argument was changed from 'none'
- *              to 'name'.
- *
- * @param array $args Optional. Array of arguments passed on to get_terms().
- *                    Default empty array.
- * @return array Menu objects.
- */
-function wp_get_nav_menus( $args = array() ) {
-	$defaults = array( 'hide_empty' => false, 'orderby' => 'name' );
-	$args = wp_parse_args( $args, $defaults );
-
-	/**
-	 * Filters the navigation menu objects being returned.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @see get_terms()
-	 *
-	 * @param array $menus An array of menu objects.
-	 * @param array $args  An array of arguments used to retrieve menu objects.
-	 */
-	return apply_filters( 'wp_get_nav_menus', get_terms( 'nav_menu',  $args), $args );
-}
-
-/**
- * Sort menu items by the desired key.
- *
- * @since 3.0.0
- * @access private
- *
- * @global string $_menu_item_sort_prop
- *
- * @param object $a The first object to compare
- * @param object $b The second object to compare
- * @return int -1, 0, or 1 if $a is considered to be respectively less than, equal to, or greater than $b.
- */
-function _sort_nav_menu_items( $a, $b ) {
-	global $_menu_item_sort_prop;
-
-	if ( empty( $_menu_item_sort_prop ) )
-		return 0;
-
-	if ( ! isset( $a->$_menu_item_sort_prop ) || ! isset( $b->$_menu_item_sort_prop ) )
-		return 0;
-
-	$_a = (int) $a->$_menu_item_sort_prop;
-	$_b = (int) $b->$_menu_item_sort_prop;
-
-	if ( $a->$_menu_item_sort_prop == $b->$_menu_item_sort_prop )
-		return 0;
-	elseif ( $_a == $a->$_menu_item_sort_prop && $_b == $b->$_menu_item_sort_prop )
-		return $_a < $_b ? -1 : 1;
-	else
-		return strcmp( $a->$_menu_item_sort_prop, $b->$_menu_item_sort_prop );
-}
-
-/**
- * Return if a menu item is valid.
- *
- * @link https://core.trac.wordpress.org/ticket/13958
- *
- * @since 3.2.0
- * @access private
- *
- * @param object $item The menu item to check.
- * @return bool False if invalid, otherwise true.
- */
-function _is_valid_nav_menu_item( $item ) {
-	return empty( $item->_invalid );
-}
-
-/**
- * Return all menu items of a navigation menu.
- *
- * @since 3.0.0
- *
- * @global string $_menu_item_sort_prop
- * @staticvar array $fetched
- *
- * @param string $menu Menu name, ID, or slug.
- * @param array  $args Optional. Arguments to pass to get_posts().
- * @return false|array $items Array of menu items, otherwise false.
- */
-function wp_get_nav_menu_items( $menu, $args = array() ) {
-	$menu = wp_get_nav_menu_object( $menu );
-
-	if ( ! $menu ) {
-		return false;
-	}
-
-	static $fetched = array();
-
-	$items = get_objects_in_term( $menu->term_id, 'nav_menu' );
-	if ( is_wp_error( $items ) ) {
-		return false;
-	}
-
-	$defaults = array( 'order' => 'ASC', 'orderby' => 'menu_order', 'post_type' => 'nav_menu_item',
-		'post_status' => 'publish', 'output' => ARRAY_A, 'output_key' => 'menu_order', 'nopaging' => true );
-	$args = wp_parse_args( $args, $defaults );
-	$args['include'] = $items;
-
-	if ( ! empty( $items ) ) {
-		$items = get_posts( $args );
-	} else {
-		$items = array();
-	}
-
-	// Get all posts and terms at once to prime the caches
-	if ( empty( $fetched[$menu->term_id] ) || wp_using_ext_object_cache() ) {
-		$fetched[$menu->term_id] = true;
-		$posts = array();
-		$terms = array();
-		foreach ( $items as $item ) {
-			$object_id = get_post_meta( $item->ID, '_menu_item_object_id', true );
-			$object    = get_post_meta( $item->ID, '_menu_item_object',    true );
-			$type      = get_post_meta( $item->ID, '_menu_item_type',      true );
-
-			if ( 'post_type' == $type )
-				$posts[$object][] = $object_id;
-			elseif ( 'taxonomy' == $type)
-				$terms[$object][] = $object_id;
-		}
-
-		if ( ! empty( $posts ) ) {
-			foreach ( array_keys($posts) as $post_type ) {
-				get_posts( array('post__in' => $posts[$post_type], 'post_type' => $post_type, 'nopaging' => true, 'update_post_term_cache' => false) );
-			}
-		}
-		unset($posts);
-
-		if ( ! empty( $terms ) ) {
-			foreach ( array_keys($terms) as $taxonomy ) {
-				get_terms( $taxonomy, array(
-					'include' => $terms[ $taxonomy ],
-					'hierarchical' => false,
-				) );
-			}
-		}
-		unset($terms);
-	}
-
-	$items = array_map( 'wp_setup_nav_menu_item', $items );
-
-	if ( ! is_admin() ) { // Remove invalid items only in front end
-		$items = array_filter( $items, '_is_valid_nav_menu_item' );
-	}
-
-	if ( ARRAY_A == $args['output'] ) {
-		$GLOBALS['_menu_item_sort_prop'] = $args['output_key'];
-		usort($items, '_sort_nav_menu_items');
-		$i = 1;
-		foreach ( $items as $k => $item ) {
-			$items[$k]->{$args['output_key']} = $i++;
-		}
-	}
-
-	/**
-	 * Filters the navigation menu items being returned.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param array  $items An array of menu item post objects.
-	 * @param object $menu  The menu object.
-	 * @param array  $args  An array of arguments used to retrieve menu item objects.
-	 */
-	return apply_filters( 'wp_get_nav_menu_items', $items, $menu, $args );
-}
-
-/**
- * Decorates a menu item object with the shared navigation menu item properties.
- *
- * Properties:
- * - ID:               The term_id if the menu item represents a taxonomy term.
- * - attr_title:       The title attribute of the link element for this menu item.
- * - classes:          The array of class attribute values for the link element of this menu item.
- * - db_id:            The DB ID of this item as a nav_menu_item object, if it exists (0 if it doesn't exist).
- * - description:      The description of this menu item.
- * - menu_item_parent: The DB ID of the nav_menu_item that is this item's menu parent, if any. 0 otherwise.
- * - object:           The type of object originally represented, such as "category," "post", or "attachment."
- * - object_id:        The DB ID of the original object this menu item represents, e.g. ID for posts and term_id for categories.
- * - post_parent:      The DB ID of the original object's parent object, if any (0 otherwise).
- * - post_title:       A "no title" label if menu item represents a post that lacks a title.
- * - target:           The target attribute of the link element for this menu item.
- * - title:            The title of this menu item.
- * - type:             The family of objects originally represented, such as "post_type" or "taxonomy."
- * - type_label:       The singular label used to describe this type of menu item.
- * - url:              The URL to which this menu item points.
- * - xfn:              The XFN relationship expressed in the link of this menu item.
- * - _invalid:         Whether the menu item represents an object that no longer exists.
- *
- * @since 3.0.0
- *
- * @param object $menu_item The menu item to modify.
- * @return object $menu_item The menu item with standard menu item properties.
- */
-function wp_setup_nav_menu_item( $menu_item ) {
-	if ( isset( $menu_item->post_type ) ) {
-		if ( 'nav_menu_item' == $menu_item->post_type ) {
-			$menu_item->db_id = (int) $menu_item->ID;
-			$menu_item->menu_item_parent = ! isset( $menu_item->menu_item_parent ) ? get_post_meta( $menu_item->ID, '_menu_item_menu_item_parent', true ) : $menu_item->menu_item_parent;
-			$menu_item->object_id = ! isset( $menu_item->object_id ) ? get_post_meta( $menu_item->ID, '_menu_item_object_id', true ) : $menu_item->object_id;
-			$menu_item->object = ! isset( $menu_item->object ) ? get_post_meta( $menu_item->ID, '_menu_item_object', true ) : $menu_item->object;
-			$menu_item->type = ! isset( $menu_item->type ) ? get_post_meta( $menu_item->ID, '_menu_item_type', true ) : $menu_item->type;
-
-			if ( 'post_type' == $menu_item->type ) {
-				$object = get_post_type_object( $menu_item->object );
-				if ( $object ) {
-					$menu_item->type_label = $object->labels->singular_name;
-				} else {
-					$menu_item->type_label = $menu_item->object;
-					$menu_item->_invalid = true;
-				}
-
-				$menu_item->url = get_permalink( $menu_item->object_id );
-
-				$original_object = get_post( $menu_item->object_id );
-				/** This filter is documented in wp-includes/post-template.php */
-				$original_title = apply_filters( 'the_title', $original_object->post_title, $original_object->ID );
-
-				if ( '' === $original_title ) {
-					/* translators: %d: ID of a post */
-					$original_title = sprintf( __( '#%d (no title)' ), $original_object->ID );
-				}
-
-				$menu_item->title = '' == $menu_item->post_title ? $original_title : $menu_item->post_title;
-
-			} elseif ( 'post_type_archive' == $menu_item->type ) {
-				$object =  get_post_type_object( $menu_item->object );
-				if ( $object ) {
-					$menu_item->title = '' == $menu_item->post_title ? $object->labels->archives : $menu_item->post_title;
-					$post_type_description = $object->description;
-				} else {
-					$menu_item->_invalid = true;
-					$post_type_description = '';
-				}
-
-				$menu_item->type_label = __( 'Post Type Archive' );
-				$post_content = wp_trim_words( $menu_item->post_content, 200 );
-				$post_type_description = '' == $post_content ? $post_type_description : $post_content; 
-				$menu_item->url = get_post_type_archive_link( $menu_item->object );
-			} elseif ( 'taxonomy' == $menu_item->type ) {
-				$object = get_taxonomy( $menu_item->object );
-				if ( $object ) {
-					$menu_item->type_label = $object->labels->singular_name;
-				} else {
-					$menu_item->type_label = $menu_item->object;
-					$menu_item->_invalid = true;
-				}
-
-				$term_url = get_term_link( (int) $menu_item->object_id, $menu_item->object );
-				$menu_item->url = !is_wp_error( $term_url ) ? $term_url : '';
-
-				$original_title = get_term_field( 'name', $menu_item->object_id, $menu_item->object, 'raw' );
-				if ( is_wp_error( $original_title ) )
-					$original_title = false;
-				$menu_item->title = '' == $menu_item->post_title ? $original_title : $menu_item->post_title;
-
-			} else {
-				$menu_item->type_label = __('Custom Link');
-				$menu_item->title = $menu_item->post_title;
-				$menu_item->url = ! isset( $menu_item->url ) ? get_post_meta( $menu_item->ID, '_menu_item_url', true ) : $menu_item->url;
-			}
-
-			$menu_item->target = ! isset( $menu_item->target ) ? get_post_meta( $menu_item->ID, '_menu_item_target', true ) : $menu_item->target;
-
-			/**
-			 * Filters a navigation menu item's title attribute.
-			 *
-			 * @since 3.0.0
-			 *
-			 * @param string $item_title The menu item title attribute.
-			 */
-			$menu_item->attr_title = ! isset( $menu_item->attr_title ) ? apply_filters( 'nav_menu_attr_title', $menu_item->post_excerpt ) : $menu_item->attr_title;
-
-			if ( ! isset( $menu_item->description ) ) {
-				/**
-				 * Filters a navigation menu item's description.
-				 *
-				 * @since 3.0.0
-				 *
-				 * @param string $description The menu item description.
-				 */
-				$menu_item->description = apply_filters( 'nav_menu_description', wp_trim_words( $menu_item->post_content, 200 ) );
-			}
-
-			$menu_item->classes = ! isset( $menu_item->classes ) ? (array) get_post_meta( $menu_item->ID, '_menu_item_classes', true ) : $menu_item->classes;
-			$menu_item->xfn = ! isset( $menu_item->xfn ) ? get_post_meta( $menu_item->ID, '_menu_item_xfn', true ) : $menu_item->xfn;
-		} else {
-			$menu_item->db_id = 0;
-			$menu_item->menu_item_parent = 0;
-			$menu_item->object_id = (int) $menu_item->ID;
-			$menu_item->type = 'post_type';
-
-			$object = get_post_type_object( $menu_item->post_type );
-			$menu_item->object = $object->name;
-			$menu_item->type_label = $object->labels->singular_name;
-
-			if ( '' === $menu_item->post_title ) {
-				/* translators: %d: ID of a post */
-				$menu_item->post_title = sprintf( __( '#%d (no title)' ), $menu_item->ID );
-			}
-
-			$menu_item->title = $menu_item->post_title;
-			$menu_item->url = get_permalink( $menu_item->ID );
-			$menu_item->target = '';
-
-			/** This filter is documented in wp-includes/nav-menu.php */
-			$menu_item->attr_title = apply_filters( 'nav_menu_attr_title', '' );
-
-			/** This filter is documented in wp-includes/nav-menu.php */
-			$menu_item->description = apply_filters( 'nav_menu_description', '' );
-			$menu_item->classes = array();
-			$menu_item->xfn = '';
-		}
-	} elseif ( isset( $menu_item->taxonomy ) ) {
-		$menu_item->ID = $menu_item->term_id;
-		$menu_item->db_id = 0;
-		$menu_item->menu_item_parent = 0;
-		$menu_item->object_id = (int) $menu_item->term_id;
-		$menu_item->post_parent = (int) $menu_item->parent;
-		$menu_item->type = 'taxonomy';
-
-		$object = get_taxonomy( $menu_item->taxonomy );
-		$menu_item->object = $object->name;
-		$menu_item->type_label = $object->labels->singular_name;
-
-		$menu_item->title = $menu_item->name;
-		$menu_item->url = get_term_link( $menu_item, $menu_item->taxonomy );
-		$menu_item->target = '';
-		$menu_item->attr_title = '';
-		$menu_item->description = get_term_field( 'description', $menu_item->term_id, $menu_item->taxonomy );
-		$menu_item->classes = array();
-		$menu_item->xfn = '';
-
-	}
-
-	/**
-	 * Filters a navigation menu item object.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param object $menu_item The menu item object.
-	 */
-	return apply_filters( 'wp_setup_nav_menu_item', $menu_item );
-}
-
-/**
- * Get the menu items associated with a particular object.
- *
- * @since 3.0.0
- *
- * @param int    $object_id   The ID of the original object.
- * @param string $object_type The type of object, such as "taxonomy" or "post_type."
- * @param string $taxonomy    If $object_type is "taxonomy", $taxonomy is the name of the tax that $object_id belongs to
- * @return array The array of menu item IDs; empty array if none;
- */
-function wp_get_associated_nav_menu_items( $object_id = 0, $object_type = 'post_type', $taxonomy = '' ) {
-	$object_id = (int) $object_id;
-	$menu_item_ids = array();
-
-	$query = new WP_Query;
-	$menu_items = $query->query(
-		array(
-			'meta_key' => '_menu_item_object_id',
-			'meta_value' => $object_id,
-			'post_status' => 'any',
-			'post_type' => 'nav_menu_item',
-			'posts_per_page' => -1,
-		)
-	);
-	foreach ( (array) $menu_items as $menu_item ) {
-		if ( isset( $menu_item->ID ) && is_nav_menu_item( $menu_item->ID ) ) {
-			$menu_item_type = get_post_meta( $menu_item->ID, '_menu_item_type', true );
-			if (
-				'post_type' == $object_type &&
-				'post_type' == $menu_item_type
-			) {
-				$menu_item_ids[] = (int) $menu_item->ID;
-			} elseif (
-				'taxonomy' == $object_type &&
-				'taxonomy' == $menu_item_type &&
-				get_post_meta( $menu_item->ID, '_menu_item_object', true ) == $taxonomy
-			) {
-				$menu_item_ids[] = (int) $menu_item->ID;
-			}
-		}
-	}
-
-	return array_unique( $menu_item_ids );
-}
-
-/**
- * Callback for handling a menu item when its original object is deleted.
- *
- * @since 3.0.0
- * @access private
- *
- * @param int $object_id The ID of the original object being trashed.
- *
- */
-function _wp_delete_post_menu_item( $object_id = 0 ) {
-	$object_id = (int) $object_id;
-
-	$menu_item_ids = wp_get_associated_nav_menu_items( $object_id, 'post_type' );
-
-	foreach ( (array) $menu_item_ids as $menu_item_id ) {
-		wp_delete_post( $menu_item_id, true );
-	}
-}
-
-/**
- * Serves as a callback for handling a menu item when its original object is deleted.
- *
- * @since 3.0.0
- * @access private
- *
- * @param int    $object_id Optional. The ID of the original object being trashed. Default 0.
- * @param int    $tt_id     Term taxonomy ID. Unused.
- * @param string $taxonomy  Taxonomy slug.
- */
-function _wp_delete_tax_menu_item( $object_id = 0, $tt_id, $taxonomy ) {
-	$object_id = (int) $object_id;
-
-	$menu_item_ids = wp_get_associated_nav_menu_items( $object_id, 'taxonomy', $taxonomy );
-
-	foreach ( (array) $menu_item_ids as $menu_item_id ) {
-		wp_delete_post( $menu_item_id, true );
-	}
-}
-
-/**
- * Automatically add newly published page objects to menus with that as an option.
- *
- * @since 3.0.0
- * @access private
- *
- * @param string $new_status The new status of the post object.
- * @param string $old_status The old status of the post object.
- * @param object $post       The post object being transitioned from one status to another.
- */
-function _wp_auto_add_pages_to_menu( $new_status, $old_status, $post ) {
-	if ( 'publish' != $new_status || 'publish' == $old_status || 'page' != $post->post_type )
-		return;
-	if ( ! empty( $post->post_parent ) )
-		return;
-	$auto_add = get_option( 'nav_menu_options' );
-	if ( empty( $auto_add ) || ! is_array( $auto_add ) || ! isset( $auto_add['auto_add'] ) )
-		return;
-	$auto_add = $auto_add['auto_add'];
-	if ( empty( $auto_add ) || ! is_array( $auto_add ) )
-		return;
-
-	$args = array(
-		'menu-item-object-id' => $post->ID,
-		'menu-item-object' => $post->post_type,
-		'menu-item-type' => 'post_type',
-		'menu-item-status' => 'publish',
-	);
-
-	foreach ( $auto_add as $menu_id ) {
-		$items = wp_get_nav_menu_items( $menu_id, array( 'post_status' => 'publish,draft' ) );
-		if ( ! is_array( $items ) )
-			continue;
-		foreach ( $items as $item ) {
-			if ( $post->ID == $item->object_id )
-				continue 2;
-		}
-		wp_update_nav_menu_item( $menu_id, 0, $args );
-	}
-}
Index: www/wp-includes/random_compat/random_bytes_libsodium_legacy.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/random_compat/random_bytes_libsodium_legacy.php	(revision 38565)
+++ www/wp-includes/random_compat/random_bytes_libsodium_legacy.php	(revision 38565)
@@ -1,86 +0,0 @@
-<?php
-/**
- * Random_* Compatibility Library 
- * for using the new PHP 7 random_* API in PHP 5 projects
- * 
- * The MIT License (MIT)
- * 
- * Copyright (c) 2015 Paragon Initiative Enterprises
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/**
- * If the libsodium PHP extension is loaded, we'll use it above any other
- * solution.
- *
- * libsodium-php project:
- * @ref https://github.com/jedisct1/libsodium-php
- *
- * @param int $bytes
- *
- * @throws Exception
- *
- * @return string
- */
-function random_bytes($bytes)
-{
-    try {
-        $bytes = RandomCompat_intval($bytes);
-    } catch (TypeError $ex) {
-        throw new TypeError(
-            'random_bytes(): $bytes must be an integer'
-        );
-    }
-
-    if ($bytes < 1) {
-        throw new Error(
-            'Length must be greater than 0'
-        );
-    }
-
-    /**
-     * \Sodium\randombytes_buf() doesn't allow more than 2147483647 bytes to be
-     * generated in one invocation.
-     */
-    if ($bytes > 2147483647) {
-        $buf = '';
-        for ($i = 0; $i < $bytes; $i += 1073741824) {
-            $n = ($bytes - $i) > 1073741824
-                ? 1073741824
-                : $bytes - $i;
-            $buf .= Sodium::randombytes_buf($n);
-        }
-    } else {
-        $buf = Sodium::randombytes_buf($bytes);
-    }
-
-    if ($buf !== false) {
-        if (RandomCompat_strlen($buf) === $bytes) {
-            return $buf;
-        }
-    }
-
-    /**
-     * If we reach here, PHP has failed us.
-     */
-    throw new Exception(
-        'Could not gather sufficient random data'
-    );
-}
Index: www/wp-includes/SimplePie/Content/Type/Sniffer.php
===================================================================
--- www/wp-includes/SimplePie/Content/Type/Sniffer.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_Content_Type_Sniffer.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/requests/Exception/Transport.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/Transport.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/Transport.php	(revision UNDEFINED)
@@ -1,5 +0,0 @@
-<?php
-
-class Requests_Exception_Transport extends Requests_Exception {
-
-}
Index: www/wp-includes/customize/class-wp-customize-header-image-setting.php
===================================================================
--- www/wp-includes/customize/class-wp-customize-header-image-setting.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Header_Image_Setting.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/http.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/http.php	(revision 38565)
+++ www/wp-includes/http.php	(revision 38565)
@@ -1,669 +0,0 @@
-<?php
-/**
- * Core HTTP Request API
- *
- * Standardizes the HTTP requests for WordPress. Handles cookies, gzip encoding and decoding, chunk
- * decoding, if HTTP 1.1 and various other difficult HTTP protocol implementations.
- *
- * @package WordPress
- * @subpackage HTTP
- */
-
-/**
- * Returns the initialized WP_Http Object
- *
- * @since 2.7.0
- * @access private
- *
- * @staticvar WP_Http $http
- *
- * @return WP_Http HTTP Transport object.
- */
-function _wp_http_get_object() {
-	static $http = null;
-
-	if ( is_null( $http ) ) {
-		$http = new WP_Http();
-	}
-	return $http;
-}
-
-/**
- * Retrieve the raw response from a safe HTTP request.
- *
- * This function is ideal when the HTTP request is being made to an arbitrary
- * URL. The URL is validated to avoid redirection and request forgery attacks.
- *
- * @since 3.6.0
- *
- * @see wp_remote_request() For more information on the response array format.
- * @see WP_Http::request() For default arguments information.
- *
- * @param string $url  Site URL to retrieve.
- * @param array  $args Optional. Request arguments. Default empty array.
- * @return WP_Error|array The response or WP_Error on failure.
- */
-function wp_safe_remote_request( $url, $args = array() ) {
-	$args['reject_unsafe_urls'] = true;
-	$http = _wp_http_get_object();
-	return $http->request( $url, $args );
-}
-
-/**
- * Retrieve the raw response from a safe HTTP request using the GET method.
- *
- * This function is ideal when the HTTP request is being made to an arbitrary
- * URL. The URL is validated to avoid redirection and request forgery attacks.
- *
- * @since 3.6.0
- *
- * @see wp_remote_request() For more information on the response array format.
- * @see WP_Http::request() For default arguments information.
- *
- * @param string $url  Site URL to retrieve.
- * @param array  $args Optional. Request arguments. Default empty array.
- * @return WP_Error|array The response or WP_Error on failure.
- */
-function wp_safe_remote_get( $url, $args = array() ) {
-	$args['reject_unsafe_urls'] = true;
-	$http = _wp_http_get_object();
-	return $http->get( $url, $args );
-}
-
-/**
- * Retrieve the raw response from a safe HTTP request using the POST method.
- *
- * This function is ideal when the HTTP request is being made to an arbitrary
- * URL. The URL is validated to avoid redirection and request forgery attacks.
- *
- * @since 3.6.0
- *
- * @see wp_remote_request() For more information on the response array format.
- * @see WP_Http::request() For default arguments information.
- *
- * @param string $url  Site URL to retrieve.
- * @param array  $args Optional. Request arguments. Default empty array.
- * @return WP_Error|array The response or WP_Error on failure.
- */
-function wp_safe_remote_post( $url, $args = array() ) {
-	$args['reject_unsafe_urls'] = true;
-	$http = _wp_http_get_object();
-	return $http->post( $url, $args );
-}
-
-/**
- * Retrieve the raw response from a safe HTTP request using the HEAD method.
- *
- * This function is ideal when the HTTP request is being made to an arbitrary
- * URL. The URL is validated to avoid redirection and request forgery attacks.
- *
- * @since 3.6.0
- *
- * @see wp_remote_request() For more information on the response array format.
- * @see WP_Http::request() For default arguments information.
- *
- * @param string $url Site URL to retrieve.
- * @param array $args Optional. Request arguments. Default empty array.
- * @return WP_Error|array The response or WP_Error on failure.
- */
-function wp_safe_remote_head( $url, $args = array() ) {
-	$args['reject_unsafe_urls'] = true;
-	$http = _wp_http_get_object();
-	return $http->head( $url, $args );
-}
-
-/**
- * Retrieve the raw response from the HTTP request.
- *
- * The array structure is a little complex:
- *
- *     $res = array(
- *         'headers'  => array(),
- *         'response' => array(
- *             'code'    => int,
- *             'message' => string
- *         )
- *     );
- *
- * All of the headers in $res['headers'] are with the name as the key and the
- * value as the value. So to get the User-Agent, you would do the following.
- *
- *     $user_agent = $res['headers']['user-agent'];
- *
- * The body is the raw response content and can be retrieved from $res['body'].
- *
- * This function is called first to make the request and there are other API
- * functions to abstract out the above convoluted setup.
- *
- * Request method defaults for helper functions:
- *  - Default 'GET'  for wp_remote_get()
- *  - Default 'POST' for wp_remote_post()
- *  - Default 'HEAD' for wp_remote_head()
- *
- * @since 2.7.0
- *
- * @see WP_Http::request() For additional information on default arguments.
- *
- * @param string $url  Site URL to retrieve.
- * @param array  $args Optional. Request arguments. Default empty array.
- * @return WP_Error|array The response or WP_Error on failure.
- */
-function wp_remote_request($url, $args = array()) {
-	$http = _wp_http_get_object();
-	return $http->request( $url, $args );
-}
-
-/**
- * Retrieve the raw response from the HTTP request using the GET method.
- *
- * @since 2.7.0
- *
- * @see wp_remote_request() For more information on the response array format.
- * @see WP_Http::request() For default arguments information.
- *
- * @param string $url  Site URL to retrieve.
- * @param array  $args Optional. Request arguments. Default empty array.
- * @return WP_Error|array The response or WP_Error on failure.
- */
-function wp_remote_get($url, $args = array()) {
-	$http = _wp_http_get_object();
-	return $http->get( $url, $args );
-}
-
-/**
- * Retrieve the raw response from the HTTP request using the POST method.
- *
- * @since 2.7.0
- *
- * @see wp_remote_request() For more information on the response array format.
- * @see WP_Http::request() For default arguments information.
- *
- * @param string $url  Site URL to retrieve.
- * @param array  $args Optional. Request arguments. Default empty array.
- * @return WP_Error|array The response or WP_Error on failure.
- */
-function wp_remote_post($url, $args = array()) {
-	$http = _wp_http_get_object();
-	return $http->post( $url, $args );
-}
-
-/**
- * Retrieve the raw response from the HTTP request using the HEAD method.
- *
- * @since 2.7.0
- *
- * @see wp_remote_request() For more information on the response array format.
- * @see WP_Http::request() For default arguments information.
- *
- * @param string $url  Site URL to retrieve.
- * @param array  $args Optional. Request arguments. Default empty array.
- * @return WP_Error|array The response or WP_Error on failure.
- */
-function wp_remote_head($url, $args = array()) {
-	$http = _wp_http_get_object();
-	return $http->head( $url, $args );
-}
-
-/**
- * Retrieve only the headers from the raw response.
- *
- * @since 2.7.0
- *
- * @param array $response HTTP response.
- * @return array The headers of the response. Empty array if incorrect parameter given.
- */
-function wp_remote_retrieve_headers( $response ) {
-	if ( is_wp_error( $response ) || ! isset( $response['headers'] ) ) {
-		return array();
-	}
-
-	return $response['headers'];
-}
-
-/**
- * Retrieve a single header by name from the raw response.
- *
- * @since 2.7.0
- *
- * @param array  $response
- * @param string $header Header name to retrieve value from.
- * @return string The header value. Empty string on if incorrect parameter given, or if the header doesn't exist.
- */
-function wp_remote_retrieve_header( $response, $header ) {
-	if ( is_wp_error( $response ) || ! isset( $response['headers'] ) ) {
-		return '';
-	}
-
-	if ( isset( $response['headers'][ $header ] ) ) {
-		return $response['headers'][$header];
-	}
-
-	return '';
-}
-
-/**
- * Retrieve only the response code from the raw response.
- *
- * Will return an empty array if incorrect parameter value is given.
- *
- * @since 2.7.0
- *
- * @param array $response HTTP response.
- * @return int|string The response code as an integer. Empty string on incorrect parameter given.
- */
-function wp_remote_retrieve_response_code( $response ) {
-	if ( is_wp_error($response) || ! isset($response['response']) || ! is_array($response['response']))
-		return '';
-
-	return $response['response']['code'];
-}
-
-/**
- * Retrieve only the response message from the raw response.
- *
- * Will return an empty array if incorrect parameter value is given.
- *
- * @since 2.7.0
- *
- * @param array $response HTTP response.
- * @return string The response message. Empty string on incorrect parameter given.
- */
-function wp_remote_retrieve_response_message( $response ) {
-	if ( is_wp_error($response) || ! isset($response['response']) || ! is_array($response['response']))
-		return '';
-
-	return $response['response']['message'];
-}
-
-/**
- * Retrieve only the body from the raw response.
- *
- * @since 2.7.0
- *
- * @param array $response HTTP response.
- * @return string The body of the response. Empty string if no body or incorrect parameter given.
- */
-function wp_remote_retrieve_body( $response ) {
-	if ( is_wp_error($response) || ! isset($response['body']) )
-		return '';
-
-	return $response['body'];
-}
-
-/**
- * Retrieve only the cookies from the raw response.
- *
- * @since 4.4.0
- *
- * @param array $response HTTP response.
- * @return array An array of `WP_Http_Cookie` objects from the response. Empty array if there are none, or the response is a WP_Error.
- */
-function wp_remote_retrieve_cookies( $response ) {
-	if ( is_wp_error( $response ) || empty( $response['cookies'] ) ) {
-		return array();
-	}
-
-	return $response['cookies'];
-}
-
-/**
- * Retrieve a single cookie by name from the raw response.
- *
- * @since 4.4.0
- *
- * @param array  $response HTTP response.
- * @param string $name     The name of the cookie to retrieve.
- * @return WP_Http_Cookie|string The `WP_Http_Cookie` object. Empty string if the cookie isn't present in the response.
- */
-function wp_remote_retrieve_cookie( $response, $name ) {
-	$cookies = wp_remote_retrieve_cookies( $response );
-
-	if ( empty( $cookies ) ) {
-		return '';
-	}
-
-	foreach ( $cookies as $cookie ) {
-		if ( $cookie->name === $name ) {
-			return $cookie;
-		}
-	}
-
-	return '';
-}
-
-/**
- * Retrieve a single cookie's value by name from the raw response.
- *
- * @since 4.4.0
- *
- * @param array  $response HTTP response.
- * @param string $name     The name of the cookie to retrieve.
- * @return string The value of the cookie. Empty string if the cookie isn't present in the response.
- */
-function wp_remote_retrieve_cookie_value( $response, $name ) {
-	$cookie = wp_remote_retrieve_cookie( $response, $name );
-
-	if ( ! is_a( $cookie, 'WP_Http_Cookie' ) ) {
-		return '';
-	}
-
-	return $cookie->value;
-}
-
-/**
- * Determines if there is an HTTP Transport that can process this request.
- *
- * @since 3.2.0
- *
- * @param array  $capabilities Array of capabilities to test or a wp_remote_request() $args array.
- * @param string $url          Optional. If given, will check if the URL requires SSL and adds
- *                             that requirement to the capabilities array.
- *
- * @return bool
- */
-function wp_http_supports( $capabilities = array(), $url = null ) {
-	$http = _wp_http_get_object();
-
-	$capabilities = wp_parse_args( $capabilities );
-
-	$count = count( $capabilities );
-
-	// If we have a numeric $capabilities array, spoof a wp_remote_request() associative $args array
-	if ( $count && count( array_filter( array_keys( $capabilities ), 'is_numeric' ) ) == $count ) {
-		$capabilities = array_combine( array_values( $capabilities ), array_fill( 0, $count, true ) );
-	}
-
-	if ( $url && !isset( $capabilities['ssl'] ) ) {
-		$scheme = parse_url( $url, PHP_URL_SCHEME );
-		if ( 'https' == $scheme || 'ssl' == $scheme ) {
-			$capabilities['ssl'] = true;
-		}
-	}
-
-	return (bool) $http->_get_first_available_transport( $capabilities );
-}
-
-/**
- * Get the HTTP Origin of the current request.
- *
- * @since 3.4.0
- *
- * @return string URL of the origin. Empty string if no origin.
- */
-function get_http_origin() {
-	$origin = '';
-	if ( ! empty ( $_SERVER[ 'HTTP_ORIGIN' ] ) )
-		$origin = $_SERVER[ 'HTTP_ORIGIN' ];
-
-	/**
-	 * Change the origin of an HTTP request.
-	 *
-	 * @since 3.4.0
-	 *
-	 * @param string $origin The original origin for the request.
-	 */
-	return apply_filters( 'http_origin', $origin );
-}
-
-/**
- * Retrieve list of allowed HTTP origins.
- *
- * @since 3.4.0
- *
- * @return array Array of origin URLs.
- */
-function get_allowed_http_origins() {
-	$admin_origin = parse_url( admin_url() );
-	$home_origin = parse_url( home_url() );
-
-	// @todo preserve port?
-	$allowed_origins = array_unique( array(
-		'http://' . $admin_origin[ 'host' ],
-		'https://' . $admin_origin[ 'host' ],
-		'http://' . $home_origin[ 'host' ],
-		'https://' . $home_origin[ 'host' ],
-	) );
-
-	/**
-	 * Change the origin types allowed for HTTP requests.
-	 *
-	 * @since 3.4.0
-	 *
-	 * @param array $allowed_origins {
-	 *     Default allowed HTTP origins.
-	 *     @type string Non-secure URL for admin origin.
-	 *     @type string Secure URL for admin origin.
-	 *     @type string Non-secure URL for home origin.
-	 *     @type string Secure URL for home origin.
-	 * }
-	 */
-	return apply_filters( 'allowed_http_origins' , $allowed_origins );
-}
-
-/**
- * Determines if the HTTP origin is an authorized one.
- *
- * @since 3.4.0
- *
- * @param null|string $origin Origin URL. If not provided, the value of get_http_origin() is used.
- * @return string Origin URL if allowed, empty string if not.
- */
-function is_allowed_http_origin( $origin = null ) {
-	$origin_arg = $origin;
-
-	if ( null === $origin )
-		$origin = get_http_origin();
-
-	if ( $origin && ! in_array( $origin, get_allowed_http_origins() ) )
-		$origin = '';
-
-	/**
-	 * Change the allowed HTTP origin result.
-	 *
-	 * @since 3.4.0
-	 *
-	 * @param string $origin     Origin URL if allowed, empty string if not.
-	 * @param string $origin_arg Original origin string passed into is_allowed_http_origin function.
-	 */
-	return apply_filters( 'allowed_http_origin', $origin, $origin_arg );
-}
-
-/**
- * Send Access-Control-Allow-Origin and related headers if the current request
- * is from an allowed origin.
- *
- * If the request is an OPTIONS request, the script exits with either access
- * control headers sent, or a 403 response if the origin is not allowed. For
- * other request methods, you will receive a return value.
- *
- * @since 3.4.0
- *
- * @return string|false Returns the origin URL if headers are sent. Returns false
- *                      if headers are not sent.
- */
-function send_origin_headers() {
-	$origin = get_http_origin();
-
-	if ( is_allowed_http_origin( $origin ) ) {
-		@header( 'Access-Control-Allow-Origin: ' .  $origin );
-		@header( 'Access-Control-Allow-Credentials: true' );
-		if ( 'OPTIONS' === $_SERVER['REQUEST_METHOD'] )
-			exit;
-		return $origin;
-	}
-
-	if ( 'OPTIONS' === $_SERVER['REQUEST_METHOD'] ) {
-		status_header( 403 );
-		exit;
-	}
-
-	return false;
-}
-
-/**
- * Validate a URL for safe use in the HTTP API.
- *
- * @since 3.5.2
- *
- * @param string $url
- * @return false|string URL or false on failure.
- */
-function wp_http_validate_url( $url ) {
-	$original_url = $url;
-	$url = wp_kses_bad_protocol( $url, array( 'http', 'https' ) );
-	if ( ! $url || strtolower( $url ) !== strtolower( $original_url ) )
-		return false;
-
-	$parsed_url = @parse_url( $url );
-	if ( ! $parsed_url || empty( $parsed_url['host'] ) )
-		return false;
-
-	if ( isset( $parsed_url['user'] ) || isset( $parsed_url['pass'] ) )
-		return false;
-
-	if ( false !== strpbrk( $parsed_url['host'], ':#?[]' ) )
-		return false;
-
-	$parsed_home = @parse_url( get_option( 'home' ) );
-
-	if ( isset( $parsed_home['host'] ) ) {
-		$same_host = ( strtolower( $parsed_home['host'] ) === strtolower( $parsed_url['host'] ) || 'localhost' === strtolower( $parsed_url['host'] ) );
-	} else {
-		$same_host = false;
-	}
-
-	if ( ! $same_host ) {
-		$host = trim( $parsed_url['host'], '.' );
-		if ( preg_match( '#^(([1-9]?\d|1\d\d|25[0-5]|2[0-4]\d)\.){3}([1-9]?\d|1\d\d|25[0-5]|2[0-4]\d)$#', $host ) ) {
-			$ip = $host;
-		} else {
-			$ip = gethostbyname( $host );
-			if ( $ip === $host ) // Error condition for gethostbyname()
-				$ip = false;
-		}
-		if ( $ip ) {
-			$parts = array_map( 'intval', explode( '.', $ip ) );
-			if ( 127 === $parts[0] || 10 === $parts[0] || 0 === $parts[0]
-				|| ( 172 === $parts[0] && 16 <= $parts[1] && 31 >= $parts[1] )
-				|| ( 192 === $parts[0] && 168 === $parts[1] )
-			) {
-				// If host appears local, reject unless specifically allowed.
-				/**
-				 * Check if HTTP request is external or not.
-				 *
-				 * Allows to change and allow external requests for the HTTP request.
-				 *
-				 * @since 3.6.0
-				 *
-				 * @param bool   false Whether HTTP request is external or not.
-				 * @param string $host IP of the requested host.
-				 * @param string $url  URL of the requested host.
-				 */
-				if ( ! apply_filters( 'http_request_host_is_external', false, $host, $url ) )
-					return false;
-			}
-		}
-	}
-
-	if ( empty( $parsed_url['port'] ) )
-		return $url;
-
-	$port = $parsed_url['port'];
-	if ( 80 === $port || 443 === $port || 8080 === $port )
-		return $url;
-
-	if ( $parsed_home && $same_host && isset( $parsed_home['port'] ) && $parsed_home['port'] === $port )
-		return $url;
-
-	return false;
-}
-
-/**
- * Whitelists allowed redirect hosts for safe HTTP requests as well.
- *
- * Attached to the {@see 'http_request_host_is_external'} filter.
- *
- * @since 3.6.0
- *
- * @param bool   $is_external
- * @param string $host
- * @return bool
- */
-function allowed_http_request_hosts( $is_external, $host ) {
-	if ( ! $is_external && wp_validate_redirect( 'http://' . $host ) )
-		$is_external = true;
-	return $is_external;
-}
-
-/**
- * Whitelists any domain in a multisite installation for safe HTTP requests.
- *
- * Attached to the {@see 'http_request_host_is_external'} filter.
- *
- * @since 3.6.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- * @staticvar array $queried
- *
- * @param bool   $is_external
- * @param string $host
- * @return bool
- */
-function ms_allowed_http_request_hosts( $is_external, $host ) {
-	global $wpdb;
-	static $queried = array();
-	if ( $is_external )
-		return $is_external;
-	if ( $host === get_current_site()->domain )
-		return true;
-	if ( isset( $queried[ $host ] ) )
-		return $queried[ $host ];
-	$queried[ $host ] = (bool) $wpdb->get_var( $wpdb->prepare( "SELECT domain FROM $wpdb->blogs WHERE domain = %s LIMIT 1", $host ) );
-	return $queried[ $host ];
-}
-
-/**
- * A wrapper for PHP's parse_url() function that handles edgecases in < PHP 5.4.7
- *
- * PHP 5.4.7 expanded parse_url()'s ability to handle non-absolute url's, including
- * schemeless and relative url's with :// in the path, this works around those
- * limitations providing a standard output on PHP 5.2~5.4+.
- *
- * Error suppression is used as prior to PHP 5.3.3, an E_WARNING would be generated
- * when URL parsing failed.
- *
- * @since 4.4.0
- *
- * @param string $url The URL to parse.
- * @return bool|array False on failure; Array of URL components on success;
- *                    See parse_url()'s return values.
- */
-function wp_parse_url( $url ) {
-	$parts = @parse_url( $url );
-	if ( ! $parts ) {
-		// < PHP 5.4.7 compat, trouble with relative paths including a scheme break in the path
-		if ( '/' == $url[0] && false !== strpos( $url, '://' ) ) {
-			// Since we know it's a relative path, prefix with a scheme/host placeholder and try again
-			if ( ! $parts = @parse_url( 'placeholder://placeholder' . $url ) ) {
-				return $parts;
-			}
-			// Remove the placeholder values
-			unset( $parts['scheme'], $parts['host'] );
-		} else {
-			return $parts;
-		}
-	}
-
-	// < PHP 5.4.7 compat, doesn't detect schemeless URL's host field
-	if ( '//' == substr( $url, 0, 2 ) && ! isset( $parts['host'] ) ) {
-		$path_parts = explode( '/', substr( $parts['path'], 2 ), 2 );
-		$parts['host'] = $path_parts[0];
-		if ( isset( $path_parts[1] ) ) {
-			$parts['path'] = '/' . $path_parts[1];
-		} else {
-			unset( $parts['path'] );
-		}
-	}
-
-	return $parts;
-}
Index: www/wp-includes/ms-default-constants.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/ms-default-constants.php	(revision 38565)
+++ www/wp-includes/ms-default-constants.php	(revision 38565)
@@ -1,164 +0,0 @@
-<?php
-/**
- * Defines constants and global variables that can be overridden, generally in wp-config.php.
- *
- * @package WordPress
- * @subpackage Multisite
- * @since 3.0.0
- */
-
-/**
- * Defines Multisite upload constants.
- *
- * Exists for backward compatibility with legacy file-serving through
- * wp-includes/ms-files.php (wp-content/blogs.php in MU).
- *
- * @since 3.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- */
-function ms_upload_constants() {
-	global $wpdb;
-
-	// This filter is attached in ms-default-filters.php but that file is not included during SHORTINIT.
-	add_filter( 'default_site_option_ms_files_rewriting', '__return_true' );
-
-	if ( ! get_site_option( 'ms_files_rewriting' ) )
-		return;
-
-	// Base uploads dir relative to ABSPATH
-	if ( !defined( 'UPLOADBLOGSDIR' ) )
-		define( 'UPLOADBLOGSDIR', 'wp-content/blogs.dir' );
-
-	// Note, the main site in a post-MU network uses wp-content/uploads.
-	// This is handled in wp_upload_dir() by ignoring UPLOADS for this case.
-	if ( ! defined( 'UPLOADS' ) ) {
-		define( 'UPLOADS', UPLOADBLOGSDIR . "/{$wpdb->blogid}/files/" );
-
-		// Uploads dir relative to ABSPATH
-		if ( 'wp-content/blogs.dir' == UPLOADBLOGSDIR && ! defined( 'BLOGUPLOADDIR' ) )
-			define( 'BLOGUPLOADDIR', WP_CONTENT_DIR . "/blogs.dir/{$wpdb->blogid}/files/" );
-	}
-}
-
-/**
- * Defines Multisite cookie constants.
- *
- * @since 3.0.0
- */
-function ms_cookie_constants(  ) {
-	$current_site = get_current_site();
-
-	/**
-	 * @since 1.2.0
-	 */
-	if ( !defined( 'COOKIEPATH' ) )
-		define( 'COOKIEPATH', $current_site->path );
-
-	/**
-	 * @since 1.5.0
-	 */
-	if ( !defined( 'SITECOOKIEPATH' ) )
-		define( 'SITECOOKIEPATH', $current_site->path );
-
-	/**
-	 * @since 2.6.0
-	 */
-	if ( !defined( 'ADMIN_COOKIE_PATH' ) ) {
-		if ( ! is_subdomain_install() || trim( parse_url( get_option( 'siteurl' ), PHP_URL_PATH ), '/' ) ) {
-			define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH );
-		} else {
-			define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' );
-		}
-	}
-
-	/**
-	 * @since 2.0.0
-	 */
-	if ( !defined('COOKIE_DOMAIN') && is_subdomain_install() ) {
-		if ( !empty( $current_site->cookie_domain ) )
-			define('COOKIE_DOMAIN', '.' . $current_site->cookie_domain);
-		else
-			define('COOKIE_DOMAIN', '.' . $current_site->domain);
-	}
-}
-
-/**
- * Defines Multisite file constants.
- *
- * Exists for backward compatibility with legacy file-serving through
- * wp-includes/ms-files.php (wp-content/blogs.php in MU).
- *
- * @since 3.0.0
- */
-function ms_file_constants() {
-	/**
-	 * Optional support for X-Sendfile header
-	 * @since 3.0.0
-	 */
-	if ( !defined( 'WPMU_SENDFILE' ) )
-		define( 'WPMU_SENDFILE', false );
-
-	/**
-	 * Optional support for X-Accel-Redirect header
-	 * @since 3.0.0
-	 */
-	if ( !defined( 'WPMU_ACCEL_REDIRECT' ) )
-		define( 'WPMU_ACCEL_REDIRECT', false );
-}
-
-/**
- * Defines Multisite subdomain constants and handles warnings and notices.
- *
- * VHOST is deprecated in favor of SUBDOMAIN_INSTALL, which is a bool.
- *
- * On first call, the constants are checked and defined. On second call,
- * we will have translations loaded and can trigger warnings easily.
- *
- * @since 3.0.0
- *
- * @staticvar bool $subdomain_error
- * @staticvar bool $subdomain_error_warn
- */
-function ms_subdomain_constants() {
-	static $subdomain_error = null;
-	static $subdomain_error_warn = null;
-
-	if ( false === $subdomain_error ) {
-		return;
-	}
-
-	if ( $subdomain_error ) {
-		$vhost_deprecated = sprintf(
-			/* translators: 1: VHOST, 2: SUBDOMAIN_INSTALL, 3: wp-config.php, 4: is_subdomain_install() */
-			__( 'The constant %1$s <strong>is deprecated</strong>. Use the boolean constant %2$s in %3$s to enable a subdomain configuration. Use %4$s to check whether a subdomain configuration is enabled.' ),
-			'<code>VHOST</code>',
-			'<code>SUBDOMAIN_INSTALL</code>',
-			'<code>wp-config.php</code>',
-			'<code>is_subdomain_install()</code>'
-		);
-		if ( $subdomain_error_warn ) {
-			trigger_error( __( '<strong>Conflicting values for the constants VHOST and SUBDOMAIN_INSTALL.</strong> The value of SUBDOMAIN_INSTALL will be assumed to be your subdomain configuration setting.' ) . ' ' . $vhost_deprecated, E_USER_WARNING );
-		} else {
-	 		_deprecated_argument( 'define()', '3.0.0', $vhost_deprecated );
-		}
-		return;
-	}
-
-	if ( defined( 'SUBDOMAIN_INSTALL' ) && defined( 'VHOST' ) ) {
-		$subdomain_error = true;
-		if ( SUBDOMAIN_INSTALL !== ( 'yes' == VHOST ) ) {
-			$subdomain_error_warn = true;
-		}
-	} elseif ( defined( 'SUBDOMAIN_INSTALL' ) ) {
-		$subdomain_error = false;
-		define( 'VHOST', SUBDOMAIN_INSTALL ? 'yes' : 'no' );
-	} elseif ( defined( 'VHOST' ) ) {
-		$subdomain_error = true;
-		define( 'SUBDOMAIN_INSTALL', 'yes' == VHOST );
-	} else {
-		$subdomain_error = false;
-		define( 'SUBDOMAIN_INSTALL', false );
-		define( 'VHOST', 'no' );
-	}
-}
Index: www/wp-includes/Requests/Response/Headers.php
===================================================================
--- www/wp-includes/Requests/Response/Headers.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Response_Headers.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/Requests/Exception/HTTP/412.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/412.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_412.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/requests/Exception/Transport/cURL.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/Transport/cURL.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/Transport/cURL.php	(revision UNDEFINED)
@@ -1,56 +0,0 @@
-<?php
-
-class Requests_Exception_Transport_cURL extends Requests_Exception_Transport {
-
-	const EASY = 'cURLEasy';
-	const MULTI = 'cURLMulti';
-	const SHARE = 'cURLShare';
-
-	/**
-	 * cURL error code
-	 *
-	 * @var integer
-	 */
-	protected $code = -1;
-
-	/**
-	 * Which type of cURL error
-	 *
-	 * EASY|MULTI|SHARE
-	 *
-	 * @var string
-	 */
-	protected $type = 'Unknown';
-
-	/**
-	 * Clear text error message
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Unknown';
-
-	public function __construct($message, $type, $data = null, $code = 0) {
-		if ($type !== null) {
-			$this->type = $type;
-		}
-
-		if ($code !== null) {
-			$this->code = $code;
-		}
-
-		if ($message !== null) {
-			$this->reason = $message;
-		}
-
-		$message = sprintf('%d %s', $this->code, $this->reason);
-		parent::__construct($message, $this->type, $data, $this->code);
-	}
-
-	/**
-	 * Get the error message
-	 */
-	public function getReason() {
-		return $this->reason;
-	}
-
-}
Index: www/wp-admin/press-this.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/press-this.php	(revision 38565)
+++ www/wp-admin/press-this.php	(revision 38565)
@@ -1,24 +0,0 @@
-<?php
-/**
- * Press This Display and Handler.
- *
- * @package WordPress
- * @subpackage Press_This
- */
-
-define('IFRAME_REQUEST' , true);
-
-/** WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-if ( ! current_user_can( 'edit_posts' ) || ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
-	wp_die(
-		'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-		'<p>' . __( 'Sorry, you are not allowed to create posts as this user.' ) . '</p>',
-		403
-	);
-}
-
-include( ABSPATH . 'wp-admin/includes/class-wp-press-this.php' ); 
-$wp_press_this = new WP_Press_This();
-$wp_press_this->html();
Index: www/wp-admin/post.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/post.php	(revision 38565)
+++ www/wp-admin/post.php	(revision 38565)
@@ -1,292 +0,0 @@
-<?php
-/**
- * Edit post administration panel.
- *
- * Manage Post actions: post, edit, delete, etc.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-$parent_file = 'edit.php';
-$submenu_file = 'edit.php';
-
-wp_reset_vars( array( 'action' ) );
-
-if ( isset( $_GET['post'] ) )
- 	$post_id = $post_ID = (int) $_GET['post'];
-elseif ( isset( $_POST['post_ID'] ) )
- 	$post_id = $post_ID = (int) $_POST['post_ID'];
-else
- 	$post_id = $post_ID = 0;
-
-/**
- * @global string  $post_type
- * @global object  $post_type_object
- * @global WP_Post $post
- */
-global $post_type, $post_type_object, $post;
-
-if ( $post_id )
-	$post = get_post( $post_id );
-
-if ( $post ) {
-	$post_type = $post->post_type;
-	$post_type_object = get_post_type_object( $post_type );
-}
-
-if ( isset( $_POST['deletepost'] ) )
-	$action = 'delete';
-elseif ( isset($_POST['wp-preview']) && 'dopreview' == $_POST['wp-preview'] )
-	$action = 'preview';
-
-$sendback = wp_get_referer();
-if ( ! $sendback ||
-     strpos( $sendback, 'post.php' ) !== false ||
-     strpos( $sendback, 'post-new.php' ) !== false ) {
-	if ( 'attachment' == $post_type ) {
-		$sendback = admin_url( 'upload.php' );
-	} else {
-		$sendback = admin_url( 'edit.php' );
-		if ( ! empty( $post_type ) ) {
-			$sendback = add_query_arg( 'post_type', $post_type, $sendback );
-		}
-	}
-} else {
-	$sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'ids'), $sendback );
-}
-
-switch($action) {
-case 'post-quickdraft-save':
-	// Check nonce and capabilities
-	$nonce = $_REQUEST['_wpnonce'];
-	$error_msg = false;
-
-	// For output of the quickdraft dashboard widget
-	require_once ABSPATH . 'wp-admin/includes/dashboard.php';
-
-	if ( ! wp_verify_nonce( $nonce, 'add-post' ) )
-		$error_msg = __( 'Unable to submit this form, please refresh and try again.' );
-
-	if ( ! current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
-		exit;
-	}
-
-	if ( $error_msg )
-		return wp_dashboard_quick_press( $error_msg );
-
-	$post = get_post( $_REQUEST['post_ID'] );
-	check_admin_referer( 'add-' . $post->post_type );
-
-	$_POST['comment_status'] = get_default_comment_status( $post->post_type );
-	$_POST['ping_status']    = get_default_comment_status( $post->post_type, 'pingback' );
-
-	edit_post();
-	wp_dashboard_quick_press();
-	exit;
-
-case 'postajaxpost':
-case 'post':
-	check_admin_referer( 'add-' . $post_type );
-	$post_id = 'postajaxpost' == $action ? edit_post() : write_post();
-	redirect_post( $post_id );
-	exit();
-
-case 'edit':
-	$editing = true;
-
-	if ( empty( $post_id ) ) {
-		wp_redirect( admin_url('post.php') );
-		exit();
-	}
-
-	if ( ! $post )
-		wp_die( __( 'You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?' ) );
-
-	if ( ! $post_type_object )
-		wp_die( __( 'Unknown post type.' ) );
-
-	if ( ! in_array( $typenow, get_post_types( array( 'show_ui' => true ) ) ) ) {
-		wp_die( __( 'Sorry, you are not allowed to edit posts in this post type.' ) );
-	}
-
-	if ( ! current_user_can( 'edit_post', $post_id ) )
-		wp_die( __( 'Sorry, you are not allowed to edit this item.' ) );
-
-	if ( 'trash' == $post->post_status )
-		wp_die( __( 'You can&#8217;t edit this item because it is in the Trash. Please restore it and try again.' ) );
-
-	if ( ! empty( $_GET['get-post-lock'] ) ) {
-		check_admin_referer( 'lock-post_' . $post_id );
-		wp_set_post_lock( $post_id );
-		wp_redirect( get_edit_post_link( $post_id, 'url' ) );
-		exit();
-	}
-
-	$post_type = $post->post_type;
-	if ( 'post' == $post_type ) {
-		$parent_file = "edit.php";
-		$submenu_file = "edit.php";
-		$post_new_file = "post-new.php";
-	} elseif ( 'attachment' == $post_type ) {
-		$parent_file = 'upload.php';
-		$submenu_file = 'upload.php';
-		$post_new_file = 'media-new.php';
-	} else {
-		if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true )
-			$parent_file = $post_type_object->show_in_menu;
-		else
-			$parent_file = "edit.php?post_type=$post_type";
-		$submenu_file = "edit.php?post_type=$post_type";
-		$post_new_file = "post-new.php?post_type=$post_type";
-	}
-
-	if ( ! wp_check_post_lock( $post->ID ) ) {
-		$active_post_lock = wp_set_post_lock( $post->ID );
-
-		if ( 'attachment' !== $post_type )
-			wp_enqueue_script('autosave');
-	}
-
-	if ( is_multisite() ) {
-		add_action( 'admin_footer', '_admin_notice_post_locked' );
-	} else {
-		$check_users = get_users( array( 'fields' => 'ID', 'number' => 2 ) );
-
-		if ( count( $check_users ) > 1 )
-			add_action( 'admin_footer', '_admin_notice_post_locked' );
-
-		unset( $check_users );
-	}
-
-	$title = $post_type_object->labels->edit_item;
-	$post = get_post($post_id, OBJECT, 'edit');
-
-	if ( post_type_supports($post_type, 'comments') ) {
-		wp_enqueue_script('admin-comments');
-		enqueue_comment_hotkeys_js();
-	}
-
-	include( ABSPATH . 'wp-admin/edit-form-advanced.php' );
-
-	break;
-
-case 'editattachment':
-	check_admin_referer('update-post_' . $post_id);
-
-	// Don't let these be changed
-	unset($_POST['guid']);
-	$_POST['post_type'] = 'attachment';
-
-	// Update the thumbnail filename
-	$newmeta = wp_get_attachment_metadata( $post_id, true );
-	$newmeta['thumb'] = $_POST['thumb'];
-
-	wp_update_attachment_metadata( $post_id, $newmeta );
-
-case 'editpost':
-	check_admin_referer('update-post_' . $post_id);
-
-	$post_id = edit_post();
-
-	// Session cookie flag that the post was saved
-	if ( isset( $_COOKIE['wp-saving-post'] ) && $_COOKIE['wp-saving-post'] === $post_id . '-check' ) {
-		setcookie( 'wp-saving-post', $post_id . '-saved', time() + DAY_IN_SECONDS, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, is_ssl() );
-	}
-
-	redirect_post($post_id); // Send user on their way while we keep working
-
-	exit();
-
-case 'trash':
-	check_admin_referer('trash-post_' . $post_id);
-
-	if ( ! $post )
-		wp_die( __( 'The item you are trying to move to the Trash no longer exists.' ) );
-
-	if ( ! $post_type_object )
-		wp_die( __( 'Unknown post type.' ) );
-
-	if ( ! current_user_can( 'delete_post', $post_id ) )
-		wp_die( __( 'Sorry, you are not allowed to move this item to the Trash.' ) );
-
-	if ( $user_id = wp_check_post_lock( $post_id ) ) {
-		$user = get_userdata( $user_id );
-		wp_die( sprintf( __( 'You cannot move this item to the Trash. %s is currently editing.' ), $user->display_name ) );
-	}
-
-	if ( ! wp_trash_post( $post_id ) )
-		wp_die( __( 'Error in moving to Trash.' ) );
-
-	wp_redirect( add_query_arg( array('trashed' => 1, 'ids' => $post_id), $sendback ) );
-	exit();
-
-case 'untrash':
-	check_admin_referer('untrash-post_' . $post_id);
-
-	if ( ! $post )
-		wp_die( __( 'The item you are trying to restore from the Trash no longer exists.' ) );
-
-	if ( ! $post_type_object )
-		wp_die( __( 'Unknown post type.' ) );
-
-	if ( ! current_user_can( 'delete_post', $post_id ) )
-		wp_die( __( 'Sorry, you are not allowed to restore this item from the Trash.' ) );
-
-	if ( ! wp_untrash_post( $post_id ) )
-		wp_die( __( 'Error in restoring from Trash.' ) );
-
-	wp_redirect( add_query_arg('untrashed', 1, $sendback) );
-	exit();
-
-case 'delete':
-	check_admin_referer('delete-post_' . $post_id);
-
-	if ( ! $post )
-		wp_die( __( 'This item has already been deleted.' ) );
-
-	if ( ! $post_type_object )
-		wp_die( __( 'Unknown post type.' ) );
-
-	if ( ! current_user_can( 'delete_post', $post_id ) )
-		wp_die( __( 'Sorry, you are not allowed to delete this item.' ) );
-
-	if ( $post->post_type == 'attachment' ) {
-		$force = ( ! MEDIA_TRASH );
-		if ( ! wp_delete_attachment( $post_id, $force ) )
-			wp_die( __( 'Error in deleting.' ) );
-	} else {
-		if ( ! wp_delete_post( $post_id, true ) )
-			wp_die( __( 'Error in deleting.' ) );
-	}
-
-	wp_redirect( add_query_arg('deleted', 1, $sendback) );
-	exit();
-
-case 'preview':
-	check_admin_referer( 'update-post_' . $post_id );
-
-	$url = post_preview();
-
-	wp_redirect($url);
-	exit();
-
-default:
-	/**
-	 * Fires for a given custom post action request.
-	 *
-	 * The dynamic portion of the hook name, `$action`, refers to the custom post action.
-	 *
-	 * @since 4.6.0
-	 *
-	 * @param int $post_id Post ID sent with the request.
-	 */
-	do_action( "post_action_{$action}", $post_id );
-
-	wp_redirect( admin_url('edit.php') );
-	exit();
-} // end switch
-include( ABSPATH . 'wp-admin/admin-footer.php' );
Index: www/wp-includes/Requests/Exception/HTTP/501.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/501.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_501.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/includes/nav-menu.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/includes/nav-menu.php	(revision 38565)
+++ www/wp-admin/includes/nav-menu.php	(revision )
@@ -7,12 +7,6 @@
  * @since 3.0.0
  */
 
-/** Walker_Nav_Menu_Edit class */
-require_once( ABSPATH . 'wp-admin/includes/class-walker-nav-menu-edit.php' );
-
-/** Walker_Nav_Menu_Checklist class */
-require_once( ABSPATH . 'wp-admin/includes/class-walker-nav-menu-checklist.php' );
-
 /**
  * Prints the appropriate response to a menu quick search.
  *
Index: www/wp-includes/class-wp-customize-widgets.php
===================================================================
--- www/wp-includes/class-wp-customize-widgets.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Widgets.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/customize/class-wp-customize-nav-menu-location-control.php
===================================================================
--- www/wp-includes/customize/class-wp-customize-nav-menu-location-control.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Nav_Menu_Location_Control.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/customize/class-wp-customize-cropped-image-control.php
===================================================================
--- www/wp-includes/customize/class-wp-customize-cropped-image-control.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Cropped_Image_Control.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/includes/class-ftp-pure.php
===================================================================
--- www/wp-admin/includes/class-ftp-pure.php	(revision 38565)
+++ www/wp-admin/autoload/ftp/ftp_pure.php	(revision )
@@ -182,5 +182,3 @@
 		}
 	}
 }
-
-?>
Index: www/wp-includes/autoload/requests/Cookie/Jar.php
===================================================================
--- www/wp-includes/autoload/requests/Cookie/Jar.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Cookie/Jar.php	(revision UNDEFINED)
@@ -1,175 +0,0 @@
-<?php
-/**
- * Cookie holder object
- *
- * @package Requests
- * @subpackage Cookies
- */
-
-/**
- * Cookie holder object
- *
- * @package Requests
- * @subpackage Cookies
- */
-class Requests_Cookie_Jar implements ArrayAccess, IteratorAggregate {
-	/**
-	 * Actual item data
-	 *
-	 * @var array
-	 */
-	protected $cookies = array();
-
-	/**
-	 * Create a new jar
-	 *
-	 * @param array $cookies Existing cookie values
-	 */
-	public function __construct($cookies = array()) {
-		$this->cookies = $cookies;
-	}
-
-	/**
-	 * Normalise cookie data into a Requests_Cookie
-	 *
-	 * @param string|Requests_Cookie $cookie
-	 * @return Requests_Cookie
-	 */
-	public function normalize_cookie($cookie, $key = null) {
-		if ($cookie instanceof Requests_Cookie) {
-			return $cookie;
-		}
-
-		return Requests_Cookie::parse($cookie, $key);
-	}
-
-	/**
-	 * Normalise cookie data into a Requests_Cookie
-	 *
-	 * @codeCoverageIgnore
-	 * @deprecated Use {@see Requests_Cookie_Jar::normalize_cookie}
-	 * @return Requests_Cookie
-	 */
-	public function normalizeCookie($cookie, $key = null) {
-		return $this->normalize_cookie($cookie, $key);
-	}
-
-	/**
-	 * Check if the given item exists
-	 *
-	 * @param string $key Item key
-	 * @return boolean Does the item exist?
-	 */
-	public function offsetExists($key) {
-		return isset($this->cookies[$key]);
-	}
-
-	/**
-	 * Get the value for the item
-	 *
-	 * @param string $key Item key
-	 * @return string Item value
-	 */
-	public function offsetGet($key) {
-		if (!isset($this->cookies[$key])) {
-			return null;
-		}
-
-		return $this->cookies[$key];
-	}
-
-	/**
-	 * Set the given item
-	 *
-	 * @throws Requests_Exception On attempting to use dictionary as list (`invalidset`)
-	 *
-	 * @param string $key Item name
-	 * @param string $value Item value
-	 */
-	public function offsetSet($key, $value) {
-		if ($key === null) {
-			throw new Requests_Exception('Object is a dictionary, not a list', 'invalidset');
-		}
-
-		$this->cookies[$key] = $value;
-	}
-
-	/**
-	 * Unset the given header
-	 *
-	 * @param string $key
-	 */
-	public function offsetUnset($key) {
-		unset($this->cookies[$key]);
-	}
-
-	/**
-	 * Get an iterator for the data
-	 *
-	 * @return ArrayIterator
-	 */
-	public function getIterator() {
-		return new ArrayIterator($this->cookies);
-	}
-
-	/**
-	 * Register the cookie handler with the request's hooking system
-	 *
-	 * @param Requests_Hooker $hooks Hooking system
-	 */
-	public function register(Requests_Hooker $hooks) {
-		$hooks->register('requests.before_request', array($this, 'before_request'));
-		$hooks->register('requests.before_redirect_check', array($this, 'before_redirect_check'));
-	}
-
-	/**
-	 * Add Cookie header to a request if we have any
-	 *
-	 * As per RFC 6265, cookies are separated by '; '
-	 *
-	 * @param string $url
-	 * @param array $headers
-	 * @param array $data
-	 * @param string $type
-	 * @param array $options
-	 */
-	public function before_request($url, &$headers, &$data, &$type, &$options) {
-		if (!$url instanceof Requests_IRI) {
-			$url = new Requests_IRI($url);
-		}
-
-		if (!empty($this->cookies)) {
-			$cookies = array();
-			foreach ($this->cookies as $key => $cookie) {
-				$cookie = $this->normalize_cookie($cookie, $key);
-
-				// Skip expired cookies
-				if ($cookie->is_expired()) {
-					continue;
-				}
-
-				if ($cookie->domain_matches($url->host)) {
-					$cookies[] = $cookie->format_for_header();
-				}
-			}
-
-			$headers['Cookie'] = implode('; ', $cookies);
-		}
-	}
-
-	/**
-	 * Parse all cookies from a response and attach them to the response
-	 *
-	 * @var Requests_Response $response
-	 */
-	public function before_redirect_check(Requests_Response &$return) {
-		$url = $return->url;
-		if (!$url instanceof Requests_IRI) {
-			$url = new Requests_IRI($url);
-		}
-
-		$cookies = Requests_Cookie::parse_from_headers($return->headers, $url);
-		$this->cookies = array_merge($this->cookies, $cookies);
-		$return->cookies = $this;
-	}
-}
\ No newline at end of file
Index: www/wp-admin/comment.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/comment.php	(revision 38565)
+++ www/wp-admin/comment.php	(revision 38565)
@@ -1,333 +0,0 @@
-<?php
-/**
- * Comment Management Screen
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** Load WordPress Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-$parent_file = 'edit-comments.php';
-$submenu_file = 'edit-comments.php';
-
-/**
- * @global string $action
- */
-global $action;
-wp_reset_vars( array('action') );
-
-if ( isset( $_POST['deletecomment'] ) )
-	$action = 'deletecomment';
-
-if ( 'cdc' == $action )
-	$action = 'delete';
-elseif ( 'mac' == $action )
-	$action = 'approve';
-
-if ( isset( $_GET['dt'] ) ) {
-	if ( 'spam' == $_GET['dt'] )
-		$action = 'spam';
-	elseif ( 'trash' == $_GET['dt'] )
-		$action = 'trash';
-}
-
-switch( $action ) {
-
-case 'editcomment' :
-	$title = __('Edit Comment');
-
-	get_current_screen()->add_help_tab( array(
-		'id'      => 'overview',
-		'title'   => __('Overview'),
-		'content' =>
-			'<p>' . __( 'You can edit the information left in a comment if needed. This is often useful when you notice that a commenter has made a typographical error.' ) . '</p>' .
-			'<p>' . __( 'You can also moderate the comment from this screen using the Status box, where you can also change the timestamp of the comment.' ) . '</p>'
-	) );
-
-	get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
-	'<p>' . __( '<a href="https://codex.wordpress.org/Administration_Screens#Comments" target="_blank">Documentation on Comments</a>' ) . '</p>' .
-	'<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
-	);
-
-	wp_enqueue_script('comment');
-	require_once( ABSPATH . 'wp-admin/admin-header.php' );
-
-	$comment_id = absint( $_GET['c'] );
-
-	if ( !$comment = get_comment( $comment_id ) )
-		comment_footer_die( __( 'Invalid comment ID.' ) . sprintf(' <a href="%s">' . __('Go back') . '</a>.', 'javascript:history.go(-1)') );
-
-	if ( !current_user_can( 'edit_comment', $comment_id ) )
-		comment_footer_die( __('Sorry, you are not allowed to edit this comment.') );
-
-	if ( 'trash' == $comment->comment_approved )
-		comment_footer_die( __('This comment is in the Trash. Please move it out of the Trash if you want to edit it.') );
-
-	$comment = get_comment_to_edit( $comment_id );
-
-	include( ABSPATH . 'wp-admin/edit-form-comment.php' );
-
-	break;
-
-case 'delete'  :
-case 'approve' :
-case 'trash'   :
-case 'spam'    :
-
-	$title = __('Moderate Comment');
-
-	$comment_id = absint( $_GET['c'] );
-
-	if ( ! $comment = get_comment( $comment_id ) ) {
-		wp_redirect( admin_url('edit-comments.php?error=1') );
-		die();
-	}
-
-	if ( !current_user_can( 'edit_comment', $comment->comment_ID ) ) {
-		wp_redirect( admin_url('edit-comments.php?error=2') );
-		die();
-	}
-
-	// No need to re-approve/re-trash/re-spam a comment.
-	if ( $action == str_replace( '1', 'approve', $comment->comment_approved ) ) {
-		wp_redirect( admin_url( 'edit-comments.php?same=' . $comment_id ) );
-		die();
- 	}
-
-	require_once( ABSPATH . 'wp-admin/admin-header.php' );
-
-	$formaction    = $action . 'comment';
-	$nonce_action  = 'approve' == $action ? 'approve-comment_' : 'delete-comment_';
-	$nonce_action .= $comment_id;
-
-?>
-<div class="wrap">
-
-<h1><?php echo esc_html( $title ); ?></h1>
-
-<?php
-switch ( $action ) {
-	case 'spam' :
-		$caution_msg = __('You are about to mark the following comment as spam:');
-		$button      = _x( 'Mark as Spam', 'comment' );
-		break;
-	case 'trash' :
-		$caution_msg = __('You are about to move the following comment to the Trash:');
-		$button      = __('Move to Trash');
-		break;
-	case 'delete' :
-		$caution_msg = __('You are about to delete the following comment:');
-		$button      = __('Permanently Delete Comment');
-		break;
-	default :
-		$caution_msg = __('You are about to approve the following comment:');
-		$button      = __('Approve Comment');
-		break;
-}
-
-if ( $comment->comment_approved != '0' ) { // if not unapproved
-	$message = '';
-	switch ( $comment->comment_approved ) {
-		case '1' :
-			$message = __('This comment is currently approved.');
-			break;
-		case 'spam' :
-			$message  = __('This comment is currently marked as spam.');
-			break;
-		case 'trash' :
-			$message  = __('This comment is currently in the Trash.');
-			break;
-	}
-	if ( $message ) {
-		echo '<div id="message" class="notice notice-info"><p>' . $message . '</p></div>';
-	}
-}
-?>
-<div id="message" class="notice notice-warning"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php echo $caution_msg; ?></p></div>
-
-<table class="form-table comment-ays">
-<tr>
-<th scope="row"><?php _e('Author'); ?></th>
-<td><?php comment_author( $comment ); ?></td>
-</tr>
-<?php if ( get_comment_author_email( $comment ) ) { ?>
-<tr>
-<th scope="row"><?php _e('Email'); ?></th>
-<td><?php comment_author_email( $comment ); ?></td>
-</tr>
-<?php } ?>
-<?php if ( get_comment_author_url( $comment ) ) { ?>
-<tr>
-<th scope="row"><?php _e('URL'); ?></th>
-<td><a href="<?php comment_author_url( $comment ); ?>"><?php comment_author_url( $comment ); ?></a></td>
-</tr>
-<?php } ?>
-<tr>
-	<th scope="row"><?php /* translators: column name or table row header */ _e( 'In Response To' ); ?></th>
-	<td>
-	<?php
-		$post_id = $comment->comment_post_ID;
-		if ( current_user_can( 'edit_post', $post_id ) ) {
-			$post_link = "<a href='" . esc_url( get_edit_post_link( $post_id ) ) . "'>";
-			$post_link .= esc_html( get_the_title( $post_id ) ) . '</a>';
-		} else {
-			$post_link = esc_html( get_the_title( $post_id ) );
-		}
-		echo $post_link;
-
-		if ( $comment->comment_parent ) {
-			$parent      = get_comment( $comment->comment_parent );
-			$parent_link = esc_url( get_comment_link( $parent ) );
-			$name        = get_comment_author( $parent );
-			printf(
-				/* translators: %s: comment link */
-				' | ' . __( 'In reply to %s.' ),
-				'<a href="' . $parent_link . '">' . $name . '</a>'
-			);
-		}
-	?>
-	</td>
-</tr>
-<tr>
-	<th scope="row"><?php _e( 'Submitted on' ); ?></th>
-	<td>
-	<?php
-		/* translators: 1: comment date, 2: comment time */
-		$submitted = sprintf( __( '%1$s at %2$s' ),
-			/* translators: comment date format. See https://secure.php.net/date */
-			get_comment_date( __( 'Y/m/d' ), $comment ),
-			get_comment_date( __( 'g:i a' ), $comment )
-		);
-		if ( 'approved' === wp_get_comment_status( $comment ) && ! empty ( $comment->comment_post_ID ) ) {
-			echo '<a href="' . esc_url( get_comment_link( $comment ) ) . '">' . $submitted . '</a>';
-		} else {
-			echo $submitted;
-		}
-	?>
-	</td>
-</tr>
-<tr>
-<th scope="row"><?php /* translators: field name in comment form */ _ex('Comment', 'noun'); ?></th>
-<td class="comment-content">
-	<?php comment_text( $comment ); ?>
-	<p class="edit-comment"><a href="<?php echo admin_url( "comment.php?action=editcomment&amp;c={$comment->comment_ID}" ); ?>"><?php esc_html_e( 'Edit' ); ?></a></p>
-</td>
-</tr>
-</table>
-
-<form action="comment.php" method="get" class="comment-ays-submit">
-
-<p>
-	<?php submit_button( $button, 'primary', 'submit', false ); ?>
-	<a href="<?php echo admin_url('edit-comments.php'); ?>" class="button-cancel"><?php esc_html_e( 'Cancel' ); ?></a>
-</p>
-
-<?php wp_nonce_field( $nonce_action ); ?>
-<input type="hidden" name="action" value="<?php echo esc_attr($formaction); ?>" />
-<input type="hidden" name="c" value="<?php echo esc_attr($comment->comment_ID); ?>" />
-<input type="hidden" name="noredir" value="1" />
-</form>
-
-</div>
-<?php
-	break;
-
-case 'deletecomment'    :
-case 'trashcomment'     :
-case 'untrashcomment'   :
-case 'spamcomment'      :
-case 'unspamcomment'    :
-case 'approvecomment'   :
-case 'unapprovecomment' :
-	$comment_id = absint( $_REQUEST['c'] );
-
-	if ( in_array( $action, array( 'approvecomment', 'unapprovecomment' ) ) )
-		check_admin_referer( 'approve-comment_' . $comment_id );
-	else
-		check_admin_referer( 'delete-comment_' . $comment_id );
-
-	$noredir = isset($_REQUEST['noredir']);
-
-	if ( !$comment = get_comment($comment_id) )
-		comment_footer_die( __( 'Invalid comment ID.' ) . sprintf(' <a href="%s">' . __('Go back') . '</a>.', 'edit-comments.php') );
-	if ( !current_user_can( 'edit_comment', $comment->comment_ID ) )
-		comment_footer_die( __('Sorry, you are not allowed to edit comments on this post.') );
-
-	if ( '' != wp_get_referer() && ! $noredir && false === strpos(wp_get_referer(), 'comment.php') )
-		$redir = wp_get_referer();
-	elseif ( '' != wp_get_original_referer() && ! $noredir )
-		$redir = wp_get_original_referer();
-	elseif ( in_array( $action, array( 'approvecomment', 'unapprovecomment' ) ) )
-		$redir = admin_url('edit-comments.php?p=' . absint( $comment->comment_post_ID ) );
-	else
-		$redir = admin_url('edit-comments.php');
-
-	$redir = remove_query_arg( array('spammed', 'unspammed', 'trashed', 'untrashed', 'deleted', 'ids', 'approved', 'unapproved'), $redir );
-
-	switch ( $action ) {
-		case 'deletecomment' :
-			wp_delete_comment( $comment );
-			$redir = add_query_arg( array('deleted' => '1'), $redir );
-			break;
-		case 'trashcomment' :
-			wp_trash_comment( $comment );
-			$redir = add_query_arg( array('trashed' => '1', 'ids' => $comment_id), $redir );
-			break;
-		case 'untrashcomment' :
-			wp_untrash_comment( $comment );
-			$redir = add_query_arg( array('untrashed' => '1'), $redir );
-			break;
-		case 'spamcomment' :
-			wp_spam_comment( $comment );
-			$redir = add_query_arg( array('spammed' => '1', 'ids' => $comment_id), $redir );
-			break;
-		case 'unspamcomment' :
-			wp_unspam_comment( $comment );
-			$redir = add_query_arg( array('unspammed' => '1'), $redir );
-			break;
-		case 'approvecomment' :
-			wp_set_comment_status( $comment, 'approve' );
-			$redir = add_query_arg( array( 'approved' => 1 ), $redir );
-			break;
-		case 'unapprovecomment' :
-			wp_set_comment_status( $comment, 'hold' );
-			$redir = add_query_arg( array( 'unapproved' => 1 ), $redir );
-			break;
-	}
-
-	wp_redirect( $redir );
-	die;
-
-case 'editedcomment' :
-
-	$comment_id = absint( $_POST['comment_ID'] );
-	$comment_post_id = absint( $_POST['comment_post_ID'] );
-
-	check_admin_referer( 'update-comment_' . $comment_id );
-
-	edit_comment();
-
-	$location = ( empty( $_POST['referredby'] ) ? "edit-comments.php?p=$comment_post_id" : $_POST['referredby'] ) . '#comment-' . $comment_id;
-
-	/**
-	 * Filters the URI the user is redirected to after editing a comment in the admin.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param string $location The URI the user will be redirected to.
-	 * @param int $comment_id The ID of the comment being edited.
-	 */
-	$location = apply_filters( 'comment_edit_redirect', $location, $comment_id );
-	wp_redirect( $location );
-
-	exit();
-
-default:
-	wp_die( __('Unknown action.') );
-
-} // end switch
-
-include( ABSPATH . 'wp-admin/admin-footer.php' );
Index: www/wp-admin/includes/class-ftp.php
===================================================================
--- www/wp-admin/includes/class-ftp.php	(revision 38565)
+++ www/wp-admin/includes/ftp.php	(revision )
@@ -12,898 +12,12 @@
  * @license LGPL http://www.opensource.org/licenses/lgpl-license.html
  */
 
-/**
- * Defines the newline characters, if not defined already.
- *
- * This can be redefined.
- *
- * @since 2.5
- * @var string
- */
-if(!defined('CRLF')) define('CRLF',"\r\n");
-
-/**
- * Sets whatever to autodetect ASCII mode.
- *
- * This can be redefined.
- *
- * @since 2.5
- * @var int
- */
-if(!defined("FTP_AUTOASCII")) define("FTP_AUTOASCII", -1);
-
-/**
- *
- * This can be redefined.
- * @since 2.5
- * @var int
- */
-if(!defined("FTP_BINARY")) define("FTP_BINARY", 1);
-
-/**
- *
- * This can be redefined.
- * @since 2.5
- * @var int
- */
-if(!defined("FTP_ASCII")) define("FTP_ASCII", 0);
-
-/**
- * Whether to force FTP.
- *
- * This can be redefined.
- *
- * @since 2.5
- * @var bool
- */
-if(!defined('FTP_FORCE')) define('FTP_FORCE', true);
-
-/**
- * @since 2.5
- * @var string
- */
-define('FTP_OS_Unix','u');
-
-/**
- * @since 2.5
- * @var string
- */
-define('FTP_OS_Windows','w');
-
-/**
- * @since 2.5
- * @var string
- */
-define('FTP_OS_Mac','m');
-
-/**
- * PemFTP base class
- *
- */
-class ftp_base {
-	/* Public variables */
-	var $LocalEcho;
-	var $Verbose;
-	var $OS_local;
-	var $OS_remote;
-
-	/* Private variables */
-	var $_lastaction;
-	var $_errors;
-	var $_type;
-	var $_umask;
-	var $_timeout;
-	var $_passive;
-	var $_host;
-	var $_fullhost;
-	var $_port;
-	var $_datahost;
-	var $_dataport;
-	var $_ftp_control_sock;
-	var $_ftp_data_sock;
-	var $_ftp_temp_sock;
-	var $_ftp_buff_size;
-	var $_login;
-	var $_password;
-	var $_connected;
-	var $_ready;
-	var $_code;
-	var $_message;
-	var $_can_restore;
-	var $_port_available;
-	var $_curtype;
-	var $_features;
-
-	var $_error_array;
-	var $AuthorizedTransferMode;
-	var $OS_FullName;
-	var $_eol_code;
-	var $AutoAsciiExt;
-
-	/* Constructor */
-	function __construct($port_mode=FALSE, $verb=FALSE, $le=FALSE) {
-		$this->LocalEcho=$le;
-		$this->Verbose=$verb;
-		$this->_lastaction=NULL;
-		$this->_error_array=array();
-		$this->_eol_code=array(FTP_OS_Unix=>"\n", FTP_OS_Mac=>"\r", FTP_OS_Windows=>"\r\n");
-		$this->AuthorizedTransferMode=array(FTP_AUTOASCII, FTP_ASCII, FTP_BINARY);
-		$this->OS_FullName=array(FTP_OS_Unix => 'UNIX', FTP_OS_Windows => 'WINDOWS', FTP_OS_Mac => 'MACOS');
-		$this->AutoAsciiExt=array("ASP","BAT","C","CPP","CSS","CSV","JS","H","HTM","HTML","SHTML","INI","LOG","PHP3","PHTML","PL","PERL","SH","SQL","TXT");
-		$this->_port_available=($port_mode==TRUE);
-		$this->SendMSG("Staring FTP client class".($this->_port_available?"":" without PORT mode support"));
-		$this->_connected=FALSE;
-		$this->_ready=FALSE;
-		$this->_can_restore=FALSE;
-		$this->_code=0;
-		$this->_message="";
-		$this->_ftp_buff_size=4096;
-		$this->_curtype=NULL;
-		$this->SetUmask(0022);
-		$this->SetType(FTP_AUTOASCII);
-		$this->SetTimeout(30);
-		$this->Passive(!$this->_port_available);
-		$this->_login="anonymous";
-		$this->_password="anon@ftp.com";
-		$this->_features=array();
-	    $this->OS_local=FTP_OS_Unix;
-		$this->OS_remote=FTP_OS_Unix;
-		$this->features=array();
-		if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') $this->OS_local=FTP_OS_Windows;
-		elseif(strtoupper(substr(PHP_OS, 0, 3)) === 'MAC') $this->OS_local=FTP_OS_Mac;
-	}
-
-	function ftp_base($port_mode=FALSE) {
-		$this->__construct($port_mode);
-	}
-
-// <!-- --------------------------------------------------------------------------------------- -->
-// <!--       Public functions                                                                  -->
-// <!-- --------------------------------------------------------------------------------------- -->
-
-	function parselisting($line) {
-		$is_windows = ($this->OS_remote == FTP_OS_Windows);
-		if ($is_windows && preg_match("/([0-9]{2})-([0-9]{2})-([0-9]{2}) +([0-9]{2}):([0-9]{2})(AM|PM) +([0-9]+|<DIR>) +(.+)/",$line,$lucifer)) {
-			$b = array();
-			if ($lucifer[3]<70) { $lucifer[3]+=2000; } else { $lucifer[3]+=1900; } // 4digit year fix
-			$b['isdir'] = ($lucifer[7]=="<DIR>");
-			if ( $b['isdir'] )
-				$b['type'] = 'd';
-			else
-				$b['type'] = 'f';
-			$b['size'] = $lucifer[7];
-			$b['month'] = $lucifer[1];
-			$b['day'] = $lucifer[2];
-			$b['year'] = $lucifer[3];
-			$b['hour'] = $lucifer[4];
-			$b['minute'] = $lucifer[5];
-			$b['time'] = @mktime($lucifer[4]+(strcasecmp($lucifer[6],"PM")==0?12:0),$lucifer[5],0,$lucifer[1],$lucifer[2],$lucifer[3]);
-			$b['am/pm'] = $lucifer[6];
-			$b['name'] = $lucifer[8];
-		} else if (!$is_windows && $lucifer=preg_split("/[ ]/",$line,9,PREG_SPLIT_NO_EMPTY)) {
-			//echo $line."\n";
-			$lcount=count($lucifer);
-			if ($lcount<8) return '';
-			$b = array();
-			$b['isdir'] = $lucifer[0]{0} === "d";
-			$b['islink'] = $lucifer[0]{0} === "l";
-			if ( $b['isdir'] )
-				$b['type'] = 'd';
-			elseif ( $b['islink'] )
-				$b['type'] = 'l';
-			else
-				$b['type'] = 'f';
-			$b['perms'] = $lucifer[0];
-			$b['number'] = $lucifer[1];
-			$b['owner'] = $lucifer[2];
-			$b['group'] = $lucifer[3];
-			$b['size'] = $lucifer[4];
-			if ($lcount==8) {
-				sscanf($lucifer[5],"%d-%d-%d",$b['year'],$b['month'],$b['day']);
-				sscanf($lucifer[6],"%d:%d",$b['hour'],$b['minute']);
-				$b['time'] = @mktime($b['hour'],$b['minute'],0,$b['month'],$b['day'],$b['year']);
-				$b['name'] = $lucifer[7];
-			} else {
-				$b['month'] = $lucifer[5];
-				$b['day'] = $lucifer[6];
-				if (preg_match("/([0-9]{2}):([0-9]{2})/",$lucifer[7],$l2)) {
-					$b['year'] = date("Y");
-					$b['hour'] = $l2[1];
-					$b['minute'] = $l2[2];
-				} else {
-					$b['year'] = $lucifer[7];
-					$b['hour'] = 0;
-					$b['minute'] = 0;
-				}
-				$b['time'] = strtotime(sprintf("%d %s %d %02d:%02d",$b['day'],$b['month'],$b['year'],$b['hour'],$b['minute']));
-				$b['name'] = $lucifer[8];
-			}
-		}
-
-		return $b;
-	}
-
-	function SendMSG($message = "", $crlf=true) {
-		if ($this->Verbose) {
-			echo $message.($crlf?CRLF:"");
-			flush();
-		}
-		return TRUE;
-	}
-
-	function SetType($mode=FTP_AUTOASCII) {
-		if(!in_array($mode, $this->AuthorizedTransferMode)) {
-			$this->SendMSG("Wrong type");
-			return FALSE;
-		}
-		$this->_type=$mode;
-		$this->SendMSG("Transfer type: ".($this->_type==FTP_BINARY?"binary":($this->_type==FTP_ASCII?"ASCII":"auto ASCII") ) );
-		return TRUE;
-	}
-
-	function _settype($mode=FTP_ASCII) {
-		if($this->_ready) {
-			if($mode==FTP_BINARY) {
-				if($this->_curtype!=FTP_BINARY) {
-					if(!$this->_exec("TYPE I", "SetType")) return FALSE;
-					$this->_curtype=FTP_BINARY;
-				}
-			} elseif($this->_curtype!=FTP_ASCII) {
-				if(!$this->_exec("TYPE A", "SetType")) return FALSE;
-				$this->_curtype=FTP_ASCII;
-			}
-		} else return FALSE;
-		return TRUE;
-	}
-
-	function Passive($pasv=NULL) {
-		if(is_null($pasv)) $this->_passive=!$this->_passive;
-		else $this->_passive=$pasv;
-		if(!$this->_port_available and !$this->_passive) {
-			$this->SendMSG("Only passive connections available!");
-			$this->_passive=TRUE;
-			return FALSE;
-		}
-		$this->SendMSG("Passive mode ".($this->_passive?"on":"off"));
-		return TRUE;
-	}
-
-	function SetServer($host, $port=21, $reconnect=true) {
-		if(!is_long($port)) {
-	        $this->verbose=true;
-    	    $this->SendMSG("Incorrect port syntax");
-			return FALSE;
-		} else {
-			$ip=@gethostbyname($host);
-	        $dns=@gethostbyaddr($host);
-	        if(!$ip) $ip=$host;
-	        if(!$dns) $dns=$host;
-	        // Validate the IPAddress PHP4 returns -1 for invalid, PHP5 false
-	        // -1 === "255.255.255.255" which is the broadcast address which is also going to be invalid
-	        $ipaslong = ip2long($ip);
-			if ( ($ipaslong == false) || ($ipaslong === -1) ) {
-				$this->SendMSG("Wrong host name/address \"".$host."\"");
-				return FALSE;
-			}
-	        $this->_host=$ip;
-	        $this->_fullhost=$dns;
-	        $this->_port=$port;
-	        $this->_dataport=$port-1;
-		}
-		$this->SendMSG("Host \"".$this->_fullhost."(".$this->_host."):".$this->_port."\"");
-		if($reconnect){
-			if($this->_connected) {
-				$this->SendMSG("Reconnecting");
-				if(!$this->quit(FTP_FORCE)) return FALSE;
-				if(!$this->connect()) return FALSE;
-			}
-		}
-		return TRUE;
-	}
-
-	function SetUmask($umask=0022) {
-		$this->_umask=$umask;
-		umask($this->_umask);
-		$this->SendMSG("UMASK 0".decoct($this->_umask));
-		return TRUE;
-	}
-
-	function SetTimeout($timeout=30) {
-		$this->_timeout=$timeout;
-		$this->SendMSG("Timeout ".$this->_timeout);
-		if($this->_connected)
-			if(!$this->_settimeout($this->_ftp_control_sock)) return FALSE;
-		return TRUE;
-	}
-
-	function connect($server=NULL) {
-		if(!empty($server)) {
-			if(!$this->SetServer($server)) return false;
-		}
-		if($this->_ready) return true;
-	    $this->SendMsg('Local OS : '.$this->OS_FullName[$this->OS_local]);
-		if(!($this->_ftp_control_sock = $this->_connect($this->_host, $this->_port))) {
-			$this->SendMSG("Error : Cannot connect to remote host \"".$this->_fullhost." :".$this->_port."\"");
-			return FALSE;
-		}
-		$this->SendMSG("Connected to remote host \"".$this->_fullhost.":".$this->_port."\". Waiting for greeting.");
-		do {
-			if(!$this->_readmsg()) return FALSE;
-			if(!$this->_checkCode()) return FALSE;
-			$this->_lastaction=time();
-		} while($this->_code<200);
-		$this->_ready=true;
-		$syst=$this->systype();
-		if(!$syst) $this->SendMSG("Can't detect remote OS");
-		else {
-			if(preg_match("/win|dos|novell/i", $syst[0])) $this->OS_remote=FTP_OS_Windows;
-			elseif(preg_match("/os/i", $syst[0])) $this->OS_remote=FTP_OS_Mac;
-			elseif(preg_match("/(li|u)nix/i", $syst[0])) $this->OS_remote=FTP_OS_Unix;
-			else $this->OS_remote=FTP_OS_Mac;
-			$this->SendMSG("Remote OS: ".$this->OS_FullName[$this->OS_remote]);
-		}
-		if(!$this->features()) $this->SendMSG("Can't get features list. All supported - disabled");
-		else $this->SendMSG("Supported features: ".implode(", ", array_keys($this->_features)));
-		return TRUE;
-	}
-
-	function quit($force=false) {
-		if($this->_ready) {
-			if(!$this->_exec("QUIT") and !$force) return FALSE;
-			if(!$this->_checkCode() and !$force) return FALSE;
-			$this->_ready=false;
-			$this->SendMSG("Session finished");
-		}
-		$this->_quit();
-		return TRUE;
-	}
-
-	function login($user=NULL, $pass=NULL) {
-		if(!is_null($user)) $this->_login=$user;
-		else $this->_login="anonymous";
-		if(!is_null($pass)) $this->_password=$pass;
-		else $this->_password="anon@anon.com";
-		if(!$this->_exec("USER ".$this->_login, "login")) return FALSE;
-		if(!$this->_checkCode()) return FALSE;
-		if($this->_code!=230) {
-			if(!$this->_exec((($this->_code==331)?"PASS ":"ACCT ").$this->_password, "login")) return FALSE;
-			if(!$this->_checkCode()) return FALSE;
-		}
-		$this->SendMSG("Authentication succeeded");
-		if(empty($this->_features)) {
-			if(!$this->features()) $this->SendMSG("Can't get features list. All supported - disabled");
-			else $this->SendMSG("Supported features: ".implode(", ", array_keys($this->_features)));
-		}
-		return TRUE;
-	}
-
-	function pwd() {
-		if(!$this->_exec("PWD", "pwd")) return FALSE;
-		if(!$this->_checkCode()) return FALSE;
-		return preg_replace("/^[0-9]{3} \"(.+)\".*$/s", "\\1", $this->_message);
-	}
-
-	function cdup() {
-		if(!$this->_exec("CDUP", "cdup")) return FALSE;
-		if(!$this->_checkCode()) return FALSE;
-		return true;
-	}
-
-	function chdir($pathname) {
-		if(!$this->_exec("CWD ".$pathname, "chdir")) return FALSE;
-		if(!$this->_checkCode()) return FALSE;
-		return TRUE;
-	}
-
-	function rmdir($pathname) {
-		if(!$this->_exec("RMD ".$pathname, "rmdir")) return FALSE;
-		if(!$this->_checkCode()) return FALSE;
-		return TRUE;
-	}
-
-	function mkdir($pathname) {
-		if(!$this->_exec("MKD ".$pathname, "mkdir")) return FALSE;
-		if(!$this->_checkCode()) return FALSE;
-		return TRUE;
-	}
-
-	function rename($from, $to) {
-		if(!$this->_exec("RNFR ".$from, "rename")) return FALSE;
-		if(!$this->_checkCode()) return FALSE;
-		if($this->_code==350) {
-			if(!$this->_exec("RNTO ".$to, "rename")) return FALSE;
-			if(!$this->_checkCode()) return FALSE;
-		} else return FALSE;
-		return TRUE;
-	}
-
-	function filesize($pathname) {
-		if(!isset($this->_features["SIZE"])) {
-			$this->PushError("filesize", "not supported by server");
-			return FALSE;
-		}
-		if(!$this->_exec("SIZE ".$pathname, "filesize")) return FALSE;
-		if(!$this->_checkCode()) return FALSE;
-		return preg_replace("/^[0-9]{3} ([0-9]+).*$/s", "\\1", $this->_message);
-	}
-
-	function abort() {
-		if(!$this->_exec("ABOR", "abort")) return FALSE;
-		if(!$this->_checkCode()) {
-			if($this->_code!=426) return FALSE;
-			if(!$this->_readmsg("abort")) return FALSE;
-			if(!$this->_checkCode()) return FALSE;
-		}
-		return true;
-	}
-
-	function mdtm($pathname) {
-		if(!isset($this->_features["MDTM"])) {
-			$this->PushError("mdtm", "not supported by server");
-			return FALSE;
-		}
-		if(!$this->_exec("MDTM ".$pathname, "mdtm")) return FALSE;
-		if(!$this->_checkCode()) return FALSE;
-		$mdtm = preg_replace("/^[0-9]{3} ([0-9]+).*$/s", "\\1", $this->_message);
-		$date = sscanf($mdtm, "%4d%2d%2d%2d%2d%2d");
-		$timestamp = mktime($date[3], $date[4], $date[5], $date[1], $date[2], $date[0]);
-		return $timestamp;
-	}
-
-	function systype() {
-		if(!$this->_exec("SYST", "systype")) return FALSE;
-		if(!$this->_checkCode()) return FALSE;
-		$DATA = explode(" ", $this->_message);
-		return array($DATA[1], $DATA[3]);
-	}
-
-	function delete($pathname) {
-		if(!$this->_exec("DELE ".$pathname, "delete")) return FALSE;
-		if(!$this->_checkCode()) return FALSE;
-		return TRUE;
-	}
-
-	function site($command, $fnction="site") {
-		if(!$this->_exec("SITE ".$command, $fnction)) return FALSE;
-		if(!$this->_checkCode()) return FALSE;
-		return TRUE;
-	}
-
-	function chmod($pathname, $mode) {
-		if(!$this->site( sprintf('CHMOD %o %s', $mode, $pathname), "chmod")) return FALSE;
-		return TRUE;
-	}
-
-	function restore($from) {
-		if(!isset($this->_features["REST"])) {
-			$this->PushError("restore", "not supported by server");
-			return FALSE;
-		}
-		if($this->_curtype!=FTP_BINARY) {
-			$this->PushError("restore", "can't restore in ASCII mode");
-			return FALSE;
-		}
-		if(!$this->_exec("REST ".$from, "resore")) return FALSE;
-		if(!$this->_checkCode()) return FALSE;
-		return TRUE;
-	}
-
-	function features() {
-		if(!$this->_exec("FEAT", "features")) return FALSE;
-		if(!$this->_checkCode()) return FALSE;
-		$f=preg_split("/[".CRLF."]+/", preg_replace("/[0-9]{3}[ -].*[".CRLF."]+/", "", $this->_message), -1, PREG_SPLIT_NO_EMPTY);
-		$this->_features=array();
-		foreach($f as $k=>$v) {
-			$v=explode(" ", trim($v));
-			$this->_features[array_shift($v)]=$v;
-		}
-		return true;
-	}
-
-	function rawlist($pathname="", $arg="") {
-		return $this->_list(($arg?" ".$arg:"").($pathname?" ".$pathname:""), "LIST", "rawlist");
-	}
-
-	function nlist($pathname="", $arg="") {
-		return $this->_list(($arg?" ".$arg:"").($pathname?" ".$pathname:""), "NLST", "nlist");
-	}
-
-	function is_exists($pathname) {
-		return $this->file_exists($pathname);
-	}
-
-	function file_exists($pathname) {
-		$exists=true;
-		if(!$this->_exec("RNFR ".$pathname, "rename")) $exists=FALSE;
-		else {
-			if(!$this->_checkCode()) $exists=FALSE;
-			$this->abort();
-		}
-		if($exists) $this->SendMSG("Remote file ".$pathname." exists");
-		else $this->SendMSG("Remote file ".$pathname." does not exist");
-		return $exists;
-	}
-
-	function fget($fp, $remotefile,$rest=0) {
-		if($this->_can_restore and $rest!=0) fseek($fp, $rest);
-		$pi=pathinfo($remotefile);
-		if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII;
-		else $mode=FTP_BINARY;
-		if(!$this->_data_prepare($mode)) {
-			return FALSE;
-		}
-		if($this->_can_restore and $rest!=0) $this->restore($rest);
-		if(!$this->_exec("RETR ".$remotefile, "get")) {
-			$this->_data_close();
-			return FALSE;
-		}
-		if(!$this->_checkCode()) {
-			$this->_data_close();
-			return FALSE;
-		}
-		$out=$this->_data_read($mode, $fp);
-		$this->_data_close();
-		if(!$this->_readmsg()) return FALSE;
-		if(!$this->_checkCode()) return FALSE;
-		return $out;
-	}
-
-	function get($remotefile, $localfile=NULL, $rest=0) {
-		if(is_null($localfile)) $localfile=$remotefile;
-		if (@file_exists($localfile)) $this->SendMSG("Warning : local file will be overwritten");
-		$fp = @fopen($localfile, "w");
-		if (!$fp) {
-			$this->PushError("get","can't open local file", "Cannot create \"".$localfile."\"");
-			return FALSE;
-		}
-		if($this->_can_restore and $rest!=0) fseek($fp, $rest);
-		$pi=pathinfo($remotefile);
-		if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII;
-		else $mode=FTP_BINARY;
-		if(!$this->_data_prepare($mode)) {
-			fclose($fp);
-			return FALSE;
-		}
-		if($this->_can_restore and $rest!=0) $this->restore($rest);
-		if(!$this->_exec("RETR ".$remotefile, "get")) {
-			$this->_data_close();
-			fclose($fp);
-			return FALSE;
-		}
-		if(!$this->_checkCode()) {
-			$this->_data_close();
-			fclose($fp);
-			return FALSE;
-		}
-		$out=$this->_data_read($mode, $fp);
-		fclose($fp);
-		$this->_data_close();
-		if(!$this->_readmsg()) return FALSE;
-		if(!$this->_checkCode()) return FALSE;
-		return $out;
-	}
-
-	function fput($remotefile, $fp) {
-		if($this->_can_restore and $rest!=0) fseek($fp, $rest);
-		$pi=pathinfo($remotefile);
-		if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII;
-		else $mode=FTP_BINARY;
-		if(!$this->_data_prepare($mode)) {
-			return FALSE;
-		}
-		if($this->_can_restore and $rest!=0) $this->restore($rest);
-		if(!$this->_exec("STOR ".$remotefile, "put")) {
-			$this->_data_close();
-			return FALSE;
-		}
-		if(!$this->_checkCode()) {
-			$this->_data_close();
-			return FALSE;
-		}
-		$ret=$this->_data_write($mode, $fp);
-		$this->_data_close();
-		if(!$this->_readmsg()) return FALSE;
-		if(!$this->_checkCode()) return FALSE;
-		return $ret;
-	}
-
-	function put($localfile, $remotefile=NULL, $rest=0) {
-		if(is_null($remotefile)) $remotefile=$localfile;
-		if (!file_exists($localfile)) {
-			$this->PushError("put","can't open local file", "No such file or directory \"".$localfile."\"");
-			return FALSE;
-		}
-		$fp = @fopen($localfile, "r");
-
-		if (!$fp) {
-			$this->PushError("put","can't open local file", "Cannot read file \"".$localfile."\"");
-			return FALSE;
-		}
-		if($this->_can_restore and $rest!=0) fseek($fp, $rest);
-		$pi=pathinfo($localfile);
-		if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII;
-		else $mode=FTP_BINARY;
-		if(!$this->_data_prepare($mode)) {
-			fclose($fp);
-			return FALSE;
-		}
-		if($this->_can_restore and $rest!=0) $this->restore($rest);
-		if(!$this->_exec("STOR ".$remotefile, "put")) {
-			$this->_data_close();
-			fclose($fp);
-			return FALSE;
-		}
-		if(!$this->_checkCode()) {
-			$this->_data_close();
-			fclose($fp);
-			return FALSE;
-		}
-		$ret=$this->_data_write($mode, $fp);
-		fclose($fp);
-		$this->_data_close();
-		if(!$this->_readmsg()) return FALSE;
-		if(!$this->_checkCode()) return FALSE;
-		return $ret;
-	}
-
-	function mput($local=".", $remote=NULL, $continious=false) {
-		$local=realpath($local);
-		if(!@file_exists($local)) {
-			$this->PushError("mput","can't open local folder", "Cannot stat folder \"".$local."\"");
-			return FALSE;
-		}
-		if(!is_dir($local)) return $this->put($local, $remote);
-		if(empty($remote)) $remote=".";
-		elseif(!$this->file_exists($remote) and !$this->mkdir($remote)) return FALSE;
-		if($handle = opendir($local)) {
-			$list=array();
-			while (false !== ($file = readdir($handle))) {
-				if ($file != "." && $file != "..") $list[]=$file;
-			}
-			closedir($handle);
-		} else {
-			$this->PushError("mput","can't open local folder", "Cannot read folder \"".$local."\"");
-			return FALSE;
-		}
-		if(empty($list)) return TRUE;
-		$ret=true;
-		foreach($list as $el) {
-			if(is_dir($local."/".$el)) $t=$this->mput($local."/".$el, $remote."/".$el);
-			else $t=$this->put($local."/".$el, $remote."/".$el);
-			if(!$t) {
-				$ret=FALSE;
-				if(!$continious) break;
-			}
-		}
-		return $ret;
-
-	}
-
-	function mget($remote, $local=".", $continious=false) {
-		$list=$this->rawlist($remote, "-lA");
-		if($list===false) {
-			$this->PushError("mget","can't read remote folder list", "Can't read remote folder \"".$remote."\" contents");
-			return FALSE;
-		}
-		if(empty($list)) return true;
-		if(!@file_exists($local)) {
-			if(!@mkdir($local)) {
-				$this->PushError("mget","can't create local folder", "Cannot create folder \"".$local."\"");
-				return FALSE;
-			}
-		}
-		foreach($list as $k=>$v) {
-			$list[$k]=$this->parselisting($v);
-			if( ! $list[$k] or $list[$k]["name"]=="." or $list[$k]["name"]=="..") unset($list[$k]);
-		}
-		$ret=true;
-		foreach($list as $el) {
-			if($el["type"]=="d") {
-				if(!$this->mget($remote."/".$el["name"], $local."/".$el["name"], $continious)) {
-					$this->PushError("mget", "can't copy folder", "Can't copy remote folder \"".$remote."/".$el["name"]."\" to local \"".$local."/".$el["name"]."\"");
-					$ret=false;
-					if(!$continious) break;
-				}
-			} else {
-				if(!$this->get($remote."/".$el["name"], $local."/".$el["name"])) {
-					$this->PushError("mget", "can't copy file", "Can't copy remote file \"".$remote."/".$el["name"]."\" to local \"".$local."/".$el["name"]."\"");
-					$ret=false;
-					if(!$continious) break;
-				}
-			}
-			@chmod($local."/".$el["name"], $el["perms"]);
-			$t=strtotime($el["date"]);
-			if($t!==-1 and $t!==false) @touch($local."/".$el["name"], $t);
-		}
-		return $ret;
-	}
-
-	function mdel($remote, $continious=false) {
-		$list=$this->rawlist($remote, "-la");
-		if($list===false) {
-			$this->PushError("mdel","can't read remote folder list", "Can't read remote folder \"".$remote."\" contents");
-			return false;
-		}
-
-		foreach($list as $k=>$v) {
-			$list[$k]=$this->parselisting($v);
-			if( ! $list[$k] or $list[$k]["name"]=="." or $list[$k]["name"]=="..") unset($list[$k]);
-		}
-		$ret=true;
-
-		foreach($list as $el) {
-			if ( empty($el) )
-				continue;
-
-			if($el["type"]=="d") {
-				if(!$this->mdel($remote."/".$el["name"], $continious)) {
-					$ret=false;
-					if(!$continious) break;
-				}
-			} else {
-				if (!$this->delete($remote."/".$el["name"])) {
-					$this->PushError("mdel", "can't delete file", "Can't delete remote file \"".$remote."/".$el["name"]."\"");
-					$ret=false;
-					if(!$continious) break;
-				}
-			}
-		}
-
-		if(!$this->rmdir($remote)) {
-			$this->PushError("mdel", "can't delete folder", "Can't delete remote folder \"".$remote."/".$el["name"]."\"");
-			$ret=false;
-		}
-		return $ret;
-	}
-
-	function mmkdir($dir, $mode = 0777) {
-		if(empty($dir)) return FALSE;
-		if($this->is_exists($dir) or $dir == "/" ) return TRUE;
-		if(!$this->mmkdir(dirname($dir), $mode)) return false;
-		$r=$this->mkdir($dir, $mode);
-		$this->chmod($dir,$mode);
-		return $r;
-	}
-
-	function glob($pattern, $handle=NULL) {
-		$path=$output=null;
-		if(PHP_OS=='WIN32') $slash='\\';
-		else $slash='/';
-		$lastpos=strrpos($pattern,$slash);
-		if(!($lastpos===false)) {
-			$path=substr($pattern,0,-$lastpos-1);
-			$pattern=substr($pattern,$lastpos);
-		} else $path=getcwd();
-		if(is_array($handle) and !empty($handle)) {
-			while($dir=each($handle)) {
-				if($this->glob_pattern_match($pattern,$dir))
-				$output[]=$dir;
-			}
-		} else {
-			$handle=@opendir($path);
-			if($handle===false) return false;
-			while($dir=readdir($handle)) {
-				if($this->glob_pattern_match($pattern,$dir))
-				$output[]=$dir;
-			}
-			closedir($handle);
-		}
-		if(is_array($output)) return $output;
-		return false;
-	}
-
-	function glob_pattern_match($pattern,$string) {
-		$out=null;
-		$chunks=explode(';',$pattern);
-		foreach($chunks as $pattern) {
-			$escape=array('$','^','.','{','}','(',')','[',']','|');
-			while(strpos($pattern,'**')!==false)
-				$pattern=str_replace('**','*',$pattern);
-			foreach($escape as $probe)
-				$pattern=str_replace($probe,"\\$probe",$pattern);
-			$pattern=str_replace('?*','*',
-				str_replace('*?','*',
-					str_replace('*',".*",
-						str_replace('?','.{1,1}',$pattern))));
-			$out[]=$pattern;
-		}
-		if(count($out)==1) return($this->glob_regexp("^$out[0]$",$string));
-		else {
-			foreach($out as $tester)
-				if($this->my_regexp("^$tester$",$string)) return true;
-		}
-		return false;
-	}
-
-	function glob_regexp($pattern,$probe) {
-		$sensitive=(PHP_OS!='WIN32');
-		return ($sensitive?
-			preg_match( '/' . preg_quote( $pattern, '/' ) . '/', $probe ) :
-			preg_match( '/' . preg_quote( $pattern, '/' ) . '/i', $probe )
-		);
-	}
-
-	function dirlist($remote) {
-		$list=$this->rawlist($remote, "-la");
-		if($list===false) {
-			$this->PushError("dirlist","can't read remote folder list", "Can't read remote folder \"".$remote."\" contents");
-			return false;
-		}
-
-		$dirlist = array();
-		foreach($list as $k=>$v) {
-			$entry=$this->parselisting($v);
-			if ( empty($entry) )
-				continue;
-
-			if($entry["name"]=="." or $entry["name"]=="..")
-				continue;
-
-			$dirlist[$entry['name']] = $entry;
-		}
-
-		return $dirlist;
-	}
-// <!-- --------------------------------------------------------------------------------------- -->
-// <!--       Private functions                                                                 -->
-// <!-- --------------------------------------------------------------------------------------- -->
-	function _checkCode() {
-		return ($this->_code<400 and $this->_code>0);
-	}
-
-	function _list($arg="", $cmd="LIST", $fnction="_list") {
-		if(!$this->_data_prepare()) return false;
-		if(!$this->_exec($cmd.$arg, $fnction)) {
-			$this->_data_close();
-			return FALSE;
-		}
-		if(!$this->_checkCode()) {
-			$this->_data_close();
-			return FALSE;
-		}
-		$out="";
-		if($this->_code<200) {
-			$out=$this->_data_read();
-			$this->_data_close();
-			if(!$this->_readmsg()) return FALSE;
-			if(!$this->_checkCode()) return FALSE;
-			if($out === FALSE ) return FALSE;
-			$out=preg_split("/[".CRLF."]+/", $out, -1, PREG_SPLIT_NO_EMPTY);
-//			$this->SendMSG(implode($this->_eol_code[$this->OS_local], $out));
-		}
-		return $out;
-	}
-
-// <!-- --------------------------------------------------------------------------------------- -->
-// <!-- Partie : gestion des erreurs                                                            -->
-// <!-- --------------------------------------------------------------------------------------- -->
-// Gnre une erreur pour traitement externe  la classe
-	function PushError($fctname,$msg,$desc=false){
-		$error=array();
-		$error['time']=time();
-		$error['fctname']=$fctname;
-		$error['msg']=$msg;
-		$error['desc']=$desc;
-		if($desc) $tmp=' ('.$desc.')'; else $tmp='';
-		$this->SendMSG($fctname.': '.$msg.$tmp);
-		return(array_push($this->_error_array,$error));
-	}
-
-// Rcupre une erreur externe
-	function PopError(){
-		if(count($this->_error_array)) return(array_pop($this->_error_array));
-			else return(false);
-	}
-}
-
 $mod_sockets = extension_loaded( 'sockets' );
 if ( ! $mod_sockets && function_exists( 'dl' ) && is_callable( 'dl' ) ) {
 	$prefix = ( PHP_SHLIB_SUFFIX == 'dll' ) ? 'php_' : '';
 	@dl( $prefix . 'sockets.' . PHP_SHLIB_SUFFIX );
 	$mod_sockets = extension_loaded( 'sockets' );
 }
-
-require_once dirname( __FILE__ ) . "/class-ftp-" . ( $mod_sockets ? "sockets" : "pure" ) . ".php";
 
 if ( $mod_sockets ) {
 	class ftp extends ftp_sockets {}
Index: www/wp-includes/autoload/id3/ID3/module.tag.lyrics3.php
===================================================================
--- www/wp-includes/autoload/id3/ID3/module.tag.lyrics3.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/id3/ID3/module.tag.lyrics3.php	(revision UNDEFINED)
@@ -1,298 +0,0 @@
-<?php
-/////////////////////////////////////////////////////////////////
-/// getID3() by James Heinrich <info@getid3.org>               //
-//  available at http://getid3.sourceforge.net                 //
-//            or http://www.getid3.org                         //
-//          also https://github.com/JamesHeinrich/getID3       //
-/////////////////////////////////////////////////////////////////
-// See readme.txt for more details                             //
-/////////////////////////////////////////////////////////////////
-///                                                            //
-// module.tag.lyrics3.php                                      //
-// module for analyzing Lyrics3 tags                           //
-// dependencies: module.tag.apetag.php (optional)              //
-//                                                            ///
-/////////////////////////////////////////////////////////////////
-
-
-class getid3_lyrics3 extends getid3_handler
-{
-
-	public function Analyze() {
-		$info = &$this->getid3->info;
-
-		// http://www.volweb.cz/str/tags.htm
-
-		if (!getid3_lib::intValueSupported($info['filesize'])) {
-			$info['warning'][] = 'Unable to check for Lyrics3 because file is larger than '.round(PHP_INT_MAX / 1073741824).'GB';
-			return false;
-		}
-
-		$this->fseek((0 - 128 - 9 - 6), SEEK_END);          // end - ID3v1 - "LYRICSEND" - [Lyrics3size]
-		$lyrics3_id3v1 = $this->fread(128 + 9 + 6);
-		$lyrics3lsz    = substr($lyrics3_id3v1,  0,   6); // Lyrics3size
-		$lyrics3end    = substr($lyrics3_id3v1,  6,   9); // LYRICSEND or LYRICS200
-		$id3v1tag      = substr($lyrics3_id3v1, 15, 128); // ID3v1
-
-		if ($lyrics3end == 'LYRICSEND') {
-			// Lyrics3v1, ID3v1, no APE
-
-			$lyrics3size    = 5100;
-			$lyrics3offset  = $info['filesize'] - 128 - $lyrics3size;
-			$lyrics3version = 1;
-
-		} elseif ($lyrics3end == 'LYRICS200') {
-			// Lyrics3v2, ID3v1, no APE
-
-			// LSZ = lyrics + 'LYRICSBEGIN'; add 6-byte size field; add 'LYRICS200'
-			$lyrics3size    = $lyrics3lsz + 6 + strlen('LYRICS200');
-			$lyrics3offset  = $info['filesize'] - 128 - $lyrics3size;
-			$lyrics3version = 2;
-
-		} elseif (substr(strrev($lyrics3_id3v1), 0, 9) == strrev('LYRICSEND')) {
-			// Lyrics3v1, no ID3v1, no APE
-
-			$lyrics3size    = 5100;
-			$lyrics3offset  = $info['filesize'] - $lyrics3size;
-			$lyrics3version = 1;
-			$lyrics3offset  = $info['filesize'] - $lyrics3size;
-
-		} elseif (substr(strrev($lyrics3_id3v1), 0, 9) == strrev('LYRICS200')) {
-
-			// Lyrics3v2, no ID3v1, no APE
-
-			$lyrics3size    = strrev(substr(strrev($lyrics3_id3v1), 9, 6)) + 6 + strlen('LYRICS200'); // LSZ = lyrics + 'LYRICSBEGIN'; add 6-byte size field; add 'LYRICS200'
-			$lyrics3offset  = $info['filesize'] - $lyrics3size;
-			$lyrics3version = 2;
-
-		} else {
-
-			if (isset($info['ape']['tag_offset_start']) && ($info['ape']['tag_offset_start'] > 15)) {
-
-				$this->fseek($info['ape']['tag_offset_start'] - 15);
-				$lyrics3lsz = $this->fread(6);
-				$lyrics3end = $this->fread(9);
-
-				if ($lyrics3end == 'LYRICSEND') {
-					// Lyrics3v1, APE, maybe ID3v1
-
-					$lyrics3size    = 5100;
-					$lyrics3offset  = $info['ape']['tag_offset_start'] - $lyrics3size;
-					$info['avdataend'] = $lyrics3offset;
-					$lyrics3version = 1;
-					$info['warning'][] = 'APE tag located after Lyrics3, will probably break Lyrics3 compatability';
-
-				} elseif ($lyrics3end == 'LYRICS200') {
-					// Lyrics3v2, APE, maybe ID3v1
-
-					$lyrics3size    = $lyrics3lsz + 6 + strlen('LYRICS200'); // LSZ = lyrics + 'LYRICSBEGIN'; add 6-byte size field; add 'LYRICS200'
-					$lyrics3offset  = $info['ape']['tag_offset_start'] - $lyrics3size;
-					$lyrics3version = 2;
-					$info['warning'][] = 'APE tag located after Lyrics3, will probably break Lyrics3 compatability';
-
-				}
-
-			}
-
-		}
-
-		if (isset($lyrics3offset)) {
-			$info['avdataend'] = $lyrics3offset;
-			$this->getLyrics3Data($lyrics3offset, $lyrics3version, $lyrics3size);
-
-			if (!isset($info['ape'])) {
-				if (isset($info['lyrics3']['tag_offset_start'])) {
-					$GETID3_ERRORARRAY = &$info['warning'];
-					getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.tag.apetag.php', __FILE__, true);
-					$getid3_temp = new getID3();
-					$getid3_temp->openfile($this->getid3->filename);
-					$getid3_apetag = new getid3_apetag($getid3_temp);
-					$getid3_apetag->overrideendoffset = $info['lyrics3']['tag_offset_start'];
-					$getid3_apetag->Analyze();
-					if (!empty($getid3_temp->info['ape'])) {
-						$info['ape'] = $getid3_temp->info['ape'];
-					}
-					if (!empty($getid3_temp->info['replay_gain'])) {
-						$info['replay_gain'] = $getid3_temp->info['replay_gain'];
-					}
-					unset($getid3_temp, $getid3_apetag);
-				} else {
-					$info['warning'][] = 'Lyrics3 and APE tags appear to have become entangled (most likely due to updating the APE tags with a non-Lyrics3-aware tagger)';
-				}
-			}
-
-		}
-
-		return true;
-	}
-
-	public function getLyrics3Data($endoffset, $version, $length) {
-		// http://www.volweb.cz/str/tags.htm
-
-		$info = &$this->getid3->info;
-
-		if (!getid3_lib::intValueSupported($endoffset)) {
-			$info['warning'][] = 'Unable to check for Lyrics3 because file is larger than '.round(PHP_INT_MAX / 1073741824).'GB';
-			return false;
-		}
-
-		$this->fseek($endoffset);
-		if ($length <= 0) {
-			return false;
-		}
-		$rawdata = $this->fread($length);
-
-		$ParsedLyrics3['raw']['lyrics3version'] = $version;
-		$ParsedLyrics3['raw']['lyrics3tagsize'] = $length;
-		$ParsedLyrics3['tag_offset_start']      = $endoffset;
-		$ParsedLyrics3['tag_offset_end']        = $endoffset + $length - 1;
-
-		if (substr($rawdata, 0, 11) != 'LYRICSBEGIN') {
-			if (strpos($rawdata, 'LYRICSBEGIN') !== false) {
-
-				$info['warning'][] = '"LYRICSBEGIN" expected at '.$endoffset.' but actually found at '.($endoffset + strpos($rawdata, 'LYRICSBEGIN')).' - this is invalid for Lyrics3 v'.$version;
-				$info['avdataend'] = $endoffset + strpos($rawdata, 'LYRICSBEGIN');
-				$rawdata = substr($rawdata, strpos($rawdata, 'LYRICSBEGIN'));
-				$length = strlen($rawdata);
-				$ParsedLyrics3['tag_offset_start'] = $info['avdataend'];
-				$ParsedLyrics3['raw']['lyrics3tagsize'] = $length;
-
-			} else {
-
-				$info['error'][] = '"LYRICSBEGIN" expected at '.$endoffset.' but found "'.substr($rawdata, 0, 11).'" instead';
-				return false;
-
-			}
-
-		}
-
-		switch ($version) {
-
-			case 1:
-				if (substr($rawdata, strlen($rawdata) - 9, 9) == 'LYRICSEND') {
-					$ParsedLyrics3['raw']['LYR'] = trim(substr($rawdata, 11, strlen($rawdata) - 11 - 9));
-					$this->Lyrics3LyricsTimestampParse($ParsedLyrics3);
-				} else {
-					$info['error'][] = '"LYRICSEND" expected at '.($this->ftell() - 11 + $length - 9).' but found "'.substr($rawdata, strlen($rawdata) - 9, 9).'" instead';
-					return false;
-				}
-				break;
-
-			case 2:
-				if (substr($rawdata, strlen($rawdata) - 9, 9) == 'LYRICS200') {
-					$ParsedLyrics3['raw']['unparsed'] = substr($rawdata, 11, strlen($rawdata) - 11 - 9 - 6); // LYRICSBEGIN + LYRICS200 + LSZ
-					$rawdata = $ParsedLyrics3['raw']['unparsed'];
-					while (strlen($rawdata) > 0) {
-						$fieldname = substr($rawdata, 0, 3);
-						$fieldsize = (int) substr($rawdata, 3, 5);
-						$ParsedLyrics3['raw'][$fieldname] = substr($rawdata, 8, $fieldsize);
-						$rawdata = substr($rawdata, 3 + 5 + $fieldsize);
-					}
-
-					if (isset($ParsedLyrics3['raw']['IND'])) {
-						$i = 0;
-						$flagnames = array('lyrics', 'timestamps', 'inhibitrandom');
-						foreach ($flagnames as $flagname) {
-							if (strlen($ParsedLyrics3['raw']['IND']) > $i++) {
-								$ParsedLyrics3['flags'][$flagname] = $this->IntString2Bool(substr($ParsedLyrics3['raw']['IND'], $i, 1 - 1));
-							}
-						}
-					}
-
-					$fieldnametranslation = array('ETT'=>'title', 'EAR'=>'artist', 'EAL'=>'album', 'INF'=>'comment', 'AUT'=>'author');
-					foreach ($fieldnametranslation as $key => $value) {
-						if (isset($ParsedLyrics3['raw'][$key])) {
-							$ParsedLyrics3['comments'][$value][] = trim($ParsedLyrics3['raw'][$key]);
-						}
-					}
-
-					if (isset($ParsedLyrics3['raw']['IMG'])) {
-						$imagestrings = explode("\r\n", $ParsedLyrics3['raw']['IMG']);
-						foreach ($imagestrings as $key => $imagestring) {
-							if (strpos($imagestring, '||') !== false) {
-								$imagearray = explode('||', $imagestring);
-								$ParsedLyrics3['images'][$key]['filename']     =                                (isset($imagearray[0]) ? $imagearray[0] : '');
-								$ParsedLyrics3['images'][$key]['description']  =                                (isset($imagearray[1]) ? $imagearray[1] : '');
-								$ParsedLyrics3['images'][$key]['timestamp']    = $this->Lyrics3Timestamp2Seconds(isset($imagearray[2]) ? $imagearray[2] : '');
-							}
-						}
-					}
-					if (isset($ParsedLyrics3['raw']['LYR'])) {
-						$this->Lyrics3LyricsTimestampParse($ParsedLyrics3);
-					}
-				} else {
-					$info['error'][] = '"LYRICS200" expected at '.($this->ftell() - 11 + $length - 9).' but found "'.substr($rawdata, strlen($rawdata) - 9, 9).'" instead';
-					return false;
-				}
-				break;
-
-			default:
-				$info['error'][] = 'Cannot process Lyrics3 version '.$version.' (only v1 and v2)';
-				return false;
-				break;
-		}
-
-
-		if (isset($info['id3v1']['tag_offset_start']) && ($info['id3v1']['tag_offset_start'] <= $ParsedLyrics3['tag_offset_end'])) {
-			$info['warning'][] = 'ID3v1 tag information ignored since it appears to be a false synch in Lyrics3 tag data';
-			unset($info['id3v1']);
-			foreach ($info['warning'] as $key => $value) {
-				if ($value == 'Some ID3v1 fields do not use NULL characters for padding') {
-					unset($info['warning'][$key]);
-					sort($info['warning']);
-					break;
-				}
-			}
-		}
-
-		$info['lyrics3'] = $ParsedLyrics3;
-
-		return true;
-	}
-
-	public function Lyrics3Timestamp2Seconds($rawtimestamp) {
-		if (preg_match('#^\\[([0-9]{2}):([0-9]{2})\\]$#', $rawtimestamp, $regs)) {
-			return (int) (($regs[1] * 60) + $regs[2]);
-		}
-		return false;
-	}
-
-	public function Lyrics3LyricsTimestampParse(&$Lyrics3data) {
-		$lyricsarray = explode("\r\n", $Lyrics3data['raw']['LYR']);
-		foreach ($lyricsarray as $key => $lyricline) {
-			$regs = array();
-			unset($thislinetimestamps);
-			while (preg_match('#^(\\[[0-9]{2}:[0-9]{2}\\])#', $lyricline, $regs)) {
-				$thislinetimestamps[] = $this->Lyrics3Timestamp2Seconds($regs[0]);
-				$lyricline = str_replace($regs[0], '', $lyricline);
-			}
-			$notimestamplyricsarray[$key] = $lyricline;
-			if (isset($thislinetimestamps) && is_array($thislinetimestamps)) {
-				sort($thislinetimestamps);
-				foreach ($thislinetimestamps as $timestampkey => $timestamp) {
-					if (isset($Lyrics3data['synchedlyrics'][$timestamp])) {
-						// timestamps only have a 1-second resolution, it's possible that multiple lines
-						// could have the same timestamp, if so, append
-						$Lyrics3data['synchedlyrics'][$timestamp] .= "\r\n".$lyricline;
-					} else {
-						$Lyrics3data['synchedlyrics'][$timestamp] = $lyricline;
-					}
-				}
-			}
-		}
-		$Lyrics3data['unsynchedlyrics'] = implode("\r\n", $notimestamplyricsarray);
-		if (isset($Lyrics3data['synchedlyrics']) && is_array($Lyrics3data['synchedlyrics'])) {
-			ksort($Lyrics3data['synchedlyrics']);
-		}
-		return true;
-	}
-
-	public function IntString2Bool($char) {
-		if ($char == '1') {
-			return true;
-		} elseif ($char == '0') {
-			return false;
-		}
-		return null;
-	}
-}
Index: www/wp-admin/includes/media.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/includes/media.php	(revision 38565)
+++ www/wp-admin/includes/media.php	(revision )
@@ -3012,9 +3012,6 @@
 		define( 'GETID3_TEMP_DIR', get_temp_dir() );
 	}
 
-	if ( ! class_exists( 'getID3', false ) ) {
-		require( ABSPATH . WPINC . '/ID3/getid3.php' );
-	}
 	$id3 = new getID3();
 	$data = $id3->analyze( $file );
 
@@ -3073,9 +3070,6 @@
 		define( 'GETID3_TEMP_DIR', get_temp_dir() );
 	}
 
-	if ( ! class_exists( 'getID3', false ) ) {
-		require( ABSPATH . WPINC . '/ID3/getid3.php' );
-	}
 	$id3 = new getID3();
 	$data = $id3->analyze( $file );
 
Index: www/wp-includes/autoload/requests/Exception.php
===================================================================
--- www/wp-includes/autoload/requests/Exception.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception.php	(revision UNDEFINED)
@@ -1,62 +0,0 @@
-<?php
-/**
- * Exception for HTTP requests
- *
- * @package Requests
- */
-
-/**
- * Exception for HTTP requests
- *
- * @package Requests
- */
-class Requests_Exception extends Exception {
-	/**
-	 * Type of exception
-	 *
-	 * @var string
-	 */
-	protected $type;
-
-	/**
-	 * Data associated with the exception
-	 *
-	 * @var mixed
-	 */
-	protected $data;
-
-	/**
-	 * Create a new exception
-	 *
-	 * @param string $message Exception message
-	 * @param string $type Exception type
-	 * @param mixed $data Associated data
-	 * @param integer $code Exception numerical code, if applicable
-	 */
-	public function __construct($message, $type, $data = null, $code = 0) {
-		parent::__construct($message, $code);
-
-		$this->type = $type;
-		$this->data = $data;
-	}
-
-	/**
-	 * Like {@see getCode()}, but a string code.
-	 *
-	 * @codeCoverageIgnore
-	 * @return string
-	 */
-	public function getType() {
-		return $this->type;
-	}
-
-	/**
-	 * Gives any relevant data
-	 *
-	 * @codeCoverageIgnore
-	 * @return mixed
-	 */
-	public function getData() {
-		return $this->data;
-	}
-}
\ No newline at end of file
Index: www/wp-includes/class-wp-text-diff-renderer-inline.php
===================================================================
--- www/wp-includes/class-wp-text-diff-renderer-inline.php	(revision 38565)
+++ www/wp-includes/autoload/WP_Text_Diff_Renderer_inline.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/text-diff/Text_MappedDiff.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/text-diff/Text_MappedDiff.php	(revision )
+++ www/wp-includes/autoload/text-diff/Text_MappedDiff.php	(revision )
@@ -0,0 +1,58 @@
+<?php
+
+/**
+ * @package Text_Diff
+ * @author  Geoffrey T. Dairiki <dairiki@dairiki.org>
+ */
+class Text_MappedDiff extends Text_Diff {
+
+    /**
+     * Computes a diff between sequences of strings.
+     *
+     * This can be used to compute things like case-insensitve diffs, or diffs
+     * which ignore changes in white-space.
+     *
+     * @param array $from_lines         An array of strings.
+     * @param array $to_lines           An array of strings.
+     * @param array $mapped_from_lines  This array should have the same size
+     *                                  number of elements as $from_lines.  The
+     *                                  elements in $mapped_from_lines and
+     *                                  $mapped_to_lines are what is actually
+     *                                  compared when computing the diff.
+     * @param array $mapped_to_lines    This array should have the same number
+     *                                  of elements as $to_lines.
+     */
+    function __construct($from_lines, $to_lines,
+                             $mapped_from_lines, $mapped_to_lines)
+    {
+        assert(count($from_lines) == count($mapped_from_lines));
+        assert(count($to_lines) == count($mapped_to_lines));
+
+        parent::Text_Diff($mapped_from_lines, $mapped_to_lines);
+
+        $xi = $yi = 0;
+        for ($i = 0; $i < count($this->_edits); $i++) {
+            $orig = &$this->_edits[$i]->orig;
+            if (is_array($orig)) {
+                $orig = array_slice($from_lines, $xi, count($orig));
+                $xi += count($orig);
+            }
+
+            $final = &$this->_edits[$i]->final;
+            if (is_array($final)) {
+                $final = array_slice($to_lines, $yi, count($final));
+                $yi += count($final);
+            }
+        }
+    }
+
+	/**
+	 * PHP4 constructor.
+	 */
+	public function Text_MappedDiff( $from_lines, $to_lines,
+                             $mapped_from_lines, $mapped_to_lines ) {
+		self::__construct( $from_lines, $to_lines,
+                             $mapped_from_lines, $mapped_to_lines );
+	}
+
+}
Index: www/wp-includes/autoload/customize/class-wp-customize-header-image-setting.php
===================================================================
--- www/wp-includes/autoload/customize/class-wp-customize-header-image-setting.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/customize/class-wp-customize-header-image-setting.php	(revision UNDEFINED)
@@ -1,42 +0,0 @@
-<?php
-/**
- * Customize API: WP_Customize_Header_Image_Setting class
- *
- * @package WordPress
- * @subpackage Customize
- * @since 4.4.0
- */
-
-/**
- * A setting that is used to filter a value, but will not save the results.
- *
- * Results should be properly handled using another setting or callback.
- *
- * @since 3.4.0
- *
- * @see WP_Customize_Setting
- */
-final class WP_Customize_Header_Image_Setting extends WP_Customize_Setting {
-	public $id = 'header_image_data';
-
-	/**
-	 * @since 3.4.0
-	 *
-	 * @global Custom_Image_Header $custom_image_header
-	 *
-	 * @param $value
-	 */
-	public function update( $value ) {
-		global $custom_image_header;
-
-		// If the value doesn't exist (removed or random),
-		// use the header_image value.
-		if ( ! $value )
-			$value = $this->manager->get_setting('header_image')->post_value();
-
-		if ( is_array( $value ) && isset( $value['choice'] ) )
-			$custom_image_header->set_header_image( $value['choice'] );
-		else
-			$custom_image_header->set_header_image( $value );
-	}
-}
Index: www/wp-includes/autoload/pomo/translations.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/pomo/translations.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/pomo/translations.php	(revision UNDEFINED)
@@ -1,358 +0,0 @@
-<?php
-/**
- * Class for a set of entries for translation and their associated headers
- *
- * @version $Id: translations.php 1157 2015-11-20 04:30:11Z dd32 $
- * @package pomo
- * @subpackage translations
- */
-
-require_once dirname(__FILE__) . '/entry.php';
-
-if ( ! class_exists( 'Translations', false ) ):
-class Translations {
-	var $entries = array();
-	var $headers = array();
-
-	/**
-	 * Add entry to the PO structure
-	 *
-	 * @param array|Translation_Entry &$entry
-	 * @return bool true on success, false if the entry doesn't have a key
-	 */
-	function add_entry($entry) {
-		if (is_array($entry)) {
-			$entry = new Translation_Entry($entry);
-		}
-		$key = $entry->key();
-		if (false === $key) return false;
-		$this->entries[$key] = &$entry;
-		return true;
-	}
-
-	/**
-	 * @param array|Translation_Entry $entry
-	 * @return bool
-	 */
-	function add_entry_or_merge($entry) {
-		if (is_array($entry)) {
-			$entry = new Translation_Entry($entry);
-		}
-		$key = $entry->key();
-		if (false === $key) return false;
-		if (isset($this->entries[$key]))
-			$this->entries[$key]->merge_with($entry);
-		else
-			$this->entries[$key] = &$entry;
-		return true;
-	}
-
-	/**
-	 * Sets $header PO header to $value
-	 *
-	 * If the header already exists, it will be overwritten
-	 *
-	 * TODO: this should be out of this class, it is gettext specific
-	 *
-	 * @param string $header header name, without trailing :
-	 * @param string $value header value, without trailing \n
-	 */
-	function set_header($header, $value) {
-		$this->headers[$header] = $value;
-	}
-
-	/**
-	 * @param array $headers
-	 */
-	function set_headers($headers) {
-		foreach($headers as $header => $value) {
-			$this->set_header($header, $value);
-		}
-	}
-
-	/**
-	 * @param string $header
-	 */
-	function get_header($header) {
-		return isset($this->headers[$header])? $this->headers[$header] : false;
-	}
-
-	/**
-	 * @param Translation_Entry $entry
-	 */
-	function translate_entry(&$entry) {
-		$key = $entry->key();
-		return isset($this->entries[$key])? $this->entries[$key] : false;
-	}
-
-	/**
-	 * @param string $singular
-	 * @param string $context
-	 * @return string
-	 */
-	function translate($singular, $context=null) {
-		$entry = new Translation_Entry(array('singular' => $singular, 'context' => $context));
-		$translated = $this->translate_entry($entry);
-		return ($translated && !empty($translated->translations))? $translated->translations[0] : $singular;
-	}
-
-	/**
-	 * Given the number of items, returns the 0-based index of the plural form to use
-	 *
-	 * Here, in the base Translations class, the common logic for English is implemented:
-	 * 	0 if there is one element, 1 otherwise
-	 *
-	 * This function should be overrided by the sub-classes. For example MO/PO can derive the logic
-	 * from their headers.
-	 *
-	 * @param integer $count number of items
-	 */
-	function select_plural_form($count) {
-		return 1 == $count? 0 : 1;
-	}
-
-	/**
-	 * @return int
-	 */
-	function get_plural_forms_count() {
-		return 2;
-	}
-
-	/**
-	 * @param string $singular
-	 * @param string $plural
-	 * @param int    $count
-	 * @param string $context
-	 */
-	function translate_plural($singular, $plural, $count, $context = null) {
-		$entry = new Translation_Entry(array('singular' => $singular, 'plural' => $plural, 'context' => $context));
-		$translated = $this->translate_entry($entry);
-		$index = $this->select_plural_form($count);
-		$total_plural_forms = $this->get_plural_forms_count();
-		if ($translated && 0 <= $index && $index < $total_plural_forms &&
-				is_array($translated->translations) &&
-				isset($translated->translations[$index]))
-			return $translated->translations[$index];
-		else
-			return 1 == $count? $singular : $plural;
-	}
-
-	/**
-	 * Merge $other in the current object.
-	 *
-	 * @param Object &$other Another Translation object, whose translations will be merged in this one
-	 * @return void
-	 **/
-	function merge_with(&$other) {
-		foreach( $other->entries as $entry ) {
-			$this->entries[$entry->key()] = $entry;
-		}
-	}
-
-	/**
-	 * @param object $other
-	 */
-	function merge_originals_with(&$other) {
-		foreach( $other->entries as $entry ) {
-			if ( !isset( $this->entries[$entry->key()] ) )
-				$this->entries[$entry->key()] = $entry;
-			else
-				$this->entries[$entry->key()]->merge_with($entry);
-		}
-	}
-}
-
-class Gettext_Translations extends Translations {
-	/**
-	 * The gettext implementation of select_plural_form.
-	 *
-	 * It lives in this class, because there are more than one descendand, which will use it and
-	 * they can't share it effectively.
-	 *
-	 * @param int $count
-	 */
-	function gettext_select_plural_form($count) {
-		if (!isset($this->_gettext_select_plural_form) || is_null($this->_gettext_select_plural_form)) {
-			list( $nplurals, $expression ) = $this->nplurals_and_expression_from_header($this->get_header('Plural-Forms'));
-			$this->_nplurals = $nplurals;
-			$this->_gettext_select_plural_form = $this->make_plural_form_function($nplurals, $expression);
-		}
-		return call_user_func($this->_gettext_select_plural_form, $count);
-	}
-
-	/**
-	 * @param string $header
-	 * @return array
-	 */
-	function nplurals_and_expression_from_header($header) {
-		if (preg_match('/^\s*nplurals\s*=\s*(\d+)\s*;\s+plural\s*=\s*(.+)$/', $header, $matches)) {
-			$nplurals = (int)$matches[1];
-			$expression = trim($this->parenthesize_plural_exression($matches[2]));
-			return array($nplurals, $expression);
-		} else {
-			return array(2, 'n != 1');
-		}
-	}
-
-	/**
-	 * Makes a function, which will return the right translation index, according to the
-	 * plural forms header
-	 * @param int    $nplurals
-	 * @param string $expression
-	 */
-	function make_plural_form_function($nplurals, $expression) {
-		$expression = str_replace('n', '$n', $expression);
-		$func_body = "
-			\$index = (int)($expression);
-			return (\$index < $nplurals)? \$index : $nplurals - 1;";
-		return create_function('$n', $func_body);
-	}
-
-	/**
-	 * Adds parentheses to the inner parts of ternary operators in
-	 * plural expressions, because PHP evaluates ternary oerators from left to right
-	 *
-	 * @param string $expression the expression without parentheses
-	 * @return string the expression with parentheses added
-	 */
-	function parenthesize_plural_exression($expression) {
-		$expression .= ';';
-		$res = '';
-		$depth = 0;
-		for ($i = 0; $i < strlen($expression); ++$i) {
-			$char = $expression[$i];
-			switch ($char) {
-				case '?':
-					$res .= ' ? (';
-					$depth++;
-					break;
-				case ':':
-					$res .= ') : (';
-					break;
-				case ';':
-					$res .= str_repeat(')', $depth) . ';';
-					$depth= 0;
-					break;
-				default:
-					$res .= $char;
-			}
-		}
-		return rtrim($res, ';');
-	}
-
-	/**
-	 * @param string $translation
-	 * @return array
-	 */
-	function make_headers($translation) {
-		$headers = array();
-		// sometimes \ns are used instead of real new lines
-		$translation = str_replace('\n', "\n", $translation);
-		$lines = explode("\n", $translation);
-		foreach($lines as $line) {
-			$parts = explode(':', $line, 2);
-			if (!isset($parts[1])) continue;
-			$headers[trim($parts[0])] = trim($parts[1]);
-		}
-		return $headers;
-	}
-
-	/**
-	 * @param string $header
-	 * @param string $value
-	 */
-	function set_header($header, $value) {
-		parent::set_header($header, $value);
-		if ('Plural-Forms' == $header) {
-			list( $nplurals, $expression ) = $this->nplurals_and_expression_from_header($this->get_header('Plural-Forms'));
-			$this->_nplurals = $nplurals;
-			$this->_gettext_select_plural_form = $this->make_plural_form_function($nplurals, $expression);
-		}
-	}
-}
-endif;
-
-if ( ! class_exists( 'NOOP_Translations', false ) ):
-/**
- * Provides the same interface as Translations, but doesn't do anything
- */
-class NOOP_Translations {
-	var $entries = array();
-	var $headers = array();
-
-	function add_entry($entry) {
-		return true;
-	}
-
-	/**
-	 *
-	 * @param string $header
-	 * @param string $value
-	 */
-	function set_header($header, $value) {
-	}
-
-	/**
-	 *
-	 * @param array $headers
-	 */
-	function set_headers($headers) {
-	}
-
-	/**
-	 * @param string $header
-	 * @return false
-	 */
-	function get_header($header) {
-		return false;
-	}
-
-	/**
-	 * @param Translation_Entry $entry
-	 * @return false
-	 */
-	function translate_entry(&$entry) {
-		return false;
-	}
-
-	/**
-	 * @param string $singular
-	 * @param string $context
-	 */
-	function translate($singular, $context=null) {
-		return $singular;
-	}
-
-	/**
-	 *
-	 * @param int $count
-	 * @return bool
-	 */
-	function select_plural_form($count) {
-		return 1 == $count? 0 : 1;
-	}
-
-	/**
-	 * @return int
-	 */
-	function get_plural_forms_count() {
-		return 2;
-	}
-
-	/**
-	 * @param string $singular
-	 * @param string $plural
-	 * @param int    $count
-	 * @param string $context
-	 */
-	function translate_plural($singular, $plural, $count, $context = null) {
-			return 1 == $count? $singular : $plural;
-	}
-
-	/**
-	 * @param object $other
-	 */
-	function merge_with(&$other) {
-	}
-}
-endif;
Index: www/wp-includes/ID3/module.tag.lyrics3.php
===================================================================
--- www/wp-includes/ID3/module.tag.lyrics3.php	(revision 38565)
+++ www/wp-includes/autoload/id3/getid3_lyrics3.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/SimplePie/Exception.php
===================================================================
--- www/wp-includes/SimplePie/Exception.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_Exception.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/plugin-install.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/plugin-install.php	(revision 38565)
+++ www/wp-admin/plugin-install.php	(revision 38565)
@@ -1,170 +0,0 @@
-<?php
-/**
- * Install plugin administration panel.
- *
- * @package WordPress
- * @subpackage Administration
- */
-// TODO route this pages via a specific iframe handler instead of the do_action below
-if ( !defined( 'IFRAME_REQUEST' ) && isset( $_GET['tab'] ) && ( 'plugin-information' == $_GET['tab'] ) )
-	define( 'IFRAME_REQUEST', true );
-
-/**
- * WordPress Administration Bootstrap.
- */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-if ( ! current_user_can('install_plugins') )
-	wp_die(__('Sorry, you are not allowed to install plugins on this site.'));
-
-if ( is_multisite() && ! is_network_admin() ) {
-	wp_redirect( network_admin_url( 'plugin-install.php' ) );
-	exit();
-}
-
-$wp_list_table = _get_list_table('WP_Plugin_Install_List_Table');
-$pagenum = $wp_list_table->get_pagenum();
-
-if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) {
-	$location = remove_query_arg( '_wp_http_referer', wp_unslash( $_SERVER['REQUEST_URI'] ) );
-
-	if ( ! empty( $_REQUEST['paged'] ) ) {
-		$location = add_query_arg( 'paged', (int) $_REQUEST['paged'], $location );
-	}
-
-	wp_redirect( $location );
-	exit;
-}
-
-$wp_list_table->prepare_items();
-
-$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
-
-if ( $pagenum > $total_pages && $total_pages > 0 ) {
-	wp_redirect( add_query_arg( 'paged', $total_pages ) );
-	exit;
-}
-
-$title = __( 'Add Plugins' );
-$parent_file = 'plugins.php';
-
-wp_enqueue_script( 'plugin-install' );
-if ( 'plugin-information' != $tab )
-	add_thickbox();
-
-$body_id = $tab;
-
-wp_enqueue_script( 'updates' );
-
-/**
- * Fires before each tab on the Install Plugins screen is loaded.
- *
- * The dynamic portion of the action hook, `$tab`, allows for targeting
- * individual tabs, for instance 'install_plugins_pre_plugin-information'.
- *
- * @since 2.7.0
- */
-do_action( "install_plugins_pre_{$tab}" );
-
-/*
- * Call the pre upload action on every non-upload plugin install screen
- * because the form is always displayed on these screens.
- */
-if ( 'upload' !== $tab ) {
-	/** This action is documented in wp-admin/plugin-install.php */
-	do_action( 'install_plugins_pre_upload' );
-}
-
-get_current_screen()->add_help_tab( array(
-'id'		=> 'overview',
-'title'		=> __('Overview'),
-'content'	=>
-	'<p>' . sprintf( __('Plugins hook into WordPress to extend its functionality with custom features. Plugins are developed independently from the core WordPress application by thousands of developers all over the world. All plugins in the official <a href="%s" target="_blank">WordPress Plugin Directory</a> are compatible with the license WordPress uses.' ), __( 'https://wordpress.org/plugins/' ) ) . '</p>' .
-	'<p>' . __( 'You can find new plugins to install by searching or browsing the directory right here in your own Plugins section.' ) . ' <span id="live-search-desc" class="hide-if-no-js">' . __( 'The search results will be updated as you type.' ) . '</span></p>'
-
-) );
-get_current_screen()->add_help_tab( array(
-'id'		=> 'adding-plugins',
-'title'		=> __('Adding Plugins'),
-'content'	=>
-	'<p>' . __('If you know what you&#8217;re looking for, Search is your best bet. The Search screen has options to search the WordPress Plugin Directory for a particular Term, Author, or Tag. You can also search the directory by selecting popular tags. Tags in larger type mean more plugins have been labeled with that tag.') . '</p>' .
-	'<p>' . __( 'If you just want to get an idea of what&#8217;s available, you can browse Featured and Popular plugins by using the links above the plugins list. These sections rotate regularly.' ) . '</p>' .
-	'<p>' . __( 'You can also browse a user&#8217;s favorite plugins, by using the Favorites link above the plugins list and entering their WordPress.org username.' ) . '</p>' .
-	'<p>' . __( 'If you want to install a plugin that you&#8217;ve downloaded elsewhere, click the Upload Plugin button above the plugins list. You will be prompted to upload the .zip package, and once uploaded, you can activate the new plugin.' ) . '</p>'
-) );
-
-get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Plugins_Add_New_Screen" target="_blank">Documentation on Installing Plugins</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
-);
-
-get_current_screen()->set_screen_reader_content( array(
-	'heading_views'      => __( 'Filter plugins list' ),
-	'heading_pagination' => __( 'Plugins list navigation' ),
-	'heading_list'       => __( 'Plugins list' ),
-) );
-
-/**
- * WordPress Administration Template Header.
- */
-include(ABSPATH . 'wp-admin/admin-header.php');
-?>
-<div class="wrap <?php echo esc_attr( "plugin-install-tab-$tab" ); ?>">
-<h1>
-	<?php
-	echo esc_html( $title );
-	if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_plugins' ) ) {
-		printf( ' <a href="%s" class="upload-view-toggle page-title-action"><span class="upload">%s</span><span class="browse">%s</span></a>',
-			( 'upload' === $tab ) ? self_admin_url( 'plugin-install.php' ) : self_admin_url( 'plugin-install.php?tab=upload' ),
-			__( 'Upload Plugin' ),
-			__( 'Browse Plugins' )
-		);
-	}
-	?>
-</h1>
-
-<?php
-/*
- * Output the upload plugin form on every non-upload plugin install screen, so it can be
- * displayed via JavaScript rather then opening up the devoted upload plugin page.
- */
-if ( $tab !== 'upload' ) {
-	?>
-	<div class="upload-plugin-wrap">
-		<?php
-		/** This action is documented in wp-admin/plugin-install.php */
-		do_action( 'install_plugins_upload' );
-		?>
-	</div>
-	<?php
-}
-
-if ( $tab !== 'upload' ) {
-	$wp_list_table->views();
-	echo '<br class="clear" />';
-}
-
-/**
- * Fires after the plugins list table in each tab of the Install Plugins screen.
- *
- * The dynamic portion of the action hook, `$tab`, allows for targeting
- * individual tabs, for instance 'install_plugins_plugin-information'.
- *
- * @since 2.7.0
- *
- * @param int $paged The current page number of the plugins list table.
- */
-do_action( "install_plugins_{$tab}", $paged ); ?>
-
-	<span class="spinner"></span>
-</div>
-
-<?php
-wp_print_request_filesystem_credentials_modal();
-wp_print_admin_notice_templates();
-
-/**
- * WordPress Administration Template Footer.
- */
-include(ABSPATH . 'wp-admin/admin-footer.php');
Index: www/wp-includes/autoload/feed/AtomLib.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/feed/AtomLib.php	(revision )
+++ www/wp-includes/autoload/feed/AtomLib.php	(revision )
@@ -0,0 +1,12 @@
+<?php
+/**
+ * Atom Syndication Format PHP Library
+ *
+ * @package AtomLib
+ * @link http://code.google.com/p/phpatomlib/
+ *
+ * @author Elias Torres <elias@torrez.us>
+ * @version 0.4
+ * @since 2.3.0
+ */
+
Index: www/wp-includes/autoload/requests/Exception/HTTP/431.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/431.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/431.php	(revision UNDEFINED)
@@ -1,29 +0,0 @@
-<?php
-/**
- * Exception for 431 Request Header Fields Too Large responses
- *
- * @see https://tools.ietf.org/html/rfc6585
- * @package Requests
- */
-
-/**
- * Exception for 431 Request Header Fields Too Large responses
- *
- * @see https://tools.ietf.org/html/rfc6585
- * @package Requests
- */
-class Requests_Exception_HTTP_431 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 431;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Request Header Fields Too Large';
-}
\ No newline at end of file
Index: www/wp-includes/ID3/module.audio.dts.php
===================================================================
--- www/wp-includes/ID3/module.audio.dts.php	(revision 38565)
+++ www/wp-includes/autoload/id3/getid3_dts.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/includes/class-walker-nav-menu-edit.php
===================================================================
--- www/wp-admin/includes/class-walker-nav-menu-edit.php	(revision 38565)
+++ www/wp-admin/autoload/walker/Walker_Nav_Menu_Edit.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/customize/class-wp-customize-background-image-control.php
===================================================================
--- www/wp-includes/customize/class-wp-customize-background-image-control.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Background_Image_Control.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-term.php
===================================================================
--- www/wp-includes/class-wp-term.php	(revision 38565)
+++ www/wp-includes/autoload/object/WP_Term.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/rest-api.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/rest-api.php	(revision 38565)
+++ www/wp-includes/rest-api.php	(revision 38565)
@@ -1,671 +0,0 @@
-<?php
-/**
- * REST API functions.
- *
- * @package WordPress
- * @subpackage REST_API
- * @since 4.4.0
- */
-
-/**
- * Version number for our API.
- *
- * @var string
- */
-define( 'REST_API_VERSION', '2.0' );
-
-/**
- * Registers a REST API route.
- *
- * @since 4.4.0
- *
- * @global WP_REST_Server $wp_rest_server ResponseHandler instance (usually WP_REST_Server).
- *
- * @param string $namespace The first URL segment after core prefix. Should be unique to your package/plugin.
- * @param string $route     The base URL for route you are adding.
- * @param array  $args      Optional. Either an array of options for the endpoint, or an array of arrays for
- *                          multiple methods. Default empty array.
- * @param bool   $override  Optional. If the route already exists, should we override it? True overrides,
- *                          false merges (with newer overriding if duplicate keys exist). Default false.
- * @return bool True on success, false on error.
- */
-function register_rest_route( $namespace, $route, $args = array(), $override = false ) {
-	/** @var WP_REST_Server $wp_rest_server */
-	global $wp_rest_server;
-
-	if ( empty( $namespace ) ) {
-		/*
-		 * Non-namespaced routes are not allowed, with the exception of the main
-		 * and namespace indexes. If you really need to register a
-		 * non-namespaced route, call `WP_REST_Server::register_route` directly.
-		 */
-		_doing_it_wrong( 'register_rest_route', __( 'Routes must be namespaced with plugin or theme name and version.' ), '4.4.0' );
-		return false;
-	} else if ( empty( $route ) ) {
-		_doing_it_wrong( 'register_rest_route', __( 'Route must be specified.' ), '4.4.0' );
-		return false;
-	}
-
-	if ( isset( $args['callback'] ) ) {
-		// Upgrade a single set to multiple.
-		$args = array( $args );
-	}
-
-	$defaults = array(
-		'methods'         => 'GET',
-		'callback'        => null,
-		'args'            => array(),
-	);
-	foreach ( $args as $key => &$arg_group ) {
-		if ( ! is_numeric( $arg_group ) ) {
-			// Route option, skip here.
-			continue;
-		}
-
-		$arg_group = array_merge( $defaults, $arg_group );
-	}
-
-	$full_route = '/' . trim( $namespace, '/' ) . '/' . trim( $route, '/' );
-	$wp_rest_server->register_route( $namespace, $full_route, $args, $override );
-	return true;
-}
-
-/**
- * Registers rewrite rules for the API.
- *
- * @since 4.4.0
- *
- * @see rest_api_register_rewrites()
- * @global WP $wp Current WordPress environment instance.
- */
-function rest_api_init() {
-	rest_api_register_rewrites();
-
-	global $wp;
-	$wp->add_query_var( 'rest_route' );
-}
-
-/**
- * Adds REST rewrite rules.
- *
- * @since 4.4.0
- *
- * @see add_rewrite_rule()
- */
-function rest_api_register_rewrites() {
-	add_rewrite_rule( '^' . rest_get_url_prefix() . '/?$','index.php?rest_route=/','top' );
-	add_rewrite_rule( '^' . rest_get_url_prefix() . '/(.*)?','index.php?rest_route=/$matches[1]','top' );
-}
-
-/**
- * Registers the default REST API filters.
- *
- * Attached to the {@see 'rest_api_init'} action
- * to make testing and disabling these filters easier.
- *
- * @since 4.4.0
- */
-function rest_api_default_filters() {
-	// Deprecated reporting.
-	add_action( 'deprecated_function_run', 'rest_handle_deprecated_function', 10, 3 );
-	add_filter( 'deprecated_function_trigger_error', '__return_false' );
-	add_action( 'deprecated_argument_run', 'rest_handle_deprecated_argument', 10, 3 );
-	add_filter( 'deprecated_argument_trigger_error', '__return_false' );
-
-	// Default serving.
-	add_filter( 'rest_pre_serve_request', 'rest_send_cors_headers' );
-	add_filter( 'rest_post_dispatch', 'rest_send_allow_header', 10, 3 );
-
-	add_filter( 'rest_pre_dispatch', 'rest_handle_options_request', 10, 3 );
-}
-
-/**
- * Loads the REST API.
- *
- * @since 4.4.0
- *
- * @global WP             $wp             Current WordPress environment instance.
- * @global WP_REST_Server $wp_rest_server ResponseHandler instance (usually WP_REST_Server).
- */
-function rest_api_loaded() {
-	if ( empty( $GLOBALS['wp']->query_vars['rest_route'] ) ) {
-		return;
-	}
-
-	/**
-	 * Whether this is a REST Request.
-	 *
-	 * @since 4.4.0
-	 * @var bool
-	 */
-	define( 'REST_REQUEST', true );
-
-	// Initialize the server.
-	$server = rest_get_server();
-
-	// Fire off the request.
-	$server->serve_request( $GLOBALS['wp']->query_vars['rest_route'] );
-
-	// We're done.
-	die();
-}
-
-/**
- * Retrieves the URL prefix for any API resource.
- *
- * @since 4.4.0
- *
- * @return string Prefix.
- */
-function rest_get_url_prefix() {
-	/**
-	 * Filters the REST URL prefix.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param string $prefix URL prefix. Default 'wp-json'.
-	 */
-	return apply_filters( 'rest_url_prefix', 'wp-json' );
-}
-
-/**
- * Retrieves the URL to a REST endpoint on a site.
- *
- * Note: The returned URL is NOT escaped.
- *
- * @since 4.4.0
- *
- * @todo Check if this is even necessary
- *
- * @param int    $blog_id Optional. Blog ID. Default of null returns URL for current blog.
- * @param string $path    Optional. REST route. Default '/'.
- * @param string $scheme  Optional. Sanitization scheme. Default 'rest'.
- * @return string Full URL to the endpoint.
- */
-function get_rest_url( $blog_id = null, $path = '/', $scheme = 'rest' ) {
-	if ( empty( $path ) ) {
-		$path = '/';
-	}
-
-	if ( is_multisite() && get_blog_option( $blog_id, 'permalink_structure' ) || get_option( 'permalink_structure' ) ) {
-		$url = get_home_url( $blog_id, rest_get_url_prefix(), $scheme );
-		$url .= '/' . ltrim( $path, '/' );
-	} else {
-		$url = trailingslashit( get_home_url( $blog_id, '', $scheme ) );
-
-		$path = '/' . ltrim( $path, '/' );
-
-		$url = add_query_arg( 'rest_route', $path, $url );
-	}
-
-	if ( is_ssl() ) {
-		// If the current host is the same as the REST URL host, force the REST URL scheme to HTTPS.
-		if ( $_SERVER['SERVER_NAME'] === parse_url( get_home_url( $blog_id ), PHP_URL_HOST ) ) {
-			$url = set_url_scheme( $url, 'https' );
-		}
-	}
-
-	/**
-	 * Filters the REST URL.
-	 *
-	 * Use this filter to adjust the url returned by the get_rest_url() function.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param string $url     REST URL.
-	 * @param string $path    REST route.
-	 * @param int    $blog_id Blog ID.
-	 * @param string $scheme  Sanitization scheme.
-	 */
-	return apply_filters( 'rest_url', $url, $path, $blog_id, $scheme );
-}
-
-/**
- * Retrieves the URL to a REST endpoint.
- *
- * Note: The returned URL is NOT escaped.
- *
- * @since 4.4.0
- *
- * @param string $path   Optional. REST route. Default empty.
- * @param string $scheme Optional. Sanitization scheme. Default 'json'.
- * @return string Full URL to the endpoint.
- */
-function rest_url( $path = '', $scheme = 'json' ) {
-	return get_rest_url( null, $path, $scheme );
-}
-
-/**
- * Do a REST request.
- *
- * Used primarily to route internal requests through WP_REST_Server.
- *
- * @since 4.4.0
- *
- * @global WP_REST_Server $wp_rest_server ResponseHandler instance (usually WP_REST_Server).
- *
- * @param WP_REST_Request|string $request Request.
- * @return WP_REST_Response REST response.
- */
-function rest_do_request( $request ) {
-	$request = rest_ensure_request( $request );
-	return rest_get_server()->dispatch( $request );
-}
-
-/**
- * Retrieves the current REST server instance.
- *
- * Instantiates a new instance if none exists already.
- *
- * @since 4.5.0
- *
- * @global WP_REST_Server $wp_rest_server REST server instance.
- *
- * @return WP_REST_Server REST server instance.
- */
-function rest_get_server() {
-	/* @var WP_REST_Server $wp_rest_server */
-	global $wp_rest_server;
-
-	if ( empty( $wp_rest_server ) ) {
-		/**
-		 * Filters the REST Server Class.
-		 *
-		 * This filter allows you to adjust the server class used by the API, using a
-		 * different class to handle requests.
-		 *
-		 * @since 4.4.0
-		 *
-		 * @param string $class_name The name of the server class. Default 'WP_REST_Server'.
-		 */
-		$wp_rest_server_class = apply_filters( 'wp_rest_server_class', 'WP_REST_Server' );
-		$wp_rest_server = new $wp_rest_server_class;
-
-		/**
-		 * Fires when preparing to serve an API request.
-		 *
-		 * Endpoint objects should be created and register their hooks on this action rather
-		 * than another action to ensure they're only loaded when needed.
-		 *
-		 * @since 4.4.0
-		 *
-		 * @param WP_REST_Server $wp_rest_server Server object.
-		 */
-		do_action( 'rest_api_init', $wp_rest_server );
-	}
-
-	return $wp_rest_server;
-}
-
-/**
- * Ensures request arguments are a request object (for consistency).
- *
- * @since 4.4.0
- *
- * @param array|WP_REST_Request $request Request to check.
- * @return WP_REST_Request REST request instance.
- */
-function rest_ensure_request( $request ) {
-	if ( $request instanceof WP_REST_Request ) {
-		return $request;
-	}
-
-	return new WP_REST_Request( 'GET', '', $request );
-}
-
-/**
- * Ensures a REST response is a response object (for consistency).
- *
- * This implements WP_HTTP_Response, allowing usage of `set_status`/`header`/etc
- * without needing to double-check the object. Will also allow WP_Error to indicate error
- * responses, so users should immediately check for this value.
- *
- * @since 4.4.0
- *
- * @param WP_Error|WP_HTTP_Response|mixed $response Response to check.
- * @return mixed WP_Error if response generated an error, WP_HTTP_Response if response
- *               is a already an instance, otherwise returns a new WP_REST_Response instance.
- */
-function rest_ensure_response( $response ) {
-	if ( is_wp_error( $response ) ) {
-		return $response;
-	}
-
-	if ( $response instanceof WP_HTTP_Response ) {
-		return $response;
-	}
-
-	return new WP_REST_Response( $response );
-}
-
-/**
- * Handles _deprecated_function() errors.
- *
- * @since 4.4.0
- *
- * @param string $function    The function that was called.
- * @param string $replacement The function that should have been called.
- * @param string $version     Version.
- */
-function rest_handle_deprecated_function( $function, $replacement, $version ) {
-	if ( ! empty( $replacement ) ) {
-		/* translators: 1: function name, 2: WordPress version number, 3: new function name */
-		$string = sprintf( __( '%1$s (since %2$s; use %3$s instead)' ), $function, $version, $replacement );
-	} else {
-		/* translators: 1: function name, 2: WordPress version number */
-		$string = sprintf( __( '%1$s (since %2$s; no alternative available)' ), $function, $version );
-	}
-
-	header( sprintf( 'X-WP-DeprecatedFunction: %s', $string ) );
-}
-
-/**
- * Handles _deprecated_argument() errors.
- *
- * @since 4.4.0
- *
- * @param string $function    The function that was called.
- * @param string $message     A message regarding the change.
- * @param string $version     Version.
- */
-function rest_handle_deprecated_argument( $function, $message, $version ) {
-	if ( ! empty( $message ) ) {
-		/* translators: 1: function name, 2: WordPress version number, 3: error message */
-		$string = sprintf( __( '%1$s (since %2$s; %3$s)' ), $function, $version, $message );
-	} else {
-		/* translators: 1: function name, 2: WordPress version number */
-		$string = sprintf( __( '%1$s (since %2$s; no alternative available)' ), $function, $version );
-	}
-
-	header( sprintf( 'X-WP-DeprecatedParam: %s', $string ) );
-}
-
-/**
- * Sends Cross-Origin Resource Sharing headers with API requests.
- *
- * @since 4.4.0
- *
- * @param mixed $value Response data.
- * @return mixed Response data.
- */
-function rest_send_cors_headers( $value ) {
-	$origin = get_http_origin();
-
-	if ( $origin ) {
-		header( 'Access-Control-Allow-Origin: ' . esc_url_raw( $origin ) );
-		header( 'Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE' );
-		header( 'Access-Control-Allow-Credentials: true' );
-	}
-
-	return $value;
-}
-
-/**
- * Handles OPTIONS requests for the server.
- *
- * This is handled outside of the server code, as it doesn't obey normal route
- * mapping.
- *
- * @since 4.4.0
- *
- * @param mixed           $response Current response, either response or `null` to indicate pass-through.
- * @param WP_REST_Server  $handler  ResponseHandler instance (usually WP_REST_Server).
- * @param WP_REST_Request $request  The request that was used to make current response.
- * @return WP_REST_Response Modified response, either response or `null` to indicate pass-through.
- */
-function rest_handle_options_request( $response, $handler, $request ) {
-	if ( ! empty( $response ) || $request->get_method() !== 'OPTIONS' ) {
-		return $response;
-	}
-
-	$response = new WP_REST_Response();
-	$data = array();
-
-	foreach ( $handler->get_routes() as $route => $endpoints ) {
-		$match = preg_match( '@^' . $route . '$@i', $request->get_route() );
-
-		if ( ! $match ) {
-			continue;
-		}
-
-		$data = $handler->get_data_for_route( $route, $endpoints, 'help' );
-		$response->set_matched_route( $route );
-		break;
-	}
-
-	$response->set_data( $data );
-	return $response;
-}
-
-/**
- * Sends the "Allow" header to state all methods that can be sent to the current route.
- *
- * @since 4.4.0
- *
- * @param WP_REST_Response $response Current response being served.
- * @param WP_REST_Server   $server   ResponseHandler instance (usually WP_REST_Server).
- * @param WP_REST_Request  $request  The request that was used to make current response.
- * @return WP_REST_Response Response to be served, with "Allow" header if route has allowed methods.
- */
-function rest_send_allow_header( $response, $server, $request ) {
-	$matched_route = $response->get_matched_route();
-
-	if ( ! $matched_route ) {
-		return $response;
-	}
-
-	$routes = $server->get_routes();
-
-	$allowed_methods = array();
-
-	// Get the allowed methods across the routes.
-	foreach ( $routes[ $matched_route ] as $_handler ) {
-		foreach ( $_handler['methods'] as $handler_method => $value ) {
-
-			if ( ! empty( $_handler['permission_callback'] ) ) {
-
-				$permission = call_user_func( $_handler['permission_callback'], $request );
-
-				$allowed_methods[ $handler_method ] = true === $permission;
-			} else {
-				$allowed_methods[ $handler_method ] = true;
-			}
-		}
-	}
-
-	// Strip out all the methods that are not allowed (false values).
-	$allowed_methods = array_filter( $allowed_methods );
-
-	if ( $allowed_methods ) {
-		$response->header( 'Allow', implode( ', ', array_map( 'strtoupper', array_keys( $allowed_methods ) ) ) );
-	}
-
-	return $response;
-}
-
-/**
- * Adds the REST API URL to the WP RSD endpoint.
- *
- * @since 4.4.0
- *
- * @see get_rest_url()
- */
-function rest_output_rsd() {
-	$api_root = get_rest_url();
-
-	if ( empty( $api_root ) ) {
-		return;
-	}
-	?>
-	<api name="WP-API" blogID="1" preferred="false" apiLink="<?php echo esc_url( $api_root ); ?>" />
-	<?php
-}
-
-/**
- * Outputs the REST API link tag into page header.
- *
- * @since 4.4.0
- *
- * @see get_rest_url()
- */
-function rest_output_link_wp_head() {
-	$api_root = get_rest_url();
-
-	if ( empty( $api_root ) ) {
-		return;
-	}
-
-	echo "<link rel='https://api.w.org/' href='" . esc_url( $api_root ) . "' />\n";
-}
-
-/**
- * Sends a Link header for the REST API.
- *
- * @since 4.4.0
- */
-function rest_output_link_header() {
-	if ( headers_sent() ) {
-		return;
-	}
-
-	$api_root = get_rest_url();
-
-	if ( empty( $api_root ) ) {
-		return;
-	}
-
-	header( 'Link: <' . esc_url_raw( $api_root ) . '>; rel="https://api.w.org/"', false );
-}
-
-/**
- * Checks for errors when using cookie-based authentication.
- *
- * WordPress' built-in cookie authentication is always active
- * for logged in users. However, the API has to check nonces
- * for each request to ensure users are not vulnerable to CSRF.
- *
- * @since 4.4.0
- *
- * @global mixed          $wp_rest_auth_cookie
- * @global WP_REST_Server $wp_rest_server      REST server instance.
- *
- * @param WP_Error|mixed $result Error from another authentication handler,
- *                               null if we should handle it, or another value
- *                               if not.
- * @return WP_Error|mixed|bool WP_Error if the cookie is invalid, the $result, otherwise true.
- */
-function rest_cookie_check_errors( $result ) {
-	if ( ! empty( $result ) ) {
-		return $result;
-	}
-
-	global $wp_rest_auth_cookie, $wp_rest_server;
-
-	/*
-	 * Is cookie authentication being used? (If we get an auth
-	 * error, but we're still logged in, another authentication
-	 * must have been used).
-	 */
-	if ( true !== $wp_rest_auth_cookie && is_user_logged_in() ) {
-		return $result;
-	}
-
-	// Determine if there is a nonce.
-	$nonce = null;
-
-	if ( isset( $_REQUEST['_wpnonce'] ) ) {
-		$nonce = $_REQUEST['_wpnonce'];
-	} elseif ( isset( $_SERVER['HTTP_X_WP_NONCE'] ) ) {
-		$nonce = $_SERVER['HTTP_X_WP_NONCE'];
-	}
-
-	if ( null === $nonce ) {
-		// No nonce at all, so act as if it's an unauthenticated request.
-		wp_set_current_user( 0 );
-		return true;
-	}
-
-	// Check the nonce.
-	$result = wp_verify_nonce( $nonce, 'wp_rest' );
-
-	if ( ! $result ) {
-		return new WP_Error( 'rest_cookie_invalid_nonce', __( 'Cookie nonce is invalid' ), array( 'status' => 403 ) );
-	}
-
-	// Send a refreshed nonce in header.
-	$wp_rest_server->send_header( 'X-WP-Nonce', wp_create_nonce( 'wp_rest' ) );
-
-	return true;
-}
-
-/**
- * Collects cookie authentication status.
- *
- * Collects errors from wp_validate_auth_cookie for use by rest_cookie_check_errors.
- *
- * @since 4.4.0
- *
- * @see current_action()
- * @global mixed $wp_rest_auth_cookie
- */
-function rest_cookie_collect_status() {
-	global $wp_rest_auth_cookie;
-
-	$status_type = current_action();
-
-	if ( 'auth_cookie_valid' !== $status_type ) {
-		$wp_rest_auth_cookie = substr( $status_type, 12 );
-		return;
-	}
-
-	$wp_rest_auth_cookie = true;
-}
-
-/**
- * Parses an RFC3339 time into a Unix timestamp.
- *
- * @since 4.4.0
- *
- * @param string $date      RFC3339 timestamp.
- * @param bool   $force_utc Optional. Whether to force UTC timezone instead of using
- *                          the timestamp's timezone. Default false.
- * @return int Unix timestamp.
- */
-function rest_parse_date( $date, $force_utc = false ) {
-	if ( $force_utc ) {
-		$date = preg_replace( '/[+-]\d+:?\d+$/', '+00:00', $date );
-	}
-
-	$regex = '#^\d{4}-\d{2}-\d{2}[Tt ]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}(?::\d{2})?)?$#';
-
-	if ( ! preg_match( $regex, $date, $matches ) ) {
-		return false;
-	}
-
-	return strtotime( $date );
-}
-
-/**
- * Retrieves a local date with its GMT equivalent, in MySQL datetime format.
- *
- * @since 4.4.0
- *
- * @see rest_parse_date()
- *
- * @param string $date      RFC3339 timestamp.
- * @param bool   $force_utc Whether a UTC timestamp should be forced. Default false.
- * @return array|null Local and UTC datetime strings, in MySQL datetime format (Y-m-d H:i:s),
- *                    null on failure.
- */
-function rest_get_date_with_gmt( $date, $force_utc = false ) {
-	$date = rest_parse_date( $date, $force_utc );
-
-	if ( empty( $date ) ) {
-		return null;
-	}
-
-	$utc = date( 'Y-m-d H:i:s', $date );
-	$local = get_date_from_gmt( $utc );
-
-	return array( $local, $utc );
-}
Index: www/wp-includes/autoload/requests/Exception/HTTP/501.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/501.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/501.php	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-<?php
-/**
- * Exception for 501 Not Implemented responses
- *
- * @package Requests
- */
-
-/**
- * Exception for 501 Not Implemented responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_501 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 501;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Not Implemented';
-}
\ No newline at end of file
Index: www/wp-includes/ms-load.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/ms-load.php	(revision 38565)
+++ www/wp-includes/ms-load.php	(revision 38565)
@@ -1,548 +0,0 @@
-<?php
-/**
- * These functions are needed to load Multisite.
- *
- * @since 3.0.0
- *
- * @package WordPress
- * @subpackage Multisite
- */
-
-/**
- * Whether a subdomain configuration is enabled.
- *
- * @since 3.0.0
- *
- * @return bool True if subdomain configuration is enabled, false otherwise.
- */
-function is_subdomain_install() {
-	if ( defined('SUBDOMAIN_INSTALL') )
-		return SUBDOMAIN_INSTALL;
-
-	return ( defined( 'VHOST' ) && VHOST == 'yes' );
-}
-
-/**
- * Returns array of network plugin files to be included in global scope.
- *
- * The default directory is wp-content/plugins. To change the default directory
- * manually, define `WP_PLUGIN_DIR` and `WP_PLUGIN_URL` in `wp-config.php`.
- *
- * @access private
- * @since 3.1.0
- *
- * @return array Files to include.
- */
-function wp_get_active_network_plugins() {
-	$active_plugins = (array) get_site_option( 'active_sitewide_plugins', array() );
-	if ( empty( $active_plugins ) )
-		return array();
-
-	$plugins = array();
-	$active_plugins = array_keys( $active_plugins );
-	sort( $active_plugins );
-
-	foreach ( $active_plugins as $plugin ) {
-		if ( ! validate_file( $plugin ) // $plugin must validate as file
-			&& '.php' == substr( $plugin, -4 ) // $plugin must end with '.php'
-			&& file_exists( WP_PLUGIN_DIR . '/' . $plugin ) // $plugin must exist
-			)
-		$plugins[] = WP_PLUGIN_DIR . '/' . $plugin;
-	}
-	return $plugins;
-}
-
-/**
- * Checks status of current blog.
- *
- * Checks if the blog is deleted, inactive, archived, or spammed.
- *
- * Dies with a default message if the blog does not pass the check.
- *
- * To change the default message when a blog does not pass the check,
- * use the wp-content/blog-deleted.php, blog-inactive.php and
- * blog-suspended.php drop-ins.
- *
- * @since 3.0.0
- *
- * @return true|string Returns true on success, or drop-in file to include.
- */
-function ms_site_check() {
-
-	/**
-	 * Filters checking the status of the current blog.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param bool null Whether to skip the blog status check. Default null.
-	*/
-	$check = apply_filters( 'ms_site_check', null );
-	if ( null !== $check )
-		return true;
-
-	// Allow super admins to see blocked sites
-	if ( is_super_admin() )
-		return true;
-
-	$blog = get_blog_details();
-
-	if ( '1' == $blog->deleted ) {
-		if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) )
-			return WP_CONTENT_DIR . '/blog-deleted.php';
-		else
-			wp_die( __( 'This site is no longer available.' ), '', array( 'response' => 410 ) );
-	}
-
-	if ( '2' == $blog->deleted ) {
-		if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) ) {
-			return WP_CONTENT_DIR . '/blog-inactive.php';
-		} else {
-			$admin_email = str_replace( '@', ' AT ', get_site_option( 'admin_email', 'support@' . get_current_site()->domain ) );
-			wp_die(
-				/* translators: %s: admin email link */
-				sprintf( __( 'This site has not been activated yet. If you are having problems activating your site, please contact %s.' ),
-					sprintf( '<a href="mailto:%s">%s</a>', $admin_email )
-				)
-			);
-		}
-	}
-
-	if ( $blog->archived == '1' || $blog->spam == '1' ) {
-		if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) )
-			return WP_CONTENT_DIR . '/blog-suspended.php';
-		else
-			wp_die( __( 'This site has been archived or suspended.' ), '', array( 'response' => 410 ) );
-	}
-
-	return true;
-}
-
-/**
- * Retrieve the closest matching network for a domain and path.
- *
- * @since 3.9.0
- *
- * @internal In 4.4.0, converted to a wrapper for WP_Network::get_by_path()
- *
- * @param string   $domain   Domain to check.
- * @param string   $path     Path to check.
- * @param int|null $segments Path segments to use. Defaults to null, or the full path.
- * @return WP_Network|false Network object if successful. False when no network is found.
- */
-function get_network_by_path( $domain, $path, $segments = null ) {
-	return WP_Network::get_by_path( $domain, $path, $segments );
-}
-
-/**
- * Retrieve a site object by its domain and path.
- *
- * @since 3.9.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string   $domain   Domain to check.
- * @param string   $path     Path to check.
- * @param int|null $segments Path segments to use. Defaults to null, or the full path.
- * @return object|false Site object if successful. False when no site is found.
- */
-function get_site_by_path( $domain, $path, $segments = null ) {
-	$path_segments = array_filter( explode( '/', trim( $path, '/' ) ) );
-
-	/**
-	 * Filters the number of path segments to consider when searching for a site.
-	 *
-	 * @since 3.9.0
-	 *
-	 * @param int|null $segments The number of path segments to consider. WordPress by default looks at
-	 *                           one path segment following the network path. The function default of
-	 *                           null only makes sense when you know the requested path should match a site.
-	 * @param string   $domain   The requested domain.
-	 * @param string   $path     The requested path, in full.
-	 */
-	$segments = apply_filters( 'site_by_path_segments_count', $segments, $domain, $path );
-
-	if ( null !== $segments && count( $path_segments ) > $segments ) {
-		$path_segments = array_slice( $path_segments, 0, $segments );
-	}
-
-	$paths = array();
-
-	while ( count( $path_segments ) ) {
-		$paths[] = '/' . implode( '/', $path_segments ) . '/';
-		array_pop( $path_segments );
-	}
-
-	$paths[] = '/';
-
-	/**
-	 * Determine a site by its domain and path.
-	 *
-	 * This allows one to short-circuit the default logic, perhaps by
-	 * replacing it with a routine that is more optimal for your setup.
-	 *
-	 * Return null to avoid the short-circuit. Return false if no site
-	 * can be found at the requested domain and path. Otherwise, return
-	 * a site object.
-	 *
-	 * @since 3.9.0
-	 *
-	 * @param null|bool|object $site     Site value to return by path.
-	 * @param string           $domain   The requested domain.
-	 * @param string           $path     The requested path, in full.
-	 * @param int|null         $segments The suggested number of paths to consult.
-	 *                                   Default null, meaning the entire path was to be consulted.
-	 * @param array            $paths    The paths to search for, based on $path and $segments.
-	 */
-	$pre = apply_filters( 'pre_get_site_by_path', null, $domain, $path, $segments, $paths );
-	if ( null !== $pre ) {
-		return $pre;
-	}
-
-	/*
-	 * @todo
-	 * get_blog_details(), caching, etc. Consider alternative optimization routes,
-	 * perhaps as an opt-in for plugins, rather than using the pre_* filter.
-	 * For example: The segments filter can expand or ignore paths.
-	 * If persistent caching is enabled, we could query the DB for a path <> '/'
-	 * then cache whether we can just always ignore paths.
-	 */
-
-	// Either www or non-www is supported, not both. If a www domain is requested,
-	// query for both to provide the proper redirect.
-	$domains = array( $domain );
-	if ( 'www.' === substr( $domain, 0, 4 ) ) {
-		$domains[] = substr( $domain, 4 );
-	}
-
-	$args = array(
-		'domain__in' => $domains,
-		'path__in' => $paths,
-		'number' => 1,
-	);
-
-	if ( count( $domains ) > 1 ) {
-		$args['orderby']['domain_length'] = 'DESC';
-	}
-
-	if ( count( $paths ) > 1 ) {
-		$args['orderby']['path_length'] = 'DESC';
-	}
-
-	$result = get_sites( $args );
-	$site = array_shift( $result );
-
-	if ( $site ) {
-		// @todo get_blog_details()
-		return $site;
-	}
-
-	return false;
-}
-
-/**
- * Identifies the network and site of a requested domain and path and populates the
- * corresponding network and site global objects as part of the multisite bootstrap process.
- *
- * Prior to 4.6.0, this was a procedural block in `ms-settings.php`. It was wrapped into
- * a function to facilitate unit tests. It should not be used outside of core.
- *
- * Usually, it's easier to query the site first, which then declares its network.
- * In limited situations, we either can or must find the network first.
- *
- * If a network and site are found, a `true` response will be returned so that the
- * request can continue.
- *
- * If neither a network or site is found, `false` or a URL string will be returned
- * so that either an error can be shown or a redirect can occur.
- *
- * @since 4.6.0
- * @access private
- *
- * @global wpdb       $wpdb         WordPress database abstraction object.
- * @global WP_Network $current_site The current network.
- * @global WP_Site    $current_blog The current site.
- *
- * @param string $domain    The requested domain.
- * @param string $path      The requested path.
- * @param bool   $subdomain Optional. Whether a subdomain (true) or subdirectory (false) configuration.
- *                          Default false.
- * @return bool|string True if bootstrap successfully populated `$current_blog` and `$current_site`.
- *                     False if bootstrap could not be properly completed.
- *                     Redirect URL if parts exist, but the request as a whole can not be fulfilled.
- */
-function ms_load_current_site_and_network( $domain, $path, $subdomain = false ) {
-	global $wpdb, $current_site, $current_blog;
-
-	// If the network is defined in wp-config.php, we can simply use that.
-	if ( defined( 'DOMAIN_CURRENT_SITE' ) && defined( 'PATH_CURRENT_SITE' ) ) {
-		$current_site = new stdClass;
-		$current_site->id = defined( 'SITE_ID_CURRENT_SITE' ) ? SITE_ID_CURRENT_SITE : 1;
-		$current_site->domain = DOMAIN_CURRENT_SITE;
-		$current_site->path = PATH_CURRENT_SITE;
-		if ( defined( 'BLOG_ID_CURRENT_SITE' ) ) {
-			$current_site->blog_id = BLOG_ID_CURRENT_SITE;
-		} elseif ( defined( 'BLOGID_CURRENT_SITE' ) ) { // deprecated.
-			$current_site->blog_id = BLOGID_CURRENT_SITE;
-		}
-
-		if ( 0 === strcasecmp( $current_site->domain, $domain ) && 0 === strcasecmp( $current_site->path, $path ) ) {
-			$current_blog = get_site_by_path( $domain, $path );
-		} elseif ( '/' !== $current_site->path && 0 === strcasecmp( $current_site->domain, $domain ) && 0 === stripos( $path, $current_site->path ) ) {
-			// If the current network has a path and also matches the domain and path of the request,
-			// we need to look for a site using the first path segment following the network's path.
-			$current_blog = get_site_by_path( $domain, $path, 1 + count( explode( '/', trim( $current_site->path, '/' ) ) ) );
-		} else {
-			// Otherwise, use the first path segment (as usual).
-			$current_blog = get_site_by_path( $domain, $path, 1 );
-		}
-
-	} elseif ( ! $subdomain ) {
-		/*
-		 * A "subdomain" install can be re-interpreted to mean "can support any domain".
-		 * If we're not dealing with one of these installs, then the important part is determining
-		 * the network first, because we need the network's path to identify any sites.
-		 */
-		if ( ! $current_site = wp_cache_get( 'current_network', 'site-options' ) ) {
-			// Are there even two networks installed?
-			$one_network = $wpdb->get_row( "SELECT * FROM $wpdb->site LIMIT 2" ); // [sic]
-			if ( 1 === $wpdb->num_rows ) {
-				$current_site = new WP_Network( $one_network );
-				wp_cache_add( 'current_network', $current_site, 'site-options' );
-			} elseif ( 0 === $wpdb->num_rows ) {
-				// A network not found hook should fire here.
-				return false;
-			}
-		}
-
-		if ( empty( $current_site ) ) {
-			$current_site = WP_Network::get_by_path( $domain, $path, 1 );
-		}
-
-		if ( empty( $current_site ) ) {
-			/**
-			 * Fires when a network cannot be found based on the requested domain and path.
-			 *
-			 * At the time of this action, the only recourse is to redirect somewhere
-			 * and exit. If you want to declare a particular network, do so earlier.
-			 *
-			 * @since 4.4.0
-			 *
-			 * @param string $domain       The domain used to search for a network.
-			 * @param string $path         The path used to search for a path.
-			 */
-			do_action( 'ms_network_not_found', $domain, $path );
-
-			return false;
-		} elseif ( $path === $current_site->path ) {
-			$current_blog = get_site_by_path( $domain, $path );
-		} else {
-			// Search the network path + one more path segment (on top of the network path).
-			$current_blog = get_site_by_path( $domain, $path, substr_count( $current_site->path, '/' ) );
-		}
-	} else {
-		// Find the site by the domain and at most the first path segment.
-		$current_blog = get_site_by_path( $domain, $path, 1 );
-		if ( $current_blog ) {
-			$current_site = WP_Network::get_instance( $current_blog->site_id ? $current_blog->site_id : 1 );
-		} else {
-			// If you don't have a site with the same domain/path as a network, you're pretty screwed, but:
-			$current_site = WP_Network::get_by_path( $domain, $path, 1 );
-		}
-	}
-
-	// The network declared by the site trumps any constants.
-	if ( $current_blog && $current_blog->site_id != $current_site->id ) {
-		$current_site = WP_Network::get_instance( $current_blog->site_id );
-	}
-
-	// No network has been found, bail.
-	if ( empty( $current_site ) ) {
-		/** This action is documented in wp-includes/ms-settings.php */
-		do_action( 'ms_network_not_found', $domain, $path );
-
-		return false;
-	}
-
-	// During activation of a new subdomain, the requested site does not yet exist.
-	if ( empty( $current_blog ) && wp_installing() ) {
-		$current_blog = new stdClass;
-		$current_blog->blog_id = $blog_id = 1;
-		$current_blog->public = 1;
-	}
-
-	// No site has been found, bail.
-	if ( empty( $current_blog ) ) {
-		// We're going to redirect to the network URL, with some possible modifications.
-		$scheme = is_ssl() ? 'https' : 'http';
-		$destination = "$scheme://{$current_site->domain}{$current_site->path}";
-
-		/**
-		 * Fires when a network can be determined but a site cannot.
-		 *
-		 * At the time of this action, the only recourse is to redirect somewhere
-		 * and exit. If you want to declare a particular site, do so earlier.
-		 *
-		 * @since 3.9.0
-		 *
-		 * @param object $current_site The network that had been determined.
-		 * @param string $domain       The domain used to search for a site.
-		 * @param string $path         The path used to search for a site.
-		 */
-		do_action( 'ms_site_not_found', $current_site, $domain, $path );
-
-		if ( $subdomain && ! defined( 'NOBLOGREDIRECT' ) ) {
-			// For a "subdomain" install, redirect to the signup form specifically.
-			$destination .= 'wp-signup.php?new=' . str_replace( '.' . $current_site->domain, '', $domain );
-		} elseif ( $subdomain ) {
-			// For a "subdomain" install, the NOBLOGREDIRECT constant
-			// can be used to avoid a redirect to the signup form.
-			// Using the ms_site_not_found action is preferred to the constant.
-			if ( '%siteurl%' !== NOBLOGREDIRECT ) {
-				$destination = NOBLOGREDIRECT;
-			}
-		} elseif ( 0 === strcasecmp( $current_site->domain, $domain ) ) {
-			/*
-			 * If the domain we were searching for matches the network's domain,
-			 * it's no use redirecting back to ourselves -- it'll cause a loop.
-			 * As we couldn't find a site, we're simply not installed.
-			 */
-			return false;
-		}
-
-		return $destination;
-	}
-
-	// Figure out the current network's main site.
-	if ( empty( $current_site->blog_id ) ) {
-		if ( $current_blog->domain === $current_site->domain && $current_blog->path === $current_site->path ) {
-			$current_site->blog_id = $current_blog->blog_id;
-		} elseif ( ! $current_site->blog_id = wp_cache_get( 'network:' . $current_site->id . ':main_site', 'site-options' ) ) {
-			$current_site->blog_id = $wpdb->get_var( $wpdb->prepare( "SELECT blog_id FROM $wpdb->blogs WHERE domain = %s AND path = %s",
-				$current_site->domain, $current_site->path ) );
-			wp_cache_add( 'network:' . $current_site->id . ':main_site', $current_site->blog_id, 'site-options' );
-		}
-	}
-
-	return true;
-}
-
-/**
- * Displays a failure message.
- *
- * Used when a blog's tables do not exist. Checks for a missing $wpdb->site table as well.
- *
- * @access private
- * @since 3.0.0
- * @since 4.4.0 The `$domain` and `$path` parameters were added.
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $domain The requested domain for the error to reference.
- * @param string $path   The requested path for the error to reference.
- */
-function ms_not_installed( $domain, $path ) {
-	global $wpdb;
-
-	if ( ! is_admin() ) {
-		dead_db();
-	}
-
-	wp_load_translations_early();
-
-	$title = __( 'Error establishing a database connection' );
-
-	$msg  = '<h1>' . $title . '</h1>';
-	$msg .= '<p>' . __( 'If your site does not display, please contact the owner of this network.' ) . '';
-	$msg .= ' ' . __( 'If you are the owner of this network please check that MySQL is running properly and all tables are error free.' ) . '</p>';
-	$query = $wpdb->prepare( "SHOW TABLES LIKE %s", $wpdb->esc_like( $wpdb->site ) );
-	if ( ! $wpdb->get_var( $query ) ) {
-		$msg .= '<p>' . sprintf(
-			/* translators: %s: table name */
-			__( '<strong>Database tables are missing.</strong> This means that MySQL is not running, WordPress was not installed properly, or someone deleted %s. You really should look at your database now.' ),
-			'<code>' . $wpdb->site . '</code>'
-		) . '</p>';
-	} else {
-		$msg .= '<p>' . sprintf(
-			/* translators: 1: site url, 2: table name, 3: database name */
-			__( '<strong>Could not find site %1$s.</strong> Searched for table %2$s in database %3$s. Is that right?' ),
-			'<code>' . rtrim( $domain . $path, '/' ) . '</code>',
-			'<code>' . $wpdb->blogs . '</code>',
-			'<code>' . DB_NAME . '</code>'
-		) . '</p>';
-	}
-	$msg .= '<p><strong>' . __( 'What do I do now?' ) . '</strong> ';
-	/* translators: %s: Codex URL */
-	$msg .= sprintf( __( 'Read the <a href="%s" target="_blank">bug report</a> page. Some of the guidelines there may help you figure out what went wrong.' ),
-		__( 'https://codex.wordpress.org/Debugging_a_WordPress_Network' )
-	);
-	$msg .= ' ' . __( 'If you&#8217;re still stuck with this message, then check that your database contains the following tables:' ) . '</p><ul>';
-	foreach ( $wpdb->tables('global') as $t => $table ) {
-		if ( 'sitecategories' == $t )
-			continue;
-		$msg .= '<li>' . $table . '</li>';
-	}
-	$msg .= '</ul>';
-
-	wp_die( $msg, $title, array( 'response' => 500 ) );
-}
-
-/**
- * This deprecated function formerly set the site_name property of the $current_site object.
- *
- * This function simply returns the object, as before.
- * The bootstrap takes care of setting site_name.
- *
- * @access private
- * @since 3.0.0
- * @deprecated 3.9.0 Use get_current_site() instead.
- *
- * @param object $current_site
- * @return object
- */
-function get_current_site_name( $current_site ) {
-	_deprecated_function( __FUNCTION__, '3.9.0', 'get_current_site()' );
-	return $current_site;
-}
-
-/**
- * This deprecated function managed much of the site and network loading in multisite.
- *
- * The current bootstrap code is now responsible for parsing the site and network load as
- * well as setting the global $current_site object.
- *
- * @access private
- * @since 3.0.0
- * @deprecated 3.9.0
- *
- * @global object $current_site
- *
- * @return object
- */
-function wpmu_current_site() {
-	global $current_site;
-	_deprecated_function( __FUNCTION__, '3.9.0' );
-	return $current_site;
-}
-
-/**
- * Retrieve an object containing information about the requested network.
- *
- * @since 3.9.0
- * @deprecated 4.7.0 Use `get_network()`
- * @see get_network()
- *
- * @internal In 4.6.0, converted to use get_network()
- *
- * @param object|int $network The network's database row or ID.
- * @return WP_Network|false Object containing network information if found, false if not.
- */
-function wp_get_network( $network ) {
-	_deprecated_function( __FUNCTION__, '4.7.0', 'get_network()' );
-
-	$network = get_network( $network );
-	if ( null === $network ) {
-		return false;
-	}
-
-	return $network;
-}
Index: www/wp-includes/autoload/requests/Exception/HTTP/405.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/405.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/405.php	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-<?php
-/**
- * Exception for 405 Method Not Allowed responses
- *
- * @package Requests
- */
-
-/**
- * Exception for 405 Method Not Allowed responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_405 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 405;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Method Not Allowed';
-}
\ No newline at end of file
Index: www/wp-admin/my-sites.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/my-sites.php	(revision 38565)
+++ www/wp-admin/my-sites.php	(revision 38565)
@@ -1,135 +0,0 @@
-<?php
-/**
- * My Sites dashboard.
- *
- * @package WordPress
- * @subpackage Multisite
- * @since 3.0.0
- */
-
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-if ( !is_multisite() )
-	wp_die( __( 'Multisite support is not enabled.' ) );
-
-if ( ! current_user_can('read') )
-	wp_die( __( 'Sorry, you are not allowed to access this page.' ) );
-
-$action = isset( $_POST['action'] ) ? $_POST['action'] : 'splash';
-
-$blogs = get_blogs_of_user( $current_user->ID );
-
-$updated = false;
-if ( 'updateblogsettings' == $action && isset( $_POST['primary_blog'] ) ) {
-	check_admin_referer( 'update-my-sites' );
-
-	$blog = get_blog_details( (int) $_POST['primary_blog'] );
-	if ( $blog && isset( $blog->domain ) ) {
-		update_user_option( $current_user->ID, 'primary_blog', (int) $_POST['primary_blog'], true );
-		$updated = true;
-	} else {
-		wp_die( __( 'The primary site you chose does not exist.' ) );
-	}
-}
-
-$title = __( 'My Sites' );
-$parent_file = 'index.php';
-
-get_current_screen()->add_help_tab( array(
-	'id'      => 'overview',
-	'title'   => __('Overview'),
-	'content' =>
-		'<p>' . __('This screen shows an individual user all of their sites in this network, and also allows that user to set a primary site. They can use the links under each site to visit either the front end or the dashboard for that site.') . '</p>'
-) );
-
-get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Dashboard_My_Sites_Screen" target="_blank">Documentation on My Sites</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
-);
-
-require_once( ABSPATH . 'wp-admin/admin-header.php' );
-
-if ( $updated ) { ?>
-	<div id="message" class="updated notice is-dismissible"><p><strong><?php _e( 'Settings saved.' ); ?></strong></p></div>
-<?php } ?>
-
-<div class="wrap">
-<h1><?php
-echo esc_html( $title );
-
-if ( in_array( get_site_option( 'registration' ), array( 'all', 'blog' ) ) ) {
-	/** This filter is documented in wp-login.php */
-	$sign_up_url = apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) );
-	printf( ' <a href="%s" class="page-title-action">%s</a>', esc_url( $sign_up_url ), esc_html_x( 'Add New', 'site' ) );
-}
-?></h1>
-
-<?php
-if ( empty( $blogs ) ) :
-	echo '<p>';
-	_e( 'You must be a member of at least one site to use this page.' );
-	echo '</p>';
-else :
-?>
-<form id="myblogs" method="post">
-	<?php
-	choose_primary_blog();
-	/**
-	 * Fires before the sites list on the My Sites screen.
-	 *
-	 * @since 3.0.0
-	 */
-	do_action( 'myblogs_allblogs_options' );
-	?>
-	<br clear="all" />
-	<ul class="my-sites striped">
-	<?php
-	/**
-	 * Enable the Global Settings section on the My Sites screen.
-	 *
-	 * By default, the Global Settings section is hidden. Passing a non-empty
-	 * string to this filter will enable the section, and allow new settings
-	 * to be added, either globally or for specific sites.
-	 *
-	 * @since MU
-	 *
-	 * @param string $settings_html The settings HTML markup. Default empty.
-	 * @param object $context       Context of the setting (global or site-specific). Default 'global'.
-	 */
-	$settings_html = apply_filters( 'myblogs_options', '', 'global' );
-	if ( $settings_html != '' ) {
-		echo '<h3>' . __( 'Global Settings' ) . '</h3>';
-		echo $settings_html;
-	}
-	reset( $blogs );
-
-	foreach ( $blogs as $user_blog ) {
-		echo "<li>";
-		echo "<h3>{$user_blog->blogname}</h3>";
-		/**
-		 * Filters the row links displayed for each site on the My Sites screen.
-		 *
-		 * @since MU
-		 *
-		 * @param string $string    The HTML site link markup.
-		 * @param object $user_blog An object containing the site data.
-		 */
-		echo "<p class='my-sites-actions'>" . apply_filters( 'myblogs_blog_actions', "<a href='" . esc_url( get_home_url( $user_blog->userblog_id ) ). "'>" . __( 'Visit' ) . "</a> | <a href='" . esc_url( get_admin_url( $user_blog->userblog_id ) ) . "'>" . __( 'Dashboard' ) . "</a>", $user_blog ) . "</p>";
-		/** This filter is documented in wp-admin/my-sites.php */
-		echo apply_filters( 'myblogs_options', '', $user_blog );
-		echo "</li>";
-	}?>
-	</ul>
-	<?php
-	if ( count( $blogs ) > 1 || has_action( 'myblogs_allblogs_options' ) || has_filter( 'myblogs_options' ) ) {
-		?><input type="hidden" name="action" value="updateblogsettings" /><?php
-		wp_nonce_field( 'update-my-sites' );
-		submit_button();
-	}
-	?>
-	</form>
-<?php endif; ?>
-	</div>
-<?php
-include( ABSPATH . 'wp-admin/admin-footer.php' );
Index: www/wp-includes/SimplePie/gzdecode.php
===================================================================
--- www/wp-includes/SimplePie/gzdecode.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_gzdecode.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/options-media.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/options-media.php	(revision 38565)
+++ www/wp-admin/options-media.php	(revision 38565)
@@ -1,143 +0,0 @@
-<?php
-/**
- * Media settings administration panel.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-if ( ! current_user_can( 'manage_options' ) )
-	wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
-
-$title = __('Media Settings');
-$parent_file = 'options-general.php';
-
-$media_options_help = '<p>' . __('You can set maximum sizes for images inserted into your written content; you can also insert an image as Full Size.') . '</p>';
-
-if ( ! is_multisite() && ( get_option('upload_url_path') || ( get_option('upload_path') != 'wp-content/uploads' && get_option('upload_path') ) ) ) {
-	$media_options_help .= '<p>' . __('Uploading Files allows you to choose the folder and path for storing your uploaded files.') . '</p>';
-}
-
-$media_options_help .= '<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>';
-
-get_current_screen()->add_help_tab( array(
-	'id'      => 'overview',
-	'title'   => __('Overview'),
-	'content' => $media_options_help,
-) );
-
-get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Settings_Media_Screen" target="_blank">Documentation on Media Settings</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
-);
-
-include( ABSPATH . 'wp-admin/admin-header.php' );
-
-?>
-
-<div class="wrap">
-<h1><?php echo esc_html( $title ); ?></h1>
-
-<form action="options.php" method="post">
-<?php settings_fields('media'); ?>
-
-<h2 class="title"><?php _e('Image sizes') ?></h2>
-<p><?php _e( 'The sizes listed below determine the maximum dimensions in pixels to use when adding an image to the Media Library.' ); ?></p>
-
-<table class="form-table">
-<tr>
-<th scope="row"><?php _e('Thumbnail size') ?></th>
-<td>
-<label for="thumbnail_size_w"><?php _e('Width'); ?></label>
-<input name="thumbnail_size_w" type="number" step="1" min="0" id="thumbnail_size_w" value="<?php form_option('thumbnail_size_w'); ?>" class="small-text" />
-<label for="thumbnail_size_h"><?php _e('Height'); ?></label>
-<input name="thumbnail_size_h" type="number" step="1" min="0" id="thumbnail_size_h" value="<?php form_option('thumbnail_size_h'); ?>" class="small-text" /><br />
-<input name="thumbnail_crop" type="checkbox" id="thumbnail_crop" value="1" <?php checked('1', get_option('thumbnail_crop')); ?>/>
-<label for="thumbnail_crop"><?php _e('Crop thumbnail to exact dimensions (normally thumbnails are proportional)'); ?></label>
-</td>
-</tr>
-
-<tr>
-<th scope="row"><?php _e('Medium size') ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Medium size'); ?></span></legend>
-<label for="medium_size_w"><?php _e('Max Width'); ?></label>
-<input name="medium_size_w" type="number" step="1" min="0" id="medium_size_w" value="<?php form_option('medium_size_w'); ?>" class="small-text" />
-<label for="medium_size_h"><?php _e('Max Height'); ?></label>
-<input name="medium_size_h" type="number" step="1" min="0" id="medium_size_h" value="<?php form_option('medium_size_h'); ?>" class="small-text" />
-</fieldset></td>
-</tr>
-
-<tr>
-<th scope="row"><?php _e('Large size') ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Large size'); ?></span></legend>
-<label for="large_size_w"><?php _e('Max Width'); ?></label>
-<input name="large_size_w" type="number" step="1" min="0" id="large_size_w" value="<?php form_option('large_size_w'); ?>" class="small-text" />
-<label for="large_size_h"><?php _e('Max Height'); ?></label>
-<input name="large_size_h" type="number" step="1" min="0" id="large_size_h" value="<?php form_option('large_size_h'); ?>" class="small-text" />
-</fieldset></td>
-</tr>
-
-<?php do_settings_fields('media', 'default'); ?>
-</table>
-
-<?php
-/**
- * @global array $wp_settings
- */
-if ( isset( $GLOBALS['wp_settings']['media']['embeds'] ) ) : ?>
-<h2 class="title"><?php _e('Embeds') ?></h2>
-<table class="form-table">
-<?php do_settings_fields( 'media', 'embeds' ); ?>
-</table>
-<?php endif; ?>
-
-<?php if ( !is_multisite() ) : ?>
-<h2 class="title"><?php _e('Uploading Files'); ?></h2>
-<table class="form-table">
-<?php
-// If upload_url_path is not the default (empty), and upload_path is not the default ('wp-content/uploads' or empty)
-if ( get_option('upload_url_path') || ( get_option('upload_path') != 'wp-content/uploads' && get_option('upload_path') ) ) :
-?>
-<tr>
-<th scope="row"><label for="upload_path"><?php _e('Store uploads in this folder'); ?></label></th>
-<td><input name="upload_path" type="text" id="upload_path" value="<?php echo esc_attr(get_option('upload_path')); ?>" class="regular-text code" />
-<p class="description"><?php
-	/* translators: %s: wp-content/uploads */
-	printf( __( 'Default is %s' ), '<code>wp-content/uploads</code>' );
-?></p>
-</td>
-</tr>
-
-<tr>
-<th scope="row"><label for="upload_url_path"><?php _e('Full URL path to files'); ?></label></th>
-<td><input name="upload_url_path" type="text" id="upload_url_path" value="<?php echo esc_attr( get_option('upload_url_path')); ?>" class="regular-text code" />
-<p class="description"><?php _e('Configuring this is optional. By default, it should be blank.'); ?></p>
-</td>
-</tr>
-<?php endif; ?>
-<tr>
-<th scope="row" colspan="2" class="th-full">
-<label for="uploads_use_yearmonth_folders">
-<input name="uploads_use_yearmonth_folders" type="checkbox" id="uploads_use_yearmonth_folders" value="1"<?php checked('1', get_option('uploads_use_yearmonth_folders')); ?> />
-<?php _e('Organize my uploads into month- and year-based folders'); ?>
-</label>
-</th>
-</tr>
-
-<?php do_settings_fields('media', 'uploads'); ?>
-</table>
-<?php endif; ?>
-
-<?php do_settings_sections('media'); ?>
-
-<?php submit_button(); ?>
-
-</form>
-
-</div>
-
-<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>
Index: www/wp-admin/includes/class-bulk-plugin-upgrader-skin.php
===================================================================
--- www/wp-admin/includes/class-bulk-plugin-upgrader-skin.php	(revision 38565)
+++ www/wp-admin/autoload/upgrader/Bulk_Plugin_Upgrader_Skin.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/includes/class-theme-upgrader-skin.php
===================================================================
--- www/wp-admin/includes/class-theme-upgrader-skin.php	(revision 38565)
+++ www/wp-admin/autoload/upgrader/Theme_Upgrader_Skin.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/SimplePie/Misc.php
===================================================================
--- www/wp-includes/SimplePie/Misc.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_Misc.php	(revision )
@@ -2162,7 +2162,7 @@
 	 */
 	public static function get_build()
 	{
-		$root = dirname(dirname(__FILE__));
+		$root = dirname(__FILE__);
 		if (file_exists($root . '/.git/index'))
 		{
 			return filemtime($root . '/.git/index');
Index: www/wp-admin/includes/class-wp-filesystem-base.php
===================================================================
--- www/wp-admin/includes/class-wp-filesystem-base.php	(revision 38565)
+++ www/wp-admin/autoload/filesystem/WP_Filesystem_Base.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/post-formats.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/post-formats.php	(revision 38565)
+++ www/wp-includes/post-formats.php	(revision 38565)
@@ -1,254 +0,0 @@
-<?php
-/**
- * Post format functions.
- *
- * @package WordPress
- * @subpackage Post
- */
-
-/**
- * Retrieve the format slug for a post
- *
- * @since 3.1.0
- *
- * @param int|object|null $post Post ID or post object. Optional, default is the current post from the loop.
- * @return string|false The format if successful. False otherwise.
- */
-function get_post_format( $post = null ) {
-	if ( ! $post = get_post( $post ) )
-		return false;
-
-	if ( ! post_type_supports( $post->post_type, 'post-formats' ) )
-		return false;
-
-	$_format = get_the_terms( $post->ID, 'post_format' );
-
-	if ( empty( $_format ) )
-		return false;
-
-	$format = reset( $_format );
-
-	return str_replace('post-format-', '', $format->slug );
-}
-
-/**
- * Check if a post has any of the given formats, or any format.
- *
- * @since 3.1.0
- *
- * @param string|array    $format Optional. The format or formats to check.
- * @param object|int|null $post   Optional. The post to check. If not supplied, defaults to the current post if used in the loop.
- * @return bool True if the post has any of the given formats (or any format, if no format specified), false otherwise.
- */
-function has_post_format( $format = array(), $post = null ) {
-	$prefixed = array();
-
-	if ( $format ) {
-		foreach ( (array) $format as $single ) {
-			$prefixed[] = 'post-format-' . sanitize_key( $single );
-		}
-	}
-
-	return has_term( $prefixed, 'post_format', $post );
-}
-
-/**
- * Assign a format to a post
- *
- * @since 3.1.0
- *
- * @param int|object $post   The post for which to assign a format.
- * @param string     $format A format to assign. Use an empty string or array to remove all formats from the post.
- * @return array|WP_Error|false WP_Error on error. Array of affected term IDs on success.
- */
-function set_post_format( $post, $format ) {
-	$post = get_post( $post );
-
-	if ( empty( $post ) )
-		return new WP_Error( 'invalid_post', __( 'Invalid post.' ) );
-
-	if ( ! empty( $format ) ) {
-		$format = sanitize_key( $format );
-		if ( 'standard' === $format || ! in_array( $format, get_post_format_slugs() ) )
-			$format = '';
-		else
-			$format = 'post-format-' . $format;
-	}
-
-	return wp_set_post_terms( $post->ID, $format, 'post_format' );
-}
-
-/**
- * Returns an array of post format slugs to their translated and pretty display versions
- *
- * @since 3.1.0
- *
- * @return array The array of translated post format names.
- */
-function get_post_format_strings() {
-	$strings = array(
-		'standard' => _x( 'Standard', 'Post format' ), // Special case. any value that evals to false will be considered standard
-		'aside'    => _x( 'Aside',    'Post format' ),
-		'chat'     => _x( 'Chat',     'Post format' ),
-		'gallery'  => _x( 'Gallery',  'Post format' ),
-		'link'     => _x( 'Link',     'Post format' ),
-		'image'    => _x( 'Image',    'Post format' ),
-		'quote'    => _x( 'Quote',    'Post format' ),
-		'status'   => _x( 'Status',   'Post format' ),
-		'video'    => _x( 'Video',    'Post format' ),
-		'audio'    => _x( 'Audio',    'Post format' ),
-	);
-	return $strings;
-}
-
-/**
- * Retrieves an array of post format slugs.
- *
- * @since 3.1.0
- *
- * @return array The array of post format slugs.
- */
-function get_post_format_slugs() {
-	$slugs = array_keys( get_post_format_strings() );
-	return array_combine( $slugs, $slugs );
-}
-
-/**
- * Returns a pretty, translated version of a post format slug
- *
- * @since 3.1.0
- *
- * @param string $slug A post format slug.
- * @return string The translated post format name.
- */
-function get_post_format_string( $slug ) {
-	$strings = get_post_format_strings();
-	if ( !$slug )
-		return $strings['standard'];
-	else
-		return ( isset( $strings[$slug] ) ) ? $strings[$slug] : '';
-}
-
-/**
- * Returns a link to a post format index.
- *
- * @since 3.1.0
- *
- * @param string $format The post format slug.
- * @return string|WP_Error|false The post format term link.
- */
-function get_post_format_link( $format ) {
-	$term = get_term_by('slug', 'post-format-' . $format, 'post_format' );
-	if ( ! $term || is_wp_error( $term ) )
-		return false;
-	return get_term_link( $term );
-}
-
-/**
- * Filters the request to allow for the format prefix.
- *
- * @access private
- * @since 3.1.0
- *
- * @param array $qvs
- * @return array
- */
-function _post_format_request( $qvs ) {
-	if ( ! isset( $qvs['post_format'] ) )
-		return $qvs;
-	$slugs = get_post_format_slugs();
-	if ( isset( $slugs[ $qvs['post_format'] ] ) )
-		$qvs['post_format'] = 'post-format-' . $slugs[ $qvs['post_format'] ];
-	$tax = get_taxonomy( 'post_format' );
-	if ( ! is_admin() )
-		$qvs['post_type'] = $tax->object_type;
-	return $qvs;
-}
-
-/**
- * Filters the post format term link to remove the format prefix.
- *
- * @access private
- * @since 3.1.0
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param string $link
- * @param object $term
- * @param string $taxonomy
- * @return string
- */
-function _post_format_link( $link, $term, $taxonomy ) {
-	global $wp_rewrite;
-	if ( 'post_format' != $taxonomy ) {
-		return $link;
-	}
-	if ( $wp_rewrite->get_extra_permastruct( $taxonomy ) ) {
-		return str_replace( "/{$term->slug}", '/' . str_replace( 'post-format-', '', $term->slug ), $link );
-	} else {
-		$link = remove_query_arg( 'post_format', $link );
-		return add_query_arg( 'post_format', str_replace( 'post-format-', '', $term->slug ), $link );
-	}
-}
-
-/**
- * Remove the post format prefix from the name property of the term object created by get_term().
- *
- * @access private
- * @since 3.1.0
- *
- * @param object $term
- * @return object
- */
-function _post_format_get_term( $term ) {
-	if ( isset( $term->slug ) ) {
-		$term->name = get_post_format_string( str_replace( 'post-format-', '', $term->slug ) );
-	}
-	return $term;
-}
-
-/**
- * Remove the post format prefix from the name property of the term objects created by get_terms().
- *
- * @access private
- * @since 3.1.0
- *
- * @param array        $terms
- * @param string|array $taxonomies
- * @param array        $args
- * @return array
- */
-function _post_format_get_terms( $terms, $taxonomies, $args ) {
-	if ( in_array( 'post_format', (array) $taxonomies ) ) {
-		if ( isset( $args['fields'] ) && 'names' == $args['fields'] ) {
-			foreach ( $terms as $order => $name ) {
-				$terms[$order] = get_post_format_string( str_replace( 'post-format-', '', $name ) );
-			}
-		} else {
-			foreach ( (array) $terms as $order => $term ) {
-				if ( isset( $term->taxonomy ) && 'post_format' == $term->taxonomy ) {
-					$terms[$order]->name = get_post_format_string( str_replace( 'post-format-', '', $term->slug ) );
-				}
-			}
-		}
-	}
-	return $terms;
-}
-
-/**
- * Remove the post format prefix from the name property of the term objects created by wp_get_object_terms().
- *
- * @access private
- * @since 3.1.0
- *
- * @param array $terms
- * @return array
- */
-function _post_format_wp_get_object_terms( $terms ) {
-	foreach ( (array) $terms as $order => $term ) {
-		if ( isset( $term->taxonomy ) && 'post_format' == $term->taxonomy ) {
-			$terms[$order]->name = get_post_format_string( str_replace( 'post-format-', '', $term->slug ) );
-		}
-	}
-	return $terms;
-}
Index: www/wp-includes/autoload/customize/class-wp-customize-partial.php
===================================================================
--- www/wp-includes/autoload/customize/class-wp-customize-partial.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/customize/class-wp-customize-partial.php	(revision UNDEFINED)
@@ -1,328 +0,0 @@
-<?php
-/**
- * Customize API: WP_Customize_Partial class
- *
- * @package WordPress
- * @subpackage Customize
- * @since 4.5.0
- */
-
-/**
- * Core Customizer class for implementing selective refresh partials.
- *
- * Representation of a rendered region in the previewed page that gets
- * selectively refreshed when an associated setting is changed.
- * This class is analogous of WP_Customize_Control.
- *
- * @since 4.5.0
- */
-class WP_Customize_Partial {
-
-	/**
-	 * Component.
-	 *
-	 * @since 4.5.0
-	 * @access public
-	 * @var WP_Customize_Selective_Refresh
-	 */
-	public $component;
-
-	/**
-	 * Unique identifier for the partial.
-	 *
-	 * If the partial is used to display a single setting, this would generally
-	 * be the same as the associated setting's ID.
-	 *
-	 * @since 4.5.0
-	 * @access public
-	 * @var string
-	 */
-	public $id;
-
-	/**
-	 * Parsed ID.
-	 *
-	 * @since 4.5.0
-	 * @access private
-	 * @var array {
-	 *     @type string $base ID base.
-	 *     @type array  $keys Keys for multidimensional.
-	 * }
-	 */
-	protected $id_data = array();
-
-	/**
-	 * Type of this partial.
-	 *
-	 * @since 4.5.0
-	 * @access public
-	 * @var string
-	 */
-	public $type = 'default';
-
-	/**
-	 * The jQuery selector to find the container element for the partial.
-	 *
-	 * @since 4.5.0
-	 * @access public
-	 * @var string
-	 */
-	public $selector;
-
-	/**
-	 * IDs for settings tied to the partial.
-	 *
-	 * @access public
-	 * @since 4.5.0
-	 * @var array
-	 */
-	public $settings;
-
-	/**
-	 * The ID for the setting that this partial is primarily responsible for rendering.
-	 *
-	 * If not supplied, it will default to the ID of the first setting.
-	 *
-	 * @since 4.5.0
-	 * @access public
-	 * @var string
-	 */
-	public $primary_setting;
-
-	/**
-	 * Capability required to edit this partial.
-	 *
-	 * Normally this is empty and the capability is derived from the capabilities
-	 * of the associated `$settings`.
-	 *
-	 * @since 4.5.0
-	 * @access public
-	 * @var string
-	 */
-	public $capability;
-
-	/**
-	 * Render callback.
-	 *
-	 * @since 4.5.0
-	 * @access public
-	 * @see WP_Customize_Partial::render()
-	 * @var callable Callback is called with one argument, the instance of
-	 *                 WP_Customize_Partial. The callback can either echo the
-	 *                 partial or return the partial as a string, or return false if error.
-	 */
-	public $render_callback;
-
-	/**
-	 * Whether the container element is included in the partial, or if only the contents are rendered.
-	 *
-	 * @since 4.5.0
-	 * @access public
-	 * @var bool
-	 */
-	public $container_inclusive = false;
-
-	/**
-	 * Whether to refresh the entire preview in case a partial cannot be refreshed.
-	 *
-	 * A partial render is considered a failure if the render_callback returns false.
-	 *
-	 * @since 4.5.0
-	 * @access public
-	 * @var bool
-	 */
-	public $fallback_refresh = true;
-
-	/**
-	 * Constructor.
-	 *
-	 * Supplied `$args` override class property defaults.
-	 *
-	 * If `$args['settings']` is not defined, use the $id as the setting ID.
-	 *
-	 * @since 4.5.0
-	 * @access public
-	 *
-	 * @param WP_Customize_Selective_Refresh $component Customize Partial Refresh plugin instance.
-	 * @param string                         $id        Control ID.
-	 * @param array                          $args      {
-	 *     Optional. Arguments to override class property defaults.
-	 *
-	 *     @type array|string $settings All settings IDs tied to the partial. If undefined, `$id` will be used.
-	 * }
-	 */
-	public function __construct( WP_Customize_Selective_Refresh $component, $id, $args = array() ) {
-		$keys = array_keys( get_object_vars( $this ) );
-		foreach ( $keys as $key ) {
-			if ( isset( $args[ $key ] ) ) {
-				$this->$key = $args[ $key ];
-			}
-		}
-
-		$this->component       = $component;
-		$this->id              = $id;
-		$this->id_data['keys'] = preg_split( '/\[/', str_replace( ']', '', $this->id ) );
-		$this->id_data['base'] = array_shift( $this->id_data['keys'] );
-
-		if ( empty( $this->render_callback ) ) {
-			$this->render_callback = array( $this, 'render_callback' );
-		}
-
-		// Process settings.
-		if ( ! isset( $this->settings ) ) {
-			$this->settings = array( $id );
-		} else if ( is_string( $this->settings ) ) {
-			$this->settings = array( $this->settings );
-		}
-
-		if ( empty( $this->primary_setting ) ) {
-			$this->primary_setting = current( $this->settings );
-		}
-	}
-
-	/**
-	 * Retrieves parsed ID data for multidimensional setting.
-	 *
-	 * @since 4.5.0
-	 * @access public
-	 *
-	 * @return array {
-	 *     ID data for multidimensional partial.
-	 *
-	 *     @type string $base ID base.
-	 *     @type array  $keys Keys for multidimensional array.
-	 * }
-	 */
-	final public function id_data() {
-		return $this->id_data;
-	}
-
-	/**
-	 * Renders the template partial involving the associated settings.
-	 *
-	 * @since 4.5.0
-	 * @access public
-	 *
-	 * @param array $container_context Optional. Array of context data associated with the target container (placement).
-	 *                                 Default empty array.
-	 * @return string|array|false The rendered partial as a string, raw data array (for client-side JS template),
-	 *                            or false if no render applied.
-	 */
-	final public function render( $container_context = array() ) {
-		$partial  = $this;
-		$rendered = false;
-
-		if ( ! empty( $this->render_callback ) ) {
-			ob_start();
-			$return_render = call_user_func( $this->render_callback, $this, $container_context );
-			$ob_render = ob_get_clean();
-
-			if ( null !== $return_render && '' !== $ob_render ) {
-				_doing_it_wrong( __FUNCTION__, __( 'Partial render must echo the content or return the content string (or array), but not both.' ), '4.5.0' );
-			}
-
-			/*
-			 * Note that the string return takes precedence because the $ob_render may just\
-			 * include PHP warnings or notices.
-			 */
-			$rendered = null !== $return_render ? $return_render : $ob_render;
-		}
-
-		/**
-		 * Filters partial rendering.
-		 *
-		 * @since 4.5.0
-		 *
-		 * @param string|array|false   $rendered          The partial value. Default false.
-		 * @param WP_Customize_Partial $partial           WP_Customize_Setting instance.
-		 * @param array                $container_context Optional array of context data associated with
-		 *                                                the target container.
-		 */
-		$rendered = apply_filters( 'customize_partial_render', $rendered, $partial, $container_context );
-
-		/**
-		 * Filters partial rendering for a specific partial.
-		 *
-		 * The dynamic portion of the hook name, `$partial->ID` refers to the partial ID.
-		 *
-		 * @since 4.5.0
-		 *
-		 * @param string|array|false   $rendered          The partial value. Default false.
-		 * @param WP_Customize_Partial $partial           WP_Customize_Setting instance.
-		 * @param array                $container_context Optional array of context data associated with
-		 *                                                the target container.
-		 */
-		$rendered = apply_filters( "customize_partial_render_{$partial->id}", $rendered, $partial, $container_context );
-
-		return $rendered;
-	}
-
-	/**
-	 * Default callback used when invoking WP_Customize_Control::render().
-	 *
-	 * Note that this method may echo the partial *or* return the partial as
-	 * a string or array, but not both. Output buffering is performed when this
-	 * is called. Subclasses can override this with their specific logic, or they
-	 * may provide an 'render_callback' argument to the constructor.
-	 *
-	 * This method may return an HTML string for straight DOM injection, or it
-	 * may return an array for supporting Partial JS subclasses to render by
-	 * applying to client-side templating.
-	 *
-	 * @since 4.5.0
-	 * @access public
-	 *
-	 * @param WP_Customize_Partial $partial Partial.
-	 * @param array                $context Context.
-	 * @return string|array|false
-	 */
-	public function render_callback( WP_Customize_Partial $partial, $context = array() ) {
-		unset( $partial, $context );
-		return false;
-	}
-
-	/**
-	 * Retrieves the data to export to the client via JSON.
-	 *
-	 * @since 4.5.0
-	 * @access public
-	 *
-	 * @return array Array of parameters passed to the JavaScript.
-	 */
-	public function json() {
-		$exports = array(
-			'settings'           => $this->settings,
-			'primarySetting'     => $this->primary_setting,
-			'selector'           => $this->selector,
-			'type'               => $this->type,
-			'fallbackRefresh'    => $this->fallback_refresh,
-			'containerInclusive' => $this->container_inclusive,
-		);
-		return $exports;
-	}
-
-	/**
-	 * Checks if the user can refresh this partial.
-	 *
-	 * Returns false if the user cannot manipulate one of the associated settings,
-	 * or if one of the associated settings does not exist.
-	 *
-	 * @since 4.5.0
-	 * @access public
-	 *
-	 * @return bool False if user can't edit one one of the related settings,
-	 *                    or if one of the associated settings does not exist.
-	 */
-	final public function check_capabilities() {
-		if ( ! empty( $this->capability ) && ! current_user_can( $this->capability ) ) {
-			return false;
-		}
-		foreach ( $this->settings as $setting_id ) {
-			$setting = $this->component->manager->get_setting( $setting_id );
-			if ( ! $setting || ! $setting->check_capabilities() ) {
-				return false;
-			}
-		}
-		return true;
-	}
-}
Index: www/wp-includes/autoload/id3/ID3/module.tag.apetag.php
===================================================================
--- www/wp-includes/autoload/id3/ID3/module.tag.apetag.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/id3/ID3/module.tag.apetag.php	(revision UNDEFINED)
@@ -1,412 +0,0 @@
-<?php
-/////////////////////////////////////////////////////////////////
-/// getID3() by James Heinrich <info@getid3.org>               //
-//  available at http://getid3.sourceforge.net                 //
-//            or http://www.getid3.org                         //
-//          also https://github.com/JamesHeinrich/getID3       //
-/////////////////////////////////////////////////////////////////
-// See readme.txt for more details                             //
-/////////////////////////////////////////////////////////////////
-//                                                             //
-// module.tag.apetag.php                                       //
-// module for analyzing APE tags                               //
-// dependencies: NONE                                          //
-//                                                            ///
-/////////////////////////////////////////////////////////////////
-
-class getid3_apetag extends getid3_handler
-{
-	public $inline_attachments = true; // true: return full data for all attachments; false: return no data for all attachments; integer: return data for attachments <= than this; string: save as file to this directory
-	public $overrideendoffset  = 0;
-
-	public function Analyze() {
-		$info = &$this->getid3->info;
-
-		if (!getid3_lib::intValueSupported($info['filesize'])) {
-			$info['warning'][] = 'Unable to check for APEtags because file is larger than '.round(PHP_INT_MAX / 1073741824).'GB';
-			return false;
-		}
-
-		$id3v1tagsize     = 128;
-		$apetagheadersize = 32;
-		$lyrics3tagsize   = 10;
-
-		if ($this->overrideendoffset == 0) {
-
-			$this->fseek(0 - $id3v1tagsize - $apetagheadersize - $lyrics3tagsize, SEEK_END);
-			$APEfooterID3v1 = $this->fread($id3v1tagsize + $apetagheadersize + $lyrics3tagsize);
-
-			//if (preg_match('/APETAGEX.{24}TAG.{125}$/i', $APEfooterID3v1)) {
-			if (substr($APEfooterID3v1, strlen($APEfooterID3v1) - $id3v1tagsize - $apetagheadersize, 8) == 'APETAGEX') {
-
-				// APE tag found before ID3v1
-				$info['ape']['tag_offset_end'] = $info['filesize'] - $id3v1tagsize;
-
-			//} elseif (preg_match('/APETAGEX.{24}$/i', $APEfooterID3v1)) {
-			} elseif (substr($APEfooterID3v1, strlen($APEfooterID3v1) - $apetagheadersize, 8) == 'APETAGEX') {
-
-				// APE tag found, no ID3v1
-				$info['ape']['tag_offset_end'] = $info['filesize'];
-
-			}
-
-		} else {
-
-			$this->fseek($this->overrideendoffset - $apetagheadersize);
-			if ($this->fread(8) == 'APETAGEX') {
-				$info['ape']['tag_offset_end'] = $this->overrideendoffset;
-			}
-
-		}
-		if (!isset($info['ape']['tag_offset_end'])) {
-
-			// APE tag not found
-			unset($info['ape']);
-			return false;
-
-		}
-
-		// shortcut
-		$thisfile_ape = &$info['ape'];
-
-		$this->fseek($thisfile_ape['tag_offset_end'] - $apetagheadersize);
-		$APEfooterData = $this->fread(32);
-		if (!($thisfile_ape['footer'] = $this->parseAPEheaderFooter($APEfooterData))) {
-			$info['error'][] = 'Error parsing APE footer at offset '.$thisfile_ape['tag_offset_end'];
-			return false;
-		}
-
-		if (isset($thisfile_ape['footer']['flags']['header']) && $thisfile_ape['footer']['flags']['header']) {
-			$this->fseek($thisfile_ape['tag_offset_end'] - $thisfile_ape['footer']['raw']['tagsize'] - $apetagheadersize);
-			$thisfile_ape['tag_offset_start'] = $this->ftell();
-			$APEtagData = $this->fread($thisfile_ape['footer']['raw']['tagsize'] + $apetagheadersize);
-		} else {
-			$thisfile_ape['tag_offset_start'] = $thisfile_ape['tag_offset_end'] - $thisfile_ape['footer']['raw']['tagsize'];
-			$this->fseek($thisfile_ape['tag_offset_start']);
-			$APEtagData = $this->fread($thisfile_ape['footer']['raw']['tagsize']);
-		}
-		$info['avdataend'] = $thisfile_ape['tag_offset_start'];
-
-		if (isset($info['id3v1']['tag_offset_start']) && ($info['id3v1']['tag_offset_start'] < $thisfile_ape['tag_offset_end'])) {
-			$info['warning'][] = 'ID3v1 tag information ignored since it appears to be a false synch in APEtag data';
-			unset($info['id3v1']);
-			foreach ($info['warning'] as $key => $value) {
-				if ($value == 'Some ID3v1 fields do not use NULL characters for padding') {
-					unset($info['warning'][$key]);
-					sort($info['warning']);
-					break;
-				}
-			}
-		}
-
-		$offset = 0;
-		if (isset($thisfile_ape['footer']['flags']['header']) && $thisfile_ape['footer']['flags']['header']) {
-			if ($thisfile_ape['header'] = $this->parseAPEheaderFooter(substr($APEtagData, 0, $apetagheadersize))) {
-				$offset += $apetagheadersize;
-			} else {
-				$info['error'][] = 'Error parsing APE header at offset '.$thisfile_ape['tag_offset_start'];
-				return false;
-			}
-		}
-
-		// shortcut
-		$info['replay_gain'] = array();
-		$thisfile_replaygain = &$info['replay_gain'];
-
-		for ($i = 0; $i < $thisfile_ape['footer']['raw']['tag_items']; $i++) {
-			$value_size = getid3_lib::LittleEndian2Int(substr($APEtagData, $offset, 4));
-			$offset += 4;
-			$item_flags = getid3_lib::LittleEndian2Int(substr($APEtagData, $offset, 4));
-			$offset += 4;
-			if (strstr(substr($APEtagData, $offset), "\x00") === false) {
-				$info['error'][] = 'Cannot find null-byte (0x00) seperator between ItemKey #'.$i.' and value. ItemKey starts '.$offset.' bytes into the APE tag, at file offset '.($thisfile_ape['tag_offset_start'] + $offset);
-				return false;
-			}
-			$ItemKeyLength = strpos($APEtagData, "\x00", $offset) - $offset;
-			$item_key      = strtolower(substr($APEtagData, $offset, $ItemKeyLength));
-
-			// shortcut
-			$thisfile_ape['items'][$item_key] = array();
-			$thisfile_ape_items_current = &$thisfile_ape['items'][$item_key];
-
-			$thisfile_ape_items_current['offset'] = $thisfile_ape['tag_offset_start'] + $offset;
-
-			$offset += ($ItemKeyLength + 1); // skip 0x00 terminator
-			$thisfile_ape_items_current['data'] = substr($APEtagData, $offset, $value_size);
-			$offset += $value_size;
-
-			$thisfile_ape_items_current['flags'] = $this->parseAPEtagFlags($item_flags);
-			switch ($thisfile_ape_items_current['flags']['item_contents_raw']) {
-				case 0: // UTF-8
-				case 2: // Locator (URL, filename, etc), UTF-8 encoded
-					$thisfile_ape_items_current['data'] = explode("\x00", $thisfile_ape_items_current['data']);
-					break;
-
-				case 1:  // binary data
-				default:
-					break;
-			}
-
-			switch (strtolower($item_key)) {
-				// http://wiki.hydrogenaud.io/index.php?title=ReplayGain#MP3Gain
-				case 'replaygain_track_gain':
-					if (preg_match('#^[\\-\\+][0-9\\.,]{8}$#', $thisfile_ape_items_current['data'][0])) {
-						$thisfile_replaygain['track']['adjustment'] = (float) str_replace(',', '.', $thisfile_ape_items_current['data'][0]); // float casting will see "0,95" as zero!
-						$thisfile_replaygain['track']['originator'] = 'unspecified';
-					} else {
-						$info['warning'][] = 'MP3gainTrackGain value in APEtag appears invalid: "'.$thisfile_ape_items_current['data'][0].'"';
-					}
-					break;
-
-				case 'replaygain_track_peak':
-					if (preg_match('#^[0-9\\.,]{8}$#', $thisfile_ape_items_current['data'][0])) {
-						$thisfile_replaygain['track']['peak']       = (float) str_replace(',', '.', $thisfile_ape_items_current['data'][0]); // float casting will see "0,95" as zero!
-						$thisfile_replaygain['track']['originator'] = 'unspecified';
-						if ($thisfile_replaygain['track']['peak'] <= 0) {
-							$info['warning'][] = 'ReplayGain Track peak from APEtag appears invalid: '.$thisfile_replaygain['track']['peak'].' (original value = "'.$thisfile_ape_items_current['data'][0].'")';
-						}
-					} else {
-						$info['warning'][] = 'MP3gainTrackPeak value in APEtag appears invalid: "'.$thisfile_ape_items_current['data'][0].'"';
-					}
-					break;
-
-				case 'replaygain_album_gain':
-					if (preg_match('#^[\\-\\+][0-9\\.,]{8}$#', $thisfile_ape_items_current['data'][0])) {
-						$thisfile_replaygain['album']['adjustment'] = (float) str_replace(',', '.', $thisfile_ape_items_current['data'][0]); // float casting will see "0,95" as zero!
-						$thisfile_replaygain['album']['originator'] = 'unspecified';
-					} else {
-						$info['warning'][] = 'MP3gainAlbumGain value in APEtag appears invalid: "'.$thisfile_ape_items_current['data'][0].'"';
-					}
-					break;
-
-				case 'replaygain_album_peak':
-					if (preg_match('#^[0-9\\.,]{8}$#', $thisfile_ape_items_current['data'][0])) {
-						$thisfile_replaygain['album']['peak']       = (float) str_replace(',', '.', $thisfile_ape_items_current['data'][0]); // float casting will see "0,95" as zero!
-						$thisfile_replaygain['album']['originator'] = 'unspecified';
-						if ($thisfile_replaygain['album']['peak'] <= 0) {
-							$info['warning'][] = 'ReplayGain Album peak from APEtag appears invalid: '.$thisfile_replaygain['album']['peak'].' (original value = "'.$thisfile_ape_items_current['data'][0].'")';
-						}
-					} else {
-						$info['warning'][] = 'MP3gainAlbumPeak value in APEtag appears invalid: "'.$thisfile_ape_items_current['data'][0].'"';
-					}
-					break;
-
-				case 'mp3gain_undo':
-					if (preg_match('#^[\\-\\+][0-9]{3},[\\-\\+][0-9]{3},[NW]$#', $thisfile_ape_items_current['data'][0])) {
-						list($mp3gain_undo_left, $mp3gain_undo_right, $mp3gain_undo_wrap) = explode(',', $thisfile_ape_items_current['data'][0]);
-						$thisfile_replaygain['mp3gain']['undo_left']  = intval($mp3gain_undo_left);
-						$thisfile_replaygain['mp3gain']['undo_right'] = intval($mp3gain_undo_right);
-						$thisfile_replaygain['mp3gain']['undo_wrap']  = (($mp3gain_undo_wrap == 'Y') ? true : false);
-					} else {
-						$info['warning'][] = 'MP3gainUndo value in APEtag appears invalid: "'.$thisfile_ape_items_current['data'][0].'"';
-					}
-					break;
-
-				case 'mp3gain_minmax':
-					if (preg_match('#^[0-9]{3},[0-9]{3}$#', $thisfile_ape_items_current['data'][0])) {
-						list($mp3gain_globalgain_min, $mp3gain_globalgain_max) = explode(',', $thisfile_ape_items_current['data'][0]);
-						$thisfile_replaygain['mp3gain']['globalgain_track_min'] = intval($mp3gain_globalgain_min);
-						$thisfile_replaygain['mp3gain']['globalgain_track_max'] = intval($mp3gain_globalgain_max);
-					} else {
-						$info['warning'][] = 'MP3gainMinMax value in APEtag appears invalid: "'.$thisfile_ape_items_current['data'][0].'"';
-					}
-					break;
-
-				case 'mp3gain_album_minmax':
-					if (preg_match('#^[0-9]{3},[0-9]{3}$#', $thisfile_ape_items_current['data'][0])) {
-						list($mp3gain_globalgain_album_min, $mp3gain_globalgain_album_max) = explode(',', $thisfile_ape_items_current['data'][0]);
-						$thisfile_replaygain['mp3gain']['globalgain_album_min'] = intval($mp3gain_globalgain_album_min);
-						$thisfile_replaygain['mp3gain']['globalgain_album_max'] = intval($mp3gain_globalgain_album_max);
-					} else {
-						$info['warning'][] = 'MP3gainAlbumMinMax value in APEtag appears invalid: "'.$thisfile_ape_items_current['data'][0].'"';
-					}
-					break;
-
-				case 'tracknumber':
-					if (is_array($thisfile_ape_items_current['data'])) {
-						foreach ($thisfile_ape_items_current['data'] as $comment) {
-							$thisfile_ape['comments']['track'][] = $comment;
-						}
-					}
-					break;
-
-				case 'cover art (artist)':
-				case 'cover art (back)':
-				case 'cover art (band logo)':
-				case 'cover art (band)':
-				case 'cover art (colored fish)':
-				case 'cover art (composer)':
-				case 'cover art (conductor)':
-				case 'cover art (front)':
-				case 'cover art (icon)':
-				case 'cover art (illustration)':
-				case 'cover art (lead)':
-				case 'cover art (leaflet)':
-				case 'cover art (lyricist)':
-				case 'cover art (media)':
-				case 'cover art (movie scene)':
-				case 'cover art (other icon)':
-				case 'cover art (other)':
-				case 'cover art (performance)':
-				case 'cover art (publisher logo)':
-				case 'cover art (recording)':
-				case 'cover art (studio)':
-					// list of possible cover arts from http://taglib-sharp.sourcearchive.com/documentation/2.0.3.0-2/Ape_2Tag_8cs-source.html
-					if (is_array($thisfile_ape_items_current['data'])) {
-						$info['warning'][] = 'APEtag "'.$item_key.'" should be flagged as Binary data, but was incorrectly flagged as UTF-8';
-						$thisfile_ape_items_current['data'] = implode("\x00", $thisfile_ape_items_current['data']);
-					}
-					list($thisfile_ape_items_current['filename'], $thisfile_ape_items_current['data']) = explode("\x00", $thisfile_ape_items_current['data'], 2);
-					$thisfile_ape_items_current['data_offset'] = $thisfile_ape_items_current['offset'] + strlen($thisfile_ape_items_current['filename']."\x00");
-					$thisfile_ape_items_current['data_length'] = strlen($thisfile_ape_items_current['data']);
-
-					$thisfile_ape_items_current['image_mime'] = '';
-					$imageinfo = array();
-					$imagechunkcheck = getid3_lib::GetDataImageSize($thisfile_ape_items_current['data'], $imageinfo);
-					$thisfile_ape_items_current['image_mime'] = image_type_to_mime_type($imagechunkcheck[2]);
-
-					do {
-						if ($this->inline_attachments === false) {
-							// skip entirely
-							unset($thisfile_ape_items_current['data']);
-							break;
-						}
-						if ($this->inline_attachments === true) {
-							// great
-						} elseif (is_int($this->inline_attachments)) {
-							if ($this->inline_attachments < $thisfile_ape_items_current['data_length']) {
-								// too big, skip
-								$info['warning'][] = 'attachment at '.$thisfile_ape_items_current['offset'].' is too large to process inline ('.number_format($thisfile_ape_items_current['data_length']).' bytes)';
-								unset($thisfile_ape_items_current['data']);
-								break;
-							}
-						} elseif (is_string($this->inline_attachments)) {
-							$this->inline_attachments = rtrim(str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $this->inline_attachments), DIRECTORY_SEPARATOR);
-							if (!is_dir($this->inline_attachments) || !is_writable($this->inline_attachments)) {
-								// cannot write, skip
-								$info['warning'][] = 'attachment at '.$thisfile_ape_items_current['offset'].' cannot be saved to "'.$this->inline_attachments.'" (not writable)';
-								unset($thisfile_ape_items_current['data']);
-								break;
-							}
-						}
-						// if we get this far, must be OK
-						if (is_string($this->inline_attachments)) {
-							$destination_filename = $this->inline_attachments.DIRECTORY_SEPARATOR.md5($info['filenamepath']).'_'.$thisfile_ape_items_current['data_offset'];
-							if (!file_exists($destination_filename) || is_writable($destination_filename)) {
-								file_put_contents($destination_filename, $thisfile_ape_items_current['data']);
-							} else {
-								$info['warning'][] = 'attachment at '.$thisfile_ape_items_current['offset'].' cannot be saved to "'.$destination_filename.'" (not writable)';
-							}
-							$thisfile_ape_items_current['data_filename'] = $destination_filename;
-							unset($thisfile_ape_items_current['data']);
-						} else {
-							if (!isset($info['ape']['comments']['picture'])) {
-								$info['ape']['comments']['picture'] = array();
-							}
-							$comments_picture_data = array();
-							foreach (array('data', 'image_mime', 'image_width', 'image_height', 'imagetype', 'picturetype', 'description', 'datalength') as $picture_key) {
-								if (isset($thisfile_ape_items_current[$picture_key])) {
-									$comments_picture_data[$picture_key] = $thisfile_ape_items_current[$picture_key];
-								}
-							}
-							$info['ape']['comments']['picture'][] = $comments_picture_data;
-							unset($comments_picture_data);
-						}
-					} while (false);
-					break;
-
-				default:
-					if (is_array($thisfile_ape_items_current['data'])) {
-						foreach ($thisfile_ape_items_current['data'] as $comment) {
-							$thisfile_ape['comments'][strtolower($item_key)][] = $comment;
-						}
-					}
-					break;
-			}
-
-		}
-		if (empty($thisfile_replaygain)) {
-			unset($info['replay_gain']);
-		}
-		return true;
-	}
-
-	public function parseAPEheaderFooter($APEheaderFooterData) {
-		// http://www.uni-jena.de/~pfk/mpp/sv8/apeheader.html
-
-		// shortcut
-		$headerfooterinfo['raw'] = array();
-		$headerfooterinfo_raw = &$headerfooterinfo['raw'];
-
-		$headerfooterinfo_raw['footer_tag']   =                  substr($APEheaderFooterData,  0, 8);
-		if ($headerfooterinfo_raw['footer_tag'] != 'APETAGEX') {
-			return false;
-		}
-		$headerfooterinfo_raw['version']      = getid3_lib::LittleEndian2Int(substr($APEheaderFooterData,  8, 4));
-		$headerfooterinfo_raw['tagsize']      = getid3_lib::LittleEndian2Int(substr($APEheaderFooterData, 12, 4));
-		$headerfooterinfo_raw['tag_items']    = getid3_lib::LittleEndian2Int(substr($APEheaderFooterData, 16, 4));
-		$headerfooterinfo_raw['global_flags'] = getid3_lib::LittleEndian2Int(substr($APEheaderFooterData, 20, 4));
-		$headerfooterinfo_raw['reserved']     =                              substr($APEheaderFooterData, 24, 8);
-
-		$headerfooterinfo['tag_version']         = $headerfooterinfo_raw['version'] / 1000;
-		if ($headerfooterinfo['tag_version'] >= 2) {
-			$headerfooterinfo['flags'] = $this->parseAPEtagFlags($headerfooterinfo_raw['global_flags']);
-		}
-		return $headerfooterinfo;
-	}
-
-	public function parseAPEtagFlags($rawflagint) {
-		// "Note: APE Tags 1.0 do not use any of the APE Tag flags.
-		// All are set to zero on creation and ignored on reading."
-		// http://wiki.hydrogenaud.io/index.php?title=Ape_Tags_Flags
-		$flags['header']            = (bool) ($rawflagint & 0x80000000);
-		$flags['footer']            = (bool) ($rawflagint & 0x40000000);
-		$flags['this_is_header']    = (bool) ($rawflagint & 0x20000000);
-		$flags['item_contents_raw'] =        ($rawflagint & 0x00000006) >> 1;
-		$flags['read_only']         = (bool) ($rawflagint & 0x00000001);
-
-		$flags['item_contents']     = $this->APEcontentTypeFlagLookup($flags['item_contents_raw']);
-
-		return $flags;
-	}
-
-	public function APEcontentTypeFlagLookup($contenttypeid) {
-		static $APEcontentTypeFlagLookup = array(
-			0 => 'utf-8',
-			1 => 'binary',
-			2 => 'external',
-			3 => 'reserved'
-		);
-		return (isset($APEcontentTypeFlagLookup[$contenttypeid]) ? $APEcontentTypeFlagLookup[$contenttypeid] : 'invalid');
-	}
-
-	public function APEtagItemIsUTF8Lookup($itemkey) {
-		static $APEtagItemIsUTF8Lookup = array(
-			'title',
-			'subtitle',
-			'artist',
-			'album',
-			'debut album',
-			'publisher',
-			'conductor',
-			'track',
-			'composer',
-			'comment',
-			'copyright',
-			'publicationright',
-			'file',
-			'year',
-			'record date',
-			'record location',
-			'genre',
-			'media',
-			'related',
-			'isrc',
-			'abstract',
-			'language',
-			'bibliography'
-		);
-		return in_array(strtolower($itemkey), $APEtagItemIsUTF8Lookup);
-	}
-
-}
Index: www/wp-includes/autoload/simplepie/Decode/HTML/Entities.php
===================================================================
--- www/wp-includes/autoload/simplepie/Decode/HTML/Entities.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/simplepie/Decode/HTML/Entities.php	(revision UNDEFINED)
@@ -1,617 +0,0 @@
-<?php
-/**
- * SimplePie
- *
- * A PHP-Based RSS and Atom Feed Framework.
- * Takes the hard work out of managing a complete RSS/Atom solution.
- *
- * Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 	* Redistributions of source code must retain the above copyright notice, this list of
- * 	  conditions and the following disclaimer.
- *
- * 	* Redistributions in binary form must reproduce the above copyright notice, this list
- * 	  of conditions and the following disclaimer in the documentation and/or other materials
- * 	  provided with the distribution.
- *
- * 	* Neither the name of the SimplePie Team nor the names of its contributors may be used
- * 	  to endorse or promote products derived from this software without specific prior
- * 	  written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
- * AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * @package SimplePie
- * @version 1.3.1
- * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
- * @author Ryan Parman
- * @author Geoffrey Sneddon
- * @author Ryan McCue
- * @link http://simplepie.org/ SimplePie
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
- */
-
-
-/**
- * Decode HTML Entities
- *
- * This implements HTML5 as of revision 967 (2007-06-28)
- *
- * @deprecated Use DOMDocument instead!
- * @package SimplePie
- */
-class SimplePie_Decode_HTML_Entities
-{
-	/**
-	 * Data to be parsed
-	 *
-	 * @access private
-	 * @var string
-	 */
-	var $data = '';
-
-	/**
-	 * Currently consumed bytes
-	 *
-	 * @access private
-	 * @var string
-	 */
-	var $consumed = '';
-
-	/**
-	 * Position of the current byte being parsed
-	 *
-	 * @access private
-	 * @var int
-	 */
-	var $position = 0;
-
-	/**
-	 * Create an instance of the class with the input data
-	 *
-	 * @access public
-	 * @param string $data Input data
-	 */
-	public function __construct($data)
-	{
-		$this->data = $data;
-	}
-
-	/**
-	 * Parse the input data
-	 *
-	 * @access public
-	 * @return string Output data
-	 */
-	public function parse()
-	{
-		while (($this->position = strpos($this->data, '&', $this->position)) !== false)
-		{
-			$this->consume();
-			$this->entity();
-			$this->consumed = '';
-		}
-		return $this->data;
-	}
-
-	/**
-	 * Consume the next byte
-	 *
-	 * @access private
-	 * @return mixed The next byte, or false, if there is no more data
-	 */
-	public function consume()
-	{
-		if (isset($this->data[$this->position]))
-		{
-			$this->consumed .= $this->data[$this->position];
-			return $this->data[$this->position++];
-		}
-		else
-		{
-			return false;
-		}
-	}
-
-	/**
-	 * Consume a range of characters
-	 *
-	 * @access private
-	 * @param string $chars Characters to consume
-	 * @return mixed A series of characters that match the range, or false
-	 */
-	public function consume_range($chars)
-	{
-		if ($len = strspn($this->data, $chars, $this->position))
-		{
-			$data = substr($this->data, $this->position, $len);
-			$this->consumed .= $data;
-			$this->position += $len;
-			return $data;
-		}
-		else
-		{
-			return false;
-		}
-	}
-
-	/**
-	 * Unconsume one byte
-	 *
-	 * @access private
-	 */
-	public function unconsume()
-	{
-		$this->consumed = substr($this->consumed, 0, -1);
-		$this->position--;
-	}
-
-	/**
-	 * Decode an entity
-	 *
-	 * @access private
-	 */
-	public function entity()
-	{
-		switch ($this->consume())
-		{
-			case "\x09":
-			case "\x0A":
-			case "\x0B":
-			case "\x0B":
-			case "\x0C":
-			case "\x20":
-			case "\x3C":
-			case "\x26":
-			case false:
-				break;
-
-			case "\x23":
-				switch ($this->consume())
-				{
-					case "\x78":
-					case "\x58":
-						$range = '0123456789ABCDEFabcdef';
-						$hex = true;
-						break;
-
-					default:
-						$range = '0123456789';
-						$hex = false;
-						$this->unconsume();
-						break;
-				}
-
-				if ($codepoint = $this->consume_range($range))
-				{
-					static $windows_1252_specials = array(0x0D => "\x0A", 0x80 => "\xE2\x82\xAC", 0x81 => "\xEF\xBF\xBD", 0x82 => "\xE2\x80\x9A", 0x83 => "\xC6\x92", 0x84 => "\xE2\x80\x9E", 0x85 => "\xE2\x80\xA6", 0x86 => "\xE2\x80\xA0", 0x87 => "\xE2\x80\xA1", 0x88 => "\xCB\x86", 0x89 => "\xE2\x80\xB0", 0x8A => "\xC5\xA0", 0x8B => "\xE2\x80\xB9", 0x8C => "\xC5\x92", 0x8D => "\xEF\xBF\xBD", 0x8E => "\xC5\xBD", 0x8F => "\xEF\xBF\xBD", 0x90 => "\xEF\xBF\xBD", 0x91 => "\xE2\x80\x98", 0x92 => "\xE2\x80\x99", 0x93 => "\xE2\x80\x9C", 0x94 => "\xE2\x80\x9D", 0x95 => "\xE2\x80\xA2", 0x96 => "\xE2\x80\x93", 0x97 => "\xE2\x80\x94", 0x98 => "\xCB\x9C", 0x99 => "\xE2\x84\xA2", 0x9A => "\xC5\xA1", 0x9B => "\xE2\x80\xBA", 0x9C => "\xC5\x93", 0x9D => "\xEF\xBF\xBD", 0x9E => "\xC5\xBE", 0x9F => "\xC5\xB8");
-
-					if ($hex)
-					{
-						$codepoint = hexdec($codepoint);
-					}
-					else
-					{
-						$codepoint = intval($codepoint);
-					}
-
-					if (isset($windows_1252_specials[$codepoint]))
-					{
-						$replacement = $windows_1252_specials[$codepoint];
-					}
-					else
-					{
-						$replacement = SimplePie_Misc::codepoint_to_utf8($codepoint);
-					}
-
-					if (!in_array($this->consume(), array(';', false), true))
-					{
-						$this->unconsume();
-					}
-
-					$consumed_length = strlen($this->consumed);
-					$this->data = substr_replace($this->data, $replacement, $this->position - $consumed_length, $consumed_length);
-					$this->position += strlen($replacement) - $consumed_length;
-				}
-				break;
-
-			default:
-				static $entities = array(
-					'Aacute' => "\xC3\x81",
-					'aacute' => "\xC3\xA1",
-					'Aacute;' => "\xC3\x81",
-					'aacute;' => "\xC3\xA1",
-					'Acirc' => "\xC3\x82",
-					'acirc' => "\xC3\xA2",
-					'Acirc;' => "\xC3\x82",
-					'acirc;' => "\xC3\xA2",
-					'acute' => "\xC2\xB4",
-					'acute;' => "\xC2\xB4",
-					'AElig' => "\xC3\x86",
-					'aelig' => "\xC3\xA6",
-					'AElig;' => "\xC3\x86",
-					'aelig;' => "\xC3\xA6",
-					'Agrave' => "\xC3\x80",
-					'agrave' => "\xC3\xA0",
-					'Agrave;' => "\xC3\x80",
-					'agrave;' => "\xC3\xA0",
-					'alefsym;' => "\xE2\x84\xB5",
-					'Alpha;' => "\xCE\x91",
-					'alpha;' => "\xCE\xB1",
-					'AMP' => "\x26",
-					'amp' => "\x26",
-					'AMP;' => "\x26",
-					'amp;' => "\x26",
-					'and;' => "\xE2\x88\xA7",
-					'ang;' => "\xE2\x88\xA0",
-					'apos;' => "\x27",
-					'Aring' => "\xC3\x85",
-					'aring' => "\xC3\xA5",
-					'Aring;' => "\xC3\x85",
-					'aring;' => "\xC3\xA5",
-					'asymp;' => "\xE2\x89\x88",
-					'Atilde' => "\xC3\x83",
-					'atilde' => "\xC3\xA3",
-					'Atilde;' => "\xC3\x83",
-					'atilde;' => "\xC3\xA3",
-					'Auml' => "\xC3\x84",
-					'auml' => "\xC3\xA4",
-					'Auml;' => "\xC3\x84",
-					'auml;' => "\xC3\xA4",
-					'bdquo;' => "\xE2\x80\x9E",
-					'Beta;' => "\xCE\x92",
-					'beta;' => "\xCE\xB2",
-					'brvbar' => "\xC2\xA6",
-					'brvbar;' => "\xC2\xA6",
-					'bull;' => "\xE2\x80\xA2",
-					'cap;' => "\xE2\x88\xA9",
-					'Ccedil' => "\xC3\x87",
-					'ccedil' => "\xC3\xA7",
-					'Ccedil;' => "\xC3\x87",
-					'ccedil;' => "\xC3\xA7",
-					'cedil' => "\xC2\xB8",
-					'cedil;' => "\xC2\xB8",
-					'cent' => "\xC2\xA2",
-					'cent;' => "\xC2\xA2",
-					'Chi;' => "\xCE\xA7",
-					'chi;' => "\xCF\x87",
-					'circ;' => "\xCB\x86",
-					'clubs;' => "\xE2\x99\xA3",
-					'cong;' => "\xE2\x89\x85",
-					'COPY' => "\xC2\xA9",
-					'copy' => "\xC2\xA9",
-					'COPY;' => "\xC2\xA9",
-					'copy;' => "\xC2\xA9",
-					'crarr;' => "\xE2\x86\xB5",
-					'cup;' => "\xE2\x88\xAA",
-					'curren' => "\xC2\xA4",
-					'curren;' => "\xC2\xA4",
-					'Dagger;' => "\xE2\x80\xA1",
-					'dagger;' => "\xE2\x80\xA0",
-					'dArr;' => "\xE2\x87\x93",
-					'darr;' => "\xE2\x86\x93",
-					'deg' => "\xC2\xB0",
-					'deg;' => "\xC2\xB0",
-					'Delta;' => "\xCE\x94",
-					'delta;' => "\xCE\xB4",
-					'diams;' => "\xE2\x99\xA6",
-					'divide' => "\xC3\xB7",
-					'divide;' => "\xC3\xB7",
-					'Eacute' => "\xC3\x89",
-					'eacute' => "\xC3\xA9",
-					'Eacute;' => "\xC3\x89",
-					'eacute;' => "\xC3\xA9",
-					'Ecirc' => "\xC3\x8A",
-					'ecirc' => "\xC3\xAA",
-					'Ecirc;' => "\xC3\x8A",
-					'ecirc;' => "\xC3\xAA",
-					'Egrave' => "\xC3\x88",
-					'egrave' => "\xC3\xA8",
-					'Egrave;' => "\xC3\x88",
-					'egrave;' => "\xC3\xA8",
-					'empty;' => "\xE2\x88\x85",
-					'emsp;' => "\xE2\x80\x83",
-					'ensp;' => "\xE2\x80\x82",
-					'Epsilon;' => "\xCE\x95",
-					'epsilon;' => "\xCE\xB5",
-					'equiv;' => "\xE2\x89\xA1",
-					'Eta;' => "\xCE\x97",
-					'eta;' => "\xCE\xB7",
-					'ETH' => "\xC3\x90",
-					'eth' => "\xC3\xB0",
-					'ETH;' => "\xC3\x90",
-					'eth;' => "\xC3\xB0",
-					'Euml' => "\xC3\x8B",
-					'euml' => "\xC3\xAB",
-					'Euml;' => "\xC3\x8B",
-					'euml;' => "\xC3\xAB",
-					'euro;' => "\xE2\x82\xAC",
-					'exist;' => "\xE2\x88\x83",
-					'fnof;' => "\xC6\x92",
-					'forall;' => "\xE2\x88\x80",
-					'frac12' => "\xC2\xBD",
-					'frac12;' => "\xC2\xBD",
-					'frac14' => "\xC2\xBC",
-					'frac14;' => "\xC2\xBC",
-					'frac34' => "\xC2\xBE",
-					'frac34;' => "\xC2\xBE",
-					'frasl;' => "\xE2\x81\x84",
-					'Gamma;' => "\xCE\x93",
-					'gamma;' => "\xCE\xB3",
-					'ge;' => "\xE2\x89\xA5",
-					'GT' => "\x3E",
-					'gt' => "\x3E",
-					'GT;' => "\x3E",
-					'gt;' => "\x3E",
-					'hArr;' => "\xE2\x87\x94",
-					'harr;' => "\xE2\x86\x94",
-					'hearts;' => "\xE2\x99\xA5",
-					'hellip;' => "\xE2\x80\xA6",
-					'Iacute' => "\xC3\x8D",
-					'iacute' => "\xC3\xAD",
-					'Iacute;' => "\xC3\x8D",
-					'iacute;' => "\xC3\xAD",
-					'Icirc' => "\xC3\x8E",
-					'icirc' => "\xC3\xAE",
-					'Icirc;' => "\xC3\x8E",
-					'icirc;' => "\xC3\xAE",
-					'iexcl' => "\xC2\xA1",
-					'iexcl;' => "\xC2\xA1",
-					'Igrave' => "\xC3\x8C",
-					'igrave' => "\xC3\xAC",
-					'Igrave;' => "\xC3\x8C",
-					'igrave;' => "\xC3\xAC",
-					'image;' => "\xE2\x84\x91",
-					'infin;' => "\xE2\x88\x9E",
-					'int;' => "\xE2\x88\xAB",
-					'Iota;' => "\xCE\x99",
-					'iota;' => "\xCE\xB9",
-					'iquest' => "\xC2\xBF",
-					'iquest;' => "\xC2\xBF",
-					'isin;' => "\xE2\x88\x88",
-					'Iuml' => "\xC3\x8F",
-					'iuml' => "\xC3\xAF",
-					'Iuml;' => "\xC3\x8F",
-					'iuml;' => "\xC3\xAF",
-					'Kappa;' => "\xCE\x9A",
-					'kappa;' => "\xCE\xBA",
-					'Lambda;' => "\xCE\x9B",
-					'lambda;' => "\xCE\xBB",
-					'lang;' => "\xE3\x80\x88",
-					'laquo' => "\xC2\xAB",
-					'laquo;' => "\xC2\xAB",
-					'lArr;' => "\xE2\x87\x90",
-					'larr;' => "\xE2\x86\x90",
-					'lceil;' => "\xE2\x8C\x88",
-					'ldquo;' => "\xE2\x80\x9C",
-					'le;' => "\xE2\x89\xA4",
-					'lfloor;' => "\xE2\x8C\x8A",
-					'lowast;' => "\xE2\x88\x97",
-					'loz;' => "\xE2\x97\x8A",
-					'lrm;' => "\xE2\x80\x8E",
-					'lsaquo;' => "\xE2\x80\xB9",
-					'lsquo;' => "\xE2\x80\x98",
-					'LT' => "\x3C",
-					'lt' => "\x3C",
-					'LT;' => "\x3C",
-					'lt;' => "\x3C",
-					'macr' => "\xC2\xAF",
-					'macr;' => "\xC2\xAF",
-					'mdash;' => "\xE2\x80\x94",
-					'micro' => "\xC2\xB5",
-					'micro;' => "\xC2\xB5",
-					'middot' => "\xC2\xB7",
-					'middot;' => "\xC2\xB7",
-					'minus;' => "\xE2\x88\x92",
-					'Mu;' => "\xCE\x9C",
-					'mu;' => "\xCE\xBC",
-					'nabla;' => "\xE2\x88\x87",
-					'nbsp' => "\xC2\xA0",
-					'nbsp;' => "\xC2\xA0",
-					'ndash;' => "\xE2\x80\x93",
-					'ne;' => "\xE2\x89\xA0",
-					'ni;' => "\xE2\x88\x8B",
-					'not' => "\xC2\xAC",
-					'not;' => "\xC2\xAC",
-					'notin;' => "\xE2\x88\x89",
-					'nsub;' => "\xE2\x8A\x84",
-					'Ntilde' => "\xC3\x91",
-					'ntilde' => "\xC3\xB1",
-					'Ntilde;' => "\xC3\x91",
-					'ntilde;' => "\xC3\xB1",
-					'Nu;' => "\xCE\x9D",
-					'nu;' => "\xCE\xBD",
-					'Oacute' => "\xC3\x93",
-					'oacute' => "\xC3\xB3",
-					'Oacute;' => "\xC3\x93",
-					'oacute;' => "\xC3\xB3",
-					'Ocirc' => "\xC3\x94",
-					'ocirc' => "\xC3\xB4",
-					'Ocirc;' => "\xC3\x94",
-					'ocirc;' => "\xC3\xB4",
-					'OElig;' => "\xC5\x92",
-					'oelig;' => "\xC5\x93",
-					'Ograve' => "\xC3\x92",
-					'ograve' => "\xC3\xB2",
-					'Ograve;' => "\xC3\x92",
-					'ograve;' => "\xC3\xB2",
-					'oline;' => "\xE2\x80\xBE",
-					'Omega;' => "\xCE\xA9",
-					'omega;' => "\xCF\x89",
-					'Omicron;' => "\xCE\x9F",
-					'omicron;' => "\xCE\xBF",
-					'oplus;' => "\xE2\x8A\x95",
-					'or;' => "\xE2\x88\xA8",
-					'ordf' => "\xC2\xAA",
-					'ordf;' => "\xC2\xAA",
-					'ordm' => "\xC2\xBA",
-					'ordm;' => "\xC2\xBA",
-					'Oslash' => "\xC3\x98",
-					'oslash' => "\xC3\xB8",
-					'Oslash;' => "\xC3\x98",
-					'oslash;' => "\xC3\xB8",
-					'Otilde' => "\xC3\x95",
-					'otilde' => "\xC3\xB5",
-					'Otilde;' => "\xC3\x95",
-					'otilde;' => "\xC3\xB5",
-					'otimes;' => "\xE2\x8A\x97",
-					'Ouml' => "\xC3\x96",
-					'ouml' => "\xC3\xB6",
-					'Ouml;' => "\xC3\x96",
-					'ouml;' => "\xC3\xB6",
-					'para' => "\xC2\xB6",
-					'para;' => "\xC2\xB6",
-					'part;' => "\xE2\x88\x82",
-					'permil;' => "\xE2\x80\xB0",
-					'perp;' => "\xE2\x8A\xA5",
-					'Phi;' => "\xCE\xA6",
-					'phi;' => "\xCF\x86",
-					'Pi;' => "\xCE\xA0",
-					'pi;' => "\xCF\x80",
-					'piv;' => "\xCF\x96",
-					'plusmn' => "\xC2\xB1",
-					'plusmn;' => "\xC2\xB1",
-					'pound' => "\xC2\xA3",
-					'pound;' => "\xC2\xA3",
-					'Prime;' => "\xE2\x80\xB3",
-					'prime;' => "\xE2\x80\xB2",
-					'prod;' => "\xE2\x88\x8F",
-					'prop;' => "\xE2\x88\x9D",
-					'Psi;' => "\xCE\xA8",
-					'psi;' => "\xCF\x88",
-					'QUOT' => "\x22",
-					'quot' => "\x22",
-					'QUOT;' => "\x22",
-					'quot;' => "\x22",
-					'radic;' => "\xE2\x88\x9A",
-					'rang;' => "\xE3\x80\x89",
-					'raquo' => "\xC2\xBB",
-					'raquo;' => "\xC2\xBB",
-					'rArr;' => "\xE2\x87\x92",
-					'rarr;' => "\xE2\x86\x92",
-					'rceil;' => "\xE2\x8C\x89",
-					'rdquo;' => "\xE2\x80\x9D",
-					'real;' => "\xE2\x84\x9C",
-					'REG' => "\xC2\xAE",
-					'reg' => "\xC2\xAE",
-					'REG;' => "\xC2\xAE",
-					'reg;' => "\xC2\xAE",
-					'rfloor;' => "\xE2\x8C\x8B",
-					'Rho;' => "\xCE\xA1",
-					'rho;' => "\xCF\x81",
-					'rlm;' => "\xE2\x80\x8F",
-					'rsaquo;' => "\xE2\x80\xBA",
-					'rsquo;' => "\xE2\x80\x99",
-					'sbquo;' => "\xE2\x80\x9A",
-					'Scaron;' => "\xC5\xA0",
-					'scaron;' => "\xC5\xA1",
-					'sdot;' => "\xE2\x8B\x85",
-					'sect' => "\xC2\xA7",
-					'sect;' => "\xC2\xA7",
-					'shy' => "\xC2\xAD",
-					'shy;' => "\xC2\xAD",
-					'Sigma;' => "\xCE\xA3",
-					'sigma;' => "\xCF\x83",
-					'sigmaf;' => "\xCF\x82",
-					'sim;' => "\xE2\x88\xBC",
-					'spades;' => "\xE2\x99\xA0",
-					'sub;' => "\xE2\x8A\x82",
-					'sube;' => "\xE2\x8A\x86",
-					'sum;' => "\xE2\x88\x91",
-					'sup;' => "\xE2\x8A\x83",
-					'sup1' => "\xC2\xB9",
-					'sup1;' => "\xC2\xB9",
-					'sup2' => "\xC2\xB2",
-					'sup2;' => "\xC2\xB2",
-					'sup3' => "\xC2\xB3",
-					'sup3;' => "\xC2\xB3",
-					'supe;' => "\xE2\x8A\x87",
-					'szlig' => "\xC3\x9F",
-					'szlig;' => "\xC3\x9F",
-					'Tau;' => "\xCE\xA4",
-					'tau;' => "\xCF\x84",
-					'there4;' => "\xE2\x88\xB4",
-					'Theta;' => "\xCE\x98",
-					'theta;' => "\xCE\xB8",
-					'thetasym;' => "\xCF\x91",
-					'thinsp;' => "\xE2\x80\x89",
-					'THORN' => "\xC3\x9E",
-					'thorn' => "\xC3\xBE",
-					'THORN;' => "\xC3\x9E",
-					'thorn;' => "\xC3\xBE",
-					'tilde;' => "\xCB\x9C",
-					'times' => "\xC3\x97",
-					'times;' => "\xC3\x97",
-					'TRADE;' => "\xE2\x84\xA2",
-					'trade;' => "\xE2\x84\xA2",
-					'Uacute' => "\xC3\x9A",
-					'uacute' => "\xC3\xBA",
-					'Uacute;' => "\xC3\x9A",
-					'uacute;' => "\xC3\xBA",
-					'uArr;' => "\xE2\x87\x91",
-					'uarr;' => "\xE2\x86\x91",
-					'Ucirc' => "\xC3\x9B",
-					'ucirc' => "\xC3\xBB",
-					'Ucirc;' => "\xC3\x9B",
-					'ucirc;' => "\xC3\xBB",
-					'Ugrave' => "\xC3\x99",
-					'ugrave' => "\xC3\xB9",
-					'Ugrave;' => "\xC3\x99",
-					'ugrave;' => "\xC3\xB9",
-					'uml' => "\xC2\xA8",
-					'uml;' => "\xC2\xA8",
-					'upsih;' => "\xCF\x92",
-					'Upsilon;' => "\xCE\xA5",
-					'upsilon;' => "\xCF\x85",
-					'Uuml' => "\xC3\x9C",
-					'uuml' => "\xC3\xBC",
-					'Uuml;' => "\xC3\x9C",
-					'uuml;' => "\xC3\xBC",
-					'weierp;' => "\xE2\x84\x98",
-					'Xi;' => "\xCE\x9E",
-					'xi;' => "\xCE\xBE",
-					'Yacute' => "\xC3\x9D",
-					'yacute' => "\xC3\xBD",
-					'Yacute;' => "\xC3\x9D",
-					'yacute;' => "\xC3\xBD",
-					'yen' => "\xC2\xA5",
-					'yen;' => "\xC2\xA5",
-					'yuml' => "\xC3\xBF",
-					'Yuml;' => "\xC5\xB8",
-					'yuml;' => "\xC3\xBF",
-					'Zeta;' => "\xCE\x96",
-					'zeta;' => "\xCE\xB6",
-					'zwj;' => "\xE2\x80\x8D",
-					'zwnj;' => "\xE2\x80\x8C"
-				);
-
-				for ($i = 0, $match = null; $i < 9 && $this->consume() !== false; $i++)
-				{
-					$consumed = substr($this->consumed, 1);
-					if (isset($entities[$consumed]))
-					{
-						$match = $consumed;
-					}
-				}
-
-				if ($match !== null)
-				{
- 					$this->data = substr_replace($this->data, $entities[$match], $this->position - strlen($consumed) - 1, strlen($match) + 1);
-					$this->position += strlen($entities[$match]) - strlen($consumed) - 1;
-				}
-				break;
-		}
-	}
-}
-
Index: www/wp-includes/SimplePie/Locator.php
===================================================================
--- www/wp-includes/SimplePie/Locator.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_Locator.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/customize/class-wp-customize-sidebar-section.php
===================================================================
--- www/wp-includes/autoload/customize/class-wp-customize-sidebar-section.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/customize/class-wp-customize-sidebar-section.php	(revision UNDEFINED)
@@ -1,61 +0,0 @@
-<?php
-/**
- * Customize API: WP_Customize_Sidebar_Section class
- *
- * @package WordPress
- * @subpackage Customize
- * @since 4.4.0
- */
-
-/**
- * Customizer section representing widget area (sidebar).
- *
- * @since 4.1.0
- *
- * @see WP_Customize_Section
- */
-class WP_Customize_Sidebar_Section extends WP_Customize_Section {
-
-	/**
-	 * Type of this section.
-	 *
-	 * @since 4.1.0
-	 * @access public
-	 * @var string
-	 */
-	public $type = 'sidebar';
-
-	/**
-	 * Unique identifier.
-	 *
-	 * @since 4.1.0
-	 * @access public
-	 * @var string
-	 */
-	public $sidebar_id;
-
-	/**
-	 * Gather the parameters passed to client JavaScript via JSON.
-	 *
-	 * @since 4.1.0
-	 *
-	 * @return array The array to be exported to the client as JSON.
-	 */
-	public function json() {
-		$json = parent::json();
-		$json['sidebarId'] = $this->sidebar_id;
-		return $json;
-	}
-
-	/**
-	 * Whether the current sidebar is rendered on the page.
-	 *
-	 * @since 4.1.0
-	 * @access public
-	 *
-	 * @return bool Whether sidebar is rendered.
-	 */
-	public function active_callback() {
-		return $this->manager->widgets->is_sidebar_rendered( $this->sidebar_id );
-	}
-}
Index: www/wp-includes/SimplePie/Sanitize.php
===================================================================
--- www/wp-includes/SimplePie/Sanitize.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_Sanitize.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/admin-footer.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/admin-footer.php	(revision 38565)
+++ www/wp-admin/admin-footer.php	(revision 38565)
@@ -1,119 +0,0 @@
-<?php
-/**
- * WordPress Administration Template Footer
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-// don't load directly
-if ( !defined('ABSPATH') )
-	die('-1');
-
-/**
- * @global string $hook_suffix
- */
-global $hook_suffix;
-?>
-
-<div class="clear"></div></div><!-- wpbody-content -->
-<div class="clear"></div></div><!-- wpbody -->
-<div class="clear"></div></div><!-- wpcontent -->
-
-<div id="wpfooter" role="contentinfo">
-	<?php
-	/**
-	 * Fires after the opening tag for the admin footer.
-	 *
-	 * @since 2.5.0
-	 */
-	do_action( 'in_admin_footer' );
-	?>
-	<p id="footer-left" class="alignleft">
-		<?php
-		$text = sprintf( __( 'Thank you for creating with <a href="%s">WordPress</a>.' ), __( 'https://wordpress.org/' ) );
-		/**
-		 * Filters the "Thank you" text displayed in the admin footer.
-		 *
-		 * @since 2.8.0
-		 *
-		 * @param string $text The content that will be printed.
-		 */
-		echo apply_filters( 'admin_footer_text', '<span id="footer-thankyou">' . $text . '</span>' );
-		?>
-	</p>
-	<p id="footer-upgrade" class="alignright">
-		<?php
-		/**
-		 * Filters the version/update text displayed in the admin footer.
-		 *
-		 * WordPress prints the current version and update information,
-		 * using core_update_footer() at priority 10.
-		 *
-		 * @since 2.3.0
-		 *
-		 * @see core_update_footer()
-		 *
-		 * @param string $content The content that will be printed.
-		 */
-		echo apply_filters( 'update_footer', '' );
-		?>
-	</p>
-	<div class="clear"></div>
-</div>
-<?php
-/**
- * Prints scripts or data before the default footer scripts.
- *
- * @since 1.2.0
- *
- * @param string $data The data to print.
- */
-do_action( 'admin_footer', '' );
-
-/**
- * Prints scripts and data queued for the footer.
- *
- * The dynamic portion of the hook name, `$hook_suffix`,
- * refers to the global hook suffix of the current page.
- *
- * @since 4.6.0
- *
- * @global string $hook_suffix
- *
- * @param string $hook_suffix The current admin page.
- */
-do_action( "admin_print_footer_scripts-{$hook_suffix}" );
-
-/**
- * Prints any scripts and data queued for the footer.
- *
- * @since 2.8.0
- */
-do_action( 'admin_print_footer_scripts' );
-
-/**
- * Prints scripts or data after the default footer scripts.
- *
- * The dynamic portion of the hook name, `$hook_suffix`,
- * refers to the global hook suffix of the current page.
- *
- * @since 2.8.0
- *
- * @global string $hook_suffix
- * @param string $hook_suffix The current admin page.
- */
-do_action( "admin_footer-{$hook_suffix}" );
-
-// get_site_option() won't exist when auto upgrading from <= 2.7
-if ( function_exists('get_site_option') ) {
-	if ( false === get_site_option('can_compress_scripts') )
-		compression_test();
-}
-
-?>
-
-<div class="clear"></div></div><!-- wpwrap -->
-<script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script>
-</body>
-</html>
Index: www/wp-includes/class-wp-user-meta-session-tokens.php
===================================================================
--- www/wp-includes/class-wp-user-meta-session-tokens.php	(revision 38565)
+++ www/wp-includes/autoload/session/WP_User_Meta_Session_Tokens.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/pomo/mo.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/pomo/mo.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/pomo/mo.php	(revision UNDEFINED)
@@ -1,302 +0,0 @@
-<?php
-/**
- * Class for working with MO files
- *
- * @version $Id: mo.php 1157 2015-11-20 04:30:11Z dd32 $
- * @package pomo
- * @subpackage mo
- */
-
-require_once dirname(__FILE__) . '/translations.php';
-require_once dirname(__FILE__) . '/streams.php';
-
-if ( ! class_exists( 'MO', false ) ):
-class MO extends Gettext_Translations {
-
-	var $_nplurals = 2;
-
-	/**
-	 * Fills up with the entries from MO file $filename
-	 *
-	 * @param string $filename MO file to load
-	 */
-	function import_from_file($filename) {
-		$reader = new POMO_FileReader($filename);
-		if (!$reader->is_resource())
-			return false;
-		return $this->import_from_reader($reader);
-	}
-
-	/**
-	 * @param string $filename
-	 * @return bool
-	 */
-	function export_to_file($filename) {
-		$fh = fopen($filename, 'wb');
-		if ( !$fh ) return false;
-		$res = $this->export_to_file_handle( $fh );
-		fclose($fh);
-		return $res;
-	}
-
-	/**
-	 * @return string|false
-	 */
-	function export() {
-		$tmp_fh = fopen("php://temp", 'r+');
-		if ( !$tmp_fh ) return false;
-		$this->export_to_file_handle( $tmp_fh );
-		rewind( $tmp_fh );
-		return stream_get_contents( $tmp_fh );
-	}
-
-	/**
-	 * @param Translation_Entry $entry
-	 * @return bool
-	 */
-	function is_entry_good_for_export( $entry ) {
-		if ( empty( $entry->translations ) ) {
-			return false;
-		}
-
-		if ( !array_filter( $entry->translations ) ) {
-			return false;
-		}
-
-		return true;
-	}
-
-	/**
-	 * @param resource $fh
-	 * @return true
-	 */
-	function export_to_file_handle($fh) {
-		$entries = array_filter( $this->entries, array( $this, 'is_entry_good_for_export' ) );
-		ksort($entries);
-		$magic = 0x950412de;
-		$revision = 0;
-		$total = count($entries) + 1; // all the headers are one entry
-		$originals_lenghts_addr = 28;
-		$translations_lenghts_addr = $originals_lenghts_addr + 8 * $total;
-		$size_of_hash = 0;
-		$hash_addr = $translations_lenghts_addr + 8 * $total;
-		$current_addr = $hash_addr;
-		fwrite($fh, pack('V*', $magic, $revision, $total, $originals_lenghts_addr,
-			$translations_lenghts_addr, $size_of_hash, $hash_addr));
-		fseek($fh, $originals_lenghts_addr);
-
-		// headers' msgid is an empty string
-		fwrite($fh, pack('VV', 0, $current_addr));
-		$current_addr++;
-		$originals_table = chr(0);
-
-		$reader = new POMO_Reader();
-
-		foreach($entries as $entry) {
-			$originals_table .= $this->export_original($entry) . chr(0);
-			$length = $reader->strlen($this->export_original($entry));
-			fwrite($fh, pack('VV', $length, $current_addr));
-			$current_addr += $length + 1; // account for the NULL byte after
-		}
-
-		$exported_headers = $this->export_headers();
-		fwrite($fh, pack('VV', $reader->strlen($exported_headers), $current_addr));
-		$current_addr += strlen($exported_headers) + 1;
-		$translations_table = $exported_headers . chr(0);
-
-		foreach($entries as $entry) {
-			$translations_table .= $this->export_translations($entry) . chr(0);
-			$length = $reader->strlen($this->export_translations($entry));
-			fwrite($fh, pack('VV', $length, $current_addr));
-			$current_addr += $length + 1;
-		}
-
-		fwrite($fh, $originals_table);
-		fwrite($fh, $translations_table);
-		return true;
-	}
-
-	/**
-	 * @param Translation_Entry $entry
-	 * @return string
-	 */
-	function export_original($entry) {
-		//TODO: warnings for control characters
-		$exported = $entry->singular;
-		if ($entry->is_plural) $exported .= chr(0).$entry->plural;
-		if ($entry->context) $exported = $entry->context . chr(4) . $exported;
-		return $exported;
-	}
-
-	/**
-	 * @param Translation_Entry $entry
-	 * @return string
-	 */
-	function export_translations($entry) {
-		//TODO: warnings for control characters
-		return $entry->is_plural ? implode(chr(0), $entry->translations) : $entry->translations[0];
-	}
-
-	/**
-	 * @return string
-	 */
-	function export_headers() {
-		$exported = '';
-		foreach($this->headers as $header => $value) {
-			$exported.= "$header: $value\n";
-		}
-		return $exported;
-	}
-
-	/**
-	 * @param int $magic
-	 * @return string|false
-	 */
-	function get_byteorder($magic) {
-		// The magic is 0x950412de
-
-		// bug in PHP 5.0.2, see https://savannah.nongnu.org/bugs/?func=detailitem&item_id=10565
-		$magic_little = (int) - 1794895138;
-		$magic_little_64 = (int) 2500072158;
-		// 0xde120495
-		$magic_big = ((int) - 569244523) & 0xFFFFFFFF;
-		if ($magic_little == $magic || $magic_little_64 == $magic) {
-			return 'little';
-		} else if ($magic_big == $magic) {
-			return 'big';
-		} else {
-			return false;
-		}
-	}
-
-	/**
-	 * @param POMO_FileReader $reader
-	 */
-	function import_from_reader($reader) {
-		$endian_string = MO::get_byteorder($reader->readint32());
-		if (false === $endian_string) {
-			return false;
-		}
-		$reader->setEndian($endian_string);
-
-		$endian = ('big' == $endian_string)? 'N' : 'V';
-
-		$header = $reader->read(24);
-		if ($reader->strlen($header) != 24)
-			return false;
-
-		// parse header
-		$header = unpack("{$endian}revision/{$endian}total/{$endian}originals_lenghts_addr/{$endian}translations_lenghts_addr/{$endian}hash_length/{$endian}hash_addr", $header);
-		if (!is_array($header))
-			return false;
-
-		// support revision 0 of MO format specs, only
-		if ( $header['revision'] != 0 ) {
-			return false;
-		}
-
-		// seek to data blocks
-		$reader->seekto( $header['originals_lenghts_addr'] );
-
-		// read originals' indices
-		$originals_lengths_length = $header['translations_lenghts_addr'] - $header['originals_lenghts_addr'];
-		if ( $originals_lengths_length != $header['total'] * 8 ) {
-			return false;
-		}
-
-		$originals = $reader->read($originals_lengths_length);
-		if ( $reader->strlen( $originals ) != $originals_lengths_length ) {
-			return false;
-		}
-
-		// read translations' indices
-		$translations_lenghts_length = $header['hash_addr'] - $header['translations_lenghts_addr'];
-		if ( $translations_lenghts_length != $header['total'] * 8 ) {
-			return false;
-		}
-
-		$translations = $reader->read($translations_lenghts_length);
-		if ( $reader->strlen( $translations ) != $translations_lenghts_length ) {
-			return false;
-		}
-
-		// transform raw data into set of indices
-		$originals    = $reader->str_split( $originals, 8 );
-		$translations = $reader->str_split( $translations, 8 );
-
-		// skip hash table
-		$strings_addr = $header['hash_addr'] + $header['hash_length'] * 4;
-
-		$reader->seekto($strings_addr);
-
-		$strings = $reader->read_all();
-		$reader->close();
-
-		for ( $i = 0; $i < $header['total']; $i++ ) {
-			$o = unpack( "{$endian}length/{$endian}pos", $originals[$i] );
-			$t = unpack( "{$endian}length/{$endian}pos", $translations[$i] );
-			if ( !$o || !$t ) return false;
-
-			// adjust offset due to reading strings to separate space before
-			$o['pos'] -= $strings_addr;
-			$t['pos'] -= $strings_addr;
-
-			$original    = $reader->substr( $strings, $o['pos'], $o['length'] );
-			$translation = $reader->substr( $strings, $t['pos'], $t['length'] );
-
-			if ('' === $original) {
-				$this->set_headers($this->make_headers($translation));
-			} else {
-				$entry = &$this->make_entry($original, $translation);
-				$this->entries[$entry->key()] = &$entry;
-			}
-		}
-		return true;
-	}
-
-	/**
-	 * Build a Translation_Entry from original string and translation strings,
-	 * found in a MO file
-	 *
-	 * @static
-	 * @param string $original original string to translate from MO file. Might contain
-	 * 	0x04 as context separator or 0x00 as singular/plural separator
-	 * @param string $translation translation string from MO file. Might contain
-	 * 	0x00 as a plural translations separator
-	 */
-	function &make_entry($original, $translation) {
-		$entry = new Translation_Entry();
-		// look for context
-		$parts = explode(chr(4), $original);
-		if (isset($parts[1])) {
-			$original = $parts[1];
-			$entry->context = $parts[0];
-		}
-		// look for plural original
-		$parts = explode(chr(0), $original);
-		$entry->singular = $parts[0];
-		if (isset($parts[1])) {
-			$entry->is_plural = true;
-			$entry->plural = $parts[1];
-		}
-		// plural translations are also separated by \0
-		$entry->translations = explode(chr(0), $translation);
-		return $entry;
-	}
-
-	/**
-	 * @param int $count
-	 * @return string
-	 */
-	function select_plural_form($count) {
-		return $this->gettext_select_plural_form($count);
-	}
-
-	/**
-	 * @return int
-	 */
-	function get_plural_forms_count() {
-		return $this->_nplurals;
-	}
-}
-endif;
\ No newline at end of file
Index: www/wp-includes/customize/class-wp-customize-nav-menu-setting.php
===================================================================
--- www/wp-includes/customize/class-wp-customize-nav-menu-setting.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Nav_Menu_Setting.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/Requests/Exception/HTTP/428.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/428.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_428.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/pluggable-deprecated.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/pluggable-deprecated.php	(revision 38565)
+++ www/wp-includes/pluggable-deprecated.php	(revision 38565)
@@ -1,208 +0,0 @@
-<?php
-/**
- * Deprecated pluggable functions from past WordPress versions. You shouldn't use these
- * functions and look for the alternatives instead. The functions will be removed in a
- * later version.
- *
- * Deprecated warnings are also thrown if one of these functions is being defined by a plugin.
- *
- * @package WordPress
- * @subpackage Deprecated
- * @see pluggable.php
- */
-
-/*
- * Deprecated functions come here to die.
- */
-
-if ( !function_exists('set_current_user') ) :
-/**
- * Changes the current user by ID or name.
- *
- * Set $id to null and specify a name if you do not know a user's ID.
- *
- * @since 2.0.1
- * @deprecated 3.0.0 Use wp_set_current_user()
- * @see wp_set_current_user()
- *
- * @param int|null $id User ID.
- * @param string $name Optional. The user's username
- * @return WP_User returns wp_set_current_user()
- */
-function set_current_user($id, $name = '') {
-	_deprecated_function( __FUNCTION__, '3.0.0', 'wp_set_current_user()' );
-	return wp_set_current_user($id, $name);
-}
-endif;
-
-if ( !function_exists('get_currentuserinfo') ) :
-/**
- * Populate global variables with information about the currently logged in user.
- *
- * @since 0.71
- * @deprecated 4.5.0 Use wp_get_current_user()
- * @see wp_get_current_user()
- *
- * @return bool|WP_User False on XMLRPC Request and invalid auth cookie, WP_User instance otherwise.
- */
-function get_currentuserinfo() {
-	_deprecated_function( __FUNCTION__, '4.5.0', 'wp_get_current_user()' );
-
-	return _wp_get_current_user();
-}
-endif;
-
-if ( !function_exists('get_userdatabylogin') ) :
-/**
- * Retrieve user info by login name.
- *
- * @since 0.71
- * @deprecated 3.3.0 Use get_user_by()
- * @see get_user_by()
- *
- * @param string $user_login User's username
- * @return bool|object False on failure, User DB row object
- */
-function get_userdatabylogin($user_login) {
-	_deprecated_function( __FUNCTION__, '3.3.0', "get_user_by('login')" );
-	return get_user_by('login', $user_login);
-}
-endif;
-
-if ( !function_exists('get_user_by_email') ) :
-/**
- * Retrieve user info by email.
- *
- * @since 2.5.0
- * @deprecated 3.3.0 Use get_user_by()
- * @see get_user_by()
- *
- * @param string $email User's email address
- * @return bool|object False on failure, User DB row object
- */
-function get_user_by_email($email) {
-	_deprecated_function( __FUNCTION__, '3.3.0', "get_user_by('email')" );
-	return get_user_by('email', $email);
-}
-endif;
-
-if ( !function_exists('wp_setcookie') ) :
-/**
- * Sets a cookie for a user who just logged in. This function is deprecated.
- *
- * @since 1.5.0
- * @deprecated 2.5.0 Use wp_set_auth_cookie()
- * @see wp_set_auth_cookie()
- *
- * @param string $username The user's username
- * @param string $password Optional. The user's password
- * @param bool $already_md5 Optional. Whether the password has already been through MD5
- * @param string $home Optional. Will be used instead of COOKIEPATH if set
- * @param string $siteurl Optional. Will be used instead of SITECOOKIEPATH if set
- * @param bool $remember Optional. Remember that the user is logged in
- */
-function wp_setcookie($username, $password = '', $already_md5 = false, $home = '', $siteurl = '', $remember = false) {
-	_deprecated_function( __FUNCTION__, '2.5.0', 'wp_set_auth_cookie()' );
-	$user = get_user_by('login', $username);
-	wp_set_auth_cookie($user->ID, $remember);
-}
-else :
-	_deprecated_function( 'wp_setcookie', '2.5.0', 'wp_set_auth_cookie()' );
-endif;
-
-if ( !function_exists('wp_clearcookie') ) :
-/**
- * Clears the authentication cookie, logging the user out. This function is deprecated.
- *
- * @since 1.5.0
- * @deprecated 2.5.0 Use wp_clear_auth_cookie()
- * @see wp_clear_auth_cookie()
- */
-function wp_clearcookie() {
-	_deprecated_function( __FUNCTION__, '2.5.0', 'wp_clear_auth_cookie()' );
-	wp_clear_auth_cookie();
-}
-else :
-	_deprecated_function( 'wp_clearcookie', '2.5.0', 'wp_clear_auth_cookie()' );
-endif;
-
-if ( !function_exists('wp_get_cookie_login') ):
-/**
- * Gets the user cookie login. This function is deprecated.
- *
- * This function is deprecated and should no longer be extended as it won't be
- * used anywhere in WordPress. Also, plugins shouldn't use it either.
- *
- * @since 2.0.3
- * @deprecated 2.5.0
- *
- * @return bool Always returns false
- */
-function wp_get_cookie_login() {
-	_deprecated_function( __FUNCTION__, '2.5.0' );
-	return false;
-}
-else :
-	_deprecated_function( 'wp_get_cookie_login', '2.5.0' );
-endif;
-
-if ( !function_exists('wp_login') ) :
-/**
- * Checks a users login information and logs them in if it checks out. This function is deprecated.
- *
- * Use the global $error to get the reason why the login failed. If the username
- * is blank, no error will be set, so assume blank username on that case.
- *
- * Plugins extending this function should also provide the global $error and set
- * what the error is, so that those checking the global for why there was a
- * failure can utilize it later.
- *
- * @since 1.2.2
- * @deprecated 2.5.0 Use wp_signon()
- * @see wp_signon()
- *
- * @global string $error Error when false is returned
- *
- * @param string $username   User's username
- * @param string $password   User's password
- * @param string $deprecated Not used
- * @return bool False on login failure, true on successful check
- */
-function wp_login($username, $password, $deprecated = '') {
-	_deprecated_function( __FUNCTION__, '2.5.0', 'wp_signon()' );
-	global $error;
-
-	$user = wp_authenticate($username, $password);
-
-	if ( ! is_wp_error($user) )
-		return true;
-
-	$error = $user->get_error_message();
-	return false;
-}
-else :
-	_deprecated_function( 'wp_login', '2.5.0', 'wp_signon()' );
-endif;
-
-/**
- * WordPress AtomPub API implementation.
- *
- * Originally stored in wp-app.php, and later wp-includes/class-wp-atom-server.php.
- * It is kept here in case a plugin directly referred to the class.
- *
- * @since 2.2.0
- * @deprecated 3.5.0
- *
- * @link https://wordpress.org/plugins/atom-publishing-protocol/
- */
-if ( ! class_exists( 'wp_atom_server', false ) ) {
-	class wp_atom_server {
-		public function __call( $name, $arguments ) {
-			_deprecated_function( __CLASS__ . '::' . $name, '3.5.0', 'the Atom Publishing Protocol plugin' );
-		}
-
-		public static function __callStatic( $name, $arguments ) {
-			_deprecated_function( __CLASS__ . '::' . $name, '3.5.0', 'the Atom Publishing Protocol plugin' );
-		}
-	}
-}
Index: www/wp-includes/autoload/feed/AtomFeed.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/feed/AtomFeed.php	(revision )
+++ www/wp-includes/autoload/feed/AtomFeed.php	(revision )
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Atom Syndication Format PHP Library
+ *
+ * @package AtomLib
+ * @link http://code.google.com/p/phpatomlib/
+ *
+ * @author Elias Torres <elias@torrez.us>
+ * @version 0.4
+ * @since 2.3.0
+ */
+
+/**
+ * Structure that store common Atom Feed Properties
+ *
+ * @package AtomLib
+ */
+class AtomFeed {
+	/**
+	 * Stores Links
+	 * @var array
+	 * @access public
+	 */
+    var $links = array();
+    /**
+     * Stores Categories
+     * @var array
+     * @access public
+     */
+    var $categories = array();
+	/**
+	 * Stores Entries
+	 *
+	 * @var array
+	 * @access public
+	 */
+    var $entries = array();
+}
+
Index: www/wp-includes/class-snoopy.php
===================================================================
--- www/wp-includes/class-snoopy.php	(revision 38565)
+++ www/wp-includes/autoload/external/Snoopy.php	(revision )
@@ -5,7 +5,6 @@
  */
 _deprecated_file( basename( __FILE__ ), '3.0.0', WPINC . '/http.php' );
 
-if ( ! class_exists( 'Snoopy', false ) ) :
 /*************************************************
 
 Snoopy - the PHP net client
@@ -1255,5 +1254,3 @@
 		return $postdata;
 	}
 }
-endif;
-?>
Index: www/wp-includes/ixr.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/ixr.php	(revision )
+++ www/wp-includes/ixr.php	(revision )
@@ -0,0 +1,40 @@
+<?php
+/**
+ * IXR - The Incutio XML-RPC Library
+ *
+ * Copyright (c) 2010, Incutio Ltd.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  - Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *  - Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *  - Neither the name of Incutio Ltd. nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @package IXR
+ * @since 1.5.0
+ *
+ * @copyright  Incutio Ltd 2010 (http://www.incutio.com)
+ * @version    1.7.4 7th September 2010
+ * @author     Simon Willison
+ * @link       http://scripts.incutio.com/xmlrpc/ Site/manual
+ * @license    http://www.opensource.org/licenses/bsd-license.php BSD
+ */
Index: www/wp-includes/default-constants.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/default-constants.php	(revision 38565)
+++ www/wp-includes/default-constants.php	(revision 38565)
@@ -1,362 +0,0 @@
-<?php
-/**
- * Defines constants and global variables that can be overridden, generally in wp-config.php.
- *
- * @package WordPress
- */
-
-/**
- * Defines initial WordPress constants
- *
- * @see wp_debug_mode()
- *
- * @since 3.0.0
- *
- * @global int $blog_id
- */
-function wp_initial_constants() {
-	global $blog_id;
-
-	/**#@+
-	 * Constants for expressing human-readable data sizes in their respective number of bytes.
-	 *
-	 * @since 4.4.0
-	 */
-	define( 'KB_IN_BYTES', 1024 );
-	define( 'MB_IN_BYTES', 1024 * KB_IN_BYTES );
-	define( 'GB_IN_BYTES', 1024 * MB_IN_BYTES );
-	define( 'TB_IN_BYTES', 1024 * GB_IN_BYTES );
-	/**#@-*/
-
-	$current_limit     = @ini_get( 'memory_limit' );
-	$current_limit_int = wp_convert_hr_to_bytes( $current_limit );
-
-	// Define memory limits.
-	if ( ! defined( 'WP_MEMORY_LIMIT' ) ) {
-		if ( false === wp_is_ini_value_changeable( 'memory_limit' ) ) {
-			define( 'WP_MEMORY_LIMIT', $current_limit );
-		} elseif ( is_multisite() ) {
-			define( 'WP_MEMORY_LIMIT', '64M' );
-		} else {
-			define( 'WP_MEMORY_LIMIT', '40M' );
-		}
-	}
-
-	if ( ! defined( 'WP_MAX_MEMORY_LIMIT' ) ) {
-		if ( false === wp_is_ini_value_changeable( 'memory_limit' ) ) {
-			define( 'WP_MAX_MEMORY_LIMIT', $current_limit );
-		} elseif ( -1 === $current_limit_int || $current_limit_int > 268435456 /* = 256M */ ) {
-			define( 'WP_MAX_MEMORY_LIMIT', $current_limit );
-		} else {
-			define( 'WP_MAX_MEMORY_LIMIT', '256M' );
-		}
-	}
-
-	// Set memory limits.
-	$wp_limit_int = wp_convert_hr_to_bytes( WP_MEMORY_LIMIT );
-	if ( -1 !== $current_limit_int && ( -1 === $wp_limit_int || $wp_limit_int > $current_limit_int ) ) {
-		@ini_set( 'memory_limit', WP_MEMORY_LIMIT );
-	}
-
-	if ( ! isset($blog_id) )
-		$blog_id = 1;
-
-	if ( !defined('WP_CONTENT_DIR') )
-		define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // no trailing slash, full paths only - WP_CONTENT_URL is defined further down
-
-	// Add define('WP_DEBUG', true); to wp-config.php to enable display of notices during development.
-	if ( !defined('WP_DEBUG') )
-		define( 'WP_DEBUG', false );
-
-	// Add define('WP_DEBUG_DISPLAY', null); to wp-config.php use the globally configured setting for
-	// display_errors and not force errors to be displayed. Use false to force display_errors off.
-	if ( !defined('WP_DEBUG_DISPLAY') )
-		define( 'WP_DEBUG_DISPLAY', true );
-
-	// Add define('WP_DEBUG_LOG', true); to enable error logging to wp-content/debug.log.
-	if ( !defined('WP_DEBUG_LOG') )
-		define('WP_DEBUG_LOG', false);
-
-	if ( !defined('WP_CACHE') )
-		define('WP_CACHE', false);
-
-	// Add define('SCRIPT_DEBUG', true); to wp-config.php to enable loading of non-minified,
-	// non-concatenated scripts and stylesheets.
-	if ( ! defined( 'SCRIPT_DEBUG' ) ) {
-		if ( ! empty( $GLOBALS['wp_version'] ) ) {
-			$develop_src = false !== strpos( $GLOBALS['wp_version'], '-src' );
-		} else {
-			$develop_src = false;
-		}
-
-		define( 'SCRIPT_DEBUG', $develop_src );
-	}
-
-	/**
-	 * Private
-	 */
-	if ( !defined('MEDIA_TRASH') )
-		define('MEDIA_TRASH', false);
-
-	if ( !defined('SHORTINIT') )
-		define('SHORTINIT', false);
-
-	// Constants for features added to WP that should short-circuit their plugin implementations
-	define( 'WP_FEATURE_BETTER_PASSWORDS', true );
-
-	/**#@+
-	 * Constants for expressing human-readable intervals
-	 * in their respective number of seconds.
-	 *
-	 * Please note that these values are approximate and are provided for convenience.
-	 * For example, MONTH_IN_SECONDS wrongly assumes every month has 30 days and
-	 * YEAR_IN_SECONDS does not take leap years into account.
-	 *
-	 * If you need more accuracy please consider using the DateTime class (https://secure.php.net/manual/en/class.datetime.php).
-	 *
-	 * @since 3.5.0
-	 * @since 4.4.0 Introduced `MONTH_IN_SECONDS`.
-	 */
-	define( 'MINUTE_IN_SECONDS', 60 );
-	define( 'HOUR_IN_SECONDS',   60 * MINUTE_IN_SECONDS );
-	define( 'DAY_IN_SECONDS',    24 * HOUR_IN_SECONDS   );
-	define( 'WEEK_IN_SECONDS',    7 * DAY_IN_SECONDS    );
-	define( 'MONTH_IN_SECONDS',  30 * DAY_IN_SECONDS    );
-	define( 'YEAR_IN_SECONDS',  365 * DAY_IN_SECONDS    );
-	/**#@-*/
-}
-
-/**
- * Defines plugin directory WordPress constants
- *
- * Defines must-use plugin directory constants, which may be overridden in the sunrise.php drop-in
- *
- * @since 3.0.0
- */
-function wp_plugin_directory_constants() {
-	if ( !defined('WP_CONTENT_URL') )
-		define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); // full url - WP_CONTENT_DIR is defined further up
-
-	/**
-	 * Allows for the plugins directory to be moved from the default location.
-	 *
-	 * @since 2.6.0
-	 */
-	if ( !defined('WP_PLUGIN_DIR') )
-		define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' ); // full path, no trailing slash
-
-	/**
-	 * Allows for the plugins directory to be moved from the default location.
-	 *
-	 * @since 2.6.0
-	 */
-	if ( !defined('WP_PLUGIN_URL') )
-		define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' ); // full url, no trailing slash
-
-	/**
-	 * Allows for the plugins directory to be moved from the default location.
-	 *
-	 * @since 2.1.0
-	 * @deprecated
-	 */
-	if ( !defined('PLUGINDIR') )
-		define( 'PLUGINDIR', 'wp-content/plugins' ); // Relative to ABSPATH. For back compat.
-
-	/**
-	 * Allows for the mu-plugins directory to be moved from the default location.
-	 *
-	 * @since 2.8.0
-	 */
-	if ( !defined('WPMU_PLUGIN_DIR') )
-		define( 'WPMU_PLUGIN_DIR', WP_CONTENT_DIR . '/mu-plugins' ); // full path, no trailing slash
-
-	/**
-	 * Allows for the mu-plugins directory to be moved from the default location.
-	 *
-	 * @since 2.8.0
-	 */
-	if ( !defined('WPMU_PLUGIN_URL') )
-		define( 'WPMU_PLUGIN_URL', WP_CONTENT_URL . '/mu-plugins' ); // full url, no trailing slash
-
-	/**
-	 * Allows for the mu-plugins directory to be moved from the default location.
-	 *
-	 * @since 2.8.0
-	 * @deprecated
-	 */
-	if ( !defined( 'MUPLUGINDIR' ) )
-		define( 'MUPLUGINDIR', 'wp-content/mu-plugins' ); // Relative to ABSPATH. For back compat.
-}
-
-/**
- * Defines cookie related WordPress constants
- *
- * Defines constants after multisite is loaded.
- * @since 3.0.0
- */
-function wp_cookie_constants() {
-	/**
-	 * Used to guarantee unique hash cookies
-	 *
-	 * @since 1.5.0
-	 */
-	if ( !defined( 'COOKIEHASH' ) ) {
-		$siteurl = get_site_option( 'siteurl' );
-		if ( $siteurl )
-			define( 'COOKIEHASH', md5( $siteurl ) );
-		else
-			define( 'COOKIEHASH', md5( wp_guess_url() ) );
-	}
-
-	/**
-	 * @since 2.0.0
-	 */
-	if ( !defined('USER_COOKIE') )
-		define('USER_COOKIE', 'wordpressuser_' . COOKIEHASH);
-
-	/**
-	 * @since 2.0.0
-	 */
-	if ( !defined('PASS_COOKIE') )
-		define('PASS_COOKIE', 'wordpresspass_' . COOKIEHASH);
-
-	/**
-	 * @since 2.5.0
-	 */
-	if ( !defined('AUTH_COOKIE') )
-		define('AUTH_COOKIE', 'wordpress_' . COOKIEHASH);
-
-	/**
-	 * @since 2.6.0
-	 */
-	if ( !defined('SECURE_AUTH_COOKIE') )
-		define('SECURE_AUTH_COOKIE', 'wordpress_sec_' . COOKIEHASH);
-
-	/**
-	 * @since 2.6.0
-	 */
-	if ( !defined('LOGGED_IN_COOKIE') )
-		define('LOGGED_IN_COOKIE', 'wordpress_logged_in_' . COOKIEHASH);
-
-	/**
-	 * @since 2.3.0
-	 */
-	if ( !defined('TEST_COOKIE') )
-		define('TEST_COOKIE', 'wordpress_test_cookie');
-
-	/**
-	 * @since 1.2.0
-	 */
-	if ( !defined('COOKIEPATH') )
-		define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('home') . '/' ) );
-
-	/**
-	 * @since 1.5.0
-	 */
-	if ( !defined('SITECOOKIEPATH') )
-		define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('siteurl') . '/' ) );
-
-	/**
-	 * @since 2.6.0
-	 */
-	if ( !defined('ADMIN_COOKIE_PATH') )
-		define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' );
-
-	/**
-	 * @since 2.6.0
-	 */
-	if ( !defined('PLUGINS_COOKIE_PATH') )
-		define( 'PLUGINS_COOKIE_PATH', preg_replace('|https?://[^/]+|i', '', WP_PLUGIN_URL)  );
-
-	/**
-	 * @since 2.0.0
-	 */
-	if ( !defined('COOKIE_DOMAIN') )
-		define('COOKIE_DOMAIN', false);
-}
-
-/**
- * Defines cookie related WordPress constants
- *
- * @since 3.0.0
- */
-function wp_ssl_constants() {
-	/**
-	 * @since 2.6.0
-	 */
-	if ( !defined( 'FORCE_SSL_ADMIN' ) ) {
-		if ( 'https' === parse_url( get_option( 'siteurl' ), PHP_URL_SCHEME ) ) {
-			define( 'FORCE_SSL_ADMIN', true );
-		} else {
-			define( 'FORCE_SSL_ADMIN', false );
-		}
-	}
-	force_ssl_admin( FORCE_SSL_ADMIN );
-
-	/**
-	 * @since 2.6.0
-	 * @deprecated 4.0.0
-	 */
-	if ( defined( 'FORCE_SSL_LOGIN' ) && FORCE_SSL_LOGIN ) {
-		force_ssl_admin( true );
-	}
-}
-
-/**
- * Defines functionality related WordPress constants
- *
- * @since 3.0.0
- */
-function wp_functionality_constants() {
-	/**
-	 * @since 2.5.0
-	 */
-	if ( !defined( 'AUTOSAVE_INTERVAL' ) )
-		define( 'AUTOSAVE_INTERVAL', 60 );
-
-	/**
-	 * @since 2.9.0
-	 */
-	if ( !defined( 'EMPTY_TRASH_DAYS' ) )
-		define( 'EMPTY_TRASH_DAYS', 30 );
-
-	if ( !defined('WP_POST_REVISIONS') )
-		define('WP_POST_REVISIONS', true);
-
-	/**
-	 * @since 3.3.0
-	 */
-	if ( !defined( 'WP_CRON_LOCK_TIMEOUT' ) )
-		define('WP_CRON_LOCK_TIMEOUT', 60);  // In seconds
-}
-
-/**
- * Defines templating related WordPress constants
- *
- * @since 3.0.0
- */
-function wp_templating_constants() {
-	/**
-	 * Filesystem path to the current active template directory
-	 * @since 1.5.0
-	 */
-	define('TEMPLATEPATH', get_template_directory());
-
-	/**
-	 * Filesystem path to the current active template stylesheet directory
-	 * @since 2.1.0
-	 */
-	define('STYLESHEETPATH', get_stylesheet_directory());
-
-	/**
-	 * Slug of the default theme for this install.
-	 * Used as the default theme when installing new sites.
-	 * It will be used as the fallback if the current theme doesn't exist.
-	 *
-	 * @since 3.0.0
-	 * @see WP_Theme::get_core_default_theme()
-	 */
-	if ( !defined('WP_DEFAULT_THEME') )
-		define( 'WP_DEFAULT_THEME', 'twentysixteen' );
-
-}
Index: www/wp-includes/rewrite.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/rewrite.php	(revision 38565)
+++ www/wp-includes/rewrite.php	(revision 38565)
@@ -1,599 +0,0 @@
-<?php
-/**
- * WordPress Rewrite API
- *
- * @package WordPress
- * @subpackage Rewrite
- */
-
-/**
- * Endpoint Mask for default, which is nothing.
- *
- * @since 2.1.0
- */
-define('EP_NONE', 0);
-
-/**
- * Endpoint Mask for Permalink.
- *
- * @since 2.1.0
- */
-define('EP_PERMALINK', 1);
-
-/**
- * Endpoint Mask for Attachment.
- *
- * @since 2.1.0
- */
-define('EP_ATTACHMENT', 2);
-
-/**
- * Endpoint Mask for date.
- *
- * @since 2.1.0
- */
-define('EP_DATE', 4);
-
-/**
- * Endpoint Mask for year
- *
- * @since 2.1.0
- */
-define('EP_YEAR', 8);
-
-/**
- * Endpoint Mask for month.
- *
- * @since 2.1.0
- */
-define('EP_MONTH', 16);
-
-/**
- * Endpoint Mask for day.
- *
- * @since 2.1.0
- */
-define('EP_DAY', 32);
-
-/**
- * Endpoint Mask for root.
- *
- * @since 2.1.0
- */
-define('EP_ROOT', 64);
-
-/**
- * Endpoint Mask for comments.
- *
- * @since 2.1.0
- */
-define('EP_COMMENTS', 128);
-
-/**
- * Endpoint Mask for searches.
- *
- * @since 2.1.0
- */
-define('EP_SEARCH', 256);
-
-/**
- * Endpoint Mask for categories.
- *
- * @since 2.1.0
- */
-define('EP_CATEGORIES', 512);
-
-/**
- * Endpoint Mask for tags.
- *
- * @since 2.3.0
- */
-define('EP_TAGS', 1024);
-
-/**
- * Endpoint Mask for authors.
- *
- * @since 2.1.0
- */
-define('EP_AUTHORS', 2048);
-
-/**
- * Endpoint Mask for pages.
- *
- * @since 2.1.0
- */
-define('EP_PAGES', 4096);
-
-/**
- * Endpoint Mask for all archive views.
- *
- * @since 3.7.0
- */
-define( 'EP_ALL_ARCHIVES', EP_DATE | EP_YEAR | EP_MONTH | EP_DAY | EP_CATEGORIES | EP_TAGS | EP_AUTHORS );
-
-/**
- * Endpoint Mask for everything.
- *
- * @since 2.1.0
- */
-define( 'EP_ALL', EP_PERMALINK | EP_ATTACHMENT | EP_ROOT | EP_COMMENTS | EP_SEARCH | EP_PAGES | EP_ALL_ARCHIVES );
-
-/**
- * Adds a rewrite rule that transforms a URL structure to a set of query vars.
- *
- * Any value in the $after parameter that isn't 'bottom' will result in the rule
- * being placed at the top of the rewrite rules.
- *
- * @since 2.1.0
- * @since 4.4.0 Array support was added to the `$query` parameter.
- *
- * @global WP_Rewrite $wp_rewrite WordPress Rewrite Component.
- *
- * @param string       $regex Regular expression to match request against.
- * @param string|array $query The corresponding query vars for this rewrite rule.
- * @param string       $after Optional. Priority of the new rule. Accepts 'top'
- *                            or 'bottom'. Default 'bottom'.
- */
-function add_rewrite_rule( $regex, $query, $after = 'bottom' ) {
-	global $wp_rewrite;
-
-	$wp_rewrite->add_rule( $regex, $query, $after );
-}
-
-/**
- * Add a new rewrite tag (like %postname%).
- *
- * The $query parameter is optional. If it is omitted you must ensure that
- * you call this on, or before, the {@see 'init'} hook. This is because $query defaults
- * to "$tag=", and for this to work a new query var has to be added.
- *
- * @since 2.1.0
- *
- * @global WP_Rewrite $wp_rewrite
- * @global WP         $wp
- *
- * @param string $tag   Name of the new rewrite tag.
- * @param string $regex Regular expression to substitute the tag for in rewrite rules.
- * @param string $query Optional. String to append to the rewritten query. Must end in '='. Default empty.
- */
-function add_rewrite_tag( $tag, $regex, $query = '' ) {
-	// validate the tag's name
-	if ( strlen( $tag ) < 3 || $tag[0] != '%' || $tag[ strlen($tag) - 1 ] != '%' )
-		return;
-
-	global $wp_rewrite, $wp;
-
-	if ( empty( $query ) ) {
-		$qv = trim( $tag, '%' );
-		$wp->add_query_var( $qv );
-		$query = $qv . '=';
-	}
-
-	$wp_rewrite->add_rewrite_tag( $tag, $regex, $query );
-}
-
-/**
- * Removes an existing rewrite tag (like %postname%).
- *
- * @since 4.5.0
- *
- * @global WP_Rewrite $wp_rewrite WordPress rewrite component.
- *
- * @param string $tag Name of the rewrite tag.
- */
-function remove_rewrite_tag( $tag ) {
-	global $wp_rewrite;
-	$wp_rewrite->remove_rewrite_tag( $tag );
-}
-
-/**
- * Add permalink structure.
- *
- * @since 3.0.0
- *
- * @see WP_Rewrite::add_permastruct()
- * @global WP_Rewrite $wp_rewrite WordPress rewrite component.
- *
- * @param string $name   Name for permalink structure.
- * @param string $struct Permalink structure.
- * @param array  $args   Optional. Arguments for building the rules from the permalink structure,
- *                       see WP_Rewrite::add_permastruct() for full details. Default empty array.
- */
-function add_permastruct( $name, $struct, $args = array() ) {
-	global $wp_rewrite;
-
-	// Back-compat for the old parameters: $with_front and $ep_mask.
-	if ( ! is_array( $args ) )
-		$args = array( 'with_front' => $args );
-	if ( func_num_args() == 4 )
-		$args['ep_mask'] = func_get_arg( 3 );
-
-	$wp_rewrite->add_permastruct( $name, $struct, $args );
-}
-
-/**
- * Removes a permalink structure.
- *
- * Can only be used to remove permastructs that were added using add_permastruct().
- * Built-in permastructs cannot be removed.
- *
- * @since 4.5.0
- *
- * @see WP_Rewrite::remove_permastruct()
- * @global WP_Rewrite $wp_rewrite WordPress rewrite component.
- *
- * @param string $name Name for permalink structure.
- */
-function remove_permastruct( $name ) {
-	global $wp_rewrite;
-
-	$wp_rewrite->remove_permastruct( $name );
-}
-
-/**
- * Add a new feed type like /atom1/.
- *
- * @since 2.1.0
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param string   $feedname Feed name.
- * @param callable $function Callback to run on feed display.
- * @return string Feed action name.
- */
-function add_feed( $feedname, $function ) {
-	global $wp_rewrite;
-
-	if ( ! in_array( $feedname, $wp_rewrite->feeds ) ) {
-		$wp_rewrite->feeds[] = $feedname;
-	}
-
-	$hook = 'do_feed_' . $feedname;
-
-	// Remove default function hook
-	remove_action( $hook, $hook );
-
-	add_action( $hook, $function, 10, 2 );
-
-	return $hook;
-}
-
-/**
- * Remove rewrite rules and then recreate rewrite rules.
- *
- * @since 3.0.0
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param bool $hard Whether to update .htaccess (hard flush) or just update
- * 	                 rewrite_rules transient (soft flush). Default is true (hard).
- */
-function flush_rewrite_rules( $hard = true ) {
-	global $wp_rewrite;
-	$wp_rewrite->flush_rules( $hard );
-}
-
-/**
- * Add an endpoint, like /trackback/.
- *
- * Adding an endpoint creates extra rewrite rules for each of the matching
- * places specified by the provided bitmask. For example:
- *
- *     add_rewrite_endpoint( 'json', EP_PERMALINK | EP_PAGES );
- *
- * will add a new rewrite rule ending with "json(/(.*))?/?$" for every permastruct
- * that describes a permalink (post) or page. This is rewritten to "json=$match"
- * where $match is the part of the URL matched by the endpoint regex (e.g. "foo" in
- * "[permalink]/json/foo/").
- *
- * A new query var with the same name as the endpoint will also be created.
- *
- * When specifying $places ensure that you are using the EP_* constants (or a
- * combination of them using the bitwise OR operator) as their values are not
- * guaranteed to remain static (especially `EP_ALL`).
- *
- * Be sure to flush the rewrite rules - see flush_rewrite_rules() - when your plugin gets
- * activated and deactivated.
- *
- * @since 2.1.0
- * @since 4.3.0 Added support for skipping query var registration by passing `false` to `$query_var`.
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param string      $name      Name of the endpoint.
- * @param int         $places    Endpoint mask describing the places the endpoint should be added.
- * @param string|bool $query_var Name of the corresponding query variable. Pass `false` to skip registering a query_var
- *                               for this endpoint. Defaults to the value of `$name`.
- */
-function add_rewrite_endpoint( $name, $places, $query_var = true ) {
-	global $wp_rewrite;
-	$wp_rewrite->add_endpoint( $name, $places, $query_var );
-}
-
-/**
- * Filters the URL base for taxonomies.
- *
- * To remove any manually prepended /index.php/.
- *
- * @access private
- * @since 2.6.0
- *
- * @param string $base The taxonomy base that we're going to filter
- * @return string
- */
-function _wp_filter_taxonomy_base( $base ) {
-	if ( !empty( $base ) ) {
-		$base = preg_replace( '|^/index\.php/|', '', $base );
-		$base = trim( $base, '/' );
-	}
-	return $base;
-}
-
-
-/**
- * Resolve numeric slugs that collide with date permalinks.
- *
- * Permalinks of posts with numeric slugs can sometimes look to WP_Query::parse_query()
- * like a date archive, as when your permalink structure is `/%year%/%postname%/` and
- * a post with post_name '05' has the URL `/2015/05/`.
- *
- * This function detects conflicts of this type and resolves them in favor of the
- * post permalink.
- *
- * Note that, since 4.3.0, wp_unique_post_slug() prevents the creation of post slugs
- * that would result in a date archive conflict. The resolution performed in this
- * function is primarily for legacy content, as well as cases when the admin has changed
- * the site's permalink structure in a way that introduces URL conflicts.
- *
- * @since 4.3.0
- *
- * @param array $query_vars Optional. Query variables for setting up the loop, as determined in
- *                          WP::parse_request(). Default empty array.
- * @return array Returns the original array of query vars, with date/post conflicts resolved.
- */
-function wp_resolve_numeric_slug_conflicts( $query_vars = array() ) {
-	if ( ! isset( $query_vars['year'] ) && ! isset( $query_vars['monthnum'] ) && ! isset( $query_vars['day'] ) ) {
-		return $query_vars;
-	}
-
-	// Identify the 'postname' position in the permastruct array.
-	$permastructs   = array_values( array_filter( explode( '/', get_option( 'permalink_structure' ) ) ) );
-	$postname_index = array_search( '%postname%', $permastructs );
-
-	if ( false === $postname_index ) {
-		return $query_vars;
-	}
-
-	/*
-	 * A numeric slug could be confused with a year, month, or day, depending on position. To account for
-	 * the possibility of post pagination (eg 2015/2 for the second page of a post called '2015'), our
-	 * `is_*` checks are generous: check for year-slug clashes when `is_year` *or* `is_month`, and check
-	 * for month-slug clashes when `is_month` *or* `is_day`.
-	 */
-	$compare = '';
-	if ( 0 === $postname_index && ( isset( $query_vars['year'] ) || isset( $query_vars['monthnum'] ) ) ) {
-		$compare = 'year';
-	} elseif ( '%year%' === $permastructs[ $postname_index - 1 ] && ( isset( $query_vars['monthnum'] ) || isset( $query_vars['day'] ) ) ) {
-		$compare = 'monthnum';
-	} elseif ( '%monthnum%' === $permastructs[ $postname_index - 1 ] && isset( $query_vars['day'] ) ) {
-		$compare = 'day';
-	}
-
-	if ( ! $compare ) {
-		return $query_vars;
-	}
-
-	// This is the potentially clashing slug.
-	$value = $query_vars[ $compare ];
-
-	$post = get_page_by_path( $value, OBJECT, 'post' );
-	if ( ! ( $post instanceof WP_Post ) ) {
-		return $query_vars;
-	}
-
-	// If the date of the post doesn't match the date specified in the URL, resolve to the date archive.
-	if ( preg_match( '/^([0-9]{4})\-([0-9]{2})/', $post->post_date, $matches ) && isset( $query_vars['year'] ) && ( 'monthnum' === $compare || 'day' === $compare ) ) {
-		// $matches[1] is the year the post was published.
-		if ( intval( $query_vars['year'] ) !== intval( $matches[1] ) ) {
-			return $query_vars;
-		}
-
-		// $matches[2] is the month the post was published.
-		if ( 'day' === $compare && isset( $query_vars['monthnum'] ) && intval( $query_vars['monthnum'] ) !== intval( $matches[2] ) ) {
-			return $query_vars;
-		}
-	}
-
-	/*
-	 * If the located post contains nextpage pagination, then the URL chunk following postname may be
-	 * intended as the page number. Verify that it's a valid page before resolving to it.
-	 */
-	$maybe_page = '';
-	if ( 'year' === $compare && isset( $query_vars['monthnum'] ) ) {
-		$maybe_page = $query_vars['monthnum'];
-	} elseif ( 'monthnum' === $compare && isset( $query_vars['day'] ) ) {
-		$maybe_page = $query_vars['day'];
-	}
-	// Bug found in #11694 - 'page' was returning '/4'
-	$maybe_page = (int) trim( $maybe_page, '/' );
-
-	$post_page_count = substr_count( $post->post_content, '<!--nextpage-->' ) + 1;
-
-	// If the post doesn't have multiple pages, but a 'page' candidate is found, resolve to the date archive.
-	if ( 1 === $post_page_count && $maybe_page ) {
-		return $query_vars;
-	}
-
-	// If the post has multiple pages and the 'page' number isn't valid, resolve to the date archive.
-	if ( $post_page_count > 1 && $maybe_page > $post_page_count ) {
-		return $query_vars;
-	}
-
-	// If we've gotten to this point, we have a slug/date clash. First, adjust for nextpage.
-	if ( '' !== $maybe_page ) {
-		$query_vars['page'] = intval( $maybe_page );
-	}
-
-	// Next, unset autodetected date-related query vars.
-	unset( $query_vars['year'] );
-	unset( $query_vars['monthnum'] );
-	unset( $query_vars['day'] );
-
-	// Then, set the identified post.
-	$query_vars['name'] = $post->post_name;
-
-	// Finally, return the modified query vars.
-	return $query_vars;
-}
-
-/**
- * Examine a URL and try to determine the post ID it represents.
- *
- * Checks are supposedly from the hosted site blog.
- *
- * @since 1.0.0
- *
- * @global WP_Rewrite $wp_rewrite
- * @global WP         $wp
- *
- * @param string $url Permalink to check.
- * @return int Post ID, or 0 on failure.
- */
-function url_to_postid( $url ) {
-	global $wp_rewrite;
-
-	/**
-	 * Filters the URL to derive the post ID from.
-	 *
-	 * @since 2.2.0
-	 *
-	 * @param string $url The URL to derive the post ID from.
-	 */
-	$url = apply_filters( 'url_to_postid', $url );
-
-	// First, check to see if there is a 'p=N' or 'page_id=N' to match against
-	if ( preg_match('#[?&](p|page_id|attachment_id)=(\d+)#', $url, $values) )	{
-		$id = absint($values[2]);
-		if ( $id )
-			return $id;
-	}
-
-	// Get rid of the #anchor
-	$url_split = explode('#', $url);
-	$url = $url_split[0];
-
-	// Get rid of URL ?query=string
-	$url_split = explode('?', $url);
-	$url = $url_split[0];
-
-	// Set the correct URL scheme.
-	$scheme = parse_url( home_url(), PHP_URL_SCHEME );
-	$url = set_url_scheme( $url, $scheme );
-
-	// Add 'www.' if it is absent and should be there
-	if ( false !== strpos(home_url(), '://www.') && false === strpos($url, '://www.') )
-		$url = str_replace('://', '://www.', $url);
-
-	// Strip 'www.' if it is present and shouldn't be
-	if ( false === strpos(home_url(), '://www.') )
-		$url = str_replace('://www.', '://', $url);
-
-	if ( trim( $url, '/' ) === home_url() && 'page' == get_option( 'show_on_front' ) ) {
-		$page_on_front = get_option( 'page_on_front' );
-
-		if ( $page_on_front && get_post( $page_on_front ) instanceof WP_Post ) {
-			return (int) $page_on_front;
-		}
-	}
-
-	// Check to see if we are using rewrite rules
-	$rewrite = $wp_rewrite->wp_rewrite_rules();
-
-	// Not using rewrite rules, and 'p=N' and 'page_id=N' methods failed, so we're out of options
-	if ( empty($rewrite) )
-		return 0;
-
-	// Strip 'index.php/' if we're not using path info permalinks
-	if ( !$wp_rewrite->using_index_permalinks() )
-		$url = str_replace( $wp_rewrite->index . '/', '', $url );
-
-	if ( false !== strpos( trailingslashit( $url ), home_url( '/' ) ) ) {
-		// Chop off http://domain.com/[path]
-		$url = str_replace(home_url(), '', $url);
-	} else {
-		// Chop off /path/to/blog
-		$home_path = parse_url( home_url( '/' ) );
-		$home_path = isset( $home_path['path'] ) ? $home_path['path'] : '' ;
-		$url = preg_replace( sprintf( '#^%s#', preg_quote( $home_path ) ), '', trailingslashit( $url ) );
-	}
-
-	// Trim leading and lagging slashes
-	$url = trim($url, '/');
-
-	$request = $url;
-	$post_type_query_vars = array();
-
-	foreach ( get_post_types( array() , 'objects' ) as $post_type => $t ) {
-		if ( ! empty( $t->query_var ) )
-			$post_type_query_vars[ $t->query_var ] = $post_type;
-	}
-
-	// Look for matches.
-	$request_match = $request;
-	foreach ( (array)$rewrite as $match => $query) {
-
-		// If the requesting file is the anchor of the match, prepend it
-		// to the path info.
-		if ( !empty($url) && ($url != $request) && (strpos($match, $url) === 0) )
-			$request_match = $url . '/' . $request;
-
-		if ( preg_match("#^$match#", $request_match, $matches) ) {
-
-			if ( $wp_rewrite->use_verbose_page_rules && preg_match( '/pagename=\$matches\[([0-9]+)\]/', $query, $varmatch ) ) {
-				// This is a verbose page match, let's check to be sure about it.
-				$page = get_page_by_path( $matches[ $varmatch[1] ] );
-				if ( ! $page ) {
-					continue;
-				}
-
-				$post_status_obj = get_post_status_object( $page->post_status );
-				if ( ! $post_status_obj->public && ! $post_status_obj->protected
-					&& ! $post_status_obj->private && $post_status_obj->exclude_from_search ) {
-					continue;
-				}
-			}
-
-			// Got a match.
-			// Trim the query of everything up to the '?'.
-			$query = preg_replace("!^.+\?!", '', $query);
-
-			// Substitute the substring matches into the query.
-			$query = addslashes(WP_MatchesMapRegex::apply($query, $matches));
-
-			// Filter out non-public query vars
-			global $wp;
-			parse_str( $query, $query_vars );
-			$query = array();
-			foreach ( (array) $query_vars as $key => $value ) {
-				if ( in_array( $key, $wp->public_query_vars ) ){
-					$query[$key] = $value;
-					if ( isset( $post_type_query_vars[$key] ) ) {
-						$query['post_type'] = $post_type_query_vars[$key];
-						$query['name'] = $value;
-					}
-				}
-			}
-
-			// Resolve conflicts between posts with numeric slugs and date archive queries.
-			$query = wp_resolve_numeric_slug_conflicts( $query );
-
-			// Do the query
-			$query = new WP_Query( $query );
-			if ( ! empty( $query->posts ) && $query->is_singular )
-				return $query->post->ID;
-			else
-				return 0;
-		}
-	}
-	return 0;
-}
Index: www/wp-includes/autoload/customize/class-wp-customize-new-menu-section.php
===================================================================
--- www/wp-includes/autoload/customize/class-wp-customize-new-menu-section.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/customize/class-wp-customize-new-menu-section.php	(revision UNDEFINED)
@@ -1,46 +0,0 @@
-<?php
-/**
- * Customize API: WP_Customize_New_Menu_Section class
- *
- * @package WordPress
- * @subpackage Customize
- * @since 4.4.0
- */
-
-/**
- * Customize Menu Section Class
- *
- * Implements the new-menu-ui toggle button instead of a regular section.
- *
- * @since 4.3.0
- *
- * @see WP_Customize_Section
- */
-class WP_Customize_New_Menu_Section extends WP_Customize_Section {
-
-	/**
-	 * Control type.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var string
-	 */
-	public $type = 'new_menu';
-
-	/**
-	 * Render the section, and the controls that have been added to it.
-	 *
-	 * @since 4.3.0
-	 * @access protected
-	 */
-	protected function render() {
-		?>
-		<li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="accordion-section-new-menu">
-			<button type="button" class="button-secondary add-new-menu-item add-menu-toggle" aria-expanded="false">
-				<?php echo esc_html( $this->title ); ?>
-			</button>
-			<ul class="new-menu-section-content"></ul>
-		</li>
-		<?php
-	}
-}
Index: www/wp-admin/export.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/export.php	(revision 38565)
+++ www/wp-admin/export.php	(revision 38565)
@@ -1,294 +0,0 @@
-<?php
-/**
- * WordPress Export Administration Screen
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** Load WordPress Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-if ( !current_user_can('export') )
-	wp_die(__('Sorry, you are not allowed to export the content of this site.'));
-
-/** Load WordPress export API */
-require_once( ABSPATH . 'wp-admin/includes/export.php' );
-$title = __('Export');
-
-/**
- * Display JavaScript on the page.
- *
- * @since 3.5.0
- */
-function export_add_js() {
-?>
-<script type="text/javascript">
-	jQuery(document).ready(function($){
- 		var form = $('#export-filters'),
- 			filters = form.find('.export-filters');
- 		filters.hide();
- 		form.find('input:radio').change(function() {
-			filters.slideUp('fast');
-			switch ( $(this).val() ) {
-				case 'attachment': $('#attachment-filters').slideDown(); break;
-				case 'posts': $('#post-filters').slideDown(); break;
-				case 'pages': $('#page-filters').slideDown(); break;
-			}
- 		});
-	});
-</script>
-<?php
-}
-add_action( 'admin_head', 'export_add_js' );
-
-get_current_screen()->add_help_tab( array(
-	'id'      => 'overview',
-	'title'   => __('Overview'),
-	'content' => '<p>' . __('You can export a file of your site&#8217;s content in order to import it into another installation or platform. The export file will be an XML file format called WXR. Posts, pages, comments, custom fields, categories, and tags can be included. You can choose for the WXR file to include only certain posts or pages by setting the dropdown filters to limit the export by category, author, date range by month, or publishing status.') . '</p>' .
-		'<p>' . __('Once generated, your WXR file can be imported by another WordPress site or by another blogging platform able to access this format.') . '</p>',
-) );
-
-get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Tools_Export_Screen" target="_blank">Documentation on Export</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
-);
-
-// If the 'download' URL parameter is set, a WXR export file is baked and returned.
-if ( isset( $_GET['download'] ) ) {
-	$args = array();
-
-	if ( ! isset( $_GET['content'] ) || 'all' == $_GET['content'] ) {
-		$args['content'] = 'all';
-	} elseif ( 'posts' == $_GET['content'] ) {
-		$args['content'] = 'post';
-
-		if ( $_GET['cat'] )
-			$args['category'] = (int) $_GET['cat'];
-
-		if ( $_GET['post_author'] )
-			$args['author'] = (int) $_GET['post_author'];
-
-		if ( $_GET['post_start_date'] || $_GET['post_end_date'] ) {
-			$args['start_date'] = $_GET['post_start_date'];
-			$args['end_date'] = $_GET['post_end_date'];
-		}
-
-		if ( $_GET['post_status'] )
-			$args['status'] = $_GET['post_status'];
-	} elseif ( 'pages' == $_GET['content'] ) {
-		$args['content'] = 'page';
-
-		if ( $_GET['page_author'] )
-			$args['author'] = (int) $_GET['page_author'];
-
-		if ( $_GET['page_start_date'] || $_GET['page_end_date'] ) {
-			$args['start_date'] = $_GET['page_start_date'];
-			$args['end_date'] = $_GET['page_end_date'];
-		}
-
-		if ( $_GET['page_status'] )
-			$args['status'] = $_GET['page_status'];
-	} elseif ( 'attachment' == $_GET['content'] ) {
-		$args['content'] = 'attachment';
-
-		if ( $_GET['attachment_start_date'] || $_GET['attachment_end_date'] ) {
-			$args['start_date'] = $_GET['attachment_start_date'];
-			$args['end_date'] = $_GET['attachment_end_date'];
-		}
-	}
-	else {
-		$args['content'] = $_GET['content'];
-	}
-
-	/**
-	 * Filters the export args.
-	 *
-	 * @since 3.5.0
-	 *
-	 * @param array $args The arguments to send to the exporter.
-	 */
-	$args = apply_filters( 'export_args', $args );
-
-	export_wp( $args );
-	die();
-}
-
-require_once( ABSPATH . 'wp-admin/admin-header.php' );
-
-/**
- * Create the date options fields for exporting a given post type.
- *
- * @global wpdb      $wpdb      WordPress database abstraction object.
- * @global WP_Locale $wp_locale Date and Time Locale object.
- *
- * @since 3.1.0
- *
- * @param string $post_type The post type. Default 'post'.
- */
-function export_date_options( $post_type = 'post' ) {
-	global $wpdb, $wp_locale;
-
-	$months = $wpdb->get_results( $wpdb->prepare( "
-		SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
-		FROM $wpdb->posts
-		WHERE post_type = %s AND post_status != 'auto-draft'
-		ORDER BY post_date DESC
-	", $post_type ) );
-
-	$month_count = count( $months );
-	if ( !$month_count || ( 1 == $month_count && 0 == $months[0]->month ) )
-		return;
-
-	foreach ( $months as $date ) {
-		if ( 0 == $date->year )
-			continue;
-
-		$month = zeroise( $date->month, 2 );
-		echo '<option value="' . $date->year . '-' . $month . '">' . $wp_locale->get_month( $month ) . ' ' . $date->year . '</option>';
-	}
-}
-?>
-
-<div class="wrap">
-<h1><?php echo esc_html( $title ); ?></h1>
-
-<p><?php _e('When you click the button below WordPress will create an XML file for you to save to your computer.'); ?></p>
-<p><?php _e('This format, which we call WordPress eXtended RSS or WXR, will contain your posts, pages, comments, custom fields, categories, and tags.'); ?></p>
-<p><?php _e('Once you&#8217;ve saved the download file, you can use the Import function in another WordPress installation to import the content from this site.'); ?></p>
-
-<h2><?php _e( 'Choose what to export' ); ?></h2>
-<form method="get" id="export-filters">
-<fieldset>
-<legend class="screen-reader-text"><?php _e( 'Content to export' ); ?></legend>
-<input type="hidden" name="download" value="true" />
-<p><label><input type="radio" name="content" value="all" checked="checked" aria-describedby="all-content-desc" /> <?php _e( 'All content' ); ?></label></p>
-<p class="description" id="all-content-desc"><?php _e( 'This will contain all of your posts, pages, comments, custom fields, terms, navigation menus, and custom posts.' ); ?></p>
-
-<p><label><input type="radio" name="content" value="posts" /> <?php _e( 'Posts' ); ?></label></p>
-<ul id="post-filters" class="export-filters">
-	<li>
-		<label><span class="label-responsive"><?php _e( 'Categories:' ); ?></span>
-		<?php wp_dropdown_categories( array( 'show_option_all' => __('All') ) ); ?>
-		</label>
-	</li>
-	<li>
-		<label><span class="label-responsive"><?php _e( 'Authors:' ); ?></span>
-		<?php
-		$authors = $wpdb->get_col( "SELECT DISTINCT post_author FROM {$wpdb->posts} WHERE post_type = 'post'" );
-		wp_dropdown_users( array(
-			'include' => $authors,
-			'name' => 'post_author',
-			'multi' => true,
-			'show_option_all' => __( 'All' ),
-			'show' => 'display_name_with_login',
-		) ); ?>
-		</label>
-	</li>
-	<li>
-		<fieldset>
-		<legend class="screen-reader-text"><?php _e( 'Date range:' ); ?></legend>
-		<label for="post-start-date" class="label-responsive"><?php _e( 'Start date:' ); ?></label>
-		<select name="post_start_date" id="post-start-date">
-			<option value="0"><?php _e( '&mdash; Select &mdash;' ); ?></option>
-			<?php export_date_options(); ?>
-		</select>
-		<label for="post-end-date" class="label-responsive"><?php _e( 'End date:' ); ?></label>
-		<select name="post_end_date" id="post-end-date">
-			<option value="0"><?php _e( '&mdash; Select &mdash;' ); ?></option>
-			<?php export_date_options(); ?>
-		</select>
-		</fieldset>
-	</li>
-	<li>
-		<label for="post-status" class="label-responsive"><?php _e( 'Status:' ); ?></label>
-		<select name="post_status" id="post-status">
-			<option value="0"><?php _e( 'All' ); ?></option>
-			<?php $post_stati = get_post_stati( array( 'internal' => false ), 'objects' );
-			foreach ( $post_stati as $status ) : ?>
-			<option value="<?php echo esc_attr( $status->name ); ?>"><?php echo esc_html( $status->label ); ?></option>
-			<?php endforeach; ?>
-		</select>
-	</li>
-</ul>
-
-<p><label><input type="radio" name="content" value="pages" /> <?php _e( 'Pages' ); ?></label></p>
-<ul id="page-filters" class="export-filters">
-	<li>
-		<label><span class="label-responsive"><?php _e( 'Authors:' ); ?></span>
-		<?php
-		$authors = $wpdb->get_col( "SELECT DISTINCT post_author FROM {$wpdb->posts} WHERE post_type = 'page'" );
-		wp_dropdown_users( array(
-			'include' => $authors,
-			'name' => 'page_author',
-			'multi' => true,
-			'show_option_all' => __( 'All' ),
-			'show' => 'display_name_with_login',
-		) ); ?>
-		</label>
-	</li>
-	<li>
-		<fieldset>
-		<legend class="screen-reader-text"><?php _e( 'Date range:' ); ?></legend>
-		<label for="page-start-date" class="label-responsive"><?php _e( 'Start date:' ); ?></label>
-		<select name="page_start_date" id="page-start-date">
-			<option value="0"><?php _e( '&mdash; Select &mdash;' ); ?></option>
-			<?php export_date_options( 'page' ); ?>
-		</select>
-		<label for="page-end-date" class="label-responsive"><?php _e( 'End date:' ); ?></label>
-		<select name="page_end_date" id="page-end-date">
-			<option value="0"><?php _e( '&mdash; Select &mdash;' ); ?></option>
-			<?php export_date_options( 'page' ); ?>
-		</select>
-		</fieldset>
-	</li>
-	<li>
-		<label for="page-status" class="label-responsive"><?php _e( 'Status:' ); ?></label>
-		<select name="page_status" id="page-status">
-			<option value="0"><?php _e( 'All' ); ?></option>
-			<?php foreach ( $post_stati as $status ) : ?>
-			<option value="<?php echo esc_attr( $status->name ); ?>"><?php echo esc_html( $status->label ); ?></option>
-			<?php endforeach; ?>
-		</select>
-	</li>
-</ul>
-
-<?php foreach ( get_post_types( array( '_builtin' => false, 'can_export' => true ), 'objects' ) as $post_type ) : ?>
-<p><label><input type="radio" name="content" value="<?php echo esc_attr( $post_type->name ); ?>" /> <?php echo esc_html( $post_type->label ); ?></label></p>
-<?php endforeach; ?>
-
-<p><label><input type="radio" name="content" value="attachment" /> <?php _e( 'Media' ); ?></label></p>
-<ul id="attachment-filters" class="export-filters">
-	<li>
-		<fieldset>
-		<legend class="screen-reader-text"><?php _e( 'Date range:' ); ?></legend>
-		<label for="attachment-start-date" class="label-responsive"><?php _e( 'Start date:' ); ?></label>
-		<select name="attachment_start_date" id="attachment-start-date">
-			<option value="0"><?php _e( '&mdash; Select &mdash;' ); ?></option>
-			<?php export_date_options( 'attachment' ); ?>
-		</select>
-		<label for="attachment-end-date" class="label-responsive"><?php _e( 'End date:' ); ?></label>
-		<select name="attachment_end_date" id="attachment-end-date">
-			<option value="0"><?php _e( '&mdash; Select &mdash;' ); ?></option>
-			<?php export_date_options( 'attachment' ); ?>
-		</select>
-		</fieldset>
-	</li>
-</ul>
-
-</fieldset>
-<?php
-/**
- * Fires at the end of the export filters form.
- *
- * @since 3.5.0
- */
-do_action( 'export_filters' );
-?>
-
-<?php submit_button( __('Download Export File') ); ?>
-</form>
-</div>
-
-<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>
Index: www/wp-admin/credits.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/credits.php	(revision 38565)
+++ www/wp-admin/credits.php	(revision 38565)
@@ -1,125 +0,0 @@
-<?php
-/**
- * Credits administration panel.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-require_once( dirname( __FILE__ ) . '/includes/credits.php' );
-
-$title = __( 'Credits' );
-
-list( $display_version ) = explode( '-', get_bloginfo( 'version' ) );
-
-include( ABSPATH . 'wp-admin/admin-header.php' );
-?>
-<div class="wrap about-wrap">
-
-<h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
-
-<p class="about-text"><?php printf( __( 'Thank you for updating to the latest version. WordPress %s changes a lot behind the scenes to make your WordPress experience even better!' ), $display_version ); ?></p>
-
-<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
-
-<h2 class="nav-tab-wrapper wp-clearfix">
-	<a href="about.php" class="nav-tab"><?php _e( 'What&#8217;s New' ); ?></a>
-	<a href="credits.php" class="nav-tab nav-tab-active"><?php _e( 'Credits' ); ?></a>
-	<a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a>
-</h2>
-
-<?php
-
-$credits = wp_credits();
-
-if ( ! $credits ) {
-	echo '<p class="about-description">';
-	/* translators: 1: https://wordpress.org/about/, 2: https://make.wordpress.org/ */
-	printf( __( 'WordPress is created by a <a href="%1$s">worldwide team</a> of passionate individuals. <a href="%2$s">Get involved in WordPress</a>.' ),
-		'https://wordpress.org/about/',
-		__( 'https://make.wordpress.org/' )
-	);
-	echo '</p>';
-	echo '</div>';
-	include( ABSPATH . 'wp-admin/admin-footer.php' );
-	exit;
-}
-
-echo '<p class="about-description">' . __( 'WordPress is created by a worldwide team of passionate individuals.' ) . "</p>\n";
-
-foreach ( $credits['groups'] as $group_slug => $group_data ) {
-	if ( $group_data['name'] ) {
-		if ( 'Translators' == $group_data['name'] ) {
-			// Considered a special slug in the API response. (Also, will never be returned for en_US.)
-			$title = _x( 'Translators', 'Translate this to be the equivalent of English Translators in your language for the credits page Translators section' );
-		} elseif ( isset( $group_data['placeholders'] ) ) {
-			$title = vsprintf( translate( $group_data['name'] ), $group_data['placeholders'] );
-		} else {
-			$title = translate( $group_data['name'] );
-		}
-
-		echo '<h3 class="wp-people-group">' . esc_html( $title ) . "</h3>\n";
-	}
-
-	if ( ! empty( $group_data['shuffle'] ) )
-		shuffle( $group_data['data'] ); // We were going to sort by ability to pronounce "hierarchical," but that wouldn't be fair to Matt.
-
-	switch ( $group_data['type'] ) {
-		case 'list' :
-			array_walk( $group_data['data'], '_wp_credits_add_profile_link', $credits['data']['profiles'] );
-			echo '<p class="wp-credits-list">' . wp_sprintf( '%l.', $group_data['data'] ) . "</p>\n\n";
-			break;
-		case 'libraries' :
-			array_walk( $group_data['data'], '_wp_credits_build_object_link' );
-			echo '<p class="wp-credits-list">' . wp_sprintf( '%l.', $group_data['data'] ) . "</p>\n\n";
-			break;
-		default:
-			$compact = 'compact' == $group_data['type'];
-			$classes = 'wp-people-group ' . ( $compact ? 'compact' : '' );
-			echo '<ul class="' . $classes . '" id="wp-people-group-' . $group_slug . '">' . "\n";
-			foreach ( $group_data['data'] as $person_data ) {
-				echo '<li class="wp-person" id="wp-person-' . esc_attr( $person_data[2] ) . '">' . "\n\t";
-				echo '<a href="' . esc_url( sprintf( $credits['data']['profiles'], $person_data[2] ) ) . '" class="web">';
-				$size = 'compact' == $group_data['type'] ? 30 : 60;
-				$data = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size ) );
-				$size *= 2;
-				$data2x = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size ) );
-				echo '<img src="' . esc_url( $data['url'] ) . '" srcset="' . esc_url( $data2x['url'] ) . ' 2x" class="gravatar" alt="" />' . "\n";
-				echo esc_html( $person_data[0] ) . "</a>\n\t";
-				if ( ! $compact )
-					echo '<span class="title">' . translate( $person_data[3] ) . "</span>\n";
-				echo "</li>\n";
-			}
-			echo "</ul>\n";
-		break;
-	}
-}
-
-?>
-<p class="clear"><?php
-	/* translators: %s: https://make.wordpress.org/ */
-	printf( __( 'Want to see your name in lights on this page? <a href="%s">Get involved in WordPress</a>.' ),
-		__( 'https://make.wordpress.org/' )
-	);
-?></p>
-
-</div>
-<?php
-
-include( ABSPATH . 'wp-admin/admin-footer.php' );
-
-return;
-
-// These are strings returned by the API that we want to be translatable
-__( 'Project Leaders' );
-__( 'Core Contributors to WordPress %s' );
-__( 'Contributing Developers' );
-__( 'Cofounder, Project Lead' );
-__( 'Lead Developer' );
-__( 'Release Lead' );
-__( 'Release Design Lead' );
-__( 'Release Deputy' );
-__( 'Core Developer' );
-__( 'External Libraries' );
Index: www/wp-includes/Requests/Exception/HTTP.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/options-general.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/options-general.php	(revision 38565)
+++ www/wp-admin/options-general.php	(revision 38565)
@@ -1,373 +0,0 @@
-<?php
-/**
- * General settings administration panel.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-/** WordPress Translation Install API */
-require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
-
-if ( ! current_user_can( 'manage_options' ) )
-	wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
-
-$title = __('General Settings');
-$parent_file = 'options-general.php';
-/* translators: date and time format for exact current time, mainly about timezones, see https://secure.php.net/date */
-$timezone_format = _x('Y-m-d H:i:s', 'timezone date format');
-
-add_action('admin_head', 'options_general_add_js');
-
-$options_help = '<p>' . __('The fields on this screen determine some of the basics of your site setup.') . '</p>' .
-	'<p>' . __('Most themes display the site title at the top of every page, in the title bar of the browser, and as the identifying name for syndicated feeds. The tagline is also displayed by many themes.') . '</p>';
-
-if ( ! is_multisite() ) {
-	$options_help .= '<p>' . __('The WordPress URL and the Site URL can be the same (example.com) or different; for example, having the WordPress core files (example.com/wordpress) in a subdirectory instead of the root directory.') . '</p>' .
-		'<p>' . __('If you want site visitors to be able to register themselves, as opposed to by the site administrator, check the membership box. A default user role can be set for all new users, whether self-registered or registered by the site admin.') . '</p>';
-}
-
-$options_help .= '<p>' . __( 'You can set the language, and the translation files will be automatically downloaded and installed (available if your filesystem is writable).' ) . '</p>' .
-	'<p>' . __( 'UTC means Coordinated Universal Time.' ) . '</p>' .
-	'<p>' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '</p>';
-
-get_current_screen()->add_help_tab( array(
-	'id'      => 'overview',
-	'title'   => __('Overview'),
-	'content' => $options_help,
-) );
-
-get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Settings_General_Screen" target="_blank">Documentation on General Settings</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
-);
-
-include( ABSPATH . 'wp-admin/admin-header.php' );
-?>
-
-<div class="wrap">
-<h1><?php echo esc_html( $title ); ?></h1>
-
-<form method="post" action="options.php" novalidate="novalidate">
-<?php settings_fields('general'); ?>
-
-<table class="form-table">
-<tr>
-<th scope="row"><label for="blogname"><?php _e('Site Title') ?></label></th>
-<td><input name="blogname" type="text" id="blogname" value="<?php form_option('blogname'); ?>" class="regular-text" /></td>
-</tr>
-<tr>
-<th scope="row"><label for="blogdescription"><?php _e('Tagline') ?></label></th>
-<td><input name="blogdescription" type="text" id="blogdescription" aria-describedby="tagline-description" value="<?php form_option('blogdescription'); ?>" class="regular-text" />
-<p class="description" id="tagline-description"><?php _e( 'In a few words, explain what this site is about.' ) ?></p></td>
-</tr>
-<?php if ( !is_multisite() ) { ?>
-<tr>
-<th scope="row"><label for="siteurl"><?php _e('WordPress Address (URL)') ?></label></th>
-<td><input name="siteurl" type="url" id="siteurl" value="<?php form_option( 'siteurl' ); ?>"<?php disabled( defined( 'WP_SITEURL' ) ); ?> class="regular-text code<?php if ( defined( 'WP_SITEURL' ) ) echo ' disabled' ?>" /></td>
-</tr>
-<tr>
-<th scope="row"><label for="home"><?php _e('Site Address (URL)') ?></label></th>
-<td><input name="home" type="url" id="home" aria-describedby="home-description" value="<?php form_option( 'home' ); ?>"<?php disabled( defined( 'WP_HOME' ) ); ?> class="regular-text code<?php if ( defined( 'WP_HOME' ) ) echo ' disabled' ?>" />
-<?php if ( ! defined( 'WP_HOME' ) ) : ?>
-<p class="description" id="home-description"><?php _e( 'Enter the address here if you <a href="https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">want your site home page to be different from your WordPress installation directory.</a>' ); ?></p></td>
-<?php endif; ?>
-</tr>
-<tr>
-<th scope="row"><label for="admin_email"><?php _e('Email Address') ?> </label></th>
-<td><input name="admin_email" type="email" id="admin_email" aria-describedby="admin-email-description" value="<?php form_option( 'admin_email' ); ?>" class="regular-text ltr" />
-<p class="description" id="admin-email-description"><?php _e( 'This address is used for admin purposes, like new user notification.' ) ?></p></td>
-</tr>
-<tr>
-<th scope="row"><?php _e('Membership') ?></th>
-<td> <fieldset><legend class="screen-reader-text"><span><?php _e('Membership') ?></span></legend><label for="users_can_register">
-<input name="users_can_register" type="checkbox" id="users_can_register" value="1" <?php checked('1', get_option('users_can_register')); ?> />
-<?php _e('Anyone can register') ?></label>
-</fieldset></td>
-</tr>
-<tr>
-<th scope="row"><label for="default_role"><?php _e('New User Default Role') ?></label></th>
-<td>
-<select name="default_role" id="default_role"><?php wp_dropdown_roles( get_option('default_role') ); ?></select>
-</td>
-</tr>
-<?php } else { ?>
-<tr>
-<th scope="row"><label for="new_admin_email"><?php _e('Email Address') ?> </label></th>
-<td><input name="new_admin_email" type="email" id="new_admin_email" aria-describedby="new-admin-email-description" value="<?php form_option( 'admin_email' ); ?>" class="regular-text ltr" />
-<p class="description" id="new-admin-email-description"><?php _e( 'This address is used for admin purposes. If you change this we will send you an email at your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>' ) ?></p>
-<?php
-$new_admin_email = get_option( 'new_admin_email' );
-if ( $new_admin_email && $new_admin_email != get_option('admin_email') ) : ?>
-<div class="updated inline">
-<p><?php
-	printf(
-		/* translators: %s: new admin email */
-		__( 'There is a pending change of the admin email to %s.' ),
-		'<code>' . esc_html( $new_admin_email ) . '</code>'
-	);
-	printf(
-		' <a href="%1$s">%2$s</a>',
-		esc_url( wp_nonce_url( admin_url( 'options.php?dismiss=new_admin_email' ), 'dismiss-' . get_current_blog_id() . '-new_admin_email' ) ),
-		__( 'Cancel' )
-	);
-?></p>
-</div>
-<?php endif; ?>
-</td>
-</tr>
-<?php } ?>
-<tr>
-<?php
-$current_offset = get_option('gmt_offset');
-$tzstring = get_option('timezone_string');
-
-$check_zone_info = true;
-
-// Remove old Etc mappings. Fallback to gmt_offset.
-if ( false !== strpos($tzstring,'Etc/GMT') )
-	$tzstring = '';
-
-if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists
-	$check_zone_info = false;
-	if ( 0 == $current_offset )
-		$tzstring = 'UTC+0';
-	elseif ($current_offset < 0)
-		$tzstring = 'UTC' . $current_offset;
-	else
-		$tzstring = 'UTC+' . $current_offset;
-}
-
-?>
-<th scope="row"><label for="timezone_string"><?php _e('Timezone') ?></label></th>
-<td>
-
-<select id="timezone_string" name="timezone_string" aria-describedby="timezone-description">
-<?php echo wp_timezone_choice($tzstring); ?>
-</select>
-
-<p class="description" id="timezone-description"><?php _e( 'Choose either a city in the same timezone as you or a UTC timezone offset.' ); ?></p>
-
-<p class="timezone-info">
-	<span id="utc-time"><?php
-		/* translators: 1: UTC abbreviation, 2: UTC time */
-		printf( __( 'Universal time (%1$s) is %2$s.' ),
-			'<abbr>' . __( 'UTC' ) . '</abbr>',
-			'<code>' . date_i18n( $timezone_format, false, true ) . '</code>'
-		);
-	?></span>
-<?php if ( get_option( 'timezone_string' ) || ! empty( $current_offset ) ) : ?>
-	<span id="local-time"><?php
-		/* translators: %s: local time */
-		printf( __( 'Local time is %s.' ),
-			'<code>' . date_i18n( $timezone_format ) . '</code>'
-		);
-	?></span>
-<?php endif; ?>
-</p>
-
-<?php if ( $check_zone_info && $tzstring ) : ?>
-<p class="timezone-info">
-<span>
-	<?php
-	// Set TZ so localtime works.
-	date_default_timezone_set($tzstring);
-	$now = localtime(time(), true);
-	if ( $now['tm_isdst'] )
-		_e('This timezone is currently in daylight saving time.');
-	else
-		_e('This timezone is currently in standard time.');
-	?>
-	<br />
-	<?php
-	$allowed_zones = timezone_identifiers_list();
-
-	if ( in_array( $tzstring, $allowed_zones) ) {
-		$found = false;
-		$date_time_zone_selected = new DateTimeZone($tzstring);
-		$tz_offset = timezone_offset_get($date_time_zone_selected, date_create());
-		$right_now = time();
-		foreach ( timezone_transitions_get($date_time_zone_selected) as $tr) {
-			if ( $tr['ts'] > $right_now ) {
-			    $found = true;
-				break;
-			}
-		}
-
-		if ( $found ) {
-			echo ' ';
-			$message = $tr['isdst'] ?
-				/* translators: %s: date and time  */
-				__( 'Daylight saving time begins on: %s.')  :
-				/* translators: %s: date and time  */
-				__( 'Standard time begins on: %s.' );
-			// Add the difference between the current offset and the new offset to ts to get the correct transition time from date_i18n().
-			printf( $message,
-				'<code>' . date_i18n(
-					__( 'F j, Y' ) . ' ' . __( 'g:i a' ),
-					$tr['ts'] + ( $tz_offset - $tr['offset'] )
-				) . '</code>'
-			);
-		} else {
-			_e( 'This timezone does not observe daylight saving time.' );
-		}
-	}
-	// Set back to UTC.
-	date_default_timezone_set('UTC');
-	?>
-	</span>
-</p>
-<?php endif; ?>
-</td>
-
-</tr>
-<tr>
-<th scope="row"><?php _e('Date Format') ?></th>
-<td>
-	<fieldset><legend class="screen-reader-text"><span><?php _e('Date Format') ?></span></legend>
-<?php
-	/**
-	* Filters the default date formats.
-	*
-	* @since 2.7.0
-	* @since 4.0.0 Added ISO date standard YYYY-MM-DD format.
-	*
-	* @param array $default_date_formats Array of default date formats.
-	*/
-	$date_formats = array_unique( apply_filters( 'date_formats', array( __( 'F j, Y' ), 'Y-m-d', 'm/d/Y', 'd/m/Y' ) ) );
-
-	$custom = true;
-
-	foreach ( $date_formats as $format ) {
-		echo "\t<label><input type='radio' name='date_format' value='" . esc_attr( $format ) . "'";
-		if ( get_option('date_format') === $format ) { // checked() uses "==" rather than "==="
-			echo " checked='checked'";
-			$custom = false;
-		}
-		echo ' /> <span class="date-time-text format-i18n">' . date_i18n( $format ) . '</span><code>' . esc_html( $format ) . "</code></label><br />\n";
-	}
-
-	echo '<label><input type="radio" name="date_format" id="date_format_custom_radio" value="\c\u\s\t\o\m"';
-	checked( $custom );
-	echo '/> <span class="date-time-text date-time-custom-text">' . __( 'Custom:' ) . '<span class="screen-reader-text"> ' . __( 'enter a custom date format in the following field' ) . '</span></label>' .
-		'<label for="date_format_custom" class="screen-reader-text">' . __( 'Custom date format:' ) . '</label>' .
-		'<input type="text" name="date_format_custom" id="date_format_custom" value="' . esc_attr( get_option( 'date_format' ) ) . '" class="small-text" /></span>' .
-		'<span class="screen-reader-text">' . __( 'example:' ) . ' </span> <span class="example">' . date_i18n( get_option( 'date_format' ) ) . '</span>' .
-		"<span class='spinner'></span>\n";
-?>
-	</fieldset>
-</td>
-</tr>
-<tr>
-<th scope="row"><?php _e('Time Format') ?></th>
-<td>
-	<fieldset><legend class="screen-reader-text"><span><?php _e('Time Format') ?></span></legend>
-<?php
-	/**
-	* Filters the default time formats.
-	*
-	* @since 2.7.0
-	*
-	* @param array $default_time_formats Array of default time formats.
-	*/
-	$time_formats = array_unique( apply_filters( 'time_formats', array( __( 'g:i a' ), 'g:i A', 'H:i' ) ) );
-
-	$custom = true;
-
-	foreach ( $time_formats as $format ) {
-		echo "\t<label><input type='radio' name='time_format' value='" . esc_attr( $format ) . "'";
-		if ( get_option('time_format') === $format ) { // checked() uses "==" rather than "==="
-			echo " checked='checked'";
-			$custom = false;
-		}
-		echo ' /> <span class="date-time-text format-i18n">' . date_i18n( $format ) . '</span><code>' . esc_html( $format ) . "</code></label><br />\n";
-	}
-
-	echo '<label><input type="radio" name="time_format" id="time_format_custom_radio" value="\c\u\s\t\o\m"';
-	checked( $custom );
-	echo '/> <span class="date-time-text date-time-custom-text">' . __( 'Custom:' ) . '<span class="screen-reader-text"> ' . __( 'enter a custom time format in the following field' ) . '</span></label>' .
-		'<label for="time_format_custom" class="screen-reader-text">' . __( 'Custom time format:' ) . '</label>' .
-		'<input type="text" name="time_format_custom" id="time_format_custom" value="' . esc_attr( get_option( 'time_format' ) ) . '" class="small-text" /></span>' .
-		'<span class="screen-reader-text">' . __( 'example:' ) . ' </span> <span class="example">' . date_i18n( get_option( 'time_format' ) ) . '</span>' .
-		"<span class='spinner'></span>\n";
-
-	echo "\t<p class='date-time-doc'>" . __('<a href="https://codex.wordpress.org/Formatting_Date_and_Time">Documentation on date and time formatting</a>.') . "</p>\n";
-?>
-	</fieldset>
-</td>
-</tr>
-<tr>
-<th scope="row"><label for="start_of_week"><?php _e('Week Starts On') ?></label></th>
-<td><select name="start_of_week" id="start_of_week">
-<?php
-/**
- * @global WP_Locale $wp_locale
- */
-global $wp_locale;
-
-for ($day_index = 0; $day_index <= 6; $day_index++) :
-	$selected = (get_option('start_of_week') == $day_index) ? 'selected="selected"' : '';
-	echo "\n\t<option value='" . esc_attr($day_index) . "' $selected>" . $wp_locale->get_weekday($day_index) . '</option>';
-endfor;
-?>
-</select></td>
-</tr>
-<?php do_settings_fields('general', 'default'); ?>
-
-<?php
-$languages = get_available_languages();
-$translations = wp_get_available_translations();
-if ( ! is_multisite() && defined( 'WPLANG' ) && '' !== WPLANG && 'en_US' !== WPLANG && ! in_array( WPLANG, $languages ) ) {
-	$languages[] = WPLANG;
-}
-if ( ! empty( $languages ) || ! empty( $translations ) ) {
-	?>
-	<tr>
-		<th width="33%" scope="row"><label for="WPLANG"><?php _e( 'Site Language' ); ?></label></th>
-		<td>
-			<?php
-			$locale = get_locale();
-			if ( ! in_array( $locale, $languages ) ) {
-				$locale = '';
-			}
-
-			wp_dropdown_languages( array(
-				'name'         => 'WPLANG',
-				'id'           => 'WPLANG',
-				'selected'     => $locale,
-				'languages'    => $languages,
-				'translations' => $translations,
-				'show_available_translations' => ( ! is_multisite() || is_super_admin() ) && wp_can_install_language_pack(),
-			) );
-
-			// Add note about deprecated WPLANG constant.
-			if ( defined( 'WPLANG' ) && ( '' !== WPLANG ) && $locale !== WPLANG ) {
-				if ( is_super_admin() ) {
-					?>
-					<p class="description">
-						<strong><?php _e( 'Note:' ); ?></strong> <?php printf( __( 'The %s constant in your %s file is no longer needed.' ), '<code>WPLANG</code>', '<code>wp-config.php</code>' ); ?>
-					</p>
-					<?php
-				}
-				_deprecated_argument( 'define()', '4.0.0', sprintf( __( 'The %s constant in your %s file is no longer needed.' ), 'WPLANG', 'wp-config.php' ) );
-			}
-			?>
-		</td>
-	</tr>
-	<?php
-}
-?>
-</table>
-
-<?php do_settings_sections('general'); ?>
-
-<?php submit_button(); ?>
-</form>
-
-</div>
-
-<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>
Index: www/wp-includes/class-wp-metadata-lazyloader.php
===================================================================
--- www/wp-includes/class-wp-metadata-lazyloader.php	(revision 38565)
+++ www/wp-includes/autoload/WP_Metadata_Lazyloader.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/Requests/Exception/HTTP/503.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/503.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_503.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-user-query.php
===================================================================
--- www/wp-includes/class-wp-user-query.php	(revision 38565)
+++ www/wp-includes/autoload/query/WP_User_Query.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/SimplePie/Cache/MySQL.php
===================================================================
--- www/wp-includes/SimplePie/Cache/MySQL.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_Cache_MySQL.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/SimplePie/XML/Declaration/Parser.php
===================================================================
--- www/wp-includes/SimplePie/XML/Declaration/Parser.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_XML_Declaration_Parser.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/link-manager.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/link-manager.php	(revision 38565)
+++ www/wp-admin/link-manager.php	(revision 38565)
@@ -1,106 +0,0 @@
-<?php
-/**
- * Link Management Administration Screen.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** Load WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-if ( ! current_user_can( 'manage_links' ) )
-	wp_die( __( 'Sorry, you are not allowed to edit the links for this site.' ) );
-
-$wp_list_table = _get_list_table('WP_Links_List_Table');
-
-// Handle bulk deletes
-$doaction = $wp_list_table->current_action();
-
-if ( $doaction && isset( $_REQUEST['linkcheck'] ) ) {
-	check_admin_referer( 'bulk-bookmarks' );
-
-	if ( 'delete' == $doaction ) {
-		$bulklinks = (array) $_REQUEST['linkcheck'];
-		foreach ( $bulklinks as $link_id ) {
-			$link_id = (int) $link_id;
-
-			wp_delete_link( $link_id );
-		}
-
-		wp_redirect( add_query_arg('deleted', count( $bulklinks ), admin_url( 'link-manager.php' ) ) );
-		exit;
-	}
-} elseif ( ! empty( $_GET['_wp_http_referer'] ) ) {
-	 wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
-	 exit;
-}
-
-$wp_list_table->prepare_items();
-
-$title = __('Links');
-$this_file = $parent_file = 'link-manager.php';
-
-get_current_screen()->add_help_tab( array(
-'id'		=> 'overview',
-'title'		=> __('Overview'),
-'content'	=>
-	'<p>' . sprintf(__('You can add links here to be displayed on your site, usually using <a href="%s">Widgets</a>. By default, links to several sites in the WordPress community are included as examples.'), 'widgets.php') . '</p>' .
-    '<p>' . __('Links may be separated into Link Categories; these are different than the categories used on your posts.') . '</p>' .
-    '<p>' . __('You can customize the display of this screen using the Screen Options tab and/or the dropdown filters above the links table.') . '</p>'
-) );
-get_current_screen()->add_help_tab( array(
-'id'		=> 'deleting-links',
-'title'		=> __('Deleting Links'),
-'content'	=>
-    '<p>' . __('If you delete a link, it will be removed permanently, as Links do not have a Trash function yet.') . '</p>'
-) );
-
-get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Links_Screen" target="_blank">Documentation on Managing Links</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
-);
-
-get_current_screen()->set_screen_reader_content( array(
-	'heading_list' => __( 'Links list' ),
-) );
-
-include_once( ABSPATH . 'wp-admin/admin-header.php' );
-
-if ( ! current_user_can('manage_links') )
-	wp_die(__('Sorry, you are not allowed to edit the links for this site.'));
-
-?>
-
-<div class="wrap nosubsub">
-<h1><?php echo esc_html( $title ); ?> <a href="link-add.php" class="page-title-action"><?php echo esc_html_x('Add New', 'link'); ?></a> <?php
-if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
-	/* translators: %s: search keywords */
-	printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( wp_unslash( $_REQUEST['s'] ) ) );
-}
-?>
-</h1>
-
-<?php
-if ( isset($_REQUEST['deleted']) ) {
-	echo '<div id="message" class="updated notice is-dismissible"><p>';
-	$deleted = (int) $_REQUEST['deleted'];
-	printf(_n('%s link deleted.', '%s links deleted', $deleted), $deleted);
-	echo '</p></div>';
-	$_SERVER['REQUEST_URI'] = remove_query_arg(array('deleted'), $_SERVER['REQUEST_URI']);
-}
-?>
-
-<form id="posts-filter" method="get">
-
-<?php $wp_list_table->search_box( __( 'Search Links' ), 'link' ); ?>
-
-<?php $wp_list_table->display(); ?>
-
-<div id="ajax-response"></div>
-</form>
-
-</div>
-
-<?php
-include( ABSPATH . 'wp-admin/admin-footer.php' );
Index: www/wp-includes/ID3/module.audio.ac3.php
===================================================================
--- www/wp-includes/ID3/module.audio.ac3.php	(revision 38565)
+++ www/wp-includes/autoload/id3/getid3_ac3.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/SimplePie/Decode/HTML/Entities.php
===================================================================
--- www/wp-includes/SimplePie/Decode/HTML/Entities.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_Decode_HTML_Entities.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-hook.php
===================================================================
--- www/wp-includes/class-wp-hook.php	(revision 38565)
+++ www/wp-includes/autoload/WP_Hook.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/customize/class-wp-customize-header-image-control.php
===================================================================
--- www/wp-includes/autoload/customize/class-wp-customize-header-image-control.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/customize/class-wp-customize-header-image-control.php	(revision UNDEFINED)
@@ -1,224 +0,0 @@
-<?php
-/**
- * Customize API: WP_Customize_Header_Image_Control class
- *
- * @package WordPress
- * @subpackage Customize
- * @since 4.4.0
- */
-
-/**
- * Customize Header Image Control class.
- *
- * @since 3.4.0
- *
- * @see WP_Customize_Image_Control
- */
-class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
-	public $type = 'header';
-	public $uploaded_headers;
-	public $default_headers;
-
-	/**
-	 * Constructor.
-	 *
-	 * @since 3.4.0
-	 *
-	 * @param WP_Customize_Manager $manager Customizer bootstrap instance.
-	 */
-	public function __construct( $manager ) {
-		parent::__construct( $manager, 'header_image', array(
-			'label'    => __( 'Header Image' ),
-			'settings' => array(
-				'default' => 'header_image',
-				'data'    => 'header_image_data',
-			),
-			'section'  => 'header_image',
-			'removed'  => 'remove-header',
-			'get_url'  => 'get_header_image',
-		) );
-
-	}
-
-	/**
-	 * @access public
-	 */
-	public function enqueue() {
-		wp_enqueue_media();
-		wp_enqueue_script( 'customize-views' );
-
-		$this->prepare_control();
-
-		wp_localize_script( 'customize-views', '_wpCustomizeHeader', array(
-			'data' => array(
-				'width' => absint( get_theme_support( 'custom-header', 'width' ) ),
-				'height' => absint( get_theme_support( 'custom-header', 'height' ) ),
-				'flex-width' => absint( get_theme_support( 'custom-header', 'flex-width' ) ),
-				'flex-height' => absint( get_theme_support( 'custom-header', 'flex-height' ) ),
-				'currentImgSrc' => $this->get_current_image_src(),
-			),
-			'nonces' => array(
-				'add' => wp_create_nonce( 'header-add' ),
-				'remove' => wp_create_nonce( 'header-remove' ),
-			),
-			'uploads' => $this->uploaded_headers,
-			'defaults' => $this->default_headers
-		) );
-
-		parent::enqueue();
-	}
-
-	/**
-	 *
-	 * @global Custom_Image_Header $custom_image_header
-	 */
-	public function prepare_control() {
-		global $custom_image_header;
-		if ( empty( $custom_image_header ) ) {
-			return;
-		}
-
-		// Process default headers and uploaded headers.
-		$custom_image_header->process_default_headers();
-		$this->default_headers = $custom_image_header->get_default_header_images();
-		$this->uploaded_headers = $custom_image_header->get_uploaded_header_images();
-	}
-
-	/**
-	 * @access public
-	 */
-	public function print_header_image_template() {
-		?>
-		<script type="text/template" id="tmpl-header-choice">
-			<# if (data.random) { #>
-			<button type="button" class="button display-options random">
-				<span class="dashicons dashicons-randomize dice"></span>
-				<# if ( data.type === 'uploaded' ) { #>
-					<?php _e( 'Randomize uploaded headers' ); ?>
-				<# } else if ( data.type === 'default' ) { #>
-					<?php _e( 'Randomize suggested headers' ); ?>
-				<# } #>
-			</button>
-
-			<# } else { #>
-
-			<# if (data.type === 'uploaded') { #>
-				<button type="button" class="dashicons dashicons-no close"><span class="screen-reader-text"><?php _e( 'Remove image' ); ?></span></button>
-			<# } #>
-
-			<button type="button" class="choice thumbnail"
-				data-customize-image-value="{{{data.header.url}}}"
-				data-customize-header-image-data="{{JSON.stringify(data.header)}}">
-				<span class="screen-reader-text"><?php _e( 'Set image' ); ?></span>
-				<img src="{{{data.header.thumbnail_url}}}" alt="{{{data.header.alt_text || data.header.description}}}">
-			</button>
-
-			<# } #>
-		</script>
-
-		<script type="text/template" id="tmpl-header-current">
-			<# if (data.choice) { #>
-				<# if (data.random) { #>
-
-			<div class="placeholder">
-				<span class="dashicons dashicons-randomize dice"></span>
-				<# if ( data.type === 'uploaded' ) { #>
-					<?php _e( 'Randomizing uploaded headers' ); ?>
-				<# } else if ( data.type === 'default' ) { #>
-					<?php _e( 'Randomizing suggested headers' ); ?>
-				<# } #>
-			</div>
-
-				<# } else { #>
-
-			<img src="{{{data.header.thumbnail_url}}}" alt="{{{data.header.alt_text || data.header.description}}}" tabindex="0"/>
-
-				<# } #>
-			<# } else { #>
-
-			<div class="placeholder">
-				<?php _e( 'No image set' ); ?>
-			</div>
-
-			<# } #>
-		</script>
-		<?php
-	}
-
-	/**
-	 * @return string|void
-	 */
-	public function get_current_image_src() {
-		$src = $this->value();
-		if ( isset( $this->get_url ) ) {
-			$src = call_user_func( $this->get_url, $src );
-			return $src;
-		}
-	}
-
-	/**
-	 * @access public
-	 */
-	public function render_content() {
-		$this->print_header_image_template();
-		$visibility = $this->get_current_image_src() ? '' : ' style="display:none" ';
-		$width = absint( get_theme_support( 'custom-header', 'width' ) );
-		$height = absint( get_theme_support( 'custom-header', 'height' ) );
-		?>
-		<div class="customize-control-content">
-			<p class="customizer-section-intro">
-				<?php
-				if ( $width && $height ) {
-					/* translators: %s: header size in pixels */
-					printf( __( 'While you can crop images to your liking after clicking <strong>Add new image</strong>, your theme recommends a header size of %s pixels.' ),
-						sprintf( '<strong>%s &times; %s</strong>', $width, $height )
-					);
-				} elseif ( $width ) {
-					/* translators: %s: header width in pixels */
-					printf( __( 'While you can crop images to your liking after clicking <strong>Add new image</strong>, your theme recommends a header width of %s pixels.' ),
-						sprintf( '<strong>%s</strong>', $width )
-					);
-				} else {
-					/* translators: %s: header height in pixels */
-					printf( __( 'While you can crop images to your liking after clicking <strong>Add new image</strong>, your theme recommends a header height of %s pixels.' ),
-						sprintf( '<strong>%s</strong>', $height )
-					);
-				}
-				?>
-			</p>
-			<div class="current">
-				<label for="header_image-button">
-					<span class="customize-control-title">
-						<?php _e( 'Current header' ); ?>
-					</span>
-				</label>
-				<div class="container">
-				</div>
-			</div>
-			<div class="actions">
-				<?php if ( current_user_can( 'upload_files' ) ): ?>
-				<button type="button"<?php echo $visibility; ?> class="button remove" aria-label="<?php esc_attr_e( 'Hide header image' ); ?>"><?php _e( 'Hide image' ); ?></button>
-				<button type="button" class="button new" id="header_image-button"  aria-label="<?php esc_attr_e( 'Add new header image' ); ?>"><?php _e( 'Add new image' ); ?></button>
-				<div style="clear:both"></div>
-				<?php endif; ?>
-			</div>
-			<div class="choices">
-				<span class="customize-control-title header-previously-uploaded">
-					<?php _ex( 'Previously uploaded', 'custom headers' ); ?>
-				</span>
-				<div class="uploaded">
-					<div class="list">
-					</div>
-				</div>
-				<span class="customize-control-title header-default">
-					<?php _ex( 'Suggested', 'custom headers' ); ?>
-				</span>
-				<div class="default">
-					<div class="list">
-					</div>
-				</div>
-			</div>
-		</div>
-		<?php
-	}
-}
Index: www/wp-includes/autoload/requests/Transport/fsockopen.php
===================================================================
--- www/wp-includes/autoload/requests/Transport/fsockopen.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Transport/fsockopen.php	(revision UNDEFINED)
@@ -1,441 +0,0 @@
-<?php
-/**
- * fsockopen HTTP transport
- *
- * @package Requests
- * @subpackage Transport
- */
-
-/**
- * fsockopen HTTP transport
- *
- * @package Requests
- * @subpackage Transport
- */
-class Requests_Transport_fsockopen implements Requests_Transport {
-	/**
-	 * Second to microsecond conversion
-	 *
-	 * @var integer
-	 */
-	const SECOND_IN_MICROSECONDS = 1000000;
-
-	/**
-	 * Raw HTTP data
-	 *
-	 * @var string
-	 */
-	public $headers = '';
-
-	/**
-	 * Stream metadata
-	 *
-	 * @var array Associative array of properties, see {@see https://secure.php.net/stream_get_meta_data}
-	 */
-	public $info;
-
-	/**
-	 * What's the maximum number of bytes we should keep?
-	 *
-	 * @var int|bool Byte count, or false if no limit.
-	 */
-	protected $max_bytes = false;
-
-	protected $connect_error = '';
-
-	/**
-	 * Perform a request
-	 *
-	 * @throws Requests_Exception On failure to connect to socket (`fsockopenerror`)
-	 * @throws Requests_Exception On socket timeout (`timeout`)
-	 *
-	 * @param string $url URL to request
-	 * @param array $headers Associative array of request headers
-	 * @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD
-	 * @param array $options Request options, see {@see Requests::response()} for documentation
-	 * @return string Raw HTTP result
-	 */
-	public function request($url, $headers = array(), $data = array(), $options = array()) {
-		$options['hooks']->dispatch('fsockopen.before_request');
-
-		$url_parts = parse_url($url);
-		if (empty($url_parts)) {
-			throw new Requests_Exception('Invalid URL.', 'invalidurl', $url);
-		}
-		$host = $url_parts['host'];
-		$context = stream_context_create();
-		$verifyname = false;
-		$case_insensitive_headers = new Requests_Utility_CaseInsensitiveDictionary($headers);
-
-		// HTTPS support
-		if (isset($url_parts['scheme']) && strtolower($url_parts['scheme']) === 'https') {
-			$remote_socket = 'ssl://' . $host;
-			$url_parts['port'] = 443;
-
-			$context_options = array(
-				'verify_peer' => true,
-				// 'CN_match' => $host,
-				'capture_peer_cert' => true
-			);
-			$verifyname = true;
-
-			// SNI, if enabled (OpenSSL >=0.9.8j)
-			if (defined('OPENSSL_TLSEXT_SERVER_NAME') && OPENSSL_TLSEXT_SERVER_NAME) {
-				$context_options['SNI_enabled'] = true;
-				if (isset($options['verifyname']) && $options['verifyname'] === false) {
-					$context_options['SNI_enabled'] = false;
-				}
-			}
-
-			if (isset($options['verify'])) {
-				if ($options['verify'] === false) {
-					$context_options['verify_peer'] = false;
-				}
-				elseif (is_string($options['verify'])) {
-					$context_options['cafile'] = $options['verify'];
-				}
-			}
-
-			if (isset($options['verifyname']) && $options['verifyname'] === false) {
-				$verifyname = false;
-			}
-
-			stream_context_set_option($context, array('ssl' => $context_options));
-		}
-		else {
-			$remote_socket = 'tcp://' . $host;
-		}
-
-		$this->max_bytes = $options['max_bytes'];
-
-		if (!isset($url_parts['port'])) {
-			$url_parts['port'] = 80;
-		}
-		$remote_socket .= ':' . $url_parts['port'];
-
-		set_error_handler(array($this, 'connect_error_handler'), E_WARNING | E_NOTICE);
-
-		$options['hooks']->dispatch('fsockopen.remote_socket', array(&$remote_socket));
-
-		$socket = stream_socket_client($remote_socket, $errno, $errstr, ceil($options['connect_timeout']), STREAM_CLIENT_CONNECT, $context);
-
-		restore_error_handler();
-
-		if ($verifyname && !$this->verify_certificate_from_context($host, $context)) {
-			throw new Requests_Exception('SSL certificate did not match the requested domain name', 'ssl.no_match');
-		}
-
-		if (!$socket) {
-			if ($errno === 0) {
-				// Connection issue
-				throw new Requests_Exception(rtrim($this->connect_error), 'fsockopen.connect_error');
-			}
-
-			throw new Requests_Exception($errstr, 'fsockopenerror', null, $errno);
-		}
-
-		$data_format = $options['data_format'];
-
-		if ($data_format === 'query') {
-			$path = self::format_get($url_parts, $data);
-			$data = '';
-		}
-		else {
-			$path = self::format_get($url_parts, array());
-		}
-
-		$options['hooks']->dispatch('fsockopen.remote_host_path', array(&$path, $url));
-
-		$request_body = '';
-		$out = sprintf("%s %s HTTP/%.1f\r\n", $options['type'], $path, $options['protocol_version']);
-
-		if ($options['type'] !== Requests::TRACE) {
-			if (is_array($data)) {
-				$request_body = http_build_query($data, null, '&');
-			}
-			else {
-				$request_body = $data;
-			}
-
-			if (!empty($data)) {
-				if (!isset($case_insensitive_headers['Content-Length'])) {
-					$headers['Content-Length'] = strlen($request_body);
-				}
-
-				if (!isset($case_insensitive_headers['Content-Type'])) {
-					$headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
-				}
-			}
-		}
-
-		if (!isset($case_insensitive_headers['Host'])) {
-			$out .= sprintf('Host: %s', $url_parts['host']);
-
-			if ($url_parts['port'] !== 80) {
-				$out .= ':' . $url_parts['port'];
-			}
-			$out .= "\r\n";
-		}
-
-		if (!isset($case_insensitive_headers['User-Agent'])) {
-			$out .= sprintf("User-Agent: %s\r\n", $options['useragent']);
-		}
-
-		$accept_encoding = $this->accept_encoding();
-		if (!isset($case_insensitive_headers['Accept-Encoding']) && !empty($accept_encoding)) {
-			$out .= sprintf("Accept-Encoding: %s\r\n", $accept_encoding);
-		}
-
-		$headers = Requests::flatten($headers);
-
-		if (!empty($headers)) {
-			$out .= implode($headers, "\r\n") . "\r\n";
-		}
-
-		$options['hooks']->dispatch('fsockopen.after_headers', array(&$out));
-
-		if (substr($out, -2) !== "\r\n") {
-			$out .= "\r\n";
-		}
-
-		if (!isset($case_insensitive_headers['Connection'])) {
-			$out .= "Connection: Close\r\n";
-		}
-
-		$out .= "\r\n" . $request_body;
-
-		$options['hooks']->dispatch('fsockopen.before_send', array(&$out));
-
-		fwrite($socket, $out);
-		$options['hooks']->dispatch('fsockopen.after_send', array($out));
-
-		if (!$options['blocking']) {
-			fclose($socket);
-			$fake_headers = '';
-			$options['hooks']->dispatch('fsockopen.after_request', array(&$fake_headers));
-			return '';
-		}
-
-		$timeout_sec = (int) floor($options['timeout']);
-		if ($timeout_sec == $options['timeout']) {
-			$timeout_msec = 0;
-		}
-		else {
-			$timeout_msec = self::SECOND_IN_MICROSECONDS * $options['timeout'] % self::SECOND_IN_MICROSECONDS;
-		}
-		stream_set_timeout($socket, $timeout_sec, $timeout_msec);
-
-		$response = $body = $headers = '';
-		$this->info = stream_get_meta_data($socket);
-		$size = 0;
-		$doingbody = false;
-		$download = false;
-		if ($options['filename']) {
-			$download = fopen($options['filename'], 'wb');
-		}
-
-		while (!feof($socket)) {
-			$this->info = stream_get_meta_data($socket);
-			if ($this->info['timed_out']) {
-				throw new Requests_Exception('fsocket timed out', 'timeout');
-			}
-
-			$block = fread($socket, Requests::BUFFER_SIZE);
-			if (!$doingbody) {
-				$response .= $block;
-				if (strpos($response, "\r\n\r\n")) {
-					list($headers, $block) = explode("\r\n\r\n", $response, 2);
-					$doingbody = true;
-				}
-			}
-
-			// Are we in body mode now?
-			if ($doingbody) {
-				$options['hooks']->dispatch('request.progress', array($block, $size, $this->max_bytes));
-				$data_length = strlen($block);
-				if ($this->max_bytes) {
-					// Have we already hit a limit?
-					if ($size === $this->max_bytes) {
-						continue;
-					}
-					if (($size + $data_length) > $this->max_bytes) {
-						// Limit the length
-						$limited_length = ($this->max_bytes - $size);
-						$block = substr($block, 0, $limited_length);
-					}
-				}
-
-				$size += strlen($block);
-				if ($download) {
-					fwrite($download, $block);
-				}
-				else {
-					$body .= $block;
-				}
-			}
-		}
-		$this->headers = $headers;
-
-		if ($download) {
-			fclose($download);
-		}
-		else {
-			$this->headers .= "\r\n\r\n" . $body;
-		}
-		fclose($socket);
-
-		$options['hooks']->dispatch('fsockopen.after_request', array(&$this->headers, &$this->info));
-		return $this->headers;
-	}
-
-	/**
-	 * Send multiple requests simultaneously
-	 *
-	 * @param array $requests Request data (array of 'url', 'headers', 'data', 'options') as per {@see Requests_Transport::request}
-	 * @param array $options Global options, see {@see Requests::response()} for documentation
-	 * @return array Array of Requests_Response objects (may contain Requests_Exception or string responses as well)
-	 */
-	public function request_multiple($requests, $options) {
-		$responses = array();
-		$class = get_class($this);
-		foreach ($requests as $id => $request) {
-			try {
-				$handler = new $class();
-				$responses[$id] = $handler->request($request['url'], $request['headers'], $request['data'], $request['options']);
-
-				$request['options']['hooks']->dispatch('transport.internal.parse_response', array(&$responses[$id], $request));
-			}
-			catch (Requests_Exception $e) {
-				$responses[$id] = $e;
-			}
-
-			if (!is_string($responses[$id])) {
-				$request['options']['hooks']->dispatch('multiple.request.complete', array(&$responses[$id], $id));
-			}
-		}
-
-		return $responses;
-	}
-
-	/**
-	 * Retrieve the encodings we can accept
-	 *
-	 * @return string Accept-Encoding header value
-	 */
-	protected static function accept_encoding() {
-		$type = array();
-		if (function_exists('gzinflate')) {
-			$type[] = 'deflate;q=1.0';
-		}
-
-		if (function_exists('gzuncompress')) {
-			$type[] = 'compress;q=0.5';
-		}
-
-		$type[] = 'gzip;q=0.5';
-
-		return implode(', ', $type);
-	}
-
-	/**
-	 * Format a URL given GET data
-	 *
-	 * @param array $url_parts
-	 * @param array|object $data Data to build query using, see {@see https://secure.php.net/http_build_query}
-	 * @return string URL with data
-	 */
-	protected static function format_get($url_parts, $data) {
-		if (!empty($data)) {
-			if (empty($url_parts['query'])) {
-				$url_parts['query'] = '';
-			}
-
-			$url_parts['query'] .= '&' . http_build_query($data, null, '&');
-			$url_parts['query'] = trim($url_parts['query'], '&');
-		}
-		if (isset($url_parts['path'])) {
-			if (isset($url_parts['query'])) {
-				$get = $url_parts['path'] . '?' . $url_parts['query'];
-			}
-			else {
-				$get = $url_parts['path'];
-			}
-		}
-		else {
-			$get = '/';
-		}
-		return $get;
-	}
-
-	/**
-	 * Error handler for stream_socket_client()
-	 *
-	 * @param int $errno Error number (e.g. E_WARNING)
-	 * @param string $errstr Error message
-	 */
-	public function connect_error_handler($errno, $errstr) {
-		// Double-check we can handle it
-		if (($errno & E_WARNING) === 0 && ($errno & E_NOTICE) === 0) {
-			// Return false to indicate the default error handler should engage
-			return false;
-		}
-
-		$this->connect_error .= $errstr . "\n";
-		return true;
-	}
-
-	/**
-	 * Verify the certificate against common name and subject alternative names
-	 *
-	 * Unfortunately, PHP doesn't check the certificate against the alternative
-	 * names, leading things like 'https://www.github.com/' to be invalid.
-	 * Instead
-	 *
-	 * @see https://tools.ietf.org/html/rfc2818#section-3.1 RFC2818, Section 3.1
-	 *
-	 * @throws Requests_Exception On failure to connect via TLS (`fsockopen.ssl.connect_error`)
-	 * @throws Requests_Exception On not obtaining a match for the host (`fsockopen.ssl.no_match`)
-	 * @param string $host Host name to verify against
-	 * @param resource $context Stream context
-	 * @return bool
-	 */
-	public function verify_certificate_from_context($host, $context) {
-		$meta = stream_context_get_options($context);
-
-		// If we don't have SSL options, then we couldn't make the connection at
-		// all
-		if (empty($meta) || empty($meta['ssl']) || empty($meta['ssl']['peer_certificate'])) {
-			throw new Requests_Exception(rtrim($this->connect_error), 'ssl.connect_error');
-		}
-
-		$cert = openssl_x509_parse($meta['ssl']['peer_certificate']);
-
-		return Requests_SSL::verify_certificate($host, $cert);
-	}
-
-	/**
-	 * Whether this transport is valid
-	 *
-	 * @codeCoverageIgnore
-	 * @return boolean True if the transport is valid, false otherwise.
-	 */
-	public static function test($capabilities = array()) {
-		if (!function_exists('fsockopen')) {
-			return false;
-		}
-
-		// If needed, check that streams support SSL
-		if (isset($capabilities['ssl']) && $capabilities['ssl']) {
-			if (!extension_loaded('openssl') || !function_exists('openssl_x509_parse')) {
-				return false;
-			}
-
-			// Currently broken, thanks to https://github.com/facebook/hhvm/issues/2156
-			if (defined('HHVM_VERSION')) {
-				return false;
-			}
-		}
-
-		return true;
-	}
-}
Index: www/wp-includes/functions.wp-scripts.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/functions.wp-scripts.php	(revision 38565)
+++ www/wp-includes/functions.wp-scripts.php	(revision 38565)
@@ -1,336 +0,0 @@
-<?php
-/**
- * Dependencies API: Scripts functions
- *
- * @since 2.6.0
- *
- * @package WordPress
- * @subpackage Dependencies
- */
-
-/**
- * Initialize $wp_scripts if it has not been set.
- *
- * @global WP_Scripts $wp_scripts
- *
- * @since 4.2.0
- *
- * @return WP_Scripts WP_Scripts instance.
- */
-function wp_scripts() {
-	global $wp_scripts;
-	if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
-		$wp_scripts = new WP_Scripts();
-	}
-	return $wp_scripts;
-}
-
-/**
- * Helper function to output a _doing_it_wrong message when applicable.
- *
- * @ignore
- * @since 4.2.0
- *
- * @param string $function Function name.
- */
-function _wp_scripts_maybe_doing_it_wrong( $function ) {
-	if ( did_action( 'init' ) ) {
-		return;
-	}
-
-	_doing_it_wrong( $function, sprintf(
-		/* translators: 1: wp_enqueue_scripts, 2: admin_enqueue_scripts, 3: login_enqueue_scripts */
-		__( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
-		'<code>wp_enqueue_scripts</code>',
-		'<code>admin_enqueue_scripts</code>',
-		'<code>login_enqueue_scripts</code>'
-	), '3.3.0' );
-}
-
-/**
- * Prints scripts in document head that are in the $handles queue.
- *
- * Called by admin-header.php and {@see 'wp_head'} hook. Since it is called by wp_head on every page load,
- * the function does not instantiate the WP_Scripts object unless script names are explicitly passed.
- * Makes use of already-instantiated $wp_scripts global if present. Use provided {@see 'wp_print_scripts'}
- * hook to register/enqueue new scripts.
- *
- * @see WP_Scripts::do_items()
- * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts.
- *
- * @since 2.1.0
- *
- * @param string|bool|array $handles Optional. Scripts to be printed. Default 'false'.
- * @return array On success, a processed array of WP_Dependencies items; otherwise, an empty array.
- */
-function wp_print_scripts( $handles = false ) {
-	/**
-	 * Fires before scripts in the $handles queue are printed.
-	 *
-	 * @since 2.1.0
-	 */
-	do_action( 'wp_print_scripts' );
-	if ( '' === $handles ) { // for wp_head
-		$handles = false;
-	}
-
-	_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
-
-	global $wp_scripts;
-	if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
-		if ( ! $handles ) {
-			return array(); // No need to instantiate if nothing is there.
-		}
-	}
-
-	return wp_scripts()->do_items( $handles );
-}
-
-/**
- * Adds extra code to a registered script.
- *
- * Code will only be added if the script in already in the queue.
- * Accepts a string $data containing the Code. If two or more code blocks
- * are added to the same script $handle, they will be printed in the order
- * they were added, i.e. the latter added code can redeclare the previous.
- *
- * @since 4.5.0
- *
- * @see WP_Scripts::add_inline_script()
- *
- * @param string $handle   Name of the script to add the inline script to.
- * @param string $data     String containing the javascript to be added.
- * @param string $position Optional. Whether to add the inline script before the handle
- *                         or after. Default 'after'.
- * @return bool True on success, false on failure.
- */
-function wp_add_inline_script( $handle, $data, $position = 'after' ) {
-	_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
-
-	if ( false !== stripos( $data, '</script>' ) ) {
-		_doing_it_wrong( __FUNCTION__, sprintf(
-			/* translators: 1: <script>, 2: wp_add_inline_script() */
-			__( 'Do not pass %1$s tags to %2$s.' ),
-			'<code>&lt;script&gt;</code>',
-			'<code>wp_add_inline_script()</code>'
-		), '4.5.0' );
-		$data = trim( preg_replace( '#<script[^>]*>(.*)</script>#is', '$1', $data ) );
-	}
-
-	return wp_scripts()->add_inline_script( $handle, $data, $position );
-}
-
-/**
- * Register a new script.
- *
- * Registers a script to be enqueued later using the wp_enqueue_script() function.
- *
- * @see WP_Dependencies::add()
- * @see WP_Dependencies::add_data()
- *
- * @since 2.1.0
- * @since 4.3.0 A return value was added.
- *
- * @param string           $handle    Name of the script. Should be unique.
- * @param string           $src       Full URL of the script, or path of the script relative to the WordPress root directory.
- * @param array            $deps      Optional. An array of registered script handles this script depends on. Default empty array.
- * @param string|bool|null $ver       Optional. String specifying script version number, if it has one, which is added to the URL
- *                                    as a query string for cache busting purposes. If version is set to false, a version
- *                                    number is automatically added equal to current installed WordPress version.
- *                                    If set to null, no version is added.
- * @param bool             $in_footer Optional. Whether to enqueue the script before </body> instead of in the <head>.
- *                                    Default 'false'.
- * @return bool Whether the script has been registered. True on success, false on failure.
- */
-function wp_register_script( $handle, $src, $deps = array(), $ver = false, $in_footer = false ) {
-	$wp_scripts = wp_scripts();
-	_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
-
-	$registered = $wp_scripts->add( $handle, $src, $deps, $ver );
-	if ( $in_footer ) {
-		$wp_scripts->add_data( $handle, 'group', 1 );
-	}
-
-	return $registered;
-}
-
-/**
- * Localize a script.
- *
- * Works only if the script has already been added.
- *
- * Accepts an associative array $l10n and creates a JavaScript object:
- *
- *     "$object_name" = {
- *         key: value,
- *         key: value,
- *         ...
- *     }
- *
- *
- * @see WP_Dependencies::localize()
- * @link https://core.trac.wordpress.org/ticket/11520
- * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts.
- *
- * @since 2.2.0
- *
- * @todo Documentation cleanup
- *
- * @param string $handle      Script handle the data will be attached to.
- * @param string $object_name Name for the JavaScript object. Passed directly, so it should be qualified JS variable.
- *                            Example: '/[a-zA-Z0-9_]+/'.
- * @param array $l10n         The data itself. The data can be either a single or multi-dimensional array.
- * @return bool True if the script was successfully localized, false otherwise.
- */
-function wp_localize_script( $handle, $object_name, $l10n ) {
-	global $wp_scripts;
-	if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
-		_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
-		return false;
-	}
-
-	return $wp_scripts->localize( $handle, $object_name, $l10n );
-}
-
-/**
- * Remove a registered script.
- *
- * Note: there are intentional safeguards in place to prevent critical admin scripts,
- * such as jQuery core, from being unregistered.
- *
- * @see WP_Dependencies::remove()
- *
- * @since 2.1.0
- *
- * @param string $handle Name of the script to be removed.
- */
-function wp_deregister_script( $handle ) {
-	_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
-
-	/**
-	 * Do not allow accidental or negligent de-registering of critical scripts in the admin.
-	 * Show minimal remorse if the correct hook is used.
-	 */
-	$current_filter = current_filter();
-	if ( ( is_admin() && 'admin_enqueue_scripts' !== $current_filter ) ||
-		( 'wp-login.php' === $GLOBALS['pagenow'] && 'login_enqueue_scripts' !== $current_filter )
-	) {
-		$no = array(
-			'jquery', 'jquery-core', 'jquery-migrate', 'jquery-ui-core', 'jquery-ui-accordion',
-			'jquery-ui-autocomplete', 'jquery-ui-button', 'jquery-ui-datepicker', 'jquery-ui-dialog',
-			'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-menu', 'jquery-ui-mouse',
-			'jquery-ui-position', 'jquery-ui-progressbar', 'jquery-ui-resizable', 'jquery-ui-selectable',
-			'jquery-ui-slider', 'jquery-ui-sortable', 'jquery-ui-spinner', 'jquery-ui-tabs',
-			'jquery-ui-tooltip', 'jquery-ui-widget', 'underscore', 'backbone',
-		);
-
-		if ( in_array( $handle, $no ) ) {
-			$message = sprintf(
-				/* translators: 1: script name, 2: wp_enqueue_scripts */
-				__( 'Do not deregister the %1$s script in the administration area. To target the front-end theme, use the %2$s hook.' ),
-				"<code>$handle</code>",
-				'<code>wp_enqueue_scripts</code>'
-			);
-			_doing_it_wrong( __FUNCTION__, $message, '3.6.0' );
-			return;
-		}
-	}
-
-	wp_scripts()->remove( $handle );
-}
-
-/**
- * Enqueue a script.
- *
- * Registers the script if $src provided (does NOT overwrite), and enqueues it.
- *
- * @see WP_Dependencies::add()
- * @see WP_Dependencies::add_data()
- * @see WP_Dependencies::enqueue()
- *
- * @since 2.1.0
- *
- * @param string           $handle    Name of the script. Should be unique.
- * @param string           $src       Full URL of the script, or path of the script relative to the WordPress root directory.
- *                                    Default empty.
- * @param array            $deps      Optional. An array of registered script handles this script depends on. Default empty array.
- * @param string|bool|null $ver       Optional. String specifying script version number, if it has one, which is added to the URL
- *                                    as a query string for cache busting purposes. If version is set to false, a version
- *                                    number is automatically added equal to current installed WordPress version.
- *                                    If set to null, no version is added.
- * @param bool             $in_footer Optional. Whether to enqueue the script before </body> instead of in the <head>.
- *                                    Default 'false'.
- */
-function wp_enqueue_script( $handle, $src = '', $deps = array(), $ver = false, $in_footer = false ) {
-	$wp_scripts = wp_scripts();
-
-	_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
-
-
-	if ( $src || $in_footer ) {
-		$_handle = explode( '?', $handle );
-
-		if ( $src ) {
-			$wp_scripts->add( $_handle[0], $src, $deps, $ver );
-		}
-
-		if ( $in_footer ) {
-			$wp_scripts->add_data( $_handle[0], 'group', 1 );
-		}
-	}
-
-	$wp_scripts->enqueue( $handle );
-}
-
-/**
- * Remove a previously enqueued script.
- *
- * @see WP_Dependencies::dequeue()
- *
- * @since 3.1.0
- *
- * @param string $handle Name of the script to be removed.
- */
-function wp_dequeue_script( $handle ) {
-	_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
-
-	wp_scripts()->dequeue( $handle );
-}
-
-/**
- * Check whether a script has been added to the queue.
- *
- * @since 2.8.0
- * @since 3.5.0 'enqueued' added as an alias of the 'queue' list.
- *
- * @param string $handle Name of the script.
- * @param string $list   Optional. Status of the script to check. Default 'enqueued'.
- *                       Accepts 'enqueued', 'registered', 'queue', 'to_do', and 'done'.
- * @return bool Whether the script is queued.
- */
-function wp_script_is( $handle, $list = 'enqueued' ) {
-	_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
-
-	return (bool) wp_scripts()->query( $handle, $list );
-}
-
-/**
- * Add metadata to a script.
- *
- * Works only if the script has already been added.
- *
- * Possible values for $key and $value:
- * 'conditional' string Comments for IE 6, lte IE 7, etc.
- *
- * @since 4.2.0
- *
- * @see WP_Dependency::add_data()
- *
- * @param string $handle Name of the script.
- * @param string $key    Name of data point for which we're storing a value.
- * @param mixed  $value  String containing the data to be added.
- * @return bool True on success, false on failure.
- */
-function wp_script_add_data( $handle, $key, $value ){
-	return wp_scripts()->add_data( $handle, $key, $value );
-}
Index: www/wp-includes/autoload/id3/getid3_handler.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/id3/getid3_handler.php	(revision )
+++ www/wp-includes/autoload/id3/getid3_handler.php	(revision )
@@ -0,0 +1,205 @@
+<?php
+
+abstract class getid3_handler {
+
+	/**
+	* @var getID3
+	*/
+	protected $getid3;                       // pointer
+
+	protected $data_string_flag     = false; // analyzing filepointer or string
+	protected $data_string          = '';    // string to analyze
+	protected $data_string_position = 0;     // seek position in string
+	protected $data_string_length   = 0;     // string length
+
+	private $dependency_to = null;
+
+
+	public function __construct(getID3 $getid3, $call_module=null) {
+		$this->getid3 = $getid3;
+
+		if ($call_module) {
+			$this->dependency_to = str_replace('getid3_', '', $call_module);
+		}
+	}
+
+
+	// Analyze from file pointer
+	abstract public function Analyze();
+
+
+	// Analyze from string instead
+	public function AnalyzeString($string) {
+		// Enter string mode
+		$this->setStringMode($string);
+
+		// Save info
+		$saved_avdataoffset = $this->getid3->info['avdataoffset'];
+		$saved_avdataend    = $this->getid3->info['avdataend'];
+		$saved_filesize     = (isset($this->getid3->info['filesize']) ? $this->getid3->info['filesize'] : null); // may be not set if called as dependency without openfile() call
+
+		// Reset some info
+		$this->getid3->info['avdataoffset'] = 0;
+		$this->getid3->info['avdataend']    = $this->getid3->info['filesize'] = $this->data_string_length;
+
+		// Analyze
+		$this->Analyze();
+
+		// Restore some info
+		$this->getid3->info['avdataoffset'] = $saved_avdataoffset;
+		$this->getid3->info['avdataend']    = $saved_avdataend;
+		$this->getid3->info['filesize']     = $saved_filesize;
+
+		// Exit string mode
+		$this->data_string_flag = false;
+	}
+
+	public function setStringMode($string) {
+		$this->data_string_flag   = true;
+		$this->data_string        = $string;
+		$this->data_string_length = strlen($string);
+	}
+
+	protected function ftell() {
+		if ($this->data_string_flag) {
+			return $this->data_string_position;
+		}
+		return ftell($this->getid3->fp);
+	}
+
+	protected function fread($bytes) {
+		if ($this->data_string_flag) {
+			$this->data_string_position += $bytes;
+			return substr($this->data_string, $this->data_string_position - $bytes, $bytes);
+		}
+		$pos = $this->ftell() + $bytes;
+		if (!getid3_lib::intValueSupported($pos)) {
+			throw new getid3_exception('cannot fread('.$bytes.' from '.$this->ftell().') because beyond PHP filesystem limit', 10);
+		}
+		return fread($this->getid3->fp, $bytes);
+	}
+
+	protected function fseek($bytes, $whence=SEEK_SET) {
+		if ($this->data_string_flag) {
+			switch ($whence) {
+				case SEEK_SET:
+					$this->data_string_position = $bytes;
+					break;
+
+				case SEEK_CUR:
+					$this->data_string_position += $bytes;
+					break;
+
+				case SEEK_END:
+					$this->data_string_position = $this->data_string_length + $bytes;
+					break;
+			}
+			return 0;
+		} else {
+			$pos = $bytes;
+			if ($whence == SEEK_CUR) {
+				$pos = $this->ftell() + $bytes;
+			} elseif ($whence == SEEK_END) {
+				$pos = $this->getid3->info['filesize'] + $bytes;
+			}
+			if (!getid3_lib::intValueSupported($pos)) {
+				throw new getid3_exception('cannot fseek('.$pos.') because beyond PHP filesystem limit', 10);
+			}
+		}
+		return fseek($this->getid3->fp, $bytes, $whence);
+	}
+
+	protected function feof() {
+		if ($this->data_string_flag) {
+			return $this->data_string_position >= $this->data_string_length;
+		}
+		return feof($this->getid3->fp);
+	}
+
+	final protected function isDependencyFor($module) {
+		return $this->dependency_to == $module;
+	}
+
+	protected function error($text) {
+		$this->getid3->info['error'][] = $text;
+
+		return false;
+	}
+
+	protected function warning($text) {
+		return $this->getid3->warning($text);
+	}
+
+	protected function notice($text) {
+		// does nothing for now
+	}
+
+	public function saveAttachment($name, $offset, $length, $image_mime=null) {
+		try {
+
+			// do not extract at all
+			if ($this->getid3->option_save_attachments === getID3::ATTACHMENTS_NONE) {
+
+				$attachment = null; // do not set any
+
+			// extract to return array
+			} elseif ($this->getid3->option_save_attachments === getID3::ATTACHMENTS_INLINE) {
+
+				$this->fseek($offset);
+				$attachment = $this->fread($length); // get whole data in one pass, till it is anyway stored in memory
+				if ($attachment === false || strlen($attachment) != $length) {
+					throw new Exception('failed to read attachment data');
+				}
+
+			// assume directory path is given
+			} else {
+
+				// set up destination path
+				$dir = rtrim(str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $this->getid3->option_save_attachments), DIRECTORY_SEPARATOR);
+				if (!is_dir($dir) || !is_writable($dir)) { // check supplied directory
+					throw new Exception('supplied path ('.$dir.') does not exist, or is not writable');
+				}
+				$dest = $dir.DIRECTORY_SEPARATOR.$name.($image_mime ? '.'.getid3_lib::ImageExtFromMime($image_mime) : '');
+
+				// create dest file
+				if (($fp_dest = fopen($dest, 'wb')) == false) {
+					throw new Exception('failed to create file '.$dest);
+				}
+
+				// copy data
+				$this->fseek($offset);
+				$buffersize = ($this->data_string_flag ? $length : $this->getid3->fread_buffer_size());
+				$bytesleft = $length;
+				while ($bytesleft > 0) {
+					if (($buffer = $this->fread(min($buffersize, $bytesleft))) === false || ($byteswritten = fwrite($fp_dest, $buffer)) === false || ($byteswritten === 0)) {
+						throw new Exception($buffer === false ? 'not enough data to read' : 'failed to write to destination file, may be not enough disk space');
+					}
+					$bytesleft -= $byteswritten;
+				}
+
+				fclose($fp_dest);
+				$attachment = $dest;
+
+			}
+
+		} catch (Exception $e) {
+
+			// close and remove dest file if created
+			if (isset($fp_dest) && is_resource($fp_dest)) {
+				fclose($fp_dest);
+				unlink($dest);
+			}
+
+			// do not set any is case of error
+			$attachment = null;
+			$this->warning('Failed to extract attachment '.$name.': '.$e->getMessage());
+
+		}
+
+		// seek to the end of attachment
+		$this->fseek($offset + $length);
+
+		return $attachment;
+	}
+
+}
Index: www/wp-includes/autoload/requests/Utility/FilteredIterator.php
===================================================================
--- www/wp-includes/autoload/requests/Utility/FilteredIterator.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Utility/FilteredIterator.php	(revision UNDEFINED)
@@ -1,45 +0,0 @@
-<?php
-/**
- * Iterator for arrays requiring filtered values
- *
- * @package Requests
- * @subpackage Utilities
- */
-
-/**
- * Iterator for arrays requiring filtered values
- *
- * @package Requests
- * @subpackage Utilities
- */
-class Requests_Utility_FilteredIterator extends ArrayIterator {
-	/**
-	 * Callback to run as a filter
-	 *
-	 * @var callable
-	 */
-	protected $callback;
-
-	/**
-	 * Create a new iterator
-	 *
-	 * @param array $data
-	 * @param callable $callback Callback to be called on each value
-	 */
-	public function __construct($data, $callback) {
-		parent::__construct($data);
-
-		$this->callback = $callback;
-	}
-
-	/**
-	 * Get the current item's value after filtering
-	 *
-	 * @return string
-	 */
-	public function current() {
-		$value = parent::current();
-		$value = call_user_func($this->callback, $value);
-		return $value;
-	}
-}
Index: www/wp-includes/class-wp-theme.php
===================================================================
--- www/wp-includes/class-wp-theme.php	(revision 38565)
+++ www/wp-includes/autoload/object/WP_Theme.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/requests/Exception/HTTP/Unknown.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/Unknown.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/Unknown.php	(revision UNDEFINED)
@@ -1,44 +0,0 @@
-<?php
-/**
- * Exception for unknown status responses
- *
- * @package Requests
- */
-
-/**
- * Exception for unknown status responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_Unknown extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer|bool Code if available, false if an error occurred
-	 */
-	protected $code = 0;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Unknown';
-
-	/**
-	 * Create a new exception
-	 *
-	 * If `$data` is an instance of {@see Requests_Response}, uses the status
-	 * code from it. Otherwise, sets as 0
-	 *
-	 * @param string|null $reason Reason phrase
-	 * @param mixed $data Associated data
-	 */
-	public function __construct($reason = null, $data = null) {
-		if ($data instanceof Requests_Response) {
-			$this->code = $data->status_code;
-		}
-
-		parent::__construct($reason, $data);
-	}
-}
\ No newline at end of file
Index: www/wp-admin/includes/class-plugin-upgrader-skin.php
===================================================================
--- www/wp-admin/includes/class-plugin-upgrader-skin.php	(revision 38565)
+++ www/wp-admin/autoload/upgrader/Plugin_Upgrader_Skin.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/customize/class-wp-widget-area-customize-control.php
===================================================================
--- www/wp-includes/customize/class-wp-widget-area-customize-control.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Widget_Area_Customize_Control.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/includes/template.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/includes/template.php	(revision 38565)
+++ www/wp-admin/includes/template.php	(revision )
@@ -8,12 +8,6 @@
  * @subpackage Administration
  */
 
-/** Walker_Category_Checklist class */
-require_once( ABSPATH . 'wp-admin/includes/class-walker-category-checklist.php' );
-
-/** WP_Internal_Pointers class */
-require_once( ABSPATH . 'wp-admin/includes/class-wp-internal-pointers.php' );
-
 //
 // Category Checklists
 //
Index: www/wp-includes/autoload/simplepie/XML/Declaration/Parser.php
===================================================================
--- www/wp-includes/autoload/simplepie/XML/Declaration/Parser.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/simplepie/XML/Declaration/Parser.php	(revision UNDEFINED)
@@ -1,362 +0,0 @@
-<?php
-/**
- * SimplePie
- *
- * A PHP-Based RSS and Atom Feed Framework.
- * Takes the hard work out of managing a complete RSS/Atom solution.
- *
- * Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 	* Redistributions of source code must retain the above copyright notice, this list of
- * 	  conditions and the following disclaimer.
- *
- * 	* Redistributions in binary form must reproduce the above copyright notice, this list
- * 	  of conditions and the following disclaimer in the documentation and/or other materials
- * 	  provided with the distribution.
- *
- * 	* Neither the name of the SimplePie Team nor the names of its contributors may be used
- * 	  to endorse or promote products derived from this software without specific prior
- * 	  written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
- * AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * @package SimplePie
- * @version 1.3.1
- * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
- * @author Ryan Parman
- * @author Geoffrey Sneddon
- * @author Ryan McCue
- * @link http://simplepie.org/ SimplePie
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
- */
-
-
-/**
- * Parses the XML Declaration
- *
- * @package SimplePie
- * @subpackage Parsing
- */
-class SimplePie_XML_Declaration_Parser
-{
-	/**
-	 * XML Version
-	 *
-	 * @access public
-	 * @var string
-	 */
-	var $version = '1.0';
-
-	/**
-	 * Encoding
-	 *
-	 * @access public
-	 * @var string
-	 */
-	var $encoding = 'UTF-8';
-
-	/**
-	 * Standalone
-	 *
-	 * @access public
-	 * @var bool
-	 */
-	var $standalone = false;
-
-	/**
-	 * Current state of the state machine
-	 *
-	 * @access private
-	 * @var string
-	 */
-	var $state = 'before_version_name';
-
-	/**
-	 * Input data
-	 *
-	 * @access private
-	 * @var string
-	 */
-	var $data = '';
-
-	/**
-	 * Input data length (to avoid calling strlen() everytime this is needed)
-	 *
-	 * @access private
-	 * @var int
-	 */
-	var $data_length = 0;
-
-	/**
-	 * Current position of the pointer
-	 *
-	 * @var int
-	 * @access private
-	 */
-	var $position = 0;
-
-	/**
-	 * Create an instance of the class with the input data
-	 *
-	 * @access public
-	 * @param string $data Input data
-	 */
-	public function __construct($data)
-	{
-		$this->data = $data;
-		$this->data_length = strlen($this->data);
-	}
-
-	/**
-	 * Parse the input data
-	 *
-	 * @access public
-	 * @return bool true on success, false on failure
-	 */
-	public function parse()
-	{
-		while ($this->state && $this->state !== 'emit' && $this->has_data())
-		{
-			$state = $this->state;
-			$this->$state();
-		}
-		$this->data = '';
-		if ($this->state === 'emit')
-		{
-			return true;
-		}
-		else
-		{
-			$this->version = '';
-			$this->encoding = '';
-			$this->standalone = '';
-			return false;
-		}
-	}
-
-	/**
-	 * Check whether there is data beyond the pointer
-	 *
-	 * @access private
-	 * @return bool true if there is further data, false if not
-	 */
-	public function has_data()
-	{
-		return (bool) ($this->position < $this->data_length);
-	}
-
-	/**
-	 * Advance past any whitespace
-	 *
-	 * @return int Number of whitespace characters passed
-	 */
-	public function skip_whitespace()
-	{
-		$whitespace = strspn($this->data, "\x09\x0A\x0D\x20", $this->position);
-		$this->position += $whitespace;
-		return $whitespace;
-	}
-
-	/**
-	 * Read value
-	 */
-	public function get_value()
-	{
-		$quote = substr($this->data, $this->position, 1);
-		if ($quote === '"' || $quote === "'")
-		{
-			$this->position++;
-			$len = strcspn($this->data, $quote, $this->position);
-			if ($this->has_data())
-			{
-				$value = substr($this->data, $this->position, $len);
-				$this->position += $len + 1;
-				return $value;
-			}
-		}
-		return false;
-	}
-
-	public function before_version_name()
-	{
-		if ($this->skip_whitespace())
-		{
-			$this->state = 'version_name';
-		}
-		else
-		{
-			$this->state = false;
-		}
-	}
-
-	public function version_name()
-	{
-		if (substr($this->data, $this->position, 7) === 'version')
-		{
-			$this->position += 7;
-			$this->skip_whitespace();
-			$this->state = 'version_equals';
-		}
-		else
-		{
-			$this->state = false;
-		}
-	}
-
-	public function version_equals()
-	{
-		if (substr($this->data, $this->position, 1) === '=')
-		{
-			$this->position++;
-			$this->skip_whitespace();
-			$this->state = 'version_value';
-		}
-		else
-		{
-			$this->state = false;
-		}
-	}
-
-	public function version_value()
-	{
-		if ($this->version = $this->get_value())
-		{
-			$this->skip_whitespace();
-			if ($this->has_data())
-			{
-				$this->state = 'encoding_name';
-			}
-			else
-			{
-				$this->state = 'emit';
-			}
-		}
-		else
-		{
-			$this->state = false;
-		}
-	}
-
-	public function encoding_name()
-	{
-		if (substr($this->data, $this->position, 8) === 'encoding')
-		{
-			$this->position += 8;
-			$this->skip_whitespace();
-			$this->state = 'encoding_equals';
-		}
-		else
-		{
-			$this->state = 'standalone_name';
-		}
-	}
-
-	public function encoding_equals()
-	{
-		if (substr($this->data, $this->position, 1) === '=')
-		{
-			$this->position++;
-			$this->skip_whitespace();
-			$this->state = 'encoding_value';
-		}
-		else
-		{
-			$this->state = false;
-		}
-	}
-
-	public function encoding_value()
-	{
-		if ($this->encoding = $this->get_value())
-		{
-			$this->skip_whitespace();
-			if ($this->has_data())
-			{
-				$this->state = 'standalone_name';
-			}
-			else
-			{
-				$this->state = 'emit';
-			}
-		}
-		else
-		{
-			$this->state = false;
-		}
-	}
-
-	public function standalone_name()
-	{
-		if (substr($this->data, $this->position, 10) === 'standalone')
-		{
-			$this->position += 10;
-			$this->skip_whitespace();
-			$this->state = 'standalone_equals';
-		}
-		else
-		{
-			$this->state = false;
-		}
-	}
-
-	public function standalone_equals()
-	{
-		if (substr($this->data, $this->position, 1) === '=')
-		{
-			$this->position++;
-			$this->skip_whitespace();
-			$this->state = 'standalone_value';
-		}
-		else
-		{
-			$this->state = false;
-		}
-	}
-
-	public function standalone_value()
-	{
-		if ($standalone = $this->get_value())
-		{
-			switch ($standalone)
-			{
-				case 'yes':
-					$this->standalone = true;
-					break;
-
-				case 'no':
-					$this->standalone = false;
-					break;
-
-				default:
-					$this->state = false;
-					return;
-			}
-
-			$this->skip_whitespace();
-			if ($this->has_data())
-			{
-				$this->state = false;
-			}
-			else
-			{
-				$this->state = 'emit';
-			}
-		}
-		else
-		{
-			$this->state = false;
-		}
-	}
-}
Index: www/wp-includes/autoload/requests/Exception/HTTP/418.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/418.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/418.php	(revision UNDEFINED)
@@ -1,29 +0,0 @@
-<?php
-/**
- * Exception for 418 I'm A Teapot responses
- *
- * @see https://tools.ietf.org/html/rfc2324
- * @package Requests
- */
-
-/**
- * Exception for 418 I'm A Teapot responses
- *
- * @see https://tools.ietf.org/html/rfc2324
- * @package Requests
- */
-class Requests_Exception_HTTP_418 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 418;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = "I'm A Teapot";
-}
\ No newline at end of file
Index: www/wp-includes/meta.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/meta.php	(revision 38565)
+++ www/wp-includes/meta.php	(revision 38565)
@@ -1,1211 +0,0 @@
-<?php
-/**
- * Core Metadata API
- *
- * Functions for retrieving and manipulating metadata of various WordPress object types. Metadata
- * for an object is a represented by a simple key-value pair. Objects may contain multiple
- * metadata entries that share the same key and differ only in their value.
- *
- * @package WordPress
- * @subpackage Meta
- */
-
-/**
- * Add metadata for the specified object.
- *
- * @since 2.9.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $meta_type  Type of object metadata is for (e.g., comment, post, or user)
- * @param int    $object_id  ID of the object metadata is for
- * @param string $meta_key   Metadata key
- * @param mixed  $meta_value Metadata value. Must be serializable if non-scalar.
- * @param bool   $unique     Optional, default is false.
- *                           Whether the specified metadata key should be unique for the object.
- *                           If true, and the object already has a value for the specified metadata key,
- *                           no change will be made.
- * @return int|false The meta ID on success, false on failure.
- */
-function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique = false) {
-	global $wpdb;
-
-	if ( ! $meta_type || ! $meta_key || ! is_numeric( $object_id ) ) {
-		return false;
-	}
-
-	$object_id = absint( $object_id );
-	if ( ! $object_id ) {
-		return false;
-	}
-
-	$table = _get_meta_table( $meta_type );
-	if ( ! $table ) {
-		return false;
-	}
-
-	$column = sanitize_key($meta_type . '_id');
-
-	// expected_slashed ($meta_key)
-	$meta_key = wp_unslash($meta_key);
-	$meta_value = wp_unslash($meta_value);
-	$meta_value = sanitize_meta( $meta_key, $meta_value, $meta_type );
-
-	/**
-	 * Filters whether to add metadata of a specific type.
-	 *
-	 * The dynamic portion of the hook, `$meta_type`, refers to the meta
-	 * object type (comment, post, or user). Returning a non-null value
-	 * will effectively short-circuit the function.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param null|bool $check      Whether to allow adding metadata for the given type.
-	 * @param int       $object_id  Object ID.
-	 * @param string    $meta_key   Meta key.
-	 * @param mixed     $meta_value Meta value. Must be serializable if non-scalar.
-	 * @param bool      $unique     Whether the specified meta key should be unique
-	 *                              for the object. Optional. Default false.
-	 */
-	$check = apply_filters( "add_{$meta_type}_metadata", null, $object_id, $meta_key, $meta_value, $unique );
-	if ( null !== $check )
-		return $check;
-
-	if ( $unique && $wpdb->get_var( $wpdb->prepare(
-		"SELECT COUNT(*) FROM $table WHERE meta_key = %s AND $column = %d",
-		$meta_key, $object_id ) ) )
-		return false;
-
-	$_meta_value = $meta_value;
-	$meta_value = maybe_serialize( $meta_value );
-
-	/**
-	 * Fires immediately before meta of a specific type is added.
-	 *
-	 * The dynamic portion of the hook, `$meta_type`, refers to the meta
-	 * object type (comment, post, or user).
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param int    $object_id  Object ID.
-	 * @param string $meta_key   Meta key.
-	 * @param mixed  $meta_value Meta value.
-	 */
-	do_action( "add_{$meta_type}_meta", $object_id, $meta_key, $_meta_value );
-
-	$result = $wpdb->insert( $table, array(
-		$column => $object_id,
-		'meta_key' => $meta_key,
-		'meta_value' => $meta_value
-	) );
-
-	if ( ! $result )
-		return false;
-
-	$mid = (int) $wpdb->insert_id;
-
-	wp_cache_delete($object_id, $meta_type . '_meta');
-
-	/**
-	 * Fires immediately after meta of a specific type is added.
-	 *
-	 * The dynamic portion of the hook, `$meta_type`, refers to the meta
-	 * object type (comment, post, or user).
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param int    $mid        The meta ID after successful update.
-	 * @param int    $object_id  Object ID.
-	 * @param string $meta_key   Meta key.
-	 * @param mixed  $meta_value Meta value.
-	 */
-	do_action( "added_{$meta_type}_meta", $mid, $object_id, $meta_key, $_meta_value );
-
-	return $mid;
-}
-
-/**
- * Update metadata for the specified object. If no value already exists for the specified object
- * ID and metadata key, the metadata will be added.
- *
- * @since 2.9.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $meta_type  Type of object metadata is for (e.g., comment, post, or user)
- * @param int    $object_id  ID of the object metadata is for
- * @param string $meta_key   Metadata key
- * @param mixed  $meta_value Metadata value. Must be serializable if non-scalar.
- * @param mixed  $prev_value Optional. If specified, only update existing metadata entries with
- * 		                     the specified value. Otherwise, update all entries.
- * @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure.
- */
-function update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_value = '') {
-	global $wpdb;
-
-	if ( ! $meta_type || ! $meta_key || ! is_numeric( $object_id ) ) {
-		return false;
-	}
-
-	$object_id = absint( $object_id );
-	if ( ! $object_id ) {
-		return false;
-	}
-
-	$table = _get_meta_table( $meta_type );
-	if ( ! $table ) {
-		return false;
-	}
-
-	$column = sanitize_key($meta_type . '_id');
-	$id_column = 'user' == $meta_type ? 'umeta_id' : 'meta_id';
-
-	// expected_slashed ($meta_key)
-	$raw_meta_key = $meta_key;
-	$meta_key = wp_unslash($meta_key);
-	$passed_value = $meta_value;
-	$meta_value = wp_unslash($meta_value);
-	$meta_value = sanitize_meta( $meta_key, $meta_value, $meta_type );
-
-	/**
-	 * Filters whether to update metadata of a specific type.
-	 *
-	 * The dynamic portion of the hook, `$meta_type`, refers to the meta
-	 * object type (comment, post, or user). Returning a non-null value
-	 * will effectively short-circuit the function.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param null|bool $check      Whether to allow updating metadata for the given type.
-	 * @param int       $object_id  Object ID.
-	 * @param string    $meta_key   Meta key.
-	 * @param mixed     $meta_value Meta value. Must be serializable if non-scalar.
-	 * @param mixed     $prev_value Optional. If specified, only update existing
-	 *                              metadata entries with the specified value.
-	 *                              Otherwise, update all entries.
-	 */
-	$check = apply_filters( "update_{$meta_type}_metadata", null, $object_id, $meta_key, $meta_value, $prev_value );
-	if ( null !== $check )
-		return (bool) $check;
-
-	// Compare existing value to new value if no prev value given and the key exists only once.
-	if ( empty($prev_value) ) {
-		$old_value = get_metadata($meta_type, $object_id, $meta_key);
-		if ( count($old_value) == 1 ) {
-			if ( $old_value[0] === $meta_value )
-				return false;
-		}
-	}
-
-	$meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT $id_column FROM $table WHERE meta_key = %s AND $column = %d", $meta_key, $object_id ) );
-	if ( empty( $meta_ids ) ) {
-		return add_metadata( $meta_type, $object_id, $raw_meta_key, $passed_value );
-	}
-
-	$_meta_value = $meta_value;
-	$meta_value = maybe_serialize( $meta_value );
-
-	$data  = compact( 'meta_value' );
-	$where = array( $column => $object_id, 'meta_key' => $meta_key );
-
-	if ( !empty( $prev_value ) ) {
-		$prev_value = maybe_serialize($prev_value);
-		$where['meta_value'] = $prev_value;
-	}
-
-	foreach ( $meta_ids as $meta_id ) {
-		/**
-		 * Fires immediately before updating metadata of a specific type.
-		 *
-		 * The dynamic portion of the hook, `$meta_type`, refers to the meta
-		 * object type (comment, post, or user).
-		 *
-		 * @since 2.9.0
-		 *
-		 * @param int    $meta_id    ID of the metadata entry to update.
-		 * @param int    $object_id  Object ID.
-		 * @param string $meta_key   Meta key.
-		 * @param mixed  $meta_value Meta value.
-		 */
-		do_action( "update_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
-
-		if ( 'post' == $meta_type ) {
-			/**
-			 * Fires immediately before updating a post's metadata.
-			 *
-			 * @since 2.9.0
-			 *
-			 * @param int    $meta_id    ID of metadata entry to update.
-			 * @param int    $object_id  Object ID.
-			 * @param string $meta_key   Meta key.
-			 * @param mixed  $meta_value Meta value.
-			 */
-			do_action( 'update_postmeta', $meta_id, $object_id, $meta_key, $meta_value );
-		}
-	}
-
-	$result = $wpdb->update( $table, $data, $where );
-	if ( ! $result )
-		return false;
-
-	wp_cache_delete($object_id, $meta_type . '_meta');
-
-	foreach ( $meta_ids as $meta_id ) {
-		/**
-		 * Fires immediately after updating metadata of a specific type.
-		 *
-		 * The dynamic portion of the hook, `$meta_type`, refers to the meta
-		 * object type (comment, post, or user).
-		 *
-		 * @since 2.9.0
-		 *
-		 * @param int    $meta_id    ID of updated metadata entry.
-		 * @param int    $object_id  Object ID.
-		 * @param string $meta_key   Meta key.
-		 * @param mixed  $meta_value Meta value.
-		 */
-		do_action( "updated_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
-
-		if ( 'post' == $meta_type ) {
-			/**
-			 * Fires immediately after updating a post's metadata.
-			 *
-			 * @since 2.9.0
-			 *
-			 * @param int    $meta_id    ID of updated metadata entry.
-			 * @param int    $object_id  Object ID.
-			 * @param string $meta_key   Meta key.
-			 * @param mixed  $meta_value Meta value.
-			 */
-			do_action( 'updated_postmeta', $meta_id, $object_id, $meta_key, $meta_value );
-		}
-	}
-
-	return true;
-}
-
-/**
- * Delete metadata for the specified object.
- *
- * @since 2.9.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $meta_type  Type of object metadata is for (e.g., comment, post, or user)
- * @param int    $object_id  ID of the object metadata is for
- * @param string $meta_key   Metadata key
- * @param mixed  $meta_value Optional. Metadata value. Must be serializable if non-scalar. If specified, only delete
- *                           metadata entries with this value. Otherwise, delete all entries with the specified meta_key.
- *                           Pass `null, `false`, or an empty string to skip this check. (For backward compatibility,
- *                           it is not possible to pass an empty string to delete those entries with an empty string
- *                           for a value.)
- * @param bool   $delete_all Optional, default is false. If true, delete matching metadata entries for all objects,
- *                           ignoring the specified object_id. Otherwise, only delete matching metadata entries for
- *                           the specified object_id.
- * @return bool True on successful delete, false on failure.
- */
-function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $delete_all = false) {
-	global $wpdb;
-
-	if ( ! $meta_type || ! $meta_key || ! is_numeric( $object_id ) && ! $delete_all ) {
-		return false;
-	}
-
-	$object_id = absint( $object_id );
-	if ( ! $object_id && ! $delete_all ) {
-		return false;
-	}
-
-	$table = _get_meta_table( $meta_type );
-	if ( ! $table ) {
-		return false;
-	}
-
-	$type_column = sanitize_key($meta_type . '_id');
-	$id_column = 'user' == $meta_type ? 'umeta_id' : 'meta_id';
-	// expected_slashed ($meta_key)
-	$meta_key = wp_unslash($meta_key);
-	$meta_value = wp_unslash($meta_value);
-
-	/**
-	 * Filters whether to delete metadata of a specific type.
-	 *
-	 * The dynamic portion of the hook, `$meta_type`, refers to the meta
-	 * object type (comment, post, or user). Returning a non-null value
-	 * will effectively short-circuit the function.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param null|bool $delete     Whether to allow metadata deletion of the given type.
-	 * @param int       $object_id  Object ID.
-	 * @param string    $meta_key   Meta key.
-	 * @param mixed     $meta_value Meta value. Must be serializable if non-scalar.
-	 * @param bool      $delete_all Whether to delete the matching metadata entries
-	 *                              for all objects, ignoring the specified $object_id.
-	 *                              Default false.
-	 */
-	$check = apply_filters( "delete_{$meta_type}_metadata", null, $object_id, $meta_key, $meta_value, $delete_all );
-	if ( null !== $check )
-		return (bool) $check;
-
-	$_meta_value = $meta_value;
-	$meta_value = maybe_serialize( $meta_value );
-
-	$query = $wpdb->prepare( "SELECT $id_column FROM $table WHERE meta_key = %s", $meta_key );
-
-	if ( !$delete_all )
-		$query .= $wpdb->prepare(" AND $type_column = %d", $object_id );
-
-	if ( '' !== $meta_value && null !== $meta_value && false !== $meta_value )
-		$query .= $wpdb->prepare(" AND meta_value = %s", $meta_value );
-
-	$meta_ids = $wpdb->get_col( $query );
-	if ( !count( $meta_ids ) )
-		return false;
-
-	if ( $delete_all ) {
-		$value_clause = '';
-		if ( '' !== $meta_value && null !== $meta_value && false !== $meta_value ) {
-			$value_clause = $wpdb->prepare( " AND meta_value = %s", $meta_value );
-		}
-
-		$object_ids = $wpdb->get_col( $wpdb->prepare( "SELECT $type_column FROM $table WHERE meta_key = %s $value_clause", $meta_key ) );
-	}
-
-	/**
-	 * Fires immediately before deleting metadata of a specific type.
-	 *
-	 * The dynamic portion of the hook, `$meta_type`, refers to the meta
-	 * object type (comment, post, or user).
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param array  $meta_ids   An array of metadata entry IDs to delete.
-	 * @param int    $object_id  Object ID.
-	 * @param string $meta_key   Meta key.
-	 * @param mixed  $meta_value Meta value.
-	 */
-	do_action( "delete_{$meta_type}_meta", $meta_ids, $object_id, $meta_key, $_meta_value );
-
-	// Old-style action.
-	if ( 'post' == $meta_type ) {
-		/**
-		 * Fires immediately before deleting metadata for a post.
-		 *
-		 * @since 2.9.0
-		 *
-		 * @param array $meta_ids An array of post metadata entry IDs to delete.
-		 */
-		do_action( 'delete_postmeta', $meta_ids );
-	}
-
-	$query = "DELETE FROM $table WHERE $id_column IN( " . implode( ',', $meta_ids ) . " )";
-
-	$count = $wpdb->query($query);
-
-	if ( !$count )
-		return false;
-
-	if ( $delete_all ) {
-		foreach ( (array) $object_ids as $o_id ) {
-			wp_cache_delete($o_id, $meta_type . '_meta');
-		}
-	} else {
-		wp_cache_delete($object_id, $meta_type . '_meta');
-	}
-
-	/**
-	 * Fires immediately after deleting metadata of a specific type.
-	 *
-	 * The dynamic portion of the hook name, `$meta_type`, refers to the meta
-	 * object type (comment, post, or user).
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param array  $meta_ids   An array of deleted metadata entry IDs.
-	 * @param int    $object_id  Object ID.
-	 * @param string $meta_key   Meta key.
-	 * @param mixed  $meta_value Meta value.
-	 */
-	do_action( "deleted_{$meta_type}_meta", $meta_ids, $object_id, $meta_key, $_meta_value );
-
-	// Old-style action.
-	if ( 'post' == $meta_type ) {
-		/**
-		 * Fires immediately after deleting metadata for a post.
-		 *
-		 * @since 2.9.0
-		 *
-		 * @param array $meta_ids An array of deleted post metadata entry IDs.
-		 */
-		do_action( 'deleted_postmeta', $meta_ids );
-	}
-
-	return true;
-}
-
-/**
- * Retrieve metadata for the specified object.
- *
- * @since 2.9.0
- *
- * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user)
- * @param int    $object_id ID of the object metadata is for
- * @param string $meta_key  Optional. Metadata key. If not specified, retrieve all metadata for
- * 		                    the specified object.
- * @param bool   $single    Optional, default is false.
- *                          If true, return only the first value of the specified meta_key.
- *                          This parameter has no effect if meta_key is not specified.
- * @return mixed Single metadata value, or array of values
- */
-function get_metadata($meta_type, $object_id, $meta_key = '', $single = false) {
-	if ( ! $meta_type || ! is_numeric( $object_id ) ) {
-		return false;
-	}
-
-	$object_id = absint( $object_id );
-	if ( ! $object_id ) {
-		return false;
-	}
-
-	/**
-	 * Filters whether to retrieve metadata of a specific type.
-	 *
-	 * The dynamic portion of the hook, `$meta_type`, refers to the meta
-	 * object type (comment, post, or user). Returning a non-null value
-	 * will effectively short-circuit the function.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param null|array|string $value     The value get_metadata() should return - a single metadata value,
-	 *                                     or an array of values.
-	 * @param int               $object_id Object ID.
-	 * @param string            $meta_key  Meta key.
-	 * @param bool              $single    Whether to return only the first value of the specified $meta_key.
-	 */
-	$check = apply_filters( "get_{$meta_type}_metadata", null, $object_id, $meta_key, $single );
-	if ( null !== $check ) {
-		if ( $single && is_array( $check ) )
-			return $check[0];
-		else
-			return $check;
-	}
-
-	$meta_cache = wp_cache_get($object_id, $meta_type . '_meta');
-
-	if ( !$meta_cache ) {
-		$meta_cache = update_meta_cache( $meta_type, array( $object_id ) );
-		$meta_cache = $meta_cache[$object_id];
-	}
-
-	if ( ! $meta_key ) {
-		return $meta_cache;
-	}
-
-	if ( isset($meta_cache[$meta_key]) ) {
-		if ( $single )
-			return maybe_unserialize( $meta_cache[$meta_key][0] );
-		else
-			return array_map('maybe_unserialize', $meta_cache[$meta_key]);
-	}
-
-	if ($single)
-		return '';
-	else
-		return array();
-}
-
-/**
- * Determine if a meta key is set for a given object
- *
- * @since 3.3.0
- *
- * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user)
- * @param int    $object_id ID of the object metadata is for
- * @param string $meta_key  Metadata key.
- * @return bool True of the key is set, false if not.
- */
-function metadata_exists( $meta_type, $object_id, $meta_key ) {
-	if ( ! $meta_type || ! is_numeric( $object_id ) ) {
-		return false;
-	}
-
-	$object_id = absint( $object_id );
-	if ( ! $object_id ) {
-		return false;
-	}
-
-	/** This filter is documented in wp-includes/meta.php */
-	$check = apply_filters( "get_{$meta_type}_metadata", null, $object_id, $meta_key, true );
-	if ( null !== $check )
-		return (bool) $check;
-
-	$meta_cache = wp_cache_get( $object_id, $meta_type . '_meta' );
-
-	if ( !$meta_cache ) {
-		$meta_cache = update_meta_cache( $meta_type, array( $object_id ) );
-		$meta_cache = $meta_cache[$object_id];
-	}
-
-	if ( isset( $meta_cache[ $meta_key ] ) )
-		return true;
-
-	return false;
-}
-
-/**
- * Get meta data by meta ID
- *
- * @since 3.3.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $meta_type Type of object metadata is for (e.g., comment, post, term, or user).
- * @param int    $meta_id   ID for a specific meta row
- * @return object|false Meta object or false.
- */
-function get_metadata_by_mid( $meta_type, $meta_id ) {
-	global $wpdb;
-
-	if ( ! $meta_type || ! is_numeric( $meta_id ) ) {
-		return false;
-	}
-
-	$meta_id = absint( $meta_id );
-	if ( ! $meta_id ) {
-		return false;
-	}
-
-	$table = _get_meta_table( $meta_type );
-	if ( ! $table ) {
-		return false;
-	}
-
-	$id_column = ( 'user' == $meta_type ) ? 'umeta_id' : 'meta_id';
-
-	$meta = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $table WHERE $id_column = %d", $meta_id ) );
-
-	if ( empty( $meta ) )
-		return false;
-
-	if ( isset( $meta->meta_value ) )
-		$meta->meta_value = maybe_unserialize( $meta->meta_value );
-
-	return $meta;
-}
-
-/**
- * Update meta data by meta ID
- *
- * @since 3.3.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $meta_type  Type of object metadata is for (e.g., comment, post, or user)
- * @param int    $meta_id    ID for a specific meta row
- * @param string $meta_value Metadata value
- * @param string $meta_key   Optional, you can provide a meta key to update it
- * @return bool True on successful update, false on failure.
- */
-function update_metadata_by_mid( $meta_type, $meta_id, $meta_value, $meta_key = false ) {
-	global $wpdb;
-
-	// Make sure everything is valid.
-	if ( ! $meta_type || ! is_numeric( $meta_id ) ) {
-		return false;
-	}
-
-	$meta_id = absint( $meta_id );
-	if ( ! $meta_id ) {
-		return false;
-	}
-
-	$table = _get_meta_table( $meta_type );
-	if ( ! $table ) {
-		return false;
-	}
-
-	$column = sanitize_key($meta_type . '_id');
-	$id_column = 'user' == $meta_type ? 'umeta_id' : 'meta_id';
-
-	// Fetch the meta and go on if it's found.
-	if ( $meta = get_metadata_by_mid( $meta_type, $meta_id ) ) {
-		$original_key = $meta->meta_key;
-		$object_id = $meta->{$column};
-
-		// If a new meta_key (last parameter) was specified, change the meta key,
-		// otherwise use the original key in the update statement.
-		if ( false === $meta_key ) {
-			$meta_key = $original_key;
-		} elseif ( ! is_string( $meta_key ) ) {
-			return false;
-		}
-
-		// Sanitize the meta
-		$_meta_value = $meta_value;
-		$meta_value = sanitize_meta( $meta_key, $meta_value, $meta_type );
-		$meta_value = maybe_serialize( $meta_value );
-
-		// Format the data query arguments.
-		$data = array(
-			'meta_key' => $meta_key,
-			'meta_value' => $meta_value
-		);
-
-		// Format the where query arguments.
-		$where = array();
-		$where[$id_column] = $meta_id;
-
-		/** This action is documented in wp-includes/meta.php */
-		do_action( "update_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
-
-		if ( 'post' == $meta_type ) {
-			/** This action is documented in wp-includes/meta.php */
-			do_action( 'update_postmeta', $meta_id, $object_id, $meta_key, $meta_value );
-		}
-
-		// Run the update query, all fields in $data are %s, $where is a %d.
-		$result = $wpdb->update( $table, $data, $where, '%s', '%d' );
-		if ( ! $result )
-			return false;
-
-		// Clear the caches.
-		wp_cache_delete($object_id, $meta_type . '_meta');
-
-		/** This action is documented in wp-includes/meta.php */
-		do_action( "updated_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
-
-		if ( 'post' == $meta_type ) {
-			/** This action is documented in wp-includes/meta.php */
-			do_action( 'updated_postmeta', $meta_id, $object_id, $meta_key, $meta_value );
-		}
-
-		return true;
-	}
-
-	// And if the meta was not found.
-	return false;
-}
-
-/**
- * Delete meta data by meta ID
- *
- * @since 3.3.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $meta_type Type of object metadata is for (e.g., comment, post, term, or user).
- * @param int    $meta_id   ID for a specific meta row
- * @return bool True on successful delete, false on failure.
- */
-function delete_metadata_by_mid( $meta_type, $meta_id ) {
-	global $wpdb;
-
-	// Make sure everything is valid.
-	if ( ! $meta_type || ! is_numeric( $meta_id ) ) {
-		return false;
-	}
-
-	$meta_id = absint( $meta_id );
-	if ( ! $meta_id ) {
-		return false;
-	}
-
-	$table = _get_meta_table( $meta_type );
-	if ( ! $table ) {
-		return false;
-	}
-
-	// object and id columns
-	$column = sanitize_key($meta_type . '_id');
-	$id_column = 'user' == $meta_type ? 'umeta_id' : 'meta_id';
-
-	// Fetch the meta and go on if it's found.
-	if ( $meta = get_metadata_by_mid( $meta_type, $meta_id ) ) {
-		$object_id = $meta->{$column};
-
-		/** This action is documented in wp-includes/meta.php */
-		do_action( "delete_{$meta_type}_meta", (array) $meta_id, $object_id, $meta->meta_key, $meta->meta_value );
-
-		// Old-style action.
-		if ( 'post' == $meta_type || 'comment' == $meta_type ) {
-			/**
-			 * Fires immediately before deleting post or comment metadata of a specific type.
-			 *
-			 * The dynamic portion of the hook, `$meta_type`, refers to the meta
-			 * object type (post or comment).
-			 *
-			 * @since 3.4.0
-			 *
-			 * @param int $meta_id ID of the metadata entry to delete.
-			 */
-			do_action( "delete_{$meta_type}meta", $meta_id );
-		}
-
-		// Run the query, will return true if deleted, false otherwise
-		$result = (bool) $wpdb->delete( $table, array( $id_column => $meta_id ) );
-
-		// Clear the caches.
-		wp_cache_delete($object_id, $meta_type . '_meta');
-
-		/** This action is documented in wp-includes/meta.php */
-		do_action( "deleted_{$meta_type}_meta", (array) $meta_id, $object_id, $meta->meta_key, $meta->meta_value );
-
-		// Old-style action.
-		if ( 'post' == $meta_type || 'comment' == $meta_type ) {
-			/**
-			 * Fires immediately after deleting post or comment metadata of a specific type.
-			 *
-			 * The dynamic portion of the hook, `$meta_type`, refers to the meta
-			 * object type (post or comment).
-			 *
-			 * @since 3.4.0
-			 *
-			 * @param int $meta_ids Deleted metadata entry ID.
-			 */
-			do_action( "deleted_{$meta_type}meta", $meta_id );
-		}
-
-		return $result;
-
-	}
-
-	// Meta id was not found.
-	return false;
-}
-
-/**
- * Update the metadata cache for the specified objects.
- *
- * @since 2.9.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string    $meta_type  Type of object metadata is for (e.g., comment, post, or user)
- * @param int|array $object_ids Array or comma delimited list of object IDs to update cache for
- * @return array|false Metadata cache for the specified objects, or false on failure.
- */
-function update_meta_cache($meta_type, $object_ids) {
-	global $wpdb;
-
-	if ( ! $meta_type || ! $object_ids ) {
-		return false;
-	}
-
-	$table = _get_meta_table( $meta_type );
-	if ( ! $table ) {
-		return false;
-	}
-
-	$column = sanitize_key($meta_type . '_id');
-
-	if ( !is_array($object_ids) ) {
-		$object_ids = preg_replace('|[^0-9,]|', '', $object_ids);
-		$object_ids = explode(',', $object_ids);
-	}
-
-	$object_ids = array_map('intval', $object_ids);
-
-	$cache_key = $meta_type . '_meta';
-	$ids = array();
-	$cache = array();
-	foreach ( $object_ids as $id ) {
-		$cached_object = wp_cache_get( $id, $cache_key );
-		if ( false === $cached_object )
-			$ids[] = $id;
-		else
-			$cache[$id] = $cached_object;
-	}
-
-	if ( empty( $ids ) )
-		return $cache;
-
-	// Get meta info
-	$id_list = join( ',', $ids );
-	$id_column = 'user' == $meta_type ? 'umeta_id' : 'meta_id';
-	$meta_list = $wpdb->get_results( "SELECT $column, meta_key, meta_value FROM $table WHERE $column IN ($id_list) ORDER BY $id_column ASC", ARRAY_A );
-
-	if ( !empty($meta_list) ) {
-		foreach ( $meta_list as $metarow) {
-			$mpid = intval($metarow[$column]);
-			$mkey = $metarow['meta_key'];
-			$mval = $metarow['meta_value'];
-
-			// Force subkeys to be array type:
-			if ( !isset($cache[$mpid]) || !is_array($cache[$mpid]) )
-				$cache[$mpid] = array();
-			if ( !isset($cache[$mpid][$mkey]) || !is_array($cache[$mpid][$mkey]) )
-				$cache[$mpid][$mkey] = array();
-
-			// Add a value to the current pid/key:
-			$cache[$mpid][$mkey][] = $mval;
-		}
-	}
-
-	foreach ( $ids as $id ) {
-		if ( ! isset($cache[$id]) )
-			$cache[$id] = array();
-		wp_cache_add( $id, $cache[$id], $cache_key );
-	}
-
-	return $cache;
-}
-
-/**
- * Retrieves the queue for lazy-loading metadata.
- *
- * @since 4.5.0
- *
- * @return WP_Metadata_Lazyloader $lazyloader Metadata lazyloader queue.
- */
-function wp_metadata_lazyloader() {
-	static $wp_metadata_lazyloader;
-
-	if ( null === $wp_metadata_lazyloader ) {
-		$wp_metadata_lazyloader = new WP_Metadata_Lazyloader();
-	}
-
-	return $wp_metadata_lazyloader;
-}
-
-/**
- * Given a meta query, generates SQL clauses to be appended to a main query.
- *
- * @since 3.2.0
- *
- * @see WP_Meta_Query
- *
- * @param array $meta_query         A meta query.
- * @param string $type              Type of meta.
- * @param string $primary_table     Primary database table name.
- * @param string $primary_id_column Primary ID column name.
- * @param object $context           Optional. The main query object
- * @return array Associative array of `JOIN` and `WHERE` SQL.
- */
-function get_meta_sql( $meta_query, $type, $primary_table, $primary_id_column, $context = null ) {
-	$meta_query_obj = new WP_Meta_Query( $meta_query );
-	return $meta_query_obj->get_sql( $type, $primary_table, $primary_id_column, $context );
-}
-
-/**
- * Retrieve the name of the metadata table for the specified object type.
- *
- * @since 2.9.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $type Type of object to get metadata table for (e.g., comment, post, or user)
- * @return string|false Metadata table name, or false if no metadata table exists
- */
-function _get_meta_table($type) {
-	global $wpdb;
-
-	$table_name = $type . 'meta';
-
-	if ( empty($wpdb->$table_name) )
-		return false;
-
-	return $wpdb->$table_name;
-}
-
-/**
- * Determine whether a meta key is protected.
- *
- * @since 3.1.3
- *
- * @param string      $meta_key Meta key
- * @param string|null $meta_type
- * @return bool True if the key is protected, false otherwise.
- */
-function is_protected_meta( $meta_key, $meta_type = null ) {
-	$protected = ( '_' == $meta_key[0] );
-
-	/**
-	 * Filters whether a meta key is protected.
-	 *
-	 * @since 3.2.0
-	 *
-	 * @param bool   $protected Whether the key is protected. Default false.
-	 * @param string $meta_key  Meta key.
-	 * @param string $meta_type Meta type.
-	 */
-	return apply_filters( 'is_protected_meta', $protected, $meta_key, $meta_type );
-}
-
-/**
- * Sanitize meta value.
- *
- * @since 3.1.3
- *
- * @param string $meta_key       Meta key.
- * @param mixed  $meta_value     Meta value to sanitize.
- * @param string $object_type    Type of object the meta is registered to.
- *
- * @return mixed Sanitized $meta_value.
- */
-function sanitize_meta( $meta_key, $meta_value, $object_type ) {
-	/**
-	 * Filters the sanitization of a specific meta key of a specific meta type.
-	 *
-	 * The dynamic portions of the hook name, `$meta_type`, and `$meta_key`,
-	 * refer to the metadata object type (comment, post, or user) and the meta
-	 * key value, respectively.
-	 *
-	 * @since 3.3.0
-	 *
-	 * @param mixed  $meta_value      Meta value to sanitize.
-	 * @param string $meta_key        Meta key.
-	 * @param string $object_type     Object type.
-	 */
-	return apply_filters( "sanitize_{$object_type}_meta_{$meta_key}", $meta_value, $meta_key, $object_type );
-}
-
-/**
- * Registers a meta key.
- *
- * @since 3.3.0
- * @since 4.6.0 {@link https://make.wordpress.org/core/2016/07/08/enhancing-register_meta-in-4-6/ Modified
- *              to support an array of data to attach to registered meta keys}. Previous arguments for
- *              `$sanitize_callback` and `$auth_callback` have been folded into this array.
- *
- * @param string $object_type    Type of object this meta is registered to.
- * @param string $meta_key       Meta key to register.
- * @param array  $args {
- *     Data used to describe the meta key when registered.
- *
- *     @type string $type              The type of data associated with this meta key.
- *     @type string $description       A description of the data attached to this meta key.
- *     @type bool   $single            Whether the meta key has one value per object, or an array of values per object.
- *     @type string $sanitize_callback A function or method to call when sanitizing `$meta_key` data.
- *     @type string $auth_callback     Optional. A function or method to call when performing edit_post_meta, add_post_meta, and delete_post_meta capability checks.
- *     @type bool   $show_in_rest      Whether data associated with this meta key can be considered public.
- * }
- * @param string|array $deprecated Deprecated. Use `$args` instead.
- *
- * @return bool True if the meta key was successfully registered in the global array, false if not.
- *                       Registering a meta key with distinct sanitize and auth callbacks will fire those
- *                       callbacks, but will not add to the global registry.
- */
-function register_meta( $object_type, $meta_key, $args, $deprecated = null ) {
-	global $wp_meta_keys;
-
-	if ( ! is_array( $wp_meta_keys ) ) {
-		$wp_meta_keys = array();
-	}
-
-	$defaults = array(
-		'type'              => 'string',
-		'description'       => '',
-		'single'            => false,
-		'sanitize_callback' => null,
-		'auth_callback'     => null,
-		'show_in_rest'      => false,
-	);
-
-	// There used to be individual args for sanitize and auth callbacks
-	$has_old_sanitize_cb = false;
-	$has_old_auth_cb = false;
-
-	if ( is_callable( $args ) ) {
-		$args = array(
-			'sanitize_callback' => $args,
-		);
-
-		$has_old_sanitize_cb = true;
-	} else {
-		$args = (array) $args;
-	}
-
-	if ( is_callable( $deprecated ) ) {
-		$args['auth_callback'] = $deprecated;
-		$has_old_auth_cb = true;
-	}
-
-	/**
-	 * Filters the registration arguments when registering meta.
-	 *
-	 * @since 4.6.0
-	 *
-	 * @param array  $args        Array of meta registration arguments.
-	 * @param array  $defaults    Array of default arguments.
-	 * @param string $object_type Object type.
-	 * @param string $meta_key    Meta key.
-	 */
-	$args = apply_filters( 'register_meta_args', $args, $defaults, $object_type, $meta_key );
-	$args = wp_parse_args( $args, $defaults );
-
-	// If `auth_callback` is not provided, fall back to `is_protected_meta()`.
-	if ( empty( $args['auth_callback'] ) ) {
-		if ( is_protected_meta( $meta_key, $object_type ) ) {
-			$args['auth_callback'] = '__return_false';
-		} else {
-			$args['auth_callback'] = '__return_true';
-		}
-	}
-
-	// Back-compat: old sanitize and auth callbacks are applied to all of an object type.
-	if ( is_callable( $args['sanitize_callback'] ) ) {
-		add_filter( "sanitize_{$object_type}_meta_{$meta_key}", $args['sanitize_callback'], 10, 3 );
-	}
-
-	if ( is_callable( $args['auth_callback'] ) ) {
-		add_filter( "auth_{$object_type}_meta_{$meta_key}", $args['auth_callback'], 10, 6 );
-	}
-
-	// Global registry only contains meta keys registered with the array of arguments added in 4.6.0.
-	if ( ! $has_old_auth_cb && ! $has_old_sanitize_cb ) {
-		$wp_meta_keys[ $object_type ][ $meta_key ] = $args;
-
-		return true;
-	}
-
-	return false;
-}
-
-/**
- * Checks if a meta key is registered.
- *
- * @since 4.6.0
- *
- * @param string $object_type    The type of object.
- * @param string $meta_key       The meta key.
- *
- * @return bool True if the meta key is registered to the object type. False if not.
- */
-function registered_meta_key_exists( $object_type, $meta_key ) {
-	global $wp_meta_keys;
-
-	if ( ! is_array( $wp_meta_keys ) ) {
-		return false;
-	}
-
-	if ( ! isset( $wp_meta_keys[ $object_type ] ) ) {
-		return false;
-	}
-
-	if ( isset( $wp_meta_keys[ $object_type ][ $meta_key ] ) ) {
-		return true;
-	}
-
-	return false;
-}
-
-/**
- * Unregisters a meta key from the list of registered keys.
- *
- * @since 4.6.0
- *
- * @param string $object_type The type of object.
- * @param string $meta_key    The meta key.
- * @return bool True if successful. False if the meta key was not registered.
- */
-function unregister_meta_key( $object_type, $meta_key ) {
-	global $wp_meta_keys;
-
-	if ( ! registered_meta_key_exists( $object_type, $meta_key ) ) {
-		return false;
-	}
-
-	$args = $wp_meta_keys[ $object_type ][ $meta_key ];
-
-	if ( isset( $args['sanitize_callback'] ) && is_callable( $args['sanitize_callback'] ) ) {
-		remove_filter( "sanitize_{$object_type}_meta_{$meta_key}", $args['sanitize_callback'] );
-	}
-
-	if ( isset( $args['auth_callback'] ) && is_callable( $args['auth_callback'] ) ) {
-		remove_filter( "auth_{$object_type}_meta_{$meta_key}", $args['auth_callback'] );
-	}
-
-	unset( $wp_meta_keys[ $object_type ][ $meta_key ] );
-
-	// Do some clean up
-	if ( empty( $wp_meta_keys[ $object_type ] ) ) {
-		unset( $wp_meta_keys[ $object_type ] );
-	}
-
-	return true;
-}
-
-/**
- * Retrieves a list of registered meta keys for an object type.
- *
- * @since 4.6.0
- *
- * @param string $object_type The type of object. Post, comment, user, term.
- * @return array List of registered meta keys.
- */
-function get_registered_meta_keys( $object_type ) {
-	global $wp_meta_keys;
-
-	if ( ! is_array( $wp_meta_keys ) || ! isset( $wp_meta_keys[ $object_type ] ) ) {
-		return array();
-	}
-
-	return $wp_meta_keys[ $object_type ];
-}
-
-/**
- * Retrieves registered metadata for a specified object.
- *
- * @since 4.6.0
- *
- * @param string $object_type Type of object to request metadata for. (e.g. comment, post, term, user)
- * @param int    $object_id   ID of the object the metadata is for.
- * @param string $meta_key    Optional. Registered metadata key. If not specified, retrieve all registered
- *                            metadata for the specified object.
- * @return mixed A single value or array of values for a key if specified. An array of all registered keys
- *               and values for an object ID if not.
- */
-function get_registered_metadata( $object_type, $object_id, $meta_key = '' ) {
-	if ( ! empty( $meta_key ) ) {
-		if ( ! registered_meta_key_exists( $object_type, $meta_key ) ) {
-			return false;
-		}
-		$meta_keys = get_registered_meta_keys( $object_type );
-		$meta_key_data = $meta_keys[ $meta_key ];
-
-		$data = get_metadata( $object_type, $object_id, $meta_key, $meta_key_data['single'] );
-
-		return $data;
-	}
-
-	$data = get_metadata( $object_type, $object_id );
-
-	$meta_keys = get_registered_meta_keys( $object_type );
-	$registered_data = array();
-
-	// Someday, array_filter()
-	foreach ( $meta_keys as $k => $v ) {
-		if ( isset( $data[ $k ] ) ) {
-			$registered_data[ $k ] = $data[ $k ];
-		}
-	}
-
-	return $registered_data;
-}
-
-/**
- * Filter out `register_meta()` args based on a whitelist.
- * `register_meta()` args may change over time, so requiring the whitelist
- * to be explicitly turned off is a warranty seal of sorts.
- *
- * @access private
- * @since  4.6.0
- *
- * @param  array $args         Arguments from `register_meta()`.
- * @param  array $default_args Default arguments for `register_meta()`.
- *
- * @return array Filtered arguments.
- */
-function _wp_register_meta_args_whitelist( $args, $default_args ) {
-	$whitelist = array_keys( $default_args );
-
-	// In an anonymous function world, this would be better as an array_filter()
-	foreach ( $args as $key => $value ) {
-		if ( ! in_array( $key, $whitelist ) ) {
-			unset( $args[ $key ] );
-		}
-	}
-
-	return $args;
-}
Index: www/wp-includes/autoload/http/WP_HTTP_Fsockopen.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/http/WP_HTTP_Fsockopen.php	(revision )
+++ www/wp-includes/autoload/http/WP_HTTP_Fsockopen.php	(revision )
@@ -0,0 +1,16 @@
+<?php
+
+/**
+ * Deprecated HTTP Transport method which used fsockopen.
+ *
+ * This class is not used, and is included for backward compatibility only.
+ * All code should make use of WP_Http directly through its API.
+ *
+ * @see WP_HTTP::request
+ *
+ * @since 2.7.0
+ * @deprecated 3.7.0 Please use WP_HTTP::request() directly
+ */
+class WP_HTTP_Fsockopen extends WP_HTTP_Streams {
+	// For backward compatibility for users who are using the class directly.
+}
Index: www/wp-includes/SimplePie/Cache/DB.php
===================================================================
--- www/wp-includes/SimplePie/Cache/DB.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_Cache_DB.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/admin-post.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/admin-post.php	(revision 38565)
+++ www/wp-admin/admin-post.php	(revision 38565)
@@ -1,71 +0,0 @@
-<?php
-/**
- * WordPress Generic Request (POST/GET) Handler
- *
- * Intended for form submission handling in themes and plugins.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** We are located in WordPress Administration Screens */
-if ( ! defined( 'WP_ADMIN' ) ) {
-	define( 'WP_ADMIN', true );
-}
-
-if ( defined('ABSPATH') )
-	require_once(ABSPATH . 'wp-load.php');
-else
-	require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
-
-/** Allow for cross-domain requests (from the front end). */
-send_origin_headers();
-
-require_once(ABSPATH . 'wp-admin/includes/admin.php');
-
-nocache_headers();
-
-/** This action is documented in wp-admin/admin.php */
-do_action( 'admin_init' );
-
-$action = empty( $_REQUEST['action'] ) ? '' : $_REQUEST['action'];
-
-if ( ! wp_validate_auth_cookie() ) {
-	if ( empty( $action ) ) {
-		/**
-		 * Fires on a non-authenticated admin post request where no action was supplied.
-		 *
-		 * @since 2.6.0
-		 */
-		do_action( 'admin_post_nopriv' );
-	} else {
-		/**
-		 * Fires on a non-authenticated admin post request for the given action.
-		 *
-		 * The dynamic portion of the hook name, `$action`, refers to the given
-		 * request action.
-		 *
-		 * @since 2.6.0
-		 */
-		do_action( "admin_post_nopriv_{$action}" );
-	}
-} else {
-	if ( empty( $action ) ) {
-		/**
-		 * Fires on an authenticated admin post request where no action was supplied.
-		 *
-		 * @since 2.6.0
-		 */
-		do_action( 'admin_post' );
-	} else {
-		/**
-		 * Fires on an authenticated admin post request for the given action.
-		 *
-		 * The dynamic portion of the hook name, `$action`, refers to the given
-		 * request action.
-		 *
-		 * @since 2.6.0
-		 */
-		do_action( "admin_post_{$action}" );
-	}
-}
Index: www/wp-includes/autoload/requests/Exception/HTTP/415.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/415.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/415.php	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-<?php
-/**
- * Exception for 415 Unsupported Media Type responses
- *
- * @package Requests
- */
-
-/**
- * Exception for 415 Unsupported Media Type responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_415 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 415;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Unsupported Media Type';
-}
\ No newline at end of file
Index: www/wp-includes/version.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/version.php	(revision 38565)
+++ www/wp-includes/version.php	(revision 38565)
@@ -1,35 +0,0 @@
-<?php
-/**
- * The WordPress version string
- *
- * @global string $wp_version
- */
-$wp_version = '4.7-alpha-38622';
-
-/**
- * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
- *
- * @global int $wp_db_version
- */
-$wp_db_version = 38590;
-
-/**
- * Holds the TinyMCE version
- *
- * @global string $tinymce_version
- */
-$tinymce_version = '4401-20160726';
-
-/**
- * Holds the required PHP version
- *
- * @global string $required_php_version
- */
-$required_php_version = '5.2.4';
-
-/**
- * Holds the required MySQL version
- *
- * @global string $required_mysql_version
- */
-$required_mysql_version = '5.0';
Index: www/wp-admin/menu.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/menu.php	(revision 38565)
+++ www/wp-admin/menu.php	(revision 38565)
@@ -1,282 +0,0 @@
-<?php
-/**
- * Build Administration Menu.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/**
- * Constructs the admin menu.
- *
- * The elements in the array are :
- *     0: Menu item name
- *     1: Minimum level or capability required.
- *     2: The URL of the item's file
- *     3: Class
- *     4: ID
- *     5: Icon for top level menu
- *
- * @global array $menu
- */
-
-$menu[2] = array( __('Dashboard'), 'read', 'index.php', '', 'menu-top menu-top-first menu-icon-dashboard', 'menu-dashboard', 'dashicons-dashboard' );
-
-$submenu[ 'index.php' ][0] = array( __('Home'), 'read', 'index.php' );
-
-if ( is_multisite() ) {
-	$submenu[ 'index.php' ][5] = array( __('My Sites'), 'read', 'my-sites.php' );
-}
-
-if ( ! is_multisite() || is_super_admin() )
-	$update_data = wp_get_update_data();
-
-if ( ! is_multisite() ) {
-	if ( current_user_can( 'update_core' ) )
-		$cap = 'update_core';
-	elseif ( current_user_can( 'update_plugins' ) )
-		$cap = 'update_plugins';
-	else
-		$cap = 'update_themes';
-	$submenu[ 'index.php' ][10] = array( sprintf( __('Updates %s'), "<span class='update-plugins count-{$update_data['counts']['total']}' title='{$update_data['title']}'><span class='update-count'>" . number_format_i18n($update_data['counts']['total']) . "</span></span>" ), $cap, 'update-core.php');
-	unset( $cap );
-}
-
-$menu[4] = array( '', 'read', 'separator1', '', 'wp-menu-separator' );
-
-// $menu[5] = Posts
-
-$menu[10] = array( __('Media'), 'upload_files', 'upload.php', '', 'menu-top menu-icon-media', 'menu-media', 'dashicons-admin-media' );
-	$submenu['upload.php'][5] = array( __('Library'), 'upload_files', 'upload.php');
-	/* translators: add new file */
-	$submenu['upload.php'][10] = array( _x('Add New', 'file'), 'upload_files', 'media-new.php');
-	$i = 15;
-	foreach ( get_taxonomies_for_attachments( 'objects' ) as $tax ) {
-		if ( ! $tax->show_ui || ! $tax->show_in_menu )
-			continue;
-
-		$submenu['upload.php'][$i++] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, 'edit-tags.php?taxonomy=' . $tax->name . '&amp;post_type=attachment' );
-	}
-	unset( $tax, $i );
-
-$menu[15] = array( __('Links'), 'manage_links', 'link-manager.php', '', 'menu-top menu-icon-links', 'menu-links', 'dashicons-admin-links' );
-	$submenu['link-manager.php'][5] = array( _x('All Links', 'admin menu'), 'manage_links', 'link-manager.php' );
-	/* translators: add new links */
-	$submenu['link-manager.php'][10] = array( _x('Add New', 'link'), 'manage_links', 'link-add.php' );
-	$submenu['link-manager.php'][15] = array( __('Link Categories'), 'manage_categories', 'edit-tags.php?taxonomy=link_category' );
-
-// $menu[20] = Pages
-
-// Avoid the comment count query for users who cannot edit_posts.
-if ( current_user_can( 'edit_posts' ) ) {
-	$awaiting_mod = wp_count_comments();
-	$awaiting_mod = $awaiting_mod->moderated;
-	$menu[25] = array(
-		sprintf( __( 'Comments %s' ), '<span class="awaiting-mod count-' . absint( $awaiting_mod ) . '"><span class="pending-count">' . number_format_i18n( $awaiting_mod ) . '</span></span>' ),
-		'edit_posts',
-		'edit-comments.php',
-		'',
-		'menu-top menu-icon-comments',
-		'menu-comments',
-		'dashicons-admin-comments',
-	);
-	unset( $awaiting_mod );
-}
-
-$submenu[ 'edit-comments.php' ][0] = array( __('All Comments'), 'edit_posts', 'edit-comments.php' );
-
-$_wp_last_object_menu = 25; // The index of the last top-level menu in the object menu group
-
-$types = (array) get_post_types( array('show_ui' => true, '_builtin' => false, 'show_in_menu' => true ) );
-$builtin = array( 'post', 'page' );
-foreach ( array_merge( $builtin, $types ) as $ptype ) {
-	$ptype_obj = get_post_type_object( $ptype );
-	// Check if it should be a submenu.
-	if ( $ptype_obj->show_in_menu !== true )
-		continue;
-	$ptype_menu_position = is_int( $ptype_obj->menu_position ) ? $ptype_obj->menu_position : ++$_wp_last_object_menu; // If we're to use $_wp_last_object_menu, increment it first.
-	$ptype_for_id = sanitize_html_class( $ptype );
-
-	$menu_icon = 'dashicons-admin-post';
-	if ( is_string( $ptype_obj->menu_icon ) ) {
-		// Special handling for data:image/svg+xml and Dashicons.
-		if ( 0 === strpos( $ptype_obj->menu_icon, 'data:image/svg+xml;base64,' ) || 0 === strpos( $ptype_obj->menu_icon, 'dashicons-' ) ) {
-			$menu_icon = $ptype_obj->menu_icon;
-		} else {
-			$menu_icon = esc_url( $ptype_obj->menu_icon );
-		}
-	} elseif ( in_array( $ptype, $builtin ) ) {
-		$menu_icon = 'dashicons-admin-' . $ptype;
-	}
-
-	$menu_class = 'menu-top menu-icon-' . $ptype_for_id;
-	// 'post' special case
-	if ( 'post' === $ptype ) {
-		$menu_class .= ' open-if-no-js';
-		$ptype_file = "edit.php";
-		$post_new_file = "post-new.php";
-		$edit_tags_file = "edit-tags.php?taxonomy=%s";
-	} else {
-		$ptype_file = "edit.php?post_type=$ptype";
-		$post_new_file = "post-new.php?post_type=$ptype";
-		$edit_tags_file = "edit-tags.php?taxonomy=%s&amp;post_type=$ptype";
-	}
-
-	if ( in_array( $ptype, $builtin ) ) {
-		$ptype_menu_id = 'menu-' . $ptype_for_id . 's';
-	} else {
-		$ptype_menu_id = 'menu-posts-' . $ptype_for_id;
-	}
-	/*
-	 * If $ptype_menu_position is already populated or will be populated
-	 * by a hard-coded value below, increment the position.
-	 */
-	$core_menu_positions = array(59, 60, 65, 70, 75, 80, 85, 99);
-	while ( isset($menu[$ptype_menu_position]) || in_array($ptype_menu_position, $core_menu_positions) )
-		$ptype_menu_position++;
-
-	$menu[$ptype_menu_position] = array( esc_attr( $ptype_obj->labels->menu_name ), $ptype_obj->cap->edit_posts, $ptype_file, '', $menu_class, $ptype_menu_id, $menu_icon );
-	$submenu[ $ptype_file ][5]  = array( $ptype_obj->labels->all_items, $ptype_obj->cap->edit_posts,  $ptype_file );
-	$submenu[ $ptype_file ][10]  = array( $ptype_obj->labels->add_new, $ptype_obj->cap->create_posts, $post_new_file );
-
-	$i = 15;
-	foreach ( get_taxonomies( array(), 'objects' ) as $tax ) {
-		if ( ! $tax->show_ui || ! $tax->show_in_menu || ! in_array($ptype, (array) $tax->object_type, true) )
-			continue;
-
-		$submenu[ $ptype_file ][$i++] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, sprintf( $edit_tags_file, $tax->name ) );
-	}
-}
-unset( $ptype, $ptype_obj, $ptype_for_id, $ptype_menu_position, $menu_icon, $i, $tax, $post_new_file );
-
-$menu[59] = array( '', 'read', 'separator2', '', 'wp-menu-separator' );
-
-$appearance_cap = current_user_can( 'switch_themes') ? 'switch_themes' : 'edit_theme_options';
-
-$menu[60] = array( __( 'Appearance' ), $appearance_cap, 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'dashicons-admin-appearance' );
-	$submenu['themes.php'][5] = array( __( 'Themes' ), $appearance_cap, 'themes.php' );
-
-	$customize_url = add_query_arg( 'return', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), 'customize.php' );
-	$submenu['themes.php'][6] = array( __( 'Customize' ), 'customize', esc_url( $customize_url ), '', 'hide-if-no-customize' );
-
-	if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) {
-		$submenu['themes.php'][10] = array( __( 'Menus' ), 'edit_theme_options', 'nav-menus.php' );
-	}
-
-	if ( current_theme_supports( 'custom-header' ) && current_user_can( 'customize') ) {
-		$customize_header_url = add_query_arg( array( 'autofocus' => array( 'control' => 'header_image' ) ), $customize_url );
-		$submenu['themes.php'][15] = array( __( 'Header' ), $appearance_cap, esc_url( $customize_header_url ), '', 'hide-if-no-customize' );
-	}
-
-	if ( current_theme_supports( 'custom-background' ) && current_user_can( 'customize') ) {
-		$customize_background_url = add_query_arg( array( 'autofocus' => array( 'control' => 'background_image' ) ), $customize_url );
-		$submenu['themes.php'][20] = array( __( 'Background' ), $appearance_cap, esc_url( $customize_background_url ), '', 'hide-if-no-customize' );
-	}
-
-	unset( $customize_url );
-
-unset( $appearance_cap );
-
-// Add 'Editor' to the bottom of the Appearance menu.
-if ( ! is_multisite() ) {
-	add_action('admin_menu', '_add_themes_utility_last', 101);
-}
-/**
- * Adds the (theme) 'Editor' link to the bottom of the Appearance menu.
- *
- * @access private
- * @since 3.0.0
- */
-function _add_themes_utility_last() {
-	// Must use API on the admin_menu hook, direct modification is only possible on/before the _admin_menu hook
-	add_submenu_page('themes.php', _x('Editor', 'theme editor'), _x('Editor', 'theme editor'), 'edit_themes', 'theme-editor.php');
-}
-
-$count = '';
-if ( ! is_multisite() && current_user_can( 'update_plugins' ) ) {
-	if ( ! isset( $update_data ) )
-		$update_data = wp_get_update_data();
-	$count = "<span class='update-plugins count-{$update_data['counts']['plugins']}'><span class='plugin-count'>" . number_format_i18n($update_data['counts']['plugins']) . "</span></span>";
-}
-
-$menu[65] = array( sprintf( __('Plugins %s'), $count ), 'activate_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'dashicons-admin-plugins' );
-
-$submenu['plugins.php'][5]  = array( __('Installed Plugins'), 'activate_plugins', 'plugins.php' );
-
-	if ( ! is_multisite() ) {
-		/* translators: add new plugin */
-		$submenu['plugins.php'][10] = array( _x('Add New', 'plugin'), 'install_plugins', 'plugin-install.php' );
-		$submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_plugins', 'plugin-editor.php' );
-	}
-
-unset( $update_data );
-
-if ( current_user_can('list_users') )
-	$menu[70] = array( __('Users'), 'list_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'dashicons-admin-users' );
-else
-	$menu[70] = array( __('Profile'), 'read', 'profile.php', '', 'menu-top menu-icon-users', 'menu-users', 'dashicons-admin-users' );
-
-if ( current_user_can('list_users') ) {
-	$_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php.
-	$submenu['users.php'][5] = array(__('All Users'), 'list_users', 'users.php');
-	if ( current_user_can( 'create_users' ) ) {
-		$submenu['users.php'][10] = array(_x('Add New', 'user'), 'create_users', 'user-new.php');
-	} elseif ( is_multisite() ) {
-		$submenu['users.php'][10] = array(_x('Add New', 'user'), 'promote_users', 'user-new.php');
-	}
-
-	$submenu['users.php'][15] = array(__('Your Profile'), 'read', 'profile.php');
-} else {
-	$_wp_real_parent_file['users.php'] = 'profile.php';
-	$submenu['profile.php'][5] = array(__('Your Profile'), 'read', 'profile.php');
-	if ( current_user_can( 'create_users' ) ) {
-		$submenu['profile.php'][10] = array(__('Add New User'), 'create_users', 'user-new.php');
-	} elseif ( is_multisite() ) {
-		$submenu['profile.php'][10] = array(__('Add New User'), 'promote_users', 'user-new.php');
-	}
-}
-
-$menu[75] = array( __('Tools'), 'edit_posts', 'tools.php', '', 'menu-top menu-icon-tools', 'menu-tools', 'dashicons-admin-tools' );
-	$submenu['tools.php'][5] = array( __('Available Tools'), 'edit_posts', 'tools.php' );
-	$submenu['tools.php'][10] = array( __('Import'), 'import', 'import.php' );
-	$submenu['tools.php'][15] = array( __('Export'), 'export', 'export.php' );
-	if ( is_multisite() && !is_main_site() )
-		$submenu['tools.php'][25] = array( __('Delete Site'), 'delete_site', 'ms-delete-site.php' );
-	if ( ! is_multisite() && defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE )
-		$submenu['tools.php'][50] = array(__('Network Setup'), 'manage_options', 'network.php');
-
-$menu[80] = array( __('Settings'), 'manage_options', 'options-general.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'dashicons-admin-settings' );
-	$submenu['options-general.php'][10] = array(_x('General', 'settings screen'), 'manage_options', 'options-general.php');
-	$submenu['options-general.php'][15] = array(__('Writing'), 'manage_options', 'options-writing.php');
-	$submenu['options-general.php'][20] = array(__('Reading'), 'manage_options', 'options-reading.php');
-	$submenu['options-general.php'][25] = array(__('Discussion'), 'manage_options', 'options-discussion.php');
-	$submenu['options-general.php'][30] = array(__('Media'), 'manage_options', 'options-media.php');
-	$submenu['options-general.php'][40] = array(__('Permalinks'), 'manage_options', 'options-permalink.php');
-
-$_wp_last_utility_menu = 80; // The index of the last top-level menu in the utility menu group
-
-$menu[99] = array( '', 'read', 'separator-last', '', 'wp-menu-separator' );
-
-// Back-compat for old top-levels
-$_wp_real_parent_file['post.php'] = 'edit.php';
-$_wp_real_parent_file['post-new.php'] = 'edit.php';
-$_wp_real_parent_file['edit-pages.php'] = 'edit.php?post_type=page';
-$_wp_real_parent_file['page-new.php'] = 'edit.php?post_type=page';
-$_wp_real_parent_file['wpmu-admin.php'] = 'tools.php';
-$_wp_real_parent_file['ms-admin.php'] = 'tools.php';
-
-// Ensure backward compatibility.
-$compat = array(
-	'index' => 'dashboard',
-	'edit' => 'posts',
-	'post' => 'posts',
-	'upload' => 'media',
-	'link-manager' => 'links',
-	'edit-pages' => 'pages',
-	'page' => 'pages',
-	'edit-comments' => 'comments',
-	'options-general' => 'settings',
-	'themes' => 'appearance',
-	);
-
-require_once(ABSPATH . 'wp-admin/includes/menu.php');
Index: www/wp-includes/SimplePie/Parser.php
===================================================================
--- www/wp-includes/SimplePie/Parser.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_Parser.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/SimplePie/Cache/Memcache.php
===================================================================
--- www/wp-includes/SimplePie/Cache/Memcache.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_Cache_Memcache.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/requests/Exception/HTTP/306.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/306.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/306.php	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-<?php
-/**
- * Exception for 306 Switch Proxy responses
- *
- * @package Requests
- */
-
-/**
- * Exception for 306 Switch Proxy responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_306 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 306;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Switch Proxy';
-}
Index: www/wp-includes/Requests/Exception/HTTP/410.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/410.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_410.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/rest-api/class-wp-rest-server.php
===================================================================
--- www/wp-includes/rest-api/class-wp-rest-server.php	(revision 38565)
+++ www/wp-includes/autoload/rest-api/WP_REST_Server.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/includes/class-wp-post-comments-list-table.php
===================================================================
--- www/wp-admin/includes/class-wp-post-comments-list-table.php	(revision 38565)
+++ www/wp-admin/autoload/list-table/WP_Post_Comments_List_Table.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/widgets.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/widgets.php	(revision 38565)
+++ www/wp-includes/widgets.php	(revision 38565)
@@ -1,1475 +0,0 @@
-<?php
-/**
- * Core Widgets API
- *
- * This API is used for creating dynamic sidebar without hardcoding functionality into
- * themes
- *
- * Includes both internal WordPress routines and theme-use routines.
- *
- * This functionality was found in a plugin before the WordPress 2.2 release, which
- * included it in the core from that point on.
- *
- * @link https://codex.wordpress.org/Plugins/WordPress_Widgets WordPress Widgets
- * @link https://codex.wordpress.org/Plugins/WordPress_Widgets_Api Widgets API
- *
- * @package WordPress
- * @subpackage Widgets
- * @since 2.2.0
- */
-
-//
-// Global Variables
-//
-
-/** @ignore */
-global $wp_registered_sidebars, $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_widget_updates;
-
-/**
- * Stores the sidebars, since many themes can have more than one.
- *
- * @global array $wp_registered_sidebars
- * @since 2.2.0
- */
-$wp_registered_sidebars = array();
-
-/**
- * Stores the registered widgets.
- *
- * @global array $wp_registered_widgets
- * @since 2.2.0
- */
-$wp_registered_widgets = array();
-
-/**
- * Stores the registered widget control (options).
- *
- * @global array $wp_registered_widget_controls
- * @since 2.2.0
- */
-$wp_registered_widget_controls = array();
-/**
- * @global array $wp_registered_widget_updates
- */
-$wp_registered_widget_updates = array();
-
-/**
- * Private
- *
- * @global array $_wp_sidebars_widgets
- */
-$_wp_sidebars_widgets = array();
-
-/**
- * Private
- *
- * @global array $_wp_deprecated_widgets_callbacks
- */
-$GLOBALS['_wp_deprecated_widgets_callbacks'] = array(
-	'wp_widget_pages',
-	'wp_widget_pages_control',
-	'wp_widget_calendar',
-	'wp_widget_calendar_control',
-	'wp_widget_archives',
-	'wp_widget_archives_control',
-	'wp_widget_links',
-	'wp_widget_meta',
-	'wp_widget_meta_control',
-	'wp_widget_search',
-	'wp_widget_recent_entries',
-	'wp_widget_recent_entries_control',
-	'wp_widget_tag_cloud',
-	'wp_widget_tag_cloud_control',
-	'wp_widget_categories',
-	'wp_widget_categories_control',
-	'wp_widget_text',
-	'wp_widget_text_control',
-	'wp_widget_rss',
-	'wp_widget_rss_control',
-	'wp_widget_recent_comments',
-	'wp_widget_recent_comments_control'
-);
-
-//
-// Template tags & API functions
-//
-
-/**
- * Register a widget
- *
- * Registers a WP_Widget widget
- *
- * @since 2.8.0
- *
- * @see WP_Widget
- *
- * @global WP_Widget_Factory $wp_widget_factory
- *
- * @param string $widget_class The name of a class that extends WP_Widget
- */
-function register_widget($widget_class) {
-	global $wp_widget_factory;
-
-	$wp_widget_factory->register($widget_class);
-}
-
-/**
- * Unregisters a widget.
- *
- * Unregisters a WP_Widget widget. Useful for un-registering default widgets.
- * Run within a function hooked to the {@see 'widgets_init'} action.
- *
- * @since 2.8.0
- *
- * @see WP_Widget
- *
- * @global WP_Widget_Factory $wp_widget_factory
- *
- * @param string $widget_class The name of a class that extends WP_Widget.
- */
-function unregister_widget($widget_class) {
-	global $wp_widget_factory;
-
-	$wp_widget_factory->unregister($widget_class);
-}
-
-/**
- * Creates multiple sidebars.
- *
- * If you wanted to quickly create multiple sidebars for a theme or internally.
- * This function will allow you to do so. If you don't pass the 'name' and/or
- * 'id' in `$args`, then they will be built for you.
- *
- * @since 2.2.0
- *
- * @see register_sidebar() The second parameter is documented by register_sidebar() and is the same here.
- *
- * @global array $wp_registered_sidebars
- *
- * @param int          $number Optional. Number of sidebars to create. Default 1.
- * @param array|string $args {
- *     Optional. Array or string of arguments for building a sidebar.
- *
- *     @type string $id   The base string of the unique identifier for each sidebar. If provided, and multiple
- *                        sidebars are being defined, the id will have "-2" appended, and so on.
- *                        Default 'sidebar-' followed by the number the sidebar creation is currently at.
- *     @type string $name The name or title for the sidebars displayed in the admin dashboard. If registering
- *                        more than one sidebar, include '%d' in the string as a placeholder for the uniquely
- *                        assigned number for each sidebar.
- *                        Default 'Sidebar' for the first sidebar, otherwise 'Sidebar %d'.
- * }
- */
-function register_sidebars( $number = 1, $args = array() ) {
-	global $wp_registered_sidebars;
-	$number = (int) $number;
-
-	if ( is_string($args) )
-		parse_str($args, $args);
-
-	for ( $i = 1; $i <= $number; $i++ ) {
-		$_args = $args;
-
-		if ( $number > 1 )
-			$_args['name'] = isset($args['name']) ? sprintf($args['name'], $i) : sprintf(__('Sidebar %d'), $i);
-		else
-			$_args['name'] = isset($args['name']) ? $args['name'] : __('Sidebar');
-
-		// Custom specified ID's are suffixed if they exist already.
-		// Automatically generated sidebar names need to be suffixed regardless starting at -0
-		if ( isset($args['id']) ) {
-			$_args['id'] = $args['id'];
-			$n = 2; // Start at -2 for conflicting custom ID's
-			while ( is_registered_sidebar( $_args['id'] ) ) {
-				$_args['id'] = $args['id'] . '-' . $n++;
-			}
-		} else {
-			$n = count( $wp_registered_sidebars );
-			do {
-				$_args['id'] = 'sidebar-' . ++$n;
-			} while ( is_registered_sidebar( $_args['id'] ) );
-		}
-		register_sidebar($_args);
-	}
-}
-
-/**
- * Builds the definition for a single sidebar and returns the ID.
- *
- * Accepts either a string or an array and then parses that against a set
- * of default arguments for the new sidebar. WordPress will automatically
- * generate a sidebar ID and name based on the current number of registered
- * sidebars if those arguments are not included.
- *
- * When allowing for automatic generation of the name and ID parameters, keep
- * in mind that the incrementor for your sidebar can change over time depending
- * on what other plugins and themes are installed.
- *
- * If theme support for 'widgets' has not yet been added when this function is
- * called, it will be automatically enabled through the use of add_theme_support()
- *
- * @since 2.2.0
- *
- * @global array $wp_registered_sidebars Stores the new sidebar in this array by sidebar ID.
- *
- * @param array|string $args {
- *     Optional. Array or string of arguments for the sidebar being registered.
- *
- *     @type string $name          The name or title of the sidebar displayed in the Widgets
- *                                 interface. Default 'Sidebar $instance'.
- *     @type string $id            The unique identifier by which the sidebar will be called.
- *                                 Default 'sidebar-$instance'.
- *     @type string $description   Description of the sidebar, displayed in the Widgets interface.
- *                                 Default empty string.
- *     @type string $class         Extra CSS class to assign to the sidebar in the Widgets interface.
- *                                 Default empty.
- *     @type string $before_widget HTML content to prepend to each widget's HTML output when
- *                                 assigned to this sidebar. Default is an opening list item element.
- *     @type string $after_widget  HTML content to append to each widget's HTML output when
- *                                 assigned to this sidebar. Default is a closing list item element.
- *     @type string $before_title  HTML content to prepend to the sidebar title when displayed.
- *                                 Default is an opening h2 element.
- *     @type string $after_title   HTML content to append to the sidebar title when displayed.
- *                                 Default is a closing h2 element.
- * }
- * @return string Sidebar ID added to $wp_registered_sidebars global.
- */
-function register_sidebar($args = array()) {
-	global $wp_registered_sidebars;
-
-	$i = count($wp_registered_sidebars) + 1;
-
-	$id_is_empty = empty( $args['id'] );
-
-	$defaults = array(
-		'name' => sprintf(__('Sidebar %d'), $i ),
-		'id' => "sidebar-$i",
-		'description' => '',
-		'class' => '',
-		'before_widget' => '<li id="%1$s" class="widget %2$s">',
-		'after_widget' => "</li>\n",
-		'before_title' => '<h2 class="widgettitle">',
-		'after_title' => "</h2>\n",
-	);
-
-	$sidebar = wp_parse_args( $args, $defaults );
-
-	if ( $id_is_empty ) {
-		/* translators: 1: the id argument, 2: sidebar name, 3: recommended id value */
-		_doing_it_wrong( __FUNCTION__, sprintf( __( 'No %1$s was set in the arguments array for the "%2$s" sidebar. Defaulting to "%3$s". Manually set the %1$s to "%3$s" to silence this notice and keep existing sidebar content.' ), '<code>id</code>', $sidebar['name'], $sidebar['id'] ), '4.2.0' );
-	}
-
-	$wp_registered_sidebars[$sidebar['id']] = $sidebar;
-
-	add_theme_support('widgets');
-
-	/**
-	 * Fires once a sidebar has been registered.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param array $sidebar Parsed arguments for the registered sidebar.
-	 */
-	do_action( 'register_sidebar', $sidebar );
-
-	return $sidebar['id'];
-}
-
-/**
- * Removes a sidebar from the list.
- *
- * @since 2.2.0
- *
- * @global array $wp_registered_sidebars Stores the new sidebar in this array by sidebar ID.
- *
- * @param string $name The ID of the sidebar when it was added.
- */
-function unregister_sidebar( $name ) {
-	global $wp_registered_sidebars;
-
-	unset( $wp_registered_sidebars[ $name ] );
-}
-
-/**
- * Checks if a sidebar is registered.
- *
- * @since 4.4.0
- *
- * @global array $wp_registered_sidebars Registered sidebars.
- *
- * @param string|int $sidebar_id The ID of the sidebar when it was registered.
- * @return bool True if the sidebar is registered, false otherwise.
- */
-function is_registered_sidebar( $sidebar_id ) {
-	global $wp_registered_sidebars;
-
-	return isset( $wp_registered_sidebars[ $sidebar_id ] );
-}
-
-/**
- * Register an instance of a widget.
- *
- * The default widget option is 'classname' that can be overridden.
- *
- * The function can also be used to un-register widgets when `$output_callback`
- * parameter is an empty string.
- *
- * @since 2.2.0
- *
- * @global array $wp_registered_widgets       Uses stored registered widgets.
- * @global array $wp_register_widget_defaults Retrieves widget defaults.
- * @global array $wp_registered_widget_updates
- * @global array $_wp_deprecated_widgets_callbacks
- *
- * @param int|string $id              Widget ID.
- * @param string     $name            Widget display title.
- * @param callable   $output_callback Run when widget is called.
- * @param array      $options {
- *     Optional. An array of supplementary widget options for the instance.
- *
- *     @type string $classname   Class name for the widget's HTML container. Default is a shortened
- *                               version of the output callback name.
- *     @type string $description Widget description for display in the widget administration
- *                               panel and/or theme.
- * }
- */
-function wp_register_sidebar_widget( $id, $name, $output_callback, $options = array() ) {
-	global $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_widget_updates, $_wp_deprecated_widgets_callbacks;
-
-	$id = strtolower($id);
-
-	if ( empty($output_callback) ) {
-		unset($wp_registered_widgets[$id]);
-		return;
-	}
-
-	$id_base = _get_widget_id_base($id);
-	if ( in_array($output_callback, $_wp_deprecated_widgets_callbacks, true) && !is_callable($output_callback) ) {
-		unset( $wp_registered_widget_controls[ $id ] );
-		unset( $wp_registered_widget_updates[ $id_base ] );
-		return;
-	}
-
-	$defaults = array('classname' => $output_callback);
-	$options = wp_parse_args($options, $defaults);
-	$widget = array(
-		'name' => $name,
-		'id' => $id,
-		'callback' => $output_callback,
-		'params' => array_slice(func_get_args(), 4)
-	);
-	$widget = array_merge($widget, $options);
-
-	if ( is_callable($output_callback) && ( !isset($wp_registered_widgets[$id]) || did_action( 'widgets_init' ) ) ) {
-
-		/**
-		 * Fires once for each registered widget.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param array $widget An array of default widget arguments.
-		 */
-		do_action( 'wp_register_sidebar_widget', $widget );
-		$wp_registered_widgets[$id] = $widget;
-	}
-}
-
-/**
- * Retrieve description for widget.
- *
- * When registering widgets, the options can also include 'description' that
- * describes the widget for display on the widget administration panel or
- * in the theme.
- *
- * @since 2.5.0
- *
- * @global array $wp_registered_widgets
- *
- * @param int|string $id Widget ID.
- * @return string|void Widget description, if available.
- */
-function wp_widget_description( $id ) {
-	if ( !is_scalar($id) )
-		return;
-
-	global $wp_registered_widgets;
-
-	if ( isset($wp_registered_widgets[$id]['description']) )
-		return esc_html( $wp_registered_widgets[$id]['description'] );
-}
-
-/**
- * Retrieve description for a sidebar.
- *
- * When registering sidebars a 'description' parameter can be included that
- * describes the sidebar for display on the widget administration panel.
- *
- * @since 2.9.0
- *
- * @global array $wp_registered_sidebars
- *
- * @param string $id sidebar ID.
- * @return string|void Sidebar description, if available.
- */
-function wp_sidebar_description( $id ) {
-	if ( !is_scalar($id) )
-		return;
-
-	global $wp_registered_sidebars;
-
-	if ( isset($wp_registered_sidebars[$id]['description']) )
-		return esc_html( $wp_registered_sidebars[$id]['description'] );
-}
-
-/**
- * Remove widget from sidebar.
- *
- * @since 2.2.0
- *
- * @param int|string $id Widget ID.
- */
-function wp_unregister_sidebar_widget($id) {
-
-	/**
-	 * Fires just before a widget is removed from a sidebar.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param int $id The widget ID.
-	 */
-	do_action( 'wp_unregister_sidebar_widget', $id );
-
-	wp_register_sidebar_widget($id, '', '');
-	wp_unregister_widget_control($id);
-}
-
-/**
- * Registers widget control callback for customizing options.
- *
- * @since 2.2.0
- *
- * @todo `$params` parameter?
- *
- * @global array $wp_registered_widget_controls
- * @global array $wp_registered_widget_updates
- * @global array $wp_registered_widgets
- * @global array $_wp_deprecated_widgets_callbacks
- *
- * @param int|string   $id               Sidebar ID.
- * @param string       $name             Sidebar display name.
- * @param callable     $control_callback Run when sidebar is displayed.
- * @param array $options {
- *     Optional. Array or string of control options. Default empty array.
- *
- *     @type int        $height  Never used. Default 200.
- *     @type int        $width   Width of the fully expanded control form (but try hard to use the default width).
- *                               Default 250.
- *     @type int|string $id_base Required for multi-widgets, i.e widgets that allow multiple instances such as the
- *                               text widget. The widget id will end up looking like `{$id_base}-{$unique_number}`.
- * }
- */
-function wp_register_widget_control( $id, $name, $control_callback, $options = array() ) {
-	global $wp_registered_widget_controls, $wp_registered_widget_updates, $wp_registered_widgets, $_wp_deprecated_widgets_callbacks;
-
-	$id = strtolower($id);
-	$id_base = _get_widget_id_base($id);
-
-	if ( empty($control_callback) ) {
-		unset($wp_registered_widget_controls[$id]);
-		unset($wp_registered_widget_updates[$id_base]);
-		return;
-	}
-
-	if ( in_array($control_callback, $_wp_deprecated_widgets_callbacks, true) && !is_callable($control_callback) ) {
-		unset( $wp_registered_widgets[ $id ] );
-		return;
-	}
-
-	if ( isset($wp_registered_widget_controls[$id]) && !did_action( 'widgets_init' ) )
-		return;
-
-	$defaults = array('width' => 250, 'height' => 200 ); // height is never used
-	$options = wp_parse_args($options, $defaults);
-	$options['width'] = (int) $options['width'];
-	$options['height'] = (int) $options['height'];
-
-	$widget = array(
-		'name' => $name,
-		'id' => $id,
-		'callback' => $control_callback,
-		'params' => array_slice(func_get_args(), 4)
-	);
-	$widget = array_merge($widget, $options);
-
-	$wp_registered_widget_controls[$id] = $widget;
-
-	if ( isset($wp_registered_widget_updates[$id_base]) )
-		return;
-
-	if ( isset($widget['params'][0]['number']) )
-		$widget['params'][0]['number'] = -1;
-
-	unset($widget['width'], $widget['height'], $widget['name'], $widget['id']);
-	$wp_registered_widget_updates[$id_base] = $widget;
-}
-
-/**
- * Registers the update callback for a widget.
- *
- * @since 2.8.0
- *
- * @global array $wp_registered_widget_updates
- *
- * @param string   $id_base         The base ID of a widget created by extending WP_Widget.
- * @param callable $update_callback Update callback method for the widget.
- * @param array    $options         Optional. Widget control options. See wp_register_widget_control().
- *                                  Default empty array.
- */
-function _register_widget_update_callback( $id_base, $update_callback, $options = array() ) {
-	global $wp_registered_widget_updates;
-
-	if ( isset($wp_registered_widget_updates[$id_base]) ) {
-		if ( empty($update_callback) )
-			unset($wp_registered_widget_updates[$id_base]);
-		return;
-	}
-
-	$widget = array(
-		'callback' => $update_callback,
-		'params' => array_slice(func_get_args(), 3)
-	);
-
-	$widget = array_merge($widget, $options);
-	$wp_registered_widget_updates[$id_base] = $widget;
-}
-
-/**
- * Registers the form callback for a widget.
- *
- * @since 2.8.0
- *
- * @global array $wp_registered_widget_controls
- *
- * @param int|string $id            Widget ID.
- * @param string     $name          Name attribute for the widget.
- * @param callable   $form_callback Form callback.
- * @param array      $options       Optional. Widget control options. See wp_register_widget_control().
- *                                  Default empty array.
- */
-function _register_widget_form_callback($id, $name, $form_callback, $options = array()) {
-	global $wp_registered_widget_controls;
-
-	$id = strtolower($id);
-
-	if ( empty($form_callback) ) {
-		unset($wp_registered_widget_controls[$id]);
-		return;
-	}
-
-	if ( isset($wp_registered_widget_controls[$id]) && !did_action( 'widgets_init' ) )
-		return;
-
-	$defaults = array('width' => 250, 'height' => 200 );
-	$options = wp_parse_args($options, $defaults);
-	$options['width'] = (int) $options['width'];
-	$options['height'] = (int) $options['height'];
-
-	$widget = array(
-		'name' => $name,
-		'id' => $id,
-		'callback' => $form_callback,
-		'params' => array_slice(func_get_args(), 4)
-	);
-	$widget = array_merge($widget, $options);
-
-	$wp_registered_widget_controls[$id] = $widget;
-}
-
-/**
- * Remove control callback for widget.
- *
- * @since 2.2.0
- *
- * @param int|string $id Widget ID.
- */
-function wp_unregister_widget_control($id) {
-	wp_register_widget_control( $id, '', '' );
-}
-
-/**
- * Display dynamic sidebar.
- *
- * By default this displays the default sidebar or 'sidebar-1'. If your theme specifies the 'id' or
- * 'name' parameter for its registered sidebars you can pass an id or name as the $index parameter.
- * Otherwise, you can pass in a numerical index to display the sidebar at that index.
- *
- * @since 2.2.0
- *
- * @global array $wp_registered_sidebars
- * @global array $wp_registered_widgets
- *
- * @param int|string $index Optional, default is 1. Index, name or ID of dynamic sidebar.
- * @return bool True, if widget sidebar was found and called. False if not found or not called.
- */
-function dynamic_sidebar( $index = 1 ) {
-	global $wp_registered_sidebars, $wp_registered_widgets;
-
-	if ( is_int( $index ) ) {
-		$index = "sidebar-$index";
-	} else {
-		$index = sanitize_title( $index );
-		foreach ( (array) $wp_registered_sidebars as $key => $value ) {
-			if ( sanitize_title( $value['name'] ) == $index ) {
-				$index = $key;
-				break;
-			}
-		}
-	}
-
-	$sidebars_widgets = wp_get_sidebars_widgets();
-	if ( empty( $wp_registered_sidebars[ $index ] ) || empty( $sidebars_widgets[ $index ] ) || ! is_array( $sidebars_widgets[ $index ] ) ) {
-		/** This action is documented in wp-includes/widget.php */
-		do_action( 'dynamic_sidebar_before', $index, false );
-		/** This action is documented in wp-includes/widget.php */
-		do_action( 'dynamic_sidebar_after',  $index, false );
-		/** This filter is documented in wp-includes/widget.php */
-		return apply_filters( 'dynamic_sidebar_has_widgets', false, $index );
-	}
-
-	/**
-	 * Fires before widgets are rendered in a dynamic sidebar.
-	 *
-	 * Note: The action also fires for empty sidebars, and on both the front end
-	 * and back end, including the Inactive Widgets sidebar on the Widgets screen.
-	 *
-	 * @since 3.9.0
-	 *
-	 * @param int|string $index       Index, name, or ID of the dynamic sidebar.
-	 * @param bool       $has_widgets Whether the sidebar is populated with widgets.
-	 *                                Default true.
-	 */
-	do_action( 'dynamic_sidebar_before', $index, true );
-	$sidebar = $wp_registered_sidebars[$index];
-
-	$did_one = false;
-	foreach ( (array) $sidebars_widgets[$index] as $id ) {
-
-		if ( !isset($wp_registered_widgets[$id]) ) continue;
-
-		$params = array_merge(
-			array( array_merge( $sidebar, array('widget_id' => $id, 'widget_name' => $wp_registered_widgets[$id]['name']) ) ),
-			(array) $wp_registered_widgets[$id]['params']
-		);
-
-		// Substitute HTML id and class attributes into before_widget
-		$classname_ = '';
-		foreach ( (array) $wp_registered_widgets[$id]['classname'] as $cn ) {
-			if ( is_string($cn) )
-				$classname_ .= '_' . $cn;
-			elseif ( is_object($cn) )
-				$classname_ .= '_' . get_class($cn);
-		}
-		$classname_ = ltrim($classname_, '_');
-		$params[0]['before_widget'] = sprintf($params[0]['before_widget'], $id, $classname_);
-
-		/**
-		 * Filters the parameters passed to a widget's display callback.
-		 *
-		 * Note: The filter is evaluated on both the front end and back end,
-		 * including for the Inactive Widgets sidebar on the Widgets screen.
-		 *
-		 * @since 2.5.0
-		 *
-		 * @see register_sidebar()
-		 *
-		 * @param array $params {
-		 *     @type array $args  {
-		 *         An array of widget display arguments.
-		 *
-		 *         @type string $name          Name of the sidebar the widget is assigned to.
-		 *         @type string $id            ID of the sidebar the widget is assigned to.
-		 *         @type string $description   The sidebar description.
-		 *         @type string $class         CSS class applied to the sidebar container.
-		 *         @type string $before_widget HTML markup to prepend to each widget in the sidebar.
-		 *         @type string $after_widget  HTML markup to append to each widget in the sidebar.
-		 *         @type string $before_title  HTML markup to prepend to the widget title when displayed.
-		 *         @type string $after_title   HTML markup to append to the widget title when displayed.
-		 *         @type string $widget_id     ID of the widget.
-		 *         @type string $widget_name   Name of the widget.
-		 *     }
-		 *     @type array $widget_args {
-		 *         An array of multi-widget arguments.
-		 *
-		 *         @type int $number Number increment used for multiples of the same widget.
-		 *     }
-		 * }
-		 */
-		$params = apply_filters( 'dynamic_sidebar_params', $params );
-
-		$callback = $wp_registered_widgets[$id]['callback'];
-
-		/**
-		 * Fires before a widget's display callback is called.
-		 *
-		 * Note: The action fires on both the front end and back end, including
-		 * for widgets in the Inactive Widgets sidebar on the Widgets screen.
-		 *
-		 * The action is not fired for empty sidebars.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param array $widget_id {
-		 *     An associative array of widget arguments.
-		 *
-		 *     @type string $name                Name of the widget.
-		 *     @type string $id                  Widget ID.
-		 *     @type array|callable $callback    When the hook is fired on the front end, $callback is an array
-		 *                                       containing the widget object. Fired on the back end, $callback
-		 *                                       is 'wp_widget_control', see $_callback.
-		 *     @type array          $params      An associative array of multi-widget arguments.
-		 *     @type string         $classname   CSS class applied to the widget container.
-		 *     @type string         $description The widget description.
-		 *     @type array          $_callback   When the hook is fired on the back end, $_callback is populated
-		 *                                       with an array containing the widget object, see $callback.
-		 * }
-		 */
-		do_action( 'dynamic_sidebar', $wp_registered_widgets[ $id ] );
-
-		if ( is_callable($callback) ) {
-			call_user_func_array($callback, $params);
-			$did_one = true;
-		}
-	}
-
-	/**
-	 * Fires after widgets are rendered in a dynamic sidebar.
-	 *
-	 * Note: The action also fires for empty sidebars, and on both the front end
-	 * and back end, including the Inactive Widgets sidebar on the Widgets screen.
-	 *
-	 * @since 3.9.0
-	 *
-	 * @param int|string $index       Index, name, or ID of the dynamic sidebar.
-	 * @param bool       $has_widgets Whether the sidebar is populated with widgets.
-	 *                                Default true.
-	 */
-	do_action( 'dynamic_sidebar_after', $index, true );
-
-	/**
-	 * Filters whether a sidebar has widgets.
-	 *
-	 * Note: The filter is also evaluated for empty sidebars, and on both the front end
-	 * and back end, including the Inactive Widgets sidebar on the Widgets screen.
-	 *
-	 * @since 3.9.0
-	 *
-	 * @param bool       $did_one Whether at least one widget was rendered in the sidebar.
-	 *                            Default false.
-	 * @param int|string $index   Index, name, or ID of the dynamic sidebar.
-	 */
-	return apply_filters( 'dynamic_sidebar_has_widgets', $did_one, $index );
-}
-
-/**
- * Whether widget is displayed on the front end.
- *
- * Either $callback or $id_base can be used
- * $id_base is the first argument when extending WP_Widget class
- * Without the optional $widget_id parameter, returns the ID of the first sidebar
- * in which the first instance of the widget with the given callback or $id_base is found.
- * With the $widget_id parameter, returns the ID of the sidebar where
- * the widget with that callback/$id_base AND that ID is found.
- *
- * NOTE: $widget_id and $id_base are the same for single widgets. To be effective
- * this function has to run after widgets have initialized, at action {@see 'init'} or later.
- *
- * @since 2.2.0
- *
- * @global array $wp_registered_widgets
- *
- * @param string|false $callback      Optional, Widget callback to check. Default false.
- * @param int|false    $widget_id     Optional. Widget ID. Optional, but needed for checking. Default false.
- * @param string|false $id_base       Optional. The base ID of a widget created by extending WP_Widget. Default false.
- * @param bool         $skip_inactive Optional. Whether to check in 'wp_inactive_widgets'. Default true.
- * @return string|false False if widget is not active or id of sidebar in which the widget is active.
- */
-function is_active_widget( $callback = false, $widget_id = false, $id_base = false, $skip_inactive = true ) {
-	global $wp_registered_widgets;
-
-	$sidebars_widgets = wp_get_sidebars_widgets();
-
-	if ( is_array($sidebars_widgets) ) {
-		foreach ( $sidebars_widgets as $sidebar => $widgets ) {
-			if ( $skip_inactive && ( 'wp_inactive_widgets' === $sidebar || 'orphaned_widgets' === substr( $sidebar, 0, 16 ) ) ) {
-				continue;
-			}
-
-			if ( is_array($widgets) ) {
-				foreach ( $widgets as $widget ) {
-					if ( ( $callback && isset($wp_registered_widgets[$widget]['callback']) && $wp_registered_widgets[$widget]['callback'] == $callback ) || ( $id_base && _get_widget_id_base($widget) == $id_base ) ) {
-						if ( !$widget_id || $widget_id == $wp_registered_widgets[$widget]['id'] )
-							return $sidebar;
-					}
-				}
-			}
-		}
-	}
-	return false;
-}
-
-/**
- * Whether the dynamic sidebar is enabled and used by theme.
- *
- * @since 2.2.0
- *
- * @global array $wp_registered_widgets
- * @global array $wp_registered_sidebars
- *
- * @return bool True, if using widgets. False, if not using widgets.
- */
-function is_dynamic_sidebar() {
-	global $wp_registered_widgets, $wp_registered_sidebars;
-	$sidebars_widgets = get_option('sidebars_widgets');
-	foreach ( (array) $wp_registered_sidebars as $index => $sidebar ) {
-		if ( ! empty( $sidebars_widgets[ $index ] ) ) {
-			foreach ( (array) $sidebars_widgets[$index] as $widget )
-				if ( array_key_exists($widget, $wp_registered_widgets) )
-					return true;
-		}
-	}
-	return false;
-}
-
-/**
- * Whether a sidebar is in use.
- *
- * @since 2.8.0
- *
- * @param string|int $index Sidebar name, id or number to check.
- * @return bool true if the sidebar is in use, false otherwise.
- */
-function is_active_sidebar( $index ) {
-	$index = ( is_int($index) ) ? "sidebar-$index" : sanitize_title($index);
-	$sidebars_widgets = wp_get_sidebars_widgets();
-	$is_active_sidebar = ! empty( $sidebars_widgets[$index] );
-
-	/**
-	 * Filters whether a dynamic sidebar is considered "active".
-	 *
-	 * @since 3.9.0
-	 *
-	 * @param bool       $is_active_sidebar Whether or not the sidebar should be considered "active".
-	 *                                      In other words, whether the sidebar contains any widgets.
-	 * @param int|string $index             Index, name, or ID of the dynamic sidebar.
-	 */
-	return apply_filters( 'is_active_sidebar', $is_active_sidebar, $index );
-}
-
-//
-// Internal Functions
-//
-
-/**
- * Retrieve full list of sidebars and their widget instance IDs.
- *
- * Will upgrade sidebar widget list, if needed. Will also save updated list, if
- * needed.
- *
- * @since 2.2.0
- * @access private
- *
- * @global array $_wp_sidebars_widgets
- * @global array $sidebars_widgets
- *
- * @param bool $deprecated Not used (argument deprecated).
- * @return array Upgraded list of widgets to version 3 array format when called from the admin.
- */
-function wp_get_sidebars_widgets( $deprecated = true ) {
-	if ( $deprecated !== true )
-		_deprecated_argument( __FUNCTION__, '2.8.1' );
-
-	global $_wp_sidebars_widgets, $sidebars_widgets;
-
-	// If loading from front page, consult $_wp_sidebars_widgets rather than options
-	// to see if wp_convert_widget_settings() has made manipulations in memory.
-	if ( !is_admin() ) {
-		if ( empty($_wp_sidebars_widgets) )
-			$_wp_sidebars_widgets = get_option('sidebars_widgets', array());
-
-		$sidebars_widgets = $_wp_sidebars_widgets;
-	} else {
-		$sidebars_widgets = get_option('sidebars_widgets', array());
-	}
-
-	if ( is_array( $sidebars_widgets ) && isset($sidebars_widgets['array_version']) )
-		unset($sidebars_widgets['array_version']);
-
-	/**
-	 * Filters the list of sidebars and their widgets.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param array $sidebars_widgets An associative array of sidebars and their widgets.
-	 */
-	return apply_filters( 'sidebars_widgets', $sidebars_widgets );
-}
-
-/**
- * Set the sidebar widget option to update sidebars.
- *
- * @since 2.2.0
- * @access private
- *
- * @param array $sidebars_widgets Sidebar widgets and their settings.
- */
-function wp_set_sidebars_widgets( $sidebars_widgets ) {
-	if ( !isset( $sidebars_widgets['array_version'] ) )
-		$sidebars_widgets['array_version'] = 3;
-	update_option( 'sidebars_widgets', $sidebars_widgets );
-}
-
-/**
- * Retrieve default registered sidebars list.
- *
- * @since 2.2.0
- * @access private
- *
- * @global array $wp_registered_sidebars
- *
- * @return array
- */
-function wp_get_widget_defaults() {
-	global $wp_registered_sidebars;
-
-	$defaults = array();
-
-	foreach ( (array) $wp_registered_sidebars as $index => $sidebar )
-		$defaults[$index] = array();
-
-	return $defaults;
-}
-
-/**
- * Convert the widget settings from single to multi-widget format.
- *
- * @since 2.8.0
- *
- * @global array $_wp_sidebars_widgets
- *
- * @param string $base_name
- * @param string $option_name
- * @param array  $settings
- * @return array
- */
-function wp_convert_widget_settings($base_name, $option_name, $settings) {
-	// This test may need expanding.
-	$single = $changed = false;
-	if ( empty($settings) ) {
-		$single = true;
-	} else {
-		foreach ( array_keys($settings) as $number ) {
-			if ( 'number' == $number )
-				continue;
-			if ( !is_numeric($number) ) {
-				$single = true;
-				break;
-			}
-		}
-	}
-
-	if ( $single ) {
-		$settings = array( 2 => $settings );
-
-		// If loading from the front page, update sidebar in memory but don't save to options
-		if ( is_admin() ) {
-			$sidebars_widgets = get_option('sidebars_widgets');
-		} else {
-			if ( empty($GLOBALS['_wp_sidebars_widgets']) )
-				$GLOBALS['_wp_sidebars_widgets'] = get_option('sidebars_widgets', array());
-			$sidebars_widgets = &$GLOBALS['_wp_sidebars_widgets'];
-		}
-
-		foreach ( (array) $sidebars_widgets as $index => $sidebar ) {
-			if ( is_array($sidebar) ) {
-				foreach ( $sidebar as $i => $name ) {
-					if ( $base_name == $name ) {
-						$sidebars_widgets[$index][$i] = "$name-2";
-						$changed = true;
-						break 2;
-					}
-				}
-			}
-		}
-
-		if ( is_admin() && $changed )
-			update_option('sidebars_widgets', $sidebars_widgets);
-	}
-
-	$settings['_multiwidget'] = 1;
-	if ( is_admin() )
-		update_option( $option_name, $settings );
-
-	return $settings;
-}
-
-/**
- * Output an arbitrary widget as a template tag.
- *
- * @since 2.8.0
- *
- * @global WP_Widget_Factory $wp_widget_factory
- *
- * @param string $widget   The widget's PHP class name (see class-wp-widget.php).
- * @param array  $instance Optional. The widget's instance settings. Default empty array.
- * @param array  $args {
- *     Optional. Array of arguments to configure the display of the widget.
- *
- *     @type string $before_widget HTML content that will be prepended to the widget's HTML output.
- *                                 Default `<div class="widget %s">`, where `%s` is the widget's class name.
- *     @type string $after_widget  HTML content that will be appended to the widget's HTML output.
- *                                 Default `</div>`.
- *     @type string $before_title  HTML content that will be prepended to the widget's title when displayed.
- *                                 Default `<h2 class="widgettitle">`.
- *     @type string $after_title   HTML content that will be appended to the widget's title when displayed.
- *                                 Default `</h2>`.
- * }
- */
-function the_widget( $widget, $instance = array(), $args = array() ) {
-	global $wp_widget_factory;
-
-	$widget_obj = $wp_widget_factory->widgets[$widget];
-	if ( ! ( $widget_obj instanceof WP_Widget ) ) {
-		return;
-	}
-
-	$default_args = array(
-		'before_widget' => '<div class="widget %s">',
-		'after_widget'  => "</div>",
-		'before_title'  => '<h2 class="widgettitle">',
-		'after_title'   => '</h2>',
-	);
-	$args = wp_parse_args( $args, $default_args );
-	$args['before_widget'] = sprintf( $args['before_widget'], $widget_obj->widget_options['classname'] );
-
-	$instance = wp_parse_args($instance);
-
-	/**
-	 * Fires before rendering the requested widget.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $widget   The widget's class name.
-	 * @param array  $instance The current widget instance's settings.
-	 * @param array  $args     An array of the widget's sidebar arguments.
-	 */
-	do_action( 'the_widget', $widget, $instance, $args );
-
-	$widget_obj->_set(-1);
-	$widget_obj->widget($args, $instance);
-}
-
-/**
- * Retrieves the widget ID base value.
- *
- * @since 2.8.0
- *
- * @param string $id Widget ID.
- * @return string Widget ID base.
- */
-function _get_widget_id_base( $id ) {
-	return preg_replace( '/-[0-9]+$/', '', $id );
-}
-
-/**
- * Handle sidebars config after theme change
- *
- * @access private
- * @since 3.3.0
- *
- * @global array $sidebars_widgets
- */
-function _wp_sidebars_changed() {
-	global $sidebars_widgets;
-
-	if ( ! is_array( $sidebars_widgets ) )
-		$sidebars_widgets = wp_get_sidebars_widgets();
-
-	retrieve_widgets(true);
-}
-
-/**
- * Look for "lost" widgets, this has to run at least on each theme change.
- *
- * @since 2.8.0
- *
- * @global array $wp_registered_sidebars
- * @global array $sidebars_widgets
- * @global array $wp_registered_widgets
- *
- * @param string|bool $theme_changed Whether the theme was changed as a boolean. A value
- *                                   of 'customize' defers updates for the Customizer.
- * @return array|void
- */
-function retrieve_widgets( $theme_changed = false ) {
-	global $wp_registered_sidebars, $sidebars_widgets, $wp_registered_widgets;
-
-	$registered_sidebar_keys = array_keys( $wp_registered_sidebars );
-	$orphaned = 0;
-
-	$old_sidebars_widgets = get_theme_mod( 'sidebars_widgets' );
-	if ( is_array( $old_sidebars_widgets ) ) {
-		// time() that sidebars were stored is in $old_sidebars_widgets['time']
-		$_sidebars_widgets = $old_sidebars_widgets['data'];
-
-		if ( 'customize' !== $theme_changed ) {
-			remove_theme_mod( 'sidebars_widgets' );
-		}
-
-		foreach ( $_sidebars_widgets as $sidebar => $widgets ) {
-			if ( 'wp_inactive_widgets' === $sidebar || 'orphaned_widgets' === substr( $sidebar, 0, 16 ) ) {
-				continue;
-			}
-
-			if ( !in_array( $sidebar, $registered_sidebar_keys ) ) {
-				$_sidebars_widgets['orphaned_widgets_' . ++$orphaned] = $widgets;
-				unset( $_sidebars_widgets[$sidebar] );
-			}
-		}
-	} else {
-		if ( empty( $sidebars_widgets ) )
-			return;
-
-		unset( $sidebars_widgets['array_version'] );
-
-		$old = array_keys($sidebars_widgets);
-		sort($old);
-		sort($registered_sidebar_keys);
-
-		if ( $old == $registered_sidebar_keys )
-			return;
-
-		$_sidebars_widgets = array(
-			'wp_inactive_widgets' => !empty( $sidebars_widgets['wp_inactive_widgets'] ) ? $sidebars_widgets['wp_inactive_widgets'] : array()
-		);
-
-		unset( $sidebars_widgets['wp_inactive_widgets'] );
-
-		foreach ( $wp_registered_sidebars as $id => $settings ) {
-			if ( $theme_changed ) {
-				$_sidebars_widgets[$id] = array_shift( $sidebars_widgets );
-			} else {
-				// no theme change, grab only sidebars that are currently registered
-				if ( isset( $sidebars_widgets[$id] ) ) {
-					$_sidebars_widgets[$id] = $sidebars_widgets[$id];
-					unset( $sidebars_widgets[$id] );
-				}
-			}
-		}
-
-		foreach ( $sidebars_widgets as $val ) {
-			if ( is_array($val) && ! empty( $val ) )
-				$_sidebars_widgets['orphaned_widgets_' . ++$orphaned] = $val;
-		}
-	}
-
-	// discard invalid, theme-specific widgets from sidebars
-	$shown_widgets = array();
-
-	foreach ( $_sidebars_widgets as $sidebar => $widgets ) {
-		if ( !is_array($widgets) )
-			continue;
-
-		$_widgets = array();
-		foreach ( $widgets as $widget ) {
-			if ( isset($wp_registered_widgets[$widget]) )
-				$_widgets[] = $widget;
-		}
-
-		$_sidebars_widgets[$sidebar] = $_widgets;
-		$shown_widgets = array_merge($shown_widgets, $_widgets);
-	}
-
-	$sidebars_widgets = $_sidebars_widgets;
-	unset($_sidebars_widgets, $_widgets);
-
-	// find hidden/lost multi-widget instances
-	$lost_widgets = array();
-	foreach ( $wp_registered_widgets as $key => $val ) {
-		if ( in_array($key, $shown_widgets, true) )
-			continue;
-
-		$number = preg_replace('/.+?-([0-9]+)$/', '$1', $key);
-
-		if ( 2 > (int) $number )
-			continue;
-
-		$lost_widgets[] = $key;
-	}
-
-	$sidebars_widgets['wp_inactive_widgets'] = array_merge($lost_widgets, (array) $sidebars_widgets['wp_inactive_widgets']);
-	if ( 'customize' !== $theme_changed ) {
-		wp_set_sidebars_widgets( $sidebars_widgets );
-	}
-
-	return $sidebars_widgets;
-}
-
-/**
- * Display the RSS entries in a list.
- *
- * @since 2.5.0
- *
- * @param string|array|object $rss RSS url.
- * @param array $args Widget arguments.
- */
-function wp_widget_rss_output( $rss, $args = array() ) {
-	if ( is_string( $rss ) ) {
-		$rss = fetch_feed($rss);
-	} elseif ( is_array($rss) && isset($rss['url']) ) {
-		$args = $rss;
-		$rss = fetch_feed($rss['url']);
-	} elseif ( !is_object($rss) ) {
-		return;
-	}
-
-	if ( is_wp_error($rss) ) {
-		if ( is_admin() || current_user_can('manage_options') )
-			echo '<p>' . sprintf( __('<strong>RSS Error</strong>: %s'), $rss->get_error_message() ) . '</p>';
-		return;
-	}
-
-	$default_args = array( 'show_author' => 0, 'show_date' => 0, 'show_summary' => 0, 'items' => 0 );
-	$args = wp_parse_args( $args, $default_args );
-
-	$items = (int) $args['items'];
-	if ( $items < 1 || 20 < $items )
-		$items = 10;
-	$show_summary  = (int) $args['show_summary'];
-	$show_author   = (int) $args['show_author'];
-	$show_date     = (int) $args['show_date'];
-
-	if ( !$rss->get_item_quantity() ) {
-		echo '<ul><li>' . __( 'An error has occurred, which probably means the feed is down. Try again later.' ) . '</li></ul>';
-		$rss->__destruct();
-		unset($rss);
-		return;
-	}
-
-	echo '<ul>';
-	foreach ( $rss->get_items( 0, $items ) as $item ) {
-		$link = $item->get_link();
-		while ( stristr( $link, 'http' ) != $link ) {
-			$link = substr( $link, 1 );
-		}
-		$link = esc_url( strip_tags( $link ) );
-
-		$title = esc_html( trim( strip_tags( $item->get_title() ) ) );
-		if ( empty( $title ) ) {
-			$title = __( 'Untitled' );
-		}
-
-		$desc = @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option( 'blog_charset' ) );
-		$desc = esc_attr( wp_trim_words( $desc, 55, ' [&hellip;]' ) );
-
-		$summary = '';
-		if ( $show_summary ) {
-			$summary = $desc;
-
-			// Change existing [...] to [&hellip;].
-			if ( '[...]' == substr( $summary, -5 ) ) {
-				$summary = substr( $summary, 0, -5 ) . '[&hellip;]';
-			}
-
-			$summary = '<div class="rssSummary">' . esc_html( $summary ) . '</div>';
-		}
-
-		$date = '';
-		if ( $show_date ) {
-			$date = $item->get_date( 'U' );
-
-			if ( $date ) {
-				$date = ' <span class="rss-date">' . date_i18n( get_option( 'date_format' ), $date ) . '</span>';
-			}
-		}
-
-		$author = '';
-		if ( $show_author ) {
-			$author = $item->get_author();
-			if ( is_object($author) ) {
-				$author = $author->get_name();
-				$author = ' <cite>' . esc_html( strip_tags( $author ) ) . '</cite>';
-			}
-		}
-
-		if ( $link == '' ) {
-			echo "<li>$title{$date}{$summary}{$author}</li>";
-		} elseif ( $show_summary ) {
-			echo "<li><a class='rsswidget' href='$link'>$title</a>{$date}{$summary}{$author}</li>";
-		} else {
-			echo "<li><a class='rsswidget' href='$link'>$title</a>{$date}{$author}</li>";
-		}
-	}
-	echo '</ul>';
-	$rss->__destruct();
-	unset($rss);
-}
-
-/**
- * Display RSS widget options form.
- *
- * The options for what fields are displayed for the RSS form are all booleans
- * and are as follows: 'url', 'title', 'items', 'show_summary', 'show_author',
- * 'show_date'.
- *
- * @since 2.5.0
- *
- * @param array|string $args Values for input fields.
- * @param array $inputs Override default display options.
- */
-function wp_widget_rss_form( $args, $inputs = null ) {
-	$default_inputs = array( 'url' => true, 'title' => true, 'items' => true, 'show_summary' => true, 'show_author' => true, 'show_date' => true );
-	$inputs = wp_parse_args( $inputs, $default_inputs );
-
-	$args['title'] = isset( $args['title'] ) ? $args['title'] : '';
-	$args['url'] = isset( $args['url'] ) ? $args['url'] : '';
-	$args['items'] = isset( $args['items'] ) ? (int) $args['items'] : 0;
-
-	if ( $args['items'] < 1 || 20 < $args['items'] ) {
-		$args['items'] = 10;
-	}
-
-	$args['show_summary']   = isset( $args['show_summary'] ) ? (int) $args['show_summary'] : (int) $inputs['show_summary'];
-	$args['show_author']    = isset( $args['show_author'] ) ? (int) $args['show_author'] : (int) $inputs['show_author'];
-	$args['show_date']      = isset( $args['show_date'] ) ? (int) $args['show_date'] : (int) $inputs['show_date'];
-
-	if ( ! empty( $args['error'] ) ) {
-		echo '<p class="widget-error"><strong>' . sprintf( __( 'RSS Error: %s' ), $args['error'] ) . '</strong></p>';
-	}
-
-	$esc_number = esc_attr( $args['number'] );
-	if ( $inputs['url'] ) :
-?>
-	<p><label for="rss-url-<?php echo $esc_number; ?>"><?php _e( 'Enter the RSS feed URL here:' ); ?></label>
-	<input class="widefat" id="rss-url-<?php echo $esc_number; ?>" name="widget-rss[<?php echo $esc_number; ?>][url]" type="text" value="<?php echo esc_url( $args['url'] ); ?>" /></p>
-<?php endif; if ( $inputs['title'] ) : ?>
-	<p><label for="rss-title-<?php echo $esc_number; ?>"><?php _e( 'Give the feed a title (optional):' ); ?></label>
-	<input class="widefat" id="rss-title-<?php echo $esc_number; ?>" name="widget-rss[<?php echo $esc_number; ?>][title]" type="text" value="<?php echo esc_attr( $args['title'] ); ?>" /></p>
-<?php endif; if ( $inputs['items'] ) : ?>
-	<p><label for="rss-items-<?php echo $esc_number; ?>"><?php _e( 'How many items would you like to display?' ); ?></label>
-	<select id="rss-items-<?php echo $esc_number; ?>" name="widget-rss[<?php echo $esc_number; ?>][items]">
-	<?php
-	for ( $i = 1; $i <= 20; ++$i ) {
-		echo "<option value='$i' " . selected( $args['items'], $i, false ) . ">$i</option>";
-	}
-	?>
-	</select></p>
-<?php endif; if ( $inputs['show_summary'] ) : ?>
-	<p><input id="rss-show-summary-<?php echo $esc_number; ?>" name="widget-rss[<?php echo $esc_number; ?>][show_summary]" type="checkbox" value="1" <?php checked( $args['show_summary'] ); ?> />
-	<label for="rss-show-summary-<?php echo $esc_number; ?>"><?php _e( 'Display item content?' ); ?></label></p>
-<?php endif; if ( $inputs['show_author'] ) : ?>
-	<p><input id="rss-show-author-<?php echo $esc_number; ?>" name="widget-rss[<?php echo $esc_number; ?>][show_author]" type="checkbox" value="1" <?php checked( $args['show_author'] ); ?> />
-	<label for="rss-show-author-<?php echo $esc_number; ?>"><?php _e( 'Display item author if available?' ); ?></label></p>
-<?php endif; if ( $inputs['show_date'] ) : ?>
-	<p><input id="rss-show-date-<?php echo $esc_number; ?>" name="widget-rss[<?php echo $esc_number; ?>][show_date]" type="checkbox" value="1" <?php checked( $args['show_date'] ); ?>/>
-	<label for="rss-show-date-<?php echo $esc_number; ?>"><?php _e( 'Display item date?' ); ?></label></p>
-<?php
-	endif;
-	foreach ( array_keys($default_inputs) as $input ) :
-		if ( 'hidden' === $inputs[$input] ) :
-			$id = str_replace( '_', '-', $input );
-?>
-	<input type="hidden" id="rss-<?php echo esc_attr( $id ); ?>-<?php echo $esc_number; ?>" name="widget-rss[<?php echo $esc_number; ?>][<?php echo esc_attr( $input ); ?>]" value="<?php echo esc_attr( $args[ $input ] ); ?>" />
-<?php
-		endif;
-	endforeach;
-}
-
-/**
- * Process RSS feed widget data and optionally retrieve feed items.
- *
- * The feed widget can not have more than 20 items or it will reset back to the
- * default, which is 10.
- *
- * The resulting array has the feed title, feed url, feed link (from channel),
- * feed items, error (if any), and whether to show summary, author, and date.
- * All respectively in the order of the array elements.
- *
- * @since 2.5.0
- *
- * @param array $widget_rss RSS widget feed data. Expects unescaped data.
- * @param bool $check_feed Optional, default is true. Whether to check feed for errors.
- * @return array
- */
-function wp_widget_rss_process( $widget_rss, $check_feed = true ) {
-	$items = (int) $widget_rss['items'];
-	if ( $items < 1 || 20 < $items )
-		$items = 10;
-	$url           = esc_url_raw( strip_tags( $widget_rss['url'] ) );
-	$title         = isset( $widget_rss['title'] ) ? trim( strip_tags( $widget_rss['title'] ) ) : '';
-	$show_summary  = isset( $widget_rss['show_summary'] ) ? (int) $widget_rss['show_summary'] : 0;
-	$show_author   = isset( $widget_rss['show_author'] ) ? (int) $widget_rss['show_author'] :0;
-	$show_date     = isset( $widget_rss['show_date'] ) ? (int) $widget_rss['show_date'] : 0;
-
-	if ( $check_feed ) {
-		$rss = fetch_feed($url);
-		$error = false;
-		$link = '';
-		if ( is_wp_error($rss) ) {
-			$error = $rss->get_error_message();
-		} else {
-			$link = esc_url(strip_tags($rss->get_permalink()));
-			while ( stristr($link, 'http') != $link )
-				$link = substr($link, 1);
-
-			$rss->__destruct();
-			unset($rss);
-		}
-	}
-
-	return compact( 'title', 'url', 'link', 'items', 'error', 'show_summary', 'show_author', 'show_date' );
-}
-
-/**
- * Registers all of the default WordPress widgets on startup.
- *
- * Calls {@see 'widgets_init'} action after all of the WordPress widgets have been registered.
- *
- * @since 2.2.0
- */
-function wp_widgets_init() {
-	if ( !is_blog_installed() )
-		return;
-
-	register_widget('WP_Widget_Pages');
-
-	register_widget('WP_Widget_Calendar');
-
-	register_widget('WP_Widget_Archives');
-
-	if ( get_option( 'link_manager_enabled' ) )
-		register_widget('WP_Widget_Links');
-
-	register_widget('WP_Widget_Meta');
-
-	register_widget('WP_Widget_Search');
-
-	register_widget('WP_Widget_Text');
-
-	register_widget('WP_Widget_Categories');
-
-	register_widget('WP_Widget_Recent_Posts');
-
-	register_widget('WP_Widget_Recent_Comments');
-
-	register_widget('WP_Widget_RSS');
-
-	register_widget('WP_Widget_Tag_Cloud');
-
-	register_widget('WP_Nav_Menu_Widget');
-
-	/**
-	 * Fires after all default WordPress widgets have been registered.
-	 *
-	 * @since 2.2.0
-	 */
-	do_action( 'widgets_init' );
-}
Index: www/wp-admin/includes/class-wp-filesystem-direct.php
===================================================================
--- www/wp-admin/includes/class-wp-filesystem-direct.php	(revision 38565)
+++ www/wp-admin/autoload/filesystem/WP_Filesystem_Direct.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/widgets/class-wp-widget-rss.php
===================================================================
--- www/wp-includes/widgets/class-wp-widget-rss.php	(revision 38565)
+++ www/wp-includes/autoload/widgets/WP_Widget_RSS.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/includes/class-plugin-upgrader.php
===================================================================
--- www/wp-admin/includes/class-plugin-upgrader.php	(revision 38565)
+++ www/wp-admin/autoload/upgrader/Plugin_Upgrader.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/comment.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/comment.php	(revision 38565)
+++ www/wp-includes/comment.php	(revision 38565)
@@ -1,2921 +0,0 @@
-<?php
-/**
- * Core Comment API
- *
- * @package WordPress
- * @subpackage Comment
- */
-
-/**
- * Check whether a comment passes internal checks to be allowed to add.
- *
- * If manual comment moderation is set in the administration, then all checks,
- * regardless of their type and whitelist, will fail and the function will
- * return false.
- *
- * If the number of links exceeds the amount in the administration, then the
- * check fails. If any of the parameter contents match the blacklist of words,
- * then the check fails.
- *
- * If the comment author was approved before, then the comment is automatically
- * whitelisted.
- *
- * If all checks pass, the function will return true.
- *
- * @since 1.2.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $author       Comment author name.
- * @param string $email        Comment author email.
- * @param string $url          Comment author URL.
- * @param string $comment      Content of the comment.
- * @param string $user_ip      Comment author IP address.
- * @param string $user_agent   Comment author User-Agent.
- * @param string $comment_type Comment type, either user-submitted comment,
- *		                       trackback, or pingback.
- * @return bool If all checks pass, true, otherwise false.
- */
-function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $comment_type) {
-	global $wpdb;
-
-	// If manual moderation is enabled, skip all checks and return false.
-	if ( 1 == get_option('comment_moderation') )
-		return false;
-
-	/** This filter is documented in wp-includes/comment-template.php */
-	$comment = apply_filters( 'comment_text', $comment );
-
-	// Check for the number of external links if a max allowed number is set.
-	if ( $max_links = get_option( 'comment_max_links' ) ) {
-		$num_links = preg_match_all( '/<a [^>]*href/i', $comment, $out );
-
-		/**
-		 * Filters the number of links found in a comment.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param int    $num_links The number of links found.
-		 * @param string $url       Comment author's URL. Included in allowed links total.
-		 */
-		$num_links = apply_filters( 'comment_max_links_url', $num_links, $url );
-
-		/*
-		 * If the number of links in the comment exceeds the allowed amount,
-		 * fail the check by returning false.
-		 */
-		if ( $num_links >= $max_links )
-			return false;
-	}
-
-	$mod_keys = trim(get_option('moderation_keys'));
-
-	// If moderation 'keys' (keywords) are set, process them.
-	if ( !empty($mod_keys) ) {
-		$words = explode("\n", $mod_keys );
-
-		foreach ( (array) $words as $word) {
-			$word = trim($word);
-
-			// Skip empty lines.
-			if ( empty($word) )
-				continue;
-
-			/*
-			 * Do some escaping magic so that '#' (number of) characters in the spam
-			 * words don't break things:
-			 */
-			$word = preg_quote($word, '#');
-
-			/*
-			 * Check the comment fields for moderation keywords. If any are found,
-			 * fail the check for the given field by returning false.
-			 */
-			$pattern = "#$word#i";
-			if ( preg_match($pattern, $author) ) return false;
-			if ( preg_match($pattern, $email) ) return false;
-			if ( preg_match($pattern, $url) ) return false;
-			if ( preg_match($pattern, $comment) ) return false;
-			if ( preg_match($pattern, $user_ip) ) return false;
-			if ( preg_match($pattern, $user_agent) ) return false;
-		}
-	}
-
-	/*
-	 * Check if the option to approve comments by previously-approved authors is enabled.
-	 *
-	 * If it is enabled, check whether the comment author has a previously-approved comment,
-	 * as well as whether there are any moderation keywords (if set) present in the author
-	 * email address. If both checks pass, return true. Otherwise, return false.
-	 */
-	if ( 1 == get_option('comment_whitelist')) {
-		if ( 'trackback' != $comment_type && 'pingback' != $comment_type && $author != '' && $email != '' ) {
-			// expected_slashed ($author, $email)
-			$ok_to_comment = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_author = '$author' AND comment_author_email = '$email' and comment_approved = '1' LIMIT 1");
-			if ( ( 1 == $ok_to_comment ) &&
-				( empty($mod_keys) || false === strpos( $email, $mod_keys) ) )
-					return true;
-			else
-				return false;
-		} else {
-			return false;
-		}
-	}
-	return true;
-}
-
-/**
- * Retrieve the approved comments for post $post_id.
- *
- * @since 2.0.0
- * @since 4.1.0 Refactored to leverage WP_Comment_Query over a direct query.
- *
- * @param  int   $post_id The ID of the post.
- * @param  array $args    Optional. See WP_Comment_Query::query() for information on accepted arguments.
- * @return int|array $comments The approved comments, or number of comments if `$count`
- *                             argument is true.
- */
-function get_approved_comments( $post_id, $args = array() ) {
-	if ( ! $post_id ) {
-		return array();
-	}
-
-	$defaults = array(
-		'status'  => 1,
-		'post_id' => $post_id,
-		'order'   => 'ASC',
-	);
-	$r = wp_parse_args( $args, $defaults );
-
-	$query = new WP_Comment_Query;
-	return $query->query( $r );
-}
-
-/**
- * Retrieves comment data given a comment ID or comment object.
- *
- * If an object is passed then the comment data will be cached and then returned
- * after being passed through a filter. If the comment is empty, then the global
- * comment variable will be used, if it is set.
- *
- * @since 2.0.0
- *
- * @global WP_Comment $comment
- *
- * @param WP_Comment|string|int $comment Comment to retrieve.
- * @param string $output Optional. OBJECT or ARRAY_A or ARRAY_N constants.
- * @return WP_Comment|array|null Depends on $output value.
- */
-function get_comment( &$comment = null, $output = OBJECT ) {
-	if ( empty( $comment ) && isset( $GLOBALS['comment'] ) ) {
-		$comment = $GLOBALS['comment'];
-	}
-
-	if ( $comment instanceof WP_Comment ) {
-		$_comment = $comment;
-	} elseif ( is_object( $comment ) ) {
-		$_comment = new WP_Comment( $comment );
-	} else {
-		$_comment = WP_Comment::get_instance( $comment );
-	}
-
-	if ( ! $_comment ) {
-		return null;
-	}
-
-	/**
-	 * Fires after a comment is retrieved.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param mixed $_comment Comment data.
-	 */
-	$_comment = apply_filters( 'get_comment', $_comment );
-
-	if ( $output == OBJECT ) {
-		return $_comment;
-	} elseif ( $output == ARRAY_A ) {
-		return $_comment->to_array();
-	} elseif ( $output == ARRAY_N ) {
-		return array_values( $_comment->to_array() );
-	}
-	return $_comment;
-}
-
-/**
- * Retrieve a list of comments.
- *
- * The comment list can be for the blog as a whole or for an individual post.
- *
- * @since 2.7.0
- *
- * @param string|array $args Optional. Array or string of arguments. See WP_Comment_Query::parse_query()
- *                           for information on accepted arguments. Default empty.
- * @return int|array List of comments or number of found comments if `$count` argument is true.
- */
-function get_comments( $args = '' ) {
-	$query = new WP_Comment_Query;
-	return $query->query( $args );
-}
-
-/**
- * Retrieve all of the WordPress supported comment statuses.
- *
- * Comments have a limited set of valid status values, this provides the comment
- * status values and descriptions.
- *
- * @since 2.7.0
- *
- * @return array List of comment statuses.
- */
-function get_comment_statuses() {
-	$status = array(
-		'hold'		=> __( 'Unapproved' ),
-		'approve'	=> _x( 'Approved', 'comment status' ),
-		'spam'		=> _x( 'Spam', 'comment status' ),
-		'trash'		=> _x( 'Trash', 'comment status' ),
-	);
-
-	return $status;
-}
-
-/**
- * Gets the default comment status for a post type.
- *
- * @since 4.3.0
- *
- * @param string $post_type    Optional. Post type. Default 'post'.
- * @param string $comment_type Optional. Comment type. Default 'comment'.
- * @return string Expected return value is 'open' or 'closed'.
- */
-function get_default_comment_status( $post_type = 'post', $comment_type = 'comment' ) {
-	switch ( $comment_type ) {
-		case 'pingback' :
-		case 'trackback' :
-			$supports = 'trackbacks';
-			$option = 'ping';
-			break;
-		default :
-			$supports = 'comments';
-			$option = 'comment';
-	}
-
-	// Set the status.
-	if ( 'page' === $post_type ) {
-		$status = 'closed';
-	} elseif ( post_type_supports( $post_type, $supports ) ) {
-		$status = get_option( "default_{$option}_status" );
-	} else {
-		$status = 'closed';
-	}
-
-	/**
-	 * Filters the default comment status for the given post type.
-	 *
-	 * @since 4.3.0
-	 *
-	 * @param string $status       Default status for the given post type,
-	 *                             either 'open' or 'closed'.
-	 * @param string $post_type    Post type. Default is `post`.
-	 * @param string $comment_type Type of comment. Default is `comment`.
-	 */
-	return apply_filters( 'get_default_comment_status' , $status, $post_type, $comment_type );
-}
-
-/**
- * The date the last comment was modified.
- *
- * @since 1.5.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- * @staticvar array $cache_lastcommentmodified
- *
- * @param string $timezone Which timezone to use in reference to 'gmt', 'blog',
- *		or 'server' locations.
- * @return string Last comment modified date.
- */
-function get_lastcommentmodified($timezone = 'server') {
-	global $wpdb;
-	static $cache_lastcommentmodified = array();
-
-	if ( isset($cache_lastcommentmodified[$timezone]) )
-		return $cache_lastcommentmodified[$timezone];
-
-	$add_seconds_server = date('Z');
-
-	switch ( strtolower($timezone)) {
-		case 'gmt':
-			$lastcommentmodified = $wpdb->get_var("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1");
-			break;
-		case 'blog':
-			$lastcommentmodified = $wpdb->get_var("SELECT comment_date FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1");
-			break;
-		case 'server':
-			$lastcommentmodified = $wpdb->get_var($wpdb->prepare("SELECT DATE_ADD(comment_date_gmt, INTERVAL %s SECOND) FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1", $add_seconds_server));
-			break;
-	}
-
-	$cache_lastcommentmodified[$timezone] = $lastcommentmodified;
-
-	return $lastcommentmodified;
-}
-
-/**
- * The amount of comments in a post or total comments.
- *
- * A lot like wp_count_comments(), in that they both return comment stats (albeit with different types).
- * The wp_count_comments() actually caches, but this function does not.
- *
- * @since 2.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int $post_id Optional. Comment amount in post if > 0, else total comments blog wide.
- * @return array The amount of spam, approved, awaiting moderation, and total comments.
- */
-function get_comment_count( $post_id = 0 ) {
-	global $wpdb;
-
-	$post_id = (int) $post_id;
-
-	$where = '';
-	if ( $post_id > 0 ) {
-		$where = $wpdb->prepare("WHERE comment_post_ID = %d", $post_id);
-	}
-
-	$totals = (array) $wpdb->get_results("
-		SELECT comment_approved, COUNT( * ) AS total
-		FROM {$wpdb->comments}
-		{$where}
-		GROUP BY comment_approved
-	", ARRAY_A);
-
-	$comment_count = array(
-		'approved'            => 0,
-		'awaiting_moderation' => 0,
-		'spam'                => 0,
-		'trash'               => 0,
-		'post-trashed'        => 0,
-		'total_comments'      => 0,
-		'all'                 => 0,
-	);
-
-	foreach ( $totals as $row ) {
-		switch ( $row['comment_approved'] ) {
-			case 'trash':
-				$comment_count['trash'] = $row['total'];
-				break;
-			case 'post-trashed':
-				$comment_count['post-trashed'] = $row['total'];
-				break;
-			case 'spam':
-				$comment_count['spam'] = $row['total'];
-				$comment_count['total_comments'] += $row['total'];
-				break;
-			case '1':
-				$comment_count['approved'] = $row['total'];
-				$comment_count['total_comments'] += $row['total'];
-				$comment_count['all'] += $row['total'];
-				break;
-			case '0':
-				$comment_count['awaiting_moderation'] = $row['total'];
-				$comment_count['total_comments'] += $row['total'];
-				$comment_count['all'] += $row['total'];
-				break;
-			default:
-				break;
-		}
-	}
-
-	return $comment_count;
-}
-
-//
-// Comment meta functions
-//
-
-/**
- * Add meta data field to a comment.
- *
- * @since 2.9.0
- * @link https://codex.wordpress.org/Function_Reference/add_comment_meta
- *
- * @param int $comment_id Comment ID.
- * @param string $meta_key Metadata name.
- * @param mixed $meta_value Metadata value.
- * @param bool $unique Optional, default is false. Whether the same key should not be added.
- * @return int|bool Meta ID on success, false on failure.
- */
-function add_comment_meta($comment_id, $meta_key, $meta_value, $unique = false) {
-	return add_metadata('comment', $comment_id, $meta_key, $meta_value, $unique);
-}
-
-/**
- * Remove metadata matching criteria from a comment.
- *
- * You can match based on the key, or key and value. Removing based on key and
- * value, will keep from removing duplicate metadata with the same key. It also
- * allows removing all metadata matching key, if needed.
- *
- * @since 2.9.0
- * @link https://codex.wordpress.org/Function_Reference/delete_comment_meta
- *
- * @param int $comment_id comment ID
- * @param string $meta_key Metadata name.
- * @param mixed $meta_value Optional. Metadata value.
- * @return bool True on success, false on failure.
- */
-function delete_comment_meta($comment_id, $meta_key, $meta_value = '') {
-	return delete_metadata('comment', $comment_id, $meta_key, $meta_value);
-}
-
-/**
- * Retrieve comment meta field for a comment.
- *
- * @since 2.9.0
- * @link https://codex.wordpress.org/Function_Reference/get_comment_meta
- *
- * @param int $comment_id Comment ID.
- * @param string $key Optional. The meta key to retrieve. By default, returns data for all keys.
- * @param bool $single Whether to return a single value.
- * @return mixed Will be an array if $single is false. Will be value of meta data field if $single
- *  is true.
- */
-function get_comment_meta($comment_id, $key = '', $single = false) {
-	return get_metadata('comment', $comment_id, $key, $single);
-}
-
-/**
- * Update comment meta field based on comment ID.
- *
- * Use the $prev_value parameter to differentiate between meta fields with the
- * same key and comment ID.
- *
- * If the meta field for the comment does not exist, it will be added.
- *
- * @since 2.9.0
- * @link https://codex.wordpress.org/Function_Reference/update_comment_meta
- *
- * @param int $comment_id Comment ID.
- * @param string $meta_key Metadata key.
- * @param mixed $meta_value Metadata value.
- * @param mixed $prev_value Optional. Previous value to check before removing.
- * @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure.
- */
-function update_comment_meta($comment_id, $meta_key, $meta_value, $prev_value = '') {
-	return update_metadata('comment', $comment_id, $meta_key, $meta_value, $prev_value);
-}
-
-/**
- * Queues comments for metadata lazy-loading.
- *
- * @since 4.5.0
- *
- * @param array $comments Array of comment objects.
- */
-function wp_queue_comments_for_comment_meta_lazyload( $comments ) {
-	// Don't use `wp_list_pluck()` to avoid by-reference manipulation.
-	$comment_ids = array();
-	if ( is_array( $comments ) ) {
-		foreach ( $comments as $comment ) {
-			if ( $comment instanceof WP_Comment ) {
-				$comment_ids[] = $comment->comment_ID;
-			}
-		}
-	}
-
-	if ( $comment_ids ) {
-		$lazyloader = wp_metadata_lazyloader();
-		$lazyloader->queue_objects( 'comment', $comment_ids );
-	}
-}
-
-/**
- * Sets the cookies used to store an unauthenticated commentator's identity. Typically used
- * to recall previous comments by this commentator that are still held in moderation.
- *
- * @param WP_Comment $comment Comment object.
- * @param object     $user    Comment author's object.
- *
- * @since 3.4.0
- */
-function wp_set_comment_cookies($comment, $user) {
-	if ( $user->exists() )
-		return;
-
-	/**
-	 * Filters the lifetime of the comment cookie in seconds.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param int $seconds Comment cookie lifetime. Default 30000000.
-	 */
-	$comment_cookie_lifetime = apply_filters( 'comment_cookie_lifetime', 30000000 );
-	$secure = ( 'https' === parse_url( home_url(), PHP_URL_SCHEME ) );
-	setcookie( 'comment_author_' . COOKIEHASH, $comment->comment_author, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN, $secure );
-	setcookie( 'comment_author_email_' . COOKIEHASH, $comment->comment_author_email, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN, $secure );
-	setcookie( 'comment_author_url_' . COOKIEHASH, esc_url($comment->comment_author_url), time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN, $secure );
-}
-
-/**
- * Sanitizes the cookies sent to the user already.
- *
- * Will only do anything if the cookies have already been created for the user.
- * Mostly used after cookies had been sent to use elsewhere.
- *
- * @since 2.0.4
- */
-function sanitize_comment_cookies() {
-	if ( isset( $_COOKIE['comment_author_' . COOKIEHASH] ) ) {
-		/**
-		 * Filters the comment author's name cookie before it is set.
-		 *
-		 * When this filter hook is evaluated in wp_filter_comment(),
-		 * the comment author's name string is passed.
-		 *
-		 * @since 1.5.0
-		 *
-		 * @param string $author_cookie The comment author name cookie.
-		 */
-		$comment_author = apply_filters( 'pre_comment_author_name', $_COOKIE['comment_author_' . COOKIEHASH] );
-		$comment_author = wp_unslash($comment_author);
-		$comment_author = esc_attr($comment_author);
-		$_COOKIE['comment_author_' . COOKIEHASH] = $comment_author;
-	}
-
-	if ( isset( $_COOKIE['comment_author_email_' . COOKIEHASH] ) ) {
-		/**
-		 * Filters the comment author's email cookie before it is set.
-		 *
-		 * When this filter hook is evaluated in wp_filter_comment(),
-		 * the comment author's email string is passed.
-		 *
-		 * @since 1.5.0
-		 *
-		 * @param string $author_email_cookie The comment author email cookie.
-		 */
-		$comment_author_email = apply_filters( 'pre_comment_author_email', $_COOKIE['comment_author_email_' . COOKIEHASH] );
-		$comment_author_email = wp_unslash($comment_author_email);
-		$comment_author_email = esc_attr($comment_author_email);
-		$_COOKIE['comment_author_email_'.COOKIEHASH] = $comment_author_email;
-	}
-
-	if ( isset( $_COOKIE['comment_author_url_' . COOKIEHASH] ) ) {
-		/**
-		 * Filters the comment author's URL cookie before it is set.
-		 *
-		 * When this filter hook is evaluated in wp_filter_comment(),
-		 * the comment author's URL string is passed.
-		 *
-		 * @since 1.5.0
-		 *
-		 * @param string $author_url_cookie The comment author URL cookie.
-		 */
-		$comment_author_url = apply_filters( 'pre_comment_author_url', $_COOKIE['comment_author_url_' . COOKIEHASH] );
-		$comment_author_url = wp_unslash($comment_author_url);
-		$_COOKIE['comment_author_url_'.COOKIEHASH] = $comment_author_url;
-	}
-}
-
-/**
- * Validates whether this comment is allowed to be made.
- *
- * @since 2.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param array $commentdata Contains information on the comment
- * @return int|string Signifies the approval status (0|1|'spam')
- */
-function wp_allow_comment( $commentdata ) {
-	global $wpdb;
-
-	// Simple duplicate check
-	// expected_slashed ($comment_post_ID, $comment_author, $comment_author_email, $comment_content)
-	$dupe = $wpdb->prepare(
-		"SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_parent = %s AND comment_approved != 'trash' AND ( comment_author = %s ",
-		wp_unslash( $commentdata['comment_post_ID'] ),
-		wp_unslash( $commentdata['comment_parent'] ),
-		wp_unslash( $commentdata['comment_author'] )
-	);
-	if ( $commentdata['comment_author_email'] ) {
-		$dupe .= $wpdb->prepare(
-			"AND comment_author_email = %s ",
-			wp_unslash( $commentdata['comment_author_email'] )
-		);
-	}
-	$dupe .= $wpdb->prepare(
-		") AND comment_content = %s LIMIT 1",
-		wp_unslash( $commentdata['comment_content'] )
-	);
-
-	$dupe_id = $wpdb->get_var( $dupe );
-
-	/**
-	 * Filters the ID, if any, of the duplicate comment found when creating a new comment.
-	 *
-	 * Return an empty value from this filter to allow what WP considers a duplicate comment.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param int   $dupe_id     ID of the comment identified as a duplicate.
-	 * @param array $commentdata Data for the comment being created.
-	 */
-	$dupe_id = apply_filters( 'duplicate_comment_id', $dupe_id, $commentdata );
-
-	if ( $dupe_id ) {
-		/**
-		 * Fires immediately after a duplicate comment is detected.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param array $commentdata Comment data.
-		 */
-		do_action( 'comment_duplicate_trigger', $commentdata );
-		if ( wp_doing_ajax() ) {
-			die( __('Duplicate comment detected; it looks as though you&#8217;ve already said that!') );
-		}
-		wp_die( __( 'Duplicate comment detected; it looks as though you&#8217;ve already said that!' ), 409 );
-	}
-
-	/**
-	 * Fires immediately before a comment is marked approved.
-	 *
-	 * Allows checking for comment flooding.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param string $comment_author_IP    Comment author's IP address.
-	 * @param string $comment_author_email Comment author's email.
-	 * @param string $comment_date_gmt     GMT date the comment was posted.
-	 */
-	do_action(
-		'check_comment_flood',
-		$commentdata['comment_author_IP'],
-		$commentdata['comment_author_email'],
-		$commentdata['comment_date_gmt']
-	);
-
-	if ( ! empty( $commentdata['user_id'] ) ) {
-		$user = get_userdata( $commentdata['user_id'] );
-		$post_author = $wpdb->get_var( $wpdb->prepare(
-			"SELECT post_author FROM $wpdb->posts WHERE ID = %d LIMIT 1",
-			$commentdata['comment_post_ID']
-		) );
-	}
-
-	if ( isset( $user ) && ( $commentdata['user_id'] == $post_author || $user->has_cap( 'moderate_comments' ) ) ) {
-		// The author and the admins get respect.
-		$approved = 1;
-	} else {
-		// Everyone else's comments will be checked.
-		if ( check_comment(
-			$commentdata['comment_author'],
-			$commentdata['comment_author_email'],
-			$commentdata['comment_author_url'],
-			$commentdata['comment_content'],
-			$commentdata['comment_author_IP'],
-			$commentdata['comment_agent'],
-			$commentdata['comment_type']
-		) ) {
-			$approved = 1;
-		} else {
-			$approved = 0;
-		}
-
-		if ( wp_blacklist_check(
-			$commentdata['comment_author'],
-			$commentdata['comment_author_email'],
-			$commentdata['comment_author_url'],
-			$commentdata['comment_content'],
-			$commentdata['comment_author_IP'],
-			$commentdata['comment_agent']
-		) ) {
-			$approved = EMPTY_TRASH_DAYS ? 'trash' : 'spam';
-		}
-	}
-
-	/**
-	 * Filters a comment's approval status before it is set.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param bool|string $approved    The approval status. Accepts 1, 0, or 'spam'.
-	 * @param array       $commentdata Comment data.
-	 */
-	$approved = apply_filters( 'pre_comment_approved', $approved, $commentdata );
-	return $approved;
-}
-
-/**
- * Check whether comment flooding is occurring.
- *
- * Won't run, if current user can manage options, so to not block
- * administrators.
- *
- * @since 2.3.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $ip Comment IP.
- * @param string $email Comment author email address.
- * @param string $date MySQL time string.
- */
-function check_comment_flood_db( $ip, $email, $date ) {
-	global $wpdb;
-	// don't throttle admins or moderators
-	if ( current_user_can( 'manage_options' ) || current_user_can( 'moderate_comments' ) ) {
-		return;
-	}
-	$hour_ago = gmdate( 'Y-m-d H:i:s', time() - HOUR_IN_SECONDS );
-
-	if ( is_user_logged_in() ) {
-		$user = get_current_user_id();
-		$check_column = '`user_id`';
-	} else {
-		$user = $ip;
-		$check_column = '`comment_author_IP`';
-	}
-
-	$sql = $wpdb->prepare(
-		"SELECT `comment_date_gmt` FROM `$wpdb->comments` WHERE `comment_date_gmt` >= %s AND ( $check_column = %s OR `comment_author_email` = %s ) ORDER BY `comment_date_gmt` DESC LIMIT 1",
-		$hour_ago,
-		$user,
-		$email
-	);
-	$lasttime = $wpdb->get_var( $sql );
-	if ( $lasttime ) {
-		$time_lastcomment = mysql2date('U', $lasttime, false);
-		$time_newcomment  = mysql2date('U', $date, false);
-		/**
-		 * Filters the comment flood status.
-		 *
-		 * @since 2.1.0
-		 *
-		 * @param bool $bool             Whether a comment flood is occurring. Default false.
-		 * @param int  $time_lastcomment Timestamp of when the last comment was posted.
-		 * @param int  $time_newcomment  Timestamp of when the new comment was posted.
-		 */
-		$flood_die = apply_filters( 'comment_flood_filter', false, $time_lastcomment, $time_newcomment );
-		if ( $flood_die ) {
-			/**
-			 * Fires before the comment flood message is triggered.
-			 *
-			 * @since 1.5.0
-			 *
-			 * @param int $time_lastcomment Timestamp of when the last comment was posted.
-			 * @param int $time_newcomment  Timestamp of when the new comment was posted.
-			 */
-			do_action( 'comment_flood_trigger', $time_lastcomment, $time_newcomment );
-
-			if ( wp_doing_ajax() )
-				die( __('You are posting comments too quickly. Slow down.') );
-
-			wp_die( __( 'You are posting comments too quickly. Slow down.' ), 429 );
-		}
-	}
-}
-
-/**
- * Separates an array of comments into an array keyed by comment_type.
- *
- * @since 2.7.0
- *
- * @param array $comments Array of comments
- * @return array Array of comments keyed by comment_type.
- */
-function separate_comments(&$comments) {
-	$comments_by_type = array('comment' => array(), 'trackback' => array(), 'pingback' => array(), 'pings' => array());
-	$count = count($comments);
-	for ( $i = 0; $i < $count; $i++ ) {
-		$type = $comments[$i]->comment_type;
-		if ( empty($type) )
-			$type = 'comment';
-		$comments_by_type[$type][] = &$comments[$i];
-		if ( 'trackback' == $type || 'pingback' == $type )
-			$comments_by_type['pings'][] = &$comments[$i];
-	}
-
-	return $comments_by_type;
-}
-
-/**
- * Calculate the total number of comment pages.
- *
- * @since 2.7.0
- *
- * @uses Walker_Comment
- *
- * @global WP_Query $wp_query
- *
- * @param array $comments Optional array of WP_Comment objects. Defaults to $wp_query->comments
- * @param int   $per_page Optional comments per page.
- * @param bool  $threaded Optional control over flat or threaded comments.
- * @return int Number of comment pages.
- */
-function get_comment_pages_count( $comments = null, $per_page = null, $threaded = null ) {
-	global $wp_query;
-
-	if ( null === $comments && null === $per_page && null === $threaded && !empty($wp_query->max_num_comment_pages) )
-		return $wp_query->max_num_comment_pages;
-
-	if ( ( ! $comments || ! is_array( $comments ) ) && ! empty( $wp_query->comments )  )
-		$comments = $wp_query->comments;
-
-	if ( empty($comments) )
-		return 0;
-
-	if ( ! get_option( 'page_comments' ) ) {
-		return 1;
-	}
-
-	if ( !isset($per_page) )
-		$per_page = (int) get_query_var('comments_per_page');
-	if ( 0 === $per_page )
-		$per_page = (int) get_option('comments_per_page');
-	if ( 0 === $per_page )
-		return 1;
-
-	if ( !isset($threaded) )
-		$threaded = get_option('thread_comments');
-
-	if ( $threaded ) {
-		$walker = new Walker_Comment;
-		$count = ceil( $walker->get_number_of_root_elements( $comments ) / $per_page );
-	} else {
-		$count = ceil( count( $comments ) / $per_page );
-	}
-
-	return $count;
-}
-
-/**
- * Calculate what page number a comment will appear on for comment paging.
- *
- * @since 2.7.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int   $comment_ID Comment ID.
- * @param array $args {
- *      Array of optional arguments.
- *      @type string     $type      Limit paginated comments to those matching a given type. Accepts 'comment',
- *                                  'trackback', 'pingback', 'pings' (trackbacks and pingbacks), or 'all'.
- *                                  Default is 'all'.
- *      @type int        $per_page  Per-page count to use when calculating pagination. Defaults to the value of the
- *                                  'comments_per_page' option.
- *      @type int|string $max_depth If greater than 1, comment page will be determined for the top-level parent of
- *                                  `$comment_ID`. Defaults to the value of the 'thread_comments_depth' option.
- * } *
- * @return int|null Comment page number or null on error.
- */
-function get_page_of_comment( $comment_ID, $args = array() ) {
-	global $wpdb;
-
-	$page = null;
-
-	if ( !$comment = get_comment( $comment_ID ) )
-		return;
-
-	$defaults = array( 'type' => 'all', 'page' => '', 'per_page' => '', 'max_depth' => '' );
-	$args = wp_parse_args( $args, $defaults );
-	$original_args = $args;
-
-	// Order of precedence: 1. `$args['per_page']`, 2. 'comments_per_page' query_var, 3. 'comments_per_page' option.
-	if ( get_option( 'page_comments' ) ) {
-		if ( '' === $args['per_page'] ) {
-			$args['per_page'] = get_query_var( 'comments_per_page' );
-		}
-
-		if ( '' === $args['per_page'] ) {
-			$args['per_page'] = get_option( 'comments_per_page' );
-		}
-	}
-
-	if ( empty($args['per_page']) ) {
-		$args['per_page'] = 0;
-		$args['page'] = 0;
-	}
-
-	if ( $args['per_page'] < 1 ) {
-		$page = 1;
-	}
-
-	if ( null === $page ) {
-		if ( '' === $args['max_depth'] ) {
-			if ( get_option('thread_comments') )
-				$args['max_depth'] = get_option('thread_comments_depth');
-			else
-				$args['max_depth'] = -1;
-		}
-
-		// Find this comment's top level parent if threading is enabled
-		if ( $args['max_depth'] > 1 && 0 != $comment->comment_parent )
-			return get_page_of_comment( $comment->comment_parent, $args );
-
-		$comment_args = array(
-			'type'       => $args['type'],
-			'post_id'    => $comment->comment_post_ID,
-			'fields'     => 'ids',
-			'count'      => true,
-			'status'     => 'approve',
-			'parent'     => 0,
-			'date_query' => array(
-				array(
-					'column' => "$wpdb->comments.comment_date_gmt",
-					'before' => $comment->comment_date_gmt,
-				)
-			),
-		);
-
-		$comment_query = new WP_Comment_Query();
-		$older_comment_count = $comment_query->query( $comment_args );
-
-		// No older comments? Then it's page #1.
-		if ( 0 == $older_comment_count ) {
-			$page = 1;
-
-		// Divide comments older than this one by comments per page to get this comment's page number
-		} else {
-			$page = ceil( ( $older_comment_count + 1 ) / $args['per_page'] );
-		}
-	}
-
-	/**
-	 * Filters the calculated page on which a comment appears.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param int   $page          Comment page.
-	 * @param array $args {
-	 *     Arguments used to calculate pagination. These include arguments auto-detected by the function,
-	 *     based on query vars, system settings, etc. For pristine arguments passed to the function,
-	 *     see `$original_args`.
-	 *
-	 *     @type string $type      Type of comments to count.
-	 *     @type int    $page      Calculated current page.
-	 *     @type int    $per_page  Calculated number of comments per page.
-	 *     @type int    $max_depth Maximum comment threading depth allowed.
-	 * }
-	 * @param array $original_args {
-	 *     Array of arguments passed to the function. Some or all of these may not be set.
-	 *
-	 *     @type string $type      Type of comments to count.
-	 *     @type int    $page      Current comment page.
-	 *     @type int    $per_page  Number of comments per page.
-	 *     @type int    $max_depth Maximum comment threading depth allowed.
-	 * }
-	 */
-	return apply_filters( 'get_page_of_comment', (int) $page, $args, $original_args );
-}
-
-/**
- * Retrieves the maximum character lengths for the comment form fields.
- *
- * @since 4.5.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @return array Maximum character length for the comment form fields.
- */
-function wp_get_comment_fields_max_lengths() {
-	global $wpdb;
-
-	$lengths = array(
-		'comment_author'       => 245,
-		'comment_author_email' => 100,
-		'comment_author_url'   => 200,
-		'comment_content'      => 65525,
-	);
-
-	if ( $wpdb->is_mysql ) {
-		foreach ( $lengths as $column => $length ) {
-			$col_length = $wpdb->get_col_length( $wpdb->comments, $column );
-			$max_length = 0;
-
-			// No point if we can't get the DB column lengths
-			if ( is_wp_error( $col_length ) ) {
-				break;
-			}
-
-			if ( ! is_array( $col_length ) && (int) $col_length > 0 ) {
-				$max_length = (int) $col_length;
-			} elseif ( is_array( $col_length ) && isset( $col_length['length'] ) && intval( $col_length['length'] ) > 0 ) {
-				$max_length = (int) $col_length['length'];
-
-				if ( ! empty( $col_length['type'] ) && 'byte' === $col_length['type'] ) {
-					$max_length = $max_length - 10;
-				}
-			}
-
-			if ( $max_length > 0 ) {
-				$lengths[ $column ] = $max_length;
-			}
-		}
-	}
-
-	/**
-	 * Filters the lengths for the comment form fields.
-	 *
-	 * @since 4.5.0
-	 *
-	 * @param array $lengths Associative array `'field_name' => 'maximum length'`.
-	 */
-	return apply_filters( 'wp_get_comment_fields_max_lengths', $lengths );
-}
-
-/**
- * Does comment contain blacklisted characters or words.
- *
- * @since 1.5.0
- *
- * @param string $author The author of the comment
- * @param string $email The email of the comment
- * @param string $url The url used in the comment
- * @param string $comment The comment content
- * @param string $user_ip The comment author IP address
- * @param string $user_agent The author's browser user agent
- * @return bool True if comment contains blacklisted content, false if comment does not
- */
-function wp_blacklist_check($author, $email, $url, $comment, $user_ip, $user_agent) {
-	/**
-	 * Fires before the comment is tested for blacklisted characters or words.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $author     Comment author.
-	 * @param string $email      Comment author's email.
-	 * @param string $url        Comment author's URL.
-	 * @param string $comment    Comment content.
-	 * @param string $user_ip    Comment author's IP address.
-	 * @param string $user_agent Comment author's browser user agent.
-	 */
-	do_action( 'wp_blacklist_check', $author, $email, $url, $comment, $user_ip, $user_agent );
-
-	$mod_keys = trim( get_option('blacklist_keys') );
-	if ( '' == $mod_keys )
-		return false; // If moderation keys are empty
-
-	// Ensure HTML tags are not being used to bypass the blacklist.
-	$comment_without_html = wp_strip_all_tags( $comment );
-
-	$words = explode("\n", $mod_keys );
-
-	foreach ( (array) $words as $word ) {
-		$word = trim($word);
-
-		// Skip empty lines
-		if ( empty($word) ) { continue; }
-
-		// Do some escaping magic so that '#' chars in the
-		// spam words don't break things:
-		$word = preg_quote($word, '#');
-
-		$pattern = "#$word#i";
-		if (
-			   preg_match($pattern, $author)
-			|| preg_match($pattern, $email)
-			|| preg_match($pattern, $url)
-			|| preg_match($pattern, $comment)
-			|| preg_match($pattern, $comment_without_html)
-			|| preg_match($pattern, $user_ip)
-			|| preg_match($pattern, $user_agent)
-		 )
-			return true;
-	}
-	return false;
-}
-
-/**
- * Retrieve total comments for blog or single post.
- *
- * The properties of the returned object contain the 'moderated', 'approved',
- * and spam comments for either the entire blog or single post. Those properties
- * contain the amount of comments that match the status. The 'total_comments'
- * property contains the integer of total comments.
- *
- * The comment stats are cached and then retrieved, if they already exist in the
- * cache.
- *
- * @since 2.5.0
- *
- * @param int $post_id Optional. Post ID.
- * @return object|array Comment stats.
- */
-function wp_count_comments( $post_id = 0 ) {
-	$post_id = (int) $post_id;
-
-	/**
-	 * Filters the comments count for a given post.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param array $count   An empty array.
-	 * @param int   $post_id The post ID.
-	 */
-	$filtered = apply_filters( 'wp_count_comments', array(), $post_id );
-	if ( ! empty( $filtered ) ) {
-		return $filtered;
-	}
-
-	$count = wp_cache_get( "comments-{$post_id}", 'counts' );
-	if ( false !== $count ) {
-		return $count;
-	}
-
-	$stats = get_comment_count( $post_id );
-	$stats['moderated'] = $stats['awaiting_moderation'];
-	unset( $stats['awaiting_moderation'] );
-
-	$stats_object = (object) $stats;
-	wp_cache_set( "comments-{$post_id}", $stats_object, 'counts' );
-
-	return $stats_object;
-}
-
-/**
- * Trashes or deletes a comment.
- *
- * The comment is moved to trash instead of permanently deleted unless trash is
- * disabled, item is already in the trash, or $force_delete is true.
- *
- * The post comment count will be updated if the comment was approved and has a
- * post ID available.
- *
- * @since 2.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int|WP_Comment $comment_id   Comment ID or WP_Comment object.
- * @param bool           $force_delete Whether to bypass trash and force deletion. Default is false.
- * @return bool True on success, false on failure.
- */
-function wp_delete_comment($comment_id, $force_delete = false) {
-	global $wpdb;
-	if (!$comment = get_comment($comment_id))
-		return false;
-
-	if ( !$force_delete && EMPTY_TRASH_DAYS && !in_array( wp_get_comment_status( $comment ), array( 'trash', 'spam' ) ) )
-		return wp_trash_comment($comment_id);
-
-	/**
-	 * Fires immediately before a comment is deleted from the database.
-	 *
-	 * @since 1.2.0
-	 *
-	 * @param int $comment_id The comment ID.
-	 */
-	do_action( 'delete_comment', $comment->comment_ID );
-
-	// Move children up a level.
-	$children = $wpdb->get_col( $wpdb->prepare("SELECT comment_ID FROM $wpdb->comments WHERE comment_parent = %d", $comment->comment_ID) );
-	if ( !empty($children) ) {
-		$wpdb->update($wpdb->comments, array('comment_parent' => $comment->comment_parent), array('comment_parent' => $comment->comment_ID));
-		clean_comment_cache($children);
-	}
-
-	// Delete metadata
-	$meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT meta_id FROM $wpdb->commentmeta WHERE comment_id = %d", $comment->comment_ID ) );
-	foreach ( $meta_ids as $mid )
-		delete_metadata_by_mid( 'comment', $mid );
-
-	if ( ! $wpdb->delete( $wpdb->comments, array( 'comment_ID' => $comment->comment_ID ) ) )
-		return false;
-
-	/**
-	 * Fires immediately after a comment is deleted from the database.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param int $comment_id The comment ID.
-	 */
-	do_action( 'deleted_comment', $comment->comment_ID );
-
-	$post_id = $comment->comment_post_ID;
-	if ( $post_id && $comment->comment_approved == 1 )
-		wp_update_comment_count($post_id);
-
-	clean_comment_cache( $comment->comment_ID );
-
-	/** This action is documented in wp-includes/comment.php */
-	do_action( 'wp_set_comment_status', $comment->comment_ID, 'delete' );
-
-	wp_transition_comment_status('delete', $comment->comment_approved, $comment);
-	return true;
-}
-
-/**
- * Moves a comment to the Trash
- *
- * If trash is disabled, comment is permanently deleted.
- *
- * @since 2.9.0
- *
- * @param int|WP_Comment $comment_id Comment ID or WP_Comment object.
- * @return bool True on success, false on failure.
- */
-function wp_trash_comment($comment_id) {
-	if ( !EMPTY_TRASH_DAYS )
-		return wp_delete_comment($comment_id, true);
-
-	if ( !$comment = get_comment($comment_id) )
-		return false;
-
-	/**
-	 * Fires immediately before a comment is sent to the Trash.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param int $comment_id The comment ID.
-	 */
-	do_action( 'trash_comment', $comment->comment_ID );
-
-	if ( wp_set_comment_status( $comment, 'trash' ) ) {
-		delete_comment_meta( $comment->comment_ID, '_wp_trash_meta_status' );
-		delete_comment_meta( $comment->comment_ID, '_wp_trash_meta_time' );
-		add_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', $comment->comment_approved );
-		add_comment_meta( $comment->comment_ID, '_wp_trash_meta_time', time() );
-
-		/**
-		 * Fires immediately after a comment is sent to Trash.
-		 *
-		 * @since 2.9.0
-		 *
-		 * @param int $comment_id The comment ID.
-		 */
-		do_action( 'trashed_comment', $comment->comment_ID );
-		return true;
-	}
-
-	return false;
-}
-
-/**
- * Removes a comment from the Trash
- *
- * @since 2.9.0
- *
- * @param int|WP_Comment $comment_id Comment ID or WP_Comment object.
- * @return bool True on success, false on failure.
- */
-function wp_untrash_comment($comment_id) {
-	$comment = get_comment( $comment_id );
-	if ( ! $comment ) {
-		return false;
-	}
-
-	/**
-	 * Fires immediately before a comment is restored from the Trash.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param int $comment_id The comment ID.
-	 */
-	do_action( 'untrash_comment', $comment->comment_ID );
-
-	$status = (string) get_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', true );
-	if ( empty($status) )
-		$status = '0';
-
-	if ( wp_set_comment_status( $comment, $status ) ) {
-		delete_comment_meta( $comment->comment_ID, '_wp_trash_meta_time' );
-		delete_comment_meta( $comment->comment_ID, '_wp_trash_meta_status' );
-		/**
-		 * Fires immediately after a comment is restored from the Trash.
-		 *
-		 * @since 2.9.0
-		 *
-		 * @param int $comment_id The comment ID.
-		 */
-		do_action( 'untrashed_comment', $comment->comment_ID );
-		return true;
-	}
-
-	return false;
-}
-
-/**
- * Marks a comment as Spam
- *
- * @since 2.9.0
- *
- * @param int|WP_Comment $comment_id Comment ID or WP_Comment object.
- * @return bool True on success, false on failure.
- */
-function wp_spam_comment( $comment_id ) {
-	$comment = get_comment( $comment_id );
-	if ( ! $comment ) {
-		return false;
-	}
-
-	/**
-	 * Fires immediately before a comment is marked as Spam.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param int $comment_id The comment ID.
-	 */
-	do_action( 'spam_comment', $comment->comment_ID );
-
-	if ( wp_set_comment_status( $comment, 'spam' ) ) {
-		delete_comment_meta( $comment->comment_ID, '_wp_trash_meta_status' );
-		delete_comment_meta( $comment->comment_ID, '_wp_trash_meta_time' );
-		add_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', $comment->comment_approved );
-		add_comment_meta( $comment->comment_ID, '_wp_trash_meta_time', time() );
-		/**
-		 * Fires immediately after a comment is marked as Spam.
-		 *
-		 * @since 2.9.0
-		 *
-		 * @param int $comment_id The comment ID.
-		 */
-		do_action( 'spammed_comment', $comment->comment_ID );
-		return true;
-	}
-
-	return false;
-}
-
-/**
- * Removes a comment from the Spam
- *
- * @since 2.9.0
- *
- * @param int|WP_Comment $comment_id Comment ID or WP_Comment object.
- * @return bool True on success, false on failure.
- */
-function wp_unspam_comment( $comment_id ) {
-	$comment = get_comment( $comment_id );
-	if ( ! $comment ) {
-		return false;
-	}
-
-	/**
-	 * Fires immediately before a comment is unmarked as Spam.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param int $comment_id The comment ID.
-	 */
-	do_action( 'unspam_comment', $comment->comment_ID );
-
-	$status = (string) get_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', true );
-	if ( empty($status) )
-		$status = '0';
-
-	if ( wp_set_comment_status( $comment, $status ) ) {
-		delete_comment_meta( $comment->comment_ID, '_wp_trash_meta_status' );
-		delete_comment_meta( $comment->comment_ID, '_wp_trash_meta_time' );
-		/**
-		 * Fires immediately after a comment is unmarked as Spam.
-		 *
-		 * @since 2.9.0
-		 *
-		 * @param int $comment_id The comment ID.
-		 */
-		do_action( 'unspammed_comment', $comment->comment_ID );
-		return true;
-	}
-
-	return false;
-}
-
-/**
- * The status of a comment by ID.
- *
- * @since 1.0.0
- *
- * @param int|WP_Comment $comment_id Comment ID or WP_Comment object
- * @return false|string Status might be 'trash', 'approved', 'unapproved', 'spam'. False on failure.
- */
-function wp_get_comment_status($comment_id) {
-	$comment = get_comment($comment_id);
-	if ( !$comment )
-		return false;
-
-	$approved = $comment->comment_approved;
-
-	if ( $approved == null )
-		return false;
-	elseif ( $approved == '1' )
-		return 'approved';
-	elseif ( $approved == '0' )
-		return 'unapproved';
-	elseif ( $approved == 'spam' )
-		return 'spam';
-	elseif ( $approved == 'trash' )
-		return 'trash';
-	else
-		return false;
-}
-
-/**
- * Call hooks for when a comment status transition occurs.
- *
- * Calls hooks for comment status transitions. If the new comment status is not the same
- * as the previous comment status, then two hooks will be ran, the first is
- * {@see 'transition_comment_status'} with new status, old status, and comment data. The
- * next action called is {@see comment_$old_status_to_$new_status'}. It has the
- * comment data.
- *
- * The final action will run whether or not the comment statuses are the same. The
- * action is named {@see 'comment_$new_status_$comment->comment_type'}.
- *
- * @since 2.7.0
- *
- * @param string $new_status New comment status.
- * @param string $old_status Previous comment status.
- * @param object $comment Comment data.
- */
-function wp_transition_comment_status($new_status, $old_status, $comment) {
-	/*
-	 * Translate raw statuses to human readable formats for the hooks.
-	 * This is not a complete list of comment status, it's only the ones
-	 * that need to be renamed
-	 */
-	$comment_statuses = array(
-		0         => 'unapproved',
-		'hold'    => 'unapproved', // wp_set_comment_status() uses "hold"
-		1         => 'approved',
-		'approve' => 'approved', // wp_set_comment_status() uses "approve"
-	);
-	if ( isset($comment_statuses[$new_status]) ) $new_status = $comment_statuses[$new_status];
-	if ( isset($comment_statuses[$old_status]) ) $old_status = $comment_statuses[$old_status];
-
-	// Call the hooks
-	if ( $new_status != $old_status ) {
-		/**
-		 * Fires when the comment status is in transition.
-		 *
-		 * @since 2.7.0
-		 *
-		 * @param int|string $new_status The new comment status.
-		 * @param int|string $old_status The old comment status.
-		 * @param object     $comment    The comment data.
-		 */
-		do_action( 'transition_comment_status', $new_status, $old_status, $comment );
-		/**
-		 * Fires when the comment status is in transition from one specific status to another.
-		 *
-		 * The dynamic portions of the hook name, `$old_status`, and `$new_status`,
-		 * refer to the old and new comment statuses, respectively.
-		 *
-		 * @since 2.7.0
-		 *
-		 * @param WP_Comment $comment Comment object.
-		 */
-		do_action( "comment_{$old_status}_to_{$new_status}", $comment );
-	}
-	/**
-	 * Fires when the status of a specific comment type is in transition.
-	 *
-	 * The dynamic portions of the hook name, `$new_status`, and `$comment->comment_type`,
-	 * refer to the new comment status, and the type of comment, respectively.
-	 *
-	 * Typical comment types include an empty string (standard comment), 'pingback',
-	 * or 'trackback'.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param int        $comment_ID The comment ID.
-	 * @param WP_Comment $comment    Comment object.
-	 */
-	do_action( "comment_{$new_status}_{$comment->comment_type}", $comment->comment_ID, $comment );
-}
-
-/**
- * Get current commenter's name, email, and URL.
- *
- * Expects cookies content to already be sanitized. User of this function might
- * wish to recheck the returned array for validity.
- *
- * @see sanitize_comment_cookies() Use to sanitize cookies
- *
- * @since 2.0.4
- *
- * @return array Comment author, email, url respectively.
- */
-function wp_get_current_commenter() {
-	// Cookies should already be sanitized.
-
-	$comment_author = '';
-	if ( isset($_COOKIE['comment_author_'.COOKIEHASH]) )
-		$comment_author = $_COOKIE['comment_author_'.COOKIEHASH];
-
-	$comment_author_email = '';
-	if ( isset($_COOKIE['comment_author_email_'.COOKIEHASH]) )
-		$comment_author_email = $_COOKIE['comment_author_email_'.COOKIEHASH];
-
-	$comment_author_url = '';
-	if ( isset($_COOKIE['comment_author_url_'.COOKIEHASH]) )
-		$comment_author_url = $_COOKIE['comment_author_url_'.COOKIEHASH];
-
-	/**
-	 * Filters the current commenter's name, email, and URL.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param array $comment_author_data {
-	 *     An array of current commenter variables.
-	 *
-	 *     @type string $comment_author       The name of the author of the comment. Default empty.
-	 *     @type string $comment_author_email The email address of the `$comment_author`. Default empty.
-	 *     @type string $comment_author_url   The URL address of the `$comment_author`. Default empty.
-	 * }
-	 */
-	return apply_filters( 'wp_get_current_commenter', compact('comment_author', 'comment_author_email', 'comment_author_url') );
-}
-
-/**
- * Inserts a comment into the database.
- *
- * @since 2.0.0
- * @since 4.4.0 Introduced `$comment_meta` argument.
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param array $commentdata {
- *     Array of arguments for inserting a new comment.
- *
- *     @type string     $comment_agent        The HTTP user agent of the `$comment_author` when
- *                                            the comment was submitted. Default empty.
- *     @type int|string $comment_approved     Whether the comment has been approved. Default 1.
- *     @type string     $comment_author       The name of the author of the comment. Default empty.
- *     @type string     $comment_author_email The email address of the `$comment_author`. Default empty.
- *     @type string     $comment_author_IP    The IP address of the `$comment_author`. Default empty.
- *     @type string     $comment_author_url   The URL address of the `$comment_author`. Default empty.
- *     @type string     $comment_content      The content of the comment. Default empty.
- *     @type string     $comment_date         The date the comment was submitted. To set the date
- *                                            manually, `$comment_date_gmt` must also be specified.
- *                                            Default is the current time.
- *     @type string     $comment_date_gmt     The date the comment was submitted in the GMT timezone.
- *                                            Default is `$comment_date` in the site's GMT timezone.
- *     @type int        $comment_karma        The karma of the comment. Default 0.
- *     @type int        $comment_parent       ID of this comment's parent, if any. Default 0.
- *     @type int        $comment_post_ID      ID of the post that relates to the comment, if any.
- *                                            Default 0.
- *     @type string     $comment_type         Comment type. Default empty.
- *     @type array      $comment_meta         Optional. Array of key/value pairs to be stored in commentmeta for the
- *                                            new comment.
- *     @type int        $user_id              ID of the user who submitted the comment. Default 0.
- * }
- * @return int|false The new comment's ID on success, false on failure.
- */
-function wp_insert_comment( $commentdata ) {
-	global $wpdb;
-	$data = wp_unslash( $commentdata );
-
-	$comment_author       = ! isset( $data['comment_author'] )       ? '' : $data['comment_author'];
-	$comment_author_email = ! isset( $data['comment_author_email'] ) ? '' : $data['comment_author_email'];
-	$comment_author_url   = ! isset( $data['comment_author_url'] )   ? '' : $data['comment_author_url'];
-	$comment_author_IP    = ! isset( $data['comment_author_IP'] )    ? '' : $data['comment_author_IP'];
-
-	$comment_date     = ! isset( $data['comment_date'] )     ? current_time( 'mysql' )            : $data['comment_date'];
-	$comment_date_gmt = ! isset( $data['comment_date_gmt'] ) ? get_gmt_from_date( $comment_date ) : $data['comment_date_gmt'];
-
-	$comment_post_ID  = ! isset( $data['comment_post_ID'] )  ? 0  : $data['comment_post_ID'];
-	$comment_content  = ! isset( $data['comment_content'] )  ? '' : $data['comment_content'];
-	$comment_karma    = ! isset( $data['comment_karma'] )    ? 0  : $data['comment_karma'];
-	$comment_approved = ! isset( $data['comment_approved'] ) ? 1  : $data['comment_approved'];
-	$comment_agent    = ! isset( $data['comment_agent'] )    ? '' : $data['comment_agent'];
-	$comment_type     = ! isset( $data['comment_type'] )     ? '' : $data['comment_type'];
-	$comment_parent   = ! isset( $data['comment_parent'] )   ? 0  : $data['comment_parent'];
-
-	$user_id  = ! isset( $data['user_id'] ) ? 0 : $data['user_id'];
-
-	$compacted = compact( 'comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_author_IP', 'comment_date', 'comment_date_gmt', 'comment_content', 'comment_karma', 'comment_approved', 'comment_agent', 'comment_type', 'comment_parent', 'user_id' );
-	if ( ! $wpdb->insert( $wpdb->comments, $compacted ) ) {
-		return false;
-	}
-
-	$id = (int) $wpdb->insert_id;
-
-	if ( $comment_approved == 1 ) {
-		wp_update_comment_count( $comment_post_ID );
-	}
-
-	clean_comment_cache( $id );
-
-	$comment = get_comment( $id );
-
-	// If metadata is provided, store it.
-	if ( isset( $commentdata['comment_meta'] ) && is_array( $commentdata['comment_meta'] ) ) {
-		foreach ( $commentdata['comment_meta'] as $meta_key => $meta_value ) {
-			add_comment_meta( $comment->comment_ID, $meta_key, $meta_value, true );
-		}
-	}
-
-	/**
-	 * Fires immediately after a comment is inserted into the database.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param int        $id      The comment ID.
-	 * @param WP_Comment $comment Comment object.
-	 */
-	do_action( 'wp_insert_comment', $id, $comment );
-
-	return $id;
-}
-
-/**
- * Filters and sanitizes comment data.
- *
- * Sets the comment data 'filtered' field to true when finished. This can be
- * checked as to whether the comment should be filtered and to keep from
- * filtering the same comment more than once.
- *
- * @since 2.0.0
- *
- * @param array $commentdata Contains information on the comment.
- * @return array Parsed comment information.
- */
-function wp_filter_comment($commentdata) {
-	if ( isset( $commentdata['user_ID'] ) ) {
-		/**
-		 * Filters the comment author's user id before it is set.
-		 *
-		 * The first time this filter is evaluated, 'user_ID' is checked
-		 * (for back-compat), followed by the standard 'user_id' value.
-		 *
-		 * @since 1.5.0
-		 *
-		 * @param int $user_ID The comment author's user ID.
-		 */
-		$commentdata['user_id'] = apply_filters( 'pre_user_id', $commentdata['user_ID'] );
-	} elseif ( isset( $commentdata['user_id'] ) ) {
-		/** This filter is documented in wp-includes/comment.php */
-		$commentdata['user_id'] = apply_filters( 'pre_user_id', $commentdata['user_id'] );
-	}
-
-	/**
-	 * Filters the comment author's browser user agent before it is set.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $comment_agent The comment author's browser user agent.
-	 */
-	$commentdata['comment_agent'] = apply_filters( 'pre_comment_user_agent', ( isset( $commentdata['comment_agent'] ) ? $commentdata['comment_agent'] : '' ) );
-	/** This filter is documented in wp-includes/comment.php */
-	$commentdata['comment_author'] = apply_filters( 'pre_comment_author_name', $commentdata['comment_author'] );
-	/**
-	 * Filters the comment content before it is set.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $comment_content The comment content.
-	 */
-	$commentdata['comment_content'] = apply_filters( 'pre_comment_content', $commentdata['comment_content'] );
-	/**
-	 * Filters the comment author's IP before it is set.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $comment_author_ip The comment author's IP.
-	 */
-	$commentdata['comment_author_IP'] = apply_filters( 'pre_comment_user_ip', $commentdata['comment_author_IP'] );
-	/** This filter is documented in wp-includes/comment.php */
-	$commentdata['comment_author_url'] = apply_filters( 'pre_comment_author_url', $commentdata['comment_author_url'] );
-	/** This filter is documented in wp-includes/comment.php */
-	$commentdata['comment_author_email'] = apply_filters( 'pre_comment_author_email', $commentdata['comment_author_email'] );
-	$commentdata['filtered'] = true;
-	return $commentdata;
-}
-
-/**
- * Whether a comment should be blocked because of comment flood.
- *
- * @since 2.1.0
- *
- * @param bool $block Whether plugin has already blocked comment.
- * @param int $time_lastcomment Timestamp for last comment.
- * @param int $time_newcomment Timestamp for new comment.
- * @return bool Whether comment should be blocked.
- */
-function wp_throttle_comment_flood($block, $time_lastcomment, $time_newcomment) {
-	if ( $block ) // a plugin has already blocked... we'll let that decision stand
-		return $block;
-	if ( ($time_newcomment - $time_lastcomment) < 15 )
-		return true;
-	return false;
-}
-
-/**
- * Adds a new comment to the database.
- *
- * Filters new comment to ensure that the fields are sanitized and valid before
- * inserting comment into database. Calls {@see 'comment_post'} action with comment ID
- * and whether comment is approved by WordPress. Also has {@see 'preprocess_comment'}
- * filter for processing the comment data before the function handles it.
- *
- * We use `REMOTE_ADDR` here directly. If you are behind a proxy, you should ensure
- * that it is properly set, such as in wp-config.php, for your environment.
- *
- * See {@link https://core.trac.wordpress.org/ticket/9235}
- *
- * @since 1.5.0
- * @since 4.3.0 'comment_agent' and 'comment_author_IP' can be set via `$commentdata`.
- *
- * @see wp_insert_comment()
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param array $commentdata {
- *     Comment data.
- *
- *     @type string $comment_author       The name of the comment author.
- *     @type string $comment_author_email The comment author email address.
- *     @type string $comment_author_url   The comment author URL.
- *     @type string $comment_content      The content of the comment.
- *     @type string $comment_date         The date the comment was submitted. Default is the current time.
- *     @type string $comment_date_gmt     The date the comment was submitted in the GMT timezone.
- *                                        Default is `$comment_date` in the GMT timezone.
- *     @type int    $comment_parent       The ID of this comment's parent, if any. Default 0.
- *     @type int    $comment_post_ID      The ID of the post that relates to the comment.
- *     @type int    $user_id              The ID of the user who submitted the comment. Default 0.
- *     @type int    $user_ID              Kept for backward-compatibility. Use `$user_id` instead.
- *     @type string $comment_agent        Comment author user agent. Default is the value of 'HTTP_USER_AGENT'
- *                                        in the `$_SERVER` superglobal sent in the original request.
- *     @type string $comment_author_IP    Comment author IP address in IPv4 format. Default is the value of
- *                                        'REMOTE_ADDR' in the `$_SERVER` superglobal sent in the original request.
- * }
- * @return int|false The ID of the comment on success, false on failure.
- */
-function wp_new_comment( $commentdata ) {
-	global $wpdb;
-
-	if ( isset( $commentdata['user_ID'] ) ) {
-		$commentdata['user_id'] = $commentdata['user_ID'] = (int) $commentdata['user_ID'];
-	}
-
-	$prefiltered_user_id = ( isset( $commentdata['user_id'] ) ) ? (int) $commentdata['user_id'] : 0;
-
-	/**
-	 * Filters a comment's data before it is sanitized and inserted into the database.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param array $commentdata Comment data.
-	 */
-	$commentdata = apply_filters( 'preprocess_comment', $commentdata );
-
-	$commentdata['comment_post_ID'] = (int) $commentdata['comment_post_ID'];
-	if ( isset( $commentdata['user_ID'] ) && $prefiltered_user_id !== (int) $commentdata['user_ID'] ) {
-		$commentdata['user_id'] = $commentdata['user_ID'] = (int) $commentdata['user_ID'];
-	} elseif ( isset( $commentdata['user_id'] ) ) {
-		$commentdata['user_id'] = (int) $commentdata['user_id'];
-	}
-
-	$commentdata['comment_parent'] = isset($commentdata['comment_parent']) ? absint($commentdata['comment_parent']) : 0;
-	$parent_status = ( 0 < $commentdata['comment_parent'] ) ? wp_get_comment_status($commentdata['comment_parent']) : '';
-	$commentdata['comment_parent'] = ( 'approved' == $parent_status || 'unapproved' == $parent_status ) ? $commentdata['comment_parent'] : 0;
-
-	if ( ! isset( $commentdata['comment_author_IP'] ) ) {
-		$commentdata['comment_author_IP'] = $_SERVER['REMOTE_ADDR'];
-	}
-	$commentdata['comment_author_IP'] = preg_replace( '/[^0-9a-fA-F:., ]/', '', $commentdata['comment_author_IP'] );
-
-	if ( ! isset( $commentdata['comment_agent'] ) ) {
-		$commentdata['comment_agent'] = isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT']: '';
-	}
-	$commentdata['comment_agent'] = substr( $commentdata['comment_agent'], 0, 254 );
-
-	if ( empty( $commentdata['comment_date'] ) ) {
-		$commentdata['comment_date'] = current_time('mysql');
-	}
-
-	if ( empty( $commentdata['comment_date_gmt'] ) ) {
-		$commentdata['comment_date_gmt'] = current_time( 'mysql', 1 );
-	}
-
-	$commentdata = wp_filter_comment($commentdata);
-
-	$commentdata['comment_approved'] = wp_allow_comment($commentdata);
-
-	$comment_ID = wp_insert_comment($commentdata);
-	if ( ! $comment_ID ) {
-		$fields = array( 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content' );
-
-		foreach ( $fields as $field ) {
-			if ( isset( $commentdata[ $field ] ) ) {
-				$commentdata[ $field ] = $wpdb->strip_invalid_text_for_column( $wpdb->comments, $field, $commentdata[ $field ] );
-			}
-		}
-
-		$commentdata = wp_filter_comment( $commentdata );
-
-		$commentdata['comment_approved'] = wp_allow_comment( $commentdata );
-
-		$comment_ID = wp_insert_comment( $commentdata );
-		if ( ! $comment_ID ) {
-			return false;
-		}
-	}
-
-	/**
-	 * Fires immediately after a comment is inserted into the database.
-	 *
-	 * @since 1.2.0
-	 * @since 4.5.0 The `$commentdata` parameter was added.
-	 *
-	 * @param int        $comment_ID       The comment ID.
-	 * @param int|string $comment_approved 1 if the comment is approved, 0 if not, 'spam' if spam.
-	 * @param array      $commentdata      Comment data.
-	 */
-	do_action( 'comment_post', $comment_ID, $commentdata['comment_approved'], $commentdata );
-
-	return $comment_ID;
-}
-
-/**
- * Send a comment moderation notification to the comment moderator.
- *
- * @since 4.4.0
- *
- * @param int $comment_ID ID of the comment.
- * @return bool True on success, false on failure.
- */
-function wp_new_comment_notify_moderator( $comment_ID ) {
-	$comment = get_comment( $comment_ID );
-
-	// Only send notifications for pending comments.
-	$maybe_notify = ( '0' == $comment->comment_approved );
-
-	/** This filter is documented in wp-includes/comment.php */
-	$maybe_notify = apply_filters( 'notify_moderator', $maybe_notify, $comment_ID );
-
-	if ( ! $maybe_notify ) {
-		return false;
-	}
-
-	return wp_notify_moderator( $comment_ID );
-}
-
-/**
- * Send a notification of a new comment to the post author.
- *
- * @since 4.4.0
- *
- * Uses the {@see 'notify_post_author'} filter to determine whether the post author
- * should be notified when a new comment is added, overriding site setting.
- *
- * @param int $comment_ID Comment ID.
- * @return bool True on success, false on failure.
- */
-function wp_new_comment_notify_postauthor( $comment_ID ) {
-	$comment = get_comment( $comment_ID );
-
-	$maybe_notify = get_option( 'comments_notify' );
-
-	/**
-	 * Filters whether to send the post author new comment notification emails,
-	 * overriding the site setting.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param bool $maybe_notify Whether to notify the post author about the new comment.
-	 * @param int  $comment_ID   The ID of the comment for the notification.
-	 */
-	$maybe_notify = apply_filters( 'notify_post_author', $maybe_notify, $comment_ID );
-
-	/*
-	 * wp_notify_postauthor() checks if notifying the author of their own comment.
-	 * By default, it won't, but filters can override this.
-	 */
-	if ( ! $maybe_notify ) {
-		return false;
-	}
-
-	// Only send notifications for approved comments.
-	if ( ! isset( $comment->comment_approved ) || '1' != $comment->comment_approved ) {
-		return false;
-	}
-
-	return wp_notify_postauthor( $comment_ID );
-}
-
-/**
- * Sets the status of a comment.
- *
- * The {@see 'wp_set_comment_status'} action is called after the comment is handled.
- * If the comment status is not in the list, then false is returned.
- *
- * @since 1.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int|WP_Comment $comment_id     Comment ID or WP_Comment object.
- * @param string         $comment_status New comment status, either 'hold', 'approve', 'spam', or 'trash'.
- * @param bool           $wp_error       Whether to return a WP_Error object if there is a failure. Default is false.
- * @return bool|WP_Error True on success, false or WP_Error on failure.
- */
-function wp_set_comment_status($comment_id, $comment_status, $wp_error = false) {
-	global $wpdb;
-
-	switch ( $comment_status ) {
-		case 'hold':
-		case '0':
-			$status = '0';
-			break;
-		case 'approve':
-		case '1':
-			$status = '1';
-			add_action( 'wp_set_comment_status', 'wp_new_comment_notify_postauthor' );
-			break;
-		case 'spam':
-			$status = 'spam';
-			break;
-		case 'trash':
-			$status = 'trash';
-			break;
-		default:
-			return false;
-	}
-
-	$comment_old = clone get_comment($comment_id);
-
-	if ( !$wpdb->update( $wpdb->comments, array('comment_approved' => $status), array( 'comment_ID' => $comment_old->comment_ID ) ) ) {
-		if ( $wp_error )
-			return new WP_Error('db_update_error', __('Could not update comment status'), $wpdb->last_error);
-		else
-			return false;
-	}
-
-	clean_comment_cache( $comment_old->comment_ID );
-
-	$comment = get_comment( $comment_old->comment_ID );
-
-	/**
-	 * Fires immediately before transitioning a comment's status from one to another
-	 * in the database.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param int         $comment_id     Comment ID.
-	 * @param string|bool $comment_status Current comment status. Possible values include
-	 *                                    'hold', 'approve', 'spam', 'trash', or false.
-	 */
-	do_action( 'wp_set_comment_status', $comment->comment_ID, $comment_status );
-
-	wp_transition_comment_status($comment_status, $comment_old->comment_approved, $comment);
-
-	wp_update_comment_count($comment->comment_post_ID);
-
-	return true;
-}
-
-/**
- * Updates an existing comment in the database.
- *
- * Filters the comment and makes sure certain fields are valid before updating.
- *
- * @since 2.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param array $commentarr Contains information on the comment.
- * @return int Comment was updated if value is 1, or was not updated if value is 0.
- */
-function wp_update_comment($commentarr) {
-	global $wpdb;
-
-	// First, get all of the original fields
-	$comment = get_comment($commentarr['comment_ID'], ARRAY_A);
-	if ( empty( $comment ) ) {
-		return 0;
-	}
-
-	// Make sure that the comment post ID is valid (if specified).
-	if ( ! empty( $commentarr['comment_post_ID'] ) && ! get_post( $commentarr['comment_post_ID'] ) ) {
-		return 0;
-	}
-
-	// Escape data pulled from DB.
-	$comment = wp_slash($comment);
-
-	$old_status = $comment['comment_approved'];
-
-	// Merge old and new fields with new fields overwriting old ones.
-	$commentarr = array_merge($comment, $commentarr);
-
-	$commentarr = wp_filter_comment( $commentarr );
-
-	// Now extract the merged array.
-	$data = wp_unslash( $commentarr );
-
-	/**
-	 * Filters the comment content before it is updated in the database.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $comment_content The comment data.
-	 */
-	$data['comment_content'] = apply_filters( 'comment_save_pre', $data['comment_content'] );
-
-	$data['comment_date_gmt'] = get_gmt_from_date( $data['comment_date'] );
-
-	if ( ! isset( $data['comment_approved'] ) ) {
-		$data['comment_approved'] = 1;
-	} elseif ( 'hold' == $data['comment_approved'] ) {
-		$data['comment_approved'] = 0;
-	} elseif ( 'approve' == $data['comment_approved'] ) {
-		$data['comment_approved'] = 1;
-	}
-
-	$comment_ID = $data['comment_ID'];
-	$comment_post_ID = $data['comment_post_ID'];
-	$keys = array( 'comment_post_ID', 'comment_content', 'comment_author', 'comment_author_email', 'comment_approved', 'comment_karma', 'comment_author_url', 'comment_date', 'comment_date_gmt', 'comment_type', 'comment_parent', 'user_id', 'comment_agent', 'comment_author_IP' );
-	$data = wp_array_slice_assoc( $data, $keys );
-	$rval = $wpdb->update( $wpdb->comments, $data, compact( 'comment_ID' ) );
-
-	clean_comment_cache( $comment_ID );
-	wp_update_comment_count( $comment_post_ID );
-	/**
-	 * Fires immediately after a comment is updated in the database.
-	 *
-	 * The hook also fires immediately before comment status transition hooks are fired.
-	 *
-	 * @since 1.2.0
-	 * @since 4.6.0 Added the `$data` parameter.
-	 *
-	 * @param int   $comment_ID The comment ID.
-	 * @param array $data       Comment data.
-	 */
-	do_action( 'edit_comment', $comment_ID, $data );
-	$comment = get_comment($comment_ID);
-	wp_transition_comment_status($comment->comment_approved, $old_status, $comment);
-	return $rval;
-}
-
-/**
- * Whether to defer comment counting.
- *
- * When setting $defer to true, all post comment counts will not be updated
- * until $defer is set to false. When $defer is set to false, then all
- * previously deferred updated post comment counts will then be automatically
- * updated without having to call wp_update_comment_count() after.
- *
- * @since 2.5.0
- * @staticvar bool $_defer
- *
- * @param bool $defer
- * @return bool
- */
-function wp_defer_comment_counting($defer=null) {
-	static $_defer = false;
-
-	if ( is_bool($defer) ) {
-		$_defer = $defer;
-		// flush any deferred counts
-		if ( !$defer )
-			wp_update_comment_count( null, true );
-	}
-
-	return $_defer;
-}
-
-/**
- * Updates the comment count for post(s).
- *
- * When $do_deferred is false (is by default) and the comments have been set to
- * be deferred, the post_id will be added to a queue, which will be updated at a
- * later date and only updated once per post ID.
- *
- * If the comments have not be set up to be deferred, then the post will be
- * updated. When $do_deferred is set to true, then all previous deferred post
- * IDs will be updated along with the current $post_id.
- *
- * @since 2.1.0
- * @see wp_update_comment_count_now() For what could cause a false return value
- *
- * @staticvar array $_deferred
- *
- * @param int|null $post_id     Post ID.
- * @param bool     $do_deferred Optional. Whether to process previously deferred
- *                              post comment counts. Default false.
- * @return bool|void True on success, false on failure or if post with ID does
- *                   not exist.
- */
-function wp_update_comment_count($post_id, $do_deferred=false) {
-	static $_deferred = array();
-
-	if ( empty( $post_id ) && ! $do_deferred ) {
-		return false;
-	}
-
-	if ( $do_deferred ) {
-		$_deferred = array_unique($_deferred);
-		foreach ( $_deferred as $i => $_post_id ) {
-			wp_update_comment_count_now($_post_id);
-			unset( $_deferred[$i] ); /** @todo Move this outside of the foreach and reset $_deferred to an array instead */
-		}
-	}
-
-	if ( wp_defer_comment_counting() ) {
-		$_deferred[] = $post_id;
-		return true;
-	}
-	elseif ( $post_id ) {
-		return wp_update_comment_count_now($post_id);
-	}
-
-}
-
-/**
- * Updates the comment count for the post.
- *
- * @since 2.5.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int $post_id Post ID
- * @return bool True on success, false on '0' $post_id or if post with ID does not exist.
- */
-function wp_update_comment_count_now($post_id) {
-	global $wpdb;
-	$post_id = (int) $post_id;
-	if ( !$post_id )
-		return false;
-
-	wp_cache_delete( 'comments-0', 'counts' );
-	wp_cache_delete( "comments-{$post_id}", 'counts' );
-
-	if ( !$post = get_post($post_id) )
-		return false;
-
-	$old = (int) $post->comment_count;
-
-	/**
-	 * Filters a post's comment count before it is updated in the database.
-	 *
-	 * @since 4.5.0
-	 *
-	 * @param int $new     The new comment count. Default null.
-	 * @param int $old     The old comment count.
-	 * @param int $post_id Post ID.
-	 */
-	$new = apply_filters( 'pre_wp_update_comment_count_now', null, $old, $post_id );
-
-	if ( is_null( $new ) ) {
-		$new = (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved = '1'", $post_id ) );
-	} else {
-		$new = (int) $new;
-	}
-
-	$wpdb->update( $wpdb->posts, array('comment_count' => $new), array('ID' => $post_id) );
-
-	clean_post_cache( $post );
-
-	/**
-	 * Fires immediately after a post's comment count is updated in the database.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param int $post_id Post ID.
-	 * @param int $new     The new comment count.
-	 * @param int $old     The old comment count.
-	 */
-	do_action( 'wp_update_comment_count', $post_id, $new, $old );
-	/** This action is documented in wp-includes/post.php */
-	do_action( 'edit_post', $post_id, $post );
-
-	return true;
-}
-
-//
-// Ping and trackback functions.
-//
-
-/**
- * Finds a pingback server URI based on the given URL.
- *
- * Checks the HTML for the rel="pingback" link and x-pingback headers. It does
- * a check for the x-pingback headers first and returns that, if available. The
- * check for the rel="pingback" has more overhead than just the header.
- *
- * @since 1.5.0
- *
- * @param string $url URL to ping.
- * @param int $deprecated Not Used.
- * @return false|string False on failure, string containing URI on success.
- */
-function discover_pingback_server_uri( $url, $deprecated = '' ) {
-	if ( !empty( $deprecated ) )
-		_deprecated_argument( __FUNCTION__, '2.7.0' );
-
-	$pingback_str_dquote = 'rel="pingback"';
-	$pingback_str_squote = 'rel=\'pingback\'';
-
-	/** @todo Should use Filter Extension or custom preg_match instead. */
-	$parsed_url = parse_url($url);
-
-	if ( ! isset( $parsed_url['host'] ) ) // Not a URL. This should never happen.
-		return false;
-
-	//Do not search for a pingback server on our own uploads
-	$uploads_dir = wp_get_upload_dir();
-	if ( 0 === strpos($url, $uploads_dir['baseurl']) )
-		return false;
-
-	$response = wp_safe_remote_head( $url, array( 'timeout' => 2, 'httpversion' => '1.0' ) );
-
-	if ( is_wp_error( $response ) )
-		return false;
-
-	if ( wp_remote_retrieve_header( $response, 'x-pingback' ) )
-		return wp_remote_retrieve_header( $response, 'x-pingback' );
-
-	// Not an (x)html, sgml, or xml page, no use going further.
-	if ( preg_match('#(image|audio|video|model)/#is', wp_remote_retrieve_header( $response, 'content-type' )) )
-		return false;
-
-	// Now do a GET since we're going to look in the html headers (and we're sure it's not a binary file)
-	$response = wp_safe_remote_get( $url, array( 'timeout' => 2, 'httpversion' => '1.0' ) );
-
-	if ( is_wp_error( $response ) )
-		return false;
-
-	$contents = wp_remote_retrieve_body( $response );
-
-	$pingback_link_offset_dquote = strpos($contents, $pingback_str_dquote);
-	$pingback_link_offset_squote = strpos($contents, $pingback_str_squote);
-	if ( $pingback_link_offset_dquote || $pingback_link_offset_squote ) {
-		$quote = ($pingback_link_offset_dquote) ? '"' : '\'';
-		$pingback_link_offset = ($quote=='"') ? $pingback_link_offset_dquote : $pingback_link_offset_squote;
-		$pingback_href_pos = @strpos($contents, 'href=', $pingback_link_offset);
-		$pingback_href_start = $pingback_href_pos+6;
-		$pingback_href_end = @strpos($contents, $quote, $pingback_href_start);
-		$pingback_server_url_len = $pingback_href_end - $pingback_href_start;
-		$pingback_server_url = substr($contents, $pingback_href_start, $pingback_server_url_len);
-
-		// We may find rel="pingback" but an incomplete pingback URL
-		if ( $pingback_server_url_len > 0 ) { // We got it!
-			return $pingback_server_url;
-		}
-	}
-
-	return false;
-}
-
-/**
- * Perform all pingbacks, enclosures, trackbacks, and send to pingback services.
- *
- * @since 2.1.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- */
-function do_all_pings() {
-	global $wpdb;
-
-	// Do pingbacks
-	while ($ping = $wpdb->get_row("SELECT ID, post_content, meta_id FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_pingme' LIMIT 1")) {
-		delete_metadata_by_mid( 'post', $ping->meta_id );
-		pingback( $ping->post_content, $ping->ID );
-	}
-
-	// Do Enclosures
-	while ($enclosure = $wpdb->get_row("SELECT ID, post_content, meta_id FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_encloseme' LIMIT 1")) {
-		delete_metadata_by_mid( 'post', $enclosure->meta_id );
-		do_enclose( $enclosure->post_content, $enclosure->ID );
-	}
-
-	// Do Trackbacks
-	$trackbacks = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE to_ping <> '' AND post_status = 'publish'");
-	if ( is_array($trackbacks) )
-		foreach ( $trackbacks as $trackback )
-			do_trackbacks($trackback);
-
-	//Do Update Services/Generic Pings
-	generic_ping();
-}
-
-/**
- * Perform trackbacks.
- *
- * @since 1.5.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int $post_id Post ID to do trackbacks on.
- */
-function do_trackbacks($post_id) {
-	global $wpdb;
-
-	$post = get_post( $post_id );
-	$to_ping = get_to_ping($post_id);
-	$pinged  = get_pung($post_id);
-	if ( empty($to_ping) ) {
-		$wpdb->update($wpdb->posts, array('to_ping' => ''), array('ID' => $post_id) );
-		return;
-	}
-
-	if ( empty($post->post_excerpt) ) {
-		/** This filter is documented in wp-includes/post-template.php */
-		$excerpt = apply_filters( 'the_content', $post->post_content, $post->ID );
-	} else {
-		/** This filter is documented in wp-includes/post-template.php */
-		$excerpt = apply_filters( 'the_excerpt', $post->post_excerpt );
-	}
-
-	$excerpt = str_replace(']]>', ']]&gt;', $excerpt);
-	$excerpt = wp_html_excerpt($excerpt, 252, '&#8230;');
-
-	/** This filter is documented in wp-includes/post-template.php */
-	$post_title = apply_filters( 'the_title', $post->post_title, $post->ID );
-	$post_title = strip_tags($post_title);
-
-	if ( $to_ping ) {
-		foreach ( (array) $to_ping as $tb_ping ) {
-			$tb_ping = trim($tb_ping);
-			if ( !in_array($tb_ping, $pinged) ) {
-				trackback($tb_ping, $post_title, $excerpt, $post_id);
-				$pinged[] = $tb_ping;
-			} else {
-				$wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, %s, '')) WHERE ID = %d", $tb_ping, $post_id) );
-			}
-		}
-	}
-}
-
-/**
- * Sends pings to all of the ping site services.
- *
- * @since 1.2.0
- *
- * @param int $post_id Post ID.
- * @return int Same as Post ID from parameter
- */
-function generic_ping( $post_id = 0 ) {
-	$services = get_option('ping_sites');
-
-	$services = explode("\n", $services);
-	foreach ( (array) $services as $service ) {
-		$service = trim($service);
-		if ( '' != $service )
-			weblog_ping($service);
-	}
-
-	return $post_id;
-}
-
-/**
- * Pings back the links found in a post.
- *
- * @since 0.71
- *
- * @param string $content Post content to check for links.
- * @param int $post_ID Post ID.
- */
-function pingback($content, $post_ID) {
-	include_once( ABSPATH . WPINC . '/class-IXR.php' );
-	include_once( ABSPATH . WPINC . '/class-wp-http-ixr-client.php' );
-
-	// original code by Mort (http://mort.mine.nu:8080)
-	$post_links = array();
-
-	$pung = get_pung($post_ID);
-
-	// Step 1
-	// Parsing the post, external links (if any) are stored in the $post_links array
-	$post_links_temp = wp_extract_urls( $content );
-
-	// Step 2.
-	// Walking thru the links array
-	// first we get rid of links pointing to sites, not to specific files
-	// Example:
-	// http://dummy-weblog.org
-	// http://dummy-weblog.org/
-	// http://dummy-weblog.org/post.php
-	// We don't wanna ping first and second types, even if they have a valid <link/>
-
-	foreach ( (array) $post_links_temp as $link_test ) :
-		if ( !in_array($link_test, $pung) && (url_to_postid($link_test) != $post_ID) // If we haven't pung it already and it isn't a link to itself
-				&& !is_local_attachment($link_test) ) : // Also, let's never ping local attachments.
-			if ( $test = @parse_url($link_test) ) {
-				if ( isset($test['query']) )
-					$post_links[] = $link_test;
-				elseif ( isset( $test['path'] ) && ( $test['path'] != '/' ) && ( $test['path'] != '' ) )
-					$post_links[] = $link_test;
-			}
-		endif;
-	endforeach;
-
-	$post_links = array_unique( $post_links );
-	/**
-	 * Fires just before pinging back links found in a post.
-	 *
-	 * @since 2.0.0
-	 *
-	 * @param array &$post_links An array of post links to be checked, passed by reference.
-	 * @param array &$pung       Whether a link has already been pinged, passed by reference.
-	 * @param int   $post_ID     The post ID.
-	 */
-	do_action_ref_array( 'pre_ping', array( &$post_links, &$pung, $post_ID ) );
-
-	foreach ( (array) $post_links as $pagelinkedto ) {
-		$pingback_server_url = discover_pingback_server_uri( $pagelinkedto );
-
-		if ( $pingback_server_url ) {
-			@ set_time_limit( 60 );
-			// Now, the RPC call
-			$pagelinkedfrom = get_permalink($post_ID);
-
-			// using a timeout of 3 seconds should be enough to cover slow servers
-			$client = new WP_HTTP_IXR_Client($pingback_server_url);
-			$client->timeout = 3;
-			/**
-			 * Filters the user agent sent when pinging-back a URL.
-			 *
-			 * @since 2.9.0
-			 *
-			 * @param string $concat_useragent    The user agent concatenated with ' -- WordPress/'
-			 *                                    and the WordPress version.
-			 * @param string $useragent           The useragent.
-			 * @param string $pingback_server_url The server URL being linked to.
-			 * @param string $pagelinkedto        URL of page linked to.
-			 * @param string $pagelinkedfrom      URL of page linked from.
-			 */
-			$client->useragent = apply_filters( 'pingback_useragent', $client->useragent . ' -- WordPress/' . get_bloginfo( 'version' ), $client->useragent, $pingback_server_url, $pagelinkedto, $pagelinkedfrom );
-			// when set to true, this outputs debug messages by itself
-			$client->debug = false;
-
-			if ( $client->query('pingback.ping', $pagelinkedfrom, $pagelinkedto) || ( isset($client->error->code) && 48 == $client->error->code ) ) // Already registered
-				add_ping( $post_ID, $pagelinkedto );
-		}
-	}
-}
-
-/**
- * Check whether blog is public before returning sites.
- *
- * @since 2.1.0
- *
- * @param mixed $sites Will return if blog is public, will not return if not public.
- * @return mixed Empty string if blog is not public, returns $sites, if site is public.
- */
-function privacy_ping_filter($sites) {
-	if ( '0' != get_option('blog_public') )
-		return $sites;
-	else
-		return '';
-}
-
-/**
- * Send a Trackback.
- *
- * Updates database when sending trackback to prevent duplicates.
- *
- * @since 0.71
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $trackback_url URL to send trackbacks.
- * @param string $title Title of post.
- * @param string $excerpt Excerpt of post.
- * @param int $ID Post ID.
- * @return int|false|void Database query from update.
- */
-function trackback($trackback_url, $title, $excerpt, $ID) {
-	global $wpdb;
-
-	if ( empty($trackback_url) )
-		return;
-
-	$options = array();
-	$options['timeout'] = 10;
-	$options['body'] = array(
-		'title' => $title,
-		'url' => get_permalink($ID),
-		'blog_name' => get_option('blogname'),
-		'excerpt' => $excerpt
-	);
-
-	$response = wp_safe_remote_post( $trackback_url, $options );
-
-	if ( is_wp_error( $response ) )
-		return;
-
-	$wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET pinged = CONCAT(pinged, '\n', %s) WHERE ID = %d", $trackback_url, $ID) );
-	return $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, %s, '')) WHERE ID = %d", $trackback_url, $ID) );
-}
-
-/**
- * Send a pingback.
- *
- * @since 1.2.0
- *
- * @param string $server Host of blog to connect to.
- * @param string $path Path to send the ping.
- */
-function weblog_ping($server = '', $path = '') {
-	include_once( ABSPATH . WPINC . '/class-IXR.php' );
-	include_once( ABSPATH . WPINC . '/class-wp-http-ixr-client.php' );
-
-	// using a timeout of 3 seconds should be enough to cover slow servers
-	$client = new WP_HTTP_IXR_Client($server, ((!strlen(trim($path)) || ('/' == $path)) ? false : $path));
-	$client->timeout = 3;
-	$client->useragent .= ' -- WordPress/' . get_bloginfo( 'version' );
-
-	// when set to true, this outputs debug messages by itself
-	$client->debug = false;
-	$home = trailingslashit( home_url() );
-	if ( !$client->query('weblogUpdates.extendedPing', get_option('blogname'), $home, get_bloginfo('rss2_url') ) ) // then try a normal ping
-		$client->query('weblogUpdates.ping', get_option('blogname'), $home);
-}
-
-/**
- * Default filter attached to pingback_ping_source_uri to validate the pingback's Source URI
- *
- * @since 3.5.1
- * @see wp_http_validate_url()
- *
- * @param string $source_uri
- * @return string
- */
-function pingback_ping_source_uri( $source_uri ) {
-	return (string) wp_http_validate_url( $source_uri );
-}
-
-/**
- * Default filter attached to xmlrpc_pingback_error.
- *
- * Returns a generic pingback error code unless the error code is 48,
- * which reports that the pingback is already registered.
- *
- * @since 3.5.1
- * @link https://www.hixie.ch/specs/pingback/pingback#TOC3
- *
- * @param IXR_Error $ixr_error
- * @return IXR_Error
- */
-function xmlrpc_pingback_error( $ixr_error ) {
-	if ( $ixr_error->code === 48 )
-		return $ixr_error;
-	return new IXR_Error( 0, '' );
-}
-
-//
-// Cache
-//
-
-/**
- * Removes a comment from the object cache.
- *
- * @since 2.3.0
- *
- * @param int|array $ids Comment ID or an array of comment IDs to remove from cache.
- */
-function clean_comment_cache($ids) {
-	foreach ( (array) $ids as $id ) {
-		wp_cache_delete( $id, 'comment' );
-
-		/**
-		 * Fires immediately after a comment has been removed from the object cache.
-		 *
-		 * @since 4.5.0
-		 *
-		 * @param int $id Comment ID.
-		 */
-		do_action( 'clean_comment_cache', $id );
-	}
-
-	wp_cache_set( 'last_changed', microtime(), 'comment' );
-}
-
-/**
- * Updates the comment cache of given comments.
- *
- * Will add the comments in $comments to the cache. If comment ID already exists
- * in the comment cache then it will not be updated. The comment is added to the
- * cache using the comment group with the key using the ID of the comments.
- *
- * @since 2.3.0
- * @since 4.4.0 Introduced the `$update_meta_cache` parameter.
- *
- * @param array $comments          Array of comment row objects
- * @param bool  $update_meta_cache Whether to update commentmeta cache. Default true.
- */
-function update_comment_cache( $comments, $update_meta_cache = true ) {
-	foreach ( (array) $comments as $comment )
-		wp_cache_add($comment->comment_ID, $comment, 'comment');
-
-	if ( $update_meta_cache ) {
-		// Avoid `wp_list_pluck()` in case `$comments` is passed by reference.
-		$comment_ids = array();
-		foreach ( $comments as $comment ) {
-			$comment_ids[] = $comment->comment_ID;
-		}
-		update_meta_cache( 'comment', $comment_ids );
-	}
-}
-
-/**
- * Adds any comments from the given IDs to the cache that do not already exist in cache.
- *
- * @since 4.4.0
- * @access private
- *
- * @see update_comment_cache()
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param array $comment_ids       Array of comment IDs.
- * @param bool  $update_meta_cache Optional. Whether to update the meta cache. Default true.
- */
-function _prime_comment_caches( $comment_ids, $update_meta_cache = true ) {
-	global $wpdb;
-
-	$non_cached_ids = _get_non_cached_ids( $comment_ids, 'comment' );
-	if ( !empty( $non_cached_ids ) ) {
-		$fresh_comments = $wpdb->get_results( sprintf( "SELECT $wpdb->comments.* FROM $wpdb->comments WHERE comment_ID IN (%s)", join( ",", array_map( 'intval', $non_cached_ids ) ) ) );
-
-		update_comment_cache( $fresh_comments, $update_meta_cache );
-	}
-}
-
-//
-// Internal
-//
-
-/**
- * Close comments on old posts on the fly, without any extra DB queries. Hooked to the_posts.
- *
- * @access private
- * @since 2.7.0
- *
- * @param WP_Post  $posts Post data object.
- * @param WP_Query $query Query object.
- * @return array
- */
-function _close_comments_for_old_posts( $posts, $query ) {
-	if ( empty( $posts ) || ! $query->is_singular() || ! get_option( 'close_comments_for_old_posts' ) )
-		return $posts;
-
-	/**
-	 * Filters the list of post types to automatically close comments for.
-	 *
-	 * @since 3.2.0
-	 *
-	 * @param array $post_types An array of registered post types. Default array with 'post'.
-	 */
-	$post_types = apply_filters( 'close_comments_for_post_types', array( 'post' ) );
-	if ( ! in_array( $posts[0]->post_type, $post_types ) )
-		return $posts;
-
-	$days_old = (int) get_option( 'close_comments_days_old' );
-	if ( ! $days_old )
-		return $posts;
-
-	if ( time() - strtotime( $posts[0]->post_date_gmt ) > ( $days_old * DAY_IN_SECONDS ) ) {
-		$posts[0]->comment_status = 'closed';
-		$posts[0]->ping_status = 'closed';
-	}
-
-	return $posts;
-}
-
-/**
- * Close comments on an old post. Hooked to comments_open and pings_open.
- *
- * @access private
- * @since 2.7.0
- *
- * @param bool $open Comments open or closed
- * @param int $post_id Post ID
- * @return bool $open
- */
-function _close_comments_for_old_post( $open, $post_id ) {
-	if ( ! $open )
-		return $open;
-
-	if ( !get_option('close_comments_for_old_posts') )
-		return $open;
-
-	$days_old = (int) get_option('close_comments_days_old');
-	if ( !$days_old )
-		return $open;
-
-	$post = get_post($post_id);
-
-	/** This filter is documented in wp-includes/comment.php */
-	$post_types = apply_filters( 'close_comments_for_post_types', array( 'post' ) );
-	if ( ! in_array( $post->post_type, $post_types ) )
-		return $open;
-
-	// Undated drafts should not show up as comments closed.
-	if ( '0000-00-00 00:00:00' === $post->post_date_gmt ) {
-		return $open;
-	}
-
-	if ( time() - strtotime( $post->post_date_gmt ) > ( $days_old * DAY_IN_SECONDS ) )
-		return false;
-
-	return $open;
-}
-
-/**
- * Handles the submission of a comment, usually posted to wp-comments-post.php via a comment form.
- *
- * This function expects unslashed data, as opposed to functions such as `wp_new_comment()` which
- * expect slashed data.
- *
- * @since 4.4.0
- *
- * @param array $comment_data {
- *     Comment data.
- *
- *     @type string|int $comment_post_ID             The ID of the post that relates to the comment.
- *     @type string     $author                      The name of the comment author.
- *     @type string     $email                       The comment author email address.
- *     @type string     $url                         The comment author URL.
- *     @type string     $comment                     The content of the comment.
- *     @type string|int $comment_parent              The ID of this comment's parent, if any. Default 0.
- *     @type string     $_wp_unfiltered_html_comment The nonce value for allowing unfiltered HTML.
- * }
- * @return WP_Comment|WP_Error A WP_Comment object on success, a WP_Error object on failure.
- */
-function wp_handle_comment_submission( $comment_data ) {
-
-	$comment_post_ID = $comment_parent = 0;
-	$comment_author = $comment_author_email = $comment_author_url = $comment_content = null;
-
-	if ( isset( $comment_data['comment_post_ID'] ) ) {
-		$comment_post_ID = (int) $comment_data['comment_post_ID'];
-	}
-	if ( isset( $comment_data['author'] ) && is_string( $comment_data['author'] ) ) {
-		$comment_author = trim( strip_tags( $comment_data['author'] ) );
-	}
-	if ( isset( $comment_data['email'] ) && is_string( $comment_data['email'] ) ) {
-		$comment_author_email = trim( $comment_data['email'] );
-	}
-	if ( isset( $comment_data['url'] ) && is_string( $comment_data['url'] ) ) {
-		$comment_author_url = trim( $comment_data['url'] );
-	}
-	if ( isset( $comment_data['comment'] ) && is_string( $comment_data['comment'] ) ) {
-		$comment_content = trim( $comment_data['comment'] );
-	}
-	if ( isset( $comment_data['comment_parent'] ) ) {
-		$comment_parent = absint( $comment_data['comment_parent'] );
-	}
-
-	$post = get_post( $comment_post_ID );
-
-	if ( empty( $post->comment_status ) ) {
-
-		/**
-		 * Fires when a comment is attempted on a post that does not exist.
-		 *
-		 * @since 1.5.0
-		 *
-		 * @param int $comment_post_ID Post ID.
-		 */
-		do_action( 'comment_id_not_found', $comment_post_ID );
-
-		return new WP_Error( 'comment_id_not_found' );
-
-	}
-
-	// get_post_status() will get the parent status for attachments.
-	$status = get_post_status( $post );
-
-	if ( ( 'private' == $status ) && ! current_user_can( 'read_post', $comment_post_ID ) ) {
-		return new WP_Error( 'comment_id_not_found' );
-	}
-
-	$status_obj = get_post_status_object( $status );
-
-	if ( ! comments_open( $comment_post_ID ) ) {
-
-		/**
-		 * Fires when a comment is attempted on a post that has comments closed.
-		 *
-		 * @since 1.5.0
-		 *
-		 * @param int $comment_post_ID Post ID.
-		 */
-		do_action( 'comment_closed', $comment_post_ID );
-
-		return new WP_Error( 'comment_closed', __( 'Sorry, comments are closed for this item.' ), 403 );
-
-	} elseif ( 'trash' == $status ) {
-
-		/**
-		 * Fires when a comment is attempted on a trashed post.
-		 *
-		 * @since 2.9.0
-		 *
-		 * @param int $comment_post_ID Post ID.
-		 */
-		do_action( 'comment_on_trash', $comment_post_ID );
-
-		return new WP_Error( 'comment_on_trash' );
-
-	} elseif ( ! $status_obj->public && ! $status_obj->private ) {
-
-		/**
-		 * Fires when a comment is attempted on a post in draft mode.
-		 *
-		 * @since 1.5.1
-		 *
-		 * @param int $comment_post_ID Post ID.
-		 */
-		do_action( 'comment_on_draft', $comment_post_ID );
-
-		return new WP_Error( 'comment_on_draft' );
-
-	} elseif ( post_password_required( $comment_post_ID ) ) {
-
-		/**
-		 * Fires when a comment is attempted on a password-protected post.
-		 *
-		 * @since 2.9.0
-		 *
-		 * @param int $comment_post_ID Post ID.
-		 */
-		do_action( 'comment_on_password_protected', $comment_post_ID );
-
-		return new WP_Error( 'comment_on_password_protected' );
-
-	} else {
-
-		/**
-		 * Fires before a comment is posted.
-		 *
-		 * @since 2.8.0
-		 *
-		 * @param int $comment_post_ID Post ID.
-		 */
-		do_action( 'pre_comment_on_post', $comment_post_ID );
-
-	}
-
-	// If the user is logged in
-	$user = wp_get_current_user();
-	if ( $user->exists() ) {
-		if ( empty( $user->display_name ) ) {
-			$user->display_name=$user->user_login;
-		}
-		$comment_author       = $user->display_name;
-		$comment_author_email = $user->user_email;
-		$comment_author_url   = $user->user_url;
-		$user_ID              = $user->ID;
-		if ( current_user_can( 'unfiltered_html' ) ) {
-			if ( ! isset( $comment_data['_wp_unfiltered_html_comment'] )
-				|| ! wp_verify_nonce( $comment_data['_wp_unfiltered_html_comment'], 'unfiltered-html-comment_' . $comment_post_ID )
-			) {
-				kses_remove_filters(); // start with a clean slate
-				kses_init_filters(); // set up the filters
-			}
-		}
-	} else {
-		if ( get_option( 'comment_registration' ) ) {
-			return new WP_Error( 'not_logged_in', __( 'Sorry, you must be logged in to post a comment.' ), 403 );
-		}
-	}
-
-	$comment_type = '';
-	$max_lengths = wp_get_comment_fields_max_lengths();
-
-	if ( get_option( 'require_name_email' ) && ! $user->exists() ) {
-		if ( 6 > strlen( $comment_author_email ) || '' == $comment_author ) {
-			return new WP_Error( 'require_name_email', __( '<strong>ERROR</strong>: please fill the required fields (name, email).' ), 200 );
-		} elseif ( ! is_email( $comment_author_email ) ) {
-			return new WP_Error( 'require_valid_email', __( '<strong>ERROR</strong>: please enter a valid email address.' ), 200 );
-		}
-	}
-
-	if ( isset( $comment_author ) && $max_lengths['comment_author'] < mb_strlen( $comment_author, '8bit' ) ) {
-		return new WP_Error( 'comment_author_column_length', __( '<strong>ERROR</strong>: your name is too long.' ), 200 );
-	}
-
-	if ( isset( $comment_author_email ) && $max_lengths['comment_author_email'] < strlen( $comment_author_email ) ) {
-		return new WP_Error( 'comment_author_email_column_length', __( '<strong>ERROR</strong>: your email address is too long.' ), 200 );
-	}
-
-	if ( isset( $comment_author_url ) && $max_lengths['comment_author_url'] < strlen( $comment_author_url ) ) {
-		return new WP_Error( 'comment_author_url_column_length', __( '<strong>ERROR</strong>: your url is too long.' ), 200 );
-	}
-
-	if ( '' == $comment_content ) {
-		return new WP_Error( 'require_valid_comment', __( '<strong>ERROR</strong>: please type a comment.' ), 200 );
-	} elseif ( $max_lengths['comment_content'] < mb_strlen( $comment_content, '8bit' ) ) {
-		return new WP_Error( 'comment_content_column_length', __( '<strong>ERROR</strong>: your comment is too long.' ), 200 );
-	}
-
-	$commentdata = compact(
-		'comment_post_ID',
-		'comment_author',
-		'comment_author_email',
-		'comment_author_url',
-		'comment_content',
-		'comment_type',
-		'comment_parent',
-		'user_ID'
-	);
-
-	$comment_id = wp_new_comment( wp_slash( $commentdata ) );
-	if ( ! $comment_id ) {
-		return new WP_Error( 'comment_save_error', __( '<strong>ERROR</strong>: The comment could not be saved. Please try again later.' ), 500 );
-	}
-
-	return get_comment( $comment_id );
-
-}
Index: www/wp-includes/autoload/customize/class-wp-customize-background-image-setting.php
===================================================================
--- www/wp-includes/autoload/customize/class-wp-customize-background-image-setting.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/customize/class-wp-customize-background-image-setting.php	(revision UNDEFINED)
@@ -1,28 +0,0 @@
-<?php
-/**
- * Customize API: WP_Customize_Background_Image_Setting class
- *
- * @package WordPress
- * @subpackage Customize
- * @since 4.4.0
- */
-
-/**
- * Customizer Background Image Setting class.
- *
- * @since 3.4.0
- *
- * @see WP_Customize_Setting
- */
-final class WP_Customize_Background_Image_Setting extends WP_Customize_Setting {
-	public $id = 'background_image_thumb';
-
-	/**
-	 * @since 3.4.0
-	 *
-	 * @param $value
-	 */
-	public function update( $value ) {
-		remove_theme_mod( 'background_image_thumb' );
-	}
-}
Index: www/wp-includes/IXR/class-IXR-introspectionserver.php
===================================================================
--- www/wp-includes/IXR/class-IXR-introspectionserver.php	(revision 38565)
+++ www/wp-includes/autoload/ixr/IXR_IntrospectionServer.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-phpmailer.php
===================================================================
--- www/wp-includes/class-phpmailer.php	(revision 38565)
+++ www/wp-includes/autoload/phpmailer/PHPMailer.php	(revision )
@@ -1385,7 +1385,6 @@
     public function getSMTPInstance()
     {
         if (!is_object($this->smtp)) {
-			require_once( 'class-smtp.php' );
             $this->smtp = new SMTP;
         }
         return $this->smtp;
@@ -3807,22 +3806,5 @@
             $params = array($isSent, $to, $cc, $bcc, $subject, $body, $from);
             call_user_func_array($this->action_function, $params);
         }
-    }
-}
-
-/**
- * PHPMailer exception handler
- * @package PHPMailer
- */
-class phpmailerException extends Exception
-{
-    /**
-     * Prettify error message output
-     * @return string
-     */
-    public function errorMessage()
-    {
-        $errorMsg = '<strong>' . $this->getMessage() . "</strong><br />\n";
-        return $errorMsg;
     }
 }
Index: www/wp-includes/autoload/pomo/Gettext_Translations.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/pomo/Gettext_Translations.php	(revision )
+++ www/wp-includes/autoload/pomo/Gettext_Translations.php	(revision )
@@ -0,0 +1,120 @@
+<?php
+/**
+ * Class for a set of entries for translation and their associated headers
+ *
+ * @version $Id: translations.php 1157 2015-11-20 04:30:11Z dd32 $
+ * @package pomo
+ * @subpackage translations
+ */
+
+class Gettext_Translations extends Translations {
+	/**
+	 * The gettext implementation of select_plural_form.
+	 *
+	 * It lives in this class, because there are more than one descendand, which will use it and
+	 * they can't share it effectively.
+	 *
+	 * @param int $count
+	 * @return string
+	 */
+	function gettext_select_plural_form($count) {
+		if (!isset($this->_gettext_select_plural_form) || is_null($this->_gettext_select_plural_form)) {
+			list( $nplurals, $expression ) = $this->nplurals_and_expression_from_header($this->get_header('Plural-Forms'));
+			$this->_nplurals = $nplurals;
+			$this->_gettext_select_plural_form = $this->make_plural_form_function($nplurals, $expression);
+		}
+		return call_user_func($this->_gettext_select_plural_form, $count);
+	}
+
+	/**
+	 * @param string $header
+	 * @return array
+	 */
+	function nplurals_and_expression_from_header($header) {
+		if (preg_match('/^\s*nplurals\s*=\s*(\d+)\s*;\s+plural\s*=\s*(.+)$/', $header, $matches)) {
+			$nplurals = (int)$matches[1];
+			$expression = trim($this->parenthesize_plural_exression($matches[2]));
+			return array($nplurals, $expression);
+		} else {
+			return array(2, 'n != 1');
+		}
+	}
+
+	/**
+	 * Makes a function, which will return the right translation index, according to the
+	 * plural forms header
+	 * @param int    $nplurals
+	 * @param string $expression
+	 * @return callable
+	 */
+	function make_plural_form_function($nplurals, $expression) {
+		$expression = str_replace('n', '$n', $expression);
+		$func_body = "
+			\$index = (int)($expression);
+			return (\$index < $nplurals)? \$index : $nplurals - 1;";
+		return create_function('$n', $func_body);
+	}
+
+	/**
+	 * Adds parentheses to the inner parts of ternary operators in
+	 * plural expressions, because PHP evaluates ternary oerators from left to right
+	 *
+	 * @param string $expression the expression without parentheses
+	 * @return string the expression with parentheses added
+	 */
+	function parenthesize_plural_exression($expression) {
+		$expression .= ';';
+		$res = '';
+		$depth = 0;
+		for ($i = 0; $i < strlen($expression); ++$i) {
+			$char = $expression[$i];
+			switch ($char) {
+				case '?':
+					$res .= ' ? (';
+					$depth++;
+					break;
+				case ':':
+					$res .= ') : (';
+					break;
+				case ';':
+					$res .= str_repeat(')', $depth) . ';';
+					$depth= 0;
+					break;
+				default:
+					$res .= $char;
+			}
+		}
+		return rtrim($res, ';');
+	}
+
+	/**
+	 * @param string $translation
+	 * @return array
+	 */
+	function make_headers($translation) {
+		$headers = array();
+		// sometimes \ns are used instead of real new lines
+		$translation = str_replace('\n', "\n", $translation);
+		$lines = explode("\n", $translation);
+		foreach($lines as $line) {
+			$parts = explode(':', $line, 2);
+			if (!isset($parts[1])) continue;
+			$headers[trim($parts[0])] = trim($parts[1]);
+		}
+		return $headers;
+	}
+
+	/**
+	 * @param string $header
+	 * @param string $value
+	 */
+	function set_header($header, $value) {
+		parent::set_header($header, $value);
+		if ('Plural-Forms' == $header) {
+			list( $nplurals, $expression ) = $this->nplurals_and_expression_from_header($this->get_header('Plural-Forms'));
+			$this->_nplurals = $nplurals;
+			$this->_gettext_select_plural_form = $this->make_plural_form_function($nplurals, $expression);
+		}
+	}
+}
+
Index: www/wp-includes/constants/services-json.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/constants/services-json.php	(revision )
+++ www/wp-includes/constants/services-json.php	(revision )
@@ -0,0 +1,41 @@
+<?php
+
+/**
+* Marker constant for Services_JSON::decode(), used to flag stack state
+*/
+define('SERVICES_JSON_SLICE',   1);
+
+/**
+* Marker constant for Services_JSON::decode(), used to flag stack state
+*/
+define('SERVICES_JSON_IN_STR',  2);
+
+/**
+* Marker constant for Services_JSON::decode(), used to flag stack state
+*/
+define('SERVICES_JSON_IN_ARR',  3);
+
+/**
+* Marker constant for Services_JSON::decode(), used to flag stack state
+*/
+define('SERVICES_JSON_IN_OBJ',  4);
+
+/**
+* Marker constant for Services_JSON::decode(), used to flag stack state
+*/
+define('SERVICES_JSON_IN_CMT', 5);
+
+/**
+* Behavior switch for Services_JSON::decode()
+*/
+define('SERVICES_JSON_LOOSE_TYPE', 16);
+
+/**
+* Behavior switch for Services_JSON::decode()
+*/
+define('SERVICES_JSON_SUPPRESS_ERRORS', 32);
+
+/**
+* Behavior switch for Services_JSON::decode()
+*/
+define('SERVICES_JSON_USE_TO_JSON', 64);
Index: www/wp-includes/SimplePie/Parse/Date.php
===================================================================
--- www/wp-includes/SimplePie/Parse/Date.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_Parse_Date.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/ms-default-filters.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/ms-default-filters.php	(revision 38565)
+++ www/wp-includes/ms-default-filters.php	(revision 38565)
@@ -1,96 +0,0 @@
-<?php
-/**
- * Sets up the default filters and actions for Multisite.
- *
- * If you need to remove a default hook, this file will give you the priority
- * for which to use to remove the hook.
- *
- * Not all of the Multisite default hooks are found in ms-default-filters.php
- *
- * @package WordPress
- * @subpackage Multisite
- * @see default-filters.php
- * @since 3.0.0
- */
-
-add_action( 'init', 'ms_subdomain_constants' );
-
-// Functions
-add_action( 'update_option_blog_public', 'update_blog_public', 10, 2 );
-add_filter( 'option_users_can_register', 'users_can_register_signup_filter' );
-add_filter( 'site_option_welcome_user_email', 'welcome_user_msg_filter' );
-
-// Users
-add_filter( 'wpmu_validate_user_signup', 'signup_nonce_check' );
-add_action( 'init', 'maybe_add_existing_user_to_blog' );
-add_action( 'wpmu_new_user', 'newuser_notify_siteadmin' );
-add_action( 'wpmu_activate_user', 'add_new_user_to_blog', 10, 3 );
-add_action( 'wpmu_activate_user', 'wpmu_welcome_user_notification', 10, 3 );
-add_action( 'after_signup_user', 'wpmu_signup_user_notification', 10, 4 );
-add_action( 'network_site_new_created_user',   'wp_send_new_user_notifications' );
-add_action( 'network_site_users_created_user', 'wp_send_new_user_notifications' );
-add_action( 'network_user_new_created_user',   'wp_send_new_user_notifications' );
-add_filter( 'sanitize_user', 'strtolower' );
-
-// Blogs
-add_filter( 'wpmu_validate_blog_signup', 'signup_nonce_check' );
-add_action( 'wpmu_new_blog', 'wpmu_log_new_registrations', 10, 2 );
-add_action( 'wpmu_new_blog', 'newblog_notify_siteadmin', 10, 2 );
-add_action( 'wpmu_activate_blog', 'wpmu_welcome_notification', 10, 5 );
-add_action( 'after_signup_site', 'wpmu_signup_blog_notification', 10, 7 );
-
-// Register Nonce
-add_action( 'signup_hidden_fields', 'signup_nonce_fields' );
-
-// Template
-add_action( 'template_redirect', 'maybe_redirect_404' );
-add_filter( 'allowed_redirect_hosts', 'redirect_this_site' );
-
-// Administration
-add_filter( 'term_id_filter', 'global_terms', 10, 2 );
-add_action( 'delete_post', '_update_posts_count_on_delete' );
-add_action( 'delete_post', '_update_blog_date_on_post_delete' );
-add_action( 'transition_post_status', '_update_blog_date_on_post_publish', 10, 3 );
-add_action( 'transition_post_status', '_update_posts_count_on_transition_post_status', 10, 2 );
-
-// Counts
-add_action( 'admin_init', 'wp_schedule_update_network_counts');
-add_action( 'update_network_counts', 'wp_update_network_counts');
-foreach ( array( 'user_register', 'deleted_user', 'wpmu_new_user', 'make_spam_user', 'make_ham_user' ) as $action )
-	add_action( $action, 'wp_maybe_update_network_user_counts' );
-foreach ( array( 'make_spam_blog', 'make_ham_blog', 'archive_blog', 'unarchive_blog', 'make_delete_blog', 'make_undelete_blog' ) as $action )
-	add_action( $action, 'wp_maybe_update_network_site_counts' );
-unset( $action );
-
-// Files
-add_filter( 'wp_upload_bits', 'upload_is_file_too_big' );
-add_filter( 'import_upload_size_limit', 'fix_import_form_size' );
-add_filter( 'upload_mimes', 'check_upload_mimes' );
-add_filter( 'upload_size_limit', 'upload_size_limit_filter' );
-add_action( 'upload_ui_over_quota', 'multisite_over_quota_message' );
-
-// Mail
-add_action( 'phpmailer_init', 'fix_phpmailer_messageid' );
-
-// Disable somethings by default for multisite
-add_filter( 'enable_update_services_configuration', '__return_false' );
-if ( ! defined('POST_BY_EMAIL') || ! POST_BY_EMAIL ) // back compat constant.
-	add_filter( 'enable_post_by_email_configuration', '__return_false' );
-if ( ! defined('EDIT_ANY_USER') || ! EDIT_ANY_USER ) // back compat constant.
-	add_filter( 'enable_edit_any_user_configuration', '__return_false' );
-add_filter( 'force_filtered_html_on_import', '__return_true' );
-
-// WP_HOME and WP_SITEURL should not have any effect in MS
-remove_filter( 'option_siteurl', '_config_wp_siteurl' );
-remove_filter( 'option_home',    '_config_wp_home'    );
-
-// Some options changes should trigger blog details refresh.
-add_action( 'update_option_blogname',   'refresh_blog_details', 10, 0 );
-add_action( 'update_option_siteurl',    'refresh_blog_details', 10, 0 );
-add_action( 'update_option_post_count', 'refresh_blog_details', 10, 0 );
-
-// If the network upgrade hasn't run yet, assume ms-files.php rewriting is used.
-add_filter( 'default_site_option_ms_files_rewriting', '__return_true' );
-
-// Whitelist multisite domains for HTTP requests
-add_filter( 'http_request_host_is_external', 'ms_allowed_http_request_hosts', 20, 2 );
Index: www/wp-includes/feed.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/feed.php	(revision 38565)
+++ www/wp-includes/feed.php	(revision 38565)
@@ -1,705 +0,0 @@
-<?php
-/**
- * WordPress Feed API
- *
- * Many of the functions used in here belong in The Loop, or The Loop for the
- * Feeds.
- *
- * @package WordPress
- * @subpackage Feed
- * @since 2.1.0
- */
-
-/**
- * RSS container for the bloginfo function.
- *
- * You can retrieve anything that you can using the get_bloginfo() function.
- * Everything will be stripped of tags and characters converted, when the values
- * are retrieved for use in the feeds.
- *
- * @since 1.5.1
- * @see get_bloginfo() For the list of possible values to display.
- *
- * @param string $show See get_bloginfo() for possible values.
- * @return string
- */
-function get_bloginfo_rss($show = '') {
-	$info = strip_tags(get_bloginfo($show));
-	/**
-	 * Filters the bloginfo for use in RSS feeds.
-	 *
-	 * @since 2.2.0
-	 *
-	 * @see convert_chars()
-	 * @see get_bloginfo()
-	 *
-	 * @param string $info Converted string value of the blog information.
-	 * @param string $show The type of blog information to retrieve.
-	 */
-	return apply_filters( 'get_bloginfo_rss', convert_chars( $info ), $show );
-}
-
-/**
- * Display RSS container for the bloginfo function.
- *
- * You can retrieve anything that you can using the get_bloginfo() function.
- * Everything will be stripped of tags and characters converted, when the values
- * are retrieved for use in the feeds.
- *
- * @since 0.71
- * @see get_bloginfo() For the list of possible values to display.
- *
- * @param string $show See get_bloginfo() for possible values.
- */
-function bloginfo_rss($show = '') {
-	/**
-	 * Filters the bloginfo for display in RSS feeds.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @see get_bloginfo()
-	 *
-	 * @param string $rss_container RSS container for the blog information.
-	 * @param string $show          The type of blog information to retrieve.
-	 */
-	echo apply_filters( 'bloginfo_rss', get_bloginfo_rss( $show ), $show );
-}
-
-/**
- * Retrieve the default feed.
- *
- * The default feed is 'rss2', unless a plugin changes it through the
- * {@see 'default_feed'} filter.
- *
- * @since 2.5.0
- *
- * @return string Default feed, or for example 'rss2', 'atom', etc.
- */
-function get_default_feed() {
-	/**
-	 * Filters the default feed type.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param string $feed_type Type of default feed. Possible values include 'rss2', 'atom'.
-	 *                          Default 'rss2'.
-	 */
-	$default_feed = apply_filters( 'default_feed', 'rss2' );
-	return 'rss' == $default_feed ? 'rss2' : $default_feed;
-}
-
-/**
- * Retrieve the blog title for the feed title.
- *
- * @since 2.2.0
- * @since 4.4.0 The optional `$sep` parameter was deprecated and renamed to `$deprecated`.
- *
- * @param string $deprecated Unused..
- * @return string The document title.
- */
-function get_wp_title_rss( $deprecated = '&#8211;' ) {
-	if ( '&#8211;' !== $deprecated ) {
-		/* translators: %s: 'document_title_separator' filter name */
-		_deprecated_argument( __FUNCTION__, '4.4.0', sprintf( __( 'Use the %s filter instead.' ), '<code>document_title_separator</code>' ) );
-	}
-
-	/**
-	 * Filters the blog title for use as the feed title.
-	 *
-	 * @since 2.2.0
-	 * @since 4.4.0 The `$sep` parameter was deprecated and renamed to `$deprecated`.
-	 *
-	 * @param string $title      The current blog title.
-	 * @param string $deprecated Unused.
-	 */
-	return apply_filters( 'get_wp_title_rss', wp_get_document_title(), $deprecated );
-}
-
-/**
- * Display the blog title for display of the feed title.
- *
- * @since 2.2.0
- * @since 4.4.0 The optional `$sep` parameter was deprecated and renamed to `$deprecated`.
- *
- * @param string $deprecated Unused.
- */
-function wp_title_rss( $deprecated = '&#8211;' ) {
-	if ( '&#8211;' !== $deprecated ) {
-		/* translators: %s: 'document_title_separator' filter name */
-		_deprecated_argument( __FUNCTION__, '4.4.0', sprintf( __( 'Use the %s filter instead.' ), '<code>document_title_separator</code>' ) );
-	}
-
-	/**
-	 * Filters the blog title for display of the feed title.
-	 *
-	 * @since 2.2.0
-	 * @since 4.4.0 The `$sep` parameter was deprecated and renamed to `$deprecated`.
-	 *
-	 * @see get_wp_title_rss()
-	 *
-	 * @param string $wp_title_rss The current blog title.
-	 * @param string $deprecated   Unused.
-	 */
-	echo apply_filters( 'wp_title_rss', get_wp_title_rss(), $deprecated );
-}
-
-/**
- * Retrieve the current post title for the feed.
- *
- * @since 2.0.0
- *
- * @return string Current post title.
- */
-function get_the_title_rss() {
-	$title = get_the_title();
-
-	/**
-	 * Filters the post title for use in a feed.
-	 *
-	 * @since 1.2.0
-	 *
-	 * @param string $title The current post title.
-	 */
-	$title = apply_filters( 'the_title_rss', $title );
-	return $title;
-}
-
-/**
- * Display the post title in the feed.
- *
- * @since 0.71
- */
-function the_title_rss() {
-	echo get_the_title_rss();
-}
-
-/**
- * Retrieve the post content for feeds.
- *
- * @since 2.9.0
- * @see get_the_content()
- *
- * @param string $feed_type The type of feed. rss2 | atom | rss | rdf
- * @return string The filtered content.
- */
-function get_the_content_feed($feed_type = null) {
-	if ( !$feed_type )
-		$feed_type = get_default_feed();
-
-	/** This filter is documented in wp-includes/post-template.php */
-	$content = apply_filters( 'the_content', get_the_content() );
-	$content = str_replace(']]>', ']]&gt;', $content);
-	/**
-	 * Filters the post content for use in feeds.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param string $content   The current post content.
-	 * @param string $feed_type Type of feed. Possible values include 'rss2', 'atom'.
-	 *                          Default 'rss2'.
-	 */
-	return apply_filters( 'the_content_feed', $content, $feed_type );
-}
-
-/**
- * Display the post content for feeds.
- *
- * @since 2.9.0
- *
- * @param string $feed_type The type of feed. rss2 | atom | rss | rdf
- */
-function the_content_feed($feed_type = null) {
-	echo get_the_content_feed($feed_type);
-}
-
-/**
- * Display the post excerpt for the feed.
- *
- * @since 0.71
- */
-function the_excerpt_rss() {
-	$output = get_the_excerpt();
-	/**
-	 * Filters the post excerpt for a feed.
-	 *
-	 * @since 1.2.0
-	 *
-	 * @param string $output The current post excerpt.
-	 */
-	echo apply_filters( 'the_excerpt_rss', $output );
-}
-
-/**
- * Display the permalink to the post for use in feeds.
- *
- * @since 2.3.0
- */
-function the_permalink_rss() {
-	/**
-	 * Filters the permalink to the post for use in feeds.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param string $post_permalink The current post permalink.
-	 */
-	echo esc_url( apply_filters( 'the_permalink_rss', get_permalink() ) );
-}
-
-/**
- * Outputs the link to the comments for the current post in an xml safe way
- *
- * @since 3.0.0
- * @return none
- */
-function comments_link_feed() {
-	/**
-	 * Filters the comments permalink for the current post.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param string $comment_permalink The current comment permalink with
-	 *                                  '#comments' appended.
-	 */
-	echo esc_url( apply_filters( 'comments_link_feed', get_comments_link() ) );
-}
-
-/**
- * Display the feed GUID for the current comment.
- *
- * @since 2.5.0
- *
- * @param int|WP_Comment $comment_id Optional comment object or id. Defaults to global comment object.
- */
-function comment_guid($comment_id = null) {
-	echo esc_url( get_comment_guid($comment_id) );
-}
-
-/**
- * Retrieve the feed GUID for the current comment.
- *
- * @since 2.5.0
- *
- * @param int|WP_Comment $comment_id Optional comment object or id. Defaults to global comment object.
- * @return false|string false on failure or guid for comment on success.
- */
-function get_comment_guid($comment_id = null) {
-	$comment = get_comment($comment_id);
-
-	if ( !is_object($comment) )
-		return false;
-
-	return get_the_guid($comment->comment_post_ID) . '#comment-' . $comment->comment_ID;
-}
-
-/**
- * Display the link to the comments.
- *
- * @since 1.5.0
- * @since 4.4.0 Introduced the `$comment` argument.
- *
- * @param int|WP_Comment $comment Optional. Comment object or id. Defaults to global comment object.
- */
-function comment_link( $comment = null ) {
-	/**
-	 * Filters the current comment's permalink.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @see get_comment_link()
-	 *
-	 * @param string $comment_permalink The current comment permalink.
-	 */
-	echo esc_url( apply_filters( 'comment_link', get_comment_link( $comment ) ) );
-}
-
-/**
- * Retrieve the current comment author for use in the feeds.
- *
- * @since 2.0.0
- *
- * @return string Comment Author
- */
-function get_comment_author_rss() {
-	/**
-	 * Filters the current comment author for use in a feed.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @see get_comment_author()
-	 *
-	 * @param string $comment_author The current comment author.
-	 */
-	return apply_filters( 'comment_author_rss', get_comment_author() );
-}
-
-/**
- * Display the current comment author in the feed.
- *
- * @since 1.0.0
- */
-function comment_author_rss() {
-	echo get_comment_author_rss();
-}
-
-/**
- * Display the current comment content for use in the feeds.
- *
- * @since 1.0.0
- */
-function comment_text_rss() {
-	$comment_text = get_comment_text();
-	/**
-	 * Filters the current comment content for use in a feed.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $comment_text The content of the current comment.
-	 */
-	$comment_text = apply_filters( 'comment_text_rss', $comment_text );
-	echo $comment_text;
-}
-
-/**
- * Retrieve all of the post categories, formatted for use in feeds.
- *
- * All of the categories for the current post in the feed loop, will be
- * retrieved and have feed markup added, so that they can easily be added to the
- * RSS2, Atom, or RSS1 and RSS0.91 RDF feeds.
- *
- * @since 2.1.0
- *
- * @param string $type Optional, default is the type returned by get_default_feed().
- * @return string All of the post categories for displaying in the feed.
- */
-function get_the_category_rss($type = null) {
-	if ( empty($type) )
-		$type = get_default_feed();
-	$categories = get_the_category();
-	$tags = get_the_tags();
-	$the_list = '';
-	$cat_names = array();
-
-	$filter = 'rss';
-	if ( 'atom' == $type )
-		$filter = 'raw';
-
-	if ( !empty($categories) ) foreach ( (array) $categories as $category ) {
-		$cat_names[] = sanitize_term_field('name', $category->name, $category->term_id, 'category', $filter);
-	}
-
-	if ( !empty($tags) ) foreach ( (array) $tags as $tag ) {
-		$cat_names[] = sanitize_term_field('name', $tag->name, $tag->term_id, 'post_tag', $filter);
-	}
-
-	$cat_names = array_unique($cat_names);
-
-	foreach ( $cat_names as $cat_name ) {
-		if ( 'rdf' == $type )
-			$the_list .= "\t\t<dc:subject><![CDATA[$cat_name]]></dc:subject>\n";
-		elseif ( 'atom' == $type )
-			$the_list .= sprintf( '<category scheme="%1$s" term="%2$s" />', esc_attr( get_bloginfo_rss( 'url' ) ), esc_attr( $cat_name ) );
-		else
-			$the_list .= "\t\t<category><![CDATA[" . @html_entity_decode( $cat_name, ENT_COMPAT, get_option('blog_charset') ) . "]]></category>\n";
-	}
-
-	/**
-	 * Filters all of the post categories for display in a feed.
-	 *
-	 * @since 1.2.0
-	 *
-	 * @param string $the_list All of the RSS post categories.
-	 * @param string $type     Type of feed. Possible values include 'rss2', 'atom'.
-	 *                         Default 'rss2'.
-	 */
-	return apply_filters( 'the_category_rss', $the_list, $type );
-}
-
-/**
- * Display the post categories in the feed.
- *
- * @since 0.71
- * @see get_the_category_rss() For better explanation.
- *
- * @param string $type Optional, default is the type returned by get_default_feed().
- */
-function the_category_rss($type = null) {
-	echo get_the_category_rss($type);
-}
-
-/**
- * Display the HTML type based on the blog setting.
- *
- * The two possible values are either 'xhtml' or 'html'.
- *
- * @since 2.2.0
- */
-function html_type_rss() {
-	$type = get_bloginfo('html_type');
-	if (strpos($type, 'xhtml') !== false)
-		$type = 'xhtml';
-	else
-		$type = 'html';
-	echo $type;
-}
-
-/**
- * Display the rss enclosure for the current post.
- *
- * Uses the global $post to check whether the post requires a password and if
- * the user has the password for the post. If not then it will return before
- * displaying.
- *
- * Also uses the function get_post_custom() to get the post's 'enclosure'
- * metadata field and parses the value to display the enclosure(s). The
- * enclosure(s) consist of enclosure HTML tag(s) with a URI and other
- * attributes.
- *
- * @since 1.5.0
- */
-function rss_enclosure() {
-	if ( post_password_required() )
-		return;
-
-	foreach ( (array) get_post_custom() as $key => $val) {
-		if ($key == 'enclosure') {
-			foreach ( (array) $val as $enc ) {
-				$enclosure = explode("\n", $enc);
-
-				// only get the first element, e.g. audio/mpeg from 'audio/mpeg mpga mp2 mp3'
-				$t = preg_split('/[ \t]/', trim($enclosure[2]) );
-				$type = $t[0];
-
-				/**
-				 * Filters the RSS enclosure HTML link tag for the current post.
-				 *
-				 * @since 2.2.0
-				 *
-				 * @param string $html_link_tag The HTML link tag with a URI and other attributes.
-				 */
-				echo apply_filters( 'rss_enclosure', '<enclosure url="' . trim( htmlspecialchars( $enclosure[0] ) ) . '" length="' . trim( $enclosure[1] ) . '" type="' . $type . '" />' . "\n" );
-			}
-		}
-	}
-}
-
-/**
- * Display the atom enclosure for the current post.
- *
- * Uses the global $post to check whether the post requires a password and if
- * the user has the password for the post. If not then it will return before
- * displaying.
- *
- * Also uses the function get_post_custom() to get the post's 'enclosure'
- * metadata field and parses the value to display the enclosure(s). The
- * enclosure(s) consist of link HTML tag(s) with a URI and other attributes.
- *
- * @since 2.2.0
- */
-function atom_enclosure() {
-	if ( post_password_required() )
-		return;
-
-	foreach ( (array) get_post_custom() as $key => $val ) {
-		if ($key == 'enclosure') {
-			foreach ( (array) $val as $enc ) {
-				$enclosure = explode("\n", $enc);
-				/**
-				 * Filters the atom enclosure HTML link tag for the current post.
-				 *
-				 * @since 2.2.0
-				 *
-				 * @param string $html_link_tag The HTML link tag with a URI and other attributes.
-				 */
-				echo apply_filters( 'atom_enclosure', '<link href="' . trim( htmlspecialchars( $enclosure[0] ) ) . '" rel="enclosure" length="' . trim( $enclosure[1] ) . '" type="' . trim( $enclosure[2] ) . '" />' . "\n" );
-			}
-		}
-	}
-}
-
-/**
- * Determine the type of a string of data with the data formatted.
- *
- * Tell whether the type is text, html, or xhtml, per RFC 4287 section 3.1.
- *
- * In the case of WordPress, text is defined as containing no markup,
- * xhtml is defined as "well formed", and html as tag soup (i.e., the rest).
- *
- * Container div tags are added to xhtml values, per section 3.1.1.3.
- *
- * @link http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rfc.section.3.1
- *
- * @since 2.5.0
- *
- * @param string $data Input string
- * @return array array(type, value)
- */
-function prep_atom_text_construct($data) {
-	if (strpos($data, '<') === false && strpos($data, '&') === false) {
-		return array('text', $data);
-	}
-
-	$parser = xml_parser_create();
-	xml_parse($parser, '<div>' . $data . '</div>', true);
-	$code = xml_get_error_code($parser);
-	xml_parser_free($parser);
-
-	if (!$code) {
-		if (strpos($data, '<') === false) {
-			return array('text', $data);
-		} else {
-			$data = "<div xmlns='http://www.w3.org/1999/xhtml'>$data</div>";
-			return array('xhtml', $data);
-		}
-	}
-
-	if (strpos($data, ']]>') === false) {
-		return array('html', "<![CDATA[$data]]>");
-	} else {
-		return array('html', htmlspecialchars($data));
-	}
-}
-
-/**
- * Displays Site Icon in atom feeds.
- *
- * @since 4.3.0
- *
- * @see get_site_icon_url()
- */
-function atom_site_icon() {
-	$url = get_site_icon_url( 32 );
-	if ( $url ) {
-		echo "<icon>$url</icon>\n";
-	}
-}
-
-/**
- * Displays Site Icon in RSS2.
- *
- * @since 4.3.0
- */
-function rss2_site_icon() {
-	$rss_title = get_wp_title_rss();
-	if ( empty( $rss_title ) ) {
-		$rss_title = get_bloginfo_rss( 'name' );
-	}
-
-	$url = get_site_icon_url( 32 );
-	if ( $url ) {
-		echo '
-<image>
-	<url>' . convert_chars( $url ) . '</url>
-	<title>' . $rss_title . '</title>
-	<link>' . get_bloginfo_rss( 'url' ) . '</link>
-	<width>32</width>
-	<height>32</height>
-</image> ' . "\n";
-	}
-}
-
-/**
- * Display the link for the currently displayed feed in a XSS safe way.
- *
- * Generate a correct link for the atom:self element.
- *
- * @since 2.5.0
- */
-function self_link() {
-	$host = @parse_url(home_url());
-	/**
-	 * Filters the current feed URL.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @see set_url_scheme()
-	 * @see wp_unslash()
-	 *
-	 * @param string $feed_link The link for the feed with set URL scheme.
-	 */
-	echo esc_url( apply_filters( 'self_link', set_url_scheme( 'http://' . $host['host'] . wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) );
-}
-
-/**
- * Return the content type for specified feed type.
- *
- * @since 2.8.0
- *
- * @param string $type Type of feed. Possible values include 'rss', rss2', 'atom', and 'rdf'.
- */
-function feed_content_type( $type = '' ) {
-	if ( empty($type) )
-		$type = get_default_feed();
-
-	$types = array(
-		'rss'      => 'application/rss+xml',
-		'rss2'     => 'application/rss+xml',
-		'rss-http' => 'text/xml',
-		'atom'     => 'application/atom+xml',
-		'rdf'      => 'application/rdf+xml'
-	);
-
-	$content_type = ( !empty($types[$type]) ) ? $types[$type] : 'application/octet-stream';
-
-	/**
-	 * Filters the content type for a specific feed type.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param string $content_type Content type indicating the type of data that a feed contains.
-	 * @param string $type         Type of feed. Possible values include 'rss', rss2', 'atom', and 'rdf'.
-	 */
-	return apply_filters( 'feed_content_type', $content_type, $type );
-}
-
-/**
- * Build SimplePie object based on RSS or Atom feed from URL.
- *
- * @since 2.8.0
- *
- * @param mixed $url URL of feed to retrieve. If an array of URLs, the feeds are merged
- * using SimplePie's multifeed feature.
- * See also {@link ​http://simplepie.org/wiki/faq/typical_multifeed_gotchas}
- *
- * @return WP_Error|SimplePie WP_Error object on failure or SimplePie object on success
- */
-function fetch_feed( $url ) {
-	if ( ! class_exists( 'SimplePie', false ) ) {
-		require_once( ABSPATH . WPINC . '/class-simplepie.php' );
-	}
-
-	require_once( ABSPATH . WPINC . '/class-wp-feed-cache.php' );
-	require_once( ABSPATH . WPINC . '/class-wp-feed-cache-transient.php' );
-	require_once( ABSPATH . WPINC . '/class-wp-simplepie-file.php' );
-	require_once( ABSPATH . WPINC . '/class-wp-simplepie-sanitize-kses.php' );
-
-	$feed = new SimplePie();
-
-	$feed->set_sanitize_class( 'WP_SimplePie_Sanitize_KSES' );
-	// We must manually overwrite $feed->sanitize because SimplePie's
-	// constructor sets it before we have a chance to set the sanitization class
-	$feed->sanitize = new WP_SimplePie_Sanitize_KSES();
-
-	$feed->set_cache_class( 'WP_Feed_Cache' );
-	$feed->set_file_class( 'WP_SimplePie_File' );
-
-	$feed->set_feed_url( $url );
-	/** This filter is documented in wp-includes/class-wp-feed-cache-transient.php */
-	$feed->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url ) );
-	/**
-	 * Fires just before processing the SimplePie feed object.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param object &$feed SimplePie feed object, passed by reference.
-	 * @param mixed  $url   URL of feed to retrieve. If an array of URLs, the feeds are merged.
-	 */
-	do_action_ref_array( 'wp_feed_options', array( &$feed, $url ) );
-	$feed->init();
-	$feed->set_output_encoding( get_option( 'blog_charset' ) );
-	$feed->handle_content_type();
-
-	if ( $feed->error() )
-		return new WP_Error( 'simplepie-error', $feed->error() );
-
-	return $feed;
-}
Index: www/wp-admin/autoload/ftp/ftp_base.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/autoload/ftp/ftp_base.php	(revision )
+++ www/wp-admin/autoload/ftp/ftp_base.php	(revision )
@@ -0,0 +1,820 @@
+<?php
+/**
+ * PemFTP base class
+ *
+ */
+class ftp_base {
+	/* Public variables */
+	var $LocalEcho;
+	var $Verbose;
+	var $OS_local;
+	var $OS_remote;
+
+	/* Private variables */
+	var $_lastaction;
+	var $_errors;
+	var $_type;
+	var $_umask;
+	var $_timeout;
+	var $_passive;
+	var $_host;
+	var $_fullhost;
+	var $_port;
+	var $_datahost;
+	var $_dataport;
+	var $_ftp_control_sock;
+	var $_ftp_data_sock;
+	var $_ftp_temp_sock;
+	var $_ftp_buff_size;
+	var $_login;
+	var $_password;
+	var $_connected;
+	var $_ready;
+	var $_code;
+	var $_message;
+	var $_can_restore;
+	var $_port_available;
+	var $_curtype;
+	var $_features;
+
+	var $_error_array;
+	var $AuthorizedTransferMode;
+	var $OS_FullName;
+	var $_eol_code;
+	var $AutoAsciiExt;
+
+	/* Constructor */
+	function __construct($port_mode=FALSE, $verb=FALSE, $le=FALSE) {
+		$this->LocalEcho=$le;
+		$this->Verbose=$verb;
+		$this->_lastaction=NULL;
+		$this->_error_array=array();
+		$this->_eol_code=array(FTP_OS_Unix=>"\n", FTP_OS_Mac=>"\r", FTP_OS_Windows=>"\r\n");
+		$this->AuthorizedTransferMode=array(FTP_AUTOASCII, FTP_ASCII, FTP_BINARY);
+		$this->OS_FullName=array(FTP_OS_Unix => 'UNIX', FTP_OS_Windows => 'WINDOWS', FTP_OS_Mac => 'MACOS');
+		$this->AutoAsciiExt=array("ASP","BAT","C","CPP","CSS","CSV","JS","H","HTM","HTML","SHTML","INI","LOG","PHP3","PHTML","PL","PERL","SH","SQL","TXT");
+		$this->_port_available=($port_mode==TRUE);
+		$this->SendMSG("Staring FTP client class".($this->_port_available?"":" without PORT mode support"));
+		$this->_connected=FALSE;
+		$this->_ready=FALSE;
+		$this->_can_restore=FALSE;
+		$this->_code=0;
+		$this->_message="";
+		$this->_ftp_buff_size=4096;
+		$this->_curtype=NULL;
+		$this->SetUmask(0022);
+		$this->SetType(FTP_AUTOASCII);
+		$this->SetTimeout(30);
+		$this->Passive(!$this->_port_available);
+		$this->_login="anonymous";
+		$this->_password="anon@ftp.com";
+		$this->_features=array();
+	    $this->OS_local=FTP_OS_Unix;
+		$this->OS_remote=FTP_OS_Unix;
+		$this->features=array();
+		if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') $this->OS_local=FTP_OS_Windows;
+		elseif(strtoupper(substr(PHP_OS, 0, 3)) === 'MAC') $this->OS_local=FTP_OS_Mac;
+	}
+
+	function ftp_base($port_mode=FALSE) {
+		$this->__construct($port_mode);
+	}
+
+// <!-- --------------------------------------------------------------------------------------- -->
+// <!--       Public functions                                                                  -->
+// <!-- --------------------------------------------------------------------------------------- -->
+
+	function parselisting($line) {
+		$is_windows = ($this->OS_remote == FTP_OS_Windows);
+		if ($is_windows && preg_match("/([0-9]{2})-([0-9]{2})-([0-9]{2}) +([0-9]{2}):([0-9]{2})(AM|PM) +([0-9]+|<DIR>) +(.+)/",$line,$lucifer)) {
+			$b = array();
+			if ($lucifer[3]<70) { $lucifer[3]+=2000; } else { $lucifer[3]+=1900; } // 4digit year fix
+			$b['isdir'] = ($lucifer[7]=="<DIR>");
+			if ( $b['isdir'] )
+				$b['type'] = 'd';
+			else
+				$b['type'] = 'f';
+			$b['size'] = $lucifer[7];
+			$b['month'] = $lucifer[1];
+			$b['day'] = $lucifer[2];
+			$b['year'] = $lucifer[3];
+			$b['hour'] = $lucifer[4];
+			$b['minute'] = $lucifer[5];
+			$b['time'] = @mktime($lucifer[4]+(strcasecmp($lucifer[6],"PM")==0?12:0),$lucifer[5],0,$lucifer[1],$lucifer[2],$lucifer[3]);
+			$b['am/pm'] = $lucifer[6];
+			$b['name'] = $lucifer[8];
+		} else if (!$is_windows && $lucifer=preg_split("/[ ]/",$line,9,PREG_SPLIT_NO_EMPTY)) {
+			//echo $line."\n";
+			$lcount=count($lucifer);
+			if ($lcount<8) return '';
+			$b = array();
+			$b['isdir'] = $lucifer[0]{0} === "d";
+			$b['islink'] = $lucifer[0]{0} === "l";
+			if ( $b['isdir'] )
+				$b['type'] = 'd';
+			elseif ( $b['islink'] )
+				$b['type'] = 'l';
+			else
+				$b['type'] = 'f';
+			$b['perms'] = $lucifer[0];
+			$b['number'] = $lucifer[1];
+			$b['owner'] = $lucifer[2];
+			$b['group'] = $lucifer[3];
+			$b['size'] = $lucifer[4];
+			if ($lcount==8) {
+				sscanf($lucifer[5],"%d-%d-%d",$b['year'],$b['month'],$b['day']);
+				sscanf($lucifer[6],"%d:%d",$b['hour'],$b['minute']);
+				$b['time'] = @mktime($b['hour'],$b['minute'],0,$b['month'],$b['day'],$b['year']);
+				$b['name'] = $lucifer[7];
+			} else {
+				$b['month'] = $lucifer[5];
+				$b['day'] = $lucifer[6];
+				if (preg_match("/([0-9]{2}):([0-9]{2})/",$lucifer[7],$l2)) {
+					$b['year'] = date("Y");
+					$b['hour'] = $l2[1];
+					$b['minute'] = $l2[2];
+				} else {
+					$b['year'] = $lucifer[7];
+					$b['hour'] = 0;
+					$b['minute'] = 0;
+				}
+				$b['time'] = strtotime(sprintf("%d %s %d %02d:%02d",$b['day'],$b['month'],$b['year'],$b['hour'],$b['minute']));
+				$b['name'] = $lucifer[8];
+			}
+		}
+
+		return $b;
+	}
+
+	function SendMSG($message = "", $crlf=true) {
+		if ($this->Verbose) {
+			echo $message.($crlf?CRLF:"");
+			flush();
+		}
+		return TRUE;
+	}
+
+	function SetType($mode=FTP_AUTOASCII) {
+		if(!in_array($mode, $this->AuthorizedTransferMode)) {
+			$this->SendMSG("Wrong type");
+			return FALSE;
+		}
+		$this->_type=$mode;
+		$this->SendMSG("Transfer type: ".($this->_type==FTP_BINARY?"binary":($this->_type==FTP_ASCII?"ASCII":"auto ASCII") ) );
+		return TRUE;
+	}
+
+	function _settype($mode=FTP_ASCII) {
+		if($this->_ready) {
+			if($mode==FTP_BINARY) {
+				if($this->_curtype!=FTP_BINARY) {
+					if(!$this->_exec("TYPE I", "SetType")) return FALSE;
+					$this->_curtype=FTP_BINARY;
+				}
+			} elseif($this->_curtype!=FTP_ASCII) {
+				if(!$this->_exec("TYPE A", "SetType")) return FALSE;
+				$this->_curtype=FTP_ASCII;
+			}
+		} else return FALSE;
+		return TRUE;
+	}
+
+	function Passive($pasv=NULL) {
+		if(is_null($pasv)) $this->_passive=!$this->_passive;
+		else $this->_passive=$pasv;
+		if(!$this->_port_available and !$this->_passive) {
+			$this->SendMSG("Only passive connections available!");
+			$this->_passive=TRUE;
+			return FALSE;
+		}
+		$this->SendMSG("Passive mode ".($this->_passive?"on":"off"));
+		return TRUE;
+	}
+
+	function SetServer($host, $port=21, $reconnect=true) {
+		if(!is_long($port)) {
+	        $this->verbose=true;
+    	    $this->SendMSG("Incorrect port syntax");
+			return FALSE;
+		} else {
+			$ip=@gethostbyname($host);
+	        $dns=@gethostbyaddr($host);
+	        if(!$ip) $ip=$host;
+	        if(!$dns) $dns=$host;
+	        // Validate the IPAddress PHP4 returns -1 for invalid, PHP5 false
+	        // -1 === "255.255.255.255" which is the broadcast address which is also going to be invalid
+	        $ipaslong = ip2long($ip);
+			if ( ($ipaslong == false) || ($ipaslong === -1) ) {
+				$this->SendMSG("Wrong host name/address \"".$host."\"");
+				return FALSE;
+			}
+	        $this->_host=$ip;
+	        $this->_fullhost=$dns;
+	        $this->_port=$port;
+	        $this->_dataport=$port-1;
+		}
+		$this->SendMSG("Host \"".$this->_fullhost."(".$this->_host."):".$this->_port."\"");
+		if($reconnect){
+			if($this->_connected) {
+				$this->SendMSG("Reconnecting");
+				if(!$this->quit(FTP_FORCE)) return FALSE;
+				if(!$this->connect()) return FALSE;
+			}
+		}
+		return TRUE;
+	}
+
+	function SetUmask($umask=0022) {
+		$this->_umask=$umask;
+		umask($this->_umask);
+		$this->SendMSG("UMASK 0".decoct($this->_umask));
+		return TRUE;
+	}
+
+	function SetTimeout($timeout=30) {
+		$this->_timeout=$timeout;
+		$this->SendMSG("Timeout ".$this->_timeout);
+		if($this->_connected)
+			if(!$this->_settimeout($this->_ftp_control_sock)) return FALSE;
+		return TRUE;
+	}
+
+	function connect($server=NULL) {
+		if(!empty($server)) {
+			if(!$this->SetServer($server)) return false;
+		}
+		if($this->_ready) return true;
+	    $this->SendMsg('Local OS : '.$this->OS_FullName[$this->OS_local]);
+		if(!($this->_ftp_control_sock = $this->_connect($this->_host, $this->_port))) {
+			$this->SendMSG("Error : Cannot connect to remote host \"".$this->_fullhost." :".$this->_port."\"");
+			return FALSE;
+		}
+		$this->SendMSG("Connected to remote host \"".$this->_fullhost.":".$this->_port."\". Waiting for greeting.");
+		do {
+			if(!$this->_readmsg()) return FALSE;
+			if(!$this->_checkCode()) return FALSE;
+			$this->_lastaction=time();
+		} while($this->_code<200);
+		$this->_ready=true;
+		$syst=$this->systype();
+		if(!$syst) $this->SendMSG("Can't detect remote OS");
+		else {
+			if(preg_match("/win|dos|novell/i", $syst[0])) $this->OS_remote=FTP_OS_Windows;
+			elseif(preg_match("/os/i", $syst[0])) $this->OS_remote=FTP_OS_Mac;
+			elseif(preg_match("/(li|u)nix/i", $syst[0])) $this->OS_remote=FTP_OS_Unix;
+			else $this->OS_remote=FTP_OS_Mac;
+			$this->SendMSG("Remote OS: ".$this->OS_FullName[$this->OS_remote]);
+		}
+		if(!$this->features()) $this->SendMSG("Can't get features list. All supported - disabled");
+		else $this->SendMSG("Supported features: ".implode(", ", array_keys($this->_features)));
+		return TRUE;
+	}
+
+	function quit($force=false) {
+		if($this->_ready) {
+			if(!$this->_exec("QUIT") and !$force) return FALSE;
+			if(!$this->_checkCode() and !$force) return FALSE;
+			$this->_ready=false;
+			$this->SendMSG("Session finished");
+		}
+		$this->_quit();
+		return TRUE;
+	}
+
+	function login($user=NULL, $pass=NULL) {
+		if(!is_null($user)) $this->_login=$user;
+		else $this->_login="anonymous";
+		if(!is_null($pass)) $this->_password=$pass;
+		else $this->_password="anon@anon.com";
+		if(!$this->_exec("USER ".$this->_login, "login")) return FALSE;
+		if(!$this->_checkCode()) return FALSE;
+		if($this->_code!=230) {
+			if(!$this->_exec((($this->_code==331)?"PASS ":"ACCT ").$this->_password, "login")) return FALSE;
+			if(!$this->_checkCode()) return FALSE;
+		}
+		$this->SendMSG("Authentication succeeded");
+		if(empty($this->_features)) {
+			if(!$this->features()) $this->SendMSG("Can't get features list. All supported - disabled");
+			else $this->SendMSG("Supported features: ".implode(", ", array_keys($this->_features)));
+		}
+		return TRUE;
+	}
+
+	function pwd() {
+		if(!$this->_exec("PWD", "pwd")) return FALSE;
+		if(!$this->_checkCode()) return FALSE;
+		return preg_replace("/^[0-9]{3} \"(.+)\".*$/s", "\\1", $this->_message);
+	}
+
+	function cdup() {
+		if(!$this->_exec("CDUP", "cdup")) return FALSE;
+		if(!$this->_checkCode()) return FALSE;
+		return true;
+	}
+
+	function chdir($pathname) {
+		if(!$this->_exec("CWD ".$pathname, "chdir")) return FALSE;
+		if(!$this->_checkCode()) return FALSE;
+		return TRUE;
+	}
+
+	function rmdir($pathname) {
+		if(!$this->_exec("RMD ".$pathname, "rmdir")) return FALSE;
+		if(!$this->_checkCode()) return FALSE;
+		return TRUE;
+	}
+
+	function mkdir($pathname) {
+		if(!$this->_exec("MKD ".$pathname, "mkdir")) return FALSE;
+		if(!$this->_checkCode()) return FALSE;
+		return TRUE;
+	}
+
+	function rename($from, $to) {
+		if(!$this->_exec("RNFR ".$from, "rename")) return FALSE;
+		if(!$this->_checkCode()) return FALSE;
+		if($this->_code==350) {
+			if(!$this->_exec("RNTO ".$to, "rename")) return FALSE;
+			if(!$this->_checkCode()) return FALSE;
+		} else return FALSE;
+		return TRUE;
+	}
+
+	function filesize($pathname) {
+		if(!isset($this->_features["SIZE"])) {
+			$this->PushError("filesize", "not supported by server");
+			return FALSE;
+		}
+		if(!$this->_exec("SIZE ".$pathname, "filesize")) return FALSE;
+		if(!$this->_checkCode()) return FALSE;
+		return preg_replace("/^[0-9]{3} ([0-9]+).*$/s", "\\1", $this->_message);
+	}
+
+	function abort() {
+		if(!$this->_exec("ABOR", "abort")) return FALSE;
+		if(!$this->_checkCode()) {
+			if($this->_code!=426) return FALSE;
+			if(!$this->_readmsg("abort")) return FALSE;
+			if(!$this->_checkCode()) return FALSE;
+		}
+		return true;
+	}
+
+	function mdtm($pathname) {
+		if(!isset($this->_features["MDTM"])) {
+			$this->PushError("mdtm", "not supported by server");
+			return FALSE;
+		}
+		if(!$this->_exec("MDTM ".$pathname, "mdtm")) return FALSE;
+		if(!$this->_checkCode()) return FALSE;
+		$mdtm = preg_replace("/^[0-9]{3} ([0-9]+).*$/s", "\\1", $this->_message);
+		$date = sscanf($mdtm, "%4d%2d%2d%2d%2d%2d");
+		$timestamp = mktime($date[3], $date[4], $date[5], $date[1], $date[2], $date[0]);
+		return $timestamp;
+	}
+
+	function systype() {
+		if(!$this->_exec("SYST", "systype")) return FALSE;
+		if(!$this->_checkCode()) return FALSE;
+		$DATA = explode(" ", $this->_message);
+		return array($DATA[1], $DATA[3]);
+	}
+
+	function delete($pathname) {
+		if(!$this->_exec("DELE ".$pathname, "delete")) return FALSE;
+		if(!$this->_checkCode()) return FALSE;
+		return TRUE;
+	}
+
+	function site($command, $fnction="site") {
+		if(!$this->_exec("SITE ".$command, $fnction)) return FALSE;
+		if(!$this->_checkCode()) return FALSE;
+		return TRUE;
+	}
+
+	function chmod($pathname, $mode) {
+		if(!$this->site( sprintf('CHMOD %o %s', $mode, $pathname), "chmod")) return FALSE;
+		return TRUE;
+	}
+
+	function restore($from) {
+		if(!isset($this->_features["REST"])) {
+			$this->PushError("restore", "not supported by server");
+			return FALSE;
+		}
+		if($this->_curtype!=FTP_BINARY) {
+			$this->PushError("restore", "can't restore in ASCII mode");
+			return FALSE;
+		}
+		if(!$this->_exec("REST ".$from, "resore")) return FALSE;
+		if(!$this->_checkCode()) return FALSE;
+		return TRUE;
+	}
+
+	function features() {
+		if(!$this->_exec("FEAT", "features")) return FALSE;
+		if(!$this->_checkCode()) return FALSE;
+		$f=preg_split("/[".CRLF."]+/", preg_replace("/[0-9]{3}[ -].*[".CRLF."]+/", "", $this->_message), -1, PREG_SPLIT_NO_EMPTY);
+		$this->_features=array();
+		foreach($f as $k=>$v) {
+			$v=explode(" ", trim($v));
+			$this->_features[array_shift($v)]=$v;
+		}
+		return true;
+	}
+
+	function rawlist($pathname="", $arg="") {
+		return $this->_list(($arg?" ".$arg:"").($pathname?" ".$pathname:""), "LIST", "rawlist");
+	}
+
+	function nlist($pathname="", $arg="") {
+		return $this->_list(($arg?" ".$arg:"").($pathname?" ".$pathname:""), "NLST", "nlist");
+	}
+
+	function is_exists($pathname) {
+		return $this->file_exists($pathname);
+	}
+
+	function file_exists($pathname) {
+		$exists=true;
+		if(!$this->_exec("RNFR ".$pathname, "rename")) $exists=FALSE;
+		else {
+			if(!$this->_checkCode()) $exists=FALSE;
+			$this->abort();
+		}
+		if($exists) $this->SendMSG("Remote file ".$pathname." exists");
+		else $this->SendMSG("Remote file ".$pathname." does not exist");
+		return $exists;
+	}
+
+	function fget($fp, $remotefile,$rest=0) {
+		if($this->_can_restore and $rest!=0) fseek($fp, $rest);
+		$pi=pathinfo($remotefile);
+		if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII;
+		else $mode=FTP_BINARY;
+		if(!$this->_data_prepare($mode)) {
+			return FALSE;
+		}
+		if($this->_can_restore and $rest!=0) $this->restore($rest);
+		if(!$this->_exec("RETR ".$remotefile, "get")) {
+			$this->_data_close();
+			return FALSE;
+		}
+		if(!$this->_checkCode()) {
+			$this->_data_close();
+			return FALSE;
+		}
+		$out=$this->_data_read($mode, $fp);
+		$this->_data_close();
+		if(!$this->_readmsg()) return FALSE;
+		if(!$this->_checkCode()) return FALSE;
+		return $out;
+	}
+
+	function get($remotefile, $localfile=NULL, $rest=0) {
+		if(is_null($localfile)) $localfile=$remotefile;
+		if (@file_exists($localfile)) $this->SendMSG("Warning : local file will be overwritten");
+		$fp = @fopen($localfile, "w");
+		if (!$fp) {
+			$this->PushError("get","can't open local file", "Cannot create \"".$localfile."\"");
+			return FALSE;
+		}
+		if($this->_can_restore and $rest!=0) fseek($fp, $rest);
+		$pi=pathinfo($remotefile);
+		if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII;
+		else $mode=FTP_BINARY;
+		if(!$this->_data_prepare($mode)) {
+			fclose($fp);
+			return FALSE;
+		}
+		if($this->_can_restore and $rest!=0) $this->restore($rest);
+		if(!$this->_exec("RETR ".$remotefile, "get")) {
+			$this->_data_close();
+			fclose($fp);
+			return FALSE;
+		}
+		if(!$this->_checkCode()) {
+			$this->_data_close();
+			fclose($fp);
+			return FALSE;
+		}
+		$out=$this->_data_read($mode, $fp);
+		fclose($fp);
+		$this->_data_close();
+		if(!$this->_readmsg()) return FALSE;
+		if(!$this->_checkCode()) return FALSE;
+		return $out;
+	}
+
+	function fput($remotefile, $fp) {
+		if($this->_can_restore and $rest!=0) fseek($fp, $rest);
+		$pi=pathinfo($remotefile);
+		if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII;
+		else $mode=FTP_BINARY;
+		if(!$this->_data_prepare($mode)) {
+			return FALSE;
+		}
+		if($this->_can_restore and $rest!=0) $this->restore($rest);
+		if(!$this->_exec("STOR ".$remotefile, "put")) {
+			$this->_data_close();
+			return FALSE;
+		}
+		if(!$this->_checkCode()) {
+			$this->_data_close();
+			return FALSE;
+		}
+		$ret=$this->_data_write($mode, $fp);
+		$this->_data_close();
+		if(!$this->_readmsg()) return FALSE;
+		if(!$this->_checkCode()) return FALSE;
+		return $ret;
+	}
+
+	function put($localfile, $remotefile=NULL, $rest=0) {
+		if(is_null($remotefile)) $remotefile=$localfile;
+		if (!file_exists($localfile)) {
+			$this->PushError("put","can't open local file", "No such file or directory \"".$localfile."\"");
+			return FALSE;
+		}
+		$fp = @fopen($localfile, "r");
+
+		if (!$fp) {
+			$this->PushError("put","can't open local file", "Cannot read file \"".$localfile."\"");
+			return FALSE;
+		}
+		if($this->_can_restore and $rest!=0) fseek($fp, $rest);
+		$pi=pathinfo($localfile);
+		if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII;
+		else $mode=FTP_BINARY;
+		if(!$this->_data_prepare($mode)) {
+			fclose($fp);
+			return FALSE;
+		}
+		if($this->_can_restore and $rest!=0) $this->restore($rest);
+		if(!$this->_exec("STOR ".$remotefile, "put")) {
+			$this->_data_close();
+			fclose($fp);
+			return FALSE;
+		}
+		if(!$this->_checkCode()) {
+			$this->_data_close();
+			fclose($fp);
+			return FALSE;
+		}
+		$ret=$this->_data_write($mode, $fp);
+		fclose($fp);
+		$this->_data_close();
+		if(!$this->_readmsg()) return FALSE;
+		if(!$this->_checkCode()) return FALSE;
+		return $ret;
+	}
+
+	function mput($local=".", $remote=NULL, $continious=false) {
+		$local=realpath($local);
+		if(!@file_exists($local)) {
+			$this->PushError("mput","can't open local folder", "Cannot stat folder \"".$local."\"");
+			return FALSE;
+		}
+		if(!is_dir($local)) return $this->put($local, $remote);
+		if(empty($remote)) $remote=".";
+		elseif(!$this->file_exists($remote) and !$this->mkdir($remote)) return FALSE;
+		if($handle = opendir($local)) {
+			$list=array();
+			while (false !== ($file = readdir($handle))) {
+				if ($file != "." && $file != "..") $list[]=$file;
+			}
+			closedir($handle);
+		} else {
+			$this->PushError("mput","can't open local folder", "Cannot read folder \"".$local."\"");
+			return FALSE;
+		}
+		if(empty($list)) return TRUE;
+		$ret=true;
+		foreach($list as $el) {
+			if(is_dir($local."/".$el)) $t=$this->mput($local."/".$el, $remote."/".$el);
+			else $t=$this->put($local."/".$el, $remote."/".$el);
+			if(!$t) {
+				$ret=FALSE;
+				if(!$continious) break;
+			}
+		}
+		return $ret;
+
+	}
+
+	function mget($remote, $local=".", $continious=false) {
+		$list=$this->rawlist($remote, "-lA");
+		if($list===false) {
+			$this->PushError("mget","can't read remote folder list", "Can't read remote folder \"".$remote."\" contents");
+			return FALSE;
+		}
+		if(empty($list)) return true;
+		if(!@file_exists($local)) {
+			if(!@mkdir($local)) {
+				$this->PushError("mget","can't create local folder", "Cannot create folder \"".$local."\"");
+				return FALSE;
+			}
+		}
+		foreach($list as $k=>$v) {
+			$list[$k]=$this->parselisting($v);
+			if( ! $list[$k] or $list[$k]["name"]=="." or $list[$k]["name"]=="..") unset($list[$k]);
+		}
+		$ret=true;
+		foreach($list as $el) {
+			if($el["type"]=="d") {
+				if(!$this->mget($remote."/".$el["name"], $local."/".$el["name"], $continious)) {
+					$this->PushError("mget", "can't copy folder", "Can't copy remote folder \"".$remote."/".$el["name"]."\" to local \"".$local."/".$el["name"]."\"");
+					$ret=false;
+					if(!$continious) break;
+				}
+			} else {
+				if(!$this->get($remote."/".$el["name"], $local."/".$el["name"])) {
+					$this->PushError("mget", "can't copy file", "Can't copy remote file \"".$remote."/".$el["name"]."\" to local \"".$local."/".$el["name"]."\"");
+					$ret=false;
+					if(!$continious) break;
+				}
+			}
+			@chmod($local."/".$el["name"], $el["perms"]);
+			$t=strtotime($el["date"]);
+			if($t!==-1 and $t!==false) @touch($local."/".$el["name"], $t);
+		}
+		return $ret;
+	}
+
+	function mdel($remote, $continious=false) {
+		$list=$this->rawlist($remote, "-la");
+		if($list===false) {
+			$this->PushError("mdel","can't read remote folder list", "Can't read remote folder \"".$remote."\" contents");
+			return false;
+		}
+
+		foreach($list as $k=>$v) {
+			$list[$k]=$this->parselisting($v);
+			if( ! $list[$k] or $list[$k]["name"]=="." or $list[$k]["name"]=="..") unset($list[$k]);
+		}
+		$ret=true;
+
+		foreach($list as $el) {
+			if ( empty($el) )
+				continue;
+
+			if($el["type"]=="d") {
+				if(!$this->mdel($remote."/".$el["name"], $continious)) {
+					$ret=false;
+					if(!$continious) break;
+				}
+			} else {
+				if (!$this->delete($remote."/".$el["name"])) {
+					$this->PushError("mdel", "can't delete file", "Can't delete remote file \"".$remote."/".$el["name"]."\"");
+					$ret=false;
+					if(!$continious) break;
+				}
+			}
+		}
+
+		if(!$this->rmdir($remote)) {
+			$this->PushError("mdel", "can't delete folder", "Can't delete remote folder \"".$remote."/".$el["name"]."\"");
+			$ret=false;
+		}
+		return $ret;
+	}
+
+	function mmkdir($dir, $mode = 0777) {
+		if(empty($dir)) return FALSE;
+		if($this->is_exists($dir) or $dir == "/" ) return TRUE;
+		if(!$this->mmkdir(dirname($dir), $mode)) return false;
+		$r=$this->mkdir($dir, $mode);
+		$this->chmod($dir,$mode);
+		return $r;
+	}
+
+	function glob($pattern, $handle=NULL) {
+		$path=$output=null;
+		if(PHP_OS=='WIN32') $slash='\\';
+		else $slash='/';
+		$lastpos=strrpos($pattern,$slash);
+		if(!($lastpos===false)) {
+			$path=substr($pattern,0,-$lastpos-1);
+			$pattern=substr($pattern,$lastpos);
+		} else $path=getcwd();
+		if(is_array($handle) and !empty($handle)) {
+			while($dir=each($handle)) {
+				if($this->glob_pattern_match($pattern,$dir))
+				$output[]=$dir;
+			}
+		} else {
+			$handle=@opendir($path);
+			if($handle===false) return false;
+			while($dir=readdir($handle)) {
+				if($this->glob_pattern_match($pattern,$dir))
+				$output[]=$dir;
+			}
+			closedir($handle);
+		}
+		if(is_array($output)) return $output;
+		return false;
+	}
+
+	function glob_pattern_match($pattern,$string) {
+		$out=null;
+		$chunks=explode(';',$pattern);
+		foreach($chunks as $pattern) {
+			$escape=array('$','^','.','{','}','(',')','[',']','|');
+			while(strpos($pattern,'**')!==false)
+				$pattern=str_replace('**','*',$pattern);
+			foreach($escape as $probe)
+				$pattern=str_replace($probe,"\\$probe",$pattern);
+			$pattern=str_replace('?*','*',
+				str_replace('*?','*',
+					str_replace('*',".*",
+						str_replace('?','.{1,1}',$pattern))));
+			$out[]=$pattern;
+		}
+		if(count($out)==1) return($this->glob_regexp("^$out[0]$",$string));
+		else {
+			foreach($out as $tester)
+				if($this->my_regexp("^$tester$",$string)) return true;
+		}
+		return false;
+	}
+
+	function glob_regexp($pattern,$probe) {
+		$sensitive=(PHP_OS!='WIN32');
+		return ($sensitive?
+			preg_match( '/' . preg_quote( $pattern, '/' ) . '/', $probe ) :
+			preg_match( '/' . preg_quote( $pattern, '/' ) . '/i', $probe )
+		);
+	}
+
+	function dirlist($remote) {
+		$list=$this->rawlist($remote, "-la");
+		if($list===false) {
+			$this->PushError("dirlist","can't read remote folder list", "Can't read remote folder \"".$remote."\" contents");
+			return false;
+		}
+
+		$dirlist = array();
+		foreach($list as $k=>$v) {
+			$entry=$this->parselisting($v);
+			if ( empty($entry) )
+				continue;
+
+			if($entry["name"]=="." or $entry["name"]=="..")
+				continue;
+
+			$dirlist[$entry['name']] = $entry;
+		}
+
+		return $dirlist;
+	}
+// <!-- --------------------------------------------------------------------------------------- -->
+// <!--       Private functions                                                                 -->
+// <!-- --------------------------------------------------------------------------------------- -->
+	function _checkCode() {
+		return ($this->_code<400 and $this->_code>0);
+	}
+
+	function _list($arg="", $cmd="LIST", $fnction="_list") {
+		if(!$this->_data_prepare()) return false;
+		if(!$this->_exec($cmd.$arg, $fnction)) {
+			$this->_data_close();
+			return FALSE;
+		}
+		if(!$this->_checkCode()) {
+			$this->_data_close();
+			return FALSE;
+		}
+		$out="";
+		if($this->_code<200) {
+			$out=$this->_data_read();
+			$this->_data_close();
+			if(!$this->_readmsg()) return FALSE;
+			if(!$this->_checkCode()) return FALSE;
+			if($out === FALSE ) return FALSE;
+			$out=preg_split("/[".CRLF."]+/", $out, -1, PREG_SPLIT_NO_EMPTY);
+//			$this->SendMSG(implode($this->_eol_code[$this->OS_local], $out));
+		}
+		return $out;
+	}
+
+// <!-- --------------------------------------------------------------------------------------- -->
+// <!-- Partie : gestion des erreurs                                                            -->
+// <!-- --------------------------------------------------------------------------------------- -->
+// Gnre une erreur pour traitement externe  la classe
+	function PushError($fctname,$msg,$desc=false){
+		$error=array();
+		$error['time']=time();
+		$error['fctname']=$fctname;
+		$error['msg']=$msg;
+		$error['desc']=$desc;
+		if($desc) $tmp=' ('.$desc.')'; else $tmp='';
+		$this->SendMSG($fctname.': '.$msg.$tmp);
+		return(array_push($this->_error_array,$error));
+	}
+
+// Rcupre une erreur externe
+	function PopError(){
+		if(count($this->_error_array)) return(array_pop($this->_error_array));
+			else return(false);
+	}
+}
Index: www/wp-includes/autoload/feed/RSSCache.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/feed/RSSCache.php	(revision )
+++ www/wp-includes/autoload/feed/RSSCache.php	(revision )
@@ -0,0 +1,130 @@
+<?php
+
+class RSSCache {
+	var $BASE_CACHE;	// where the cache files are stored
+	var $MAX_AGE	= 43200;  		// when are files stale, default twelve hours
+	var $ERROR 		= '';			// accumulate error messages
+
+	/**
+	 * PHP5 constructor.
+	 */
+	function __construct( $base = '', $age = '' ) {
+		$this->BASE_CACHE = WP_CONTENT_DIR . '/cache';
+		if ( $base ) {
+			$this->BASE_CACHE = $base;
+		}
+		if ( $age ) {
+			$this->MAX_AGE = $age;
+		}
+
+	}
+
+	/**
+	 * PHP4 constructor.
+	 */
+	public function RSSCache( $base = '', $age = '' ) {
+		self::__construct( $base, $age );
+	}
+
+	/*=======================================================================*\
+		Function:	set
+		Purpose:	add an item to the cache, keyed on url
+		Input:		url from wich the rss file was fetched
+		Output:		true on success
+	\*=======================================================================*/
+	function set ($url, $rss) {
+		$cache_option = 'rss_' . $this->file_name( $url );
+
+		set_transient($cache_option, $rss, $this->MAX_AGE);
+
+		return $cache_option;
+	}
+
+	/*=======================================================================*\
+		Function:	get
+		Purpose:	fetch an item from the cache
+		Input:		url from wich the rss file was fetched
+		Output:		cached object on HIT, false on MISS
+	\*=======================================================================*/
+	function get ($url) {
+		$this->ERROR = "";
+		$cache_option = 'rss_' . $this->file_name( $url );
+
+		if ( ! $rss = get_transient( $cache_option ) ) {
+			$this->debug(
+				"Cache doesn't contain: $url (cache option: $cache_option)"
+			);
+			return 0;
+		}
+
+		return $rss;
+	}
+
+	/*=======================================================================*\
+		Function:	check_cache
+		Purpose:	check a url for membership in the cache
+					and whether the object is older then MAX_AGE (ie. STALE)
+		Input:		url from wich the rss file was fetched
+		Output:		cached object on HIT, false on MISS
+	\*=======================================================================*/
+	function check_cache ( $url ) {
+		$this->ERROR = "";
+		$cache_option = 'rss_' . $this->file_name( $url );
+
+		if ( get_transient($cache_option) ) {
+			// object exists and is current
+			return 'HIT';
+		} else {
+			// object does not exist
+			return 'MISS';
+		}
+	}
+
+	/*=======================================================================*\
+		Function:	serialize
+	\*=======================================================================*/
+	function serialize ( $rss ) {
+		return serialize( $rss );
+	}
+
+	/*=======================================================================*\
+		Function:	unserialize
+	\*=======================================================================*/
+	function unserialize ( $data ) {
+		return unserialize( $data );
+	}
+
+	/*=======================================================================*\
+		Function:	file_name
+		Purpose:	map url to location in cache
+		Input:		url from wich the rss file was fetched
+		Output:		a file name
+	\*=======================================================================*/
+	function file_name ($url) {
+		return md5( $url );
+	}
+
+	/*=======================================================================*\
+		Function:	error
+		Purpose:	register error
+	\*=======================================================================*/
+	function error ($errormsg, $lvl=E_USER_WARNING) {
+		// append PHP's error message if track_errors enabled
+		if ( isset($php_errormsg) ) {
+			$errormsg .= " ($php_errormsg)";
+		}
+		$this->ERROR = $errormsg;
+		if ( MAGPIE_DEBUG ) {
+			trigger_error( $errormsg, $lvl);
+		}
+		else {
+			error_log( $errormsg, 0);
+		}
+	}
+	function debug ($debugmsg, $lvl=E_USER_NOTICE) {
+		if ( MAGPIE_DEBUG ) {
+			$this->error("MagpieRSS [debug] $debugmsg", $lvl);
+		}
+	}
+}
+
Index: www/wp-includes/autoload/requests/Utility/CaseInsensitiveDictionary.php
===================================================================
--- www/wp-includes/autoload/requests/Utility/CaseInsensitiveDictionary.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Utility/CaseInsensitiveDictionary.php	(revision UNDEFINED)
@@ -1,103 +0,0 @@
-<?php
-/**
- * Case-insensitive dictionary, suitable for HTTP headers
- *
- * @package Requests
- * @subpackage Utilities
- */
-
-/**
- * Case-insensitive dictionary, suitable for HTTP headers
- *
- * @package Requests
- * @subpackage Utilities
- */
-class Requests_Utility_CaseInsensitiveDictionary implements ArrayAccess, IteratorAggregate {
-	/**
-	 * Actual item data
-	 *
-	 * @var array
-	 */
-	protected $data = array();
-
-	/**
-	 * Creates a case insensitive dictionary.
-	 *
-	 * @param array $data Dictionary/map to convert to case-insensitive
-	 */
-	public function __construct(array $data = array()) {
-		foreach ($data as $key => $value) {
-			$this->offsetSet($key, $value);
-		}
-	}
-
-	/**
-	 * Check if the given item exists
-	 *
-	 * @param string $key Item key
-	 * @return boolean Does the item exist?
-	 */
-	public function offsetExists($key) {
-		$key = strtolower($key);
-		return isset($this->data[$key]);
-	}
-
-	/**
-	 * Get the value for the item
-	 *
-	 * @param string $key Item key
-	 * @return string Item value
-	 */
-	public function offsetGet($key) {
-		$key = strtolower($key);
-		if (!isset($this->data[$key])) {
-			return null;
-		}
-
-		return $this->data[$key];
-	}
-
-	/**
-	 * Set the given item
-	 *
-	 * @throws Requests_Exception On attempting to use dictionary as list (`invalidset`)
-	 *
-	 * @param string $key Item name
-	 * @param string $value Item value
-	 */
-	public function offsetSet($key, $value) {
-		if ($key === null) {
-			throw new Requests_Exception('Object is a dictionary, not a list', 'invalidset');
-		}
-
-		$key = strtolower($key);
-		$this->data[$key] = $value;
-	}
-
-	/**
-	 * Unset the given header
-	 *
-	 * @param string $key
-	 */
-	public function offsetUnset($key) {
-		unset($this->data[strtolower($key)]);
-	}
-
-	/**
-	 * Get an iterator for the data
-	 *
-	 * @return ArrayIterator
-	 */
-	public function getIterator() {
-		return new ArrayIterator($this->data);
-	}
-
-	/**
-	 * Get the headers as an array
-	 *
-	 * @return array Header data
-	 */
-	public function getAll() {
-		return $this->data;
-	}
-}
Index: www/wp-includes/Requests/Transport/fsockopen.php
===================================================================
--- www/wp-includes/Requests/Transport/fsockopen.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Transport_fsockopen.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/SimplePie/Item.php
===================================================================
--- www/wp-includes/SimplePie/Item.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_Item.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/customize/class-wp-customize-selective-refresh.php
===================================================================
--- www/wp-includes/customize/class-wp-customize-selective-refresh.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Selective_Refresh.php	(revision )
@@ -67,8 +67,6 @@
 	 */
 	public function __construct( WP_Customize_Manager $manager ) {
 		$this->manager = $manager;
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-partial.php' );
-
 		add_action( 'customize_preview_init', array( $this, 'init_preview' ) );
 	}
 
Index: www/wp-includes/class.wp-scripts.php
===================================================================
--- www/wp-includes/class.wp-scripts.php	(revision 38565)
+++ www/wp-includes/autoload/dependency/WP_Scripts.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/customize/class-wp-widget-area-customize-control.php
===================================================================
--- www/wp-includes/autoload/customize/class-wp-widget-area-customize-control.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/customize/class-wp-widget-area-customize-control.php	(revision UNDEFINED)
@@ -1,70 +0,0 @@
-<?php
-/**
- * Customize API: WP_Widget_Area_Customize_Control class
- *
- * @package WordPress
- * @subpackage Customize
- * @since 3.4.0
- */
-
-/**
- * Widget Area Customize Control class.
- *
- * @since 3.9.0
- *
- * @see WP_Customize_Control
- */
-class WP_Widget_Area_Customize_Control extends WP_Customize_Control {
-
-	/**
-	 * Customize control type.
-	 *
-	 * @since 3.9.0
-	 * @access public
-	 * @var string
-	 */
-	public $type = 'sidebar_widgets';
-
-	/**
-	 * Sidebar ID.
-	 *
-	 * @since 3.9.0
-	 * @access public
-	 * @var int|string
-	 */
-	public $sidebar_id;
-
-	/**
-	 * Refreshes the parameters passed to the JavaScript via JSON.
-	 *
-	 * @since 3.9.0
-	 * @access public
-	 */
-	public function to_json() {
-		parent::to_json();
-		$exported_properties = array( 'sidebar_id' );
-		foreach ( $exported_properties as $key ) {
-			$this->json[ $key ] = $this->$key;
-		}
-	}
-
-	/**
-	 * Renders the control's content.
-	 *
-	 * @since 3.9.0
-	 * @access public
-	 */
-	public function render_content() {
-		$id = 'reorder-widgets-desc-' . str_replace( array( '[', ']' ), array( '-', '' ), $this->id );
-		?>
-		<button type="button" class="button-secondary add-new-widget" aria-expanded="false" aria-controls="available-widgets">
-			<?php _e( 'Add a Widget' ); ?>
-		</button>
-		<button type="button" class="button-link reorder-toggle" aria-label="<?php esc_attr_e( 'Reorder widgets' ); ?>" aria-describedby="<?php echo esc_attr( $id ); ?>">
-			<span class="reorder"><?php _ex( 'Reorder', 'Reorder widgets in Customizer' ); ?></span>
-			<span class="reorder-done"><?php _ex( 'Done', 'Cancel reordering widgets in Customizer' ); ?></span>
-		</button>
-		<p class="screen-reader-text" id="<?php echo esc_attr( $id ); ?>"><?php _e( 'When in reorder mode, additional controls to reorder widgets will be available in the widgets list above.' ); ?></p>
-		<?php
-	}
-}
Index: www/wp-includes/ID3/module.audio.ogg.php
===================================================================
--- www/wp-includes/ID3/module.audio.ogg.php	(revision 38565)
+++ www/wp-includes/autoload/id3/getid3_ogg.php	(revision )
@@ -14,8 +14,6 @@
 //                                                            ///
 /////////////////////////////////////////////////////////////////
 
-getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.flac.php', __FILE__, true);
-
 class getid3_ogg extends getid3_handler
 {
 	// http://xiph.org/vorbis/doc/Vorbis_I_spec.html
Index: www/wp-includes/class-wp-http-response.php
===================================================================
--- www/wp-includes/class-wp-http-response.php	(revision 38565)
+++ www/wp-includes/autoload/http/WP_HTTP_Response.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/requests/Response/Headers.php
===================================================================
--- www/wp-includes/autoload/requests/Response/Headers.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Response/Headers.php	(revision UNDEFINED)
@@ -1,98 +0,0 @@
-<?php
-/**
- * Case-insensitive dictionary, suitable for HTTP headers
- *
- * @package Requests
- */
-
-/**
- * Case-insensitive dictionary, suitable for HTTP headers
- *
- * @package Requests
- */
-class Requests_Response_Headers extends Requests_Utility_CaseInsensitiveDictionary {
-	/**
-	 * Get the given header
-	 *
-	 * Unlike {@see self::getValues()}, this returns a string. If there are
-	 * multiple values, it concatenates them with a comma as per RFC2616.
-	 *
-	 * Avoid using this where commas may be used unquoted in values, such as
-	 * Set-Cookie headers.
-	 *
-	 * @param string $key
-	 * @return string Header value
-	 */
-	public function offsetGet($key) {
-		$key = strtolower($key);
-		if (!isset($this->data[$key])) {
-			return null;
-		}
-
-		return $this->flatten($this->data[$key]);
-	}
-
-	/**
-	 * Set the given item
-	 *
-	 * @throws Requests_Exception On attempting to use dictionary as list (`invalidset`)
-	 *
-	 * @param string $key Item name
-	 * @param string $value Item value
-	 */
-	public function offsetSet($key, $value) {
-		if ($key === null) {
-			throw new Requests_Exception('Object is a dictionary, not a list', 'invalidset');
-		}
-
-		$key = strtolower($key);
-
-		if (!isset($this->data[$key])) {
-			$this->data[$key] = array();
-		}
-
-		$this->data[$key][] = $value;
-	}
-
-	/**
-	 * Get all values for a given header
-	 *
-	 * @param string $key
-	 * @return array Header values
-	 */
-	public function getValues($key) {
-		$key = strtolower($key);
-		if (!isset($this->data[$key])) {
-			return null;
-		}
-
-		return $this->data[$key];
-	}
-
-	/**
-	 * Flattens a value into a string
-	 *
-	 * Converts an array into a string by imploding values with a comma, as per
-	 * RFC2616's rules for folding headers.
-	 *
-	 * @param string|array $value Value to flatten
-	 * @return string Flattened value
-	 */
-	public function flatten($value) {
-		if (is_array($value)) {
-			$value = implode(',', $value);
-		}
-
-		return $value;
-	}
-
-	/**
-	 * Get an iterator for the data
-	 *
-	 * Converts the internal
-	 * @return ArrayIterator
-	 */
-	public function getIterator() {
-		return new Requests_Utility_FilteredIterator($this->data, array($this, 'flatten'));
-	}
-}
Index: www/wp-admin/users.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/users.php	(revision 38565)
+++ www/wp-admin/users.php	(revision 38565)
@@ -1,515 +0,0 @@
-<?php
-/**
- * User administration panel
- *
- * @package WordPress
- * @subpackage Administration
- * @since 1.0.0
- */
-
-/** WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-if ( ! current_user_can( 'list_users' ) ) {
-	wp_die(
-		'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-		'<p>' . __( 'Sorry, you are not allowed to browse users.' ) . '</p>',
-		403
-	);
-}
-
-$wp_list_table = _get_list_table('WP_Users_List_Table');
-$pagenum = $wp_list_table->get_pagenum();
-$title = __('Users');
-$parent_file = 'users.php';
-
-add_screen_option( 'per_page' );
-
-// contextual help - choose Help on the top right of admin panel to preview this.
-get_current_screen()->add_help_tab( array(
-	'id'      => 'overview',
-	'title'   => __('Overview'),
-	'content' => '<p>' . __('This screen lists all the existing users for your site. Each user has one of five defined roles as set by the site admin: Site Administrator, Editor, Author, Contributor, or Subscriber. Users with roles other than Administrator will see fewer options in the dashboard navigation when they are logged in, based on their role.') . '</p>' .
-				 '<p>' . __('To add a new user for your site, click the Add New button at the top of the screen or Add New in the Users menu section.') . '</p>'
-) ) ;
-
-get_current_screen()->add_help_tab( array(
-	'id'      => 'screen-display',
-	'title'   => __('Screen Display'),
-	'content' => '<p>' . __('You can customize the display of this screen in a number of ways:') . '</p>' .
-					'<ul>' .
-					'<li>' . __('You can hide/display columns based on your needs and decide how many users to list per screen using the Screen Options tab.') . '</li>' .
-					'<li>' . __( 'You can filter the list of users by User Role using the text links above the users list to show All, Administrator, Editor, Author, Contributor, or Subscriber. The default view is to show all users. Unused User Roles are not listed.' ) . '</li>' .
-					'<li>' . __('You can view all posts made by a user by clicking on the number under the Posts column.') . '</li>' .
-					'</ul>'
-) );
-
-$help = '<p>' . __('Hovering over a row in the users list will display action links that allow you to manage users. You can perform the following actions:') . '</p>' .
-	'<ul>' .
-	'<li>' . __('Edit takes you to the editable profile screen for that user. You can also reach that screen by clicking on the username.') . '</li>';
-
-if ( is_multisite() )
-	$help .= '<li>' . __( 'Remove allows you to remove a user from your site. It does not delete their content. You can also remove multiple users at once by using Bulk Actions.' ) . '</li>';
-else
-	$help .= '<li>' . __( 'Delete brings you to the Delete Users screen for confirmation, where you can permanently remove a user from your site and delete their content. You can also delete multiple users at once by using Bulk Actions.' ) . '</li>';
-
-$help .= '</ul>';
-
-get_current_screen()->add_help_tab( array(
-	'id'      => 'actions',
-	'title'   => __('Actions'),
-	'content' => $help,
-) );
-unset( $help );
-
-get_current_screen()->set_help_sidebar(
-    '<p><strong>' . __('For more information:') . '</strong></p>' .
-    '<p>' . __('<a href="https://codex.wordpress.org/Users_Screen" target="_blank">Documentation on Managing Users</a>') . '</p>' .
-    '<p>' . __('<a href="https://codex.wordpress.org/Roles_and_Capabilities" target="_blank">Descriptions of Roles and Capabilities</a>') . '</p>' .
-    '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
-);
-
-get_current_screen()->set_screen_reader_content( array(
-	'heading_views'      => __( 'Filter users list' ),
-	'heading_pagination' => __( 'Users list navigation' ),
-	'heading_list'       => __( 'Users list' ),
-) );
-
-if ( empty($_REQUEST) ) {
-	$referer = '<input type="hidden" name="wp_http_referer" value="'. esc_attr( wp_unslash( $_SERVER['REQUEST_URI'] ) ) . '" />';
-} elseif ( isset($_REQUEST['wp_http_referer']) ) {
-	$redirect = remove_query_arg(array('wp_http_referer', 'updated', 'delete_count'), wp_unslash( $_REQUEST['wp_http_referer'] ) );
-	$referer = '<input type="hidden" name="wp_http_referer" value="' . esc_attr($redirect) . '" />';
-} else {
-	$redirect = 'users.php';
-	$referer = '';
-}
-
-$update = '';
-
-switch ( $wp_list_table->current_action() ) {
-
-/* Bulk Dropdown menu Role changes */
-case 'promote':
-	check_admin_referer('bulk-users');
-
-	if ( ! current_user_can( 'promote_users' ) )
-		wp_die( __( 'You can&#8217;t edit that user.' ) );
-
-	if ( empty($_REQUEST['users']) ) {
-		wp_redirect($redirect);
-		exit();
-	}
-
-	$editable_roles = get_editable_roles();
-	$role = false;
-	if ( ! empty( $_REQUEST['new_role2'] ) ) {
-		$role = $_REQUEST['new_role2'];
-	} elseif ( ! empty( $_REQUEST['new_role'] ) ) {
-		$role = $_REQUEST['new_role'];
-	}
-
-	if ( ! $role || empty( $editable_roles[ $role ] ) ) {
-		wp_die( __( 'You can&#8217;t give users that role.' ) );
-	}
-
-	$userids = $_REQUEST['users'];
-	$update = 'promote';
-	foreach ( $userids as $id ) {
-		$id = (int) $id;
-
-		if ( ! current_user_can('promote_user', $id) )
-			wp_die(__('You can&#8217;t edit that user.'));
-		// The new role of the current user must also have the promote_users cap or be a multisite super admin
-		if ( $id == $current_user->ID && ! $wp_roles->role_objects[ $role ]->has_cap('promote_users')
-			&& ! ( is_multisite() && is_super_admin() ) ) {
-				$update = 'err_admin_role';
-				continue;
-		}
-
-		// If the user doesn't already belong to the blog, bail.
-		if ( is_multisite() && !is_user_member_of_blog( $id ) ) {
-			wp_die(
-				'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-				'<p>' . __( 'One of the selected users is not a member of this site.' ) . '</p>',
-				403
-			);
-		}
-
-		$user = get_userdata( $id );
-		$user->set_role( $role );
-	}
-
-	wp_redirect(add_query_arg('update', $update, $redirect));
-	exit();
-
-case 'dodelete':
-	if ( is_multisite() )
-		wp_die( __('User deletion is not allowed from this screen.') );
-
-	check_admin_referer('delete-users');
-
-	if ( empty($_REQUEST['users']) ) {
-		wp_redirect($redirect);
-		exit();
-	}
-
-	$userids = array_map( 'intval', (array) $_REQUEST['users'] );
-
-	if ( empty( $_REQUEST['delete_option'] ) ) {
-		$url = self_admin_url( 'users.php?action=delete&users[]=' . implode( '&users[]=', $userids ) . '&error=true' );
-		$url = str_replace( '&amp;', '&', wp_nonce_url( $url, 'bulk-users' ) );
-		wp_redirect( $url );
-		exit;
-	}
-
-	if ( ! current_user_can( 'delete_users' ) )
-		wp_die(__('You can&#8217;t delete users.'));
-
-	$update = 'del';
-	$delete_count = 0;
-
-	foreach ( $userids as $id ) {
-		if ( ! current_user_can( 'delete_user', $id ) )
-			wp_die(__( 'You can&#8217;t delete that user.' ) );
-
-		if ( $id == $current_user->ID ) {
-			$update = 'err_admin_del';
-			continue;
-		}
-		switch ( $_REQUEST['delete_option'] ) {
-		case 'delete':
-			wp_delete_user( $id );
-			break;
-		case 'reassign':
-			wp_delete_user( $id, $_REQUEST['reassign_user'] );
-			break;
-		}
-		++$delete_count;
-	}
-
-	$redirect = add_query_arg( array('delete_count' => $delete_count, 'update' => $update), $redirect);
-	wp_redirect($redirect);
-	exit();
-
-case 'delete':
-	if ( is_multisite() )
-		wp_die( __('User deletion is not allowed from this screen.') );
-
-	check_admin_referer('bulk-users');
-
-	if ( empty($_REQUEST['users']) && empty($_REQUEST['user']) ) {
-		wp_redirect($redirect);
-		exit();
-	}
-
-	if ( ! current_user_can( 'delete_users' ) )
-		$errors = new WP_Error( 'edit_users', __( 'You can&#8217;t delete users.' ) );
-
-	if ( empty($_REQUEST['users']) )
-		$userids = array( intval( $_REQUEST['user'] ) );
-	else
-		$userids = array_map( 'intval', (array) $_REQUEST['users'] );
-
-	$users_have_content = false;
-	if ( $wpdb->get_var( "SELECT ID FROM {$wpdb->posts} WHERE post_author IN( " . implode( ',', $userids ) . " ) LIMIT 1" ) ) {
-		$users_have_content = true;
-	} elseif ( $wpdb->get_var( "SELECT link_id FROM {$wpdb->links} WHERE link_owner IN( " . implode( ',', $userids ) . " ) LIMIT 1" ) ) {
-		$users_have_content = true;
-	}
-
-	if ( $users_have_content ) {
-		add_action( 'admin_head', 'delete_users_add_js' );
-	}
-
-	include( ABSPATH . 'wp-admin/admin-header.php' );
-?>
-<form method="post" name="updateusers" id="updateusers">
-<?php wp_nonce_field('delete-users') ?>
-<?php echo $referer; ?>
-
-<div class="wrap">
-<h1><?php _e( 'Delete Users' ); ?></h1>
-<?php if ( isset( $_REQUEST['error'] ) ) : ?>
-	<div class="error">
-		<p><strong><?php _e( 'ERROR:' ); ?></strong> <?php _e( 'Please select an option.' ); ?></p>
-	</div>
-<?php endif; ?>
-
-<?php if ( 1 == count( $userids ) ) : ?>
-	<p><?php _e( 'You have specified this user for deletion:' ); ?></p>
-<?php else : ?>
-	<p><?php _e( 'You have specified these users for deletion:' ); ?></p>
-<?php endif; ?>
-
-<ul>
-<?php
-	$go_delete = 0;
-	foreach ( $userids as $id ) {
-		$user = get_userdata( $id );
-		if ( $id == $current_user->ID ) {
-			/* translators: 1: user id, 2: user login */
-			echo "<li>" . sprintf(__('ID #%1$s: %2$s <strong>The current user will not be deleted.</strong>'), $id, $user->user_login) . "</li>\n";
-		} else {
-			/* translators: 1: user id, 2: user login */
-			echo "<li><input type=\"hidden\" name=\"users[]\" value=\"" . esc_attr($id) . "\" />" . sprintf(__('ID #%1$s: %2$s'), $id, $user->user_login) . "</li>\n";
-			$go_delete++;
-		}
-	}
-	?>
-	</ul>
-<?php if ( $go_delete ) :
-
-	if ( ! $users_have_content ) : ?>
-		<input type="hidden" name="delete_option" value="delete" />
-	<?php else: ?>
-		<?php if ( 1 == $go_delete ) : ?>
-			<fieldset><p><legend><?php _e( 'What should be done with content owned by this user?' ); ?></legend></p>
-		<?php else : ?>
-			<fieldset><p><legend><?php _e( 'What should be done with content owned by these users?' ); ?></legend></p>
-		<?php endif; ?>
-		<ul style="list-style:none;">
-			<li><label><input type="radio" id="delete_option0" name="delete_option" value="delete" />
-			<?php _e('Delete all content.'); ?></label></li>
-			<li><input type="radio" id="delete_option1" name="delete_option" value="reassign" />
-			<?php echo '<label for="delete_option1">' . __( 'Attribute all content to:' ) . '</label> ';
-			wp_dropdown_users( array(
-				'name' => 'reassign_user',
-				'exclude' => array_diff( $userids, array( $current_user->ID ) ),
-				'show' => 'display_name_with_login',
-			) ); ?></li>
-		</ul></fieldset>
-	<?php endif;
-	/**
-	 * Fires at the end of the delete users form prior to the confirm button.
-	 *
-	 * @since 4.0.0
-	 * @since 4.5.0 The `$userids` parameter was added.
-	 *
-	 * @param WP_User $current_user WP_User object for the current user.
-	 * @param array   $userids      Array of IDs for users being deleted.
-	 */
-	do_action( 'delete_user_form', $current_user, $userids );
-	?>
-	<input type="hidden" name="action" value="dodelete" />
-	<?php submit_button( __('Confirm Deletion'), 'primary' ); ?>
-<?php else : ?>
-	<p><?php _e('There are no valid users selected for deletion.'); ?></p>
-<?php endif; ?>
-</div>
-</form>
-<?php
-
-break;
-
-case 'doremove':
-	check_admin_referer('remove-users');
-
-	if ( ! is_multisite() )
-		wp_die( __( 'You can&#8217;t remove users.' ) );
-
-	if ( empty($_REQUEST['users']) ) {
-		wp_redirect($redirect);
-		exit;
-	}
-
-	if ( ! current_user_can( 'remove_users' ) )
-		wp_die( __( 'You can&#8217;t remove users.' ) );
-
-	$userids = $_REQUEST['users'];
-
-	$update = 'remove';
- 	foreach ( $userids as $id ) {
-		$id = (int) $id;
-		if ( $id == $current_user->ID && !is_super_admin() ) {
-			$update = 'err_admin_remove';
-			continue;
-		}
-		if ( !current_user_can('remove_user', $id) ) {
-			$update = 'err_admin_remove';
-			continue;
-		}
-		remove_user_from_blog($id, $blog_id);
-	}
-
-	$redirect = add_query_arg( array('update' => $update), $redirect);
-	wp_redirect($redirect);
-	exit;
-
-case 'remove':
-
-	check_admin_referer('bulk-users');
-
-	if ( ! is_multisite() )
-		wp_die( __( 'You can&#8217;t remove users.' ) );
-
-	if ( empty($_REQUEST['users']) && empty($_REQUEST['user']) ) {
-		wp_redirect($redirect);
-		exit();
-	}
-
-	if ( !current_user_can('remove_users') )
-		$error = new WP_Error('edit_users', __('You can&#8217;t remove users.'));
-
-	if ( empty($_REQUEST['users']) )
-		$userids = array(intval($_REQUEST['user']));
-	else
-		$userids = $_REQUEST['users'];
-
-	include( ABSPATH . 'wp-admin/admin-header.php' );
-?>
-<form method="post" name="updateusers" id="updateusers">
-<?php wp_nonce_field('remove-users') ?>
-<?php echo $referer; ?>
-
-<div class="wrap">
-<h1><?php _e( 'Remove Users from Site' ); ?></h1>
-
-<?php if ( 1 == count( $userids ) ) : ?>
-	<p><?php _e( 'You have specified this user for removal:' ); ?></p>
-<?php else : ?>
-	<p><?php _e( 'You have specified these users for removal:' ); ?></p>
-<?php endif; ?>
-
-<ul>
-<?php
-	$go_remove = false;
- 	foreach ( $userids as $id ) {
-		$id = (int) $id;
- 		$user = get_userdata( $id );
-		if ( $id == $current_user->ID && !is_super_admin() ) {
-			/* translators: 1: user id, 2: user login */
-			echo "<li>" . sprintf(__('ID #%1$s: %2$s <strong>The current user will not be removed.</strong>'), $id, $user->user_login) . "</li>\n";
-		} elseif ( !current_user_can('remove_user', $id) ) {
-			/* translators: 1: user id, 2: user login */
-			echo "<li>" . sprintf(__('ID #%1$s: %2$s <strong>You don&#8217;t have permission to remove this user.</strong>'), $id, $user->user_login) . "</li>\n";
-		} else {
-			/* translators: 1: user id, 2: user login */
-			echo "<li><input type=\"hidden\" name=\"users[]\" value=\"{$id}\" />" . sprintf(__('ID #%1$s: %2$s'), $id, $user->user_login) . "</li>\n";
-			$go_remove = true;
-		}
- 	}
- 	?>
-</ul>
-<?php if ( $go_remove ) : ?>
-		<input type="hidden" name="action" value="doremove" />
-		<?php submit_button( __('Confirm Removal'), 'primary' ); ?>
-<?php else : ?>
-	<p><?php _e('There are no valid users selected for removal.'); ?></p>
-<?php endif; ?>
-</div>
-</form>
-<?php
-
-break;
-
-default:
-
-	if ( !empty($_GET['_wp_http_referer']) ) {
-		wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce'), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
-		exit;
-	}
-
-	$wp_list_table->prepare_items();
-	$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
-	if ( $pagenum > $total_pages && $total_pages > 0 ) {
-		wp_redirect( add_query_arg( 'paged', $total_pages ) );
-		exit;
-	}
-
-	include( ABSPATH . 'wp-admin/admin-header.php' );
-
-	$messages = array();
-	if ( isset($_GET['update']) ) :
-		switch($_GET['update']) {
-		case 'del':
-		case 'del_many':
-			$delete_count = isset($_GET['delete_count']) ? (int) $_GET['delete_count'] : 0;
-			if ( 1 == $delete_count ) {
-				$message = __( 'User deleted.' );
-			} else {
-				$message = _n( '%s user deleted.', '%s users deleted.', $delete_count );
-			}
-			$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $delete_count ) ) . '</p></div>';
-			break;
-		case 'add':
-			if ( isset( $_GET['id'] ) && ( $user_id = $_GET['id'] ) && current_user_can( 'edit_user', $user_id ) ) {
-				/* translators: %s: edit page url */
-				$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( __( 'New user created. <a href="%s">Edit user</a>' ),
-					esc_url( add_query_arg( 'wp_http_referer', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ),
-						self_admin_url( 'user-edit.php?user_id=' . $user_id ) ) ) ) . '</p></div>';
-			} else {
-				$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __( 'New user created.' ) . '</p></div>';
-			}
-			break;
-		case 'promote':
-			$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __('Changed roles.') . '</p></div>';
-			break;
-		case 'err_admin_role':
-			$messages[] = '<div id="message" class="error notice is-dismissible"><p>' . __('The current user&#8217;s role must have user editing capabilities.') . '</p></div>';
-			$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __('Other user roles have been changed.') . '</p></div>';
-			break;
-		case 'err_admin_del':
-			$messages[] = '<div id="message" class="error notice is-dismissible"><p>' . __('You can&#8217;t delete the current user.') . '</p></div>';
-			$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __('Other users have been deleted.') . '</p></div>';
-			break;
-		case 'remove':
-			$messages[] = '<div id="message" class="updated notice is-dismissible fade"><p>' . __('User removed from this site.') . '</p></div>';
-			break;
-		case 'err_admin_remove':
-			$messages[] = '<div id="message" class="error notice is-dismissible"><p>' . __("You can't remove the current user.") . '</p></div>';
-			$messages[] = '<div id="message" class="updated notice is-dismissible fade"><p>' . __('Other users have been removed.') . '</p></div>';
-			break;
-		}
-	endif; ?>
-
-<?php if ( isset($errors) && is_wp_error( $errors ) ) : ?>
-	<div class="error">
-		<ul>
-		<?php
-			foreach ( $errors->get_error_messages() as $err )
-				echo "<li>$err</li>\n";
-		?>
-		</ul>
-	</div>
-<?php endif;
-
-if ( ! empty($messages) ) {
-	foreach ( $messages as $msg )
-		echo $msg;
-} ?>
-
-<div class="wrap">
-<h1>
-<?php
-echo esc_html( $title );
-if ( current_user_can( 'create_users' ) ) { ?>
-	<a href="<?php echo admin_url( 'user-new.php' ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
-<?php } elseif ( is_multisite() && current_user_can( 'promote_users' ) ) { ?>
-	<a href="<?php echo admin_url( 'user-new.php' ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
-<?php }
-
-if ( strlen( $usersearch ) ) {
-	/* translators: %s: search keywords */
-	printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $usersearch ) );
-}
-?>
-</h1>
-
-<?php $wp_list_table->views(); ?>
-
-<form method="get">
-
-<?php $wp_list_table->search_box( __( 'Search Users' ), 'user' ); ?>
-
-<?php $wp_list_table->display(); ?>
-</form>
-
-<br class="clear" />
-</div>
-<?php
-break;
-
-} // end of the $doaction switch
-
-include( ABSPATH . 'wp-admin/admin-footer.php' );
Index: www/wp-includes/customize/class-wp-customize-partial.php
===================================================================
--- www/wp-includes/customize/class-wp-customize-partial.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Partial.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/id3/ID3/module.audio.mp3.php
===================================================================
--- www/wp-includes/autoload/id3/ID3/module.audio.mp3.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/id3/ID3/module.audio.mp3.php	(revision UNDEFINED)
@@ -1,2012 +0,0 @@
-<?php
-/////////////////////////////////////////////////////////////////
-/// getID3() by James Heinrich <info@getid3.org>               //
-//  available at http://getid3.sourceforge.net                 //
-//            or http://www.getid3.org                         //
-//          also https://github.com/JamesHeinrich/getID3       //
-/////////////////////////////////////////////////////////////////
-// See readme.txt for more details                             //
-/////////////////////////////////////////////////////////////////
-//                                                             //
-// module.audio.mp3.php                                        //
-// module for analyzing MP3 files                              //
-// dependencies: NONE                                          //
-//                                                            ///
-/////////////////////////////////////////////////////////////////
-
-
-// number of frames to scan to determine if MPEG-audio sequence is valid
-// Lower this number to 5-20 for faster scanning
-// Increase this number to 50+ for most accurate detection of valid VBR/CBR
-// mpeg-audio streams
-define('GETID3_MP3_VALID_CHECK_FRAMES', 35);
-
-
-class getid3_mp3 extends getid3_handler
-{
-
-	public $allow_bruteforce = false; // forces getID3() to scan the file byte-by-byte and log all the valid audio frame headers - extremely slow, unrecommended, but may provide data from otherwise-unusuable files
-
-	public function Analyze() {
-		$info = &$this->getid3->info;
-
-		$initialOffset = $info['avdataoffset'];
-
-		if (!$this->getOnlyMPEGaudioInfo($info['avdataoffset'])) {
-			if ($this->allow_bruteforce) {
-				$info['error'][] = 'Rescanning file in BruteForce mode';
-				$this->getOnlyMPEGaudioInfoBruteForce($this->getid3->fp, $info);
-			}
-		}
-
-
-		if (isset($info['mpeg']['audio']['bitrate_mode'])) {
-			$info['audio']['bitrate_mode'] = strtolower($info['mpeg']['audio']['bitrate_mode']);
-		}
-
-		if (((isset($info['id3v2']['headerlength']) && ($info['avdataoffset'] > $info['id3v2']['headerlength'])) || (!isset($info['id3v2']) && ($info['avdataoffset'] > 0) && ($info['avdataoffset'] != $initialOffset)))) {
-
-			$synchoffsetwarning = 'Unknown data before synch ';
-			if (isset($info['id3v2']['headerlength'])) {
-				$synchoffsetwarning .= '(ID3v2 header ends at '.$info['id3v2']['headerlength'].', then '.($info['avdataoffset'] - $info['id3v2']['headerlength']).' bytes garbage, ';
-			} elseif ($initialOffset > 0) {
-				$synchoffsetwarning .= '(should be at '.$initialOffset.', ';
-			} else {
-				$synchoffsetwarning .= '(should be at beginning of file, ';
-			}
-			$synchoffsetwarning .= 'synch detected at '.$info['avdataoffset'].')';
-			if (isset($info['audio']['bitrate_mode']) && ($info['audio']['bitrate_mode'] == 'cbr')) {
-
-				if (!empty($info['id3v2']['headerlength']) && (($info['avdataoffset'] - $info['id3v2']['headerlength']) == $info['mpeg']['audio']['framelength'])) {
-
-					$synchoffsetwarning .= '. This is a known problem with some versions of LAME (3.90-3.92) DLL in CBR mode.';
-					$info['audio']['codec'] = 'LAME';
-					$CurrentDataLAMEversionString = 'LAME3.';
-
-				} elseif (empty($info['id3v2']['headerlength']) && ($info['avdataoffset'] == $info['mpeg']['audio']['framelength'])) {
-
-					$synchoffsetwarning .= '. This is a known problem with some versions of LAME (3.90 - 3.92) DLL in CBR mode.';
-					$info['audio']['codec'] = 'LAME';
-					$CurrentDataLAMEversionString = 'LAME3.';
-
-				}
-
-			}
-			$info['warning'][] = $synchoffsetwarning;
-
-		}
-
-		if (isset($info['mpeg']['audio']['LAME'])) {
-			$info['audio']['codec'] = 'LAME';
-			if (!empty($info['mpeg']['audio']['LAME']['long_version'])) {
-				$info['audio']['encoder'] = rtrim($info['mpeg']['audio']['LAME']['long_version'], "\x00");
-			} elseif (!empty($info['mpeg']['audio']['LAME']['short_version'])) {
-				$info['audio']['encoder'] = rtrim($info['mpeg']['audio']['LAME']['short_version'], "\x00");
-			}
-		}
-
-		$CurrentDataLAMEversionString = (!empty($CurrentDataLAMEversionString) ? $CurrentDataLAMEversionString : (isset($info['audio']['encoder']) ? $info['audio']['encoder'] : ''));
-		if (!empty($CurrentDataLAMEversionString) && (substr($CurrentDataLAMEversionString, 0, 6) == 'LAME3.') && !preg_match('[0-9\)]', substr($CurrentDataLAMEversionString, -1))) {
-			// a version number of LAME that does not end with a number like "LAME3.92"
-			// or with a closing parenthesis like "LAME3.88 (alpha)"
-			// or a version of LAME with the LAMEtag-not-filled-in-DLL-mode bug (3.90-3.92)
-
-			// not sure what the actual last frame length will be, but will be less than or equal to 1441
-			$PossiblyLongerLAMEversion_FrameLength = 1441;
-
-			// Not sure what version of LAME this is - look in padding of last frame for longer version string
-			$PossibleLAMEversionStringOffset = $info['avdataend'] - $PossiblyLongerLAMEversion_FrameLength;
-			$this->fseek($PossibleLAMEversionStringOffset);
-			$PossiblyLongerLAMEversion_Data = $this->fread($PossiblyLongerLAMEversion_FrameLength);
-			switch (substr($CurrentDataLAMEversionString, -1)) {
-				case 'a':
-				case 'b':
-					// "LAME3.94a" will have a longer version string of "LAME3.94 (alpha)" for example
-					// need to trim off "a" to match longer string
-					$CurrentDataLAMEversionString = substr($CurrentDataLAMEversionString, 0, -1);
-					break;
-			}
-			if (($PossiblyLongerLAMEversion_String = strstr($PossiblyLongerLAMEversion_Data, $CurrentDataLAMEversionString)) !== false) {
-				if (substr($PossiblyLongerLAMEversion_String, 0, strlen($CurrentDataLAMEversionString)) == $CurrentDataLAMEversionString) {
-					$PossiblyLongerLAMEversion_NewString = substr($PossiblyLongerLAMEversion_String, 0, strspn($PossiblyLongerLAMEversion_String, 'LAME0123456789., (abcdefghijklmnopqrstuvwxyzJFSOND)')); //"LAME3.90.3"  "LAME3.87 (beta 1, Sep 27 2000)" "LAME3.88 (beta)"
-					if (empty($info['audio']['encoder']) || (strlen($PossiblyLongerLAMEversion_NewString) > strlen($info['audio']['encoder']))) {
-						$info['audio']['encoder'] = $PossiblyLongerLAMEversion_NewString;
-					}
-				}
-			}
-		}
-		if (!empty($info['audio']['encoder'])) {
-			$info['audio']['encoder'] = rtrim($info['audio']['encoder'], "\x00 ");
-		}
-
-		switch (isset($info['mpeg']['audio']['layer']) ? $info['mpeg']['audio']['layer'] : '') {
-			case 1:
-			case 2:
-				$info['audio']['dataformat'] = 'mp'.$info['mpeg']['audio']['layer'];
-				break;
-		}
-		if (isset($info['fileformat']) && ($info['fileformat'] == 'mp3')) {
-			switch ($info['audio']['dataformat']) {
-				case 'mp1':
-				case 'mp2':
-				case 'mp3':
-					$info['fileformat'] = $info['audio']['dataformat'];
-					break;
-
-				default:
-					$info['warning'][] = 'Expecting [audio][dataformat] to be mp1/mp2/mp3 when fileformat == mp3, [audio][dataformat] actually "'.$info['audio']['dataformat'].'"';
-					break;
-			}
-		}
-
-		if (empty($info['fileformat'])) {
-			unset($info['fileformat']);
-			unset($info['audio']['bitrate_mode']);
-			unset($info['avdataoffset']);
-			unset($info['avdataend']);
-			return false;
-		}
-
-		$info['mime_type']         = 'audio/mpeg';
-		$info['audio']['lossless'] = false;
-
-		// Calculate playtime
-		if (!isset($info['playtime_seconds']) && isset($info['audio']['bitrate']) && ($info['audio']['bitrate'] > 0)) {
-			$info['playtime_seconds'] = ($info['avdataend'] - $info['avdataoffset']) * 8 / $info['audio']['bitrate'];
-		}
-
-		$info['audio']['encoder_options'] = $this->GuessEncoderOptions();
-
-		return true;
-	}
-
-
-	public function GuessEncoderOptions() {
-		// shortcuts
-		$info = &$this->getid3->info;
-		if (!empty($info['mpeg']['audio'])) {
-			$thisfile_mpeg_audio = &$info['mpeg']['audio'];
-			if (!empty($thisfile_mpeg_audio['LAME'])) {
-				$thisfile_mpeg_audio_lame = &$thisfile_mpeg_audio['LAME'];
-			}
-		}
-
-		$encoder_options = '';
-		static $NamedPresetBitrates = array(16, 24, 40, 56, 112, 128, 160, 192, 256);
-
-		if (isset($thisfile_mpeg_audio['VBR_method']) && ($thisfile_mpeg_audio['VBR_method'] == 'Fraunhofer') && !empty($thisfile_mpeg_audio['VBR_quality'])) {
-
-			$encoder_options = 'VBR q'.$thisfile_mpeg_audio['VBR_quality'];
-
-		} elseif (!empty($thisfile_mpeg_audio_lame['preset_used']) && (!in_array($thisfile_mpeg_audio_lame['preset_used_id'], $NamedPresetBitrates))) {
-
-			$encoder_options = $thisfile_mpeg_audio_lame['preset_used'];
-
-		} elseif (!empty($thisfile_mpeg_audio_lame['vbr_quality'])) {
-
-			static $KnownEncoderValues = array();
-			if (empty($KnownEncoderValues)) {
-
-				//$KnownEncoderValues[abrbitrate_minbitrate][vbr_quality][raw_vbr_method][raw_noise_shaping][raw_stereo_mode][ath_type][lowpass_frequency] = 'preset name';
-				$KnownEncoderValues[0xFF][58][1][1][3][2][20500] = '--alt-preset insane';        // 3.90,   3.90.1, 3.92
-				$KnownEncoderValues[0xFF][58][1][1][3][2][20600] = '--alt-preset insane';        // 3.90.2, 3.90.3, 3.91
-				$KnownEncoderValues[0xFF][57][1][1][3][4][20500] = '--alt-preset insane';        // 3.94,   3.95
-				$KnownEncoderValues['**'][78][3][2][3][2][19500] = '--alt-preset extreme';       // 3.90,   3.90.1, 3.92
-				$KnownEncoderValues['**'][78][3][2][3][2][19600] = '--alt-preset extreme';       // 3.90.2, 3.91
-				$KnownEncoderValues['**'][78][3][1][3][2][19600] = '--alt-preset extreme';       // 3.90.3
-				$KnownEncoderValues['**'][78][4][2][3][2][19500] = '--alt-preset fast extreme';  // 3.90,   3.90.1, 3.92
-				$KnownEncoderValues['**'][78][4][2][3][2][19600] = '--alt-preset fast extreme';  // 3.90.2, 3.90.3, 3.91
-				$KnownEncoderValues['**'][78][3][2][3][4][19000] = '--alt-preset standard';      // 3.90,   3.90.1, 3.90.2, 3.91, 3.92
-				$KnownEncoderValues['**'][78][3][1][3][4][19000] = '--alt-preset standard';      // 3.90.3
-				$KnownEncoderValues['**'][78][4][2][3][4][19000] = '--alt-preset fast standard'; // 3.90,   3.90.1, 3.90.2, 3.91, 3.92
-				$KnownEncoderValues['**'][78][4][1][3][4][19000] = '--alt-preset fast standard'; // 3.90.3
-				$KnownEncoderValues['**'][88][4][1][3][3][19500] = '--r3mix';                    // 3.90,   3.90.1, 3.92
-				$KnownEncoderValues['**'][88][4][1][3][3][19600] = '--r3mix';                    // 3.90.2, 3.90.3, 3.91
-				$KnownEncoderValues['**'][67][4][1][3][4][18000] = '--r3mix';                    // 3.94,   3.95
-				$KnownEncoderValues['**'][68][3][2][3][4][18000] = '--alt-preset medium';        // 3.90.3
-				$KnownEncoderValues['**'][68][4][2][3][4][18000] = '--alt-preset fast medium';   // 3.90.3
-
-				$KnownEncoderValues[0xFF][99][1][1][1][2][0]     = '--preset studio';            // 3.90,   3.90.1, 3.90.2, 3.91, 3.92
-				$KnownEncoderValues[0xFF][58][2][1][3][2][20600] = '--preset studio';            // 3.90.3, 3.93.1
-				$KnownEncoderValues[0xFF][58][2][1][3][2][20500] = '--preset studio';            // 3.93
-				$KnownEncoderValues[0xFF][57][2][1][3][4][20500] = '--preset studio';            // 3.94,   3.95
-				$KnownEncoderValues[0xC0][88][1][1][1][2][0]     = '--preset cd';                // 3.90,   3.90.1, 3.90.2,   3.91, 3.92
-				$KnownEncoderValues[0xC0][58][2][2][3][2][19600] = '--preset cd';                // 3.90.3, 3.93.1
-				$KnownEncoderValues[0xC0][58][2][2][3][2][19500] = '--preset cd';                // 3.93
-				$KnownEncoderValues[0xC0][57][2][1][3][4][19500] = '--preset cd';                // 3.94,   3.95
-				$KnownEncoderValues[0xA0][78][1][1][3][2][18000] = '--preset hifi';              // 3.90,   3.90.1, 3.90.2,   3.91, 3.92
-				$KnownEncoderValues[0xA0][58][2][2][3][2][18000] = '--preset hifi';              // 3.90.3, 3.93,   3.93.1
-				$KnownEncoderValues[0xA0][57][2][1][3][4][18000] = '--preset hifi';              // 3.94,   3.95
-				$KnownEncoderValues[0x80][67][1][1][3][2][18000] = '--preset tape';              // 3.90,   3.90.1, 3.90.2,   3.91, 3.92
-				$KnownEncoderValues[0x80][67][1][1][3][2][15000] = '--preset radio';             // 3.90,   3.90.1, 3.90.2,   3.91, 3.92
-				$KnownEncoderValues[0x70][67][1][1][3][2][15000] = '--preset fm';                // 3.90,   3.90.1, 3.90.2,   3.91, 3.92
-				$KnownEncoderValues[0x70][58][2][2][3][2][16000] = '--preset tape/radio/fm';     // 3.90.3, 3.93,   3.93.1
-				$KnownEncoderValues[0x70][57][2][1][3][4][16000] = '--preset tape/radio/fm';     // 3.94,   3.95
-				$KnownEncoderValues[0x38][58][2][2][0][2][10000] = '--preset voice';             // 3.90.3, 3.93,   3.93.1
-				$KnownEncoderValues[0x38][57][2][1][0][4][15000] = '--preset voice';             // 3.94,   3.95
-				$KnownEncoderValues[0x38][57][2][1][0][4][16000] = '--preset voice';             // 3.94a14
-				$KnownEncoderValues[0x28][65][1][1][0][2][7500]  = '--preset mw-us';             // 3.90,   3.90.1, 3.92
-				$KnownEncoderValues[0x28][65][1][1][0][2][7600]  = '--preset mw-us';             // 3.90.2, 3.91
-				$KnownEncoderValues[0x28][58][2][2][0][2][7000]  = '--preset mw-us';             // 3.90.3, 3.93,   3.93.1
-				$KnownEncoderValues[0x28][57][2][1][0][4][10500] = '--preset mw-us';             // 3.94,   3.95
-				$KnownEncoderValues[0x28][57][2][1][0][4][11200] = '--preset mw-us';             // 3.94a14
-				$KnownEncoderValues[0x28][57][2][1][0][4][8800]  = '--preset mw-us';             // 3.94a15
-				$KnownEncoderValues[0x18][58][2][2][0][2][4000]  = '--preset phon+/lw/mw-eu/sw'; // 3.90.3, 3.93.1
-				$KnownEncoderValues[0x18][58][2][2][0][2][3900]  = '--preset phon+/lw/mw-eu/sw'; // 3.93
-				$KnownEncoderValues[0x18][57][2][1][0][4][5900]  = '--preset phon+/lw/mw-eu/sw'; // 3.94,   3.95
-				$KnownEncoderValues[0x18][57][2][1][0][4][6200]  = '--preset phon+/lw/mw-eu/sw'; // 3.94a14
-				$KnownEncoderValues[0x18][57][2][1][0][4][3200]  = '--preset phon+/lw/mw-eu/sw'; // 3.94a15
-				$KnownEncoderValues[0x10][58][2][2][0][2][3800]  = '--preset phone';             // 3.90.3, 3.93.1
-				$KnownEncoderValues[0x10][58][2][2][0][2][3700]  = '--preset phone';             // 3.93
-				$KnownEncoderValues[0x10][57][2][1][0][4][5600]  = '--preset phone';             // 3.94,   3.95
-			}
-
-			if (isset($KnownEncoderValues[$thisfile_mpeg_audio_lame['raw']['abrbitrate_minbitrate']][$thisfile_mpeg_audio_lame['vbr_quality']][$thisfile_mpeg_audio_lame['raw']['vbr_method']][$thisfile_mpeg_audio_lame['raw']['noise_shaping']][$thisfile_mpeg_audio_lame['raw']['stereo_mode']][$thisfile_mpeg_audio_lame['ath_type']][$thisfile_mpeg_audio_lame['lowpass_frequency']])) {
-
-				$encoder_options = $KnownEncoderValues[$thisfile_mpeg_audio_lame['raw']['abrbitrate_minbitrate']][$thisfile_mpeg_audio_lame['vbr_quality']][$thisfile_mpeg_audio_lame['raw']['vbr_method']][$thisfile_mpeg_audio_lame['raw']['noise_shaping']][$thisfile_mpeg_audio_lame['raw']['stereo_mode']][$thisfile_mpeg_audio_lame['ath_type']][$thisfile_mpeg_audio_lame['lowpass_frequency']];
-
-			} elseif (isset($KnownEncoderValues['**'][$thisfile_mpeg_audio_lame['vbr_quality']][$thisfile_mpeg_audio_lame['raw']['vbr_method']][$thisfile_mpeg_audio_lame['raw']['noise_shaping']][$thisfile_mpeg_audio_lame['raw']['stereo_mode']][$thisfile_mpeg_audio_lame['ath_type']][$thisfile_mpeg_audio_lame['lowpass_frequency']])) {
-
-				$encoder_options = $KnownEncoderValues['**'][$thisfile_mpeg_audio_lame['vbr_quality']][$thisfile_mpeg_audio_lame['raw']['vbr_method']][$thisfile_mpeg_audio_lame['raw']['noise_shaping']][$thisfile_mpeg_audio_lame['raw']['stereo_mode']][$thisfile_mpeg_audio_lame['ath_type']][$thisfile_mpeg_audio_lame['lowpass_frequency']];
-
-			} elseif ($info['audio']['bitrate_mode'] == 'vbr') {
-
-				// http://gabriel.mp3-tech.org/mp3infotag.html
-				// int    Quality = (100 - 10 * gfp->VBR_q - gfp->quality)h
-
-
-				$LAME_V_value = 10 - ceil($thisfile_mpeg_audio_lame['vbr_quality'] / 10);
-				$LAME_q_value = 100 - $thisfile_mpeg_audio_lame['vbr_quality'] - ($LAME_V_value * 10);
-				$encoder_options = '-V'.$LAME_V_value.' -q'.$LAME_q_value;
-
-			} elseif ($info['audio']['bitrate_mode'] == 'cbr') {
-
-				$encoder_options = strtoupper($info['audio']['bitrate_mode']).ceil($info['audio']['bitrate'] / 1000);
-
-			} else {
-
-				$encoder_options = strtoupper($info['audio']['bitrate_mode']);
-
-			}
-
-		} elseif (!empty($thisfile_mpeg_audio_lame['bitrate_abr'])) {
-
-			$encoder_options = 'ABR'.$thisfile_mpeg_audio_lame['bitrate_abr'];
-
-		} elseif (!empty($info['audio']['bitrate'])) {
-
-			if ($info['audio']['bitrate_mode'] == 'cbr') {
-				$encoder_options = strtoupper($info['audio']['bitrate_mode']).ceil($info['audio']['bitrate'] / 1000);
-			} else {
-				$encoder_options = strtoupper($info['audio']['bitrate_mode']);
-			}
-
-		}
-		if (!empty($thisfile_mpeg_audio_lame['bitrate_min'])) {
-			$encoder_options .= ' -b'.$thisfile_mpeg_audio_lame['bitrate_min'];
-		}
-
-		if (!empty($thisfile_mpeg_audio_lame['encoding_flags']['nogap_prev']) || !empty($thisfile_mpeg_audio_lame['encoding_flags']['nogap_next'])) {
-			$encoder_options .= ' --nogap';
-		}
-
-		if (!empty($thisfile_mpeg_audio_lame['lowpass_frequency'])) {
-			$ExplodedOptions = explode(' ', $encoder_options, 4);
-			if ($ExplodedOptions[0] == '--r3mix') {
-				$ExplodedOptions[1] = 'r3mix';
-			}
-			switch ($ExplodedOptions[0]) {
-				case '--preset':
-				case '--alt-preset':
-				case '--r3mix':
-					if ($ExplodedOptions[1] == 'fast') {
-						$ExplodedOptions[1] .= ' '.$ExplodedOptions[2];
-					}
-					switch ($ExplodedOptions[1]) {
-						case 'portable':
-						case 'medium':
-						case 'standard':
-						case 'extreme':
-						case 'insane':
-						case 'fast portable':
-						case 'fast medium':
-						case 'fast standard':
-						case 'fast extreme':
-						case 'fast insane':
-						case 'r3mix':
-							static $ExpectedLowpass = array(
-									'insane|20500'        => 20500,
-									'insane|20600'        => 20600,  // 3.90.2, 3.90.3, 3.91
-									'medium|18000'        => 18000,
-									'fast medium|18000'   => 18000,
-									'extreme|19500'       => 19500,  // 3.90,   3.90.1, 3.92, 3.95
-									'extreme|19600'       => 19600,  // 3.90.2, 3.90.3, 3.91, 3.93.1
-									'fast extreme|19500'  => 19500,  // 3.90,   3.90.1, 3.92, 3.95
-									'fast extreme|19600'  => 19600,  // 3.90.2, 3.90.3, 3.91, 3.93.1
-									'standard|19000'      => 19000,
-									'fast standard|19000' => 19000,
-									'r3mix|19500'         => 19500,  // 3.90,   3.90.1, 3.92
-									'r3mix|19600'         => 19600,  // 3.90.2, 3.90.3, 3.91
-									'r3mix|18000'         => 18000,  // 3.94,   3.95
-								);
-							if (!isset($ExpectedLowpass[$ExplodedOptions[1].'|'.$thisfile_mpeg_audio_lame['lowpass_frequency']]) && ($thisfile_mpeg_audio_lame['lowpass_frequency'] < 22050) && (round($thisfile_mpeg_audio_lame['lowpass_frequency'] / 1000) < round($thisfile_mpeg_audio['sample_rate'] / 2000))) {
-								$encoder_options .= ' --lowpass '.$thisfile_mpeg_audio_lame['lowpass_frequency'];
-							}
-							break;
-
-						default:
-							break;
-					}
-					break;
-			}
-		}
-
-		if (isset($thisfile_mpeg_audio_lame['raw']['source_sample_freq'])) {
-			if (($thisfile_mpeg_audio['sample_rate'] == 44100) && ($thisfile_mpeg_audio_lame['raw']['source_sample_freq'] != 1)) {
-				$encoder_options .= ' --resample 44100';
-			} elseif (($thisfile_mpeg_audio['sample_rate'] == 48000) && ($thisfile_mpeg_audio_lame['raw']['source_sample_freq'] != 2)) {
-				$encoder_options .= ' --resample 48000';
-			} elseif ($thisfile_mpeg_audio['sample_rate'] < 44100) {
-				switch ($thisfile_mpeg_audio_lame['raw']['source_sample_freq']) {
-					case 0: // <= 32000
-						// may or may not be same as source frequency - ignore
-						break;
-					case 1: // 44100
-					case 2: // 48000
-					case 3: // 48000+
-						$ExplodedOptions = explode(' ', $encoder_options, 4);
-						switch ($ExplodedOptions[0]) {
-							case '--preset':
-							case '--alt-preset':
-								switch ($ExplodedOptions[1]) {
-									case 'fast':
-									case 'portable':
-									case 'medium':
-									case 'standard':
-									case 'extreme':
-									case 'insane':
-										$encoder_options .= ' --resample '.$thisfile_mpeg_audio['sample_rate'];
-										break;
-
-									default:
-										static $ExpectedResampledRate = array(
-												'phon+/lw/mw-eu/sw|16000' => 16000,
-												'mw-us|24000'             => 24000, // 3.95
-												'mw-us|32000'             => 32000, // 3.93
-												'mw-us|16000'             => 16000, // 3.92
-												'phone|16000'             => 16000,
-												'phone|11025'             => 11025, // 3.94a15
-												'radio|32000'             => 32000, // 3.94a15
-												'fm/radio|32000'          => 32000, // 3.92
-												'fm|32000'                => 32000, // 3.90
-												'voice|32000'             => 32000);
-										if (!isset($ExpectedResampledRate[$ExplodedOptions[1].'|'.$thisfile_mpeg_audio['sample_rate']])) {
-											$encoder_options .= ' --resample '.$thisfile_mpeg_audio['sample_rate'];
-										}
-										break;
-								}
-								break;
-
-							case '--r3mix':
-							default:
-								$encoder_options .= ' --resample '.$thisfile_mpeg_audio['sample_rate'];
-								break;
-						}
-						break;
-				}
-			}
-		}
-		if (empty($encoder_options) && !empty($info['audio']['bitrate']) && !empty($info['audio']['bitrate_mode'])) {
-			//$encoder_options = strtoupper($info['audio']['bitrate_mode']).ceil($info['audio']['bitrate'] / 1000);
-			$encoder_options = strtoupper($info['audio']['bitrate_mode']);
-		}
-
-		return $encoder_options;
-	}
-
-
-	public function decodeMPEGaudioHeader($offset, &$info, $recursivesearch=true, $ScanAsCBR=false, $FastMPEGheaderScan=false) {
-		static $MPEGaudioVersionLookup;
-		static $MPEGaudioLayerLookup;
-		static $MPEGaudioBitrateLookup;
-		static $MPEGaudioFrequencyLookup;
-		static $MPEGaudioChannelModeLookup;
-		static $MPEGaudioModeExtensionLookup;
-		static $MPEGaudioEmphasisLookup;
-		if (empty($MPEGaudioVersionLookup)) {
-			$MPEGaudioVersionLookup       = self::MPEGaudioVersionArray();
-			$MPEGaudioLayerLookup         = self::MPEGaudioLayerArray();
-			$MPEGaudioBitrateLookup       = self::MPEGaudioBitrateArray();
-			$MPEGaudioFrequencyLookup     = self::MPEGaudioFrequencyArray();
-			$MPEGaudioChannelModeLookup   = self::MPEGaudioChannelModeArray();
-			$MPEGaudioModeExtensionLookup = self::MPEGaudioModeExtensionArray();
-			$MPEGaudioEmphasisLookup      = self::MPEGaudioEmphasisArray();
-		}
-
-		if ($this->fseek($offset) != 0) {
-			$info['error'][] = 'decodeMPEGaudioHeader() failed to seek to next offset at '.$offset;
-			return false;
-		}
-		//$headerstring = $this->fread(1441); // worst-case max length = 32kHz @ 320kbps layer 3 = 1441 bytes/frame
-		$headerstring = $this->fread(226); // LAME header at offset 36 + 190 bytes of Xing/LAME data
-
-		// MP3 audio frame structure:
-		// $aa $aa $aa $aa [$bb $bb] $cc...
-		// where $aa..$aa is the four-byte mpeg-audio header (below)
-		// $bb $bb is the optional 2-byte CRC
-		// and $cc... is the audio data
-
-		$head4 = substr($headerstring, 0, 4);
-
-		static $MPEGaudioHeaderDecodeCache = array();
-		if (isset($MPEGaudioHeaderDecodeCache[$head4])) {
-			$MPEGheaderRawArray = $MPEGaudioHeaderDecodeCache[$head4];
-		} else {
-			$MPEGheaderRawArray = self::MPEGaudioHeaderDecode($head4);
-			$MPEGaudioHeaderDecodeCache[$head4] = $MPEGheaderRawArray;
-		}
-
-		static $MPEGaudioHeaderValidCache = array();
-		if (!isset($MPEGaudioHeaderValidCache[$head4])) { // Not in cache
-			//$MPEGaudioHeaderValidCache[$head4] = self::MPEGaudioHeaderValid($MPEGheaderRawArray, false, true);  // allow badly-formatted freeformat (from LAME 3.90 - 3.93.1)
-			$MPEGaudioHeaderValidCache[$head4] = self::MPEGaudioHeaderValid($MPEGheaderRawArray, false, false);
-		}
-
-		// shortcut
-		if (!isset($info['mpeg']['audio'])) {
-			$info['mpeg']['audio'] = array();
-		}
-		$thisfile_mpeg_audio = &$info['mpeg']['audio'];
-
-
-		if ($MPEGaudioHeaderValidCache[$head4]) {
-			$thisfile_mpeg_audio['raw'] = $MPEGheaderRawArray;
-		} else {
-			$info['error'][] = 'Invalid MPEG audio header ('.getid3_lib::PrintHexBytes($head4).') at offset '.$offset;
-			return false;
-		}
-
-		if (!$FastMPEGheaderScan) {
-			$thisfile_mpeg_audio['version']       = $MPEGaudioVersionLookup[$thisfile_mpeg_audio['raw']['version']];
-			$thisfile_mpeg_audio['layer']         = $MPEGaudioLayerLookup[$thisfile_mpeg_audio['raw']['layer']];
-
-			$thisfile_mpeg_audio['channelmode']   = $MPEGaudioChannelModeLookup[$thisfile_mpeg_audio['raw']['channelmode']];
-			$thisfile_mpeg_audio['channels']      = (($thisfile_mpeg_audio['channelmode'] == 'mono') ? 1 : 2);
-			$thisfile_mpeg_audio['sample_rate']   = $MPEGaudioFrequencyLookup[$thisfile_mpeg_audio['version']][$thisfile_mpeg_audio['raw']['sample_rate']];
-			$thisfile_mpeg_audio['protection']    = !$thisfile_mpeg_audio['raw']['protection'];
-			$thisfile_mpeg_audio['private']       = (bool) $thisfile_mpeg_audio['raw']['private'];
-			$thisfile_mpeg_audio['modeextension'] = $MPEGaudioModeExtensionLookup[$thisfile_mpeg_audio['layer']][$thisfile_mpeg_audio['raw']['modeextension']];
-			$thisfile_mpeg_audio['copyright']     = (bool) $thisfile_mpeg_audio['raw']['copyright'];
-			$thisfile_mpeg_audio['original']      = (bool) $thisfile_mpeg_audio['raw']['original'];
-			$thisfile_mpeg_audio['emphasis']      = $MPEGaudioEmphasisLookup[$thisfile_mpeg_audio['raw']['emphasis']];
-
-			$info['audio']['channels']    = $thisfile_mpeg_audio['channels'];
-			$info['audio']['sample_rate'] = $thisfile_mpeg_audio['sample_rate'];
-
-			if ($thisfile_mpeg_audio['protection']) {
-				$thisfile_mpeg_audio['crc'] = getid3_lib::BigEndian2Int(substr($headerstring, 4, 2));
-			}
-		}
-
-		if ($thisfile_mpeg_audio['raw']['bitrate'] == 15) {
-			// http://www.hydrogenaudio.org/?act=ST&f=16&t=9682&st=0
-			$info['warning'][] = 'Invalid bitrate index (15), this is a known bug in free-format MP3s encoded by LAME v3.90 - 3.93.1';
-			$thisfile_mpeg_audio['raw']['bitrate'] = 0;
-		}
-		$thisfile_mpeg_audio['padding'] = (bool) $thisfile_mpeg_audio['raw']['padding'];
-		$thisfile_mpeg_audio['bitrate'] = $MPEGaudioBitrateLookup[$thisfile_mpeg_audio['version']][$thisfile_mpeg_audio['layer']][$thisfile_mpeg_audio['raw']['bitrate']];
-
-		if (($thisfile_mpeg_audio['bitrate'] == 'free') && ($offset == $info['avdataoffset'])) {
-			// only skip multiple frame check if free-format bitstream found at beginning of file
-			// otherwise is quite possibly simply corrupted data
-			$recursivesearch = false;
-		}
-
-		// For Layer 2 there are some combinations of bitrate and mode which are not allowed.
-		if (!$FastMPEGheaderScan && ($thisfile_mpeg_audio['layer'] == '2')) {
-
-			$info['audio']['dataformat'] = 'mp2';
-			switch ($thisfile_mpeg_audio['channelmode']) {
-
-				case 'mono':
-					if (($thisfile_mpeg_audio['bitrate'] == 'free') || ($thisfile_mpeg_audio['bitrate'] <= 192000)) {
-						// these are ok
-					} else {
-						$info['error'][] = $thisfile_mpeg_audio['bitrate'].'kbps not allowed in Layer 2, '.$thisfile_mpeg_audio['channelmode'].'.';
-						return false;
-					}
-					break;
-
-				case 'stereo':
-				case 'joint stereo':
-				case 'dual channel':
-					if (($thisfile_mpeg_audio['bitrate'] == 'free') || ($thisfile_mpeg_audio['bitrate'] == 64000) || ($thisfile_mpeg_audio['bitrate'] >= 96000)) {
-						// these are ok
-					} else {
-						$info['error'][] = intval(round($thisfile_mpeg_audio['bitrate'] / 1000)).'kbps not allowed in Layer 2, '.$thisfile_mpeg_audio['channelmode'].'.';
-						return false;
-					}
-					break;
-
-			}
-
-		}
-
-
-		if ($info['audio']['sample_rate'] > 0) {
-			$thisfile_mpeg_audio['framelength'] = self::MPEGaudioFrameLength($thisfile_mpeg_audio['bitrate'], $thisfile_mpeg_audio['version'], $thisfile_mpeg_audio['layer'], (int) $thisfile_mpeg_audio['padding'], $info['audio']['sample_rate']);
-		}
-
-		$nextframetestoffset = $offset + 1;
-		if ($thisfile_mpeg_audio['bitrate'] != 'free') {
-
-			$info['audio']['bitrate'] = $thisfile_mpeg_audio['bitrate'];
-
-			if (isset($thisfile_mpeg_audio['framelength'])) {
-				$nextframetestoffset = $offset + $thisfile_mpeg_audio['framelength'];
-			} else {
-				$info['error'][] = 'Frame at offset('.$offset.') is has an invalid frame length.';
-				return false;
-			}
-
-		}
-
-		$ExpectedNumberOfAudioBytes = 0;
-
-		////////////////////////////////////////////////////////////////////////////////////
-		// Variable-bitrate headers
-
-		if (substr($headerstring, 4 + 32, 4) == 'VBRI') {
-			// Fraunhofer VBR header is hardcoded 'VBRI' at offset 0x24 (36)
-			// specs taken from http://minnie.tuhs.org/pipermail/mp3encoder/2001-January/001800.html
-
-			$thisfile_mpeg_audio['bitrate_mode'] = 'vbr';
-			$thisfile_mpeg_audio['VBR_method']   = 'Fraunhofer';
-			$info['audio']['codec']                = 'Fraunhofer';
-
-			$SideInfoData = substr($headerstring, 4 + 2, 32);
-
-			$FraunhoferVBROffset = 36;
-
-			$thisfile_mpeg_audio['VBR_encoder_version']     = getid3_lib::BigEndian2Int(substr($headerstring, $FraunhoferVBROffset +  4, 2)); // VbriVersion
-			$thisfile_mpeg_audio['VBR_encoder_delay']       = getid3_lib::BigEndian2Int(substr($headerstring, $FraunhoferVBROffset +  6, 2)); // VbriDelay
-			$thisfile_mpeg_audio['VBR_quality']             = getid3_lib::BigEndian2Int(substr($headerstring, $FraunhoferVBROffset +  8, 2)); // VbriQuality
-			$thisfile_mpeg_audio['VBR_bytes']               = getid3_lib::BigEndian2Int(substr($headerstring, $FraunhoferVBROffset + 10, 4)); // VbriStreamBytes
-			$thisfile_mpeg_audio['VBR_frames']              = getid3_lib::BigEndian2Int(substr($headerstring, $FraunhoferVBROffset + 14, 4)); // VbriStreamFrames
-			$thisfile_mpeg_audio['VBR_seek_offsets']        = getid3_lib::BigEndian2Int(substr($headerstring, $FraunhoferVBROffset + 18, 2)); // VbriTableSize
-			$thisfile_mpeg_audio['VBR_seek_scale']          = getid3_lib::BigEndian2Int(substr($headerstring, $FraunhoferVBROffset + 20, 2)); // VbriTableScale
-			$thisfile_mpeg_audio['VBR_entry_bytes']         = getid3_lib::BigEndian2Int(substr($headerstring, $FraunhoferVBROffset + 22, 2)); // VbriEntryBytes
-			$thisfile_mpeg_audio['VBR_entry_frames']        = getid3_lib::BigEndian2Int(substr($headerstring, $FraunhoferVBROffset + 24, 2)); // VbriEntryFrames
-
-			$ExpectedNumberOfAudioBytes = $thisfile_mpeg_audio['VBR_bytes'];
-
-			$previousbyteoffset = $offset;
-			for ($i = 0; $i < $thisfile_mpeg_audio['VBR_seek_offsets']; $i++) {
-				$Fraunhofer_OffsetN = getid3_lib::BigEndian2Int(substr($headerstring, $FraunhoferVBROffset, $thisfile_mpeg_audio['VBR_entry_bytes']));
-				$FraunhoferVBROffset += $thisfile_mpeg_audio['VBR_entry_bytes'];
-				$thisfile_mpeg_audio['VBR_offsets_relative'][$i] = ($Fraunhofer_OffsetN * $thisfile_mpeg_audio['VBR_seek_scale']);
-				$thisfile_mpeg_audio['VBR_offsets_absolute'][$i] = ($Fraunhofer_OffsetN * $thisfile_mpeg_audio['VBR_seek_scale']) + $previousbyteoffset;
-				$previousbyteoffset += $Fraunhofer_OffsetN;
-			}
-
-
-		} else {
-
-			// Xing VBR header is hardcoded 'Xing' at a offset 0x0D (13), 0x15 (21) or 0x24 (36)
-			// depending on MPEG layer and number of channels
-
-			$VBRidOffset = self::XingVBRidOffset($thisfile_mpeg_audio['version'], $thisfile_mpeg_audio['channelmode']);
-			$SideInfoData = substr($headerstring, 4 + 2, $VBRidOffset - 4);
-
-			if ((substr($headerstring, $VBRidOffset, strlen('Xing')) == 'Xing') || (substr($headerstring, $VBRidOffset, strlen('Info')) == 'Info')) {
-				// 'Xing' is traditional Xing VBR frame
-				// 'Info' is LAME-encoded CBR (This was done to avoid CBR files to be recognized as traditional Xing VBR files by some decoders.)
-				// 'Info' *can* legally be used to specify a VBR file as well, however.
-
-				// http://www.multiweb.cz/twoinches/MP3inside.htm
-				//00..03 = "Xing" or "Info"
-				//04..07 = Flags:
-				//  0x01  Frames Flag     set if value for number of frames in file is stored
-				//  0x02  Bytes Flag      set if value for filesize in bytes is stored
-				//  0x04  TOC Flag        set if values for TOC are stored
-				//  0x08  VBR Scale Flag  set if values for VBR scale is stored
-				//08..11  Frames: Number of frames in file (including the first Xing/Info one)
-				//12..15  Bytes:  File length in Bytes
-				//16..115  TOC (Table of Contents):
-				//  Contains of 100 indexes (one Byte length) for easier lookup in file. Approximately solves problem with moving inside file.
-				//  Each Byte has a value according this formula:
-				//  (TOC[i] / 256) * fileLenInBytes
-				//  So if song lasts eg. 240 sec. and you want to jump to 60. sec. (and file is 5 000 000 Bytes length) you can use:
-				//  TOC[(60/240)*100] = TOC[25]
-				//  and corresponding Byte in file is then approximately at:
-				//  (TOC[25]/256) * 5000000
-				//116..119  VBR Scale
-
-
-				// should be safe to leave this at 'vbr' and let it be overriden to 'cbr' if a CBR preset/mode is used by LAME
-//				if (substr($headerstring, $VBRidOffset, strlen('Info')) == 'Xing') {
-					$thisfile_mpeg_audio['bitrate_mode'] = 'vbr';
-					$thisfile_mpeg_audio['VBR_method']   = 'Xing';
-//				} else {
-//					$ScanAsCBR = true;
-//					$thisfile_mpeg_audio['bitrate_mode'] = 'cbr';
-//				}
-
-				$thisfile_mpeg_audio['xing_flags_raw'] = getid3_lib::BigEndian2Int(substr($headerstring, $VBRidOffset + 4, 4));
-
-				$thisfile_mpeg_audio['xing_flags']['frames']    = (bool) ($thisfile_mpeg_audio['xing_flags_raw'] & 0x00000001);
-				$thisfile_mpeg_audio['xing_flags']['bytes']     = (bool) ($thisfile_mpeg_audio['xing_flags_raw'] & 0x00000002);
-				$thisfile_mpeg_audio['xing_flags']['toc']       = (bool) ($thisfile_mpeg_audio['xing_flags_raw'] & 0x00000004);
-				$thisfile_mpeg_audio['xing_flags']['vbr_scale'] = (bool) ($thisfile_mpeg_audio['xing_flags_raw'] & 0x00000008);
-
-				if ($thisfile_mpeg_audio['xing_flags']['frames']) {
-					$thisfile_mpeg_audio['VBR_frames'] = getid3_lib::BigEndian2Int(substr($headerstring, $VBRidOffset +  8, 4));
-					//$thisfile_mpeg_audio['VBR_frames']--; // don't count header Xing/Info frame
-				}
-				if ($thisfile_mpeg_audio['xing_flags']['bytes']) {
-					$thisfile_mpeg_audio['VBR_bytes']  = getid3_lib::BigEndian2Int(substr($headerstring, $VBRidOffset + 12, 4));
-				}
-
-				//if (($thisfile_mpeg_audio['bitrate'] == 'free') && !empty($thisfile_mpeg_audio['VBR_frames']) && !empty($thisfile_mpeg_audio['VBR_bytes'])) {
-				if (!empty($thisfile_mpeg_audio['VBR_frames']) && !empty($thisfile_mpeg_audio['VBR_bytes'])) {
-
-					$framelengthfloat = $thisfile_mpeg_audio['VBR_bytes'] / $thisfile_mpeg_audio['VBR_frames'];
-
-					if ($thisfile_mpeg_audio['layer'] == '1') {
-						// BitRate = (((FrameLengthInBytes / 4) - Padding) * SampleRate) / 12
-						//$info['audio']['bitrate'] = ((($framelengthfloat / 4) - intval($thisfile_mpeg_audio['padding'])) * $thisfile_mpeg_audio['sample_rate']) / 12;
-						$info['audio']['bitrate'] = ($framelengthfloat / 4) * $thisfile_mpeg_audio['sample_rate'] * (2 / $info['audio']['channels']) / 12;
-					} else {
-						// Bitrate = ((FrameLengthInBytes - Padding) * SampleRate) / 144
-						//$info['audio']['bitrate'] = (($framelengthfloat - intval($thisfile_mpeg_audio['padding'])) * $thisfile_mpeg_audio['sample_rate']) / 144;
-						$info['audio']['bitrate'] = $framelengthfloat * $thisfile_mpeg_audio['sample_rate'] * (2 / $info['audio']['channels']) / 144;
-					}
-					$thisfile_mpeg_audio['framelength'] = floor($framelengthfloat);
-				}
-
-				if ($thisfile_mpeg_audio['xing_flags']['toc']) {
-					$LAMEtocData = substr($headerstring, $VBRidOffset + 16, 100);
-					for ($i = 0; $i < 100; $i++) {
-						$thisfile_mpeg_audio['toc'][$i] = ord($LAMEtocData{$i});
-					}
-				}
-				if ($thisfile_mpeg_audio['xing_flags']['vbr_scale']) {
-					$thisfile_mpeg_audio['VBR_scale'] = getid3_lib::BigEndian2Int(substr($headerstring, $VBRidOffset + 116, 4));
-				}
-
-
-				// http://gabriel.mp3-tech.org/mp3infotag.html
-				if (substr($headerstring, $VBRidOffset + 120, 4) == 'LAME') {
-
-					// shortcut
-					$thisfile_mpeg_audio['LAME'] = array();
-					$thisfile_mpeg_audio_lame    = &$thisfile_mpeg_audio['LAME'];
-
-
-					$thisfile_mpeg_audio_lame['long_version']  = substr($headerstring, $VBRidOffset + 120, 20);
-					$thisfile_mpeg_audio_lame['short_version'] = substr($thisfile_mpeg_audio_lame['long_version'], 0, 9);
-
-					if ($thisfile_mpeg_audio_lame['short_version'] >= 'LAME3.90') {
-
-						// extra 11 chars are not part of version string when LAMEtag present
-						unset($thisfile_mpeg_audio_lame['long_version']);
-
-						// It the LAME tag was only introduced in LAME v3.90
-						// http://www.hydrogenaudio.org/?act=ST&f=15&t=9933
-
-						// Offsets of various bytes in http://gabriel.mp3-tech.org/mp3infotag.html
-						// are assuming a 'Xing' identifier offset of 0x24, which is the case for
-						// MPEG-1 non-mono, but not for other combinations
-						$LAMEtagOffsetContant = $VBRidOffset - 0x24;
-
-						// shortcuts
-						$thisfile_mpeg_audio_lame['RGAD']    = array('track'=>array(), 'album'=>array());
-						$thisfile_mpeg_audio_lame_RGAD       = &$thisfile_mpeg_audio_lame['RGAD'];
-						$thisfile_mpeg_audio_lame_RGAD_track = &$thisfile_mpeg_audio_lame_RGAD['track'];
-						$thisfile_mpeg_audio_lame_RGAD_album = &$thisfile_mpeg_audio_lame_RGAD['album'];
-						$thisfile_mpeg_audio_lame['raw'] = array();
-						$thisfile_mpeg_audio_lame_raw    = &$thisfile_mpeg_audio_lame['raw'];
-
-						// byte $9B  VBR Quality
-						// This field is there to indicate a quality level, although the scale was not precised in the original Xing specifications.
-						// Actually overwrites original Xing bytes
-						unset($thisfile_mpeg_audio['VBR_scale']);
-						$thisfile_mpeg_audio_lame['vbr_quality'] = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0x9B, 1));
-
-						// bytes $9C-$A4  Encoder short VersionString
-						$thisfile_mpeg_audio_lame['short_version'] = substr($headerstring, $LAMEtagOffsetContant + 0x9C, 9);
-
-						// byte $A5  Info Tag revision + VBR method
-						$LAMEtagRevisionVBRmethod = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xA5, 1));
-
-						$thisfile_mpeg_audio_lame['tag_revision']   = ($LAMEtagRevisionVBRmethod & 0xF0) >> 4;
-						$thisfile_mpeg_audio_lame_raw['vbr_method'] =  $LAMEtagRevisionVBRmethod & 0x0F;
-						$thisfile_mpeg_audio_lame['vbr_method']     = self::LAMEvbrMethodLookup($thisfile_mpeg_audio_lame_raw['vbr_method']);
-						$thisfile_mpeg_audio['bitrate_mode']        = substr($thisfile_mpeg_audio_lame['vbr_method'], 0, 3); // usually either 'cbr' or 'vbr', but truncates 'vbr-old / vbr-rh' to 'vbr'
-
-						// byte $A6  Lowpass filter value
-						$thisfile_mpeg_audio_lame['lowpass_frequency'] = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xA6, 1)) * 100;
-
-						// bytes $A7-$AE  Replay Gain
-						// http://privatewww.essex.ac.uk/~djmrob/replaygain/rg_data_format.html
-						// bytes $A7-$AA : 32 bit floating point "Peak signal amplitude"
-						if ($thisfile_mpeg_audio_lame['short_version'] >= 'LAME3.94b') {
-							// LAME 3.94a16 and later - 9.23 fixed point
-							// ie 0x0059E2EE / (2^23) = 5890798 / 8388608 = 0.7022378444671630859375
-							$thisfile_mpeg_audio_lame_RGAD['peak_amplitude'] = (float) ((getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xA7, 4))) / 8388608);
-						} else {
-							// LAME 3.94a15 and earlier - 32-bit floating point
-							// Actually 3.94a16 will fall in here too and be WRONG, but is hard to detect 3.94a16 vs 3.94a15
-							$thisfile_mpeg_audio_lame_RGAD['peak_amplitude'] = getid3_lib::LittleEndian2Float(substr($headerstring, $LAMEtagOffsetContant + 0xA7, 4));
-						}
-						if ($thisfile_mpeg_audio_lame_RGAD['peak_amplitude'] == 0) {
-							unset($thisfile_mpeg_audio_lame_RGAD['peak_amplitude']);
-						} else {
-							$thisfile_mpeg_audio_lame_RGAD['peak_db'] = getid3_lib::RGADamplitude2dB($thisfile_mpeg_audio_lame_RGAD['peak_amplitude']);
-						}
-
-						$thisfile_mpeg_audio_lame_raw['RGAD_track']      =   getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xAB, 2));
-						$thisfile_mpeg_audio_lame_raw['RGAD_album']      =   getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xAD, 2));
-
-
-						if ($thisfile_mpeg_audio_lame_raw['RGAD_track'] != 0) {
-
-							$thisfile_mpeg_audio_lame_RGAD_track['raw']['name']        = ($thisfile_mpeg_audio_lame_raw['RGAD_track'] & 0xE000) >> 13;
-							$thisfile_mpeg_audio_lame_RGAD_track['raw']['originator']  = ($thisfile_mpeg_audio_lame_raw['RGAD_track'] & 0x1C00) >> 10;
-							$thisfile_mpeg_audio_lame_RGAD_track['raw']['sign_bit']    = ($thisfile_mpeg_audio_lame_raw['RGAD_track'] & 0x0200) >> 9;
-							$thisfile_mpeg_audio_lame_RGAD_track['raw']['gain_adjust'] =  $thisfile_mpeg_audio_lame_raw['RGAD_track'] & 0x01FF;
-							$thisfile_mpeg_audio_lame_RGAD_track['name']       = getid3_lib::RGADnameLookup($thisfile_mpeg_audio_lame_RGAD_track['raw']['name']);
-							$thisfile_mpeg_audio_lame_RGAD_track['originator'] = getid3_lib::RGADoriginatorLookup($thisfile_mpeg_audio_lame_RGAD_track['raw']['originator']);
-							$thisfile_mpeg_audio_lame_RGAD_track['gain_db']    = getid3_lib::RGADadjustmentLookup($thisfile_mpeg_audio_lame_RGAD_track['raw']['gain_adjust'], $thisfile_mpeg_audio_lame_RGAD_track['raw']['sign_bit']);
-
-							if (!empty($thisfile_mpeg_audio_lame_RGAD['peak_amplitude'])) {
-								$info['replay_gain']['track']['peak']   = $thisfile_mpeg_audio_lame_RGAD['peak_amplitude'];
-							}
-							$info['replay_gain']['track']['originator'] = $thisfile_mpeg_audio_lame_RGAD_track['originator'];
-							$info['replay_gain']['track']['adjustment'] = $thisfile_mpeg_audio_lame_RGAD_track['gain_db'];
-						} else {
-							unset($thisfile_mpeg_audio_lame_RGAD['track']);
-						}
-						if ($thisfile_mpeg_audio_lame_raw['RGAD_album'] != 0) {
-
-							$thisfile_mpeg_audio_lame_RGAD_album['raw']['name']        = ($thisfile_mpeg_audio_lame_raw['RGAD_album'] & 0xE000) >> 13;
-							$thisfile_mpeg_audio_lame_RGAD_album['raw']['originator']  = ($thisfile_mpeg_audio_lame_raw['RGAD_album'] & 0x1C00) >> 10;
-							$thisfile_mpeg_audio_lame_RGAD_album['raw']['sign_bit']    = ($thisfile_mpeg_audio_lame_raw['RGAD_album'] & 0x0200) >> 9;
-							$thisfile_mpeg_audio_lame_RGAD_album['raw']['gain_adjust'] = $thisfile_mpeg_audio_lame_raw['RGAD_album'] & 0x01FF;
-							$thisfile_mpeg_audio_lame_RGAD_album['name']       = getid3_lib::RGADnameLookup($thisfile_mpeg_audio_lame_RGAD_album['raw']['name']);
-							$thisfile_mpeg_audio_lame_RGAD_album['originator'] = getid3_lib::RGADoriginatorLookup($thisfile_mpeg_audio_lame_RGAD_album['raw']['originator']);
-							$thisfile_mpeg_audio_lame_RGAD_album['gain_db']    = getid3_lib::RGADadjustmentLookup($thisfile_mpeg_audio_lame_RGAD_album['raw']['gain_adjust'], $thisfile_mpeg_audio_lame_RGAD_album['raw']['sign_bit']);
-
-							if (!empty($thisfile_mpeg_audio_lame_RGAD['peak_amplitude'])) {
-								$info['replay_gain']['album']['peak']   = $thisfile_mpeg_audio_lame_RGAD['peak_amplitude'];
-							}
-							$info['replay_gain']['album']['originator'] = $thisfile_mpeg_audio_lame_RGAD_album['originator'];
-							$info['replay_gain']['album']['adjustment'] = $thisfile_mpeg_audio_lame_RGAD_album['gain_db'];
-						} else {
-							unset($thisfile_mpeg_audio_lame_RGAD['album']);
-						}
-						if (empty($thisfile_mpeg_audio_lame_RGAD)) {
-							unset($thisfile_mpeg_audio_lame['RGAD']);
-						}
-
-
-						// byte $AF  Encoding flags + ATH Type
-						$EncodingFlagsATHtype = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xAF, 1));
-						$thisfile_mpeg_audio_lame['encoding_flags']['nspsytune']   = (bool) ($EncodingFlagsATHtype & 0x10);
-						$thisfile_mpeg_audio_lame['encoding_flags']['nssafejoint'] = (bool) ($EncodingFlagsATHtype & 0x20);
-						$thisfile_mpeg_audio_lame['encoding_flags']['nogap_next']  = (bool) ($EncodingFlagsATHtype & 0x40);
-						$thisfile_mpeg_audio_lame['encoding_flags']['nogap_prev']  = (bool) ($EncodingFlagsATHtype & 0x80);
-						$thisfile_mpeg_audio_lame['ath_type']                      =         $EncodingFlagsATHtype & 0x0F;
-
-						// byte $B0  if ABR {specified bitrate} else {minimal bitrate}
-						$thisfile_mpeg_audio_lame['raw']['abrbitrate_minbitrate'] = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xB0, 1));
-						if ($thisfile_mpeg_audio_lame_raw['vbr_method'] == 2) { // Average BitRate (ABR)
-							$thisfile_mpeg_audio_lame['bitrate_abr'] = $thisfile_mpeg_audio_lame['raw']['abrbitrate_minbitrate'];
-						} elseif ($thisfile_mpeg_audio_lame_raw['vbr_method'] == 1) { // Constant BitRate (CBR)
-							// ignore
-						} elseif ($thisfile_mpeg_audio_lame['raw']['abrbitrate_minbitrate'] > 0) { // Variable BitRate (VBR) - minimum bitrate
-							$thisfile_mpeg_audio_lame['bitrate_min'] = $thisfile_mpeg_audio_lame['raw']['abrbitrate_minbitrate'];
-						}
-
-						// bytes $B1-$B3  Encoder delays
-						$EncoderDelays = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xB1, 3));
-						$thisfile_mpeg_audio_lame['encoder_delay'] = ($EncoderDelays & 0xFFF000) >> 12;
-						$thisfile_mpeg_audio_lame['end_padding']   =  $EncoderDelays & 0x000FFF;
-
-						// byte $B4  Misc
-						$MiscByte = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xB4, 1));
-						$thisfile_mpeg_audio_lame_raw['noise_shaping']       = ($MiscByte & 0x03);
-						$thisfile_mpeg_audio_lame_raw['stereo_mode']         = ($MiscByte & 0x1C) >> 2;
-						$thisfile_mpeg_audio_lame_raw['not_optimal_quality'] = ($MiscByte & 0x20) >> 5;
-						$thisfile_mpeg_audio_lame_raw['source_sample_freq']  = ($MiscByte & 0xC0) >> 6;
-						$thisfile_mpeg_audio_lame['noise_shaping']       = $thisfile_mpeg_audio_lame_raw['noise_shaping'];
-						$thisfile_mpeg_audio_lame['stereo_mode']         = self::LAMEmiscStereoModeLookup($thisfile_mpeg_audio_lame_raw['stereo_mode']);
-						$thisfile_mpeg_audio_lame['not_optimal_quality'] = (bool) $thisfile_mpeg_audio_lame_raw['not_optimal_quality'];
-						$thisfile_mpeg_audio_lame['source_sample_freq']  = self::LAMEmiscSourceSampleFrequencyLookup($thisfile_mpeg_audio_lame_raw['source_sample_freq']);
-
-						// byte $B5  MP3 Gain
-						$thisfile_mpeg_audio_lame_raw['mp3_gain'] = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xB5, 1), false, true);
-						$thisfile_mpeg_audio_lame['mp3_gain_db']     = (getid3_lib::RGADamplitude2dB(2) / 4) * $thisfile_mpeg_audio_lame_raw['mp3_gain'];
-						$thisfile_mpeg_audio_lame['mp3_gain_factor'] = pow(2, ($thisfile_mpeg_audio_lame['mp3_gain_db'] / 6));
-
-						// bytes $B6-$B7  Preset and surround info
-						$PresetSurroundBytes = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xB6, 2));
-						// Reserved                                                    = ($PresetSurroundBytes & 0xC000);
-						$thisfile_mpeg_audio_lame_raw['surround_info'] = ($PresetSurroundBytes & 0x3800);
-						$thisfile_mpeg_audio_lame['surround_info']     = self::LAMEsurroundInfoLookup($thisfile_mpeg_audio_lame_raw['surround_info']);
-						$thisfile_mpeg_audio_lame['preset_used_id']    = ($PresetSurroundBytes & 0x07FF);
-						$thisfile_mpeg_audio_lame['preset_used']       = self::LAMEpresetUsedLookup($thisfile_mpeg_audio_lame);
-						if (!empty($thisfile_mpeg_audio_lame['preset_used_id']) && empty($thisfile_mpeg_audio_lame['preset_used'])) {
-							$info['warning'][] = 'Unknown LAME preset used ('.$thisfile_mpeg_audio_lame['preset_used_id'].') - please report to info@getid3.org';
-						}
-						if (($thisfile_mpeg_audio_lame['short_version'] == 'LAME3.90.') && !empty($thisfile_mpeg_audio_lame['preset_used_id'])) {
-							// this may change if 3.90.4 ever comes out
-							$thisfile_mpeg_audio_lame['short_version'] = 'LAME3.90.3';
-						}
-
-						// bytes $B8-$BB  MusicLength
-						$thisfile_mpeg_audio_lame['audio_bytes'] = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xB8, 4));
-						$ExpectedNumberOfAudioBytes = (($thisfile_mpeg_audio_lame['audio_bytes'] > 0) ? $thisfile_mpeg_audio_lame['audio_bytes'] : $thisfile_mpeg_audio['VBR_bytes']);
-
-						// bytes $BC-$BD  MusicCRC
-						$thisfile_mpeg_audio_lame['music_crc']    = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xBC, 2));
-
-						// bytes $BE-$BF  CRC-16 of Info Tag
-						$thisfile_mpeg_audio_lame['lame_tag_crc'] = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xBE, 2));
-
-
-						// LAME CBR
-						if ($thisfile_mpeg_audio_lame_raw['vbr_method'] == 1) {
-
-							$thisfile_mpeg_audio['bitrate_mode'] = 'cbr';
-							$thisfile_mpeg_audio['bitrate'] = self::ClosestStandardMP3Bitrate($thisfile_mpeg_audio['bitrate']);
-							$info['audio']['bitrate'] = $thisfile_mpeg_audio['bitrate'];
-							//if (empty($thisfile_mpeg_audio['bitrate']) || (!empty($thisfile_mpeg_audio_lame['bitrate_min']) && ($thisfile_mpeg_audio_lame['bitrate_min'] != 255))) {
-							//	$thisfile_mpeg_audio['bitrate'] = $thisfile_mpeg_audio_lame['bitrate_min'];
-							//}
-
-						}
-
-					}
-				}
-
-			} else {
-
-				// not Fraunhofer or Xing VBR methods, most likely CBR (but could be VBR with no header)
-				$thisfile_mpeg_audio['bitrate_mode'] = 'cbr';
-				if ($recursivesearch) {
-					$thisfile_mpeg_audio['bitrate_mode'] = 'vbr';
-					if ($this->RecursiveFrameScanning($offset, $nextframetestoffset, true)) {
-						$recursivesearch = false;
-						$thisfile_mpeg_audio['bitrate_mode'] = 'cbr';
-					}
-					if ($thisfile_mpeg_audio['bitrate_mode'] == 'vbr') {
-						$info['warning'][] = 'VBR file with no VBR header. Bitrate values calculated from actual frame bitrates.';
-					}
-				}
-
-			}
-
-		}
-
-		if (($ExpectedNumberOfAudioBytes > 0) && ($ExpectedNumberOfAudioBytes != ($info['avdataend'] - $info['avdataoffset']))) {
-			if ($ExpectedNumberOfAudioBytes > ($info['avdataend'] - $info['avdataoffset'])) {
-				if ($this->isDependencyFor('matroska') || $this->isDependencyFor('riff')) {
-					// ignore, audio data is broken into chunks so will always be data "missing"
-				}
-				elseif (($ExpectedNumberOfAudioBytes - ($info['avdataend'] - $info['avdataoffset'])) == 1) {
-					$this->warning('Last byte of data truncated (this is a known bug in Meracl ID3 Tag Writer before v1.3.5)');
-				}
-				else {
-					$this->warning('Probable truncated file: expecting '.$ExpectedNumberOfAudioBytes.' bytes of audio data, only found '.($info['avdataend'] - $info['avdataoffset']).' (short by '.($ExpectedNumberOfAudioBytes - ($info['avdataend'] - $info['avdataoffset'])).' bytes)');
-				}
-			} else {
-				if ((($info['avdataend'] - $info['avdataoffset']) - $ExpectedNumberOfAudioBytes) == 1) {
-				//	$prenullbytefileoffset = $this->ftell();
-				//	$this->fseek($info['avdataend']);
-				//	$PossibleNullByte = $this->fread(1);
-				//	$this->fseek($prenullbytefileoffset);
-				//	if ($PossibleNullByte === "\x00") {
-						$info['avdataend']--;
-				//		$info['warning'][] = 'Extra null byte at end of MP3 data assumed to be RIFF padding and therefore ignored';
-				//	} else {
-				//		$info['warning'][] = 'Too much data in file: expecting '.$ExpectedNumberOfAudioBytes.' bytes of audio data, found '.($info['avdataend'] - $info['avdataoffset']).' ('.(($info['avdataend'] - $info['avdataoffset']) - $ExpectedNumberOfAudioBytes).' bytes too many)';
-				//	}
-				} else {
-					$info['warning'][] = 'Too much data in file: expecting '.$ExpectedNumberOfAudioBytes.' bytes of audio data, found '.($info['avdataend'] - $info['avdataoffset']).' ('.(($info['avdataend'] - $info['avdataoffset']) - $ExpectedNumberOfAudioBytes).' bytes too many)';
-				}
-			}
-		}
-
-		if (($thisfile_mpeg_audio['bitrate'] == 'free') && empty($info['audio']['bitrate'])) {
-			if (($offset == $info['avdataoffset']) && empty($thisfile_mpeg_audio['VBR_frames'])) {
-				$framebytelength = $this->FreeFormatFrameLength($offset, true);
-				if ($framebytelength > 0) {
-					$thisfile_mpeg_audio['framelength'] = $framebytelength;
-					if ($thisfile_mpeg_audio['layer'] == '1') {
-						// BitRate = (((FrameLengthInBytes / 4) - Padding) * SampleRate) / 12
-						$info['audio']['bitrate'] = ((($framebytelength / 4) - intval($thisfile_mpeg_audio['padding'])) * $thisfile_mpeg_audio['sample_rate']) / 12;
-					} else {
-						// Bitrate = ((FrameLengthInBytes - Padding) * SampleRate) / 144
-						$info['audio']['bitrate'] = (($framebytelength - intval($thisfile_mpeg_audio['padding'])) * $thisfile_mpeg_audio['sample_rate']) / 144;
-					}
-				} else {
-					$info['error'][] = 'Error calculating frame length of free-format MP3 without Xing/LAME header';
-				}
-			}
-		}
-
-		if (isset($thisfile_mpeg_audio['VBR_frames']) ? $thisfile_mpeg_audio['VBR_frames'] : '') {
-			switch ($thisfile_mpeg_audio['bitrate_mode']) {
-				case 'vbr':
-				case 'abr':
-					$bytes_per_frame = 1152;
-					if (($thisfile_mpeg_audio['version'] == '1') && ($thisfile_mpeg_audio['layer'] == 1)) {
-						$bytes_per_frame = 384;
-					} elseif ((($thisfile_mpeg_audio['version'] == '2') || ($thisfile_mpeg_audio['version'] == '2.5')) && ($thisfile_mpeg_audio['layer'] == 3)) {
-						$bytes_per_frame = 576;
-					}
-					$thisfile_mpeg_audio['VBR_bitrate'] = (isset($thisfile_mpeg_audio['VBR_bytes']) ? (($thisfile_mpeg_audio['VBR_bytes'] / $thisfile_mpeg_audio['VBR_frames']) * 8) * ($info['audio']['sample_rate'] / $bytes_per_frame) : 0);
-					if ($thisfile_mpeg_audio['VBR_bitrate'] > 0) {
-						$info['audio']['bitrate']         = $thisfile_mpeg_audio['VBR_bitrate'];
-						$thisfile_mpeg_audio['bitrate'] = $thisfile_mpeg_audio['VBR_bitrate']; // to avoid confusion
-					}
-					break;
-			}
-		}
-
-		// End variable-bitrate headers
-		////////////////////////////////////////////////////////////////////////////////////
-
-		if ($recursivesearch) {
-
-			if (!$this->RecursiveFrameScanning($offset, $nextframetestoffset, $ScanAsCBR)) {
-				return false;
-			}
-
-		}
-
-
-		//if (false) {
-		//    // experimental side info parsing section - not returning anything useful yet
-		//
-		//    $SideInfoBitstream = getid3_lib::BigEndian2Bin($SideInfoData);
-		//    $SideInfoOffset = 0;
-		//
-		//    if ($thisfile_mpeg_audio['version'] == '1') {
-		//        if ($thisfile_mpeg_audio['channelmode'] == 'mono') {
-		//            // MPEG-1 (mono)
-		//            $thisfile_mpeg_audio['side_info']['main_data_begin'] = substr($SideInfoBitstream, $SideInfoOffset, 9);
-		//            $SideInfoOffset += 9;
-		//            $SideInfoOffset += 5;
-		//        } else {
-		//            // MPEG-1 (stereo, joint-stereo, dual-channel)
-		//            $thisfile_mpeg_audio['side_info']['main_data_begin'] = substr($SideInfoBitstream, $SideInfoOffset, 9);
-		//            $SideInfoOffset += 9;
-		//            $SideInfoOffset += 3;
-		//        }
-		//    } else { // 2 or 2.5
-		//        if ($thisfile_mpeg_audio['channelmode'] == 'mono') {
-		//            // MPEG-2, MPEG-2.5 (mono)
-		//            $thisfile_mpeg_audio['side_info']['main_data_begin'] = substr($SideInfoBitstream, $SideInfoOffset, 8);
-		//            $SideInfoOffset += 8;
-		//            $SideInfoOffset += 1;
-		//        } else {
-		//            // MPEG-2, MPEG-2.5 (stereo, joint-stereo, dual-channel)
-		//            $thisfile_mpeg_audio['side_info']['main_data_begin'] = substr($SideInfoBitstream, $SideInfoOffset, 8);
-		//            $SideInfoOffset += 8;
-		//            $SideInfoOffset += 2;
-		//        }
-		//    }
-		//
-		//    if ($thisfile_mpeg_audio['version'] == '1') {
-		//        for ($channel = 0; $channel < $info['audio']['channels']; $channel++) {
-		//            for ($scfsi_band = 0; $scfsi_band < 4; $scfsi_band++) {
-		//                $thisfile_mpeg_audio['scfsi'][$channel][$scfsi_band] = substr($SideInfoBitstream, $SideInfoOffset, 1);
-		//                $SideInfoOffset += 2;
-		//            }
-		//        }
-		//    }
-		//    for ($granule = 0; $granule < (($thisfile_mpeg_audio['version'] == '1') ? 2 : 1); $granule++) {
-		//        for ($channel = 0; $channel < $info['audio']['channels']; $channel++) {
-		//            $thisfile_mpeg_audio['part2_3_length'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 12);
-		//            $SideInfoOffset += 12;
-		//            $thisfile_mpeg_audio['big_values'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 9);
-		//            $SideInfoOffset += 9;
-		//            $thisfile_mpeg_audio['global_gain'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 8);
-		//            $SideInfoOffset += 8;
-		//            if ($thisfile_mpeg_audio['version'] == '1') {
-		//                $thisfile_mpeg_audio['scalefac_compress'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 4);
-		//                $SideInfoOffset += 4;
-		//            } else {
-		//                $thisfile_mpeg_audio['scalefac_compress'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 9);
-		//                $SideInfoOffset += 9;
-		//            }
-		//            $thisfile_mpeg_audio['window_switching_flag'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 1);
-		//            $SideInfoOffset += 1;
-		//
-		//            if ($thisfile_mpeg_audio['window_switching_flag'][$granule][$channel] == '1') {
-		//
-		//                $thisfile_mpeg_audio['block_type'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 2);
-		//                $SideInfoOffset += 2;
-		//                $thisfile_mpeg_audio['mixed_block_flag'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 1);
-		//                $SideInfoOffset += 1;
-		//
-		//                for ($region = 0; $region < 2; $region++) {
-		//                    $thisfile_mpeg_audio['table_select'][$granule][$channel][$region] = substr($SideInfoBitstream, $SideInfoOffset, 5);
-		//                    $SideInfoOffset += 5;
-		//                }
-		//                $thisfile_mpeg_audio['table_select'][$granule][$channel][2] = 0;
-		//
-		//                for ($window = 0; $window < 3; $window++) {
-		//                    $thisfile_mpeg_audio['subblock_gain'][$granule][$channel][$window] = substr($SideInfoBitstream, $SideInfoOffset, 3);
-		//                    $SideInfoOffset += 3;
-		//                }
-		//
-		//            } else {
-		//
-		//                for ($region = 0; $region < 3; $region++) {
-		//                    $thisfile_mpeg_audio['table_select'][$granule][$channel][$region] = substr($SideInfoBitstream, $SideInfoOffset, 5);
-		//                    $SideInfoOffset += 5;
-		//                }
-		//
-		//                $thisfile_mpeg_audio['region0_count'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 4);
-		//                $SideInfoOffset += 4;
-		//                $thisfile_mpeg_audio['region1_count'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 3);
-		//                $SideInfoOffset += 3;
-		//                $thisfile_mpeg_audio['block_type'][$granule][$channel] = 0;
-		//            }
-		//
-		//            if ($thisfile_mpeg_audio['version'] == '1') {
-		//                $thisfile_mpeg_audio['preflag'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 1);
-		//                $SideInfoOffset += 1;
-		//            }
-		//            $thisfile_mpeg_audio['scalefac_scale'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 1);
-		//            $SideInfoOffset += 1;
-		//            $thisfile_mpeg_audio['count1table_select'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 1);
-		//            $SideInfoOffset += 1;
-		//        }
-		//    }
-		//}
-
-		return true;
-	}
-
-	public function RecursiveFrameScanning(&$offset, &$nextframetestoffset, $ScanAsCBR) {
-		$info = &$this->getid3->info;
-		$firstframetestarray = array('error'=>'', 'warning'=>'', 'avdataend'=>$info['avdataend'], 'avdataoffset'=>$info['avdataoffset']);
-		$this->decodeMPEGaudioHeader($offset, $firstframetestarray, false);
-
-		for ($i = 0; $i < GETID3_MP3_VALID_CHECK_FRAMES; $i++) {
-			// check next GETID3_MP3_VALID_CHECK_FRAMES frames for validity, to make sure we haven't run across a false synch
-			if (($nextframetestoffset + 4) >= $info['avdataend']) {
-				// end of file
-				return true;
-			}
-
-			$nextframetestarray = array('error'=>'', 'warning'=>'', 'avdataend'=>$info['avdataend'], 'avdataoffset'=>$info['avdataoffset']);
-			if ($this->decodeMPEGaudioHeader($nextframetestoffset, $nextframetestarray, false)) {
-				if ($ScanAsCBR) {
-					// force CBR mode, used for trying to pick out invalid audio streams with valid(?) VBR headers, or VBR streams with no VBR header
-					if (!isset($nextframetestarray['mpeg']['audio']['bitrate']) || !isset($firstframetestarray['mpeg']['audio']['bitrate']) || ($nextframetestarray['mpeg']['audio']['bitrate'] != $firstframetestarray['mpeg']['audio']['bitrate'])) {
-						return false;
-					}
-				}
-
-
-				// next frame is OK, get ready to check the one after that
-				if (isset($nextframetestarray['mpeg']['audio']['framelength']) && ($nextframetestarray['mpeg']['audio']['framelength'] > 0)) {
-					$nextframetestoffset += $nextframetestarray['mpeg']['audio']['framelength'];
-				} else {
-					$info['error'][] = 'Frame at offset ('.$offset.') is has an invalid frame length.';
-					return false;
-				}
-
-			} elseif (!empty($firstframetestarray['mpeg']['audio']['framelength']) && (($nextframetestoffset + $firstframetestarray['mpeg']['audio']['framelength']) > $info['avdataend'])) {
-
-				// it's not the end of the file, but there's not enough data left for another frame, so assume it's garbage/padding and return OK
-				return true;
-
-			} else {
-
-				// next frame is not valid, note the error and fail, so scanning can contiue for a valid frame sequence
-				$info['warning'][] = 'Frame at offset ('.$offset.') is valid, but the next one at ('.$nextframetestoffset.') is not.';
-
-				return false;
-			}
-		}
-		return true;
-	}
-
-	public function FreeFormatFrameLength($offset, $deepscan=false) {
-		$info = &$this->getid3->info;
-
-		$this->fseek($offset);
-		$MPEGaudioData = $this->fread(32768);
-
-		$SyncPattern1 = substr($MPEGaudioData, 0, 4);
-		// may be different pattern due to padding
-		$SyncPattern2 = $SyncPattern1{0}.$SyncPattern1{1}.chr(ord($SyncPattern1{2}) | 0x02).$SyncPattern1{3};
-		if ($SyncPattern2 === $SyncPattern1) {
-			$SyncPattern2 = $SyncPattern1{0}.$SyncPattern1{1}.chr(ord($SyncPattern1{2}) & 0xFD).$SyncPattern1{3};
-		}
-
-		$framelength = false;
-		$framelength1 = strpos($MPEGaudioData, $SyncPattern1, 4);
-		$framelength2 = strpos($MPEGaudioData, $SyncPattern2, 4);
-		if ($framelength1 > 4) {
-			$framelength = $framelength1;
-		}
-		if (($framelength2 > 4) && ($framelength2 < $framelength1)) {
-			$framelength = $framelength2;
-		}
-		if (!$framelength) {
-
-			// LAME 3.88 has a different value for modeextension on the first frame vs the rest
-			$framelength1 = strpos($MPEGaudioData, substr($SyncPattern1, 0, 3), 4);
-			$framelength2 = strpos($MPEGaudioData, substr($SyncPattern2, 0, 3), 4);
-
-			if ($framelength1 > 4) {
-				$framelength = $framelength1;
-			}
-			if (($framelength2 > 4) && ($framelength2 < $framelength1)) {
-				$framelength = $framelength2;
-			}
-			if (!$framelength) {
-				$info['error'][] = 'Cannot find next free-format synch pattern ('.getid3_lib::PrintHexBytes($SyncPattern1).' or '.getid3_lib::PrintHexBytes($SyncPattern2).') after offset '.$offset;
-				return false;
-			} else {
-				$info['warning'][] = 'ModeExtension varies between first frame and other frames (known free-format issue in LAME 3.88)';
-				$info['audio']['codec']   = 'LAME';
-				$info['audio']['encoder'] = 'LAME3.88';
-				$SyncPattern1 = substr($SyncPattern1, 0, 3);
-				$SyncPattern2 = substr($SyncPattern2, 0, 3);
-			}
-		}
-
-		if ($deepscan) {
-
-			$ActualFrameLengthValues = array();
-			$nextoffset = $offset + $framelength;
-			while ($nextoffset < ($info['avdataend'] - 6)) {
-				$this->fseek($nextoffset - 1);
-				$NextSyncPattern = $this->fread(6);
-				if ((substr($NextSyncPattern, 1, strlen($SyncPattern1)) == $SyncPattern1) || (substr($NextSyncPattern, 1, strlen($SyncPattern2)) == $SyncPattern2)) {
-					// good - found where expected
-					$ActualFrameLengthValues[] = $framelength;
-				} elseif ((substr($NextSyncPattern, 0, strlen($SyncPattern1)) == $SyncPattern1) || (substr($NextSyncPattern, 0, strlen($SyncPattern2)) == $SyncPattern2)) {
-					// ok - found one byte earlier than expected (last frame wasn't padded, first frame was)
-					$ActualFrameLengthValues[] = ($framelength - 1);
-					$nextoffset--;
-				} elseif ((substr($NextSyncPattern, 2, strlen($SyncPattern1)) == $SyncPattern1) || (substr($NextSyncPattern, 2, strlen($SyncPattern2)) == $SyncPattern2)) {
-					// ok - found one byte later than expected (last frame was padded, first frame wasn't)
-					$ActualFrameLengthValues[] = ($framelength + 1);
-					$nextoffset++;
-				} else {
-					$info['error'][] = 'Did not find expected free-format sync pattern at offset '.$nextoffset;
-					return false;
-				}
-				$nextoffset += $framelength;
-			}
-			if (count($ActualFrameLengthValues) > 0) {
-				$framelength = intval(round(array_sum($ActualFrameLengthValues) / count($ActualFrameLengthValues)));
-			}
-		}
-		return $framelength;
-	}
-
-	public function getOnlyMPEGaudioInfoBruteForce() {
-		$MPEGaudioHeaderDecodeCache   = array();
-		$MPEGaudioHeaderValidCache    = array();
-		$MPEGaudioHeaderLengthCache   = array();
-		$MPEGaudioVersionLookup       = self::MPEGaudioVersionArray();
-		$MPEGaudioLayerLookup         = self::MPEGaudioLayerArray();
-		$MPEGaudioBitrateLookup       = self::MPEGaudioBitrateArray();
-		$MPEGaudioFrequencyLookup     = self::MPEGaudioFrequencyArray();
-		$MPEGaudioChannelModeLookup   = self::MPEGaudioChannelModeArray();
-		$MPEGaudioModeExtensionLookup = self::MPEGaudioModeExtensionArray();
-		$MPEGaudioEmphasisLookup      = self::MPEGaudioEmphasisArray();
-		$LongMPEGversionLookup        = array();
-		$LongMPEGlayerLookup          = array();
-		$LongMPEGbitrateLookup        = array();
-		$LongMPEGpaddingLookup        = array();
-		$LongMPEGfrequencyLookup      = array();
-		$Distribution['bitrate']      = array();
-		$Distribution['frequency']    = array();
-		$Distribution['layer']        = array();
-		$Distribution['version']      = array();
-		$Distribution['padding']      = array();
-
-		$info = &$this->getid3->info;
-		$this->fseek($info['avdataoffset']);
-
-		$max_frames_scan = 5000;
-		$frames_scanned  = 0;
-
-		$previousvalidframe = $info['avdataoffset'];
-		while ($this->ftell() < $info['avdataend']) {
-			set_time_limit(30);
-			$head4 = $this->fread(4);
-			if (strlen($head4) < 4) {
-				break;
-			}
-			if ($head4{0} != "\xFF") {
-				for ($i = 1; $i < 4; $i++) {
-					if ($head4{$i} == "\xFF") {
-						$this->fseek($i - 4, SEEK_CUR);
-						continue 2;
-					}
-				}
-				continue;
-			}
-			if (!isset($MPEGaudioHeaderDecodeCache[$head4])) {
-				$MPEGaudioHeaderDecodeCache[$head4] = self::MPEGaudioHeaderDecode($head4);
-			}
-			if (!isset($MPEGaudioHeaderValidCache[$head4])) {
-				$MPEGaudioHeaderValidCache[$head4] = self::MPEGaudioHeaderValid($MPEGaudioHeaderDecodeCache[$head4], false, false);
-			}
-			if ($MPEGaudioHeaderValidCache[$head4]) {
-
-				if (!isset($MPEGaudioHeaderLengthCache[$head4])) {
-					$LongMPEGversionLookup[$head4]   = $MPEGaudioVersionLookup[$MPEGaudioHeaderDecodeCache[$head4]['version']];
-					$LongMPEGlayerLookup[$head4]     = $MPEGaudioLayerLookup[$MPEGaudioHeaderDecodeCache[$head4]['layer']];
-					$LongMPEGbitrateLookup[$head4]   = $MPEGaudioBitrateLookup[$LongMPEGversionLookup[$head4]][$LongMPEGlayerLookup[$head4]][$MPEGaudioHeaderDecodeCache[$head4]['bitrate']];
-					$LongMPEGpaddingLookup[$head4]   = (bool) $MPEGaudioHeaderDecodeCache[$head4]['padding'];
-					$LongMPEGfrequencyLookup[$head4] = $MPEGaudioFrequencyLookup[$LongMPEGversionLookup[$head4]][$MPEGaudioHeaderDecodeCache[$head4]['sample_rate']];
-					$MPEGaudioHeaderLengthCache[$head4] = self::MPEGaudioFrameLength(
-						$LongMPEGbitrateLookup[$head4],
-						$LongMPEGversionLookup[$head4],
-						$LongMPEGlayerLookup[$head4],
-						$LongMPEGpaddingLookup[$head4],
-						$LongMPEGfrequencyLookup[$head4]);
-				}
-				if ($MPEGaudioHeaderLengthCache[$head4] > 4) {
-					$WhereWeWere = $this->ftell();
-					$this->fseek($MPEGaudioHeaderLengthCache[$head4] - 4, SEEK_CUR);
-					$next4 = $this->fread(4);
-					if ($next4{0} == "\xFF") {
-						if (!isset($MPEGaudioHeaderDecodeCache[$next4])) {
-							$MPEGaudioHeaderDecodeCache[$next4] = self::MPEGaudioHeaderDecode($next4);
-						}
-						if (!isset($MPEGaudioHeaderValidCache[$next4])) {
-							$MPEGaudioHeaderValidCache[$next4] = self::MPEGaudioHeaderValid($MPEGaudioHeaderDecodeCache[$next4], false, false);
-						}
-						if ($MPEGaudioHeaderValidCache[$next4]) {
-							$this->fseek(-4, SEEK_CUR);
-
-							getid3_lib::safe_inc($Distribution['bitrate'][$LongMPEGbitrateLookup[$head4]]);
-							getid3_lib::safe_inc($Distribution['layer'][$LongMPEGlayerLookup[$head4]]);
-							getid3_lib::safe_inc($Distribution['version'][$LongMPEGversionLookup[$head4]]);
-							getid3_lib::safe_inc($Distribution['padding'][intval($LongMPEGpaddingLookup[$head4])]);
-							getid3_lib::safe_inc($Distribution['frequency'][$LongMPEGfrequencyLookup[$head4]]);
-							if ($max_frames_scan && (++$frames_scanned >= $max_frames_scan)) {
-								$pct_data_scanned = ($this->ftell() - $info['avdataoffset']) / ($info['avdataend'] - $info['avdataoffset']);
-								$info['warning'][] = 'too many MPEG audio frames to scan, only scanned first '.$max_frames_scan.' frames ('.number_format($pct_data_scanned * 100, 1).'% of file) and extrapolated distribution, playtime and bitrate may be incorrect.';
-								foreach ($Distribution as $key1 => $value1) {
-									foreach ($value1 as $key2 => $value2) {
-										$Distribution[$key1][$key2] = round($value2 / $pct_data_scanned);
-									}
-								}
-								break;
-							}
-							continue;
-						}
-					}
-					unset($next4);
-					$this->fseek($WhereWeWere - 3);
-				}
-
-			}
-		}
-		foreach ($Distribution as $key => $value) {
-			ksort($Distribution[$key], SORT_NUMERIC);
-		}
-		ksort($Distribution['version'], SORT_STRING);
-		$info['mpeg']['audio']['bitrate_distribution']   = $Distribution['bitrate'];
-		$info['mpeg']['audio']['frequency_distribution'] = $Distribution['frequency'];
-		$info['mpeg']['audio']['layer_distribution']     = $Distribution['layer'];
-		$info['mpeg']['audio']['version_distribution']   = $Distribution['version'];
-		$info['mpeg']['audio']['padding_distribution']   = $Distribution['padding'];
-		if (count($Distribution['version']) > 1) {
-			$info['error'][] = 'Corrupt file - more than one MPEG version detected';
-		}
-		if (count($Distribution['layer']) > 1) {
-			$info['error'][] = 'Corrupt file - more than one MPEG layer detected';
-		}
-		if (count($Distribution['frequency']) > 1) {
-			$info['error'][] = 'Corrupt file - more than one MPEG sample rate detected';
-		}
-
-
-		$bittotal = 0;
-		foreach ($Distribution['bitrate'] as $bitratevalue => $bitratecount) {
-			if ($bitratevalue != 'free') {
-				$bittotal += ($bitratevalue * $bitratecount);
-			}
-		}
-		$info['mpeg']['audio']['frame_count']  = array_sum($Distribution['bitrate']);
-		if ($info['mpeg']['audio']['frame_count'] == 0) {
-			$info['error'][] = 'no MPEG audio frames found';
-			return false;
-		}
-		$info['mpeg']['audio']['bitrate']      = ($bittotal / $info['mpeg']['audio']['frame_count']);
-		$info['mpeg']['audio']['bitrate_mode'] = ((count($Distribution['bitrate']) > 0) ? 'vbr' : 'cbr');
-		$info['mpeg']['audio']['sample_rate']  = getid3_lib::array_max($Distribution['frequency'], true);
-
-		$info['audio']['bitrate']      = $info['mpeg']['audio']['bitrate'];
-		$info['audio']['bitrate_mode'] = $info['mpeg']['audio']['bitrate_mode'];
-		$info['audio']['sample_rate']  = $info['mpeg']['audio']['sample_rate'];
-		$info['audio']['dataformat']   = 'mp'.getid3_lib::array_max($Distribution['layer'], true);
-		$info['fileformat']            = $info['audio']['dataformat'];
-
-		return true;
-	}
-
-
-	public function getOnlyMPEGaudioInfo($avdataoffset, $BitrateHistogram=false) {
-		// looks for synch, decodes MPEG audio header
-
-		$info = &$this->getid3->info;
-
-		static $MPEGaudioVersionLookup;
-		static $MPEGaudioLayerLookup;
-		static $MPEGaudioBitrateLookup;
-		if (empty($MPEGaudioVersionLookup)) {
-		   $MPEGaudioVersionLookup = self::MPEGaudioVersionArray();
-		   $MPEGaudioLayerLookup   = self::MPEGaudioLayerArray();
-		   $MPEGaudioBitrateLookup = self::MPEGaudioBitrateArray();
-
-		}
-
-		$this->fseek($avdataoffset);
-		$sync_seek_buffer_size = min(128 * 1024, $info['avdataend'] - $avdataoffset);
-		if ($sync_seek_buffer_size <= 0) {
-			$info['error'][] = 'Invalid $sync_seek_buffer_size at offset '.$avdataoffset;
-			return false;
-		}
-		$header = $this->fread($sync_seek_buffer_size);
-		$sync_seek_buffer_size = strlen($header);
-		$SynchSeekOffset = 0;
-		while ($SynchSeekOffset < $sync_seek_buffer_size) {
-			if ((($avdataoffset + $SynchSeekOffset)  < $info['avdataend']) && !feof($this->getid3->fp)) {
-
-				if ($SynchSeekOffset > $sync_seek_buffer_size) {
-					// if a synch's not found within the first 128k bytes, then give up
-					$info['error'][] = 'Could not find valid MPEG audio synch within the first '.round($sync_seek_buffer_size / 1024).'kB';
-					if (isset($info['audio']['bitrate'])) {
-						unset($info['audio']['bitrate']);
-					}
-					if (isset($info['mpeg']['audio'])) {
-						unset($info['mpeg']['audio']);
-					}
-					if (empty($info['mpeg'])) {
-						unset($info['mpeg']);
-					}
-					return false;
-
-				} elseif (feof($this->getid3->fp)) {
-
-					$info['error'][] = 'Could not find valid MPEG audio synch before end of file';
-					if (isset($info['audio']['bitrate'])) {
-						unset($info['audio']['bitrate']);
-					}
-					if (isset($info['mpeg']['audio'])) {
-						unset($info['mpeg']['audio']);
-					}
-					if (isset($info['mpeg']) && (!is_array($info['mpeg']) || (count($info['mpeg']) == 0))) {
-						unset($info['mpeg']);
-					}
-					return false;
-				}
-			}
-
-			if (($SynchSeekOffset + 1) >= strlen($header)) {
-				$info['error'][] = 'Could not find valid MPEG synch before end of file';
-				return false;
-			}
-
-			if (($header{$SynchSeekOffset} == "\xFF") && ($header{($SynchSeekOffset + 1)} > "\xE0")) { // synch detected
-				if (!isset($FirstFrameThisfileInfo) && !isset($info['mpeg']['audio'])) {
-					$FirstFrameThisfileInfo = $info;
-					$FirstFrameAVDataOffset = $avdataoffset + $SynchSeekOffset;
-					if (!$this->decodeMPEGaudioHeader($FirstFrameAVDataOffset, $FirstFrameThisfileInfo, false)) {
-						// if this is the first valid MPEG-audio frame, save it in case it's a VBR header frame and there's
-						// garbage between this frame and a valid sequence of MPEG-audio frames, to be restored below
-						unset($FirstFrameThisfileInfo);
-					}
-				}
-
-				$dummy = $info; // only overwrite real data if valid header found
-				if ($this->decodeMPEGaudioHeader($avdataoffset + $SynchSeekOffset, $dummy, true)) {
-					$info = $dummy;
-					$info['avdataoffset'] = $avdataoffset + $SynchSeekOffset;
-					switch (isset($info['fileformat']) ? $info['fileformat'] : '') {
-						case '':
-						case 'id3':
-						case 'ape':
-						case 'mp3':
-							$info['fileformat']          = 'mp3';
-							$info['audio']['dataformat'] = 'mp3';
-							break;
-					}
-					if (isset($FirstFrameThisfileInfo['mpeg']['audio']['bitrate_mode']) && ($FirstFrameThisfileInfo['mpeg']['audio']['bitrate_mode'] == 'vbr')) {
-						if (!(abs($info['audio']['bitrate'] - $FirstFrameThisfileInfo['audio']['bitrate']) <= 1)) {
-							// If there is garbage data between a valid VBR header frame and a sequence
-							// of valid MPEG-audio frames the VBR data is no longer discarded.
-							$info = $FirstFrameThisfileInfo;
-							$info['avdataoffset']        = $FirstFrameAVDataOffset;
-							$info['fileformat']          = 'mp3';
-							$info['audio']['dataformat'] = 'mp3';
-							$dummy                       = $info;
-							unset($dummy['mpeg']['audio']);
-							$GarbageOffsetStart = $FirstFrameAVDataOffset + $FirstFrameThisfileInfo['mpeg']['audio']['framelength'];
-							$GarbageOffsetEnd   = $avdataoffset + $SynchSeekOffset;
-							if ($this->decodeMPEGaudioHeader($GarbageOffsetEnd, $dummy, true, true)) {
-								$info = $dummy;
-								$info['avdataoffset'] = $GarbageOffsetEnd;
-								$info['warning'][] = 'apparently-valid VBR header not used because could not find '.GETID3_MP3_VALID_CHECK_FRAMES.' consecutive MPEG-audio frames immediately after VBR header (garbage data for '.($GarbageOffsetEnd - $GarbageOffsetStart).' bytes between '.$GarbageOffsetStart.' and '.$GarbageOffsetEnd.'), but did find valid CBR stream starting at '.$GarbageOffsetEnd;
-							} else {
-								$info['warning'][] = 'using data from VBR header even though could not find '.GETID3_MP3_VALID_CHECK_FRAMES.' consecutive MPEG-audio frames immediately after VBR header (garbage data for '.($GarbageOffsetEnd - $GarbageOffsetStart).' bytes between '.$GarbageOffsetStart.' and '.$GarbageOffsetEnd.')';
-							}
-						}
-					}
-					if (isset($info['mpeg']['audio']['bitrate_mode']) && ($info['mpeg']['audio']['bitrate_mode'] == 'vbr') && !isset($info['mpeg']['audio']['VBR_method'])) {
-						// VBR file with no VBR header
-						$BitrateHistogram = true;
-					}
-
-					if ($BitrateHistogram) {
-
-						$info['mpeg']['audio']['stereo_distribution']  = array('stereo'=>0, 'joint stereo'=>0, 'dual channel'=>0, 'mono'=>0);
-						$info['mpeg']['audio']['version_distribution'] = array('1'=>0, '2'=>0, '2.5'=>0);
-
-						if ($info['mpeg']['audio']['version'] == '1') {
-							if ($info['mpeg']['audio']['layer'] == 3) {
-								$info['mpeg']['audio']['bitrate_distribution'] = array('free'=>0, 32000=>0, 40000=>0, 48000=>0, 56000=>0, 64000=>0, 80000=>0, 96000=>0, 112000=>0, 128000=>0, 160000=>0, 192000=>0, 224000=>0, 256000=>0, 320000=>0);
-							} elseif ($info['mpeg']['audio']['layer'] == 2) {
-								$info['mpeg']['audio']['bitrate_distribution'] = array('free'=>0, 32000=>0, 48000=>0, 56000=>0, 64000=>0, 80000=>0, 96000=>0, 112000=>0, 128000=>0, 160000=>0, 192000=>0, 224000=>0, 256000=>0, 320000=>0, 384000=>0);
-							} elseif ($info['mpeg']['audio']['layer'] == 1) {
-								$info['mpeg']['audio']['bitrate_distribution'] = array('free'=>0, 32000=>0, 64000=>0, 96000=>0, 128000=>0, 160000=>0, 192000=>0, 224000=>0, 256000=>0, 288000=>0, 320000=>0, 352000=>0, 384000=>0, 416000=>0, 448000=>0);
-							}
-						} elseif ($info['mpeg']['audio']['layer'] == 1) {
-							$info['mpeg']['audio']['bitrate_distribution'] = array('free'=>0, 32000=>0, 48000=>0, 56000=>0, 64000=>0, 80000=>0, 96000=>0, 112000=>0, 128000=>0, 144000=>0, 160000=>0, 176000=>0, 192000=>0, 224000=>0, 256000=>0);
-						} else {
-							$info['mpeg']['audio']['bitrate_distribution'] = array('free'=>0, 8000=>0, 16000=>0, 24000=>0, 32000=>0, 40000=>0, 48000=>0, 56000=>0, 64000=>0, 80000=>0, 96000=>0, 112000=>0, 128000=>0, 144000=>0, 160000=>0);
-						}
-
-						$dummy = array('error'=>$info['error'], 'warning'=>$info['warning'], 'avdataend'=>$info['avdataend'], 'avdataoffset'=>$info['avdataoffset']);
-						$synchstartoffset = $info['avdataoffset'];
-						$this->fseek($info['avdataoffset']);
-
-						// you can play with these numbers:
-						$max_frames_scan  = 50000;
-						$max_scan_segments = 10;
-
-						// don't play with these numbers:
-						$FastMode = false;
-						$SynchErrorsFound = 0;
-						$frames_scanned   = 0;
-						$this_scan_segment = 0;
-						$frames_scan_per_segment = ceil($max_frames_scan / $max_scan_segments);
-						$pct_data_scanned = 0;
-						for ($current_segment = 0; $current_segment < $max_scan_segments; $current_segment++) {
-							$frames_scanned_this_segment = 0;
-							if ($this->ftell() >= $info['avdataend']) {
-								break;
-							}
-							$scan_start_offset[$current_segment] = max($this->ftell(), $info['avdataoffset'] + round($current_segment * (($info['avdataend'] - $info['avdataoffset']) / $max_scan_segments)));
-							if ($current_segment > 0) {
-								$this->fseek($scan_start_offset[$current_segment]);
-								$buffer_4k = $this->fread(4096);
-								for ($j = 0; $j < (strlen($buffer_4k) - 4); $j++) {
-									if (($buffer_4k{$j} == "\xFF") && ($buffer_4k{($j + 1)} > "\xE0")) { // synch detected
-										if ($this->decodeMPEGaudioHeader($scan_start_offset[$current_segment] + $j, $dummy, false, false, $FastMode)) {
-											$calculated_next_offset = $scan_start_offset[$current_segment] + $j + $dummy['mpeg']['audio']['framelength'];
-											if ($this->decodeMPEGaudioHeader($calculated_next_offset, $dummy, false, false, $FastMode)) {
-												$scan_start_offset[$current_segment] += $j;
-												break;
-											}
-										}
-									}
-								}
-							}
-							$synchstartoffset = $scan_start_offset[$current_segment];
-							while ($this->decodeMPEGaudioHeader($synchstartoffset, $dummy, false, false, $FastMode)) {
-								$FastMode = true;
-								$thisframebitrate = $MPEGaudioBitrateLookup[$MPEGaudioVersionLookup[$dummy['mpeg']['audio']['raw']['version']]][$MPEGaudioLayerLookup[$dummy['mpeg']['audio']['raw']['layer']]][$dummy['mpeg']['audio']['raw']['bitrate']];
-
-								if (empty($dummy['mpeg']['audio']['framelength'])) {
-									$SynchErrorsFound++;
-									$synchstartoffset++;
-								} else {
-									getid3_lib::safe_inc($info['mpeg']['audio']['bitrate_distribution'][$thisframebitrate]);
-									getid3_lib::safe_inc($info['mpeg']['audio']['stereo_distribution'][$dummy['mpeg']['audio']['channelmode']]);
-									getid3_lib::safe_inc($info['mpeg']['audio']['version_distribution'][$dummy['mpeg']['audio']['version']]);
-									$synchstartoffset += $dummy['mpeg']['audio']['framelength'];
-								}
-								$frames_scanned++;
-								if ($frames_scan_per_segment && (++$frames_scanned_this_segment >= $frames_scan_per_segment)) {
-									$this_pct_scanned = ($this->ftell() - $scan_start_offset[$current_segment]) / ($info['avdataend'] - $info['avdataoffset']);
-									if (($current_segment == 0) && (($this_pct_scanned * $max_scan_segments) >= 1)) {
-										// file likely contains < $max_frames_scan, just scan as one segment
-										$max_scan_segments = 1;
-										$frames_scan_per_segment = $max_frames_scan;
-									} else {
-										$pct_data_scanned += $this_pct_scanned;
-										break;
-									}
-								}
-							}
-						}
-						if ($pct_data_scanned > 0) {
-							$info['warning'][] = 'too many MPEG audio frames to scan, only scanned '.$frames_scanned.' frames in '.$max_scan_segments.' segments ('.number_format($pct_data_scanned * 100, 1).'% of file) and extrapolated distribution, playtime and bitrate may be incorrect.';
-							foreach ($info['mpeg']['audio'] as $key1 => $value1) {
-								if (!preg_match('#_distribution$#i', $key1)) {
-									continue;
-								}
-								foreach ($value1 as $key2 => $value2) {
-									$info['mpeg']['audio'][$key1][$key2] = round($value2 / $pct_data_scanned);
-								}
-							}
-						}
-
-						if ($SynchErrorsFound > 0) {
-							$info['warning'][] = 'Found '.$SynchErrorsFound.' synch errors in histogram analysis';
-							//return false;
-						}
-
-						$bittotal     = 0;
-						$framecounter = 0;
-						foreach ($info['mpeg']['audio']['bitrate_distribution'] as $bitratevalue => $bitratecount) {
-							$framecounter += $bitratecount;
-							if ($bitratevalue != 'free') {
-								$bittotal += ($bitratevalue * $bitratecount);
-							}
-						}
-						if ($framecounter == 0) {
-							$info['error'][] = 'Corrupt MP3 file: framecounter == zero';
-							return false;
-						}
-						$info['mpeg']['audio']['frame_count'] = getid3_lib::CastAsInt($framecounter);
-						$info['mpeg']['audio']['bitrate']     = ($bittotal / $framecounter);
-
-						$info['audio']['bitrate'] = $info['mpeg']['audio']['bitrate'];
-
-
-						// Definitively set VBR vs CBR, even if the Xing/LAME/VBRI header says differently
-						$distinct_bitrates = 0;
-						foreach ($info['mpeg']['audio']['bitrate_distribution'] as $bitrate_value => $bitrate_count) {
-							if ($bitrate_count > 0) {
-								$distinct_bitrates++;
-							}
-						}
-						if ($distinct_bitrates > 1) {
-							$info['mpeg']['audio']['bitrate_mode'] = 'vbr';
-						} else {
-							$info['mpeg']['audio']['bitrate_mode'] = 'cbr';
-						}
-						$info['audio']['bitrate_mode'] = $info['mpeg']['audio']['bitrate_mode'];
-
-					}
-
-					break; // exit while()
-				}
-			}
-
-			$SynchSeekOffset++;
-			if (($avdataoffset + $SynchSeekOffset) >= $info['avdataend']) {
-				// end of file/data
-
-				if (empty($info['mpeg']['audio'])) {
-
-					$info['error'][] = 'could not find valid MPEG synch before end of file';
-					if (isset($info['audio']['bitrate'])) {
-						unset($info['audio']['bitrate']);
-					}
-					if (isset($info['mpeg']['audio'])) {
-						unset($info['mpeg']['audio']);
-					}
-					if (isset($info['mpeg']) && (!is_array($info['mpeg']) || empty($info['mpeg']))) {
-						unset($info['mpeg']);
-					}
-					return false;
-
-				}
-				break;
-			}
-
-		}
-		$info['audio']['channels']        = $info['mpeg']['audio']['channels'];
-		$info['audio']['channelmode']     = $info['mpeg']['audio']['channelmode'];
-		$info['audio']['sample_rate']     = $info['mpeg']['audio']['sample_rate'];
-		return true;
-	}
-
-
-	public static function MPEGaudioVersionArray() {
-		static $MPEGaudioVersion = array('2.5', false, '2', '1');
-		return $MPEGaudioVersion;
-	}
-
-	public static function MPEGaudioLayerArray() {
-		static $MPEGaudioLayer = array(false, 3, 2, 1);
-		return $MPEGaudioLayer;
-	}
-
-	public static function MPEGaudioBitrateArray() {
-		static $MPEGaudioBitrate;
-		if (empty($MPEGaudioBitrate)) {
-			$MPEGaudioBitrate = array (
-				'1'  =>  array (1 => array('free', 32000, 64000, 96000, 128000, 160000, 192000, 224000, 256000, 288000, 320000, 352000, 384000, 416000, 448000),
-								2 => array('free', 32000, 48000, 56000,  64000,  80000,  96000, 112000, 128000, 160000, 192000, 224000, 256000, 320000, 384000),
-								3 => array('free', 32000, 40000, 48000,  56000,  64000,  80000,  96000, 112000, 128000, 160000, 192000, 224000, 256000, 320000)
-							   ),
-
-				'2'  =>  array (1 => array('free', 32000, 48000, 56000,  64000,  80000,  96000, 112000, 128000, 144000, 160000, 176000, 192000, 224000, 256000),
-								2 => array('free',  8000, 16000, 24000,  32000,  40000,  48000,  56000,  64000,  80000,  96000, 112000, 128000, 144000, 160000),
-							   )
-			);
-			$MPEGaudioBitrate['2'][3] = $MPEGaudioBitrate['2'][2];
-			$MPEGaudioBitrate['2.5']  = $MPEGaudioBitrate['2'];
-		}
-		return $MPEGaudioBitrate;
-	}
-
-	public static function MPEGaudioFrequencyArray() {
-		static $MPEGaudioFrequency;
-		if (empty($MPEGaudioFrequency)) {
-			$MPEGaudioFrequency = array (
-				'1'   => array(44100, 48000, 32000),
-				'2'   => array(22050, 24000, 16000),
-				'2.5' => array(11025, 12000,  8000)
-			);
-		}
-		return $MPEGaudioFrequency;
-	}
-
-	public static function MPEGaudioChannelModeArray() {
-		static $MPEGaudioChannelMode = array('stereo', 'joint stereo', 'dual channel', 'mono');
-		return $MPEGaudioChannelMode;
-	}
-
-	public static function MPEGaudioModeExtensionArray() {
-		static $MPEGaudioModeExtension;
-		if (empty($MPEGaudioModeExtension)) {
-			$MPEGaudioModeExtension = array (
-				1 => array('4-31', '8-31', '12-31', '16-31'),
-				2 => array('4-31', '8-31', '12-31', '16-31'),
-				3 => array('', 'IS', 'MS', 'IS+MS')
-			);
-		}
-		return $MPEGaudioModeExtension;
-	}
-
-	public static function MPEGaudioEmphasisArray() {
-		static $MPEGaudioEmphasis = array('none', '50/15ms', false, 'CCIT J.17');
-		return $MPEGaudioEmphasis;
-	}
-
-	public static function MPEGaudioHeaderBytesValid($head4, $allowBitrate15=false) {
-		return self::MPEGaudioHeaderValid(self::MPEGaudioHeaderDecode($head4), false, $allowBitrate15);
-	}
-
-	public static function MPEGaudioHeaderValid($rawarray, $echoerrors=false, $allowBitrate15=false) {
-		if (($rawarray['synch'] & 0x0FFE) != 0x0FFE) {
-			return false;
-		}
-
-		static $MPEGaudioVersionLookup;
-		static $MPEGaudioLayerLookup;
-		static $MPEGaudioBitrateLookup;
-		static $MPEGaudioFrequencyLookup;
-		static $MPEGaudioChannelModeLookup;
-		static $MPEGaudioModeExtensionLookup;
-		static $MPEGaudioEmphasisLookup;
-		if (empty($MPEGaudioVersionLookup)) {
-			$MPEGaudioVersionLookup       = self::MPEGaudioVersionArray();
-			$MPEGaudioLayerLookup         = self::MPEGaudioLayerArray();
-			$MPEGaudioBitrateLookup       = self::MPEGaudioBitrateArray();
-			$MPEGaudioFrequencyLookup     = self::MPEGaudioFrequencyArray();
-			$MPEGaudioChannelModeLookup   = self::MPEGaudioChannelModeArray();
-			$MPEGaudioModeExtensionLookup = self::MPEGaudioModeExtensionArray();
-			$MPEGaudioEmphasisLookup      = self::MPEGaudioEmphasisArray();
-		}
-
-		if (isset($MPEGaudioVersionLookup[$rawarray['version']])) {
-			$decodedVersion = $MPEGaudioVersionLookup[$rawarray['version']];
-		} else {
-			echo ($echoerrors ? "\n".'invalid Version ('.$rawarray['version'].')' : '');
-			return false;
-		}
-		if (isset($MPEGaudioLayerLookup[$rawarray['layer']])) {
-			$decodedLayer = $MPEGaudioLayerLookup[$rawarray['layer']];
-		} else {
-			echo ($echoerrors ? "\n".'invalid Layer ('.$rawarray['layer'].')' : '');
-			return false;
-		}
-		if (!isset($MPEGaudioBitrateLookup[$decodedVersion][$decodedLayer][$rawarray['bitrate']])) {
-			echo ($echoerrors ? "\n".'invalid Bitrate ('.$rawarray['bitrate'].')' : '');
-			if ($rawarray['bitrate'] == 15) {
-				// known issue in LAME 3.90 - 3.93.1 where free-format has bitrate ID of 15 instead of 0
-				// let it go through here otherwise file will not be identified
-				if (!$allowBitrate15) {
-					return false;
-				}
-			} else {
-				return false;
-			}
-		}
-		if (!isset($MPEGaudioFrequencyLookup[$decodedVersion][$rawarray['sample_rate']])) {
-			echo ($echoerrors ? "\n".'invalid Frequency ('.$rawarray['sample_rate'].')' : '');
-			return false;
-		}
-		if (!isset($MPEGaudioChannelModeLookup[$rawarray['channelmode']])) {
-			echo ($echoerrors ? "\n".'invalid ChannelMode ('.$rawarray['channelmode'].')' : '');
-			return false;
-		}
-		if (!isset($MPEGaudioModeExtensionLookup[$decodedLayer][$rawarray['modeextension']])) {
-			echo ($echoerrors ? "\n".'invalid Mode Extension ('.$rawarray['modeextension'].')' : '');
-			return false;
-		}
-		if (!isset($MPEGaudioEmphasisLookup[$rawarray['emphasis']])) {
-			echo ($echoerrors ? "\n".'invalid Emphasis ('.$rawarray['emphasis'].')' : '');
-			return false;
-		}
-		// These are just either set or not set, you can't mess that up :)
-		// $rawarray['protection'];
-		// $rawarray['padding'];
-		// $rawarray['private'];
-		// $rawarray['copyright'];
-		// $rawarray['original'];
-
-		return true;
-	}
-
-	public static function MPEGaudioHeaderDecode($Header4Bytes) {
-		// AAAA AAAA  AAAB BCCD  EEEE FFGH  IIJJ KLMM
-		// A - Frame sync (all bits set)
-		// B - MPEG Audio version ID
-		// C - Layer description
-		// D - Protection bit
-		// E - Bitrate index
-		// F - Sampling rate frequency index
-		// G - Padding bit
-		// H - Private bit
-		// I - Channel Mode
-		// J - Mode extension (Only if Joint stereo)
-		// K - Copyright
-		// L - Original
-		// M - Emphasis
-
-		if (strlen($Header4Bytes) != 4) {
-			return false;
-		}
-
-		$MPEGrawHeader['synch']         = (getid3_lib::BigEndian2Int(substr($Header4Bytes, 0, 2)) & 0xFFE0) >> 4;
-		$MPEGrawHeader['version']       = (ord($Header4Bytes{1}) & 0x18) >> 3; //    BB
-		$MPEGrawHeader['layer']         = (ord($Header4Bytes{1}) & 0x06) >> 1; //      CC
-		$MPEGrawHeader['protection']    = (ord($Header4Bytes{1}) & 0x01);      //        D
-		$MPEGrawHeader['bitrate']       = (ord($Header4Bytes{2}) & 0xF0) >> 4; // EEEE
-		$MPEGrawHeader['sample_rate']   = (ord($Header4Bytes{2}) & 0x0C) >> 2; //     FF
-		$MPEGrawHeader['padding']       = (ord($Header4Bytes{2}) & 0x02) >> 1; //       G
-		$MPEGrawHeader['private']       = (ord($Header4Bytes{2}) & 0x01);      //        H
-		$MPEGrawHeader['channelmode']   = (ord($Header4Bytes{3}) & 0xC0) >> 6; // II
-		$MPEGrawHeader['modeextension'] = (ord($Header4Bytes{3}) & 0x30) >> 4; //   JJ
-		$MPEGrawHeader['copyright']     = (ord($Header4Bytes{3}) & 0x08) >> 3; //     K
-		$MPEGrawHeader['original']      = (ord($Header4Bytes{3}) & 0x04) >> 2; //      L
-		$MPEGrawHeader['emphasis']      = (ord($Header4Bytes{3}) & 0x03);      //       MM
-
-		return $MPEGrawHeader;
-	}
-
-	public static function MPEGaudioFrameLength(&$bitrate, &$version, &$layer, $padding, &$samplerate) {
-		static $AudioFrameLengthCache = array();
-
-		if (!isset($AudioFrameLengthCache[$bitrate][$version][$layer][$padding][$samplerate])) {
-			$AudioFrameLengthCache[$bitrate][$version][$layer][$padding][$samplerate] = false;
-			if ($bitrate != 'free') {
-
-				if ($version == '1') {
-
-					if ($layer == '1') {
-
-						// For Layer I slot is 32 bits long
-						$FrameLengthCoefficient = 48;
-						$SlotLength = 4;
-
-					} else { // Layer 2 / 3
-
-						// for Layer 2 and Layer 3 slot is 8 bits long.
-						$FrameLengthCoefficient = 144;
-						$SlotLength = 1;
-
-					}
-
-				} else { // MPEG-2 / MPEG-2.5
-
-					if ($layer == '1') {
-
-						// For Layer I slot is 32 bits long
-						$FrameLengthCoefficient = 24;
-						$SlotLength = 4;
-
-					} elseif ($layer == '2') {
-
-						// for Layer 2 and Layer 3 slot is 8 bits long.
-						$FrameLengthCoefficient = 144;
-						$SlotLength = 1;
-
-					} else { // layer 3
-
-						// for Layer 2 and Layer 3 slot is 8 bits long.
-						$FrameLengthCoefficient = 72;
-						$SlotLength = 1;
-
-					}
-
-				}
-
-				// FrameLengthInBytes = ((Coefficient * BitRate) / SampleRate) + Padding
-				if ($samplerate > 0) {
-					$NewFramelength  = ($FrameLengthCoefficient * $bitrate) / $samplerate;
-					$NewFramelength  = floor($NewFramelength / $SlotLength) * $SlotLength; // round to next-lower multiple of SlotLength (1 byte for Layer 2/3, 4 bytes for Layer I)
-					if ($padding) {
-						$NewFramelength += $SlotLength;
-					}
-					$AudioFrameLengthCache[$bitrate][$version][$layer][$padding][$samplerate] = (int) $NewFramelength;
-				}
-			}
-		}
-		return $AudioFrameLengthCache[$bitrate][$version][$layer][$padding][$samplerate];
-	}
-
-	public static function ClosestStandardMP3Bitrate($bit_rate) {
-		static $standard_bit_rates = array (320000, 256000, 224000, 192000, 160000, 128000, 112000, 96000, 80000, 64000, 56000, 48000, 40000, 32000, 24000, 16000, 8000);
-		static $bit_rate_table = array (0=>'-');
-		$round_bit_rate = intval(round($bit_rate, -3));
-		if (!isset($bit_rate_table[$round_bit_rate])) {
-			if ($round_bit_rate > max($standard_bit_rates)) {
-				$bit_rate_table[$round_bit_rate] = round($bit_rate, 2 - strlen($bit_rate));
-			} else {
-				$bit_rate_table[$round_bit_rate] = max($standard_bit_rates);
-				foreach ($standard_bit_rates as $standard_bit_rate) {
-					if ($round_bit_rate >= $standard_bit_rate + (($bit_rate_table[$round_bit_rate] - $standard_bit_rate) / 2)) {
-						break;
-					}
-					$bit_rate_table[$round_bit_rate] = $standard_bit_rate;
-				}
-			}
-		}
-		return $bit_rate_table[$round_bit_rate];
-	}
-
-	public static function XingVBRidOffset($version, $channelmode) {
-		static $XingVBRidOffsetCache = array();
-		if (empty($XingVBRidOffset)) {
-			$XingVBRidOffset = array (
-				'1'   => array ('mono'          => 0x15, // 4 + 17 = 21
-								'stereo'        => 0x24, // 4 + 32 = 36
-								'joint stereo'  => 0x24,
-								'dual channel'  => 0x24
-							   ),
-
-				'2'   => array ('mono'          => 0x0D, // 4 +  9 = 13
-								'stereo'        => 0x15, // 4 + 17 = 21
-								'joint stereo'  => 0x15,
-								'dual channel'  => 0x15
-							   ),
-
-				'2.5' => array ('mono'          => 0x15,
-								'stereo'        => 0x15,
-								'joint stereo'  => 0x15,
-								'dual channel'  => 0x15
-							   )
-			);
-		}
-		return $XingVBRidOffset[$version][$channelmode];
-	}
-
-	public static function LAMEvbrMethodLookup($VBRmethodID) {
-		static $LAMEvbrMethodLookup = array(
-			0x00 => 'unknown',
-			0x01 => 'cbr',
-			0x02 => 'abr',
-			0x03 => 'vbr-old / vbr-rh',
-			0x04 => 'vbr-new / vbr-mtrh',
-			0x05 => 'vbr-mt',
-			0x06 => 'vbr (full vbr method 4)',
-			0x08 => 'cbr (constant bitrate 2 pass)',
-			0x09 => 'abr (2 pass)',
-			0x0F => 'reserved'
-		);
-		return (isset($LAMEvbrMethodLookup[$VBRmethodID]) ? $LAMEvbrMethodLookup[$VBRmethodID] : '');
-	}
-
-	public static function LAMEmiscStereoModeLookup($StereoModeID) {
-		static $LAMEmiscStereoModeLookup = array(
-			0 => 'mono',
-			1 => 'stereo',
-			2 => 'dual mono',
-			3 => 'joint stereo',
-			4 => 'forced stereo',
-			5 => 'auto',
-			6 => 'intensity stereo',
-			7 => 'other'
-		);
-		return (isset($LAMEmiscStereoModeLookup[$StereoModeID]) ? $LAMEmiscStereoModeLookup[$StereoModeID] : '');
-	}
-
-	public static function LAMEmiscSourceSampleFrequencyLookup($SourceSampleFrequencyID) {
-		static $LAMEmiscSourceSampleFrequencyLookup = array(
-			0 => '<= 32 kHz',
-			1 => '44.1 kHz',
-			2 => '48 kHz',
-			3 => '> 48kHz'
-		);
-		return (isset($LAMEmiscSourceSampleFrequencyLookup[$SourceSampleFrequencyID]) ? $LAMEmiscSourceSampleFrequencyLookup[$SourceSampleFrequencyID] : '');
-	}
-
-	public static function LAMEsurroundInfoLookup($SurroundInfoID) {
-		static $LAMEsurroundInfoLookup = array(
-			0 => 'no surround info',
-			1 => 'DPL encoding',
-			2 => 'DPL2 encoding',
-			3 => 'Ambisonic encoding'
-		);
-		return (isset($LAMEsurroundInfoLookup[$SurroundInfoID]) ? $LAMEsurroundInfoLookup[$SurroundInfoID] : 'reserved');
-	}
-
-	public static function LAMEpresetUsedLookup($LAMEtag) {
-
-		if ($LAMEtag['preset_used_id'] == 0) {
-			// no preset used (LAME >=3.93)
-			// no preset recorded (LAME <3.93)
-			return '';
-		}
-		$LAMEpresetUsedLookup = array();
-
-		/////  THIS PART CANNOT BE STATIC .
-		for ($i = 8; $i <= 320; $i++) {
-			switch ($LAMEtag['vbr_method']) {
-				case 'cbr':
-					$LAMEpresetUsedLookup[$i] = '--alt-preset '.$LAMEtag['vbr_method'].' '.$i;
-					break;
-				case 'abr':
-				default: // other VBR modes shouldn't be here(?)
-					$LAMEpresetUsedLookup[$i] = '--alt-preset '.$i;
-					break;
-			}
-		}
-
-		// named old-style presets (studio, phone, voice, etc) are handled in GuessEncoderOptions()
-
-		// named alt-presets
-		$LAMEpresetUsedLookup[1000] = '--r3mix';
-		$LAMEpresetUsedLookup[1001] = '--alt-preset standard';
-		$LAMEpresetUsedLookup[1002] = '--alt-preset extreme';
-		$LAMEpresetUsedLookup[1003] = '--alt-preset insane';
-		$LAMEpresetUsedLookup[1004] = '--alt-preset fast standard';
-		$LAMEpresetUsedLookup[1005] = '--alt-preset fast extreme';
-		$LAMEpresetUsedLookup[1006] = '--alt-preset medium';
-		$LAMEpresetUsedLookup[1007] = '--alt-preset fast medium';
-
-		// LAME 3.94 additions/changes
-		$LAMEpresetUsedLookup[1010] = '--preset portable';                                                           // 3.94a15 Oct 21 2003
-		$LAMEpresetUsedLookup[1015] = '--preset radio';                                                              // 3.94a15 Oct 21 2003
-
-		$LAMEpresetUsedLookup[320]  = '--preset insane';                                                             // 3.94a15 Nov 12 2003
-		$LAMEpresetUsedLookup[410]  = '-V9';
-		$LAMEpresetUsedLookup[420]  = '-V8';
-		$LAMEpresetUsedLookup[440]  = '-V6';
-		$LAMEpresetUsedLookup[430]  = '--preset radio';                                                              // 3.94a15 Nov 12 2003
-		$LAMEpresetUsedLookup[450]  = '--preset '.(($LAMEtag['raw']['vbr_method'] == 4) ? 'fast ' : '').'portable';  // 3.94a15 Nov 12 2003
-		$LAMEpresetUsedLookup[460]  = '--preset '.(($LAMEtag['raw']['vbr_method'] == 4) ? 'fast ' : '').'medium';    // 3.94a15 Nov 12 2003
-		$LAMEpresetUsedLookup[470]  = '--r3mix';                                                                     // 3.94b1  Dec 18 2003
-		$LAMEpresetUsedLookup[480]  = '--preset '.(($LAMEtag['raw']['vbr_method'] == 4) ? 'fast ' : '').'standard';  // 3.94a15 Nov 12 2003
-		$LAMEpresetUsedLookup[490]  = '-V1';
-		$LAMEpresetUsedLookup[500]  = '--preset '.(($LAMEtag['raw']['vbr_method'] == 4) ? 'fast ' : '').'extreme';   // 3.94a15 Nov 12 2003
-
-		return (isset($LAMEpresetUsedLookup[$LAMEtag['preset_used_id']]) ? $LAMEpresetUsedLookup[$LAMEtag['preset_used_id']] : 'new/unknown preset: '.$LAMEtag['preset_used_id'].' - report to info@getid3.org');
-	}
-
-}
Index: www/wp-admin/custom-header.php
===================================================================
--- www/wp-admin/custom-header.php	(revision 38565)
+++ www/wp-admin/autoload/appearance/Custom_Image_Header.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/Requests/SSL.php
===================================================================
--- www/wp-includes/Requests/SSL.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_SSL.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/ID3/getid3.lib.php
===================================================================
--- www/wp-includes/ID3/getid3.lib.php	(revision 38565)
+++ www/wp-includes/autoload/id3/getid3_lib.php	(revision )
@@ -605,8 +605,6 @@
 		}
 
 		if (empty($tempdir)) {
-			// yes this is ugly, feel free to suggest a better way
-			require_once(dirname(__FILE__).'/getid3.php');
 			$getid3_temp = new getID3();
 			$tempdir = $getid3_temp->tempdir;
 			unset($getid3_temp);
@@ -1153,8 +1151,6 @@
 	public static function GetDataImageSize($imgData, &$imageinfo=array()) {
 		static $tempdir = '';
 		if (empty($tempdir)) {
-			// yes this is ugly, feel free to suggest a better way
-			require_once(dirname(__FILE__).'/getid3.php');
 			$getid3_temp = new getID3();
 			$tempdir = $getid3_temp->tempdir;
 			unset($getid3_temp);
Index: www/wp-includes/SimplePie/Credit.php
===================================================================
--- www/wp-includes/SimplePie/Credit.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_Credit.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-widget.php
===================================================================
--- www/wp-includes/class-wp-widget.php	(revision 38565)
+++ www/wp-includes/autoload/widget/WP_Widget.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/edit-tag-form.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/edit-tag-form.php	(revision 38565)
+++ www/wp-admin/edit-tag-form.php	(revision 38565)
@@ -1,272 +0,0 @@
-<?php
-/**
- * Edit tag form for inclusion in administration panels.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-// don't load directly
-if ( ! defined( 'ABSPATH' ) ) {
-	die( '-1' );
-}
-
-// Back compat hooks
-if ( 'category' == $taxonomy ) {
-	/**
- 	 * Fires before the Edit Category form.
-	 *
-	 * @since 2.1.0
-	 * @deprecated 3.0.0 Use {$taxonomy}_pre_edit_form instead.
-	 *
-	 * @param object $tag Current category term object.
-	 */
-	do_action( 'edit_category_form_pre', $tag );
-} elseif ( 'link_category' == $taxonomy ) {
-	/**
-	 * Fires before the Edit Link Category form.
-	 *
-	 * @since 2.3.0
-	 * @deprecated 3.0.0 Use {$taxonomy}_pre_edit_form instead.
-	 *
-	 * @param object $tag Current link category term object.
-	 */
-	do_action( 'edit_link_category_form_pre', $tag );
-} else {
-	/**
-	 * Fires before the Edit Tag form.
-	 *
-	 * @since 2.5.0
-	 * @deprecated 3.0.0 Use {$taxonomy}_pre_edit_form instead.
-	 *
-	 * @param object $tag Current tag term object.
-	 */
-	do_action( 'edit_tag_form_pre', $tag );
-}
-
-/**
- * Use with caution, see https://codex.wordpress.org/Function_Reference/wp_reset_vars
- */
-wp_reset_vars( array( 'wp_http_referer' ) );
-
-$wp_http_referer = remove_query_arg( array( 'action', 'message', 'tag_ID' ), $wp_http_referer );
-
-/** Also used by Edit Tags */
-require_once( ABSPATH . 'wp-admin/includes/edit-tag-messages.php' );
-
-/**
- * Fires before the Edit Term form for all taxonomies.
- *
- * The dynamic portion of the hook name, `$taxonomy`, refers to
- * the taxonomy slug.
- *
- * @since 3.0.0
- *
- * @param object $tag      Current taxonomy term object.
- * @param string $taxonomy Current $taxonomy slug.
- */
-do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy ); ?>
-
-<div class="wrap">
-<h1><?php echo $tax->labels->edit_item; ?></h1>
-
-<?php if ( $message ) : ?>
-<div id="message" class="updated">
-	<p><strong><?php echo $message; ?></strong></p>
-	<?php if ( $wp_http_referer ) { ?>
-	<p><a href="<?php echo esc_url( $wp_http_referer ); ?>"><?php
-		/* translators: %s: taxonomy name */
-		printf( _x( '&larr; Back to %s', 'admin screen' ), $tax->labels->name );
-	?></a></p>
-	<?php } else { ?>
-	<p><a href="<?php echo esc_url( wp_get_referer() ); ?>"><?php
-		/* translators: %s: taxonomy name */
-		printf( _x( '&larr; Back to %s', 'admin screen' ), $tax->labels->name );
-	?></a></p>
-	<?php } ?>
-</div>
-<?php endif; ?>
-
-<div id="ajax-response"></div>
-
-<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate"
-<?php
-/**
- * Fires inside the Edit Term form tag.
- *
- * The dynamic portion of the hook name, `$taxonomy`, refers to
- * the taxonomy slug.
- *
- * @since 3.7.0
- */
-do_action( "{$taxonomy}_term_edit_form_tag" );
-?>>
-<input type="hidden" name="action" value="editedtag"/>
-<input type="hidden" name="tag_ID" value="<?php echo esc_attr( $tag_ID ) ?>"/>
-<input type="hidden" name="taxonomy" value="<?php echo esc_attr( $taxonomy ) ?>"/>
-<?php
-wp_original_referer_field( true, 'previous' );
-wp_nonce_field( 'update-tag_' . $tag_ID );
-
-/**
- * Fires at the beginning of the Edit Term form.
- *
- * At this point, the required hidden fields and nonces have already been output.
- *
- * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
- *
- * @since 4.5.0
- *
- * @param object $tag      Current taxonomy term object.
- * @param string $taxonomy Current $taxonomy slug.
- */
-do_action( "{$taxonomy}_term_edit_form_top", $tag, $taxonomy );
-?>
-	<table class="form-table">
-		<tr class="form-field form-required term-name-wrap">
-			<th scope="row"><label for="name"><?php _ex( 'Name', 'term name' ); ?></label></th>
-			<td><input name="name" id="name" type="text" value="<?php if ( isset( $tag->name ) ) echo esc_attr($tag->name); ?>" size="40" aria-required="true" />
-			<p class="description"><?php _e('The name is how it appears on your site.'); ?></p></td>
-		</tr>
-<?php if ( !global_terms_enabled() ) { ?>
-		<tr class="form-field term-slug-wrap">
-			<th scope="row"><label for="slug"><?php _e( 'Slug' ); ?></label></th>
-			<?php
-			/**
-			 * Filters the editable slug.
-			 *
-			 * Note: This is a multi-use hook in that it is leveraged both for editable
-			 * post URIs and term slugs.
-			 *
-			 * @since 2.6.0
-			 * @since 4.4.0 The `$tag` parameter was added.
-			 *
-			 * @param string         $slug The editable slug. Will be either a term slug or post URI depending
-			 *                             upon the context in which it is evaluated.
-			 * @param object|WP_Post $tag  Term or WP_Post object.
-			 */
-			$slug = isset( $tag->slug ) ? apply_filters( 'editable_slug', $tag->slug, $tag ) : '';
-			?>
-			<td><input name="slug" id="slug" type="text" value="<?php echo esc_attr( $slug ); ?>" size="40" />
-			<p class="description"><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p></td>
-		</tr>
-<?php } ?>
-<?php if ( is_taxonomy_hierarchical($taxonomy) ) : ?>
-		<tr class="form-field term-parent-wrap">
-			<th scope="row"><label for="parent"><?php _ex( 'Parent', 'term parent' ); ?></label></th>
-			<td>
-				<?php
-				$dropdown_args = array(
-					'hide_empty'       => 0,
-					'hide_if_empty'    => false,
-					'taxonomy'         => $taxonomy,
-					'name'             => 'parent',
-					'orderby'          => 'name',
-					'selected'         => $tag->parent,
-					'exclude_tree'     => $tag->term_id,
-					'hierarchical'     => true,
-					'show_option_none' => __( 'None' ),
-				);
-
-				/** This filter is documented in wp-admin/edit-tags.php */
-				$dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy, 'edit' );
-				wp_dropdown_categories( $dropdown_args ); ?>
-				<?php if ( 'category' == $taxonomy ) : ?>
-				<p class="description"><?php _e('Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.'); ?></p>
-				<?php endif; ?>
-			</td>
-		</tr>
-<?php endif; // is_taxonomy_hierarchical() ?>
-		<tr class="form-field term-description-wrap">
-			<th scope="row"><label for="description"><?php _e( 'Description' ); ?></label></th>
-			<td><textarea name="description" id="description" rows="5" cols="50" class="large-text"><?php echo $tag->description; // textarea_escaped ?></textarea>
-			<p class="description"><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></p></td>
-		</tr>
-		<?php
-		// Back compat hooks
-		if ( 'category' == $taxonomy ) {
-			/**
-			 * Fires after the Edit Category form fields are displayed.
-			 *
-			 * @since 2.9.0
-			 * @deprecated 3.0.0 Use {$taxonomy}_edit_form_fields instead.
-			 *
-			 * @param object $tag Current category term object.
-			 */
-			do_action( 'edit_category_form_fields', $tag );
-		} elseif ( 'link_category' == $taxonomy ) {
-			/**
-			 * Fires after the Edit Link Category form fields are displayed.
-			 *
-			 * @since 2.9.0
-			 * @deprecated 3.0.0 Use {$taxonomy}_edit_form_fields instead.
-			 *
-			 * @param object $tag Current link category term object.
-			 */
-			do_action( 'edit_link_category_form_fields', $tag );
-		} else {
-			/**
-			 * Fires after the Edit Tag form fields are displayed.
-			 *
-			 * @since 2.9.0
-			 * @deprecated 3.0.0 Use {$taxonomy}_edit_form_fields instead.
-			 *
-			 * @param object $tag Current tag term object.
-			 */
-			do_action( 'edit_tag_form_fields', $tag );
-		}
-		/**
-		 * Fires after the Edit Term form fields are displayed.
-		 *
-		 * The dynamic portion of the hook name, `$taxonomy`, refers to
-		 * the taxonomy slug.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param object $tag      Current taxonomy term object.
-		 * @param string $taxonomy Current taxonomy slug.
-		 */
-		do_action( "{$taxonomy}_edit_form_fields", $tag, $taxonomy );
-		?>
-	</table>
-<?php
-// Back compat hooks
-if ( 'category' == $taxonomy ) {
-	/** This action is documented in wp-admin/edit-tags.php */
-	do_action( 'edit_category_form', $tag );
-} elseif ( 'link_category' == $taxonomy ) {
-	/** This action is documented in wp-admin/edit-tags.php */
-	do_action( 'edit_link_category_form', $tag );
-} else {
-	/**
-	 * Fires at the end of the Edit Term form.
-	 *
-	 * @since 2.5.0
-	 * @deprecated 3.0.0 Use {$taxonomy}_edit_form instead.
-	 *
-	 * @param object $tag Current taxonomy term object.
-	 */
-	do_action( 'edit_tag_form', $tag );
-}
-/**
- * Fires at the end of the Edit Term form for all taxonomies.
- *
- * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
- *
- * @since 3.0.0
- *
- * @param object $tag      Current taxonomy term object.
- * @param string $taxonomy Current taxonomy slug.
- */
-do_action( "{$taxonomy}_edit_form", $tag, $taxonomy );
-
-submit_button( __('Update') );
-?>
-</form>
-</div>
-
-<?php if ( ! wp_is_mobile() ) : ?>
-<script type="text/javascript">
-try{document.forms.edittag.name.focus();}catch(e){}
-</script>
-<?php endif;
Index: www/wp-includes/class-wp-site-query.php
===================================================================
--- www/wp-includes/class-wp-site-query.php	(revision 38565)
+++ www/wp-includes/autoload/query/WP_Site_Query.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/id3/ID3/module.audio.dts.php
===================================================================
--- www/wp-includes/autoload/id3/ID3/module.audio.dts.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/id3/ID3/module.audio.dts.php	(revision UNDEFINED)
@@ -1,291 +0,0 @@
-<?php
-/////////////////////////////////////////////////////////////////
-/// getID3() by James Heinrich <info@getid3.org>               //
-//  available at http://getid3.sourceforge.net                 //
-//            or http://www.getid3.org                         //
-//          also https://github.com/JamesHeinrich/getID3       //
-/////////////////////////////////////////////////////////////////
-// See readme.txt for more details                             //
-/////////////////////////////////////////////////////////////////
-//                                                             //
-// module.audio.dts.php                                        //
-// module for analyzing DTS Audio files                        //
-// dependencies: NONE                                          //
-//                                                             //
-/////////////////////////////////////////////////////////////////
-
-
-/**
-* @tutorial http://wiki.multimedia.cx/index.php?title=DTS
-*/
-class getid3_dts extends getid3_handler
-{
-	/**
-	* Default DTS syncword used in native .cpt or .dts formats
-	*/
-    const syncword = "\x7F\xFE\x80\x01";
-
-	private $readBinDataOffset = 0;
-
-    /**
-    * Possible syncwords indicating bitstream encoding
-    */
-    public static $syncwords = array(
-    	0 => "\x7F\xFE\x80\x01",  // raw big-endian
-    	1 => "\xFE\x7F\x01\x80",  // raw little-endian
-    	2 => "\x1F\xFF\xE8\x00",  // 14-bit big-endian
-    	3 => "\xFF\x1F\x00\xE8"); // 14-bit little-endian
-
-	public function Analyze() {
-		$info = &$this->getid3->info;
-		$info['fileformat'] = 'dts';
-
-		$this->fseek($info['avdataoffset']);
-		$DTSheader = $this->fread(20); // we only need 2 words magic + 6 words frame header, but these words may be normal 16-bit words OR 14-bit words with 2 highest bits set to zero, so 8 words can be either 8*16/8 = 16 bytes OR 8*16*(16/14)/8 = 18.3 bytes
-
-		// check syncword
-		$sync = substr($DTSheader, 0, 4);
-        if (($encoding = array_search($sync, self::$syncwords)) !== false) {
-
-        	$info['dts']['raw']['magic'] = $sync;
-			$this->readBinDataOffset = 32;
-
-        } elseif ($this->isDependencyFor('matroska')) {
-
-			// Matroska contains DTS without syncword encoded as raw big-endian format
-			$encoding = 0;
-			$this->readBinDataOffset = 0;
-
-        } else {
-
-			unset($info['fileformat']);
-			return $this->error('Expecting "'.implode('| ', array_map('getid3_lib::PrintHexBytes', self::$syncwords)).'" at offset '.$info['avdataoffset'].', found "'.getid3_lib::PrintHexBytes($sync).'"');
-
-		}
-
-		// decode header
-		$fhBS = '';
-		for ($word_offset = 0; $word_offset <= strlen($DTSheader); $word_offset += 2) {
-			switch ($encoding) {
-				case 0: // raw big-endian
-					$fhBS .=        getid3_lib::BigEndian2Bin(       substr($DTSheader, $word_offset, 2) );
-					break;
-				case 1: // raw little-endian
-					$fhBS .=        getid3_lib::BigEndian2Bin(strrev(substr($DTSheader, $word_offset, 2)));
-					break;
-				case 2: // 14-bit big-endian
-					$fhBS .= substr(getid3_lib::BigEndian2Bin(       substr($DTSheader, $word_offset, 2) ), 2, 14);
-					break;
-				case 3: // 14-bit little-endian
-					$fhBS .= substr(getid3_lib::BigEndian2Bin(strrev(substr($DTSheader, $word_offset, 2))), 2, 14);
-					break;
-			}
-		}
-
-		$info['dts']['raw']['frame_type']             =        $this->readBinData($fhBS,  1);
-		$info['dts']['raw']['deficit_samples']        =        $this->readBinData($fhBS,  5);
-		$info['dts']['flags']['crc_present']          = (bool) $this->readBinData($fhBS,  1);
-		$info['dts']['raw']['pcm_sample_blocks']      =        $this->readBinData($fhBS,  7);
-		$info['dts']['raw']['frame_byte_size']        =        $this->readBinData($fhBS, 14);
-		$info['dts']['raw']['channel_arrangement']    =        $this->readBinData($fhBS,  6);
-		$info['dts']['raw']['sample_frequency']       =        $this->readBinData($fhBS,  4);
-		$info['dts']['raw']['bitrate']                =        $this->readBinData($fhBS,  5);
-		$info['dts']['flags']['embedded_downmix']     = (bool) $this->readBinData($fhBS,  1);
-		$info['dts']['flags']['dynamicrange']         = (bool) $this->readBinData($fhBS,  1);
-		$info['dts']['flags']['timestamp']            = (bool) $this->readBinData($fhBS,  1);
-		$info['dts']['flags']['auxdata']              = (bool) $this->readBinData($fhBS,  1);
-		$info['dts']['flags']['hdcd']                 = (bool) $this->readBinData($fhBS,  1);
-		$info['dts']['raw']['extension_audio']        =        $this->readBinData($fhBS,  3);
-		$info['dts']['flags']['extended_coding']      = (bool) $this->readBinData($fhBS,  1);
-		$info['dts']['flags']['audio_sync_insertion'] = (bool) $this->readBinData($fhBS,  1);
-		$info['dts']['raw']['lfe_effects']            =        $this->readBinData($fhBS,  2);
-		$info['dts']['flags']['predictor_history']    = (bool) $this->readBinData($fhBS,  1);
-		if ($info['dts']['flags']['crc_present']) {
-			$info['dts']['raw']['crc16']              =        $this->readBinData($fhBS, 16);
-		}
-		$info['dts']['flags']['mri_perfect_reconst']  = (bool) $this->readBinData($fhBS,  1);
-		$info['dts']['raw']['encoder_soft_version']   =        $this->readBinData($fhBS,  4);
-		$info['dts']['raw']['copy_history']           =        $this->readBinData($fhBS,  2);
-		$info['dts']['raw']['bits_per_sample']        =        $this->readBinData($fhBS,  2);
-		$info['dts']['flags']['surround_es']          = (bool) $this->readBinData($fhBS,  1);
-		$info['dts']['flags']['front_sum_diff']       = (bool) $this->readBinData($fhBS,  1);
-		$info['dts']['flags']['surround_sum_diff']    = (bool) $this->readBinData($fhBS,  1);
-		$info['dts']['raw']['dialog_normalization']   =        $this->readBinData($fhBS,  4);
-
-
-		$info['dts']['bitrate']              = self::bitrateLookup($info['dts']['raw']['bitrate']);
-		$info['dts']['bits_per_sample']      = self::bitPerSampleLookup($info['dts']['raw']['bits_per_sample']);
-		$info['dts']['sample_rate']          = self::sampleRateLookup($info['dts']['raw']['sample_frequency']);
-		$info['dts']['dialog_normalization'] = self::dialogNormalization($info['dts']['raw']['dialog_normalization'], $info['dts']['raw']['encoder_soft_version']);
-		$info['dts']['flags']['lossless']    = (($info['dts']['raw']['bitrate'] == 31) ? true  : false);
-		$info['dts']['bitrate_mode']         = (($info['dts']['raw']['bitrate'] == 30) ? 'vbr' : 'cbr');
-		$info['dts']['channels']             = self::numChannelsLookup($info['dts']['raw']['channel_arrangement']);
-		$info['dts']['channel_arrangement']  = self::channelArrangementLookup($info['dts']['raw']['channel_arrangement']);
-
-		$info['audio']['dataformat']          = 'dts';
-		$info['audio']['lossless']            = $info['dts']['flags']['lossless'];
-		$info['audio']['bitrate_mode']        = $info['dts']['bitrate_mode'];
-		$info['audio']['bits_per_sample']     = $info['dts']['bits_per_sample'];
-		$info['audio']['sample_rate']         = $info['dts']['sample_rate'];
-		$info['audio']['channels']            = $info['dts']['channels'];
-		$info['audio']['bitrate']             = $info['dts']['bitrate'];
-		if (isset($info['avdataend']) && !empty($info['dts']['bitrate']) && is_numeric($info['dts']['bitrate'])) {
-			$info['playtime_seconds']         = ($info['avdataend'] - $info['avdataoffset']) / ($info['dts']['bitrate'] / 8);
-			if (($encoding == 2) || ($encoding == 3)) {
-				// 14-bit data packed into 16-bit words, so the playtime is wrong because only (14/16) of the bytes in the data portion of the file are used at the specified bitrate
-				$info['playtime_seconds'] *= (14 / 16);
-			}
-		}
-		return true;
-	}
-
-	private function readBinData($bin, $length) {
-		$data = substr($bin, $this->readBinDataOffset, $length);
-		$this->readBinDataOffset += $length;
-
-		return bindec($data);
-	}
-
-	public static function bitrateLookup($index) {
-		static $lookup = array(
-			0  => 32000,
-			1  => 56000,
-			2  => 64000,
-			3  => 96000,
-			4  => 112000,
-			5  => 128000,
-			6  => 192000,
-			7  => 224000,
-			8  => 256000,
-			9  => 320000,
-			10 => 384000,
-			11 => 448000,
-			12 => 512000,
-			13 => 576000,
-			14 => 640000,
-			15 => 768000,
-			16 => 960000,
-			17 => 1024000,
-			18 => 1152000,
-			19 => 1280000,
-			20 => 1344000,
-			21 => 1408000,
-			22 => 1411200,
-			23 => 1472000,
-			24 => 1536000,
-			25 => 1920000,
-			26 => 2048000,
-			27 => 3072000,
-			28 => 3840000,
-			29 => 'open',
-			30 => 'variable',
-			31 => 'lossless',
-		);
-		return (isset($lookup[$index]) ? $lookup[$index] : false);
-	}
-
-	public static function sampleRateLookup($index) {
-		static $lookup = array(
-			0  => 'invalid',
-			1  => 8000,
-			2  => 16000,
-			3  => 32000,
-			4  => 'invalid',
-			5  => 'invalid',
-			6  => 11025,
-			7  => 22050,
-			8  => 44100,
-			9  => 'invalid',
-			10 => 'invalid',
-			11 => 12000,
-			12 => 24000,
-			13 => 48000,
-			14 => 'invalid',
-			15 => 'invalid',
-		);
-		return (isset($lookup[$index]) ? $lookup[$index] : false);
-	}
-
-	public static function bitPerSampleLookup($index) {
-		static $lookup = array(
-			0  => 16,
-			1  => 20,
-			2  => 24,
-			3  => 24,
-		);
-		return (isset($lookup[$index]) ? $lookup[$index] : false);
-	}
-
-	public static function numChannelsLookup($index) {
-		switch ($index) {
-			case 0:
-				return 1;
-				break;
-			case 1:
-			case 2:
-			case 3:
-			case 4:
-				return 2;
-				break;
-			case 5:
-			case 6:
-				return 3;
-				break;
-			case 7:
-			case 8:
-				return 4;
-				break;
-			case 9:
-				return 5;
-				break;
-			case 10:
-			case 11:
-			case 12:
-				return 6;
-				break;
-			case 13:
-				return 7;
-				break;
-			case 14:
-			case 15:
-				return 8;
-				break;
-		}
-		return false;
-	}
-
-	public static function channelArrangementLookup($index) {
-		static $lookup = array(
-			0  => 'A',
-			1  => 'A + B (dual mono)',
-			2  => 'L + R (stereo)',
-			3  => '(L+R) + (L-R) (sum-difference)',
-			4  => 'LT + RT (left and right total)',
-			5  => 'C + L + R',
-			6  => 'L + R + S',
-			7  => 'C + L + R + S',
-			8  => 'L + R + SL + SR',
-			9  => 'C + L + R + SL + SR',
-			10 => 'CL + CR + L + R + SL + SR',
-			11 => 'C + L + R+ LR + RR + OV',
-			12 => 'CF + CR + LF + RF + LR + RR',
-			13 => 'CL + C + CR + L + R + SL + SR',
-			14 => 'CL + CR + L + R + SL1 + SL2 + SR1 + SR2',
-			15 => 'CL + C+ CR + L + R + SL + S + SR',
-		);
-		return (isset($lookup[$index]) ? $lookup[$index] : 'user-defined');
-	}
-
-	public static function dialogNormalization($index, $version) {
-		switch ($version) {
-			case 7:
-				return 0 - $index;
-				break;
-			case 6:
-				return 0 - 16 - $index;
-				break;
-		}
-		return false;
-	}
-
-}
Index: www/wp-includes/autoload/rest-api/class-wp-rest-server.php
===================================================================
--- www/wp-includes/autoload/rest-api/class-wp-rest-server.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/rest-api/class-wp-rest-server.php	(revision UNDEFINED)
@@ -1,1265 +0,0 @@
-<?php
-/**
- * REST API: WP_REST_Server class
- *
- * @package WordPress
- * @subpackage REST_API
- * @since 4.4.0
- */
-
-/**
- * Core class used to implement the WordPress REST API server.
- *
- * @since 4.4.0
- */
-class WP_REST_Server {
-
-	/**
-	 * Alias for GET transport method.
-	 *
-	 * @since 4.4.0
-	 * @var string
-	 */
-	const READABLE = 'GET';
-
-	/**
-	 * Alias for POST transport method.
-	 *
-	 * @since 4.4.0
-	 * @var string
-	 */
-	const CREATABLE = 'POST';
-
-	/**
-	 * Alias for POST, PUT, PATCH transport methods together.
-	 *
-	 * @since 4.4.0
-	 * @var string
-	 */
-	const EDITABLE = 'POST, PUT, PATCH';
-
-	/**
-	 * Alias for DELETE transport method.
-	 *
-	 * @since 4.4.0
-	 * @var string
-	 */
-	const DELETABLE = 'DELETE';
-
-	/**
-	 * Alias for GET, POST, PUT, PATCH & DELETE transport methods together.
-	 *
-	 * @since 4.4.0
-	 * @var string
-	 */
-	const ALLMETHODS = 'GET, POST, PUT, PATCH, DELETE';
-
-	/**
-	 * Namespaces registered to the server.
-	 *
-	 * @since 4.4.0
-	 * @access protected
-	 * @var array
-	 */
-	protected $namespaces = array();
-
-	/**
-	 * Endpoints registered to the server.
-	 *
-	 * @since 4.4.0
-	 * @access protected
-	 * @var array
-	 */
-	protected $endpoints = array();
-
-	/**
-	 * Options defined for the routes.
-	 *
-	 * @since 4.4.0
-	 * @access protected
-	 * @var array
-	 */
-	protected $route_options = array();
-
-	/**
-	 * Instantiates the REST server.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 */
-	public function __construct() {
-		$this->endpoints = array(
-			// Meta endpoints.
-			'/' => array(
-				'callback' => array( $this, 'get_index' ),
-				'methods' => 'GET',
-				'args' => array(
-					'context' => array(
-						'default' => 'view',
-					),
-				),
-			),
-		);
-	}
-
-
-	/**
-	 * Checks the authentication headers if supplied.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @return WP_Error|null WP_Error indicates unsuccessful login, null indicates successful
-	 *                       or no authentication provided
-	 */
-	public function check_authentication() {
-		/**
-		 * Pass an authentication error to the API
-		 *
-		 * This is used to pass a WP_Error from an authentication method back to
-		 * the API.
-		 *
-		 * Authentication methods should check first if they're being used, as
-		 * multiple authentication methods can be enabled on a site (cookies,
-		 * HTTP basic auth, OAuth). If the authentication method hooked in is
-		 * not actually being attempted, null should be returned to indicate
-		 * another authentication method should check instead. Similarly,
-		 * callbacks should ensure the value is `null` before checking for
-		 * errors.
-		 *
-		 * A WP_Error instance can be returned if an error occurs, and this should
-		 * match the format used by API methods internally (that is, the `status`
-		 * data should be used). A callback can return `true` to indicate that
-		 * the authentication method was used, and it succeeded.
-		 *
-		 * @since 4.4.0
-		 *
-		 * @param WP_Error|null|bool WP_Error if authentication error, null if authentication
-		 *                              method wasn't used, true if authentication succeeded.
-		 */
-		return apply_filters( 'rest_authentication_errors', null );
-	}
-
-	/**
-	 * Converts an error to a response object.
-	 *
-	 * This iterates over all error codes and messages to change it into a flat
-	 * array. This enables simpler client behaviour, as it is represented as a
-	 * list in JSON rather than an object/map.
-	 *
-	 * @since 4.4.0
-	 * @access protected
-	 *
-	 * @param WP_Error $error WP_Error instance.
-	 * @return WP_REST_Response List of associative arrays with code and message keys.
-	 */
-	protected function error_to_response( $error ) {
-		$error_data = $error->get_error_data();
-
-		if ( is_array( $error_data ) && isset( $error_data['status'] ) ) {
-			$status = $error_data['status'];
-		} else {
-			$status = 500;
-		}
-
-		$errors = array();
-
-		foreach ( (array) $error->errors as $code => $messages ) {
-			foreach ( (array) $messages as $message ) {
-				$errors[] = array( 'code' => $code, 'message' => $message, 'data' => $error->get_error_data( $code ) );
-			}
-		}
-
-		$data = $errors[0];
-		if ( count( $errors ) > 1 ) {
-			// Remove the primary error.
-			array_shift( $errors );
-			$data['additional_errors'] = $errors;
-		}
-
-		$response = new WP_REST_Response( $data, $status );
-
-		return $response;
-	}
-
-	/**
-	 * Retrieves an appropriate error representation in JSON.
-	 *
-	 * Note: This should only be used in WP_REST_Server::serve_request(), as it
-	 * cannot handle WP_Error internally. All callbacks and other internal methods
-	 * should instead return a WP_Error with the data set to an array that includes
-	 * a 'status' key, with the value being the HTTP status to send.
-	 *
-	 * @since 4.4.0
-	 * @access protected
-	 *
-	 * @param string $code    WP_Error-style code.
-	 * @param string $message Human-readable message.
-	 * @param int    $status  Optional. HTTP status code to send. Default null.
-	 * @return string JSON representation of the error
-	 */
-	protected function json_error( $code, $message, $status = null ) {
-		if ( $status ) {
-			$this->set_status( $status );
-		}
-
-		$error = compact( 'code', 'message' );
-
-		return wp_json_encode( $error );
-	}
-
-	/**
-	 * Handles serving an API request.
-	 *
-	 * Matches the current server URI to a route and runs the first matching
-	 * callback then outputs a JSON representation of the returned value.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @see WP_REST_Server::dispatch()
-	 *
-	 * @param string $path Optional. The request route. If not set, `$_SERVER['PATH_INFO']` will be used.
-	 *                     Default null.
-	 * @return false|null Null if not served and a HEAD request, false otherwise.
-	 */
-	public function serve_request( $path = null ) {
-		$content_type = isset( $_GET['_jsonp'] ) ? 'application/javascript' : 'application/json';
-		$this->send_header( 'Content-Type', $content_type . '; charset=' . get_option( 'blog_charset' ) );
-		$this->send_header( 'X-Robots-Tag', 'noindex' );
-
-		$api_root = get_rest_url();
-		if ( ! empty( $api_root ) ) {
-			$this->send_header( 'Link', '<' . esc_url_raw( $api_root ) . '>; rel="https://api.w.org/"' );
-		}
-
-		/*
-		 * Mitigate possible JSONP Flash attacks.
-		 *
-		 * https://miki.it/blog/2014/7/8/abusing-jsonp-with-rosetta-flash/
-		 */
-		$this->send_header( 'X-Content-Type-Options', 'nosniff' );
-		$this->send_header( 'Access-Control-Expose-Headers', 'X-WP-Total, X-WP-TotalPages' );
-		$this->send_header( 'Access-Control-Allow-Headers', 'Authorization' );
-
-		/**
-		 * Send nocache headers on authenticated requests.
-		 *
-		 * @since 4.4.0
-		 *
-		 * @param bool $rest_send_nocache_headers Whether to send no-cache headers.
-		 */
-		$send_no_cache_headers = apply_filters( 'rest_send_nocache_headers', is_user_logged_in() );
-		if ( $send_no_cache_headers ) {
-			foreach ( wp_get_nocache_headers() as $header => $header_value ) {
-				$this->send_header( $header, $header_value );
-			}
-		}
-
-		/**
-		 * Filters whether the REST API is enabled.
-		 *
-		 * @since 4.4.0
-		 *
-		 * @param bool $rest_enabled Whether the REST API is enabled. Default true.
-		 */
-		$enabled = apply_filters( 'rest_enabled', true );
-
-		/**
-		 * Filters whether jsonp is enabled.
-		 *
-		 * @since 4.4.0
-		 *
-		 * @param bool $jsonp_enabled Whether jsonp is enabled. Default true.
-		 */
-		$jsonp_enabled = apply_filters( 'rest_jsonp_enabled', true );
-
-		$jsonp_callback = null;
-
-		if ( ! $enabled ) {
-			echo $this->json_error( 'rest_disabled', __( 'The REST API is disabled on this site.' ), 404 );
-			return false;
-		}
-		if ( isset( $_GET['_jsonp'] ) ) {
-			if ( ! $jsonp_enabled ) {
-				echo $this->json_error( 'rest_callback_disabled', __( 'JSONP support is disabled on this site.' ), 400 );
-				return false;
-			}
-
-			$jsonp_callback = $_GET['_jsonp'];
-			if ( ! wp_check_jsonp_callback( $jsonp_callback ) ) {
-				echo $this->json_error( 'rest_callback_invalid', __( 'The JSONP callback function is invalid.' ), 400 );
-				return false;
-			}
-		}
-
-		if ( empty( $path ) ) {
-			if ( isset( $_SERVER['PATH_INFO'] ) ) {
-				$path = $_SERVER['PATH_INFO'];
-			} else {
-				$path = '/';
-			}
-		}
-
-		$request = new WP_REST_Request( $_SERVER['REQUEST_METHOD'], $path );
-
-		$request->set_query_params( wp_unslash( $_GET ) );
-		$request->set_body_params( wp_unslash( $_POST ) );
-		$request->set_file_params( $_FILES );
-		$request->set_headers( $this->get_headers( wp_unslash( $_SERVER ) ) );
-		$request->set_body( $this->get_raw_data() );
-
-		/*
-		 * HTTP method override for clients that can't use PUT/PATCH/DELETE. First, we check
-		 * $_GET['_method']. If that is not set, we check for the HTTP_X_HTTP_METHOD_OVERRIDE
-		 * header.
-		 */
-		if ( isset( $_GET['_method'] ) ) {
-			$request->set_method( $_GET['_method'] );
-		} elseif ( isset( $_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'] ) ) {
-			$request->set_method( $_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'] );
-		}
-
-		$result = $this->check_authentication();
-
-		if ( ! is_wp_error( $result ) ) {
-			$result = $this->dispatch( $request );
-		}
-
-		// Normalize to either WP_Error or WP_REST_Response...
-		$result = rest_ensure_response( $result );
-
-		// ...then convert WP_Error across.
-		if ( is_wp_error( $result ) ) {
-			$result = $this->error_to_response( $result );
-		}
-
-		/**
-		 * Filters the API response.
-		 *
-		 * Allows modification of the response before returning.
-		 *
-		 * @since 4.4.0
-		 * @since 4.5.0 Applied to embedded responses.
-		 *
-		 * @param WP_HTTP_Response $result  Result to send to the client. Usually a WP_REST_Response.
-		 * @param WP_REST_Server   $this    Server instance.
-		 * @param WP_REST_Request  $request Request used to generate the response.
-		 */
-		$result = apply_filters( 'rest_post_dispatch', rest_ensure_response( $result ), $this, $request );
-
-		// Wrap the response in an envelope if asked for.
-		if ( isset( $_GET['_envelope'] ) ) {
-			$result = $this->envelope_response( $result, isset( $_GET['_embed'] ) );
-		}
-
-		// Send extra data from response objects.
-		$headers = $result->get_headers();
-		$this->send_headers( $headers );
-
-		$code = $result->get_status();
-		$this->set_status( $code );
-
-		/**
-		 * Filters whether the request has already been served.
-		 *
-		 * Allow sending the request manually - by returning true, the API result
-		 * will not be sent to the client.
-		 *
-		 * @since 4.4.0
-		 *
-		 * @param bool             $served  Whether the request has already been served.
-		 *                                           Default false.
-		 * @param WP_HTTP_Response $result  Result to send to the client. Usually a WP_REST_Response.
-		 * @param WP_REST_Request  $request Request used to generate the response.
-		 * @param WP_REST_Server   $this    Server instance.
-		 */
-		$served = apply_filters( 'rest_pre_serve_request', false, $result, $request, $this );
-
-		if ( ! $served ) {
-			if ( 'HEAD' === $request->get_method() ) {
-				return null;
-			}
-
-			// Embed links inside the request.
-			$result = $this->response_to_data( $result, isset( $_GET['_embed'] ) );
-
-			$result = wp_json_encode( $result );
-
-			$json_error_message = $this->get_json_last_error();
-			if ( $json_error_message ) {
-				$json_error_obj = new WP_Error( 'rest_encode_error', $json_error_message, array( 'status' => 500 ) );
-				$result = $this->error_to_response( $json_error_obj );
-				$result = wp_json_encode( $result->data[0] );
-			}
-
-			if ( $jsonp_callback ) {
-				// Prepend '/**/' to mitigate possible JSONP Flash attacks
-				// https://miki.it/blog/2014/7/8/abusing-jsonp-with-rosetta-flash/
-				echo '/**/' . $jsonp_callback . '(' . $result . ')';
-			} else {
-				echo $result;
-			}
-		}
-		return null;
-	}
-
-	/**
-	 * Converts a response to data to send.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param WP_REST_Response $response Response object.
-	 * @param bool             $embed    Whether links should be embedded.
-	 * @return array {
-	 *     Data with sub-requests embedded.
-	 *
-	 *     @type array [$_links]    Links.
-	 *     @type array [$_embedded] Embeddeds.
-	 * }
-	 */
-	public function response_to_data( $response, $embed ) {
-		$data  = $response->get_data();
-		$links = $this->get_compact_response_links( $response );
-
-		if ( ! empty( $links ) ) {
-			// Convert links to part of the data.
-			$data['_links'] = $links;
-		}
-		if ( $embed ) {
-			// Determine if this is a numeric array.
-			if ( wp_is_numeric_array( $data ) ) {
-				$data = array_map( array( $this, 'embed_links' ), $data );
-			} else {
-				$data = $this->embed_links( $data );
-			}
-		}
-
-		return $data;
-	}
-
-	/**
-	 * Retrieves links from a response.
-	 *
-	 * Extracts the links from a response into a structured hash, suitable for
-	 * direct output.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 * @static
-	 *
-	 * @param WP_REST_Response $response Response to extract links from.
-	 * @return array Map of link relation to list of link hashes.
-	 */
-	public static function get_response_links( $response ) {
-		$links = $response->get_links();
-		if ( empty( $links ) ) {
-			return array();
-		}
-
-		// Convert links to part of the data.
-		$data = array();
-		foreach ( $links as $rel => $items ) {
-			$data[ $rel ] = array();
-
-			foreach ( $items as $item ) {
-				$attributes = $item['attributes'];
-				$attributes['href'] = $item['href'];
-				$data[ $rel ][] = $attributes;
-			}
-		}
-
-		return $data;
-	}
-
-	/**
-	 * Retrieves the CURIEs (compact URIs) used for relations.
-	 *
-	 * Extracts the links from a response into a structured hash, suitable for
-	 * direct output.
-	 *
-	 * @since 4.5.0
-	 * @access public
-	 * @static
-	 *
-	 * @param WP_REST_Response $response Response to extract links from.
-	 * @return array Map of link relation to list of link hashes.
-	 */
-	public static function get_compact_response_links( $response ) {
-		$links = self::get_response_links( $response );
-
-		if ( empty( $links ) ) {
-			return array();
-		}
-
-		$curies = $response->get_curies();
-		$used_curies = array();
-
-		foreach ( $links as $rel => $items ) {
-
-			// Convert $rel URIs to their compact versions if they exist.
-			foreach ( $curies as $curie ) {
-				$href_prefix = substr( $curie['href'], 0, strpos( $curie['href'], '{rel}' ) );
-				if ( strpos( $rel, $href_prefix ) !== 0 ) {
-					continue;
-				}
-
-				// Relation now changes from '$uri' to '$curie:$relation'
-				$rel_regex = str_replace( '\{rel\}', '(.+)', preg_quote( $curie['href'], '!' ) );
-				preg_match( '!' . $rel_regex . '!', $rel, $matches );
-				if ( $matches ) {
-					$new_rel = $curie['name'] . ':' . $matches[1];
-					$used_curies[ $curie['name'] ] = $curie;
-					$links[ $new_rel ] = $items;
-					unset( $links[ $rel ] );
-					break;
-				}
-			}
-		}
-
-		// Push the curies onto the start of the links array.
-		if ( $used_curies ) {
-			$links['curies'] = array_values( $used_curies );
-		}
-
-		return $links;
-	}
-
-	/**
-	 * Embeds the links from the data into the request.
-	 *
-	 * @since 4.4.0
-	 * @access protected
-	 *
-	 * @param array $data Data from the request.
-	 * @return array {
-	 *     Data with sub-requests embedded.
-	 *
-	 *     @type array [$_links]    Links.
-	 *     @type array [$_embedded] Embeddeds.
-	 * }
-	 */
-	protected function embed_links( $data ) {
-		if ( empty( $data['_links'] ) ) {
-			return $data;
-		}
-
-		$embedded = array();
-
-		foreach ( $data['_links'] as $rel => $links ) {
-			// Ignore links to self, for obvious reasons.
-			if ( 'self' === $rel ) {
-				continue;
-			}
-
-			$embeds = array();
-
-			foreach ( $links as $item ) {
-				// Determine if the link is embeddable.
-				if ( empty( $item['embeddable'] ) ) {
-					// Ensure we keep the same order.
-					$embeds[] = array();
-					continue;
-				}
-
-				// Run through our internal routing and serve.
-				$request = WP_REST_Request::from_url( $item['href'] );
-				if ( ! $request ) {
-					$embeds[] = array();
-					continue;
-				}
-
-				// Embedded resources get passed context=embed.
-				if ( empty( $request['context'] ) ) {
-					$request['context'] = 'embed';
-				}
-
-				$response = $this->dispatch( $request );
-
-				/** This filter is documented in wp-includes/rest-api/class-wp-rest-server.php */
-				$response = apply_filters( 'rest_post_dispatch', rest_ensure_response( $response ), $this, $request );
-
-				$embeds[] = $this->response_to_data( $response, false );
-			}
-
-			// Determine if any real links were found.
-			$has_links = count( array_filter( $embeds ) );
-			if ( $has_links ) {
-				$embedded[ $rel ] = $embeds;
-			}
-		}
-
-		if ( ! empty( $embedded ) ) {
-			$data['_embedded'] = $embedded;
-		}
-
-		return $data;
-	}
-
-	/**
-	 * Wraps the response in an envelope.
-	 *
-	 * The enveloping technique is used to work around browser/client
-	 * compatibility issues. Essentially, it converts the full HTTP response to
-	 * data instead.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param WP_REST_Response $response Response object.
-	 * @param bool             $embed    Whether links should be embedded.
-	 * @return WP_REST_Response New response with wrapped data
-	 */
-	public function envelope_response( $response, $embed ) {
-		$envelope = array(
-			'body'    => $this->response_to_data( $response, $embed ),
-			'status'  => $response->get_status(),
-			'headers' => $response->get_headers(),
-		);
-
-		/**
-		 * Filters the enveloped form of a response.
-		 *
-		 * @since 4.4.0
-		 *
-		 * @param array            $envelope Envelope data.
-		 * @param WP_REST_Response $response Original response data.
-		 */
-		$envelope = apply_filters( 'rest_envelope_response', $envelope, $response );
-
-		// Ensure it's still a response and return.
-		return rest_ensure_response( $envelope );
-	}
-
-	/**
-	 * Registers a route to the server.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param string $namespace  Namespace.
-	 * @param string $route      The REST route.
-	 * @param array  $route_args Route arguments.
-	 * @param bool   $override   Optional. Whether the route should be overriden if it already exists.
-	 *                           Default false.
-	 */
-	public function register_route( $namespace, $route, $route_args, $override = false ) {
-		if ( ! isset( $this->namespaces[ $namespace ] ) ) {
-			$this->namespaces[ $namespace ] = array();
-
-			$this->register_route( $namespace, '/' . $namespace, array(
-				array(
-					'methods' => self::READABLE,
-					'callback' => array( $this, 'get_namespace_index' ),
-					'args' => array(
-						'namespace' => array(
-							'default' => $namespace,
-						),
-						'context' => array(
-							'default' => 'view',
-						),
-					),
-				),
-			) );
-		}
-
-		// Associative to avoid double-registration.
-		$this->namespaces[ $namespace ][ $route ] = true;
-		$route_args['namespace'] = $namespace;
-
-		if ( $override || empty( $this->endpoints[ $route ] ) ) {
-			$this->endpoints[ $route ] = $route_args;
-		} else {
-			$this->endpoints[ $route ] = array_merge( $this->endpoints[ $route ], $route_args );
-		}
-	}
-
-	/**
-	 * Retrieves the route map.
-	 *
-	 * The route map is an associative array with path regexes as the keys. The
-	 * value is an indexed array with the callback function/method as the first
-	 * item, and a bitmask of HTTP methods as the second item (see the class
-	 * constants).
-	 *
-	 * Each route can be mapped to more than one callback by using an array of
-	 * the indexed arrays. This allows mapping e.g. GET requests to one callback
-	 * and POST requests to another.
-	 *
-	 * Note that the path regexes (array keys) must have @ escaped, as this is
-	 * used as the delimiter with preg_match()
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @return array `'/path/regex' => array( $callback, $bitmask )` or
-	 *               `'/path/regex' => array( array( $callback, $bitmask ), ...)`.
-	 */
-	public function get_routes() {
-
-		/**
-		 * Filters the array of available endpoints.
-		 *
-		 * @since 4.4.0
-		 *
-		 * @param array $endpoints The available endpoints. An array of matching regex patterns, each mapped
-		 *                         to an array of callbacks for the endpoint. These take the format
-		 *                         `'/path/regex' => array( $callback, $bitmask )` or
-		 *                         `'/path/regex' => array( array( $callback, $bitmask ).
-		 */
-		$endpoints = apply_filters( 'rest_endpoints', $this->endpoints );
-
-		// Normalise the endpoints.
-		$defaults = array(
-			'methods'       => '',
-			'accept_json'   => false,
-			'accept_raw'    => false,
-			'show_in_index' => true,
-			'args'          => array(),
-		);
-
-		foreach ( $endpoints as $route => &$handlers ) {
-
-			if ( isset( $handlers['callback'] ) ) {
-				// Single endpoint, add one deeper.
-				$handlers = array( $handlers );
-			}
-
-			if ( ! isset( $this->route_options[ $route ] ) ) {
-				$this->route_options[ $route ] = array();
-			}
-
-			foreach ( $handlers as $key => &$handler ) {
-
-				if ( ! is_numeric( $key ) ) {
-					// Route option, move it to the options.
-					$this->route_options[ $route ][ $key ] = $handler;
-					unset( $handlers[ $key ] );
-					continue;
-				}
-
-				$handler = wp_parse_args( $handler, $defaults );
-
-				// Allow comma-separated HTTP methods.
-				if ( is_string( $handler['methods'] ) ) {
-					$methods = explode( ',', $handler['methods'] );
-				} else if ( is_array( $handler['methods'] ) ) {
-					$methods = $handler['methods'];
-				} else {
-					$methods = array();
-				}
-
-				$handler['methods'] = array();
-
-				foreach ( $methods as $method ) {
-					$method = strtoupper( trim( $method ) );
-					$handler['methods'][ $method ] = true;
-				}
-			}
-		}
-		return $endpoints;
-	}
-
-	/**
-	 * Retrieves namespaces registered on the server.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @return array List of registered namespaces.
-	 */
-	public function get_namespaces() {
-		return array_keys( $this->namespaces );
-	}
-
-	/**
-	 * Retrieves specified options for a route.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param string $route Route pattern to fetch options for.
-	 * @return array|null Data as an associative array if found, or null if not found.
-	 */
-	public function get_route_options( $route ) {
-		if ( ! isset( $this->route_options[ $route ] ) ) {
-			return null;
-		}
-
-		return $this->route_options[ $route ];
-	}
-
-	/**
-	 * Matches the request to a callback and call it.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param WP_REST_Request $request Request to attempt dispatching.
-	 * @return WP_REST_Response Response returned by the callback.
-	 */
-	public function dispatch( $request ) {
-		/**
-		 * Filters the pre-calculated result of a REST dispatch request.
-		 *
-		 * Allow hijacking the request before dispatching by returning a non-empty. The returned value
-		 * will be used to serve the request instead.
-		 *
-		 * @since 4.4.0
-		 *
-		 * @param mixed           $result  Response to replace the requested version with. Can be anything
-		 *                                 a normal endpoint can return, or null to not hijack the request.
-		 * @param WP_REST_Server  $this    Server instance.
-		 * @param WP_REST_Request $request Request used to generate the response.
-		 */
-		$result = apply_filters( 'rest_pre_dispatch', null, $this, $request );
-
-		if ( ! empty( $result ) ) {
-			return $result;
-		}
-
-		$method = $request->get_method();
-		$path   = $request->get_route();
-
-		foreach ( $this->get_routes() as $route => $handlers ) {
-			$match = preg_match( '@^' . $route . '$@i', $path, $args );
-
-			if ( ! $match ) {
-				continue;
-			}
-
-			foreach ( $handlers as $handler ) {
-				$callback  = $handler['callback'];
-				$response = null;
-
-				// Fallback to GET method if no HEAD method is registered.
-				$checked_method = $method;
-				if ( 'HEAD' === $method && empty( $handler['methods']['HEAD'] ) ) {
-					$checked_method = 'GET';
-				}
-				if ( empty( $handler['methods'][ $checked_method ] ) ) {
-					continue;
-				}
-
-				if ( ! is_callable( $callback ) ) {
-					$response = new WP_Error( 'rest_invalid_handler', __( 'The handler for the route is invalid' ), array( 'status' => 500 ) );
-				}
-
-				if ( ! is_wp_error( $response ) ) {
-					// Remove the redundant preg_match argument.
-					unset( $args[0] );
-
-					$request->set_url_params( $args );
-					$request->set_attributes( $handler );
-
-					$defaults = array();
-
-					foreach ( $handler['args'] as $arg => $options ) {
-						if ( isset( $options['default'] ) ) {
-							$defaults[ $arg ] = $options['default'];
-						}
-					}
-
-					$request->set_default_params( $defaults );
-
-					$check_required = $request->has_valid_params();
-					if ( is_wp_error( $check_required ) ) {
-						$response = $check_required;
-					} else {
-						$check_sanitized = $request->sanitize_params();
-						if ( is_wp_error( $check_sanitized ) ) {
-							$response = $check_sanitized;
-						}
-					}
-				}
-
-				if ( ! is_wp_error( $response ) ) {
-					// Check permission specified on the route.
-					if ( ! empty( $handler['permission_callback'] ) ) {
-						$permission = call_user_func( $handler['permission_callback'], $request );
-
-						if ( is_wp_error( $permission ) ) {
-							$response = $permission;
-						} else if ( false === $permission || null === $permission ) {
-							$response = new WP_Error( 'rest_forbidden', __( 'Sorry, you are not allowed to do that.' ), array( 'status' => 403 ) );
-						}
-					}
-				}
-
-				if ( ! is_wp_error( $response ) ) {
-					/**
-					 * Filters the REST dispatch request result.
-					 *
-					 * Allow plugins to override dispatching the request.
-					 *
-					 * @since 4.4.0
-					 * @since 4.5.0 Added `$route` and `$handler` parameters.
-					 *
-					 * @param bool            $dispatch_result Dispatch result, will be used if not empty.
-					 * @param WP_REST_Request $request         Request used to generate the response.
-					 * @param string          $route           Route matched for the request.
-					 * @param array           $handler         Route handler used for the request.
-					 */
-					$dispatch_result = apply_filters( 'rest_dispatch_request', null, $request, $route, $handler );
-
-					// Allow plugins to halt the request via this filter.
-					if ( null !== $dispatch_result ) {
-						$response = $dispatch_result;
-					} else {
-						$response = call_user_func( $callback, $request );
-					}
-				}
-
-				if ( is_wp_error( $response ) ) {
-					$response = $this->error_to_response( $response );
-				} else {
-					$response = rest_ensure_response( $response );
-				}
-
-				$response->set_matched_route( $route );
-				$response->set_matched_handler( $handler );
-
-				return $response;
-			}
-		}
-
-		return $this->error_to_response( new WP_Error( 'rest_no_route', __( 'No route was found matching the URL and request method' ), array( 'status' => 404 ) ) );
-	}
-
-	/**
-	 * Returns if an error occurred during most recent JSON encode/decode.
-	 *
-	 * Strings to be translated will be in format like
-	 * "Encoding error: Maximum stack depth exceeded".
-	 *
-	 * @since 4.4.0
-	 * @access protected
-	 *
-	 * @return bool|string Boolean false or string error message.
-	 */
-	protected function get_json_last_error() {
-		// See https://core.trac.wordpress.org/ticket/27799.
-		if ( ! function_exists( 'json_last_error' ) ) {
-			return false;
-		}
-
-		$last_error_code = json_last_error();
-
-		if ( ( defined( 'JSON_ERROR_NONE' ) && JSON_ERROR_NONE === $last_error_code ) || empty( $last_error_code ) ) {
-			return false;
-		}
-
-		return json_last_error_msg();
-	}
-
-	/**
-	 * Retrieves the site index.
-	 *
-	 * This endpoint describes the capabilities of the site.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param array $request {
-	 *     Request.
-	 *
-	 *     @type string $context Context.
-	 * }
-	 * @return array Index entity
-	 */
-	public function get_index( $request ) {
-		// General site data.
-		$available = array(
-			'name'           => get_option( 'blogname' ),
-			'description'    => get_option( 'blogdescription' ),
-			'url'            => get_option( 'siteurl' ),
-			'home'           => home_url(),
-			'namespaces'     => array_keys( $this->namespaces ),
-			'authentication' => array(),
-			'routes'         => $this->get_data_for_routes( $this->get_routes(), $request['context'] ),
-		);
-
-		$response = new WP_REST_Response( $available );
-
-		$response->add_link( 'help', 'http://v2.wp-api.org/' );
-
-		/**
-		 * Filters the API root index data.
-		 *
-		 * This contains the data describing the API. This includes information
-		 * about supported authentication schemes, supported namespaces, routes
-		 * available on the API, and a small amount of data about the site.
-		 *
-		 * @since 4.4.0
-		 *
-		 * @param WP_REST_Response $response Response data.
-		 */
-		return apply_filters( 'rest_index', $response );
-	}
-
-	/**
-	 * Retrieves the index for a namespace.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param WP_REST_Request $request REST request instance.
-	 * @return WP_REST_Response|WP_Error WP_REST_Response instance if the index was found,
-	 *                                   WP_Error if the namespace isn't set.
-	 */
-	public function get_namespace_index( $request ) {
-		$namespace = $request['namespace'];
-
-		if ( ! isset( $this->namespaces[ $namespace ] ) ) {
-			return new WP_Error( 'rest_invalid_namespace', __( 'The specified namespace could not be found.' ), array( 'status' => 404 ) );
-		}
-
-		$routes = $this->namespaces[ $namespace ];
-		$endpoints = array_intersect_key( $this->get_routes(), $routes );
-
-		$data = array(
-			'namespace' => $namespace,
-			'routes' => $this->get_data_for_routes( $endpoints, $request['context'] ),
-		);
-		$response = rest_ensure_response( $data );
-
-		// Link to the root index.
-		$response->add_link( 'up', rest_url( '/' ) );
-
-		/**
-		 * Filters the namespace index data.
-		 *
-		 * This typically is just the route data for the namespace, but you can
-		 * add any data you'd like here.
-		 *
-		 * @since 4.4.0
-		 *
-		 * @param WP_REST_Response $response Response data.
-		 * @param WP_REST_Request  $request  Request data. The namespace is passed as the 'namespace' parameter.
-		 */
-		return apply_filters( 'rest_namespace_index', $response, $request );
-	}
-
-	/**
-	 * Retrieves the publicly-visible data for routes.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param array  $routes  Routes to get data for.
-	 * @param string $context Optional. Context for data. Accepts 'view' or 'help'. Default 'view'.
-	 * @return array Route data to expose in indexes.
-	 */
-	public function get_data_for_routes( $routes, $context = 'view' ) {
-		$available = array();
-
-		// Find the available routes.
-		foreach ( $routes as $route => $callbacks ) {
-			$data = $this->get_data_for_route( $route, $callbacks, $context );
-			if ( empty( $data ) ) {
-				continue;
-			}
-
-			/**
-			 * Filters the REST endpoint data.
-			 *
-			 * @since 4.4.0
-			 *
-			 * @param WP_REST_Request $request Request data. The namespace is passed as the 'namespace' parameter.
-			 */
-			$available[ $route ] = apply_filters( 'rest_endpoints_description', $data );
-		}
-
-		/**
-		 * Filters the publicly-visible data for routes.
-		 *
-		 * This data is exposed on indexes and can be used by clients or
-		 * developers to investigate the site and find out how to use it. It
-		 * acts as a form of self-documentation.
-		 *
-		 * @since 4.4.0
-		 *
-		 * @param array $available Map of route to route data.
-		 * @param array $routes    Internal route data as an associative array.
-		 */
-		return apply_filters( 'rest_route_data', $available, $routes );
-	}
-
-	/**
-	 * Retrieves publicly-visible data for the route.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param string $route     Route to get data for.
-	 * @param array  $callbacks Callbacks to convert to data.
-	 * @param string $context   Optional. Context for the data. Accepts 'view' or 'help'. Default 'view'.
-	 * @return array|null Data for the route, or null if no publicly-visible data.
-	 */
-	public function get_data_for_route( $route, $callbacks, $context = 'view' ) {
-		$data = array(
-			'namespace' => '',
-			'methods' => array(),
-			'endpoints' => array(),
-		);
-
-		if ( isset( $this->route_options[ $route ] ) ) {
-			$options = $this->route_options[ $route ];
-
-			if ( isset( $options['namespace'] ) ) {
-				$data['namespace'] = $options['namespace'];
-			}
-
-			if ( isset( $options['schema'] ) && 'help' === $context ) {
-				$data['schema'] = call_user_func( $options['schema'] );
-			}
-		}
-
-		$route = preg_replace( '#\(\?P<(\w+?)>.*?\)#', '{$1}', $route );
-
-		foreach ( $callbacks as $callback ) {
-			// Skip to the next route if any callback is hidden.
-			if ( empty( $callback['show_in_index'] ) ) {
-				continue;
-			}
-
-			$data['methods'] = array_merge( $data['methods'], array_keys( $callback['methods'] ) );
-			$endpoint_data = array(
-				'methods' => array_keys( $callback['methods'] ),
-			);
-
-			if ( isset( $callback['args'] ) ) {
-				$endpoint_data['args'] = array();
-				foreach ( $callback['args'] as $key => $opts ) {
-					$arg_data = array(
-						'required' => ! empty( $opts['required'] ),
-					);
-					if ( isset( $opts['default'] ) ) {
-						$arg_data['default'] = $opts['default'];
-					}
-					if ( isset( $opts['enum'] ) ) {
-						$arg_data['enum'] = $opts['enum'];
-					}
-					if ( isset( $opts['description'] ) ) {
-						$arg_data['description'] = $opts['description'];
-					}
-					$endpoint_data['args'][ $key ] = $arg_data;
-				}
-			}
-
-			$data['endpoints'][] = $endpoint_data;
-
-			// For non-variable routes, generate links.
-			if ( strpos( $route, '{' ) === false ) {
-				$data['_links'] = array(
-					'self' => rest_url( $route ),
-				);
-			}
-		}
-
-		if ( empty( $data['methods'] ) ) {
-			// No methods supported, hide the route.
-			return null;
-		}
-
-		return $data;
-	}
-
-	/**
-	 * Sends an HTTP status code.
-	 *
-	 * @since 4.4.0
-	 * @access protected
-	 *
-	 * @param int $code HTTP status.
-	 */
-	protected function set_status( $code ) {
-		status_header( $code );
-	}
-
-	/**
-	 * Sends an HTTP header.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param string $key Header key.
-	 * @param string $value Header value.
-	 */
-	public function send_header( $key, $value ) {
-		/*
-		 * Sanitize as per RFC2616 (Section 4.2):
-		 *
-		 * Any LWS that occurs between field-content MAY be replaced with a
-		 * single SP before interpreting the field value or forwarding the
-		 * message downstream.
-		 */
-		$value = preg_replace( '/\s+/', ' ', $value );
-		header( sprintf( '%s: %s', $key, $value ) );
-	}
-
-	/**
-	 * Sends multiple HTTP headers.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param array $headers Map of header name to header value.
-	 */
-	public function send_headers( $headers ) {
-		foreach ( $headers as $key => $value ) {
-			$this->send_header( $key, $value );
-		}
-	}
-
-	/**
-	 * Retrieves the raw request entity (body).
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @global string $HTTP_RAW_POST_DATA Raw post data.
-	 *
-	 * @return string Raw request data.
-	 */
-	public static function get_raw_data() {
-		global $HTTP_RAW_POST_DATA;
-
-		/*
-		 * A bug in PHP < 5.2.2 makes $HTTP_RAW_POST_DATA not set by default,
-		 * but we can do it ourself.
-		 */
-		if ( ! isset( $HTTP_RAW_POST_DATA ) ) {
-			$HTTP_RAW_POST_DATA = file_get_contents( 'php://input' );
-		}
-
-		return $HTTP_RAW_POST_DATA;
-	}
-
-	/**
-	 * Extracts headers from a PHP-style $_SERVER array.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param array $server Associative array similar to `$_SERVER`.
-	 * @return array Headers extracted from the input.
-	 */
-	public function get_headers( $server ) {
-		$headers = array();
-
-		// CONTENT_* headers are not prefixed with HTTP_.
-		$additional = array( 'CONTENT_LENGTH' => true, 'CONTENT_MD5' => true, 'CONTENT_TYPE' => true );
-
-		foreach ( $server as $key => $value ) {
-			if ( strpos( $key, 'HTTP_' ) === 0 ) {
-				$headers[ substr( $key, 5 ) ] = $value;
-			} elseif ( isset( $additional[ $key ] ) ) {
-				$headers[ $key ] = $value;
-			}
-		}
-
-		return $headers;
-	}
-}
Index: www/wp-includes/ID3/module.audio-video.riff.php
===================================================================
--- www/wp-includes/ID3/module.audio-video.riff.php	(revision 38565)
+++ www/wp-includes/autoload/id3/getid3_riff.php	(revision )
@@ -23,9 +23,6 @@
 * @todo Rewrite RIFF parser totally
 */
 
-getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.mp3.php', __FILE__, true);
-getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.ac3.php', __FILE__, true);
-getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.dts.php', __FILE__, true);
 
 class getid3_riff extends getid3_handler {
 
\ No newline at end of file
Index: www/wp-includes/autoload/id3/ID3/module.audio-video.quicktime.php
===================================================================
--- www/wp-includes/autoload/id3/ID3/module.audio-video.quicktime.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/id3/ID3/module.audio-video.quicktime.php	(revision UNDEFINED)
@@ -1,2246 +0,0 @@
-<?php
-/////////////////////////////////////////////////////////////////
-/// getID3() by James Heinrich <info@getid3.org>               //
-//  available at http://getid3.sourceforge.net                 //
-//            or http://www.getid3.org                         //
-//          also https://github.com/JamesHeinrich/getID3       //
-/////////////////////////////////////////////////////////////////
-// See readme.txt for more details                             //
-/////////////////////////////////////////////////////////////////
-//                                                             //
-// module.audio-video.quicktime.php                            //
-// module for analyzing Quicktime and MP3-in-MP4 files         //
-// dependencies: module.audio.mp3.php                          //
-// dependencies: module.tag.id3v2.php                          //
-//                                                            ///
-/////////////////////////////////////////////////////////////////
-
-getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.mp3.php', __FILE__, true);
-getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.tag.id3v2.php', __FILE__, true); // needed for ISO 639-2 language code lookup
-
-class getid3_quicktime extends getid3_handler
-{
-
-	public $ReturnAtomData        = true;
-	public $ParseAllPossibleAtoms = false;
-
-	public function Analyze() {
-		$info = &$this->getid3->info;
-
-		$info['fileformat'] = 'quicktime';
-		$info['quicktime']['hinting']    = false;
-		$info['quicktime']['controller'] = 'standard'; // may be overridden if 'ctyp' atom is present
-
-		$this->fseek($info['avdataoffset']);
-
-		$offset      = 0;
-		$atomcounter = 0;
-		$atom_data_read_buffer_size = ($info['php_memory_limit'] ? round($info['php_memory_limit'] / 2) : $this->getid3->option_fread_buffer_size * 1024); // allow [default: 32MB] if PHP configured with no memory_limit
-		while ($offset < $info['avdataend']) {
-			if (!getid3_lib::intValueSupported($offset)) {
-				$info['error'][] = 'Unable to parse atom at offset '.$offset.' because beyond '.round(PHP_INT_MAX / 1073741824).'GB limit of PHP filesystem functions';
-				break;
-			}
-			$this->fseek($offset);
-			$AtomHeader = $this->fread(8);
-
-			$atomsize = getid3_lib::BigEndian2Int(substr($AtomHeader, 0, 4));
-			$atomname = substr($AtomHeader, 4, 4);
-
-			// 64-bit MOV patch by jlegateØktnc*com
-			if ($atomsize == 1) {
-				$atomsize = getid3_lib::BigEndian2Int($this->fread(8));
-			}
-
-			$info['quicktime'][$atomname]['name']   = $atomname;
-			$info['quicktime'][$atomname]['size']   = $atomsize;
-			$info['quicktime'][$atomname]['offset'] = $offset;
-
-			if (($offset + $atomsize) > $info['avdataend']) {
-				$info['error'][] = 'Atom at offset '.$offset.' claims to go beyond end-of-file (length: '.$atomsize.' bytes)';
-				return false;
-			}
-
-			if ($atomsize == 0) {
-				// Furthermore, for historical reasons the list of atoms is optionally
-				// terminated by a 32-bit integer set to 0. If you are writing a program
-				// to read user data atoms, you should allow for the terminating 0.
-				break;
-			}
-			$atomHierarchy = array();
-			$info['quicktime'][$atomname] = $this->QuicktimeParseAtom($atomname, $atomsize, $this->fread(min($atomsize, $atom_data_read_buffer_size)), $offset, $atomHierarchy, $this->ParseAllPossibleAtoms);
-
-			$offset += $atomsize;
-			$atomcounter++;
-		}
-
-		if (!empty($info['avdataend_tmp'])) {
-			// this value is assigned to a temp value and then erased because
-			// otherwise any atoms beyond the 'mdat' atom would not get parsed
-			$info['avdataend'] = $info['avdataend_tmp'];
-			unset($info['avdataend_tmp']);
-		}
-
-		if (!isset($info['bitrate']) && isset($info['playtime_seconds'])) {
-			$info['bitrate'] = (($info['avdataend'] - $info['avdataoffset']) * 8) / $info['playtime_seconds'];
-		}
-		if (isset($info['bitrate']) && !isset($info['audio']['bitrate']) && !isset($info['quicktime']['video'])) {
-			$info['audio']['bitrate'] = $info['bitrate'];
-		}
-		if (!empty($info['playtime_seconds']) && !isset($info['video']['frame_rate']) && !empty($info['quicktime']['stts_framecount'])) {
-			foreach ($info['quicktime']['stts_framecount'] as $key => $samples_count) {
-				$samples_per_second = $samples_count / $info['playtime_seconds'];
-				if ($samples_per_second > 240) {
-					// has to be audio samples
-				} else {
-					$info['video']['frame_rate'] = $samples_per_second;
-					break;
-				}
-			}
-		}
-		if (($info['audio']['dataformat'] == 'mp4') && empty($info['video']['resolution_x'])) {
-			$info['fileformat'] = 'mp4';
-			$info['mime_type']  = 'audio/mp4';
-			unset($info['video']['dataformat']);
-		}
-
-		if (!$this->ReturnAtomData) {
-			unset($info['quicktime']['moov']);
-		}
-
-		if (empty($info['audio']['dataformat']) && !empty($info['quicktime']['audio'])) {
-			$info['audio']['dataformat'] = 'quicktime';
-		}
-		if (empty($info['video']['dataformat']) && !empty($info['quicktime']['video'])) {
-			$info['video']['dataformat'] = 'quicktime';
-		}
-
-		return true;
-	}
-
-	public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset, &$atomHierarchy, $ParseAllPossibleAtoms) {
-		// http://developer.apple.com/techpubs/quicktime/qtdevdocs/APIREF/INDEX/atomalphaindex.htm
-
-		$info = &$this->getid3->info;
-
-		$atom_parent = end($atomHierarchy); // not array_pop($atomHierarchy); see http://www.getid3.org/phpBB3/viewtopic.php?t=1717
-		array_push($atomHierarchy, $atomname);
-		$atom_structure['hierarchy'] = implode(' ', $atomHierarchy);
-		$atom_structure['name']      = $atomname;
-		$atom_structure['size']      = $atomsize;
-		$atom_structure['offset']    = $baseoffset;
-		switch ($atomname) {
-			case 'moov': // MOVie container atom
-			case 'trak': // TRAcK container atom
-			case 'clip': // CLIPping container atom
-			case 'matt': // track MATTe container atom
-			case 'edts': // EDiTS container atom
-			case 'tref': // Track REFerence container atom
-			case 'mdia': // MeDIA container atom
-			case 'minf': // Media INFormation container atom
-			case 'dinf': // Data INFormation container atom
-			case 'udta': // User DaTA container atom
-			case 'cmov': // Compressed MOVie container atom
-			case 'rmra': // Reference Movie Record Atom
-			case 'rmda': // Reference Movie Descriptor Atom
-			case 'gmhd': // Generic Media info HeaDer atom (seen on QTVR)
-				$atom_structure['subatoms'] = $this->QuicktimeParseContainerAtom($atom_data, $baseoffset + 8, $atomHierarchy, $ParseAllPossibleAtoms);
-				break;
-
-			case 'ilst': // Item LiST container atom
-				if ($atom_structure['subatoms'] = $this->QuicktimeParseContainerAtom($atom_data, $baseoffset + 8, $atomHierarchy, $ParseAllPossibleAtoms)) {
-					// some "ilst" atoms contain data atoms that have a numeric name, and the data is far more accessible if the returned array is compacted
-					$allnumericnames = true;
-					foreach ($atom_structure['subatoms'] as $subatomarray) {
-						if (!is_integer($subatomarray['name']) || (count($subatomarray['subatoms']) != 1)) {
-							$allnumericnames = false;
-							break;
-						}
-					}
-					if ($allnumericnames) {
-						$newData = array();
-						foreach ($atom_structure['subatoms'] as $subatomarray) {
-							foreach ($subatomarray['subatoms'] as $newData_subatomarray) {
-								unset($newData_subatomarray['hierarchy'], $newData_subatomarray['name']);
-								$newData[$subatomarray['name']] = $newData_subatomarray;
-								break;
-							}
-						}
-						$atom_structure['data'] = $newData;
-						unset($atom_structure['subatoms']);
-					}
-				}
-				break;
-
-			case "\x00\x00\x00\x01":
-			case "\x00\x00\x00\x02":
-			case "\x00\x00\x00\x03":
-			case "\x00\x00\x00\x04":
-			case "\x00\x00\x00\x05":
-				$atomname = getid3_lib::BigEndian2Int($atomname);
-				$atom_structure['name'] = $atomname;
-				$atom_structure['subatoms'] = $this->QuicktimeParseContainerAtom($atom_data, $baseoffset + 8, $atomHierarchy, $ParseAllPossibleAtoms);
-				break;
-
-			case 'stbl': // Sample TaBLe container atom
-				$atom_structure['subatoms'] = $this->QuicktimeParseContainerAtom($atom_data, $baseoffset + 8, $atomHierarchy, $ParseAllPossibleAtoms);
-				$isVideo = false;
-				$framerate  = 0;
-				$framecount = 0;
-				foreach ($atom_structure['subatoms'] as $key => $value_array) {
-					if (isset($value_array['sample_description_table'])) {
-						foreach ($value_array['sample_description_table'] as $key2 => $value_array2) {
-							if (isset($value_array2['data_format'])) {
-								switch ($value_array2['data_format']) {
-									case 'avc1':
-									case 'mp4v':
-										// video data
-										$isVideo = true;
-										break;
-									case 'mp4a':
-										// audio data
-										break;
-								}
-							}
-						}
-					} elseif (isset($value_array['time_to_sample_table'])) {
-						foreach ($value_array['time_to_sample_table'] as $key2 => $value_array2) {
-							if (isset($value_array2['sample_count']) && isset($value_array2['sample_duration']) && ($value_array2['sample_duration'] > 0)) {
-								$framerate  = round($info['quicktime']['time_scale'] / $value_array2['sample_duration'], 3);
-								$framecount = $value_array2['sample_count'];
-							}
-						}
-					}
-				}
-				if ($isVideo && $framerate) {
-					$info['quicktime']['video']['frame_rate'] = $framerate;
-					$info['video']['frame_rate'] = $info['quicktime']['video']['frame_rate'];
-				}
-				if ($isVideo && $framecount) {
-					$info['quicktime']['video']['frame_count'] = $framecount;
-				}
-				break;
-
-
-			case 'aART': // Album ARTist
-			case 'catg': // CaTeGory
-			case 'covr': // COVeR artwork
-			case 'cpil': // ComPILation
-			case 'cprt': // CoPyRighT
-			case 'desc': // DESCription
-			case 'disk': // DISK number
-			case 'egid': // Episode Global ID
-			case 'gnre': // GeNRE
-			case 'keyw': // KEYWord
-			case 'ldes':
-			case 'pcst': // PodCaST
-			case 'pgap': // GAPless Playback
-			case 'purd': // PURchase Date
-			case 'purl': // Podcast URL
-			case 'rati':
-			case 'rndu':
-			case 'rpdu':
-			case 'rtng': // RaTiNG
-			case 'stik':
-			case 'tmpo': // TeMPO (BPM)
-			case 'trkn': // TRacK Number
-			case 'tves': // TV EpiSode
-			case 'tvnn': // TV Network Name
-			case 'tvsh': // TV SHow Name
-			case 'tvsn': // TV SeasoN
-			case 'akID': // iTunes store account type
-			case 'apID':
-			case 'atID':
-			case 'cmID':
-			case 'cnID':
-			case 'geID':
-			case 'plID':
-			case 'sfID': // iTunes store country
-			case "\xA9".'alb': // ALBum
-			case "\xA9".'art': // ARTist
-			case "\xA9".'ART':
-			case "\xA9".'aut':
-			case "\xA9".'cmt': // CoMmenT
-			case "\xA9".'com': // COMposer
-			case "\xA9".'cpy':
-			case "\xA9".'day': // content created year
-			case "\xA9".'dir':
-			case "\xA9".'ed1':
-			case "\xA9".'ed2':
-			case "\xA9".'ed3':
-			case "\xA9".'ed4':
-			case "\xA9".'ed5':
-			case "\xA9".'ed6':
-			case "\xA9".'ed7':
-			case "\xA9".'ed8':
-			case "\xA9".'ed9':
-			case "\xA9".'enc':
-			case "\xA9".'fmt':
-			case "\xA9".'gen': // GENre
-			case "\xA9".'grp': // GRouPing
-			case "\xA9".'hst':
-			case "\xA9".'inf':
-			case "\xA9".'lyr': // LYRics
-			case "\xA9".'mak':
-			case "\xA9".'mod':
-			case "\xA9".'nam': // full NAMe
-			case "\xA9".'ope':
-			case "\xA9".'PRD':
-			case "\xA9".'prd':
-			case "\xA9".'prf':
-			case "\xA9".'req':
-			case "\xA9".'src':
-			case "\xA9".'swr':
-			case "\xA9".'too': // encoder
-			case "\xA9".'trk': // TRacK
-			case "\xA9".'url':
-			case "\xA9".'wrn':
-			case "\xA9".'wrt': // WRiTer
-			case '----': // itunes specific
-				if ($atom_parent == 'udta') {
-					// User data atom handler
-					$atom_structure['data_length'] = getid3_lib::BigEndian2Int(substr($atom_data, 0, 2));
-					$atom_structure['language_id'] = getid3_lib::BigEndian2Int(substr($atom_data, 2, 2));
-					$atom_structure['data']        =                           substr($atom_data, 4);
-
-					$atom_structure['language']    = $this->QuicktimeLanguageLookup($atom_structure['language_id']);
-					if (empty($info['comments']['language']) || (!in_array($atom_structure['language'], $info['comments']['language']))) {
-						$info['comments']['language'][] = $atom_structure['language'];
-					}
-				} else {
-					// Apple item list box atom handler
-					$atomoffset = 0;
-					if (substr($atom_data, 2, 2) == "\x10\xB5") {
-						// not sure what it means, but observed on iPhone4 data.
-						// Each $atom_data has 2 bytes of datasize, plus 0x10B5, then data
-						while ($atomoffset < strlen($atom_data)) {
-							$boxsmallsize = getid3_lib::BigEndian2Int(substr($atom_data, $atomoffset,     2));
-							$boxsmalltype =                           substr($atom_data, $atomoffset + 2, 2);
-							$boxsmalldata =                           substr($atom_data, $atomoffset + 4, $boxsmallsize);
-							if ($boxsmallsize <= 1) {
-								$info['warning'][] = 'Invalid QuickTime atom smallbox size "'.$boxsmallsize.'" in atom "'.preg_replace('#[^a-zA-Z0-9 _\\-]#', '?', $atomname).'" at offset: '.($atom_structure['offset'] + $atomoffset);
-								$atom_structure['data'] = null;
-								$atomoffset = strlen($atom_data);
-								break;
-							}
-							switch ($boxsmalltype) {
-								case "\x10\xB5":
-									$atom_structure['data'] = $boxsmalldata;
-									break;
-								default:
-									$info['warning'][] = 'Unknown QuickTime smallbox type: "'.preg_replace('#[^a-zA-Z0-9 _\\-]#', '?', $boxsmalltype).'" ('.trim(getid3_lib::PrintHexBytes($boxsmalltype)).') at offset '.$baseoffset;
-									$atom_structure['data'] = $atom_data;
-									break;
-							}
-							$atomoffset += (4 + $boxsmallsize);
-						}
-					} else {
-						while ($atomoffset < strlen($atom_data)) {
-							$boxsize = getid3_lib::BigEndian2Int(substr($atom_data, $atomoffset, 4));
-							$boxtype =                           substr($atom_data, $atomoffset + 4, 4);
-							$boxdata =                           substr($atom_data, $atomoffset + 8, $boxsize - 8);
-							if ($boxsize <= 1) {
-								$info['warning'][] = 'Invalid QuickTime atom box size "'.$boxsize.'" in atom "'.preg_replace('#[^a-zA-Z0-9 _\\-]#', '?', $atomname).'" at offset: '.($atom_structure['offset'] + $atomoffset);
-								$atom_structure['data'] = null;
-								$atomoffset = strlen($atom_data);
-								break;
-							}
-							$atomoffset += $boxsize;
-
-							switch ($boxtype) {
-								case 'mean':
-								case 'name':
-									$atom_structure[$boxtype] = substr($boxdata, 4);
-									break;
-
-								case 'data':
-									$atom_structure['version']   = getid3_lib::BigEndian2Int(substr($boxdata,  0, 1));
-									$atom_structure['flags_raw'] = getid3_lib::BigEndian2Int(substr($boxdata,  1, 3));
-									switch ($atom_structure['flags_raw']) {
-										case  0: // data flag
-										case 21: // tmpo/cpil flag
-											switch ($atomname) {
-												case 'cpil':
-												case 'pcst':
-												case 'pgap':
-													$atom_structure['data'] = getid3_lib::BigEndian2Int(substr($boxdata, 8, 1));
-													break;
-
-												case 'tmpo':
-													$atom_structure['data'] = getid3_lib::BigEndian2Int(substr($boxdata, 8, 2));
-													break;
-
-												case 'disk':
-												case 'trkn':
-													$num       = getid3_lib::BigEndian2Int(substr($boxdata, 10, 2));
-													$num_total = getid3_lib::BigEndian2Int(substr($boxdata, 12, 2));
-													$atom_structure['data']  = empty($num) ? '' : $num;
-													$atom_structure['data'] .= empty($num_total) ? '' : '/'.$num_total;
-													break;
-
-												case 'gnre':
-													$GenreID = getid3_lib::BigEndian2Int(substr($boxdata, 8, 4));
-													$atom_structure['data']    = getid3_id3v1::LookupGenreName($GenreID - 1);
-													break;
-
-												case 'rtng':
-													$atom_structure[$atomname] = getid3_lib::BigEndian2Int(substr($boxdata, 8, 1));
-													$atom_structure['data']    = $this->QuicktimeContentRatingLookup($atom_structure[$atomname]);
-													break;
-
-												case 'stik':
-													$atom_structure[$atomname] = getid3_lib::BigEndian2Int(substr($boxdata, 8, 1));
-													$atom_structure['data']    = $this->QuicktimeSTIKLookup($atom_structure[$atomname]);
-													break;
-
-												case 'sfID':
-													$atom_structure[$atomname] = getid3_lib::BigEndian2Int(substr($boxdata, 8, 4));
-													$atom_structure['data']    = $this->QuicktimeStoreFrontCodeLookup($atom_structure[$atomname]);
-													break;
-
-												case 'egid':
-												case 'purl':
-													$atom_structure['data'] = substr($boxdata, 8);
-													break;
-
-												default:
-													$atom_structure['data'] = getid3_lib::BigEndian2Int(substr($boxdata, 8, 4));
-											}
-											break;
-
-										case  1: // text flag
-										case 13: // image flag
-										default:
-											$atom_structure['data'] = substr($boxdata, 8);
-											if ($atomname == 'covr') {
-												// not a foolproof check, but better than nothing
-												if (preg_match('#^\xFF\xD8\xFF#', $atom_structure['data'])) {
-													$atom_structure['image_mime'] = 'image/jpeg';
-												} elseif (preg_match('#^\x89\x50\x4E\x47\x0D\x0A\x1A\x0A#', $atom_structure['data'])) {
-													$atom_structure['image_mime'] = 'image/png';
-												} elseif (preg_match('#^GIF#', $atom_structure['data'])) {
-													$atom_structure['image_mime'] = 'image/gif';
-												}
-											}
-											break;
-
-									}
-									break;
-
-								default:
-									$info['warning'][] = 'Unknown QuickTime box type: "'.preg_replace('#[^a-zA-Z0-9 _\\-]#', '?', $boxtype).'" ('.trim(getid3_lib::PrintHexBytes($boxtype)).') at offset '.$baseoffset;
-									$atom_structure['data'] = $atom_data;
-
-							}
-						}
-					}
-				}
-				$this->CopyToAppropriateCommentsSection($atomname, $atom_structure['data'], $atom_structure['name']);
-				break;
-
-
-			case 'play': // auto-PLAY atom
-				$atom_structure['autoplay'] = (bool) getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-
-				$info['quicktime']['autoplay'] = $atom_structure['autoplay'];
-				break;
-
-
-			case 'WLOC': // Window LOCation atom
-				$atom_structure['location_x']  = getid3_lib::BigEndian2Int(substr($atom_data,  0, 2));
-				$atom_structure['location_y']  = getid3_lib::BigEndian2Int(substr($atom_data,  2, 2));
-				break;
-
-
-			case 'LOOP': // LOOPing atom
-			case 'SelO': // play SELection Only atom
-			case 'AllF': // play ALL Frames atom
-				$atom_structure['data'] = getid3_lib::BigEndian2Int($atom_data);
-				break;
-
-
-			case 'name': //
-			case 'MCPS': // Media Cleaner PRo
-			case '@PRM': // adobe PReMiere version
-			case '@PRQ': // adobe PRemiere Quicktime version
-				$atom_structure['data'] = $atom_data;
-				break;
-
-
-			case 'cmvd': // Compressed MooV Data atom
-				// Code by ubergeekØubergeek*tv based on information from
-				// http://developer.apple.com/quicktime/icefloe/dispatch012.html
-				$atom_structure['unCompressedSize'] = getid3_lib::BigEndian2Int(substr($atom_data, 0, 4));
-
-				$CompressedFileData = substr($atom_data, 4);
-				if ($UncompressedHeader = @gzuncompress($CompressedFileData)) {
-					$atom_structure['subatoms'] = $this->QuicktimeParseContainerAtom($UncompressedHeader, 0, $atomHierarchy, $ParseAllPossibleAtoms);
-				} else {
-					$info['warning'][] = 'Error decompressing compressed MOV atom at offset '.$atom_structure['offset'];
-				}
-				break;
-
-
-			case 'dcom': // Data COMpression atom
-				$atom_structure['compression_id']   = $atom_data;
-				$atom_structure['compression_text'] = $this->QuicktimeDCOMLookup($atom_data);
-				break;
-
-
-			case 'rdrf': // Reference movie Data ReFerence atom
-				$atom_structure['version']                = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-				$atom_structure['flags_raw']              = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3));
-				$atom_structure['flags']['internal_data'] = (bool) ($atom_structure['flags_raw'] & 0x000001);
-
-				$atom_structure['reference_type_name']    =                           substr($atom_data,  4, 4);
-				$atom_structure['reference_length']       = getid3_lib::BigEndian2Int(substr($atom_data,  8, 4));
-				switch ($atom_structure['reference_type_name']) {
-					case 'url ':
-						$atom_structure['url']            =       $this->NoNullString(substr($atom_data, 12));
-						break;
-
-					case 'alis':
-						$atom_structure['file_alias']     =                           substr($atom_data, 12);
-						break;
-
-					case 'rsrc':
-						$atom_structure['resource_alias'] =                           substr($atom_data, 12);
-						break;
-
-					default:
-						$atom_structure['data']           =                           substr($atom_data, 12);
-						break;
-				}
-				break;
-
-
-			case 'rmqu': // Reference Movie QUality atom
-				$atom_structure['movie_quality'] = getid3_lib::BigEndian2Int($atom_data);
-				break;
-
-
-			case 'rmcs': // Reference Movie Cpu Speed atom
-				$atom_structure['version']          = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-				$atom_structure['flags_raw']        = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
-				$atom_structure['cpu_speed_rating'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 2));
-				break;
-
-
-			case 'rmvc': // Reference Movie Version Check atom
-				$atom_structure['version']            = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-				$atom_structure['flags_raw']          = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
-				$atom_structure['gestalt_selector']   =                           substr($atom_data,  4, 4);
-				$atom_structure['gestalt_value_mask'] = getid3_lib::BigEndian2Int(substr($atom_data,  8, 4));
-				$atom_structure['gestalt_value']      = getid3_lib::BigEndian2Int(substr($atom_data, 12, 4));
-				$atom_structure['gestalt_check_type'] = getid3_lib::BigEndian2Int(substr($atom_data, 14, 2));
-				break;
-
-
-			case 'rmcd': // Reference Movie Component check atom
-				$atom_structure['version']                = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-				$atom_structure['flags_raw']              = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
-				$atom_structure['component_type']         =                           substr($atom_data,  4, 4);
-				$atom_structure['component_subtype']      =                           substr($atom_data,  8, 4);
-				$atom_structure['component_manufacturer'] =                           substr($atom_data, 12, 4);
-				$atom_structure['component_flags_raw']    = getid3_lib::BigEndian2Int(substr($atom_data, 16, 4));
-				$atom_structure['component_flags_mask']   = getid3_lib::BigEndian2Int(substr($atom_data, 20, 4));
-				$atom_structure['component_min_version']  = getid3_lib::BigEndian2Int(substr($atom_data, 24, 4));
-				break;
-
-
-			case 'rmdr': // Reference Movie Data Rate atom
-				$atom_structure['version']       = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-				$atom_structure['flags_raw']     = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
-				$atom_structure['data_rate']     = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
-
-				$atom_structure['data_rate_bps'] = $atom_structure['data_rate'] * 10;
-				break;
-
-
-			case 'rmla': // Reference Movie Language Atom
-				$atom_structure['version']     = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-				$atom_structure['flags_raw']   = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
-				$atom_structure['language_id'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 2));
-
-				$atom_structure['language']    = $this->QuicktimeLanguageLookup($atom_structure['language_id']);
-				if (empty($info['comments']['language']) || (!in_array($atom_structure['language'], $info['comments']['language']))) {
-					$info['comments']['language'][] = $atom_structure['language'];
-				}
-				break;
-
-
-			case 'rmla': // Reference Movie Language Atom
-				$atom_structure['version']   = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-				$atom_structure['flags_raw'] = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
-				$atom_structure['track_id']  = getid3_lib::BigEndian2Int(substr($atom_data,  4, 2));
-				break;
-
-
-			case 'ptv ': // Print To Video - defines a movie's full screen mode
-				// http://developer.apple.com/documentation/QuickTime/APIREF/SOURCESIV/at_ptv-_pg.htm
-				$atom_structure['display_size_raw']  = getid3_lib::BigEndian2Int(substr($atom_data, 0, 2));
-				$atom_structure['reserved_1']        = getid3_lib::BigEndian2Int(substr($atom_data, 2, 2)); // hardcoded: 0x0000
-				$atom_structure['reserved_2']        = getid3_lib::BigEndian2Int(substr($atom_data, 4, 2)); // hardcoded: 0x0000
-				$atom_structure['slide_show_flag']   = getid3_lib::BigEndian2Int(substr($atom_data, 6, 1));
-				$atom_structure['play_on_open_flag'] = getid3_lib::BigEndian2Int(substr($atom_data, 7, 1));
-
-				$atom_structure['flags']['play_on_open'] = (bool) $atom_structure['play_on_open_flag'];
-				$atom_structure['flags']['slide_show']   = (bool) $atom_structure['slide_show_flag'];
-
-				$ptv_lookup[0] = 'normal';
-				$ptv_lookup[1] = 'double';
-				$ptv_lookup[2] = 'half';
-				$ptv_lookup[3] = 'full';
-				$ptv_lookup[4] = 'current';
-				if (isset($ptv_lookup[$atom_structure['display_size_raw']])) {
-					$atom_structure['display_size'] = $ptv_lookup[$atom_structure['display_size_raw']];
-				} else {
-					$info['warning'][] = 'unknown "ptv " display constant ('.$atom_structure['display_size_raw'].')';
-				}
-				break;
-
-
-			case 'stsd': // Sample Table Sample Description atom
-				$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-				$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
-				$atom_structure['number_entries'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
-				$stsdEntriesDataOffset = 8;
-				for ($i = 0; $i < $atom_structure['number_entries']; $i++) {
-					$atom_structure['sample_description_table'][$i]['size']             = getid3_lib::BigEndian2Int(substr($atom_data, $stsdEntriesDataOffset, 4));
-					$stsdEntriesDataOffset += 4;
-					$atom_structure['sample_description_table'][$i]['data_format']      =                           substr($atom_data, $stsdEntriesDataOffset, 4);
-					$stsdEntriesDataOffset += 4;
-					$atom_structure['sample_description_table'][$i]['reserved']         = getid3_lib::BigEndian2Int(substr($atom_data, $stsdEntriesDataOffset, 6));
-					$stsdEntriesDataOffset += 6;
-					$atom_structure['sample_description_table'][$i]['reference_index']  = getid3_lib::BigEndian2Int(substr($atom_data, $stsdEntriesDataOffset, 2));
-					$stsdEntriesDataOffset += 2;
-					$atom_structure['sample_description_table'][$i]['data']             =                           substr($atom_data, $stsdEntriesDataOffset, ($atom_structure['sample_description_table'][$i]['size'] - 4 - 4 - 6 - 2));
-					$stsdEntriesDataOffset += ($atom_structure['sample_description_table'][$i]['size'] - 4 - 4 - 6 - 2);
-
-					$atom_structure['sample_description_table'][$i]['encoder_version']  = getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'],  0, 2));
-					$atom_structure['sample_description_table'][$i]['encoder_revision'] = getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'],  2, 2));
-					$atom_structure['sample_description_table'][$i]['encoder_vendor']   =                           substr($atom_structure['sample_description_table'][$i]['data'],  4, 4);
-
-					switch ($atom_structure['sample_description_table'][$i]['encoder_vendor']) {
-
-						case "\x00\x00\x00\x00":
-							// audio tracks
-							$atom_structure['sample_description_table'][$i]['audio_channels']       =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'],  8,  2));
-							$atom_structure['sample_description_table'][$i]['audio_bit_depth']      =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 10,  2));
-							$atom_structure['sample_description_table'][$i]['audio_compression_id'] =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 12,  2));
-							$atom_structure['sample_description_table'][$i]['audio_packet_size']    =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 14,  2));
-							$atom_structure['sample_description_table'][$i]['audio_sample_rate']    = getid3_lib::FixedPoint16_16(substr($atom_structure['sample_description_table'][$i]['data'], 16,  4));
-
-							// video tracks
-							// http://developer.apple.com/library/mac/#documentation/QuickTime/QTFF/QTFFChap3/qtff3.html
-							$atom_structure['sample_description_table'][$i]['temporal_quality'] =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'],  8,  4));
-							$atom_structure['sample_description_table'][$i]['spatial_quality']  =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 12,  4));
-							$atom_structure['sample_description_table'][$i]['width']            =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 16,  2));
-							$atom_structure['sample_description_table'][$i]['height']           =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 18,  2));
-							$atom_structure['sample_description_table'][$i]['resolution_x']     = getid3_lib::FixedPoint16_16(substr($atom_structure['sample_description_table'][$i]['data'], 24,  4));
-							$atom_structure['sample_description_table'][$i]['resolution_y']     = getid3_lib::FixedPoint16_16(substr($atom_structure['sample_description_table'][$i]['data'], 28,  4));
-							$atom_structure['sample_description_table'][$i]['data_size']        =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 32,  4));
-							$atom_structure['sample_description_table'][$i]['frame_count']      =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 36,  2));
-							$atom_structure['sample_description_table'][$i]['compressor_name']  =                             substr($atom_structure['sample_description_table'][$i]['data'], 38,  4);
-							$atom_structure['sample_description_table'][$i]['pixel_depth']      =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 42,  2));
-							$atom_structure['sample_description_table'][$i]['color_table_id']   =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 44,  2));
-
-							switch ($atom_structure['sample_description_table'][$i]['data_format']) {
-								case '2vuY':
-								case 'avc1':
-								case 'cvid':
-								case 'dvc ':
-								case 'dvcp':
-								case 'gif ':
-								case 'h263':
-								case 'jpeg':
-								case 'kpcd':
-								case 'mjpa':
-								case 'mjpb':
-								case 'mp4v':
-								case 'png ':
-								case 'raw ':
-								case 'rle ':
-								case 'rpza':
-								case 'smc ':
-								case 'SVQ1':
-								case 'SVQ3':
-								case 'tiff':
-								case 'v210':
-								case 'v216':
-								case 'v308':
-								case 'v408':
-								case 'v410':
-								case 'yuv2':
-									$info['fileformat'] = 'mp4';
-									$info['video']['fourcc'] = $atom_structure['sample_description_table'][$i]['data_format'];
-// http://www.getid3.org/phpBB3/viewtopic.php?t=1550
-//if ((!empty($atom_structure['sample_description_table'][$i]['width']) && !empty($atom_structure['sample_description_table'][$i]['width'])) && (empty($info['video']['resolution_x']) || empty($info['video']['resolution_y']) || (number_format($info['video']['resolution_x'], 6) != number_format(round($info['video']['resolution_x']), 6)) || (number_format($info['video']['resolution_y'], 6) != number_format(round($info['video']['resolution_y']), 6)))) { // ugly check for floating point numbers
-if (!empty($atom_structure['sample_description_table'][$i]['width']) && !empty($atom_structure['sample_description_table'][$i]['height'])) {
-	// assume that values stored here are more important than values stored in [tkhd] atom
-	$info['video']['resolution_x'] = $atom_structure['sample_description_table'][$i]['width'];
-	$info['video']['resolution_y'] = $atom_structure['sample_description_table'][$i]['height'];
-	$info['quicktime']['video']['resolution_x'] = $info['video']['resolution_x'];
-	$info['quicktime']['video']['resolution_y'] = $info['video']['resolution_y'];
-}
-									break;
-
-								case 'qtvr':
-									$info['video']['dataformat'] = 'quicktimevr';
-									break;
-
-								case 'mp4a':
-								default:
-									$info['quicktime']['audio']['codec']       = $this->QuicktimeAudioCodecLookup($atom_structure['sample_description_table'][$i]['data_format']);
-									$info['quicktime']['audio']['sample_rate'] = $atom_structure['sample_description_table'][$i]['audio_sample_rate'];
-									$info['quicktime']['audio']['channels']    = $atom_structure['sample_description_table'][$i]['audio_channels'];
-									$info['quicktime']['audio']['bit_depth']   = $atom_structure['sample_description_table'][$i]['audio_bit_depth'];
-									$info['audio']['codec']                    = $info['quicktime']['audio']['codec'];
-									$info['audio']['sample_rate']              = $info['quicktime']['audio']['sample_rate'];
-									$info['audio']['channels']                 = $info['quicktime']['audio']['channels'];
-									$info['audio']['bits_per_sample']          = $info['quicktime']['audio']['bit_depth'];
-									switch ($atom_structure['sample_description_table'][$i]['data_format']) {
-										case 'raw ': // PCM
-										case 'alac': // Apple Lossless Audio Codec
-											$info['audio']['lossless'] = true;
-											break;
-										default:
-											$info['audio']['lossless'] = false;
-											break;
-									}
-									break;
-							}
-							break;
-
-						default:
-							switch ($atom_structure['sample_description_table'][$i]['data_format']) {
-								case 'mp4s':
-									$info['fileformat'] = 'mp4';
-									break;
-
-								default:
-									// video atom
-									$atom_structure['sample_description_table'][$i]['video_temporal_quality']  =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'],  8,  4));
-									$atom_structure['sample_description_table'][$i]['video_spatial_quality']   =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 12,  4));
-									$atom_structure['sample_description_table'][$i]['video_frame_width']       =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 16,  2));
-									$atom_structure['sample_description_table'][$i]['video_frame_height']      =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 18,  2));
-									$atom_structure['sample_description_table'][$i]['video_resolution_x']      = getid3_lib::FixedPoint16_16(substr($atom_structure['sample_description_table'][$i]['data'], 20,  4));
-									$atom_structure['sample_description_table'][$i]['video_resolution_y']      = getid3_lib::FixedPoint16_16(substr($atom_structure['sample_description_table'][$i]['data'], 24,  4));
-									$atom_structure['sample_description_table'][$i]['video_data_size']         =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 28,  4));
-									$atom_structure['sample_description_table'][$i]['video_frame_count']       =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 32,  2));
-									$atom_structure['sample_description_table'][$i]['video_encoder_name_len']  =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 34,  1));
-									$atom_structure['sample_description_table'][$i]['video_encoder_name']      =                             substr($atom_structure['sample_description_table'][$i]['data'], 35, $atom_structure['sample_description_table'][$i]['video_encoder_name_len']);
-									$atom_structure['sample_description_table'][$i]['video_pixel_color_depth'] =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 66,  2));
-									$atom_structure['sample_description_table'][$i]['video_color_table_id']    =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 68,  2));
-
-									$atom_structure['sample_description_table'][$i]['video_pixel_color_type']  = (($atom_structure['sample_description_table'][$i]['video_pixel_color_depth'] > 32) ? 'grayscale' : 'color');
-									$atom_structure['sample_description_table'][$i]['video_pixel_color_name']  = $this->QuicktimeColorNameLookup($atom_structure['sample_description_table'][$i]['video_pixel_color_depth']);
-
-									if ($atom_structure['sample_description_table'][$i]['video_pixel_color_name'] != 'invalid') {
-										$info['quicktime']['video']['codec_fourcc']        = $atom_structure['sample_description_table'][$i]['data_format'];
-										$info['quicktime']['video']['codec_fourcc_lookup'] = $this->QuicktimeVideoCodecLookup($atom_structure['sample_description_table'][$i]['data_format']);
-										$info['quicktime']['video']['codec']               = (($atom_structure['sample_description_table'][$i]['video_encoder_name_len'] > 0) ? $atom_structure['sample_description_table'][$i]['video_encoder_name'] : $atom_structure['sample_description_table'][$i]['data_format']);
-										$info['quicktime']['video']['color_depth']         = $atom_structure['sample_description_table'][$i]['video_pixel_color_depth'];
-										$info['quicktime']['video']['color_depth_name']    = $atom_structure['sample_description_table'][$i]['video_pixel_color_name'];
-
-										$info['video']['codec']           = $info['quicktime']['video']['codec'];
-										$info['video']['bits_per_sample'] = $info['quicktime']['video']['color_depth'];
-									}
-									$info['video']['lossless']           = false;
-									$info['video']['pixel_aspect_ratio'] = (float) 1;
-									break;
-							}
-							break;
-					}
-					switch (strtolower($atom_structure['sample_description_table'][$i]['data_format'])) {
-						case 'mp4a':
-							$info['audio']['dataformat']         = 'mp4';
-							$info['quicktime']['audio']['codec'] = 'mp4';
-							break;
-
-						case '3ivx':
-						case '3iv1':
-						case '3iv2':
-							$info['video']['dataformat'] = '3ivx';
-							break;
-
-						case 'xvid':
-							$info['video']['dataformat'] = 'xvid';
-							break;
-
-						case 'mp4v':
-							$info['video']['dataformat'] = 'mpeg4';
-							break;
-
-						case 'divx':
-						case 'div1':
-						case 'div2':
-						case 'div3':
-						case 'div4':
-						case 'div5':
-						case 'div6':
-							$info['video']['dataformat'] = 'divx';
-							break;
-
-						default:
-							// do nothing
-							break;
-					}
-					unset($atom_structure['sample_description_table'][$i]['data']);
-				}
-				break;
-
-
-			case 'stts': // Sample Table Time-to-Sample atom
-				$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-				$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
-				$atom_structure['number_entries'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
-				$sttsEntriesDataOffset = 8;
-				//$FrameRateCalculatorArray = array();
-				$frames_count = 0;
-
-				$max_stts_entries_to_scan = ($info['php_memory_limit'] ? min(floor($this->getid3->memory_limit / 10000), $atom_structure['number_entries']) : $atom_structure['number_entries']);
-				if ($max_stts_entries_to_scan < $atom_structure['number_entries']) {
-					$info['warning'][] = 'QuickTime atom "stts" has '.$atom_structure['number_entries'].' but only scanning the first '.$max_stts_entries_to_scan.' entries due to limited PHP memory available ('.floor($atom_structure['number_entries'] / 1048576).'MB).';
-				}
-				for ($i = 0; $i < $max_stts_entries_to_scan; $i++) {
-					$atom_structure['time_to_sample_table'][$i]['sample_count']    = getid3_lib::BigEndian2Int(substr($atom_data, $sttsEntriesDataOffset, 4));
-					$sttsEntriesDataOffset += 4;
-					$atom_structure['time_to_sample_table'][$i]['sample_duration'] = getid3_lib::BigEndian2Int(substr($atom_data, $sttsEntriesDataOffset, 4));
-					$sttsEntriesDataOffset += 4;
-
-					$frames_count += $atom_structure['time_to_sample_table'][$i]['sample_count'];
-
-					// THIS SECTION REPLACED WITH CODE IN "stbl" ATOM
-					//if (!empty($info['quicktime']['time_scale']) && ($atom_structure['time_to_sample_table'][$i]['sample_duration'] > 0)) {
-					//	$stts_new_framerate = $info['quicktime']['time_scale'] / $atom_structure['time_to_sample_table'][$i]['sample_duration'];
-					//	if ($stts_new_framerate <= 60) {
-					//		// some atoms have durations of "1" giving a very large framerate, which probably is not right
-					//		$info['video']['frame_rate'] = max($info['video']['frame_rate'], $stts_new_framerate);
-					//	}
-					//}
-					//
-					//$FrameRateCalculatorArray[($info['quicktime']['time_scale'] / $atom_structure['time_to_sample_table'][$i]['sample_duration'])] += $atom_structure['time_to_sample_table'][$i]['sample_count'];
-				}
-				$info['quicktime']['stts_framecount'][] = $frames_count;
-				//$sttsFramesTotal  = 0;
-				//$sttsSecondsTotal = 0;
-				//foreach ($FrameRateCalculatorArray as $frames_per_second => $frame_count) {
-				//	if (($frames_per_second > 60) || ($frames_per_second < 1)) {
-				//		// not video FPS information, probably audio information
-				//		$sttsFramesTotal  = 0;
-				//		$sttsSecondsTotal = 0;
-				//		break;
-				//	}
-				//	$sttsFramesTotal  += $frame_count;
-				//	$sttsSecondsTotal += $frame_count / $frames_per_second;
-				//}
-				//if (($sttsFramesTotal > 0) && ($sttsSecondsTotal > 0)) {
-				//	if (($sttsFramesTotal / $sttsSecondsTotal) > $info['video']['frame_rate']) {
-				//		$info['video']['frame_rate'] = $sttsFramesTotal / $sttsSecondsTotal;
-				//	}
-				//}
-				break;
-
-
-			case 'stss': // Sample Table Sync Sample (key frames) atom
-				if ($ParseAllPossibleAtoms) {
-					$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-					$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
-					$atom_structure['number_entries'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
-					$stssEntriesDataOffset = 8;
-					for ($i = 0; $i < $atom_structure['number_entries']; $i++) {
-						$atom_structure['time_to_sample_table'][$i] = getid3_lib::BigEndian2Int(substr($atom_data, $stssEntriesDataOffset, 4));
-						$stssEntriesDataOffset += 4;
-					}
-				}
-				break;
-
-
-			case 'stsc': // Sample Table Sample-to-Chunk atom
-				if ($ParseAllPossibleAtoms) {
-					$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-					$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
-					$atom_structure['number_entries'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
-					$stscEntriesDataOffset = 8;
-					for ($i = 0; $i < $atom_structure['number_entries']; $i++) {
-						$atom_structure['sample_to_chunk_table'][$i]['first_chunk']        = getid3_lib::BigEndian2Int(substr($atom_data, $stscEntriesDataOffset, 4));
-						$stscEntriesDataOffset += 4;
-						$atom_structure['sample_to_chunk_table'][$i]['samples_per_chunk']  = getid3_lib::BigEndian2Int(substr($atom_data, $stscEntriesDataOffset, 4));
-						$stscEntriesDataOffset += 4;
-						$atom_structure['sample_to_chunk_table'][$i]['sample_description'] = getid3_lib::BigEndian2Int(substr($atom_data, $stscEntriesDataOffset, 4));
-						$stscEntriesDataOffset += 4;
-					}
-				}
-				break;
-
-
-			case 'stsz': // Sample Table SiZe atom
-				if ($ParseAllPossibleAtoms) {
-					$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-					$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
-					$atom_structure['sample_size']    = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
-					$atom_structure['number_entries'] = getid3_lib::BigEndian2Int(substr($atom_data,  8, 4));
-					$stszEntriesDataOffset = 12;
-					if ($atom_structure['sample_size'] == 0) {
-						for ($i = 0; $i < $atom_structure['number_entries']; $i++) {
-							$atom_structure['sample_size_table'][$i] = getid3_lib::BigEndian2Int(substr($atom_data, $stszEntriesDataOffset, 4));
-							$stszEntriesDataOffset += 4;
-						}
-					}
-				}
-				break;
-
-
-			case 'stco': // Sample Table Chunk Offset atom
-				if ($ParseAllPossibleAtoms) {
-					$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-					$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
-					$atom_structure['number_entries'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
-					$stcoEntriesDataOffset = 8;
-					for ($i = 0; $i < $atom_structure['number_entries']; $i++) {
-						$atom_structure['chunk_offset_table'][$i] = getid3_lib::BigEndian2Int(substr($atom_data, $stcoEntriesDataOffset, 4));
-						$stcoEntriesDataOffset += 4;
-					}
-				}
-				break;
-
-
-			case 'co64': // Chunk Offset 64-bit (version of "stco" that supports > 2GB files)
-				if ($ParseAllPossibleAtoms) {
-					$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-					$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
-					$atom_structure['number_entries'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
-					$stcoEntriesDataOffset = 8;
-					for ($i = 0; $i < $atom_structure['number_entries']; $i++) {
-						$atom_structure['chunk_offset_table'][$i] = getid3_lib::BigEndian2Int(substr($atom_data, $stcoEntriesDataOffset, 8));
-						$stcoEntriesDataOffset += 8;
-					}
-				}
-				break;
-
-
-			case 'dref': // Data REFerence atom
-				$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-				$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
-				$atom_structure['number_entries'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
-				$drefDataOffset = 8;
-				for ($i = 0; $i < $atom_structure['number_entries']; $i++) {
-					$atom_structure['data_references'][$i]['size']                    = getid3_lib::BigEndian2Int(substr($atom_data, $drefDataOffset, 4));
-					$drefDataOffset += 4;
-					$atom_structure['data_references'][$i]['type']                    =               substr($atom_data, $drefDataOffset, 4);
-					$drefDataOffset += 4;
-					$atom_structure['data_references'][$i]['version']                 = getid3_lib::BigEndian2Int(substr($atom_data,  $drefDataOffset, 1));
-					$drefDataOffset += 1;
-					$atom_structure['data_references'][$i]['flags_raw']               = getid3_lib::BigEndian2Int(substr($atom_data,  $drefDataOffset, 3)); // hardcoded: 0x0000
-					$drefDataOffset += 3;
-					$atom_structure['data_references'][$i]['data']                    =               substr($atom_data, $drefDataOffset, ($atom_structure['data_references'][$i]['size'] - 4 - 4 - 1 - 3));
-					$drefDataOffset += ($atom_structure['data_references'][$i]['size'] - 4 - 4 - 1 - 3);
-
-					$atom_structure['data_references'][$i]['flags']['self_reference'] = (bool) ($atom_structure['data_references'][$i]['flags_raw'] & 0x001);
-				}
-				break;
-
-
-			case 'gmin': // base Media INformation atom
-				$atom_structure['version']                = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-				$atom_structure['flags_raw']              = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
-				$atom_structure['graphics_mode']          = getid3_lib::BigEndian2Int(substr($atom_data,  4, 2));
-				$atom_structure['opcolor_red']            = getid3_lib::BigEndian2Int(substr($atom_data,  6, 2));
-				$atom_structure['opcolor_green']          = getid3_lib::BigEndian2Int(substr($atom_data,  8, 2));
-				$atom_structure['opcolor_blue']           = getid3_lib::BigEndian2Int(substr($atom_data, 10, 2));
-				$atom_structure['balance']                = getid3_lib::BigEndian2Int(substr($atom_data, 12, 2));
-				$atom_structure['reserved']               = getid3_lib::BigEndian2Int(substr($atom_data, 14, 2));
-				break;
-
-
-			case 'smhd': // Sound Media information HeaDer atom
-				$atom_structure['version']                = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-				$atom_structure['flags_raw']              = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
-				$atom_structure['balance']                = getid3_lib::BigEndian2Int(substr($atom_data,  4, 2));
-				$atom_structure['reserved']               = getid3_lib::BigEndian2Int(substr($atom_data,  6, 2));
-				break;
-
-
-			case 'vmhd': // Video Media information HeaDer atom
-				$atom_structure['version']                = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-				$atom_structure['flags_raw']              = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3));
-				$atom_structure['graphics_mode']          = getid3_lib::BigEndian2Int(substr($atom_data,  4, 2));
-				$atom_structure['opcolor_red']            = getid3_lib::BigEndian2Int(substr($atom_data,  6, 2));
-				$atom_structure['opcolor_green']          = getid3_lib::BigEndian2Int(substr($atom_data,  8, 2));
-				$atom_structure['opcolor_blue']           = getid3_lib::BigEndian2Int(substr($atom_data, 10, 2));
-
-				$atom_structure['flags']['no_lean_ahead'] = (bool) ($atom_structure['flags_raw'] & 0x001);
-				break;
-
-
-			case 'hdlr': // HanDLeR reference atom
-				$atom_structure['version']                = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-				$atom_structure['flags_raw']              = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
-				$atom_structure['component_type']         =                           substr($atom_data,  4, 4);
-				$atom_structure['component_subtype']      =                           substr($atom_data,  8, 4);
-				$atom_structure['component_manufacturer'] =                           substr($atom_data, 12, 4);
-				$atom_structure['component_flags_raw']    = getid3_lib::BigEndian2Int(substr($atom_data, 16, 4));
-				$atom_structure['component_flags_mask']   = getid3_lib::BigEndian2Int(substr($atom_data, 20, 4));
-				$atom_structure['component_name']         =      $this->Pascal2String(substr($atom_data, 24));
-
-				if (($atom_structure['component_subtype'] == 'STpn') && ($atom_structure['component_manufacturer'] == 'zzzz')) {
-					$info['video']['dataformat'] = 'quicktimevr';
-				}
-				break;
-
-
-			case 'mdhd': // MeDia HeaDer atom
-				$atom_structure['version']               = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-				$atom_structure['flags_raw']             = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
-				$atom_structure['creation_time']         = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
-				$atom_structure['modify_time']           = getid3_lib::BigEndian2Int(substr($atom_data,  8, 4));
-				$atom_structure['time_scale']            = getid3_lib::BigEndian2Int(substr($atom_data, 12, 4));
-				$atom_structure['duration']              = getid3_lib::BigEndian2Int(substr($atom_data, 16, 4));
-				$atom_structure['language_id']           = getid3_lib::BigEndian2Int(substr($atom_data, 20, 2));
-				$atom_structure['quality']               = getid3_lib::BigEndian2Int(substr($atom_data, 22, 2));
-
-				if ($atom_structure['time_scale'] == 0) {
-					$info['error'][] = 'Corrupt Quicktime file: mdhd.time_scale == zero';
-					return false;
-				}
-				$info['quicktime']['time_scale'] = (isset($info['quicktime']['time_scale']) ? max($info['quicktime']['time_scale'], $atom_structure['time_scale']) : $atom_structure['time_scale']);
-
-				$atom_structure['creation_time_unix']    = getid3_lib::DateMac2Unix($atom_structure['creation_time']);
-				$atom_structure['modify_time_unix']      = getid3_lib::DateMac2Unix($atom_structure['modify_time']);
-				$atom_structure['playtime_seconds']      = $atom_structure['duration'] / $atom_structure['time_scale'];
-				$atom_structure['language']              = $this->QuicktimeLanguageLookup($atom_structure['language_id']);
-				if (empty($info['comments']['language']) || (!in_array($atom_structure['language'], $info['comments']['language']))) {
-					$info['comments']['language'][] = $atom_structure['language'];
-				}
-				break;
-
-
-			case 'pnot': // Preview atom
-				$atom_structure['modification_date']      = getid3_lib::BigEndian2Int(substr($atom_data,  0, 4)); // "standard Macintosh format"
-				$atom_structure['version_number']         = getid3_lib::BigEndian2Int(substr($atom_data,  4, 2)); // hardcoded: 0x00
-				$atom_structure['atom_type']              =               substr($atom_data,  6, 4);        // usually: 'PICT'
-				$atom_structure['atom_index']             = getid3_lib::BigEndian2Int(substr($atom_data, 10, 2)); // usually: 0x01
-
-				$atom_structure['modification_date_unix'] = getid3_lib::DateMac2Unix($atom_structure['modification_date']);
-				break;
-
-
-			case 'crgn': // Clipping ReGioN atom
-				$atom_structure['region_size']   = getid3_lib::BigEndian2Int(substr($atom_data,  0, 2)); // The Region size, Region boundary box,
-				$atom_structure['boundary_box']  = getid3_lib::BigEndian2Int(substr($atom_data,  2, 8)); // and Clipping region data fields
-				$atom_structure['clipping_data'] =               substr($atom_data, 10);           // constitute a QuickDraw region.
-				break;
-
-
-			case 'load': // track LOAD settings atom
-				$atom_structure['preload_start_time'] = getid3_lib::BigEndian2Int(substr($atom_data,  0, 4));
-				$atom_structure['preload_duration']   = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
-				$atom_structure['preload_flags_raw']  = getid3_lib::BigEndian2Int(substr($atom_data,  8, 4));
-				$atom_structure['default_hints_raw']  = getid3_lib::BigEndian2Int(substr($atom_data, 12, 4));
-
-				$atom_structure['default_hints']['double_buffer'] = (bool) ($atom_structure['default_hints_raw'] & 0x0020);
-				$atom_structure['default_hints']['high_quality']  = (bool) ($atom_structure['default_hints_raw'] & 0x0100);
-				break;
-
-
-			case 'tmcd': // TiMe CoDe atom
-			case 'chap': // CHAPter list atom
-			case 'sync': // SYNChronization atom
-			case 'scpt': // tranSCriPT atom
-			case 'ssrc': // non-primary SouRCe atom
-				for ($i = 0; $i < strlen($atom_data); $i += 4) {
-					@$atom_structure['track_id'][] = getid3_lib::BigEndian2Int(substr($atom_data, $i, 4));
-				}
-				break;
-
-
-			case 'elst': // Edit LiST atom
-				$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-				$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
-				$atom_structure['number_entries'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
-				for ($i = 0; $i < $atom_structure['number_entries']; $i++ ) {
-					$atom_structure['edit_list'][$i]['track_duration'] =   getid3_lib::BigEndian2Int(substr($atom_data, 8 + ($i * 12) + 0, 4));
-					$atom_structure['edit_list'][$i]['media_time']     =   getid3_lib::BigEndian2Int(substr($atom_data, 8 + ($i * 12) + 4, 4));
-					$atom_structure['edit_list'][$i]['media_rate']     = getid3_lib::FixedPoint16_16(substr($atom_data, 8 + ($i * 12) + 8, 4));
-				}
-				break;
-
-
-			case 'kmat': // compressed MATte atom
-				$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-				$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
-				$atom_structure['matte_data_raw'] =               substr($atom_data,  4);
-				break;
-
-
-			case 'ctab': // Color TABle atom
-				$atom_structure['color_table_seed']   = getid3_lib::BigEndian2Int(substr($atom_data,  0, 4)); // hardcoded: 0x00000000
-				$atom_structure['color_table_flags']  = getid3_lib::BigEndian2Int(substr($atom_data,  4, 2)); // hardcoded: 0x8000
-				$atom_structure['color_table_size']   = getid3_lib::BigEndian2Int(substr($atom_data,  6, 2)) + 1;
-				for ($colortableentry = 0; $colortableentry < $atom_structure['color_table_size']; $colortableentry++) {
-					$atom_structure['color_table'][$colortableentry]['alpha'] = getid3_lib::BigEndian2Int(substr($atom_data, 8 + ($colortableentry * 8) + 0, 2));
-					$atom_structure['color_table'][$colortableentry]['red']   = getid3_lib::BigEndian2Int(substr($atom_data, 8 + ($colortableentry * 8) + 2, 2));
-					$atom_structure['color_table'][$colortableentry]['green'] = getid3_lib::BigEndian2Int(substr($atom_data, 8 + ($colortableentry * 8) + 4, 2));
-					$atom_structure['color_table'][$colortableentry]['blue']  = getid3_lib::BigEndian2Int(substr($atom_data, 8 + ($colortableentry * 8) + 6, 2));
-				}
-				break;
-
-
-			case 'mvhd': // MoVie HeaDer atom
-				$atom_structure['version']            =   getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-				$atom_structure['flags_raw']          =   getid3_lib::BigEndian2Int(substr($atom_data,  1, 3));
-				$atom_structure['creation_time']      =   getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
-				$atom_structure['modify_time']        =   getid3_lib::BigEndian2Int(substr($atom_data,  8, 4));
-				$atom_structure['time_scale']         =   getid3_lib::BigEndian2Int(substr($atom_data, 12, 4));
-				$atom_structure['duration']           =   getid3_lib::BigEndian2Int(substr($atom_data, 16, 4));
-				$atom_structure['preferred_rate']     = getid3_lib::FixedPoint16_16(substr($atom_data, 20, 4));
-				$atom_structure['preferred_volume']   =   getid3_lib::FixedPoint8_8(substr($atom_data, 24, 2));
-				$atom_structure['reserved']           =                             substr($atom_data, 26, 10);
-				$atom_structure['matrix_a']           = getid3_lib::FixedPoint16_16(substr($atom_data, 36, 4));
-				$atom_structure['matrix_b']           = getid3_lib::FixedPoint16_16(substr($atom_data, 40, 4));
-				$atom_structure['matrix_u']           =  getid3_lib::FixedPoint2_30(substr($atom_data, 44, 4));
-				$atom_structure['matrix_c']           = getid3_lib::FixedPoint16_16(substr($atom_data, 48, 4));
-				$atom_structure['matrix_d']           = getid3_lib::FixedPoint16_16(substr($atom_data, 52, 4));
-				$atom_structure['matrix_v']           =  getid3_lib::FixedPoint2_30(substr($atom_data, 56, 4));
-				$atom_structure['matrix_x']           = getid3_lib::FixedPoint16_16(substr($atom_data, 60, 4));
-				$atom_structure['matrix_y']           = getid3_lib::FixedPoint16_16(substr($atom_data, 64, 4));
-				$atom_structure['matrix_w']           =  getid3_lib::FixedPoint2_30(substr($atom_data, 68, 4));
-				$atom_structure['preview_time']       =   getid3_lib::BigEndian2Int(substr($atom_data, 72, 4));
-				$atom_structure['preview_duration']   =   getid3_lib::BigEndian2Int(substr($atom_data, 76, 4));
-				$atom_structure['poster_time']        =   getid3_lib::BigEndian2Int(substr($atom_data, 80, 4));
-				$atom_structure['selection_time']     =   getid3_lib::BigEndian2Int(substr($atom_data, 84, 4));
-				$atom_structure['selection_duration'] =   getid3_lib::BigEndian2Int(substr($atom_data, 88, 4));
-				$atom_structure['current_time']       =   getid3_lib::BigEndian2Int(substr($atom_data, 92, 4));
-				$atom_structure['next_track_id']      =   getid3_lib::BigEndian2Int(substr($atom_data, 96, 4));
-
-				if ($atom_structure['time_scale'] == 0) {
-					$info['error'][] = 'Corrupt Quicktime file: mvhd.time_scale == zero';
-					return false;
-				}
-				$atom_structure['creation_time_unix']        = getid3_lib::DateMac2Unix($atom_structure['creation_time']);
-				$atom_structure['modify_time_unix']          = getid3_lib::DateMac2Unix($atom_structure['modify_time']);
-				$info['quicktime']['time_scale']    = (isset($info['quicktime']['time_scale']) ? max($info['quicktime']['time_scale'], $atom_structure['time_scale']) : $atom_structure['time_scale']);
-				$info['quicktime']['display_scale'] = $atom_structure['matrix_a'];
-				$info['playtime_seconds']           = $atom_structure['duration'] / $atom_structure['time_scale'];
-				break;
-
-
-			case 'tkhd': // TracK HeaDer atom
-				$atom_structure['version']             =   getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
-				$atom_structure['flags_raw']           =   getid3_lib::BigEndian2Int(substr($atom_data,  1, 3));
-				$atom_structure['creation_time']       =   getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
-				$atom_structure['modify_time']         =   getid3_lib::BigEndian2Int(substr($atom_data,  8, 4));
-				$atom_structure['trackid']             =   getid3_lib::BigEndian2Int(substr($atom_data, 12, 4));
-				$atom_structure['reserved1']           =   getid3_lib::BigEndian2Int(substr($atom_data, 16, 4));
-				$atom_structure['duration']            =   getid3_lib::BigEndian2Int(substr($atom_data, 20, 4));
-				$atom_structure['reserved2']           =   getid3_lib::BigEndian2Int(substr($atom_data, 24, 8));
-				$atom_structure['layer']               =   getid3_lib::BigEndian2Int(substr($atom_data, 32, 2));
-				$atom_structure['alternate_group']     =   getid3_lib::BigEndian2Int(substr($atom_data, 34, 2));
-				$atom_structure['volume']              =   getid3_lib::FixedPoint8_8(substr($atom_data, 36, 2));
-				$atom_structure['reserved3']           =   getid3_lib::BigEndian2Int(substr($atom_data, 38, 2));
-// http://developer.apple.com/library/mac/#documentation/QuickTime/RM/MovieBasics/MTEditing/K-Chapter/11MatrixFunctions.html
-// http://developer.apple.com/library/mac/#documentation/QuickTime/qtff/QTFFChap4/qtff4.html#//apple_ref/doc/uid/TP40000939-CH206-18737
-				$atom_structure['matrix_a']            = getid3_lib::FixedPoint16_16(substr($atom_data, 40, 4));
-				$atom_structure['matrix_b']            = getid3_lib::FixedPoint16_16(substr($atom_data, 44, 4));
-				$atom_structure['matrix_u']            =  getid3_lib::FixedPoint2_30(substr($atom_data, 48, 4));
-				$atom_structure['matrix_c']            = getid3_lib::FixedPoint16_16(substr($atom_data, 52, 4));
-				$atom_structure['matrix_d']            = getid3_lib::FixedPoint16_16(substr($atom_data, 56, 4));
-				$atom_structure['matrix_v']            =  getid3_lib::FixedPoint2_30(substr($atom_data, 60, 4));
-				$atom_structure['matrix_x']            = getid3_lib::FixedPoint16_16(substr($atom_data, 64, 4));
-				$atom_structure['matrix_y']            = getid3_lib::FixedPoint16_16(substr($atom_data, 68, 4));
-				$atom_structure['matrix_w']            =  getid3_lib::FixedPoint2_30(substr($atom_data, 72, 4));
-				$atom_structure['width']               = getid3_lib::FixedPoint16_16(substr($atom_data, 76, 4));
-				$atom_structure['height']              = getid3_lib::FixedPoint16_16(substr($atom_data, 80, 4));
-				$atom_structure['flags']['enabled']    = (bool) ($atom_structure['flags_raw'] & 0x0001);
-				$atom_structure['flags']['in_movie']   = (bool) ($atom_structure['flags_raw'] & 0x0002);
-				$atom_structure['flags']['in_preview'] = (bool) ($atom_structure['flags_raw'] & 0x0004);
-				$atom_structure['flags']['in_poster']  = (bool) ($atom_structure['flags_raw'] & 0x0008);
-				$atom_structure['creation_time_unix']  = getid3_lib::DateMac2Unix($atom_structure['creation_time']);
-				$atom_structure['modify_time_unix']    = getid3_lib::DateMac2Unix($atom_structure['modify_time']);
-
-				if ($atom_structure['flags']['enabled'] == 1) {
-					if (!isset($info['video']['resolution_x']) || !isset($info['video']['resolution_y'])) {
-						$info['video']['resolution_x'] = $atom_structure['width'];
-						$info['video']['resolution_y'] = $atom_structure['height'];
-					}
-					$info['video']['resolution_x'] = max($info['video']['resolution_x'], $atom_structure['width']);
-					$info['video']['resolution_y'] = max($info['video']['resolution_y'], $atom_structure['height']);
-					$info['quicktime']['video']['resolution_x'] = $info['video']['resolution_x'];
-					$info['quicktime']['video']['resolution_y'] = $info['video']['resolution_y'];
-				} else {
-					// see: http://www.getid3.org/phpBB3/viewtopic.php?t=1295
-					//if (isset($info['video']['resolution_x'])) { unset($info['video']['resolution_x']); }
-					//if (isset($info['video']['resolution_y'])) { unset($info['video']['resolution_y']); }
-					//if (isset($info['quicktime']['video']))    { unset($info['quicktime']['video']);    }
-				}
-				break;
-
-
-			case 'iods': // Initial Object DeScriptor atom
-				// http://www.koders.com/c/fid1FAB3E762903DC482D8A246D4A4BF9F28E049594.aspx?s=windows.h
-				// http://libquicktime.sourcearchive.com/documentation/1.0.2plus-pdebian/iods_8c-source.html
-				$offset = 0;
-				$atom_structure['version']                =       getid3_lib::BigEndian2Int(substr($atom_data, $offset, 1));
-				$offset += 1;
-				$atom_structure['flags_raw']              =       getid3_lib::BigEndian2Int(substr($atom_data, $offset, 3));
-				$offset += 3;
-				$atom_structure['mp4_iod_tag']            =       getid3_lib::BigEndian2Int(substr($atom_data, $offset, 1));
-				$offset += 1;
-				$atom_structure['length']                 = $this->quicktime_read_mp4_descr_length($atom_data, $offset);
-				//$offset already adjusted by quicktime_read_mp4_descr_length()
-				$atom_structure['object_descriptor_id']   =       getid3_lib::BigEndian2Int(substr($atom_data, $offset, 2));
-				$offset += 2;
-				$atom_structure['od_profile_level']       =       getid3_lib::BigEndian2Int(substr($atom_data, $offset, 1));
-				$offset += 1;
-				$atom_structure['scene_profile_level']    =       getid3_lib::BigEndian2Int(substr($atom_data, $offset, 1));
-				$offset += 1;
-				$atom_structure['audio_profile_id']       =       getid3_lib::BigEndian2Int(substr($atom_data, $offset, 1));
-				$offset += 1;
-				$atom_structure['video_profile_id']       =       getid3_lib::BigEndian2Int(substr($atom_data, $offset, 1));
-				$offset += 1;
-				$atom_structure['graphics_profile_level'] =       getid3_lib::BigEndian2Int(substr($atom_data, $offset, 1));
-				$offset += 1;
-
-				$atom_structure['num_iods_tracks'] = ($atom_structure['length'] - 7) / 6; // 6 bytes would only be right if all tracks use 1-byte length fields
-				for ($i = 0; $i < $atom_structure['num_iods_tracks']; $i++) {
-					$atom_structure['track'][$i]['ES_ID_IncTag'] =       getid3_lib::BigEndian2Int(substr($atom_data, $offset, 1));
-					$offset += 1;
-					$atom_structure['track'][$i]['length']       = $this->quicktime_read_mp4_descr_length($atom_data, $offset);
-					//$offset already adjusted by quicktime_read_mp4_descr_length()
-					$atom_structure['track'][$i]['track_id']     =       getid3_lib::BigEndian2Int(substr($atom_data, $offset, 4));
-					$offset += 4;
-				}
-
-				$atom_structure['audio_profile_name'] = $this->QuicktimeIODSaudioProfileName($atom_structure['audio_profile_id']);
-				$atom_structure['video_profile_name'] = $this->QuicktimeIODSvideoProfileName($atom_structure['video_profile_id']);
-				break;
-
-			case 'ftyp': // FileTYPe (?) atom (for MP4 it seems)
-				$atom_structure['signature'] =                           substr($atom_data,  0, 4);
-				$atom_structure['unknown_1'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
-				$atom_structure['fourcc']    =                           substr($atom_data,  8, 4);
-				break;
-
-			case 'mdat': // Media DATa atom
-				// 'mdat' contains the actual data for the audio/video, possibly also subtitles
-
-/* due to lack of known documentation, this is a kludge implementation. If you know of documentation on how mdat is properly structed, please send it to info@getid3.org */
-
-				// first, skip any 'wide' padding, and second 'mdat' header (with specified size of zero?)
-				$mdat_offset = 0;
-				while (true) {
-					if (substr($atom_data, $mdat_offset, 8) == "\x00\x00\x00\x08".'wide') {
-						$mdat_offset += 8;
-					} elseif (substr($atom_data, $mdat_offset, 8) == "\x00\x00\x00\x00".'mdat') {
-						$mdat_offset += 8;
-					} else {
-						break;
-					}
-				}
-
-				// check to see if it looks like chapter titles, in the form of unterminated strings with a leading 16-bit size field
-				while  (($chapter_string_length = getid3_lib::BigEndian2Int(substr($atom_data, $mdat_offset, 2)))
-					&& ($chapter_string_length < 1000)
-					&& ($chapter_string_length <= (strlen($atom_data) - $mdat_offset - 2))
-					&& preg_match('#^[\x20-\xFF]+$#', substr($atom_data, $mdat_offset + 2, $chapter_string_length), $chapter_matches)) {
-						$mdat_offset += (2 + $chapter_string_length);
-						@$info['quicktime']['comments']['chapters'][] = $chapter_matches[0];
-				}
-
-
-
-				if (($atomsize > 8) && (!isset($info['avdataend_tmp']) || ($info['quicktime'][$atomname]['size'] > ($info['avdataend_tmp'] - $info['avdataoffset'])))) {
-
-					$info['avdataoffset'] = $atom_structure['offset'] + 8;                       // $info['quicktime'][$atomname]['offset'] + 8;
-					$OldAVDataEnd         = $info['avdataend'];
-					$info['avdataend']    = $atom_structure['offset'] + $atom_structure['size']; // $info['quicktime'][$atomname]['offset'] + $info['quicktime'][$atomname]['size'];
-
-					$getid3_temp = new getID3();
-					$getid3_temp->openfile($this->getid3->filename);
-					$getid3_temp->info['avdataoffset'] = $info['avdataoffset'];
-					$getid3_temp->info['avdataend']    = $info['avdataend'];
-					$getid3_mp3 = new getid3_mp3($getid3_temp);
-					if ($getid3_mp3->MPEGaudioHeaderValid($getid3_mp3->MPEGaudioHeaderDecode($this->fread(4)))) {
-						$getid3_mp3->getOnlyMPEGaudioInfo($getid3_temp->info['avdataoffset'], false);
-						if (!empty($getid3_temp->info['warning'])) {
-							foreach ($getid3_temp->info['warning'] as $value) {
-								$info['warning'][] = $value;
-							}
-						}
-						if (!empty($getid3_temp->info['mpeg'])) {
-							$info['mpeg'] = $getid3_temp->info['mpeg'];
-							if (isset($info['mpeg']['audio'])) {
-								$info['audio']['dataformat']   = 'mp3';
-								$info['audio']['codec']        = (!empty($info['mpeg']['audio']['encoder']) ? $info['mpeg']['audio']['encoder'] : (!empty($info['mpeg']['audio']['codec']) ? $info['mpeg']['audio']['codec'] : (!empty($info['mpeg']['audio']['LAME']) ? 'LAME' :'mp3')));
-								$info['audio']['sample_rate']  = $info['mpeg']['audio']['sample_rate'];
-								$info['audio']['channels']     = $info['mpeg']['audio']['channels'];
-								$info['audio']['bitrate']      = $info['mpeg']['audio']['bitrate'];
-								$info['audio']['bitrate_mode'] = strtolower($info['mpeg']['audio']['bitrate_mode']);
-								$info['bitrate']               = $info['audio']['bitrate'];
-							}
-						}
-					}
-					unset($getid3_mp3, $getid3_temp);
-					$info['avdataend'] = $OldAVDataEnd;
-					unset($OldAVDataEnd);
-
-				}
-
-				unset($mdat_offset, $chapter_string_length, $chapter_matches);
-				break;
-
-			case 'free': // FREE space atom
-			case 'skip': // SKIP atom
-			case 'wide': // 64-bit expansion placeholder atom
-				// 'free', 'skip' and 'wide' are just padding, contains no useful data at all
-
-				// When writing QuickTime files, it is sometimes necessary to update an atom's size.
-				// It is impossible to update a 32-bit atom to a 64-bit atom since the 32-bit atom
-				// is only 8 bytes in size, and the 64-bit atom requires 16 bytes. Therefore, QuickTime
-				// puts an 8-byte placeholder atom before any atoms it may have to update the size of.
-				// In this way, if the atom needs to be converted from a 32-bit to a 64-bit atom, the
-				// placeholder atom can be overwritten to obtain the necessary 8 extra bytes.
-				// The placeholder atom has a type of kWideAtomPlaceholderType ( 'wide' ).
-				break;
-
-
-			case 'nsav': // NoSAVe atom
-				// http://developer.apple.com/technotes/tn/tn2038.html
-				$atom_structure['data'] = getid3_lib::BigEndian2Int(substr($atom_data,  0, 4));
-				break;
-
-			case 'ctyp': // Controller TYPe atom (seen on QTVR)
-				// http://homepages.slingshot.co.nz/~helmboy/quicktime/formats/qtm-layout.txt
-				// some controller names are:
-				//   0x00 + 'std' for linear movie
-				//   'none' for no controls
-				$atom_structure['ctyp'] = substr($atom_data, 0, 4);
-				$info['quicktime']['controller'] = $atom_structure['ctyp'];
-				switch ($atom_structure['ctyp']) {
-					case 'qtvr':
-						$info['video']['dataformat'] = 'quicktimevr';
-						break;
-				}
-				break;
-
-			case 'pano': // PANOrama track (seen on QTVR)
-				$atom_structure['pano'] = getid3_lib::BigEndian2Int(substr($atom_data,  0, 4));
-				break;
-
-			case 'hint': // HINT track
-			case 'hinf': //
-			case 'hinv': //
-			case 'hnti': //
-				$info['quicktime']['hinting'] = true;
-				break;
-
-			case 'imgt': // IMaGe Track reference (kQTVRImageTrackRefType) (seen on QTVR)
-				for ($i = 0; $i < ($atom_structure['size'] - 8); $i += 4) {
-					$atom_structure['imgt'][] = getid3_lib::BigEndian2Int(substr($atom_data, $i, 4));
-				}
-				break;
-
-
-			// Observed-but-not-handled atom types are just listed here to prevent warnings being generated
-			case 'FXTC': // Something to do with Adobe After Effects (?)
-			case 'PrmA':
-			case 'code':
-			case 'FIEL': // this is NOT "fiel" (Field Ordering) as describe here: http://developer.apple.com/documentation/QuickTime/QTFF/QTFFChap3/chapter_4_section_2.html
-			case 'tapt': // TrackApertureModeDimensionsAID - http://developer.apple.com/documentation/QuickTime/Reference/QT7-1_Update_Reference/Constants/Constants.html
-						// tapt seems to be used to compute the video size [http://www.getid3.org/phpBB3/viewtopic.php?t=838]
-						// * http://lists.apple.com/archives/quicktime-api/2006/Aug/msg00014.html
-						// * http://handbrake.fr/irclogs/handbrake-dev/handbrake-dev20080128_pg2.html
-			case 'ctts'://  STCompositionOffsetAID             - http://developer.apple.com/documentation/QuickTime/Reference/QTRef_Constants/Reference/reference.html
-			case 'cslg'://  STCompositionShiftLeastGreatestAID - http://developer.apple.com/documentation/QuickTime/Reference/QTRef_Constants/Reference/reference.html
-			case 'sdtp'://  STSampleDependencyAID              - http://developer.apple.com/documentation/QuickTime/Reference/QTRef_Constants/Reference/reference.html
-			case 'stps'://  STPartialSyncSampleAID             - http://developer.apple.com/documentation/QuickTime/Reference/QTRef_Constants/Reference/reference.html
-				//$atom_structure['data'] = $atom_data;
-				break;
-
-			case "\xA9".'xyz':  // GPS latitude+longitude+altitude
-				$atom_structure['data'] = $atom_data;
-				if (preg_match('#([\\+\\-][0-9\\.]+)([\\+\\-][0-9\\.]+)([\\+\\-][0-9\\.]+)?/$#i', $atom_data, $matches)) {
-					@list($all, $latitude, $longitude, $altitude) = $matches;
-					$info['quicktime']['comments']['gps_latitude'][]  = floatval($latitude);
-					$info['quicktime']['comments']['gps_longitude'][] = floatval($longitude);
-					if (!empty($altitude)) {
-						$info['quicktime']['comments']['gps_altitude'][] = floatval($altitude);
-					}
-				} else {
-					$info['warning'][] = 'QuickTime atom "©xyz" data does not match expected data pattern at offset '.$baseoffset.'. Please report as getID3() bug.';
-				}
-				break;
-
-			case 'NCDT':
-				// http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html
-				// Nikon-specific QuickTime tags found in the NCDT atom of MOV videos from some Nikon cameras such as the Coolpix S8000 and D5100
-				$atom_structure['subatoms'] = $this->QuicktimeParseContainerAtom($atom_data, $baseoffset + 4, $atomHierarchy, $ParseAllPossibleAtoms);
-				break;
-			case 'NCTH': // Nikon Camera THumbnail image
-			case 'NCVW': // Nikon Camera preVieW image
-				// http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html
-				if (preg_match('/^\xFF\xD8\xFF/', $atom_data)) {
-					$atom_structure['data'] = $atom_data;
-					$atom_structure['image_mime'] = 'image/jpeg';
-					$atom_structure['description'] = (($atomname == 'NCTH') ? 'Nikon Camera Thumbnail Image' : (($atomname == 'NCVW') ? 'Nikon Camera Preview Image' : 'Nikon preview image'));
-					$info['quicktime']['comments']['picture'][] = array('image_mime'=>$atom_structure['image_mime'], 'data'=>$atom_data, 'description'=>$atom_structure['description']);
-				}
-				break;
-			case 'NCTG': // Nikon - http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html#NCTG
-				$atom_structure['data'] = $this->QuicktimeParseNikonNCTG($atom_data);
-				break;
-			case 'NCHD': // Nikon:MakerNoteVersion  - http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html
-			case 'NCDB': // Nikon                   - http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html
-			case 'CNCV': // Canon:CompressorVersion - http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Canon.html
-				$atom_structure['data'] = $atom_data;
-				break;
-
-			case "\x00\x00\x00\x00":
-			case 'meta': // METAdata atom
-				// some kind of metacontainer, may contain a big data dump such as:
-				// mdta keys \005 mdtacom.apple.quicktime.make (mdtacom.apple.quicktime.creationdate ,mdtacom.apple.quicktime.location.ISO6709 $mdtacom.apple.quicktime.software !mdtacom.apple.quicktime.model ilst \01D \001 \015data \001DE\010Apple 0 \002 (data \001DE\0102011-05-11T17:54:04+0200 2 \003 *data \001DE\010+52.4936+013.3897+040.247/ \01D \004 \015data \001DE\0104.3.1 \005 \018data \001DE\010iPhone 4
-				// http://www.geocities.com/xhelmboyx/quicktime/formats/qti-layout.txt
-
-	            $atom_structure['version']   =          getid3_lib::BigEndian2Int(substr($atom_data, 0, 1));
-	            $atom_structure['flags_raw'] =          getid3_lib::BigEndian2Int(substr($atom_data, 1, 3));
-	            $atom_structure['subatoms']  = $this->QuicktimeParseContainerAtom(substr($atom_data, 4), $baseoffset + 8, $atomHierarchy, $ParseAllPossibleAtoms);
-				//$atom_structure['subatoms']  = $this->QuicktimeParseContainerAtom($atom_data, $baseoffset + 8, $atomHierarchy, $ParseAllPossibleAtoms);
-				break;
-
-			case 'data': // metaDATA atom
-				// seems to be 2 bytes language code (ASCII), 2 bytes unknown (set to 0x10B5 in sample I have), remainder is useful data
-				$atom_structure['language'] =                           substr($atom_data, 4 + 0, 2);
-				$atom_structure['unknown']  = getid3_lib::BigEndian2Int(substr($atom_data, 4 + 2, 2));
-				$atom_structure['data']     =                           substr($atom_data, 4 + 4);
-				break;
-
-			default:
-				$info['warning'][] = 'Unknown QuickTime atom type: "'.preg_replace('#[^a-zA-Z0-9 _\\-]#', '?', $atomname).'" ('.trim(getid3_lib::PrintHexBytes($atomname)).') at offset '.$baseoffset;
-				$atom_structure['data'] = $atom_data;
-				break;
-		}
-		array_pop($atomHierarchy);
-		return $atom_structure;
-	}
-
-	public function QuicktimeParseContainerAtom($atom_data, $baseoffset, &$atomHierarchy, $ParseAllPossibleAtoms) {
-//echo 'QuicktimeParseContainerAtom('.substr($atom_data, 4, 4).') @ '.$baseoffset.'<br><br>';
-		$atom_structure  = false;
-		$subatomoffset  = 0;
-		$subatomcounter = 0;
-		if ((strlen($atom_data) == 4) && (getid3_lib::BigEndian2Int($atom_data) == 0x00000000)) {
-			return false;
-		}
-		while ($subatomoffset < strlen($atom_data)) {
-			$subatomsize = getid3_lib::BigEndian2Int(substr($atom_data, $subatomoffset + 0, 4));
-			$subatomname =                           substr($atom_data, $subatomoffset + 4, 4);
-			$subatomdata =                           substr($atom_data, $subatomoffset + 8, $subatomsize - 8);
-			if ($subatomsize == 0) {
-				// Furthermore, for historical reasons the list of atoms is optionally
-				// terminated by a 32-bit integer set to 0. If you are writing a program
-				// to read user data atoms, you should allow for the terminating 0.
-				return $atom_structure;
-			}
-
-			$atom_structure[$subatomcounter] = $this->QuicktimeParseAtom($subatomname, $subatomsize, $subatomdata, $baseoffset + $subatomoffset, $atomHierarchy, $ParseAllPossibleAtoms);
-
-			$subatomoffset += $subatomsize;
-			$subatomcounter++;
-		}
-		return $atom_structure;
-	}
-
-
-	public function quicktime_read_mp4_descr_length($data, &$offset) {
-		// http://libquicktime.sourcearchive.com/documentation/2:1.0.2plus-pdebian-2build1/esds_8c-source.html
-		$num_bytes = 0;
-		$length    = 0;
-		do {
-			$b = ord(substr($data, $offset++, 1));
-			$length = ($length << 7) | ($b & 0x7F);
-		} while (($b & 0x80) && ($num_bytes++ < 4));
-		return $length;
-	}
-
-
-	public function QuicktimeLanguageLookup($languageid) {
-		// http://developer.apple.com/library/mac/#documentation/QuickTime/QTFF/QTFFChap4/qtff4.html#//apple_ref/doc/uid/TP40000939-CH206-34353
-		static $QuicktimeLanguageLookup = array();
-		if (empty($QuicktimeLanguageLookup)) {
-			$QuicktimeLanguageLookup[0]     = 'English';
-			$QuicktimeLanguageLookup[1]     = 'French';
-			$QuicktimeLanguageLookup[2]     = 'German';
-			$QuicktimeLanguageLookup[3]     = 'Italian';
-			$QuicktimeLanguageLookup[4]     = 'Dutch';
-			$QuicktimeLanguageLookup[5]     = 'Swedish';
-			$QuicktimeLanguageLookup[6]     = 'Spanish';
-			$QuicktimeLanguageLookup[7]     = 'Danish';
-			$QuicktimeLanguageLookup[8]     = 'Portuguese';
-			$QuicktimeLanguageLookup[9]     = 'Norwegian';
-			$QuicktimeLanguageLookup[10]    = 'Hebrew';
-			$QuicktimeLanguageLookup[11]    = 'Japanese';
-			$QuicktimeLanguageLookup[12]    = 'Arabic';
-			$QuicktimeLanguageLookup[13]    = 'Finnish';
-			$QuicktimeLanguageLookup[14]    = 'Greek';
-			$QuicktimeLanguageLookup[15]    = 'Icelandic';
-			$QuicktimeLanguageLookup[16]    = 'Maltese';
-			$QuicktimeLanguageLookup[17]    = 'Turkish';
-			$QuicktimeLanguageLookup[18]    = 'Croatian';
-			$QuicktimeLanguageLookup[19]    = 'Chinese (Traditional)';
-			$QuicktimeLanguageLookup[20]    = 'Urdu';
-			$QuicktimeLanguageLookup[21]    = 'Hindi';
-			$QuicktimeLanguageLookup[22]    = 'Thai';
-			$QuicktimeLanguageLookup[23]    = 'Korean';
-			$QuicktimeLanguageLookup[24]    = 'Lithuanian';
-			$QuicktimeLanguageLookup[25]    = 'Polish';
-			$QuicktimeLanguageLookup[26]    = 'Hungarian';
-			$QuicktimeLanguageLookup[27]    = 'Estonian';
-			$QuicktimeLanguageLookup[28]    = 'Lettish';
-			$QuicktimeLanguageLookup[28]    = 'Latvian';
-			$QuicktimeLanguageLookup[29]    = 'Saamisk';
-			$QuicktimeLanguageLookup[29]    = 'Lappish';
-			$QuicktimeLanguageLookup[30]    = 'Faeroese';
-			$QuicktimeLanguageLookup[31]    = 'Farsi';
-			$QuicktimeLanguageLookup[31]    = 'Persian';
-			$QuicktimeLanguageLookup[32]    = 'Russian';
-			$QuicktimeLanguageLookup[33]    = 'Chinese (Simplified)';
-			$QuicktimeLanguageLookup[34]    = 'Flemish';
-			$QuicktimeLanguageLookup[35]    = 'Irish';
-			$QuicktimeLanguageLookup[36]    = 'Albanian';
-			$QuicktimeLanguageLookup[37]    = 'Romanian';
-			$QuicktimeLanguageLookup[38]    = 'Czech';
-			$QuicktimeLanguageLookup[39]    = 'Slovak';
-			$QuicktimeLanguageLookup[40]    = 'Slovenian';
-			$QuicktimeLanguageLookup[41]    = 'Yiddish';
-			$QuicktimeLanguageLookup[42]    = 'Serbian';
-			$QuicktimeLanguageLookup[43]    = 'Macedonian';
-			$QuicktimeLanguageLookup[44]    = 'Bulgarian';
-			$QuicktimeLanguageLookup[45]    = 'Ukrainian';
-			$QuicktimeLanguageLookup[46]    = 'Byelorussian';
-			$QuicktimeLanguageLookup[47]    = 'Uzbek';
-			$QuicktimeLanguageLookup[48]    = 'Kazakh';
-			$QuicktimeLanguageLookup[49]    = 'Azerbaijani';
-			$QuicktimeLanguageLookup[50]    = 'AzerbaijanAr';
-			$QuicktimeLanguageLookup[51]    = 'Armenian';
-			$QuicktimeLanguageLookup[52]    = 'Georgian';
-			$QuicktimeLanguageLookup[53]    = 'Moldavian';
-			$QuicktimeLanguageLookup[54]    = 'Kirghiz';
-			$QuicktimeLanguageLookup[55]    = 'Tajiki';
-			$QuicktimeLanguageLookup[56]    = 'Turkmen';
-			$QuicktimeLanguageLookup[57]    = 'Mongolian';
-			$QuicktimeLanguageLookup[58]    = 'MongolianCyr';
-			$QuicktimeLanguageLookup[59]    = 'Pashto';
-			$QuicktimeLanguageLookup[60]    = 'Kurdish';
-			$QuicktimeLanguageLookup[61]    = 'Kashmiri';
-			$QuicktimeLanguageLookup[62]    = 'Sindhi';
-			$QuicktimeLanguageLookup[63]    = 'Tibetan';
-			$QuicktimeLanguageLookup[64]    = 'Nepali';
-			$QuicktimeLanguageLookup[65]    = 'Sanskrit';
-			$QuicktimeLanguageLookup[66]    = 'Marathi';
-			$QuicktimeLanguageLookup[67]    = 'Bengali';
-			$QuicktimeLanguageLookup[68]    = 'Assamese';
-			$QuicktimeLanguageLookup[69]    = 'Gujarati';
-			$QuicktimeLanguageLookup[70]    = 'Punjabi';
-			$QuicktimeLanguageLookup[71]    = 'Oriya';
-			$QuicktimeLanguageLookup[72]    = 'Malayalam';
-			$QuicktimeLanguageLookup[73]    = 'Kannada';
-			$QuicktimeLanguageLookup[74]    = 'Tamil';
-			$QuicktimeLanguageLookup[75]    = 'Telugu';
-			$QuicktimeLanguageLookup[76]    = 'Sinhalese';
-			$QuicktimeLanguageLookup[77]    = 'Burmese';
-			$QuicktimeLanguageLookup[78]    = 'Khmer';
-			$QuicktimeLanguageLookup[79]    = 'Lao';
-			$QuicktimeLanguageLookup[80]    = 'Vietnamese';
-			$QuicktimeLanguageLookup[81]    = 'Indonesian';
-			$QuicktimeLanguageLookup[82]    = 'Tagalog';
-			$QuicktimeLanguageLookup[83]    = 'MalayRoman';
-			$QuicktimeLanguageLookup[84]    = 'MalayArabic';
-			$QuicktimeLanguageLookup[85]    = 'Amharic';
-			$QuicktimeLanguageLookup[86]    = 'Tigrinya';
-			$QuicktimeLanguageLookup[87]    = 'Galla';
-			$QuicktimeLanguageLookup[87]    = 'Oromo';
-			$QuicktimeLanguageLookup[88]    = 'Somali';
-			$QuicktimeLanguageLookup[89]    = 'Swahili';
-			$QuicktimeLanguageLookup[90]    = 'Ruanda';
-			$QuicktimeLanguageLookup[91]    = 'Rundi';
-			$QuicktimeLanguageLookup[92]    = 'Chewa';
-			$QuicktimeLanguageLookup[93]    = 'Malagasy';
-			$QuicktimeLanguageLookup[94]    = 'Esperanto';
-			$QuicktimeLanguageLookup[128]   = 'Welsh';
-			$QuicktimeLanguageLookup[129]   = 'Basque';
-			$QuicktimeLanguageLookup[130]   = 'Catalan';
-			$QuicktimeLanguageLookup[131]   = 'Latin';
-			$QuicktimeLanguageLookup[132]   = 'Quechua';
-			$QuicktimeLanguageLookup[133]   = 'Guarani';
-			$QuicktimeLanguageLookup[134]   = 'Aymara';
-			$QuicktimeLanguageLookup[135]   = 'Tatar';
-			$QuicktimeLanguageLookup[136]   = 'Uighur';
-			$QuicktimeLanguageLookup[137]   = 'Dzongkha';
-			$QuicktimeLanguageLookup[138]   = 'JavaneseRom';
-			$QuicktimeLanguageLookup[32767] = 'Unspecified';
-		}
-		if (($languageid > 138) && ($languageid < 32767)) {
-			/*
-			ISO Language Codes - http://www.loc.gov/standards/iso639-2/php/code_list.php
-			Because the language codes specified by ISO 639-2/T are three characters long, they must be packed to fit into a 16-bit field.
-			The packing algorithm must map each of the three characters, which are always lowercase, into a 5-bit integer and then concatenate
-			these integers into the least significant 15 bits of a 16-bit integer, leaving the 16-bit integer's most significant bit set to zero.
-
-			One algorithm for performing this packing is to treat each ISO character as a 16-bit integer. Subtract 0x60 from the first character
-			and multiply by 2^10 (0x400), subtract 0x60 from the second character and multiply by 2^5 (0x20), subtract 0x60 from the third character,
-			and add the three 16-bit values. This will result in a single 16-bit value with the three codes correctly packed into the 15 least
-			significant bits and the most significant bit set to zero.
-			*/
-			$iso_language_id  = '';
-			$iso_language_id .= chr((($languageid & 0x7C00) >> 10) + 0x60);
-			$iso_language_id .= chr((($languageid & 0x03E0) >>  5) + 0x60);
-			$iso_language_id .= chr((($languageid & 0x001F) >>  0) + 0x60);
-			$QuicktimeLanguageLookup[$languageid] = getid3_id3v2::LanguageLookup($iso_language_id);
-		}
-		return (isset($QuicktimeLanguageLookup[$languageid]) ? $QuicktimeLanguageLookup[$languageid] : 'invalid');
-	}
-
-	public function QuicktimeVideoCodecLookup($codecid) {
-		static $QuicktimeVideoCodecLookup = array();
-		if (empty($QuicktimeVideoCodecLookup)) {
-			$QuicktimeVideoCodecLookup['.SGI'] = 'SGI';
-			$QuicktimeVideoCodecLookup['3IV1'] = '3ivx MPEG-4 v1';
-			$QuicktimeVideoCodecLookup['3IV2'] = '3ivx MPEG-4 v2';
-			$QuicktimeVideoCodecLookup['3IVX'] = '3ivx MPEG-4';
-			$QuicktimeVideoCodecLookup['8BPS'] = 'Planar RGB';
-			$QuicktimeVideoCodecLookup['avc1'] = 'H.264/MPEG-4 AVC';
-			$QuicktimeVideoCodecLookup['avr '] = 'AVR-JPEG';
-			$QuicktimeVideoCodecLookup['b16g'] = '16Gray';
-			$QuicktimeVideoCodecLookup['b32a'] = '32AlphaGray';
-			$QuicktimeVideoCodecLookup['b48r'] = '48RGB';
-			$QuicktimeVideoCodecLookup['b64a'] = '64ARGB';
-			$QuicktimeVideoCodecLookup['base'] = 'Base';
-			$QuicktimeVideoCodecLookup['clou'] = 'Cloud';
-			$QuicktimeVideoCodecLookup['cmyk'] = 'CMYK';
-			$QuicktimeVideoCodecLookup['cvid'] = 'Cinepak';
-			$QuicktimeVideoCodecLookup['dmb1'] = 'OpenDML JPEG';
-			$QuicktimeVideoCodecLookup['dvc '] = 'DVC-NTSC';
-			$QuicktimeVideoCodecLookup['dvcp'] = 'DVC-PAL';
-			$QuicktimeVideoCodecLookup['dvpn'] = 'DVCPro-NTSC';
-			$QuicktimeVideoCodecLookup['dvpp'] = 'DVCPro-PAL';
-			$QuicktimeVideoCodecLookup['fire'] = 'Fire';
-			$QuicktimeVideoCodecLookup['flic'] = 'FLC';
-			$QuicktimeVideoCodecLookup['gif '] = 'GIF';
-			$QuicktimeVideoCodecLookup['h261'] = 'H261';
-			$QuicktimeVideoCodecLookup['h263'] = 'H263';
-			$QuicktimeVideoCodecLookup['IV41'] = 'Indeo4';
-			$QuicktimeVideoCodecLookup['jpeg'] = 'JPEG';
-			$QuicktimeVideoCodecLookup['kpcd'] = 'PhotoCD';
-			$QuicktimeVideoCodecLookup['mjpa'] = 'Motion JPEG-A';
-			$QuicktimeVideoCodecLookup['mjpb'] = 'Motion JPEG-B';
-			$QuicktimeVideoCodecLookup['msvc'] = 'Microsoft Video1';
-			$QuicktimeVideoCodecLookup['myuv'] = 'MPEG YUV420';
-			$QuicktimeVideoCodecLookup['path'] = 'Vector';
-			$QuicktimeVideoCodecLookup['png '] = 'PNG';
-			$QuicktimeVideoCodecLookup['PNTG'] = 'MacPaint';
-			$QuicktimeVideoCodecLookup['qdgx'] = 'QuickDrawGX';
-			$QuicktimeVideoCodecLookup['qdrw'] = 'QuickDraw';
-			$QuicktimeVideoCodecLookup['raw '] = 'RAW';
-			$QuicktimeVideoCodecLookup['ripl'] = 'WaterRipple';
-			$QuicktimeVideoCodecLookup['rpza'] = 'Video';
-			$QuicktimeVideoCodecLookup['smc '] = 'Graphics';
-			$QuicktimeVideoCodecLookup['SVQ1'] = 'Sorenson Video 1';
-			$QuicktimeVideoCodecLookup['SVQ1'] = 'Sorenson Video 3';
-			$QuicktimeVideoCodecLookup['syv9'] = 'Sorenson YUV9';
-			$QuicktimeVideoCodecLookup['tga '] = 'Targa';
-			$QuicktimeVideoCodecLookup['tiff'] = 'TIFF';
-			$QuicktimeVideoCodecLookup['WRAW'] = 'Windows RAW';
-			$QuicktimeVideoCodecLookup['WRLE'] = 'BMP';
-			$QuicktimeVideoCodecLookup['y420'] = 'YUV420';
-			$QuicktimeVideoCodecLookup['yuv2'] = 'ComponentVideo';
-			$QuicktimeVideoCodecLookup['yuvs'] = 'ComponentVideoUnsigned';
-			$QuicktimeVideoCodecLookup['yuvu'] = 'ComponentVideoSigned';
-		}
-		return (isset($QuicktimeVideoCodecLookup[$codecid]) ? $QuicktimeVideoCodecLookup[$codecid] : '');
-	}
-
-	public function QuicktimeAudioCodecLookup($codecid) {
-		static $QuicktimeAudioCodecLookup = array();
-		if (empty($QuicktimeAudioCodecLookup)) {
-			$QuicktimeAudioCodecLookup['.mp3']          = 'Fraunhofer MPEG Layer-III alias';
-			$QuicktimeAudioCodecLookup['aac ']          = 'ISO/IEC 14496-3 AAC';
-			$QuicktimeAudioCodecLookup['agsm']          = 'Apple GSM 10:1';
-			$QuicktimeAudioCodecLookup['alac']          = 'Apple Lossless Audio Codec';
-			$QuicktimeAudioCodecLookup['alaw']          = 'A-law 2:1';
-			$QuicktimeAudioCodecLookup['conv']          = 'Sample Format';
-			$QuicktimeAudioCodecLookup['dvca']          = 'DV';
-			$QuicktimeAudioCodecLookup['dvi ']          = 'DV 4:1';
-			$QuicktimeAudioCodecLookup['eqal']          = 'Frequency Equalizer';
-			$QuicktimeAudioCodecLookup['fl32']          = '32-bit Floating Point';
-			$QuicktimeAudioCodecLookup['fl64']          = '64-bit Floating Point';
-			$QuicktimeAudioCodecLookup['ima4']          = 'Interactive Multimedia Association 4:1';
-			$QuicktimeAudioCodecLookup['in24']          = '24-bit Integer';
-			$QuicktimeAudioCodecLookup['in32']          = '32-bit Integer';
-			$QuicktimeAudioCodecLookup['lpc ']          = 'LPC 23:1';
-			$QuicktimeAudioCodecLookup['MAC3']          = 'Macintosh Audio Compression/Expansion (MACE) 3:1';
-			$QuicktimeAudioCodecLookup['MAC6']          = 'Macintosh Audio Compression/Expansion (MACE) 6:1';
-			$QuicktimeAudioCodecLookup['mixb']          = '8-bit Mixer';
-			$QuicktimeAudioCodecLookup['mixw']          = '16-bit Mixer';
-			$QuicktimeAudioCodecLookup['mp4a']          = 'ISO/IEC 14496-3 AAC';
-			$QuicktimeAudioCodecLookup['MS'."\x00\x02"] = 'Microsoft ADPCM';
-			$QuicktimeAudioCodecLookup['MS'."\x00\x11"] = 'DV IMA';
-			$QuicktimeAudioCodecLookup['MS'."\x00\x55"] = 'Fraunhofer MPEG Layer III';
-			$QuicktimeAudioCodecLookup['NONE']          = 'No Encoding';
-			$QuicktimeAudioCodecLookup['Qclp']          = 'Qualcomm PureVoice';
-			$QuicktimeAudioCodecLookup['QDM2']          = 'QDesign Music 2';
-			$QuicktimeAudioCodecLookup['QDMC']          = 'QDesign Music 1';
-			$QuicktimeAudioCodecLookup['ratb']          = '8-bit Rate';
-			$QuicktimeAudioCodecLookup['ratw']          = '16-bit Rate';
-			$QuicktimeAudioCodecLookup['raw ']          = 'raw PCM';
-			$QuicktimeAudioCodecLookup['sour']          = 'Sound Source';
-			$QuicktimeAudioCodecLookup['sowt']          = 'signed/two\'s complement (Little Endian)';
-			$QuicktimeAudioCodecLookup['str1']          = 'Iomega MPEG layer II';
-			$QuicktimeAudioCodecLookup['str2']          = 'Iomega MPEG *layer II';
-			$QuicktimeAudioCodecLookup['str3']          = 'Iomega MPEG **layer II';
-			$QuicktimeAudioCodecLookup['str4']          = 'Iomega MPEG ***layer II';
-			$QuicktimeAudioCodecLookup['twos']          = 'signed/two\'s complement (Big Endian)';
-			$QuicktimeAudioCodecLookup['ulaw']          = 'mu-law 2:1';
-		}
-		return (isset($QuicktimeAudioCodecLookup[$codecid]) ? $QuicktimeAudioCodecLookup[$codecid] : '');
-	}
-
-	public function QuicktimeDCOMLookup($compressionid) {
-		static $QuicktimeDCOMLookup = array();
-		if (empty($QuicktimeDCOMLookup)) {
-			$QuicktimeDCOMLookup['zlib'] = 'ZLib Deflate';
-			$QuicktimeDCOMLookup['adec'] = 'Apple Compression';
-		}
-		return (isset($QuicktimeDCOMLookup[$compressionid]) ? $QuicktimeDCOMLookup[$compressionid] : '');
-	}
-
-	public function QuicktimeColorNameLookup($colordepthid) {
-		static $QuicktimeColorNameLookup = array();
-		if (empty($QuicktimeColorNameLookup)) {
-			$QuicktimeColorNameLookup[1]  = '2-color (monochrome)';
-			$QuicktimeColorNameLookup[2]  = '4-color';
-			$QuicktimeColorNameLookup[4]  = '16-color';
-			$QuicktimeColorNameLookup[8]  = '256-color';
-			$QuicktimeColorNameLookup[16] = 'thousands (16-bit color)';
-			$QuicktimeColorNameLookup[24] = 'millions (24-bit color)';
-			$QuicktimeColorNameLookup[32] = 'millions+ (32-bit color)';
-			$QuicktimeColorNameLookup[33] = 'black & white';
-			$QuicktimeColorNameLookup[34] = '4-gray';
-			$QuicktimeColorNameLookup[36] = '16-gray';
-			$QuicktimeColorNameLookup[40] = '256-gray';
-		}
-		return (isset($QuicktimeColorNameLookup[$colordepthid]) ? $QuicktimeColorNameLookup[$colordepthid] : 'invalid');
-	}
-
-	public function QuicktimeSTIKLookup($stik) {
-		static $QuicktimeSTIKLookup = array();
-		if (empty($QuicktimeSTIKLookup)) {
-			$QuicktimeSTIKLookup[0]  = 'Movie';
-			$QuicktimeSTIKLookup[1]  = 'Normal';
-			$QuicktimeSTIKLookup[2]  = 'Audiobook';
-			$QuicktimeSTIKLookup[5]  = 'Whacked Bookmark';
-			$QuicktimeSTIKLookup[6]  = 'Music Video';
-			$QuicktimeSTIKLookup[9]  = 'Short Film';
-			$QuicktimeSTIKLookup[10] = 'TV Show';
-			$QuicktimeSTIKLookup[11] = 'Booklet';
-			$QuicktimeSTIKLookup[14] = 'Ringtone';
-			$QuicktimeSTIKLookup[21] = 'Podcast';
-		}
-		return (isset($QuicktimeSTIKLookup[$stik]) ? $QuicktimeSTIKLookup[$stik] : 'invalid');
-	}
-
-	public function QuicktimeIODSaudioProfileName($audio_profile_id) {
-		static $QuicktimeIODSaudioProfileNameLookup = array();
-		if (empty($QuicktimeIODSaudioProfileNameLookup)) {
-			$QuicktimeIODSaudioProfileNameLookup = array(
-			    0x00 => 'ISO Reserved (0x00)',
-			    0x01 => 'Main Audio Profile @ Level 1',
-			    0x02 => 'Main Audio Profile @ Level 2',
-			    0x03 => 'Main Audio Profile @ Level 3',
-			    0x04 => 'Main Audio Profile @ Level 4',
-			    0x05 => 'Scalable Audio Profile @ Level 1',
-			    0x06 => 'Scalable Audio Profile @ Level 2',
-			    0x07 => 'Scalable Audio Profile @ Level 3',
-			    0x08 => 'Scalable Audio Profile @ Level 4',
-			    0x09 => 'Speech Audio Profile @ Level 1',
-			    0x0A => 'Speech Audio Profile @ Level 2',
-			    0x0B => 'Synthetic Audio Profile @ Level 1',
-			    0x0C => 'Synthetic Audio Profile @ Level 2',
-			    0x0D => 'Synthetic Audio Profile @ Level 3',
-			    0x0E => 'High Quality Audio Profile @ Level 1',
-			    0x0F => 'High Quality Audio Profile @ Level 2',
-			    0x10 => 'High Quality Audio Profile @ Level 3',
-			    0x11 => 'High Quality Audio Profile @ Level 4',
-			    0x12 => 'High Quality Audio Profile @ Level 5',
-			    0x13 => 'High Quality Audio Profile @ Level 6',
-			    0x14 => 'High Quality Audio Profile @ Level 7',
-			    0x15 => 'High Quality Audio Profile @ Level 8',
-			    0x16 => 'Low Delay Audio Profile @ Level 1',
-			    0x17 => 'Low Delay Audio Profile @ Level 2',
-			    0x18 => 'Low Delay Audio Profile @ Level 3',
-			    0x19 => 'Low Delay Audio Profile @ Level 4',
-			    0x1A => 'Low Delay Audio Profile @ Level 5',
-			    0x1B => 'Low Delay Audio Profile @ Level 6',
-			    0x1C => 'Low Delay Audio Profile @ Level 7',
-			    0x1D => 'Low Delay Audio Profile @ Level 8',
-			    0x1E => 'Natural Audio Profile @ Level 1',
-			    0x1F => 'Natural Audio Profile @ Level 2',
-			    0x20 => 'Natural Audio Profile @ Level 3',
-			    0x21 => 'Natural Audio Profile @ Level 4',
-			    0x22 => 'Mobile Audio Internetworking Profile @ Level 1',
-			    0x23 => 'Mobile Audio Internetworking Profile @ Level 2',
-			    0x24 => 'Mobile Audio Internetworking Profile @ Level 3',
-			    0x25 => 'Mobile Audio Internetworking Profile @ Level 4',
-			    0x26 => 'Mobile Audio Internetworking Profile @ Level 5',
-			    0x27 => 'Mobile Audio Internetworking Profile @ Level 6',
-			    0x28 => 'AAC Profile @ Level 1',
-			    0x29 => 'AAC Profile @ Level 2',
-			    0x2A => 'AAC Profile @ Level 4',
-			    0x2B => 'AAC Profile @ Level 5',
-			    0x2C => 'High Efficiency AAC Profile @ Level 2',
-			    0x2D => 'High Efficiency AAC Profile @ Level 3',
-			    0x2E => 'High Efficiency AAC Profile @ Level 4',
-			    0x2F => 'High Efficiency AAC Profile @ Level 5',
-			    0xFE => 'Not part of MPEG-4 audio profiles',
-			    0xFF => 'No audio capability required',
-			);
-		}
-		return (isset($QuicktimeIODSaudioProfileNameLookup[$audio_profile_id]) ? $QuicktimeIODSaudioProfileNameLookup[$audio_profile_id] : 'ISO Reserved / User Private');
-	}
-
-
-	public function QuicktimeIODSvideoProfileName($video_profile_id) {
-		static $QuicktimeIODSvideoProfileNameLookup = array();
-		if (empty($QuicktimeIODSvideoProfileNameLookup)) {
-			$QuicktimeIODSvideoProfileNameLookup = array(
-				0x00 => 'Reserved (0x00) Profile',
-				0x01 => 'Simple Profile @ Level 1',
-				0x02 => 'Simple Profile @ Level 2',
-				0x03 => 'Simple Profile @ Level 3',
-				0x08 => 'Simple Profile @ Level 0',
-				0x10 => 'Simple Scalable Profile @ Level 0',
-				0x11 => 'Simple Scalable Profile @ Level 1',
-				0x12 => 'Simple Scalable Profile @ Level 2',
-				0x15 => 'AVC/H264 Profile',
-				0x21 => 'Core Profile @ Level 1',
-				0x22 => 'Core Profile @ Level 2',
-				0x32 => 'Main Profile @ Level 2',
-				0x33 => 'Main Profile @ Level 3',
-				0x34 => 'Main Profile @ Level 4',
-				0x42 => 'N-bit Profile @ Level 2',
-				0x51 => 'Scalable Texture Profile @ Level 1',
-				0x61 => 'Simple Face Animation Profile @ Level 1',
-				0x62 => 'Simple Face Animation Profile @ Level 2',
-				0x63 => 'Simple FBA Profile @ Level 1',
-				0x64 => 'Simple FBA Profile @ Level 2',
-				0x71 => 'Basic Animated Texture Profile @ Level 1',
-				0x72 => 'Basic Animated Texture Profile @ Level 2',
-				0x81 => 'Hybrid Profile @ Level 1',
-				0x82 => 'Hybrid Profile @ Level 2',
-				0x91 => 'Advanced Real Time Simple Profile @ Level 1',
-				0x92 => 'Advanced Real Time Simple Profile @ Level 2',
-				0x93 => 'Advanced Real Time Simple Profile @ Level 3',
-				0x94 => 'Advanced Real Time Simple Profile @ Level 4',
-				0xA1 => 'Core Scalable Profile @ Level1',
-				0xA2 => 'Core Scalable Profile @ Level2',
-				0xA3 => 'Core Scalable Profile @ Level3',
-				0xB1 => 'Advanced Coding Efficiency Profile @ Level 1',
-				0xB2 => 'Advanced Coding Efficiency Profile @ Level 2',
-				0xB3 => 'Advanced Coding Efficiency Profile @ Level 3',
-				0xB4 => 'Advanced Coding Efficiency Profile @ Level 4',
-				0xC1 => 'Advanced Core Profile @ Level 1',
-				0xC2 => 'Advanced Core Profile @ Level 2',
-				0xD1 => 'Advanced Scalable Texture @ Level1',
-				0xD2 => 'Advanced Scalable Texture @ Level2',
-				0xE1 => 'Simple Studio Profile @ Level 1',
-				0xE2 => 'Simple Studio Profile @ Level 2',
-				0xE3 => 'Simple Studio Profile @ Level 3',
-				0xE4 => 'Simple Studio Profile @ Level 4',
-				0xE5 => 'Core Studio Profile @ Level 1',
-				0xE6 => 'Core Studio Profile @ Level 2',
-				0xE7 => 'Core Studio Profile @ Level 3',
-				0xE8 => 'Core Studio Profile @ Level 4',
-				0xF0 => 'Advanced Simple Profile @ Level 0',
-				0xF1 => 'Advanced Simple Profile @ Level 1',
-				0xF2 => 'Advanced Simple Profile @ Level 2',
-				0xF3 => 'Advanced Simple Profile @ Level 3',
-				0xF4 => 'Advanced Simple Profile @ Level 4',
-				0xF5 => 'Advanced Simple Profile @ Level 5',
-				0xF7 => 'Advanced Simple Profile @ Level 3b',
-				0xF8 => 'Fine Granularity Scalable Profile @ Level 0',
-				0xF9 => 'Fine Granularity Scalable Profile @ Level 1',
-				0xFA => 'Fine Granularity Scalable Profile @ Level 2',
-				0xFB => 'Fine Granularity Scalable Profile @ Level 3',
-				0xFC => 'Fine Granularity Scalable Profile @ Level 4',
-				0xFD => 'Fine Granularity Scalable Profile @ Level 5',
-				0xFE => 'Not part of MPEG-4 Visual profiles',
-				0xFF => 'No visual capability required',
-			);
-		}
-		return (isset($QuicktimeIODSvideoProfileNameLookup[$video_profile_id]) ? $QuicktimeIODSvideoProfileNameLookup[$video_profile_id] : 'ISO Reserved Profile');
-	}
-
-
-	public function QuicktimeContentRatingLookup($rtng) {
-		static $QuicktimeContentRatingLookup = array();
-		if (empty($QuicktimeContentRatingLookup)) {
-			$QuicktimeContentRatingLookup[0]  = 'None';
-			$QuicktimeContentRatingLookup[2]  = 'Clean';
-			$QuicktimeContentRatingLookup[4]  = 'Explicit';
-		}
-		return (isset($QuicktimeContentRatingLookup[$rtng]) ? $QuicktimeContentRatingLookup[$rtng] : 'invalid');
-	}
-
-	public function QuicktimeStoreAccountTypeLookup($akid) {
-		static $QuicktimeStoreAccountTypeLookup = array();
-		if (empty($QuicktimeStoreAccountTypeLookup)) {
-			$QuicktimeStoreAccountTypeLookup[0] = 'iTunes';
-			$QuicktimeStoreAccountTypeLookup[1] = 'AOL';
-		}
-		return (isset($QuicktimeStoreAccountTypeLookup[$akid]) ? $QuicktimeStoreAccountTypeLookup[$akid] : 'invalid');
-	}
-
-	public function QuicktimeStoreFrontCodeLookup($sfid) {
-		static $QuicktimeStoreFrontCodeLookup = array();
-		if (empty($QuicktimeStoreFrontCodeLookup)) {
-			$QuicktimeStoreFrontCodeLookup[143460] = 'Australia';
-			$QuicktimeStoreFrontCodeLookup[143445] = 'Austria';
-			$QuicktimeStoreFrontCodeLookup[143446] = 'Belgium';
-			$QuicktimeStoreFrontCodeLookup[143455] = 'Canada';
-			$QuicktimeStoreFrontCodeLookup[143458] = 'Denmark';
-			$QuicktimeStoreFrontCodeLookup[143447] = 'Finland';
-			$QuicktimeStoreFrontCodeLookup[143442] = 'France';
-			$QuicktimeStoreFrontCodeLookup[143443] = 'Germany';
-			$QuicktimeStoreFrontCodeLookup[143448] = 'Greece';
-			$QuicktimeStoreFrontCodeLookup[143449] = 'Ireland';
-			$QuicktimeStoreFrontCodeLookup[143450] = 'Italy';
-			$QuicktimeStoreFrontCodeLookup[143462] = 'Japan';
-			$QuicktimeStoreFrontCodeLookup[143451] = 'Luxembourg';
-			$QuicktimeStoreFrontCodeLookup[143452] = 'Netherlands';
-			$QuicktimeStoreFrontCodeLookup[143461] = 'New Zealand';
-			$QuicktimeStoreFrontCodeLookup[143457] = 'Norway';
-			$QuicktimeStoreFrontCodeLookup[143453] = 'Portugal';
-			$QuicktimeStoreFrontCodeLookup[143454] = 'Spain';
-			$QuicktimeStoreFrontCodeLookup[143456] = 'Sweden';
-			$QuicktimeStoreFrontCodeLookup[143459] = 'Switzerland';
-			$QuicktimeStoreFrontCodeLookup[143444] = 'United Kingdom';
-			$QuicktimeStoreFrontCodeLookup[143441] = 'United States';
-		}
-		return (isset($QuicktimeStoreFrontCodeLookup[$sfid]) ? $QuicktimeStoreFrontCodeLookup[$sfid] : 'invalid');
-	}
-
-	public function QuicktimeParseNikonNCTG($atom_data) {
-		// http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html#NCTG
-		// Nikon-specific QuickTime tags found in the NCDT atom of MOV videos from some Nikon cameras such as the Coolpix S8000 and D5100
-		// Data is stored as records of:
-		// * 4 bytes record type
-		// * 2 bytes size of data field type:
-		//     0x0001 = flag   (size field *= 1-byte)
-		//     0x0002 = char   (size field *= 1-byte)
-		//     0x0003 = DWORD+ (size field *= 2-byte), values are stored CDAB
-		//     0x0004 = QWORD+ (size field *= 4-byte), values are stored EFGHABCD
-		//     0x0005 = float  (size field *= 8-byte), values are stored aaaabbbb where value is aaaa/bbbb; possibly multiple sets of values appended together
-		//     0x0007 = bytes  (size field *= 1-byte), values are stored as ??????
-		//     0x0008 = ?????  (size field *= 2-byte), values are stored as ??????
-		// * 2 bytes data size field
-		// * ? bytes data (string data may be null-padded; datestamp fields are in the format "2011:05:25 20:24:15")
-		// all integers are stored BigEndian
-
-		$NCTGtagName = array(
-			0x00000001 => 'Make',
-			0x00000002 => 'Model',
-			0x00000003 => 'Software',
-			0x00000011 => 'CreateDate',
-			0x00000012 => 'DateTimeOriginal',
-			0x00000013 => 'FrameCount',
-			0x00000016 => 'FrameRate',
-			0x00000022 => 'FrameWidth',
-			0x00000023 => 'FrameHeight',
-			0x00000032 => 'AudioChannels',
-			0x00000033 => 'AudioBitsPerSample',
-			0x00000034 => 'AudioSampleRate',
-			0x02000001 => 'MakerNoteVersion',
-			0x02000005 => 'WhiteBalance',
-			0x0200000b => 'WhiteBalanceFineTune',
-			0x0200001e => 'ColorSpace',
-			0x02000023 => 'PictureControlData',
-			0x02000024 => 'WorldTime',
-			0x02000032 => 'UnknownInfo',
-			0x02000083 => 'LensType',
-			0x02000084 => 'Lens',
-		);
-
-		$offset = 0;
-		$datalength = strlen($atom_data);
-		$parsed = array();
-		while ($offset < $datalength) {
-//echo getid3_lib::PrintHexBytes(substr($atom_data, $offset, 4)).'<br>';
-			$record_type       = getid3_lib::BigEndian2Int(substr($atom_data, $offset, 4));  $offset += 4;
-			$data_size_type    = getid3_lib::BigEndian2Int(substr($atom_data, $offset, 2));  $offset += 2;
-			$data_size         = getid3_lib::BigEndian2Int(substr($atom_data, $offset, 2));  $offset += 2;
-			switch ($data_size_type) {
-				case 0x0001: // 0x0001 = flag   (size field *= 1-byte)
-					$data = getid3_lib::BigEndian2Int(substr($atom_data, $offset, $data_size * 1));
-					$offset += ($data_size * 1);
-					break;
-				case 0x0002: // 0x0002 = char   (size field *= 1-byte)
-					$data = substr($atom_data, $offset, $data_size * 1);
-					$offset += ($data_size * 1);
-					$data = rtrim($data, "\x00");
-					break;
-				case 0x0003: // 0x0003 = DWORD+ (size field *= 2-byte), values are stored CDAB
-					$data = '';
-					for ($i = $data_size - 1; $i >= 0; $i--) {
-						$data .= substr($atom_data, $offset + ($i * 2), 2);
-					}
-					$data = getid3_lib::BigEndian2Int($data);
-					$offset += ($data_size * 2);
-					break;
-				case 0x0004: // 0x0004 = QWORD+ (size field *= 4-byte), values are stored EFGHABCD
-					$data = '';
-					for ($i = $data_size - 1; $i >= 0; $i--) {
-						$data .= substr($atom_data, $offset + ($i * 4), 4);
-					}
-					$data = getid3_lib::BigEndian2Int($data);
-					$offset += ($data_size * 4);
-					break;
-				case 0x0005: // 0x0005 = float  (size field *= 8-byte), values are stored aaaabbbb where value is aaaa/bbbb; possibly multiple sets of values appended together
-					$data = array();
-					for ($i = 0; $i < $data_size; $i++) {
-						$numerator    = getid3_lib::BigEndian2Int(substr($atom_data, $offset + ($i * 8) + 0, 4));
-						$denomninator = getid3_lib::BigEndian2Int(substr($atom_data, $offset + ($i * 8) + 4, 4));
-						if ($denomninator == 0) {
-							$data[$i] = false;
-						} else {
-							$data[$i] = (double) $numerator / $denomninator;
-						}
-					}
-					$offset += (8 * $data_size);
-					if (count($data) == 1) {
-						$data = $data[0];
-					}
-					break;
-				case 0x0007: // 0x0007 = bytes  (size field *= 1-byte), values are stored as ??????
-					$data = substr($atom_data, $offset, $data_size * 1);
-					$offset += ($data_size * 1);
-					break;
-				case 0x0008: // 0x0008 = ?????  (size field *= 2-byte), values are stored as ??????
-					$data = substr($atom_data, $offset, $data_size * 2);
-					$offset += ($data_size * 2);
-					break;
-				default:
-echo 'QuicktimeParseNikonNCTG()::unknown $data_size_type: '.$data_size_type.'<br>';
-					break 2;
-			}
-
-			switch ($record_type) {
-				case 0x00000011: // CreateDate
-				case 0x00000012: // DateTimeOriginal
-					$data = strtotime($data);
-					break;
-				case 0x0200001e: // ColorSpace
-					switch ($data) {
-						case 1:
-							$data = 'sRGB';
-							break;
-						case 2:
-							$data = 'Adobe RGB';
-							break;
-					}
-					break;
-				case 0x02000023: // PictureControlData
-					$PictureControlAdjust = array(0=>'default', 1=>'quick', 2=>'full');
-					$FilterEffect = array(0x80=>'off', 0x81=>'yellow', 0x82=>'orange',    0x83=>'red', 0x84=>'green',  0xff=>'n/a');
-					$ToningEffect = array(0x80=>'b&w', 0x81=>'sepia',  0x82=>'cyanotype', 0x83=>'red', 0x84=>'yellow', 0x85=>'green', 0x86=>'blue-green', 0x87=>'blue', 0x88=>'purple-blue', 0x89=>'red-purple', 0xff=>'n/a');
-					$data = array(
-						'PictureControlVersion'     =>                           substr($data,  0,  4),
-						'PictureControlName'        =>                     rtrim(substr($data,  4, 20), "\x00"),
-						'PictureControlBase'        =>                     rtrim(substr($data, 24, 20), "\x00"),
-						//'?'                       =>                           substr($data, 44,  4),
-						'PictureControlAdjust'      => $PictureControlAdjust[ord(substr($data, 48,  1))],
-						'PictureControlQuickAdjust' =>                       ord(substr($data, 49,  1)),
-						'Sharpness'                 =>                       ord(substr($data, 50,  1)),
-						'Contrast'                  =>                       ord(substr($data, 51,  1)),
-						'Brightness'                =>                       ord(substr($data, 52,  1)),
-						'Saturation'                =>                       ord(substr($data, 53,  1)),
-						'HueAdjustment'             =>                       ord(substr($data, 54,  1)),
-						'FilterEffect'              =>         $FilterEffect[ord(substr($data, 55,  1))],
-						'ToningEffect'              =>         $ToningEffect[ord(substr($data, 56,  1))],
-						'ToningSaturation'          =>                       ord(substr($data, 57,  1)),
-					);
-					break;
-				case 0x02000024: // WorldTime
-					// http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html#WorldTime
-					// timezone is stored as offset from GMT in minutes
-					$timezone = getid3_lib::BigEndian2Int(substr($data, 0, 2));
-					if ($timezone & 0x8000) {
-						$timezone = 0 - (0x10000 - $timezone);
-					}
-					$timezone /= 60;
-
-					$dst = (bool) getid3_lib::BigEndian2Int(substr($data, 2, 1));
-					switch (getid3_lib::BigEndian2Int(substr($data, 3, 1))) {
-						case 2:
-							$datedisplayformat = 'D/M/Y'; break;
-						case 1:
-							$datedisplayformat = 'M/D/Y'; break;
-						case 0:
-						default:
-							$datedisplayformat = 'Y/M/D'; break;
-					}
-
-					$data = array('timezone'=>floatval($timezone), 'dst'=>$dst, 'display'=>$datedisplayformat);
-					break;
-				case 0x02000083: // LensType
-					$data = array(
-						//'_'  => $data,
-						'mf' => (bool) ($data & 0x01),
-						'd'  => (bool) ($data & 0x02),
-						'g'  => (bool) ($data & 0x04),
-						'vr' => (bool) ($data & 0x08),
-					);
-					break;
-			}
-			$tag_name = (isset($NCTGtagName[$record_type]) ? $NCTGtagName[$record_type] : '0x'.str_pad(dechex($record_type), 8, '0', STR_PAD_LEFT));
-			$parsed[$tag_name] = $data;
-		}
-		return $parsed;
-	}
-
-
-	public function CopyToAppropriateCommentsSection($keyname, $data, $boxname='') {
-		static $handyatomtranslatorarray = array();
-		if (empty($handyatomtranslatorarray)) {
-			$handyatomtranslatorarray["\xA9".'cpy'] = 'copyright';
-			$handyatomtranslatorarray["\xA9".'day'] = 'creation_date';    // iTunes 4.0
-			$handyatomtranslatorarray["\xA9".'dir'] = 'director';
-			$handyatomtranslatorarray["\xA9".'ed1'] = 'edit1';
-			$handyatomtranslatorarray["\xA9".'ed2'] = 'edit2';
-			$handyatomtranslatorarray["\xA9".'ed3'] = 'edit3';
-			$handyatomtranslatorarray["\xA9".'ed4'] = 'edit4';
-			$handyatomtranslatorarray["\xA9".'ed5'] = 'edit5';
-			$handyatomtranslatorarray["\xA9".'ed6'] = 'edit6';
-			$handyatomtranslatorarray["\xA9".'ed7'] = 'edit7';
-			$handyatomtranslatorarray["\xA9".'ed8'] = 'edit8';
-			$handyatomtranslatorarray["\xA9".'ed9'] = 'edit9';
-			$handyatomtranslatorarray["\xA9".'fmt'] = 'format';
-			$handyatomtranslatorarray["\xA9".'inf'] = 'information';
-			$handyatomtranslatorarray["\xA9".'prd'] = 'producer';
-			$handyatomtranslatorarray["\xA9".'prf'] = 'performers';
-			$handyatomtranslatorarray["\xA9".'req'] = 'system_requirements';
-			$handyatomtranslatorarray["\xA9".'src'] = 'source_credit';
-			$handyatomtranslatorarray["\xA9".'wrt'] = 'writer';
-
-			// http://www.geocities.com/xhelmboyx/quicktime/formats/qtm-layout.txt
-			$handyatomtranslatorarray["\xA9".'nam'] = 'title';           // iTunes 4.0
-			$handyatomtranslatorarray["\xA9".'cmt'] = 'comment';         // iTunes 4.0
-			$handyatomtranslatorarray["\xA9".'wrn'] = 'warning';
-			$handyatomtranslatorarray["\xA9".'hst'] = 'host_computer';
-			$handyatomtranslatorarray["\xA9".'mak'] = 'make';
-			$handyatomtranslatorarray["\xA9".'mod'] = 'model';
-			$handyatomtranslatorarray["\xA9".'PRD'] = 'product';
-			$handyatomtranslatorarray["\xA9".'swr'] = 'software';
-			$handyatomtranslatorarray["\xA9".'aut'] = 'author';
-			$handyatomtranslatorarray["\xA9".'ART'] = 'artist';
-			$handyatomtranslatorarray["\xA9".'trk'] = 'track';
-			$handyatomtranslatorarray["\xA9".'alb'] = 'album';           // iTunes 4.0
-			$handyatomtranslatorarray["\xA9".'com'] = 'comment';
-			$handyatomtranslatorarray["\xA9".'gen'] = 'genre';           // iTunes 4.0
-			$handyatomtranslatorarray["\xA9".'ope'] = 'composer';
-			$handyatomtranslatorarray["\xA9".'url'] = 'url';
-			$handyatomtranslatorarray["\xA9".'enc'] = 'encoder';
-
-			// http://atomicparsley.sourceforge.net/mpeg-4files.html
-			$handyatomtranslatorarray["\xA9".'art'] = 'artist';           // iTunes 4.0
-			$handyatomtranslatorarray['aART'] = 'album_artist';
-			$handyatomtranslatorarray['trkn'] = 'track_number';     // iTunes 4.0
-			$handyatomtranslatorarray['disk'] = 'disc_number';      // iTunes 4.0
-			$handyatomtranslatorarray['gnre'] = 'genre';            // iTunes 4.0
-			$handyatomtranslatorarray["\xA9".'too'] = 'encoder';          // iTunes 4.0
-			$handyatomtranslatorarray['tmpo'] = 'bpm';              // iTunes 4.0
-			$handyatomtranslatorarray['cprt'] = 'copyright';        // iTunes 4.0?
-			$handyatomtranslatorarray['cpil'] = 'compilation';      // iTunes 4.0
-			$handyatomtranslatorarray['covr'] = 'picture';          // iTunes 4.0
-			$handyatomtranslatorarray['rtng'] = 'rating';           // iTunes 4.0
-			$handyatomtranslatorarray["\xA9".'grp'] = 'grouping';         // iTunes 4.2
-			$handyatomtranslatorarray['stik'] = 'stik';             // iTunes 4.9
-			$handyatomtranslatorarray['pcst'] = 'podcast';          // iTunes 4.9
-			$handyatomtranslatorarray['catg'] = 'category';         // iTunes 4.9
-			$handyatomtranslatorarray['keyw'] = 'keyword';          // iTunes 4.9
-			$handyatomtranslatorarray['purl'] = 'podcast_url';      // iTunes 4.9
-			$handyatomtranslatorarray['egid'] = 'episode_guid';     // iTunes 4.9
-			$handyatomtranslatorarray['desc'] = 'description';      // iTunes 5.0
-			$handyatomtranslatorarray["\xA9".'lyr'] = 'lyrics';           // iTunes 5.0
-			$handyatomtranslatorarray['tvnn'] = 'tv_network_name';  // iTunes 6.0
-			$handyatomtranslatorarray['tvsh'] = 'tv_show_name';     // iTunes 6.0
-			$handyatomtranslatorarray['tvsn'] = 'tv_season';        // iTunes 6.0
-			$handyatomtranslatorarray['tves'] = 'tv_episode';       // iTunes 6.0
-			$handyatomtranslatorarray['purd'] = 'purchase_date';    // iTunes 6.0.2
-			$handyatomtranslatorarray['pgap'] = 'gapless_playback'; // iTunes 7.0
-
-			// http://www.geocities.com/xhelmboyx/quicktime/formats/mp4-layout.txt
-
-
-
-			// boxnames:
-			/*
-			$handyatomtranslatorarray['iTunSMPB']                    = 'iTunSMPB';
-			$handyatomtranslatorarray['iTunNORM']                    = 'iTunNORM';
-			$handyatomtranslatorarray['Encoding Params']             = 'Encoding Params';
-			$handyatomtranslatorarray['replaygain_track_gain']       = 'replaygain_track_gain';
-			$handyatomtranslatorarray['replaygain_track_peak']       = 'replaygain_track_peak';
-			$handyatomtranslatorarray['replaygain_track_minmax']     = 'replaygain_track_minmax';
-			$handyatomtranslatorarray['MusicIP PUID']                = 'MusicIP PUID';
-			$handyatomtranslatorarray['MusicBrainz Artist Id']       = 'MusicBrainz Artist Id';
-			$handyatomtranslatorarray['MusicBrainz Album Id']        = 'MusicBrainz Album Id';
-			$handyatomtranslatorarray['MusicBrainz Album Artist Id'] = 'MusicBrainz Album Artist Id';
-			$handyatomtranslatorarray['MusicBrainz Track Id']        = 'MusicBrainz Track Id';
-			$handyatomtranslatorarray['MusicBrainz Disc Id']         = 'MusicBrainz Disc Id';
-
-			// http://age.hobba.nl/audio/tag_frame_reference.html
-			$handyatomtranslatorarray['PLAY_COUNTER']                = 'play_counter'; // Foobar2000 - http://www.getid3.org/phpBB3/viewtopic.php?t=1355
-			$handyatomtranslatorarray['MEDIATYPE']                   = 'mediatype';    // Foobar2000 - http://www.getid3.org/phpBB3/viewtopic.php?t=1355
-			*/
-		}
-		$info = &$this->getid3->info;
-		$comment_key = '';
-		if ($boxname && ($boxname != $keyname)) {
-			$comment_key = (isset($handyatomtranslatorarray[$boxname]) ? $handyatomtranslatorarray[$boxname] : $boxname);
-		} elseif (isset($handyatomtranslatorarray[$keyname])) {
-			$comment_key = $handyatomtranslatorarray[$keyname];
-		}
-		if ($comment_key) {
-			if ($comment_key == 'picture') {
-				if (!is_array($data)) {
-					$image_mime = '';
-					if (preg_match('#^\x89\x50\x4E\x47\x0D\x0A\x1A\x0A#', $data)) {
-						$image_mime = 'image/png';
-					} elseif (preg_match('#^\xFF\xD8\xFF#', $data)) {
-						$image_mime = 'image/jpeg';
-					} elseif (preg_match('#^GIF#', $data)) {
-						$image_mime = 'image/gif';
-					} elseif (preg_match('#^BM#', $data)) {
-						$image_mime = 'image/bmp';
-					}
-					$data = array('data'=>$data, 'image_mime'=>$image_mime);
-				}
-			}
-			$info['quicktime']['comments'][$comment_key][] = $data;
-		}
-		return true;
-	}
-
-	public function NoNullString($nullterminatedstring) {
-		// remove the single null terminator on null terminated strings
-		if (substr($nullterminatedstring, strlen($nullterminatedstring) - 1, 1) === "\x00") {
-			return substr($nullterminatedstring, 0, strlen($nullterminatedstring) - 1);
-		}
-		return $nullterminatedstring;
-	}
-
-	public function Pascal2String($pascalstring) {
-		// Pascal strings have 1 unsigned byte at the beginning saying how many chars (1-255) are in the string
-		return substr($pascalstring, 1);
-	}
-
-}
Index: www/wp-admin/profile.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/profile.php	(revision 38565)
+++ www/wp-admin/profile.php	(revision 38565)
@@ -1,18 +0,0 @@
-<?php
-/**
- * User Profile Administration Screen.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/**
- * This is a profile page.
- *
- * @since 2.5.0
- * @var bool
- */
-define('IS_PROFILE_PAGE', true);
-
-/** Load User Editing Page */
-require_once( dirname( __FILE__ ) . '/user-edit.php' );
Index: www/wp-includes/autoload/id3/ID3/license.commercial.txt
===================================================================
--- www/wp-includes/autoload/id3/ID3/license.commercial.txt	(revision UNDEFINED)
+++ www/wp-includes/autoload/id3/ID3/license.commercial.txt	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-                  getID3() Commercial License
-                  ===========================
-
-getID3() is licensed under the "GNU Public License" (GPL) and/or the
-"getID3() Commercial License" (gCL). This document describes the gCL.
-
----------------------------------------------------------------------
-
-The license is non-exclusively granted to a single person or company,
-per payment of the license fee, for the lifetime of that person or
-company. The license is non-transferrable.
-
-The gCL grants the licensee the right to use getID3() in commercial
-closed-source projects. Modifications may be made to getID3() with no
-obligation to release the modified source code. getID3() (or pieces
-thereof) may be included in any number of projects authored (in whole
-or in part) by the licensee.
-
-The licensee may use any version of getID3(), past, present or future,
-as is most convenient. This license does not entitle the licensee to
-receive any technical support, updates or bugfixes, except as such are
-made publicly available to all getID3() users.
-
-The licensee may not sub-license getID3() itself, meaning that any
-commercially released product containing all or parts of getID3() must
-have added functionality beyond what is available in getID3();
-getID3() itself may not be re-licensed by the licensee.
Index: www/wp-includes/widgets/class-wp-widget-categories.php
===================================================================
--- www/wp-includes/widgets/class-wp-widget-categories.php	(revision 38565)
+++ www/wp-includes/autoload/widgets/WP_Widget_Categories.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/compat.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/compat.php	(revision 38565)
+++ www/wp-includes/compat.php	(revision 38565)
@@ -1,580 +0,0 @@
-<?php
-/**
- * WordPress implementation for PHP functions either missing from older PHP versions or not included by default.
- *
- * @package PHP
- * @access private
- */
-
-// If gettext isn't available
-if ( !function_exists('_') ) {
-	function _($string) {
-		return $string;
-	}
-}
-
-/**
- * Returns whether PCRE/u (PCRE_UTF8 modifier) is available for use.
- *
- * @ignore
- * @since 4.2.2
- * @access private
- *
- * @staticvar string $utf8_pcre
- *
- * @param bool $set - Used for testing only
- *             null   : default - get PCRE/u capability
- *             false  : Used for testing - return false for future calls to this function
- *             'reset': Used for testing - restore default behavior of this function
- */
-function _wp_can_use_pcre_u( $set = null ) {
-	static $utf8_pcre = 'reset';
-
-	if ( null !== $set ) {
-		$utf8_pcre = $set;
-	}
-
-	if ( 'reset' === $utf8_pcre ) {
-		$utf8_pcre = @preg_match( '/^./u', 'a' );
-	}
-
-	return $utf8_pcre;
-}
-
-if ( ! function_exists( 'mb_substr' ) ) :
-	/**
-	 * Compat function to mimic mb_substr().
-	 *
-	 * @ignore
-	 * @since 3.2.0
-	 *
-	 * @see _mb_substr()
-	 *
-	 * @param string      $str      The string to extract the substring from.
-	 * @param int         $start    Position to being extraction from in `$str`.
-	 * @param int|null    $length   Optional. Maximum number of characters to extract from `$str`.
-	 *                              Default null.
-	 * @param string|null $encoding Optional. Character encoding to use. Default null.
-	 * @return string Extracted substring.
-	 */
-	function mb_substr( $str, $start, $length = null, $encoding = null ) {
-		return _mb_substr( $str, $start, $length, $encoding );
-	}
-endif;
-
-/**
- * Internal compat function to mimic mb_substr().
- *
- * Only understands UTF-8 and 8bit.  All other character sets will be treated as 8bit.
- * For $encoding === UTF-8, the $str input is expected to be a valid UTF-8 byte sequence.
- * The behavior of this function for invalid inputs is undefined.
- *
- * @ignore
- * @since 3.2.0
- *
- * @param string      $str      The string to extract the substring from.
- * @param int         $start    Position to being extraction from in `$str`.
- * @param int|null    $length   Optional. Maximum number of characters to extract from `$str`.
- *                              Default null.
- * @param string|null $encoding Optional. Character encoding to use. Default null.
- * @return string Extracted substring.
- */
-function _mb_substr( $str, $start, $length = null, $encoding = null ) {
-	if ( null === $encoding ) {
-		$encoding = get_option( 'blog_charset' );
-	}
-
-	/*
-	 * The solution below works only for UTF-8, so in case of a different
-	 * charset just use built-in substr().
-	 */
-	if ( ! in_array( $encoding, array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) ) {
-		return is_null( $length ) ? substr( $str, $start ) : substr( $str, $start, $length );
-	}
-
-	if ( _wp_can_use_pcre_u() ) {
-		// Use the regex unicode support to separate the UTF-8 characters into an array.
-		preg_match_all( '/./us', $str, $match );
-		$chars = is_null( $length ) ? array_slice( $match[0], $start ) : array_slice( $match[0], $start, $length );
-		return implode( '', $chars );
-	}
-
-	$regex = '/(
-		  [\x00-\x7F]                  # single-byte sequences   0xxxxxxx
-		| [\xC2-\xDF][\x80-\xBF]       # double-byte sequences   110xxxxx 10xxxxxx
-		| \xE0[\xA0-\xBF][\x80-\xBF]   # triple-byte sequences   1110xxxx 10xxxxxx * 2
-		| [\xE1-\xEC][\x80-\xBF]{2}
-		| \xED[\x80-\x9F][\x80-\xBF]
-		| [\xEE-\xEF][\x80-\xBF]{2}
-		| \xF0[\x90-\xBF][\x80-\xBF]{2} # four-byte sequences   11110xxx 10xxxxxx * 3
-		| [\xF1-\xF3][\x80-\xBF]{3}
-		| \xF4[\x80-\x8F][\x80-\xBF]{2}
-	)/x';
-
-	// Start with 1 element instead of 0 since the first thing we do is pop.
-	$chars = array( '' );
-	do {
-		// We had some string left over from the last round, but we counted it in that last round.
-		array_pop( $chars );
-
-		/*
-		 * Split by UTF-8 character, limit to 1000 characters (last array element will contain
-		 * the rest of the string).
-		 */
-		$pieces = preg_split( $regex, $str, 1000, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY );
-
-		$chars = array_merge( $chars, $pieces );
-
-	// If there's anything left over, repeat the loop.
-	} while ( count( $pieces ) > 1 && $str = array_pop( $pieces ) );
-
-	return join( '', array_slice( $chars, $start, $length ) );
-}
-
-if ( ! function_exists( 'mb_strlen' ) ) :
-	/**
-	 * Compat function to mimic mb_strlen().
-	 *
-	 * @ignore
-	 * @since 4.2.0
-	 *
-	 * @see _mb_strlen()
-	 *
-	 * @param string      $str      The string to retrieve the character length from.
-	 * @param string|null $encoding Optional. Character encoding to use. Default null.
-	 * @return int String length of `$str`.
-	 */
-	function mb_strlen( $str, $encoding = null ) {
-		return _mb_strlen( $str, $encoding );
-	}
-endif;
-
-/**
- * Internal compat function to mimic mb_strlen().
- *
- * Only understands UTF-8 and 8bit.  All other character sets will be treated as 8bit.
- * For $encoding === UTF-8, the `$str` input is expected to be a valid UTF-8 byte
- * sequence. The behavior of this function for invalid inputs is undefined.
- *
- * @ignore
- * @since 4.2.0
- *
- * @param string      $str      The string to retrieve the character length from.
- * @param string|null $encoding Optional. Character encoding to use. Default null.
- * @return int String length of `$str`.
- */
-function _mb_strlen( $str, $encoding = null ) {
-	if ( null === $encoding ) {
-		$encoding = get_option( 'blog_charset' );
-	}
-
-	/*
-	 * The solution below works only for UTF-8, so in case of a different charset
-	 * just use built-in strlen().
-	 */
-	if ( ! in_array( $encoding, array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) ) {
-		return strlen( $str );
-	}
-
-	if ( _wp_can_use_pcre_u() ) {
-		// Use the regex unicode support to separate the UTF-8 characters into an array.
-		preg_match_all( '/./us', $str, $match );
-		return count( $match[0] );
-	}
-
-	$regex = '/(?:
-		  [\x00-\x7F]                  # single-byte sequences   0xxxxxxx
-		| [\xC2-\xDF][\x80-\xBF]       # double-byte sequences   110xxxxx 10xxxxxx
-		| \xE0[\xA0-\xBF][\x80-\xBF]   # triple-byte sequences   1110xxxx 10xxxxxx * 2
-		| [\xE1-\xEC][\x80-\xBF]{2}
-		| \xED[\x80-\x9F][\x80-\xBF]
-		| [\xEE-\xEF][\x80-\xBF]{2}
-		| \xF0[\x90-\xBF][\x80-\xBF]{2} # four-byte sequences   11110xxx 10xxxxxx * 3
-		| [\xF1-\xF3][\x80-\xBF]{3}
-		| \xF4[\x80-\x8F][\x80-\xBF]{2}
-	)/x';
-
-	// Start at 1 instead of 0 since the first thing we do is decrement.
-	$count = 1;
-	do {
-		// We had some string left over from the last round, but we counted it in that last round.
-		$count--;
-
-		/*
-		 * Split by UTF-8 character, limit to 1000 characters (last array element will contain
-		 * the rest of the string).
-		 */
-		$pieces = preg_split( $regex, $str, 1000 );
-
-		// Increment.
-		$count += count( $pieces );
-
-	// If there's anything left over, repeat the loop.
-	} while ( $str = array_pop( $pieces ) );
-
-	// Fencepost: preg_split() always returns one extra item in the array.
-	return --$count;
-}
-
-if ( !function_exists('hash_hmac') ):
-/**
- * Compat function to mimic hash_hmac().
- *
- * @ignore
- * @since 3.2.0
- *
- * @see _hash_hmac()
- *
- * @param string $algo       Hash algorithm. Accepts 'md5' or 'sha1'.
- * @param string $data       Data to be hashed.
- * @param string $key        Secret key to use for generating the hash.
- * @param bool   $raw_output Optional. Whether to output raw binary data (true),
- *                           or lowercase hexits (false). Default false.
- * @return string|false The hash in output determined by `$raw_output`. False if `$algo`
- *                      is unknown or invalid.
- */
-function hash_hmac($algo, $data, $key, $raw_output = false) {
-	return _hash_hmac($algo, $data, $key, $raw_output);
-}
-endif;
-
-/**
- * Internal compat function to mimic hash_hmac().
- *
- * @ignore
- * @since 3.2.0
- *
- * @param string $algo       Hash algorithm. Accepts 'md5' or 'sha1'.
- * @param string $data       Data to be hashed.
- * @param string $key        Secret key to use for generating the hash.
- * @param bool   $raw_output Optional. Whether to output raw binary data (true),
- *                           or lowercase hexits (false). Default false.
- * @return string|false The hash in output determined by `$raw_output`. False if `$algo`
- *                      is unknown or invalid.
- */
-function _hash_hmac($algo, $data, $key, $raw_output = false) {
-	$packs = array('md5' => 'H32', 'sha1' => 'H40');
-
-	if ( !isset($packs[$algo]) )
-		return false;
-
-	$pack = $packs[$algo];
-
-	if (strlen($key) > 64)
-		$key = pack($pack, $algo($key));
-
-	$key = str_pad($key, 64, chr(0));
-
-	$ipad = (substr($key, 0, 64) ^ str_repeat(chr(0x36), 64));
-	$opad = (substr($key, 0, 64) ^ str_repeat(chr(0x5C), 64));
-
-	$hmac = $algo($opad . pack($pack, $algo($ipad . $data)));
-
-	if ( $raw_output )
-		return pack( $pack, $hmac );
-	return $hmac;
-}
-
-if ( !function_exists('json_encode') ) {
-	function json_encode( $string ) {
-		global $wp_json;
-
-		if ( ! ( $wp_json instanceof Services_JSON ) ) {
-			require_once( ABSPATH . WPINC . '/class-json.php' );
-			$wp_json = new Services_JSON();
-		}
-
-		return $wp_json->encodeUnsafe( $string );
-	}
-}
-
-if ( !function_exists('json_decode') ) {
-	/**
-	 * @global Services_JSON $wp_json
-	 * @param string $string
-	 * @param bool   $assoc_array
-	 * @return object|array
-	 */
-	function json_decode( $string, $assoc_array = false ) {
-		global $wp_json;
-
-		if ( ! ($wp_json instanceof Services_JSON ) ) {
-			require_once( ABSPATH . WPINC . '/class-json.php' );
-			$wp_json = new Services_JSON();
-		}
-
-		$res = $wp_json->decode( $string );
-		if ( $assoc_array )
-			$res = _json_decode_object_helper( $res );
-		return $res;
-	}
-
-	/**
-	 * @param object $data
-	 * @return array
-	 */
-	function _json_decode_object_helper($data) {
-		if ( is_object($data) )
-			$data = get_object_vars($data);
-		return is_array($data) ? array_map(__FUNCTION__, $data) : $data;
-	}
-}
-
-if ( ! function_exists( 'hash_equals' ) ) :
-/**
- * Timing attack safe string comparison
- *
- * Compares two strings using the same time whether they're equal or not.
- *
- * This function was added in PHP 5.6.
- *
- * Note: It can leak the length of a string when arguments of differing length are supplied.
- *
- * @since 3.9.2
- *
- * @param string $a Expected string.
- * @param string $b Actual, user supplied, string.
- * @return bool Whether strings are equal.
- */
-function hash_equals( $a, $b ) {
-	$a_length = strlen( $a );
-	if ( $a_length !== strlen( $b ) ) {
-		return false;
-	}
-	$result = 0;
-
-	// Do not attempt to "optimize" this.
-	for ( $i = 0; $i < $a_length; $i++ ) {
-		$result |= ord( $a[ $i ] ) ^ ord( $b[ $i ] );
-	}
-
-	return $result === 0;
-}
-endif;
-
-// JSON_PRETTY_PRINT was introduced in PHP 5.4
-// Defined here to prevent a notice when using it with wp_json_encode()
-if ( ! defined( 'JSON_PRETTY_PRINT' ) ) {
-	define( 'JSON_PRETTY_PRINT', 128 );
-}
-
-if ( ! function_exists( 'json_last_error_msg' ) ) :
-	/**
-	 * Retrieves the error string of the last json_encode() or json_decode() call.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @internal This is a compatibility function for PHP <5.5
-	 *
-	 * @return bool|string Returns the error message on success, "No Error" if no error has occurred,
-	 *                     or false on failure.
-	 */
-	function json_last_error_msg() {
-		// See https://core.trac.wordpress.org/ticket/27799.
-		if ( ! function_exists( 'json_last_error' ) ) {
-			return false;
-		}
-
-		$last_error_code = json_last_error();
-
-		// Just in case JSON_ERROR_NONE is not defined.
-		$error_code_none = defined( 'JSON_ERROR_NONE' ) ? JSON_ERROR_NONE : 0;
-
-		switch ( true ) {
-			case $last_error_code === $error_code_none:
-				return 'No error';
-
-			case defined( 'JSON_ERROR_DEPTH' ) && JSON_ERROR_DEPTH === $last_error_code:
-				return 'Maximum stack depth exceeded';
-
-			case defined( 'JSON_ERROR_STATE_MISMATCH' ) && JSON_ERROR_STATE_MISMATCH === $last_error_code:
-				return 'State mismatch (invalid or malformed JSON)';
-
-			case defined( 'JSON_ERROR_CTRL_CHAR' ) && JSON_ERROR_CTRL_CHAR === $last_error_code:
-				return 'Control character error, possibly incorrectly encoded';
-
-			case defined( 'JSON_ERROR_SYNTAX' ) && JSON_ERROR_SYNTAX === $last_error_code:
-				return 'Syntax error';
-
-			case defined( 'JSON_ERROR_UTF8' ) && JSON_ERROR_UTF8 === $last_error_code:
-				return 'Malformed UTF-8 characters, possibly incorrectly encoded';
-
-			case defined( 'JSON_ERROR_RECURSION' ) && JSON_ERROR_RECURSION === $last_error_code:
-				return 'Recursion detected';
-
-			case defined( 'JSON_ERROR_INF_OR_NAN' ) && JSON_ERROR_INF_OR_NAN === $last_error_code:
-				return 'Inf and NaN cannot be JSON encoded';
-
-			case defined( 'JSON_ERROR_UNSUPPORTED_TYPE' ) && JSON_ERROR_UNSUPPORTED_TYPE === $last_error_code:
-				return 'Type is not supported';
-
-			default:
-				return 'An unknown error occurred';
-		}
-	}
-endif;
-
-if ( ! interface_exists( 'JsonSerializable' ) ) {
-	define( 'WP_JSON_SERIALIZE_COMPATIBLE', true );
-	/**
-	 * JsonSerializable interface.
-	 *
-	 * Compatibility shim for PHP <5.4
-	 *
-	 * @link https://secure.php.net/jsonserializable
-	 *
-	 * @since 4.4.0
-	 */
-	interface JsonSerializable {
-		public function jsonSerialize();
-	}
-}
-
-// random_int was introduced in PHP 7.0
-if ( ! function_exists( 'random_int' ) ) {
-	require ABSPATH . WPINC . '/random_compat/random.php';
-}
-
-if ( ! function_exists( 'array_replace_recursive' ) ) :
-	/**
-	 * PHP-agnostic version of {@link array_replace_recursive()}.
-	 *
-	 * The array_replace_recursive() function is a PHP 5.3 function. WordPress
-	 * currently supports down to PHP 5.2, so this method is a workaround
-	 * for PHP 5.2.
-	 *
-	 * Note: array_replace_recursive() supports infinite arguments, but for our use-
-	 * case, we only need to support two arguments.
-	 *
-	 * Subject to removal once WordPress makes PHP 5.3.0 the minimum requirement.
-	 *
-	 * @since 4.5.3
-	 *
-	 * @see https://secure.php.net/manual/en/function.array-replace-recursive.php#109390
-	 *
-	 * @param  array $base         Array with keys needing to be replaced.
-	 * @param  array $replacements Array with the replaced keys.
-	 *
-	 * @return array
-	 */
-	function array_replace_recursive( $base = array(), $replacements = array() ) {
-		foreach ( array_slice( func_get_args(), 1 ) as $replacements ) {
-			$bref_stack = array( &$base );
-			$head_stack = array( $replacements );
-
-			do {
-				end( $bref_stack );
-
-				$bref = &$bref_stack[ key( $bref_stack ) ];
-				$head = array_pop( $head_stack );
-
-				unset( $bref_stack[ key( $bref_stack ) ] );
-
-				foreach ( array_keys( $head ) as $key ) {
-					if ( isset( $key, $bref ) &&
-					     isset( $bref[ $key ] ) && is_array( $bref[ $key ] ) &&
-					     isset( $head[ $key ] ) && is_array( $head[ $key ] )
-					) {
-						$bref_stack[] = &$bref[ $key ];
-						$head_stack[] = $head[ $key ];
-					} else {
-						$bref[ $key ] = $head[ $key ];
-					}
-				}
-			} while ( count( $head_stack ) );
-		}
-
-		return $base;
-	}
-endif;
-
-// SPL can be disabled on PHP 5.2
-if ( ! function_exists( 'spl_autoload_register' ) ):
-	$_wp_spl_autoloaders = array();
-
-	/**
-	 * Autoloader compatibility callback.
-	 *
-	 * @since 4.6.0
-	 *
-	 * @param string $classname Class to attempt autoloading.
-	 */
-	function __autoload( $classname ) {
-		global $_wp_spl_autoloaders;
-		foreach ( $_wp_spl_autoloaders as $autoloader ) {
-			if ( ! is_callable( $autoloader ) ) {
-				// Avoid the extra warning if the autoloader isn't callable.
-				continue;
-			}
-
-			call_user_func( $autoloader, $classname );
-
-			// If it has been autoloaded, stop processing.
-			if ( class_exists( $classname, false ) ) {
-				return;
-			}
-		}
-	}
-
-	/**
-	 * Registers a function to be autoloaded.
-	 *
-	 * @since 4.6.0
-	 *
-	 * @param callable $autoload_function The function to register.
-	 * @param bool     $throw             Optional. Whether the function should throw an exception
-	 *                                    if the function isn't callable. Default true.
-	 * @param bool     $prepend           Whether the function should be prepended to the stack.
-	 *                                    Default false.
-	 */
-	function spl_autoload_register( $autoload_function, $throw = true, $prepend = false ) {
-		if ( $throw && ! is_callable( $autoload_function ) ) {
-			// String not translated to match PHP core.
-			throw new Exception( 'Function not callable' );
-		}
-
-		global $_wp_spl_autoloaders;
-
-		// Don't allow multiple registration.
-		if ( in_array( $autoload_function, $_wp_spl_autoloaders ) ) {
-			return;
-		}
-
-		if ( $prepend ) {
-			array_unshift( $_wp_spl_autoloaders, $autoload_function );
-		} else {
-			$_wp_spl_autoloaders[] = $autoload_function;
-		}
-	}
-
-	/**
-	 * Unregisters an autoloader function.
-	 *
-	 * @since 4.6.0
-	 *
-	 * @param callable $function The function to unregister.
-	 * @return bool True if the function was unregistered, false if it could not be.
-	 */
-	function spl_autoload_unregister( $function ) {
-		global $_wp_spl_autoloaders;
-		foreach ( $_wp_spl_autoloaders as &$autoloader ) {
-			if ( $autoloader === $function ) {
-				unset( $autoloader );
-				return true;
-			}
-		}
-
-		return false;
-	}
-
-	/**
-	 * Retrieves the registered autoloader functions.
-	 *
-	 * @since 4.6.0
-	 *
-	 * @return array List of autoloader functions.
-	 */
-	function spl_autoload_functions() {
-		return $GLOBALS['_wp_spl_autoloaders'];
-	}
-endif;
Index: www/wp-includes/class-wp-customize-control.php
===================================================================
--- www/wp-includes/class-wp-customize-control.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Control.php	(revision )
@@ -598,54 +598,3 @@
 	protected function content_template() {}
 
 }
-
-/** WP_Customize_Color_Control class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-color-control.php' );
-
-/** WP_Customize_Media_Control class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-media-control.php' );
-
-/** WP_Customize_Upload_Control class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-upload-control.php' );
-
-/** WP_Customize_Image_Control class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-image-control.php' );
-
-/** WP_Customize_Background_Image_Control class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-background-image-control.php' );
-
-/** WP_Customize_Cropped_Image_Control class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-cropped-image-control.php' );
-
-/** WP_Customize_Site_Icon_Control class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-site-icon-control.php' );
-
-/** WP_Customize_Header_Image_Control class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-header-image-control.php' );
-
-/** WP_Customize_Theme_Control class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-theme-control.php' );
-
-/** WP_Widget_Area_Customize_Control class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-widget-area-customize-control.php' );
-
-/** WP_Widget_Form_Customize_Control class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-widget-form-customize-control.php' );
-
-/** WP_Customize_Nav_Menu_Control class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-control.php' );
-
-/** WP_Customize_Nav_Menu_Item_Control class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-item-control.php' );
-
-/** WP_Customize_Nav_Menu_Location_Control class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-location-control.php' );
-
-/** WP_Customize_Nav_Menu_Name_Control class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-name-control.php' );
-
-/** WP_Customize_Nav_Menu_Auto_Add_Control class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-auto-add-control.php' );
-
-/** WP_Customize_New_Menu_Control class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-new-menu-control.php' );
Index: www/wp-admin/options.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/options.php	(revision 38565)
+++ www/wp-admin/options.php	(revision 38565)
@@ -1,300 +0,0 @@
-<?php
-/**
- * Options Management Administration Screen.
- *
- * If accessed directly in a browser this page shows a list of all saved options
- * along with editable fields for their values. Serialized data is not supported
- * and there is no way to remove options via this page. It is not linked to from
- * anywhere else in the admin.
- *
- * This file is also the target of the forms in core and custom options pages
- * that use the Settings API. In this case it saves the new option values
- * and returns the user to their page of origin.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-$title = __('Settings');
-$this_file = 'options.php';
-$parent_file = 'options-general.php';
-
-wp_reset_vars(array('action', 'option_page'));
-
-$capability = 'manage_options';
-
-// This is for back compat and will eventually be removed.
-if ( empty($option_page) ) {
-	$option_page = 'options';
-} else {
-
-	/**
-	 * Filters the capability required when using the Settings API.
-	 *
-	 * By default, the options groups for all registered settings require the manage_options capability.
-	 * This filter is required to change the capability required for a certain options page.
-	 *
-	 * @since 3.2.0
-	 *
-	 * @param string $capability The capability used for the page, which is manage_options by default.
-	 */
-	$capability = apply_filters( "option_page_capability_{$option_page}", $capability );
-}
-
-if ( ! current_user_can( $capability ) ) {
-	wp_die(
-		'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-		'<p>' . __( 'Sorry, you are not allowed to manage these items.' ) . '</p>',
-		403
-	);
-}
-
-// Handle admin email change requests
-if ( is_multisite() ) {
-	if ( ! empty($_GET[ 'adminhash' ] ) ) {
-		$new_admin_details = get_option( 'adminhash' );
-		$redirect = 'options-general.php?updated=false';
-		if ( is_array( $new_admin_details ) && hash_equals( $new_admin_details[ 'hash' ], $_GET[ 'adminhash' ] ) && !empty($new_admin_details[ 'newemail' ]) ) {
-			update_option( 'admin_email', $new_admin_details[ 'newemail' ] );
-			delete_option( 'adminhash' );
-			delete_option( 'new_admin_email' );
-			$redirect = 'options-general.php?updated=true';
-		}
-		wp_redirect( admin_url( $redirect ) );
-		exit;
-	} elseif ( ! empty( $_GET['dismiss'] ) && 'new_admin_email' == $_GET['dismiss'] ) {
-		check_admin_referer( 'dismiss-' . get_current_blog_id() . '-new_admin_email' );
-		delete_option( 'adminhash' );
-		delete_option( 'new_admin_email' );
-		wp_redirect( admin_url( 'options-general.php?updated=true' ) );
-		exit;
-	}
-}
-
-if ( is_multisite() && ! is_super_admin() && 'update' != $action ) {
-	wp_die(
-		'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-		'<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>',
-		403
-	);
-}
-
-$whitelist_options = array(
-	'general' => array( 'blogname', 'blogdescription', 'gmt_offset', 'date_format', 'time_format', 'start_of_week', 'timezone_string', 'WPLANG' ),
-	'discussion' => array( 'default_pingback_flag', 'default_ping_status', 'default_comment_status', 'comments_notify', 'moderation_notify', 'comment_moderation', 'require_name_email', 'comment_whitelist', 'comment_max_links', 'moderation_keys', 'blacklist_keys', 'show_avatars', 'avatar_rating', 'avatar_default', 'close_comments_for_old_posts', 'close_comments_days_old', 'thread_comments', 'thread_comments_depth', 'page_comments', 'comments_per_page', 'default_comments_page', 'comment_order', 'comment_registration' ),
-	'media' => array( 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'large_size_w', 'large_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type' ),
-	'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'show_on_front', 'page_on_front', 'page_for_posts', 'blog_public' ),
-	'writing' => array( 'default_category', 'default_email_category', 'default_link_category', 'default_post_format' )
-);
-$whitelist_options['misc'] = $whitelist_options['options'] = $whitelist_options['privacy'] = array();
-
-$mail_options = array('mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass');
-
-if ( ! in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) )
-	$whitelist_options['reading'][] = 'blog_charset';
-
-if ( get_site_option( 'initial_db_version' ) < 32453 ) {
-	$whitelist_options['writing'][] = 'use_smilies';
-	$whitelist_options['writing'][] = 'use_balanceTags';
-}
-
-if ( !is_multisite() ) {
-	if ( !defined( 'WP_SITEURL' ) )
-		$whitelist_options['general'][] = 'siteurl';
-	if ( !defined( 'WP_HOME' ) )
-		$whitelist_options['general'][] = 'home';
-
-	$whitelist_options['general'][] = 'admin_email';
-	$whitelist_options['general'][] = 'users_can_register';
-	$whitelist_options['general'][] = 'default_role';
-
-	$whitelist_options['writing'] = array_merge($whitelist_options['writing'], $mail_options);
-	$whitelist_options['writing'][] = 'ping_sites';
-
-	$whitelist_options['media'][] = 'uploads_use_yearmonth_folders';
-
-	// If upload_url_path and upload_path are both default values, they're locked.
-	if ( get_option( 'upload_url_path' ) || ( get_option('upload_path') != 'wp-content/uploads' && get_option('upload_path') ) ) {
-		$whitelist_options['media'][] = 'upload_path';
-		$whitelist_options['media'][] = 'upload_url_path';
-	}
-} else {
-	$whitelist_options['general'][] = 'new_admin_email';
-
-	/**
-	 * Filters whether the post-by-email functionality is enabled.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param bool $enabled Whether post-by-email configuration is enabled. Default true.
-	 */
-	if ( apply_filters( 'enable_post_by_email_configuration', true ) )
-		$whitelist_options['writing'] = array_merge($whitelist_options['writing'], $mail_options);
-}
-
-/**
- * Filters the options white list.
- *
- * @since 2.7.0
- *
- * @param array White list options.
- */
-$whitelist_options = apply_filters( 'whitelist_options', $whitelist_options );
-
-/*
- * If $_GET['action'] == 'update' we are saving settings sent from a settings page
- */
-if ( 'update' == $action ) {
-	if ( 'options' == $option_page && !isset( $_POST['option_page'] ) ) { // This is for back compat and will eventually be removed.
-		$unregistered = true;
-		check_admin_referer( 'update-options' );
-	} else {
-		$unregistered = false;
-		check_admin_referer( $option_page . '-options' );
-	}
-
-	if ( !isset( $whitelist_options[ $option_page ] ) )
-		wp_die( __( '<strong>ERROR</strong>: options page not found.' ) );
-
-	if ( 'options' == $option_page ) {
-		if ( is_multisite() && ! is_super_admin() )
-			wp_die( __( 'Sorry, you are not allowed to modify unregistered settings for this site.' ) );
-		$options = explode( ',', wp_unslash( $_POST[ 'page_options' ] ) );
-	} else {
-		$options = $whitelist_options[ $option_page ];
-	}
-
-	if ( 'general' == $option_page ) {
-		// Handle custom date/time formats.
-		if ( !empty($_POST['date_format']) && isset($_POST['date_format_custom']) && '\c\u\s\t\o\m' == wp_unslash( $_POST['date_format'] ) )
-			$_POST['date_format'] = $_POST['date_format_custom'];
-		if ( !empty($_POST['time_format']) && isset($_POST['time_format_custom']) && '\c\u\s\t\o\m' == wp_unslash( $_POST['time_format'] ) )
-			$_POST['time_format'] = $_POST['time_format_custom'];
-		// Map UTC+- timezones to gmt_offsets and set timezone_string to empty.
-		if ( !empty($_POST['timezone_string']) && preg_match('/^UTC[+-]/', $_POST['timezone_string']) ) {
-			$_POST['gmt_offset'] = $_POST['timezone_string'];
-			$_POST['gmt_offset'] = preg_replace('/UTC\+?/', '', $_POST['gmt_offset']);
-			$_POST['timezone_string'] = '';
-		}
-
-		// Handle translation install.
-		if ( ! empty( $_POST['WPLANG'] ) && ( ! is_multisite() || is_super_admin() ) ) { // @todo: Skip if already installed
-			require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
-
-			if ( wp_can_install_language_pack() ) {
-				$language = wp_download_language_pack( $_POST['WPLANG'] );
-				if ( $language ) {
-					$_POST['WPLANG'] = $language;
-				}
-			}
-		}
-	}
-
-	if ( $options ) {
-		foreach ( $options as $option ) {
-			if ( $unregistered ) {
-				_deprecated_argument( 'options.php', '2.7.0',
-					sprintf(
-						/* translators: %s: the option/setting */
-						__( 'The %s setting is unregistered. Unregistered settings are deprecated. See https://codex.wordpress.org/Settings_API' ),
-						'<code>' . $option . '</code>'
-					)
-				);
-			}
-
-			$option = trim( $option );
-			$value = null;
-			if ( isset( $_POST[ $option ] ) ) {
-				$value = $_POST[ $option ];
-				if ( ! is_array( $value ) )
-					$value = trim( $value );
-				$value = wp_unslash( $value );
-			}
-			update_option( $option, $value );
-		}
-
-		// Switch translation in case WPLANG was changed.
-		$language = get_option( 'WPLANG' );
-		if ( $language ) {
-			load_default_textdomain( $language );
-		} else {
-			unload_textdomain( 'default' );
-		}
-	}
-
-	/**
-	 * Handle settings errors and return to options page
-	 */
-	// If no settings errors were registered add a general 'updated' message.
-	if ( !count( get_settings_errors() ) )
-		add_settings_error('general', 'settings_updated', __('Settings saved.'), 'updated');
-	set_transient('settings_errors', get_settings_errors(), 30);
-
-	/**
-	 * Redirect back to the settings page that was submitted
-	 */
-	$goback = add_query_arg( 'settings-updated', 'true',  wp_get_referer() );
-	wp_redirect( $goback );
-	exit;
-}
-
-include( ABSPATH . 'wp-admin/admin-header.php' ); ?>
-
-<div class="wrap">
-  <h1><?php esc_html_e( 'All Settings' ); ?></h1>
-  <form name="form" action="options.php" method="post" id="all-options">
-  <?php wp_nonce_field('options-options') ?>
-  <input type="hidden" name="action" value="update" />
-  <input type="hidden" name="option_page" value="options" />
-  <table class="form-table">
-<?php
-$options = $wpdb->get_results( "SELECT * FROM $wpdb->options ORDER BY option_name" );
-
-foreach ( (array) $options as $option ) :
-	$disabled = false;
-	if ( $option->option_name == '' )
-		continue;
-	if ( is_serialized( $option->option_value ) ) {
-		if ( is_serialized_string( $option->option_value ) ) {
-			// This is a serialized string, so we should display it.
-			$value = maybe_unserialize( $option->option_value );
-			$options_to_update[] = $option->option_name;
-			$class = 'all-options';
-		} else {
-			$value = 'SERIALIZED DATA';
-			$disabled = true;
-			$class = 'all-options disabled';
-		}
-	} else {
-		$value = $option->option_value;
-		$options_to_update[] = $option->option_name;
-		$class = 'all-options';
-	}
-	$name = esc_attr( $option->option_name );
-	?>
-<tr>
-	<th scope="row"><label for="<?php echo $name ?>"><?php echo esc_html( $option->option_name ); ?></label></th>
-<td>
-<?php if ( strpos( $value, "\n" ) !== false ) : ?>
-	<textarea class="<?php echo $class ?>" name="<?php echo $name ?>" id="<?php echo $name ?>" cols="30" rows="5"><?php
-		echo esc_textarea( $value );
-	?></textarea>
-	<?php else: ?>
-		<input class="regular-text <?php echo $class ?>" type="text" name="<?php echo $name ?>" id="<?php echo $name ?>" value="<?php echo esc_attr( $value ) ?>"<?php disabled( $disabled, true ) ?> />
-	<?php endif ?></td>
-</tr>
-<?php endforeach; ?>
-  </table>
-
-<input type="hidden" name="page_options" value="<?php echo esc_attr( implode( ',', $options_to_update ) ); ?>" />
-
-<?php submit_button( __( 'Save Changes' ), 'primary', 'Update' ); ?>
-
-  </form>
-</div>
-
-<?php
-include( ABSPATH . 'wp-admin/admin-footer.php' );
Index: www/wp-includes/autoload/simplepie/Net/IPv6.php
===================================================================
--- www/wp-includes/autoload/simplepie/Net/IPv6.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/simplepie/Net/IPv6.php	(revision UNDEFINED)
@@ -1,276 +0,0 @@
-<?php
-/**
- * SimplePie
- *
- * A PHP-Based RSS and Atom Feed Framework.
- * Takes the hard work out of managing a complete RSS/Atom solution.
- *
- * Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 	* Redistributions of source code must retain the above copyright notice, this list of
- * 	  conditions and the following disclaimer.
- *
- * 	* Redistributions in binary form must reproduce the above copyright notice, this list
- * 	  of conditions and the following disclaimer in the documentation and/or other materials
- * 	  provided with the distribution.
- *
- * 	* Neither the name of the SimplePie Team nor the names of its contributors may be used
- * 	  to endorse or promote products derived from this software without specific prior
- * 	  written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
- * AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * @package SimplePie
- * @version 1.3.1
- * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
- * @author Ryan Parman
- * @author Geoffrey Sneddon
- * @author Ryan McCue
- * @link http://simplepie.org/ SimplePie
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
- */
-
-
-/**
- * Class to validate and to work with IPv6 addresses.
- *
- * @package SimplePie
- * @subpackage HTTP
- * @copyright 2003-2005 The PHP Group
- * @license http://www.opensource.org/licenses/bsd-license.php
- * @link http://pear.php.net/package/Net_IPv6
- * @author Alexander Merz <alexander.merz@web.de>
- * @author elfrink at introweb dot nl
- * @author Josh Peck <jmp at joshpeck dot org>
- * @author Geoffrey Sneddon <geoffers@gmail.com>
- */
-class SimplePie_Net_IPv6
-{
-	/**
-	 * Uncompresses an IPv6 address
-	 *
-	 * RFC 4291 allows you to compress concecutive zero pieces in an address to
-	 * '::'. This method expects a valid IPv6 address and expands the '::' to
-	 * the required number of zero pieces.
-	 *
-	 * Example:  FF01::101   ->  FF01:0:0:0:0:0:0:101
-	 *           ::1         ->  0:0:0:0:0:0:0:1
-	 *
-	 * @author Alexander Merz <alexander.merz@web.de>
-	 * @author elfrink at introweb dot nl
-	 * @author Josh Peck <jmp at joshpeck dot org>
-	 * @copyright 2003-2005 The PHP Group
-	 * @license http://www.opensource.org/licenses/bsd-license.php
-	 * @param string $ip An IPv6 address
-	 * @return string The uncompressed IPv6 address
-	 */
-	public static function uncompress($ip)
-	{
-		$c1 = -1;
-		$c2 = -1;
-		if (substr_count($ip, '::') === 1)
-		{
-			list($ip1, $ip2) = explode('::', $ip);
-			if ($ip1 === '')
-			{
-				$c1 = -1;
-			}
-			else
-			{
-				$c1 = substr_count($ip1, ':');
-			}
-			if ($ip2 === '')
-			{
-				$c2 = -1;
-			}
-			else
-			{
-				$c2 = substr_count($ip2, ':');
-			}
-			if (strpos($ip2, '.') !== false)
-			{
-				$c2++;
-			}
-			// ::
-			if ($c1 === -1 && $c2 === -1)
-			{
-				$ip = '0:0:0:0:0:0:0:0';
-			}
-			// ::xxx
-			else if ($c1 === -1)
-			{
-				$fill = str_repeat('0:', 7 - $c2);
-				$ip = str_replace('::', $fill, $ip);
-			}
-			// xxx::
-			else if ($c2 === -1)
-			{
-				$fill = str_repeat(':0', 7 - $c1);
-				$ip = str_replace('::', $fill, $ip);
-			}
-			// xxx::xxx
-			else
-			{
-				$fill = ':' . str_repeat('0:', 6 - $c2 - $c1);
-				$ip = str_replace('::', $fill, $ip);
-			}
-		}
-		return $ip;
-	}
-
-	/**
-	 * Compresses an IPv6 address
-	 *
-	 * RFC 4291 allows you to compress concecutive zero pieces in an address to
-	 * '::'. This method expects a valid IPv6 address and compresses consecutive
-	 * zero pieces to '::'.
-	 *
-	 * Example:  FF01:0:0:0:0:0:0:101   ->  FF01::101
-	 *           0:0:0:0:0:0:0:1        ->  ::1
-	 *
-	 * @see uncompress()
-	 * @param string $ip An IPv6 address
-	 * @return string The compressed IPv6 address
-	 */
-	public static function compress($ip)
-	{
-		// Prepare the IP to be compressed
-		$ip = self::uncompress($ip);
-		$ip_parts = self::split_v6_v4($ip);
-
-		// Replace all leading zeros
-		$ip_parts[0] = preg_replace('/(^|:)0+([0-9])/', '\1\2', $ip_parts[0]);
-
-		// Find bunches of zeros
-		if (preg_match_all('/(?:^|:)(?:0(?::|$))+/', $ip_parts[0], $matches, PREG_OFFSET_CAPTURE))
-		{
-			$max = 0;
-			$pos = null;
-			foreach ($matches[0] as $match)
-			{
-				if (strlen($match[0]) > $max)
-				{
-					$max = strlen($match[0]);
-					$pos = $match[1];
-				}
-			}
-
-			$ip_parts[0] = substr_replace($ip_parts[0], '::', $pos, $max);
-		}
-
-		if ($ip_parts[1] !== '')
-		{
-			return implode(':', $ip_parts);
-		}
-		else
-		{
-			return $ip_parts[0];
-		}
-	}
-
-	/**
-	 * Splits an IPv6 address into the IPv6 and IPv4 representation parts
-	 *
-	 * RFC 4291 allows you to represent the last two parts of an IPv6 address
-	 * using the standard IPv4 representation
-	 *
-	 * Example:  0:0:0:0:0:0:13.1.68.3
-	 *           0:0:0:0:0:FFFF:129.144.52.38
-	 *
-	 * @param string $ip An IPv6 address
-	 * @return array [0] contains the IPv6 represented part, and [1] the IPv4 represented part
-	 */
-	private static function split_v6_v4($ip)
-	{
-		if (strpos($ip, '.') !== false)
-		{
-			$pos = strrpos($ip, ':');
-			$ipv6_part = substr($ip, 0, $pos);
-			$ipv4_part = substr($ip, $pos + 1);
-			return array($ipv6_part, $ipv4_part);
-		}
-		else
-		{
-			return array($ip, '');
-		}
-	}
-
-	/**
-	 * Checks an IPv6 address
-	 *
-	 * Checks if the given IP is a valid IPv6 address
-	 *
-	 * @param string $ip An IPv6 address
-	 * @return bool true if $ip is a valid IPv6 address
-	 */
-	public static function check_ipv6($ip)
-	{
-		$ip = self::uncompress($ip);
-		list($ipv6, $ipv4) = self::split_v6_v4($ip);
-		$ipv6 = explode(':', $ipv6);
-		$ipv4 = explode('.', $ipv4);
-		if (count($ipv6) === 8 && count($ipv4) === 1 || count($ipv6) === 6 && count($ipv4) === 4)
-		{
-			foreach ($ipv6 as $ipv6_part)
-			{
-				// The section can't be empty
-				if ($ipv6_part === '')
-					return false;
-
-				// Nor can it be over four characters
-				if (strlen($ipv6_part) > 4)
-					return false;
-
-				// Remove leading zeros (this is safe because of the above)
-				$ipv6_part = ltrim($ipv6_part, '0');
-				if ($ipv6_part === '')
-					$ipv6_part = '0';
-
-				// Check the value is valid
-				$value = hexdec($ipv6_part);
-				if (dechex($value) !== strtolower($ipv6_part) || $value < 0 || $value > 0xFFFF)
-					return false;
-			}
-			if (count($ipv4) === 4)
-			{
-				foreach ($ipv4 as $ipv4_part)
-				{
-					$value = (int) $ipv4_part;
-					if ((string) $value !== $ipv4_part || $value < 0 || $value > 0xFF)
-						return false;
-				}
-			}
-			return true;
-		}
-		else
-		{
-			return false;
-		}
-	}
-
-	/**
-	 * Checks if the given IP is a valid IPv6 address
-	 *
-	 * @codeCoverageIgnore
-	 * @deprecated Use {@see SimplePie_Net_IPv6::check_ipv6()} instead
-	 * @see check_ipv6
-	 * @param string $ip An IPv6 address
-	 * @return bool true if $ip is a valid IPv6 address
-	 */
-	public static function checkIPv6($ip)
-	{
-		return self::check_ipv6($ip);
-	}
-}
Index: www/wp-includes/random/Error.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/random/Error.php	(revision )
+++ www/wp-includes/random/Error.php	(revision )
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Random_* Compatibility Library 
+ * for using the new PHP 7 random_* API in PHP 5 projects
+ * 
+ * The MIT License (MIT)
+ * 
+ * Copyright (c) 2015 Paragon Initiative Enterprises
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+// We can't really avoid making this extend Exception in PHP 5.
+class Error extends Exception
+{
+
+}
+
Index: www/wp-includes/Requests/Transport/cURL.php
===================================================================
--- www/wp-includes/Requests/Transport/cURL.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Transport_cURL.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/Requests/Exception/HTTP/429.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/429.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_429.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/pomo/POMO_CachedFileReader.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/pomo/POMO_CachedFileReader.php	(revision )
+++ www/wp-includes/autoload/pomo/POMO_CachedFileReader.php	(revision )
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Classes, which help reading streams of data from files.
+ * Based on the classes from Danilo Segan <danilo@kvota.net>
+ *
+ * @version $Id: streams.php 1157 2015-11-20 04:30:11Z dd32 $
+ * @package pomo
+ * @subpackage streams
+ */
+
+/**
+ * Reads the contents of the file in the beginning.
+ */
+class POMO_CachedFileReader extends POMO_StringReader {
+	/**
+	 * PHP5 constructor.
+	 */
+	function __construct( $filename ) {
+		parent::POMO_StringReader();
+		$this->_str = file_get_contents($filename);
+		if (false === $this->_str)
+			return false;
+		$this->_pos = 0;
+	}
+
+	/**
+	 * PHP4 constructor.
+	 */
+	public function POMO_CachedFileReader( $filename ) {
+		self::__construct( $filename );
+	}
+}
+
Index: www/wp-includes/post-template.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/post-template.php	(revision 38565)
+++ www/wp-includes/post-template.php	(revision 38565)
@@ -1,1796 +0,0 @@
-<?php
-/**
- * WordPress Post Template Functions.
- *
- * Gets content for the current post in the loop.
- *
- * @package WordPress
- * @subpackage Template
- */
-
-/**
- * Display the ID of the current item in the WordPress Loop.
- *
- * @since 0.71
- */
-function the_ID() {
-	echo get_the_ID();
-}
-
-/**
- * Retrieve the ID of the current item in the WordPress Loop.
- *
- * @since 2.1.0
- *
- * @return int|false The ID of the current item in the WordPress Loop. False if $post is not set.
- */
-function get_the_ID() {
-	$post = get_post();
-	return ! empty( $post ) ? $post->ID : false;
-}
-
-/**
- * Display or retrieve the current post title with optional markup.
- *
- * @since 0.71
- *
- * @param string $before Optional. Markup to prepend to the title. Default empty.
- * @param string $after  Optional. Markup to append to the title. Default empty.
- * @param bool   $echo   Optional. Whether to echo or return the title. Default true for echo.
- * @return string|void Current post title if $echo is false.
- */
-function the_title( $before = '', $after = '', $echo = true ) {
-	$title = get_the_title();
-
-	if ( strlen($title) == 0 )
-		return;
-
-	$title = $before . $title . $after;
-
-	if ( $echo )
-		echo $title;
-	else
-		return $title;
-}
-
-/**
- * Sanitize the current title when retrieving or displaying.
- *
- * Works like the_title(), except the parameters can be in a string or
- * an array. See the function for what can be override in the $args parameter.
- *
- * The title before it is displayed will have the tags stripped and esc_attr()
- * before it is passed to the user or displayed. The default as with the_title(),
- * is to display the title.
- *
- * @since 2.3.0
- *
- * @param string|array $args {
- *     Title attribute arguments. Optional.
- *
- *     @type string  $before Markup to prepend to the title. Default empty.
- *     @type string  $after  Markup to append to the title. Default empty.
- *     @type bool    $echo   Whether to echo or return the title. Default true for echo.
- *     @type WP_Post $post   Current post object to retrieve the title for.
- * }
- * @return string|void String when echo is false.
- */
-function the_title_attribute( $args = '' ) {
-	$defaults = array( 'before' => '', 'after' =>  '', 'echo' => true, 'post' => get_post() );
-	$r = wp_parse_args( $args, $defaults );
-
-	$title = get_the_title( $r['post'] );
-
-	if ( strlen( $title ) == 0 ) {
-		return;
-	}
-
-	$title = $r['before'] . $title . $r['after'];
-	$title = esc_attr( strip_tags( $title ) );
-
-	if ( $r['echo'] ) {
-		echo $title;
-	} else {
-		return $title;
-	}
-}
-
-/**
- * Retrieve post title.
- *
- * If the post is protected and the visitor is not an admin, then "Protected"
- * will be displayed before the post title. If the post is private, then
- * "Private" will be located before the post title.
- *
- * @since 0.71
- *
- * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
- * @return string
- */
-function get_the_title( $post = 0 ) {
-	$post = get_post( $post );
-
-	$title = isset( $post->post_title ) ? $post->post_title : '';
-	$id = isset( $post->ID ) ? $post->ID : 0;
-
-	if ( ! is_admin() ) {
-		if ( ! empty( $post->post_password ) ) {
-
-			/**
-			 * Filters the text prepended to the post title for protected posts.
-			 *
-			 * The filter is only applied on the front end.
-			 *
-			 * @since 2.8.0
-			 *
-			 * @param string  $prepend Text displayed before the post title.
-			 *                         Default 'Protected: %s'.
-			 * @param WP_Post $post    Current post object.
-			 */
-			$protected_title_format = apply_filters( 'protected_title_format', __( 'Protected: %s' ), $post );
-			$title = sprintf( $protected_title_format, $title );
-		} elseif ( isset( $post->post_status ) && 'private' == $post->post_status ) {
-
-			/**
-			 * Filters the text prepended to the post title of private posts.
-			 *
-			 * The filter is only applied on the front end.
-			 *
-			 * @since 2.8.0
-			 *
-			 * @param string  $prepend Text displayed before the post title.
-			 *                         Default 'Private: %s'.
-			 * @param WP_Post $post    Current post object.
-			 */
-			$private_title_format = apply_filters( 'private_title_format', __( 'Private: %s' ), $post );
-			$title = sprintf( $private_title_format, $title );
-		}
-	}
-
-	/**
-	 * Filters the post title.
-	 *
-	 * @since 0.71
-	 *
-	 * @param string $title The post title.
-	 * @param int    $id    The post ID.
-	 */
-	return apply_filters( 'the_title', $title, $id );
-}
-
-/**
- * Display the Post Global Unique Identifier (guid).
- *
- * The guid will appear to be a link, but should not be used as a link to the
- * post. The reason you should not use it as a link, is because of moving the
- * blog across domains.
- *
- * URL is escaped to make it XML-safe.
- *
- * @since 1.5.0
- *
- * @param int|WP_Post $post Optional. Post ID or post object. Default is global $post.
- */
-function the_guid( $post = 0 ) {
-	$post = get_post( $post );
-
-	$guid = isset( $post->guid ) ? get_the_guid( $post ) : '';
-	$id   = isset( $post->ID ) ? $post->ID : 0;
-
-	/**
-	 * Filters the escaped Global Unique Identifier (guid) of the post.
-	 *
-	 * @since 4.2.0
-	 *
-	 * @see get_the_guid()
-	 *
-	 * @param string $guid Escaped Global Unique Identifier (guid) of the post.
-	 * @param int    $id   The post ID.
-	 */
-	echo apply_filters( 'the_guid', $guid, $id );
-}
-
-/**
- * Retrieve the Post Global Unique Identifier (guid).
- *
- * The guid will appear to be a link, but should not be used as an link to the
- * post. The reason you should not use it as a link, is because of moving the
- * blog across domains.
- *
- * @since 1.5.0
- *
- * @param int|WP_Post $post Optional. Post ID or post object. Default is global $post.
- * @return string
- */
-function get_the_guid( $post = 0 ) {
-	$post = get_post( $post );
-
-	$guid = isset( $post->guid ) ? $post->guid : '';
-	$id   = isset( $post->ID ) ? $post->ID : 0;
-
-	/**
-	 * Filters the Global Unique Identifier (guid) of the post.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $guid Global Unique Identifier (guid) of the post.
-	 * @param int    $id   The post ID.
-	 */
-	return apply_filters( 'get_the_guid', $guid, $id );
-}
-
-/**
- * Display the post content.
- *
- * @since 0.71
- *
- * @param string $more_link_text Optional. Content for when there is more text.
- * @param bool   $strip_teaser   Optional. Strip teaser content before the more text. Default is false.
- */
-function the_content( $more_link_text = null, $strip_teaser = false) {
-	$content = get_the_content( $more_link_text, $strip_teaser );
-
-	/**
-	 * Filters the post content.
-	 *
-	 * @since 0.71
-	 *
-	 * @param string $content Content of the current post.
-	 */
-	$content = apply_filters( 'the_content', $content );
-	$content = str_replace( ']]>', ']]&gt;', $content );
-	echo $content;
-}
-
-/**
- * Retrieve the post content.
- *
- * @since 0.71
- *
- * @global int   $page
- * @global int   $more
- * @global bool  $preview
- * @global array $pages
- * @global int   $multipage
- *
- * @param string $more_link_text Optional. Content for when there is more text.
- * @param bool   $strip_teaser   Optional. Strip teaser content before the more text. Default is false.
- * @return string
- */
-function get_the_content( $more_link_text = null, $strip_teaser = false ) {
-	global $page, $more, $preview, $pages, $multipage;
-
-	$post = get_post();
-
-	if ( null === $more_link_text ) {
-		$more_link_text = sprintf(
-			'<span aria-label="%1$s">%2$s</span>',
-			sprintf(
-				/* translators: %s: Name of current post */
-				__( 'Continue reading %s' ),
-				the_title_attribute( array( 'echo' => false ) )
-			),
-			__( '(more&hellip;)' )
-		);
-	}
-
-	$output = '';
-	$has_teaser = false;
-
-	// If post password required and it doesn't match the cookie.
-	if ( post_password_required( $post ) )
-		return get_the_password_form( $post );
-
-	if ( $page > count( $pages ) ) // if the requested page doesn't exist
-		$page = count( $pages ); // give them the highest numbered page that DOES exist
-
-	$content = $pages[$page - 1];
-	if ( preg_match( '/<!--more(.*?)?-->/', $content, $matches ) ) {
-		$content = explode( $matches[0], $content, 2 );
-		if ( ! empty( $matches[1] ) && ! empty( $more_link_text ) )
-			$more_link_text = strip_tags( wp_kses_no_null( trim( $matches[1] ) ) );
-
-		$has_teaser = true;
-	} else {
-		$content = array( $content );
-	}
-
-	if ( false !== strpos( $post->post_content, '<!--noteaser-->' ) && ( ! $multipage || $page == 1 ) )
-		$strip_teaser = true;
-
-	$teaser = $content[0];
-
-	if ( $more && $strip_teaser && $has_teaser )
-		$teaser = '';
-
-	$output .= $teaser;
-
-	if ( count( $content ) > 1 ) {
-		if ( $more ) {
-			$output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
-		} else {
-			if ( ! empty( $more_link_text ) )
-
-				/**
-				 * Filters the Read More link text.
-				 *
-				 * @since 2.8.0
-				 *
-				 * @param string $more_link_element Read More link element.
-				 * @param string $more_link_text    Read More text.
-				 */
-				$output .= apply_filters( 'the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">$more_link_text</a>", $more_link_text );
-			$output = force_balance_tags( $output );
-		}
-	}
-
-	if ( $preview ) // Preview fix for JavaScript bug with foreign languages.
-		$output =	preg_replace_callback( '/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output );
-
-	return $output;
-}
-
-/**
- * Preview fix for JavaScript bug with foreign languages.
- *
- * @since 3.1.0
- * @access private
- *
- * @param array $match Match array from preg_replace_callback.
- * @return string
- */
-function _convert_urlencoded_to_entities( $match ) {
-	return '&#' . base_convert( $match[1], 16, 10 ) . ';';
-}
-
-/**
- * Display the post excerpt.
- *
- * @since 0.71
- */
-function the_excerpt() {
-
-	/**
-	 * Filters the displayed post excerpt.
-	 *
-	 * @since 0.71
-	 *
-	 * @see get_the_excerpt()
-	 *
-	 * @param string $post_excerpt The post excerpt.
-	 */
-	echo apply_filters( 'the_excerpt', get_the_excerpt() );
-}
-
-/**
- * Retrieves the post excerpt.
- *
- * @since 0.71
- * @since 4.5.0 Introduced the `$post` parameter.
- *
- * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
- * @return string Post excerpt.
- */
-function get_the_excerpt( $post = null ) {
-	if ( is_bool( $post ) ) {
-		_deprecated_argument( __FUNCTION__, '2.3.0' );
-	}
-
-	$post = get_post( $post );
-	if ( empty( $post ) ) {
-		return '';
-	}
-
-	if ( post_password_required( $post ) ) {
-		return __( 'There is no excerpt because this is a protected post.' );
-	}
-
-	/**
-	 * Filters the retrieved post excerpt.
-	 *
-	 * @since 1.2.0
-	 * @since 4.5.0 Introduced the `$post` parameter.
-	 *
-	 * @param string $post_excerpt The post excerpt.
-	 * @param WP_Post $post Post object.
-	 */
-	return apply_filters( 'get_the_excerpt', $post->post_excerpt, $post );
-}
-
-/**
- * Whether post has excerpt.
- *
- * @since 2.3.0
- *
- * @param int|WP_Post $id Optional. Post ID or post object.
- * @return bool
- */
-function has_excerpt( $id = 0 ) {
-	$post = get_post( $id );
-	return ( !empty( $post->post_excerpt ) );
-}
-
-/**
- * Display the classes for the post div.
- *
- * @since 2.7.0
- *
- * @param string|array $class   One or more classes to add to the class list.
- * @param int|WP_Post  $post_id Optional. Post ID or post object. Defaults to the global `$post`.
- */
-function post_class( $class = '', $post_id = null ) {
-	// Separates classes with a single space, collates classes for post DIV
-	echo 'class="' . join( ' ', get_post_class( $class, $post_id ) ) . '"';
-}
-
-/**
- * Retrieves the classes for the post div as an array.
- *
- * The class names are many. If the post is a sticky, then the 'sticky'
- * class name. The class 'hentry' is always added to each post. If the post has a
- * post thumbnail, 'has-post-thumbnail' is added as a class. For each taxonomy that
- * the post belongs to, a class will be added of the format '{$taxonomy}-{$slug}' -
- * eg 'category-foo' or 'my_custom_taxonomy-bar'.
- *
- * The 'post_tag' taxonomy is a special
- * case; the class has the 'tag-' prefix instead of 'post_tag-'. All classes are
- * passed through the filter, {@see 'post_class'}, with the list of classes, followed by
- * $class parameter value, with the post ID as the last parameter.
- *
- * @since 2.7.0
- * @since 4.2.0 Custom taxonomy classes were added.
- *
- * @param string|array $class   One or more classes to add to the class list.
- * @param int|WP_Post  $post_id Optional. Post ID or post object.
- * @return array Array of classes.
- */
-function get_post_class( $class = '', $post_id = null ) {
-	$post = get_post( $post_id );
-
-	$classes = array();
-
-	if ( $class ) {
-		if ( ! is_array( $class ) ) {
-			$class = preg_split( '#\s+#', $class );
-		}
-		$classes = array_map( 'esc_attr', $class );
-	} else {
-		// Ensure that we always coerce class to being an array.
-		$class = array();
-	}
-
-	if ( ! $post ) {
-		return $classes;
-	}
-
-	$classes[] = 'post-' . $post->ID;
-	if ( ! is_admin() )
-		$classes[] = $post->post_type;
-	$classes[] = 'type-' . $post->post_type;
-	$classes[] = 'status-' . $post->post_status;
-
-	// Post Format
-	if ( post_type_supports( $post->post_type, 'post-formats' ) ) {
-		$post_format = get_post_format( $post->ID );
-
-		if ( $post_format && !is_wp_error($post_format) )
-			$classes[] = 'format-' . sanitize_html_class( $post_format );
-		else
-			$classes[] = 'format-standard';
-	}
-
-	$post_password_required = post_password_required( $post->ID );
-
-	// Post requires password.
-	if ( $post_password_required ) {
-		$classes[] = 'post-password-required';
-	} elseif ( ! empty( $post->post_password ) ) {
-		$classes[] = 'post-password-protected';
-	}
-
-	// Post thumbnails.
-	if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail( $post->ID ) && ! is_attachment( $post ) && ! $post_password_required ) {
-		$classes[] = 'has-post-thumbnail';
-	}
-
-	// sticky for Sticky Posts
-	if ( is_sticky( $post->ID ) ) {
-		if ( is_home() && ! is_paged() ) {
-			$classes[] = 'sticky';
-		} elseif ( is_admin() ) {
-			$classes[] = 'status-sticky';
-		}
-	}
-
-	// hentry for hAtom compliance
-	$classes[] = 'hentry';
-
-	// All public taxonomies
-	$taxonomies = get_taxonomies( array( 'public' => true ) );
-	foreach ( (array) $taxonomies as $taxonomy ) {
-		if ( is_object_in_taxonomy( $post->post_type, $taxonomy ) ) {
-			foreach ( (array) get_the_terms( $post->ID, $taxonomy ) as $term ) {
-				if ( empty( $term->slug ) ) {
-					continue;
-				}
-
-				$term_class = sanitize_html_class( $term->slug, $term->term_id );
-				if ( is_numeric( $term_class ) || ! trim( $term_class, '-' ) ) {
-					$term_class = $term->term_id;
-				}
-
-				// 'post_tag' uses the 'tag' prefix for backward compatibility.
-				if ( 'post_tag' == $taxonomy ) {
-					$classes[] = 'tag-' . $term_class;
-				} else {
-					$classes[] = sanitize_html_class( $taxonomy . '-' . $term_class, $taxonomy . '-' . $term->term_id );
-				}
-			}
-		}
-	}
-
-	$classes = array_map( 'esc_attr', $classes );
-
-	/**
-	 * Filters the list of CSS classes for the current post.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param array $classes An array of post classes.
-	 * @param array $class   An array of additional classes added to the post.
-	 * @param int   $post_id The post ID.
-	 */
-	$classes = apply_filters( 'post_class', $classes, $class, $post->ID );
-
-	return array_unique( $classes );
-}
-
-/**
- * Display the classes for the body element.
- *
- * @since 2.8.0
- *
- * @param string|array $class One or more classes to add to the class list.
- */
-function body_class( $class = '' ) {
-	// Separates classes with a single space, collates classes for body element
-	echo 'class="' . join( ' ', get_body_class( $class ) ) . '"';
-}
-
-/**
- * Retrieve the classes for the body element as an array.
- *
- * @since 2.8.0
- *
- * @global WP_Query $wp_query
- *
- * @param string|array $class One or more classes to add to the class list.
- * @return array Array of classes.
- */
-function get_body_class( $class = '' ) {
-	global $wp_query;
-
-	$classes = array();
-
-	if ( is_rtl() )
-		$classes[] = 'rtl';
-
-	if ( is_front_page() )
-		$classes[] = 'home';
-	if ( is_home() )
-		$classes[] = 'blog';
-	if ( is_archive() )
-		$classes[] = 'archive';
-	if ( is_date() )
-		$classes[] = 'date';
-	if ( is_search() ) {
-		$classes[] = 'search';
-		$classes[] = $wp_query->posts ? 'search-results' : 'search-no-results';
-	}
-	if ( is_paged() )
-		$classes[] = 'paged';
-	if ( is_attachment() )
-		$classes[] = 'attachment';
-	if ( is_404() )
-		$classes[] = 'error404';
-
-	if ( is_single() ) {
-		$post_id = $wp_query->get_queried_object_id();
-		$post = $wp_query->get_queried_object();
-
-		$classes[] = 'single';
-		if ( isset( $post->post_type ) ) {
-			$classes[] = 'single-' . sanitize_html_class($post->post_type, $post_id);
-			$classes[] = 'postid-' . $post_id;
-
-			// Post Format
-			if ( post_type_supports( $post->post_type, 'post-formats' ) ) {
-				$post_format = get_post_format( $post->ID );
-
-				if ( $post_format && !is_wp_error($post_format) )
-					$classes[] = 'single-format-' . sanitize_html_class( $post_format );
-				else
-					$classes[] = 'single-format-standard';
-			}
-		}
-
-		if ( is_attachment() ) {
-			$mime_type = get_post_mime_type($post_id);
-			$mime_prefix = array( 'application/', 'image/', 'text/', 'audio/', 'video/', 'music/' );
-			$classes[] = 'attachmentid-' . $post_id;
-			$classes[] = 'attachment-' . str_replace( $mime_prefix, '', $mime_type );
-		}
-	} elseif ( is_archive() ) {
-		if ( is_post_type_archive() ) {
-			$classes[] = 'post-type-archive';
-			$post_type = get_query_var( 'post_type' );
-			if ( is_array( $post_type ) )
-				$post_type = reset( $post_type );
-			$classes[] = 'post-type-archive-' . sanitize_html_class( $post_type );
-		} elseif ( is_author() ) {
-			$author = $wp_query->get_queried_object();
-			$classes[] = 'author';
-			if ( isset( $author->user_nicename ) ) {
-				$classes[] = 'author-' . sanitize_html_class( $author->user_nicename, $author->ID );
-				$classes[] = 'author-' . $author->ID;
-			}
-		} elseif ( is_category() ) {
-			$cat = $wp_query->get_queried_object();
-			$classes[] = 'category';
-			if ( isset( $cat->term_id ) ) {
-				$cat_class = sanitize_html_class( $cat->slug, $cat->term_id );
-				if ( is_numeric( $cat_class ) || ! trim( $cat_class, '-' ) ) {
-					$cat_class = $cat->term_id;
-				}
-
-				$classes[] = 'category-' . $cat_class;
-				$classes[] = 'category-' . $cat->term_id;
-			}
-		} elseif ( is_tag() ) {
-			$tag = $wp_query->get_queried_object();
-			$classes[] = 'tag';
-			if ( isset( $tag->term_id ) ) {
-				$tag_class = sanitize_html_class( $tag->slug, $tag->term_id );
-				if ( is_numeric( $tag_class ) || ! trim( $tag_class, '-' ) ) {
-					$tag_class = $tag->term_id;
-				}
-
-				$classes[] = 'tag-' . $tag_class;
-				$classes[] = 'tag-' . $tag->term_id;
-			}
-		} elseif ( is_tax() ) {
-			$term = $wp_query->get_queried_object();
-			if ( isset( $term->term_id ) ) {
-				$term_class = sanitize_html_class( $term->slug, $term->term_id );
-				if ( is_numeric( $term_class ) || ! trim( $term_class, '-' ) ) {
-					$term_class = $term->term_id;
-				}
-
-				$classes[] = 'tax-' . sanitize_html_class( $term->taxonomy );
-				$classes[] = 'term-' . $term_class;
-				$classes[] = 'term-' . $term->term_id;
-			}
-		}
-	} elseif ( is_page() ) {
-		$classes[] = 'page';
-
-		$page_id = $wp_query->get_queried_object_id();
-
-		$post = get_post($page_id);
-
-		$classes[] = 'page-id-' . $page_id;
-
-		if ( get_pages( array( 'parent' => $page_id, 'number' => 1 ) ) ) {
-			$classes[] = 'page-parent';
-		}
-
-		if ( $post->post_parent ) {
-			$classes[] = 'page-child';
-			$classes[] = 'parent-pageid-' . $post->post_parent;
-		}
-		if ( is_page_template() ) {
-			$classes[] = 'page-template';
-
-			$template_slug  = get_page_template_slug( $page_id );
-			$template_parts = explode( '/', $template_slug );
-
-			foreach ( $template_parts as $part ) {
-				$classes[] = 'page-template-' . sanitize_html_class( str_replace( array( '.', '/' ), '-', basename( $part, '.php' ) ) );
-			}
-			$classes[] = 'page-template-' . sanitize_html_class( str_replace( '.', '-', $template_slug ) );
-		} else {
-			$classes[] = 'page-template-default';
-		}
-	}
-
-	if ( is_user_logged_in() )
-		$classes[] = 'logged-in';
-
-	if ( is_admin_bar_showing() ) {
-		$classes[] = 'admin-bar';
-		$classes[] = 'no-customize-support';
-	}
-
-	if ( get_background_color() !== get_theme_support( 'custom-background', 'default-color' ) || get_background_image() )
-		$classes[] = 'custom-background';
-
-	if ( has_custom_logo() ) {
-		$classes[] = 'wp-custom-logo';
-	}
-
-	$page = $wp_query->get( 'page' );
-
-	if ( ! $page || $page < 2 )
-		$page = $wp_query->get( 'paged' );
-
-	if ( $page && $page > 1 && ! is_404() ) {
-		$classes[] = 'paged-' . $page;
-
-		if ( is_single() )
-			$classes[] = 'single-paged-' . $page;
-		elseif ( is_page() )
-			$classes[] = 'page-paged-' . $page;
-		elseif ( is_category() )
-			$classes[] = 'category-paged-' . $page;
-		elseif ( is_tag() )
-			$classes[] = 'tag-paged-' . $page;
-		elseif ( is_date() )
-			$classes[] = 'date-paged-' . $page;
-		elseif ( is_author() )
-			$classes[] = 'author-paged-' . $page;
-		elseif ( is_search() )
-			$classes[] = 'search-paged-' . $page;
-		elseif ( is_post_type_archive() )
-			$classes[] = 'post-type-paged-' . $page;
-	}
-
-	if ( ! empty( $class ) ) {
-		if ( !is_array( $class ) )
-			$class = preg_split( '#\s+#', $class );
-		$classes = array_merge( $classes, $class );
-	} else {
-		// Ensure that we always coerce class to being an array.
-		$class = array();
-	}
-
-	$classes = array_map( 'esc_attr', $classes );
-
-	/**
-	 * Filters the list of CSS body classes for the current post or page.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param array $classes An array of body classes.
-	 * @param array $class   An array of additional classes added to the body.
-	 */
-	$classes = apply_filters( 'body_class', $classes, $class );
-
-	return array_unique( $classes );
-}
-
-/**
- * Whether post requires password and correct password has been provided.
- *
- * @since 2.7.0
- *
- * @param int|WP_Post|null $post An optional post. Global $post used if not provided.
- * @return bool false if a password is not required or the correct password cookie is present, true otherwise.
- */
-function post_password_required( $post = null ) {
-	$post = get_post($post);
-
-	if ( empty( $post->post_password ) ) {
-		/** This filter is documented in wp-includes/post.php */
-		return apply_filters( 'post_password_required', false, $post );
-	}
-
-	if ( ! isset( $_COOKIE[ 'wp-postpass_' . COOKIEHASH ] ) ) {
-		/** This filter is documented in wp-includes/post.php */
-		return apply_filters( 'post_password_required', true, $post );
-	}
-
-	$hasher = new PasswordHash( 8, true );
-
-	$hash = wp_unslash( $_COOKIE[ 'wp-postpass_' . COOKIEHASH ] );
-	if ( 0 !== strpos( $hash, '$P$B' ) ) {
-		$required = true;
-	} else {
-		$required = ! $hasher->CheckPassword( $post->post_password, $hash );
-	}
-
-	/**
-	 * Filters whether a post requires the user to supply a password.
-	 *
-	 * @since 4.7.0
-	 *
-	 * @param bool    $required Whether the user needs to supply a password. True if password has not been
-	 *                          provided or is incorrect, false if password has been supplied or is not required.
-	 * @param WP_Post $post     Post data.
-	 */
-	return apply_filters( 'post_password_required', $required, $post );
-}
-
-//
-// Page Template Functions for usage in Themes
-//
-
-/**
- * The formatted output of a list of pages.
- *
- * Displays page links for paginated posts (i.e. includes the <!--nextpage-->.
- * Quicktag one or more times). This tag must be within The Loop.
- *
- * @since 1.2.0
- *
- * @global int $page
- * @global int $numpages
- * @global int $multipage
- * @global int $more
- *
- * @param string|array $args {
- *     Optional. Array or string of default arguments.
- *
- *     @type string       $before           HTML or text to prepend to each link. Default is `<p> Pages:`.
- *     @type string       $after            HTML or text to append to each link. Default is `</p>`.
- *     @type string       $link_before      HTML or text to prepend to each link, inside the `<a>` tag.
- *                                          Also prepended to the current item, which is not linked. Default empty.
- *     @type string       $link_after       HTML or text to append to each Pages link inside the `<a>` tag.
- *                                          Also appended to the current item, which is not linked. Default empty.
- *     @type string       $next_or_number   Indicates whether page numbers should be used. Valid values are number
- *                                          and next. Default is 'number'.
- *     @type string       $separator        Text between pagination links. Default is ' '.
- *     @type string       $nextpagelink     Link text for the next page link, if available. Default is 'Next Page'.
- *     @type string       $previouspagelink Link text for the previous page link, if available. Default is 'Previous Page'.
- *     @type string       $pagelink         Format string for page numbers. The % in the parameter string will be
- *                                          replaced with the page number, so 'Page %' generates "Page 1", "Page 2", etc.
- *                                          Defaults to '%', just the page number.
- *     @type int|bool     $echo             Whether to echo or not. Accepts 1|true or 0|false. Default 1|true.
- * }
- * @return string Formatted output in HTML.
- */
-function wp_link_pages( $args = '' ) {
-	global $page, $numpages, $multipage, $more;
-
-	$defaults = array(
-		'before'           => '<p>' . __( 'Pages:' ),
-		'after'            => '</p>',
-		'link_before'      => '',
-		'link_after'       => '',
-		'next_or_number'   => 'number',
-		'separator'        => ' ',
-		'nextpagelink'     => __( 'Next page' ),
-		'previouspagelink' => __( 'Previous page' ),
-		'pagelink'         => '%',
-		'echo'             => 1
-	);
-
-	$params = wp_parse_args( $args, $defaults );
-
-	/**
-	 * Filters the arguments used in retrieving page links for paginated posts.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param array $params An array of arguments for page links for paginated posts.
-	 */
-	$r = apply_filters( 'wp_link_pages_args', $params );
-
-	$output = '';
-	if ( $multipage ) {
-		if ( 'number' == $r['next_or_number'] ) {
-			$output .= $r['before'];
-			for ( $i = 1; $i <= $numpages; $i++ ) {
-				$link = $r['link_before'] . str_replace( '%', $i, $r['pagelink'] ) . $r['link_after'];
-				if ( $i != $page || ! $more && 1 == $page ) {
-					$link = _wp_link_page( $i ) . $link . '</a>';
-				}
-				/**
-				 * Filters the HTML output of individual page number links.
-				 *
-				 * @since 3.6.0
-				 *
-				 * @param string $link The page number HTML output.
-				 * @param int    $i    Page number for paginated posts' page links.
-				 */
-				$link = apply_filters( 'wp_link_pages_link', $link, $i );
-
-				// Use the custom links separator beginning with the second link.
-				$output .= ( 1 === $i ) ? ' ' : $r['separator'];
-				$output .= $link;
-			}
-			$output .= $r['after'];
-		} elseif ( $more ) {
-			$output .= $r['before'];
-			$prev = $page - 1;
-			if ( $prev > 0 ) {
-				$link = _wp_link_page( $prev ) . $r['link_before'] . $r['previouspagelink'] . $r['link_after'] . '</a>';
-
-				/** This filter is documented in wp-includes/post-template.php */
-				$output .= apply_filters( 'wp_link_pages_link', $link, $prev );
-			}
-			$next = $page + 1;
-			if ( $next <= $numpages ) {
-				if ( $prev ) {
-					$output .= $r['separator'];
-				}
-				$link = _wp_link_page( $next ) . $r['link_before'] . $r['nextpagelink'] . $r['link_after'] . '</a>';
-
-				/** This filter is documented in wp-includes/post-template.php */
-				$output .= apply_filters( 'wp_link_pages_link', $link, $next );
-			}
-			$output .= $r['after'];
-		}
-	}
-
-	/**
-	 * Filters the HTML output of page links for paginated posts.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param string $output HTML output of paginated posts' page links.
-	 * @param array  $args   An array of arguments.
-	 */
-	$html = apply_filters( 'wp_link_pages', $output, $args );
-
-	if ( $r['echo'] ) {
-		echo $html;
-	}
-	return $html;
-}
-
-/**
- * Helper function for wp_link_pages().
- *
- * @since 3.1.0
- * @access private
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param int $i Page number.
- * @return string Link.
- */
-function _wp_link_page( $i ) {
-	global $wp_rewrite;
-	$post = get_post();
-	$query_args = array();
-
-	if ( 1 == $i ) {
-		$url = get_permalink();
-	} else {
-		if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) )
-			$url = add_query_arg( 'page', $i, get_permalink() );
-		elseif ( 'page' == get_option('show_on_front') && get_option('page_on_front') == $post->ID )
-			$url = trailingslashit(get_permalink()) . user_trailingslashit("$wp_rewrite->pagination_base/" . $i, 'single_paged');
-		else
-			$url = trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged');
-	}
-
-	if ( is_preview() ) {
-
-		if ( ( 'draft' !== $post->post_status ) && isset( $_GET['preview_id'], $_GET['preview_nonce'] ) ) {
-			$query_args['preview_id'] = wp_unslash( $_GET['preview_id'] );
-			$query_args['preview_nonce'] = wp_unslash( $_GET['preview_nonce'] );
-		}
-
-		$url = get_preview_post_link( $post, $query_args, $url );
-	}
-
-	return '<a href="' . esc_url( $url ) . '">';
-}
-
-//
-// Post-meta: Custom per-post fields.
-//
-
-/**
- * Retrieve post custom meta data field.
- *
- * @since 1.5.0
- *
- * @param string $key Meta data key name.
- * @return false|string|array Array of values or single value, if only one element exists. False will be returned if key does not exist.
- */
-function post_custom( $key = '' ) {
-	$custom = get_post_custom();
-
-	if ( !isset( $custom[$key] ) )
-		return false;
-	elseif ( 1 == count($custom[$key]) )
-		return $custom[$key][0];
-	else
-		return $custom[$key];
-}
-
-/**
- * Display list of post custom fields.
- *
- * @since 1.2.0
- *
- * @internal This will probably change at some point...
- *
- */
-function the_meta() {
-	if ( $keys = get_post_custom_keys() ) {
-		echo "<ul class='post-meta'>\n";
-		foreach ( (array) $keys as $key ) {
-			$keyt = trim($key);
-			if ( is_protected_meta( $keyt, 'post' ) )
-				continue;
-			$values = array_map('trim', get_post_custom_values($key));
-			$value = implode($values,', ');
-
-			/**
-			 * Filters the HTML output of the li element in the post custom fields list.
-			 *
-			 * @since 2.2.0
-			 *
-			 * @param string $html  The HTML output for the li element.
-			 * @param string $key   Meta key.
-			 * @param string $value Meta value.
-			 */
-			echo apply_filters( 'the_meta_key', "<li><span class='post-meta-key'>$key:</span> $value</li>\n", $key, $value );
-		}
-		echo "</ul>\n";
-	}
-}
-
-//
-// Pages
-//
-
-/**
- * Retrieve or display list of pages as a dropdown (select list).
- *
- * @since 2.1.0
- * @since 4.2.0 The `$value_field` argument was added.
- * @since 4.3.0 The `$class` argument was added.
- *
- * @param array|string $args {
- *     Optional. Array or string of arguments to generate a pages drop-down element.
- *
- *     @type int          $depth                 Maximum depth. Default 0.
- *     @type int          $child_of              Page ID to retrieve child pages of. Default 0.
- *     @type int|string   $selected              Value of the option that should be selected. Default 0.
- *     @type bool|int     $echo                  Whether to echo or return the generated markup. Accepts 0, 1,
- *                                               or their bool equivalents. Default 1.
- *     @type string       $name                  Value for the 'name' attribute of the select element.
- *                                               Default 'page_id'.
- *     @type string       $id                    Value for the 'id' attribute of the select element.
- *     @type string       $class                 Value for the 'class' attribute of the select element. Default: none.
- *                                               Defaults to the value of `$name`.
- *     @type string       $show_option_none      Text to display for showing no pages. Default empty (does not display).
- *     @type string       $show_option_no_change Text to display for "no change" option. Default empty (does not display).
- *     @type string       $option_none_value     Value to use when no page is selected. Default empty.
- *     @type string       $value_field           Post field used to populate the 'value' attribute of the option
- *                                               elements. Accepts any valid post field. Default 'ID'.
- * }
- * @return string HTML content, if not displaying.
- */
-function wp_dropdown_pages( $args = '' ) {
-	$defaults = array(
-		'depth' => 0, 'child_of' => 0,
-		'selected' => 0, 'echo' => 1,
-		'name' => 'page_id', 'id' => '',
-		'class' => '',
-		'show_option_none' => '', 'show_option_no_change' => '',
-		'option_none_value' => '',
-		'value_field' => 'ID',
-	);
-
-	$r = wp_parse_args( $args, $defaults );
-
-	$pages = get_pages( $r );
-	$output = '';
-	// Back-compat with old system where both id and name were based on $name argument
-	if ( empty( $r['id'] ) ) {
-		$r['id'] = $r['name'];
-	}
-
-	if ( ! empty( $pages ) ) {
-		$class = '';
-		if ( ! empty( $r['class'] ) ) {
-			$class = " class='" . esc_attr( $r['class'] ) . "'";
-		}
-
-		$output = "<select name='" . esc_attr( $r['name'] ) . "'" . $class . " id='" . esc_attr( $r['id'] ) . "'>\n";
-		if ( $r['show_option_no_change'] ) {
-			$output .= "\t<option value=\"-1\">" . $r['show_option_no_change'] . "</option>\n";
-		}
-		if ( $r['show_option_none'] ) {
-			$output .= "\t<option value=\"" . esc_attr( $r['option_none_value'] ) . '">' . $r['show_option_none'] . "</option>\n";
-		}
-		$output .= walk_page_dropdown_tree( $pages, $r['depth'], $r );
-		$output .= "</select>\n";
-	}
-
-	/**
-	 * Filters the HTML output of a list of pages as a drop down.
-	 *
-	 * @since 2.1.0
-	 * @since 4.4.0 `$r` and `$pages` added as arguments.
-	 *
-	 * @param string $output HTML output for drop down list of pages.
-	 * @param array  $r      The parsed arguments array.
-	 * @param array  $pages  List of WP_Post objects returned by `get_pages()`
- 	 */
-	$html = apply_filters( 'wp_dropdown_pages', $output, $r, $pages );
-
-	if ( $r['echo'] ) {
-		echo $html;
-	}
-	return $html;
-}
-
-/**
- * Retrieve or display list of pages in list (li) format.
- *
- * @since 1.5.0
- * @since 4.7.0 Added the `item_spacing` argument.
- *
- * @see get_pages()
- *
- * @global WP_Query $wp_query
- *
- * @param array|string $args {
- *     Array or string of arguments. Optional.
- *
- *     @type int    $child_of     Display only the sub-pages of a single page by ID. Default 0 (all pages).
- *     @type string $authors      Comma-separated list of author IDs. Default empty (all authors).
- *     @type string $date_format  PHP date format to use for the listed pages. Relies on the 'show_date' parameter.
- *                                Default is the value of 'date_format' option.
- *     @type int    $depth        Number of levels in the hierarchy of pages to include in the generated list.
- *                                Accepts -1 (any depth), 0 (all pages), 1 (top-level pages only), and n (pages to
- *                                the given n depth). Default 0.
- *     @type bool   $echo         Whether or not to echo the list of pages. Default true.
- *     @type string $exclude      Comma-separated list of page IDs to exclude. Default empty.
- *     @type array  $include      Comma-separated list of page IDs to include. Default empty.
- *     @type string $link_after   Text or HTML to follow the page link label. Default null.
- *     @type string $link_before  Text or HTML to precede the page link label. Default null.
- *     @type string $post_type    Post type to query for. Default 'page'.
- *     @type string $post_status  Comma-separated list of post statuses to include. Default 'publish'.
- *     @type string $show_date	  Whether to display the page publish or modified date for each page. Accepts
- *                                'modified' or any other value. An empty value hides the date. Default empty.
- *     @type string $sort_column  Comma-separated list of column names to sort the pages by. Accepts 'post_author',
- *                                'post_date', 'post_title', 'post_name', 'post_modified', 'post_modified_gmt',
- *                                'menu_order', 'post_parent', 'ID', 'rand', or 'comment_count'. Default 'post_title'.
- *     @type string $title_li     List heading. Passing a null or empty value will result in no heading, and the list
- *                                will not be wrapped with unordered list `<ul>` tags. Default 'Pages'.
- *     @type string $item_spacing Whether to preserve whitespace within the menu's HTML. Accepts 'preserve' or 'discard'. Default 'preserve'.
- *     @type Walker $walker       Walker instance to use for listing pages. Default empty (Walker_Page).
- * }
- * @return string|void HTML list of pages.
- */
-function wp_list_pages( $args = '' ) {
-	$defaults = array(
-		'depth' => 0, 'show_date' => '',
-		'date_format' => get_option( 'date_format' ),
-		'child_of' => 0, 'exclude' => '',
-		'title_li' => __( 'Pages' ), 'echo' => 1,
-		'authors' => '', 'sort_column' => 'menu_order, post_title',
-		'link_before' => '', 'link_after' => '', 'item_spacing' => 'preserve', 'walker' => '',
-	);
-
-	$r = wp_parse_args( $args, $defaults );
-
-	if ( ! in_array( $r['item_spacing'], array( 'preserve', 'discard' ), true ) ) {
-		// invalid value, fall back to default.
-		$r['item_spacing'] = $defaults['item_spacing'];
-	}
-
-	$output = '';
-	$current_page = 0;
-
-	// sanitize, mostly to keep spaces out
-	$r['exclude'] = preg_replace( '/[^0-9,]/', '', $r['exclude'] );
-
-	// Allow plugins to filter an array of excluded pages (but don't put a nullstring into the array)
-	$exclude_array = ( $r['exclude'] ) ? explode( ',', $r['exclude'] ) : array();
-
-	/**
-	 * Filters the array of pages to exclude from the pages list.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param array $exclude_array An array of page IDs to exclude.
-	 */
-	$r['exclude'] = implode( ',', apply_filters( 'wp_list_pages_excludes', $exclude_array ) );
-
-	// Query pages.
-	$r['hierarchical'] = 0;
-	$pages = get_pages( $r );
-
-	if ( ! empty( $pages ) ) {
-		if ( $r['title_li'] ) {
-			$output .= '<li class="pagenav">' . $r['title_li'] . '<ul>';
-		}
-		global $wp_query;
-		if ( is_page() || is_attachment() || $wp_query->is_posts_page ) {
-			$current_page = get_queried_object_id();
-		} elseif ( is_singular() ) {
-			$queried_object = get_queried_object();
-			if ( is_post_type_hierarchical( $queried_object->post_type ) ) {
-				$current_page = $queried_object->ID;
-			}
-		}
-
-		$output .= walk_page_tree( $pages, $r['depth'], $current_page, $r );
-
-		if ( $r['title_li'] ) {
-			$output .= '</ul></li>';
-		}
-	}
-
-	/**
-	 * Filters the HTML output of the pages to list.
-	 *
-	 * @since 1.5.1
-	 * @since 4.4.0 `$pages` added as arguments.
-	 *
-	 * @see wp_list_pages()
-	 *
-	 * @param string $output HTML output of the pages list.
-	 * @param array  $r      An array of page-listing arguments.
-	 * @param array  $pages  List of WP_Post objects returned by `get_pages()`
-	 */
-	$html = apply_filters( 'wp_list_pages', $output, $r, $pages );
-
-	if ( $r['echo'] ) {
-		echo $html;
-	} else {
-		return $html;
-	}
-}
-
-/**
- * Displays or retrieves a list of pages with an optional home link.
- *
- * The arguments are listed below and part of the arguments are for wp_list_pages()} function.
- * Check that function for more info on those arguments.
- *
- * @since 2.7.0
- * @since 4.4.0 Added `menu_id`, `container`, `before`, `after`, and `walker` arguments.
- * @since 4.7.0 Added the `item_spacing` argument.
- *
- * @param array|string $args {
- *     Optional. Arguments to generate a page menu. See wp_list_pages() for additional arguments.
- *
- *     @type string          $sort_column  How to short the list of pages. Accepts post column names.
- *                                         Default 'menu_order, post_title'.
- *     @type string          $menu_id      ID for the div containing the page list. Default is empty string.
- *     @type string          $menu_class   Class to use for the element containing the page list. Default 'menu'.
- *     @type string          $container    Element to use for the element containing the page list. Default 'div'.
- *     @type bool            $echo         Whether to echo the list or return it. Accepts true (echo) or false (return).
- *                                         Default true.
- *     @type int|bool|string $show_home    Whether to display the link to the home page. Can just enter the text
- *                                         you'd like shown for the home link. 1|true defaults to 'Home'.
- *     @type string          $link_before  The HTML or text to prepend to $show_home text. Default empty.
- *     @type string          $link_after   The HTML or text to append to $show_home text. Default empty.
- *     @type string          $before       The HTML or text to prepend to the menu. Default is '<ul>'.
- *     @type string          $after        The HTML or text to append to the menu. Default is '</ul>'.
- *     @type string          $item_spacing Whether to preserve whitespace within the menu's HTML. Accepts 'preserve' or 'discard'. Default 'discard'.
- *     @type Walker          $walker       Walker instance to use for listing pages. Default empty (Walker_Page).
- * }
- * @return string|void HTML menu
- */
-function wp_page_menu( $args = array() ) {
-	$defaults = array(
-		'sort_column'  => 'menu_order, post_title',
-		'menu_id'      => '',
-		'menu_class'   => 'menu',
-		'container'    => 'div',
-		'echo'         => true,
-		'link_before'  => '',
-		'link_after'   => '',
-		'before'       => '<ul>',
-		'after'        => '</ul>',
-		'item_spacing' => 'discard',
-		'walker'       => '',
-	);
-	$args = wp_parse_args( $args, $defaults );
-
-	if ( ! in_array( $args['item_spacing'], array( 'preserve', 'discard' ) ) ) {
-		// invalid value, fall back to default.
-		$args['item_spacing'] = $defaults['item_spacing'];
-	}
-
-	if ( 'preserve' === $args['item_spacing'] ) {
-		$t = "\t";
-		$n = "\n";
-	} else {
-		$t = '';
-		$n = '';
-	}
-
-	/**
-	 * Filters the arguments used to generate a page-based menu.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @see wp_page_menu()
-	 *
-	 * @param array $args An array of page menu arguments.
-	 */
-	$args = apply_filters( 'wp_page_menu_args', $args );
-
-	$menu = '';
-
-	$list_args = $args;
-
-	// Show Home in the menu
-	if ( ! empty($args['show_home']) ) {
-		if ( true === $args['show_home'] || '1' === $args['show_home'] || 1 === $args['show_home'] )
-			$text = __('Home');
-		else
-			$text = $args['show_home'];
-		$class = '';
-		if ( is_front_page() && !is_paged() )
-			$class = 'class="current_page_item"';
-		$menu .= '<li ' . $class . '><a href="' . home_url( '/' ) . '">' . $args['link_before'] . $text . $args['link_after'] . '</a></li>';
-		// If the front page is a page, add it to the exclude list
-		if (get_option('show_on_front') == 'page') {
-			if ( !empty( $list_args['exclude'] ) ) {
-				$list_args['exclude'] .= ',';
-			} else {
-				$list_args['exclude'] = '';
-			}
-			$list_args['exclude'] .= get_option('page_on_front');
-		}
-	}
-
-	$list_args['echo'] = false;
-	$list_args['title_li'] = '';
-	$menu .= wp_list_pages( $list_args );
-
-	$container = sanitize_text_field( $args['container'] );
-
-	// Fallback in case `wp_nav_menu()` was called without a container.
-	if ( empty( $container ) ) {
-		$container = 'div';
-	}
-
-	if ( $menu ) {
-
-		// wp_nav_menu doesn't set before and after
-		if ( isset( $args['fallback_cb'] ) &&
-			'wp_page_menu' === $args['fallback_cb'] &&
-			'ul' !== $container ) {
-			$args['before'] = "<ul>{$n}";
-			$args['after'] = '</ul>';
-		}
-
-		$menu = $args['before'] . $menu . $args['after'];
-	}
-
-	$attrs = '';
-	if ( ! empty( $args['menu_id'] ) ) {
-		$attrs .= ' id="' . esc_attr( $args['menu_id'] ) . '"';
-	}
-
-	if ( ! empty( $args['menu_class'] ) ) {
-		$attrs .= ' class="' . esc_attr( $args['menu_class'] ) . '"';
-	}
-
-	$menu = "<{$container}{$attrs}>" . $menu . "</{$container}>{$n}";
-
-	/**
-	 * Filters the HTML output of a page-based menu.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @see wp_page_menu()
-	 *
-	 * @param string $menu The HTML output.
-	 * @param array  $args An array of arguments.
-	 */
-	$menu = apply_filters( 'wp_page_menu', $menu, $args );
-	if ( $args['echo'] )
-		echo $menu;
-	else
-		return $menu;
-}
-
-//
-// Page helpers
-//
-
-/**
- * Retrieve HTML list content for page list.
- *
- * @uses Walker_Page to create HTML list content.
- * @since 2.1.0
- *
- * @param array $pages
- * @param int   $depth
- * @param int   $current_page
- * @param array $r
- * @return string
- */
-function walk_page_tree( $pages, $depth, $current_page, $r ) {
-	if ( empty($r['walker']) )
-		$walker = new Walker_Page;
-	else
-		$walker = $r['walker'];
-
-	foreach ( (array) $pages as $page ) {
-		if ( $page->post_parent )
-			$r['pages_with_children'][ $page->post_parent ] = true;
-	}
-
-	$args = array($pages, $depth, $r, $current_page);
-	return call_user_func_array(array($walker, 'walk'), $args);
-}
-
-/**
- * Retrieve HTML dropdown (select) content for page list.
- *
- * @uses Walker_PageDropdown to create HTML dropdown content.
- * @since 2.1.0
- * @see Walker_PageDropdown::walk() for parameters and return description.
- *
- * @return string
- */
-function walk_page_dropdown_tree() {
-	$args = func_get_args();
-	if ( empty($args[2]['walker']) ) // the user's options are the third parameter
-		$walker = new Walker_PageDropdown;
-	else
-		$walker = $args[2]['walker'];
-
-	return call_user_func_array(array($walker, 'walk'), $args);
-}
-
-//
-// Attachments
-//
-
-/**
- * Display an attachment page link using an image or icon.
- *
- * @since 2.0.0
- *
- * @param int|WP_Post $id Optional. Post ID or post object.
- * @param bool        $fullsize     Optional, default is false. Whether to use full size.
- * @param bool        $deprecated   Deprecated. Not used.
- * @param bool        $permalink    Optional, default is false. Whether to include permalink.
- */
-function the_attachment_link( $id = 0, $fullsize = false, $deprecated = false, $permalink = false ) {
-	if ( !empty( $deprecated ) )
-		_deprecated_argument( __FUNCTION__, '2.5.0' );
-
-	if ( $fullsize )
-		echo wp_get_attachment_link($id, 'full', $permalink);
-	else
-		echo wp_get_attachment_link($id, 'thumbnail', $permalink);
-}
-
-/**
- * Retrieve an attachment page link using an image or icon, if possible.
- *
- * @since 2.5.0
- * @since 4.4.0 The `$id` parameter can now accept either a post ID or `WP_Post` object.
- *
- * @param int|WP_Post  $id        Optional. Post ID or post object.
- * @param string|array $size      Optional. Image size. Accepts any valid image size, or an array
- *                                of width and height values in pixels (in that order).
- *                                Default 'thumbnail'.
- * @param bool         $permalink Optional, Whether to add permalink to image. Default false.
- * @param bool         $icon      Optional. Whether the attachment is an icon. Default false.
- * @param string|false $text      Optional. Link text to use. Activated by passing a string, false otherwise.
- *                                Default false.
- * @param array|string $attr      Optional. Array or string of attributes. Default empty.
- * @return string HTML content.
- */
-function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = false, $icon = false, $text = false, $attr = '' ) {
-	$_post = get_post( $id );
-
-	if ( empty( $_post ) || ( 'attachment' !== $_post->post_type ) || ! $url = wp_get_attachment_url( $_post->ID ) ) {
-		return __( 'Missing Attachment' );
-	}
-
-	if ( $permalink ) {
-		$url = get_attachment_link( $_post->ID );
-	}
-
-	if ( $text ) {
-		$link_text = $text;
-	} elseif ( $size && 'none' != $size ) {
-		$link_text = wp_get_attachment_image( $_post->ID, $size, $icon, $attr );
-	} else {
-		$link_text = '';
-	}
-
-	if ( '' === trim( $link_text ) ) {
-		$link_text = $_post->post_title;
-	}
-
-	if ( '' === trim( $link_text ) ) {
-		$link_text = esc_html( pathinfo( get_attached_file( $_post->ID ), PATHINFO_FILENAME ) );
-	}
-	/**
-	 * Filters a retrieved attachment page link.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param string       $link_html The page link HTML output.
-	 * @param int          $id        Post ID.
-	 * @param string|array $size      Size of the image. Image size or array of width and height values (in that order).
-	 *                                Default 'thumbnail'.
-	 * @param bool         $permalink Whether to add permalink to image. Default false.
-	 * @param bool         $icon      Whether to include an icon. Default false.
-	 * @param string|bool  $text      If string, will be link text. Default false.
-	 */
-	return apply_filters( 'wp_get_attachment_link', "<a href='" . esc_url( $url ) . "'>$link_text</a>", $id, $size, $permalink, $icon, $text );
-}
-
-/**
- * Wrap attachment in paragraph tag before content.
- *
- * @since 2.0.0
- *
- * @param string $content
- * @return string
- */
-function prepend_attachment($content) {
-	$post = get_post();
-
-	if ( empty($post->post_type) || $post->post_type != 'attachment' )
-		return $content;
-
-	if ( wp_attachment_is( 'video', $post ) ) {
-		$meta = wp_get_attachment_metadata( get_the_ID() );
-		$atts = array( 'src' => wp_get_attachment_url() );
-		if ( ! empty( $meta['width'] ) && ! empty( $meta['height'] ) ) {
-			$atts['width'] = (int) $meta['width'];
-			$atts['height'] = (int) $meta['height'];
-		}
-		if ( has_post_thumbnail() ) {
-			$atts['poster'] = wp_get_attachment_url( get_post_thumbnail_id() );
-		}
-		$p = wp_video_shortcode( $atts );
-	} elseif ( wp_attachment_is( 'audio', $post ) ) {
-		$p = wp_audio_shortcode( array( 'src' => wp_get_attachment_url() ) );
-	} else {
-		$p = '<p class="attachment">';
-		// show the medium sized image representation of the attachment if available, and link to the raw file
-		$p .= wp_get_attachment_link(0, 'medium', false);
-		$p .= '</p>';
-	}
-
-	/**
-	 * Filters the attachment markup to be prepended to the post content.
-	 *
-	 * @since 2.0.0
-	 *
-	 * @see prepend_attachment()
-	 *
-	 * @param string $p The attachment HTML output.
-	 */
-	$p = apply_filters( 'prepend_attachment', $p );
-
-	return "$p\n$content";
-}
-
-//
-// Misc
-//
-
-/**
- * Retrieve protected post password form content.
- *
- * @since 1.0.0
- *
- * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
- * @return string HTML content for password form for password protected post.
- */
-function get_the_password_form( $post = 0 ) {
-	$post = get_post( $post );
-	$label = 'pwbox-' . ( empty($post->ID) ? rand() : $post->ID );
-	$output = '<form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" class="post-password-form" method="post">
-	<p>' . __( 'This content is password protected. To view it please enter your password below:' ) . '</p>
-	<p><label for="' . $label . '">' . __( 'Password:' ) . ' <input name="post_password" id="' . $label . '" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . esc_attr_x( 'Enter', 'post password form' ) . '" /></p></form>
-	';
-
-	/**
-	 * Filters the HTML output for the protected post password form.
-	 *
-	 * If modifying the password field, please note that the core database schema
-	 * limits the password field to 20 characters regardless of the value of the
-	 * size attribute in the form input.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param string $output The password form HTML output.
-	 */
-	return apply_filters( 'the_password_form', $output );
-}
-
-/**
- * Whether currently in a page template.
- *
- * This template tag allows you to determine if you are in a page template.
- * You can optionally provide a template name or array of template names
- * and then the check will be specific to that template.
- *
- * @since 2.5.0
- * @since 4.2.0 The `$template` parameter was changed to also accept an array of page templates.
- *
- * @param string|array $template The specific template name or array of templates to match.
- * @return bool True on success, false on failure.
- */
-function is_page_template( $template = '' ) {
-	if ( ! is_page() )
-		return false;
-
-	$page_template = get_page_template_slug( get_queried_object_id() );
-
-	if ( empty( $template ) )
-		return (bool) $page_template;
-
-	if ( $template == $page_template )
-		return true;
-
-	if ( is_array( $template ) ) {
-		if ( ( in_array( 'default', $template, true ) && ! $page_template )
-			|| in_array( $page_template, $template, true )
-		) {
-			return true;
-		}
-	}
-
-	return ( 'default' === $template && ! $page_template );
-}
-
-/**
- * Get the specific template name for a page.
- *
- * @since 3.4.0
- *
- * @param int $post_id Optional. The page ID to check. Defaults to the current post, when used in the loop.
- * @return string|false Page template filename. Returns an empty string when the default page template
- * 	is in use. Returns false if the post is not a page.
- */
-function get_page_template_slug( $post_id = null ) {
-	$post = get_post( $post_id );
-	if ( ! $post || 'page' != $post->post_type )
-		return false;
-	$template = get_post_meta( $post->ID, '_wp_page_template', true );
-	if ( ! $template || 'default' == $template )
-		return '';
-	return $template;
-}
-
-/**
- * Retrieve formatted date timestamp of a revision (linked to that revisions's page).
- *
- * @since 2.6.0
- *
- * @param int|object $revision Revision ID or revision object.
- * @param bool       $link     Optional, default is true. Link to revisions's page?
- * @return string|false i18n formatted datetimestamp or localized 'Current Revision'.
- */
-function wp_post_revision_title( $revision, $link = true ) {
-	if ( !$revision = get_post( $revision ) )
-		return $revision;
-
-	if ( !in_array( $revision->post_type, array( 'post', 'page', 'revision' ) ) )
-		return false;
-
-	/* translators: revision date format, see https://secure.php.net/date */
-	$datef = _x( 'F j, Y @ H:i:s', 'revision date format' );
-	/* translators: %s: revision date */
-	$autosavef = __( '%s [Autosave]' );
-	/* translators: %s: revision date */
-	$currentf  = __( '%s [Current Revision]' );
-
-	$date = date_i18n( $datef, strtotime( $revision->post_modified ) );
-	if ( $link && current_user_can( 'edit_post', $revision->ID ) && $link = get_edit_post_link( $revision->ID ) )
-		$date = "<a href='$link'>$date</a>";
-
-	if ( !wp_is_post_revision( $revision ) )
-		$date = sprintf( $currentf, $date );
-	elseif ( wp_is_post_autosave( $revision ) )
-		$date = sprintf( $autosavef, $date );
-
-	return $date;
-}
-
-/**
- * Retrieve formatted date timestamp of a revision (linked to that revisions's page).
- *
- * @since 3.6.0
- *
- * @param int|object $revision Revision ID or revision object.
- * @param bool       $link     Optional, default is true. Link to revisions's page?
- * @return string|false gravatar, user, i18n formatted datetimestamp or localized 'Current Revision'.
- */
-function wp_post_revision_title_expanded( $revision, $link = true ) {
-	if ( !$revision = get_post( $revision ) )
-		return $revision;
-
-	if ( !in_array( $revision->post_type, array( 'post', 'page', 'revision' ) ) )
-		return false;
-
-	$author = get_the_author_meta( 'display_name', $revision->post_author );
-	/* translators: revision date format, see https://secure.php.net/date */
-	$datef = _x( 'F j, Y @ H:i:s', 'revision date format' );
-
-	$gravatar = get_avatar( $revision->post_author, 24 );
-
-	$date = date_i18n( $datef, strtotime( $revision->post_modified ) );
-	if ( $link && current_user_can( 'edit_post', $revision->ID ) && $link = get_edit_post_link( $revision->ID ) )
-		$date = "<a href='$link'>$date</a>";
-
-	$revision_date_author = sprintf(
-		/* translators: post revision title: 1: author avatar, 2: author name, 3: time ago, 4: date */
-		__( '%1$s %2$s, %3$s ago (%4$s)' ),
-		$gravatar,
-		$author,
-		human_time_diff( strtotime( $revision->post_modified ), current_time( 'timestamp' ) ),
-		$date
-	);
-
-	/* translators: %s: revision date with author avatar */
-	$autosavef = __( '%s [Autosave]' );
-	/* translators: %s: revision date with author avatar */
-	$currentf  = __( '%s [Current Revision]' );
-
-	if ( !wp_is_post_revision( $revision ) )
-		$revision_date_author = sprintf( $currentf, $revision_date_author );
-	elseif ( wp_is_post_autosave( $revision ) )
-		$revision_date_author = sprintf( $autosavef, $revision_date_author );
-
-	/**
-	 * Filters the formatted author and date for a revision.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param string  $revision_date_author The formatted string.
-	 * @param WP_Post $revision             The revision object.
-	 * @param bool    $link                 Whether to link to the revisions page, as passed into
-	 *                                      wp_post_revision_title_expanded().
-	 */
-	return apply_filters( 'wp_post_revision_title_expanded', $revision_date_author, $revision, $link );
-}
-
-/**
- * Display list of a post's revisions.
- *
- * Can output either a UL with edit links or a TABLE with diff interface, and
- * restore action links.
- *
- * @since 2.6.0
- *
- * @param int|WP_Post $post_id Optional. Post ID or WP_Post object. Default is global $post.
- * @param string      $type    'all' (default), 'revision' or 'autosave'
- */
-function wp_list_post_revisions( $post_id = 0, $type = 'all' ) {
-	if ( ! $post = get_post( $post_id ) )
-		return;
-
-	// $args array with (parent, format, right, left, type) deprecated since 3.6
-	if ( is_array( $type ) ) {
-		$type = ! empty( $type['type'] ) ? $type['type']  : $type;
-		_deprecated_argument( __FUNCTION__, '3.6.0' );
-	}
-
-	if ( ! $revisions = wp_get_post_revisions( $post->ID ) )
-		return;
-
-	$rows = '';
-	foreach ( $revisions as $revision ) {
-		if ( ! current_user_can( 'read_post', $revision->ID ) )
-			continue;
-
-		$is_autosave = wp_is_post_autosave( $revision );
-		if ( ( 'revision' === $type && $is_autosave ) || ( 'autosave' === $type && ! $is_autosave ) )
-			continue;
-
-		$rows .= "\t<li>" . wp_post_revision_title_expanded( $revision ) . "</li>\n";
-	}
-
-	echo "<div class='hide-if-js'><p>" . __( 'JavaScript must be enabled to use this feature.' ) . "</p></div>\n";
-
-	echo "<ul class='post-revisions hide-if-no-js'>\n";
-	echo $rows;
-	echo "</ul>";
-}
Index: www/wp-includes/autoload/requests/Response.php
===================================================================
--- www/wp-includes/autoload/requests/Response.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Response.php	(revision UNDEFINED)
@@ -1,121 +0,0 @@
-<?php
-/**
- * HTTP response class
- *
- * Contains a response from Requests::request()
- * @package Requests
- */
-
-/**
- * HTTP response class
- *
- * Contains a response from Requests::request()
- * @package Requests
- */
-class Requests_Response {
-	/**
-	 * Constructor
-	 */
-	public function __construct() {
-		$this->headers = new Requests_Response_Headers();
-		$this->cookies = new Requests_Cookie_Jar();
-	}
-
-	/**
-	 * Response body
-	 *
-	 * @var string
-	 */
-	public $body = '';
-
-	/**
-	 * Raw HTTP data from the transport
-	 *
-	 * @var string
-	 */
-	public $raw = '';
-
-	/**
-	 * Headers, as an associative array
-	 *
-	 * @var Requests_Response_Headers Array-like object representing headers
-	 */
-	public $headers = array();
-
-	/**
-	 * Status code, false if non-blocking
-	 *
-	 * @var integer|boolean
-	 */
-	public $status_code = false;
-
-	/**
-	 * Protocol version, false if non-blocking
-	 * @var float|boolean
-	 */
-	public $protocol_version = false;
-
-	/**
-	 * Whether the request succeeded or not
-	 *
-	 * @var boolean
-	 */
-	public $success = false;
-
-	/**
-	 * Number of redirects the request used
-	 *
-	 * @var integer
-	 */
-	public $redirects = 0;
-
-	/**
-	 * URL requested
-	 *
-	 * @var string
-	 */
-	public $url = '';
-
-	/**
-	 * Previous requests (from redirects)
-	 *
-	 * @var array Array of Requests_Response objects
-	 */
-	public $history = array();
-
-	/**
-	 * Cookies from the request
-	 *
-	 * @var Requests_Cookie_Jar Array-like object representing a cookie jar
-	 */
-	public $cookies = array();
-
-	/**
-	 * Is the response a redirect?
-	 *
-	 * @return boolean True if redirect (3xx status), false if not.
-	 */
-	public function is_redirect() {
-		$code = $this->status_code;
-		return in_array($code, array(300, 301, 302, 303, 307)) || $code > 307 && $code < 400;
-	}
-
-	/**
-	 * Throws an exception if the request was not successful
-	 *
-	 * @throws Requests_Exception If `$allow_redirects` is false, and code is 3xx (`response.no_redirects`)
-	 * @throws Requests_Exception_HTTP On non-successful status code. Exception class corresponds to code (e.g. {@see Requests_Exception_HTTP_404})
-	 * @param boolean $allow_redirects Set to false to throw on a 3xx as well
-	 */
-	public function throw_for_status($allow_redirects = true) {
-		if ($this->is_redirect()) {
-			if (!$allow_redirects) {
-				throw new Requests_Exception('Redirection not allowed', 'response.no_redirects', $this);
-			}
-		}
-		elseif (!$this->success) {
-			$exception = Requests_Exception_HTTP::get_class($this->status_code);
-			throw new $exception(null, $this);
-		}
-	}
-}
Index: www/wp-includes/autoload/customize/class-wp-customize-media-control.php
===================================================================
--- www/wp-includes/autoload/customize/class-wp-customize-media-control.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/customize/class-wp-customize-media-control.php	(revision UNDEFINED)
@@ -1,217 +0,0 @@
-<?php
-/**
- * Customize API: WP_Customize_Media_Control class
- *
- * @package WordPress
- * @subpackage Customize
- * @since 4.4.0
- */
-
-/**
- * Customize Media Control class.
- *
- * @since 4.2.0
- *
- * @see WP_Customize_Control
- */
-class WP_Customize_Media_Control extends WP_Customize_Control {
-	/**
-	 * Control type.
-	 *
-	 * @since 4.2.0
-	 * @access public
-	 * @var string
-	 */
-	public $type = 'media';
-
-	/**
-	 * Media control mime type.
-	 *
-	 * @since 4.2.0
-	 * @access public
-	 * @var string
-	 */
-	public $mime_type = '';
-
-	/**
-	 * Button labels.
-	 *
-	 * @since 4.2.0
-	 * @access public
-	 * @var array
-	 */
-	public $button_labels = array();
-
-	/**
-	 * Constructor.
-	 *
-	 * @since 4.1.0
-	 * @since 4.2.0 Moved from WP_Customize_Upload_Control.
-	 *
-	 * @param WP_Customize_Manager $manager Customizer bootstrap instance.
-	 * @param string               $id      Control ID.
-	 * @param array                $args    Optional. Arguments to override class property defaults.
-	 */
-	public function __construct( $manager, $id, $args = array() ) {
-		parent::__construct( $manager, $id, $args );
-
-		if ( ! ( $this instanceof WP_Customize_Image_Control ) ) {
-			$this->button_labels = wp_parse_args( $this->button_labels, array(
-				'select'       => __( 'Select File' ),
-				'change'       => __( 'Change File' ),
-				'default'      => __( 'Default' ),
-				'remove'       => __( 'Remove' ),
-				'placeholder'  => __( 'No file selected' ),
-				'frame_title'  => __( 'Select File' ),
-				'frame_button' => __( 'Choose File' ),
-			) );
-		}
-	}
-
-	/**
-	 * Enqueue control related scripts/styles.
-	 *
-	 * @since 3.4.0
-	 * @since 4.2.0 Moved from WP_Customize_Upload_Control.
-	 */
-	public function enqueue() {
-		wp_enqueue_media();
-	}
-
-	/**
-	 * Refresh the parameters passed to the JavaScript via JSON.
-	 *
-	 * @since 3.4.0
-	 * @since 4.2.0 Moved from WP_Customize_Upload_Control.
-	 *
-	 * @see WP_Customize_Control::to_json()
-	 */
-	public function to_json() {
-		parent::to_json();
-		$this->json['label'] = html_entity_decode( $this->label, ENT_QUOTES, get_bloginfo( 'charset' ) );
-		$this->json['mime_type'] = $this->mime_type;
-		$this->json['button_labels'] = $this->button_labels;
-		$this->json['canUpload'] = current_user_can( 'upload_files' );
-
-		$value = $this->value();
-
-		if ( is_object( $this->setting ) ) {
-			if ( $this->setting->default ) {
-				// Fake an attachment model - needs all fields used by template.
-				// Note that the default value must be a URL, NOT an attachment ID.
-				$type = in_array( substr( $this->setting->default, -3 ), array( 'jpg', 'png', 'gif', 'bmp' ) ) ? 'image' : 'document';
-				$default_attachment = array(
-					'id' => 1,
-					'url' => $this->setting->default,
-					'type' => $type,
-					'icon' => wp_mime_type_icon( $type ),
-					'title' => basename( $this->setting->default ),
-				);
-
-				if ( 'image' === $type ) {
-					$default_attachment['sizes'] = array(
-						'full' => array( 'url' => $this->setting->default ),
-					);
-				}
-
-				$this->json['defaultAttachment'] = $default_attachment;
-			}
-
-			if ( $value && $this->setting->default && $value === $this->setting->default ) {
-				// Set the default as the attachment.
-				$this->json['attachment'] = $this->json['defaultAttachment'];
-			} elseif ( $value ) {
-				$this->json['attachment'] = wp_prepare_attachment_for_js( $value );
-			}
-		}
-	}
-
-	/**
-	 * Don't render any content for this control from PHP.
-	 *
-	 * @since 3.4.0
-	 * @since 4.2.0 Moved from WP_Customize_Upload_Control.
-	 *
-	 * @see WP_Customize_Media_Control::content_template()
-	 */
-	public function render_content() {}
-
-	/**
-	 * Render a JS template for the content of the media control.
-	 *
-	 * @since 4.1.0
-	 * @since 4.2.0 Moved from WP_Customize_Upload_Control.
-	 */
-	public function content_template() {
-		?>
-		<label for="{{ data.settings['default'] }}-button">
-			<# if ( data.label ) { #>
-				<span class="customize-control-title">{{ data.label }}</span>
-			<# } #>
-			<# if ( data.description ) { #>
-				<span class="description customize-control-description">{{{ data.description }}}</span>
-			<# } #>
-		</label>
-
-		<# if ( data.attachment && data.attachment.id ) { #>
-			<div class="attachment-media-view attachment-media-view-{{ data.attachment.type }} {{ data.attachment.orientation }}">
-				<div class="thumbnail thumbnail-{{ data.attachment.type }}">
-					<# if ( 'image' === data.attachment.type && data.attachment.sizes && data.attachment.sizes.medium ) { #>
-						<img class="attachment-thumb" src="{{ data.attachment.sizes.medium.url }}" draggable="false" alt="" />
-					<# } else if ( 'image' === data.attachment.type && data.attachment.sizes && data.attachment.sizes.full ) { #>
-						<img class="attachment-thumb" src="{{ data.attachment.sizes.full.url }}" draggable="false" alt="" />
-					<# } else if ( 'audio' === data.attachment.type ) { #>
-						<# if ( data.attachment.image && data.attachment.image.src && data.attachment.image.src !== data.attachment.icon ) { #>
-							<img src="{{ data.attachment.image.src }}" class="thumbnail" draggable="false" alt="" />
-						<# } else { #>
-							<img src="{{ data.attachment.icon }}" class="attachment-thumb type-icon" draggable="false" alt="" />
-						<# } #>
-						<p class="attachment-meta attachment-meta-title">&#8220;{{ data.attachment.title }}&#8221;</p>
-						<# if ( data.attachment.album || data.attachment.meta.album ) { #>
-						<p class="attachment-meta"><em>{{ data.attachment.album || data.attachment.meta.album }}</em></p>
-						<# } #>
-						<# if ( data.attachment.artist || data.attachment.meta.artist ) { #>
-						<p class="attachment-meta">{{ data.attachment.artist || data.attachment.meta.artist }}</p>
-						<# } #>
-						<audio style="visibility: hidden" controls class="wp-audio-shortcode" width="100%" preload="none">
-							<source type="{{ data.attachment.mime }}" src="{{ data.attachment.url }}"/>
-						</audio>
-					<# } else if ( 'video' === data.attachment.type ) { #>
-						<div class="wp-media-wrapper wp-video">
-							<video controls="controls" class="wp-video-shortcode" preload="metadata"
-								<# if ( data.attachment.image && data.attachment.image.src !== data.attachment.icon ) { #>poster="{{ data.attachment.image.src }}"<# } #>>
-								<source type="{{ data.attachment.mime }}" src="{{ data.attachment.url }}"/>
-							</video>
-						</div>
-					<# } else { #>
-						<img class="attachment-thumb type-icon icon" src="{{ data.attachment.icon }}" draggable="false" alt="" />
-						<p class="attachment-title">{{ data.attachment.title }}</p>
-					<# } #>
-				</div>
-				<div class="actions">
-					<# if ( data.canUpload ) { #>
-					<button type="button" class="button remove-button">{{ data.button_labels.remove }}</button>
-					<button type="button" class="button upload-button control-focus" id="{{ data.settings['default'] }}-button">{{ data.button_labels.change }}</button>
-					<div style="clear:both"></div>
-					<# } #>
-				</div>
-			</div>
-		<# } else { #>
-			<div class="attachment-media-view">
-				<div class="placeholder">
-						{{ data.button_labels.placeholder }}
-				</div>
-				<div class="actions">
-					<# if ( data.defaultAttachment ) { #>
-						<button type="button" class="button default-button">{{ data.button_labels['default'] }}</button>
-					<# } #>
-					<# if ( data.canUpload ) { #>
-					<button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button">{{ data.button_labels.select }}</button>
-					<# } #>
-					<div style="clear:both"></div>
-				</div>
-			</div>
-		<# } #>
-		<?php
-	}
-}
Index: www/wp-includes/canonical.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/canonical.php	(revision 38565)
+++ www/wp-includes/canonical.php	(revision 38565)
@@ -1,657 +0,0 @@
-<?php
-/**
- * Canonical API to handle WordPress Redirecting
- *
- * Based on "Permalink Redirect" from Scott Yang and "Enforce www. Preference"
- * by Mark Jaquith
- *
- * @package WordPress
- * @since 2.3.0
- */
-
-/**
- * Redirects incoming links to the proper URL based on the site url.
- *
- * Search engines consider www.somedomain.com and somedomain.com to be two
- * different URLs when they both go to the same location. This SEO enhancement
- * prevents penalty for duplicate content by redirecting all incoming links to
- * one or the other.
- *
- * Prevents redirection for feeds, trackbacks, searches, and
- * admin URLs. Does not redirect on non-pretty-permalink-supporting IIS 7+,
- * page/post previews, WP admin, Trackbacks, robots.txt, searches, or on POST
- * requests.
- *
- * Will also attempt to find the correct link when a user enters a URL that does
- * not exist based on exact WordPress query. Will instead try to parse the URL
- * or query in an attempt to figure the correct page to go to.
- *
- * @since 2.3.0
- *
- * @global WP_Rewrite $wp_rewrite
- * @global bool $is_IIS
- * @global WP_Query $wp_query
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $requested_url Optional. The URL that was requested, used to
- *		figure if redirect is needed.
- * @param bool $do_redirect Optional. Redirect to the new URL.
- * @return string|void The string of the URL, if redirect needed.
- */
-function redirect_canonical( $requested_url = null, $do_redirect = true ) {
-	global $wp_rewrite, $is_IIS, $wp_query, $wpdb, $wp;
-
-	if ( isset( $_SERVER['REQUEST_METHOD'] ) && ! in_array( strtoupper( $_SERVER['REQUEST_METHOD'] ), array( 'GET', 'HEAD' ) ) ) {
-		return;
-	}
-
-	// If we're not in wp-admin and the post has been published and preview nonce
-	// is non-existent or invalid then no need for preview in query
-	if ( is_preview() && get_query_var( 'p' ) && 'publish' == get_post_status( get_query_var( 'p' ) ) ) {
-		if ( ! isset( $_GET['preview_id'] )
-			|| ! isset( $_GET['preview_nonce'] )
-			|| ! wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . (int) $_GET['preview_id'] ) ) {
-			$wp_query->is_preview = false;
-		}
-	}
-
-	if ( is_trackback() || is_search() || is_admin() || is_preview() || is_robots() || ( $is_IIS && !iis7_supports_permalinks() ) ) {
-		return;
-	}
-
-	if ( ! $requested_url && isset( $_SERVER['HTTP_HOST'] ) ) {
-		// build the URL in the address bar
-		$requested_url  = is_ssl() ? 'https://' : 'http://';
-		$requested_url .= $_SERVER['HTTP_HOST'];
-		$requested_url .= $_SERVER['REQUEST_URI'];
-	}
-
-	$original = @parse_url($requested_url);
-	if ( false === $original ) {
-		return;
-	}
-
-	$redirect = $original;
-	$redirect_url = false;
-
-	// Notice fixing
-	if ( !isset($redirect['path']) )
-		$redirect['path'] = '';
-	if ( !isset($redirect['query']) )
-		$redirect['query'] = '';
-
-	// If the original URL ended with non-breaking spaces, they were almost
-	// certainly inserted by accident. Let's remove them, so the reader doesn't
-	// see a 404 error with no obvious cause.
-	$redirect['path'] = preg_replace( '|(%C2%A0)+$|i', '', $redirect['path'] );
-
-	// It's not a preview, so remove it from URL
-	if ( get_query_var( 'preview' ) ) {
-		$redirect['query'] = remove_query_arg( 'preview', $redirect['query'] );
-	}
-
-	if ( is_feed() && ( $id = get_query_var( 'p' ) ) ) {
-		if ( $redirect_url = get_post_comments_feed_link( $id, get_query_var( 'feed' ) ) ) {
-			$redirect['query'] = _remove_qs_args_if_not_in_url( $redirect['query'], array( 'p', 'page_id', 'attachment_id', 'pagename', 'name', 'post_type', 'feed'), $redirect_url );
-			$redirect['path'] = parse_url( $redirect_url, PHP_URL_PATH );
-		}
-	}
-
-	if ( is_singular() && 1 > $wp_query->post_count && ($id = get_query_var('p')) ) {
-
-		$vars = $wpdb->get_results( $wpdb->prepare("SELECT post_type, post_parent FROM $wpdb->posts WHERE ID = %d", $id) );
-
-		if ( isset($vars[0]) && $vars = $vars[0] ) {
-			if ( 'revision' == $vars->post_type && $vars->post_parent > 0 )
-				$id = $vars->post_parent;
-
-			if ( $redirect_url = get_permalink($id) )
-				$redirect['query'] = _remove_qs_args_if_not_in_url( $redirect['query'], array( 'p', 'page_id', 'attachment_id', 'pagename', 'name', 'post_type' ), $redirect_url );
-		}
-	}
-
-	// These tests give us a WP-generated permalink
-	if ( is_404() ) {
-
-		// Redirect ?page_id, ?p=, ?attachment_id= to their respective url's
-		$id = max( get_query_var('p'), get_query_var('page_id'), get_query_var('attachment_id') );
-		if ( $id && $redirect_post = get_post($id) ) {
-			$post_type_obj = get_post_type_object($redirect_post->post_type);
-			if ( $post_type_obj->public && 'auto-draft' != $redirect_post->post_status ) {
-				$redirect_url = get_permalink($redirect_post);
-				$redirect['query'] = _remove_qs_args_if_not_in_url( $redirect['query'], array( 'p', 'page_id', 'attachment_id', 'pagename', 'name', 'post_type' ), $redirect_url );
-			}
-		}
-
-		if ( get_query_var( 'day' ) && get_query_var( 'monthnum' ) && get_query_var( 'year' ) ) {
-			$year  = get_query_var( 'year' );
-			$month = get_query_var( 'monthnum' );
-			$day   = get_query_var( 'day' );
-			$date  = sprintf( '%04d-%02d-%02d', $year, $month, $day );
-			if ( ! wp_checkdate( $month, $day, $year, $date ) ) {
-				$redirect_url = get_month_link( $year, $month );
-				$redirect['query'] = _remove_qs_args_if_not_in_url( $redirect['query'], array( 'year', 'monthnum', 'day' ), $redirect_url );
-			}
-		} elseif ( get_query_var( 'monthnum' ) && get_query_var( 'year' ) && 12 < get_query_var( 'monthnum' ) ) {
-			$redirect_url = get_year_link( get_query_var( 'year' ) );
-			$redirect['query'] = _remove_qs_args_if_not_in_url( $redirect['query'], array( 'year', 'monthnum' ), $redirect_url );
-		}
-
-		if ( ! $redirect_url ) {
-			if ( $redirect_url = redirect_guess_404_permalink() ) {
-				$redirect['query'] = _remove_qs_args_if_not_in_url( $redirect['query'], array( 'page', 'feed', 'p', 'page_id', 'attachment_id', 'pagename', 'name', 'post_type' ), $redirect_url );
-			}
-		}
-
-		if ( get_query_var( 'page' ) && $wp_query->post &&
-			false !== strpos( $wp_query->post->post_content, '<!--nextpage-->' ) ) {
-			$redirect['path'] = rtrim( $redirect['path'], (int) get_query_var( 'page' ) . '/' );
-			$redirect['query'] = remove_query_arg( 'page', $redirect['query'] );
-			$redirect_url = get_permalink( $wp_query->post->ID );
-		}
-
-	} elseif ( is_object($wp_rewrite) && $wp_rewrite->using_permalinks() ) {
-		// rewriting of old ?p=X, ?m=2004, ?m=200401, ?m=20040101
-		if ( is_attachment() &&
-			! array_diff( array_keys( $wp->query_vars ), array( 'attachment', 'attachment_id' ) ) &&
-			! $redirect_url ) {
-			if ( ! empty( $_GET['attachment_id'] ) ) {
-				$redirect_url = get_attachment_link( get_query_var( 'attachment_id' ) );
-				if ( $redirect_url ) {
-					$redirect['query'] = remove_query_arg( 'attachment_id', $redirect['query'] );
-				}
-			} else {
-				$redirect_url = get_attachment_link();
-			}
-		} elseif ( is_single() && !empty($_GET['p']) && ! $redirect_url ) {
-			if ( $redirect_url = get_permalink(get_query_var('p')) )
-				$redirect['query'] = remove_query_arg(array('p', 'post_type'), $redirect['query']);
-		} elseif ( is_single() && !empty($_GET['name'])  && ! $redirect_url ) {
-			if ( $redirect_url = get_permalink( $wp_query->get_queried_object_id() ) )
-				$redirect['query'] = remove_query_arg('name', $redirect['query']);
-		} elseif ( is_page() && !empty($_GET['page_id']) && ! $redirect_url ) {
-			if ( $redirect_url = get_permalink(get_query_var('page_id')) )
-				$redirect['query'] = remove_query_arg('page_id', $redirect['query']);
-		} elseif ( is_page() && !is_feed() && 'page' == get_option('show_on_front') && get_queried_object_id() == get_option('page_on_front')  && ! $redirect_url ) {
-			$redirect_url = home_url('/');
-		} elseif ( is_home() && !empty($_GET['page_id']) && 'page' == get_option('show_on_front') && get_query_var('page_id') == get_option('page_for_posts')  && ! $redirect_url ) {
-			if ( $redirect_url = get_permalink(get_option('page_for_posts')) )
-				$redirect['query'] = remove_query_arg('page_id', $redirect['query']);
-		} elseif ( !empty($_GET['m']) && ( is_year() || is_month() || is_day() ) ) {
-			$m = get_query_var('m');
-			switch ( strlen($m) ) {
-				case 4: // Yearly
-					$redirect_url = get_year_link($m);
-					break;
-				case 6: // Monthly
-					$redirect_url = get_month_link( substr($m, 0, 4), substr($m, 4, 2) );
-					break;
-				case 8: // Daily
-					$redirect_url = get_day_link(substr($m, 0, 4), substr($m, 4, 2), substr($m, 6, 2));
-					break;
-			}
-			if ( $redirect_url )
-				$redirect['query'] = remove_query_arg('m', $redirect['query']);
-		// now moving on to non ?m=X year/month/day links
-		} elseif ( is_day() && get_query_var('year') && get_query_var('monthnum') && !empty($_GET['day']) ) {
-			if ( $redirect_url = get_day_link(get_query_var('year'), get_query_var('monthnum'), get_query_var('day')) )
-				$redirect['query'] = remove_query_arg(array('year', 'monthnum', 'day'), $redirect['query']);
-		} elseif ( is_month() && get_query_var('year') && !empty($_GET['monthnum']) ) {
-			if ( $redirect_url = get_month_link(get_query_var('year'), get_query_var('monthnum')) )
-				$redirect['query'] = remove_query_arg(array('year', 'monthnum'), $redirect['query']);
-		} elseif ( is_year() && !empty($_GET['year']) ) {
-			if ( $redirect_url = get_year_link(get_query_var('year')) )
-				$redirect['query'] = remove_query_arg('year', $redirect['query']);
-		} elseif ( is_author() && !empty($_GET['author']) && preg_match( '|^[0-9]+$|', $_GET['author'] ) ) {
-			$author = get_userdata(get_query_var('author'));
-			if ( ( false !== $author ) && $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE $wpdb->posts.post_author = %d AND $wpdb->posts.post_status = 'publish' LIMIT 1", $author->ID ) ) ) {
-				if ( $redirect_url = get_author_posts_url($author->ID, $author->user_nicename) )
-					$redirect['query'] = remove_query_arg('author', $redirect['query']);
-			}
-		} elseif ( is_category() || is_tag() || is_tax() ) { // Terms (Tags/categories)
-
-			$term_count = 0;
-			foreach ( $wp_query->tax_query->queried_terms as $tax_query )
-				$term_count += count( $tax_query['terms'] );
-
-			$obj = $wp_query->get_queried_object();
-			if ( $term_count <= 1 && !empty($obj->term_id) && ( $tax_url = get_term_link((int)$obj->term_id, $obj->taxonomy) ) && !is_wp_error($tax_url) ) {
-				if ( !empty($redirect['query']) ) {
-					// Strip taxonomy query vars off the url.
-					$qv_remove = array( 'term', 'taxonomy');
-					if ( is_category() ) {
-						$qv_remove[] = 'category_name';
-						$qv_remove[] = 'cat';
-					} elseif ( is_tag() ) {
-						$qv_remove[] = 'tag';
-						$qv_remove[] = 'tag_id';
-					} else { // Custom taxonomies will have a custom query var, remove those too:
-						$tax_obj = get_taxonomy( $obj->taxonomy );
-						if ( false !== $tax_obj->query_var )
-							$qv_remove[] = $tax_obj->query_var;
-					}
-
-					$rewrite_vars = array_diff( array_keys($wp_query->query), array_keys($_GET) );
-
-					if ( !array_diff($rewrite_vars, array_keys($_GET))  ) { // Check to see if all the Query vars are coming from the rewrite, none are set via $_GET
-						$redirect['query'] = remove_query_arg($qv_remove, $redirect['query']); //Remove all of the per-tax qv's
-
-						// Create the destination url for this taxonomy
-						$tax_url = parse_url($tax_url);
-						if ( ! empty($tax_url['query']) ) { // Taxonomy accessible via ?taxonomy=..&term=.. or any custom qv..
-							parse_str($tax_url['query'], $query_vars);
-							$redirect['query'] = add_query_arg($query_vars, $redirect['query']);
-						} else { // Taxonomy is accessible via a "pretty-URL"
-							$redirect['path'] = $tax_url['path'];
-						}
-
-					} else { // Some query vars are set via $_GET. Unset those from $_GET that exist via the rewrite
-						foreach ( $qv_remove as $_qv ) {
-							if ( isset($rewrite_vars[$_qv]) )
-								$redirect['query'] = remove_query_arg($_qv, $redirect['query']);
-						}
-					}
-				}
-
-			}
-		} elseif ( is_single() && strpos($wp_rewrite->permalink_structure, '%category%') !== false && $cat = get_query_var( 'category_name' ) ) {
-			$category = get_category_by_path( $cat );
-			if ( ( ! $category || is_wp_error( $category ) ) || ! has_term( $category->term_id, 'category', $wp_query->get_queried_object_id() ) ) {
-				$redirect_url = get_permalink($wp_query->get_queried_object_id());
-			}
-		}
-
-		// Post Paging
-		if ( is_singular() && get_query_var('page') ) {
-			if ( !$redirect_url )
-				$redirect_url = get_permalink( get_queried_object_id() );
-
-			$page = get_query_var( 'page' );
-			if ( $page > 1 ) {
-				if ( is_front_page() ) {
-					$redirect_url = trailingslashit( $redirect_url ) . user_trailingslashit( "$wp_rewrite->pagination_base/$page", 'paged' );
-				} else {
-					$redirect_url = trailingslashit( $redirect_url ) . user_trailingslashit( $page, 'single_paged' );
-				}
-			}
-			$redirect['query'] = remove_query_arg( 'page', $redirect['query'] );
-		}
-
-		// paging and feeds
-		if ( get_query_var('paged') || is_feed() || get_query_var('cpage') ) {
-			while ( preg_match( "#/$wp_rewrite->pagination_base/?[0-9]+?(/+)?$#", $redirect['path'] ) || preg_match( '#/(comments/?)?(feed|rss|rdf|atom|rss2)(/+)?$#', $redirect['path'] ) || preg_match( "#/{$wp_rewrite->comments_pagination_base}-[0-9]+(/+)?$#", $redirect['path'] ) ) {
-				// Strip off paging and feed
-				$redirect['path'] = preg_replace("#/$wp_rewrite->pagination_base/?[0-9]+?(/+)?$#", '/', $redirect['path']); // strip off any existing paging
-				$redirect['path'] = preg_replace('#/(comments/?)?(feed|rss2?|rdf|atom)(/+|$)#', '/', $redirect['path']); // strip off feed endings
-				$redirect['path'] = preg_replace("#/{$wp_rewrite->comments_pagination_base}-[0-9]+?(/+)?$#", '/', $redirect['path']); // strip off any existing comment paging
-			}
-
-			$addl_path = '';
-			if ( is_feed() && in_array( get_query_var('feed'), $wp_rewrite->feeds ) ) {
-				$addl_path = !empty( $addl_path ) ? trailingslashit($addl_path) : '';
-				if ( !is_singular() && get_query_var( 'withcomments' ) )
-					$addl_path .= 'comments/';
-				if ( ( 'rss' == get_default_feed() && 'feed' == get_query_var('feed') ) || 'rss' == get_query_var('feed') )
-					$addl_path .= user_trailingslashit( 'feed/' . ( ( get_default_feed() == 'rss2' ) ? '' : 'rss2' ), 'feed' );
-				else
-					$addl_path .= user_trailingslashit( 'feed/' . ( ( get_default_feed() ==  get_query_var('feed') || 'feed' == get_query_var('feed') ) ? '' : get_query_var('feed') ), 'feed' );
-				$redirect['query'] = remove_query_arg( 'feed', $redirect['query'] );
-			} elseif ( is_feed() && 'old' == get_query_var('feed') ) {
-				$old_feed_files = array(
-					'wp-atom.php'         => 'atom',
-					'wp-commentsrss2.php' => 'comments_rss2',
-					'wp-feed.php'         => get_default_feed(),
-					'wp-rdf.php'          => 'rdf',
-					'wp-rss.php'          => 'rss2',
-					'wp-rss2.php'         => 'rss2',
-				);
-				if ( isset( $old_feed_files[ basename( $redirect['path'] ) ] ) ) {
-					$redirect_url = get_feed_link( $old_feed_files[ basename( $redirect['path'] ) ] );
-					wp_redirect( $redirect_url, 301 );
-					die();
-				}
-			}
-
-			if ( get_query_var('paged') > 0 ) {
-				$paged = get_query_var('paged');
-				$redirect['query'] = remove_query_arg( 'paged', $redirect['query'] );
-				if ( !is_feed() ) {
-					if ( $paged > 1 && !is_single() ) {
-						$addl_path = ( !empty( $addl_path ) ? trailingslashit($addl_path) : '' ) . user_trailingslashit("$wp_rewrite->pagination_base/$paged", 'paged');
-					} elseif ( !is_single() ) {
-						$addl_path = !empty( $addl_path ) ? trailingslashit($addl_path) : '';
-					}
-				} elseif ( $paged > 1 ) {
-					$redirect['query'] = add_query_arg( 'paged', $paged, $redirect['query'] );
-				}
-			}
-
-			if ( get_option( 'page_comments' ) && (
-				( 'newest' == get_option( 'default_comments_page' ) && get_query_var( 'cpage' ) > 0 ) ||
-				( 'newest' != get_option( 'default_comments_page' ) && get_query_var( 'cpage' ) > 1 )
-			) ) {
-				$addl_path = ( !empty( $addl_path ) ? trailingslashit($addl_path) : '' ) . user_trailingslashit( $wp_rewrite->comments_pagination_base . '-' . get_query_var('cpage'), 'commentpaged' );
-				$redirect['query'] = remove_query_arg( 'cpage', $redirect['query'] );
-			}
-
-			$redirect['path'] = user_trailingslashit( preg_replace('|/' . preg_quote( $wp_rewrite->index, '|' ) . '/?$|', '/', $redirect['path']) ); // strip off trailing /index.php/
-			if ( !empty( $addl_path ) && $wp_rewrite->using_index_permalinks() && strpos($redirect['path'], '/' . $wp_rewrite->index . '/') === false )
-				$redirect['path'] = trailingslashit($redirect['path']) . $wp_rewrite->index . '/';
-			if ( !empty( $addl_path ) )
-				$redirect['path'] = trailingslashit($redirect['path']) . $addl_path;
-			$redirect_url = $redirect['scheme'] . '://' . $redirect['host'] . $redirect['path'];
-		}
-
-		if ( 'wp-register.php' == basename( $redirect['path'] ) ) {
-			if ( is_multisite() ) {
-				/** This filter is documented in wp-login.php */
-				$redirect_url = apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) );
-			} else {
-				$redirect_url = wp_registration_url();
-			}
-
-			wp_redirect( $redirect_url, 301 );
-			die();
-		}
-	}
-
-	// tack on any additional query vars
-	$redirect['query'] = preg_replace( '#^\??&*?#', '', $redirect['query'] );
-	if ( $redirect_url && !empty($redirect['query']) ) {
-		parse_str( $redirect['query'], $_parsed_query );
-		$redirect = @parse_url($redirect_url);
-
-		if ( ! empty( $_parsed_query['name'] ) && ! empty( $redirect['query'] ) ) {
-			parse_str( $redirect['query'], $_parsed_redirect_query );
-
-			if ( empty( $_parsed_redirect_query['name'] ) )
-				unset( $_parsed_query['name'] );
-		}
-
-		$_parsed_query = rawurlencode_deep( $_parsed_query );
-		$redirect_url = add_query_arg( $_parsed_query, $redirect_url );
-	}
-
-	if ( $redirect_url )
-		$redirect = @parse_url($redirect_url);
-
-	// www.example.com vs example.com
-	$user_home = @parse_url(home_url());
-	if ( !empty($user_home['host']) )
-		$redirect['host'] = $user_home['host'];
-	if ( empty($user_home['path']) )
-		$user_home['path'] = '/';
-
-	// Handle ports
-	if ( !empty($user_home['port']) )
-		$redirect['port'] = $user_home['port'];
-	else
-		unset($redirect['port']);
-
-	// trailing /index.php
-	$redirect['path'] = preg_replace('|/' . preg_quote( $wp_rewrite->index, '|' ) . '/*?$|', '/', $redirect['path']);
-
-	// Remove trailing spaces from the path
-	$redirect['path'] = preg_replace( '#(%20| )+$#', '', $redirect['path'] );
-
-	if ( !empty( $redirect['query'] ) ) {
-		// Remove trailing spaces from certain terminating query string args
-		$redirect['query'] = preg_replace( '#((p|page_id|cat|tag)=[^&]*?)(%20| )+$#', '$1', $redirect['query'] );
-
-		// Clean up empty query strings
-		$redirect['query'] = trim(preg_replace( '#(^|&)(p|page_id|cat|tag)=?(&|$)#', '&', $redirect['query']), '&');
-
-		// Redirect obsolete feeds
-		$redirect['query'] = preg_replace( '#(^|&)feed=rss(&|$)#', '$1feed=rss2$2', $redirect['query'] );
-
-		// Remove redundant leading ampersands
-		$redirect['query'] = preg_replace( '#^\??&*?#', '', $redirect['query'] );
-	}
-
-	// strip /index.php/ when we're not using PATHINFO permalinks
-	if ( !$wp_rewrite->using_index_permalinks() )
-		$redirect['path'] = str_replace( '/' . $wp_rewrite->index . '/', '/', $redirect['path'] );
-
-	// trailing slashes
-	if ( is_object($wp_rewrite) && $wp_rewrite->using_permalinks() && !is_404() && (!is_front_page() || ( is_front_page() && (get_query_var('paged') > 1) ) ) ) {
-		$user_ts_type = '';
-		if ( get_query_var('paged') > 0 ) {
-			$user_ts_type = 'paged';
-		} else {
-			foreach ( array('single', 'category', 'page', 'day', 'month', 'year', 'home') as $type ) {
-				$func = 'is_' . $type;
-				if ( call_user_func($func) ) {
-					$user_ts_type = $type;
-					break;
-				}
-			}
-		}
-		$redirect['path'] = user_trailingslashit($redirect['path'], $user_ts_type);
-	} elseif ( is_front_page() ) {
-		$redirect['path'] = trailingslashit($redirect['path']);
-	}
-
-	// Strip multiple slashes out of the URL
-	if ( strpos($redirect['path'], '//') > -1 )
-		$redirect['path'] = preg_replace('|/+|', '/', $redirect['path']);
-
-	// Always trailing slash the Front Page URL
-	if ( trailingslashit( $redirect['path'] ) == trailingslashit( $user_home['path'] ) )
-		$redirect['path'] = trailingslashit($redirect['path']);
-
-	// Ignore differences in host capitalization, as this can lead to infinite redirects
-	// Only redirect no-www <=> yes-www
-	if ( strtolower($original['host']) == strtolower($redirect['host']) ||
-		( strtolower($original['host']) != 'www.' . strtolower($redirect['host']) && 'www.' . strtolower($original['host']) != strtolower($redirect['host']) ) )
-		$redirect['host'] = $original['host'];
-
-	$compare_original = array( $original['host'], $original['path'] );
-
-	if ( !empty( $original['port'] ) )
-		$compare_original[] = $original['port'];
-
-	if ( !empty( $original['query'] ) )
-		$compare_original[] = $original['query'];
-
-	$compare_redirect = array( $redirect['host'], $redirect['path'] );
-
-	if ( !empty( $redirect['port'] ) )
-		$compare_redirect[] = $redirect['port'];
-
-	if ( !empty( $redirect['query'] ) )
-		$compare_redirect[] = $redirect['query'];
-
-	if ( $compare_original !== $compare_redirect ) {
-		$redirect_url = $redirect['scheme'] . '://' . $redirect['host'];
-		if ( !empty($redirect['port']) )
-			$redirect_url .= ':' . $redirect['port'];
-		$redirect_url .= $redirect['path'];
-		if ( !empty($redirect['query']) )
-			$redirect_url .= '?' . $redirect['query'];
-	}
-
-	if ( ! $redirect_url || $redirect_url == $requested_url ) {
-		return;
-	}
-
-	// Hex encoded octets are case-insensitive.
-	if ( false !== strpos($requested_url, '%') ) {
-		if ( !function_exists('lowercase_octets') ) {
-			/**
-			 * Converts the first hex-encoded octet match to lowercase.
-			 *
-			 * @since 3.1.0
-			 * @ignore
-			 *
-			 * @param array $matches Hex-encoded octet matches for the requested URL.
-			 * @return string Lowercased version of the first match.
-			 */
-			function lowercase_octets($matches) {
-				return strtolower( $matches[0] );
-			}
-		}
-		$requested_url = preg_replace_callback('|%[a-fA-F0-9][a-fA-F0-9]|', 'lowercase_octets', $requested_url);
-	}
-
-	/**
-	 * Filters the canonical redirect URL.
-	 *
-	 * Returning false to this filter will cancel the redirect.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param string $redirect_url  The redirect URL.
-	 * @param string $requested_url The requested URL.
-	 */
-	$redirect_url = apply_filters( 'redirect_canonical', $redirect_url, $requested_url );
-
-	// yes, again -- in case the filter aborted the request
-	if ( ! $redirect_url || strip_fragment_from_url( $redirect_url ) == strip_fragment_from_url( $requested_url ) ) {
-		return;
-	}
-
-	if ( $do_redirect ) {
-		// protect against chained redirects
-		if ( !redirect_canonical($redirect_url, false) ) {
-			wp_redirect($redirect_url, 301);
-			exit();
-		} else {
-			// Debug
-			// die("1: $redirect_url<br />2: " . redirect_canonical( $redirect_url, false ) );
-			return;
-		}
-	} else {
-		return $redirect_url;
-	}
-}
-
-/**
- * Removes arguments from a query string if they are not present in a URL
- * DO NOT use this in plugin code.
- *
- * @since 3.4.0
- * @access private
- *
- * @param string $query_string
- * @param array $args_to_check
- * @param string $url
- * @return string The altered query string
- */
-function _remove_qs_args_if_not_in_url( $query_string, Array $args_to_check, $url ) {
-	$parsed_url = @parse_url( $url );
-	if ( ! empty( $parsed_url['query'] ) ) {
-		parse_str( $parsed_url['query'], $parsed_query );
-		foreach ( $args_to_check as $qv ) {
-			if ( !isset( $parsed_query[$qv] ) )
-				$query_string = remove_query_arg( $qv, $query_string );
-		}
-	} else {
-		$query_string = remove_query_arg( $args_to_check, $query_string );
-	}
-	return $query_string;
-}
-
-/**
- * Strips the #fragment from a URL, if one is present.
- *
- * @since 4.4.0
- *
- * @param string $url The URL to strip.
- * @return string The altered URL.
- */
-function strip_fragment_from_url( $url ) {
-	$parsed_url = @parse_url( $url );
-	if ( ! empty( $parsed_url['host'] ) ) {
-		// This mirrors code in redirect_canonical(). It does not handle every case.
-		$url = $parsed_url['scheme'] . '://' . $parsed_url['host'];
-		if ( ! empty( $parsed_url['port'] ) ) {
-			$url .= ':' . $parsed_url['port'];
-		}
-		$url .= $parsed_url['path'];
-		if ( ! empty( $parsed_url['query'] ) ) {
-			$url .= '?' . $parsed_url['query'];
-		}
-	}
-
-	return $url;
-}
-
-/**
- * Attempts to guess the correct URL based on query vars
- *
- * @since 2.3.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @return false|string The correct URL if one is found. False on failure.
- */
-function redirect_guess_404_permalink() {
-	global $wpdb;
-
-	if ( get_query_var('name') ) {
-		$where = $wpdb->prepare("post_name LIKE %s", $wpdb->esc_like( get_query_var('name') ) . '%');
-
-		// if any of post_type, year, monthnum, or day are set, use them to refine the query
-		if ( get_query_var('post_type') )
-			$where .= $wpdb->prepare(" AND post_type = %s", get_query_var('post_type'));
-		else
-			$where .= " AND post_type IN ('" . implode( "', '", get_post_types( array( 'public' => true ) ) ) . "')";
-
-		if ( get_query_var('year') )
-			$where .= $wpdb->prepare(" AND YEAR(post_date) = %d", get_query_var('year'));
-		if ( get_query_var('monthnum') )
-			$where .= $wpdb->prepare(" AND MONTH(post_date) = %d", get_query_var('monthnum'));
-		if ( get_query_var('day') )
-			$where .= $wpdb->prepare(" AND DAYOFMONTH(post_date) = %d", get_query_var('day'));
-
-		$post_id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE $where AND post_status = 'publish'");
-		if ( ! $post_id )
-			return false;
-		if ( get_query_var( 'feed' ) )
-			return get_post_comments_feed_link( $post_id, get_query_var( 'feed' ) );
-		elseif ( get_query_var( 'page' ) && 1 < get_query_var( 'page' ) )
-			return trailingslashit( get_permalink( $post_id ) ) . user_trailingslashit( get_query_var( 'page' ), 'single_paged' );
-		else
-			return get_permalink( $post_id );
-	}
-
-	return false;
-}
-
-/**
- * Redirects a variety of shorthand URLs to the admin.
- *
- * If a user visits example.com/admin, they'll be redirected to /wp-admin.
- * Visiting /login redirects to /wp-login.php, and so on.
- *
- * @since 3.4.0
- *
- * @global WP_Rewrite $wp_rewrite
- */
-function wp_redirect_admin_locations() {
-	global $wp_rewrite;
-	if ( ! ( is_404() && $wp_rewrite->using_permalinks() ) )
-		return;
-
-	$admins = array(
-		home_url( 'wp-admin', 'relative' ),
-		home_url( 'dashboard', 'relative' ),
-		home_url( 'admin', 'relative' ),
-		site_url( 'dashboard', 'relative' ),
-		site_url( 'admin', 'relative' ),
-	);
-	if ( in_array( untrailingslashit( $_SERVER['REQUEST_URI'] ), $admins ) ) {
-		wp_redirect( admin_url() );
-		exit;
-	}
-
-	$logins = array(
-		home_url( 'wp-login.php', 'relative' ),
-		home_url( 'login', 'relative' ),
-		site_url( 'login', 'relative' ),
-	);
-	if ( in_array( untrailingslashit( $_SERVER['REQUEST_URI'] ), $logins ) ) {
-		wp_redirect( wp_login_url() );
-		exit;
-	}
-}
Index: www/wp-includes/class-wp.php
===================================================================
--- www/wp-includes/class-wp.php	(revision 38565)
+++ www/wp-includes/autoload/WP.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/requests/Exception/HTTP/404.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/404.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/404.php	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-<?php
-/**
- * Exception for 404 Not Found responses
- *
- * @package Requests
- */
-
-/**
- * Exception for 404 Not Found responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_404 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 404;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Not Found';
-}
\ No newline at end of file
Index: www/wp-includes/revision.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/revision.php	(revision 38565)
+++ www/wp-includes/revision.php	(revision 38565)
@@ -1,726 +0,0 @@
-<?php
-/**
- * Post revision functions.
- *
- * @package WordPress
- * @subpackage Post_Revisions
- */
-
-/**
- * Determines which fields of posts are to be saved in revisions.
- *
- * @since 2.6.0
- * @since 4.5.0 A `WP_Post` object can now be passed to the `$post` parameter.
- * @since 4.5.0 The optional `$autosave` parameter was deprecated and renamed to `$deprecated`.
- * @access private
- *
- * @staticvar array $fields
- *
- * @param array|WP_Post $post       Optional. A post array or a WP_Post object being processed
- *                                  for insertion as a post revision. Default empty array.
- * @param bool          $deprecated Not used.
- * @return array Array of fields that can be versioned.
- */
-function _wp_post_revision_fields( $post = array(), $deprecated = false ) {
-	static $fields = null;
-
-	if ( ! is_array( $post ) ) {
-		$post = get_post( $post, ARRAY_A );
-	}
-
-	if ( is_null( $fields ) ) {
-		// Allow these to be versioned
-		$fields = array(
-			'post_title' => __( 'Title' ),
-			'post_content' => __( 'Content' ),
-			'post_excerpt' => __( 'Excerpt' ),
-		);
-	}
-
-	/**
-	 * Filters the list of fields saved in post revisions.
-	 *
-	 * Included by default: 'post_title', 'post_content' and 'post_excerpt'.
-	 *
-	 * Disallowed fields: 'ID', 'post_name', 'post_parent', 'post_date',
-	 * 'post_date_gmt', 'post_status', 'post_type', 'comment_count',
-	 * and 'post_author'.
-	 *
-	 * @since 2.6.0
-	 * @since 4.5.0 The `$post` parameter was added.
-	 *
-	 * @param array $fields List of fields to revision. Contains 'post_title',
-	 *                      'post_content', and 'post_excerpt' by default.
-	 * @param array $post   A post array being processed for insertion as a post revision.
-	 */
-	$fields = apply_filters( '_wp_post_revision_fields', $fields, $post );
-
-	// WP uses these internally either in versioning or elsewhere - they cannot be versioned
-	foreach ( array( 'ID', 'post_name', 'post_parent', 'post_date', 'post_date_gmt', 'post_status', 'post_type', 'comment_count', 'post_author' ) as $protect ) {
-		unset( $fields[ $protect ] );
-	}
-
-
-	return $fields;
-}
-
-/**
- * Returns a post array ready to be inserted into the posts table as a post revision.
- *
- * @since 4.5.0
- * @access private
- *
- * @param array|WP_Post $post     Optional. A post array or a WP_Post object to be processed
- *                                for insertion as a post revision. Default empty array.
- * @param bool          $autosave Optional. Is the revision an autosave? Default false.
- * @return array Post array ready to be inserted as a post revision.
- */
-function _wp_post_revision_data( $post = array(), $autosave = false ) {
-	if ( ! is_array( $post ) ) {
-		$post = get_post( $post, ARRAY_A );
-	}
-
-	$fields = _wp_post_revision_fields( $post );
-
-	$revision_data = array();
-
-	foreach ( array_intersect( array_keys( $post ), array_keys( $fields ) ) as $field ) {
-		$revision_data[ $field ] = $post[ $field ];
-	}
-
-	$revision_data['post_parent']   = $post['ID'];
-	$revision_data['post_status']   = 'inherit';
-	$revision_data['post_type']     = 'revision';
-	$revision_data['post_name']     = $autosave ? "$post[ID]-autosave-v1" : "$post[ID]-revision-v1"; // "1" is the revisioning system version
-	$revision_data['post_date']     = isset( $post['post_modified'] ) ? $post['post_modified'] : '';
-	$revision_data['post_date_gmt'] = isset( $post['post_modified_gmt'] ) ? $post['post_modified_gmt'] : '';
-
-	return $revision_data;
-}
-
-/**
- * Creates a revision for the current version of a post.
- *
- * Typically used immediately after a post update, as every update is a revision,
- * and the most recent revision always matches the current post.
- *
- * @since 2.6.0
- *
- * @param int $post_id The ID of the post to save as a revision.
- * @return int|WP_Error|void Void or 0 if error, new revision ID, if success.
- */
-function wp_save_post_revision( $post_id ) {
-	if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
-		return;
-
-	if ( ! $post = get_post( $post_id ) )
-		return;
-
-	if ( ! post_type_supports( $post->post_type, 'revisions' ) )
-		return;
-
-	if ( 'auto-draft' == $post->post_status )
-		return;
-
-	if ( ! wp_revisions_enabled( $post ) )
-		return;
-
-	// Compare the proposed update with the last stored revision verifying that
-	// they are different, unless a plugin tells us to always save regardless.
-	// If no previous revisions, save one
-	if ( $revisions = wp_get_post_revisions( $post_id ) ) {
-		// grab the last revision, but not an autosave
-		foreach ( $revisions as $revision ) {
-			if ( false !== strpos( $revision->post_name, "{$revision->post_parent}-revision" ) ) {
-				$last_revision = $revision;
-				break;
-			}
-		}
-
-		/**
-		 * Filters whether the post has changed since the last revision.
-		 *
-		 * By default a revision is saved only if one of the revisioned fields has changed.
-		 * This filter can override that so a revision is saved even if nothing has changed.
-		 *
-		 * @since 3.6.0
-		 *
-		 * @param bool    $check_for_changes Whether to check for changes before saving a new revision.
-		 *                                   Default true.
-		 * @param WP_Post $last_revision     The last revision post object.
-		 * @param WP_Post $post              The post object.
-		 *
-		 */
-		if ( isset( $last_revision ) && apply_filters( 'wp_save_post_revision_check_for_changes', $check_for_changes = true, $last_revision, $post ) ) {
-			$post_has_changed = false;
-
-			foreach ( array_keys( _wp_post_revision_fields( $post ) ) as $field ) {
-				if ( normalize_whitespace( $post->$field ) != normalize_whitespace( $last_revision->$field ) ) {
-					$post_has_changed = true;
-					break;
-				}
-			}
-
-			/**
-			 * Filters whether a post has changed.
-			 *
-			 * By default a revision is saved only if one of the revisioned fields has changed.
-			 * This filter allows for additional checks to determine if there were changes.
-			 *
-			 * @since 4.1.0
-			 *
-			 * @param bool    $post_has_changed Whether the post has changed.
-			 * @param WP_Post $last_revision    The last revision post object.
-			 * @param WP_Post $post             The post object.
-			 *
-			 */
-			$post_has_changed = (bool) apply_filters( 'wp_save_post_revision_post_has_changed', $post_has_changed, $last_revision, $post );
-
-			//don't save revision if post unchanged
-			if ( ! $post_has_changed ) {
-				return;
-			}
-		}
-	}
-
-	$return = _wp_put_post_revision( $post );
-
-	// If a limit for the number of revisions to keep has been set,
-	// delete the oldest ones.
-	$revisions_to_keep = wp_revisions_to_keep( $post );
-
-	if ( $revisions_to_keep < 0 )
-		return $return;
-
-	$revisions = wp_get_post_revisions( $post_id, array( 'order' => 'ASC' ) );
-
-	$delete = count($revisions) - $revisions_to_keep;
-
-	if ( $delete < 1 )
-		return $return;
-
-	$revisions = array_slice( $revisions, 0, $delete );
-
-	for ( $i = 0; isset( $revisions[$i] ); $i++ ) {
-		if ( false !== strpos( $revisions[ $i ]->post_name, 'autosave' ) )
-			continue;
-
-		wp_delete_post_revision( $revisions[ $i ]->ID );
-	}
-
-	return $return;
-}
-
-/**
- * Retrieve the autosaved data of the specified post.
- *
- * Returns a post object containing the information that was autosaved for the
- * specified post. If the optional $user_id is passed, returns the autosave for that user
- * otherwise returns the latest autosave.
- *
- * @since 2.6.0
- *
- * @param int $post_id The post ID.
- * @param int $user_id Optional The post author ID.
- * @return WP_Post|false The autosaved data or false on failure or when no autosave exists.
- */
-function wp_get_post_autosave( $post_id, $user_id = 0 ) {
-	$revisions = wp_get_post_revisions( $post_id, array( 'check_enabled' => false ) );
-
-	foreach ( $revisions as $revision ) {
-		if ( false !== strpos( $revision->post_name, "{$post_id}-autosave" ) ) {
-			if ( $user_id && $user_id != $revision->post_author )
-				continue;
-
-			return $revision;
-		}
-	}
-
-	return false;
-}
-
-/**
- * Determines if the specified post is a revision.
- *
- * @since 2.6.0
- *
- * @param int|WP_Post $post Post ID or post object.
- * @return false|int False if not a revision, ID of revision's parent otherwise.
- */
-function wp_is_post_revision( $post ) {
-	if ( !$post = wp_get_post_revision( $post ) )
-		return false;
-
-	return (int) $post->post_parent;
-}
-
-/**
- * Determines if the specified post is an autosave.
- *
- * @since 2.6.0
- *
- * @param int|WP_Post $post Post ID or post object.
- * @return false|int False if not a revision, ID of autosave's parent otherwise
- */
-function wp_is_post_autosave( $post ) {
-	if ( !$post = wp_get_post_revision( $post ) )
-		return false;
-
-	if ( false !== strpos( $post->post_name, "{$post->post_parent}-autosave" ) )
-		return (int) $post->post_parent;
-
-	return false;
-}
-
-/**
- * Inserts post data into the posts table as a post revision.
- *
- * @since 2.6.0
- * @access private
- *
- * @param int|WP_Post|array|null $post     Post ID, post object OR post array.
- * @param bool                   $autosave Optional. Is the revision an autosave?
- * @return int|WP_Error WP_Error or 0 if error, new revision ID if success.
- */
-function _wp_put_post_revision( $post = null, $autosave = false ) {
-	if ( is_object($post) )
-		$post = get_object_vars( $post );
-	elseif ( !is_array($post) )
-		$post = get_post($post, ARRAY_A);
-
-	if ( ! $post || empty($post['ID']) )
-		return new WP_Error( 'invalid_post', __( 'Invalid post ID.' ) );
-
-	if ( isset($post['post_type']) && 'revision' == $post['post_type'] )
-		return new WP_Error( 'post_type', __( 'Cannot create a revision of a revision' ) );
-
-	$post = _wp_post_revision_data( $post, $autosave );
-	$post = wp_slash($post); //since data is from db
-
-	$revision_id = wp_insert_post( $post );
-	if ( is_wp_error($revision_id) )
-		return $revision_id;
-
-	if ( $revision_id ) {
-		/**
-		 * Fires once a revision has been saved.
-		 *
-		 * @since 2.6.0
-		 *
-		 * @param int $revision_id Post revision ID.
-		 */
-		do_action( '_wp_put_post_revision', $revision_id );
-	}
-
-	return $revision_id;
-}
-
-/**
- * Gets a post revision.
- *
- * @since 2.6.0
- *
- * @param int|WP_Post $post   The post ID or object.
- * @param string      $output Optional. OBJECT, ARRAY_A, or ARRAY_N.
- * @param string      $filter Optional sanitation filter. See sanitize_post().
- * @return WP_Post|array|null Null if error or post object if success.
- */
-function wp_get_post_revision(&$post, $output = OBJECT, $filter = 'raw') {
-	if ( !$revision = get_post( $post, OBJECT, $filter ) )
-		return $revision;
-	if ( 'revision' !== $revision->post_type )
-		return null;
-
-	if ( $output == OBJECT ) {
-		return $revision;
-	} elseif ( $output == ARRAY_A ) {
-		$_revision = get_object_vars($revision);
-		return $_revision;
-	} elseif ( $output == ARRAY_N ) {
-		$_revision = array_values(get_object_vars($revision));
-		return $_revision;
-	}
-
-	return $revision;
-}
-
-/**
- * Restores a post to the specified revision.
- *
- * Can restore a past revision using all fields of the post revision, or only selected fields.
- *
- * @since 2.6.0
- *
- * @param int|WP_Post $revision_id Revision ID or revision object.
- * @param array       $fields      Optional. What fields to restore from. Defaults to all.
- * @return int|false|null Null if error, false if no fields to restore, (int) post ID if success.
- */
-function wp_restore_post_revision( $revision_id, $fields = null ) {
-	if ( !$revision = wp_get_post_revision( $revision_id, ARRAY_A ) )
-		return $revision;
-
-	if ( !is_array( $fields ) )
-		$fields = array_keys( _wp_post_revision_fields( $revision ) );
-
-	$update = array();
-	foreach ( array_intersect( array_keys( $revision ), $fields ) as $field ) {
-		$update[$field] = $revision[$field];
-	}
-
-	if ( !$update )
-		return false;
-
-	$update['ID'] = $revision['post_parent'];
-
-	$update = wp_slash( $update ); //since data is from db
-
-	$post_id = wp_update_post( $update );
-	if ( ! $post_id || is_wp_error( $post_id ) )
-		return $post_id;
-
-	// Update last edit user
-	update_post_meta( $post_id, '_edit_last', get_current_user_id() );
-
-	/**
-	 * Fires after a post revision has been restored.
-	 *
-	 * @since 2.6.0
-	 *
-	 * @param int $post_id     Post ID.
-	 * @param int $revision_id Post revision ID.
-	 */
-	do_action( 'wp_restore_post_revision', $post_id, $revision['ID'] );
-
-	return $post_id;
-}
-
-/**
- * Deletes a revision.
- *
- * Deletes the row from the posts table corresponding to the specified revision.
- *
- * @since 2.6.0
- *
- * @param int|WP_Post $revision_id Revision ID or revision object.
- * @return array|false|WP_Post|WP_Error|null Null or WP_Error if error, deleted post if success.
- */
-function wp_delete_post_revision( $revision_id ) {
-	if ( ! $revision = wp_get_post_revision( $revision_id ) ) {
-		return $revision;
-	}
-
-	$delete = wp_delete_post( $revision->ID );
-	if ( $delete ) {
-		/**
-		 * Fires once a post revision has been deleted.
-		 *
-		 * @since 2.6.0
-		 *
-		 * @param int          $revision_id Post revision ID.
-		 * @param object|array $revision    Post revision object or array.
-		 */
-		do_action( 'wp_delete_post_revision', $revision->ID, $revision );
-	}
-
-	return $delete;
-}
-
-/**
- * Returns all revisions of specified post.
- *
- * @since 2.6.0
- *
- * @see get_children()
- *
- * @param int|WP_Post $post_id Optional. Post ID or WP_Post object. Default is global `$post`.
- * @param array|null  $args    Optional. Arguments for retrieving post revisions. Default null.
- * @return array An array of revisions, or an empty array if none.
- */
-function wp_get_post_revisions( $post_id = 0, $args = null ) {
-	$post = get_post( $post_id );
-	if ( ! $post || empty( $post->ID ) )
-		return array();
-
-	$defaults = array( 'order' => 'DESC', 'orderby' => 'date ID', 'check_enabled' => true );
-	$args = wp_parse_args( $args, $defaults );
-
-	if ( $args['check_enabled'] && ! wp_revisions_enabled( $post ) )
-		return array();
-
-	$args = array_merge( $args, array( 'post_parent' => $post->ID, 'post_type' => 'revision', 'post_status' => 'inherit' ) );
-
-	if ( ! $revisions = get_children( $args ) )
-		return array();
-
-	return $revisions;
-}
-
-/**
- * Determine if revisions are enabled for a given post.
- *
- * @since 3.6.0
- *
- * @param WP_Post $post The post object.
- * @return bool True if number of revisions to keep isn't zero, false otherwise.
- */
-function wp_revisions_enabled( $post ) {
-	return wp_revisions_to_keep( $post ) !== 0;
-}
-
-/**
- * Determine how many revisions to retain for a given post.
- *
- * By default, an infinite number of revisions are kept.
- *
- * The constant WP_POST_REVISIONS can be set in wp-config to specify the limit
- * of revisions to keep.
- *
- * @since 3.6.0
- *
- * @param WP_Post $post The post object.
- * @return int The number of revisions to keep.
- */
-function wp_revisions_to_keep( $post ) {
-	$num = WP_POST_REVISIONS;
-
-	if ( true === $num )
-		$num = -1;
-	else
-		$num = intval( $num );
-
-	if ( ! post_type_supports( $post->post_type, 'revisions' ) )
-		$num = 0;
-
-	/**
-	 * Filters the number of revisions to save for the given post.
-	 *
-	 * Overrides the value of WP_POST_REVISIONS.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param int     $num  Number of revisions to store.
-	 * @param WP_Post $post Post object.
-	 */
-	return (int) apply_filters( 'wp_revisions_to_keep', $num, $post );
-}
-
-/**
- * Sets up the post object for preview based on the post autosave.
- *
- * @since 2.7.0
- * @access private
- *
- * @param WP_Post $post
- * @return WP_Post|false
- */
-function _set_preview( $post ) {
-	if ( ! is_object( $post ) ) {
-		return $post;
-	}
-
-	$preview = wp_get_post_autosave( $post->ID );
-	if ( ! is_object( $preview ) ) {
-		return $post;
-	}
-
-	$preview = sanitize_post( $preview );
-
-	$post->post_content = $preview->post_content;
-	$post->post_title = $preview->post_title;
-	$post->post_excerpt = $preview->post_excerpt;
-
-	add_filter( 'get_the_terms', '_wp_preview_terms_filter', 10, 3 );
-	add_filter( 'get_post_metadata', '_wp_preview_post_thumbnail_filter', 10, 3 );
-
-	return $post;
-}
-
-/**
- * Filters the latest content for preview from the post autosave.
- *
- * @since 2.7.0
- * @access private
- */
-function _show_post_preview() {
-	if ( isset($_GET['preview_id']) && isset($_GET['preview_nonce']) ) {
-		$id = (int) $_GET['preview_id'];
-
-		if ( false === wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $id ) )
-			wp_die( __('Sorry, you are not allowed to preview drafts.') );
-
-		add_filter('the_preview', '_set_preview');
-	}
-}
-
-/**
- * Filters terms lookup to set the post format.
- *
- * @since 3.6.0
- * @access private
- *
- * @param array  $terms
- * @param int    $post_id
- * @param string $taxonomy
- * @return array
- */
-function _wp_preview_terms_filter( $terms, $post_id, $taxonomy ) {
-	if ( ! $post = get_post() )
-		return $terms;
-
-	if ( empty( $_REQUEST['post_format'] ) || $post->ID != $post_id || 'post_format' != $taxonomy || 'revision' == $post->post_type )
-		return $terms;
-
-	if ( 'standard' == $_REQUEST['post_format'] )
-		$terms = array();
-	elseif ( $term = get_term_by( 'slug', 'post-format-' . sanitize_key( $_REQUEST['post_format'] ), 'post_format' ) )
-		$terms = array( $term ); // Can only have one post format
-
-	return $terms;
-}
-
-/**
- * Filters post thumbnail lookup to set the post thumbnail.
- *
- * @since 4.6.0
- * @access private
- *
- * @param null|array|string $value    The value to return - a single metadata value, or an array of values.
- * @param int               $post_id  Post ID.
- * @param string            $meta_key Meta key.
- * @return null|array The default return value or the post thumbnail meta array.
- */
-function _wp_preview_post_thumbnail_filter( $value, $post_id, $meta_key ) {
-	if ( ! $post = get_post() ) {
-		return $value;
-	}
-
-	if ( empty( $_REQUEST['_thumbnail_id'] ) ||
-	     empty( $_REQUEST['preview_id'] ) ||
-	     $post->ID != $post_id ||
-	     '_thumbnail_id' != $meta_key ||
-	     'revision' == $post->post_type ||
-	     $post_id != $_REQUEST['preview_id']
-	) {
-		return $value;
-	}
-
-	$thumbnail_id = intval( $_REQUEST['_thumbnail_id'] );
-	if ( $thumbnail_id <= 0 ) {
-		return '';
-	}
-
-	return strval( $thumbnail_id );
-}
-
-/**
- * Gets the post revision version.
- *
- * @since 3.6.0
- * @access private
- *
- * @param WP_Post $revision
- * @return int|false
- */
-function _wp_get_post_revision_version( $revision ) {
-	if ( is_object( $revision ) )
-		$revision = get_object_vars( $revision );
-	elseif ( !is_array( $revision ) )
-		return false;
-
-	if ( preg_match( '/^\d+-(?:autosave|revision)-v(\d+)$/', $revision['post_name'], $matches ) )
-		return (int) $matches[1];
-
-	return 0;
-}
-
-/**
- * Upgrade the revisions author, add the current post as a revision and set the revisions version to 1
- *
- * @since 3.6.0
- * @access private
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param WP_Post $post      Post object
- * @param array   $revisions Current revisions of the post
- * @return bool true if the revisions were upgraded, false if problems
- */
-function _wp_upgrade_revisions_of_post( $post, $revisions ) {
-	global $wpdb;
-
-	// Add post option exclusively
-	$lock = "revision-upgrade-{$post->ID}";
-	$now = time();
-	$result = $wpdb->query( $wpdb->prepare( "INSERT IGNORE INTO `$wpdb->options` (`option_name`, `option_value`, `autoload`) VALUES (%s, %s, 'no') /* LOCK */", $lock, $now ) );
-	if ( ! $result ) {
-		// If we couldn't get a lock, see how old the previous lock is
-		$locked = get_option( $lock );
-		if ( ! $locked ) {
-			// Can't write to the lock, and can't read the lock.
-			// Something broken has happened
-			return false;
-		}
-
-		if ( $locked > $now - 3600 ) {
-			// Lock is not too old: some other process may be upgrading this post.  Bail.
-			return false;
-		}
-
-		// Lock is too old - update it (below) and continue
-	}
-
-	// If we could get a lock, re-"add" the option to fire all the correct filters.
-	update_option( $lock, $now );
-
-	reset( $revisions );
-	$add_last = true;
-
-	do {
-		$this_revision = current( $revisions );
-		$prev_revision = next( $revisions );
-
-		$this_revision_version = _wp_get_post_revision_version( $this_revision );
-
-		// Something terrible happened
-		if ( false === $this_revision_version )
-			continue;
-
-		// 1 is the latest revision version, so we're already up to date.
-		// No need to add a copy of the post as latest revision.
-		if ( 0 < $this_revision_version ) {
-			$add_last = false;
-			continue;
-		}
-
-		// Always update the revision version
-		$update = array(
-			'post_name' => preg_replace( '/^(\d+-(?:autosave|revision))[\d-]*$/', '$1-v1', $this_revision->post_name ),
-		);
-
-		// If this revision is the oldest revision of the post, i.e. no $prev_revision,
-		// the correct post_author is probably $post->post_author, but that's only a good guess.
-		// Update the revision version only and Leave the author as-is.
-		if ( $prev_revision ) {
-			$prev_revision_version = _wp_get_post_revision_version( $prev_revision );
-
-			// If the previous revision is already up to date, it no longer has the information we need :(
-			if ( $prev_revision_version < 1 )
-				$update['post_author'] = $prev_revision->post_author;
-		}
-
-		// Upgrade this revision
-		$result = $wpdb->update( $wpdb->posts, $update, array( 'ID' => $this_revision->ID ) );
-
-		if ( $result )
-			wp_cache_delete( $this_revision->ID, 'posts' );
-
-	} while ( $prev_revision );
-
-	delete_option( $lock );
-
-	// Add a copy of the post as latest revision.
-	if ( $add_last )
-		wp_save_post_revision( $post->ID );
-
-	return true;
-}
Index: www/wp-admin/includes/class-wp-users-list-table.php
===================================================================
--- www/wp-admin/includes/class-wp-users-list-table.php	(revision 38565)
+++ www/wp-admin/autoload/list-table/WP_Users_List_Table.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-text-diff-renderer-table.php
===================================================================
--- www/wp-includes/class-wp-text-diff-renderer-table.php	(revision 38565)
+++ www/wp-includes/autoload/WP_Text_Diff_Renderer_Table.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/admin-header.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/admin-header.php	(revision 38565)
+++ www/wp-admin/admin-header.php	(revision 38565)
@@ -1,260 +0,0 @@
-<?php
-/**
- * WordPress Administration Template Header
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
-if ( ! defined( 'WP_ADMIN' ) )
-	require_once( dirname( __FILE__ ) . '/admin.php' );
-
-/**
- * In case admin-header.php is included in a function.
- *
- * @global string    $title
- * @global string    $hook_suffix
- * @global WP_Screen $current_screen
- * @global WP_Locale $wp_locale
- * @global string    $pagenow
- * @global string    $update_title
- * @global int       $total_update_count
- * @global string    $parent_file
- */
-global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow,
-	$update_title, $total_update_count, $parent_file;
-
-// Catch plugins that include admin-header.php before admin.php completes.
-if ( empty( $current_screen ) )
-	set_current_screen();
-
-get_admin_page_title();
-$title = esc_html( strip_tags( $title ) );
-
-if ( is_network_admin() )
-	$admin_title = sprintf( __( 'Network Admin: %s' ), esc_html( get_current_site()->site_name ) );
-elseif ( is_user_admin() )
-	$admin_title = sprintf( __( 'User Dashboard: %s' ), esc_html( get_current_site()->site_name ) );
-else
-	$admin_title = get_bloginfo( 'name' );
-
-if ( $admin_title == $title )
-	$admin_title = sprintf( __( '%1$s &#8212; WordPress' ), $title );
-else
-	$admin_title = sprintf( __( '%1$s &lsaquo; %2$s &#8212; WordPress' ), $title, $admin_title );
-
-/**
- * Filters the title tag content for an admin page.
- *
- * @since 3.1.0
- *
- * @param string $admin_title The page title, with extra context added.
- * @param string $title       The original page title.
- */
-$admin_title = apply_filters( 'admin_title', $admin_title, $title );
-
-wp_user_settings();
-
-_wp_admin_html_begin();
-?>
-<title><?php echo $admin_title; ?></title>
-<?php
-
-wp_enqueue_style( 'colors' );
-wp_enqueue_style( 'ie' );
-wp_enqueue_script('utils');
-wp_enqueue_script( 'svg-painter' );
-
-$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
-?>
-<script type="text/javascript">
-addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
-var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>',
-	pagenow = '<?php echo $current_screen->id; ?>',
-	typenow = '<?php echo $current_screen->post_type; ?>',
-	adminpage = '<?php echo $admin_body_class; ?>',
-	thousandsSeparator = '<?php echo addslashes( $wp_locale->number_format['thousands_sep'] ); ?>',
-	decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>',
-	isRtl = <?php echo (int) is_rtl(); ?>;
-</script>
-<meta name="viewport" content="width=device-width,initial-scale=1.0">
-<?php
-
-/**
- * Enqueue scripts for all admin pages.
- *
- * @since 2.8.0
- *
- * @param string $hook_suffix The current admin page.
- */
-do_action( 'admin_enqueue_scripts', $hook_suffix );
-
-/**
- * Fires when styles are printed for a specific admin page based on $hook_suffix.
- *
- * @since 2.6.0
- */
-do_action( "admin_print_styles-{$hook_suffix}" );
-
-/**
- * Fires when styles are printed for all admin pages.
- *
- * @since 2.6.0
- */
-do_action( 'admin_print_styles' );
-
-/**
- * Fires when scripts are printed for a specific admin page based on $hook_suffix.
- *
- * @since 2.1.0
- */
-do_action( "admin_print_scripts-{$hook_suffix}" );
-
-/**
- * Fires when scripts are printed for all admin pages.
- *
- * @since 2.1.0
- */
-do_action( 'admin_print_scripts' );
-
-/**
- * Fires in head section for a specific admin page.
- *
- * The dynamic portion of the hook, `$hook_suffix`, refers to the hook suffix
- * for the admin page.
- *
- * @since 2.1.0
- */
-do_action( "admin_head-{$hook_suffix}" );
-
-/**
- * Fires in head section for all admin pages.
- *
- * @since 2.1.0
- */
-do_action( 'admin_head' );
-
-if ( get_user_setting('mfold') == 'f' )
-	$admin_body_class .= ' folded';
-
-if ( !get_user_setting('unfold') )
-	$admin_body_class .= ' auto-fold';
-
-if ( is_admin_bar_showing() )
-	$admin_body_class .= ' admin-bar';
-
-if ( is_rtl() )
-	$admin_body_class .= ' rtl';
-
-if ( $current_screen->post_type )
-	$admin_body_class .= ' post-type-' . $current_screen->post_type;
-
-if ( $current_screen->taxonomy )
-	$admin_body_class .= ' taxonomy-' . $current_screen->taxonomy;
-
-$admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( get_bloginfo( 'version' ) ) );
-$admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0-9]+).*/', '$1', get_bloginfo( 'version' ) ) );
-$admin_body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' );
-$admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
-
-if ( wp_is_mobile() )
-	$admin_body_class .= ' mobile';
-
-if ( is_multisite() )
-	$admin_body_class .= ' multisite';
-
-if ( is_network_admin() )
-	$admin_body_class .= ' network-admin';
-
-$admin_body_class .= ' no-customize-support no-svg';
-
-?>
-</head>
-<?php
-/**
- * Filters the CSS classes for the body tag in the admin.
- *
- * This filter differs from the {@see 'post_class'} and {@see 'body_class'} filters
- * in two important ways:
- *
- * 1. `$classes` is a space-separated string of class names instead of an array.
- * 2. Not all core admin classes are filterable, notably: wp-admin, wp-core-ui,
- *    and no-js cannot be removed.
- *
- * @since 2.3.0
- *
- * @param string $classes Space-separated list of CSS classes.
- */
-$admin_body_classes = apply_filters( 'admin_body_class', '' );
-?>
-<body class="wp-admin wp-core-ui no-js <?php echo $admin_body_classes . ' ' . $admin_body_class; ?>">
-<script type="text/javascript">
-	document.body.className = document.body.className.replace('no-js','js');
-</script>
-
-<?php
-// Make sure the customize body classes are correct as early as possible.
-if ( current_user_can( 'customize' ) ) {
-	wp_customize_support_script();
-}
-?>
-
-<div id="wpwrap">
-<?php require(ABSPATH . 'wp-admin/menu-header.php'); ?>
-<div id="wpcontent">
-
-<?php
-/**
- * Fires at the beginning of the content section in an admin page.
- *
- * @since 3.0.0
- */
-do_action( 'in_admin_header' );
-?>
-
-<div id="wpbody" role="main">
-<?php
-unset($title_class, $blog_name, $total_update_count, $update_title);
-
-$current_screen->set_parentage( $parent_file );
-
-?>
-
-<div id="wpbody-content" aria-label="<?php esc_attr_e('Main content'); ?>" tabindex="0">
-<?php
-
-$current_screen->render_screen_meta();
-
-if ( is_network_admin() ) {
-	/**
-	 * Prints network admin screen notices.
-	 *
-	 * @since 3.1.0
-	 */
-	do_action( 'network_admin_notices' );
-} elseif ( is_user_admin() ) {
-	/**
-	 * Prints user admin screen notices.
-	 *
-	 * @since 3.1.0
-	 */
-	do_action( 'user_admin_notices' );
-} else {
-	/**
-	 * Prints admin screen notices.
-	 *
-	 * @since 3.1.0
-	 */
-	do_action( 'admin_notices' );
-}
-
-/**
- * Prints generic admin screen notices.
- *
- * @since 3.1.0
- */
-do_action( 'all_admin_notices' );
-
-if ( $parent_file == 'options-general.php' )
-	require(ABSPATH . 'wp-admin/options-head.php');
Index: www/wp-includes/autoload/requests/Exception/HTTP/401.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/401.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/401.php	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-<?php
-/**
- * Exception for 401 Unauthorized responses
- *
- * @package Requests
- */
-
-/**
- * Exception for 401 Unauthorized responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_401 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 401;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Unauthorized';
-}
\ No newline at end of file
Index: www/wp-includes/autoload/simplepie/Cache/MySQL.php
===================================================================
--- www/wp-includes/autoload/simplepie/Cache/MySQL.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/simplepie/Cache/MySQL.php	(revision UNDEFINED)
@@ -1,438 +0,0 @@
-<?php
-/**
- * SimplePie
- *
- * A PHP-Based RSS and Atom Feed Framework.
- * Takes the hard work out of managing a complete RSS/Atom solution.
- *
- * Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 	* Redistributions of source code must retain the above copyright notice, this list of
- * 	  conditions and the following disclaimer.
- *
- * 	* Redistributions in binary form must reproduce the above copyright notice, this list
- * 	  of conditions and the following disclaimer in the documentation and/or other materials
- * 	  provided with the distribution.
- *
- * 	* Neither the name of the SimplePie Team nor the names of its contributors may be used
- * 	  to endorse or promote products derived from this software without specific prior
- * 	  written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
- * AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * @package SimplePie
- * @version 1.3.1
- * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
- * @author Ryan Parman
- * @author Geoffrey Sneddon
- * @author Ryan McCue
- * @link http://simplepie.org/ SimplePie
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
- */
-
-/**
- * Caches data to a MySQL database
- *
- * Registered for URLs with the "mysql" protocol
- *
- * For example, `mysql://root:password@localhost:3306/mydb?prefix=sp_` will
- * connect to the `mydb` database on `localhost` on port 3306, with the user
- * `root` and the password `password`. All tables will be prefixed with `sp_`
- *
- * @package SimplePie
- * @subpackage Caching
- */
-class SimplePie_Cache_MySQL extends SimplePie_Cache_DB
-{
-	/**
-	 * PDO instance
-	 *
-	 * @var PDO
-	 */
-	protected $mysql;
-
-	/**
-	 * Options
-	 *
-	 * @var array
-	 */
-	protected $options;
-
-	/**
-	 * Cache ID
-	 *
-	 * @var string
-	 */
-	protected $id;
-
-	/**
-	 * Create a new cache object
-	 *
-	 * @param string $location Location string (from SimplePie::$cache_location)
-	 * @param string $name Unique ID for the cache
-	 * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
-	 */
-	public function __construct($location, $name, $type)
-	{
-		$this->options = array(
-			'user' => null,
-			'pass' => null,
-			'host' => '127.0.0.1',
-			'port' => '3306',
-			'path' => '',
-			'extras' => array(
-				'prefix' => '',
-			),
-		);
-		$this->options = array_merge_recursive($this->options, SimplePie_Cache::parse_URL($location));
-
-		// Path is prefixed with a "/"
-		$this->options['dbname'] = substr($this->options['path'], 1);
-
-		try
-		{
-			$this->mysql = new PDO("mysql:dbname={$this->options['dbname']};host={$this->options['host']};port={$this->options['port']}", $this->options['user'], $this->options['pass'], array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));
-		}
-		catch (PDOException $e)
-		{
-			$this->mysql = null;
-			return;
-		}
-
-		$this->id = $name . $type;
-
-		if (!$query = $this->mysql->query('SHOW TABLES'))
-		{
-			$this->mysql = null;
-			return;
-		}
-
-		$db = array();
-		while ($row = $query->fetchColumn())
-		{
-			$db[] = $row;
-		}
-
-		if (!in_array($this->options['extras']['prefix'] . 'cache_data', $db))
-		{
-			$query = $this->mysql->exec('CREATE TABLE `' . $this->options['extras']['prefix'] . 'cache_data` (`id` TEXT CHARACTER SET utf8 NOT NULL, `items` SMALLINT NOT NULL DEFAULT 0, `data` BLOB NOT NULL, `mtime` INT UNSIGNED NOT NULL, UNIQUE (`id`(125)))');
-			if ($query === false)
-			{
-				$this->mysql = null;
-			}
-		}
-
-		if (!in_array($this->options['extras']['prefix'] . 'items', $db))
-		{
-			$query = $this->mysql->exec('CREATE TABLE `' . $this->options['extras']['prefix'] . 'items` (`feed_id` TEXT CHARACTER SET utf8 NOT NULL, `id` TEXT CHARACTER SET utf8 NOT NULL, `data` TEXT CHARACTER SET utf8 NOT NULL, `posted` INT UNSIGNED NOT NULL, INDEX `feed_id` (`feed_id`(125)))');
-			if ($query === false)
-			{
-				$this->mysql = null;
-			}
-		}
-	}
-
-	/**
-	 * Save data to the cache
-	 *
-	 * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
-	 * @return bool Successfulness
-	 */
-	public function save($data)
-	{
-		if ($this->mysql === null)
-		{
-			return false;
-		}
-
-		if ($data instanceof SimplePie)
-		{
-			$data = clone $data;
-
-			$prepared = self::prepare_simplepie_object_for_cache($data);
-
-			$query = $this->mysql->prepare('SELECT COUNT(*) FROM `' . $this->options['extras']['prefix'] . 'cache_data` WHERE `id` = :feed');
-			$query->bindValue(':feed', $this->id);
-			if ($query->execute())
-			{
-				if ($query->fetchColumn() > 0)
-				{
-					$items = count($prepared[1]);
-					if ($items)
-					{
-						$sql = 'UPDATE `' . $this->options['extras']['prefix'] . 'cache_data` SET `items` = :items, `data` = :data, `mtime` = :time WHERE `id` = :feed';
-						$query = $this->mysql->prepare($sql);
-						$query->bindValue(':items', $items);
-					}
-					else
-					{
-						$sql = 'UPDATE `' . $this->options['extras']['prefix'] . 'cache_data` SET `data` = :data, `mtime` = :time WHERE `id` = :feed';
-						$query = $this->mysql->prepare($sql);
-					}
-
-					$query->bindValue(':data', $prepared[0]);
-					$query->bindValue(':time', time());
-					$query->bindValue(':feed', $this->id);
-					if (!$query->execute())
-					{
-						return false;
-					}
-				}
-				else
-				{
-					$query = $this->mysql->prepare('INSERT INTO `' . $this->options['extras']['prefix'] . 'cache_data` (`id`, `items`, `data`, `mtime`) VALUES(:feed, :count, :data, :time)');
-					$query->bindValue(':feed', $this->id);
-					$query->bindValue(':count', count($prepared[1]));
-					$query->bindValue(':data', $prepared[0]);
-					$query->bindValue(':time', time());
-					if (!$query->execute())
-					{
-						return false;
-					}
-				}
-
-				$ids = array_keys($prepared[1]);
-				if (!empty($ids))
-				{
-					foreach ($ids as $id)
-					{
-						$database_ids[] = $this->mysql->quote($id);
-					}
-
-					$query = $this->mysql->prepare('SELECT `id` FROM `' . $this->options['extras']['prefix'] . 'items` WHERE `id` = ' . implode(' OR `id` = ', $database_ids) . ' AND `feed_id` = :feed');
-					$query->bindValue(':feed', $this->id);
-
-					if ($query->execute())
-					{
-						$existing_ids = array();
-						while ($row = $query->fetchColumn())
-						{
-							$existing_ids[] = $row;
-						}
-
-						$new_ids = array_diff($ids, $existing_ids);
-
-						foreach ($new_ids as $new_id)
-						{
-							if (!($date = $prepared[1][$new_id]->get_date('U')))
-							{
-								$date = time();
-							}
-
-							$query = $this->mysql->prepare('INSERT INTO `' . $this->options['extras']['prefix'] . 'items` (`feed_id`, `id`, `data`, `posted`) VALUES(:feed, :id, :data, :date)');
-							$query->bindValue(':feed', $this->id);
-							$query->bindValue(':id', $new_id);
-							$query->bindValue(':data', serialize($prepared[1][$new_id]->data));
-							$query->bindValue(':date', $date);
-							if (!$query->execute())
-							{
-								return false;
-							}
-						}
-						return true;
-					}
-				}
-				else
-				{
-					return true;
-				}
-			}
-		}
-		else
-		{
-			$query = $this->mysql->prepare('SELECT `id` FROM `' . $this->options['extras']['prefix'] . 'cache_data` WHERE `id` = :feed');
-			$query->bindValue(':feed', $this->id);
-			if ($query->execute())
-			{
-				if ($query->rowCount() > 0)
-				{
-					$query = $this->mysql->prepare('UPDATE `' . $this->options['extras']['prefix'] . 'cache_data` SET `items` = 0, `data` = :data, `mtime` = :time WHERE `id` = :feed');
-					$query->bindValue(':data', serialize($data));
-					$query->bindValue(':time', time());
-					$query->bindValue(':feed', $this->id);
-					if ($this->execute())
-					{
-						return true;
-					}
-				}
-				else
-				{
-					$query = $this->mysql->prepare('INSERT INTO `' . $this->options['extras']['prefix'] . 'cache_data` (`id`, `items`, `data`, `mtime`) VALUES(:id, 0, :data, :time)');
-					$query->bindValue(':id', $this->id);
-					$query->bindValue(':data', serialize($data));
-					$query->bindValue(':time', time());
-					if ($query->execute())
-					{
-						return true;
-					}
-				}
-			}
-		}
-		return false;
-	}
-
-	/**
-	 * Retrieve the data saved to the cache
-	 *
-	 * @return array Data for SimplePie::$data
-	 */
-	public function load()
-	{
-		if ($this->mysql === null)
-		{
-			return false;
-		}
-
-		$query = $this->mysql->prepare('SELECT `items`, `data` FROM `' . $this->options['extras']['prefix'] . 'cache_data` WHERE `id` = :id');
-		$query->bindValue(':id', $this->id);
-		if ($query->execute() && ($row = $query->fetch()))
-		{
-			$data = unserialize($row[1]);
-
-			if (isset($this->options['items'][0]))
-			{
-				$items = (int) $this->options['items'][0];
-			}
-			else
-			{
-				$items = (int) $row[0];
-			}
-
-			if ($items !== 0)
-			{
-				if (isset($data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]))
-				{
-					$feed =& $data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0];
-				}
-				elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]))
-				{
-					$feed =& $data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0];
-				}
-				elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]))
-				{
-					$feed =& $data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0];
-				}
-				elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]))
-				{
-					$feed =& $data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0];
-				}
-				else
-				{
-					$feed = null;
-				}
-
-				if ($feed !== null)
-				{
-					$sql = 'SELECT `data` FROM `' . $this->options['extras']['prefix'] . 'items` WHERE `feed_id` = :feed ORDER BY `posted` DESC';
-					if ($items > 0)
-					{
-						$sql .= ' LIMIT ' . $items;
-					}
-
-					$query = $this->mysql->prepare($sql);
-					$query->bindValue(':feed', $this->id);
-					if ($query->execute())
-					{
-						while ($row = $query->fetchColumn())
-						{
-							$feed['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['entry'][] = unserialize($row);
-						}
-					}
-					else
-					{
-						return false;
-					}
-				}
-			}
-			return $data;
-		}
-		return false;
-	}
-
-	/**
-	 * Retrieve the last modified time for the cache
-	 *
-	 * @return int Timestamp
-	 */
-	public function mtime()
-	{
-		if ($this->mysql === null)
-		{
-			return false;
-		}
-
-		$query = $this->mysql->prepare('SELECT `mtime` FROM `' . $this->options['extras']['prefix'] . 'cache_data` WHERE `id` = :id');
-		$query->bindValue(':id', $this->id);
-		if ($query->execute() && ($time = $query->fetchColumn()))
-		{
-			return $time;
-		}
-		else
-		{
-			return false;
-		}
-	}
-
-	/**
-	 * Set the last modified time to the current time
-	 *
-	 * @return bool Success status
-	 */
-	public function touch()
-	{
-		if ($this->mysql === null)
-		{
-			return false;
-		}
-
-		$query = $this->mysql->prepare('UPDATE `' . $this->options['extras']['prefix'] . 'cache_data` SET `mtime` = :time WHERE `id` = :id');
-		$query->bindValue(':time', time());
-		$query->bindValue(':id', $this->id);
-		if ($query->execute() && $query->rowCount() > 0)
-		{
-			return true;
-		}
-		else
-		{
-			return false;
-		}
-	}
-
-	/**
-	 * Remove the cache
-	 *
-	 * @return bool Success status
-	 */
-	public function unlink()
-	{
-		if ($this->mysql === null)
-		{
-			return false;
-		}
-
-		$query = $this->mysql->prepare('DELETE FROM `' . $this->options['extras']['prefix'] . 'cache_data` WHERE `id` = :id');
-		$query->bindValue(':id', $this->id);
-		$query2 = $this->mysql->prepare('DELETE FROM `' . $this->options['extras']['prefix'] . 'items` WHERE `feed_id` = :id');
-		$query2->bindValue(':id', $this->id);
-		if ($query->execute() && $query2->execute())
-		{
-			return true;
-		}
-		else
-		{
-			return false;
-		}
-	}
-}
Index: www/wp-includes/Text/Diff/Engine/string.php
===================================================================
--- www/wp-includes/Text/Diff/Engine/string.php	(revision 38565)
+++ www/wp-includes/autoload/text-diff/Text_Diff_Engine_string.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/requests/Proxy/HTTP.php
===================================================================
--- www/wp-includes/autoload/requests/Proxy/HTTP.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Proxy/HTTP.php	(revision UNDEFINED)
@@ -1,151 +0,0 @@
-<?php
-/**
- * HTTP Proxy connection interface
- *
- * @package Requests
- * @subpackage Proxy
- * @since 1.6
- */
-
-/**
- * HTTP Proxy connection interface
- *
- * Provides a handler for connection via an HTTP proxy
- *
- * @package Requests
- * @subpackage Proxy
- * @since 1.6
- */
-class Requests_Proxy_HTTP implements Requests_Proxy {
-	/**
-	 * Proxy host and port
-	 *
-	 * Notation: "host:port" (eg 127.0.0.1:8080 or someproxy.com:3128)
-	 *
-	 * @var string
-	 */
-	public $proxy;
-
-	/**
-	 * Username
-	 *
-	 * @var string
-	 */
-	public $user;
-
-	/**
-	 * Password
-	 *
-	 * @var string
-	 */
-	public $pass;
-
-	/**
-	 * Do we need to authenticate? (ie username & password have been provided)
-	 *
-	 * @var boolean
-	 */
-	public $use_authentication;
-
-	/**
-	 * Constructor
-	 *
-	 * @since 1.6
-	 * @throws Requests_Exception On incorrect number of arguments (`authbasicbadargs`)
-	 * @param array|null $args Array of user and password. Must have exactly two elements
-	 */
-	public function __construct($args = null) {
-		if (is_string($args)) {
-			$this->proxy = $args;
-		}
-		elseif (is_array($args)) {
-			if (count($args) == 1) {
-				list($this->proxy) = $args;
-			}
-			elseif (count($args) == 3) {
-				list($this->proxy, $this->user, $this->pass) = $args;
-				$this->use_authentication = true;
-			}
-			else {
-				throw new Requests_Exception('Invalid number of arguments', 'proxyhttpbadargs');
-			}
-		}
-	}
-
-	/**
-	 * Register the necessary callbacks
-	 *
-	 * @since 1.6
-	 * @see curl_before_send
-	 * @see fsockopen_remote_socket
-	 * @see fsockopen_remote_host_path
-	 * @see fsockopen_header
-	 * @param Requests_Hooks $hooks Hook system
-	 */
-	public function register(Requests_Hooks &$hooks) {
-		$hooks->register('curl.before_send', array(&$this, 'curl_before_send'));
-
-		$hooks->register('fsockopen.remote_socket', array(&$this, 'fsockopen_remote_socket'));
-		$hooks->register('fsockopen.remote_host_path', array(&$this, 'fsockopen_remote_host_path'));
-		if ($this->use_authentication) {
-			$hooks->register('fsockopen.after_headers', array(&$this, 'fsockopen_header'));
-		}
-	}
-
-	/**
-	 * Set cURL parameters before the data is sent
-	 *
-	 * @since 1.6
-	 * @param resource $handle cURL resource
-	 */
-	public function curl_before_send(&$handle) {
-		curl_setopt($handle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
-		curl_setopt($handle, CURLOPT_PROXY, $this->proxy);
-
-		if ($this->use_authentication) {
-			curl_setopt($handle, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
-			curl_setopt($handle, CURLOPT_PROXYUSERPWD, $this->get_auth_string());
-		}
-	}
-
-	/**
-	 * Alter remote socket information before opening socket connection
-	 *
-	 * @since 1.6
-	 * @param string $remote_socket Socket connection string
-	 */
-	public function fsockopen_remote_socket(&$remote_socket) {
-		$remote_socket = $this->proxy;
-	}
-
-	/**
-	 * Alter remote path before getting stream data
-	 *
-	 * @since 1.6
-	 * @param string $path Path to send in HTTP request string ("GET ...")
-	 * @param string $url Full URL we're requesting
-	 */
-	public function fsockopen_remote_host_path(&$path, $url) {
-		$path = $url;
-	}
-
-	/**
-	 * Add extra headers to the request before sending
-	 *
-	 * @since 1.6
-	 * @param string $out HTTP header string
-	 */
-	public function fsockopen_header(&$out) {
-		$out .= sprintf("Proxy-Authorization: Basic %s\r\n", base64_encode($this->get_auth_string()));
-	}
-
-	/**
-	 * Get the authentication string (user:pass)
-	 *
-	 * @since 1.6
-	 * @return string
-	 */
-	public function get_auth_string() {
-		return $this->user . ':' . $this->pass;
-	}
-}
\ No newline at end of file
Index: www/wp-includes/class-wp-embed.php
===================================================================
--- www/wp-includes/class-wp-embed.php	(revision 38565)
+++ www/wp-includes/autoload/embed/WP_Embed.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/id3/ID3/getid3.php
===================================================================
--- www/wp-includes/autoload/id3/ID3/getid3.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/id3/ID3/getid3.php	(revision UNDEFINED)
@@ -1,1796 +0,0 @@
-<?php
-/////////////////////////////////////////////////////////////////
-/// getID3() by James Heinrich <info@getid3.org>               //
-//  available at http://getid3.sourceforge.net                 //
-//            or http://www.getid3.org                         //
-//          also https://github.com/JamesHeinrich/getID3       //
-/////////////////////////////////////////////////////////////////
-//                                                             //
-// Please see readme.txt for more information                  //
-//                                                            ///
-/////////////////////////////////////////////////////////////////
-
-// define a constant rather than looking up every time it is needed
-if (!defined('GETID3_OS_ISWINDOWS')) {
-	define('GETID3_OS_ISWINDOWS', (stripos(PHP_OS, 'WIN') === 0));
-}
-// Get base path of getID3() - ONCE
-if (!defined('GETID3_INCLUDEPATH')) {
-	define('GETID3_INCLUDEPATH', dirname(__FILE__).DIRECTORY_SEPARATOR);
-}
-// Workaround Bug #39923 (https://bugs.php.net/bug.php?id=39923)
-if (!defined('IMG_JPG') && defined('IMAGETYPE_JPEG')) {
-	define('IMG_JPG', IMAGETYPE_JPEG);
-}
-
-// attempt to define temp dir as something flexible but reliable
-$temp_dir = ini_get('upload_tmp_dir');
-if ($temp_dir && (!is_dir($temp_dir) || !is_readable($temp_dir))) {
-	$temp_dir = '';
-}
-if (!$temp_dir && function_exists('sys_get_temp_dir')) { // sys_get_temp_dir added in PHP v5.2.1
-	// sys_get_temp_dir() may give inaccessible temp dir, e.g. with open_basedir on virtual hosts
-	$temp_dir = sys_get_temp_dir();
-}
-$temp_dir = @realpath($temp_dir); // see https://github.com/JamesHeinrich/getID3/pull/10
-$open_basedir = ini_get('open_basedir');
-if ($open_basedir) {
-	// e.g. "/var/www/vhosts/getid3.org/httpdocs/:/tmp/"
-	$temp_dir     = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $temp_dir);
-	$open_basedir = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $open_basedir);
-	if (substr($temp_dir, -1, 1) != DIRECTORY_SEPARATOR) {
-		$temp_dir .= DIRECTORY_SEPARATOR;
-	}
-	$found_valid_tempdir = false;
-	$open_basedirs = explode(PATH_SEPARATOR, $open_basedir);
-	foreach ($open_basedirs as $basedir) {
-		if (substr($basedir, -1, 1) != DIRECTORY_SEPARATOR) {
-			$basedir .= DIRECTORY_SEPARATOR;
-		}
-		if (preg_match('#^'.preg_quote($basedir).'#', $temp_dir)) {
-			$found_valid_tempdir = true;
-			break;
-		}
-	}
-	if (!$found_valid_tempdir) {
-		$temp_dir = '';
-	}
-	unset($open_basedirs, $found_valid_tempdir, $basedir);
-}
-if (!$temp_dir) {
-	$temp_dir = '*'; // invalid directory name should force tempnam() to use system default temp dir
-}
-// $temp_dir = '/something/else/';  // feel free to override temp dir here if it works better for your system
-if (!defined('GETID3_TEMP_DIR')) {
-	define('GETID3_TEMP_DIR', $temp_dir);
-}
-unset($open_basedir, $temp_dir);
-
-// End: Defines
-
-
-class getID3
-{
-	// public: Settings
-	public $encoding        = 'UTF-8';        // CASE SENSITIVE! - i.e. (must be supported by iconv()). Examples:  ISO-8859-1  UTF-8  UTF-16  UTF-16BE
-	public $encoding_id3v1  = 'ISO-8859-1';   // Should always be 'ISO-8859-1', but some tags may be written in other encodings such as 'EUC-CN' or 'CP1252'
-
-	// public: Optional tag checks - disable for speed.
-	public $option_tag_id3v1         = true;  // Read and process ID3v1 tags
-	public $option_tag_id3v2         = true;  // Read and process ID3v2 tags
-	public $option_tag_lyrics3       = true;  // Read and process Lyrics3 tags
-	public $option_tag_apetag        = true;  // Read and process APE tags
-	public $option_tags_process      = true;  // Copy tags to root key 'tags' and encode to $this->encoding
-	public $option_tags_html         = true;  // Copy tags to root key 'tags_html' properly translated from various encodings to HTML entities
-
-	// public: Optional tag/comment calucations
-	public $option_extra_info        = true;  // Calculate additional info such as bitrate, channelmode etc
-
-	// public: Optional handling of embedded attachments (e.g. images)
-	public $option_save_attachments  = true; // defaults to true (ATTACHMENTS_INLINE) for backward compatibility
-
-	// public: Optional calculations
-	public $option_md5_data          = false; // Get MD5 sum of data part - slow
-	public $option_md5_data_source   = false; // Use MD5 of source file if availble - only FLAC and OptimFROG
-	public $option_sha1_data         = false; // Get SHA1 sum of data part - slow
-	public $option_max_2gb_check     = null;  // Check whether file is larger than 2GB and thus not supported by 32-bit PHP (null: auto-detect based on PHP_INT_MAX)
-
-	// public: Read buffer size in bytes
-	public $option_fread_buffer_size = 32768;
-
-	// Public variables
-	public $filename;                         // Filename of file being analysed.
-	public $fp;                               // Filepointer to file being analysed.
-	public $info;                             // Result array.
-	public $tempdir = GETID3_TEMP_DIR;
-	public $memory_limit = 0;
-
-	// Protected variables
-	protected $startup_error   = '';
-	protected $startup_warning = '';
-
-	const VERSION           = '1.9.9-20141121';
-	const FREAD_BUFFER_SIZE = 32768;
-
-	const ATTACHMENTS_NONE   = false;
-	const ATTACHMENTS_INLINE = true;
-
-	// public: constructor
-	public function __construct() {
-
-		// Check memory
-		$this->memory_limit = ini_get('memory_limit');
-		if (preg_match('#([0-9]+)M#i', $this->memory_limit, $matches)) {
-			// could be stored as "16M" rather than 16777216 for example
-			$this->memory_limit = $matches[1] * 1048576;
-		} elseif (preg_match('#([0-9]+)G#i', $this->memory_limit, $matches)) { // The 'G' modifier is available since PHP 5.1.0
-			// could be stored as "2G" rather than 2147483648 for example
-			$this->memory_limit = $matches[1] * 1073741824;
-		}
-		if ($this->memory_limit <= 0) {
-			// memory limits probably disabled
-		} elseif ($this->memory_limit <= 4194304) {
-			$this->startup_error .= 'PHP has less than 4MB available memory and will very likely run out. Increase memory_limit in php.ini';
-		} elseif ($this->memory_limit <= 12582912) {
-			$this->startup_warning .= 'PHP has less than 12MB available memory and might run out if all modules are loaded. Increase memory_limit in php.ini';
-		}
-
-		// Check safe_mode off
-		if (preg_match('#(1|ON)#i', ini_get('safe_mode'))) {
-			$this->warning('WARNING: Safe mode is on, shorten support disabled, md5data/sha1data for ogg vorbis disabled, ogg vorbos/flac tag writing disabled.');
-		}
-
-		if (intval(ini_get('mbstring.func_overload')) > 0) {
-			$this->warning('WARNING: php.ini contains "mbstring.func_overload = '.ini_get('mbstring.func_overload').'", this may break things.');
-		}
-
-		// Check for magic_quotes_runtime
-		if (function_exists('get_magic_quotes_runtime')) {
-			if (get_magic_quotes_runtime()) {
-				return $this->startup_error('magic_quotes_runtime must be disabled before running getID3(). Surround getid3 block by set_magic_quotes_runtime(0) and set_magic_quotes_runtime(1).');
-			}
-		}
-
-		// Check for magic_quotes_gpc
-		if (function_exists('magic_quotes_gpc')) {
-			if (get_magic_quotes_gpc()) {
-				return $this->startup_error('magic_quotes_gpc must be disabled before running getID3(). Surround getid3 block by set_magic_quotes_gpc(0) and set_magic_quotes_gpc(1).');
-			}
-		}
-
-		// Load support library
-		if (!include_once(GETID3_INCLUDEPATH.'getid3.lib.php')) {
-			$this->startup_error .= 'getid3.lib.php is missing or corrupt';
-		}
-
-		if ($this->option_max_2gb_check === null) {
-			$this->option_max_2gb_check = (PHP_INT_MAX <= 2147483647);
-		}
-
-
-		// Needed for Windows only:
-		// Define locations of helper applications for Shorten, VorbisComment, MetaFLAC
-		//   as well as other helper functions such as head, tail, md5sum, etc
-		// This path cannot contain spaces, but the below code will attempt to get the
-		//   8.3-equivalent path automatically
-		// IMPORTANT: This path must include the trailing slash
-		if (GETID3_OS_ISWINDOWS && !defined('GETID3_HELPERAPPSDIR')) {
-
-			$helperappsdir = GETID3_INCLUDEPATH.'..'.DIRECTORY_SEPARATOR.'helperapps'; // must not have any space in this path
-
-			if (!is_dir($helperappsdir)) {
-				$this->startup_warning .= '"'.$helperappsdir.'" cannot be defined as GETID3_HELPERAPPSDIR because it does not exist';
-			} elseif (strpos(realpath($helperappsdir), ' ') !== false) {
-				$DirPieces = explode(DIRECTORY_SEPARATOR, realpath($helperappsdir));
-				$path_so_far = array();
-				foreach ($DirPieces as $key => $value) {
-					if (strpos($value, ' ') !== false) {
-						if (!empty($path_so_far)) {
-							$commandline = 'dir /x '.escapeshellarg(implode(DIRECTORY_SEPARATOR, $path_so_far));
-							$dir_listing = `$commandline`;
-							$lines = explode("\n", $dir_listing);
-							foreach ($lines as $line) {
-								$line = trim($line);
-								if (preg_match('#^([0-9/]{10}) +([0-9:]{4,5}( [AP]M)?) +(<DIR>|[0-9,]+) +([^ ]{0,11}) +(.+)$#', $line, $matches)) {
-									list($dummy, $date, $time, $ampm, $filesize, $shortname, $filename) = $matches;
-									if ((strtoupper($filesize) == '<DIR>') && (strtolower($filename) == strtolower($value))) {
-										$value = $shortname;
-									}
-								}
-							}
-						} else {
-							$this->startup_warning .= 'GETID3_HELPERAPPSDIR must not have any spaces in it - use 8dot3 naming convention if neccesary. You can run "dir /x" from the commandline to see the correct 8.3-style names.';
-						}
-					}
-					$path_so_far[] = $value;
-				}
-				$helperappsdir = implode(DIRECTORY_SEPARATOR, $path_so_far);
-			}
-			define('GETID3_HELPERAPPSDIR', $helperappsdir.DIRECTORY_SEPARATOR);
-		}
-
-		return true;
-	}
-
-	public function version() {
-		return self::VERSION;
-	}
-
-	public function fread_buffer_size() {
-		return $this->option_fread_buffer_size;
-	}
-
-
-	// public: setOption
-	public function setOption($optArray) {
-		if (!is_array($optArray) || empty($optArray)) {
-			return false;
-		}
-		foreach ($optArray as $opt => $val) {
-			if (isset($this->$opt) === false) {
-				continue;
-			}
-			$this->$opt = $val;
-		}
-		return true;
-	}
-
-
-	public function openfile($filename) {
-		try {
-			if (!empty($this->startup_error)) {
-				throw new getid3_exception($this->startup_error);
-			}
-			if (!empty($this->startup_warning)) {
-				$this->warning($this->startup_warning);
-			}
-
-			// init result array and set parameters
-			$this->filename = $filename;
-			$this->info = array();
-			$this->info['GETID3_VERSION']   = $this->version();
-			$this->info['php_memory_limit'] = (($this->memory_limit > 0) ? $this->memory_limit : false);
-
-			// remote files not supported
-			if (preg_match('/^(ht|f)tp:\/\//', $filename)) {
-				throw new getid3_exception('Remote files are not supported - please copy the file locally first');
-			}
-
-			$filename = str_replace('/', DIRECTORY_SEPARATOR, $filename);
-			$filename = preg_replace('#(.+)'.preg_quote(DIRECTORY_SEPARATOR).'{2,}#U', '\1'.DIRECTORY_SEPARATOR, $filename);
-
-			// open local file
-			//if (is_readable($filename) && is_file($filename) && ($this->fp = fopen($filename, 'rb'))) { // see http://www.getid3.org/phpBB3/viewtopic.php?t=1720
-			if ((is_readable($filename) || file_exists($filename)) && is_file($filename) && ($this->fp = fopen($filename, 'rb'))) {
-				// great
-			} else {
-				$errormessagelist = array();
-				if (!is_readable($filename)) {
-					$errormessagelist[] = '!is_readable';
-				}
-				if (!is_file($filename)) {
-					$errormessagelist[] = '!is_file';
-				}
-				if (!file_exists($filename)) {
-					$errormessagelist[] = '!file_exists';
-				}
-				if (empty($errormessagelist)) {
-					$errormessagelist[] = 'fopen failed';
-				}
-				throw new getid3_exception('Could not open "'.$filename.'" ('.implode('; ', $errormessagelist).')');
-			}
-
-			$this->info['filesize'] = filesize($filename);
-			// set redundant parameters - might be needed in some include file
-			// filenames / filepaths in getID3 are always expressed with forward slashes (unix-style) for both Windows and other to try and minimize confusion
-			$filename = str_replace('\\', '/', $filename);
-			$this->info['filepath']     = str_replace('\\', '/', realpath(dirname($filename)));
-			$this->info['filename']     = getid3_lib::mb_basename($filename);
-			$this->info['filenamepath'] = $this->info['filepath'].'/'.$this->info['filename'];
-
-
-			// option_max_2gb_check
-			if ($this->option_max_2gb_check) {
-				// PHP (32-bit all, and 64-bit Windows) doesn't support integers larger than 2^31 (~2GB)
-				// filesize() simply returns (filesize % (pow(2, 32)), no matter the actual filesize
-				// ftell() returns 0 if seeking to the end is beyond the range of unsigned integer
-				$fseek = fseek($this->fp, 0, SEEK_END);
-				if (($fseek < 0) || (($this->info['filesize'] != 0) && (ftell($this->fp) == 0)) ||
-					($this->info['filesize'] < 0) ||
-					(ftell($this->fp) < 0)) {
-						$real_filesize = getid3_lib::getFileSizeSyscall($this->info['filenamepath']);
-
-						if ($real_filesize === false) {
-							unset($this->info['filesize']);
-							fclose($this->fp);
-							throw new getid3_exception('Unable to determine actual filesize. File is most likely larger than '.round(PHP_INT_MAX / 1073741824).'GB and is not supported by PHP.');
-						} elseif (getid3_lib::intValueSupported($real_filesize)) {
-							unset($this->info['filesize']);
-							fclose($this->fp);
-							throw new getid3_exception('PHP seems to think the file is larger than '.round(PHP_INT_MAX / 1073741824).'GB, but filesystem reports it as '.number_format($real_filesize, 3).'GB, please report to info@getid3.org');
-						}
-						$this->info['filesize'] = $real_filesize;
-						$this->warning('File is larger than '.round(PHP_INT_MAX / 1073741824).'GB (filesystem reports it as '.number_format($real_filesize, 3).'GB) and is not properly supported by PHP.');
-				}
-			}
-
-			// set more parameters
-			$this->info['avdataoffset']        = 0;
-			$this->info['avdataend']           = $this->info['filesize'];
-			$this->info['fileformat']          = '';                // filled in later
-			$this->info['audio']['dataformat'] = '';                // filled in later, unset if not used
-			$this->info['video']['dataformat'] = '';                // filled in later, unset if not used
-			$this->info['tags']                = array();           // filled in later, unset if not used
-			$this->info['error']               = array();           // filled in later, unset if not used
-			$this->info['warning']             = array();           // filled in later, unset if not used
-			$this->info['comments']            = array();           // filled in later, unset if not used
-			$this->info['encoding']            = $this->encoding;   // required by id3v2 and iso modules - can be unset at the end if desired
-
-			return true;
-
-		} catch (Exception $e) {
-			$this->error($e->getMessage());
-		}
-		return false;
-	}
-
-	// public: analyze file
-	public function analyze($filename) {
-		try {
-			if (!$this->openfile($filename)) {
-				return $this->info;
-			}
-
-			// Handle tags
-			foreach (array('id3v2'=>'id3v2', 'id3v1'=>'id3v1', 'apetag'=>'ape', 'lyrics3'=>'lyrics3') as $tag_name => $tag_key) {
-				$option_tag = 'option_tag_'.$tag_name;
-				if ($this->$option_tag) {
-					$this->include_module('tag.'.$tag_name);
-					try {
-						$tag_class = 'getid3_'.$tag_name;
-						$tag = new $tag_class($this);
-						$tag->Analyze();
-					}
-					catch (getid3_exception $e) {
-						throw $e;
-					}
-				}
-			}
-			if (isset($this->info['id3v2']['tag_offset_start'])) {
-				$this->info['avdataoffset'] = max($this->info['avdataoffset'], $this->info['id3v2']['tag_offset_end']);
-			}
-			foreach (array('id3v1'=>'id3v1', 'apetag'=>'ape', 'lyrics3'=>'lyrics3') as $tag_name => $tag_key) {
-				if (isset($this->info[$tag_key]['tag_offset_start'])) {
-					$this->info['avdataend'] = min($this->info['avdataend'], $this->info[$tag_key]['tag_offset_start']);
-				}
-			}
-
-			// ID3v2 detection (NOT parsing), even if ($this->option_tag_id3v2 == false) done to make fileformat easier
-			if (!$this->option_tag_id3v2) {
-				fseek($this->fp, 0);
-				$header = fread($this->fp, 10);
-				if ((substr($header, 0, 3) == 'ID3') && (strlen($header) == 10)) {
-					$this->info['id3v2']['header']        = true;
-					$this->info['id3v2']['majorversion']  = ord($header{3});
-					$this->info['id3v2']['minorversion']  = ord($header{4});
-					$this->info['avdataoffset']          += getid3_lib::BigEndian2Int(substr($header, 6, 4), 1) + 10; // length of ID3v2 tag in 10-byte header doesn't include 10-byte header length
-				}
-			}
-
-			// read 32 kb file data
-			fseek($this->fp, $this->info['avdataoffset']);
-			$formattest = fread($this->fp, 32774);
-
-			// determine format
-			$determined_format = $this->GetFileFormat($formattest, $filename);
-
-			// unable to determine file format
-			if (!$determined_format) {
-				fclose($this->fp);
-				return $this->error('unable to determine file format');
-			}
-
-			// check for illegal ID3 tags
-			if (isset($determined_format['fail_id3']) && (in_array('id3v1', $this->info['tags']) || in_array('id3v2', $this->info['tags']))) {
-				if ($determined_format['fail_id3'] === 'ERROR') {
-					fclose($this->fp);
-					return $this->error('ID3 tags not allowed on this file type.');
-				} elseif ($determined_format['fail_id3'] === 'WARNING') {
-					$this->warning('ID3 tags not allowed on this file type.');
-				}
-			}
-
-			// check for illegal APE tags
-			if (isset($determined_format['fail_ape']) && in_array('ape', $this->info['tags'])) {
-				if ($determined_format['fail_ape'] === 'ERROR') {
-					fclose($this->fp);
-					return $this->error('APE tags not allowed on this file type.');
-				} elseif ($determined_format['fail_ape'] === 'WARNING') {
-					$this->warning('APE tags not allowed on this file type.');
-				}
-			}
-
-			// set mime type
-			$this->info['mime_type'] = $determined_format['mime_type'];
-
-			// supported format signature pattern detected, but module deleted
-			if (!file_exists(GETID3_INCLUDEPATH.$determined_format['include'])) {
-				fclose($this->fp);
-				return $this->error('Format not supported, module "'.$determined_format['include'].'" was removed.');
-			}
-
-			// module requires iconv support
-			// Check encoding/iconv support
-			if (!empty($determined_format['iconv_req']) && !function_exists('iconv') && !in_array($this->encoding, array('ISO-8859-1', 'UTF-8', 'UTF-16LE', 'UTF-16BE', 'UTF-16'))) {
-				$errormessage = 'iconv() support is required for this module ('.$determined_format['include'].') for encodings other than ISO-8859-1, UTF-8, UTF-16LE, UTF16-BE, UTF-16. ';
-				if (GETID3_OS_ISWINDOWS) {
-					$errormessage .= 'PHP does not have iconv() support. Please enable php_iconv.dll in php.ini, and copy iconv.dll from c:/php/dlls to c:/windows/system32';
-				} else {
-					$errormessage .= 'PHP is not compiled with iconv() support. Please recompile with the --with-iconv switch';
-				}
-				return $this->error($errormessage);
-			}
-
-			// include module
-			include_once(GETID3_INCLUDEPATH.$determined_format['include']);
-
-			// instantiate module class
-			$class_name = 'getid3_'.$determined_format['module'];
-			if (!class_exists($class_name)) {
-				return $this->error('Format not supported, module "'.$determined_format['include'].'" is corrupt.');
-			}
-			$class = new $class_name($this);
-			$class->Analyze();
-			unset($class);
-
-			// close file
-			fclose($this->fp);
-
-			// process all tags - copy to 'tags' and convert charsets
-			if ($this->option_tags_process) {
-				$this->HandleAllTags();
-			}
-
-			// perform more calculations
-			if ($this->option_extra_info) {
-				$this->ChannelsBitratePlaytimeCalculations();
-				$this->CalculateCompressionRatioVideo();
-				$this->CalculateCompressionRatioAudio();
-				$this->CalculateReplayGain();
-				$this->ProcessAudioStreams();
-			}
-
-			// get the MD5 sum of the audio/video portion of the file - without ID3/APE/Lyrics3/etc header/footer tags
-			if ($this->option_md5_data) {
-				// do not calc md5_data if md5_data_source is present - set by flac only - future MPC/SV8 too
-				if (!$this->option_md5_data_source || empty($this->info['md5_data_source'])) {
-					$this->getHashdata('md5');
-				}
-			}
-
-			// get the SHA1 sum of the audio/video portion of the file - without ID3/APE/Lyrics3/etc header/footer tags
-			if ($this->option_sha1_data) {
-				$this->getHashdata('sha1');
-			}
-
-			// remove undesired keys
-			$this->CleanUp();
-
-		} catch (Exception $e) {
-			$this->error('Caught exception: '.$e->getMessage());
-		}
-
-		// return info array
-		return $this->info;
-	}
-
-
-	// private: error handling
-	public function error($message) {
-		$this->CleanUp();
-		if (!isset($this->info['error'])) {
-			$this->info['error'] = array();
-		}
-		$this->info['error'][] = $message;
-		return $this->info;
-	}
-
-
-	// private: warning handling
-	public function warning($message) {
-		$this->info['warning'][] = $message;
-		return true;
-	}
-
-
-	// private: CleanUp
-	private function CleanUp() {
-
-		// remove possible empty keys
-		$AVpossibleEmptyKeys = array('dataformat', 'bits_per_sample', 'encoder_options', 'streams', 'bitrate');
-		foreach ($AVpossibleEmptyKeys as $dummy => $key) {
-			if (empty($this->info['audio'][$key]) && isset($this->info['audio'][$key])) {
-				unset($this->info['audio'][$key]);
-			}
-			if (empty($this->info['video'][$key]) && isset($this->info['video'][$key])) {
-				unset($this->info['video'][$key]);
-			}
-		}
-
-		// remove empty root keys
-		if (!empty($this->info)) {
-			foreach ($this->info as $key => $value) {
-				if (empty($this->info[$key]) && ($this->info[$key] !== 0) && ($this->info[$key] !== '0')) {
-					unset($this->info[$key]);
-				}
-			}
-		}
-
-		// remove meaningless entries from unknown-format files
-		if (empty($this->info['fileformat'])) {
-			if (isset($this->info['avdataoffset'])) {
-				unset($this->info['avdataoffset']);
-			}
-			if (isset($this->info['avdataend'])) {
-				unset($this->info['avdataend']);
-			}
-		}
-
-		// remove possible duplicated identical entries
-		if (!empty($this->info['error'])) {
-			$this->info['error'] = array_values(array_unique($this->info['error']));
-		}
-		if (!empty($this->info['warning'])) {
-			$this->info['warning'] = array_values(array_unique($this->info['warning']));
-		}
-
-		// remove "global variable" type keys
-		unset($this->info['php_memory_limit']);
-
-		return true;
-	}
-
-
-	// return array containing information about all supported formats
-	public function GetFileFormatArray() {
-		static $format_info = array();
-		if (empty($format_info)) {
-			$format_info = array(
-
-				// Audio formats
-
-				// AC-3   - audio      - Dolby AC-3 / Dolby Digital
-				'ac3'  => array(
-							'pattern'   => '^\x0B\x77',
-							'group'     => 'audio',
-							'module'    => 'ac3',
-							'mime_type' => 'audio/ac3',
-						),
-
-				// AAC  - audio       - Advanced Audio Coding (AAC) - ADIF format
-				'adif' => array(
-							'pattern'   => '^ADIF',
-							'group'     => 'audio',
-							'module'    => 'aac',
-							'mime_type' => 'application/octet-stream',
-							'fail_ape'  => 'WARNING',
-						),
-
-/*
-				// AA   - audio       - Audible Audiobook
-				'aa'   => array(
-							'pattern'   => '^.{4}\x57\x90\x75\x36',
-							'group'     => 'audio',
-							'module'    => 'aa',
-							'mime_type' => 'audio/audible',
-						),
-*/
-				// AAC  - audio       - Advanced Audio Coding (AAC) - ADTS format (very similar to MP3)
-				'adts' => array(
-							'pattern'   => '^\xFF[\xF0-\xF1\xF8-\xF9]',
-							'group'     => 'audio',
-							'module'    => 'aac',
-							'mime_type' => 'application/octet-stream',
-							'fail_ape'  => 'WARNING',
-						),
-
-
-				// AU   - audio       - NeXT/Sun AUdio (AU)
-				'au'   => array(
-							'pattern'   => '^\.snd',
-							'group'     => 'audio',
-							'module'    => 'au',
-							'mime_type' => 'audio/basic',
-						),
-
-				// AMR  - audio       - Adaptive Multi Rate
-				'amr'  => array(
-							'pattern'   => '^\x23\x21AMR\x0A', // #!AMR[0A]
-							'group'     => 'audio',
-							'module'    => 'amr',
-							'mime_type' => 'audio/amr',
-						),
-
-				// AVR  - audio       - Audio Visual Research
-				'avr'  => array(
-							'pattern'   => '^2BIT',
-							'group'     => 'audio',
-							'module'    => 'avr',
-							'mime_type' => 'application/octet-stream',
-						),
-
-				// BONK - audio       - Bonk v0.9+
-				'bonk' => array(
-							'pattern'   => '^\x00(BONK|INFO|META| ID3)',
-							'group'     => 'audio',
-							'module'    => 'bonk',
-							'mime_type' => 'audio/xmms-bonk',
-						),
-
-				// DSS  - audio       - Digital Speech Standard
-				'dss'  => array(
-							'pattern'   => '^[\x02-\x03]ds[s2]',
-							'group'     => 'audio',
-							'module'    => 'dss',
-							'mime_type' => 'application/octet-stream',
-						),
-
-				// DTS  - audio       - Dolby Theatre System
-				'dts'  => array(
-							'pattern'   => '^\x7F\xFE\x80\x01',
-							'group'     => 'audio',
-							'module'    => 'dts',
-							'mime_type' => 'audio/dts',
-						),
-
-				// FLAC - audio       - Free Lossless Audio Codec
-				'flac' => array(
-							'pattern'   => '^fLaC',
-							'group'     => 'audio',
-							'module'    => 'flac',
-							'mime_type' => 'audio/x-flac',
-						),
-
-				// LA   - audio       - Lossless Audio (LA)
-				'la'   => array(
-							'pattern'   => '^LA0[2-4]',
-							'group'     => 'audio',
-							'module'    => 'la',
-							'mime_type' => 'application/octet-stream',
-						),
-
-				// LPAC - audio       - Lossless Predictive Audio Compression (LPAC)
-				'lpac' => array(
-							'pattern'   => '^LPAC',
-							'group'     => 'audio',
-							'module'    => 'lpac',
-							'mime_type' => 'application/octet-stream',
-						),
-
-				// MIDI - audio       - MIDI (Musical Instrument Digital Interface)
-				'midi' => array(
-							'pattern'   => '^MThd',
-							'group'     => 'audio',
-							'module'    => 'midi',
-							'mime_type' => 'audio/midi',
-						),
-
-				// MAC  - audio       - Monkey's Audio Compressor
-				'mac'  => array(
-							'pattern'   => '^MAC ',
-							'group'     => 'audio',
-							'module'    => 'monkey',
-							'mime_type' => 'application/octet-stream',
-						),
-
-// has been known to produce false matches in random files (e.g. JPEGs), leave out until more precise matching available
-//				// MOD  - audio       - MODule (assorted sub-formats)
-//				'mod'  => array(
-//							'pattern'   => '^.{1080}(M\\.K\\.|M!K!|FLT4|FLT8|[5-9]CHN|[1-3][0-9]CH)',
-//							'group'     => 'audio',
-//							'module'    => 'mod',
-//							'option'    => 'mod',
-//							'mime_type' => 'audio/mod',
-//						),
-
-				// MOD  - audio       - MODule (Impulse Tracker)
-				'it'   => array(
-							'pattern'   => '^IMPM',
-							'group'     => 'audio',
-							'module'    => 'mod',
-							//'option'    => 'it',
-							'mime_type' => 'audio/it',
-						),
-
-				// MOD  - audio       - MODule (eXtended Module, various sub-formats)
-				'xm'   => array(
-							'pattern'   => '^Extended Module',
-							'group'     => 'audio',
-							'module'    => 'mod',
-							//'option'    => 'xm',
-							'mime_type' => 'audio/xm',
-						),
-
-				// MOD  - audio       - MODule (ScreamTracker)
-				's3m'  => array(
-							'pattern'   => '^.{44}SCRM',
-							'group'     => 'audio',
-							'module'    => 'mod',
-							//'option'    => 's3m',
-							'mime_type' => 'audio/s3m',
-						),
-
-				// MPC  - audio       - Musepack / MPEGplus
-				'mpc'  => array(
-							'pattern'   => '^(MPCK|MP\+|[\x00\x01\x10\x11\x40\x41\x50\x51\x80\x81\x90\x91\xC0\xC1\xD0\xD1][\x20-37][\x00\x20\x40\x60\x80\xA0\xC0\xE0])',
-							'group'     => 'audio',
-							'module'    => 'mpc',
-							'mime_type' => 'audio/x-musepack',
-						),
-
-				// MP3  - audio       - MPEG-audio Layer 3 (very similar to AAC-ADTS)
-				'mp3'  => array(
-							'pattern'   => '^\xFF[\xE2-\xE7\xF2-\xF7\xFA-\xFF][\x00-\x0B\x10-\x1B\x20-\x2B\x30-\x3B\x40-\x4B\x50-\x5B\x60-\x6B\x70-\x7B\x80-\x8B\x90-\x9B\xA0-\xAB\xB0-\xBB\xC0-\xCB\xD0-\xDB\xE0-\xEB\xF0-\xFB]',
-							'group'     => 'audio',
-							'module'    => 'mp3',
-							'mime_type' => 'audio/mpeg',
-						),
-
-				// OFR  - audio       - OptimFROG
-				'ofr'  => array(
-							'pattern'   => '^(\*RIFF|OFR)',
-							'group'     => 'audio',
-							'module'    => 'optimfrog',
-							'mime_type' => 'application/octet-stream',
-						),
-
-				// RKAU - audio       - RKive AUdio compressor
-				'rkau' => array(
-							'pattern'   => '^RKA',
-							'group'     => 'audio',
-							'module'    => 'rkau',
-							'mime_type' => 'application/octet-stream',
-						),
-
-				// SHN  - audio       - Shorten
-				'shn'  => array(
-							'pattern'   => '^ajkg',
-							'group'     => 'audio',
-							'module'    => 'shorten',
-							'mime_type' => 'audio/xmms-shn',
-							'fail_id3'  => 'ERROR',
-							'fail_ape'  => 'ERROR',
-						),
-
-				// TTA  - audio       - TTA Lossless Audio Compressor (http://tta.corecodec.org)
-				'tta'  => array(
-							'pattern'   => '^TTA',  // could also be '^TTA(\x01|\x02|\x03|2|1)'
-							'group'     => 'audio',
-							'module'    => 'tta',
-							'mime_type' => 'application/octet-stream',
-						),
-
-				// VOC  - audio       - Creative Voice (VOC)
-				'voc'  => array(
-							'pattern'   => '^Creative Voice File',
-							'group'     => 'audio',
-							'module'    => 'voc',
-							'mime_type' => 'audio/voc',
-						),
-
-				// VQF  - audio       - transform-domain weighted interleave Vector Quantization Format (VQF)
-				'vqf'  => array(
-							'pattern'   => '^TWIN',
-							'group'     => 'audio',
-							'module'    => 'vqf',
-							'mime_type' => 'application/octet-stream',
-						),
-
-				// WV  - audio        - WavPack (v4.0+)
-				'wv'   => array(
-							'pattern'   => '^wvpk',
-							'group'     => 'audio',
-							'module'    => 'wavpack',
-							'mime_type' => 'application/octet-stream',
-						),
-
-
-				// Audio-Video formats
-
-				// ASF  - audio/video - Advanced Streaming Format, Windows Media Video, Windows Media Audio
-				'asf'  => array(
-							'pattern'   => '^\x30\x26\xB2\x75\x8E\x66\xCF\x11\xA6\xD9\x00\xAA\x00\x62\xCE\x6C',
-							'group'     => 'audio-video',
-							'module'    => 'asf',
-							'mime_type' => 'video/x-ms-asf',
-							'iconv_req' => false,
-						),
-
-				// BINK - audio/video - Bink / Smacker
-				'bink' => array(
-							'pattern'   => '^(BIK|SMK)',
-							'group'     => 'audio-video',
-							'module'    => 'bink',
-							'mime_type' => 'application/octet-stream',
-						),
-
-				// FLV  - audio/video - FLash Video
-				'flv' => array(
-							'pattern'   => '^FLV\x01',
-							'group'     => 'audio-video',
-							'module'    => 'flv',
-							'mime_type' => 'video/x-flv',
-						),
-
-				// MKAV - audio/video - Mastroka
-				'matroska' => array(
-							'pattern'   => '^\x1A\x45\xDF\xA3',
-							'group'     => 'audio-video',
-							'module'    => 'matroska',
-							'mime_type' => 'video/x-matroska', // may also be audio/x-matroska
-						),
-
-				// MPEG - audio/video - MPEG (Moving Pictures Experts Group)
-				'mpeg' => array(
-							'pattern'   => '^\x00\x00\x01(\xBA|\xB3)',
-							'group'     => 'audio-video',
-							'module'    => 'mpeg',
-							'mime_type' => 'video/mpeg',
-						),
-
-				// NSV  - audio/video - Nullsoft Streaming Video (NSV)
-				'nsv'  => array(
-							'pattern'   => '^NSV[sf]',
-							'group'     => 'audio-video',
-							'module'    => 'nsv',
-							'mime_type' => 'application/octet-stream',
-						),
-
-				// Ogg  - audio/video - Ogg (Ogg-Vorbis, Ogg-FLAC, Speex, Ogg-Theora(*), Ogg-Tarkin(*))
-				'ogg'  => array(
-							'pattern'   => '^OggS',
-							'group'     => 'audio',
-							'module'    => 'ogg',
-							'mime_type' => 'application/ogg',
-							'fail_id3'  => 'WARNING',
-							'fail_ape'  => 'WARNING',
-						),
-
-				// QT   - audio/video - Quicktime
-				'quicktime' => array(
-							'pattern'   => '^.{4}(cmov|free|ftyp|mdat|moov|pnot|skip|wide)',
-							'group'     => 'audio-video',
-							'module'    => 'quicktime',
-							'mime_type' => 'video/quicktime',
-						),
-
-				// RIFF - audio/video - Resource Interchange File Format (RIFF) / WAV / AVI / CD-audio / SDSS = renamed variant used by SmartSound QuickTracks (www.smartsound.com) / FORM = Audio Interchange File Format (AIFF)
-				'riff' => array(
-							'pattern'   => '^(RIFF|SDSS|FORM)',
-							'group'     => 'audio-video',
-							'module'    => 'riff',
-							'mime_type' => 'audio/x-wave',
-							'fail_ape'  => 'WARNING',
-						),
-
-				// Real - audio/video - RealAudio, RealVideo
-				'real' => array(
-							'pattern'   => '^(\\.RMF|\\.ra)',
-							'group'     => 'audio-video',
-							'module'    => 'real',
-							'mime_type' => 'audio/x-realaudio',
-						),
-
-				// SWF - audio/video - ShockWave Flash
-				'swf' => array(
-							'pattern'   => '^(F|C)WS',
-							'group'     => 'audio-video',
-							'module'    => 'swf',
-							'mime_type' => 'application/x-shockwave-flash',
-						),
-
-				// TS - audio/video - MPEG-2 Transport Stream
-				'ts' => array(
-							'pattern'   => '^(\x47.{187}){10,}', // packets are 188 bytes long and start with 0x47 "G".  Check for at least 10 packets matching this pattern
-							'group'     => 'audio-video',
-							'module'    => 'ts',
-							'mime_type' => 'video/MP2T',
-						),
-
-
-				// Still-Image formats
-
-				// BMP  - still image - Bitmap (Windows, OS/2; uncompressed, RLE8, RLE4)
-				'bmp'  => array(
-							'pattern'   => '^BM',
-							'group'     => 'graphic',
-							'module'    => 'bmp',
-							'mime_type' => 'image/bmp',
-							'fail_id3'  => 'ERROR',
-							'fail_ape'  => 'ERROR',
-						),
-
-				// GIF  - still image - Graphics Interchange Format
-				'gif'  => array(
-							'pattern'   => '^GIF',
-							'group'     => 'graphic',
-							'module'    => 'gif',
-							'mime_type' => 'image/gif',
-							'fail_id3'  => 'ERROR',
-							'fail_ape'  => 'ERROR',
-						),
-
-				// JPEG - still image - Joint Photographic Experts Group (JPEG)
-				'jpg'  => array(
-							'pattern'   => '^\xFF\xD8\xFF',
-							'group'     => 'graphic',
-							'module'    => 'jpg',
-							'mime_type' => 'image/jpeg',
-							'fail_id3'  => 'ERROR',
-							'fail_ape'  => 'ERROR',
-						),
-
-				// PCD  - still image - Kodak Photo CD
-				'pcd'  => array(
-							'pattern'   => '^.{2048}PCD_IPI\x00',
-							'group'     => 'graphic',
-							'module'    => 'pcd',
-							'mime_type' => 'image/x-photo-cd',
-							'fail_id3'  => 'ERROR',
-							'fail_ape'  => 'ERROR',
-						),
-
-
-				// PNG  - still image - Portable Network Graphics (PNG)
-				'png'  => array(
-							'pattern'   => '^\x89\x50\x4E\x47\x0D\x0A\x1A\x0A',
-							'group'     => 'graphic',
-							'module'    => 'png',
-							'mime_type' => 'image/png',
-							'fail_id3'  => 'ERROR',
-							'fail_ape'  => 'ERROR',
-						),
-
-
-				// SVG  - still image - Scalable Vector Graphics (SVG)
-				'svg'  => array(
-							'pattern'   => '(<!DOCTYPE svg PUBLIC |xmlns="http:\/\/www\.w3\.org\/2000\/svg")',
-							'group'     => 'graphic',
-							'module'    => 'svg',
-							'mime_type' => 'image/svg+xml',
-							'fail_id3'  => 'ERROR',
-							'fail_ape'  => 'ERROR',
-						),
-
-
-				// TIFF - still image - Tagged Information File Format (TIFF)
-				'tiff' => array(
-							'pattern'   => '^(II\x2A\x00|MM\x00\x2A)',
-							'group'     => 'graphic',
-							'module'    => 'tiff',
-							'mime_type' => 'image/tiff',
-							'fail_id3'  => 'ERROR',
-							'fail_ape'  => 'ERROR',
-						),
-
-
-				// EFAX - still image - eFax (TIFF derivative)
-				'efax'  => array(
-							'pattern'   => '^\xDC\xFE',
-							'group'     => 'graphic',
-							'module'    => 'efax',
-							'mime_type' => 'image/efax',
-							'fail_id3'  => 'ERROR',
-							'fail_ape'  => 'ERROR',
-						),
-
-
-				// Data formats
-
-				// ISO  - data        - International Standards Organization (ISO) CD-ROM Image
-				'iso'  => array(
-							'pattern'   => '^.{32769}CD001',
-							'group'     => 'misc',
-							'module'    => 'iso',
-							'mime_type' => 'application/octet-stream',
-							'fail_id3'  => 'ERROR',
-							'fail_ape'  => 'ERROR',
-							'iconv_req' => false,
-						),
-
-				// RAR  - data        - RAR compressed data
-				'rar'  => array(
-							'pattern'   => '^Rar\!',
-							'group'     => 'archive',
-							'module'    => 'rar',
-							'mime_type' => 'application/octet-stream',
-							'fail_id3'  => 'ERROR',
-							'fail_ape'  => 'ERROR',
-						),
-
-				// SZIP - audio/data  - SZIP compressed data
-				'szip' => array(
-							'pattern'   => '^SZ\x0A\x04',
-							'group'     => 'archive',
-							'module'    => 'szip',
-							'mime_type' => 'application/octet-stream',
-							'fail_id3'  => 'ERROR',
-							'fail_ape'  => 'ERROR',
-						),
-
-				// TAR  - data        - TAR compressed data
-				'tar'  => array(
-							'pattern'   => '^.{100}[0-9\x20]{7}\x00[0-9\x20]{7}\x00[0-9\x20]{7}\x00[0-9\x20\x00]{12}[0-9\x20\x00]{12}',
-							'group'     => 'archive',
-							'module'    => 'tar',
-							'mime_type' => 'application/x-tar',
-							'fail_id3'  => 'ERROR',
-							'fail_ape'  => 'ERROR',
-						),
-
-				// GZIP  - data        - GZIP compressed data
-				'gz'  => array(
-							'pattern'   => '^\x1F\x8B\x08',
-							'group'     => 'archive',
-							'module'    => 'gzip',
-							'mime_type' => 'application/x-gzip',
-							'fail_id3'  => 'ERROR',
-							'fail_ape'  => 'ERROR',
-						),
-
-				// ZIP  - data         - ZIP compressed data
-				'zip'  => array(
-							'pattern'   => '^PK\x03\x04',
-							'group'     => 'archive',
-							'module'    => 'zip',
-							'mime_type' => 'application/zip',
-							'fail_id3'  => 'ERROR',
-							'fail_ape'  => 'ERROR',
-						),
-
-
-				// Misc other formats
-
-				// PAR2 - data        - Parity Volume Set Specification 2.0
-				'par2' => array (
-							'pattern'   => '^PAR2\x00PKT',
-							'group'     => 'misc',
-							'module'    => 'par2',
-							'mime_type' => 'application/octet-stream',
-							'fail_id3'  => 'ERROR',
-							'fail_ape'  => 'ERROR',
-						),
-
-				// PDF  - data        - Portable Document Format
-				'pdf'  => array(
-							'pattern'   => '^\x25PDF',
-							'group'     => 'misc',
-							'module'    => 'pdf',
-							'mime_type' => 'application/pdf',
-							'fail_id3'  => 'ERROR',
-							'fail_ape'  => 'ERROR',
-						),
-
-				// MSOFFICE  - data   - ZIP compressed data
-				'msoffice' => array(
-							'pattern'   => '^\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1', // D0CF11E == DOCFILE == Microsoft Office Document
-							'group'     => 'misc',
-							'module'    => 'msoffice',
-							'mime_type' => 'application/octet-stream',
-							'fail_id3'  => 'ERROR',
-							'fail_ape'  => 'ERROR',
-						),
-
-				 // CUE  - data       - CUEsheet (index to single-file disc images)
-				 'cue' => array(
-							'pattern'   => '', // empty pattern means cannot be automatically detected, will fall through all other formats and match based on filename and very basic file contents
-							'group'     => 'misc',
-							'module'    => 'cue',
-							'mime_type' => 'application/octet-stream',
-						   ),
-
-			);
-		}
-
-		return $format_info;
-	}
-
-
-
-	public function GetFileFormat(&$filedata, $filename='') {
-		// this function will determine the format of a file based on usually
-		// the first 2-4 bytes of the file (8 bytes for PNG, 16 bytes for JPG,
-		// and in the case of ISO CD image, 6 bytes offset 32kb from the start
-		// of the file).
-
-		// Identify file format - loop through $format_info and detect with reg expr
-		foreach ($this->GetFileFormatArray() as $format_name => $info) {
-			// The /s switch on preg_match() forces preg_match() NOT to treat
-			// newline (0x0A) characters as special chars but do a binary match
-			if (!empty($info['pattern']) && preg_match('#'.$info['pattern'].'#s', $filedata)) {
-				$info['include'] = 'module.'.$info['group'].'.'.$info['module'].'.php';
-				return $info;
-			}
-		}
-
-
-		if (preg_match('#\.mp[123a]$#i', $filename)) {
-			// Too many mp3 encoders on the market put gabage in front of mpeg files
-			// use assume format on these if format detection failed
-			$GetFileFormatArray = $this->GetFileFormatArray();
-			$info = $GetFileFormatArray['mp3'];
-			$info['include'] = 'module.'.$info['group'].'.'.$info['module'].'.php';
-			return $info;
-		} elseif (preg_match('/\.cue$/i', $filename) && preg_match('#FILE "[^"]+" (BINARY|MOTOROLA|AIFF|WAVE|MP3)#', $filedata)) {
-			// there's not really a useful consistent "magic" at the beginning of .cue files to identify them
-			// so until I think of something better, just go by filename if all other format checks fail
-			// and verify there's at least one instance of "TRACK xx AUDIO" in the file
-			$GetFileFormatArray = $this->GetFileFormatArray();
-			$info = $GetFileFormatArray['cue'];
-			$info['include']   = 'module.'.$info['group'].'.'.$info['module'].'.php';
-			return $info;
-		}
-
-		return false;
-	}
-
-
-	// converts array to $encoding charset from $this->encoding
-	public function CharConvert(&$array, $encoding) {
-
-		// identical encoding - end here
-		if ($encoding == $this->encoding) {
-			return;
-		}
-
-		// loop thru array
-		foreach ($array as $key => $value) {
-
-			// go recursive
-			if (is_array($value)) {
-				$this->CharConvert($array[$key], $encoding);
-			}
-
-			// convert string
-			elseif (is_string($value)) {
-				$array[$key] = trim(getid3_lib::iconv_fallback($encoding, $this->encoding, $value));
-			}
-		}
-	}
-
-
-	public function HandleAllTags() {
-
-		// key name => array (tag name, character encoding)
-		static $tags;
-		if (empty($tags)) {
-			$tags = array(
-				'asf'       => array('asf'           , 'UTF-16LE'),
-				'midi'      => array('midi'          , 'ISO-8859-1'),
-				'nsv'       => array('nsv'           , 'ISO-8859-1'),
-				'ogg'       => array('vorbiscomment' , 'UTF-8'),
-				'png'       => array('png'           , 'UTF-8'),
-				'tiff'      => array('tiff'          , 'ISO-8859-1'),
-				'quicktime' => array('quicktime'     , 'UTF-8'),
-				'real'      => array('real'          , 'ISO-8859-1'),
-				'vqf'       => array('vqf'           , 'ISO-8859-1'),
-				'zip'       => array('zip'           , 'ISO-8859-1'),
-				'riff'      => array('riff'          , 'ISO-8859-1'),
-				'lyrics3'   => array('lyrics3'       , 'ISO-8859-1'),
-				'id3v1'     => array('id3v1'         , $this->encoding_id3v1),
-				'id3v2'     => array('id3v2'         , 'UTF-8'), // not according to the specs (every frame can have a different encoding), but getID3() force-converts all encodings to UTF-8
-				'ape'       => array('ape'           , 'UTF-8'),
-				'cue'       => array('cue'           , 'ISO-8859-1'),
-				'matroska'  => array('matroska'      , 'UTF-8'),
-				'flac'      => array('vorbiscomment' , 'UTF-8'),
-				'divxtag'   => array('divx'          , 'ISO-8859-1'),
-				'iptc'      => array('iptc'          , 'ISO-8859-1'),
-			);
-		}
-
-		// loop through comments array
-		foreach ($tags as $comment_name => $tagname_encoding_array) {
-			list($tag_name, $encoding) = $tagname_encoding_array;
-
-			// fill in default encoding type if not already present
-			if (isset($this->info[$comment_name]) && !isset($this->info[$comment_name]['encoding'])) {
-				$this->info[$comment_name]['encoding'] = $encoding;
-			}
-
-			// copy comments if key name set
-			if (!empty($this->info[$comment_name]['comments'])) {
-				foreach ($this->info[$comment_name]['comments'] as $tag_key => $valuearray) {
-					foreach ($valuearray as $key => $value) {
-						if (is_string($value)) {
-							$value = trim($value, " \r\n\t"); // do not trim nulls from $value!! Unicode characters will get mangled if trailing nulls are removed!
-						}
-						if ($value) {
-							if (!is_numeric($key)) {
-								$this->info['tags'][trim($tag_name)][trim($tag_key)][$key] = $value;
-							} else {
-								$this->info['tags'][trim($tag_name)][trim($tag_key)][]     = $value;
-							}
-						}
-					}
-					if ($tag_key == 'picture') {
-						unset($this->info[$comment_name]['comments'][$tag_key]);
-					}
-				}
-
-				if (!isset($this->info['tags'][$tag_name])) {
-					// comments are set but contain nothing but empty strings, so skip
-					continue;
-				}
-
-				if ($this->option_tags_html) {
-					foreach ($this->info['tags'][$tag_name] as $tag_key => $valuearray) {
-						$this->info['tags_html'][$tag_name][$tag_key] = getid3_lib::recursiveMultiByteCharString2HTML($valuearray, $encoding);
-					}
-				}
-
-				$this->CharConvert($this->info['tags'][$tag_name], $encoding);           // only copy gets converted!
-			}
-
-		}
-
-		// pictures can take up a lot of space, and we don't need multiple copies of them
-		// let there be a single copy in [comments][picture], and not elsewhere
-		if (!empty($this->info['tags'])) {
-			$unset_keys = array('tags', 'tags_html');
-			foreach ($this->info['tags'] as $tagtype => $tagarray) {
-				foreach ($tagarray as $tagname => $tagdata) {
-					if ($tagname == 'picture') {
-						foreach ($tagdata as $key => $tagarray) {
-							$this->info['comments']['picture'][] = $tagarray;
-							if (isset($tagarray['data']) && isset($tagarray['image_mime'])) {
-								if (isset($this->info['tags'][$tagtype][$tagname][$key])) {
-									unset($this->info['tags'][$tagtype][$tagname][$key]);
-								}
-								if (isset($this->info['tags_html'][$tagtype][$tagname][$key])) {
-									unset($this->info['tags_html'][$tagtype][$tagname][$key]);
-								}
-							}
-						}
-					}
-				}
-				foreach ($unset_keys as $unset_key) {
-					// remove possible empty keys from (e.g. [tags][id3v2][picture])
-					if (empty($this->info[$unset_key][$tagtype]['picture'])) {
-						unset($this->info[$unset_key][$tagtype]['picture']);
-					}
-					if (empty($this->info[$unset_key][$tagtype])) {
-						unset($this->info[$unset_key][$tagtype]);
-					}
-					if (empty($this->info[$unset_key])) {
-						unset($this->info[$unset_key]);
-					}
-				}
-				// remove duplicate copy of picture data from (e.g. [id3v2][comments][picture])
-				if (isset($this->info[$tagtype]['comments']['picture'])) {
-					unset($this->info[$tagtype]['comments']['picture']);
-				}
-				if (empty($this->info[$tagtype]['comments'])) {
-					unset($this->info[$tagtype]['comments']);
-				}
-				if (empty($this->info[$tagtype])) {
-					unset($this->info[$tagtype]);
-				}
-			}
-		}
-		return true;
-	}
-
-	public function getHashdata($algorithm) {
-		switch ($algorithm) {
-			case 'md5':
-			case 'sha1':
-				break;
-
-			default:
-				return $this->error('bad algorithm "'.$algorithm.'" in getHashdata()');
-				break;
-		}
-
-		if (!empty($this->info['fileformat']) && !empty($this->info['dataformat']) && ($this->info['fileformat'] == 'ogg') && ($this->info['audio']['dataformat'] == 'vorbis')) {
-
-			// We cannot get an identical md5_data value for Ogg files where the comments
-			// span more than 1 Ogg page (compared to the same audio data with smaller
-			// comments) using the normal getID3() method of MD5'ing the data between the
-			// end of the comments and the end of the file (minus any trailing tags),
-			// because the page sequence numbers of the pages that the audio data is on
-			// do not match. Under normal circumstances, where comments are smaller than
-			// the nominal 4-8kB page size, then this is not a problem, but if there are
-			// very large comments, the only way around it is to strip off the comment
-			// tags with vorbiscomment and MD5 that file.
-			// This procedure must be applied to ALL Ogg files, not just the ones with
-			// comments larger than 1 page, because the below method simply MD5's the
-			// whole file with the comments stripped, not just the portion after the
-			// comments block (which is the standard getID3() method.
-
-			// The above-mentioned problem of comments spanning multiple pages and changing
-			// page sequence numbers likely happens for OggSpeex and OggFLAC as well, but
-			// currently vorbiscomment only works on OggVorbis files.
-
-			if (preg_match('#(1|ON)#i', ini_get('safe_mode'))) {
-
-				$this->warning('Failed making system call to vorbiscomment.exe - '.$algorithm.'_data is incorrect - error returned: PHP running in Safe Mode (backtick operator not available)');
-				$this->info[$algorithm.'_data'] = false;
-
-			} else {
-
-				// Prevent user from aborting script
-				$old_abort = ignore_user_abort(true);
-
-				// Create empty file
-				$empty = tempnam(GETID3_TEMP_DIR, 'getID3');
-				touch($empty);
-
-				// Use vorbiscomment to make temp file without comments
-				$temp = tempnam(GETID3_TEMP_DIR, 'getID3');
-				$file = $this->info['filenamepath'];
-
-				if (GETID3_OS_ISWINDOWS) {
-
-					if (file_exists(GETID3_HELPERAPPSDIR.'vorbiscomment.exe')) {
-
-						$commandline = '"'.GETID3_HELPERAPPSDIR.'vorbiscomment.exe" -w -c "'.$empty.'" "'.$file.'" "'.$temp.'"';
-						$VorbisCommentError = `$commandline`;
-
-					} else {
-
-						$VorbisCommentError = 'vorbiscomment.exe not found in '.GETID3_HELPERAPPSDIR;
-
-					}
-
-				} else {
-
-					$commandline = 'vorbiscomment -w -c "'.$empty.'" "'.$file.'" "'.$temp.'" 2>&1';
-					$commandline = 'vorbiscomment -w -c '.escapeshellarg($empty).' '.escapeshellarg($file).' '.escapeshellarg($temp).' 2>&1';
-					$VorbisCommentError = `$commandline`;
-
-				}
-
-				if (!empty($VorbisCommentError)) {
-
-					$this->info['warning'][]         = 'Failed making system call to vorbiscomment(.exe) - '.$algorithm.'_data will be incorrect. If vorbiscomment is unavailable, please download from http://www.vorbis.com/download.psp and put in the getID3() directory. Error returned: '.$VorbisCommentError;
-					$this->info[$algorithm.'_data']  = false;
-
-				} else {
-
-					// Get hash of newly created file
-					switch ($algorithm) {
-						case 'md5':
-							$this->info[$algorithm.'_data'] = md5_file($temp);
-							break;
-
-						case 'sha1':
-							$this->info[$algorithm.'_data'] = sha1_file($temp);
-							break;
-					}
-				}
-
-				// Clean up
-				unlink($empty);
-				unlink($temp);
-
-				// Reset abort setting
-				ignore_user_abort($old_abort);
-
-			}
-
-		} else {
-
-			if (!empty($this->info['avdataoffset']) || (isset($this->info['avdataend']) && ($this->info['avdataend'] < $this->info['filesize']))) {
-
-				// get hash from part of file
-				$this->info[$algorithm.'_data'] = getid3_lib::hash_data($this->info['filenamepath'], $this->info['avdataoffset'], $this->info['avdataend'], $algorithm);
-
-			} else {
-
-				// get hash from whole file
-				switch ($algorithm) {
-					case 'md5':
-						$this->info[$algorithm.'_data'] = md5_file($this->info['filenamepath']);
-						break;
-
-					case 'sha1':
-						$this->info[$algorithm.'_data'] = sha1_file($this->info['filenamepath']);
-						break;
-				}
-			}
-
-		}
-		return true;
-	}
-
-
-	public function ChannelsBitratePlaytimeCalculations() {
-
-		// set channelmode on audio
-		if (!empty($this->info['audio']['channelmode']) || !isset($this->info['audio']['channels'])) {
-			// ignore
-		} elseif ($this->info['audio']['channels'] == 1) {
-			$this->info['audio']['channelmode'] = 'mono';
-		} elseif ($this->info['audio']['channels'] == 2) {
-			$this->info['audio']['channelmode'] = 'stereo';
-		}
-
-		// Calculate combined bitrate - audio + video
-		$CombinedBitrate  = 0;
-		$CombinedBitrate += (isset($this->info['audio']['bitrate']) ? $this->info['audio']['bitrate'] : 0);
-		$CombinedBitrate += (isset($this->info['video']['bitrate']) ? $this->info['video']['bitrate'] : 0);
-		if (($CombinedBitrate > 0) && empty($this->info['bitrate'])) {
-			$this->info['bitrate'] = $CombinedBitrate;
-		}
-		//if ((isset($this->info['video']) && !isset($this->info['video']['bitrate'])) || (isset($this->info['audio']) && !isset($this->info['audio']['bitrate']))) {
-		//	// for example, VBR MPEG video files cannot determine video bitrate:
-		//	// should not set overall bitrate and playtime from audio bitrate only
-		//	unset($this->info['bitrate']);
-		//}
-
-		// video bitrate undetermined, but calculable
-		if (isset($this->info['video']['dataformat']) && $this->info['video']['dataformat'] && (!isset($this->info['video']['bitrate']) || ($this->info['video']['bitrate'] == 0))) {
-			// if video bitrate not set
-			if (isset($this->info['audio']['bitrate']) && ($this->info['audio']['bitrate'] > 0) && ($this->info['audio']['bitrate'] == $this->info['bitrate'])) {
-				// AND if audio bitrate is set to same as overall bitrate
-				if (isset($this->info['playtime_seconds']) && ($this->info['playtime_seconds'] > 0)) {
-					// AND if playtime is set
-					if (isset($this->info['avdataend']) && isset($this->info['avdataoffset'])) {
-						// AND if AV data offset start/end is known
-						// THEN we can calculate the video bitrate
-						$this->info['bitrate'] = round((($this->info['avdataend'] - $this->info['avdataoffset']) * 8) / $this->info['playtime_seconds']);
-						$this->info['video']['bitrate'] = $this->info['bitrate'] - $this->info['audio']['bitrate'];
-					}
-				}
-			}
-		}
-
-		if ((!isset($this->info['playtime_seconds']) || ($this->info['playtime_seconds'] <= 0)) && !empty($this->info['bitrate'])) {
-			$this->info['playtime_seconds'] = (($this->info['avdataend'] - $this->info['avdataoffset']) * 8) / $this->info['bitrate'];
-		}
-
-		if (!isset($this->info['bitrate']) && !empty($this->info['playtime_seconds'])) {
-			$this->info['bitrate'] = (($this->info['avdataend'] - $this->info['avdataoffset']) * 8) / $this->info['playtime_seconds'];
-		}
-		if (isset($this->info['bitrate']) && empty($this->info['audio']['bitrate']) && empty($this->info['video']['bitrate'])) {
-			if (isset($this->info['audio']['dataformat']) && empty($this->info['video']['resolution_x'])) {
-				// audio only
-				$this->info['audio']['bitrate'] = $this->info['bitrate'];
-			} elseif (isset($this->info['video']['resolution_x']) && empty($this->info['audio']['dataformat'])) {
-				// video only
-				$this->info['video']['bitrate'] = $this->info['bitrate'];
-			}
-		}
-
-		// Set playtime string
-		if (!empty($this->info['playtime_seconds']) && empty($this->info['playtime_string'])) {
-			$this->info['playtime_string'] = getid3_lib::PlaytimeString($this->info['playtime_seconds']);
-		}
-	}
-
-
-	public function CalculateCompressionRatioVideo() {
-		if (empty($this->info['video'])) {
-			return false;
-		}
-		if (empty($this->info['video']['resolution_x']) || empty($this->info['video']['resolution_y'])) {
-			return false;
-		}
-		if (empty($this->info['video']['bits_per_sample'])) {
-			return false;
-		}
-
-		switch ($this->info['video']['dataformat']) {
-			case 'bmp':
-			case 'gif':
-			case 'jpeg':
-			case 'jpg':
-			case 'png':
-			case 'tiff':
-				$FrameRate = 1;
-				$PlaytimeSeconds = 1;
-				$BitrateCompressed = $this->info['filesize'] * 8;
-				break;
-
-			default:
-				if (!empty($this->info['video']['frame_rate'])) {
-					$FrameRate = $this->info['video']['frame_rate'];
-				} else {
-					return false;
-				}
-				if (!empty($this->info['playtime_seconds'])) {
-					$PlaytimeSeconds = $this->info['playtime_seconds'];
-				} else {
-					return false;
-				}
-				if (!empty($this->info['video']['bitrate'])) {
-					$BitrateCompressed = $this->info['video']['bitrate'];
-				} else {
-					return false;
-				}
-				break;
-		}
-		$BitrateUncompressed = $this->info['video']['resolution_x'] * $this->info['video']['resolution_y'] * $this->info['video']['bits_per_sample'] * $FrameRate;
-
-		$this->info['video']['compression_ratio'] = $BitrateCompressed / $BitrateUncompressed;
-		return true;
-	}
-
-
-	public function CalculateCompressionRatioAudio() {
-		if (empty($this->info['audio']['bitrate']) || empty($this->info['audio']['channels']) || empty($this->info['audio']['sample_rate']) || !is_numeric($this->info['audio']['sample_rate'])) {
-			return false;
-		}
-		$this->info['audio']['compression_ratio'] = $this->info['audio']['bitrate'] / ($this->info['audio']['channels'] * $this->info['audio']['sample_rate'] * (!empty($this->info['audio']['bits_per_sample']) ? $this->info['audio']['bits_per_sample'] : 16));
-
-		if (!empty($this->info['audio']['streams'])) {
-			foreach ($this->info['audio']['streams'] as $streamnumber => $streamdata) {
-				if (!empty($streamdata['bitrate']) && !empty($streamdata['channels']) && !empty($streamdata['sample_rate'])) {
-					$this->info['audio']['streams'][$streamnumber]['compression_ratio'] = $streamdata['bitrate'] / ($streamdata['channels'] * $streamdata['sample_rate'] * (!empty($streamdata['bits_per_sample']) ? $streamdata['bits_per_sample'] : 16));
-				}
-			}
-		}
-		return true;
-	}
-
-
-	public function CalculateReplayGain() {
-		if (isset($this->info['replay_gain'])) {
-			if (!isset($this->info['replay_gain']['reference_volume'])) {
-				$this->info['replay_gain']['reference_volume'] = (double) 89.0;
-			}
-			if (isset($this->info['replay_gain']['track']['adjustment'])) {
-				$this->info['replay_gain']['track']['volume'] = $this->info['replay_gain']['reference_volume'] - $this->info['replay_gain']['track']['adjustment'];
-			}
-			if (isset($this->info['replay_gain']['album']['adjustment'])) {
-				$this->info['replay_gain']['album']['volume'] = $this->info['replay_gain']['reference_volume'] - $this->info['replay_gain']['album']['adjustment'];
-			}
-
-			if (isset($this->info['replay_gain']['track']['peak'])) {
-				$this->info['replay_gain']['track']['max_noclip_gain'] = 0 - getid3_lib::RGADamplitude2dB($this->info['replay_gain']['track']['peak']);
-			}
-			if (isset($this->info['replay_gain']['album']['peak'])) {
-				$this->info['replay_gain']['album']['max_noclip_gain'] = 0 - getid3_lib::RGADamplitude2dB($this->info['replay_gain']['album']['peak']);
-			}
-		}
-		return true;
-	}
-
-	public function ProcessAudioStreams() {
-		if (!empty($this->info['audio']['bitrate']) || !empty($this->info['audio']['channels']) || !empty($this->info['audio']['sample_rate'])) {
-			if (!isset($this->info['audio']['streams'])) {
-				foreach ($this->info['audio'] as $key => $value) {
-					if ($key != 'streams') {
-						$this->info['audio']['streams'][0][$key] = $value;
-					}
-				}
-			}
-		}
-		return true;
-	}
-
-	public function getid3_tempnam() {
-		return tempnam($this->tempdir, 'gI3');
-	}
-
-	public function include_module($name) {
-		//if (!file_exists($this->include_path.'module.'.$name.'.php')) {
-		if (!file_exists(GETID3_INCLUDEPATH.'module.'.$name.'.php')) {
-			throw new getid3_exception('Required module.'.$name.'.php is missing.');
-		}
-		include_once(GETID3_INCLUDEPATH.'module.'.$name.'.php');
-		return true;
-	}
-
-}
-
-
-abstract class getid3_handler {
-
-	/**
-	* @var getID3
-	*/
-	protected $getid3;                       // pointer
-
-	protected $data_string_flag     = false; // analyzing filepointer or string
-	protected $data_string          = '';    // string to analyze
-	protected $data_string_position = 0;     // seek position in string
-	protected $data_string_length   = 0;     // string length
-
-	private $dependency_to = null;
-
-
-	public function __construct(getID3 $getid3, $call_module=null) {
-		$this->getid3 = $getid3;
-
-		if ($call_module) {
-			$this->dependency_to = str_replace('getid3_', '', $call_module);
-		}
-	}
-
-
-	// Analyze from file pointer
-	abstract public function Analyze();
-
-
-	// Analyze from string instead
-	public function AnalyzeString($string) {
-		// Enter string mode
-		$this->setStringMode($string);
-
-		// Save info
-		$saved_avdataoffset = $this->getid3->info['avdataoffset'];
-		$saved_avdataend    = $this->getid3->info['avdataend'];
-		$saved_filesize     = (isset($this->getid3->info['filesize']) ? $this->getid3->info['filesize'] : null); // may be not set if called as dependency without openfile() call
-
-		// Reset some info
-		$this->getid3->info['avdataoffset'] = 0;
-		$this->getid3->info['avdataend']    = $this->getid3->info['filesize'] = $this->data_string_length;
-
-		// Analyze
-		$this->Analyze();
-
-		// Restore some info
-		$this->getid3->info['avdataoffset'] = $saved_avdataoffset;
-		$this->getid3->info['avdataend']    = $saved_avdataend;
-		$this->getid3->info['filesize']     = $saved_filesize;
-
-		// Exit string mode
-		$this->data_string_flag = false;
-	}
-
-	public function setStringMode($string) {
-		$this->data_string_flag   = true;
-		$this->data_string        = $string;
-		$this->data_string_length = strlen($string);
-	}
-
-	protected function ftell() {
-		if ($this->data_string_flag) {
-			return $this->data_string_position;
-		}
-		return ftell($this->getid3->fp);
-	}
-
-	protected function fread($bytes) {
-		if ($this->data_string_flag) {
-			$this->data_string_position += $bytes;
-			return substr($this->data_string, $this->data_string_position - $bytes, $bytes);
-		}
-		$pos = $this->ftell() + $bytes;
-		if (!getid3_lib::intValueSupported($pos)) {
-			throw new getid3_exception('cannot fread('.$bytes.' from '.$this->ftell().') because beyond PHP filesystem limit', 10);
-		}
-		return fread($this->getid3->fp, $bytes);
-	}
-
-	protected function fseek($bytes, $whence=SEEK_SET) {
-		if ($this->data_string_flag) {
-			switch ($whence) {
-				case SEEK_SET:
-					$this->data_string_position = $bytes;
-					break;
-
-				case SEEK_CUR:
-					$this->data_string_position += $bytes;
-					break;
-
-				case SEEK_END:
-					$this->data_string_position = $this->data_string_length + $bytes;
-					break;
-			}
-			return 0;
-		} else {
-			$pos = $bytes;
-			if ($whence == SEEK_CUR) {
-				$pos = $this->ftell() + $bytes;
-			} elseif ($whence == SEEK_END) {
-				$pos = $this->getid3->info['filesize'] + $bytes;
-			}
-			if (!getid3_lib::intValueSupported($pos)) {
-				throw new getid3_exception('cannot fseek('.$pos.') because beyond PHP filesystem limit', 10);
-			}
-		}
-		return fseek($this->getid3->fp, $bytes, $whence);
-	}
-
-	protected function feof() {
-		if ($this->data_string_flag) {
-			return $this->data_string_position >= $this->data_string_length;
-		}
-		return feof($this->getid3->fp);
-	}
-
-	final protected function isDependencyFor($module) {
-		return $this->dependency_to == $module;
-	}
-
-	protected function error($text) {
-		$this->getid3->info['error'][] = $text;
-
-		return false;
-	}
-
-	protected function warning($text) {
-		return $this->getid3->warning($text);
-	}
-
-	protected function notice($text) {
-		// does nothing for now
-	}
-
-	public function saveAttachment($name, $offset, $length, $image_mime=null) {
-		try {
-
-			// do not extract at all
-			if ($this->getid3->option_save_attachments === getID3::ATTACHMENTS_NONE) {
-
-				$attachment = null; // do not set any
-
-			// extract to return array
-			} elseif ($this->getid3->option_save_attachments === getID3::ATTACHMENTS_INLINE) {
-
-				$this->fseek($offset);
-				$attachment = $this->fread($length); // get whole data in one pass, till it is anyway stored in memory
-				if ($attachment === false || strlen($attachment) != $length) {
-					throw new Exception('failed to read attachment data');
-				}
-
-			// assume directory path is given
-			} else {
-
-				// set up destination path
-				$dir = rtrim(str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $this->getid3->option_save_attachments), DIRECTORY_SEPARATOR);
-				if (!is_dir($dir) || !is_writable($dir)) { // check supplied directory
-					throw new Exception('supplied path ('.$dir.') does not exist, or is not writable');
-				}
-				$dest = $dir.DIRECTORY_SEPARATOR.$name.($image_mime ? '.'.getid3_lib::ImageExtFromMime($image_mime) : '');
-
-				// create dest file
-				if (($fp_dest = fopen($dest, 'wb')) == false) {
-					throw new Exception('failed to create file '.$dest);
-				}
-
-				// copy data
-				$this->fseek($offset);
-				$buffersize = ($this->data_string_flag ? $length : $this->getid3->fread_buffer_size());
-				$bytesleft = $length;
-				while ($bytesleft > 0) {
-					if (($buffer = $this->fread(min($buffersize, $bytesleft))) === false || ($byteswritten = fwrite($fp_dest, $buffer)) === false || ($byteswritten === 0)) {
-						throw new Exception($buffer === false ? 'not enough data to read' : 'failed to write to destination file, may be not enough disk space');
-					}
-					$bytesleft -= $byteswritten;
-				}
-
-				fclose($fp_dest);
-				$attachment = $dest;
-
-			}
-
-		} catch (Exception $e) {
-
-			// close and remove dest file if created
-			if (isset($fp_dest) && is_resource($fp_dest)) {
-				fclose($fp_dest);
-				unlink($dest);
-			}
-
-			// do not set any is case of error
-			$attachment = null;
-			$this->warning('Failed to extract attachment '.$name.': '.$e->getMessage());
-
-		}
-
-		// seek to the end of attachment
-		$this->fseek($offset + $length);
-
-		return $attachment;
-	}
-
-}
-
-
-class getid3_exception extends Exception
-{
-	public $message;
-}
Index: www/wp-includes/autoload/requests/Exception/HTTP/407.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/407.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/407.php	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-<?php
-/**
- * Exception for 407 Proxy Authentication Required responses
- *
- * @package Requests
- */
-
-/**
- * Exception for 407 Proxy Authentication Required responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_407 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 407;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Proxy Authentication Required';
-}
\ No newline at end of file
Index: www/wp-classmap.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-classmap.php	(revision )
+++ www/wp-classmap.php	(revision )
@@ -0,0 +1,344 @@
+<?php
+// WordPress Core Classmap
+return array (
+  '_WP_Editors' => 'wp-includes/autoload/_WP_Editors.php',
+  'WP_Customize_Background_Image_Control' => 'wp-includes/autoload/customize/WP_Customize_Background_Image_Control.php',
+  'WP_Customize_Background_Image_Setting' => 'wp-includes/autoload/customize/WP_Customize_Background_Image_Setting.php',
+  'WP_Customize_Color_Control' => 'wp-includes/autoload/customize/WP_Customize_Color_Control.php',
+  'WP_Customize_Control' => 'wp-includes/autoload/customize/WP_Customize_Control.php',
+  'WP_Customize_Cropped_Image_Control' => 'wp-includes/autoload/customize/WP_Customize_Cropped_Image_Control.php',
+  'WP_Customize_Filter_Setting' => 'wp-includes/autoload/customize/WP_Customize_Filter_Setting.php',
+  'WP_Customize_Header_Image_Control' => 'wp-includes/autoload/customize/WP_Customize_Header_Image_Control.php',
+  'WP_Customize_Header_Image_Setting' => 'wp-includes/autoload/customize/WP_Customize_Header_Image_Setting.php',
+  'WP_Customize_Image_Control' => 'wp-includes/autoload/customize/WP_Customize_Image_Control.php',
+  'WP_Customize_Manager' => 'wp-includes/autoload/customize/WP_Customize_Manager.php',
+  'WP_Customize_Media_Control' => 'wp-includes/autoload/customize/WP_Customize_Media_Control.php',
+  'WP_Customize_Nav_Menu_Auto_Add_Control' => 'wp-includes/autoload/customize/WP_Customize_Nav_Menu_Auto_Add_Control.php',
+  'WP_Customize_Nav_Menu_Control' => 'wp-includes/autoload/customize/WP_Customize_Nav_Menu_Control.php',
+  'WP_Customize_Nav_Menu_Item_Control' => 'wp-includes/autoload/customize/WP_Customize_Nav_Menu_Item_Control.php',
+  'WP_Customize_Nav_Menu_Item_Setting' => 'wp-includes/autoload/customize/WP_Customize_Nav_Menu_Item_Setting.php',
+  'WP_Customize_Nav_Menu_Location_Control' => 'wp-includes/autoload/customize/WP_Customize_Nav_Menu_Location_Control.php',
+  'WP_Customize_Nav_Menu_Name_Control' => 'wp-includes/autoload/customize/WP_Customize_Nav_Menu_Name_Control.php',
+  'WP_Customize_Nav_Menu_Section' => 'wp-includes/autoload/customize/WP_Customize_Nav_Menu_Section.php',
+  'WP_Customize_Nav_Menu_Setting' => 'wp-includes/autoload/customize/WP_Customize_Nav_Menu_Setting.php',
+  'WP_Customize_Nav_Menus' => 'wp-includes/autoload/customize/WP_Customize_Nav_Menus.php',
+  'WP_Customize_Nav_Menus_Panel' => 'wp-includes/autoload/customize/WP_Customize_Nav_Menus_Panel.php',
+  'WP_Customize_New_Menu_Control' => 'wp-includes/autoload/customize/WP_Customize_New_Menu_Control.php',
+  'WP_Customize_New_Menu_Section' => 'wp-includes/autoload/customize/WP_Customize_New_Menu_Section.php',
+  'WP_Customize_Panel' => 'wp-includes/autoload/customize/WP_Customize_Panel.php',
+  'WP_Customize_Partial' => 'wp-includes/autoload/customize/WP_Customize_Partial.php',
+  'WP_Customize_Section' => 'wp-includes/autoload/customize/WP_Customize_Section.php',
+  'WP_Customize_Selective_Refresh' => 'wp-includes/autoload/customize/WP_Customize_Selective_Refresh.php',
+  'WP_Customize_Setting' => 'wp-includes/autoload/customize/WP_Customize_Setting.php',
+  'WP_Customize_Sidebar_Section' => 'wp-includes/autoload/customize/WP_Customize_Sidebar_Section.php',
+  'WP_Customize_Site_Icon_Control' => 'wp-includes/autoload/customize/WP_Customize_Site_Icon_Control.php',
+  'WP_Customize_Theme_Control' => 'wp-includes/autoload/customize/WP_Customize_Theme_Control.php',
+  'WP_Customize_Themes_Section' => 'wp-includes/autoload/customize/WP_Customize_Themes_Section.php',
+  'WP_Customize_Upload_Control' => 'wp-includes/autoload/customize/WP_Customize_Upload_Control.php',
+  'WP_Customize_Widgets' => 'wp-includes/autoload/customize/WP_Customize_Widgets.php',
+  'WP_Widget_Area_Customize_Control' => 'wp-includes/autoload/customize/WP_Widget_Area_Customize_Control.php',
+  'WP_Widget_Form_Customize_Control' => 'wp-includes/autoload/customize/WP_Widget_Form_Customize_Control.php',
+  '_WP_Dependency' => 'wp-includes/autoload/dependency/_WP_Dependency.php',
+  'WP_Dependencies' => 'wp-includes/autoload/dependency/WP_Dependencies.php',
+  'WP_Scripts' => 'wp-includes/autoload/dependency/WP_Scripts.php',
+  'WP_Styles' => 'wp-includes/autoload/dependency/WP_Styles.php',
+  'WP_Embed' => 'wp-includes/autoload/embed/WP_Embed.php',
+  'WP_oEmbed' => 'wp-includes/autoload/embed/WP_oEmbed.php',
+  'WP_oEmbed_Controller' => 'wp-includes/autoload/embed/WP_oEmbed_Controller.php',
+  'PasswordHash' => 'wp-includes/autoload/external/PasswordHash.php',
+  'POP3' => 'wp-includes/autoload/external/POP3.php',
+  'Requests' => 'wp-includes/autoload/external/Requests.php',
+  'SMTP' => 'wp-includes/autoload/external/SMTP.php',
+  'Snoopy' => 'wp-includes/autoload/external/Snoopy.php',
+  'AtomEntry' => 'wp-includes/autoload/feed/AtomEntry.php',
+  'AtomFeed' => 'wp-includes/autoload/feed/AtomFeed.php',
+  'AtomParser' => 'wp-includes/autoload/feed/AtomParser.php',
+  'MagpieRSS' => 'wp-includes/autoload/feed/MagpieRSS.php',
+  'RSSCache' => 'wp-includes/autoload/feed/RSSCache.php',
+  'wp_atom_server' => 'wp-includes/autoload/feed/wp_atom_server.php',
+  'WP_Feed_Cache' => 'wp-includes/autoload/feed/WP_Feed_Cache.php',
+  'WP_Feed_Cache_Transient' => 'wp-includes/autoload/feed/WP_Feed_Cache_Transient.php',
+  'WP_Ajax_Response' => 'wp-includes/autoload/http/WP_Ajax_Response.php',
+  'WP_Http' => 'wp-includes/autoload/http/WP_Http.php',
+  'WP_Http_Cookie' => 'wp-includes/autoload/http/WP_Http_Cookie.php',
+  'WP_Http_Curl' => 'wp-includes/autoload/http/WP_Http_Curl.php',
+  'WP_Http_Encoding' => 'wp-includes/autoload/http/WP_Http_Encoding.php',
+  'WP_HTTP_Fsockopen' => 'wp-includes/autoload/http/WP_HTTP_Fsockopen.php',
+  'WP_HTTP_IXR_Client' => 'wp-includes/autoload/http/WP_HTTP_IXR_Client.php',
+  'WP_HTTP_Proxy' => 'wp-includes/autoload/http/WP_HTTP_Proxy.php',
+  'WP_HTTP_Requests_Response' => 'wp-includes/autoload/http/WP_HTTP_Requests_Response.php',
+  'WP_HTTP_Response' => 'wp-includes/autoload/http/WP_HTTP_Response.php',
+  'WP_Http_Streams' => 'wp-includes/autoload/http/WP_Http_Streams.php',
+  'AMFReader' => 'wp-includes/autoload/id3/AMFReader.php',
+  'AMFStream' => 'wp-includes/autoload/id3/AMFStream.php',
+  'AVCSequenceParameterSetReader' => 'wp-includes/autoload/id3/AVCSequenceParameterSetReader.php',
+  'getID3' => 'wp-includes/autoload/id3/getID3.php',
+  'getid3_ac3' => 'wp-includes/autoload/id3/getid3_ac3.php',
+  'getid3_apetag' => 'wp-includes/autoload/id3/getid3_apetag.php',
+  'getid3_asf' => 'wp-includes/autoload/id3/getid3_asf.php',
+  'getid3_dts' => 'wp-includes/autoload/id3/getid3_dts.php',
+  'getid3_exception' => 'wp-includes/autoload/id3/getid3_exception.php',
+  'getid3_flac' => 'wp-includes/autoload/id3/getid3_flac.php',
+  'getid3_flv' => 'wp-includes/autoload/id3/getid3_flv.php',
+  'getid3_handler' => 'wp-includes/autoload/id3/getid3_handler.php',
+  'getid3_id3v1' => 'wp-includes/autoload/id3/getid3_id3v1.php',
+  'getid3_id3v2' => 'wp-includes/autoload/id3/getid3_id3v2.php',
+  'getid3_lib' => 'wp-includes/autoload/id3/getid3_lib.php',
+  'getid3_lyrics3' => 'wp-includes/autoload/id3/getid3_lyrics3.php',
+  'getid3_matroska' => 'wp-includes/autoload/id3/getid3_matroska.php',
+  'getid3_mp3' => 'wp-includes/autoload/id3/getid3_mp3.php',
+  'getid3_ogg' => 'wp-includes/autoload/id3/getid3_ogg.php',
+  'getid3_quicktime' => 'wp-includes/autoload/id3/getid3_quicktime.php',
+  'getid3_riff' => 'wp-includes/autoload/id3/getid3_riff.php',
+  'WP_Image_Editor' => 'wp-includes/autoload/image/WP_Image_Editor.php',
+  'WP_Image_Editor_GD' => 'wp-includes/autoload/image/WP_Image_Editor_GD.php',
+  'WP_Image_Editor_Imagick' => 'wp-includes/autoload/image/WP_Image_Editor_Imagick.php',
+  'IXR_Base64' => 'wp-includes/autoload/ixr/IXR_Base64.php',
+  'IXR_Client' => 'wp-includes/autoload/ixr/IXR_Client.php',
+  'IXR_ClientMulticall' => 'wp-includes/autoload/ixr/IXR_ClientMulticall.php',
+  'IXR_Date' => 'wp-includes/autoload/ixr/IXR_Date.php',
+  'IXR_Error' => 'wp-includes/autoload/ixr/IXR_Error.php',
+  'IXR_IntrospectionServer' => 'wp-includes/autoload/ixr/IXR_IntrospectionServer.php',
+  'IXR_Message' => 'wp-includes/autoload/ixr/IXR_Message.php',
+  'IXR_Request' => 'wp-includes/autoload/ixr/IXR_Request.php',
+  'IXR_Server' => 'wp-includes/autoload/ixr/IXR_Server.php',
+  'IXR_Value' => 'wp-includes/autoload/ixr/IXR_Value.php',
+  'JsonSerializable' => 'wp-includes/autoload/json/JsonSerializable.php',
+  'Services_JSON' => 'wp-includes/autoload/json/Services_JSON.php',
+  'Services_JSON_Error' => 'wp-includes/autoload/json/Services_JSON_Error.php',
+  'WP_Comment' => 'wp-includes/autoload/object/WP_Comment.php',
+  'WP_Network' => 'wp-includes/autoload/object/WP_Network.php',
+  'WP_Post' => 'wp-includes/autoload/object/WP_Post.php',
+  'WP_Post_Type' => 'wp-includes/autoload/object/WP_Post_Type.php',
+  'WP_Site' => 'wp-includes/autoload/object/WP_Site.php',
+  'WP_Term' => 'wp-includes/autoload/object/WP_Term.php',
+  'WP_Theme' => 'wp-includes/autoload/object/WP_Theme.php',
+  'WP_User' => 'wp-includes/autoload/object/WP_User.php',
+  'PHPMailer' => 'wp-includes/autoload/phpmailer/PHPMailer.php',
+  'phpmailerException' => 'wp-includes/autoload/phpmailer/phpmailerException.php',
+  'Gettext_Translations' => 'wp-includes/autoload/pomo/Gettext_Translations.php',
+  'MO' => 'wp-includes/autoload/pomo/MO.php',
+  'NOOP_Translations' => 'wp-includes/autoload/pomo/NOOP_Translations.php',
+  'PO' => 'wp-includes/autoload/pomo/PO.php',
+  'POMO_CachedFileReader' => 'wp-includes/autoload/pomo/POMO_CachedFileReader.php',
+  'POMO_CachedIntFileReader' => 'wp-includes/autoload/pomo/POMO_CachedIntFileReader.php',
+  'POMO_FileReader' => 'wp-includes/autoload/pomo/POMO_FileReader.php',
+  'POMO_Reader' => 'wp-includes/autoload/pomo/POMO_Reader.php',
+  'POMO_StringReader' => 'wp-includes/autoload/pomo/POMO_StringReader.php',
+  'Translation_Entry' => 'wp-includes/autoload/pomo/Translation_Entry.php',
+  'Translations' => 'wp-includes/autoload/pomo/Translations.php',
+  'WP_Comment_Query' => 'wp-includes/autoload/query/WP_Comment_Query.php',
+  'WP_Date_Query' => 'wp-includes/autoload/query/WP_Date_Query.php',
+  'WP_Meta_Query' => 'wp-includes/autoload/query/WP_Meta_Query.php',
+  'WP_Network_Query' => 'wp-includes/autoload/query/WP_Network_Query.php',
+  'WP_Query' => 'wp-includes/autoload/query/WP_Query.php',
+  'WP_Site_Query' => 'wp-includes/autoload/query/WP_Site_Query.php',
+  'WP_Tax_Query' => 'wp-includes/autoload/query/WP_Tax_Query.php',
+  'WP_Term_Query' => 'wp-includes/autoload/query/WP_Term_Query.php',
+  'WP_User_Query' => 'wp-includes/autoload/query/WP_User_Query.php',
+  'Requests_Auth' => 'wp-includes/autoload/requests/Requests_Auth.php',
+  'Requests_Auth_Basic' => 'wp-includes/autoload/requests/Requests_Auth_Basic.php',
+  'Requests_Cookie' => 'wp-includes/autoload/requests/Requests_Cookie.php',
+  'Requests_Cookie_Jar' => 'wp-includes/autoload/requests/Requests_Cookie_Jar.php',
+  'Requests_Exception' => 'wp-includes/autoload/requests/Requests_Exception.php',
+  'Requests_Exception_HTTP' => 'wp-includes/autoload/requests/Requests_Exception_HTTP.php',
+  'Requests_Exception_HTTP_304' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_304.php',
+  'Requests_Exception_HTTP_305' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_305.php',
+  'Requests_Exception_HTTP_306' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_306.php',
+  'Requests_Exception_HTTP_400' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_400.php',
+  'Requests_Exception_HTTP_401' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_401.php',
+  'Requests_Exception_HTTP_402' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_402.php',
+  'Requests_Exception_HTTP_403' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_403.php',
+  'Requests_Exception_HTTP_404' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_404.php',
+  'Requests_Exception_HTTP_405' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_405.php',
+  'Requests_Exception_HTTP_406' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_406.php',
+  'Requests_Exception_HTTP_407' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_407.php',
+  'Requests_Exception_HTTP_408' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_408.php',
+  'Requests_Exception_HTTP_409' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_409.php',
+  'Requests_Exception_HTTP_410' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_410.php',
+  'Requests_Exception_HTTP_411' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_411.php',
+  'Requests_Exception_HTTP_412' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_412.php',
+  'Requests_Exception_HTTP_413' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_413.php',
+  'Requests_Exception_HTTP_414' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_414.php',
+  'Requests_Exception_HTTP_415' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_415.php',
+  'Requests_Exception_HTTP_416' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_416.php',
+  'Requests_Exception_HTTP_417' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_417.php',
+  'Requests_Exception_HTTP_418' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_418.php',
+  'Requests_Exception_HTTP_428' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_428.php',
+  'Requests_Exception_HTTP_429' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_429.php',
+  'Requests_Exception_HTTP_431' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_431.php',
+  'Requests_Exception_HTTP_500' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_500.php',
+  'Requests_Exception_HTTP_501' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_501.php',
+  'Requests_Exception_HTTP_502' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_502.php',
+  'Requests_Exception_HTTP_503' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_503.php',
+  'Requests_Exception_HTTP_504' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_504.php',
+  'Requests_Exception_HTTP_505' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_505.php',
+  'Requests_Exception_HTTP_511' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_511.php',
+  'Requests_Exception_HTTP_Unknown' => 'wp-includes/autoload/requests/Requests_Exception_HTTP_Unknown.php',
+  'Requests_Exception_Transport' => 'wp-includes/autoload/requests/Requests_Exception_Transport.php',
+  'Requests_Exception_Transport_cURL' => 'wp-includes/autoload/requests/Requests_Exception_Transport_cURL.php',
+  'Requests_Hooker' => 'wp-includes/autoload/requests/Requests_Hooker.php',
+  'Requests_Hooks' => 'wp-includes/autoload/requests/Requests_Hooks.php',
+  'Requests_IDNAEncoder' => 'wp-includes/autoload/requests/Requests_IDNAEncoder.php',
+  'Requests_IPv6' => 'wp-includes/autoload/requests/Requests_IPv6.php',
+  'Requests_IRI' => 'wp-includes/autoload/requests/Requests_IRI.php',
+  'Requests_Proxy' => 'wp-includes/autoload/requests/Requests_Proxy.php',
+  'Requests_Proxy_HTTP' => 'wp-includes/autoload/requests/Requests_Proxy_HTTP.php',
+  'Requests_Response' => 'wp-includes/autoload/requests/Requests_Response.php',
+  'Requests_Response_Headers' => 'wp-includes/autoload/requests/Requests_Response_Headers.php',
+  'Requests_Session' => 'wp-includes/autoload/requests/Requests_Session.php',
+  'Requests_SSL' => 'wp-includes/autoload/requests/Requests_SSL.php',
+  'Requests_Transport' => 'wp-includes/autoload/requests/Requests_Transport.php',
+  'Requests_Transport_cURL' => 'wp-includes/autoload/requests/Requests_Transport_cURL.php',
+  'Requests_Transport_fsockopen' => 'wp-includes/autoload/requests/Requests_Transport_fsockopen.php',
+  'Requests_Utility_CaseInsensitiveDictionary' => 'wp-includes/autoload/requests/Requests_Utility_CaseInsensitiveDictionary.php',
+  'Requests_Utility_FilteredIterator' => 'wp-includes/autoload/requests/Requests_Utility_FilteredIterator.php',
+  'WP_REST_Request' => 'wp-includes/autoload/rest-api/WP_REST_Request.php',
+  'WP_REST_Response' => 'wp-includes/autoload/rest-api/WP_REST_Response.php',
+  'WP_REST_Server' => 'wp-includes/autoload/rest-api/WP_REST_Server.php',
+  'WP_Role' => 'wp-includes/autoload/role/WP_Role.php',
+  'WP_Roles' => 'wp-includes/autoload/role/WP_Roles.php',
+  'WP_Session_Tokens' => 'wp-includes/autoload/session/WP_Session_Tokens.php',
+  'WP_User_Meta_Session_Tokens' => 'wp-includes/autoload/session/WP_User_Meta_Session_Tokens.php',
+  'SimplePie' => 'wp-includes/autoload/simplepie/SimplePie.php',
+  'SimplePie_Author' => 'wp-includes/autoload/simplepie/SimplePie_Author.php',
+  'SimplePie_Cache' => 'wp-includes/autoload/simplepie/SimplePie_Cache.php',
+  'SimplePie_Cache_Base' => 'wp-includes/autoload/simplepie/SimplePie_Cache_Base.php',
+  'SimplePie_Cache_DB' => 'wp-includes/autoload/simplepie/SimplePie_Cache_DB.php',
+  'SimplePie_Cache_File' => 'wp-includes/autoload/simplepie/SimplePie_Cache_File.php',
+  'SimplePie_Cache_Memcache' => 'wp-includes/autoload/simplepie/SimplePie_Cache_Memcache.php',
+  'SimplePie_Cache_MySQL' => 'wp-includes/autoload/simplepie/SimplePie_Cache_MySQL.php',
+  'SimplePie_Caption' => 'wp-includes/autoload/simplepie/SimplePie_Caption.php',
+  'SimplePie_Category' => 'wp-includes/autoload/simplepie/SimplePie_Category.php',
+  'SimplePie_Content_Type_Sniffer' => 'wp-includes/autoload/simplepie/SimplePie_Content_Type_Sniffer.php',
+  'SimplePie_Copyright' => 'wp-includes/autoload/simplepie/SimplePie_Copyright.php',
+  'SimplePie_Core' => 'wp-includes/autoload/simplepie/SimplePie_Core.php',
+  'SimplePie_Credit' => 'wp-includes/autoload/simplepie/SimplePie_Credit.php',
+  'SimplePie_Decode_HTML_Entities' => 'wp-includes/autoload/simplepie/SimplePie_Decode_HTML_Entities.php',
+  'SimplePie_Enclosure' => 'wp-includes/autoload/simplepie/SimplePie_Enclosure.php',
+  'SimplePie_Exception' => 'wp-includes/autoload/simplepie/SimplePie_Exception.php',
+  'SimplePie_File' => 'wp-includes/autoload/simplepie/SimplePie_File.php',
+  'SimplePie_gzdecode' => 'wp-includes/autoload/simplepie/SimplePie_gzdecode.php',
+  'SimplePie_HTTP_Parser' => 'wp-includes/autoload/simplepie/SimplePie_HTTP_Parser.php',
+  'SimplePie_IRI' => 'wp-includes/autoload/simplepie/SimplePie_IRI.php',
+  'SimplePie_Item' => 'wp-includes/autoload/simplepie/SimplePie_Item.php',
+  'SimplePie_Locator' => 'wp-includes/autoload/simplepie/SimplePie_Locator.php',
+  'SimplePie_Misc' => 'wp-includes/autoload/simplepie/SimplePie_Misc.php',
+  'SimplePie_Net_IPv6' => 'wp-includes/autoload/simplepie/SimplePie_Net_IPv6.php',
+  'SimplePie_Parse_Date' => 'wp-includes/autoload/simplepie/SimplePie_Parse_Date.php',
+  'SimplePie_Parser' => 'wp-includes/autoload/simplepie/SimplePie_Parser.php',
+  'SimplePie_Rating' => 'wp-includes/autoload/simplepie/SimplePie_Rating.php',
+  'SimplePie_Registry' => 'wp-includes/autoload/simplepie/SimplePie_Registry.php',
+  'SimplePie_Restriction' => 'wp-includes/autoload/simplepie/SimplePie_Restriction.php',
+  'SimplePie_Sanitize' => 'wp-includes/autoload/simplepie/SimplePie_Sanitize.php',
+  'SimplePie_Source' => 'wp-includes/autoload/simplepie/SimplePie_Source.php',
+  'SimplePie_XML_Declaration_Parser' => 'wp-includes/autoload/simplepie/SimplePie_XML_Declaration_Parser.php',
+  'WP_SimplePie_File' => 'wp-includes/autoload/simplepie/WP_SimplePie_File.php',
+  'WP_SimplePie_Sanitize_KSES' => 'wp-includes/autoload/simplepie/WP_SimplePie_Sanitize_KSES.php',
+  'Text_Diff' => 'wp-includes/autoload/text-diff/Text_Diff.php',
+  'Text_Diff_Engine_native' => 'wp-includes/autoload/text-diff/Text_Diff_Engine_native.php',
+  'Text_Diff_Engine_shell' => 'wp-includes/autoload/text-diff/Text_Diff_Engine_shell.php',
+  'Text_Diff_Engine_string' => 'wp-includes/autoload/text-diff/Text_Diff_Engine_string.php',
+  'Text_Diff_Engine_xdiff' => 'wp-includes/autoload/text-diff/Text_Diff_Engine_xdiff.php',
+  'Text_Diff_Op' => 'wp-includes/autoload/text-diff/Text_Diff_Op.php',
+  'Text_Diff_Op_add' => 'wp-includes/autoload/text-diff/Text_Diff_Op_add.php',
+  'Text_Diff_Op_change' => 'wp-includes/autoload/text-diff/Text_Diff_Op_change.php',
+  'Text_Diff_Op_copy' => 'wp-includes/autoload/text-diff/Text_Diff_Op_copy.php',
+  'Text_Diff_Op_delete' => 'wp-includes/autoload/text-diff/Text_Diff_Op_delete.php',
+  'Text_Diff_Renderer' => 'wp-includes/autoload/text-diff/Text_Diff_Renderer.php',
+  'Text_Diff_Renderer_inline' => 'wp-includes/autoload/text-diff/Text_Diff_Renderer_inline.php',
+  'Text_MappedDiff' => 'wp-includes/autoload/text-diff/Text_MappedDiff.php',
+  'Walker' => 'wp-includes/autoload/walker/Walker.php',
+  'Walker_Category' => 'wp-includes/autoload/walker/Walker_Category.php',
+  'Walker_CategoryDropdown' => 'wp-includes/autoload/walker/Walker_CategoryDropdown.php',
+  'Walker_Comment' => 'wp-includes/autoload/walker/Walker_Comment.php',
+  'Walker_Nav_Menu' => 'wp-includes/autoload/walker/Walker_Nav_Menu.php',
+  'Walker_Page' => 'wp-includes/autoload/walker/Walker_Page.php',
+  'Walker_PageDropdown' => 'wp-includes/autoload/walker/Walker_PageDropdown.php',
+  'WP_Widget' => 'wp-includes/autoload/widget/WP_Widget.php',
+  'WP_Widget_Factory' => 'wp-includes/autoload/widget/WP_Widget_Factory.php',
+  'WP_Nav_Menu_Widget' => 'wp-includes/autoload/widgets/WP_Nav_Menu_Widget.php',
+  'WP_Widget_Archives' => 'wp-includes/autoload/widgets/WP_Widget_Archives.php',
+  'WP_Widget_Calendar' => 'wp-includes/autoload/widgets/WP_Widget_Calendar.php',
+  'WP_Widget_Categories' => 'wp-includes/autoload/widgets/WP_Widget_Categories.php',
+  'WP_Widget_Links' => 'wp-includes/autoload/widgets/WP_Widget_Links.php',
+  'WP_Widget_Meta' => 'wp-includes/autoload/widgets/WP_Widget_Meta.php',
+  'WP_Widget_Pages' => 'wp-includes/autoload/widgets/WP_Widget_Pages.php',
+  'WP_Widget_Recent_Comments' => 'wp-includes/autoload/widgets/WP_Widget_Recent_Comments.php',
+  'WP_Widget_Recent_Posts' => 'wp-includes/autoload/widgets/WP_Widget_Recent_Posts.php',
+  'WP_Widget_RSS' => 'wp-includes/autoload/widgets/WP_Widget_RSS.php',
+  'WP_Widget_Search' => 'wp-includes/autoload/widgets/WP_Widget_Search.php',
+  'WP_Widget_Tag_Cloud' => 'wp-includes/autoload/widgets/WP_Widget_Tag_Cloud.php',
+  'WP_Widget_Text' => 'wp-includes/autoload/widgets/WP_Widget_Text.php',
+  'WP' => 'wp-includes/autoload/WP.php',
+  'WP_Admin_Bar' => 'wp-includes/autoload/WP_Admin_Bar.php',
+  'WP_Autoloader' => 'wp-includes/autoload/WP_Autoloader.php',
+  'WP_Error' => 'wp-includes/autoload/WP_Error.php',
+  'WP_Hook' => 'wp-includes/autoload/WP_Hook.php',
+  'WP_Locale' => 'wp-includes/autoload/WP_Locale.php',
+  'WP_MatchesMapRegex' => 'wp-includes/autoload/WP_MatchesMapRegex.php',
+  'WP_Metadata_Lazyloader' => 'wp-includes/autoload/WP_Metadata_Lazyloader.php',
+  'WP_Object_Cache' => 'wp-includes/autoload/WP_Object_Cache.php',
+  'WP_Rewrite' => 'wp-includes/autoload/WP_Rewrite.php',
+  'WP_Text_Diff_Renderer_inline' => 'wp-includes/autoload/WP_Text_Diff_Renderer_inline.php',
+  'WP_Text_Diff_Renderer_Table' => 'wp-includes/autoload/WP_Text_Diff_Renderer_Table.php',
+  'wp_xmlrpc_server' => 'wp-includes/autoload/wp_xmlrpc_server.php',
+  'wpdb' => 'wp-includes/autoload/wpdb.php',
+  'Error' => 'wp-includes/random/Error.php',
+  'TypeError' => 'wp-includes/random/TypeError.php',
+  'Custom_Background' => 'wp-admin/autoload/appearance/Custom_Background.php',
+  'Custom_Image_Header' => 'wp-admin/autoload/appearance/Custom_Image_Header.php',
+  'WP_Site_Icon' => 'wp-admin/autoload/appearance/WP_Site_Icon.php',
+  'WP_User_Search' => 'wp-admin/autoload/deprecated/WP_User_Search.php',
+  'WP_Filesystem_Base' => 'wp-admin/autoload/filesystem/WP_Filesystem_Base.php',
+  'WP_Filesystem_Direct' => 'wp-admin/autoload/filesystem/WP_Filesystem_Direct.php',
+  'WP_Filesystem_FTPext' => 'wp-admin/autoload/filesystem/WP_Filesystem_FTPext.php',
+  'WP_Filesystem_ftpsockets' => 'wp-admin/autoload/filesystem/WP_Filesystem_ftpsockets.php',
+  'WP_Filesystem_SSH2' => 'wp-admin/autoload/filesystem/WP_Filesystem_SSH2.php',
+  'ftp_base' => 'wp-admin/autoload/ftp/ftp_base.php',
+  'ftp_pure' => 'wp-admin/autoload/ftp/ftp_pure.php',
+  'ftp_sockets' => 'wp-admin/autoload/ftp/ftp_sockets.php',
+  '_WP_List_Table_Compat' => 'wp-admin/autoload/list-table/_WP_List_Table_Compat.php',
+  'WP_Comments_List_Table' => 'wp-admin/autoload/list-table/WP_Comments_List_Table.php',
+  'WP_Links_List_Table' => 'wp-admin/autoload/list-table/WP_Links_List_Table.php',
+  'WP_List_Table' => 'wp-admin/autoload/list-table/WP_List_Table.php',
+  'WP_Media_List_Table' => 'wp-admin/autoload/list-table/WP_Media_List_Table.php',
+  'WP_MS_Sites_List_Table' => 'wp-admin/autoload/list-table/WP_MS_Sites_List_Table.php',
+  'WP_MS_Themes_List_Table' => 'wp-admin/autoload/list-table/WP_MS_Themes_List_Table.php',
+  'WP_MS_Users_List_Table' => 'wp-admin/autoload/list-table/WP_MS_Users_List_Table.php',
+  'WP_Plugin_Install_List_Table' => 'wp-admin/autoload/list-table/WP_Plugin_Install_List_Table.php',
+  'WP_Plugins_List_Table' => 'wp-admin/autoload/list-table/WP_Plugins_List_Table.php',
+  'WP_Post_Comments_List_Table' => 'wp-admin/autoload/list-table/WP_Post_Comments_List_Table.php',
+  'WP_Posts_List_Table' => 'wp-admin/autoload/list-table/WP_Posts_List_Table.php',
+  'WP_Terms_List_Table' => 'wp-admin/autoload/list-table/WP_Terms_List_Table.php',
+  'WP_Theme_Install_List_Table' => 'wp-admin/autoload/list-table/WP_Theme_Install_List_Table.php',
+  'WP_Themes_List_Table' => 'wp-admin/autoload/list-table/WP_Themes_List_Table.php',
+  'WP_Users_List_Table' => 'wp-admin/autoload/list-table/WP_Users_List_Table.php',
+  'Automatic_Upgrader_Skin' => 'wp-admin/autoload/upgrader/Automatic_Upgrader_Skin.php',
+  'Bulk_Plugin_Upgrader_Skin' => 'wp-admin/autoload/upgrader/Bulk_Plugin_Upgrader_Skin.php',
+  'Bulk_Theme_Upgrader_Skin' => 'wp-admin/autoload/upgrader/Bulk_Theme_Upgrader_Skin.php',
+  'Bulk_Upgrader_Skin' => 'wp-admin/autoload/upgrader/Bulk_Upgrader_Skin.php',
+  'Core_Upgrader' => 'wp-admin/autoload/upgrader/Core_Upgrader.php',
+  'File_Upload_Upgrader' => 'wp-admin/autoload/upgrader/File_Upload_Upgrader.php',
+  'Language_Pack_Upgrader' => 'wp-admin/autoload/upgrader/Language_Pack_Upgrader.php',
+  'Language_Pack_Upgrader_Skin' => 'wp-admin/autoload/upgrader/Language_Pack_Upgrader_Skin.php',
+  'Plugin_Installer_Skin' => 'wp-admin/autoload/upgrader/Plugin_Installer_Skin.php',
+  'Plugin_Upgrader' => 'wp-admin/autoload/upgrader/Plugin_Upgrader.php',
+  'Plugin_Upgrader_Skin' => 'wp-admin/autoload/upgrader/Plugin_Upgrader_Skin.php',
+  'Theme_Installer_Skin' => 'wp-admin/autoload/upgrader/Theme_Installer_Skin.php',
+  'Theme_Upgrader' => 'wp-admin/autoload/upgrader/Theme_Upgrader.php',
+  'Theme_Upgrader_Skin' => 'wp-admin/autoload/upgrader/Theme_Upgrader_Skin.php',
+  'WP_Ajax_Upgrader_Skin' => 'wp-admin/autoload/upgrader/WP_Ajax_Upgrader_Skin.php',
+  'WP_Automatic_Updater' => 'wp-admin/autoload/upgrader/WP_Automatic_Updater.php',
+  'WP_Upgrader' => 'wp-admin/autoload/upgrader/WP_Upgrader.php',
+  'WP_Upgrader_Skin' => 'wp-admin/autoload/upgrader/WP_Upgrader_Skin.php',
+  'Walker_Category_Checklist' => 'wp-admin/autoload/walker/Walker_Category_Checklist.php',
+  'Walker_Nav_Menu_Checklist' => 'wp-admin/autoload/walker/Walker_Nav_Menu_Checklist.php',
+  'Walker_Nav_Menu_Edit' => 'wp-admin/autoload/walker/Walker_Nav_Menu_Edit.php',
+  'WP_Importer' => 'wp-admin/autoload/WP_Importer.php',
+  'WP_Internal_Pointers' => 'wp-admin/autoload/WP_Internal_Pointers.php',
+  'WP_Press_This' => 'wp-admin/autoload/WP_Press_This.php',
+  'WP_Screen' => 'wp-admin/autoload/WP_Screen.php',
+  'PclZip' => 'wp-admin/autoload/zip/PclZip.php',
+  'ftp' => 'wp-admin/includes/ftp.php',
+);
\ No newline at end of file
Index: www/wp-includes/class-wp-editor.php
===================================================================
--- www/wp-includes/class-wp-editor.php	(revision 38565)
+++ www/wp-includes/autoload/_WP_Editors.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/text-diff/Text_Diff_Op.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/text-diff/Text_Diff_Op.php	(revision )
+++ www/wp-includes/autoload/text-diff/Text_Diff_Op.php	(revision )
@@ -0,0 +1,29 @@
+<?php
+
+/**
+ * @package Text_Diff
+ * @author  Geoffrey T. Dairiki <dairiki@dairiki.org>
+ *
+ * @access private
+ */
+class Text_Diff_Op {
+
+    var $orig;
+    var $final;
+
+    function &reverse()
+    {
+        trigger_error('Abstract method', E_USER_ERROR);
+    }
+
+    function norig()
+    {
+        return $this->orig ? count($this->orig) : 0;
+    }
+
+    function nfinal()
+    {
+        return $this->final ? count($this->final) : 0;
+    }
+
+}
Index: www/wp-includes/class-wp-roles.php
===================================================================
--- www/wp-includes/class-wp-roles.php	(revision 38565)
+++ www/wp-includes/autoload/role/WP_Roles.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/requests/Exception/HTTP/500.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/500.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/500.php	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-<?php
-/**
- * Exception for 500 Internal Server Error responses
- *
- * @package Requests
- */
-
-/**
- * Exception for 500 Internal Server Error responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_500 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 500;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Internal Server Error';
-}
\ No newline at end of file
Index: www/wp-includes/Requests/Exception/HTTP/400.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/400.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_400.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/ID3/license.commercial.txt
===================================================================
--- www/wp-includes/ID3/license.commercial.txt	(revision 38565)
+++ www/wp-includes/autoload/id3/license.commercial.txt	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/taxonomy.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/taxonomy.php	(revision 38565)
+++ www/wp-includes/taxonomy.php	(revision 38565)
@@ -1,4481 +0,0 @@
-<?php
-/**
- * Core Taxonomy API
- *
- * @package WordPress
- * @subpackage Taxonomy
- */
-
-//
-// Taxonomy Registration
-//
-
-/**
- * Creates the initial taxonomies.
- *
- * This function fires twice: in wp-settings.php before plugins are loaded (for
- * backward compatibility reasons), and again on the {@see 'init'} action. We must
- * avoid registering rewrite rules before the {@see 'init'} action.
- *
- * @since 2.8.0
- *
- * @global WP_Rewrite $wp_rewrite The WordPress rewrite class.
- */
-function create_initial_taxonomies() {
-	global $wp_rewrite;
-
-	if ( ! did_action( 'init' ) ) {
-		$rewrite = array( 'category' => false, 'post_tag' => false, 'post_format' => false );
-	} else {
-
-		/**
-		 * Filters the post formats rewrite base.
-		 *
-		 * @since 3.1.0
-		 *
-		 * @param string $context Context of the rewrite base. Default 'type'.
-		 */
-		$post_format_base = apply_filters( 'post_format_rewrite_base', 'type' );
-		$rewrite = array(
-			'category' => array(
-				'hierarchical' => true,
-				'slug' => get_option('category_base') ? get_option('category_base') : 'category',
-				'with_front' => ! get_option('category_base') || $wp_rewrite->using_index_permalinks(),
-				'ep_mask' => EP_CATEGORIES,
-			),
-			'post_tag' => array(
-				'hierarchical' => false,
-				'slug' => get_option('tag_base') ? get_option('tag_base') : 'tag',
-				'with_front' => ! get_option('tag_base') || $wp_rewrite->using_index_permalinks(),
-				'ep_mask' => EP_TAGS,
-			),
-			'post_format' => $post_format_base ? array( 'slug' => $post_format_base ) : false,
-		);
-	}
-
-	register_taxonomy( 'category', 'post', array(
-		'hierarchical' => true,
-		'query_var' => 'category_name',
-		'rewrite' => $rewrite['category'],
-		'public' => true,
-		'show_ui' => true,
-		'show_admin_column' => true,
-		'_builtin' => true,
-	) );
-
-	register_taxonomy( 'post_tag', 'post', array(
-	 	'hierarchical' => false,
-		'query_var' => 'tag',
-		'rewrite' => $rewrite['post_tag'],
-		'public' => true,
-		'show_ui' => true,
-		'show_admin_column' => true,
-		'_builtin' => true,
-	) );
-
-	register_taxonomy( 'nav_menu', 'nav_menu_item', array(
-		'public' => false,
-		'hierarchical' => false,
-		'labels' => array(
-			'name' => __( 'Navigation Menus' ),
-			'singular_name' => __( 'Navigation Menu' ),
-		),
-		'query_var' => false,
-		'rewrite' => false,
-		'show_ui' => false,
-		'_builtin' => true,
-		'show_in_nav_menus' => false,
-	) );
-
-	register_taxonomy( 'link_category', 'link', array(
-		'hierarchical' => false,
-		'labels' => array(
-			'name' => __( 'Link Categories' ),
-			'singular_name' => __( 'Link Category' ),
-			'search_items' => __( 'Search Link Categories' ),
-			'popular_items' => null,
-			'all_items' => __( 'All Link Categories' ),
-			'edit_item' => __( 'Edit Link Category' ),
-			'update_item' => __( 'Update Link Category' ),
-			'add_new_item' => __( 'Add New Link Category' ),
-			'new_item_name' => __( 'New Link Category Name' ),
-			'separate_items_with_commas' => null,
-			'add_or_remove_items' => null,
-			'choose_from_most_used' => null,
-		),
-		'capabilities' => array(
-			'manage_terms' => 'manage_links',
-			'edit_terms'   => 'manage_links',
-			'delete_terms' => 'manage_links',
-			'assign_terms' => 'manage_links',
-		),
-		'query_var' => false,
-		'rewrite' => false,
-		'public' => false,
-		'show_ui' => true,
-		'_builtin' => true,
-	) );
-
-	register_taxonomy( 'post_format', 'post', array(
-		'public' => true,
-		'hierarchical' => false,
-		'labels' => array(
-			'name' => _x( 'Format', 'post format' ),
-			'singular_name' => _x( 'Format', 'post format' ),
-		),
-		'query_var' => true,
-		'rewrite' => $rewrite['post_format'],
-		'show_ui' => false,
-		'_builtin' => true,
-		'show_in_nav_menus' => current_theme_supports( 'post-formats' ),
-	) );
-}
-
-/**
- * Retrieves a list of registered taxonomy names or objects.
- *
- * @since 3.0.0
- *
- * @global array $wp_taxonomies The registered taxonomies.
- *
- * @param array  $args     Optional. An array of `key => value` arguments to match against the taxonomy objects.
- *                         Default empty array.
- * @param string $output   Optional. The type of output to return in the array. Accepts either taxonomy 'names'
- *                         or 'objects'. Default 'names'.
- * @param string $operator Optional. The logical operation to perform. Accepts 'and' or 'or'. 'or' means only
- *                         one element from the array needs to match; 'and' means all elements must match.
- *                         Default 'and'.
- * @return array A list of taxonomy names or objects.
- */
-function get_taxonomies( $args = array(), $output = 'names', $operator = 'and' ) {
-	global $wp_taxonomies;
-
-	$field = ('names' == $output) ? 'name' : false;
-
-	return wp_filter_object_list($wp_taxonomies, $args, $operator, $field);
-}
-
-/**
- * Return the names or objects of the taxonomies which are registered for the requested object or object type, such as
- * a post object or post type name.
- *
- * Example:
- *
- *     $taxonomies = get_object_taxonomies( 'post' );
- *
- * This results in:
- *
- *     Array( 'category', 'post_tag' )
- *
- * @since 2.3.0
- *
- * @global array $wp_taxonomies The registered taxonomies.
- *
- * @param array|string|WP_Post $object Name of the type of taxonomy object, or an object (row from posts)
- * @param string               $output Optional. The type of output to return in the array. Accepts either
- *                                     taxonomy 'names' or 'objects'. Default 'names'.
- * @return array The names of all taxonomy of $object_type.
- */
-function get_object_taxonomies( $object, $output = 'names' ) {
-	global $wp_taxonomies;
-
-	if ( is_object($object) ) {
-		if ( $object->post_type == 'attachment' )
-			return get_attachment_taxonomies( $object, $output );
-		$object = $object->post_type;
-	}
-
-	$object = (array) $object;
-
-	$taxonomies = array();
-	foreach ( (array) $wp_taxonomies as $tax_name => $tax_obj ) {
-		if ( array_intersect($object, (array) $tax_obj->object_type) ) {
-			if ( 'names' == $output )
-				$taxonomies[] = $tax_name;
-			else
-				$taxonomies[ $tax_name ] = $tax_obj;
-		}
-	}
-
-	return $taxonomies;
-}
-
-/**
- * Retrieves the taxonomy object of $taxonomy.
- *
- * The get_taxonomy function will first check that the parameter string given
- * is a taxonomy object and if it is, it will return it.
- *
- * @since 2.3.0
- *
- * @global array $wp_taxonomies The registered taxonomies.
- *
- * @param string $taxonomy Name of taxonomy object to return.
- * @return object|false The Taxonomy Object or false if $taxonomy doesn't exist.
- */
-function get_taxonomy( $taxonomy ) {
-	global $wp_taxonomies;
-
-	if ( ! taxonomy_exists( $taxonomy ) )
-		return false;
-
-	return $wp_taxonomies[$taxonomy];
-}
-
-/**
- * Checks that the taxonomy name exists.
- *
- * Formerly is_taxonomy(), introduced in 2.3.0.
- *
- * @since 3.0.0
- *
- * @global array $wp_taxonomies The registered taxonomies.
- *
- * @param string $taxonomy Name of taxonomy object.
- * @return bool Whether the taxonomy exists.
- */
-function taxonomy_exists( $taxonomy ) {
-	global $wp_taxonomies;
-
-	return isset( $wp_taxonomies[$taxonomy] );
-}
-
-/**
- * Whether the taxonomy object is hierarchical.
- *
- * Checks to make sure that the taxonomy is an object first. Then Gets the
- * object, and finally returns the hierarchical value in the object.
- *
- * A false return value might also mean that the taxonomy does not exist.
- *
- * @since 2.3.0
- *
- * @param string $taxonomy Name of taxonomy object.
- * @return bool Whether the taxonomy is hierarchical.
- */
-function is_taxonomy_hierarchical($taxonomy) {
-	if ( ! taxonomy_exists($taxonomy) )
-		return false;
-
-	$taxonomy = get_taxonomy($taxonomy);
-	return $taxonomy->hierarchical;
-}
-
-/**
- * Creates or modifies a taxonomy object.
- *
- * Note: Do not use before the {@see 'init'} hook.
- *
- * A simple function for creating or modifying a taxonomy object based on the
- * parameters given. The function will accept an array (third optional
- * parameter), along with strings for the taxonomy name and another string for
- * the object type.
- *
- * @since 2.3.0
- * @since 4.2.0 Introduced `show_in_quick_edit` argument.
- * @since 4.4.0 The `show_ui` argument is now enforced on the term editing screen.
- * @since 4.4.0 The `public` argument now controls whether the taxonomy can be queried on the front end.
- * @since 4.5.0 Introduced `publicly_queryable` argument.
- *
- * @global array $wp_taxonomies Registered taxonomies.
- * @global WP    $wp            WP instance.
- *
- * @param string       $taxonomy    Taxonomy key, must not exceed 32 characters.
- * @param array|string $object_type Name of the object type for the taxonomy object.
- * @param array|string $args        {
- *     Optional. Array or query string of arguments for registering a taxonomy.
- *
- *     @type string        $label                 Name of the taxonomy shown in the menu. Usually plural. If not set,
- *                                                `$labels['name']` will be used.
- *     @type array         $labels                An array of labels for this taxonomy. By default, Tag labels are used for
- *                                                non-hierarchical taxonmies, and Category labels are used for hierarchical
- *                                                taxonomies. See accepted values in get_taxonomy_labels().
- *                                                Default empty array.
- *     @type string        $description           A short descriptive summary of what the taxonomy is for. Default empty.
- *     @type bool          $public                Whether a taxonomy is intended for use publicly either via
- *                                                the admin interface or by front-end users. The default settings
- *                                                of `$publicly_queryable`, `$show_ui`, and `$show_in_nav_menus`
- *                                                are inherited from `$public`.
- *     @type bool          $publicly_queryable    Whether the taxonomy is publicly queryable.
- *                                                If not set, the default is inherited from `$public`
- *     @type bool          $hierarchical          Whether the taxonomy is hierarchical. Default false.
- *     @type bool          $show_ui               Whether to generate and allow a UI for managing terms in this taxonomy in
- *                                                the admin. If not set, the default is inherited from `$public`
- *                                                (default true).
- *     @type bool          $show_in_menu          Whether to show the taxonomy in the admin menu. If true, the taxonomy is
- *                                                shown as a submenu of the object type menu. If false, no menu is shown.
- *                                                `$show_ui` must be true. If not set, default is inherited from `$show_ui`
- *                                                (default true).
- *     @type bool          $show_in_nav_menus     Makes this taxonomy available for selection in navigation menus. If not
- *                                                set, the default is inherited from `$public` (default true).
- *     @type bool          $show_tagcloud         Whether to list the taxonomy in the Tag Cloud Widget controls. If not set,
- *                                                the default is inherited from `$show_ui` (default true).
- *     @type bool          $show_in_quick_edit    Whether to show the taxonomy in the quick/bulk edit panel. It not set,
- *                                                the default is inherited from `$show_ui` (default true).
- *     @type bool          $show_admin_column     Whether to display a column for the taxonomy on its post type listing
- *                                                screens. Default false.
- *     @type bool|callable $meta_box_cb           Provide a callback function for the meta box display. If not set,
- *                                                post_categories_meta_box() is used for hierarchical taxonomies, and
- *                                                post_tags_meta_box() is used for non-hierarchical. If false, no meta
- *                                                box is shown.
- *     @type array         $capabilities {
- *         Array of capabilities for this taxonomy.
- *
- *         @type string $manage_terms Default 'manage_categories'.
- *         @type string $edit_terms   Default 'manage_categories'.
- *         @type string $delete_terms Default 'manage_categories'.
- *         @type string $assign_terms Default 'edit_posts'.
- *     }
- *     @type bool|array    $rewrite {
- *         Triggers the handling of rewrites for this taxonomy. Default true, using $taxonomy as slug. To prevent
- *         rewrite, set to false. To specify rewrite rules, an array can be passed with any of these keys:
- *
- *         @type string $slug         Customize the permastruct slug. Default `$taxonomy` key.
- *         @type bool   $with_front   Should the permastruct be prepended with WP_Rewrite::$front. Default true.
- *         @type bool   $hierarchical Either hierarchical rewrite tag or not. Default false.
- *         @type int    $ep_mask      Assign an endpoint mask. Default `EP_NONE`.
- *     }
- *     @type string        $query_var             Sets the query var key for this taxonomy. Default `$taxonomy` key. If
- *                                                false, a taxonomy cannot be loaded at `?{query_var}={term_slug}`. If a
- *                                                string, the query `?{query_var}={term_slug}` will be valid.
- *     @type callable      $update_count_callback Works much like a hook, in that it will be called when the count is
- *                                                updated. Default _update_post_term_count() for taxonomies attached
- *                                                to post types, which confirms that the objects are published before
- *                                                counting them. Default _update_generic_term_count() for taxonomies
- *                                                attached to other object types, such as users.
- *     @type bool          $_builtin              This taxonomy is a "built-in" taxonomy. INTERNAL USE ONLY!
- *                                                Default false.
- * }
- * @return WP_Error|void WP_Error, if errors.
- */
-function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
-	global $wp_taxonomies, $wp;
-
-	if ( ! is_array( $wp_taxonomies ) )
-		$wp_taxonomies = array();
-
-	$args = wp_parse_args( $args );
-
-	/**
-	 * Filters the arguments for registering a taxonomy.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param array  $args        Array of arguments for registering a taxonomy.
-	 * @param string $taxonomy    Taxonomy key.
-	 * @param array  $object_type Array of names of object types for the taxonomy.
-	 */
-	$args = apply_filters( 'register_taxonomy_args', $args, $taxonomy, (array) $object_type );
-
-	$defaults = array(
-		'labels'                => array(),
-		'description'           => '',
-		'public'                => true,
-		'publicly_queryable'    => null,
-		'hierarchical'          => false,
-		'show_ui'               => null,
-		'show_in_menu'          => null,
-		'show_in_nav_menus'     => null,
-		'show_tagcloud'         => null,
-		'show_in_quick_edit'	=> null,
-		'show_admin_column'     => false,
-		'meta_box_cb'           => null,
-		'capabilities'          => array(),
-		'rewrite'               => true,
-		'query_var'             => $taxonomy,
-		'update_count_callback' => '',
-		'_builtin'              => false,
-	);
-	$args = array_merge( $defaults, $args );
-
-	if ( empty( $taxonomy ) || strlen( $taxonomy ) > 32 ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Taxonomy names must be between 1 and 32 characters in length.' ), '4.2.0' );
-		return new WP_Error( 'taxonomy_length_invalid', __( 'Taxonomy names must be between 1 and 32 characters in length.' ) );
-	}
-
-	// If not set, default to the setting for public.
-	if ( null === $args['publicly_queryable'] ) {
-		$args['publicly_queryable'] = $args['public'];
-	}
-
-	// Non-publicly queryable taxonomies should not register query vars, except in the admin.
-	if ( false !== $args['query_var'] && ( is_admin() || false !== $args['publicly_queryable'] ) && ! empty( $wp ) ) {
-		if ( true === $args['query_var'] )
-			$args['query_var'] = $taxonomy;
-		else
-			$args['query_var'] = sanitize_title_with_dashes( $args['query_var'] );
-		$wp->add_query_var( $args['query_var'] );
-	} else {
-		// Force query_var to false for non-public taxonomies.
-		$args['query_var'] = false;
-	}
-
-	if ( false !== $args['rewrite'] && ( is_admin() || '' != get_option( 'permalink_structure' ) ) ) {
-		$args['rewrite'] = wp_parse_args( $args['rewrite'], array(
-			'with_front' => true,
-			'hierarchical' => false,
-			'ep_mask' => EP_NONE,
-		) );
-
-		if ( empty( $args['rewrite']['slug'] ) )
-			$args['rewrite']['slug'] = sanitize_title_with_dashes( $taxonomy );
-
-		if ( $args['hierarchical'] && $args['rewrite']['hierarchical'] )
-			$tag = '(.+?)';
-		else
-			$tag = '([^/]+)';
-
-		add_rewrite_tag( "%$taxonomy%", $tag, $args['query_var'] ? "{$args['query_var']}=" : "taxonomy=$taxonomy&term=" );
-		add_permastruct( $taxonomy, "{$args['rewrite']['slug']}/%$taxonomy%", $args['rewrite'] );
-	}
-
-	// If not set, default to the setting for public.
-	if ( null === $args['show_ui'] )
-		$args['show_ui'] = $args['public'];
-
-	// If not set, default to the setting for show_ui.
-	if ( null === $args['show_in_menu' ] || ! $args['show_ui'] )
-		$args['show_in_menu' ] = $args['show_ui'];
-
-	// If not set, default to the setting for public.
-	if ( null === $args['show_in_nav_menus'] )
-		$args['show_in_nav_menus'] = $args['public'];
-
-	// If not set, default to the setting for show_ui.
-	if ( null === $args['show_tagcloud'] )
-		$args['show_tagcloud'] = $args['show_ui'];
-
-	// If not set, default to the setting for show_ui.
-	if ( null === $args['show_in_quick_edit'] ) {
-		$args['show_in_quick_edit'] = $args['show_ui'];
-	}
-
-	$default_caps = array(
-		'manage_terms' => 'manage_categories',
-		'edit_terms'   => 'manage_categories',
-		'delete_terms' => 'manage_categories',
-		'assign_terms' => 'edit_posts',
-	);
-	$args['cap'] = (object) array_merge( $default_caps, $args['capabilities'] );
-	unset( $args['capabilities'] );
-
-	$args['name'] = $taxonomy;
-	$args['object_type'] = array_unique( (array) $object_type );
-
-	$args['labels'] = get_taxonomy_labels( (object) $args );
-	$args['label'] = $args['labels']->name;
-
-	// If not set, use the default meta box
-	if ( null === $args['meta_box_cb'] ) {
-		if ( $args['hierarchical'] )
-			$args['meta_box_cb'] = 'post_categories_meta_box';
-		else
-			$args['meta_box_cb'] = 'post_tags_meta_box';
-	}
-
-	$wp_taxonomies[ $taxonomy ] = (object) $args;
-
-	// Register callback handling for meta box.
- 	add_filter( 'wp_ajax_add-' . $taxonomy, '_wp_ajax_add_hierarchical_term' );
-
-	/**
-	 * Fires after a taxonomy is registered.
-	 *
-	 * @since 3.3.0
-	 *
-	 * @param string       $taxonomy    Taxonomy slug.
-	 * @param array|string $object_type Object type or array of object types.
-	 * @param array        $args        Array of taxonomy registration arguments.
-	 */
-	do_action( 'registered_taxonomy', $taxonomy, $object_type, $args );
-}
-
-/**
- * Unregisters a taxonomy.
- *
- * Can not be used to unregister built-in taxonomies.
- *
- * @since 4.5.0
- *
- * @global WP    $wp            Current WordPress environment instance.
- * @global array $wp_taxonomies List of taxonomies.
- *
- * @param string $taxonomy Taxonomy name.
- * @return bool|WP_Error True on success, WP_Error on failure or if the taxonomy doesn't exist.
- */
-function unregister_taxonomy( $taxonomy ) {
-	if ( ! taxonomy_exists( $taxonomy ) ) {
-		return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
-	}
-
-	$taxonomy_args = get_taxonomy( $taxonomy );
-
-	// Do not allow unregistering internal taxonomies.
-	if ( $taxonomy_args->_builtin ) {
-		return new WP_Error( 'invalid_taxonomy', __( 'Unregistering a built-in taxonomy is not allowed' ) );
-	}
-
-	global $wp, $wp_taxonomies;
-
-	// Remove query var.
-	if ( false !== $taxonomy_args->query_var ) {
-		$wp->remove_query_var( $taxonomy_args->query_var );
-	}
-
-	// Remove rewrite tags and permastructs.
-	if ( false !== $taxonomy_args->rewrite ) {
-		remove_rewrite_tag( "%$taxonomy%" );
-		remove_permastruct( $taxonomy );
-	}
-
-	// Unregister callback handling for meta box.
-	remove_filter( 'wp_ajax_add-' . $taxonomy, '_wp_ajax_add_hierarchical_term' );
-
-	// Remove the taxonomy.
-	unset( $wp_taxonomies[ $taxonomy ] );
-
-	/**
-	 * Fires after a taxonomy is unregistered.
-	 *
-	 * @since 4.5.0
-	 *
-	 * @param string $taxonomy Taxonomy name.
-	 */
-	do_action( 'unregistered_taxonomy', $taxonomy );
-
-	return true;
-}
-
-/**
- * Builds an object with all taxonomy labels out of a taxonomy object
- *
- * Accepted keys of the label array in the taxonomy object:
- *
- * - name - general name for the taxonomy, usually plural. The same as and overridden by $tax->label. Default is Tags/Categories
- * - singular_name - name for one object of this taxonomy. Default is Tag/Category
- * - search_items - Default is Search Tags/Search Categories
- * - popular_items - This string isn't used on hierarchical taxonomies. Default is Popular Tags
- * - all_items - Default is All Tags/All Categories
- * - parent_item - This string isn't used on non-hierarchical taxonomies. In hierarchical ones the default is Parent Category
- * - parent_item_colon - The same as `parent_item`, but with colon `:` in the end
- * - edit_item - Default is Edit Tag/Edit Category
- * - view_item - Default is View Tag/View Category
- * - update_item - Default is Update Tag/Update Category
- * - add_new_item - Default is Add New Tag/Add New Category
- * - new_item_name - Default is New Tag Name/New Category Name
- * - separate_items_with_commas - This string isn't used on hierarchical taxonomies. Default is "Separate tags with commas", used in the meta box.
- * - add_or_remove_items - This string isn't used on hierarchical taxonomies. Default is "Add or remove tags", used in the meta box when JavaScript is disabled.
- * - choose_from_most_used - This string isn't used on hierarchical taxonomies. Default is "Choose from the most used tags", used in the meta box.
- * - not_found - Default is "No tags found"/"No categories found", used in the meta box and taxonomy list table.
- * - no_terms - Default is "No tags"/"No categories", used in the posts and media list tables.
- * - items_list_navigation - String for the table pagination hidden heading.
- * - items_list - String for the table hidden heading.
- *
- * Above, the first default value is for non-hierarchical taxonomies (like tags) and the second one is for hierarchical taxonomies (like categories).
- *
- * @todo Better documentation for the labels array.
- *
- * @since 3.0.0
- * @since 4.3.0 Added the `no_terms` label.
- * @since 4.4.0 Added the `items_list_navigation` and `items_list` labels.
- *
- * @param object $tax Taxonomy object.
- * @return object object with all the labels as member variables.
- */
-function get_taxonomy_labels( $tax ) {
-	$tax->labels = (array) $tax->labels;
-
-	if ( isset( $tax->helps ) && empty( $tax->labels['separate_items_with_commas'] ) )
-		$tax->labels['separate_items_with_commas'] = $tax->helps;
-
-	if ( isset( $tax->no_tagcloud ) && empty( $tax->labels['not_found'] ) )
-		$tax->labels['not_found'] = $tax->no_tagcloud;
-
-	$nohier_vs_hier_defaults = array(
-		'name' => array( _x( 'Tags', 'taxonomy general name' ), _x( 'Categories', 'taxonomy general name' ) ),
-		'singular_name' => array( _x( 'Tag', 'taxonomy singular name' ), _x( 'Category', 'taxonomy singular name' ) ),
-		'search_items' => array( __( 'Search Tags' ), __( 'Search Categories' ) ),
-		'popular_items' => array( __( 'Popular Tags' ), null ),
-		'all_items' => array( __( 'All Tags' ), __( 'All Categories' ) ),
-		'parent_item' => array( null, __( 'Parent Category' ) ),
-		'parent_item_colon' => array( null, __( 'Parent Category:' ) ),
-		'edit_item' => array( __( 'Edit Tag' ), __( 'Edit Category' ) ),
-		'view_item' => array( __( 'View Tag' ), __( 'View Category' ) ),
-		'update_item' => array( __( 'Update Tag' ), __( 'Update Category' ) ),
-		'add_new_item' => array( __( 'Add New Tag' ), __( 'Add New Category' ) ),
-		'new_item_name' => array( __( 'New Tag Name' ), __( 'New Category Name' ) ),
-		'separate_items_with_commas' => array( __( 'Separate tags with commas' ), null ),
-		'add_or_remove_items' => array( __( 'Add or remove tags' ), null ),
-		'choose_from_most_used' => array( __( 'Choose from the most used tags' ), null ),
-		'not_found' => array( __( 'No tags found.' ), __( 'No categories found.' ) ),
-		'no_terms' => array( __( 'No tags' ), __( 'No categories' ) ),
-		'items_list_navigation' => array( __( 'Tags list navigation' ), __( 'Categories list navigation' ) ),
-		'items_list' => array( __( 'Tags list' ), __( 'Categories list' ) ),
-	);
-	$nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name'];
-
-	$labels = _get_custom_object_labels( $tax, $nohier_vs_hier_defaults );
-
-	$taxonomy = $tax->name;
-
-	$default_labels = clone $labels;
-
-	/**
-	 * Filters the labels of a specific taxonomy.
-	 *
-	 * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @see get_taxonomy_labels() for the full list of taxonomy labels.
-	 *
-	 * @param object $labels Object with labels for the taxonomy as member variables.
-	 */
-	$labels = apply_filters( "taxonomy_labels_{$taxonomy}", $labels );
-
-	// Ensure that the filtered labels contain all required default values.
-	$labels = (object) array_merge( (array) $default_labels, (array) $labels );
-
-	return $labels;
-}
-
-/**
- * Add an already registered taxonomy to an object type.
- *
- * @since 3.0.0
- *
- * @global array $wp_taxonomies The registered taxonomies.
- *
- * @param string $taxonomy    Name of taxonomy object.
- * @param string $object_type Name of the object type.
- * @return bool True if successful, false if not.
- */
-function register_taxonomy_for_object_type( $taxonomy, $object_type) {
-	global $wp_taxonomies;
-
-	if ( !isset($wp_taxonomies[$taxonomy]) )
-		return false;
-
-	if ( ! get_post_type_object($object_type) )
-		return false;
-
-	if ( ! in_array( $object_type, $wp_taxonomies[$taxonomy]->object_type ) )
-		$wp_taxonomies[$taxonomy]->object_type[] = $object_type;
-
-	// Filter out empties.
-	$wp_taxonomies[ $taxonomy ]->object_type = array_filter( $wp_taxonomies[ $taxonomy ]->object_type );
-
-	return true;
-}
-
-/**
- * Remove an already registered taxonomy from an object type.
- *
- * @since 3.7.0
- *
- * @global array $wp_taxonomies The registered taxonomies.
- *
- * @param string $taxonomy    Name of taxonomy object.
- * @param string $object_type Name of the object type.
- * @return bool True if successful, false if not.
- */
-function unregister_taxonomy_for_object_type( $taxonomy, $object_type ) {
-	global $wp_taxonomies;
-
-	if ( ! isset( $wp_taxonomies[ $taxonomy ] ) )
-		return false;
-
-	if ( ! get_post_type_object( $object_type ) )
-		return false;
-
-	$key = array_search( $object_type, $wp_taxonomies[ $taxonomy ]->object_type, true );
-	if ( false === $key )
-		return false;
-
-	unset( $wp_taxonomies[ $taxonomy ]->object_type[ $key ] );
-	return true;
-}
-
-//
-// Term API
-//
-
-/**
- * Retrieve object_ids of valid taxonomy and term.
- *
- * The strings of $taxonomies must exist before this function will continue. On
- * failure of finding a valid taxonomy, it will return an WP_Error class, kind
- * of like Exceptions in PHP 5, except you can't catch them. Even so, you can
- * still test for the WP_Error class and get the error message.
- *
- * The $terms aren't checked the same as $taxonomies, but still need to exist
- * for $object_ids to be returned.
- *
- * It is possible to change the order that object_ids is returned by either
- * using PHP sort family functions or using the database by using $args with
- * either ASC or DESC array. The value should be in the key named 'order'.
- *
- * @since 2.3.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int|array    $term_ids   Term id or array of term ids of terms that will be used.
- * @param string|array $taxonomies String of taxonomy name or Array of string values of taxonomy names.
- * @param array|string $args       Change the order of the object_ids, either ASC or DESC.
- * @return WP_Error|array If the taxonomy does not exist, then WP_Error will be returned. On success.
- *	the array can be empty meaning that there are no $object_ids found or it will return the $object_ids found.
- */
-function get_objects_in_term( $term_ids, $taxonomies, $args = array() ) {
-	global $wpdb;
-
-	if ( ! is_array( $term_ids ) ) {
-		$term_ids = array( $term_ids );
-	}
-	if ( ! is_array( $taxonomies ) ) {
-		$taxonomies = array( $taxonomies );
-	}
-	foreach ( (array) $taxonomies as $taxonomy ) {
-		if ( ! taxonomy_exists( $taxonomy ) ) {
-			return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
-		}
-	}
-
-	$defaults = array( 'order' => 'ASC' );
-	$args = wp_parse_args( $args, $defaults );
-
-	$order = ( 'desc' == strtolower( $args['order'] ) ) ? 'DESC' : 'ASC';
-
-	$term_ids = array_map('intval', $term_ids );
-
-	$taxonomies = "'" . implode( "', '", array_map( 'esc_sql', $taxonomies ) ) . "'";
-	$term_ids = "'" . implode( "', '", $term_ids ) . "'";
-
-	$object_ids = $wpdb->get_col("SELECT tr.object_id FROM $wpdb->term_relationships AS tr INNER JOIN $wpdb->term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ($taxonomies) AND tt.term_id IN ($term_ids) ORDER BY tr.object_id $order");
-
-	if ( ! $object_ids ){
-		return array();
-	}
-	return $object_ids;
-}
-
-/**
- * Given a taxonomy query, generates SQL to be appended to a main query.
- *
- * @since 3.1.0
- *
- * @see WP_Tax_Query
- *
- * @param array  $tax_query         A compact tax query
- * @param string $primary_table
- * @param string $primary_id_column
- * @return array
- */
-function get_tax_sql( $tax_query, $primary_table, $primary_id_column ) {
-	$tax_query_obj = new WP_Tax_Query( $tax_query );
-	return $tax_query_obj->get_sql( $primary_table, $primary_id_column );
-}
-
-/**
- * Get all Term data from database by Term ID.
- *
- * The usage of the get_term function is to apply filters to a term object. It
- * is possible to get a term object from the database before applying the
- * filters.
- *
- * $term ID must be part of $taxonomy, to get from the database. Failure, might
- * be able to be captured by the hooks. Failure would be the same value as $wpdb
- * returns for the get_row method.
- *
- * There are two hooks, one is specifically for each term, named 'get_term', and
- * the second is for the taxonomy name, 'term_$taxonomy'. Both hooks gets the
- * term object, and the taxonomy name as parameters. Both hooks are expected to
- * return a Term object.
- *
- * {@see 'get_term'} hook - Takes two parameters the term Object and the taxonomy name.
- * Must return term object. Used in get_term() as a catch-all filter for every
- * $term.
- *
- * {@see 'get_$taxonomy'} hook - Takes two parameters the term Object and the taxonomy
- * name. Must return term object. $taxonomy will be the taxonomy name, so for
- * example, if 'category', it would be 'get_category' as the filter name. Useful
- * for custom taxonomies or plugging into default taxonomies.
- *
- * @todo Better formatting for DocBlock
- *
- * @since 2.3.0
- * @since 4.4.0 Converted to return a WP_Term object if `$output` is `OBJECT`.
- *              The `$taxonomy` parameter was made optional.
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- * @see sanitize_term_field() The $context param lists the available values for get_term_by() $filter param.
- *
- * @param int|WP_Term|object $term If integer, term data will be fetched from the database, or from the cache if
- *                                 available. If stdClass object (as in the results of a database query), will apply
- *                                 filters and return a `WP_Term` object corresponding to the `$term` data. If `WP_Term`,
- *                                 will return `$term`.
- * @param string     $taxonomy Optional. Taxonomy name that $term is part of.
- * @param string     $output   Constant OBJECT, ARRAY_A, or ARRAY_N
- * @param string     $filter   Optional, default is raw or no WordPress defined filter will applied.
- * @return array|WP_Term|WP_Error|null Object of the type specified by `$output` on success. When `$output` is 'OBJECT',
- *                                     a WP_Term instance is returned. If taxonomy does not exist, a WP_Error is
- *                                     returned. Returns null for miscellaneous failure.
- */
-function get_term( $term, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) {
-	if ( empty( $term ) ) {
-		return new WP_Error( 'invalid_term', __( 'Empty Term' ) );
-	}
-
-	if ( $taxonomy && ! taxonomy_exists( $taxonomy ) ) {
-		return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
-	}
-
-	if ( $term instanceof WP_Term ) {
-		$_term = $term;
-	} elseif ( is_object( $term ) ) {
-		if ( empty( $term->filter ) || 'raw' === $term->filter ) {
-			$_term = sanitize_term( $term, $taxonomy, 'raw' );
-			$_term = new WP_Term( $_term );
-		} else {
-			$_term = WP_Term::get_instance( $term->term_id );
-		}
-	} else {
-		$_term = WP_Term::get_instance( $term, $taxonomy );
-	}
-
-	if ( is_wp_error( $_term ) ) {
-		return $_term;
-	} elseif ( ! $_term ) {
-		return null;
-	}
-
-	/**
-	 * Filters a term.
-	 *
-	 * @since 2.3.0
-	 * @since 4.4.0 `$_term` can now also be a WP_Term object.
-	 *
-	 * @param int|WP_Term $_term    Term object or ID.
-	 * @param string      $taxonomy The taxonomy slug.
-	 */
-	$_term = apply_filters( 'get_term', $_term, $taxonomy );
-
-	/**
-	 * Filters a taxonomy.
-	 *
-	 * The dynamic portion of the filter name, `$taxonomy`, refers
-	 * to the taxonomy slug.
-	 *
-	 * @since 2.3.0
-	 * @since 4.4.0 `$_term` can now also be a WP_Term object.
-	 *
-	 * @param int|WP_Term $_term    Term object or ID.
-	 * @param string      $taxonomy The taxonomy slug.
-	 */
-	$_term = apply_filters( "get_{$taxonomy}", $_term, $taxonomy );
-
-	// Bail if a filter callback has changed the type of the `$_term` object.
-	if ( ! ( $_term instanceof WP_Term ) ) {
-		return $_term;
-	}
-
-	// Sanitize term, according to the specified filter.
-	$_term->filter( $filter );
-
-	if ( $output == ARRAY_A ) {
-		return $_term->to_array();
-	} elseif ( $output == ARRAY_N ) {
-		return array_values( $_term->to_array() );
-	}
-
-	return $_term;
-}
-
-/**
- * Get all Term data from database by Term field and data.
- *
- * Warning: $value is not escaped for 'name' $field. You must do it yourself, if
- * required.
- *
- * The default $field is 'id', therefore it is possible to also use null for
- * field, but not recommended that you do so.
- *
- * If $value does not exist, the return value will be false. If $taxonomy exists
- * and $field and $value combinations exist, the Term will be returned.
- *
- * This function will always return the first term that matches the `$field`-
- * `$value`-`$taxonomy` combination specified in the parameters. If your query
- * is likely to match more than one term (as is likely to be the case when
- * `$field` is 'name', for example), consider using get_terms() instead; that
- * way, you will get all matching terms, and can provide your own logic for
- * deciding which one was intended.
- *
- * @todo Better formatting for DocBlock.
- *
- * @since 2.3.0
- * @since 4.4.0 `$taxonomy` is optional if `$field` is 'term_taxonomy_id'. Converted to return
- *              a WP_Term object if `$output` is `OBJECT`.
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- * @see sanitize_term_field() The $context param lists the available values for get_term_by() $filter param.
- *
- * @param string     $field    Either 'slug', 'name', 'id' (term_id), or 'term_taxonomy_id'
- * @param string|int $value    Search for this term value
- * @param string     $taxonomy Taxonomy name. Optional, if `$field` is 'term_taxonomy_id'.
- * @param string     $output   Constant OBJECT, ARRAY_A, or ARRAY_N
- * @param string     $filter   Optional, default is raw or no WordPress defined filter will applied.
- * @return WP_Term|bool WP_Term instance on success. Will return false if `$taxonomy` does not exist
- *                      or `$term` was not found.
- */
-function get_term_by( $field, $value, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) {
-	global $wpdb;
-
-	// 'term_taxonomy_id' lookups don't require taxonomy checks.
-	if ( 'term_taxonomy_id' !== $field && ! taxonomy_exists( $taxonomy ) ) {
-		return false;
-	}
-
-	$tax_clause = $wpdb->prepare( "AND tt.taxonomy = %s", $taxonomy );
-
-	if ( 'slug' == $field ) {
-		$_field = 't.slug';
-		$value = sanitize_title($value);
-		if ( empty($value) )
-			return false;
-	} elseif ( 'name' == $field ) {
-		// Assume already escaped
-		$value = wp_unslash($value);
-		$_field = 't.name';
-	} elseif ( 'term_taxonomy_id' == $field ) {
-		$value = (int) $value;
-		$_field = 'tt.term_taxonomy_id';
-
-		// No `taxonomy` clause when searching by 'term_taxonomy_id'.
-		$tax_clause = '';
-	} else {
-		$term = get_term( (int) $value, $taxonomy, $output, $filter );
-		if ( is_wp_error( $term ) || is_null( $term ) ) {
-			$term = false;
-		}
-		return $term;
-	}
-
-	$term = $wpdb->get_row( $wpdb->prepare( "SELECT t.*, tt.* FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE $_field = %s", $value ) . " $tax_clause LIMIT 1" );
-	if ( ! $term )
-		return false;
-
-	// In the case of 'term_taxonomy_id', override the provided `$taxonomy` with whatever we find in the db.
-	if ( 'term_taxonomy_id' === $field ) {
-		$taxonomy = $term->taxonomy;
-	}
-
-	wp_cache_add( $term->term_id, $term, 'terms' );
-
-	return get_term( $term, $taxonomy, $output, $filter );
-}
-
-/**
- * Merge all term children into a single array of their IDs.
- *
- * This recursive function will merge all of the children of $term into the same
- * array of term IDs. Only useful for taxonomies which are hierarchical.
- *
- * Will return an empty array if $term does not exist in $taxonomy.
- *
- * @since 2.3.0
- *
- * @param string $term_id  ID of Term to get children.
- * @param string $taxonomy Taxonomy Name.
- * @return array|WP_Error List of Term IDs. WP_Error returned if `$taxonomy` does not exist.
- */
-function get_term_children( $term_id, $taxonomy ) {
-	if ( ! taxonomy_exists( $taxonomy ) ) {
-		return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
-	}
-
-	$term_id = intval( $term_id );
-
-	$terms = _get_term_hierarchy($taxonomy);
-
-	if ( ! isset($terms[$term_id]) )
-		return array();
-
-	$children = $terms[$term_id];
-
-	foreach ( (array) $terms[$term_id] as $child ) {
-		if ( $term_id == $child ) {
-			continue;
-		}
-
-		if ( isset($terms[$child]) )
-			$children = array_merge($children, get_term_children($child, $taxonomy));
-	}
-
-	return $children;
-}
-
-/**
- * Get sanitized Term field.
- *
- * The function is for contextual reasons and for simplicity of usage.
- *
- * @since 2.3.0
- * @since 4.4.0 The `$taxonomy` parameter was made optional. `$term` can also now accept a WP_Term object.
- *
- * @see sanitize_term_field()
- *
- * @param string      $field    Term field to fetch.
- * @param int|WP_Term $term     Term ID or object.
- * @param string      $taxonomy Optional. Taxonomy Name. Default empty.
- * @param string      $context  Optional, default is display. Look at sanitize_term_field() for available options.
- * @return string|int|null|WP_Error Will return an empty string if $term is not an object or if $field is not set in $term.
- */
-function get_term_field( $field, $term, $taxonomy = '', $context = 'display' ) {
-	$term = get_term( $term, $taxonomy );
-	if ( is_wp_error($term) )
-		return $term;
-
-	if ( !is_object($term) )
-		return '';
-
-	if ( !isset($term->$field) )
-		return '';
-
-	return sanitize_term_field( $field, $term->$field, $term->term_id, $term->taxonomy, $context );
-}
-
-/**
- * Sanitizes Term for editing.
- *
- * Return value is sanitize_term() and usage is for sanitizing the term for
- * editing. Function is for contextual and simplicity.
- *
- * @since 2.3.0
- *
- * @param int|object $id       Term ID or object.
- * @param string     $taxonomy Taxonomy name.
- * @return string|int|null|WP_Error Will return empty string if $term is not an object.
- */
-function get_term_to_edit( $id, $taxonomy ) {
-	$term = get_term( $id, $taxonomy );
-
-	if ( is_wp_error($term) )
-		return $term;
-
-	if ( !is_object($term) )
-		return '';
-
-	return sanitize_term($term, $taxonomy, 'edit');
-}
-
-/**
- * Retrieve the terms in a given taxonomy or list of taxonomies.
- *
- * You can fully inject any customizations to the query before it is sent, as
- * well as control the output with a filter.
- *
- * The {@see 'get_terms'} filter will be called when the cache has the term and will
- * pass the found term along with the array of $taxonomies and array of $args.
- * This filter is also called before the array of terms is passed and will pass
- * the array of terms, along with the $taxonomies and $args.
- *
- * The {@see 'list_terms_exclusions'} filter passes the compiled exclusions along with
- * the $args.
- *
- * The {@see 'get_terms_orderby'} filter passes the `ORDER BY` clause for the query
- * along with the $args array.
- *
- * Prior to 4.5.0, the first parameter of `get_terms()` was a taxonomy or list of taxonomies:
- *
- *     $terms = get_terms( 'post_tag', array(
- *         'hide_empty' => false,
- *     ) );
- *
- * Since 4.5.0, taxonomies should be passed via the 'taxonomy' argument in the `$args` array:
- *
- *     $terms = get_terms( array(
- *         'taxonomy' => 'post_tag',
- *         'hide_empty' => false,
- *     ) );
- *
- * @since 2.3.0
- * @since 4.2.0 Introduced 'name' and 'childless' parameters.
- * @since 4.4.0 Introduced the ability to pass 'term_id' as an alias of 'id' for the `orderby` parameter.
- *              Introduced the 'meta_query' and 'update_term_meta_cache' parameters. Converted to return
- *              a list of WP_Term objects.
- * @since 4.5.0 Changed the function signature so that the `$args` array can be provided as the first parameter.
- *              Introduced 'meta_key' and 'meta_value' parameters. Introduced the ability to order results by metadata.
- *
- * @internal The `$deprecated` parameter is parsed for backward compatibility only.
- *
- * @global wpdb  $wpdb WordPress database abstraction object.
- * @global array $wp_filter
- *
- * @param array|string $args {
- *     Optional. Array or string of arguments to get terms.
- *
- *     @type string|array $taxonomy               Taxonomy name, or array of taxonomies, to which results should
- *                                                be limited.
- *     @type string       $orderby                Field(s) to order terms by. Accepts term fields ('name', 'slug',
- *                                                'term_group', 'term_id', 'id', 'description'), 'count' for term
- *                                                taxonomy count, 'include' to match the 'order' of the $include param,
- *                                                'meta_value', 'meta_value_num', the value of `$meta_key`, the array
- *                                                keys of `$meta_query`, or 'none' to omit the ORDER BY clause.
- *                                                Defaults to 'name'.
- *     @type string       $order                  Whether to order terms in ascending or descending order.
- *                                                Accepts 'ASC' (ascending) or 'DESC' (descending).
- *                                                Default 'ASC'.
- *     @type bool|int     $hide_empty             Whether to hide terms not assigned to any posts. Accepts
- *                                                1|true or 0|false. Default 1|true.
- *     @type array|string $include                Array or comma/space-separated string of term ids to include.
- *                                                Default empty array.
- *     @type array|string $exclude                Array or comma/space-separated string of term ids to exclude.
- *                                                If $include is non-empty, $exclude is ignored.
- *                                                Default empty array.
- *     @type array|string $exclude_tree           Array or comma/space-separated string of term ids to exclude
- *                                                along with all of their descendant terms. If $include is
- *                                                non-empty, $exclude_tree is ignored. Default empty array.
- *     @type int|string   $number                 Maximum number of terms to return. Accepts ''|0 (all) or any
- *                                                positive number. Default ''|0 (all).
- *     @type int          $offset                 The number by which to offset the terms query. Default empty.
- *     @type string       $fields                 Term fields to query for. Accepts 'all' (returns an array of complete
- *                                                term objects), 'ids' (returns an array of ids), 'id=>parent' (returns
- *                                                an associative array with ids as keys, parent term IDs as values),
- *                                                'names' (returns an array of term names), 'count' (returns the number
- *                                                of matching terms), 'id=>name' (returns an associative array with ids
- *                                                as keys, term names as values), or 'id=>slug' (returns an associative
- *                                                array with ids as keys, term slugs as values). Default 'all'.
- *     @type string|array $name                   Optional. Name or array of names to return term(s) for. Default empty.
- *     @type string|array $slug                   Optional. Slug or array of slugs to return term(s) for. Default empty.
- *     @type bool         $hierarchical           Whether to include terms that have non-empty descendants (even
- *                                                if $hide_empty is set to true). Default true.
- *     @type string       $search                 Search criteria to match terms. Will be SQL-formatted with
- *                                                wildcards before and after. Default empty.
- *     @type string       $name__like             Retrieve terms with criteria by which a term is LIKE $name__like.
- *                                                Default empty.
- *     @type string       $description__like      Retrieve terms where the description is LIKE $description__like.
- *                                                Default empty.
- *     @type bool         $pad_counts             Whether to pad the quantity of a term's children in the quantity
- *                                                of each term's "count" object variable. Default false.
- *     @type string       $get                    Whether to return terms regardless of ancestry or whether the terms
- *                                                are empty. Accepts 'all' or empty (disabled). Default empty.
- *     @type int          $child_of               Term ID to retrieve child terms of. If multiple taxonomies
- *                                                are passed, $child_of is ignored. Default 0.
- *     @type int|string   $parent                 Parent term ID to retrieve direct-child terms of. Default empty.
- *     @type bool         $childless              True to limit results to terms that have no children. This parameter
- *                                                has no effect on non-hierarchical taxonomies. Default false.
- *     @type string       $cache_domain           Unique cache key to be produced when this query is stored in an
- *                                                object cache. Default is 'core'.
- *     @type bool         $update_term_meta_cache Whether to prime meta caches for matched terms. Default true.
- *     @type array        $meta_query             Meta query clauses to limit retrieved terms by.
- *                                                See `WP_Meta_Query`. Default empty.
- *     @type string       $meta_key               Limit terms to those matching a specific metadata key. Can be used in
- *                                                conjunction with `$meta_value`.
- *     @type string       $meta_value             Limit terms to those matching a specific metadata value. Usually used
- *                                                in conjunction with `$meta_key`.
- * }
- * @param array $deprecated Argument array, when using the legacy function parameter format. If present, this
- *                          parameter will be interpreted as `$args`, and the first function parameter will
- *                          be parsed as a taxonomy or array of taxonomies.
- * @return array|int|WP_Error List of WP_Term instances and their children. Will return WP_Error, if any of $taxonomies
- *                            do not exist.
- */
-function get_terms( $args = array(), $deprecated = '' ) {
-	global $wpdb;
-
-	$term_query = new WP_Term_Query();
-
-	/*
-	 * Legacy argument format ($taxonomy, $args) takes precedence.
-	 *
-	 * We detect legacy argument format by checking if
-	 * (a) a second non-empty parameter is passed, or
-	 * (b) the first parameter shares no keys with the default array (ie, it's a list of taxonomies)
-	 */
-	$_args = wp_parse_args( $args );
-	$key_intersect  = array_intersect_key( $term_query->query_var_defaults, (array) $_args );
-	$do_legacy_args = $deprecated || empty( $key_intersect );
-
-	if ( $do_legacy_args ) {
-		$taxonomies = (array) $args;
-		$args = wp_parse_args( $deprecated );
-		$args['taxonomy'] = $taxonomies;
-	} else {
-		$args = wp_parse_args( $args );
-		if ( isset( $args['taxonomy'] ) && null !== $args['taxonomy'] ) {
-			$args['taxonomy'] = (array) $args['taxonomy'];
-		}
-	}
-
-	if ( ! empty( $args['taxonomy'] ) ) {
-		foreach ( $args['taxonomy'] as $taxonomy ) {
-			if ( ! taxonomy_exists( $taxonomy ) ) {
-				return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
-			}
-		}
-	}
-
-	$terms = $term_query->query( $args );
-
-	// Count queries are not filtered, for legacy reasons.
-	if ( ! is_array( $terms ) ) {
-		return $terms;
-	}
-
-	/**
-	 * Filters the found terms.
-	 *
-	 * @since 2.3.0
-	 * @since 4.6.0 Added the `$term_query` parameter.
-	 *
-	 * @param array         $terms      Array of found terms.
-	 * @param array         $taxonomies An array of taxonomies.
-	 * @param array         $args       An array of get_terms() arguments.
-	 * @param WP_Term_Query $term_query The WP_Term_Query object.
-	 */
-	return apply_filters( 'get_terms', $terms, $term_query->query_vars['taxonomy'], $term_query->query_vars, $term_query );
-}
-
-/**
- * Adds metadata to a term.
- *
- * @since 4.4.0
- *
- * @param int    $term_id    Term ID.
- * @param string $meta_key   Metadata name.
- * @param mixed  $meta_value Metadata value.
- * @param bool   $unique     Optional. Whether to bail if an entry with the same key is found for the term.
- *                           Default false.
- * @return int|WP_Error|bool Meta ID on success. WP_Error when term_id is ambiguous between taxonomies.
- *                           False on failure.
- */
-function add_term_meta( $term_id, $meta_key, $meta_value, $unique = false ) {
-	// Bail if term meta table is not installed.
-	if ( get_option( 'db_version' ) < 34370 ) {
-		return false;
-	}
-
-	if ( wp_term_is_shared( $term_id ) ) {
-		return new WP_Error( 'ambiguous_term_id', __( 'Term meta cannot be added to terms that are shared between taxonomies.'), $term_id );
-	}
-
-	$added = add_metadata( 'term', $term_id, $meta_key, $meta_value, $unique );
-
-	// Bust term query cache.
-	if ( $added ) {
-		wp_cache_set( 'last_changed', microtime(), 'terms' );
-	}
-
-	return $added;
-}
-
-/**
- * Removes metadata matching criteria from a term.
- *
- * @since 4.4.0
- *
- * @param int    $term_id    Term ID.
- * @param string $meta_key   Metadata name.
- * @param mixed  $meta_value Optional. Metadata value. If provided, rows will only be removed that match the value.
- * @return bool True on success, false on failure.
- */
-function delete_term_meta( $term_id, $meta_key, $meta_value = '' ) {
-	// Bail if term meta table is not installed.
-	if ( get_option( 'db_version' ) < 34370 ) {
-		return false;
-	}
-
-	$deleted = delete_metadata( 'term', $term_id, $meta_key, $meta_value );
-
-	// Bust term query cache.
-	if ( $deleted ) {
-		wp_cache_set( 'last_changed', microtime(), 'terms' );
-	}
-
-	return $deleted;
-}
-
-/**
- * Retrieves metadata for a term.
- *
- * @since 4.4.0
- *
- * @param int    $term_id Term ID.
- * @param string $key     Optional. The meta key to retrieve. If no key is provided, fetches all metadata for the term.
- * @param bool   $single  Whether to return a single value. If false, an array of all values matching the
- *                        `$term_id`/`$key` pair will be returned. Default: false.
- * @return mixed If `$single` is false, an array of metadata values. If `$single` is true, a single metadata value.
- */
-function get_term_meta( $term_id, $key = '', $single = false ) {
-	// Bail if term meta table is not installed.
-	if ( get_option( 'db_version' ) < 34370 ) {
-		return false;
-	}
-
-	return get_metadata( 'term', $term_id, $key, $single );
-}
-
-/**
- * Updates term metadata.
- *
- * Use the `$prev_value` parameter to differentiate between meta fields with the same key and term ID.
- *
- * If the meta field for the term does not exist, it will be added.
- *
- * @since 4.4.0
- *
- * @param int    $term_id    Term ID.
- * @param string $meta_key   Metadata key.
- * @param mixed  $meta_value Metadata value.
- * @param mixed  $prev_value Optional. Previous value to check before removing.
- * @return int|WP_Error|bool Meta ID if the key didn't previously exist. True on successful update.
- *                           WP_Error when term_id is ambiguous between taxonomies. False on failure.
- */
-function update_term_meta( $term_id, $meta_key, $meta_value, $prev_value = '' ) {
-	// Bail if term meta table is not installed.
-	if ( get_option( 'db_version' ) < 34370 ) {
-		return false;
-	}
-
-	if ( wp_term_is_shared( $term_id ) ) {
-		return new WP_Error( 'ambiguous_term_id', __( 'Term meta cannot be added to terms that are shared between taxonomies.'), $term_id );
-	}
-
-	$updated = update_metadata( 'term', $term_id, $meta_key, $meta_value, $prev_value );
-
-	// Bust term query cache.
-	if ( $updated ) {
-		wp_cache_set( 'last_changed', microtime(), 'terms' );
-	}
-
-	return $updated;
-}
-
-/**
- * Updates metadata cache for list of term IDs.
- *
- * Performs SQL query to retrieve all metadata for the terms matching `$term_ids` and stores them in the cache.
- * Subsequent calls to `get_term_meta()` will not need to query the database.
- *
- * @since 4.4.0
- *
- * @param array $term_ids List of term IDs.
- * @return array|false Returns false if there is nothing to update. Returns an array of metadata on success.
- */
-function update_termmeta_cache( $term_ids ) {
-	// Bail if term meta table is not installed.
-	if ( get_option( 'db_version' ) < 34370 ) {
-		return;
-	}
-
-	return update_meta_cache( 'term', $term_ids );
-}
-
-/**
- * Check if Term exists.
- *
- * Formerly is_term(), introduced in 2.3.0.
- *
- * @since 3.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int|string $term     The term to check
- * @param string     $taxonomy The taxonomy name to use
- * @param int        $parent   Optional. ID of parent term under which to confine the exists search.
- * @return mixed Returns null if the term does not exist. Returns the term ID
- *               if no taxonomy is specified and the term ID exists. Returns
- *               an array of the term ID and the term taxonomy ID the taxonomy
- *               is specified and the pairing exists.
- */
-function term_exists( $term, $taxonomy = '', $parent = null ) {
-	global $wpdb;
-
-	$select = "SELECT term_id FROM $wpdb->terms as t WHERE ";
-	$tax_select = "SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE ";
-
-	if ( is_int($term) ) {
-		if ( 0 == $term )
-			return 0;
-		$where = 't.term_id = %d';
-		if ( !empty($taxonomy) )
-			return $wpdb->get_row( $wpdb->prepare( $tax_select . $where . " AND tt.taxonomy = %s", $term, $taxonomy ), ARRAY_A );
-		else
-			return $wpdb->get_var( $wpdb->prepare( $select . $where, $term ) );
-	}
-
-	$term = trim( wp_unslash( $term ) );
-	$slug = sanitize_title( $term );
-
-	$where = 't.slug = %s';
-	$else_where = 't.name = %s';
-	$where_fields = array($slug);
-	$else_where_fields = array($term);
-	$orderby = 'ORDER BY t.term_id ASC';
-	$limit = 'LIMIT 1';
-	if ( !empty($taxonomy) ) {
-		if ( is_numeric( $parent ) ) {
-			$parent = (int) $parent;
-			$where_fields[] = $parent;
-			$else_where_fields[] = $parent;
-			$where .= ' AND tt.parent = %d';
-			$else_where .= ' AND tt.parent = %d';
-		}
-
-		$where_fields[] = $taxonomy;
-		$else_where_fields[] = $taxonomy;
-
-		if ( $result = $wpdb->get_row( $wpdb->prepare("SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE $where AND tt.taxonomy = %s $orderby $limit", $where_fields), ARRAY_A) )
-			return $result;
-
-		return $wpdb->get_row( $wpdb->prepare("SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE $else_where AND tt.taxonomy = %s $orderby $limit", $else_where_fields), ARRAY_A);
-	}
-
-	if ( $result = $wpdb->get_var( $wpdb->prepare("SELECT term_id FROM $wpdb->terms as t WHERE $where $orderby $limit", $where_fields) ) )
-		return $result;
-
-	return $wpdb->get_var( $wpdb->prepare("SELECT term_id FROM $wpdb->terms as t WHERE $else_where $orderby $limit", $else_where_fields) );
-}
-
-/**
- * Check if a term is an ancestor of another term.
- *
- * You can use either an id or the term object for both parameters.
- *
- * @since 3.4.0
- *
- * @param int|object $term1    ID or object to check if this is the parent term.
- * @param int|object $term2    The child term.
- * @param string     $taxonomy Taxonomy name that $term1 and `$term2` belong to.
- * @return bool Whether `$term2` is a child of `$term1`.
- */
-function term_is_ancestor_of( $term1, $term2, $taxonomy ) {
-	if ( ! isset( $term1->term_id ) )
-		$term1 = get_term( $term1, $taxonomy );
-	if ( ! isset( $term2->parent ) )
-		$term2 = get_term( $term2, $taxonomy );
-
-	if ( empty( $term1->term_id ) || empty( $term2->parent ) )
-		return false;
-	if ( $term2->parent == $term1->term_id )
-		return true;
-
-	return term_is_ancestor_of( $term1, get_term( $term2->parent, $taxonomy ), $taxonomy );
-}
-
-/**
- * Sanitize Term all fields.
- *
- * Relies on sanitize_term_field() to sanitize the term. The difference is that
- * this function will sanitize <strong>all</strong> fields. The context is based
- * on sanitize_term_field().
- *
- * The $term is expected to be either an array or an object.
- *
- * @since 2.3.0
- *
- * @param array|object $term     The term to check.
- * @param string       $taxonomy The taxonomy name to use.
- * @param string       $context  Optional. Context in which to sanitize the term. Accepts 'edit', 'db',
- *                               'display', 'attribute', or 'js'. Default 'display'.
- * @return array|object Term with all fields sanitized.
- */
-function sanitize_term($term, $taxonomy, $context = 'display') {
-	$fields = array( 'term_id', 'name', 'description', 'slug', 'count', 'parent', 'term_group', 'term_taxonomy_id', 'object_id' );
-
-	$do_object = is_object( $term );
-
-	$term_id = $do_object ? $term->term_id : (isset($term['term_id']) ? $term['term_id'] : 0);
-
-	foreach ( (array) $fields as $field ) {
-		if ( $do_object ) {
-			if ( isset($term->$field) )
-				$term->$field = sanitize_term_field($field, $term->$field, $term_id, $taxonomy, $context);
-		} else {
-			if ( isset($term[$field]) )
-				$term[$field] = sanitize_term_field($field, $term[$field], $term_id, $taxonomy, $context);
-		}
-	}
-
-	if ( $do_object )
-		$term->filter = $context;
-	else
-		$term['filter'] = $context;
-
-	return $term;
-}
-
-/**
- * Cleanse the field value in the term based on the context.
- *
- * Passing a term field value through the function should be assumed to have
- * cleansed the value for whatever context the term field is going to be used.
- *
- * If no context or an unsupported context is given, then default filters will
- * be applied.
- *
- * There are enough filters for each context to support a custom filtering
- * without creating your own filter function. Simply create a function that
- * hooks into the filter you need.
- *
- * @since 2.3.0
- *
- * @param string $field    Term field to sanitize.
- * @param string $value    Search for this term value.
- * @param int    $term_id  Term ID.
- * @param string $taxonomy Taxonomy Name.
- * @param string $context  Context in which to sanitize the term field. Accepts 'edit', 'db', 'display',
- *                         'attribute', or 'js'.
- * @return mixed Sanitized field.
- */
-function sanitize_term_field($field, $value, $term_id, $taxonomy, $context) {
-	$int_fields = array( 'parent', 'term_id', 'count', 'term_group', 'term_taxonomy_id', 'object_id' );
-	if ( in_array( $field, $int_fields ) ) {
-		$value = (int) $value;
-		if ( $value < 0 )
-			$value = 0;
-	}
-
-	if ( 'raw' == $context )
-		return $value;
-
-	if ( 'edit' == $context ) {
-
-		/**
-		 * Filters a term field to edit before it is sanitized.
-		 *
-		 * The dynamic portion of the filter name, `$field`, refers to the term field.
-		 *
-		 * @since 2.3.0
-		 *
-		 * @param mixed $value     Value of the term field.
-		 * @param int   $term_id   Term ID.
-		 * @param string $taxonomy Taxonomy slug.
-		 */
-		$value = apply_filters( "edit_term_{$field}", $value, $term_id, $taxonomy );
-
-		/**
-		 * Filters the taxonomy field to edit before it is sanitized.
-		 *
-		 * The dynamic portions of the filter name, `$taxonomy` and `$field`, refer
-		 * to the taxonomy slug and taxonomy field, respectively.
-		 *
-		 * @since 2.3.0
-		 *
-		 * @param mixed $value   Value of the taxonomy field to edit.
-		 * @param int   $term_id Term ID.
-		 */
-		$value = apply_filters( "edit_{$taxonomy}_{$field}", $value, $term_id );
-
-		if ( 'description' == $field )
-			$value = esc_html($value); // textarea_escaped
-		else
-			$value = esc_attr($value);
-	} elseif ( 'db' == $context ) {
-
-		/**
-		 * Filters a term field value before it is sanitized.
-		 *
-		 * The dynamic portion of the filter name, `$field`, refers to the term field.
-		 *
-		 * @since 2.3.0
-		 *
-		 * @param mixed  $value    Value of the term field.
-		 * @param string $taxonomy Taxonomy slug.
-		 */
-		$value = apply_filters( "pre_term_{$field}", $value, $taxonomy );
-
-		/**
-		 * Filters a taxonomy field before it is sanitized.
-		 *
-		 * The dynamic portions of the filter name, `$taxonomy` and `$field`, refer
-		 * to the taxonomy slug and field name, respectively.
-		 *
-		 * @since 2.3.0
-		 *
-		 * @param mixed $value Value of the taxonomy field.
-		 */
-		$value = apply_filters( "pre_{$taxonomy}_{$field}", $value );
-
-		// Back compat filters
-		if ( 'slug' == $field ) {
-			/**
-			 * Filters the category nicename before it is sanitized.
-			 *
-			 * Use the {@see 'pre_$taxonomy_$field'} hook instead.
-			 *
-			 * @since 2.0.3
-			 *
-			 * @param string $value The category nicename.
-			 */
-			$value = apply_filters( 'pre_category_nicename', $value );
-		}
-
-	} elseif ( 'rss' == $context ) {
-
-		/**
-		 * Filters the term field for use in RSS.
-		 *
-		 * The dynamic portion of the filter name, `$field`, refers to the term field.
-		 *
-		 * @since 2.3.0
-		 *
-		 * @param mixed  $value    Value of the term field.
-		 * @param string $taxonomy Taxonomy slug.
-		 */
-		$value = apply_filters( "term_{$field}_rss", $value, $taxonomy );
-
-		/**
-		 * Filters the taxonomy field for use in RSS.
-		 *
-		 * The dynamic portions of the hook name, `$taxonomy`, and `$field`, refer
-		 * to the taxonomy slug and field name, respectively.
-		 *
-		 * @since 2.3.0
-		 *
-		 * @param mixed $value Value of the taxonomy field.
-		 */
-		$value = apply_filters( "{$taxonomy}_{$field}_rss", $value );
-	} else {
-		// Use display filters by default.
-
-		/**
-		 * Filters the term field sanitized for display.
-		 *
-		 * The dynamic portion of the filter name, `$field`, refers to the term field name.
-		 *
-		 * @since 2.3.0
-		 *
-		 * @param mixed  $value    Value of the term field.
-		 * @param int    $term_id  Term ID.
-		 * @param string $taxonomy Taxonomy slug.
-		 * @param string $context  Context to retrieve the term field value.
-		 */
-		$value = apply_filters( "term_{$field}", $value, $term_id, $taxonomy, $context );
-
-		/**
-		 * Filters the taxonomy field sanitized for display.
-		 *
-		 * The dynamic portions of the filter name, `$taxonomy`, and `$field`, refer
-		 * to the taxonomy slug and taxonomy field, respectively.
-		 *
-		 * @since 2.3.0
-		 *
-		 * @param mixed  $value   Value of the taxonomy field.
-		 * @param int    $term_id Term ID.
-		 * @param string $context Context to retrieve the taxonomy field value.
-		 */
-		$value = apply_filters( "{$taxonomy}_{$field}", $value, $term_id, $context );
-	}
-
-	if ( 'attribute' == $context ) {
-		$value = esc_attr($value);
-	} elseif ( 'js' == $context ) {
-		$value = esc_js($value);
-	}
-	return $value;
-}
-
-/**
- * Count how many terms are in Taxonomy.
- *
- * Default $args is 'hide_empty' which can be 'hide_empty=true' or array('hide_empty' => true).
- *
- * @since 2.3.0
- *
- * @param string       $taxonomy Taxonomy name.
- * @param array|string $args     Optional. Array of arguments that get passed to get_terms().
- *                               Default empty array.
- * @return array|int|WP_Error Number of terms in that taxonomy or WP_Error if the taxonomy does not exist.
- */
-function wp_count_terms( $taxonomy, $args = array() ) {
-	$defaults = array('hide_empty' => false);
-	$args = wp_parse_args($args, $defaults);
-
-	// backward compatibility
-	if ( isset($args['ignore_empty']) ) {
-		$args['hide_empty'] = $args['ignore_empty'];
-		unset($args['ignore_empty']);
-	}
-
-	$args['fields'] = 'count';
-
-	return get_terms($taxonomy, $args);
-}
-
-/**
- * Will unlink the object from the taxonomy or taxonomies.
- *
- * Will remove all relationships between the object and any terms in
- * a particular taxonomy or taxonomies. Does not remove the term or
- * taxonomy itself.
- *
- * @since 2.3.0
- *
- * @param int          $object_id  The term Object Id that refers to the term.
- * @param string|array $taxonomies List of Taxonomy Names or single Taxonomy name.
- */
-function wp_delete_object_term_relationships( $object_id, $taxonomies ) {
-	$object_id = (int) $object_id;
-
-	if ( !is_array($taxonomies) )
-		$taxonomies = array($taxonomies);
-
-	foreach ( (array) $taxonomies as $taxonomy ) {
-		$term_ids = wp_get_object_terms( $object_id, $taxonomy, array( 'fields' => 'ids' ) );
-		$term_ids = array_map( 'intval', $term_ids );
-		wp_remove_object_terms( $object_id, $term_ids, $taxonomy );
-	}
-}
-
-/**
- * Removes a term from the database.
- *
- * If the term is a parent of other terms, then the children will be updated to
- * that term's parent.
- *
- * Metadata associated with the term will be deleted.
- *
- * @since 2.3.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int          $term     Term ID.
- * @param string       $taxonomy Taxonomy Name.
- * @param array|string $args {
- *     Optional. Array of arguments to override the default term ID. Default empty array.
- *
- *     @type int  $default       The term ID to make the default term. This will only override
- *                               the terms found if there is only one term found. Any other and
- *                               the found terms are used.
- *     @type bool $force_default Optional. Whether to force the supplied term as default to be
- *                               assigned even if the object was not going to be term-less.
- *                               Default false.
- * }
- * @return bool|int|WP_Error True on success, false if term does not exist. Zero on attempted
- *                           deletion of default Category. WP_Error if the taxonomy does not exist.
- */
-function wp_delete_term( $term, $taxonomy, $args = array() ) {
-	global $wpdb;
-
-	$term = (int) $term;
-
-	if ( ! $ids = term_exists($term, $taxonomy) )
-		return false;
-	if ( is_wp_error( $ids ) )
-		return $ids;
-
-	$tt_id = $ids['term_taxonomy_id'];
-
-	$defaults = array();
-
-	if ( 'category' == $taxonomy ) {
-		$defaults['default'] = get_option( 'default_category' );
-		if ( $defaults['default'] == $term )
-			return 0; // Don't delete the default category
-	}
-
-	$args = wp_parse_args($args, $defaults);
-
-	if ( isset( $args['default'] ) ) {
-		$default = (int) $args['default'];
-		if ( ! term_exists( $default, $taxonomy ) ) {
-			unset( $default );
-		}
-	}
-
-	if ( isset( $args['force_default'] ) ) {
-		$force_default = $args['force_default'];
-	}
-
-	/**
-	 * Fires when deleting a term, before any modifications are made to posts or terms.
-	 *
-	 * @since 4.1.0
-	 *
-	 * @param int    $term     Term ID.
-	 * @param string $taxonomy Taxonomy Name.
-	 */
-	do_action( 'pre_delete_term', $term, $taxonomy );
-
-	// Update children to point to new parent
-	if ( is_taxonomy_hierarchical($taxonomy) ) {
-		$term_obj = get_term($term, $taxonomy);
-		if ( is_wp_error( $term_obj ) )
-			return $term_obj;
-		$parent = $term_obj->parent;
-
-		$edit_ids = $wpdb->get_results( "SELECT term_id, term_taxonomy_id FROM $wpdb->term_taxonomy WHERE `parent` = " . (int)$term_obj->term_id );
-		$edit_tt_ids = wp_list_pluck( $edit_ids, 'term_taxonomy_id' );
-
-		/**
-		 * Fires immediately before a term to delete's children are reassigned a parent.
-		 *
-		 * @since 2.9.0
-		 *
-		 * @param array $edit_tt_ids An array of term taxonomy IDs for the given term.
-		 */
-		do_action( 'edit_term_taxonomies', $edit_tt_ids );
-
-		$wpdb->update( $wpdb->term_taxonomy, compact( 'parent' ), array( 'parent' => $term_obj->term_id) + compact( 'taxonomy' ) );
-
-		// Clean the cache for all child terms.
-		$edit_term_ids = wp_list_pluck( $edit_ids, 'term_id' );
-		clean_term_cache( $edit_term_ids, $taxonomy );
-
-		/**
-		 * Fires immediately after a term to delete's children are reassigned a parent.
-		 *
-		 * @since 2.9.0
-		 *
-		 * @param array $edit_tt_ids An array of term taxonomy IDs for the given term.
-		 */
-		do_action( 'edited_term_taxonomies', $edit_tt_ids );
-	}
-
-	// Get the term before deleting it or its term relationships so we can pass to actions below.
-	$deleted_term = get_term( $term, $taxonomy );
-
-	$object_ids = (array) $wpdb->get_col( $wpdb->prepare( "SELECT object_id FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d", $tt_id ) );
-
-	foreach ( $object_ids as $object_id ) {
-		$terms = wp_get_object_terms( $object_id, $taxonomy, array( 'fields' => 'ids', 'orderby' => 'none' ) );
-		if ( 1 == count($terms) && isset($default) ) {
-			$terms = array($default);
-		} else {
-			$terms = array_diff($terms, array($term));
-			if (isset($default) && isset($force_default) && $force_default)
-				$terms = array_merge($terms, array($default));
-		}
-		$terms = array_map('intval', $terms);
-		wp_set_object_terms( $object_id, $terms, $taxonomy );
-	}
-
-	// Clean the relationship caches for all object types using this term.
-	$tax_object = get_taxonomy( $taxonomy );
-	foreach ( $tax_object->object_type as $object_type )
-		clean_object_term_cache( $object_ids, $object_type );
-
-	$term_meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT meta_id FROM $wpdb->termmeta WHERE term_id = %d ", $term ) );
-	foreach ( $term_meta_ids as $mid ) {
-		delete_metadata_by_mid( 'term', $mid );
-	}
-
-	/**
-	 * Fires immediately before a term taxonomy ID is deleted.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param int $tt_id Term taxonomy ID.
-	 */
-	do_action( 'delete_term_taxonomy', $tt_id );
-	$wpdb->delete( $wpdb->term_taxonomy, array( 'term_taxonomy_id' => $tt_id ) );
-
-	/**
-	 * Fires immediately after a term taxonomy ID is deleted.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param int $tt_id Term taxonomy ID.
-	 */
-	do_action( 'deleted_term_taxonomy', $tt_id );
-
-	// Delete the term if no taxonomies use it.
-	if ( !$wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_taxonomy WHERE term_id = %d", $term) ) )
-		$wpdb->delete( $wpdb->terms, array( 'term_id' => $term ) );
-
-	clean_term_cache($term, $taxonomy);
-
-	/**
-	 * Fires after a term is deleted from the database and the cache is cleaned.
-	 *
-	 * @since 2.5.0
-	 * @since 4.5.0 Introduced the `$object_ids` argument.
-	 *
-	 * @param int     $term         Term ID.
-	 * @param int     $tt_id        Term taxonomy ID.
-	 * @param string  $taxonomy     Taxonomy slug.
-	 * @param mixed   $deleted_term Copy of the already-deleted term, in the form specified
-	 *                              by the parent function. WP_Error otherwise.
-	 * @param array   $object_ids   List of term object IDs.
-	 */
-	do_action( 'delete_term', $term, $tt_id, $taxonomy, $deleted_term, $object_ids );
-
-	/**
-	 * Fires after a term in a specific taxonomy is deleted.
-	 *
-	 * The dynamic portion of the hook name, `$taxonomy`, refers to the specific
-	 * taxonomy the term belonged to.
-	 *
-	 * @since 2.3.0
-	 * @since 4.5.0 Introduced the `$object_ids` argument.
-	 *
-	 * @param int     $term         Term ID.
-	 * @param int     $tt_id        Term taxonomy ID.
-	 * @param mixed   $deleted_term Copy of the already-deleted term, in the form specified
-	 *                              by the parent function. WP_Error otherwise.
-	 * @param array   $object_ids   List of term object IDs.
-	 */
-	do_action( "delete_{$taxonomy}", $term, $tt_id, $deleted_term, $object_ids );
-
-	return true;
-}
-
-/**
- * Deletes one existing category.
- *
- * @since 2.0.0
- *
- * @param int $cat_ID
- * @return bool|int|WP_Error Returns true if completes delete action; false if term doesn't exist;
- * 	Zero on attempted deletion of default Category; WP_Error object is also a possibility.
- */
-function wp_delete_category( $cat_ID ) {
-	return wp_delete_term( $cat_ID, 'category' );
-}
-
-/**
- * Retrieves the terms associated with the given object(s), in the supplied taxonomies.
- *
- * @since 2.3.0
- * @since 4.2.0 Added support for 'taxonomy', 'parent', and 'term_taxonomy_id' values of `$orderby`.
- *              Introduced `$parent` argument.
- * @since 4.4.0 Introduced `$meta_query` and `$update_term_meta_cache` arguments. When `$fields` is 'all' or
- *              'all_with_object_id', an array of `WP_Term` objects will be returned.
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int|array    $object_ids The ID(s) of the object(s) to retrieve.
- * @param string|array $taxonomies The taxonomies to retrieve terms from.
- * @param array|string $args {
- *     Array of arguments.
- *     @type string $orderby                Field by which results should be sorted. Accepts 'name', 'count', 'slug',
- *                                          'term_group', 'term_order', 'taxonomy', 'parent', or 'term_taxonomy_id'.
- *                                          Default 'name'.
- *     @type string $order                  Sort order. Accepts 'ASC' or 'DESC'. Default 'ASC'.
- *     @type string $fields                 Fields to return for matched terms. Accepts 'all', 'ids', 'names', and
- *                                          'all_with_object_id'. Note that 'all' or 'all_with_object_id' will result
- *                                          in an array of term objects being returned, 'ids' will return an array of
- *                                          integers, and 'names' an array of strings.
- *     @type int    $parent                 Optional. Limit results to the direct children of a given term ID.
- *     @type bool   $update_term_meta_cache Whether to prime termmeta cache for matched terms. Only applies when
- *                                          `$fields` is 'all', 'all_with_object_id', or 'term_id'. Default true.
- *     @type array  $meta_query             Meta query clauses to limit retrieved terms by. See `WP_Meta_Query`.
- *                                          Default empty.
- * }
- * @return array|WP_Error The requested term data or empty array if no terms found.
- *                        WP_Error if any of the $taxonomies don't exist.
- */
-function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
-	global $wpdb;
-
-	if ( empty( $object_ids ) || empty( $taxonomies ) )
-		return array();
-
-	if ( !is_array($taxonomies) )
-		$taxonomies = array($taxonomies);
-
-	foreach ( $taxonomies as $taxonomy ) {
-		if ( ! taxonomy_exists($taxonomy) )
-			return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
-	}
-
-	if ( !is_array($object_ids) )
-		$object_ids = array($object_ids);
-	$object_ids = array_map('intval', $object_ids);
-
-	$defaults = array(
-		'orderby' => 'name',
-		'order'   => 'ASC',
-		'fields'  => 'all',
-		'parent'  => '',
-		'update_term_meta_cache' => true,
-		'meta_query' => '',
-	);
-	$args = wp_parse_args( $args, $defaults );
-
-	$terms = array();
-	if ( count($taxonomies) > 1 ) {
-		foreach ( $taxonomies as $index => $taxonomy ) {
-			$t = get_taxonomy($taxonomy);
-			if ( isset($t->args) && is_array($t->args) && $args != array_merge($args, $t->args) ) {
-				unset($taxonomies[$index]);
-				$terms = array_merge($terms, wp_get_object_terms($object_ids, $taxonomy, array_merge($args, $t->args)));
-			}
-		}
-	} else {
-		$t = get_taxonomy($taxonomies[0]);
-		if ( isset($t->args) && is_array($t->args) )
-			$args = array_merge($args, $t->args);
-	}
-
-	$orderby = $args['orderby'];
-	$order = $args['order'];
-	$fields = $args['fields'];
-
-	if ( in_array( $orderby, array( 'term_id', 'name', 'slug', 'term_group' ) ) ) {
-		$orderby = "t.$orderby";
-	} elseif ( in_array( $orderby, array( 'count', 'parent', 'taxonomy', 'term_taxonomy_id' ) ) ) {
-		$orderby = "tt.$orderby";
-	} elseif ( 'term_order' === $orderby ) {
-		$orderby = 'tr.term_order';
-	} elseif ( 'none' === $orderby ) {
-		$orderby = '';
-		$order = '';
-	} else {
-		$orderby = 't.term_id';
-	}
-
-	// tt_ids queries can only be none or tr.term_taxonomy_id
-	if ( ('tt_ids' == $fields) && !empty($orderby) )
-		$orderby = 'tr.term_taxonomy_id';
-
-	if ( !empty($orderby) )
-		$orderby = "ORDER BY $orderby";
-
-	$order = strtoupper( $order );
-	if ( '' !== $order && ! in_array( $order, array( 'ASC', 'DESC' ) ) )
-		$order = 'ASC';
-
-	$taxonomy_array = $taxonomies;
-	$object_id_array = $object_ids;
-	$taxonomies = "'" . implode("', '", array_map( 'esc_sql', $taxonomies ) ) . "'";
-	$object_ids = implode(', ', $object_ids);
-
-	$select_this = '';
-	if ( 'all' == $fields ) {
-		$select_this = 't.*, tt.*';
-	} elseif ( 'ids' == $fields ) {
-		$select_this = 't.term_id';
-	} elseif ( 'names' == $fields ) {
-		$select_this = 't.name';
-	} elseif ( 'slugs' == $fields ) {
-		$select_this = 't.slug';
-	} elseif ( 'all_with_object_id' == $fields ) {
-		$select_this = 't.*, tt.*, tr.object_id';
-	}
-
-	$where = array(
-		"tt.taxonomy IN ($taxonomies)",
-		"tr.object_id IN ($object_ids)",
-	);
-
-	if ( '' !== $args['parent'] ) {
-		$where[] = $wpdb->prepare( 'tt.parent = %d', $args['parent'] );
-	}
-
-	// Meta query support.
-	$meta_query_join = '';
-	if ( ! empty( $args['meta_query'] ) ) {
-		$mquery = new WP_Meta_Query( $args['meta_query'] );
-		$mq_sql = $mquery->get_sql( 'term', 't', 'term_id' );
-
-		$meta_query_join .= $mq_sql['join'];
-
-		// Strip leading AND.
-		$where[] = preg_replace( '/^\s*AND/', '', $mq_sql['where'] );
-	}
-
-	$where = implode( ' AND ', $where );
-
-	$query = "SELECT $select_this FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN $wpdb->term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id $meta_query_join WHERE $where $orderby $order";
-
-	$objects = false;
-	if ( 'all' == $fields || 'all_with_object_id' == $fields ) {
-		$_terms = $wpdb->get_results( $query );
-		$object_id_index = array();
-		foreach ( $_terms as $key => $term ) {
-			$term = sanitize_term( $term, $taxonomy, 'raw' );
-			$_terms[ $key ] = $term;
-
-			if ( isset( $term->object_id ) ) {
-				$object_id_index[ $key ] = $term->object_id;
-			}
-		}
-
-		update_term_cache( $_terms );
-		$_terms = array_map( 'get_term', $_terms );
-
-		// Re-add the object_id data, which is lost when fetching terms from cache.
-		if ( 'all_with_object_id' === $fields ) {
-			foreach ( $_terms as $key => $_term ) {
-				if ( isset( $object_id_index[ $key ] ) ) {
-					$_term->object_id = $object_id_index[ $key ];
-				}
-			}
-		}
-
-		$terms = array_merge( $terms, $_terms );
-		$objects = true;
-
-	} elseif ( 'ids' == $fields || 'names' == $fields || 'slugs' == $fields ) {
-		$_terms = $wpdb->get_col( $query );
-		$_field = ( 'ids' == $fields ) ? 'term_id' : 'name';
-		foreach ( $_terms as $key => $term ) {
-			$_terms[$key] = sanitize_term_field( $_field, $term, $term, $taxonomy, 'raw' );
-		}
-		$terms = array_merge( $terms, $_terms );
-	} elseif ( 'tt_ids' == $fields ) {
-		$terms = $wpdb->get_col("SELECT tr.term_taxonomy_id FROM $wpdb->term_relationships AS tr INNER JOIN $wpdb->term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tr.object_id IN ($object_ids) AND tt.taxonomy IN ($taxonomies) $orderby $order");
-		foreach ( $terms as $key => $tt_id ) {
-			$terms[$key] = sanitize_term_field( 'term_taxonomy_id', $tt_id, 0, $taxonomy, 'raw' ); // 0 should be the term id, however is not needed when using raw context.
-		}
-	}
-
-	// Update termmeta cache, if necessary.
-	if ( $args['update_term_meta_cache'] && ( 'all' === $fields || 'all_with_object_id' === $fields || 'ids' === $fields ) ) {
-		if ( 'ids' === $fields ) {
-			$term_ids = $terms;
-		} else {
-			$term_ids = wp_list_pluck( $terms, 'term_id' );
-		}
-
-		update_termmeta_cache( $term_ids );
-	}
-
-	if ( ! $terms ) {
-		$terms = array();
-	} elseif ( $objects && 'all_with_object_id' !== $fields ) {
-		$_tt_ids = array();
-		$_terms = array();
-		foreach ( $terms as $term ) {
-			if ( in_array( $term->term_taxonomy_id, $_tt_ids ) ) {
-				continue;
-			}
-
-			$_tt_ids[] = $term->term_taxonomy_id;
-			$_terms[] = $term;
-		}
-		$terms = $_terms;
-	} elseif ( ! $objects ) {
-		$terms = array_values( array_unique( $terms ) );
-	}
-
-	/**
-	 * Filters the terms for a given object or objects.
-	 *
-	 * @since 4.2.0
-	 *
-	 * @param array $terms           An array of terms for the given object or objects.
-	 * @param array $object_id_array Array of object IDs for which `$terms` were retrieved.
-	 * @param array $taxonomy_array  Array of taxonomies from which `$terms` were retrieved.
-	 * @param array $args            An array of arguments for retrieving terms for the given
-	 *                               object(s). See wp_get_object_terms() for details.
-	 */
-	$terms = apply_filters( 'get_object_terms', $terms, $object_id_array, $taxonomy_array, $args );
-
-	/**
-	 * Filters the terms for a given object or objects.
-	 *
-	 * The `$taxonomies` parameter passed to this filter is formatted as a SQL fragment. The
-	 * {@see 'get_object_terms'} filter is recommended as an alternative.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param array     $terms      An array of terms for the given object or objects.
-	 * @param int|array $object_ids Object ID or array of IDs.
-	 * @param string    $taxonomies SQL-formatted (comma-separated and quoted) list of taxonomy names.
-	 * @param array     $args       An array of arguments for retrieving terms for the given object(s).
-	 *                              See wp_get_object_terms() for details.
-	 */
-	return apply_filters( 'wp_get_object_terms', $terms, $object_ids, $taxonomies, $args );
-}
-
-/**
- * Add a new term to the database.
- *
- * A non-existent term is inserted in the following sequence:
- * 1. The term is added to the term table, then related to the taxonomy.
- * 2. If everything is correct, several actions are fired.
- * 3. The 'term_id_filter' is evaluated.
- * 4. The term cache is cleaned.
- * 5. Several more actions are fired.
- * 6. An array is returned containing the term_id and term_taxonomy_id.
- *
- * If the 'slug' argument is not empty, then it is checked to see if the term
- * is invalid. If it is not a valid, existing term, it is added and the term_id
- * is given.
- *
- * If the taxonomy is hierarchical, and the 'parent' argument is not empty,
- * the term is inserted and the term_id will be given.
- *
- * Error handling:
- * If $taxonomy does not exist or $term is empty,
- * a WP_Error object will be returned.
- *
- * If the term already exists on the same hierarchical level,
- * or the term slug and name are not unique, a WP_Error object will be returned.
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @since 2.3.0
- *
- * @param string       $term     The term to add or update.
- * @param string       $taxonomy The taxonomy to which to add the term.
- * @param array|string $args {
- *     Optional. Array or string of arguments for inserting a term.
- *
- *     @type string $alias_of    Slug of the term to make this term an alias of.
- *                               Default empty string. Accepts a term slug.
- *     @type string $description The term description. Default empty string.
- *     @type int    $parent      The id of the parent term. Default 0.
- *     @type string $slug        The term slug to use. Default empty string.
- * }
- * @return array|WP_Error An array containing the `term_id` and `term_taxonomy_id`,
- *                        WP_Error otherwise.
- */
-function wp_insert_term( $term, $taxonomy, $args = array() ) {
-	global $wpdb;
-
-	if ( ! taxonomy_exists($taxonomy) ) {
-		return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
-	}
-	/**
-	 * Filters a term before it is sanitized and inserted into the database.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $term     The term to add or update.
-	 * @param string $taxonomy Taxonomy slug.
-	 */
-	$term = apply_filters( 'pre_insert_term', $term, $taxonomy );
-	if ( is_wp_error( $term ) ) {
-		return $term;
-	}
-	if ( is_int( $term ) && 0 == $term ) {
-		return new WP_Error( 'invalid_term_id', __( 'Invalid term ID.' ) );
-	}
-	if ( '' == trim( $term ) ) {
-		return new WP_Error( 'empty_term_name', __( 'A name is required for this term.' ) );
-	}
-	$defaults = array( 'alias_of' => '', 'description' => '', 'parent' => 0, 'slug' => '');
-	$args = wp_parse_args( $args, $defaults );
-
-	if ( $args['parent'] > 0 && ! term_exists( (int) $args['parent'] ) ) {
-		return new WP_Error( 'missing_parent', __( 'Parent term does not exist.' ) );
-	}
-
-	$args['name'] = $term;
-	$args['taxonomy'] = $taxonomy;
-
-	// Coerce null description to strings, to avoid database errors.
-	$args['description'] = (string) $args['description'];
-
-	$args = sanitize_term($args, $taxonomy, 'db');
-
-	// expected_slashed ($name)
-	$name = wp_unslash( $args['name'] );
-	$description = wp_unslash( $args['description'] );
-	$parent = (int) $args['parent'];
-
-	$slug_provided = ! empty( $args['slug'] );
-	if ( ! $slug_provided ) {
-		$slug = sanitize_title( $name );
-	} else {
-		$slug = $args['slug'];
-	}
-
-	$term_group = 0;
-	if ( $args['alias_of'] ) {
-		$alias = get_term_by( 'slug', $args['alias_of'], $taxonomy );
-		if ( ! empty( $alias->term_group ) ) {
-			// The alias we want is already in a group, so let's use that one.
-			$term_group = $alias->term_group;
-		} elseif ( ! empty( $alias->term_id ) ) {
-			/*
-			 * The alias is not in a group, so we create a new one
-			 * and add the alias to it.
-			 */
-			$term_group = $wpdb->get_var("SELECT MAX(term_group) FROM $wpdb->terms") + 1;
-
-			wp_update_term( $alias->term_id, $taxonomy, array(
-				'term_group' => $term_group,
-			) );
-		}
-	}
-
-	/*
-	 * Prevent the creation of terms with duplicate names at the same level of a taxonomy hierarchy,
-	 * unless a unique slug has been explicitly provided.
-	 */
-	$name_matches = get_terms( $taxonomy, array(
-		'name' => $name,
-		'hide_empty' => false,
-	) );
-
-	/*
-	 * The `name` match in `get_terms()` doesn't differentiate accented characters,
-	 * so we do a stricter comparison here.
-	 */
-	$name_match = null;
-	if ( $name_matches ) {
-		foreach ( $name_matches as $_match ) {
-			if ( strtolower( $name ) === strtolower( $_match->name ) ) {
-				$name_match = $_match;
-				break;
-			}
-		}
-	}
-
-	if ( $name_match ) {
-		$slug_match = get_term_by( 'slug', $slug, $taxonomy );
-		if ( ! $slug_provided || $name_match->slug === $slug || $slug_match ) {
-			if ( is_taxonomy_hierarchical( $taxonomy ) ) {
-				$siblings = get_terms( $taxonomy, array( 'get' => 'all', 'parent' => $parent ) );
-
-				$existing_term = null;
-				if ( $name_match->slug === $slug && in_array( $name, wp_list_pluck( $siblings, 'name' ) ) ) {
-					$existing_term = $name_match;
-				} elseif ( $slug_match && in_array( $slug, wp_list_pluck( $siblings, 'slug' ) ) ) {
-					$existing_term = $slug_match;
-				}
-
-				if ( $existing_term ) {
-					return new WP_Error( 'term_exists', __( 'A term with the name provided already exists with this parent.' ), $existing_term->term_id );
-				}
-			} else {
-				return new WP_Error( 'term_exists', __( 'A term with the name provided already exists in this taxonomy.' ), $name_match->term_id );
-			}
-		}
-	}
-
-	$slug = wp_unique_term_slug( $slug, (object) $args );
-
-	$data = compact( 'name', 'slug', 'term_group' );
-
-	/**
-	 * Filters term data before it is inserted into the database.
-	 *
-	 * @since 4.7.0
-	 *
-	 * @param array  $data     Term data to be inserted.
-	 * @param string $taxonomy Taxonomy slug.
-	 * @param array  $args     Arguments passed to wp_insert_term().
-	 */
-	$data = apply_filters( 'wp_insert_term_data', $data, $taxonomy, $args );
-
-	if ( false === $wpdb->insert( $wpdb->terms, $data ) ) {
-		return new WP_Error( 'db_insert_error', __( 'Could not insert term into the database' ), $wpdb->last_error );
-	}
-
-	$term_id = (int) $wpdb->insert_id;
-
-	// Seems unreachable, However, Is used in the case that a term name is provided, which sanitizes to an empty string.
-	if ( empty($slug) ) {
-		$slug = sanitize_title($slug, $term_id);
-
-		/** This action is documented in wp-includes/taxonomy.php */
-		do_action( 'edit_terms', $term_id, $taxonomy );
-		$wpdb->update( $wpdb->terms, compact( 'slug' ), compact( 'term_id' ) );
-
-		/** This action is documented in wp-includes/taxonomy.php */
-		do_action( 'edited_terms', $term_id, $taxonomy );
-	}
-
-	$tt_id = $wpdb->get_var( $wpdb->prepare( "SELECT tt.term_taxonomy_id FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = %s AND t.term_id = %d", $taxonomy, $term_id ) );
-
-	if ( !empty($tt_id) ) {
-		return array('term_id' => $term_id, 'term_taxonomy_id' => $tt_id);
-	}
-	$wpdb->insert( $wpdb->term_taxonomy, compact( 'term_id', 'taxonomy', 'description', 'parent') + array( 'count' => 0 ) );
-	$tt_id = (int) $wpdb->insert_id;
-
-	/*
-	 * Sanity check: if we just created a term with the same parent + taxonomy + slug but a higher term_id than
-	 * an existing term, then we have unwittingly created a duplicate term. Delete the dupe, and use the term_id
-	 * and term_taxonomy_id of the older term instead. Then return out of the function so that the "create" hooks
-	 * are not fired.
-	 */
-	$duplicate_term = $wpdb->get_row( $wpdb->prepare( "SELECT t.term_id, tt.term_taxonomy_id FROM $wpdb->terms t INNER JOIN $wpdb->term_taxonomy tt ON ( tt.term_id = t.term_id ) WHERE t.slug = %s AND tt.parent = %d AND tt.taxonomy = %s AND t.term_id < %d AND tt.term_taxonomy_id != %d", $slug, $parent, $taxonomy, $term_id, $tt_id ) );
-	if ( $duplicate_term ) {
-		$wpdb->delete( $wpdb->terms, array( 'term_id' => $term_id ) );
-		$wpdb->delete( $wpdb->term_taxonomy, array( 'term_taxonomy_id' => $tt_id ) );
-
-		$term_id = (int) $duplicate_term->term_id;
-		$tt_id   = (int) $duplicate_term->term_taxonomy_id;
-
-		clean_term_cache( $term_id, $taxonomy );
-		return array( 'term_id' => $term_id, 'term_taxonomy_id' => $tt_id );
-	}
-
-	/**
-	 * Fires immediately after a new term is created, before the term cache is cleaned.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param int    $term_id  Term ID.
-	 * @param int    $tt_id    Term taxonomy ID.
-	 * @param string $taxonomy Taxonomy slug.
-	 */
-	do_action( "create_term", $term_id, $tt_id, $taxonomy );
-
-	/**
-	 * Fires after a new term is created for a specific taxonomy.
-	 *
-	 * The dynamic portion of the hook name, `$taxonomy`, refers
-	 * to the slug of the taxonomy the term was created for.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param int $term_id Term ID.
-	 * @param int $tt_id   Term taxonomy ID.
-	 */
-	do_action( "create_{$taxonomy}", $term_id, $tt_id );
-
-	/**
-	 * Filters the term ID after a new term is created.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param int $term_id Term ID.
-	 * @param int $tt_id   Taxonomy term ID.
-	 */
-	$term_id = apply_filters( 'term_id_filter', $term_id, $tt_id );
-
-	clean_term_cache($term_id, $taxonomy);
-
-	/**
-	 * Fires after a new term is created, and after the term cache has been cleaned.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param int    $term_id  Term ID.
-	 * @param int    $tt_id    Term taxonomy ID.
-	 * @param string $taxonomy Taxonomy slug.
-	 */
-	do_action( 'created_term', $term_id, $tt_id, $taxonomy );
-
-	/**
-	 * Fires after a new term in a specific taxonomy is created, and after the term
-	 * cache has been cleaned.
-	 *
-	 * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param int $term_id Term ID.
-	 * @param int $tt_id   Term taxonomy ID.
-	 */
-	do_action( "created_{$taxonomy}", $term_id, $tt_id );
-
-	return array('term_id' => $term_id, 'term_taxonomy_id' => $tt_id);
-}
-
-/**
- * Create Term and Taxonomy Relationships.
- *
- * Relates an object (post, link etc) to a term and taxonomy type. Creates the
- * term and taxonomy relationship if it doesn't already exist. Creates a term if
- * it doesn't exist (using the slug).
- *
- * A relationship means that the term is grouped in or belongs to the taxonomy.
- * A term has no meaning until it is given context by defining which taxonomy it
- * exists under.
- *
- * @since 2.3.0
- *
- * @global wpdb $wpdb The WordPress database abstraction object.
- *
- * @param int              $object_id The object to relate to.
- * @param array|int|string $terms     A single term slug, single term id, or array of either term slugs or ids.
- *                                    Will replace all existing related terms in this taxonomy.
- * @param string           $taxonomy  The context in which to relate the term to the object.
- * @param bool             $append    Optional. If false will delete difference of terms. Default false.
- * @return array|WP_Error Term taxonomy IDs of the affected terms.
- */
-function wp_set_object_terms( $object_id, $terms, $taxonomy, $append = false ) {
-	global $wpdb;
-
-	$object_id = (int) $object_id;
-
-	if ( ! taxonomy_exists( $taxonomy ) ) {
-		return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
-	}
-
-	if ( !is_array($terms) )
-		$terms = array($terms);
-
-	if ( ! $append )
-		$old_tt_ids =  wp_get_object_terms($object_id, $taxonomy, array('fields' => 'tt_ids', 'orderby' => 'none'));
-	else
-		$old_tt_ids = array();
-
-	$tt_ids = array();
-	$term_ids = array();
-	$new_tt_ids = array();
-
-	foreach ( (array) $terms as $term) {
-		if ( !strlen(trim($term)) )
-			continue;
-
-		if ( !$term_info = term_exists($term, $taxonomy) ) {
-			// Skip if a non-existent term ID is passed.
-			if ( is_int($term) )
-				continue;
-			$term_info = wp_insert_term($term, $taxonomy);
-		}
-		if ( is_wp_error($term_info) )
-			return $term_info;
-		$term_ids[] = $term_info['term_id'];
-		$tt_id = $term_info['term_taxonomy_id'];
-		$tt_ids[] = $tt_id;
-
-		if ( $wpdb->get_var( $wpdb->prepare( "SELECT term_taxonomy_id FROM $wpdb->term_relationships WHERE object_id = %d AND term_taxonomy_id = %d", $object_id, $tt_id ) ) )
-			continue;
-
-		/**
-		 * Fires immediately before an object-term relationship is added.
-		 *
-		 * @since 2.9.0
-		 * @since 4.7.0 Added the `$taxonomy` parameter.
-		 *
-		 * @param int    $object_id Object ID.
-		 * @param int    $tt_id     Term taxonomy ID.
-		 * @param string $taxonomy  Taxonomy slug.
-		 */
-		do_action( 'add_term_relationship', $object_id, $tt_id, $taxonomy );
-		$wpdb->insert( $wpdb->term_relationships, array( 'object_id' => $object_id, 'term_taxonomy_id' => $tt_id ) );
-
-		/**
-		 * Fires immediately after an object-term relationship is added.
-		 *
-		 * @since 2.9.0
-		 * @since 4.7.0 Added the `$taxonomy` parameter.
-		 *
-		 * @param int    $object_id Object ID.
-		 * @param int    $tt_id     Term taxonomy ID.
-		 * @param string $taxonomy  Taxonomy slug.
-		 */
-		do_action( 'added_term_relationship', $object_id, $tt_id, $taxonomy );
-		$new_tt_ids[] = $tt_id;
-	}
-
-	if ( $new_tt_ids )
-		wp_update_term_count( $new_tt_ids, $taxonomy );
-
-	if ( ! $append ) {
-		$delete_tt_ids = array_diff( $old_tt_ids, $tt_ids );
-
-		if ( $delete_tt_ids ) {
-			$in_delete_tt_ids = "'" . implode( "', '", $delete_tt_ids ) . "'";
-			$delete_term_ids = $wpdb->get_col( $wpdb->prepare( "SELECT tt.term_id FROM $wpdb->term_taxonomy AS tt WHERE tt.taxonomy = %s AND tt.term_taxonomy_id IN ($in_delete_tt_ids)", $taxonomy ) );
-			$delete_term_ids = array_map( 'intval', $delete_term_ids );
-
-			$remove = wp_remove_object_terms( $object_id, $delete_term_ids, $taxonomy );
-			if ( is_wp_error( $remove ) ) {
-				return $remove;
-			}
-		}
-	}
-
-	$t = get_taxonomy($taxonomy);
-	if ( ! $append && isset($t->sort) && $t->sort ) {
-		$values = array();
-		$term_order = 0;
-		$final_tt_ids = wp_get_object_terms($object_id, $taxonomy, array('fields' => 'tt_ids'));
-		foreach ( $tt_ids as $tt_id )
-			if ( in_array($tt_id, $final_tt_ids) )
-				$values[] = $wpdb->prepare( "(%d, %d, %d)", $object_id, $tt_id, ++$term_order);
-		if ( $values )
-			if ( false === $wpdb->query( "INSERT INTO $wpdb->term_relationships (object_id, term_taxonomy_id, term_order) VALUES " . join( ',', $values ) . " ON DUPLICATE KEY UPDATE term_order = VALUES(term_order)" ) )
-				return new WP_Error( 'db_insert_error', __( 'Could not insert term relationship into the database' ), $wpdb->last_error );
-	}
-
-	wp_cache_delete( $object_id, $taxonomy . '_relationships' );
-
-	/**
-	 * Fires after an object's terms have been set.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param int    $object_id  Object ID.
-	 * @param array  $terms      An array of object terms.
-	 * @param array  $tt_ids     An array of term taxonomy IDs.
-	 * @param string $taxonomy   Taxonomy slug.
-	 * @param bool   $append     Whether to append new terms to the old terms.
-	 * @param array  $old_tt_ids Old array of term taxonomy IDs.
-	 */
-	do_action( 'set_object_terms', $object_id, $terms, $tt_ids, $taxonomy, $append, $old_tt_ids );
-	return $tt_ids;
-}
-
-/**
- * Add term(s) associated with a given object.
- *
- * @since 3.6.0
- *
- * @param int              $object_id The ID of the object to which the terms will be added.
- * @param array|int|string $terms     The slug(s) or ID(s) of the term(s) to add.
- * @param array|string     $taxonomy  Taxonomy name.
- * @return array|WP_Error Term taxonomy IDs of the affected terms.
- */
-function wp_add_object_terms( $object_id, $terms, $taxonomy ) {
-	return wp_set_object_terms( $object_id, $terms, $taxonomy, true );
-}
-
-/**
- * Remove term(s) associated with a given object.
- *
- * @since 3.6.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int              $object_id The ID of the object from which the terms will be removed.
- * @param array|int|string $terms     The slug(s) or ID(s) of the term(s) to remove.
- * @param array|string     $taxonomy  Taxonomy name.
- * @return bool|WP_Error True on success, false or WP_Error on failure.
- */
-function wp_remove_object_terms( $object_id, $terms, $taxonomy ) {
-	global $wpdb;
-
-	$object_id = (int) $object_id;
-
-	if ( ! taxonomy_exists( $taxonomy ) ) {
-		return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
-	}
-
-	if ( ! is_array( $terms ) ) {
-		$terms = array( $terms );
-	}
-
-	$tt_ids = array();
-
-	foreach ( (array) $terms as $term ) {
-		if ( ! strlen( trim( $term ) ) ) {
-			continue;
-		}
-
-		if ( ! $term_info = term_exists( $term, $taxonomy ) ) {
-			// Skip if a non-existent term ID is passed.
-			if ( is_int( $term ) ) {
-				continue;
-			}
-		}
-
-		if ( is_wp_error( $term_info ) ) {
-			return $term_info;
-		}
-
-		$tt_ids[] = $term_info['term_taxonomy_id'];
-	}
-
-	if ( $tt_ids ) {
-		$in_tt_ids = "'" . implode( "', '", $tt_ids ) . "'";
-
-		/**
-		 * Fires immediately before an object-term relationship is deleted.
-		 *
-		 * @since 2.9.0
-		 * @since 4.7.0 Added the `$taxonomy` parameter.
-		 *
-		 * @param int   $object_id Object ID.
-		 * @param array $tt_ids    An array of term taxonomy IDs.
-		 * @param string $taxonomy  Taxonomy slug.
-		 */
-		do_action( 'delete_term_relationships', $object_id, $tt_ids, $taxonomy );
-		$deleted = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->term_relationships WHERE object_id = %d AND term_taxonomy_id IN ($in_tt_ids)", $object_id ) );
-
-		wp_cache_delete( $object_id, $taxonomy . '_relationships' );
-
-		/**
-		 * Fires immediately after an object-term relationship is deleted.
-		 *
-		 * @since 2.9.0
-		 * @since 4.7.0 Added the `$taxonomy` parameter.
-		 *
-		 * @param int    $object_id Object ID.
-		 * @param array  $tt_ids    An array of term taxonomy IDs.
-		 * @param string $taxonomy  Taxonomy slug.
-		 */
-		do_action( 'deleted_term_relationships', $object_id, $tt_ids, $taxonomy );
-
-		wp_update_term_count( $tt_ids, $taxonomy );
-
-		return (bool) $deleted;
-	}
-
-	return false;
-}
-
-/**
- * Will make slug unique, if it isn't already.
- *
- * The `$slug` has to be unique global to every taxonomy, meaning that one
- * taxonomy term can't have a matching slug with another taxonomy term. Each
- * slug has to be globally unique for every taxonomy.
- *
- * The way this works is that if the taxonomy that the term belongs to is
- * hierarchical and has a parent, it will append that parent to the $slug.
- *
- * If that still doesn't return an unique slug, then it try to append a number
- * until it finds a number that is truly unique.
- *
- * The only purpose for `$term` is for appending a parent, if one exists.
- *
- * @since 2.3.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $slug The string that will be tried for a unique slug.
- * @param object $term The term object that the `$slug` will belong to.
- * @return string Will return a true unique slug.
- */
-function wp_unique_term_slug( $slug, $term ) {
-	global $wpdb;
-
-	$needs_suffix = true;
-	$original_slug = $slug;
-
-	// As of 4.1, duplicate slugs are allowed as long as they're in different taxonomies.
-	if ( ! term_exists( $slug ) || get_option( 'db_version' ) >= 30133 && ! get_term_by( 'slug', $slug, $term->taxonomy ) ) {
-		$needs_suffix = false;
-	}
-
-	/*
-	 * If the taxonomy supports hierarchy and the term has a parent, make the slug unique
-	 * by incorporating parent slugs.
-	 */
-	$parent_suffix = '';
-	if ( $needs_suffix && is_taxonomy_hierarchical( $term->taxonomy ) && ! empty( $term->parent ) ) {
-		$the_parent = $term->parent;
-		while ( ! empty($the_parent) ) {
-			$parent_term = get_term($the_parent, $term->taxonomy);
-			if ( is_wp_error($parent_term) || empty($parent_term) )
-				break;
-			$parent_suffix .= '-' . $parent_term->slug;
-			if ( ! term_exists( $slug . $parent_suffix ) ) {
-				break;
-			}
-
-			if ( empty($parent_term->parent) )
-				break;
-			$the_parent = $parent_term->parent;
-		}
-	}
-
-	// If we didn't get a unique slug, try appending a number to make it unique.
-
-	/**
-	 * Filters whether the proposed unique term slug is bad.
-	 *
-	 * @since 4.3.0
-	 *
-	 * @param bool   $needs_suffix Whether the slug needs to be made unique with a suffix.
-	 * @param string $slug         The slug.
-	 * @param object $term         Term object.
-	 */
-	if ( apply_filters( 'wp_unique_term_slug_is_bad_slug', $needs_suffix, $slug, $term ) ) {
-		if ( $parent_suffix ) {
-			$slug .= $parent_suffix;
-		} else {
-			if ( ! empty( $term->term_id ) )
-				$query = $wpdb->prepare( "SELECT slug FROM $wpdb->terms WHERE slug = %s AND term_id != %d", $slug, $term->term_id );
-			else
-				$query = $wpdb->prepare( "SELECT slug FROM $wpdb->terms WHERE slug = %s", $slug );
-
-			if ( $wpdb->get_var( $query ) ) {
-				$num = 2;
-				do {
-					$alt_slug = $slug . "-$num";
-					$num++;
-					$slug_check = $wpdb->get_var( $wpdb->prepare( "SELECT slug FROM $wpdb->terms WHERE slug = %s", $alt_slug ) );
-				} while ( $slug_check );
-				$slug = $alt_slug;
-			}
-		}
-	}
-
-	/**
-	 * Filters the unique term slug.
-	 *
-	 * @since 4.3.0
-	 *
-	 * @param string $slug          Unique term slug.
-	 * @param object $term          Term object.
-	 * @param string $original_slug Slug originally passed to the function for testing.
-	 */
-	return apply_filters( 'wp_unique_term_slug', $slug, $term, $original_slug );
-}
-
-/**
- * Update term based on arguments provided.
- *
- * The $args will indiscriminately override all values with the same field name.
- * Care must be taken to not override important information need to update or
- * update will fail (or perhaps create a new term, neither would be acceptable).
- *
- * Defaults will set 'alias_of', 'description', 'parent', and 'slug' if not
- * defined in $args already.
- *
- * 'alias_of' will create a term group, if it doesn't already exist, and update
- * it for the $term.
- *
- * If the 'slug' argument in $args is missing, then the 'name' in $args will be
- * used. It should also be noted that if you set 'slug' and it isn't unique then
- * a WP_Error will be passed back. If you don't pass any slug, then a unique one
- * will be created for you.
- *
- * For what can be overrode in `$args`, check the term scheme can contain and stay
- * away from the term keys.
- *
- * @since 2.3.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int          $term_id  The ID of the term
- * @param string       $taxonomy The context in which to relate the term to the object.
- * @param array|string $args     Optional. Array of get_terms() arguments. Default empty array.
- * @return array|WP_Error Returns Term ID and Taxonomy Term ID
- */
-function wp_update_term( $term_id, $taxonomy, $args = array() ) {
-	global $wpdb;
-
-	if ( ! taxonomy_exists( $taxonomy ) ) {
-		return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
-	}
-
-	$term_id = (int) $term_id;
-
-	// First, get all of the original args
-	$term = get_term( $term_id, $taxonomy );
-
-	if ( is_wp_error( $term ) ) {
-		return $term;
-	}
-
-	if ( ! $term ) {
-		return new WP_Error( 'invalid_term', __( 'Empty Term' ) );
-	}
-
-	$term = (array) $term->data;
-
-	// Escape data pulled from DB.
-	$term = wp_slash( $term );
-
-	// Merge old and new args with new args overwriting old ones.
-	$args = array_merge($term, $args);
-
-	$defaults = array( 'alias_of' => '', 'description' => '', 'parent' => 0, 'slug' => '');
-	$args = wp_parse_args($args, $defaults);
-	$args = sanitize_term($args, $taxonomy, 'db');
-	$parsed_args = $args;
-
-	// expected_slashed ($name)
-	$name = wp_unslash( $args['name'] );
-	$description = wp_unslash( $args['description'] );
-
-	$parsed_args['name'] = $name;
-	$parsed_args['description'] = $description;
-
-	if ( '' == trim( $name ) ) {
-		return new WP_Error( 'empty_term_name', __( 'A name is required for this term.' ) );
-	}
-
-	if ( $parsed_args['parent'] > 0 && ! term_exists( (int) $parsed_args['parent'] ) ) {
-		return new WP_Error( 'missing_parent', __( 'Parent term does not exist.' ) );
-	}
-
-	$empty_slug = false;
-	if ( empty( $args['slug'] ) ) {
-		$empty_slug = true;
-		$slug = sanitize_title($name);
-	} else {
-		$slug = $args['slug'];
-	}
-
-	$parsed_args['slug'] = $slug;
-
-	$term_group = isset( $parsed_args['term_group'] ) ? $parsed_args['term_group'] : 0;
-	if ( $args['alias_of'] ) {
-		$alias = get_term_by( 'slug', $args['alias_of'], $taxonomy );
-		if ( ! empty( $alias->term_group ) ) {
-			// The alias we want is already in a group, so let's use that one.
-			$term_group = $alias->term_group;
-		} elseif ( ! empty( $alias->term_id ) ) {
-			/*
-			 * The alias is not in a group, so we create a new one
-			 * and add the alias to it.
-			 */
-			$term_group = $wpdb->get_var("SELECT MAX(term_group) FROM $wpdb->terms") + 1;
-
-			wp_update_term( $alias->term_id, $taxonomy, array(
-				'term_group' => $term_group,
-			) );
-		}
-
-		$parsed_args['term_group'] = $term_group;
-	}
-
-	/**
-	 * Filters the term parent.
-	 *
-	 * Hook to this filter to see if it will cause a hierarchy loop.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param int    $parent      ID of the parent term.
-	 * @param int    $term_id     Term ID.
-	 * @param string $taxonomy    Taxonomy slug.
-	 * @param array  $parsed_args An array of potentially altered update arguments for the given term.
-	 * @param array  $args        An array of update arguments for the given term.
-	 */
-	$parent = apply_filters( 'wp_update_term_parent', $args['parent'], $term_id, $taxonomy, $parsed_args, $args );
-
-	// Check for duplicate slug
-	$duplicate = get_term_by( 'slug', $slug, $taxonomy );
-	if ( $duplicate && $duplicate->term_id != $term_id ) {
-		// If an empty slug was passed or the parent changed, reset the slug to something unique.
-		// Otherwise, bail.
-		if ( $empty_slug || ( $parent != $term['parent']) )
-			$slug = wp_unique_term_slug($slug, (object) $args);
-		else
-			return new WP_Error('duplicate_term_slug', sprintf(__('The slug &#8220;%s&#8221; is already in use by another term'), $slug));
-	}
-
-	$tt_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT tt.term_taxonomy_id FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = %s AND t.term_id = %d", $taxonomy, $term_id) );
-
-	// Check whether this is a shared term that needs splitting.
-	$_term_id = _split_shared_term( $term_id, $tt_id );
-	if ( ! is_wp_error( $_term_id ) ) {
-		$term_id = $_term_id;
-	}
-
-	/**
-	 * Fires immediately before the given terms are edited.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param int    $term_id  Term ID.
-	 * @param string $taxonomy Taxonomy slug.
-	 */
-	do_action( 'edit_terms', $term_id, $taxonomy );
-
-	$data = compact( 'name', 'slug', 'term_group' );
-
-	/**
-	 * Filters term data before it is updated in the database.
-	 *
-	 * @since 4.7.0
-	 *
-	 * @param array  $data     Term data to be updated.
-	 * @param int    $term_id  Term ID.
-	 * @param string $taxonomy Taxonomy slug.
-	 * @param array  $args     Arguments passed to wp_update_term().
-	 */
-	$data = apply_filters( 'wp_update_term_data', $data, $term_id, $taxonomy, $args );
-
-	$wpdb->update( $wpdb->terms, $data, compact( 'term_id' ) );
-	if ( empty($slug) ) {
-		$slug = sanitize_title($name, $term_id);
-		$wpdb->update( $wpdb->terms, compact( 'slug' ), compact( 'term_id' ) );
-	}
-
-	/**
-	 * Fires immediately after the given terms are edited.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param int    $term_id  Term ID
-	 * @param string $taxonomy Taxonomy slug.
-	 */
-	do_action( 'edited_terms', $term_id, $taxonomy );
-
-	/**
-	 * Fires immediate before a term-taxonomy relationship is updated.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param int    $tt_id    Term taxonomy ID.
-	 * @param string $taxonomy Taxonomy slug.
-	 */
-	do_action( 'edit_term_taxonomy', $tt_id, $taxonomy );
-
-	$wpdb->update( $wpdb->term_taxonomy, compact( 'term_id', 'taxonomy', 'description', 'parent' ), array( 'term_taxonomy_id' => $tt_id ) );
-
-	/**
-	 * Fires immediately after a term-taxonomy relationship is updated.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param int    $tt_id    Term taxonomy ID.
-	 * @param string $taxonomy Taxonomy slug.
-	 */
-	do_action( 'edited_term_taxonomy', $tt_id, $taxonomy );
-
-	/**
-	 * Fires after a term has been updated, but before the term cache has been cleaned.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param int    $term_id  Term ID.
-	 * @param int    $tt_id    Term taxonomy ID.
-	 * @param string $taxonomy Taxonomy slug.
-	 */
-	do_action( "edit_term", $term_id, $tt_id, $taxonomy );
-
-	/**
-	 * Fires after a term in a specific taxonomy has been updated, but before the term
-	 * cache has been cleaned.
-	 *
-	 * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param int $term_id Term ID.
-	 * @param int $tt_id   Term taxonomy ID.
-	 */
-	do_action( "edit_{$taxonomy}", $term_id, $tt_id );
-
-	/** This filter is documented in wp-includes/taxonomy.php */
-	$term_id = apply_filters( 'term_id_filter', $term_id, $tt_id );
-
-	clean_term_cache($term_id, $taxonomy);
-
-	/**
-	 * Fires after a term has been updated, and the term cache has been cleaned.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param int    $term_id  Term ID.
-	 * @param int    $tt_id    Term taxonomy ID.
-	 * @param string $taxonomy Taxonomy slug.
-	 */
-	do_action( "edited_term", $term_id, $tt_id, $taxonomy );
-
-	/**
-	 * Fires after a term for a specific taxonomy has been updated, and the term
-	 * cache has been cleaned.
-	 *
-	 * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param int $term_id Term ID.
-	 * @param int $tt_id   Term taxonomy ID.
-	 */
-	do_action( "edited_{$taxonomy}", $term_id, $tt_id );
-
-	return array('term_id' => $term_id, 'term_taxonomy_id' => $tt_id);
-}
-
-/**
- * Enable or disable term counting.
- *
- * @since 2.5.0
- *
- * @staticvar bool $_defer
- *
- * @param bool $defer Optional. Enable if true, disable if false.
- * @return bool Whether term counting is enabled or disabled.
- */
-function wp_defer_term_counting($defer=null) {
-	static $_defer = false;
-
-	if ( is_bool($defer) ) {
-		$_defer = $defer;
-		// flush any deferred counts
-		if ( !$defer )
-			wp_update_term_count( null, null, true );
-	}
-
-	return $_defer;
-}
-
-/**
- * Updates the amount of terms in taxonomy.
- *
- * If there is a taxonomy callback applied, then it will be called for updating
- * the count.
- *
- * The default action is to count what the amount of terms have the relationship
- * of term ID. Once that is done, then update the database.
- *
- * @since 2.3.0
- *
- * @staticvar array $_deferred
- *
- * @param int|array $terms       The term_taxonomy_id of the terms.
- * @param string    $taxonomy    The context of the term.
- * @param bool      $do_deferred Whether to flush the deferred term counts too. Default false.
- * @return bool If no terms will return false, and if successful will return true.
- */
-function wp_update_term_count( $terms, $taxonomy, $do_deferred = false ) {
-	static $_deferred = array();
-
-	if ( $do_deferred ) {
-		foreach ( (array) array_keys($_deferred) as $tax ) {
-			wp_update_term_count_now( $_deferred[$tax], $tax );
-			unset( $_deferred[$tax] );
-		}
-	}
-
-	if ( empty($terms) )
-		return false;
-
-	if ( !is_array($terms) )
-		$terms = array($terms);
-
-	if ( wp_defer_term_counting() ) {
-		if ( !isset($_deferred[$taxonomy]) )
-			$_deferred[$taxonomy] = array();
-		$_deferred[$taxonomy] = array_unique( array_merge($_deferred[$taxonomy], $terms) );
-		return true;
-	}
-
-	return wp_update_term_count_now( $terms, $taxonomy );
-}
-
-/**
- * Perform term count update immediately.
- *
- * @since 2.5.0
- *
- * @param array  $terms    The term_taxonomy_id of terms to update.
- * @param string $taxonomy The context of the term.
- * @return true Always true when complete.
- */
-function wp_update_term_count_now( $terms, $taxonomy ) {
-	$terms = array_map('intval', $terms);
-
-	$taxonomy = get_taxonomy($taxonomy);
-	if ( !empty($taxonomy->update_count_callback) ) {
-		call_user_func($taxonomy->update_count_callback, $terms, $taxonomy);
-	} else {
-		$object_types = (array) $taxonomy->object_type;
-		foreach ( $object_types as &$object_type ) {
-			if ( 0 === strpos( $object_type, 'attachment:' ) )
-				list( $object_type ) = explode( ':', $object_type );
-		}
-
-		if ( $object_types == array_filter( $object_types, 'post_type_exists' ) ) {
-			// Only post types are attached to this taxonomy
-			_update_post_term_count( $terms, $taxonomy );
-		} else {
-			// Default count updater
-			_update_generic_term_count( $terms, $taxonomy );
-		}
-	}
-
-	clean_term_cache($terms, '', false);
-
-	return true;
-}
-
-//
-// Cache
-//
-
-/**
- * Removes the taxonomy relationship to terms from the cache.
- *
- * Will remove the entire taxonomy relationship containing term `$object_id`. The
- * term IDs have to exist within the taxonomy `$object_type` for the deletion to
- * take place.
- *
- * @since 2.3.0
- *
- * @global bool $_wp_suspend_cache_invalidation
- *
- * @see get_object_taxonomies() for more on $object_type.
- *
- * @param int|array    $object_ids  Single or list of term object ID(s).
- * @param array|string $object_type The taxonomy object type.
- */
-function clean_object_term_cache($object_ids, $object_type) {
-	global $_wp_suspend_cache_invalidation;
-
-	if ( ! empty( $_wp_suspend_cache_invalidation ) ) {
-		return;
-	}
-
-	if ( !is_array($object_ids) )
-		$object_ids = array($object_ids);
-
-	$taxonomies = get_object_taxonomies( $object_type );
-
-	foreach ( $object_ids as $id ) {
-		foreach ( $taxonomies as $taxonomy ) {
-			wp_cache_delete($id, "{$taxonomy}_relationships");
-		}
-	}
-
-	/**
-	 * Fires after the object term cache has been cleaned.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param array  $object_ids An array of object IDs.
-	 * @param string $objet_type Object type.
-	 */
-	do_action( 'clean_object_term_cache', $object_ids, $object_type );
-}
-
-/**
- * Will remove all of the term ids from the cache.
- *
- * @since 2.3.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- * @global bool $_wp_suspend_cache_invalidation
- *
- * @param int|array $ids            Single or list of Term IDs.
- * @param string    $taxonomy       Optional. Can be empty and will assume `tt_ids`, else will use for context.
- *                                  Default empty.
- * @param bool      $clean_taxonomy Optional. Whether to clean taxonomy wide caches (true), or just individual
- *                                  term object caches (false). Default true.
- */
-function clean_term_cache($ids, $taxonomy = '', $clean_taxonomy = true) {
-	global $wpdb, $_wp_suspend_cache_invalidation;
-
-	if ( ! empty( $_wp_suspend_cache_invalidation ) ) {
-		return;
-	}
-
-	if ( !is_array($ids) )
-		$ids = array($ids);
-
-	$taxonomies = array();
-	// If no taxonomy, assume tt_ids.
-	if ( empty($taxonomy) ) {
-		$tt_ids = array_map('intval', $ids);
-		$tt_ids = implode(', ', $tt_ids);
-		$terms = $wpdb->get_results("SELECT term_id, taxonomy FROM $wpdb->term_taxonomy WHERE term_taxonomy_id IN ($tt_ids)");
-		$ids = array();
-		foreach ( (array) $terms as $term ) {
-			$taxonomies[] = $term->taxonomy;
-			$ids[] = $term->term_id;
-			wp_cache_delete( $term->term_id, 'terms' );
-		}
-		$taxonomies = array_unique($taxonomies);
-	} else {
-		$taxonomies = array($taxonomy);
-		foreach ( $taxonomies as $taxonomy ) {
-			foreach ( $ids as $id ) {
-				wp_cache_delete( $id, 'terms' );
-			}
-		}
-	}
-
-	foreach ( $taxonomies as $taxonomy ) {
-		if ( $clean_taxonomy ) {
-			wp_cache_delete('all_ids', $taxonomy);
-			wp_cache_delete('get', $taxonomy);
-			delete_option("{$taxonomy}_children");
-			// Regenerate {$taxonomy}_children
-			_get_term_hierarchy($taxonomy);
-		}
-
-		/**
-		 * Fires once after each taxonomy's term cache has been cleaned.
-		 *
-		 * @since 2.5.0
-		 * @since 4.5.0 Added the `$clean_taxonomy` parameter.
-		 *
-		 * @param array  $ids            An array of term IDs.
-		 * @param string $taxonomy       Taxonomy slug.
-		 * @param bool   $clean_taxonomy Whether or not to clean taxonomy-wide caches
-		 */
-		do_action( 'clean_term_cache', $ids, $taxonomy, $clean_taxonomy );
-	}
-
-	wp_cache_set( 'last_changed', microtime(), 'terms' );
-}
-
-/**
- * Retrieves the taxonomy relationship to the term object id.
- *
- * Upstream functions (like get_the_terms() and is_object_in_term()) are
- * responsible for populating the object-term relationship cache. The current
- * function only fetches relationship data that is already in the cache.
- *
- * @since 2.3.0
- *
- * @param int    $id       Term object ID.
- * @param string $taxonomy Taxonomy name.
- * @return bool|array Array of `WP_Term` objects, if cached False if cache is empty for `$taxonomy` and `$id`.
- */
-function get_object_term_cache( $id, $taxonomy ) {
-	$_term_ids = wp_cache_get( $id, "{$taxonomy}_relationships" );
-
-	// We leave the priming of relationship caches to upstream functions.
-	if ( false === $_term_ids ) {
-		return false;
-	}
-
-	// Backward compatibility for if a plugin is putting objects into the cache, rather than IDs.
-	$term_ids = array();
-	foreach ( $_term_ids as $term_id ) {
-		if ( is_numeric( $term_id ) ) {
-			$term_ids[] = intval( $term_id );
-		} elseif ( isset( $term_id->term_id ) ) {
-			$term_ids[] = intval( $term_id->term_id );
-		}
-	}
-
-	// Fill the term objects.
-	_prime_term_caches( $term_ids );
-
-	$terms = array();
-	foreach ( $term_ids as $term_id ) {
-		$terms[] = wp_cache_get( $term_id, 'terms' );
-	}
-
-	return array_map( 'get_term', $terms );
-}
-
-/**
- * Updates the cache for the given term object ID(s).
- *
- * Note: Due to performance concerns, great care should be taken to only update
- * term caches when necessary. Processing time can increase exponentially depending
- * on both the number of passed term IDs and the number of taxonomies those terms
- * belong to.
- *
- * Caches will only be updated for terms not already cached.
- *
- * @since 2.3.0
- *
- * @param string|array $object_ids  Comma-separated list or array of term object IDs.
- * @param array|string $object_type The taxonomy object type.
- * @return void|false False if all of the terms in `$object_ids` are already cached.
- */
-function update_object_term_cache($object_ids, $object_type) {
-	if ( empty($object_ids) )
-		return;
-
-	if ( !is_array($object_ids) )
-		$object_ids = explode(',', $object_ids);
-
-	$object_ids = array_map('intval', $object_ids);
-
-	$taxonomies = get_object_taxonomies($object_type);
-
-	$ids = array();
-	foreach ( (array) $object_ids as $id ) {
-		foreach ( $taxonomies as $taxonomy ) {
-			if ( false === wp_cache_get($id, "{$taxonomy}_relationships") ) {
-				$ids[] = $id;
-				break;
-			}
-		}
-	}
-
-	if ( empty( $ids ) )
-		return false;
-
-	$terms = wp_get_object_terms( $ids, $taxonomies, array(
-		'fields' => 'all_with_object_id',
-		'orderby' => 'name',
-		'update_term_meta_cache' => false,
-	) );
-
-	$object_terms = array();
-	foreach ( (array) $terms as $term ) {
-		$object_terms[ $term->object_id ][ $term->taxonomy ][] = $term->term_id;
-	}
-
-	foreach ( $ids as $id ) {
-		foreach ( $taxonomies as $taxonomy ) {
-			if ( ! isset($object_terms[$id][$taxonomy]) ) {
-				if ( !isset($object_terms[$id]) )
-					$object_terms[$id] = array();
-				$object_terms[$id][$taxonomy] = array();
-			}
-		}
-	}
-
-	foreach ( $object_terms as $id => $value ) {
-		foreach ( $value as $taxonomy => $terms ) {
-			wp_cache_add( $id, $terms, "{$taxonomy}_relationships" );
-		}
-	}
-}
-
-/**
- * Updates Terms to Taxonomy in cache.
- *
- * @since 2.3.0
- *
- * @param array  $terms    List of term objects to change.
- * @param string $taxonomy Optional. Update Term to this taxonomy in cache. Default empty.
- */
-function update_term_cache( $terms, $taxonomy = '' ) {
-	foreach ( (array) $terms as $term ) {
-		// Create a copy in case the array was passed by reference.
-		$_term = clone $term;
-
-		// Object ID should not be cached.
-		unset( $_term->object_id );
-
-		wp_cache_add( $term->term_id, $_term, 'terms' );
-	}
-}
-
-//
-// Private
-//
-
-/**
- * Retrieves children of taxonomy as Term IDs.
- *
- * @ignore
- * @since 2.3.0
- *
- * @param string $taxonomy Taxonomy name.
- * @return array Empty if $taxonomy isn't hierarchical or returns children as Term IDs.
- */
-function _get_term_hierarchy( $taxonomy ) {
-	if ( !is_taxonomy_hierarchical($taxonomy) )
-		return array();
-	$children = get_option("{$taxonomy}_children");
-
-	if ( is_array($children) )
-		return $children;
-	$children = array();
-	$terms = get_terms($taxonomy, array('get' => 'all', 'orderby' => 'id', 'fields' => 'id=>parent'));
-	foreach ( $terms as $term_id => $parent ) {
-		if ( $parent > 0 )
-			$children[$parent][] = $term_id;
-	}
-	update_option("{$taxonomy}_children", $children);
-
-	return $children;
-}
-
-/**
- * Get the subset of $terms that are descendants of $term_id.
- *
- * If `$terms` is an array of objects, then _get_term_children() returns an array of objects.
- * If `$terms` is an array of IDs, then _get_term_children() returns an array of IDs.
- *
- * @access private
- * @since 2.3.0
- *
- * @param int    $term_id   The ancestor term: all returned terms should be descendants of `$term_id`.
- * @param array  $terms     The set of terms - either an array of term objects or term IDs - from which those that
- *                          are descendants of $term_id will be chosen.
- * @param string $taxonomy  The taxonomy which determines the hierarchy of the terms.
- * @param array  $ancestors Optional. Term ancestors that have already been identified. Passed by reference, to keep
- *                          track of found terms when recursing the hierarchy. The array of located ancestors is used
- *                          to prevent infinite recursion loops. For performance, `term_ids` are used as array keys,
- *                          with 1 as value. Default empty array.
- * @return array|WP_Error The subset of $terms that are descendants of $term_id.
- */
-function _get_term_children( $term_id, $terms, $taxonomy, &$ancestors = array() ) {
-	$empty_array = array();
-	if ( empty($terms) )
-		return $empty_array;
-
-	$term_list = array();
-	$has_children = _get_term_hierarchy($taxonomy);
-
-	if  ( ( 0 != $term_id ) && ! isset($has_children[$term_id]) )
-		return $empty_array;
-
-	// Include the term itself in the ancestors array, so we can properly detect when a loop has occurred.
-	if ( empty( $ancestors ) ) {
-		$ancestors[ $term_id ] = 1;
-	}
-
-	foreach ( (array) $terms as $term ) {
-		$use_id = false;
-		if ( !is_object($term) ) {
-			$term = get_term($term, $taxonomy);
-			if ( is_wp_error( $term ) )
-				return $term;
-			$use_id = true;
-		}
-
-		// Don't recurse if we've already identified the term as a child - this indicates a loop.
-		if ( isset( $ancestors[ $term->term_id ] ) ) {
-			continue;
-		}
-
-		if ( $term->parent == $term_id ) {
-			if ( $use_id )
-				$term_list[] = $term->term_id;
-			else
-				$term_list[] = $term;
-
-			if ( !isset($has_children[$term->term_id]) )
-				continue;
-
-			$ancestors[ $term->term_id ] = 1;
-
-			if ( $children = _get_term_children( $term->term_id, $terms, $taxonomy, $ancestors) )
-				$term_list = array_merge($term_list, $children);
-		}
-	}
-
-	return $term_list;
-}
-
-/**
- * Add count of children to parent count.
- *
- * Recalculates term counts by including items from child terms. Assumes all
- * relevant children are already in the $terms argument.
- *
- * @access private
- * @since 2.3.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param array  $terms    List of term objects, passed by reference.
- * @param string $taxonomy Term context.
- */
-function _pad_term_counts( &$terms, $taxonomy ) {
-	global $wpdb;
-
-	// This function only works for hierarchical taxonomies like post categories.
-	if ( !is_taxonomy_hierarchical( $taxonomy ) )
-		return;
-
-	$term_hier = _get_term_hierarchy($taxonomy);
-
-	if ( empty($term_hier) )
-		return;
-
-	$term_items = array();
-	$terms_by_id = array();
-	$term_ids = array();
-
-	foreach ( (array) $terms as $key => $term ) {
-		$terms_by_id[$term->term_id] = & $terms[$key];
-		$term_ids[$term->term_taxonomy_id] = $term->term_id;
-	}
-
-	// Get the object and term ids and stick them in a lookup table.
-	$tax_obj = get_taxonomy($taxonomy);
-	$object_types = esc_sql($tax_obj->object_type);
-	$results = $wpdb->get_results("SELECT object_id, term_taxonomy_id FROM $wpdb->term_relationships INNER JOIN $wpdb->posts ON object_id = ID WHERE term_taxonomy_id IN (" . implode(',', array_keys($term_ids)) . ") AND post_type IN ('" . implode("', '", $object_types) . "') AND post_status = 'publish'");
-	foreach ( $results as $row ) {
-		$id = $term_ids[$row->term_taxonomy_id];
-		$term_items[$id][$row->object_id] = isset($term_items[$id][$row->object_id]) ? ++$term_items[$id][$row->object_id] : 1;
-	}
-
-	// Touch every ancestor's lookup row for each post in each term.
-	foreach ( $term_ids as $term_id ) {
-		$child = $term_id;
-		$ancestors = array();
-		while ( !empty( $terms_by_id[$child] ) && $parent = $terms_by_id[$child]->parent ) {
-			$ancestors[] = $child;
-			if ( !empty( $term_items[$term_id] ) )
-				foreach ( $term_items[$term_id] as $item_id => $touches ) {
-					$term_items[$parent][$item_id] = isset($term_items[$parent][$item_id]) ? ++$term_items[$parent][$item_id]: 1;
-				}
-			$child = $parent;
-
-			if ( in_array( $parent, $ancestors ) ) {
-				break;
-			}
-		}
-	}
-
-	// Transfer the touched cells.
-	foreach ( (array) $term_items as $id => $items )
-		if ( isset($terms_by_id[$id]) )
-			$terms_by_id[$id]->count = count($items);
-}
-
-/**
- * Adds any terms from the given IDs to the cache that do not already exist in cache.
- *
- * @since 4.6.0
- * @access private
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param array $term_ids          Array of term IDs.
- * @param bool  $update_meta_cache Optional. Whether to update the meta cache. Default true.
- */
-function _prime_term_caches( $term_ids, $update_meta_cache = true ) {
-	global $wpdb;
-
-	$non_cached_ids = _get_non_cached_ids( $term_ids, 'terms' );
-	if ( ! empty( $non_cached_ids ) ) {
-		$fresh_terms = $wpdb->get_results( sprintf( "SELECT t.*, tt.* FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE t.term_id IN (%s)", join( ",", array_map( 'intval', $non_cached_ids ) ) ) );
-
-		update_term_cache( $fresh_terms, $update_meta_cache );
-
-		if ( $update_meta_cache ) {
-			update_termmeta_cache( $non_cached_ids );
-		}
-	}
-}
-
-//
-// Default callbacks
-//
-
-/**
- * Will update term count based on object types of the current taxonomy.
- *
- * Private function for the default callback for post_tag and category
- * taxonomies.
- *
- * @access private
- * @since 2.3.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param array  $terms    List of Term taxonomy IDs.
- * @param object $taxonomy Current taxonomy object of terms.
- */
-function _update_post_term_count( $terms, $taxonomy ) {
-	global $wpdb;
-
-	$object_types = (array) $taxonomy->object_type;
-
-	foreach ( $object_types as &$object_type )
-		list( $object_type ) = explode( ':', $object_type );
-
-	$object_types = array_unique( $object_types );
-
-	if ( false !== ( $check_attachments = array_search( 'attachment', $object_types ) ) ) {
-		unset( $object_types[ $check_attachments ] );
-		$check_attachments = true;
-	}
-
-	if ( $object_types )
-		$object_types = esc_sql( array_filter( $object_types, 'post_type_exists' ) );
-
-	foreach ( (array) $terms as $term ) {
-		$count = 0;
-
-		// Attachments can be 'inherit' status, we need to base count off the parent's status if so.
-		if ( $check_attachments )
-			$count += (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_relationships, $wpdb->posts p1 WHERE p1.ID = $wpdb->term_relationships.object_id AND ( post_status = 'publish' OR ( post_status = 'inherit' AND post_parent > 0 AND ( SELECT post_status FROM $wpdb->posts WHERE ID = p1.post_parent ) = 'publish' ) ) AND post_type = 'attachment' AND term_taxonomy_id = %d", $term ) );
-
-		if ( $object_types )
-			$count += (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_relationships, $wpdb->posts WHERE $wpdb->posts.ID = $wpdb->term_relationships.object_id AND post_status = 'publish' AND post_type IN ('" . implode("', '", $object_types ) . "') AND term_taxonomy_id = %d", $term ) );
-
-		/** This action is documented in wp-includes/taxonomy.php */
-		do_action( 'edit_term_taxonomy', $term, $taxonomy->name );
-		$wpdb->update( $wpdb->term_taxonomy, compact( 'count' ), array( 'term_taxonomy_id' => $term ) );
-
-		/** This action is documented in wp-includes/taxonomy.php */
-		do_action( 'edited_term_taxonomy', $term, $taxonomy->name );
-	}
-}
-
-/**
- * Will update term count based on number of objects.
- *
- * Default callback for the 'link_category' taxonomy.
- *
- * @since 3.3.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param array  $terms    List of term taxonomy IDs.
- * @param object $taxonomy Current taxonomy object of terms.
- */
-function _update_generic_term_count( $terms, $taxonomy ) {
-	global $wpdb;
-
-	foreach ( (array) $terms as $term ) {
-		$count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d", $term ) );
-
-		/** This action is documented in wp-includes/taxonomy.php */
-		do_action( 'edit_term_taxonomy', $term, $taxonomy->name );
-		$wpdb->update( $wpdb->term_taxonomy, compact( 'count' ), array( 'term_taxonomy_id' => $term ) );
-
-		/** This action is documented in wp-includes/taxonomy.php */
-		do_action( 'edited_term_taxonomy', $term, $taxonomy->name );
-	}
-}
-
-/**
- * Create a new term for a term_taxonomy item that currently shares its term
- * with another term_taxonomy.
- *
- * @ignore
- * @since 4.2.0
- * @since 4.3.0 Introduced `$record` parameter. Also, `$term_id` and
- *              `$term_taxonomy_id` can now accept objects.
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int|object $term_id          ID of the shared term, or the shared term object.
- * @param int|object $term_taxonomy_id ID of the term_taxonomy item to receive a new term, or the term_taxonomy object
- *                                     (corresponding to a row from the term_taxonomy table).
- * @param bool       $record           Whether to record data about the split term in the options table. The recording
- *                                     process has the potential to be resource-intensive, so during batch operations
- *                                     it can be beneficial to skip inline recording and do it just once, after the
- *                                     batch is processed. Only set this to `false` if you know what you are doing.
- *                                     Default: true.
- * @return int|WP_Error When the current term does not need to be split (or cannot be split on the current
- *                      database schema), `$term_id` is returned. When the term is successfully split, the
- *                      new term_id is returned. A WP_Error is returned for miscellaneous errors.
- */
-function _split_shared_term( $term_id, $term_taxonomy_id, $record = true ) {
-	global $wpdb;
-
-	if ( is_object( $term_id ) ) {
-		$shared_term = $term_id;
-		$term_id = intval( $shared_term->term_id );
-	}
-
-	if ( is_object( $term_taxonomy_id ) ) {
-		$term_taxonomy = $term_taxonomy_id;
-		$term_taxonomy_id = intval( $term_taxonomy->term_taxonomy_id );
-	}
-
-	// If there are no shared term_taxonomy rows, there's nothing to do here.
-	$shared_tt_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_taxonomy tt WHERE tt.term_id = %d AND tt.term_taxonomy_id != %d", $term_id, $term_taxonomy_id ) );
-
-	if ( ! $shared_tt_count ) {
-		return $term_id;
-	}
-
-	/*
-	 * Verify that the term_taxonomy_id passed to the function is actually associated with the term_id.
-	 * If there's a mismatch, it may mean that the term is already split. Return the actual term_id from the db.
-	 */
-	$check_term_id = $wpdb->get_var( $wpdb->prepare( "SELECT term_id FROM $wpdb->term_taxonomy WHERE term_taxonomy_id = %d", $term_taxonomy_id ) );
-	if ( $check_term_id != $term_id ) {
-		return $check_term_id;
-	}
-
-	// Pull up data about the currently shared slug, which we'll use to populate the new one.
-	if ( empty( $shared_term ) ) {
-		$shared_term = $wpdb->get_row( $wpdb->prepare( "SELECT t.* FROM $wpdb->terms t WHERE t.term_id = %d", $term_id ) );
-	}
-
-	$new_term_data = array(
-		'name' => $shared_term->name,
-		'slug' => $shared_term->slug,
-		'term_group' => $shared_term->term_group,
-	);
-
-	if ( false === $wpdb->insert( $wpdb->terms, $new_term_data ) ) {
-		return new WP_Error( 'db_insert_error', __( 'Could not split shared term.' ), $wpdb->last_error );
-	}
-
-	$new_term_id = (int) $wpdb->insert_id;
-
-	// Update the existing term_taxonomy to point to the newly created term.
-	$wpdb->update( $wpdb->term_taxonomy,
-		array( 'term_id' => $new_term_id ),
-		array( 'term_taxonomy_id' => $term_taxonomy_id )
-	);
-
-	// Reassign child terms to the new parent.
-	if ( empty( $term_taxonomy ) ) {
-		$term_taxonomy = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->term_taxonomy WHERE term_taxonomy_id = %d", $term_taxonomy_id ) );
-	}
-
-	$children_tt_ids = $wpdb->get_col( $wpdb->prepare( "SELECT term_taxonomy_id FROM $wpdb->term_taxonomy WHERE parent = %d AND taxonomy = %s", $term_id, $term_taxonomy->taxonomy ) );
-	if ( ! empty( $children_tt_ids ) ) {
-		foreach ( $children_tt_ids as $child_tt_id ) {
-			$wpdb->update( $wpdb->term_taxonomy,
-				array( 'parent' => $new_term_id ),
-				array( 'term_taxonomy_id' => $child_tt_id )
-			);
-			clean_term_cache( $term_id, $term_taxonomy->taxonomy );
-		}
-	} else {
-		// If the term has no children, we must force its taxonomy cache to be rebuilt separately.
-		clean_term_cache( $new_term_id, $term_taxonomy->taxonomy );
-	}
-
-	// Clean the cache for term taxonomies formerly shared with the current term.
-	$shared_term_taxonomies = $wpdb->get_row( $wpdb->prepare( "SELECT taxonomy FROM $wpdb->term_taxonomy WHERE term_id = %d", $term_id ) );
-	if ( $shared_term_taxonomies ) {
-		foreach ( $shared_term_taxonomies as $shared_term_taxonomy ) {
-			clean_term_cache( $term_id, $shared_term_taxonomy );
-		}
-	}
-
-	// Keep a record of term_ids that have been split, keyed by old term_id. See wp_get_split_term().
-	if ( $record ) {
-		$split_term_data = get_option( '_split_terms', array() );
-		if ( ! isset( $split_term_data[ $term_id ] ) ) {
-			$split_term_data[ $term_id ] = array();
-		}
-
-		$split_term_data[ $term_id ][ $term_taxonomy->taxonomy ] = $new_term_id;
-		update_option( '_split_terms', $split_term_data );
-	}
-
-	// If we've just split the final shared term, set the "finished" flag.
-	$shared_terms_exist = $wpdb->get_results(
-		"SELECT tt.term_id, t.*, count(*) as term_tt_count FROM {$wpdb->term_taxonomy} tt
-		 LEFT JOIN {$wpdb->terms} t ON t.term_id = tt.term_id
-		 GROUP BY t.term_id
-		 HAVING term_tt_count > 1
-		 LIMIT 1"
-	);
-	if ( ! $shared_terms_exist ) {
-		update_option( 'finished_splitting_shared_terms', true );
-	}
-
-	/**
-	 * Fires after a previously shared taxonomy term is split into two separate terms.
-	 *
-	 * @since 4.2.0
-	 *
-	 * @param int    $term_id          ID of the formerly shared term.
-	 * @param int    $new_term_id      ID of the new term created for the $term_taxonomy_id.
-	 * @param int    $term_taxonomy_id ID for the term_taxonomy row affected by the split.
-	 * @param string $taxonomy         Taxonomy for the split term.
-	 */
-	do_action( 'split_shared_term', $term_id, $new_term_id, $term_taxonomy_id, $term_taxonomy->taxonomy );
-
-	return $new_term_id;
-}
-
-/**
- * Splits a batch of shared taxonomy terms.
- *
- * @since 4.3.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- */
-function _wp_batch_split_terms() {
-	global $wpdb;
-
-	$lock_name = 'term_split.lock';
-
-	// Try to lock.
-	$lock_result = $wpdb->query( $wpdb->prepare( "INSERT IGNORE INTO `$wpdb->options` ( `option_name`, `option_value`, `autoload` ) VALUES (%s, %s, 'no') /* LOCK */", $lock_name, time() ) );
-
-	if ( ! $lock_result ) {
-		$lock_result = get_option( $lock_name );
-
-		// Bail if we were unable to create a lock, or if the existing lock is still valid.
-		if ( ! $lock_result || ( $lock_result > ( time() - HOUR_IN_SECONDS ) ) ) {
-			wp_schedule_single_event( time() + ( 5 * MINUTE_IN_SECONDS ), 'wp_split_shared_term_batch' );
-			return;
-		}
-	}
-
-	// Update the lock, as by this point we've definitely got a lock, just need to fire the actions.
-	update_option( $lock_name, time() );
-
-	// Get a list of shared terms (those with more than one associated row in term_taxonomy).
-	$shared_terms = $wpdb->get_results(
-		"SELECT tt.term_id, t.*, count(*) as term_tt_count FROM {$wpdb->term_taxonomy} tt
-		 LEFT JOIN {$wpdb->terms} t ON t.term_id = tt.term_id
-		 GROUP BY t.term_id
-		 HAVING term_tt_count > 1
-		 LIMIT 10"
-	);
-
-	// No more terms, we're done here.
-	if ( ! $shared_terms ) {
-		update_option( 'finished_splitting_shared_terms', true );
-		delete_option( $lock_name );
-		return;
-	}
-
-	// Shared terms found? We'll need to run this script again.
-	wp_schedule_single_event( time() + ( 2 * MINUTE_IN_SECONDS ), 'wp_split_shared_term_batch' );
-
-	// Rekey shared term array for faster lookups.
-	$_shared_terms = array();
-	foreach ( $shared_terms as $shared_term ) {
-		$term_id = intval( $shared_term->term_id );
-		$_shared_terms[ $term_id ] = $shared_term;
-	}
-	$shared_terms = $_shared_terms;
-
-	// Get term taxonomy data for all shared terms.
-	$shared_term_ids = implode( ',', array_keys( $shared_terms ) );
-	$shared_tts = $wpdb->get_results( "SELECT * FROM {$wpdb->term_taxonomy} WHERE `term_id` IN ({$shared_term_ids})" );
-
-	// Split term data recording is slow, so we do it just once, outside the loop.
-	$split_term_data = get_option( '_split_terms', array() );
-	$skipped_first_term = $taxonomies = array();
-	foreach ( $shared_tts as $shared_tt ) {
-		$term_id = intval( $shared_tt->term_id );
-
-		// Don't split the first tt belonging to a given term_id.
-		if ( ! isset( $skipped_first_term[ $term_id ] ) ) {
-			$skipped_first_term[ $term_id ] = 1;
-			continue;
-		}
-
-		if ( ! isset( $split_term_data[ $term_id ] ) ) {
-			$split_term_data[ $term_id ] = array();
-		}
-
-		// Keep track of taxonomies whose hierarchies need flushing.
-		if ( ! isset( $taxonomies[ $shared_tt->taxonomy ] ) ) {
-			$taxonomies[ $shared_tt->taxonomy ] = 1;
-		}
-
-		// Split the term.
-		$split_term_data[ $term_id ][ $shared_tt->taxonomy ] = _split_shared_term( $shared_terms[ $term_id ], $shared_tt, false );
-	}
-
-	// Rebuild the cached hierarchy for each affected taxonomy.
-	foreach ( array_keys( $taxonomies ) as $tax ) {
-		delete_option( "{$tax}_children" );
-		_get_term_hierarchy( $tax );
-	}
-
-	update_option( '_split_terms', $split_term_data );
-
-	delete_option( $lock_name );
-}
-
-/**
- * In order to avoid the _wp_batch_split_terms() job being accidentally removed,
- * check that it's still scheduled while we haven't finished splitting terms.
- *
- * @ignore
- * @since 4.3.0
- */
-function _wp_check_for_scheduled_split_terms() {
-	if ( ! get_option( 'finished_splitting_shared_terms' ) && ! wp_next_scheduled( 'wp_split_shared_term_batch' ) ) {
-		wp_schedule_single_event( time() + MINUTE_IN_SECONDS, 'wp_split_shared_term_batch' );
-	}
-}
-
-/**
- * Check default categories when a term gets split to see if any of them need to be updated.
- *
- * @ignore
- * @since 4.2.0
- *
- * @param int    $term_id          ID of the formerly shared term.
- * @param int    $new_term_id      ID of the new term created for the $term_taxonomy_id.
- * @param int    $term_taxonomy_id ID for the term_taxonomy row affected by the split.
- * @param string $taxonomy         Taxonomy for the split term.
- */
-function _wp_check_split_default_terms( $term_id, $new_term_id, $term_taxonomy_id, $taxonomy ) {
-	if ( 'category' != $taxonomy ) {
-		return;
-	}
-
-	foreach ( array( 'default_category', 'default_link_category', 'default_email_category' ) as $option ) {
-		if ( $term_id == get_option( $option, -1 ) ) {
-			update_option( $option, $new_term_id );
-		}
-	}
-}
-
-/**
- * Check menu items when a term gets split to see if any of them need to be updated.
- *
- * @ignore
- * @since 4.2.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int    $term_id          ID of the formerly shared term.
- * @param int    $new_term_id      ID of the new term created for the $term_taxonomy_id.
- * @param int    $term_taxonomy_id ID for the term_taxonomy row affected by the split.
- * @param string $taxonomy         Taxonomy for the split term.
- */
-function _wp_check_split_terms_in_menus( $term_id, $new_term_id, $term_taxonomy_id, $taxonomy ) {
-	global $wpdb;
-	$post_ids = $wpdb->get_col( $wpdb->prepare(
-		"SELECT m1.post_id
-		FROM {$wpdb->postmeta} AS m1
-			INNER JOIN {$wpdb->postmeta} AS m2 ON ( m2.post_id = m1.post_id )
-			INNER JOIN {$wpdb->postmeta} AS m3 ON ( m3.post_id = m1.post_id )
-		WHERE ( m1.meta_key = '_menu_item_type' AND m1.meta_value = 'taxonomy' )
-			AND ( m2.meta_key = '_menu_item_object' AND m2.meta_value = '%s' )
-			AND ( m3.meta_key = '_menu_item_object_id' AND m3.meta_value = %d )",
-		$taxonomy,
-		$term_id
-	) );
-
-	if ( $post_ids ) {
-		foreach ( $post_ids as $post_id ) {
-			update_post_meta( $post_id, '_menu_item_object_id', $new_term_id, $term_id );
-		}
-	}
-}
-
-/**
- * If the term being split is a nav_menu, change associations.
- *
- * @ignore
- * @since 4.3.0
- *
- * @param int    $term_id          ID of the formerly shared term.
- * @param int    $new_term_id      ID of the new term created for the $term_taxonomy_id.
- * @param int    $term_taxonomy_id ID for the term_taxonomy row affected by the split.
- * @param string $taxonomy         Taxonomy for the split term.
- */
-function _wp_check_split_nav_menu_terms( $term_id, $new_term_id, $term_taxonomy_id, $taxonomy ) {
-	if ( 'nav_menu' !== $taxonomy ) {
-		return;
-	}
-
-	// Update menu locations.
-	$locations = get_nav_menu_locations();
-	foreach ( $locations as $location => $menu_id ) {
-		if ( $term_id == $menu_id ) {
-			$locations[ $location ] = $new_term_id;
-		}
-	}
-	set_theme_mod( 'nav_menu_locations', $locations );
-}
-
-/**
- * Get data about terms that previously shared a single term_id, but have since been split.
- *
- * @since 4.2.0
- *
- * @param int $old_term_id Term ID. This is the old, pre-split term ID.
- * @return array Array of new term IDs, keyed by taxonomy.
- */
-function wp_get_split_terms( $old_term_id ) {
-	$split_terms = get_option( '_split_terms', array() );
-
-	$terms = array();
-	if ( isset( $split_terms[ $old_term_id ] ) ) {
-		$terms = $split_terms[ $old_term_id ];
-	}
-
-	return $terms;
-}
-
-/**
- * Get the new term ID corresponding to a previously split term.
- *
- * @since 4.2.0
- *
- * @param int    $old_term_id Term ID. This is the old, pre-split term ID.
- * @param string $taxonomy    Taxonomy that the term belongs to.
- * @return int|false If a previously split term is found corresponding to the old term_id and taxonomy,
- *                   the new term_id will be returned. If no previously split term is found matching
- *                   the parameters, returns false.
- */
-function wp_get_split_term( $old_term_id, $taxonomy ) {
-	$split_terms = wp_get_split_terms( $old_term_id );
-
-	$term_id = false;
-	if ( isset( $split_terms[ $taxonomy ] ) ) {
-		$term_id = (int) $split_terms[ $taxonomy ];
-	}
-
-	return $term_id;
-}
-
-/**
- * Determine whether a term is shared between multiple taxonomies.
- *
- * Shared taxonomy terms began to be split in 4.3, but failed cron tasks or other delays in upgrade routines may cause
- * shared terms to remain.
- *
- * @since 4.4.0
- *
- * @param int $term_id
- * @return bool
- */
-function wp_term_is_shared( $term_id ) {
-	global $wpdb;
-
-	if ( get_option( 'finished_splitting_shared_terms' ) ) {
-		return false;
-	}
-
-	$tt_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_taxonomy WHERE term_id = %d", $term_id ) );
-
-	return $tt_count > 1;
-}
-
-/**
- * Generate a permalink for a taxonomy term archive.
- *
- * @since 2.5.0
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param object|int|string $term     The term object, ID, or slug whose link will be retrieved.
- * @param string            $taxonomy Optional. Taxonomy. Default empty.
- * @return string|WP_Error HTML link to taxonomy term archive on success, WP_Error if term does not exist.
- */
-function get_term_link( $term, $taxonomy = '' ) {
-	global $wp_rewrite;
-
-	if ( !is_object($term) ) {
-		if ( is_int( $term ) ) {
-			$term = get_term( $term, $taxonomy );
-		} else {
-			$term = get_term_by( 'slug', $term, $taxonomy );
-		}
-	}
-
-	if ( !is_object($term) )
-		$term = new WP_Error('invalid_term', __('Empty Term'));
-
-	if ( is_wp_error( $term ) )
-		return $term;
-
-	$taxonomy = $term->taxonomy;
-
-	$termlink = $wp_rewrite->get_extra_permastruct($taxonomy);
-
-	$slug = $term->slug;
-	$t = get_taxonomy($taxonomy);
-
-	if ( empty($termlink) ) {
-		if ( 'category' == $taxonomy )
-			$termlink = '?cat=' . $term->term_id;
-		elseif ( $t->query_var )
-			$termlink = "?$t->query_var=$slug";
-		else
-			$termlink = "?taxonomy=$taxonomy&term=$slug";
-		$termlink = home_url($termlink);
-	} else {
-		if ( $t->rewrite['hierarchical'] ) {
-			$hierarchical_slugs = array();
-			$ancestors = get_ancestors( $term->term_id, $taxonomy, 'taxonomy' );
-			foreach ( (array)$ancestors as $ancestor ) {
-				$ancestor_term = get_term($ancestor, $taxonomy);
-				$hierarchical_slugs[] = $ancestor_term->slug;
-			}
-			$hierarchical_slugs = array_reverse($hierarchical_slugs);
-			$hierarchical_slugs[] = $slug;
-			$termlink = str_replace("%$taxonomy%", implode('/', $hierarchical_slugs), $termlink);
-		} else {
-			$termlink = str_replace("%$taxonomy%", $slug, $termlink);
-		}
-		$termlink = home_url( user_trailingslashit($termlink, 'category') );
-	}
-	// Back Compat filters.
-	if ( 'post_tag' == $taxonomy ) {
-
-		/**
-		 * Filters the tag link.
-		 *
-		 * @since 2.3.0
-		 * @deprecated 2.5.0 Use 'term_link' instead.
-		 *
-		 * @param string $termlink Tag link URL.
-		 * @param int    $term_id  Term ID.
-		 */
-		$termlink = apply_filters( 'tag_link', $termlink, $term->term_id );
-	} elseif ( 'category' == $taxonomy ) {
-
-		/**
-		 * Filters the category link.
-		 *
-		 * @since 1.5.0
-		 * @deprecated 2.5.0 Use 'term_link' instead.
-		 *
-		 * @param string $termlink Category link URL.
-		 * @param int    $term_id  Term ID.
-		 */
-		$termlink = apply_filters( 'category_link', $termlink, $term->term_id );
-	}
-
-	/**
-	 * Filters the term link.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param string $termlink Term link URL.
-	 * @param object $term     Term object.
-	 * @param string $taxonomy Taxonomy slug.
-	 */
-	return apply_filters( 'term_link', $termlink, $term, $taxonomy );
-}
-
-/**
- * Display the taxonomies of a post with available options.
- *
- * This function can be used within the loop to display the taxonomies for a
- * post without specifying the Post ID. You can also use it outside the Loop to
- * display the taxonomies for a specific post.
- *
- * @since 2.5.0
- *
- * @param array $args {
- *     Arguments about which post to use and how to format the output. Shares all of the arguments
- *     supported by get_the_taxonomies(), in addition to the following.
- *
- *     @type  int|WP_Post $post   Post ID or object to get taxonomies of. Default current post.
- *     @type  string      $before Displays before the taxonomies. Default empty string.
- *     @type  string      $sep    Separates each taxonomy. Default is a space.
- *     @type  string      $after  Displays after the taxonomies. Default empty string.
- * }
- */
-function the_taxonomies( $args = array() ) {
-	$defaults = array(
-		'post' => 0,
-		'before' => '',
-		'sep' => ' ',
-		'after' => '',
-	);
-
-	$r = wp_parse_args( $args, $defaults );
-
-	echo $r['before'] . join( $r['sep'], get_the_taxonomies( $r['post'], $r ) ) . $r['after'];
-}
-
-/**
- * Retrieve all taxonomies associated with a post.
- *
- * This function can be used within the loop. It will also return an array of
- * the taxonomies with links to the taxonomy and name.
- *
- * @since 2.5.0
- *
- * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
- * @param array $args {
- *     Optional. Arguments about how to format the list of taxonomies. Default empty array.
- *
- *     @type string $template      Template for displaying a taxonomy label and list of terms.
- *                                 Default is "Label: Terms."
- *     @type string $term_template Template for displaying a single term in the list. Default is the term name
- *                                 linked to its archive.
- * }
- * @return array List of taxonomies.
- */
-function get_the_taxonomies( $post = 0, $args = array() ) {
-	$post = get_post( $post );
-
-	$args = wp_parse_args( $args, array(
-		/* translators: %s: taxonomy label, %l: list of terms formatted as per $term_template */
-		'template' => __( '%s: %l.' ),
-		'term_template' => '<a href="%1$s">%2$s</a>',
-	) );
-
-	$taxonomies = array();
-
-	if ( ! $post ) {
-		return $taxonomies;
-	}
-
-	foreach ( get_object_taxonomies( $post ) as $taxonomy ) {
-		$t = (array) get_taxonomy( $taxonomy );
-		if ( empty( $t['label'] ) ) {
-			$t['label'] = $taxonomy;
-		}
-		if ( empty( $t['args'] ) ) {
-			$t['args'] = array();
-		}
-		if ( empty( $t['template'] ) ) {
-			$t['template'] = $args['template'];
-		}
-		if ( empty( $t['term_template'] ) ) {
-			$t['term_template'] = $args['term_template'];
-		}
-
-		$terms = get_object_term_cache( $post->ID, $taxonomy );
-		if ( false === $terms ) {
-			$terms = wp_get_object_terms( $post->ID, $taxonomy, $t['args'] );
-		}
-		$links = array();
-
-		foreach ( $terms as $term ) {
-			$links[] = wp_sprintf( $t['term_template'], esc_attr( get_term_link( $term ) ), $term->name );
-		}
-		if ( $links ) {
-			$taxonomies[$taxonomy] = wp_sprintf( $t['template'], $t['label'], $links, $terms );
-		}
-	}
-	return $taxonomies;
-}
-
-/**
- * Retrieve all taxonomies of a post with just the names.
- *
- * @since 2.5.0
- *
- * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
- * @return array
- */
-function get_post_taxonomies( $post = 0 ) {
-	$post = get_post( $post );
-
-	return get_object_taxonomies($post);
-}
-
-/**
- * Determine if the given object is associated with any of the given terms.
- *
- * The given terms are checked against the object's terms' term_ids, names and slugs.
- * Terms given as integers will only be checked against the object's terms' term_ids.
- * If no terms are given, determines if object is associated with any terms in the given taxonomy.
- *
- * @since 2.7.0
- *
- * @param int              $object_id ID of the object (post ID, link ID, ...).
- * @param string           $taxonomy  Single taxonomy name.
- * @param int|string|array $terms     Optional. Term term_id, name, slug or array of said. Default null.
- * @return bool|WP_Error WP_Error on input error.
- */
-function is_object_in_term( $object_id, $taxonomy, $terms = null ) {
-	if ( !$object_id = (int) $object_id )
-		return new WP_Error( 'invalid_object', __( 'Invalid object ID' ) );
-
-	$object_terms = get_object_term_cache( $object_id, $taxonomy );
-	if ( false === $object_terms ) {
-		$object_terms = wp_get_object_terms( $object_id, $taxonomy, array( 'update_term_meta_cache' => false ) );
-		if ( is_wp_error( $object_terms ) ) {
-			return $object_terms;
-		}
-
-		wp_cache_set( $object_id, wp_list_pluck( $object_terms, 'term_id' ), "{$taxonomy}_relationships" );
-	}
-
-	if ( is_wp_error( $object_terms ) )
-		return $object_terms;
-	if ( empty( $object_terms ) )
-		return false;
-	if ( empty( $terms ) )
-		return ( !empty( $object_terms ) );
-
-	$terms = (array) $terms;
-
-	if ( $ints = array_filter( $terms, 'is_int' ) )
-		$strs = array_diff( $terms, $ints );
-	else
-		$strs =& $terms;
-
-	foreach ( $object_terms as $object_term ) {
-		// If term is an int, check against term_ids only.
-		if ( $ints && in_array( $object_term->term_id, $ints ) ) {
-			return true;
-		}
-
-		if ( $strs ) {
-			// Only check numeric strings against term_id, to avoid false matches due to type juggling.
-			$numeric_strs = array_map( 'intval', array_filter( $strs, 'is_numeric' ) );
-			if ( in_array( $object_term->term_id, $numeric_strs, true ) ) {
-				return true;
-			}
-
-			if ( in_array( $object_term->name, $strs ) ) return true;
-			if ( in_array( $object_term->slug, $strs ) ) return true;
-		}
-	}
-
-	return false;
-}
-
-/**
- * Determine if the given object type is associated with the given taxonomy.
- *
- * @since 3.0.0
- *
- * @param string $object_type Object type string.
- * @param string $taxonomy    Single taxonomy name.
- * @return bool True if object is associated with the taxonomy, otherwise false.
- */
-function is_object_in_taxonomy( $object_type, $taxonomy ) {
-	$taxonomies = get_object_taxonomies( $object_type );
-	if ( empty( $taxonomies ) ) {
-		return false;
-	}
-	return in_array( $taxonomy, $taxonomies );
-}
-
-/**
- * Get an array of ancestor IDs for a given object.
- *
- * @since 3.1.0
- * @since 4.1.0 Introduced the `$resource_type` argument.
- *
- * @param int    $object_id     Optional. The ID of the object. Default 0.
- * @param string $object_type   Optional. The type of object for which we'll be retrieving
- *                              ancestors. Accepts a post type or a taxonomy name. Default empty.
- * @param string $resource_type Optional. Type of resource $object_type is. Accepts 'post_type'
- *                              or 'taxonomy'. Default empty.
- * @return array An array of ancestors from lowest to highest in the hierarchy.
- */
-function get_ancestors( $object_id = 0, $object_type = '', $resource_type = '' ) {
-	$object_id = (int) $object_id;
-
-	$ancestors = array();
-
-	if ( empty( $object_id ) ) {
-
-		/** This filter is documented in wp-includes/taxonomy.php */
-		return apply_filters( 'get_ancestors', $ancestors, $object_id, $object_type, $resource_type );
-	}
-
-	if ( ! $resource_type ) {
-		if ( is_taxonomy_hierarchical( $object_type ) ) {
-			$resource_type = 'taxonomy';
-		} elseif ( post_type_exists( $object_type ) ) {
-			$resource_type = 'post_type';
-		}
-	}
-
-	if ( 'taxonomy' === $resource_type ) {
-		$term = get_term($object_id, $object_type);
-		while ( ! is_wp_error($term) && ! empty( $term->parent ) && ! in_array( $term->parent, $ancestors ) ) {
-			$ancestors[] = (int) $term->parent;
-			$term = get_term($term->parent, $object_type);
-		}
-	} elseif ( 'post_type' === $resource_type ) {
-		$ancestors = get_post_ancestors($object_id);
-	}
-
-	/**
-	 * Filters a given object's ancestors.
-	 *
-	 * @since 3.1.0
-	 * @since 4.1.1 Introduced the `$resource_type` parameter.
-	 *
-	 * @param array  $ancestors     An array of object ancestors.
-	 * @param int    $object_id     Object ID.
-	 * @param string $object_type   Type of object.
-	 * @param string $resource_type Type of resource $object_type is.
-	 */
-	return apply_filters( 'get_ancestors', $ancestors, $object_id, $object_type, $resource_type );
-}
-
-/**
- * Returns the term's parent's term_ID.
- *
- * @since 3.1.0
- *
- * @param int    $term_id  Term ID.
- * @param string $taxonomy Taxonomy name.
- * @return int|false False on error.
- */
-function wp_get_term_taxonomy_parent_id( $term_id, $taxonomy ) {
-	$term = get_term( $term_id, $taxonomy );
-	if ( ! $term || is_wp_error( $term ) ) {
-		return false;
-	}
-	return (int) $term->parent;
-}
-
-/**
- * Checks the given subset of the term hierarchy for hierarchy loops.
- * Prevents loops from forming and breaks those that it finds.
- *
- * Attached to the {@see 'wp_update_term_parent'} filter.
- *
- * @since 3.1.0
- *
- * @param int    $parent   `term_id` of the parent for the term we're checking.
- * @param int    $term_id  The term we're checking.
- * @param string $taxonomy The taxonomy of the term we're checking.
- *
- * @return int The new parent for the term.
- */
-function wp_check_term_hierarchy_for_loops( $parent, $term_id, $taxonomy ) {
-	// Nothing fancy here - bail
-	if ( !$parent )
-		return 0;
-
-	// Can't be its own parent.
-	if ( $parent == $term_id )
-		return 0;
-
-	// Now look for larger loops.
-	if ( !$loop = wp_find_hierarchy_loop( 'wp_get_term_taxonomy_parent_id', $term_id, $parent, array( $taxonomy ) ) )
-		return $parent; // No loop
-
-	// Setting $parent to the given value causes a loop.
-	if ( isset( $loop[$term_id] ) )
-		return 0;
-
-	// There's a loop, but it doesn't contain $term_id. Break the loop.
-	foreach ( array_keys( $loop ) as $loop_member )
-		wp_update_term( $loop_member, $taxonomy, array( 'parent' => 0 ) );
-
-	return $parent;
-}
Index: www/wp-includes/ID3/module.audio-video.quicktime.php
===================================================================
--- www/wp-includes/ID3/module.audio-video.quicktime.php	(revision 38565)
+++ www/wp-includes/autoload/id3/getid3_quicktime.php	(revision )
@@ -15,9 +15,6 @@
 //                                                            ///
 /////////////////////////////////////////////////////////////////
 
-getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.mp3.php', __FILE__, true);
-getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.tag.id3v2.php', __FILE__, true); // needed for ISO 639-2 language code lookup
-
 class getid3_quicktime extends getid3_handler
 {
 
Index: www/wp-includes/embed-template.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/embed-template.php	(revision 38565)
+++ www/wp-includes/embed-template.php	(revision 38565)
@@ -1,13 +0,0 @@
-<?php
-/**
- * Back-compat placeholder for the base embed template
- *
- * @package WordPress
- * @subpackage oEmbed
- * @since 4.4.0
- * @deprecated 4.5.0 Moved to wp-includes/theme-compat/embed.php
- */
-
-_deprecated_file( basename( __FILE__ ), '4.5.0', 'wp-includes/theme-compat/embed.php' );
-
-include( ABSPATH . WPINC . '/theme-compat/embed.php' );
Index: www/wp-admin/ms-edit.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/ms-edit.php	(revision 38565)
+++ www/wp-admin/ms-edit.php	(revision 38565)
@@ -1,13 +0,0 @@
-<?php
-/**
- * Action handler for Multisite administration panels.
- *
- * @package WordPress
- * @subpackage Multisite
- * @since 3.0.0
- */
-
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-wp_redirect( network_admin_url() );
-exit;
Index: www/wp-includes/autoload/requests/SSL.php
===================================================================
--- www/wp-includes/autoload/requests/SSL.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/SSL.php	(revision UNDEFINED)
@@ -1,152 +0,0 @@
-<?php
-/**
- * SSL utilities for Requests
- *
- * @package Requests
- * @subpackage Utilities
- */
-
-/**
- * SSL utilities for Requests
- *
- * Collection of utilities for working with and verifying SSL certificates.
- *
- * @package Requests
- * @subpackage Utilities
- */
-class Requests_SSL {
-	/**
-	 * Verify the certificate against common name and subject alternative names
-	 *
-	 * Unfortunately, PHP doesn't check the certificate against the alternative
-	 * names, leading things like 'https://www.github.com/' to be invalid.
-	 * Instead
-	 *
-	 * @see https://tools.ietf.org/html/rfc2818#section-3.1 RFC2818, Section 3.1
-	 *
-	 * @throws Requests_Exception On not obtaining a match for the host (`fsockopen.ssl.no_match`)
-	 * @param string $host Host name to verify against
-	 * @param array $cert Certificate data from openssl_x509_parse()
-	 * @return bool
-	 */
-	public static function verify_certificate($host, $cert) {
-		// Calculate the valid wildcard match if the host is not an IP address
-		$parts = explode('.', $host);
-		if (ip2long($host) === false) {
-			$parts[0] = '*';
-		}
-		$wildcard = implode('.', $parts);
-
-		$has_dns_alt = false;
-
-		// Check the subjectAltName
-		if (!empty($cert['extensions']) && !empty($cert['extensions']['subjectAltName'])) {
-			$altnames = explode(',', $cert['extensions']['subjectAltName']);
-			foreach ($altnames as $altname) {
-				$altname = trim($altname);
-				if (strpos($altname, 'DNS:') !== 0) {
-					continue;
-				}
-
-				$has_dns_alt = true;
-
-				// Strip the 'DNS:' prefix and trim whitespace
-				$altname = trim(substr($altname, 4));
-
-				// Check for a match
-				if (self::match_domain($host, $altname) === true) {
-					return true;
-				}
-			}
-		}
-
-		// Fall back to checking the common name if we didn't get any dNSName
-		// alt names, as per RFC2818
-		if (!$has_dns_alt && !empty($cert['subject']['CN'])) {
-			// Check for a match
-			if (self::match_domain($host, $cert['subject']['CN']) === true) {
-				return true;
-			}
-		}
-
-		return false;
-	}
-
-	/**
-	 * Verify that a reference name is valid
-	 *
-	 * Verifies a dNSName for HTTPS usage, (almost) as per Firefox's rules:
-	 * - Wildcards can only occur in a name with more than 3 components
-	 * - Wildcards can only occur as the last character in the first
-	 *   component
-	 * - Wildcards may be preceded by additional characters
-	 *
-	 * We modify these rules to be a bit stricter and only allow the wildcard
-	 * character to be the full first component; that is, with the exclusion of
-	 * the third rule.
-	 *
-	 * @param string $reference Reference dNSName
-	 * @return boolean Is the name valid?
-	 */
-	public static function verify_reference_name($reference) {
-		$parts = explode('.', $reference);
-
-		// Check the first part of the name
-		$first = array_shift($parts);
-
-		if (strpos($first, '*') !== false) {
-			// Check that the wildcard is the full part
-			if ($first !== '*') {
-				return false;
-			}
-
-			// Check that we have at least 3 components (including first)
-			if (count($parts) < 2) {
-				return false;
-			}
-		}
-
-		// Check the remaining parts
-		foreach ($parts as $part) {
-			if (strpos($part, '*') !== false) {
-				return false;
-			}
-		}
-
-		// Nothing found, verified!
-		return true;
-	}
-
-	/**
-	 * Match a hostname against a dNSName reference
-	 *
-	 * @param string $host Requested host
-	 * @param string $reference dNSName to match against
-	 * @return boolean Does the domain match?
-	 */
-	public static function match_domain($host, $reference) {
-		// Check if the reference is blacklisted first
-		if (self::verify_reference_name($reference) !== true) {
-			return false;
-		}
-
-		// Check for a direct match
-		if ($host === $reference) {
-			return true;
-		}
-
-		// Calculate the valid wildcard match if the host is not an IP address
-		// Also validates that the host has 3 parts or more, as per Firefox's
-		// ruleset.
-		if (ip2long($host) === false) {
-			$parts = explode('.', $host);
-			$parts[0] = '*';
-			$wildcard = implode('.', $parts);
-			if ($wildcard === $reference) {
-				return true;
-			}
-		}
-
-		return false;
-	}
-}
\ No newline at end of file
Index: www/wp-includes/autoload/customize/class-wp-customize-color-control.php
===================================================================
--- www/wp-includes/autoload/customize/class-wp-customize-color-control.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/customize/class-wp-customize-color-control.php	(revision UNDEFINED)
@@ -1,103 +0,0 @@
-<?php
-/**
- * Customize API: WP_Customize_Color_Control class
- *
- * @package WordPress
- * @subpackage Customize
- * @since 4.4.0
- */
-
-/**
- * Customize Color Control class.
- *
- * @since 3.4.0
- *
- * @see WP_Customize_Control
- */
-class WP_Customize_Color_Control extends WP_Customize_Control {
-	/**
-	 * @access public
-	 * @var string
-	 */
-	public $type = 'color';
-
-	/**
-	 * @access public
-	 * @var array
-	 */
-	public $statuses;
-
-	/**
-	 * Constructor.
-	 *
-	 * @since 3.4.0
-	 * @uses WP_Customize_Control::__construct()
-	 *
-	 * @param WP_Customize_Manager $manager Customizer bootstrap instance.
-	 * @param string               $id      Control ID.
-	 * @param array                $args    Optional. Arguments to override class property defaults.
-	 */
-	public function __construct( $manager, $id, $args = array() ) {
-		$this->statuses = array( '' => __('Default') );
-		parent::__construct( $manager, $id, $args );
-	}
-
-	/**
-	 * Enqueue scripts/styles for the color picker.
-	 *
-	 * @since 3.4.0
-	 */
-	public function enqueue() {
-		wp_enqueue_script( 'wp-color-picker' );
-		wp_enqueue_style( 'wp-color-picker' );
-	}
-
-	/**
-	 * Refresh the parameters passed to the JavaScript via JSON.
-	 *
-	 * @since 3.4.0
-	 * @uses WP_Customize_Control::to_json()
-	 */
-	public function to_json() {
-		parent::to_json();
-		$this->json['statuses'] = $this->statuses;
-		$this->json['defaultValue'] = $this->setting->default;
-	}
-
-	/**
-	 * Don't render the control content from PHP, as it's rendered via JS on load.
-	 *
-	 * @since 3.4.0
-	 */
-	public function render_content() {}
-
-	/**
-	 * Render a JS template for the content of the color picker control.
-	 *
-	 * @since 4.1.0
-	 */
-	public function content_template() {
-		?>
-		<# var defaultValue = '';
-		if ( data.defaultValue ) {
-			if ( '#' !== data.defaultValue.substring( 0, 1 ) ) {
-				defaultValue = '#' + data.defaultValue;
-			} else {
-				defaultValue = data.defaultValue;
-			}
-			defaultValue = ' data-default-color=' + defaultValue; // Quotes added automatically.
-		} #>
-		<label>
-			<# if ( data.label ) { #>
-				<span class="customize-control-title">{{{ data.label }}}</span>
-			<# } #>
-			<# if ( data.description ) { #>
-				<span class="description customize-control-description">{{{ data.description }}}</span>
-			<# } #>
-			<div class="customize-control-content">
-				<input class="color-picker-hex" type="text" maxlength="7" placeholder="<?php esc_attr_e( 'Hex Value' ); ?>" {{ defaultValue }} />
-			</div>
-		</label>
-		<?php
-	}
-}
Index: www/wp-includes/autoload/requests/Exception/HTTP/411.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/411.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/411.php	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-<?php
-/**
- * Exception for 411 Length Required responses
- *
- * @package Requests
- */
-
-/**
- * Exception for 411 Length Required responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_411 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 411;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Length Required';
-}
\ No newline at end of file
Index: www/wp-includes/SimplePie/Source.php
===================================================================
--- www/wp-includes/SimplePie/Source.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_Source.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/vars.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/vars.php	(revision 38565)
+++ www/wp-includes/vars.php	(revision 38565)
@@ -1,141 +0,0 @@
-<?php
-/**
- * Creates common globals for the rest of WordPress
- *
- * Sets $pagenow global which is the current page. Checks
- * for the browser to set which one is currently being used.
- *
- * Detects which user environment WordPress is being used on.
- * Only attempts to check for Apache, Nginx and IIS -- three web
- * servers with known pretty permalink capability.
- *
- * Note: Though Nginx is detected, WordPress does not currently
- * generate rewrite rules for it. See https://codex.wordpress.org/Nginx
- *
- * @package WordPress
- */
-
-global $pagenow,
-	$is_lynx, $is_gecko, $is_winIE, $is_macIE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone, $is_IE, $is_edge,
-	$is_apache, $is_IIS, $is_iis7, $is_nginx;
-
-// On which page are we ?
-if ( is_admin() ) {
-	// wp-admin pages are checked more carefully
-	if ( is_network_admin() )
-		preg_match('#/wp-admin/network/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches);
-	elseif ( is_user_admin() )
-		preg_match('#/wp-admin/user/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches);
-	else
-		preg_match('#/wp-admin/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches);
-	$pagenow = $self_matches[1];
-	$pagenow = trim($pagenow, '/');
-	$pagenow = preg_replace('#\?.*?$#', '', $pagenow);
-	if ( '' === $pagenow || 'index' === $pagenow || 'index.php' === $pagenow ) {
-		$pagenow = 'index.php';
-	} else {
-		preg_match('#(.*?)(/|$)#', $pagenow, $self_matches);
-		$pagenow = strtolower($self_matches[1]);
-		if ( '.php' !== substr($pagenow, -4, 4) )
-			$pagenow .= '.php'; // for Options +Multiviews: /wp-admin/themes/index.php (themes.php is queried)
-	}
-} else {
-	if ( preg_match('#([^/]+\.php)([?/].*?)?$#i', $_SERVER['PHP_SELF'], $self_matches) )
-		$pagenow = strtolower($self_matches[1]);
-	else
-		$pagenow = 'index.php';
-}
-unset($self_matches);
-
-// Simple browser detection
-$is_lynx = $is_gecko = $is_winIE = $is_macIE = $is_opera = $is_NS4 = $is_safari = $is_chrome = $is_iphone = $is_edge = false;
-
-if ( isset($_SERVER['HTTP_USER_AGENT']) ) {
-	if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Lynx') !== false ) {
-		$is_lynx = true;
-	} elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'Edge' ) !== false ) {
-		$is_edge = true;
-	} elseif ( stripos($_SERVER['HTTP_USER_AGENT'], 'chrome') !== false ) {
-		if ( stripos( $_SERVER['HTTP_USER_AGENT'], 'chromeframe' ) !== false ) {
-			$is_admin = is_admin();
-			/**
-			 * Filters whether Google Chrome Frame should be used, if available.
-			 *
-			 * @since 3.2.0
-			 *
-			 * @param bool $is_admin Whether to use the Google Chrome Frame. Default is the value of is_admin().
-			 */
-			if ( $is_chrome = apply_filters( 'use_google_chrome_frame', $is_admin ) )
-				header( 'X-UA-Compatible: chrome=1' );
-			$is_winIE = ! $is_chrome;
-		} else {
-			$is_chrome = true;
-		}
-	} elseif ( stripos($_SERVER['HTTP_USER_AGENT'], 'safari') !== false ) {
-		$is_safari = true;
-	} elseif ( ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'Trident') !== false ) && strpos($_SERVER['HTTP_USER_AGENT'], 'Win') !== false ) {
-		$is_winIE = true;
-	} elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false && strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false ) {
-		$is_macIE = true;
-	} elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'Gecko') !== false ) {
-		$is_gecko = true;
-	} elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') !== false ) {
-		$is_opera = true;
-	} elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'Nav') !== false && strpos($_SERVER['HTTP_USER_AGENT'], 'Mozilla/4.') !== false ) {
-		$is_NS4 = true;
-	}
-}
-
-if ( $is_safari && stripos($_SERVER['HTTP_USER_AGENT'], 'mobile') !== false )
-	$is_iphone = true;
-
-$is_IE = ( $is_macIE || $is_winIE );
-
-// Server detection
-
-/**
- * Whether the server software is Apache or something else
- * @global bool $is_apache
- */
-$is_apache = (strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false || strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false);
-
-/**
- * Whether the server software is Nginx or something else
- * @global bool $is_nginx
- */
-$is_nginx = (strpos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false);
-
-/**
- * Whether the server software is IIS or something else
- * @global bool $is_IIS
- */
-$is_IIS = !$is_apache && (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false || strpos($_SERVER['SERVER_SOFTWARE'], 'ExpressionDevServer') !== false);
-
-/**
- * Whether the server software is IIS 7.X or greater
- * @global bool $is_iis7
- */
-$is_iis7 = $is_IIS && intval( substr( $_SERVER['SERVER_SOFTWARE'], strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/' ) + 14 ) ) >= 7;
-
-/**
- * Test if the current browser runs on a mobile device (smart phone, tablet, etc.)
- *
- * @return bool
- */
-function wp_is_mobile() {
-	if ( empty($_SERVER['HTTP_USER_AGENT']) ) {
-		$is_mobile = false;
-	} elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'Mobile') !== false // many mobile devices (all iPhone, iPad, etc.)
-		|| strpos($_SERVER['HTTP_USER_AGENT'], 'Android') !== false
-		|| strpos($_SERVER['HTTP_USER_AGENT'], 'Silk/') !== false
-		|| strpos($_SERVER['HTTP_USER_AGENT'], 'Kindle') !== false
-		|| strpos($_SERVER['HTTP_USER_AGENT'], 'BlackBerry') !== false
-		|| strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mini') !== false
-		|| strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mobi') !== false ) {
-			$is_mobile = true;
-	} else {
-		$is_mobile = false;
-	}
-
-	return $is_mobile;
-}
Index: www/wp-includes/autoload/requests/Exception/HTTP/428.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/428.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/428.php	(revision UNDEFINED)
@@ -1,29 +0,0 @@
-<?php
-/**
- * Exception for 428 Precondition Required responses
- *
- * @see https://tools.ietf.org/html/rfc6585
- * @package Requests
- */
-
-/**
- * Exception for 428 Precondition Required responses
- *
- * @see https://tools.ietf.org/html/rfc6585
- * @package Requests
- */
-class Requests_Exception_HTTP_428 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 428;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Precondition Required';
-}
\ No newline at end of file
Index: www/wp-admin/nav-menus.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/nav-menus.php	(revision 38565)
+++ www/wp-admin/nav-menus.php	(revision 38565)
@@ -1,850 +0,0 @@
-<?php
-/**
- * WordPress Administration for Navigation Menus
- * Interface functions
- *
- * @version 2.0.0
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** Load WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-// Load all the nav menu interface functions
-require_once( ABSPATH . 'wp-admin/includes/nav-menu.php' );
-
-if ( ! current_theme_supports( 'menus' ) && ! current_theme_supports( 'widgets' ) )
-	wp_die( __( 'Your theme does not support navigation menus or widgets.' ) );
-
-// Permissions Check
-if ( ! current_user_can( 'edit_theme_options' ) ) {
-	wp_die(
-		'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-		'<p>' . __( 'Sorry, you are not allowed to edit theme options on this site.' ) . '</p>',
-		403
-	);
-}
-
-wp_enqueue_script( 'nav-menu' );
-
-if ( wp_is_mobile() )
-	wp_enqueue_script( 'jquery-touch-punch' );
-
-// Container for any messages displayed to the user
-$messages = array();
-
-// Container that stores the name of the active menu
-$nav_menu_selected_title = '';
-
-// The menu id of the current menu being edited
-$nav_menu_selected_id = isset( $_REQUEST['menu'] ) ? (int) $_REQUEST['menu'] : 0;
-
-// Get existing menu locations assignments
-$locations = get_registered_nav_menus();
-$menu_locations = get_nav_menu_locations();
-$num_locations = count( array_keys( $locations ) );
-
-// Allowed actions: add, update, delete
-$action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : 'edit';
-
-/*
- * If a JSON blob of navigation menu data is found, expand it and inject it
- * into `$_POST` to avoid PHP `max_input_vars` limitations. See #14134.
- */
-_wp_expand_nav_menu_post_data();
-
-switch ( $action ) {
-	case 'add-menu-item':
-		check_admin_referer( 'add-menu_item', 'menu-settings-column-nonce' );
-		if ( isset( $_REQUEST['nav-menu-locations'] ) )
-			set_theme_mod( 'nav_menu_locations', array_map( 'absint', $_REQUEST['menu-locations'] ) );
-		elseif ( isset( $_REQUEST['menu-item'] ) )
-			wp_save_nav_menu_items( $nav_menu_selected_id, $_REQUEST['menu-item'] );
-		break;
-	case 'move-down-menu-item' :
-
-		// Moving down a menu item is the same as moving up the next in order.
-		check_admin_referer( 'move-menu_item' );
-		$menu_item_id = isset( $_REQUEST['menu-item'] ) ? (int) $_REQUEST['menu-item'] : 0;
-		if ( is_nav_menu_item( $menu_item_id ) ) {
-			$menus = isset( $_REQUEST['menu'] ) ? array( (int) $_REQUEST['menu'] ) : wp_get_object_terms( $menu_item_id, 'nav_menu', array( 'fields' => 'ids' ) );
-			if ( ! is_wp_error( $menus ) && ! empty( $menus[0] ) ) {
-				$menu_id = (int) $menus[0];
-				$ordered_menu_items = wp_get_nav_menu_items( $menu_id );
-				$menu_item_data = (array) wp_setup_nav_menu_item( get_post( $menu_item_id ) );
-
-				// Set up the data we need in one pass through the array of menu items.
-				$dbids_to_orders = array();
-				$orders_to_dbids = array();
-				foreach ( (array) $ordered_menu_items as $ordered_menu_item_object ) {
-					if ( isset( $ordered_menu_item_object->ID ) ) {
-						if ( isset( $ordered_menu_item_object->menu_order ) ) {
-							$dbids_to_orders[$ordered_menu_item_object->ID] = $ordered_menu_item_object->menu_order;
-							$orders_to_dbids[$ordered_menu_item_object->menu_order] = $ordered_menu_item_object->ID;
-						}
-					}
-				}
-
-				// Get next in order.
-				if (
-					isset( $orders_to_dbids[$dbids_to_orders[$menu_item_id] + 1] )
-				) {
-					$next_item_id = $orders_to_dbids[$dbids_to_orders[$menu_item_id] + 1];
-					$next_item_data = (array) wp_setup_nav_menu_item( get_post( $next_item_id ) );
-
-					// If not siblings of same parent, bubble menu item up but keep order.
-					if (
-						! empty( $menu_item_data['menu_item_parent'] ) &&
-						(
-							empty( $next_item_data['menu_item_parent'] ) ||
-							$next_item_data['menu_item_parent'] != $menu_item_data['menu_item_parent']
-						)
-					) {
-
-						$parent_db_id = in_array( $menu_item_data['menu_item_parent'], $orders_to_dbids ) ? (int) $menu_item_data['menu_item_parent'] : 0;
-
-						$parent_object = wp_setup_nav_menu_item( get_post( $parent_db_id ) );
-
-						if ( ! is_wp_error( $parent_object ) ) {
-							$parent_data = (array) $parent_object;
-							$menu_item_data['menu_item_parent'] = $parent_data['menu_item_parent'];
-							update_post_meta( $menu_item_data['ID'], '_menu_item_menu_item_parent', (int) $menu_item_data['menu_item_parent'] );
-
-						}
-
-					// Make menu item a child of its next sibling.
-					} else {
-						$next_item_data['menu_order'] = $next_item_data['menu_order'] - 1;
-						$menu_item_data['menu_order'] = $menu_item_data['menu_order'] + 1;
-
-						$menu_item_data['menu_item_parent'] = $next_item_data['ID'];
-						update_post_meta( $menu_item_data['ID'], '_menu_item_menu_item_parent', (int) $menu_item_data['menu_item_parent'] );
-
-						wp_update_post($menu_item_data);
-						wp_update_post($next_item_data);
-					}
-
-				// The item is last but still has a parent, so bubble up.
-				} elseif (
-					! empty( $menu_item_data['menu_item_parent'] ) &&
-					in_array( $menu_item_data['menu_item_parent'], $orders_to_dbids )
-				) {
-					$menu_item_data['menu_item_parent'] = (int) get_post_meta( $menu_item_data['menu_item_parent'], '_menu_item_menu_item_parent', true);
-					update_post_meta( $menu_item_data['ID'], '_menu_item_menu_item_parent', (int) $menu_item_data['menu_item_parent'] );
-				}
-			}
-		}
-
-		break;
-	case 'move-up-menu-item' :
-		check_admin_referer( 'move-menu_item' );
-		$menu_item_id = isset( $_REQUEST['menu-item'] ) ? (int) $_REQUEST['menu-item'] : 0;
-		if ( is_nav_menu_item( $menu_item_id ) ) {
-			$menus = isset( $_REQUEST['menu'] ) ? array( (int) $_REQUEST['menu'] ) : wp_get_object_terms( $menu_item_id, 'nav_menu', array( 'fields' => 'ids' ) );
-			if ( ! is_wp_error( $menus ) && ! empty( $menus[0] ) ) {
-				$menu_id = (int) $menus[0];
-				$ordered_menu_items = wp_get_nav_menu_items( $menu_id );
-				$menu_item_data = (array) wp_setup_nav_menu_item( get_post( $menu_item_id ) );
-
-				// Set up the data we need in one pass through the array of menu items.
-				$dbids_to_orders = array();
-				$orders_to_dbids = array();
-				foreach ( (array) $ordered_menu_items as $ordered_menu_item_object ) {
-					if ( isset( $ordered_menu_item_object->ID ) ) {
-						if ( isset( $ordered_menu_item_object->menu_order ) ) {
-							$dbids_to_orders[$ordered_menu_item_object->ID] = $ordered_menu_item_object->menu_order;
-							$orders_to_dbids[$ordered_menu_item_object->menu_order] = $ordered_menu_item_object->ID;
-						}
-					}
-				}
-
-				// If this menu item is not first.
-				if ( ! empty( $dbids_to_orders[$menu_item_id] ) && ! empty( $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1] ) ) {
-
-					// If this menu item is a child of the previous.
-					if (
-						! empty( $menu_item_data['menu_item_parent'] ) &&
-						in_array( $menu_item_data['menu_item_parent'], array_keys( $dbids_to_orders ) ) &&
-						isset( $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1] ) &&
-						( $menu_item_data['menu_item_parent'] == $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1] )
-					) {
-						$parent_db_id = in_array( $menu_item_data['menu_item_parent'], $orders_to_dbids ) ? (int) $menu_item_data['menu_item_parent'] : 0;
-						$parent_object = wp_setup_nav_menu_item( get_post( $parent_db_id ) );
-
-						if ( ! is_wp_error( $parent_object ) ) {
-							$parent_data = (array) $parent_object;
-
-							/*
-							 * If there is something before the parent and parent a child of it,
-							 * make menu item a child also of it.
-							 */
-							if (
-								! empty( $dbids_to_orders[$parent_db_id] ) &&
-								! empty( $orders_to_dbids[$dbids_to_orders[$parent_db_id] - 1] ) &&
-								! empty( $parent_data['menu_item_parent'] )
-							) {
-								$menu_item_data['menu_item_parent'] = $parent_data['menu_item_parent'];
-
-							/*
-							 * Else if there is something before parent and parent not a child of it,
-							 * make menu item a child of that something's parent
-							 */
-							} elseif (
-								! empty( $dbids_to_orders[$parent_db_id] ) &&
-								! empty( $orders_to_dbids[$dbids_to_orders[$parent_db_id] - 1] )
-							) {
-								$_possible_parent_id = (int) get_post_meta( $orders_to_dbids[$dbids_to_orders[$parent_db_id] - 1], '_menu_item_menu_item_parent', true);
-								if ( in_array( $_possible_parent_id, array_keys( $dbids_to_orders ) ) )
-									$menu_item_data['menu_item_parent'] = $_possible_parent_id;
-								else
-									$menu_item_data['menu_item_parent'] = 0;
-
-							// Else there isn't something before the parent.
-							} else {
-								$menu_item_data['menu_item_parent'] = 0;
-							}
-
-							// Set former parent's [menu_order] to that of menu-item's.
-							$parent_data['menu_order'] = $parent_data['menu_order'] + 1;
-
-							// Set menu-item's [menu_order] to that of former parent.
-							$menu_item_data['menu_order'] = $menu_item_data['menu_order'] - 1;
-
-							// Save changes.
-							update_post_meta( $menu_item_data['ID'], '_menu_item_menu_item_parent', (int) $menu_item_data['menu_item_parent'] );
-							wp_update_post($menu_item_data);
-							wp_update_post($parent_data);
-						}
-
-					// Else this menu item is not a child of the previous.
-					} elseif (
-						empty( $menu_item_data['menu_order'] ) ||
-						empty( $menu_item_data['menu_item_parent'] ) ||
-						! in_array( $menu_item_data['menu_item_parent'], array_keys( $dbids_to_orders ) ) ||
-						empty( $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1] ) ||
-						$orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1] != $menu_item_data['menu_item_parent']
-					) {
-						// Just make it a child of the previous; keep the order.
-						$menu_item_data['menu_item_parent'] = (int) $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1];
-						update_post_meta( $menu_item_data['ID'], '_menu_item_menu_item_parent', (int) $menu_item_data['menu_item_parent'] );
-						wp_update_post($menu_item_data);
-					}
-				}
-			}
-		}
-		break;
-
-	case 'delete-menu-item':
-		$menu_item_id = (int) $_REQUEST['menu-item'];
-
-		check_admin_referer( 'delete-menu_item_' . $menu_item_id );
-
-		if ( is_nav_menu_item( $menu_item_id ) && wp_delete_post( $menu_item_id, true ) )
-			$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __('The menu item has been successfully deleted.') . '</p></div>';
-		break;
-
-	case 'delete':
-		check_admin_referer( 'delete-nav_menu-' . $nav_menu_selected_id );
-		if ( is_nav_menu( $nav_menu_selected_id ) ) {
-			$deletion = wp_delete_nav_menu( $nav_menu_selected_id );
-		} else {
-			// Reset the selected menu.
-			$nav_menu_selected_id = 0;
-			unset( $_REQUEST['menu'] );
-		}
-
-		if ( ! isset( $deletion ) )
-			break;
-
-		if ( is_wp_error( $deletion ) )
-			$messages[] = '<div id="message" class="error notice is-dismissible"><p>' . $deletion->get_error_message() . '</p></div>';
-		else
-			$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __( 'The menu has been successfully deleted.' ) . '</p></div>';
-		break;
-
-	case 'delete_menus':
-		check_admin_referer( 'nav_menus_bulk_actions' );
-		foreach ( $_REQUEST['delete_menus'] as $menu_id_to_delete ) {
-			if ( ! is_nav_menu( $menu_id_to_delete ) )
-				continue;
-
-			$deletion = wp_delete_nav_menu( $menu_id_to_delete );
-			if ( is_wp_error( $deletion ) ) {
-				$messages[] = '<div id="message" class="error notice is-dismissible"><p>' . $deletion->get_error_message() . '</p></div>';
-				$deletion_error = true;
-			}
-		}
-
-		if ( empty( $deletion_error ) )
-			$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Selected menus have been successfully deleted.' ) . '</p></div>';
-		break;
-
-	case 'update':
-		check_admin_referer( 'update-nav_menu', 'update-nav-menu-nonce' );
-
-		// Remove menu locations that have been unchecked.
-		foreach ( $locations as $location => $description ) {
-			if ( ( empty( $_POST['menu-locations'] ) || empty( $_POST['menu-locations'][ $location ] ) ) && isset( $menu_locations[ $location ] ) && $menu_locations[ $location ] == $nav_menu_selected_id )
-				unset( $menu_locations[ $location ] );
-		}
-
-		// Merge new and existing menu locations if any new ones are set.
-		if ( isset( $_POST['menu-locations'] ) ) {
-			$new_menu_locations = array_map( 'absint', $_POST['menu-locations'] );
-			$menu_locations = array_merge( $menu_locations, $new_menu_locations );
-		}
-
-		// Set menu locations.
-		set_theme_mod( 'nav_menu_locations', $menu_locations );
-
-		// Add Menu.
-		if ( 0 == $nav_menu_selected_id ) {
-			$new_menu_title = trim( esc_html( $_POST['menu-name'] ) );
-
-			if ( $new_menu_title ) {
-				$_nav_menu_selected_id = wp_update_nav_menu_object( 0, array('menu-name' => $new_menu_title) );
-
-				if ( is_wp_error( $_nav_menu_selected_id ) ) {
-					$messages[] = '<div id="message" class="error notice is-dismissible"><p>' . $_nav_menu_selected_id->get_error_message() . '</p></div>';
-				} else {
-					$_menu_object = wp_get_nav_menu_object( $_nav_menu_selected_id );
-					$nav_menu_selected_id = $_nav_menu_selected_id;
-					$nav_menu_selected_title = $_menu_object->name;
-					if ( isset( $_REQUEST['menu-item'] ) )
-						wp_save_nav_menu_items( $nav_menu_selected_id, absint( $_REQUEST['menu-item'] ) );
-					if ( isset( $_REQUEST['zero-menu-state'] ) ) {
-						// If there are menu items, add them
-						wp_nav_menu_update_menu_items( $nav_menu_selected_id, $nav_menu_selected_title );
-						// Auto-save nav_menu_locations
-						$locations = get_nav_menu_locations();
-						foreach ( $locations as $location => $menu_id ) {
-								$locations[ $location ] = $nav_menu_selected_id;
-								break; // There should only be 1
-						}
-						set_theme_mod( 'nav_menu_locations', $locations );
-					}
-					if ( isset( $_REQUEST['use-location'] ) ) {
-						$locations = get_registered_nav_menus();
-						$menu_locations = get_nav_menu_locations();
-						if ( isset( $locations[ $_REQUEST['use-location'] ] ) )
-							$menu_locations[ $_REQUEST['use-location'] ] = $nav_menu_selected_id;
-						set_theme_mod( 'nav_menu_locations', $menu_locations );
-					}
-
-					// $messages[] = '<div id="message" class="updated"><p>' . sprintf( __( '<strong>%s</strong> has been created.' ), $nav_menu_selected_title ) . '</p></div>';
-					wp_redirect( admin_url( 'nav-menus.php?menu=' . $_nav_menu_selected_id ) );
-					exit();
-				}
-			} else {
-				$messages[] = '<div id="message" class="error notice is-dismissible"><p>' . __( 'Please enter a valid menu name.' ) . '</p></div>';
-			}
-
-		// Update existing menu.
-		} else {
-
-			$_menu_object = wp_get_nav_menu_object( $nav_menu_selected_id );
-
-			$menu_title = trim( esc_html( $_POST['menu-name'] ) );
-			if ( ! $menu_title ) {
-				$messages[] = '<div id="message" class="error notice is-dismissible"><p>' . __( 'Please enter a valid menu name.' ) . '</p></div>';
-				$menu_title = $_menu_object->name;
-			}
-
-			if ( ! is_wp_error( $_menu_object ) ) {
-				$_nav_menu_selected_id = wp_update_nav_menu_object( $nav_menu_selected_id, array( 'menu-name' => $menu_title ) );
-				if ( is_wp_error( $_nav_menu_selected_id ) ) {
-					$_menu_object = $_nav_menu_selected_id;
-					$messages[] = '<div id="message" class="error notice is-dismissible"><p>' . $_nav_menu_selected_id->get_error_message() . '</p></div>';
-				} else {
-					$_menu_object = wp_get_nav_menu_object( $_nav_menu_selected_id );
-					$nav_menu_selected_title = $_menu_object->name;
-				}
-			}
-
-			// Update menu items.
-			if ( ! is_wp_error( $_menu_object ) ) {
-				$messages = array_merge( $messages, wp_nav_menu_update_menu_items( $_nav_menu_selected_id, $nav_menu_selected_title ) );
-
-				// If the menu ID changed, redirect to the new URL.
-				if ( $nav_menu_selected_id != $_nav_menu_selected_id ) {
-					wp_redirect( admin_url( 'nav-menus.php?menu=' . intval( $_nav_menu_selected_id ) ) );
-					exit();
-				}
-			}
-		}
-		break;
-	case 'locations':
-		if ( ! $num_locations ) {
-			wp_redirect( admin_url( 'nav-menus.php' ) );
-			exit();
-		}
-
-		add_filter( 'screen_options_show_screen', '__return_false' );
-
-		if ( isset( $_POST['menu-locations'] ) ) {
-			check_admin_referer( 'save-menu-locations' );
-
-			$new_menu_locations = array_map( 'absint', $_POST['menu-locations'] );
-			$menu_locations = array_merge( $menu_locations, $new_menu_locations );
-			// Set menu locations
-			set_theme_mod( 'nav_menu_locations', $menu_locations );
-
-			$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Menu locations updated.' ) . '</p></div>';
-		}
-		break;
-}
-
-// Get all nav menus.
-$nav_menus = wp_get_nav_menus();
-$menu_count = count( $nav_menus );
-
-// Are we on the add new screen?
-$add_new_screen = ( isset( $_GET['menu'] ) && 0 == $_GET['menu'] ) ? true : false;
-
-$locations_screen = ( isset( $_GET['action'] ) && 'locations' == $_GET['action'] ) ? true : false;
-
-/*
- * If we have one theme location, and zero menus, we take them right
- * into editing their first menu.
- */
-$page_count = wp_count_posts( 'page' );
-$one_theme_location_no_menus = ( 1 == count( get_registered_nav_menus() ) && ! $add_new_screen && empty( $nav_menus ) && ! empty( $page_count->publish ) ) ? true : false;
-
-$nav_menus_l10n = array(
-	'oneThemeLocationNoMenus' => $one_theme_location_no_menus,
-	'moveUp'       => __( 'Move up one' ),
-	'moveDown'     => __( 'Move down one' ),
-	'moveToTop'    => __( 'Move to the top' ),
-	/* translators: %s: previous item name */
-	'moveUnder'    => __( 'Move under %s' ),
-	/* translators: %s: previous item name */
-	'moveOutFrom'  => __( 'Move out from under %s' ),
-	/* translators: %s: previous item name */
-	'under'        => __( 'Under %s' ),
-	/* translators: %s: previous item name */
-	'outFrom'      => __( 'Out from under %s' ),
-	/* translators: 1: item name, 2: item position, 3: total number of items */
-	'menuFocus'    => __( '%1$s. Menu item %2$d of %3$d.' ),
-	/* translators: 1: item name, 2: item position, 3: parent item name */
-	'subMenuFocus' => __( '%1$s. Sub item number %2$d under %3$s.' ),
-);
-wp_localize_script( 'nav-menu', 'menus', $nav_menus_l10n );
-
-/*
- * Redirect to add screen if there are no menus and this users has either zero,
- * or more than 1 theme locations.
- */
-if ( 0 == $menu_count && ! $add_new_screen && ! $one_theme_location_no_menus )
-	wp_redirect( admin_url( 'nav-menus.php?action=edit&menu=0' ) );
-
-// Get recently edited nav menu.
-$recently_edited = absint( get_user_option( 'nav_menu_recently_edited' ) );
-if ( empty( $recently_edited ) && is_nav_menu( $nav_menu_selected_id ) )
-	$recently_edited = $nav_menu_selected_id;
-
-// Use $recently_edited if none are selected.
-if ( empty( $nav_menu_selected_id ) && ! isset( $_GET['menu'] ) && is_nav_menu( $recently_edited ) )
-	$nav_menu_selected_id = $recently_edited;
-
-// On deletion of menu, if another menu exists, show it.
-if ( ! $add_new_screen && 0 < $menu_count && isset( $_GET['action'] ) && 'delete' == $_GET['action'] )
-	$nav_menu_selected_id = $nav_menus[0]->term_id;
-
-// Set $nav_menu_selected_id to 0 if no menus.
-if ( $one_theme_location_no_menus ) {
-	$nav_menu_selected_id = 0;
-} elseif ( empty( $nav_menu_selected_id ) && ! empty( $nav_menus ) && ! $add_new_screen ) {
-	// if we have no selection yet, and we have menus, set to the first one in the list.
-	$nav_menu_selected_id = $nav_menus[0]->term_id;
-}
-
-// Update the user's setting.
-if ( $nav_menu_selected_id != $recently_edited && is_nav_menu( $nav_menu_selected_id ) )
-	update_user_meta( $current_user->ID, 'nav_menu_recently_edited', $nav_menu_selected_id );
-
-// If there's a menu, get its name.
-if ( ! $nav_menu_selected_title && is_nav_menu( $nav_menu_selected_id ) ) {
-	$_menu_object = wp_get_nav_menu_object( $nav_menu_selected_id );
-	$nav_menu_selected_title = ! is_wp_error( $_menu_object ) ? $_menu_object->name : '';
-}
-
-// Generate truncated menu names.
-foreach ( (array) $nav_menus as $key => $_nav_menu ) {
-	$nav_menus[$key]->truncated_name = wp_html_excerpt( $_nav_menu->name, 40, '&hellip;' );
-}
-
-// Retrieve menu locations.
-if ( current_theme_supports( 'menus' ) ) {
-	$locations = get_registered_nav_menus();
-	$menu_locations = get_nav_menu_locations();
-}
-
-/*
- * Ensure the user will be able to scroll horizontally
- * by adding a class for the max menu depth.
- *
- * @global int $_wp_nav_menu_max_depth
- */
-global $_wp_nav_menu_max_depth;
-$_wp_nav_menu_max_depth = 0;
-
-// Calling wp_get_nav_menu_to_edit generates $_wp_nav_menu_max_depth.
-if ( is_nav_menu( $nav_menu_selected_id ) ) {
-	$menu_items = wp_get_nav_menu_items( $nav_menu_selected_id, array( 'post_status' => 'any' ) );
-	$edit_markup = wp_get_nav_menu_to_edit( $nav_menu_selected_id );
-}
-
-/**
- *
- * @global int $_wp_nav_menu_max_depth
- *
- * @param string $classes
- * @return string
- */
-function wp_nav_menu_max_depth( $classes ) {
-	global $_wp_nav_menu_max_depth;
-	return "$classes menu-max-depth-$_wp_nav_menu_max_depth";
-}
-
-add_filter('admin_body_class', 'wp_nav_menu_max_depth');
-
-wp_nav_menu_setup();
-wp_initial_nav_menu_meta_boxes();
-
-if ( ! current_theme_supports( 'menus' ) && ! $num_locations )
-	$messages[] = '<div id="message" class="updated"><p>' . sprintf( __( 'Your theme does not natively support menus, but you can use them in sidebars by adding a &#8220;Custom Menu&#8221; widget on the <a href="%s">Widgets</a> screen.' ), admin_url( 'widgets.php' ) ) . '</p></div>';
-
-if ( ! $locations_screen ) : // Main tab
-	$overview  = '<p>' . __( 'This screen is used for managing your custom navigation menus.' ) . '</p>';
-	$overview .= '<p>' . sprintf( __( 'Menus can be displayed in locations defined by your theme, even used in sidebars by adding a &#8220;Custom Menu&#8221; widget on the <a href="%1$s">Widgets</a> screen. If your theme does not support the custom menus feature (the default themes, %2$s and %3$s, do), you can learn about adding this support by following the Documentation link to the side.' ), admin_url( 'widgets.php' ), 'Twenty Fifteen', 'Twenty Fourteen' ) . '</p>';
-	$overview .= '<p>' . __( 'From this screen you can:' ) . '</p>';
-	$overview .= '<ul><li>' . __( 'Create, edit, and delete menus' ) . '</li>';
-	$overview .= '<li>' . __( 'Add, organize, and modify individual menu items' ) . '</li></ul>';
-
-	get_current_screen()->add_help_tab( array(
-		'id'      => 'overview',
-		'title'   => __( 'Overview' ),
-		'content' => $overview
-	) );
-
-	$menu_management  = '<p>' . __( 'The menu management box at the top of the screen is used to control which menu is opened in the editor below.' ) . '</p>';
-	$menu_management .= '<ul><li>' . __( 'To edit an existing menu, <strong>choose a menu from the drop down and click Select</strong>' ) . '</li>';
-	$menu_management .= '<li>' . __( 'If you haven&#8217;t yet created any menus, <strong>click the &#8217;create a new menu&#8217; link</strong> to get started' ) . '</li></ul>';
-	$menu_management .= '<p>' . __( 'You can assign theme locations to individual menus by <strong>selecting the desired settings</strong> at the bottom of the menu editor. To assign menus to all theme locations at once, <strong>visit the Manage Locations tab</strong> at the top of the screen.' ) . '</p>';
-
-	get_current_screen()->add_help_tab( array(
-		'id'      => 'menu-management',
-		'title'   => __( 'Menu Management' ),
-		'content' => $menu_management
-	) );
-
-	$editing_menus  = '<p>' . __( 'Each custom menu may contain a mix of links to pages, categories, custom URLs or other content types. Menu links are added by selecting items from the expanding boxes in the left-hand column below.' ) . '</p>';
-	$editing_menus .= '<p>' . __( '<strong>Clicking the arrow to the right of any menu item</strong> in the editor will reveal a standard group of settings. Additional settings such as link target, CSS classes, link relationships, and link descriptions can be enabled and disabled via the Screen Options tab.' ) . '</p>';
-	$editing_menus .= '<ul><li>' . __( 'Add one or several items at once by <strong>selecting the checkbox next to each item and clicking Add to Menu</strong>' ) . '</li>';
-	$editing_menus .= '<li>' . __( 'To add a custom link, <strong>expand the Custom Links section, enter a URL and link text, and click Add to Menu</strong>' ) .'</li>';
-	$editing_menus .= '<li>' . __( 'To reorganize menu items, <strong>drag and drop items with your mouse or use your keyboard</strong>. Drag or move a menu item a little to the right to make it a submenu' ) . '</li>';
-	$editing_menus .= '<li>' . __( 'Delete a menu item by <strong>expanding it and clicking the Remove link</strong>' ) . '</li></ul>';
-
-	get_current_screen()->add_help_tab( array(
-		'id'      => 'editing-menus',
-		'title'   => __( 'Editing Menus' ),
-		'content' => $editing_menus
-	) );
-else : // Locations Tab.
-	$locations_overview  = '<p>' . __( 'This screen is used for globally assigning menus to locations defined by your theme.' ) . '</p>';
-	$locations_overview .= '<ul><li>' . __( 'To assign menus to one or more theme locations, <strong>select a menu from each location&#8217;s drop down.</strong> When you&#8217;re finished, <strong>click Save Changes</strong>' ) . '</li>';
-	$locations_overview .= '<li>' . __( 'To edit a menu currently assigned to a theme location, <strong>click the adjacent &#8217;Edit&#8217; link</strong>' ) . '</li>';
-	$locations_overview .= '<li>' . __( 'To add a new menu instead of assigning an existing one, <strong>click the &#8217;Use new menu&#8217; link</strong>. Your new menu will be automatically assigned to that theme location' ) . '</li></ul>';
-
-	get_current_screen()->add_help_tab( array(
-		'id'      => 'locations-overview',
-		'title'   => __( 'Overview' ),
-		'content' => $locations_overview
-	) );
-endif;
-
-get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Appearance_Menus_Screen" target="_blank">Documentation on Menus</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
-);
-
-// Get the admin header.
-require_once( ABSPATH . 'wp-admin/admin-header.php' );
-?>
-<div class="wrap">
-	<h1><?php echo esc_html( __( 'Menus' ) ); ?>
-		<?php
-		if ( current_user_can( 'customize' ) ) :
-			$focus = $locations_screen ? array( 'section' => 'menu_locations' ) : array( 'panel' => 'nav_menus' );
-			printf(
-				' <a class="page-title-action hide-if-no-customize" href="%1$s">%2$s</a>',
-				esc_url( add_query_arg( array(
-					array( 'autofocus' => $focus ),
-					'return' => urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ),
-				), admin_url( 'customize.php' ) ) ),
-				__( 'Manage with Live Preview' )
-			);
-		endif;
-		?>
-	</h1>
-	<h2 class="nav-tab-wrapper wp-clearfix">
-		<a href="<?php echo admin_url( 'nav-menus.php' ); ?>" class="nav-tab<?php if ( ! isset( $_GET['action'] ) || isset( $_GET['action'] ) && 'locations' != $_GET['action'] ) echo ' nav-tab-active'; ?>"><?php esc_html_e( 'Edit Menus' ); ?></a>
-		<?php if ( $num_locations && $menu_count ) : ?>
-			<a href="<?php echo esc_url( add_query_arg( array( 'action' => 'locations' ), admin_url( 'nav-menus.php' ) ) ); ?>" class="nav-tab<?php if ( $locations_screen ) echo ' nav-tab-active'; ?>"><?php esc_html_e( 'Manage Locations' ); ?></a>
-		<?php
-			endif;
-		?>
-	</h2>
-	<?php
-	foreach ( $messages as $message ) :
-		echo $message . "\n";
-	endforeach;
-	?>
-	<?php
-	if ( $locations_screen ) :
-		if ( 1 == $num_locations ) {
-			echo '<p>' . __( 'Your theme supports one menu. Select which menu you would like to use.' ) . '</p>';
-		} else {
-			echo '<p>' .  sprintf( _n( 'Your theme supports %s menu. Select which menu appears in each location.', 'Your theme supports %s menus. Select which menu appears in each location.', $num_locations ), number_format_i18n( $num_locations ) ) . '</p>';
-		}
-	?>
-	<div id="menu-locations-wrap">
-		<form method="post" action="<?php echo esc_url( add_query_arg( array( 'action' => 'locations' ), admin_url( 'nav-menus.php' ) ) ); ?>">
-			<table class="widefat fixed" id="menu-locations-table">
-				<thead>
-				<tr>
-					<th scope="col" class="manage-column column-locations"><?php _e( 'Theme Location' ); ?></th>
-					<th scope="col" class="manage-column column-menus"><?php _e( 'Assigned Menu' ); ?></th>
-				</tr>
-				</thead>
-				<tbody class="menu-locations">
-				<?php foreach ( $locations as $_location => $_name ) { ?>
-					<tr class="menu-locations-row">
-						<td class="menu-location-title"><label for="locations-<?php echo $_location; ?>"><?php echo $_name; ?></label></td>
-						<td class="menu-location-menus">
-							<select name="menu-locations[<?php echo $_location; ?>]" id="locations-<?php echo $_location; ?>">
-								<option value="0"><?php printf( '&mdash; %s &mdash;', esc_html__( 'Select a Menu' ) ); ?></option>
-								<?php foreach ( $nav_menus as $menu ) : ?>
-									<?php $selected = isset( $menu_locations[$_location] ) && $menu_locations[$_location] == $menu->term_id; ?>
-									<option <?php if ( $selected ) echo 'data-orig="true"'; ?> <?php selected( $selected ); ?> value="<?php echo $menu->term_id; ?>">
-										<?php echo wp_html_excerpt( $menu->name, 40, '&hellip;' ); ?>
-									</option>
-								<?php endforeach; ?>
-							</select>
-							<div class="locations-row-links">
-								<?php if ( isset( $menu_locations[ $_location ] ) && 0 != $menu_locations[ $_location ] ) : ?>
-								<span class="locations-edit-menu-link">
-									<a href="<?php echo esc_url( add_query_arg( array( 'action' => 'edit', 'menu' => $menu_locations[$_location] ), admin_url( 'nav-menus.php' ) ) ); ?>">
-										<span aria-hidden="true"><?php _ex( 'Edit', 'menu' ); ?></span><span class="screen-reader-text"><?php _e( 'Edit selected menu' ); ?></span>
-									</a>
-								</span>
-								<?php endif; ?>
-								<span class="locations-add-menu-link">
-									<a href="<?php echo esc_url( add_query_arg( array( 'action' => 'edit', 'menu' => 0, 'use-location' => $_location ), admin_url( 'nav-menus.php' ) ) ); ?>">
-										<?php _ex( 'Use new menu', 'menu' ); ?>
-									</a>
-								</span>
-							</div><!-- .locations-row-links -->
-						</td><!-- .menu-location-menus -->
-					</tr><!-- .menu-locations-row -->
-				<?php } // foreach ?>
-				</tbody>
-			</table>
-			<p class="button-controls wp-clearfix"><?php submit_button( __( 'Save Changes' ), 'primary left', 'nav-menu-locations', false ); ?></p>
-			<?php wp_nonce_field( 'save-menu-locations' ); ?>
-			<input type="hidden" name="menu" id="nav-menu-meta-object-id" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" />
-		</form>
-	</div><!-- #menu-locations-wrap -->
-	<?php
-	/**
-	 * Fires after the menu locations table is displayed.
-	 *
-	 * @since 3.6.0
-	 */
-	do_action( 'after_menu_locations_table' ); ?>
-	<?php else : ?>
-	<div class="manage-menus">
- 		<?php if ( $menu_count < 2 ) : ?>
-		<span class="add-edit-menu-action">
-			<?php printf( __( 'Edit your menu below, or <a href="%s">create a new menu</a>.' ), esc_url( add_query_arg( array( 'action' => 'edit', 'menu' => 0 ), admin_url( 'nav-menus.php' ) ) ) ); ?>
-		</span><!-- /add-edit-menu-action -->
-		<?php else : ?>
-			<form method="get" action="<?php echo admin_url( 'nav-menus.php' ); ?>">
-			<input type="hidden" name="action" value="edit" />
-			<label for="select-menu-to-edit" class="selected-menu"><?php _e( 'Select a menu to edit:' ); ?></label>
-			<select name="menu" id="select-menu-to-edit">
-				<?php if ( $add_new_screen ) : ?>
-					<option value="0" selected="selected"><?php _e( '&mdash; Select &mdash;' ); ?></option>
-				<?php endif; ?>
-				<?php foreach ( (array) $nav_menus as $_nav_menu ) : ?>
-					<option value="<?php echo esc_attr( $_nav_menu->term_id ); ?>" <?php selected( $_nav_menu->term_id, $nav_menu_selected_id ); ?>>
-						<?php
-						echo esc_html( $_nav_menu->truncated_name ) ;
-
-						if ( ! empty( $menu_locations ) && in_array( $_nav_menu->term_id, $menu_locations ) ) {
-							$locations_assigned_to_this_menu = array();
-							foreach ( array_keys( $menu_locations, $_nav_menu->term_id ) as $menu_location_key ) {
-								if ( isset( $locations[ $menu_location_key ] ) ) {
-									$locations_assigned_to_this_menu[] = $locations[ $menu_location_key ];
-								}
-							}
-
-							/**
-							 * Filters the number of locations listed per menu in the drop-down select.
-							 *
-							 * @since 3.6.0
-							 *
-							 * @param int $locations Number of menu locations to list. Default 3.
-							 */
-							$assigned_locations = array_slice( $locations_assigned_to_this_menu, 0, absint( apply_filters( 'wp_nav_locations_listed_per_menu', 3 ) ) );
-
-							// Adds ellipses following the number of locations defined in $assigned_locations.
-							if ( ! empty( $assigned_locations ) ) {
-								printf( ' (%1$s%2$s)',
-									implode( ', ', $assigned_locations ),
-									count( $locations_assigned_to_this_menu ) > count( $assigned_locations ) ? ' &hellip;' : ''
-								);
-							}
-						}
-						?>
-					</option>
-				<?php endforeach; ?>
-			</select>
-			<span class="submit-btn"><input type="submit" class="button-secondary" value="<?php esc_attr_e( 'Select' ); ?>"></span>
-			<span class="add-new-menu-action">
-				<?php printf( __( 'or <a href="%s">create a new menu</a>.' ), esc_url( add_query_arg( array( 'action' => 'edit', 'menu' => 0 ), admin_url( 'nav-menus.php' ) ) ) ); ?>
-			</span><!-- /add-new-menu-action -->
-		</form>
-	<?php endif; ?>
-	</div><!-- /manage-menus -->
-	<div id="nav-menus-frame" class="wp-clearfix">
-	<div id="menu-settings-column" class="metabox-holder<?php if ( isset( $_GET['menu'] ) && '0' == $_GET['menu'] ) { echo ' metabox-holder-disabled'; } ?>">
-
-		<div class="clear"></div>
-
-		<form id="nav-menu-meta" class="nav-menu-meta" method="post" enctype="multipart/form-data">
-			<input type="hidden" name="menu" id="nav-menu-meta-object-id" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" />
-			<input type="hidden" name="action" value="add-menu-item" />
-			<?php wp_nonce_field( 'add-menu_item', 'menu-settings-column-nonce' ); ?>
-			<?php do_accordion_sections( 'nav-menus', 'side', null ); ?>
-		</form>
-
-	</div><!-- /#menu-settings-column -->
-	<div id="menu-management-liquid">
-		<div id="menu-management">
-			<form id="update-nav-menu" method="post" enctype="multipart/form-data">
-				<div class="menu-edit <?php if ( $add_new_screen ) echo 'blank-slate'; ?>">
-					<input type="hidden" name="nav-menu-data">
-					<?php
-					wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
-					wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
-					wp_nonce_field( 'update-nav_menu', 'update-nav-menu-nonce' );
-
-					$menu_name_aria_desc = $add_new_screen ? ' aria-describedby="menu-name-desc"' : '';
-
-					if ( $one_theme_location_no_menus ) {
-						$menu_name_val = 'value="' . esc_attr( 'Menu 1' ) . '"';
-					?>
-						<input type="hidden" name="zero-menu-state" value="true" />
-					<?php } else {
-						$menu_name_val = 'value="' . esc_attr( $nav_menu_selected_title ) . '"';
-					} ?>
- 					<input type="hidden" name="action" value="update" />
-					<input type="hidden" name="menu" id="menu" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" />
-					<div id="nav-menu-header">
-						<div class="major-publishing-actions wp-clearfix">
-							<label class="menu-name-label" for="menu-name"><?php _e( 'Menu Name' ); ?></label>
-							<input name="menu-name" id="menu-name" type="text" class="menu-name regular-text menu-item-textbox" <?php echo $menu_name_val . $menu_name_aria_desc; ?> />
-							<div class="publishing-action">
-								<?php submit_button( empty( $nav_menu_selected_id ) ? __( 'Create Menu' ) : __( 'Save Menu' ), 'primary large menu-save', 'save_menu', false, array( 'id' => 'save_menu_header' ) ); ?>
-							</div><!-- END .publishing-action -->
-						</div><!-- END .major-publishing-actions -->
-					</div><!-- END .nav-menu-header -->
-					<div id="post-body">
-						<div id="post-body-content" class="wp-clearfix">
-							<?php if ( ! $add_new_screen ) : ?>
-							<h3><?php _e( 'Menu Structure' ); ?></h3>
-							<?php $starter_copy = ( $one_theme_location_no_menus ) ? __( 'Edit your default menu by adding or removing items. Drag each item into the order you prefer. Click Create Menu to save your changes.' ) : __( 'Drag each item into the order you prefer. Click the arrow on the right of the item to reveal additional configuration options.' ); ?>
-							<div class="drag-instructions post-body-plain" <?php if ( isset( $menu_items ) && 0 == count( $menu_items ) ) { ?>style="display: none;"<?php } ?>>
-								<p><?php echo $starter_copy; ?></p>
-							</div>
-							<?php
-							if ( isset( $edit_markup ) && ! is_wp_error( $edit_markup ) ) {
-								echo $edit_markup;
-							} else {
-							?>
-							<ul class="menu" id="menu-to-edit"></ul>
-							<?php } ?>
-							<?php endif; ?>
-							<?php if ( $add_new_screen ) : ?>
-								<p class="post-body-plain" id="menu-name-desc"><?php _e( 'Give your menu a name, then click Create Menu.' ); ?></p>
-								<?php if ( isset( $_GET['use-location'] ) ) : ?>
-									<input type="hidden" name="use-location" value="<?php echo esc_attr( $_GET['use-location'] ); ?>" />
-								<?php endif; ?>
-							<?php endif; ?>
-							<div class="menu-settings" <?php if ( $one_theme_location_no_menus ) { ?>style="display: none;"<?php } ?>>
-								<h3><?php _e( 'Menu Settings' ); ?></h3>
-								<?php
-								if ( ! isset( $auto_add ) ) {
-									$auto_add = get_option( 'nav_menu_options' );
-									if ( ! isset( $auto_add['auto_add'] ) )
-										$auto_add = false;
-									elseif ( false !== array_search( $nav_menu_selected_id, $auto_add['auto_add'] ) )
-										$auto_add = true;
-									else
-										$auto_add = false;
-								} ?>
-
-								<dl class="auto-add-pages">
-									<dt class="howto"><?php _e( 'Auto add pages' ); ?></dt>
-									<dd class="checkbox-input"><input type="checkbox"<?php checked( $auto_add ); ?> name="auto-add-pages" id="auto-add-pages" value="1" /> <label for="auto-add-pages"><?php printf( __('Automatically add new top-level pages to this menu' ), esc_url( admin_url( 'edit.php?post_type=page' ) ) ); ?></label></dd>
-								</dl>
-
-								<?php if ( current_theme_supports( 'menus' ) ) : ?>
-
-									<dl class="menu-theme-locations">
-										<dt class="howto"><?php _e( 'Theme locations' ); ?></dt>
-										<?php foreach ( $locations as $location => $description ) : ?>
-										<dd class="checkbox-input">
-											<input type="checkbox"<?php checked( isset( $menu_locations[ $location ] ) && $menu_locations[ $location ] == $nav_menu_selected_id ); ?> name="menu-locations[<?php echo esc_attr( $location ); ?>]" id="locations-<?php echo esc_attr( $location ); ?>" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" />
-											<label for="locations-<?php echo esc_attr( $location ); ?>"><?php echo $description; ?></label>
-											<?php if ( ! empty( $menu_locations[ $location ] ) && $menu_locations[ $location ] != $nav_menu_selected_id ) : ?>
-												<span class="theme-location-set"><?php
-													/* translators: %s: menu name */
-													printf( _x( '(Currently set to: %s)', 'menu location' ),
-														wp_get_nav_menu_object( $menu_locations[ $location ] )->name
-													);
-												?></span>
-											<?php endif; ?>
-										</dd>
-										<?php endforeach; ?>
-									</dl>
-
-								<?php endif; ?>
-
-							</div>
-						</div><!-- /#post-body-content -->
-					</div><!-- /#post-body -->
-					<div id="nav-menu-footer">
-						<div class="major-publishing-actions wp-clearfix">
-							<?php if ( 0 != $menu_count && ! $add_new_screen ) : ?>
-							<span class="delete-action">
-								<a class="submitdelete deletion menu-delete" href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'delete', 'menu' => $nav_menu_selected_id ), admin_url( 'nav-menus.php' ) ), 'delete-nav_menu-' . $nav_menu_selected_id) ); ?>"><?php _e('Delete Menu'); ?></a>
-							</span><!-- END .delete-action -->
-							<?php endif; ?>
-							<div class="publishing-action">
-								<?php submit_button( empty( $nav_menu_selected_id ) ? __( 'Create Menu' ) : __( 'Save Menu' ), 'primary large menu-save', 'save_menu', false, array( 'id' => 'save_menu_footer' ) ); ?>
-							</div><!-- END .publishing-action -->
-						</div><!-- END .major-publishing-actions -->
-					</div><!-- /#nav-menu-footer -->
-				</div><!-- /.menu-edit -->
-			</form><!-- /#update-nav-menu -->
-		</div><!-- /#menu-management -->
-	</div><!-- /#menu-management-liquid -->
-	</div><!-- /#nav-menus-frame -->
-	<?php endif; ?>
-</div><!-- /.wrap-->
-<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>
Index: www/wp-includes/Requests/Exception/HTTP/505.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/505.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_505.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/IXR/class-IXR-base64.php
===================================================================
--- www/wp-includes/IXR/class-IXR-base64.php	(revision 38565)
+++ www/wp-includes/autoload/ixr/IXR_Base64.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/customize/class-wp-customize-nav-menu-name-control.php
===================================================================
--- www/wp-includes/autoload/customize/class-wp-customize-nav-menu-name-control.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/customize/class-wp-customize-nav-menu-name-control.php	(revision UNDEFINED)
@@ -1,52 +0,0 @@
-<?php
-/**
- * Customize API: WP_Customize_Nav_Menu_Name_Control class
- *
- * @package WordPress
- * @subpackage Customize
- * @since 4.4.0
- */
-
-/**
- * Customize control to represent the name field for a given menu.
- *
- * @since 4.3.0
- *
- * @see WP_Customize_Control
- */
-class WP_Customize_Nav_Menu_Name_Control extends WP_Customize_Control {
-
-	/**
-	 * Type of control, used by JS.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var string
-	 */
-	public $type = 'nav_menu_name';
-
-	/**
-	 * No-op since we're using JS template.
-	 *
-	 * @since 4.3.0
-	 * @access protected
-	 */
-	protected function render_content() {}
-
-	/**
-	 * Render the Underscore template for this control.
-	 *
-	 * @since 4.3.0
-	 * @access protected
-	 */
-	protected function content_template() {
-		?>
-		<label>
-			<# if ( data.label ) { #>
-				<span class="customize-control-title screen-reader-text">{{ data.label }}</span>
-			<# } #>
-			<input type="text" class="menu-name-field live-update-section-title" />
-		</label>
-		<?php
-	}
-}
Index: www/wp-includes/autoload/pomo/entry.php
===================================================================
--- www/wp-includes/autoload/pomo/entry.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/pomo/entry.php	(revision UNDEFINED)
@@ -1,93 +0,0 @@
-<?php
-/**
- * Contains Translation_Entry class
- *
- * @version $Id: entry.php 1157 2015-11-20 04:30:11Z dd32 $
- * @package pomo
- * @subpackage entry
- */
-
-if ( ! class_exists( 'Translation_Entry', false ) ):
-/**
- * Translation_Entry class encapsulates a translatable string
- */
-class Translation_Entry {
-
-	/**
-	 * Whether the entry contains a string and its plural form, default is false
-	 *
-	 * @var boolean
-	 */
-	var $is_plural = false;
-
-	var $context = null;
-	var $singular = null;
-	var $plural = null;
-	var $translations = array();
-	var $translator_comments = '';
-	var $extracted_comments = '';
-	var $references = array();
-	var $flags = array();
-
-	/**
-	 * @param array $args associative array, support following keys:
-	 * 	- singular (string) -- the string to translate, if omitted and empty entry will be created
-	 * 	- plural (string) -- the plural form of the string, setting this will set {@link $is_plural} to true
-	 * 	- translations (array) -- translations of the string and possibly -- its plural forms
-	 * 	- context (string) -- a string differentiating two equal strings used in different contexts
-	 * 	- translator_comments (string) -- comments left by translators
-	 * 	- extracted_comments (string) -- comments left by developers
-	 * 	- references (array) -- places in the code this strings is used, in relative_to_root_path/file.php:linenum form
-	 * 	- flags (array) -- flags like php-format
-	 */
-	function __construct( $args = array() ) {
-		// if no singular -- empty object
-		if (!isset($args['singular'])) {
-			return;
-		}
-		// get member variable values from args hash
-		foreach ($args as $varname => $value) {
-			$this->$varname = $value;
-		}
-		if (isset($args['plural']) && $args['plural']) $this->is_plural = true;
-		if (!is_array($this->translations)) $this->translations = array();
-		if (!is_array($this->references)) $this->references = array();
-		if (!is_array($this->flags)) $this->flags = array();
-	}
-
-	/**
-	 * PHP4 constructor.
-	 */
-	public function Translation_Entry( $args = array() ) {
-		self::__construct( $args );
-	}
-
-	/**
-	 * Generates a unique key for this entry
-	 *
-	 * @return string|bool the key or false if the entry is empty
-	 */
-	function key() {
-		if ( null === $this->singular || '' === $this->singular ) return false;
-
-		// Prepend context and EOT, like in MO files
-		$key = !$this->context? $this->singular : $this->context.chr(4).$this->singular;
-		// Standardize on \n line endings
-		$key = str_replace( array( "\r\n", "\r" ), "\n", $key );
-
-		return $key;
-	}
-
-	/**
-	 * @param object $other
-	 */
-	function merge_with(&$other) {
-		$this->flags = array_unique( array_merge( $this->flags, $other->flags ) );
-		$this->references = array_unique( array_merge( $this->references, $other->references ) );
-		if ( $this->extracted_comments != $other->extracted_comments ) {
-			$this->extracted_comments .= $other->extracted_comments;
-		}
-
-	}
-}
-endif;
\ No newline at end of file
Index: www/wp-admin/constants/ftp.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/constants/ftp.php	(revision )
+++ www/wp-admin/constants/ftp.php	(revision )
@@ -0,0 +1,79 @@
+<?php
+
+/**
+ * PemFTP - A Ftp implementation in pure PHP
+ *
+ * @package PemFTP
+ * @since 2.5
+ *
+ * @version 1.0
+ * @copyright Alexey Dotsenko
+ * @author Alexey Dotsenko
+ * @link http://www.phpclasses.org/browse/package/1743.html Site
+ * @license LGPL http://www.opensource.org/licenses/lgpl-license.html
+ */
+
+/**
+ * Defines the newline characters, if not defined already.
+ *
+ * This can be redefined.
+ *
+ * @since 2.5
+ * @var string
+ */
+if(!defined('CRLF')) define('CRLF',"\r\n");
+
+/**
+ * Sets whatever to autodetect ASCII mode.
+ *
+ * This can be redefined.
+ *
+ * @since 2.5
+ * @var int
+ */
+if(!defined("FTP_AUTOASCII")) define("FTP_AUTOASCII", -1);
+
+/**
+ *
+ * This can be redefined.
+ * @since 2.5
+ * @var int
+ */
+if(!defined("FTP_BINARY")) define("FTP_BINARY", 1);
+
+/**
+ *
+ * This can be redefined.
+ * @since 2.5
+ * @var int
+ */
+if(!defined("FTP_ASCII")) define("FTP_ASCII", 0);
+
+/**
+ * Whether to force FTP.
+ *
+ * This can be redefined.
+ *
+ * @since 2.5
+ * @var bool
+ */
+if(!defined('FTP_FORCE')) define('FTP_FORCE', true);
+
+/**
+ * @since 2.5
+ * @var string
+ */
+define('FTP_OS_Unix','u');
+
+/**
+ * @since 2.5
+ * @var string
+ */
+define('FTP_OS_Windows','w');
+
+/**
+ * @since 2.5
+ * @var string
+ */
+define('FTP_OS_Mac','m');
+
Index: www/wp-admin/includes/class-plugin-installer-skin.php
===================================================================
--- www/wp-admin/includes/class-plugin-installer-skin.php	(revision 38565)
+++ www/wp-admin/autoload/upgrader/Plugin_Installer_Skin.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/autoload/deprecated/WP_User_Search.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/autoload/deprecated/WP_User_Search.php	(revision )
+++ www/wp-admin/autoload/deprecated/WP_User_Search.php	(revision )
@@ -0,0 +1,341 @@
+<?php
+
+/**
+ * WordPress User Search class.
+ *
+ * @since 2.1.0
+ * @deprecated 3.1.0 Use WP_User_Query
+ */
+class WP_User_Search {
+
+	/**
+	 * {@internal Missing Description}}
+	 *
+	 * @since 2.1.0
+	 * @access private
+	 * @var mixed
+	 */
+	var $results;
+
+	/**
+	 * {@internal Missing Description}}
+	 *
+	 * @since 2.1.0
+	 * @access private
+	 * @var string
+	 */
+	var $search_term;
+
+	/**
+	 * Page number.
+	 *
+	 * @since 2.1.0
+	 * @access private
+	 * @var int
+	 */
+	var $page;
+
+	/**
+	 * Role name that users have.
+	 *
+	 * @since 2.5.0
+	 * @access private
+	 * @var string
+	 */
+	var $role;
+
+	/**
+	 * Raw page number.
+	 *
+	 * @since 2.1.0
+	 * @access private
+	 * @var int|bool
+	 */
+	var $raw_page;
+
+	/**
+	 * Amount of users to display per page.
+	 *
+	 * @since 2.1.0
+	 * @access public
+	 * @var int
+	 */
+	var $users_per_page = 50;
+
+	/**
+	 * {@internal Missing Description}}
+	 *
+	 * @since 2.1.0
+	 * @access private
+	 * @var int
+	 */
+	var $first_user;
+
+	/**
+	 * {@internal Missing Description}}
+	 *
+	 * @since 2.1.0
+	 * @access private
+	 * @var int
+	 */
+	var $last_user;
+
+	/**
+	 * {@internal Missing Description}}
+	 *
+	 * @since 2.1.0
+	 * @access private
+	 * @var string
+	 */
+	var $query_limit;
+
+	/**
+	 * {@internal Missing Description}}
+	 *
+	 * @since 3.0.0
+	 * @access private
+	 * @var string
+	 */
+	var $query_orderby;
+
+	/**
+	 * {@internal Missing Description}}
+	 *
+	 * @since 3.0.0
+	 * @access private
+	 * @var string
+	 */
+	var $query_from;
+
+	/**
+	 * {@internal Missing Description}}
+	 *
+	 * @since 3.0.0
+	 * @access private
+	 * @var string
+	 */
+	var $query_where;
+
+	/**
+	 * {@internal Missing Description}}
+	 *
+	 * @since 2.1.0
+	 * @access private
+	 * @var int
+	 */
+	var $total_users_for_query = 0;
+
+	/**
+	 * {@internal Missing Description}}
+	 *
+	 * @since 2.1.0
+	 * @access private
+	 * @var bool
+	 */
+	var $too_many_total_users = false;
+
+	/**
+	 * {@internal Missing Description}}
+	 *
+	 * @since 2.1.0
+	 * @access private
+	 * @var WP_Error
+	 */
+	var $search_errors;
+
+	/**
+	 * {@internal Missing Description}}
+	 *
+	 * @since 2.7.0
+	 * @access private
+	 * @var string
+	 */
+	var $paging_text;
+
+	/**
+	 * PHP5 Constructor - Sets up the object properties.
+	 *
+	 * @since 2.1.0
+	 *
+	 * @param string $search_term Search terms string.
+	 * @param int $page Optional. Page ID.
+	 * @param string $role Role name.
+	 * @return WP_User_Search
+	 */
+	function __construct( $search_term = '', $page = '', $role = '' ) {
+		_deprecated_function( __FUNCTION__, '3.1.0', 'WP_User_Query' );
+
+		$this->search_term = wp_unslash( $search_term );
+		$this->raw_page = ( '' == $page ) ? false : (int) $page;
+		$this->page = (int) ( '' == $page ) ? 1 : $page;
+		$this->role = $role;
+
+		$this->prepare_query();
+		$this->query();
+		$this->do_paging();
+	}
+
+	/**
+	 * PHP4 Constructor - Sets up the object properties.
+	 *
+	 * @since 2.1.0
+	 *
+	 * @param string $search_term Search terms string.
+	 * @param int $page Optional. Page ID.
+	 * @param string $role Role name.
+	 * @return WP_User_Search
+	 */
+	public function WP_User_Search( $search_term = '', $page = '', $role = '' ) {
+		self::__construct( $search_term, $page, $role );
+	}
+
+	/**
+	 * Prepares the user search query (legacy).
+	 *
+	 * @since 2.1.0
+	 * @access public
+	 */
+	public function prepare_query() {
+		global $wpdb;
+		$this->first_user = ($this->page - 1) * $this->users_per_page;
+
+		$this->query_limit = $wpdb->prepare(" LIMIT %d, %d", $this->first_user, $this->users_per_page);
+		$this->query_orderby = ' ORDER BY user_login';
+
+		$search_sql = '';
+		if ( $this->search_term ) {
+			$searches = array();
+			$search_sql = 'AND (';
+			foreach ( array('user_login', 'user_nicename', 'user_email', 'user_url', 'display_name') as $col )
+				$searches[] = $wpdb->prepare( $col . ' LIKE %s', '%' . like_escape($this->search_term) . '%' );
+			$search_sql .= implode(' OR ', $searches);
+			$search_sql .= ')';
+		}
+
+		$this->query_from = " FROM $wpdb->users";
+		$this->query_where = " WHERE 1=1 $search_sql";
+
+		if ( $this->role ) {
+			$this->query_from .= " INNER JOIN $wpdb->usermeta ON $wpdb->users.ID = $wpdb->usermeta.user_id";
+			$this->query_where .= $wpdb->prepare(" AND $wpdb->usermeta.meta_key = '{$wpdb->prefix}capabilities' AND $wpdb->usermeta.meta_value LIKE %s", '%' . $this->role . '%');
+		} elseif ( is_multisite() ) {
+			$level_key = $wpdb->prefix . 'capabilities'; // wpmu site admins don't have user_levels
+			$this->query_from .= ", $wpdb->usermeta";
+			$this->query_where .= " AND $wpdb->users.ID = $wpdb->usermeta.user_id AND meta_key = '{$level_key}'";
+		}
+
+		do_action_ref_array( 'pre_user_search', array( &$this ) );
+	}
+
+	/**
+	 * Executes the user search query.
+	 *
+	 * @since 2.1.0
+	 * @access public
+	 */
+	public function query() {
+		global $wpdb;
+
+		$this->results = $wpdb->get_col("SELECT DISTINCT($wpdb->users.ID)" . $this->query_from . $this->query_where . $this->query_orderby . $this->query_limit);
+
+		if ( $this->results )
+			$this->total_users_for_query = $wpdb->get_var("SELECT COUNT(DISTINCT($wpdb->users.ID))" . $this->query_from . $this->query_where); // no limit
+		else
+			$this->search_errors = new WP_Error('no_matching_users_found', __('No users found.'));
+	}
+
+	/**
+	 * Prepares variables for use in templates.
+	 *
+	 * @since 2.1.0
+	 * @access public
+	 */
+	function prepare_vars_for_template_usage() {}
+
+	/**
+	 * Handles paging for the user search query.
+	 *
+	 * @since 2.1.0
+	 * @access public
+	 */
+	public function do_paging() {
+		if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results
+			$args = array();
+			if ( ! empty($this->search_term) )
+				$args['usersearch'] = urlencode($this->search_term);
+			if ( ! empty($this->role) )
+				$args['role'] = urlencode($this->role);
+
+			$this->paging_text = paginate_links( array(
+				'total' => ceil($this->total_users_for_query / $this->users_per_page),
+				'current' => $this->page,
+				'base' => 'users.php?%_%',
+				'format' => 'userspage=%#%',
+				'add_args' => $args
+			) );
+			if ( $this->paging_text ) {
+				$this->paging_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s&#8211;%s of %s' ) . '</span>%s',
+					number_format_i18n( ( $this->page - 1 ) * $this->users_per_page + 1 ),
+					number_format_i18n( min( $this->page * $this->users_per_page, $this->total_users_for_query ) ),
+					number_format_i18n( $this->total_users_for_query ),
+					$this->paging_text
+				);
+			}
+		}
+	}
+
+	/**
+	 * Retrieves the user search query results.
+	 *
+	 * @since 2.1.0
+	 * @access public
+	 *
+	 * @return array
+	 */
+	public function get_results() {
+		return (array) $this->results;
+	}
+
+	/**
+	 * Displaying paging text.
+	 *
+	 * @see do_paging() Builds paging text.
+	 *
+	 * @since 2.1.0
+	 * @access public
+	 */
+	function page_links() {
+		echo $this->paging_text;
+	}
+
+	/**
+	 * Whether paging is enabled.
+	 *
+	 * @see do_paging() Builds paging text.
+	 *
+	 * @since 2.1.0
+	 * @access public
+	 *
+	 * @return bool
+	 */
+	function results_are_paged() {
+		if ( $this->paging_text )
+			return true;
+		return false;
+	}
+
+	/**
+	 * Whether there are search terms.
+	 *
+	 * @since 2.1.0
+	 * @access public
+	 *
+	 * @return bool
+	 */
+	function is_search() {
+		if ( $this->search_term )
+			return true;
+		return false;
+	}
+}
+
Index: www/wp-includes/Requests/Proxy.php
===================================================================
--- www/wp-includes/Requests/Proxy.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Proxy.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/requests/Exception/HTTP/417.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/417.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/417.php	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-<?php
-/**
- * Exception for 417 Expectation Failed responses
- *
- * @package Requests
- */
-
-/**
- * Exception for 417 Expectation Failed responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_417 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 417;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Expectation Failed';
-}
\ No newline at end of file
Index: www/wp-includes/customize/class-wp-customize-upload-control.php
===================================================================
--- www/wp-includes/customize/class-wp-customize-upload-control.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Upload_Control.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-http-streams.php
===================================================================
--- www/wp-includes/class-wp-http-streams.php	(revision 38565)
+++ www/wp-includes/autoload/http/WP_Http_Streams.php	(revision )
@@ -411,18 +411,3 @@
 		return apply_filters( 'use_streams_transport', true, $args );
 	}
 }
-
-/**
- * Deprecated HTTP Transport method which used fsockopen.
- *
- * This class is not used, and is included for backward compatibility only.
- * All code should make use of WP_Http directly through its API.
- *
- * @see WP_HTTP::request
- *
- * @since 2.7.0
- * @deprecated 3.7.0 Please use WP_HTTP::request() directly
- */
-class WP_HTTP_Fsockopen extends WP_HTTP_Streams {
-	// For backward compatibility for users who are using the class directly.
-}
Index: www/wp-admin/includes/class-language-pack-upgrader-skin.php
===================================================================
--- www/wp-admin/includes/class-language-pack-upgrader-skin.php	(revision 38565)
+++ www/wp-admin/autoload/upgrader/Language_Pack_Upgrader_Skin.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/customize/class-wp-customize-themes-section.php
===================================================================
--- www/wp-includes/autoload/customize/class-wp-customize-themes-section.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/customize/class-wp-customize-themes-section.php	(revision UNDEFINED)
@@ -1,86 +0,0 @@
-<?php
-/**
- * Customize API: WP_Customize_Themes_Section class
- *
- * @package WordPress
- * @subpackage Customize
- * @since 4.4.0
- */
-
-/**
- * Customize Themes Section class.
- *
- * A UI container for theme controls, which behaves like a backwards Panel.
- *
- * @since 4.2.0
- *
- * @see WP_Customize_Section
- */
-class WP_Customize_Themes_Section extends WP_Customize_Section {
-
-	/**
-	 * Customize section type.
-	 *
-	 * @since 4.2.0
-	 * @access public
-	 * @var string
-	 */
-	public $type = 'themes';
-
-	/**
-	 * Render the themes section, which behaves like a panel.
-	 *
-	 * @since 4.2.0
-	 * @access protected
-	 */
-	protected function render() {
-		$classes = 'accordion-section control-section control-section-' . $this->type;
-		?>
-		<li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="<?php echo esc_attr( $classes ); ?>">
-			<h3 class="accordion-section-title">
-				<?php
-				if ( $this->manager->is_theme_active() ) {
-					echo '<span class="customize-action">' . __( 'Active theme' ) . '</span> ' . $this->title;
-				} else {
-					echo '<span class="customize-action">' . __( 'Previewing theme' ) . '</span> ' . $this->title;
-				}
-				?>
-
-				<?php if ( count( $this->controls ) > 0 ) : ?>
-					<button type="button" class="button change-theme" tabindex="0"><?php _ex( 'Change', 'theme' ); ?></button>
-				<?php endif; ?>
-			</h3>
-			<div class="customize-themes-panel control-panel-content themes-php">
-				<h3 class="accordion-section-title customize-section-title">
-					<span class="customize-action"><?php _e( 'Customizing' ); ?></span>
-					<?php _e( 'Themes' ); ?>
-					<span class="title-count theme-count"><?php echo count( $this->controls ) + 1 /* Active theme */; ?></span>
-				</h3>
-				<h3 class="accordion-section-title customize-section-title">
-					<?php
-					if ( $this->manager->is_theme_active() ) {
-						echo '<span class="customize-action">' . __( 'Active theme' ) . '</span> ' . $this->title;
-					} else {
-						echo '<span class="customize-action">' . __( 'Previewing theme' ) . '</span> ' . $this->title;
-					}
-					?>
-					<button type="button" class="button customize-theme"><?php _e( 'Customize' ); ?></button>
-				</h3>
-
-				<div class="theme-overlay" tabindex="0" role="dialog" aria-label="<?php esc_attr_e( 'Theme Details' ); ?>"></div>
-
-				<div id="customize-container"></div>
-				<?php if ( count( $this->controls ) > 4 ) : ?>
-					<p><label for="themes-filter">
-						<span class="screen-reader-text"><?php _e( 'Search installed themes&hellip;' ); ?></span>
-						<input type="text" id="themes-filter" placeholder="<?php esc_attr_e( 'Search installed themes&hellip;' ); ?>" />
-					</label></p>
-				<?php endif; ?>
-				<div class="theme-browser rendered">
-					<ul class="themes accordion-section-content">
-					</ul>
-				</div>
-			</div>
-		</li>
-<?php }
-}
Index: www/wp-includes/autoload/id3/ID3/module.audio.ac3.php
===================================================================
--- www/wp-includes/autoload/id3/ID3/module.audio.ac3.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/id3/ID3/module.audio.ac3.php	(revision UNDEFINED)
@@ -1,474 +0,0 @@
-<?php
-/////////////////////////////////////////////////////////////////
-/// getID3() by James Heinrich <info@getid3.org>               //
-//  available at http://getid3.sourceforge.net                 //
-//            or http://www.getid3.org                         //
-//          also https://github.com/JamesHeinrich/getID3       //
-/////////////////////////////////////////////////////////////////
-// See readme.txt for more details                             //
-/////////////////////////////////////////////////////////////////
-//                                                             //
-// module.audio.ac3.php                                        //
-// module for analyzing AC-3 (aka Dolby Digital) audio files   //
-// dependencies: NONE                                          //
-//                                                            ///
-/////////////////////////////////////////////////////////////////
-
-
-class getid3_ac3 extends getid3_handler
-{
-    private $AC3header = array();
-    private $BSIoffset = 0;
-
-    const syncword = "\x0B\x77";
-
-	public function Analyze() {
-		$info = &$this->getid3->info;
-
-		///AH
-		$info['ac3']['raw']['bsi'] = array();
-		$thisfile_ac3              = &$info['ac3'];
-		$thisfile_ac3_raw          = &$thisfile_ac3['raw'];
-		$thisfile_ac3_raw_bsi      = &$thisfile_ac3_raw['bsi'];
-
-
-		// http://www.atsc.org/standards/a_52a.pdf
-
-		$info['fileformat'] = 'ac3';
-
-		// An AC-3 serial coded audio bit stream is made up of a sequence of synchronization frames
-		// Each synchronization frame contains 6 coded audio blocks (AB), each of which represent 256
-		// new audio samples per channel. A synchronization information (SI) header at the beginning
-		// of each frame contains information needed to acquire and maintain synchronization. A
-		// bit stream information (BSI) header follows SI, and contains parameters describing the coded
-		// audio service. The coded audio blocks may be followed by an auxiliary data (Aux) field. At the
-		// end of each frame is an error check field that includes a CRC word for error detection. An
-		// additional CRC word is located in the SI header, the use of which, by a decoder, is optional.
-		//
-		// syncinfo() | bsi() | AB0 | AB1 | AB2 | AB3 | AB4 | AB5 | Aux | CRC
-
-		// syncinfo() {
-		// 	 syncword    16
-		// 	 crc1        16
-		// 	 fscod        2
-		// 	 frmsizecod   6
-		// } /* end of syncinfo */
-
-		$this->fseek($info['avdataoffset']);
-		$this->AC3header['syncinfo'] = $this->fread(5);
-
-		if (strpos($this->AC3header['syncinfo'], self::syncword) === 0) {
-			$thisfile_ac3_raw['synchinfo']['synchword'] = self::syncword;
-			$offset = 2;
-		} else {
-			if (!$this->isDependencyFor('matroska')) {
-				unset($info['fileformat'], $info['ac3']);
-				return $this->error('Expecting "'.getid3_lib::PrintHexBytes(self::syncword).'" at offset '.$info['avdataoffset'].', found "'.getid3_lib::PrintHexBytes(substr($this->AC3header['syncinfo'], 0, 2)).'"');
-			}
-			$offset = 0;
-			$this->fseek(-2, SEEK_CUR);
-		}
-
-		$info['audio']['dataformat']   = 'ac3';
-		$info['audio']['bitrate_mode'] = 'cbr';
-		$info['audio']['lossless']     = false;
-
-		$thisfile_ac3_raw['synchinfo']['crc1']       = getid3_lib::LittleEndian2Int(substr($this->AC3header['syncinfo'], $offset, 2));
-		$ac3_synchinfo_fscod_frmsizecod              = getid3_lib::LittleEndian2Int(substr($this->AC3header['syncinfo'], ($offset + 2), 1));
-		$thisfile_ac3_raw['synchinfo']['fscod']      = ($ac3_synchinfo_fscod_frmsizecod & 0xC0) >> 6;
-		$thisfile_ac3_raw['synchinfo']['frmsizecod'] = ($ac3_synchinfo_fscod_frmsizecod & 0x3F);
-
-		$thisfile_ac3['sample_rate'] = self::sampleRateCodeLookup($thisfile_ac3_raw['synchinfo']['fscod']);
-		if ($thisfile_ac3_raw['synchinfo']['fscod'] <= 3) {
-			$info['audio']['sample_rate'] = $thisfile_ac3['sample_rate'];
-		}
-
-		$thisfile_ac3['frame_length'] = self::frameSizeLookup($thisfile_ac3_raw['synchinfo']['frmsizecod'], $thisfile_ac3_raw['synchinfo']['fscod']);
-		$thisfile_ac3['bitrate']      = self::bitrateLookup($thisfile_ac3_raw['synchinfo']['frmsizecod']);
-		$info['audio']['bitrate'] = $thisfile_ac3['bitrate'];
-
-		$this->AC3header['bsi'] = getid3_lib::BigEndian2Bin($this->fread(15));
-		$ac3_bsi_offset = 0;
-
-		$thisfile_ac3_raw_bsi['bsid'] = $this->readHeaderBSI(5);
-		if ($thisfile_ac3_raw_bsi['bsid'] > 8) {
-			// Decoders which can decode version 8 will thus be able to decode version numbers less than 8.
-			// If this standard is extended by the addition of additional elements or features, a value of bsid greater than 8 will be used.
-			// Decoders built to this version of the standard will not be able to decode versions with bsid greater than 8.
-			$this->error('Bit stream identification is version '.$thisfile_ac3_raw_bsi['bsid'].', but getID3() only understands up to version 8');
-		    unset($info['ac3']);
-			return false;
-		}
-
-		$thisfile_ac3_raw_bsi['bsmod'] = $this->readHeaderBSI(3);
-		$thisfile_ac3_raw_bsi['acmod'] = $this->readHeaderBSI(3);
-
-		$thisfile_ac3['service_type'] = self::serviceTypeLookup($thisfile_ac3_raw_bsi['bsmod'], $thisfile_ac3_raw_bsi['acmod']);
-		$ac3_coding_mode = self::audioCodingModeLookup($thisfile_ac3_raw_bsi['acmod']);
-		foreach($ac3_coding_mode as $key => $value) {
-			$thisfile_ac3[$key] = $value;
-		}
-		switch ($thisfile_ac3_raw_bsi['acmod']) {
-			case 0:
-			case 1:
-				$info['audio']['channelmode'] = 'mono';
-				break;
-			case 3:
-			case 4:
-				$info['audio']['channelmode'] = 'stereo';
-				break;
-			default:
-				$info['audio']['channelmode'] = 'surround';
-				break;
-		}
-		$info['audio']['channels'] = $thisfile_ac3['num_channels'];
-
-		if ($thisfile_ac3_raw_bsi['acmod'] & 0x01) {
-			// If the lsb of acmod is a 1, center channel is in use and cmixlev follows in the bit stream.
-			$thisfile_ac3_raw_bsi['cmixlev'] = $this->readHeaderBSI(2);
-			$thisfile_ac3['center_mix_level'] = self::centerMixLevelLookup($thisfile_ac3_raw_bsi['cmixlev']);
-		}
-
-		if ($thisfile_ac3_raw_bsi['acmod'] & 0x04) {
-			// If the msb of acmod is a 1, surround channels are in use and surmixlev follows in the bit stream.
-			$thisfile_ac3_raw_bsi['surmixlev'] = $this->readHeaderBSI(2);
-			$thisfile_ac3['surround_mix_level'] = self::surroundMixLevelLookup($thisfile_ac3_raw_bsi['surmixlev']);
-		}
-
-		if ($thisfile_ac3_raw_bsi['acmod'] == 0x02) {
-			// When operating in the two channel mode, this 2-bit code indicates whether or not the program has been encoded in Dolby Surround.
-			$thisfile_ac3_raw_bsi['dsurmod'] = $this->readHeaderBSI(2);
-			$thisfile_ac3['dolby_surround_mode'] = self::dolbySurroundModeLookup($thisfile_ac3_raw_bsi['dsurmod']);
-		}
-
-		$thisfile_ac3_raw_bsi['lfeon'] = (bool) $this->readHeaderBSI(1);
-		$thisfile_ac3['lfe_enabled'] = $thisfile_ac3_raw_bsi['lfeon'];
-		if ($thisfile_ac3_raw_bsi['lfeon']) {
-			//$info['audio']['channels']++;
-			$info['audio']['channels'] .= '.1';
-		}
-
-		$thisfile_ac3['channels_enabled'] = self::channelsEnabledLookup($thisfile_ac3_raw_bsi['acmod'], $thisfile_ac3_raw_bsi['lfeon']);
-
-		// This indicates how far the average dialogue level is below digital 100 percent. Valid values are 1-31.
-		// The value of 0 is reserved. The values of 1 to 31 are interpreted as -1 dB to -31 dB with respect to digital 100 percent.
-		$thisfile_ac3_raw_bsi['dialnorm'] = $this->readHeaderBSI(5);
-		$thisfile_ac3['dialogue_normalization'] = '-'.$thisfile_ac3_raw_bsi['dialnorm'].'dB';
-
-		$thisfile_ac3_raw_bsi['compre_flag'] = (bool) $this->readHeaderBSI(1);
-		if ($thisfile_ac3_raw_bsi['compre_flag']) {
-			$thisfile_ac3_raw_bsi['compr'] = $this->readHeaderBSI(8);
-			$thisfile_ac3['heavy_compression'] = self::heavyCompression($thisfile_ac3_raw_bsi['compr']);
-		}
-
-		$thisfile_ac3_raw_bsi['langcode_flag'] = (bool) $this->readHeaderBSI(1);
-		if ($thisfile_ac3_raw_bsi['langcode_flag']) {
-			$thisfile_ac3_raw_bsi['langcod'] = $this->readHeaderBSI(8);
-		}
-
-		$thisfile_ac3_raw_bsi['audprodie'] = (bool) $this->readHeaderBSI(1);
-		if ($thisfile_ac3_raw_bsi['audprodie']) {
-			$thisfile_ac3_raw_bsi['mixlevel'] = $this->readHeaderBSI(5);
-			$thisfile_ac3_raw_bsi['roomtyp']  = $this->readHeaderBSI(2);
-
-			$thisfile_ac3['mixing_level'] = (80 + $thisfile_ac3_raw_bsi['mixlevel']).'dB';
-			$thisfile_ac3['room_type']    = self::roomTypeLookup($thisfile_ac3_raw_bsi['roomtyp']);
-		}
-
-		if ($thisfile_ac3_raw_bsi['acmod'] == 0x00) {
-			// If acmod is 0, then two completely independent program channels (dual mono)
-			// are encoded into the bit stream, and are referenced as Ch1, Ch2. In this case,
-			// a number of additional items are present in BSI or audblk to fully describe Ch2.
-
-			// This indicates how far the average dialogue level is below digital 100 percent. Valid values are 1-31.
-			// The value of 0 is reserved. The values of 1 to 31 are interpreted as -1 dB to -31 dB with respect to digital 100 percent.
-			$thisfile_ac3_raw_bsi['dialnorm2'] = $this->readHeaderBSI(5);
-			$thisfile_ac3['dialogue_normalization2'] = '-'.$thisfile_ac3_raw_bsi['dialnorm2'].'dB';
-
-			$thisfile_ac3_raw_bsi['compre_flag2'] = (bool) $this->readHeaderBSI(1);
-			if ($thisfile_ac3_raw_bsi['compre_flag2']) {
-				$thisfile_ac3_raw_bsi['compr2'] = $this->readHeaderBSI(8);
-				$thisfile_ac3['heavy_compression2'] = self::heavyCompression($thisfile_ac3_raw_bsi['compr2']);
-			}
-
-			$thisfile_ac3_raw_bsi['langcode_flag2'] = (bool) $this->readHeaderBSI(1);
-			if ($thisfile_ac3_raw_bsi['langcode_flag2']) {
-				$thisfile_ac3_raw_bsi['langcod2'] = $this->readHeaderBSI(8);
-			}
-
-			$thisfile_ac3_raw_bsi['audprodie2'] = (bool) $this->readHeaderBSI(1);
-			if ($thisfile_ac3_raw_bsi['audprodie2']) {
-				$thisfile_ac3_raw_bsi['mixlevel2'] = $this->readHeaderBSI(5);
-				$thisfile_ac3_raw_bsi['roomtyp2']  = $this->readHeaderBSI(2);
-
-				$thisfile_ac3['mixing_level2'] = (80 + $thisfile_ac3_raw_bsi['mixlevel2']).'dB';
-				$thisfile_ac3['room_type2']    = self::roomTypeLookup($thisfile_ac3_raw_bsi['roomtyp2']);
-			}
-
-		}
-
-		$thisfile_ac3_raw_bsi['copyright'] = (bool) $this->readHeaderBSI(1);
-
-		$thisfile_ac3_raw_bsi['original']  = (bool) $this->readHeaderBSI(1);
-
-		$thisfile_ac3_raw_bsi['timecode1_flag'] = (bool) $this->readHeaderBSI(1);
-		if ($thisfile_ac3_raw_bsi['timecode1_flag']) {
-			$thisfile_ac3_raw_bsi['timecode1'] = $this->readHeaderBSI(14);
-		}
-
-		$thisfile_ac3_raw_bsi['timecode2_flag'] = (bool) $this->readHeaderBSI(1);
-		if ($thisfile_ac3_raw_bsi['timecode2_flag']) {
-			$thisfile_ac3_raw_bsi['timecode2'] = $this->readHeaderBSI(14);
-		}
-
-		$thisfile_ac3_raw_bsi['addbsi_flag'] = (bool) $this->readHeaderBSI(1);
-		if ($thisfile_ac3_raw_bsi['addbsi_flag']) {
-			$thisfile_ac3_raw_bsi['addbsi_length'] = $this->readHeaderBSI(6);
-
-			$this->AC3header['bsi'] .= getid3_lib::BigEndian2Bin($this->fread($thisfile_ac3_raw_bsi['addbsi_length']));
-
-			$thisfile_ac3_raw_bsi['addbsi_data'] = substr($this->AC3header['bsi'], $this->BSIoffset, $thisfile_ac3_raw_bsi['addbsi_length'] * 8);
-			$this->BSIoffset += $thisfile_ac3_raw_bsi['addbsi_length'] * 8;
-		}
-
-		return true;
-	}
-
-	private function readHeaderBSI($length) {
-		$data = substr($this->AC3header['bsi'], $this->BSIoffset, $length);
-		$this->BSIoffset += $length;
-
-		return bindec($data);
-	}
-
-	public static function sampleRateCodeLookup($fscod) {
-		static $sampleRateCodeLookup = array(
-			0 => 48000,
-			1 => 44100,
-			2 => 32000,
-			3 => 'reserved' // If the reserved code is indicated, the decoder should not attempt to decode audio and should mute.
-		);
-		return (isset($sampleRateCodeLookup[$fscod]) ? $sampleRateCodeLookup[$fscod] : false);
-	}
-
-	public static function serviceTypeLookup($bsmod, $acmod) {
-		static $serviceTypeLookup = array();
-		if (empty($serviceTypeLookup)) {
-			for ($i = 0; $i <= 7; $i++) {
-				$serviceTypeLookup[0][$i] = 'main audio service: complete main (CM)';
-				$serviceTypeLookup[1][$i] = 'main audio service: music and effects (ME)';
-				$serviceTypeLookup[2][$i] = 'associated service: visually impaired (VI)';
-				$serviceTypeLookup[3][$i] = 'associated service: hearing impaired (HI)';
-				$serviceTypeLookup[4][$i] = 'associated service: dialogue (D)';
-				$serviceTypeLookup[5][$i] = 'associated service: commentary (C)';
-				$serviceTypeLookup[6][$i] = 'associated service: emergency (E)';
-			}
-
-			$serviceTypeLookup[7][1]      = 'associated service: voice over (VO)';
-			for ($i = 2; $i <= 7; $i++) {
-				$serviceTypeLookup[7][$i] = 'main audio service: karaoke';
-			}
-		}
-		return (isset($serviceTypeLookup[$bsmod][$acmod]) ? $serviceTypeLookup[$bsmod][$acmod] : false);
-	}
-
-	public static function audioCodingModeLookup($acmod) {
-		// array(channel configuration, # channels (not incl LFE), channel order)
-		static $audioCodingModeLookup = array (
-			0 => array('channel_config'=>'1+1', 'num_channels'=>2, 'channel_order'=>'Ch1,Ch2'),
-			1 => array('channel_config'=>'1/0', 'num_channels'=>1, 'channel_order'=>'C'),
-			2 => array('channel_config'=>'2/0', 'num_channels'=>2, 'channel_order'=>'L,R'),
-			3 => array('channel_config'=>'3/0', 'num_channels'=>3, 'channel_order'=>'L,C,R'),
-			4 => array('channel_config'=>'2/1', 'num_channels'=>3, 'channel_order'=>'L,R,S'),
-			5 => array('channel_config'=>'3/1', 'num_channels'=>4, 'channel_order'=>'L,C,R,S'),
-			6 => array('channel_config'=>'2/2', 'num_channels'=>4, 'channel_order'=>'L,R,SL,SR'),
-			7 => array('channel_config'=>'3/2', 'num_channels'=>5, 'channel_order'=>'L,C,R,SL,SR'),
-		);
-		return (isset($audioCodingModeLookup[$acmod]) ? $audioCodingModeLookup[$acmod] : false);
-	}
-
-	public static function centerMixLevelLookup($cmixlev) {
-		static $centerMixLevelLookup;
-		if (empty($centerMixLevelLookup)) {
-			$centerMixLevelLookup = array(
-				0 => pow(2, -3.0 / 6), // 0.707 (-3.0 dB)
-				1 => pow(2, -4.5 / 6), // 0.595 (-4.5 dB)
-				2 => pow(2, -6.0 / 6), // 0.500 (-6.0 dB)
-				3 => 'reserved'
-			);
-		}
-		return (isset($centerMixLevelLookup[$cmixlev]) ? $centerMixLevelLookup[$cmixlev] : false);
-	}
-
-	public static function surroundMixLevelLookup($surmixlev) {
-		static $surroundMixLevelLookup;
-		if (empty($surroundMixLevelLookup)) {
-			$surroundMixLevelLookup = array(
-				0 => pow(2, -3.0 / 6),
-				1 => pow(2, -6.0 / 6),
-				2 => 0,
-				3 => 'reserved'
-			);
-		}
-		return (isset($surroundMixLevelLookup[$surmixlev]) ? $surroundMixLevelLookup[$surmixlev] : false);
-	}
-
-	public static function dolbySurroundModeLookup($dsurmod) {
-		static $dolbySurroundModeLookup = array(
-			0 => 'not indicated',
-			1 => 'Not Dolby Surround encoded',
-			2 => 'Dolby Surround encoded',
-			3 => 'reserved'
-		);
-		return (isset($dolbySurroundModeLookup[$dsurmod]) ? $dolbySurroundModeLookup[$dsurmod] : false);
-	}
-
-	public static function channelsEnabledLookup($acmod, $lfeon) {
-		$lookup = array(
-			'ch1'=>(bool) ($acmod == 0),
-			'ch2'=>(bool) ($acmod == 0),
-			'left'=>(bool) ($acmod > 1),
-			'right'=>(bool) ($acmod > 1),
-			'center'=>(bool) ($acmod & 0x01),
-			'surround_mono'=>false,
-			'surround_left'=>false,
-			'surround_right'=>false,
-			'lfe'=>$lfeon);
-		switch ($acmod) {
-			case 4:
-			case 5:
-				$lookup['surround_mono']  = true;
-				break;
-			case 6:
-			case 7:
-				$lookup['surround_left']  = true;
-				$lookup['surround_right'] = true;
-				break;
-		}
-		return $lookup;
-	}
-
-	public static function heavyCompression($compre) {
-		// The first four bits indicate gain changes in 6.02dB increments which can be
-		// implemented with an arithmetic shift operation. The following four bits
-		// indicate linear gain changes, and require a 5-bit multiply.
-		// We will represent the two 4-bit fields of compr as follows:
-		//   X0 X1 X2 X3 . Y4 Y5 Y6 Y7
-		// The meaning of the X values is most simply described by considering X to represent a 4-bit
-		// signed integer with values from -8 to +7. The gain indicated by X is then (X + 1) * 6.02 dB. The
-		// following table shows this in detail.
-
-		// Meaning of 4 msb of compr
-		//  7    +48.16 dB
-		//  6    +42.14 dB
-		//  5    +36.12 dB
-		//  4    +30.10 dB
-		//  3    +24.08 dB
-		//  2    +18.06 dB
-		//  1    +12.04 dB
-		//  0     +6.02 dB
-		// -1         0 dB
-		// -2     -6.02 dB
-		// -3    -12.04 dB
-		// -4    -18.06 dB
-		// -5    -24.08 dB
-		// -6    -30.10 dB
-		// -7    -36.12 dB
-		// -8    -42.14 dB
-
-		$fourbit = str_pad(decbin(($compre & 0xF0) >> 4), 4, '0', STR_PAD_LEFT);
-		if ($fourbit{0} == '1') {
-			$log_gain = -8 + bindec(substr($fourbit, 1));
-		} else {
-			$log_gain = bindec(substr($fourbit, 1));
-		}
-		$log_gain = ($log_gain + 1) * getid3_lib::RGADamplitude2dB(2);
-
-		// The value of Y is a linear representation of a gain change of up to -6 dB. Y is considered to
-		// be an unsigned fractional integer, with a leading value of 1, or: 0.1 Y4 Y5 Y6 Y7 (base 2). Y can
-		// represent values between 0.111112 (or 31/32) and 0.100002 (or 1/2). Thus, Y can represent gain
-		// changes from -0.28 dB to -6.02 dB.
-
-		$lin_gain = (16 + ($compre & 0x0F)) / 32;
-
-		// The combination of X and Y values allows compr to indicate gain changes from
-		//  48.16 - 0.28 = +47.89 dB, to
-		// -42.14 - 6.02 = -48.16 dB.
-
-		return $log_gain - $lin_gain;
-	}
-
-	public static function roomTypeLookup($roomtyp) {
-		static $roomTypeLookup = array(
-			0 => 'not indicated',
-			1 => 'large room, X curve monitor',
-			2 => 'small room, flat monitor',
-			3 => 'reserved'
-		);
-		return (isset($roomTypeLookup[$roomtyp]) ? $roomTypeLookup[$roomtyp] : false);
-	}
-
-	public static function frameSizeLookup($frmsizecod, $fscod) {
-		$padding     = (bool) ($frmsizecod % 2);
-		$framesizeid =   floor($frmsizecod / 2);
-
-		static $frameSizeLookup = array();
-		if (empty($frameSizeLookup)) {
-			$frameSizeLookup = array (
-				0  => array(128, 138, 192),
-				1  => array(40, 160, 174, 240),
-				2  => array(48, 192, 208, 288),
-				3  => array(56, 224, 242, 336),
-				4  => array(64, 256, 278, 384),
-				5  => array(80, 320, 348, 480),
-				6  => array(96, 384, 416, 576),
-				7  => array(112, 448, 486, 672),
-				8  => array(128, 512, 556, 768),
-				9  => array(160, 640, 696, 960),
-				10 => array(192, 768, 834, 1152),
-				11 => array(224, 896, 974, 1344),
-				12 => array(256, 1024, 1114, 1536),
-				13 => array(320, 1280, 1392, 1920),
-				14 => array(384, 1536, 1670, 2304),
-				15 => array(448, 1792, 1950, 2688),
-				16 => array(512, 2048, 2228, 3072),
-				17 => array(576, 2304, 2506, 3456),
-				18 => array(640, 2560, 2786, 3840)
-			);
-		}
-		if (($fscod == 1) && $padding) {
-			// frame lengths are padded by 1 word (16 bits) at 44100
-			$frameSizeLookup[$frmsizecod] += 2;
-		}
-		return (isset($frameSizeLookup[$framesizeid][$fscod]) ? $frameSizeLookup[$framesizeid][$fscod] : false);
-	}
-
-	public static function bitrateLookup($frmsizecod) {
-		$framesizeid =   floor($frmsizecod / 2);
-
-		static $bitrateLookup = array(
-			0  => 32000,
-			1  => 40000,
-			2  => 48000,
-			3  => 56000,
-			4  => 64000,
-			5  => 80000,
-			6  => 96000,
-			7  => 112000,
-			8  => 128000,
-			9  => 160000,
-			10 => 192000,
-			11 => 224000,
-			12 => 256000,
-			13 => 320000,
-			14 => 384000,
-			15 => 448000,
-			16 => 512000,
-			17 => 576000,
-			18 => 640000
-		);
-		return (isset($bitrateLookup[$framesizeid]) ? $bitrateLookup[$framesizeid] : false);
-	}
-
-
-}
Index: www/wp-includes/Requests/Hooks.php
===================================================================
--- www/wp-includes/Requests/Hooks.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Hooks.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-comment-query.php
===================================================================
--- www/wp-includes/class-wp-comment-query.php	(revision 38565)
+++ www/wp-includes/autoload/query/WP_Comment_Query.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-http-encoding.php
===================================================================
--- www/wp-includes/class-wp-http-encoding.php	(revision 38565)
+++ www/wp-includes/autoload/http/WP_Http_Encoding.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/options-head.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/options-head.php	(revision 38565)
+++ www/wp-admin/options-head.php	(revision 38565)
@@ -1,18 +0,0 @@
-<?php
-/**
- * WordPress Options Header.
- *
- * Displays updated message, if updated variable is part of the URL query.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-wp_reset_vars( array( 'action' ) );
-
-if ( isset( $_GET['updated'] ) && isset( $_GET['page'] ) ) {
-	// For back-compat with plugins that don't use the Settings API and just set updated=1 in the redirect.
-	add_settings_error('general', 'settings_updated', __('Settings saved.'), 'updated');
-}
-
-settings_errors();
Index: www/wp-includes/Requests/Utility/FilteredIterator.php
===================================================================
--- www/wp-includes/Requests/Utility/FilteredIterator.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Utility_FilteredIterator.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/Requests/Exception/Transport/cURL.php
===================================================================
--- www/wp-includes/Requests/Exception/Transport/cURL.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_Transport_cURL.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-oembed-controller.php
===================================================================
--- www/wp-includes/class-wp-oembed-controller.php	(revision 38565)
+++ www/wp-includes/autoload/embed/WP_oEmbed_Controller.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/bookmark-template.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/bookmark-template.php	(revision 38565)
+++ www/wp-includes/bookmark-template.php	(revision 38565)
@@ -1,304 +0,0 @@
-<?php
-/**
- * Bookmark Template Functions for usage in Themes
- *
- * @package WordPress
- * @subpackage Template
- */
-
-/**
- * The formatted output of a list of bookmarks.
- *
- * The $bookmarks array must contain bookmark objects and will be iterated over
- * to retrieve the bookmark to be used in the output.
- *
- * The output is formatted as HTML with no way to change that format. However,
- * what is between, before, and after can be changed. The link itself will be
- * HTML.
- *
- * This function is used internally by wp_list_bookmarks() and should not be
- * used by themes.
- *
- * @since 2.1.0
- * @access private
- *
- * @param array $bookmarks List of bookmarks to traverse.
- * @param string|array $args {
- *     Optional. Bookmarks arguments.
- *
- *     @type int|bool $show_updated     Whether to show the time the bookmark was last updated.
- *                                      Accepts 1|true or 0|false. Default 0|false.
- *     @type int|bool $show_description Whether to show the bookmakr description. Accepts 1|true,
- *                                      Accepts 1|true or 0|false. Default 0|false.
- *     @type int|bool $show_images      Whether to show the link image if available. Accepts 1|true
- *                                      or 0|false. Default 1|true.
- *     @type int|bool $show_name        Whether to show link name if available. Accepts 1|true or
- *                                      0|false. Default 0|false.
- *     @type string   $before           The HTML or text to prepend to each bookmark. Default `<li>`.
- *     @type string   $after            The HTML or text to append to each bookmark. Default `</li>`.
- *     @type string   $link_before      The HTML or text to prepend to each bookmark inside the anchor
- *                                      tags. Default empty.
- *     @type string   $link_after       The HTML or text to append to each bookmark inside the anchor
- *                                      tags. Default empty.
- *     @type string   $between          The string for use in between the link, description, and image.
- *                                      Default "\n".
- *     @type int|bool $show_rating      Whether to show the link rating. Accepts 1|true or 0|false.
- *                                      Default 0|false.
- *
- * }
- * @return string Formatted output in HTML
- */
-function _walk_bookmarks( $bookmarks, $args = '' ) {
-	$defaults = array(
-		'show_updated' => 0, 'show_description' => 0,
-		'show_images' => 1, 'show_name' => 0,
-		'before' => '<li>', 'after' => '</li>', 'between' => "\n",
-		'show_rating' => 0, 'link_before' => '', 'link_after' => ''
-	);
-
-	$r = wp_parse_args( $args, $defaults );
-
-	$output = ''; // Blank string to start with.
-
-	foreach ( (array) $bookmarks as $bookmark ) {
-		if ( ! isset( $bookmark->recently_updated ) ) {
-			$bookmark->recently_updated = false;
-		}
-		$output .= $r['before'];
-		if ( $r['show_updated'] && $bookmark->recently_updated ) {
-			$output .= '<em>';
-		}
-		$the_link = '#';
-		if ( ! empty( $bookmark->link_url ) ) {
-			$the_link = esc_url( $bookmark->link_url );
-		}
-		$desc = esc_attr( sanitize_bookmark_field( 'link_description', $bookmark->link_description, $bookmark->link_id, 'display' ) );
-		$name = esc_attr( sanitize_bookmark_field( 'link_name', $bookmark->link_name, $bookmark->link_id, 'display' ) );
- 		$title = $desc;
-
-		if ( $r['show_updated'] ) {
-			if ( '00' != substr( $bookmark->link_updated_f, 0, 2 ) ) {
-				$title .= ' (';
-				$title .= sprintf(
-					__('Last updated: %s'),
-					date(
-						get_option( 'links_updated_date_format' ),
-						$bookmark->link_updated_f + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS )
-					)
-				);
-				$title .= ')';
-			}
-		}
-		$alt = ' alt="' . $name . ( $r['show_description'] ? ' ' . $title : '' ) . '"';
-
-		if ( '' != $title ) {
-			$title = ' title="' . $title . '"';
-		}
-		$rel = $bookmark->link_rel;
-		if ( '' != $rel ) {
-			$rel = ' rel="' . esc_attr($rel) . '"';
-		}
-		$target = $bookmark->link_target;
-		if ( '' != $target ) {
-			$target = ' target="' . $target . '"';
-		}
-		$output .= '<a href="' . $the_link . '"' . $rel . $title . $target . '>';
-
-		$output .= $r['link_before'];
-
-		if ( $bookmark->link_image != null && $r['show_images'] ) {
-			if ( strpos( $bookmark->link_image, 'http' ) === 0 ) {
-				$output .= "<img src=\"$bookmark->link_image\" $alt $title />";
-			} else { // If it's a relative path
-				$output .= "<img src=\"" . get_option('siteurl') . "$bookmark->link_image\" $alt $title />";
-			}
-			if ( $r['show_name'] ) {
-				$output .= " $name";
-			}
-		} else {
-			$output .= $name;
-		}
-
-		$output .= $r['link_after'];
-
-		$output .= '</a>';
-
-		if ( $r['show_updated'] && $bookmark->recently_updated ) {
-			$output .= '</em>';
-		}
-
-		if ( $r['show_description'] && '' != $desc ) {
-			$output .= $r['between'] . $desc;
-		}
-
-		if ( $r['show_rating'] ) {
-			$output .= $r['between'] . sanitize_bookmark_field(
-				'link_rating',
-				$bookmark->link_rating,
-				$bookmark->link_id,
-				'display'
-			);
-		}
-		$output .= $r['after'] . "\n";
-	} // end while
-
-	return $output;
-}
-
-/**
- * Retrieve or echo all of the bookmarks.
- *
- * List of default arguments are as follows:
- *
- * These options define how the Category name will appear before the category
- * links are displayed, if 'categorize' is 1. If 'categorize' is 0, then it will
- * display for only the 'title_li' string and only if 'title_li' is not empty.
- *
- * @since 2.1.0
- *
- * @see _walk_bookmarks()
- *
- * @param string|array $args {
- *     Optional. String or array of arguments to list bookmarks.
- *
- *     @type string   $orderby          How to order the links by. Accepts post fields. Default 'name'.
- *     @type string   $order            Whether to order bookmarks in ascending or descending order.
- *                                      Accepts 'ASC' (ascending) or 'DESC' (descending). Default 'ASC'.
- *     @type int      $limit            Amount of bookmarks to display. Accepts 1+ or -1 for all.
- *                                      Default -1.
- *     @type string   $category         Comma-separated list of category ids to include links from.
- *                                      Default empty.
- *     @type string   $category_name    Category to retrieve links for by name. Default empty.
- *     @type int|bool $hide_invisible   Whether to show or hide links marked as 'invisible'. Accepts
- *                                      1|true or 0|false. Default 1|true.
- *     @type int|bool $show_updated     Whether to display the time the bookmark was last updated.
- *                                      Accepts 1|true or 0|false. Default 0|false.
- *     @type int|bool $echo             Whether to echo or return the formatted bookmarks. Accepts
- *                                      1|true (echo) or 0|false (return). Default 1|true.
- *     @type int|bool $categorize       Whether to show links listed by category or in a single column.
- *                                      Accepts 1|true (by category) or 0|false (one column). Default 1|true.
- *     @type int|bool $show_description Whether to show the bookmark descriptions. Accepts 1|true or 0|false.
- *                                      Default 0|false.
- *     @type string   $title_li         What to show before the links appear. Default 'Bookmarks'.
- *     @type string   $title_before     The HTML or text to prepend to the $title_li string. Default '<h2>'.
- *     @type string   $title_after      The HTML or text to append to the $title_li string. Default '</h2>'.
- *     @type string   $class            The CSS class to use for the $title_li. Default 'linkcat'.
- *     @type string   $category_before  The HTML or text to prepend to $title_before if $categorize is true.
- *                                      String must contain '%id' and '%class' to inherit the category ID and
- *                                      the $class argument used for formatting in themes.
- *                                      Default '<li id="%id" class="%class">'.
- *     @type string   $category_after   The HTML or text to append to $title_after if $categorize is true.
- *                                      Default '</li>'.
- *     @type string   $category_orderby How to order the bookmark category based on term scheme if $categorize
- *                                      is true. Default 'name'.
- *     @type string   $category_order   Whether to order categories in ascending or descending order if
- *                                      $categorize is true. Accepts 'ASC' (ascending) or 'DESC' (descending).
- *                                      Default 'ASC'.
- * }
- * @return string|void Will only return if echo option is set to not echo. Default is not return anything.
- */
-function wp_list_bookmarks( $args = '' ) {
-	$defaults = array(
-		'orderby' => 'name', 'order' => 'ASC',
-		'limit' => -1, 'category' => '', 'exclude_category' => '',
-		'category_name' => '', 'hide_invisible' => 1,
-		'show_updated' => 0, 'echo' => 1,
-		'categorize' => 1, 'title_li' => __('Bookmarks'),
-		'title_before' => '<h2>', 'title_after' => '</h2>',
-		'category_orderby' => 'name', 'category_order' => 'ASC',
-		'class' => 'linkcat', 'category_before' => '<li id="%id" class="%class">',
-		'category_after' => '</li>'
-	);
-
-	$r = wp_parse_args( $args, $defaults );
-
-	$output = '';
-
-	if ( ! is_array( $r['class'] ) ) {
-		$r['class'] = explode( ' ', $r['class'] );
-	}
- 	$r['class'] = array_map( 'sanitize_html_class', $r['class'] );
- 	$r['class'] = trim( join( ' ', $r['class'] ) );
-
-	if ( $r['categorize'] ) {
-		$cats = get_terms( 'link_category', array(
-			'name__like' => $r['category_name'],
-			'include' => $r['category'],
-			'exclude' => $r['exclude_category'],
-			'orderby' => $r['category_orderby'],
-			'order' => $r['category_order'],
-			'hierarchical' => 0
-		) );
-		if ( empty( $cats ) ) {
-			$r['categorize'] = false;
-		}
-	}
-
-	if ( $r['categorize'] ) {
-		// Split the bookmarks into ul's for each category
-		foreach ( (array) $cats as $cat ) {
-			$params = array_merge( $r, array( 'category' => $cat->term_id ) );
-			$bookmarks = get_bookmarks( $params );
-			if ( empty( $bookmarks ) ) {
-				continue;
-			}
-			$output .= str_replace(
-				array( '%id', '%class' ),
-				array( "linkcat-$cat->term_id", $r['class'] ),
-				$r['category_before']
-			);
-			/**
-			 * Filters the bookmarks category name.
-			 *
-			 * @since 2.2.0
-			 *
-			 * @param string $cat_name The category name of bookmarks.
-			 */
-			$catname = apply_filters( 'link_category', $cat->name );
-
-			$output .= $r['title_before'];
-			$output .= $catname;
-			$output .= $r['title_after'];
-			$output .= "\n\t<ul class='xoxo blogroll'>\n";
-			$output .= _walk_bookmarks( $bookmarks, $r );
-			$output .= "\n\t</ul>\n";
-			$output .= $r['category_after'] . "\n";
-		}
-	} else {
-		//output one single list using title_li for the title
-		$bookmarks = get_bookmarks( $r );
-
-		if ( ! empty( $bookmarks ) ) {
-			if ( ! empty( $r['title_li'] ) ) {
-				$output .= str_replace(
-					array( '%id', '%class' ),
-					array( "linkcat-" . $r['category'], $r['class'] ),
-					$r['category_before']
-				);
-				$output .= $r['title_before'];
-				$output .= $r['title_li'];
-				$output .= $r['title_after'];
-				$output .= "\n\t<ul class='xoxo blogroll'>\n";
-				$output .= _walk_bookmarks( $bookmarks, $r );
-				$output .= "\n\t</ul>\n";
-				$output .= $r['category_after'] . "\n";
-			} else {
-				$output .= _walk_bookmarks( $bookmarks, $r );
-			}
-		}
-	}
-
-	/**
-	 * Filters the bookmarks list before it is echoed or returned.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param string $html The HTML list of bookmarks.
-	 */
-	$html = apply_filters( 'wp_list_bookmarks', $output );
-
-	if ( ! $r['echo'] ) {
-		return $html;
-	}
-	echo $html;
-}
Index: www/wp-includes/Requests/Hooker.php
===================================================================
--- www/wp-includes/Requests/Hooker.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Hooker.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-http-requests-response.php
===================================================================
--- www/wp-includes/class-wp-http-requests-response.php	(revision 38565)
+++ www/wp-includes/autoload/http/WP_HTTP_Requests_Response.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/pluggable.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/pluggable.php	(revision 38565)
+++ www/wp-includes/pluggable.php	(revision 38565)
@@ -1,2455 +0,0 @@
-<?php
-/**
- * These functions can be replaced via plugins. If plugins do not redefine these
- * functions, then these will be used instead.
- *
- * @package WordPress
- */
-
-if ( !function_exists('wp_set_current_user') ) :
-/**
- * Changes the current user by ID or name.
- *
- * Set $id to null and specify a name if you do not know a user's ID.
- *
- * Some WordPress functionality is based on the current user and not based on
- * the signed in user. Therefore, it opens the ability to edit and perform
- * actions on users who aren't signed in.
- *
- * @since 2.0.3
- * @global WP_User $current_user The current user object which holds the user data.
- *
- * @param int    $id   User ID
- * @param string $name User's username
- * @return WP_User Current user User object
- */
-function wp_set_current_user($id, $name = '') {
-	global $current_user;
-
-	// If `$id` matches the user who's already current, there's nothing to do.
-	if ( isset( $current_user )
-		&& ( $current_user instanceof WP_User )
-		&& ( $id == $current_user->ID )
-		&& ( null !== $id )
-	) {
-		return $current_user;
-	}
-
-	$current_user = new WP_User( $id, $name );
-
-	setup_userdata( $current_user->ID );
-
-	/**
-	 * Fires after the current user is set.
-	 *
-	 * @since 2.0.1
-	 */
-	do_action( 'set_current_user' );
-
-	return $current_user;
-}
-endif;
-
-if ( !function_exists('wp_get_current_user') ) :
-/**
- * Retrieve the current user object.
- *
- * Will set the current user, if the current user is not set. The current user
- * will be set to the logged-in person. If no user is logged-in, then it will
- * set the current user to 0, which is invalid and won't have any permissions.
- *
- * @since 2.0.3
- *
- * @see _wp_get_current_user()
- * @global WP_User $current_user Checks if the current user is set.
- *
- * @return WP_User Current WP_User instance.
- */
-function wp_get_current_user() {
-	return _wp_get_current_user();
-}
-endif;
-
-if ( !function_exists('get_userdata') ) :
-/**
- * Retrieve user info by user ID.
- *
- * @since 0.71
- *
- * @param int $user_id User ID
- * @return WP_User|false WP_User object on success, false on failure.
- */
-function get_userdata( $user_id ) {
-	return get_user_by( 'id', $user_id );
-}
-endif;
-
-if ( !function_exists('get_user_by') ) :
-/**
- * Retrieve user info by a given field
- *
- * @since 2.8.0
- * @since 4.4.0 Added 'ID' as an alias of 'id' for the `$field` parameter.
- *
- * @param string     $field The field to retrieve the user with. id | ID | slug | email | login.
- * @param int|string $value A value for $field. A user ID, slug, email address, or login name.
- * @return WP_User|false WP_User object on success, false on failure.
- */
-function get_user_by( $field, $value ) {
-	$userdata = WP_User::get_data_by( $field, $value );
-
-	if ( !$userdata )
-		return false;
-
-	$user = new WP_User;
-	$user->init( $userdata );
-
-	return $user;
-}
-endif;
-
-if ( !function_exists('cache_users') ) :
-/**
- * Retrieve info for user lists to prevent multiple queries by get_userdata()
- *
- * @since 3.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param array $user_ids User ID numbers list
- */
-function cache_users( $user_ids ) {
-	global $wpdb;
-
-	$clean = _get_non_cached_ids( $user_ids, 'users' );
-
-	if ( empty( $clean ) )
-		return;
-
-	$list = implode( ',', $clean );
-
-	$users = $wpdb->get_results( "SELECT * FROM $wpdb->users WHERE ID IN ($list)" );
-
-	$ids = array();
-	foreach ( $users as $user ) {
-		update_user_caches( $user );
-		$ids[] = $user->ID;
-	}
-	update_meta_cache( 'user', $ids );
-}
-endif;
-
-if ( !function_exists( 'wp_mail' ) ) :
-/**
- * Send mail, similar to PHP's mail
- *
- * A true return value does not automatically mean that the user received the
- * email successfully. It just only means that the method used was able to
- * process the request without any errors.
- *
- * Using the two 'wp_mail_from' and 'wp_mail_from_name' hooks allow from
- * creating a from address like 'Name <email@address.com>' when both are set. If
- * just 'wp_mail_from' is set, then just the email address will be used with no
- * name.
- *
- * The default content type is 'text/plain' which does not allow using HTML.
- * However, you can set the content type of the email by using the
- * {@see 'wp_mail_content_type'} filter.
- *
- * The default charset is based on the charset used on the blog. The charset can
- * be set using the {@see 'wp_mail_charset'} filter.
- *
- * @since 1.2.1
- *
- * @global PHPMailer $phpmailer
- *
- * @param string|array $to          Array or comma-separated list of email addresses to send message.
- * @param string       $subject     Email subject
- * @param string       $message     Message contents
- * @param string|array $headers     Optional. Additional headers.
- * @param string|array $attachments Optional. Files to attach.
- * @return bool Whether the email contents were sent successfully.
- */
-function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() ) {
-	// Compact the input, apply the filters, and extract them back out
-
-	/**
-	 * Filters the wp_mail() arguments.
-	 *
-	 * @since 2.2.0
-	 *
-	 * @param array $args A compacted array of wp_mail() arguments, including the "to" email,
-	 *                    subject, message, headers, and attachments values.
-	 */
-	$atts = apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) );
-
-	if ( isset( $atts['to'] ) ) {
-		$to = $atts['to'];
-	}
-
-	if ( isset( $atts['subject'] ) ) {
-		$subject = $atts['subject'];
-	}
-
-	if ( isset( $atts['message'] ) ) {
-		$message = $atts['message'];
-	}
-
-	if ( isset( $atts['headers'] ) ) {
-		$headers = $atts['headers'];
-	}
-
-	if ( isset( $atts['attachments'] ) ) {
-		$attachments = $atts['attachments'];
-	}
-
-	if ( ! is_array( $attachments ) ) {
-		$attachments = explode( "\n", str_replace( "\r\n", "\n", $attachments ) );
-	}
-	global $phpmailer;
-
-	// (Re)create it, if it's gone missing
-	if ( ! ( $phpmailer instanceof PHPMailer ) ) {
-		require_once ABSPATH . WPINC . '/class-phpmailer.php';
-		require_once ABSPATH . WPINC . '/class-smtp.php'; 
-		$phpmailer = new PHPMailer( true );
-	}
-
-	// Headers
-	$cc = $bcc = $reply_to = array();
-
-	if ( empty( $headers ) ) {
-		$headers = array();
-	} else {
-		if ( !is_array( $headers ) ) {
-			// Explode the headers out, so this function can take both
-			// string headers and an array of headers.
-			$tempheaders = explode( "\n", str_replace( "\r\n", "\n", $headers ) );
-		} else {
-			$tempheaders = $headers;
-		}
-		$headers = array();
-
-		// If it's actually got contents
-		if ( !empty( $tempheaders ) ) {
-			// Iterate through the raw headers
-			foreach ( (array) $tempheaders as $header ) {
-				if ( strpos($header, ':') === false ) {
-					if ( false !== stripos( $header, 'boundary=' ) ) {
-						$parts = preg_split('/boundary=/i', trim( $header ) );
-						$boundary = trim( str_replace( array( "'", '"' ), '', $parts[1] ) );
-					}
-					continue;
-				}
-				// Explode them out
-				list( $name, $content ) = explode( ':', trim( $header ), 2 );
-
-				// Cleanup crew
-				$name    = trim( $name    );
-				$content = trim( $content );
-
-				switch ( strtolower( $name ) ) {
-					// Mainly for legacy -- process a From: header if it's there
-					case 'from':
-						$bracket_pos = strpos( $content, '<' );
-						if ( $bracket_pos !== false ) {
-							// Text before the bracketed email is the "From" name.
-							if ( $bracket_pos > 0 ) {
-								$from_name = substr( $content, 0, $bracket_pos - 1 );
-								$from_name = str_replace( '"', '', $from_name );
-								$from_name = trim( $from_name );
-							}
-
-							$from_email = substr( $content, $bracket_pos + 1 );
-							$from_email = str_replace( '>', '', $from_email );
-							$from_email = trim( $from_email );
-
-						// Avoid setting an empty $from_email.
-						} elseif ( '' !== trim( $content ) ) {
-							$from_email = trim( $content );
-						}
-						break;
-					case 'content-type':
-						if ( strpos( $content, ';' ) !== false ) {
-							list( $type, $charset_content ) = explode( ';', $content );
-							$content_type = trim( $type );
-							if ( false !== stripos( $charset_content, 'charset=' ) ) {
-								$charset = trim( str_replace( array( 'charset=', '"' ), '', $charset_content ) );
-							} elseif ( false !== stripos( $charset_content, 'boundary=' ) ) {
-								$boundary = trim( str_replace( array( 'BOUNDARY=', 'boundary=', '"' ), '', $charset_content ) );
-								$charset = '';
-							}
-
-						// Avoid setting an empty $content_type.
-						} elseif ( '' !== trim( $content ) ) {
-							$content_type = trim( $content );
-						}
-						break;
-					case 'cc':
-						$cc = array_merge( (array) $cc, explode( ',', $content ) );
-						break;
-					case 'bcc':
-						$bcc = array_merge( (array) $bcc, explode( ',', $content ) );
-						break;
-					case 'reply-to':
-						$reply_to = array_merge( (array) $reply_to, explode( ',', $content ) );
-						break;
-					default:
-						// Add it to our grand headers array
-						$headers[trim( $name )] = trim( $content );
-						break;
-				}
-			}
-		}
-	}
-
-	// Empty out the values that may be set
-	$phpmailer->ClearAllRecipients();
-	$phpmailer->ClearAttachments();
-	$phpmailer->ClearCustomHeaders();
-	$phpmailer->ClearReplyTos();
-
-	// From email and name
-	// If we don't have a name from the input headers
-	if ( !isset( $from_name ) )
-		$from_name = 'WordPress';
-
-	/* If we don't have an email from the input headers default to wordpress@$sitename
-	 * Some hosts will block outgoing mail from this address if it doesn't exist but
-	 * there's no easy alternative. Defaulting to admin_email might appear to be another
-	 * option but some hosts may refuse to relay mail from an unknown domain. See
-	 * https://core.trac.wordpress.org/ticket/5007.
-	 */
-
-	if ( !isset( $from_email ) ) {
-		// Get the site domain and get rid of www.
-		$sitename = strtolower( $_SERVER['SERVER_NAME'] );
-		if ( substr( $sitename, 0, 4 ) == 'www.' ) {
-			$sitename = substr( $sitename, 4 );
-		}
-
-		$from_email = 'wordpress@' . $sitename;
-	}
-
-	/**
-	 * Filters the email address to send from.
-	 *
-	 * @since 2.2.0
-	 *
-	 * @param string $from_email Email address to send from.
-	 */
-	$from_email = apply_filters( 'wp_mail_from', $from_email );
-
-	/**
-	 * Filters the name to associate with the "from" email address.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param string $from_name Name associated with the "from" email address.
-	 */
-	$from_name = apply_filters( 'wp_mail_from_name', $from_name );
-
-	$phpmailer->setFrom( $from_email, $from_name, false );
-
-	// Set destination addresses
-	if ( !is_array( $to ) )
-		$to = explode( ',', $to );
-
-	// Set mail's subject and body
-	$phpmailer->Subject = $subject;
-	$phpmailer->Body    = $message;
-
-	// Use appropriate methods for handling addresses, rather than treating them as generic headers
-	$address_headers = compact( 'to', 'cc', 'bcc', 'reply_to' );
-
-	foreach ( $address_headers as $address_header => $addresses ) {
-		if ( empty( $addresses ) ) {
-			continue;
-		}
-
-		foreach ( (array) $addresses as $address ) {
-			try {
-				// Break $recipient into name and address parts if in the format "Foo <bar@baz.com>"
-				$recipient_name = '';
-
-				if ( preg_match( '/(.*)<(.+)>/', $address, $matches ) ) {
-					if ( count( $matches ) == 3 ) {
-						$recipient_name = $matches[1];
-						$address        = $matches[2];
-					}
-				}
-
-				switch ( $address_header ) {
-					case 'to':
-						$phpmailer->addAddress( $address, $recipient_name );
-						break;
-					case 'cc':
-						$phpmailer->addCc( $address, $recipient_name );
-						break;
-					case 'bcc':
-						$phpmailer->addBcc( $address, $recipient_name );
-						break;
-					case 'reply_to':
-						$phpmailer->addReplyTo( $address, $recipient_name );
-						break;
-				}
-			} catch ( phpmailerException $e ) {
-				continue;
-			}
-		}
-	}
-
-	// Set to use PHP's mail()
-	$phpmailer->IsMail();
-
-	// Set Content-Type and charset
-	// If we don't have a content-type from the input headers
-	if ( !isset( $content_type ) )
-		$content_type = 'text/plain';
-
-	/**
-	 * Filters the wp_mail() content type.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param string $content_type Default wp_mail() content type.
-	 */
-	$content_type = apply_filters( 'wp_mail_content_type', $content_type );
-
-	$phpmailer->ContentType = $content_type;
-
-	// Set whether it's plaintext, depending on $content_type
-	if ( 'text/html' == $content_type )
-		$phpmailer->IsHTML( true );
-
-	// If we don't have a charset from the input headers
-	if ( !isset( $charset ) )
-		$charset = get_bloginfo( 'charset' );
-
-	// Set the content-type and charset
-
-	/**
-	 * Filters the default wp_mail() charset.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param string $charset Default email charset.
-	 */
-	$phpmailer->CharSet = apply_filters( 'wp_mail_charset', $charset );
-
-	// Set custom headers
-	if ( !empty( $headers ) ) {
-		foreach ( (array) $headers as $name => $content ) {
-			$phpmailer->AddCustomHeader( sprintf( '%1$s: %2$s', $name, $content ) );
-		}
-
-		if ( false !== stripos( $content_type, 'multipart' ) && ! empty($boundary) )
-			$phpmailer->AddCustomHeader( sprintf( "Content-Type: %s;\n\t boundary=\"%s\"", $content_type, $boundary ) );
-	}
-
-	if ( !empty( $attachments ) ) {
-		foreach ( $attachments as $attachment ) {
-			try {
-				$phpmailer->AddAttachment($attachment);
-			} catch ( phpmailerException $e ) {
-				continue;
-			}
-		}
-	}
-
-	/**
-	 * Fires after PHPMailer is initialized.
-	 *
-	 * @since 2.2.0
-	 *
-	 * @param PHPMailer &$phpmailer The PHPMailer instance, passed by reference.
-	 */
-	do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) );
-
-	// Send!
-	try {
-		return $phpmailer->Send();
-	} catch ( phpmailerException $e ) {
-
-		$mail_error_data = compact( 'to', 'subject', 'message', 'headers', 'attachments' );
-
-		/**
-		 * Fires after a phpmailerException is caught.
-		 *
-		 * @since 4.4.0
-		 *
-		 * @param WP_Error $error A WP_Error object with the phpmailerException code, message, and an array
-		 *                        containing the mail recipient, subject, message, headers, and attachments.
-		 */
- 		do_action( 'wp_mail_failed', new WP_Error( $e->getCode(), $e->getMessage(), $mail_error_data ) );
-
-		return false;
-	}
-}
-endif;
-
-if ( !function_exists('wp_authenticate') ) :
-/**
- * Authenticate a user, confirming the login credentials are valid.
- *
- * @since 2.5.0
- * @since 4.5.0 `$username` now accepts an email address.
- *
- * @param string $username User's username or email address.
- * @param string $password User's password.
- * @return WP_User|WP_Error WP_User object if the credentials are valid,
- *                          otherwise WP_Error.
- */
-function wp_authenticate($username, $password) {
-	$username = sanitize_user($username);
-	$password = trim($password);
-
-	/**
-	 * Filters whether a set of user login credentials are valid.
-	 *
-	 * A WP_User object is returned if the credentials authenticate a user.
-	 * WP_Error or null otherwise.
-	 *
-	 * @since 2.8.0
-	 * @since 4.5.0 `$username` now accepts an email address.
-	 *
-	 * @param null|WP_User|WP_Error $user     WP_User if the user is authenticated.
-	 *                                        WP_Error or null otherwise.
-	 * @param string                $username Username or email address.
-	 * @param string                $password User password
-	 */
-	$user = apply_filters( 'authenticate', null, $username, $password );
-
-	if ( $user == null ) {
-		// TODO what should the error message be? (Or would these even happen?)
-		// Only needed if all authentication handlers fail to return anything.
-		$user = new WP_Error( 'authentication_failed', __( '<strong>ERROR</strong>: Invalid username, email address or incorrect password.' ) );
-	}
-
-	$ignore_codes = array('empty_username', 'empty_password');
-
-	if (is_wp_error($user) && !in_array($user->get_error_code(), $ignore_codes) ) {
-		/**
-		 * Fires after a user login has failed.
-		 *
-		 * @since 2.5.0
-		 * @since 4.5.0 The value of `$username` can now be an email address.
-		 *
-		 * @param string $username Username or email address.
-		 */
-		do_action( 'wp_login_failed', $username );
-	}
-
-	return $user;
-}
-endif;
-
-if ( !function_exists('wp_logout') ) :
-/**
- * Log the current user out.
- *
- * @since 2.5.0
- */
-function wp_logout() {
-	wp_destroy_current_session();
-	wp_clear_auth_cookie();
-
-	/**
-	 * Fires after a user is logged-out.
-	 *
-	 * @since 1.5.0
-	 */
-	do_action( 'wp_logout' );
-}
-endif;
-
-if ( !function_exists('wp_validate_auth_cookie') ) :
-/**
- * Validates authentication cookie.
- *
- * The checks include making sure that the authentication cookie is set and
- * pulling in the contents (if $cookie is not used).
- *
- * Makes sure the cookie is not expired. Verifies the hash in cookie is what is
- * should be and compares the two.
- *
- * @since 2.5.0
- *
- * @global int $login_grace_period
- *
- * @param string $cookie Optional. If used, will validate contents instead of cookie's
- * @param string $scheme Optional. The cookie scheme to use: auth, secure_auth, or logged_in
- * @return false|int False if invalid cookie, User ID if valid.
- */
-function wp_validate_auth_cookie($cookie = '', $scheme = '') {
-	if ( ! $cookie_elements = wp_parse_auth_cookie($cookie, $scheme) ) {
-		/**
-		 * Fires if an authentication cookie is malformed.
-		 *
-		 * @since 2.7.0
-		 *
-		 * @param string $cookie Malformed auth cookie.
-		 * @param string $scheme Authentication scheme. Values include 'auth', 'secure_auth',
-		 *                       or 'logged_in'.
-		 */
-		do_action( 'auth_cookie_malformed', $cookie, $scheme );
-		return false;
-	}
-
-	$scheme = $cookie_elements['scheme'];
-	$username = $cookie_elements['username'];
-	$hmac = $cookie_elements['hmac'];
-	$token = $cookie_elements['token'];
-	$expired = $expiration = $cookie_elements['expiration'];
-
-	// Allow a grace period for POST and Ajax requests
-	if ( wp_doing_ajax() || 'POST' == $_SERVER['REQUEST_METHOD'] ) {
-		$expired += HOUR_IN_SECONDS;
-	}
-
-	// Quick check to see if an honest cookie has expired
-	if ( $expired < time() ) {
-		/**
-		 * Fires once an authentication cookie has expired.
-		 *
-		 * @since 2.7.0
-		 *
-		 * @param array $cookie_elements An array of data for the authentication cookie.
-		 */
-		do_action( 'auth_cookie_expired', $cookie_elements );
-		return false;
-	}
-
-	$user = get_user_by('login', $username);
-	if ( ! $user ) {
-		/**
-		 * Fires if a bad username is entered in the user authentication process.
-		 *
-		 * @since 2.7.0
-		 *
-		 * @param array $cookie_elements An array of data for the authentication cookie.
-		 */
-		do_action( 'auth_cookie_bad_username', $cookie_elements );
-		return false;
-	}
-
-	$pass_frag = substr($user->user_pass, 8, 4);
-
-	$key = wp_hash( $username . '|' . $pass_frag . '|' . $expiration . '|' . $token, $scheme );
-
-	// If ext/hash is not present, compat.php's hash_hmac() does not support sha256.
-	$algo = function_exists( 'hash' ) ? 'sha256' : 'sha1';
-	$hash = hash_hmac( $algo, $username . '|' . $expiration . '|' . $token, $key );
-
-	if ( ! hash_equals( $hash, $hmac ) ) {
-		/**
-		 * Fires if a bad authentication cookie hash is encountered.
-		 *
-		 * @since 2.7.0
-		 *
-		 * @param array $cookie_elements An array of data for the authentication cookie.
-		 */
-		do_action( 'auth_cookie_bad_hash', $cookie_elements );
-		return false;
-	}
-
-	$manager = WP_Session_Tokens::get_instance( $user->ID );
-	if ( ! $manager->verify( $token ) ) {
-		do_action( 'auth_cookie_bad_session_token', $cookie_elements );
-		return false;
-	}
-
-	// Ajax/POST grace period set above
-	if ( $expiration < time() ) {
-		$GLOBALS['login_grace_period'] = 1;
-	}
-
-	/**
-	 * Fires once an authentication cookie has been validated.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param array   $cookie_elements An array of data for the authentication cookie.
-	 * @param WP_User $user            User object.
-	 */
-	do_action( 'auth_cookie_valid', $cookie_elements, $user );
-
-	return $user->ID;
-}
-endif;
-
-if ( !function_exists('wp_generate_auth_cookie') ) :
-/**
- * Generate authentication cookie contents.
- *
- * @since 2.5.0
- *
- * @param int    $user_id    User ID
- * @param int    $expiration The time the cookie expires as a UNIX timestamp.
- * @param string $scheme     Optional. The cookie scheme to use: auth, secure_auth, or logged_in
- * @param string $token      User's session token to use for this cookie
- * @return string Authentication cookie contents. Empty string if user does not exist.
- */
-function wp_generate_auth_cookie( $user_id, $expiration, $scheme = 'auth', $token = '' ) {
-	$user = get_userdata($user_id);
-	if ( ! $user ) {
-		return '';
-	}
-
-	if ( ! $token ) {
-		$manager = WP_Session_Tokens::get_instance( $user_id );
-		$token = $manager->create( $expiration );
-	}
-
-	$pass_frag = substr($user->user_pass, 8, 4);
-
-	$key = wp_hash( $user->user_login . '|' . $pass_frag . '|' . $expiration . '|' . $token, $scheme );
-
-	// If ext/hash is not present, compat.php's hash_hmac() does not support sha256.
-	$algo = function_exists( 'hash' ) ? 'sha256' : 'sha1';
-	$hash = hash_hmac( $algo, $user->user_login . '|' . $expiration . '|' . $token, $key );
-
-	$cookie = $user->user_login . '|' . $expiration . '|' . $token . '|' . $hash;
-
-	/**
-	 * Filters the authentication cookie.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param string $cookie     Authentication cookie.
-	 * @param int    $user_id    User ID.
-	 * @param int    $expiration The time the cookie expires as a UNIX timestamp.
-	 * @param string $scheme     Cookie scheme used. Accepts 'auth', 'secure_auth', or 'logged_in'.
-	 * @param string $token      User's session token used.
-	 */
-	return apply_filters( 'auth_cookie', $cookie, $user_id, $expiration, $scheme, $token );
-}
-endif;
-
-if ( !function_exists('wp_parse_auth_cookie') ) :
-/**
- * Parse a cookie into its components
- *
- * @since 2.7.0
- *
- * @param string $cookie
- * @param string $scheme Optional. The cookie scheme to use: auth, secure_auth, or logged_in
- * @return array|false Authentication cookie components
- */
-function wp_parse_auth_cookie($cookie = '', $scheme = '') {
-	if ( empty($cookie) ) {
-		switch ($scheme){
-			case 'auth':
-				$cookie_name = AUTH_COOKIE;
-				break;
-			case 'secure_auth':
-				$cookie_name = SECURE_AUTH_COOKIE;
-				break;
-			case "logged_in":
-				$cookie_name = LOGGED_IN_COOKIE;
-				break;
-			default:
-				if ( is_ssl() ) {
-					$cookie_name = SECURE_AUTH_COOKIE;
-					$scheme = 'secure_auth';
-				} else {
-					$cookie_name = AUTH_COOKIE;
-					$scheme = 'auth';
-				}
-	    }
-
-		if ( empty($_COOKIE[$cookie_name]) )
-			return false;
-		$cookie = $_COOKIE[$cookie_name];
-	}
-
-	$cookie_elements = explode('|', $cookie);
-	if ( count( $cookie_elements ) !== 4 ) {
-		return false;
-	}
-
-	list( $username, $expiration, $token, $hmac ) = $cookie_elements;
-
-	return compact( 'username', 'expiration', 'token', 'hmac', 'scheme' );
-}
-endif;
-
-if ( !function_exists('wp_set_auth_cookie') ) :
-/**
- * Log in a user by setting authentication cookies.
- *
- * The $remember parameter increases the time that the cookie will be kept. The
- * default the cookie is kept without remembering is two days. When $remember is
- * set, the cookies will be kept for 14 days or two weeks.
- *
- * @since 2.5.0
- * @since 4.3.0 Added the `$token` parameter.
- *
- * @param int    $user_id  User ID
- * @param bool   $remember Whether to remember the user
- * @param mixed  $secure   Whether the admin cookies should only be sent over HTTPS.
- *                         Default is_ssl().
- * @param string $token    Optional. User's session token to use for this cookie.
- */
-function wp_set_auth_cookie( $user_id, $remember = false, $secure = '', $token = '' ) {
-	if ( $remember ) {
-		/**
-		 * Filters the duration of the authentication cookie expiration period.
-		 *
-		 * @since 2.8.0
-		 *
-		 * @param int  $length   Duration of the expiration period in seconds.
-		 * @param int  $user_id  User ID.
-		 * @param bool $remember Whether to remember the user login. Default false.
-		 */
-		$expiration = time() + apply_filters( 'auth_cookie_expiration', 14 * DAY_IN_SECONDS, $user_id, $remember );
-
-		/*
-		 * Ensure the browser will continue to send the cookie after the expiration time is reached.
-		 * Needed for the login grace period in wp_validate_auth_cookie().
-		 */
-		$expire = $expiration + ( 12 * HOUR_IN_SECONDS );
-	} else {
-		/** This filter is documented in wp-includes/pluggable.php */
-		$expiration = time() + apply_filters( 'auth_cookie_expiration', 2 * DAY_IN_SECONDS, $user_id, $remember );
-		$expire = 0;
-	}
-
-	if ( '' === $secure ) {
-		$secure = is_ssl();
-	}
-
-	// Front-end cookie is secure when the auth cookie is secure and the site's home URL is forced HTTPS.
-	$secure_logged_in_cookie = $secure && 'https' === parse_url( get_option( 'home' ), PHP_URL_SCHEME );
-
-	/**
-	 * Filters whether the connection is secure.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param bool $secure  Whether the connection is secure.
-	 * @param int  $user_id User ID.
-	 */
-	$secure = apply_filters( 'secure_auth_cookie', $secure, $user_id );
-
-	/**
-	 * Filters whether to use a secure cookie when logged-in.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param bool $secure_logged_in_cookie Whether to use a secure cookie when logged-in.
-	 * @param int  $user_id                 User ID.
-	 * @param bool $secure                  Whether the connection is secure.
-	 */
-	$secure_logged_in_cookie = apply_filters( 'secure_logged_in_cookie', $secure_logged_in_cookie, $user_id, $secure );
-
-	if ( $secure ) {
-		$auth_cookie_name = SECURE_AUTH_COOKIE;
-		$scheme = 'secure_auth';
-	} else {
-		$auth_cookie_name = AUTH_COOKIE;
-		$scheme = 'auth';
-	}
-
-	if ( '' === $token ) {
-		$manager = WP_Session_Tokens::get_instance( $user_id );
-		$token   = $manager->create( $expiration );
-	}
-
-	$auth_cookie = wp_generate_auth_cookie( $user_id, $expiration, $scheme, $token );
-	$logged_in_cookie = wp_generate_auth_cookie( $user_id, $expiration, 'logged_in', $token );
-
-	/**
-	 * Fires immediately before the authentication cookie is set.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param string $auth_cookie Authentication cookie.
-	 * @param int    $expire      The time the login grace period expires as a UNIX timestamp.
-	 *                            Default is 12 hours past the cookie's expiration time.
-	 * @param int    $expiration  The time when the authentication cookie expires as a UNIX timestamp.
-	 *                            Default is 14 days from now.
-	 * @param int    $user_id     User ID.
-	 * @param string $scheme      Authentication scheme. Values include 'auth', 'secure_auth', or 'logged_in'.
-	 */
-	do_action( 'set_auth_cookie', $auth_cookie, $expire, $expiration, $user_id, $scheme );
-
-	/**
-	 * Fires immediately before the logged-in authentication cookie is set.
-	 *
-	 * @since 2.6.0
-	 *
-	 * @param string $logged_in_cookie The logged-in cookie.
-	 * @param int    $expire           The time the login grace period expires as a UNIX timestamp.
-	 *                                 Default is 12 hours past the cookie's expiration time.
-	 * @param int    $expiration       The time when the logged-in authentication cookie expires as a UNIX timestamp.
-	 *                                 Default is 14 days from now.
-	 * @param int    $user_id          User ID.
-	 * @param string $scheme           Authentication scheme. Default 'logged_in'.
-	 */
-	do_action( 'set_logged_in_cookie', $logged_in_cookie, $expire, $expiration, $user_id, 'logged_in' );
-
-	setcookie($auth_cookie_name, $auth_cookie, $expire, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN, $secure, true);
-	setcookie($auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, $secure, true);
-	setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, COOKIEPATH, COOKIE_DOMAIN, $secure_logged_in_cookie, true);
-	if ( COOKIEPATH != SITECOOKIEPATH )
-		setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, SITECOOKIEPATH, COOKIE_DOMAIN, $secure_logged_in_cookie, true);
-}
-endif;
-
-if ( !function_exists('wp_clear_auth_cookie') ) :
-/**
- * Removes all of the cookies associated with authentication.
- *
- * @since 2.5.0
- */
-function wp_clear_auth_cookie() {
-	/**
-	 * Fires just before the authentication cookies are cleared.
-	 *
-	 * @since 2.7.0
-	 */
-	do_action( 'clear_auth_cookie' );
-
-	setcookie( AUTH_COOKIE,        ' ', time() - YEAR_IN_SECONDS, ADMIN_COOKIE_PATH,   COOKIE_DOMAIN );
-	setcookie( SECURE_AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, ADMIN_COOKIE_PATH,   COOKIE_DOMAIN );
-	setcookie( AUTH_COOKIE,        ' ', time() - YEAR_IN_SECONDS, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN );
-	setcookie( SECURE_AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN );
-	setcookie( LOGGED_IN_COOKIE,   ' ', time() - YEAR_IN_SECONDS, COOKIEPATH,          COOKIE_DOMAIN );
-	setcookie( LOGGED_IN_COOKIE,   ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH,      COOKIE_DOMAIN );
-
-	// Old cookies
-	setcookie( AUTH_COOKIE,        ' ', time() - YEAR_IN_SECONDS, COOKIEPATH,     COOKIE_DOMAIN );
-	setcookie( AUTH_COOKIE,        ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN );
-	setcookie( SECURE_AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH,     COOKIE_DOMAIN );
-	setcookie( SECURE_AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN );
-
-	// Even older cookies
-	setcookie( USER_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH,     COOKIE_DOMAIN );
-	setcookie( PASS_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH,     COOKIE_DOMAIN );
-	setcookie( USER_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN );
-	setcookie( PASS_COOKIE, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH, COOKIE_DOMAIN );
-}
-endif;
-
-if ( !function_exists('is_user_logged_in') ) :
-/**
- * Checks if the current visitor is a logged in user.
- *
- * @since 2.0.0
- *
- * @return bool True if user is logged in, false if not logged in.
- */
-function is_user_logged_in() {
-	$user = wp_get_current_user();
-
-	return $user->exists();
-}
-endif;
-
-if ( !function_exists('auth_redirect') ) :
-/**
- * Checks if a user is logged in, if not it redirects them to the login page.
- *
- * @since 1.5.0
- */
-function auth_redirect() {
-	// Checks if a user is logged in, if not redirects them to the login page
-
-	$secure = ( is_ssl() || force_ssl_admin() );
-
-	/**
-	 * Filters whether to use a secure authentication redirect.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param bool $secure Whether to use a secure authentication redirect. Default false.
-	 */
-	$secure = apply_filters( 'secure_auth_redirect', $secure );
-
-	// If https is required and request is http, redirect
-	if ( $secure && !is_ssl() && false !== strpos($_SERVER['REQUEST_URI'], 'wp-admin') ) {
-		if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) {
-			wp_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) );
-			exit();
-		} else {
-			wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
-			exit();
-		}
-	}
-
-	/**
-	 * Filters the authentication redirect scheme.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param string $scheme Authentication redirect scheme. Default empty.
-	 */
-	$scheme = apply_filters( 'auth_redirect_scheme', '' );
-
-	if ( $user_id = wp_validate_auth_cookie( '',  $scheme) ) {
-		/**
-		 * Fires before the authentication redirect.
-		 *
-		 * @since 2.8.0
-		 *
-		 * @param int $user_id User ID.
-		 */
-		do_action( 'auth_redirect', $user_id );
-
-		// If the user wants ssl but the session is not ssl, redirect.
-		if ( !$secure && get_user_option('use_ssl', $user_id) && false !== strpos($_SERVER['REQUEST_URI'], 'wp-admin') ) {
-			if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) {
-				wp_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) );
-				exit();
-			} else {
-				wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
-				exit();
-			}
-		}
-
-		return;  // The cookie is good so we're done
-	}
-
-	// The cookie is no good so force login
-	nocache_headers();
-
-	$redirect = ( strpos( $_SERVER['REQUEST_URI'], '/options.php' ) && wp_get_referer() ) ? wp_get_referer() : set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
-
-	$login_url = wp_login_url($redirect, true);
-
-	wp_redirect($login_url);
-	exit();
-}
-endif;
-
-if ( !function_exists('check_admin_referer') ) :
-/**
- * Makes sure that a user was referred from another admin page.
- *
- * To avoid security exploits.
- *
- * @since 1.2.0
- *
- * @param int|string $action    Action nonce.
- * @param string     $query_arg Optional. Key to check for nonce in `$_REQUEST` (since 2.5).
- *                              Default '_wpnonce'.
- * @return false|int False if the nonce is invalid, 1 if the nonce is valid and generated between
- *                   0-12 hours ago, 2 if the nonce is valid and generated between 12-24 hours ago.
- */
-function check_admin_referer( $action = -1, $query_arg = '_wpnonce' ) {
-	if ( -1 == $action )
-		_doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2.0' );
-
-	$adminurl = strtolower(admin_url());
-	$referer = strtolower(wp_get_referer());
-	$result = isset($_REQUEST[$query_arg]) ? wp_verify_nonce($_REQUEST[$query_arg], $action) : false;
-
-	/**
-	 * Fires once the admin request has been validated or not.
-	 *
-	 * @since 1.5.1
-	 *
-	 * @param string    $action The nonce action.
-	 * @param false|int $result False if the nonce is invalid, 1 if the nonce is valid and generated between
-	 *                          0-12 hours ago, 2 if the nonce is valid and generated between 12-24 hours ago.
-	 */
-	do_action( 'check_admin_referer', $action, $result );
-
-	if ( ! $result && ! ( -1 == $action && strpos( $referer, $adminurl ) === 0 ) ) {
-		wp_nonce_ays( $action );
-		die();
-	}
-
-	return $result;
-}
-endif;
-
-if ( !function_exists('check_ajax_referer') ) :
-/**
- * Verifies the Ajax request to prevent processing requests external of the blog.
- *
- * @since 2.0.3
- *
- * @param int|string   $action    Action nonce.
- * @param false|string $query_arg Optional. Key to check for the nonce in `$_REQUEST` (since 2.5). If false,
- *                                `$_REQUEST` values will be evaluated for '_ajax_nonce', and '_wpnonce'
- *                                (in that order). Default false.
- * @param bool         $die       Optional. Whether to die early when the nonce cannot be verified.
- *                                Default true.
- * @return false|int False if the nonce is invalid, 1 if the nonce is valid and generated between
- *                   0-12 hours ago, 2 if the nonce is valid and generated between 12-24 hours ago.
- */
-function check_ajax_referer( $action = -1, $query_arg = false, $die = true ) {
-	if ( -1 == $action ) {
-		_doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '4.7' );
-	}
-
-	$nonce = '';
-
-	if ( $query_arg && isset( $_REQUEST[ $query_arg ] ) )
-		$nonce = $_REQUEST[ $query_arg ];
-	elseif ( isset( $_REQUEST['_ajax_nonce'] ) )
-		$nonce = $_REQUEST['_ajax_nonce'];
-	elseif ( isset( $_REQUEST['_wpnonce'] ) )
-		$nonce = $_REQUEST['_wpnonce'];
-
-	$result = wp_verify_nonce( $nonce, $action );
-
-	/**
-	 * Fires once the Ajax request has been validated or not.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param string    $action The Ajax nonce action.
-	 * @param false|int $result False if the nonce is invalid, 1 if the nonce is valid and generated between
-	 *                          0-12 hours ago, 2 if the nonce is valid and generated between 12-24 hours ago.
-	 */
-	do_action( 'check_ajax_referer', $action, $result );
-
-	if ( $die && false === $result ) {
-		if ( wp_doing_ajax() ) {
-			wp_die( -1, 403 );
-		} else {
-			die( '-1' );
-		}
-	}
-
-	return $result;
-}
-endif;
-
-if ( !function_exists('wp_redirect') ) :
-/**
- * Redirects to another page.
- *
- * Note: wp_redirect() does not exit automatically, and should almost always be
- * followed by a call to `exit;`:
- *
- *     wp_redirect( $url );
- *     exit;
- *
- * Exiting can also be selectively manipulated by using wp_redirect() as a conditional
- * in conjunction with the {@see 'wp_redirect'} and {@see 'wp_redirect_location'} hooks:
- *
- *     if ( wp_redirect( $url ) ) {
- *         exit;
- *     }
- *
- * @since 1.5.1
- *
- * @global bool $is_IIS
- *
- * @param string $location The path to redirect to.
- * @param int    $status   Status code to use.
- * @return bool False if $location is not provided, true otherwise.
- */
-function wp_redirect($location, $status = 302) {
-	global $is_IIS;
-
-	/**
-	 * Filters the redirect location.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param string $location The path to redirect to.
-	 * @param int    $status   Status code to use.
-	 */
-	$location = apply_filters( 'wp_redirect', $location, $status );
-
-	/**
-	 * Filters the redirect status code.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param int    $status   Status code to use.
-	 * @param string $location The path to redirect to.
-	 */
-	$status = apply_filters( 'wp_redirect_status', $status, $location );
-
-	if ( ! $location )
-		return false;
-
-	$location = wp_sanitize_redirect($location);
-
-	if ( !$is_IIS && PHP_SAPI != 'cgi-fcgi' )
-		status_header($status); // This causes problems on IIS and some FastCGI setups
-
-	header("Location: $location", true, $status);
-
-	return true;
-}
-endif;
-
-if ( !function_exists('wp_sanitize_redirect') ) :
-/**
- * Sanitizes a URL for use in a redirect.
- *
- * @since 2.3.0
- *
- * @param string $location The path to redirect to.
- * @return string Redirect-sanitized URL.
- **/
-function wp_sanitize_redirect($location) {
-	$regex = '/
-		(
-			(?: [\xC2-\xDF][\x80-\xBF]        # double-byte sequences   110xxxxx 10xxxxxx
-			|   \xE0[\xA0-\xBF][\x80-\xBF]    # triple-byte sequences   1110xxxx 10xxxxxx * 2
-			|   [\xE1-\xEC][\x80-\xBF]{2}
-			|   \xED[\x80-\x9F][\x80-\xBF]
-			|   [\xEE-\xEF][\x80-\xBF]{2}
-			|   \xF0[\x90-\xBF][\x80-\xBF]{2} # four-byte sequences   11110xxx 10xxxxxx * 3
-			|   [\xF1-\xF3][\x80-\xBF]{3}
-			|   \xF4[\x80-\x8F][\x80-\xBF]{2}
-		){1,40}                              # ...one or more times
-		)/x';
-	$location = preg_replace_callback( $regex, '_wp_sanitize_utf8_in_redirect', $location );
-	$location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%!*\[\]()@]|i', '', $location);
-	$location = wp_kses_no_null($location);
-
-	// remove %0d and %0a from location
-	$strip = array('%0d', '%0a', '%0D', '%0A');
-	return _deep_replace( $strip, $location );
-}
-
-/**
- * URL encode UTF-8 characters in a URL.
- *
- * @ignore
- * @since 4.2.0
- * @access private
- *
- * @see wp_sanitize_redirect()
- *
- * @param array $matches RegEx matches against the redirect location.
- * @return string URL-encoded version of the first RegEx match.
- */
-function _wp_sanitize_utf8_in_redirect( $matches ) {
-	return urlencode( $matches[0] );
-}
-endif;
-
-if ( !function_exists('wp_safe_redirect') ) :
-/**
- * Performs a safe (local) redirect, using wp_redirect().
- *
- * Checks whether the $location is using an allowed host, if it has an absolute
- * path. A plugin can therefore set or remove allowed host(s) to or from the
- * list.
- *
- * If the host is not allowed, then the redirect defaults to wp-admin on the siteurl
- * instead. This prevents malicious redirects which redirect to another host,
- * but only used in a few places.
- *
- * @since 2.3.0
- *
- * @param string $location The path to redirect to.
- * @param int    $status   Status code to use.
- */
-function wp_safe_redirect($location, $status = 302) {
-
-	// Need to look at the URL the way it will end up in wp_redirect()
-	$location = wp_sanitize_redirect($location);
-
-	/**
-	 * Filters the redirect fallback URL for when the provided redirect is not safe (local).
-	 *
-	 * @since 4.3.0
-	 *
-	 * @param string $fallback_url The fallback URL to use by default.
-	 * @param int    $status       The redirect status.
-	 */
-	$location = wp_validate_redirect( $location, apply_filters( 'wp_safe_redirect_fallback', admin_url(), $status ) );
-
-	wp_redirect($location, $status);
-}
-endif;
-
-if ( !function_exists('wp_validate_redirect') ) :
-/**
- * Validates a URL for use in a redirect.
- *
- * Checks whether the $location is using an allowed host, if it has an absolute
- * path. A plugin can therefore set or remove allowed host(s) to or from the
- * list.
- *
- * If the host is not allowed, then the redirect is to $default supplied
- *
- * @since 2.8.1
- *
- * @param string $location The redirect to validate
- * @param string $default  The value to return if $location is not allowed
- * @return string redirect-sanitized URL
- **/
-function wp_validate_redirect($location, $default = '') {
-	$location = trim( $location );
-	// browsers will assume 'http' is your protocol, and will obey a redirect to a URL starting with '//'
-	if ( substr($location, 0, 2) == '//' )
-		$location = 'http:' . $location;
-
-	// In php 5 parse_url may fail if the URL query part contains http://, bug #38143
-	$test = ( $cut = strpos($location, '?') ) ? substr( $location, 0, $cut ) : $location;
-
-	// @-operator is used to prevent possible warnings in PHP < 5.3.3.
-	$lp = @parse_url($test);
-
-	// Give up if malformed URL
-	if ( false === $lp )
-		return $default;
-
-	// Allow only http and https schemes. No data:, etc.
-	if ( isset($lp['scheme']) && !('http' == $lp['scheme'] || 'https' == $lp['scheme']) )
-		return $default;
-
-	// Reject if certain components are set but host is not. This catches urls like https:host.com for which parse_url does not set the host field.
-	if ( ! isset( $lp['host'] ) && ( isset( $lp['scheme'] ) || isset( $lp['user'] ) || isset( $lp['pass'] ) || isset( $lp['port'] ) ) ) {
-		return $default;
-	}
-
-	// Reject malformed components parse_url() can return on odd inputs.
-	foreach ( array( 'user', 'pass', 'host' ) as $component ) {
-		if ( isset( $lp[ $component ] ) && strpbrk( $lp[ $component ], ':/?#@' ) ) {
-			return $default;
-		}
-	}
-
-	$wpp = parse_url(home_url());
-
-	/**
-	 * Filters the whitelist of hosts to redirect to.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param array       $hosts An array of allowed hosts.
-	 * @param bool|string $host  The parsed host; empty if not isset.
-	 */
-	$allowed_hosts = (array) apply_filters( 'allowed_redirect_hosts', array($wpp['host']), isset($lp['host']) ? $lp['host'] : '' );
-
-	if ( isset($lp['host']) && ( !in_array($lp['host'], $allowed_hosts) && $lp['host'] != strtolower($wpp['host'])) )
-		$location = $default;
-
-	return $location;
-}
-endif;
-
-if ( ! function_exists('wp_notify_postauthor') ) :
-/**
- * Notify an author (and/or others) of a comment/trackback/pingback on a post.
- *
- * @since 1.0.0
- *
- * @param int|WP_Comment  $comment_id Comment ID or WP_Comment object.
- * @param string          $deprecated Not used
- * @return bool True on completion. False if no email addresses were specified.
- */
-function wp_notify_postauthor( $comment_id, $deprecated = null ) {
-	if ( null !== $deprecated ) {
-		_deprecated_argument( __FUNCTION__, '3.8.0' );
-	}
-
-	$comment = get_comment( $comment_id );
-	if ( empty( $comment ) || empty( $comment->comment_post_ID ) )
-		return false;
-
-	$post    = get_post( $comment->comment_post_ID );
-	$author  = get_userdata( $post->post_author );
-
-	// Who to notify? By default, just the post author, but others can be added.
-	$emails = array();
-	if ( $author ) {
-		$emails[] = $author->user_email;
-	}
-
-	/**
-	 * Filters the list of email addresses to receive a comment notification.
-	 *
-	 * By default, only post authors are notified of comments. This filter allows
-	 * others to be added.
-	 *
-	 * @since 3.7.0
-	 *
-	 * @param array $emails     An array of email addresses to receive a comment notification.
-	 * @param int   $comment_id The comment ID.
-	 */
-	$emails = apply_filters( 'comment_notification_recipients', $emails, $comment->comment_ID );
-	$emails = array_filter( $emails );
-
-	// If there are no addresses to send the comment to, bail.
-	if ( ! count( $emails ) ) {
-		return false;
-	}
-
-	// Facilitate unsetting below without knowing the keys.
-	$emails = array_flip( $emails );
-
-	/**
-	 * Filters whether to notify comment authors of their comments on their own posts.
-	 *
-	 * By default, comment authors aren't notified of their comments on their own
-	 * posts. This filter allows you to override that.
-	 *
-	 * @since 3.8.0
-	 *
-	 * @param bool $notify     Whether to notify the post author of their own comment.
-	 *                         Default false.
-	 * @param int  $comment_id The comment ID.
-	 */
-	$notify_author = apply_filters( 'comment_notification_notify_author', false, $comment->comment_ID );
-
-	// The comment was left by the author
-	if ( $author && ! $notify_author && $comment->user_id == $post->post_author ) {
-		unset( $emails[ $author->user_email ] );
-	}
-
-	// The author moderated a comment on their own post
-	if ( $author && ! $notify_author && $post->post_author == get_current_user_id() ) {
-		unset( $emails[ $author->user_email ] );
-	}
-
-	// The post author is no longer a member of the blog
-	if ( $author && ! $notify_author && ! user_can( $post->post_author, 'read_post', $post->ID ) ) {
-		unset( $emails[ $author->user_email ] );
-	}
-
-	// If there's no email to send the comment to, bail, otherwise flip array back around for use below
-	if ( ! count( $emails ) ) {
-		return false;
-	} else {
-		$emails = array_flip( $emails );
-	}
-
-	$comment_author_domain = @gethostbyaddr($comment->comment_author_IP);
-
-	// The blogname option is escaped with esc_html on the way into the database in sanitize_option
-	// we want to reverse this for the plain text arena of emails.
-	$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
-	$comment_content = wp_specialchars_decode( $comment->comment_content );
-
-	switch ( $comment->comment_type ) {
-		case 'trackback':
-			$notify_message  = sprintf( __( 'New trackback on your post "%s"' ), $post->post_title ) . "\r\n";
-			/* translators: 1: website name, 2: website IP, 3: website hostname */
-			$notify_message .= sprintf( __('Website: %1$s (IP: %2$s, %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
-			$notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
-			$notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
-			$notify_message .= __( 'You can see all trackbacks on this post here:' ) . "\r\n";
-			/* translators: 1: blog name, 2: post title */
-			$subject = sprintf( __('[%1$s] Trackback: "%2$s"'), $blogname, $post->post_title );
-			break;
-		case 'pingback':
-			$notify_message  = sprintf( __( 'New pingback on your post "%s"' ), $post->post_title ) . "\r\n";
-			/* translators: 1: website name, 2: website IP, 3: website hostname */
-			$notify_message .= sprintf( __('Website: %1$s (IP: %2$s, %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
-			$notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
-			$notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
-			$notify_message .= __( 'You can see all pingbacks on this post here:' ) . "\r\n";
-			/* translators: 1: blog name, 2: post title */
-			$subject = sprintf( __('[%1$s] Pingback: "%2$s"'), $blogname, $post->post_title );
-			break;
-		default: // Comments
-			$notify_message  = sprintf( __( 'New comment on your post "%s"' ), $post->post_title ) . "\r\n";
-			/* translators: 1: comment author, 2: author IP, 3: author domain */
-			$notify_message .= sprintf( __( 'Author: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
-			$notify_message .= sprintf( __( 'Email: %s' ), $comment->comment_author_email ) . "\r\n";
-			$notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
-			$notify_message .= sprintf( __('Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
-			$notify_message .= __( 'You can see all comments on this post here:' ) . "\r\n";
-			/* translators: 1: blog name, 2: post title */
-			$subject = sprintf( __('[%1$s] Comment: "%2$s"'), $blogname, $post->post_title );
-			break;
-	}
-	$notify_message .= get_permalink($comment->comment_post_ID) . "#comments\r\n\r\n";
-	$notify_message .= sprintf( __('Permalink: %s'), get_comment_link( $comment ) ) . "\r\n";
-
-	if ( user_can( $post->post_author, 'edit_comment', $comment->comment_ID ) ) {
-		if ( EMPTY_TRASH_DAYS ) {
-			$notify_message .= sprintf( __( 'Trash it: %s' ), admin_url( "comment.php?action=trash&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n";
-		} else {
-			$notify_message .= sprintf( __( 'Delete it: %s' ), admin_url( "comment.php?action=delete&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n";
-		}
-		$notify_message .= sprintf( __( 'Spam it: %s' ), admin_url( "comment.php?action=spam&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n";
-	}
-
-	$wp_email = 'wordpress@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME']));
-
-	if ( '' == $comment->comment_author ) {
-		$from = "From: \"$blogname\" <$wp_email>";
-		if ( '' != $comment->comment_author_email )
-			$reply_to = "Reply-To: $comment->comment_author_email";
-	} else {
-		$from = "From: \"$comment->comment_author\" <$wp_email>";
-		if ( '' != $comment->comment_author_email )
-			$reply_to = "Reply-To: \"$comment->comment_author_email\" <$comment->comment_author_email>";
-	}
-
-	$message_headers = "$from\n"
-		. "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
-
-	if ( isset($reply_to) )
-		$message_headers .= $reply_to . "\n";
-
-	/**
-	 * Filters the comment notification email text.
-	 *
-	 * @since 1.5.2
-	 *
-	 * @param string $notify_message The comment notification email text.
-	 * @param int    $comment_id     Comment ID.
-	 */
-	$notify_message = apply_filters( 'comment_notification_text', $notify_message, $comment->comment_ID );
-
-	/**
-	 * Filters the comment notification email subject.
-	 *
-	 * @since 1.5.2
-	 *
-	 * @param string $subject    The comment notification email subject.
-	 * @param int    $comment_id Comment ID.
-	 */
-	$subject = apply_filters( 'comment_notification_subject', $subject, $comment->comment_ID );
-
-	/**
-	 * Filters the comment notification email headers.
-	 *
-	 * @since 1.5.2
-	 *
-	 * @param string $message_headers Headers for the comment notification email.
-	 * @param int    $comment_id      Comment ID.
-	 */
-	$message_headers = apply_filters( 'comment_notification_headers', $message_headers, $comment->comment_ID );
-
-	foreach ( $emails as $email ) {
-		@wp_mail( $email, wp_specialchars_decode( $subject ), $notify_message, $message_headers );
-	}
-
-	return true;
-}
-endif;
-
-if ( !function_exists('wp_notify_moderator') ) :
-/**
- * Notifies the moderator of the site about a new comment that is awaiting approval.
- *
- * @since 1.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * Uses the {@see 'notify_moderator'} filter to determine whether the site moderator
- * should be notified, overriding the site setting.
- *
- * @param int $comment_id Comment ID.
- * @return true Always returns true.
- */
-function wp_notify_moderator($comment_id) {
-	global $wpdb;
-
-	$maybe_notify = get_option( 'moderation_notify' );
-
-	/**
-	 * Filters whether to send the site moderator email notifications, overriding the site setting.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param bool $maybe_notify Whether to notify blog moderator.
-	 * @param int  $comment_ID   The id of the comment for the notification.
-	 */
-	$maybe_notify = apply_filters( 'notify_moderator', $maybe_notify, $comment_id );
-
-	if ( ! $maybe_notify ) {
-		return true;
-	}
-
-	$comment = get_comment($comment_id);
-	$post = get_post($comment->comment_post_ID);
-	$user = get_userdata( $post->post_author );
-	// Send to the administration and to the post author if the author can modify the comment.
-	$emails = array( get_option( 'admin_email' ) );
-	if ( $user && user_can( $user->ID, 'edit_comment', $comment_id ) && ! empty( $user->user_email ) ) {
-		if ( 0 !== strcasecmp( $user->user_email, get_option( 'admin_email' ) ) )
-			$emails[] = $user->user_email;
-	}
-
-	$comment_author_domain = @gethostbyaddr($comment->comment_author_IP);
-	$comments_waiting = $wpdb->get_var("SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'");
-
-	// The blogname option is escaped with esc_html on the way into the database in sanitize_option
-	// we want to reverse this for the plain text arena of emails.
-	$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
-	$comment_content = wp_specialchars_decode( $comment->comment_content );
-
-	switch ( $comment->comment_type ) {
-		case 'trackback':
-			$notify_message  = sprintf( __('A new trackback on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n";
-			$notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
-			/* translators: 1: website name, 2: website IP, 3: website hostname */
-			$notify_message .= sprintf( __( 'Website: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
-			$notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
-			$notify_message .= __('Trackback excerpt: ') . "\r\n" . $comment_content . "\r\n\r\n";
-			break;
-		case 'pingback':
-			$notify_message  = sprintf( __('A new pingback on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n";
-			$notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
-			/* translators: 1: website name, 2: website IP, 3: website hostname */
-			$notify_message .= sprintf( __( 'Website: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
-			$notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
-			$notify_message .= __('Pingback excerpt: ') . "\r\n" . $comment_content . "\r\n\r\n";
-			break;
-		default: // Comments
-			$notify_message  = sprintf( __('A new comment on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n";
-			$notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
-			$notify_message .= sprintf( __( 'Author: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
-			$notify_message .= sprintf( __( 'Email: %s' ), $comment->comment_author_email ) . "\r\n";
-			$notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
-			$notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
-			break;
-	}
-
-	$notify_message .= sprintf( __( 'Approve it: %s' ), admin_url( "comment.php?action=approve&c={$comment_id}#wpbody-content" ) ) . "\r\n";
-
-	if ( EMPTY_TRASH_DAYS )
-		$notify_message .= sprintf( __( 'Trash it: %s' ), admin_url( "comment.php?action=trash&c={$comment_id}#wpbody-content" ) ) . "\r\n";
-	else
-		$notify_message .= sprintf( __( 'Delete it: %s' ), admin_url( "comment.php?action=delete&c={$comment_id}#wpbody-content" ) ) . "\r\n";
-
-	$notify_message .= sprintf( __( 'Spam it: %s' ), admin_url( "comment.php?action=spam&c={$comment_id}#wpbody-content" ) ) . "\r\n";
-
-	$notify_message .= sprintf( _n('Currently %s comment is waiting for approval. Please visit the moderation panel:',
- 		'Currently %s comments are waiting for approval. Please visit the moderation panel:', $comments_waiting), number_format_i18n($comments_waiting) ) . "\r\n";
-	$notify_message .= admin_url( "edit-comments.php?comment_status=moderated#wpbody-content" ) . "\r\n";
-
-	$subject = sprintf( __('[%1$s] Please moderate: "%2$s"'), $blogname, $post->post_title );
-	$message_headers = '';
-
-	/**
-	 * Filters the list of recipients for comment moderation emails.
-	 *
-	 * @since 3.7.0
-	 *
-	 * @param array $emails     List of email addresses to notify for comment moderation.
-	 * @param int   $comment_id Comment ID.
-	 */
-	$emails = apply_filters( 'comment_moderation_recipients', $emails, $comment_id );
-
-	/**
-	 * Filters the comment moderation email text.
-	 *
-	 * @since 1.5.2
-	 *
-	 * @param string $notify_message Text of the comment moderation email.
-	 * @param int    $comment_id     Comment ID.
-	 */
-	$notify_message = apply_filters( 'comment_moderation_text', $notify_message, $comment_id );
-
-	/**
-	 * Filters the comment moderation email subject.
-	 *
-	 * @since 1.5.2
-	 *
-	 * @param string $subject    Subject of the comment moderation email.
-	 * @param int    $comment_id Comment ID.
-	 */
-	$subject = apply_filters( 'comment_moderation_subject', $subject, $comment_id );
-
-	/**
-	 * Filters the comment moderation email headers.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param string $message_headers Headers for the comment moderation email.
-	 * @param int    $comment_id      Comment ID.
-	 */
-	$message_headers = apply_filters( 'comment_moderation_headers', $message_headers, $comment_id );
-
-	foreach ( $emails as $email ) {
-		@wp_mail( $email, wp_specialchars_decode( $subject ), $notify_message, $message_headers );
-	}
-
-	return true;
-}
-endif;
-
-if ( !function_exists('wp_password_change_notification') ) :
-/**
- * Notify the blog admin of a user changing password, normally via email.
- *
- * @since 2.7.0
- *
- * @param WP_User $user User object.
- */
-function wp_password_change_notification( $user ) {
-	// send a copy of password change notification to the admin
-	// but check to see if it's the admin whose password we're changing, and skip this
-	if ( 0 !== strcasecmp( $user->user_email, get_option( 'admin_email' ) ) ) {
-		/* translators: %s: user name */
-		$message = sprintf( __( 'Password changed for user: %s' ), $user->user_login ) . "\r\n";
-		// The blogname option is escaped with esc_html on the way into the database in sanitize_option
-		// we want to reverse this for the plain text arena of emails.
-		$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
-		/* translators: %s: site title */
-		wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] Password Changed' ), $blogname ), $message );
-	}
-}
-endif;
-
-if ( !function_exists('wp_new_user_notification') ) :
-/**
- * Email login credentials to a newly-registered user.
- *
- * A new user registration notification is also sent to admin email.
- *
- * @since 2.0.0
- * @since 4.3.0 The `$plaintext_pass` parameter was changed to `$notify`.
- * @since 4.3.1 The `$plaintext_pass` parameter was deprecated. `$notify` added as a third parameter.
- * @since 4.6.0 The `$notify` parameter accepts 'user' for sending notification only to the user created.
- *
- * @global wpdb         $wpdb      WordPress database object for queries.
- * @global PasswordHash $wp_hasher Portable PHP password hashing framework instance.
- *
- * @param int    $user_id    User ID.
- * @param null   $deprecated Not used (argument deprecated).
- * @param string $notify     Optional. Type of notification that should happen. Accepts 'admin' or an empty
- *                           string (admin only), 'user', or 'both' (admin and user). Default empty.
- */
-function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' ) {
-	if ( $deprecated !== null ) {
-		_deprecated_argument( __FUNCTION__, '4.3.1' );
-	}
-
-	global $wpdb, $wp_hasher;
-	$user = get_userdata( $user_id );
-
-	// The blogname option is escaped with esc_html on the way into the database in sanitize_option
-	// we want to reverse this for the plain text arena of emails.
-	$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
-
-	if ( 'user' !== $notify ) {
-		$message  = sprintf( __( 'New user registration on your site %s:' ), $blogname ) . "\r\n\r\n";
-		$message .= sprintf( __( 'Username: %s' ), $user->user_login ) . "\r\n\r\n";
-		$message .= sprintf( __( 'Email: %s' ), $user->user_email ) . "\r\n";
-
-		@wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] New User Registration' ), $blogname ), $message );
-	}
-
-	// `$deprecated was pre-4.3 `$plaintext_pass`. An empty `$plaintext_pass` didn't sent a user notifcation.
-	if ( 'admin' === $notify || ( empty( $deprecated ) && empty( $notify ) ) ) {
-		return;
-	}
-
-	// Generate something random for a password reset key.
-	$key = wp_generate_password( 20, false );
-
-	/** This action is documented in wp-login.php */
-	do_action( 'retrieve_password_key', $user->user_login, $key );
-
-	// Now insert the key, hashed, into the DB.
-	if ( empty( $wp_hasher ) ) {
-		$wp_hasher = new PasswordHash( 8, true );
-	}
-	$hashed = time() . ':' . $wp_hasher->HashPassword( $key );
-	$wpdb->update( $wpdb->users, array( 'user_activation_key' => $hashed ), array( 'user_login' => $user->user_login ) );
-
-	$message = sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n";
-	$message .= __('To set your password, visit the following address:') . "\r\n\r\n";
-	$message .= '<' . network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user->user_login), 'login') . ">\r\n\r\n";
-
-	$message .= wp_login_url() . "\r\n";
-
-	wp_mail($user->user_email, sprintf(__('[%s] Your username and password info'), $blogname), $message);
-}
-endif;
-
-if ( !function_exists('wp_nonce_tick') ) :
-/**
- * Get the time-dependent variable for nonce creation.
- *
- * A nonce has a lifespan of two ticks. Nonces in their second tick may be
- * updated, e.g. by autosave.
- *
- * @since 2.5.0
- *
- * @return float Float value rounded up to the next highest integer.
- */
-function wp_nonce_tick() {
-	/**
-	 * Filters the lifespan of nonces in seconds.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param int $lifespan Lifespan of nonces in seconds. Default 86,400 seconds, or one day.
-	 */
-	$nonce_life = apply_filters( 'nonce_life', DAY_IN_SECONDS );
-
-	return ceil(time() / ( $nonce_life / 2 ));
-}
-endif;
-
-if ( !function_exists('wp_verify_nonce') ) :
-/**
- * Verify that correct nonce was used with time limit.
- *
- * The user is given an amount of time to use the token, so therefore, since the
- * UID and $action remain the same, the independent variable is the time.
- *
- * @since 2.0.3
- *
- * @param string     $nonce  Nonce that was used in the form to verify
- * @param string|int $action Should give context to what is taking place and be the same when nonce was created.
- * @return false|int False if the nonce is invalid, 1 if the nonce is valid and generated between
- *                   0-12 hours ago, 2 if the nonce is valid and generated between 12-24 hours ago.
- */
-function wp_verify_nonce( $nonce, $action = -1 ) {
-	$nonce = (string) $nonce;
-	$user = wp_get_current_user();
-	$uid = (int) $user->ID;
-	if ( ! $uid ) {
-		/**
-		 * Filters whether the user who generated the nonce is logged out.
-		 *
-		 * @since 3.5.0
-		 *
-		 * @param int    $uid    ID of the nonce-owning user.
-		 * @param string $action The nonce action.
-		 */
-		$uid = apply_filters( 'nonce_user_logged_out', $uid, $action );
-	}
-
-	if ( empty( $nonce ) ) {
-		return false;
-	}
-
-	$token = wp_get_session_token();
-	$i = wp_nonce_tick();
-
-	// Nonce generated 0-12 hours ago
-	$expected = substr( wp_hash( $i . '|' . $action . '|' . $uid . '|' . $token, 'nonce'), -12, 10 );
-	if ( hash_equals( $expected, $nonce ) ) {
-		return 1;
-	}
-
-	// Nonce generated 12-24 hours ago
-	$expected = substr( wp_hash( ( $i - 1 ) . '|' . $action . '|' . $uid . '|' . $token, 'nonce' ), -12, 10 );
-	if ( hash_equals( $expected, $nonce ) ) {
-		return 2;
-	}
-
-	/**
-	 * Fires when nonce verification fails.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param string     $nonce  The invalid nonce.
-	 * @param string|int $action The nonce action.
-	 * @param WP_User    $user   The current user object.
-	 * @param string     $token  The user's session token.
-	 */
-	do_action( 'wp_verify_nonce_failed', $nonce, $action, $user, $token );
-
-	// Invalid nonce
-	return false;
-}
-endif;
-
-if ( !function_exists('wp_create_nonce') ) :
-/**
- * Creates a cryptographic token tied to a specific action, user, user session,
- * and window of time.
- *
- * @since 2.0.3
- * @since 4.0.0 Session tokens were integrated with nonce creation
- *
- * @param string|int $action Scalar value to add context to the nonce.
- * @return string The token.
- */
-function wp_create_nonce($action = -1) {
-	$user = wp_get_current_user();
-	$uid = (int) $user->ID;
-	if ( ! $uid ) {
-		/** This filter is documented in wp-includes/pluggable.php */
-		$uid = apply_filters( 'nonce_user_logged_out', $uid, $action );
-	}
-
-	$token = wp_get_session_token();
-	$i = wp_nonce_tick();
-
-	return substr( wp_hash( $i . '|' . $action . '|' . $uid . '|' . $token, 'nonce' ), -12, 10 );
-}
-endif;
-
-if ( !function_exists('wp_salt') ) :
-/**
- * Get salt to add to hashes.
- *
- * Salts are created using secret keys. Secret keys are located in two places:
- * in the database and in the wp-config.php file. The secret key in the database
- * is randomly generated and will be appended to the secret keys in wp-config.php.
- *
- * The secret keys in wp-config.php should be updated to strong, random keys to maximize
- * security. Below is an example of how the secret key constants are defined.
- * Do not paste this example directly into wp-config.php. Instead, have a
- * {@link https://api.wordpress.org/secret-key/1.1/salt/ secret key created} just
- * for you.
- *
- *     define('AUTH_KEY',         ' Xakm<o xQy rw4EMsLKM-?!T+,PFF})H4lzcW57AF0U@N@< >M%G4Yt>f`z]MON');
- *     define('SECURE_AUTH_KEY',  'LzJ}op]mr|6+![P}Ak:uNdJCJZd>(Hx.-Mh#Tz)pCIU#uGEnfFz|f ;;eU%/U^O~');
- *     define('LOGGED_IN_KEY',    '|i|Ux`9<p-h$aFf(qnT:sDO:D1P^wZ$$/Ra@miTJi9G;ddp_<q}6H1)o|a +&JCM');
- *     define('NONCE_KEY',        '%:R{[P|,s.KuMltH5}cI;/k<Gx~j!f0I)m_sIyu+&NJZ)-iO>z7X>QYR0Z_XnZ@|');
- *     define('AUTH_SALT',        'eZyT)-Naw]F8CwA*VaW#q*|.)g@o}||wf~@C-YSt}(dh_r6EbI#A,y|nU2{B#JBW');
- *     define('SECURE_AUTH_SALT', '!=oLUTXh,QW=H `}`L|9/^4-3 STz},T(w}W<I`.JjPi)<Bmf1v,HpGe}T1:Xt7n');
- *     define('LOGGED_IN_SALT',   '+XSqHc;@Q*K_b|Z?NC[3H!!EONbh.n<+=uKR:>*c(u`g~EJBf#8u#R{mUEZrozmm');
- *     define('NONCE_SALT',       'h`GXHhD>SLWVfg1(1(N{;.V!MoE(SfbA_ksP@&`+AycHcAV$+?@3q+rxV{%^VyKT');
- *
- * Salting passwords helps against tools which has stored hashed values of
- * common dictionary strings. The added values makes it harder to crack.
- *
- * @since 2.5.0
- *
- * @link https://api.wordpress.org/secret-key/1.1/salt/ Create secrets for wp-config.php
- *
- * @staticvar array $cached_salts
- * @staticvar array $duplicated_keys
- *
- * @param string $scheme Authentication scheme (auth, secure_auth, logged_in, nonce)
- * @return string Salt value
- */
-function wp_salt( $scheme = 'auth' ) {
-	static $cached_salts = array();
-	if ( isset( $cached_salts[ $scheme ] ) ) {
-		/**
-		 * Filters the WordPress salt.
-		 *
-		 * @since 2.5.0
-		 *
-		 * @param string $cached_salt Cached salt for the given scheme.
-		 * @param string $scheme      Authentication scheme. Values include 'auth',
-		 *                            'secure_auth', 'logged_in', and 'nonce'.
-		 */
-		return apply_filters( 'salt', $cached_salts[ $scheme ], $scheme );
-	}
-
-	static $duplicated_keys;
-	if ( null === $duplicated_keys ) {
-		$duplicated_keys = array( 'put your unique phrase here' => true );
-		foreach ( array( 'AUTH', 'SECURE_AUTH', 'LOGGED_IN', 'NONCE', 'SECRET' ) as $first ) {
-			foreach ( array( 'KEY', 'SALT' ) as $second ) {
-				if ( ! defined( "{$first}_{$second}" ) ) {
-					continue;
-				}
-				$value = constant( "{$first}_{$second}" );
-				$duplicated_keys[ $value ] = isset( $duplicated_keys[ $value ] );
-			}
-		}
-	}
-
-	$values = array(
-		'key' => '',
-		'salt' => ''
-	);
-	if ( defined( 'SECRET_KEY' ) && SECRET_KEY && empty( $duplicated_keys[ SECRET_KEY ] ) ) {
-		$values['key'] = SECRET_KEY;
-	}
-	if ( 'auth' == $scheme && defined( 'SECRET_SALT' ) && SECRET_SALT && empty( $duplicated_keys[ SECRET_SALT ] ) ) {
-		$values['salt'] = SECRET_SALT;
-	}
-
-	if ( in_array( $scheme, array( 'auth', 'secure_auth', 'logged_in', 'nonce' ) ) ) {
-		foreach ( array( 'key', 'salt' ) as $type ) {
-			$const = strtoupper( "{$scheme}_{$type}" );
-			if ( defined( $const ) && constant( $const ) && empty( $duplicated_keys[ constant( $const ) ] ) ) {
-				$values[ $type ] = constant( $const );
-			} elseif ( ! $values[ $type ] ) {
-				$values[ $type ] = get_site_option( "{$scheme}_{$type}" );
-				if ( ! $values[ $type ] ) {
-					$values[ $type ] = wp_generate_password( 64, true, true );
-					update_site_option( "{$scheme}_{$type}", $values[ $type ] );
-				}
-			}
-		}
-	} else {
-		if ( ! $values['key'] ) {
-			$values['key'] = get_site_option( 'secret_key' );
-			if ( ! $values['key'] ) {
-				$values['key'] = wp_generate_password( 64, true, true );
-				update_site_option( 'secret_key', $values['key'] );
-			}
-		}
-		$values['salt'] = hash_hmac( 'md5', $scheme, $values['key'] );
-	}
-
-	$cached_salts[ $scheme ] = $values['key'] . $values['salt'];
-
-	/** This filter is documented in wp-includes/pluggable.php */
-	return apply_filters( 'salt', $cached_salts[ $scheme ], $scheme );
-}
-endif;
-
-if ( !function_exists('wp_hash') ) :
-/**
- * Get hash of given string.
- *
- * @since 2.0.3
- *
- * @param string $data   Plain text to hash
- * @param string $scheme Authentication scheme (auth, secure_auth, logged_in, nonce)
- * @return string Hash of $data
- */
-function wp_hash($data, $scheme = 'auth') {
-	$salt = wp_salt($scheme);
-
-	return hash_hmac('md5', $data, $salt);
-}
-endif;
-
-if ( !function_exists('wp_hash_password') ) :
-/**
- * Create a hash (encrypt) of a plain text password.
- *
- * For integration with other applications, this function can be overwritten to
- * instead use the other package password checking algorithm.
- *
- * @since 2.5.0
- *
- * @global PasswordHash $wp_hasher PHPass object
- *
- * @param string $password Plain text user password to hash
- * @return string The hash string of the password
- */
-function wp_hash_password($password) {
-	global $wp_hasher;
-
-	if ( empty($wp_hasher) ) {
-		// By default, use the portable hash from phpass
-		$wp_hasher = new PasswordHash(8, true);
-	}
-
-	return $wp_hasher->HashPassword( trim( $password ) );
-}
-endif;
-
-if ( !function_exists('wp_check_password') ) :
-/**
- * Checks the plaintext password against the encrypted Password.
- *
- * Maintains compatibility between old version and the new cookie authentication
- * protocol using PHPass library. The $hash parameter is the encrypted password
- * and the function compares the plain text password when encrypted similarly
- * against the already encrypted password to see if they match.
- *
- * For integration with other applications, this function can be overwritten to
- * instead use the other package password checking algorithm.
- *
- * @since 2.5.0
- *
- * @global PasswordHash $wp_hasher PHPass object used for checking the password
- *	against the $hash + $password
- * @uses PasswordHash::CheckPassword
- *
- * @param string     $password Plaintext user's password
- * @param string     $hash     Hash of the user's password to check against.
- * @param string|int $user_id  Optional. User ID.
- * @return bool False, if the $password does not match the hashed password
- */
-function wp_check_password($password, $hash, $user_id = '') {
-	global $wp_hasher;
-
-	// If the hash is still md5...
-	if ( strlen($hash) <= 32 ) {
-		$check = hash_equals( $hash, md5( $password ) );
-		if ( $check && $user_id ) {
-			// Rehash using new hash.
-			wp_set_password($password, $user_id);
-			$hash = wp_hash_password($password);
-		}
-
-		/**
-		 * Filters whether the plaintext password matches the encrypted password.
-		 *
-		 * @since 2.5.0
-		 *
-		 * @param bool       $check    Whether the passwords match.
-		 * @param string     $password The plaintext password.
-		 * @param string     $hash     The hashed password.
-		 * @param string|int $user_id  User ID. Can be empty.
-		 */
-		return apply_filters( 'check_password', $check, $password, $hash, $user_id );
-	}
-
-	// If the stored hash is longer than an MD5, presume the
-	// new style phpass portable hash.
-	if ( empty($wp_hasher) ) {
-		// By default, use the portable hash from phpass
-		$wp_hasher = new PasswordHash(8, true);
-	}
-
-	$check = $wp_hasher->CheckPassword($password, $hash);
-
-	/** This filter is documented in wp-includes/pluggable.php */
-	return apply_filters( 'check_password', $check, $password, $hash, $user_id );
-}
-endif;
-
-if ( !function_exists('wp_generate_password') ) :
-/**
- * Generates a random password drawn from the defined set of characters.
- *
- * @since 2.5.0
- *
- * @param int  $length              Optional. The length of password to generate. Default 12.
- * @param bool $special_chars       Optional. Whether to include standard special characters.
- *                                  Default true.
- * @param bool $extra_special_chars Optional. Whether to include other special characters.
- *                                  Used when generating secret keys and salts. Default false.
- * @return string The random password.
- */
-function wp_generate_password( $length = 12, $special_chars = true, $extra_special_chars = false ) {
-	$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
-	if ( $special_chars )
-		$chars .= '!@#$%^&*()';
-	if ( $extra_special_chars )
-		$chars .= '-_ []{}<>~`+=,.;:/?|';
-
-	$password = '';
-	for ( $i = 0; $i < $length; $i++ ) {
-		$password .= substr($chars, wp_rand(0, strlen($chars) - 1), 1);
-	}
-
-	/**
-	 * Filters the randomly-generated password.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $password The generated password.
-	 */
-	return apply_filters( 'random_password', $password );
-}
-endif;
-
-if ( !function_exists('wp_rand') ) :
-/**
- * Generates a random number
- *
- * @since 2.6.2
- * @since 4.4.0 Uses PHP7 random_int() or the random_compat library if available.
- *
- * @global string $rnd_value
- * @staticvar string $seed
- * @staticvar bool $external_rand_source_available
- *
- * @param int $min Lower limit for the generated number
- * @param int $max Upper limit for the generated number
- * @return int A random number between min and max
- */
-function wp_rand( $min = 0, $max = 0 ) {
-	global $rnd_value;
-
-	// Some misconfigured 32bit environments (Entropy PHP, for example) truncate integers larger than PHP_INT_MAX to PHP_INT_MAX rather than overflowing them to floats.
-	$max_random_number = 3000000000 === 2147483647 ? (float) "4294967295" : 4294967295; // 4294967295 = 0xffffffff
-
-	// We only handle Ints, floats are truncated to their integer value.
-	$min = (int) $min;
-	$max = (int) $max;
-
-	// Use PHP's CSPRNG, or a compatible method
-	static $use_random_int_functionality = true;
-	if ( $use_random_int_functionality ) {
-		try {
-			$_max = ( 0 != $max ) ? $max : $max_random_number;
-			// wp_rand() can accept arguments in either order, PHP cannot.
-			$_max = max( $min, $_max );
-			$_min = min( $min, $_max );
-			$val = random_int( $_min, $_max );
-			if ( false !== $val ) {
-				return absint( $val );
-			} else {
-				$use_random_int_functionality = false;
-			}
-		} catch ( Error $e ) {
-			$use_random_int_functionality = false;
-		} catch ( Exception $e ) {
-			$use_random_int_functionality = false;
-		}
-	}
-
-	// Reset $rnd_value after 14 uses
-	// 32(md5) + 40(sha1) + 40(sha1) / 8 = 14 random numbers from $rnd_value
-	if ( strlen($rnd_value) < 8 ) {
-		if ( defined( 'WP_SETUP_CONFIG' ) )
-			static $seed = '';
-		else
-			$seed = get_transient('random_seed');
-		$rnd_value = md5( uniqid(microtime() . mt_rand(), true ) . $seed );
-		$rnd_value .= sha1($rnd_value);
-		$rnd_value .= sha1($rnd_value . $seed);
-		$seed = md5($seed . $rnd_value);
-		if ( ! defined( 'WP_SETUP_CONFIG' ) && ! defined( 'WP_INSTALLING' ) ) {
-			set_transient( 'random_seed', $seed );
-		}
-	}
-
-	// Take the first 8 digits for our value
-	$value = substr($rnd_value, 0, 8);
-
-	// Strip the first eight, leaving the remainder for the next call to wp_rand().
-	$rnd_value = substr($rnd_value, 8);
-
-	$value = abs(hexdec($value));
-
-	// Reduce the value to be within the min - max range
-	if ( $max != 0 )
-		$value = $min + ( $max - $min + 1 ) * $value / ( $max_random_number + 1 );
-
-	return abs(intval($value));
-}
-endif;
-
-if ( !function_exists('wp_set_password') ) :
-/**
- * Updates the user's password with a new encrypted one.
- *
- * For integration with other applications, this function can be overwritten to
- * instead use the other package password checking algorithm.
- *
- * Please note: This function should be used sparingly and is really only meant for single-time
- * application. Leveraging this improperly in a plugin or theme could result in an endless loop
- * of password resets if precautions are not taken to ensure it does not execute on every page load.
- *
- * @since 2.5.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $password The plaintext new user password
- * @param int    $user_id  User ID
- */
-function wp_set_password( $password, $user_id ) {
-	global $wpdb;
-
-	$hash = wp_hash_password( $password );
-	$wpdb->update($wpdb->users, array('user_pass' => $hash, 'user_activation_key' => ''), array('ID' => $user_id) );
-
-	wp_cache_delete($user_id, 'users');
-}
-endif;
-
-if ( !function_exists( 'get_avatar' ) ) :
-/**
- * Retrieve the avatar `<img>` tag for a user, email address, MD5 hash, comment, or post.
- *
- * @since 2.5.0
- * @since 4.2.0 Optional `$args` parameter added.
- *
- * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash,
- *                           user email, WP_User object, WP_Post object, or WP_Comment object.
- * @param int    $size       Optional. Height and width of the avatar image file in pixels. Default 96.
- * @param string $default    Optional. URL for the default image or a default type. Accepts '404'
- *                           (return a 404 instead of a default image), 'retro' (8bit), 'monsterid'
- *                           (monster), 'wavatar' (cartoon face), 'indenticon' (the "quilt"),
- *                           'mystery', 'mm', or 'mysteryman' (The Oyster Man), 'blank' (transparent GIF),
- *                           or 'gravatar_default' (the Gravatar logo). Default is the value of the
- *                           'avatar_default' option, with a fallback of 'mystery'.
- * @param string $alt        Optional. Alternative text to use in &lt;img&gt; tag. Default empty.
- * @param array  $args       {
- *     Optional. Extra arguments to retrieve the avatar.
- *
- *     @type int          $height        Display height of the avatar in pixels. Defaults to $size.
- *     @type int          $width         Display width of the avatar in pixels. Defaults to $size.
- *     @type bool         $force_default Whether to always show the default image, never the Gravatar. Default false.
- *     @type string       $rating        What rating to display avatars up to. Accepts 'G', 'PG', 'R', 'X', and are
- *                                       judged in that order. Default is the value of the 'avatar_rating' option.
- *     @type string       $scheme        URL scheme to use. See set_url_scheme() for accepted values.
- *                                       Default null.
- *     @type array|string $class         Array or string of additional classes to add to the &lt;img&gt; element.
- *                                       Default null.
- *     @type bool         $force_display Whether to always show the avatar - ignores the show_avatars option.
- *                                       Default false.
- *     @type string       $extra_attr    HTML attributes to insert in the IMG element. Is not sanitized. Default empty.
- * }
- * @return false|string `<img>` tag for the user's avatar. False on failure.
- */
-function get_avatar( $id_or_email, $size = 96, $default = '', $alt = '', $args = null ) {
-	$defaults = array(
-		// get_avatar_data() args.
-		'size'          => 96,
-		'height'        => null,
-		'width'         => null,
-		'default'       => get_option( 'avatar_default', 'mystery' ),
-		'force_default' => false,
-		'rating'        => get_option( 'avatar_rating' ),
-		'scheme'        => null,
-		'alt'           => '',
-		'class'         => null,
-		'force_display' => false,
-		'extra_attr'    => '',
-	);
-
-	if ( empty( $args ) ) {
-		$args = array();
-	}
-
-	$args['size']    = (int) $size;
-	$args['default'] = $default;
-	$args['alt']     = $alt;
-
-	$args = wp_parse_args( $args, $defaults );
-
-	if ( empty( $args['height'] ) ) {
-		$args['height'] = $args['size'];
-	}
-	if ( empty( $args['width'] ) ) {
-		$args['width'] = $args['size'];
-	}
-
-	if ( is_object( $id_or_email ) && isset( $id_or_email->comment_ID ) ) {
-		$id_or_email = get_comment( $id_or_email );
-	}
-
-	/**
-	 * Filters whether to retrieve the avatar URL early.
-	 *
-	 * Passing a non-null value will effectively short-circuit get_avatar(), passing
-	 * the value through the {@see 'get_avatar'} filter and returning early.
-	 *
-	 * @since 4.2.0
-	 *
-	 * @param string $avatar      HTML for the user's avatar. Default null.
-	 * @param mixed  $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash,
-	 *                            user email, WP_User object, WP_Post object, or WP_Comment object.
-	 * @param array  $args        Arguments passed to get_avatar_url(), after processing.
-	 */
-	$avatar = apply_filters( 'pre_get_avatar', null, $id_or_email, $args );
-
-	if ( ! is_null( $avatar ) ) {
-		/** This filter is documented in wp-includes/pluggable.php */
-		return apply_filters( 'get_avatar', $avatar, $id_or_email, $args['size'], $args['default'], $args['alt'], $args );
-	}
-
-	if ( ! $args['force_display'] && ! get_option( 'show_avatars' ) ) {
-		return false;
-	}
-
-	$url2x = get_avatar_url( $id_or_email, array_merge( $args, array( 'size' => $args['size'] * 2 ) ) );
-
-	$args = get_avatar_data( $id_or_email, $args );
-
-	$url = $args['url'];
-
-	if ( ! $url || is_wp_error( $url ) ) {
-		return false;
-	}
-
-	$class = array( 'avatar', 'avatar-' . (int) $args['size'], 'photo' );
-
-	if ( ! $args['found_avatar'] || $args['force_default'] ) {
-		$class[] = 'avatar-default';
-	}
-
-	if ( $args['class'] ) {
-		if ( is_array( $args['class'] ) ) {
-			$class = array_merge( $class, $args['class'] );
-		} else {
-			$class[] = $args['class'];
-		}
-	}
-
-	$avatar = sprintf(
-		"<img alt='%s' src='%s' srcset='%s' class='%s' height='%d' width='%d' %s/>",
-		esc_attr( $args['alt'] ),
-		esc_url( $url ),
-		esc_attr( "$url2x 2x" ),
-		esc_attr( join( ' ', $class ) ),
-		(int) $args['height'],
-		(int) $args['width'],
-		$args['extra_attr']
-	);
-
-	/**
-	 * Filters the avatar to retrieve.
-	 *
-	 * @since 2.5.0
-	 * @since 4.2.0 The `$args` parameter was added.
-	 *
-	 * @param string $avatar      &lt;img&gt; tag for the user's avatar.
-	 * @param mixed  $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash,
-	 *                            user email, WP_User object, WP_Post object, or WP_Comment object.
-	 * @param int    $size        Square avatar width and height in pixels to retrieve.
-	 * @param string $alt         Alternative text to use in the avatar image tag.
-	 *                                       Default empty.
-	 * @param array  $args        Arguments passed to get_avatar_data(), after processing.
-	 */
-	return apply_filters( 'get_avatar', $avatar, $id_or_email, $args['size'], $args['default'], $args['alt'], $args );
-}
-endif;
-
-if ( !function_exists( 'wp_text_diff' ) ) :
-/**
- * Displays a human readable HTML representation of the difference between two strings.
- *
- * The Diff is available for getting the changes between versions. The output is
- * HTML, so the primary use is for displaying the changes. If the two strings
- * are equivalent, then an empty string will be returned.
- *
- * The arguments supported and can be changed are listed below.
- *
- * 'title' : Default is an empty string. Titles the diff in a manner compatible
- *		with the output.
- * 'title_left' : Default is an empty string. Change the HTML to the left of the
- *		title.
- * 'title_right' : Default is an empty string. Change the HTML to the right of
- *		the title.
- *
- * @since 2.6.0
- *
- * @see wp_parse_args() Used to change defaults to user defined settings.
- * @uses Text_Diff
- * @uses WP_Text_Diff_Renderer_Table
- *
- * @param string       $left_string  "old" (left) version of string
- * @param string       $right_string "new" (right) version of string
- * @param string|array $args         Optional. Change 'title', 'title_left', and 'title_right' defaults.
- * @return string Empty string if strings are equivalent or HTML with differences.
- */
-function wp_text_diff( $left_string, $right_string, $args = null ) {
-	$defaults = array( 'title' => '', 'title_left' => '', 'title_right' => '' );
-	$args = wp_parse_args( $args, $defaults );
-
-	if ( ! class_exists( 'WP_Text_Diff_Renderer_Table', false ) )
-		require( ABSPATH . WPINC . '/wp-diff.php' );
-
-	$left_string  = normalize_whitespace($left_string);
-	$right_string = normalize_whitespace($right_string);
-
-	$left_lines  = explode("\n", $left_string);
-	$right_lines = explode("\n", $right_string);
-	$text_diff = new Text_Diff($left_lines, $right_lines);
-	$renderer  = new WP_Text_Diff_Renderer_Table( $args );
-	$diff = $renderer->render($text_diff);
-
-	if ( !$diff )
-		return '';
-
-	$r  = "<table class='diff'>\n";
-
-	if ( ! empty( $args[ 'show_split_view' ] ) ) {
-		$r .= "<col class='content diffsplit left' /><col class='content diffsplit middle' /><col class='content diffsplit right' />";
-	} else {
-		$r .= "<col class='content' />";
-	}
-
-	if ( $args['title'] || $args['title_left'] || $args['title_right'] )
-		$r .= "<thead>";
-	if ( $args['title'] )
-		$r .= "<tr class='diff-title'><th colspan='4'>$args[title]</th></tr>\n";
-	if ( $args['title_left'] || $args['title_right'] ) {
-		$r .= "<tr class='diff-sub-title'>\n";
-		$r .= "\t<td></td><th>$args[title_left]</th>\n";
-		$r .= "\t<td></td><th>$args[title_right]</th>\n";
-		$r .= "</tr>\n";
-	}
-	if ( $args['title'] || $args['title_left'] || $args['title_right'] )
-		$r .= "</thead>\n";
-
-	$r .= "<tbody>\n$diff\n</tbody>\n";
-	$r .= "</table>";
-
-	return $r;
-}
-endif;
-
Index: www/wp-admin/includes/class-wp-list-table-compat.php
===================================================================
--- www/wp-admin/includes/class-wp-list-table-compat.php	(revision 38565)
+++ www/wp-admin/autoload/list-table/_WP_List_Table_Compat.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/widgets/class-wp-widget-tag-cloud.php
===================================================================
--- www/wp-includes/widgets/class-wp-widget-tag-cloud.php	(revision 38565)
+++ www/wp-includes/autoload/widgets/WP_Widget_Tag_Cloud.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/includes/class-core-upgrader.php
===================================================================
--- www/wp-admin/includes/class-core-upgrader.php	(revision 38565)
+++ www/wp-admin/autoload/upgrader/Core_Upgrader.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/ms-blogs.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/ms-blogs.php	(revision 38565)
+++ www/wp-includes/ms-blogs.php	(revision 38565)
@@ -1,1268 +0,0 @@
-<?php
-
-/**
- * Site/blog functions that work with the blogs table and related data.
- *
- * @package WordPress
- * @subpackage Multisite
- * @since MU
- */
-
-/**
- * Update the last_updated field for the current site.
- *
- * @since MU
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- */
-function wpmu_update_blogs_date() {
-	global $wpdb;
-
-	update_blog_details( $wpdb->blogid, array('last_updated' => current_time('mysql', true)) );
-	/**
-	 * Fires after the blog details are updated.
-	 *
-	 * @since MU
-	 *
-	 * @param int $blog_id Site ID.
-	 */
-	do_action( 'wpmu_blog_updated', $wpdb->blogid );
-}
-
-/**
- * Get a full blog URL, given a blog id.
- *
- * @since MU
- *
- * @param int $blog_id Blog ID
- * @return string Full URL of the blog if found. Empty string if not.
- */
-function get_blogaddress_by_id( $blog_id ) {
-	$bloginfo = get_blog_details( (int) $blog_id );
-
-	if ( empty( $bloginfo ) ) {
-		return '';
-	}
-
-	$scheme = parse_url( $bloginfo->home, PHP_URL_SCHEME );
-	$scheme = empty( $scheme ) ? 'http' : $scheme;
-
-	return esc_url( $scheme . '://' . $bloginfo->domain . $bloginfo->path );
-}
-
-/**
- * Get a full blog URL, given a blog name.
- *
- * @since MU
- *
- * @param string $blogname The (subdomain or directory) name
- * @return string
- */
-function get_blogaddress_by_name( $blogname ) {
-	if ( is_subdomain_install() ) {
-		if ( $blogname == 'main' )
-			$blogname = 'www';
-		$url = rtrim( network_home_url(), '/' );
-		if ( !empty( $blogname ) )
-			$url = preg_replace( '|^([^\.]+://)|', "\${1}" . $blogname . '.', $url );
-	} else {
-		$url = network_home_url( $blogname );
-	}
-	return esc_url( $url . '/' );
-}
-
-/**
- * Given a blog's (subdomain or directory) slug, retrieve its id.
- *
- * @since MU
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $slug
- * @return int A blog id
- */
-function get_id_from_blogname( $slug ) {
-	global $wpdb;
-
-	$current_site = get_current_site();
-	$slug = trim( $slug, '/' );
-
-	$blog_id = wp_cache_get( 'get_id_from_blogname_' . $slug, 'blog-details' );
-	if ( $blog_id )
-		return $blog_id;
-
-	if ( is_subdomain_install() ) {
-		$domain = $slug . '.' . $current_site->domain;
-		$path = $current_site->path;
-	} else {
-		$domain = $current_site->domain;
-		$path = $current_site->path . $slug . '/';
-	}
-
-	$blog_id = $wpdb->get_var( $wpdb->prepare("SELECT blog_id FROM {$wpdb->blogs} WHERE domain = %s AND path = %s", $domain, $path) );
-	wp_cache_set( 'get_id_from_blogname_' . $slug, $blog_id, 'blog-details' );
-	return $blog_id;
-}
-
-/**
- * Retrieve the details for a blog from the blogs table and blog options.
- *
- * @since MU
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int|string|array $fields  Optional. A blog ID, a blog slug, or an array of fields to query against.
- *                                  If not specified the current blog ID is used.
- * @param bool             $get_all Whether to retrieve all details or only the details in the blogs table.
- *                                  Default is true.
- * @return WP_Site|false Blog details on success. False on failure.
- */
-function get_blog_details( $fields = null, $get_all = true ) {
-	global $wpdb;
-
-	if ( is_array($fields ) ) {
-		if ( isset($fields['blog_id']) ) {
-			$blog_id = $fields['blog_id'];
-		} elseif ( isset($fields['domain']) && isset($fields['path']) ) {
-			$key = md5( $fields['domain'] . $fields['path'] );
-			$blog = wp_cache_get($key, 'blog-lookup');
-			if ( false !== $blog )
-				return $blog;
-			if ( substr( $fields['domain'], 0, 4 ) == 'www.' ) {
-				$nowww = substr( $fields['domain'], 4 );
-				$blog = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->blogs WHERE domain IN (%s,%s) AND path = %s ORDER BY CHAR_LENGTH(domain) DESC", $nowww, $fields['domain'], $fields['path'] ) );
-			} else {
-				$blog = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->blogs WHERE domain = %s AND path = %s", $fields['domain'], $fields['path'] ) );
-			}
-			if ( $blog ) {
-				wp_cache_set($blog->blog_id . 'short', $blog, 'blog-details');
-				$blog_id = $blog->blog_id;
-			} else {
-				return false;
-			}
-		} elseif ( isset($fields['domain']) && is_subdomain_install() ) {
-			$key = md5( $fields['domain'] );
-			$blog = wp_cache_get($key, 'blog-lookup');
-			if ( false !== $blog )
-				return $blog;
-			if ( substr( $fields['domain'], 0, 4 ) == 'www.' ) {
-				$nowww = substr( $fields['domain'], 4 );
-				$blog = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->blogs WHERE domain IN (%s,%s) ORDER BY CHAR_LENGTH(domain) DESC", $nowww, $fields['domain'] ) );
-			} else {
-				$blog = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->blogs WHERE domain = %s", $fields['domain'] ) );
-			}
-			if ( $blog ) {
-				wp_cache_set($blog->blog_id . 'short', $blog, 'blog-details');
-				$blog_id = $blog->blog_id;
-			} else {
-				return false;
-			}
-		} else {
-			return false;
-		}
-	} else {
-		if ( ! $fields )
-			$blog_id = get_current_blog_id();
-		elseif ( ! is_numeric( $fields ) )
-			$blog_id = get_id_from_blogname( $fields );
-		else
-			$blog_id = $fields;
-	}
-
-	$blog_id = (int) $blog_id;
-
-	$all = $get_all == true ? '' : 'short';
-	$details = wp_cache_get( $blog_id . $all, 'blog-details' );
-
-	if ( $details ) {
-		if ( ! is_object( $details ) ) {
-			if ( $details == -1 ) {
-				return false;
-			} else {
-				// Clear old pre-serialized objects. Cache clients do better with that.
-				wp_cache_delete( $blog_id . $all, 'blog-details' );
-				unset($details);
-			}
-		} else {
-			return $details;
-		}
-	}
-
-	// Try the other cache.
-	if ( $get_all ) {
-		$details = wp_cache_get( $blog_id . 'short', 'blog-details' );
-	} else {
-		$details = wp_cache_get( $blog_id, 'blog-details' );
-		// If short was requested and full cache is set, we can return.
-		if ( $details ) {
-			if ( ! is_object( $details ) ) {
-				if ( $details == -1 ) {
-					return false;
-				} else {
-					// Clear old pre-serialized objects. Cache clients do better with that.
-					wp_cache_delete( $blog_id, 'blog-details' );
-					unset($details);
-				}
-			} else {
-				return $details;
-			}
-		}
-	}
-
-	if ( empty($details) ) {
-		$details = WP_Site::get_instance( $blog_id );
-		if ( ! $details ) {
-			// Set the full cache.
-			wp_cache_set( $blog_id, -1, 'blog-details' );
-			return false;
-		}
-	}
-
-	if ( ! $details instanceof WP_Site ) {
-		$details = new WP_Site( $details );
-	}
-
-	if ( ! $get_all ) {
-		wp_cache_set( $blog_id . $all, $details, 'blog-details' );
-		return $details;
-	}
-
-	switch_to_blog( $blog_id );
-	$details->blogname   = get_option( 'blogname' );
-	$details->siteurl    = get_option( 'siteurl' );
-	$details->post_count = get_option( 'post_count' );
-	$details->home       = get_option( 'home' );
-	restore_current_blog();
-
-	/**
-	 * Filters a blog's details.
-	 *
-	 * @since MU
-	 *
-	 * @param object $details The blog details.
-	 */
-	$details = apply_filters( 'blog_details', $details );
-
-	wp_cache_set( $blog_id . $all, $details, 'blog-details' );
-
-	$key = md5( $details->domain . $details->path );
-	wp_cache_set( $key, $details, 'blog-lookup' );
-
-	return $details;
-}
-
-/**
- * Clear the blog details cache.
- *
- * @since MU
- *
- * @param int $blog_id Optional. Blog ID. Defaults to current blog.
- */
-function refresh_blog_details( $blog_id = 0 ) {
-	$blog_id = (int) $blog_id;
-	if ( ! $blog_id ) {
-		$blog_id = get_current_blog_id();
-	}
-
-	$details = get_blog_details( $blog_id, false );
-	if ( ! $details ) {
-		// Make sure clean_blog_cache() gets the blog ID
-		// when the blog has been previously cached as
-		// non-existent.
-		$details = (object) array(
-			'blog_id' => $blog_id,
-			'domain' => null,
-			'path' => null
-		);
-	}
-
-	clean_blog_cache( $details );
-
-	/**
-	 * Fires after the blog details cache is cleared.
-	 *
-	 * @since 3.4.0
-	 *
-	 * @param int $blog_id Blog ID.
-	 */
-	do_action( 'refresh_blog_details', $blog_id );
-}
-
-/**
- * Update the details for a blog. Updates the blogs table for a given blog id.
- *
- * @since MU
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int   $blog_id Blog ID
- * @param array $details Array of details keyed by blogs table field names.
- * @return bool True if update succeeds, false otherwise.
- */
-function update_blog_details( $blog_id, $details = array() ) {
-	global $wpdb;
-
-	if ( empty($details) )
-		return false;
-
-	if ( is_object($details) )
-		$details = get_object_vars($details);
-
-	$current_details = get_blog_details($blog_id, false);
-	if ( empty($current_details) )
-		return false;
-
-	$current_details = get_object_vars($current_details);
-
-	$details = array_merge($current_details, $details);
-	$details['last_updated'] = current_time('mysql', true);
-
-	$update_details = array();
-	$fields = array( 'site_id', 'domain', 'path', 'registered', 'last_updated', 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id');
-	foreach ( array_intersect( array_keys( $details ), $fields ) as $field ) {
-		if ( 'path' === $field ) {
-			$details[ $field ] = trailingslashit( '/' . trim( $details[ $field ], '/' ) );
-		}
-
-		$update_details[ $field ] = $details[ $field ];
-	}
-
-	$result = $wpdb->update( $wpdb->blogs, $update_details, array('blog_id' => $blog_id) );
-
-	if ( false === $result )
-		return false;
-
-	// If spam status changed, issue actions.
-	if ( $details['spam'] != $current_details['spam'] ) {
-		if ( $details['spam'] == 1 ) {
-			/**
-			 * Fires when the blog status is changed to 'spam'.
-			 *
-			 * @since MU
-			 *
-			 * @param int $blog_id Blog ID.
-			 */
-			do_action( 'make_spam_blog', $blog_id );
-		} else {
-			/**
-			 * Fires when the blog status is changed to 'ham'.
-			 *
-			 * @since MU
-			 *
-			 * @param int $blog_id Blog ID.
-			 */
-			do_action( 'make_ham_blog', $blog_id );
-		}
-	}
-
-	// If mature status changed, issue actions.
-	if ( $details['mature'] != $current_details['mature'] ) {
-		if ( $details['mature'] == 1 ) {
-			/**
-			 * Fires when the blog status is changed to 'mature'.
-			 *
-			 * @since 3.1.0
-			 *
-			 * @param int $blog_id Blog ID.
-			 */
-			do_action( 'mature_blog', $blog_id );
-		} else {
-			/**
-			 * Fires when the blog status is changed to 'unmature'.
-			 *
-			 * @since 3.1.0
-			 *
-			 * @param int $blog_id Blog ID.
-			 */
-			do_action( 'unmature_blog', $blog_id );
-		}
-	}
-
-	// If archived status changed, issue actions.
-	if ( $details['archived'] != $current_details['archived'] ) {
-		if ( $details['archived'] == 1 ) {
-			/**
-			 * Fires when the blog status is changed to 'archived'.
-			 *
-			 * @since MU
-			 *
-			 * @param int $blog_id Blog ID.
-			 */
-			do_action( 'archive_blog', $blog_id );
-		} else {
-			/**
-			 * Fires when the blog status is changed to 'unarchived'.
-			 *
-			 * @since MU
-			 *
-			 * @param int $blog_id Blog ID.
-			 */
-			do_action( 'unarchive_blog', $blog_id );
-		}
-	}
-
-	// If deleted status changed, issue actions.
-	if ( $details['deleted'] != $current_details['deleted'] ) {
-		if ( $details['deleted'] == 1 ) {
-			/**
-			 * Fires when the blog status is changed to 'deleted'.
-			 *
-			 * @since 3.5.0
-			 *
-			 * @param int $blog_id Blog ID.
-			 */
-			do_action( 'make_delete_blog', $blog_id );
-		} else {
-			/**
-			 * Fires when the blog status is changed to 'undeleted'.
-			 *
-			 * @since 3.5.0
-			 *
-			 * @param int $blog_id Blog ID.
-			 */
-			do_action( 'make_undelete_blog', $blog_id );
-		}
-	}
-
-	if ( isset( $details['public'] ) ) {
-		switch_to_blog( $blog_id );
-		update_option( 'blog_public', $details['public'] );
-		restore_current_blog();
-	}
-
-	refresh_blog_details($blog_id);
-
-	return true;
-}
-
-/**
- * Clean the blog cache
- *
- * @since 3.5.0
- *
- * @param WP_Site $blog The blog details as returned from get_blog_details()
- */
-function clean_blog_cache( $blog ) {
-	$blog_id = $blog->blog_id;
-	$domain_path_key = md5( $blog->domain . $blog->path );
-
-	wp_cache_delete( $blog_id, 'sites' );
-	wp_cache_delete( $blog_id, 'site-details' );
-	wp_cache_delete( $blog_id , 'blog-details' );
-	wp_cache_delete( $blog_id . 'short' , 'blog-details' );
-	wp_cache_delete(  $domain_path_key, 'blog-lookup' );
-	wp_cache_delete( 'current_blog_' . $blog->domain, 'site-options' );
-	wp_cache_delete( 'current_blog_' . $blog->domain . $blog->path, 'site-options' );
-	wp_cache_delete( 'get_id_from_blogname_' . trim( $blog->path, '/' ), 'blog-details' );
-	wp_cache_delete( $domain_path_key, 'blog-id-cache' );
-
-	/**
-	 * Fires immediately after a site has been removed from the object cache.
-	 *
-	 * @since 4.6.0
-	 *
-	 * @param int     $id              Blog ID.
-	 * @param WP_Site $blog            Site object.
-	 * @param string  $domain_path_key md5 hash of domain and path.
-	 */
-	do_action( 'clean_site_cache', $blog_id, $blog, $domain_path_key );
-
-	wp_cache_set( 'last_changed', microtime(), 'sites' );
-}
-
-/**
- * Retrieves site data given a site ID or site object.
- *
- * Site data will be cached and returned after being passed through a filter.
- * If the provided site is empty, the current site global will be used.
- *
- * @since 4.6.0
- *
- * @param WP_Site|int|null $site Optional. Site to retrieve. Default is the current site.
- * @return WP_Site|null The site object or null if not found.
- */
-function get_site( $site = null ) {
-	if ( empty( $site ) ) {
-		$site = get_current_blog_id();
-	}
-
-	if ( $site instanceof WP_Site ) {
-		$_site = $site;
-	} elseif ( is_object( $site ) ) {
-		$_site = new WP_Site( $site );
-	} else {
-		$_site = WP_Site::get_instance( $site );
-	}
-
-	if ( ! $_site ) {
-		return null;
-	}
-
-	/**
-	 * Fires after a site is retrieved.
-	 *
-	 * @since 4.6.0
-	 *
-	 * @param WP_Site $_site Site data.
-	 */
-	$_site = apply_filters( 'get_site', $_site );
-
-	return $_site;
-}
-
-/**
- * Adds any sites from the given ids to the cache that do not already exist in cache.
- *
- * @since 4.6.0
- * @access private
- *
- * @see update_site_cache()
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param array $ids ID list.
- */
-function _prime_site_caches( $ids ) {
-	global $wpdb;
-
-	$non_cached_ids = _get_non_cached_ids( $ids, 'sites' );
-	if ( ! empty( $non_cached_ids ) ) {
-		$fresh_sites = $wpdb->get_results( sprintf( "SELECT * FROM $wpdb->blogs WHERE blog_id IN (%s)", join( ",", array_map( 'intval', $non_cached_ids ) ) ) );
-
-		update_site_cache( $fresh_sites );
-	}
-}
-
-/**
- * Updates sites in cache.
- *
- * @since 4.6.0
- *
- * @param array $sites Array of site objects.
- */
-function update_site_cache( $sites ) {
-	if ( ! $sites ) {
-		return;
-	}
-
-	foreach ( $sites as $site ) {
-		wp_cache_add( $site->blog_id, $site, 'sites' );
-		wp_cache_add( $site->blog_id . 'short', $site, 'blog-details' );
-	}
-}
-
-/**
- * Retrieves a list of sites matching requested arguments.
- *
- * @since 4.6.0
- *
- * @see WP_Site_Query::parse_query()
- *
- * @param string|array $args {
- *     Optional. Array or query string of site query parameters. Default empty.
- *
- *     @type array        $site__in          Array of site IDs to include. Default empty.
- *     @type array        $site__not_in      Array of site IDs to exclude. Default empty.
- *     @type bool         $count             Whether to return a site count (true) or array of site objects.
- *                                           Default false.
- *     @type array        $date_query        Date query clauses to limit sites by. See WP_Date_Query.
- *                                           Default null.
- *     @type string       $fields            Site fields to return. Accepts 'ids' (returns an array of site IDs)
- *                                           or empty (returns an array of complete site objects). Default empty.
- *     @type int          $ID                A site ID to only return that site. Default empty.
- *     @type int          $number            Maximum number of sites to retrieve. Default 100.
- *     @type int          $offset            Number of sites to offset the query. Used to build LIMIT clause.
- *                                           Default 0.
- *     @type bool         $no_found_rows     Whether to disable the `SQL_CALC_FOUND_ROWS` query. Default true.
- *     @type string|array $orderby           Site status or array of statuses. Accepts 'id', 'domain', 'path',
- *                                           'network_id', 'last_updated', 'registered', 'domain_length',
- *                                           'path_length', 'site__in' and 'network__in'. Also accepts false,
- *                                           an empty array, or 'none' to disable `ORDER BY` clause.
- *                                           Default 'id'.
- *     @type string       $order             How to order retrieved sites. Accepts 'ASC', 'DESC'. Default 'ASC'.
- *     @type int          $network_id        Limit results to those affiliated with a given network ID. If 0,
- *                                           include all networks. Default 0.
- *     @type array        $network__in       Array of network IDs to include affiliated sites for. Default empty.
- *     @type array        $network__not_in   Array of network IDs to exclude affiliated sites for. Default empty.
- *     @type string       $domain            Limit results to those affiliated with a given domain. Default empty.
- *     @type array        $domain__in        Array of domains to include affiliated sites for. Default empty.
- *     @type array        $domain__not_in    Array of domains to exclude affiliated sites for. Default empty.
- *     @type string       $path              Limit results to those affiliated with a given path. Default empty.
- *     @type array        $path__in          Array of paths to include affiliated sites for. Default empty.
- *     @type array        $path__not_in      Array of paths to exclude affiliated sites for. Default empty.
- *     @type int          $public            Limit results to public sites. Accepts '1' or '0'. Default empty.
- *     @type int          $archived          Limit results to archived sites. Accepts '1' or '0'. Default empty.
- *     @type int          $mature            Limit results to mature sites. Accepts '1' or '0'. Default empty.
- *     @type int          $spam              Limit results to spam sites. Accepts '1' or '0'. Default empty.
- *     @type int          $deleted           Limit results to deleted sites. Accepts '1' or '0'. Default empty.
- *     @type string       $search            Search term(s) to retrieve matching sites for. Default empty.
- *     @type array        $search_columns    Array of column names to be searched. Accepts 'domain' and 'path'.
- *                                           Default empty array.
- *     @type bool         $update_site_cache Whether to prime the cache for found sites. Default false.
- * }
- * @return array List of sites.
- */
-function get_sites( $args = array() ) {
-	$query = new WP_Site_Query();
-
-	return $query->query( $args );
-}
-
-/**
- * Retrieve option value for a given blog id based on name of option.
- *
- * If the option does not exist or does not have a value, then the return value
- * will be false. This is useful to check whether you need to install an option
- * and is commonly used during installation of plugin options and to test
- * whether upgrading is required.
- *
- * If the option was serialized then it will be unserialized when it is returned.
- *
- * @since MU
- *
- * @param int    $id      A blog ID. Can be null to refer to the current blog.
- * @param string $option  Name of option to retrieve. Expected to not be SQL-escaped.
- * @param mixed  $default Optional. Default value to return if the option does not exist.
- * @return mixed Value set for the option.
- */
-function get_blog_option( $id, $option, $default = false ) {
-	$id = (int) $id;
-
-	if ( empty( $id ) )
-		$id = get_current_blog_id();
-
-	if ( get_current_blog_id() == $id )
-		return get_option( $option, $default );
-
-	switch_to_blog( $id );
-	$value = get_option( $option, $default );
-	restore_current_blog();
-
-	/**
-	 * Filters a blog option value.
-	 *
-	 * The dynamic portion of the hook name, `$option`, refers to the blog option name.
-	 *
-	 * @since 3.5.0
-	 *
-	 * @param string  $value The option value.
-	 * @param int     $id    Blog ID.
-	 */
-	return apply_filters( "blog_option_{$option}", $value, $id );
-}
-
-/**
- * Add a new option for a given blog id.
- *
- * You do not need to serialize values. If the value needs to be serialized, then
- * it will be serialized before it is inserted into the database. Remember,
- * resources can not be serialized or added as an option.
- *
- * You can create options without values and then update the values later.
- * Existing options will not be updated and checks are performed to ensure that you
- * aren't adding a protected WordPress option. Care should be taken to not name
- * options the same as the ones which are protected.
- *
- * @since MU
- *
- * @param int    $id     A blog ID. Can be null to refer to the current blog.
- * @param string $option Name of option to add. Expected to not be SQL-escaped.
- * @param mixed  $value  Optional. Option value, can be anything. Expected to not be SQL-escaped.
- * @return bool False if option was not added and true if option was added.
- */
-function add_blog_option( $id, $option, $value ) {
-	$id = (int) $id;
-
-	if ( empty( $id ) )
-		$id = get_current_blog_id();
-
-	if ( get_current_blog_id() == $id )
-		return add_option( $option, $value );
-
-	switch_to_blog( $id );
-	$return = add_option( $option, $value );
-	restore_current_blog();
-
-	return $return;
-}
-
-/**
- * Removes option by name for a given blog id. Prevents removal of protected WordPress options.
- *
- * @since MU
- *
- * @param int    $id     A blog ID. Can be null to refer to the current blog.
- * @param string $option Name of option to remove. Expected to not be SQL-escaped.
- * @return bool True, if option is successfully deleted. False on failure.
- */
-function delete_blog_option( $id, $option ) {
-	$id = (int) $id;
-
-	if ( empty( $id ) )
-		$id = get_current_blog_id();
-
-	if ( get_current_blog_id() == $id )
-		return delete_option( $option );
-
-	switch_to_blog( $id );
-	$return = delete_option( $option );
-	restore_current_blog();
-
-	return $return;
-}
-
-/**
- * Update an option for a particular blog.
- *
- * @since MU
- *
- * @param int    $id         The blog id.
- * @param string $option     The option key.
- * @param mixed  $value      The option value.
- * @param mixed  $deprecated Not used.
- * @return bool True on success, false on failure.
- */
-function update_blog_option( $id, $option, $value, $deprecated = null ) {
-	$id = (int) $id;
-
-	if ( null !== $deprecated  )
-		_deprecated_argument( __FUNCTION__, '3.1.0' );
-
-	if ( get_current_blog_id() == $id )
-		return update_option( $option, $value );
-
-	switch_to_blog( $id );
-	$return = update_option( $option, $value );
-	restore_current_blog();
-
-	refresh_blog_details( $id );
-
-	return $return;
-}
-
-/**
- * Switch the current blog.
- *
- * This function is useful if you need to pull posts, or other information,
- * from other blogs. You can switch back afterwards using restore_current_blog().
- *
- * Things that aren't switched:
- *  - autoloaded options. See #14992
- *  - plugins. See #14941
- *
- * @see restore_current_blog()
- * @since MU
- *
- * @global wpdb            $wpdb
- * @global int             $blog_id
- * @global array           $_wp_switched_stack
- * @global bool            $switched
- * @global string          $table_prefix
- * @global WP_Object_Cache $wp_object_cache
- *
- * @param int  $new_blog   The id of the blog you want to switch to. Default: current blog
- * @param bool $deprecated Deprecated argument
- * @return true Always returns True.
- */
-function switch_to_blog( $new_blog, $deprecated = null ) {
-	global $wpdb;
-
-	$blog_id = get_current_blog_id();
-	if ( empty( $new_blog ) ) {
-		$new_blog = $blog_id;
-	}
-
-	$GLOBALS['_wp_switched_stack'][] = $blog_id;
-
-	/*
-	 * If we're switching to the same blog id that we're on,
-	 * set the right vars, do the associated actions, but skip
-	 * the extra unnecessary work
-	 */
-	if ( $new_blog == $blog_id ) {
-		/**
-		 * Fires when the blog is switched.
-		 *
-		 * @since MU
-		 *
-		 * @param int $new_blog New blog ID.
-		 * @param int $new_blog Blog ID.
-		 */
-		do_action( 'switch_blog', $new_blog, $new_blog );
-		$GLOBALS['switched'] = true;
-		return true;
-	}
-
-	$wpdb->set_blog_id( $new_blog );
-	$GLOBALS['table_prefix'] = $wpdb->get_blog_prefix();
-	$prev_blog_id = $blog_id;
-	$GLOBALS['blog_id'] = $new_blog;
-
-	if ( function_exists( 'wp_cache_switch_to_blog' ) ) {
-		wp_cache_switch_to_blog( $new_blog );
-	} else {
-		global $wp_object_cache;
-
-		if ( is_object( $wp_object_cache ) && isset( $wp_object_cache->global_groups ) ) {
-			$global_groups = $wp_object_cache->global_groups;
-		} else {
-			$global_groups = false;
-		}
-		wp_cache_init();
-
-		if ( function_exists( 'wp_cache_add_global_groups' ) ) {
-			if ( is_array( $global_groups ) ) {
-				wp_cache_add_global_groups( $global_groups );
-			} else {
-				wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache', 'networks', 'sites', 'site-details' ) );
-			}
-			wp_cache_add_non_persistent_groups( array( 'counts', 'plugins' ) );
-		}
-	}
-
-	if ( did_action( 'init' ) ) {
-		wp_roles()->reinit();
-		$current_user = wp_get_current_user();
-		$current_user->for_blog( $new_blog );
-	}
-
-	/** This filter is documented in wp-includes/ms-blogs.php */
-	do_action( 'switch_blog', $new_blog, $prev_blog_id );
-	$GLOBALS['switched'] = true;
-
-	return true;
-}
-
-/**
- * Restore the current blog, after calling switch_to_blog()
- *
- * @see switch_to_blog()
- * @since MU
- *
- * @global wpdb            $wpdb
- * @global array           $_wp_switched_stack
- * @global int             $blog_id
- * @global bool            $switched
- * @global string          $table_prefix
- * @global WP_Object_Cache $wp_object_cache
- *
- * @return bool True on success, false if we're already on the current blog
- */
-function restore_current_blog() {
-	global $wpdb;
-
-	if ( empty( $GLOBALS['_wp_switched_stack'] ) ) {
-		return false;
-	}
-
-	$blog = array_pop( $GLOBALS['_wp_switched_stack'] );
-	$blog_id = get_current_blog_id();
-
-	if ( $blog_id == $blog ) {
-		/** This filter is documented in wp-includes/ms-blogs.php */
-		do_action( 'switch_blog', $blog, $blog );
-		// If we still have items in the switched stack, consider ourselves still 'switched'
-		$GLOBALS['switched'] = ! empty( $GLOBALS['_wp_switched_stack'] );
-		return true;
-	}
-
-	$wpdb->set_blog_id( $blog );
-	$prev_blog_id = $blog_id;
-	$GLOBALS['blog_id'] = $blog;
-	$GLOBALS['table_prefix'] = $wpdb->get_blog_prefix();
-
-	if ( function_exists( 'wp_cache_switch_to_blog' ) ) {
-		wp_cache_switch_to_blog( $blog );
-	} else {
-		global $wp_object_cache;
-
-		if ( is_object( $wp_object_cache ) && isset( $wp_object_cache->global_groups ) ) {
-			$global_groups = $wp_object_cache->global_groups;
-		} else {
-			$global_groups = false;
-		}
-
-		wp_cache_init();
-
-		if ( function_exists( 'wp_cache_add_global_groups' ) ) {
-			if ( is_array( $global_groups ) ) {
-				wp_cache_add_global_groups( $global_groups );
-			} else {
-				wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache', 'networks', 'sites', 'site-details' ) );
-			}
-			wp_cache_add_non_persistent_groups( array( 'counts', 'plugins' ) );
-		}
-	}
-
-	if ( did_action( 'init' ) ) {
-		wp_roles()->reinit();
-		$current_user = wp_get_current_user();
-		$current_user->for_blog( $blog );
-	}
-
-	/** This filter is documented in wp-includes/ms-blogs.php */
-	do_action( 'switch_blog', $blog, $prev_blog_id );
-
-	// If we still have items in the switched stack, consider ourselves still 'switched'
-	$GLOBALS['switched'] = ! empty( $GLOBALS['_wp_switched_stack'] );
-
-	return true;
-}
-
-/**
- * Determines if switch_to_blog() is in effect
- *
- * @since 3.5.0
- *
- * @global array $_wp_switched_stack
- *
- * @return bool True if switched, false otherwise.
- */
-function ms_is_switched() {
-	return ! empty( $GLOBALS['_wp_switched_stack'] );
-}
-
-/**
- * Check if a particular blog is archived.
- *
- * @since MU
- *
- * @param int $id The blog id
- * @return string Whether the blog is archived or not
- */
-function is_archived( $id ) {
-	return get_blog_status($id, 'archived');
-}
-
-/**
- * Update the 'archived' status of a particular blog.
- *
- * @since MU
- *
- * @param int    $id       The blog id
- * @param string $archived The new status
- * @return string $archived
- */
-function update_archived( $id, $archived ) {
-	update_blog_status($id, 'archived', $archived);
-	return $archived;
-}
-
-/**
- * Update a blog details field.
- *
- * @since MU
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int    $blog_id BLog ID
- * @param string $pref    A field name
- * @param string $value   Value for $pref
- * @param null   $deprecated
- * @return string|false $value
- */
-function update_blog_status( $blog_id, $pref, $value, $deprecated = null ) {
-	global $wpdb;
-
-	if ( null !== $deprecated  )
-		_deprecated_argument( __FUNCTION__, '3.1.0' );
-
-	if ( ! in_array( $pref, array( 'site_id', 'domain', 'path', 'registered', 'last_updated', 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id') ) )
-		return $value;
-
-	$result = $wpdb->update( $wpdb->blogs, array($pref => $value, 'last_updated' => current_time('mysql', true)), array('blog_id' => $blog_id) );
-
-	if ( false === $result )
-		return false;
-
-	refresh_blog_details( $blog_id );
-
-	if ( 'spam' == $pref ) {
-		if ( $value == 1 ) {
-			/** This filter is documented in wp-includes/ms-blogs.php */
-			do_action( 'make_spam_blog', $blog_id );
-		} else {
-			/** This filter is documented in wp-includes/ms-blogs.php */
-			do_action( 'make_ham_blog', $blog_id );
-		}
-	} elseif ( 'mature' == $pref ) {
-		if ( $value == 1 ) {
-			/** This filter is documented in wp-includes/ms-blogs.php */
-			do_action( 'mature_blog', $blog_id );
-		} else {
-			/** This filter is documented in wp-includes/ms-blogs.php */
-			do_action( 'unmature_blog', $blog_id );
-		}
-	} elseif ( 'archived' == $pref ) {
-		if ( $value == 1 ) {
-			/** This filter is documented in wp-includes/ms-blogs.php */
-			do_action( 'archive_blog', $blog_id );
-		} else {
-			/** This filter is documented in wp-includes/ms-blogs.php */
-			do_action( 'unarchive_blog', $blog_id );
-		}
-	} elseif ( 'deleted' == $pref ) {
-		if ( $value == 1 ) {
-			/** This filter is documented in wp-includes/ms-blogs.php */
-			do_action( 'make_delete_blog', $blog_id );
-		} else {
-			/** This filter is documented in wp-includes/ms-blogs.php */
-			do_action( 'make_undelete_blog', $blog_id );
-		}
-	} elseif ( 'public' == $pref ) {
-		/**
-		 * Fires after the current blog's 'public' setting is updated.
-		 *
-		 * @since MU
-		 *
-		 * @param int    $blog_id Blog ID.
-		 * @param string $value   The value of blog status.
- 		 */
-		do_action( 'update_blog_public', $blog_id, $value ); // Moved here from update_blog_public().
-	}
-
-	return $value;
-}
-
-/**
- * Get a blog details field.
- *
- * @since MU
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int    $id   The blog id
- * @param string $pref A field name
- * @return bool|string|null $value
- */
-function get_blog_status( $id, $pref ) {
-	global $wpdb;
-
-	$details = get_blog_details( $id, false );
-	if ( $details )
-		return $details->$pref;
-
-	return $wpdb->get_var( $wpdb->prepare("SELECT %s FROM {$wpdb->blogs} WHERE blog_id = %d", $pref, $id) );
-}
-
-/**
- * Get a list of most recently updated blogs.
- *
- * @since MU
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param mixed $deprecated Not used
- * @param int   $start      The offset
- * @param int   $quantity   The maximum number of blogs to retrieve. Default is 40.
- * @return array The list of blogs
- */
-function get_last_updated( $deprecated = '', $start = 0, $quantity = 40 ) {
-	global $wpdb;
-
-	if ( ! empty( $deprecated ) )
-		_deprecated_argument( __FUNCTION__, 'MU' ); // never used
-
-	return $wpdb->get_results( $wpdb->prepare("SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' AND last_updated != '0000-00-00 00:00:00' ORDER BY last_updated DESC limit %d, %d", $wpdb->siteid, $start, $quantity ) , ARRAY_A );
-}
-
-/**
- * Retrieves a list of networks.
- *
- * @since 4.6.0
- *
- * @param string|array $args Optional. Array or string of arguments. See WP_Network_Query::parse_query()
- *                           for information on accepted arguments. Default empty array.
- * @return int|array List of networks or number of found networks if `$count` argument is true.
- */
-function get_networks( $args = array() ) {
-	$query = new WP_Network_Query();
-
-	return $query->query( $args );
-}
-
-/**
- * Retrieves network data given a network ID or network object.
- *
- * Network data will be cached and returned after being passed through a filter.
- * If the provided network is empty, the current network global will be used.
- *
- * @since 4.6.0
- *
- * @param WP_Network|int|null $network Optional. Network to retrieve. Default is the current network.
- * @return WP_Network|null The network object or null if not found.
- */
-function get_network( $network = null ) {
-	$current_site = get_current_site();
-	if ( empty( $network ) && isset( $current_site ) ) {
-		$network = $current_site;
-	}
-
-	if ( $network instanceof WP_Network ) {
-		$_network = $network;
-	} elseif ( is_object( $network ) ) {
-		$_network = new WP_Network( $network );
-	} else {
-		$_network = WP_Network::get_instance( $network );
-	}
-
-	if ( ! $_network ) {
-		return null;
-	}
-
-	/**
-	 * Fires after a network is retrieved.
-	 *
-	 * @since 4.6.0
-	 *
-	 * @param WP_Network $_network Network data.
-	 */
-	$_network = apply_filters( 'get_network', $_network );
-
-	return $_network;
-}
-
-/**
- * Removes a network from the object cache.
- *
- * @since 4.6.0
- *
- * @param int|array $ids Network ID or an array of network IDs to remove from cache.
- */
-function clean_network_cache( $ids ) {
-	foreach ( (array) $ids as $id ) {
-		wp_cache_delete( $id, 'networks' );
-
-		/**
-		 * Fires immediately after a network has been removed from the object cache.
-		 *
-		 * @since 4.6.0
-		 *
-		 * @param int $id Network ID.
-		 */
-		do_action( 'clean_network_cache', $id );
-	}
-
-	wp_cache_set( 'last_changed', microtime(), 'networks' );
-}
-
-/**
- * Updates the network cache of given networks.
- *
- * Will add the networks in $networks to the cache. If network ID already exists
- * in the network cache then it will not be updated. The network is added to the
- * cache using the network group with the key using the ID of the networks.
- *
- * @since 4.6.0
- *
- * @param array $networks Array of network row objects.
- */
-function update_network_cache( $networks ) {
-	foreach ( (array) $networks as $network ) {
-		wp_cache_add( $network->id, $network, 'networks' );
-	}
-}
-
-/**
- * Adds any networks from the given IDs to the cache that do not already exist in cache.
- *
- * @since 4.6.0
- * @access private
- *
- * @see update_network_cache()
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param array $network_ids Array of network IDs.
- */
-function _prime_network_caches( $network_ids ) {
-	global $wpdb;
-
-	$non_cached_ids = _get_non_cached_ids( $network_ids, 'networks' );
-	if ( !empty( $non_cached_ids ) ) {
-		$fresh_networks = $wpdb->get_results( sprintf( "SELECT $wpdb->site.* FROM $wpdb->site WHERE id IN (%s)", join( ",", array_map( 'intval', $non_cached_ids ) ) ) );
-
-		update_network_cache( $fresh_networks );
-	}
-}
-
-/**
- * Handler for updating the blog date when a post is published or an already published post is changed.
- *
- * @since 3.3.0
- *
- * @param string $new_status The new post status
- * @param string $old_status The old post status
- * @param object $post       Post object
- */
-function _update_blog_date_on_post_publish( $new_status, $old_status, $post ) {
-	$post_type_obj = get_post_type_object( $post->post_type );
-	if ( ! $post_type_obj || ! $post_type_obj->public ) {
-		return;
-	}
-
-	if ( 'publish' != $new_status && 'publish' != $old_status ) {
-		return;
-	}
-
-	// Post was freshly published, published post was saved, or published post was unpublished.
-
-	wpmu_update_blogs_date();
-}
-
-/**
- * Handler for updating the blog date when a published post is deleted.
- *
- * @since 3.4.0
- *
- * @param int $post_id Post ID
- */
-function _update_blog_date_on_post_delete( $post_id ) {
-	$post = get_post( $post_id );
-
-	$post_type_obj = get_post_type_object( $post->post_type );
-	if ( ! $post_type_obj || ! $post_type_obj->public ) {
-		return;
-	}
-
-	if ( 'publish' != $post->post_status ) {
-		return;
-	}
-
-	wpmu_update_blogs_date();
-}
-
-/**
- * Handler for updating the blog posts count date when a post is deleted.
- *
- * @since 4.0.0
- *
- * @param int $post_id Post ID.
- */
-function _update_posts_count_on_delete( $post_id ) {
-	$post = get_post( $post_id );
-
-	if ( ! $post || 'publish' !== $post->post_status ) {
-		return;
-	}
-
-	update_posts_count();
-}
-
-/**
- * Handler for updating the blog posts count date when a post status changes.
- *
- * @since 4.0.0
- *
- * @param string $new_status The status the post is changing to.
- * @param string $old_status The status the post is changing from.
- */
-function _update_posts_count_on_transition_post_status( $new_status, $old_status ) {
-	if ( $new_status === $old_status ) {
-		return;
-	}
-
-	if ( 'publish' !== $new_status && 'publish' !== $old_status ) {
-		return;
-	}
-
-	update_posts_count();
-}
Index: www/wp-includes/Requests/Cookie.php
===================================================================
--- www/wp-includes/Requests/Cookie.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Cookie.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/pomo/POMO_StringReader.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/pomo/POMO_StringReader.php	(revision )
+++ www/wp-includes/autoload/pomo/POMO_StringReader.php	(revision )
@@ -0,0 +1,71 @@
+<?php
+/**
+ * Classes, which help reading streams of data from files.
+ * Based on the classes from Danilo Segan <danilo@kvota.net>
+ *
+ * @version $Id: streams.php 1157 2015-11-20 04:30:11Z dd32 $
+ * @package pomo
+ * @subpackage streams
+ */
+
+/**
+ * Provides file-like methods for manipulating a string instead
+ * of a physical file.
+ */
+class POMO_StringReader extends POMO_Reader {
+
+	var $_str = '';
+
+	/**
+	 * PHP5 constructor.
+	 */
+	function __construct( $str = '' ) {
+		parent::POMO_Reader();
+		$this->_str = $str;
+		$this->_pos = 0;
+	}
+
+	/**
+	 * PHP4 constructor.
+	 */
+	public function POMO_StringReader( $str = '' ) {
+		self::__construct( $str );
+	}
+
+	/**
+	 * @param string $bytes
+	 * @return string
+	 */
+	function read($bytes) {
+		$data = $this->substr($this->_str, $this->_pos, $bytes);
+		$this->_pos += $bytes;
+		if ($this->strlen($this->_str) < $this->_pos) $this->_pos = $this->strlen($this->_str);
+		return $data;
+	}
+
+	/**
+	 * @param int $pos
+	 * @return int
+	 */
+	function seekto($pos) {
+		$this->_pos = $pos;
+		if ($this->strlen($this->_str) < $this->_pos) $this->_pos = $this->strlen($this->_str);
+		return $this->_pos;
+	}
+
+	/**
+	 * @return int
+	 */
+	function length() {
+		return $this->strlen($this->_str);
+	}
+
+	/**
+	 * @return string
+	 */
+	function read_all() {
+		return $this->substr($this->_str, $this->_pos, $this->strlen($this->_str));
+	}
+
+}
+
Index: www/wp-admin/about.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/about.php	(revision 38565)
+++ www/wp-admin/about.php	(revision 38565)
@@ -1,243 +0,0 @@
-<?php
-/**
- * About This Version administration panel.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-if ( ! wp_is_mobile() ) {
-	wp_enqueue_style( 'wp-mediaelement' );
-	wp_enqueue_script( 'wp-mediaelement' );
-	wp_localize_script( 'mediaelement', '_wpmejsSettings', array(
-		'pluginPath'        => includes_url( 'js/mediaelement/', 'relative' ),
-		'pauseOtherPlayers' => '',
-	) );
-}
-
-/**
- * Replaces the height and width attributes with values for full size.
- *
- * wp_video_shortcode() limits the width to 640px.
- *
- * @since 4.6.0
- * @ignore
- *
- * @param $output Video shortcode HTML output.
- * @return string Filtered HTML content to display video.
- */
-function _wp_override_admin_video_width_limit( $output ) {
-	return str_replace( array( '640', '384' ), array( '1050', '630' ), $output );
-}
-
-$video_url = 'https://videopress.com/embed/GbdhpGF3?hd=true';
-$locale    = str_replace( '_', '-', get_locale() );
-list( $locale ) = explode( '-', $locale );
-if ( 'en' !== $locale ) {
-	$video_url = add_query_arg( 'defaultLangCode', $locale, $video_url );
-}
-
-$title = __( 'About' );
-
-list( $display_version ) = explode( '-', get_bloginfo( 'version' ) );
-
-include( ABSPATH . 'wp-admin/admin-header.php' );
-?>
-	<div class="wrap about-wrap">
-		<h1><?php printf( __( 'Welcome to WordPress&nbsp;%s' ), $display_version ); ?></h1>
-
-		<p class="about-text"><?php printf( __( 'Thank you for updating to the latest version. WordPress %s changes a lot behind the scenes to make your WordPress experience even better!' ), $display_version ); ?></p>
-		<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
-
-		<h2 class="nav-tab-wrapper wp-clearfix">
-			<a href="about.php" class="nav-tab nav-tab-active"><?php _e( 'What&#8217;s New' ); ?></a>
-			<a href="credits.php" class="nav-tab"><?php _e( 'Credits' ); ?></a>
-			<a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a>
-		</h2>
-
-		<div class="headline-feature feature-video">
-			<iframe width="1050" height="591" src="<?php echo esc_url( $video_url ); ?>" frameborder="0" allowfullscreen></iframe>
-			<script src="https://videopress.com/videopress-iframe.js"></script>
-		</div>
-
-		<hr>
-
-		<div class="streamlined-updates feature-section one-col">
-			<h2><?php _e( 'Streamlined Updates' ); ?></h2>
-			<p><?php _e( 'Don&#8217;t lose your place: stay on the same page while you update, install, and delete your plugins and themes.' ); ?></p>
-			<?php
-			if ( ! wp_is_mobile() ) {
-				add_filter( 'wp_video_shortcode', '_wp_override_admin_video_width_limit' );
-				echo wp_video_shortcode( array(
-					'mp4'      => 'https://s.w.org/images/core/4.6/streamlined-updates.mp4',
-					'webm'     => 'https://s.w.org/images/core/4.6/streamlined-updates.webm',
-					'poster'   => 'https://s.w.org/images/core/4.6/streamlined-updates-2000.png?v1',
-					'loop'     => true,
-					'autoplay' => true,
-					'width'    => 1050,
-					'height'   => 630,
-					'class'    => 'wp-video-shortcode feature-video',
-				) );
-				remove_filter( 'wp_video_shortcode', '_wp_override_admin_video_width_limit' );
-			} else {
-				echo '<img src="https://s.w.org/images/core/4.6/streamlined-updates-1057.png?v1" alt="" srcset="https://s.w.org/images/core/4.6/streamlined-updates-1664.png?v1 1664w, https://s.w.org/images/core/4.6/streamlined-updates-200.png?v1 200w, https://s.w.org/images/core/4.6/streamlined-updates-1057.png?v1 1057w, https://s.w.org/images/core/4.6/streamlined-updates-2000.png?v1 2000w"  sizes="(max-width: 500px) calc(100vw - 40px), (max-width: 782px) calc(100vw - 70px), (max-width: 959px) calc(100vw - 116px), (max-width: 1290px) calc(100vw - 240px), 1050px" />';
-			}
-			?>
-		</div>
-
-		<hr />
-
-		<div class="native-fonts feature-section one-col">
-			<h2><?php _e( 'Native Fonts' ); ?></h2>
-			<p><?php _e( 'The WordPress dashboard now takes advantage of the fonts you already have, making it load faster and letting you feel more at home on whatever device you use.' ); ?></p>
-			<img src="https://s.w.org/images/core/4.6/native-fonts-992.png?v1" alt="" srcset="https://cldup.com/Hqmo5VLb-E.png?v1 922w, https://s.w.org/images/core/4.6/native-fonts-200.png?v1 200w,https://s.w.org/images/core/4.6/native-fonts-371.png?v1 371w,https://s.w.org/images/core/4.6/native-fonts-510.png?v1 510w, https://s.w.org/images/core/4.6/native-fonts-560.png?v1 560w, https://s.w.org/images/core/4.6/native-fonts-781.png?v1 781w, https://s.w.org/images/core/4.6/native-fonts-2000.png?v1 2000w" sizes="(max-width: 500px) calc(100vw - 40px), (max-width: 782px) calc(100vw - 70px), (max-width: 959px) calc(100vw - 116px), (max-width: 1290px) calc(100vw - 240px), 1050px"/>
-		</div>
-
-		<hr />
-
-		<div class="feature-section two-col">
-			<h2><?php _e( 'Editor Improvements' ); ?></h2>
-			<div class="col">
-				<img src="https://s.w.org/images/core/4.6/inline-link-checker-608.png?v1" alt="" srcset="https://s.w.org/images/core/4.6/inline-link-checker-789.png?v1 789w, https://s.w.org/images/core/4.6/inline-link-checker-200.png?v1 200w, https://s.w.org/images/core/4.6/inline-link-checker-384.png?v1 384w, https://s.w.org/images/core/4.6/inline-link-checker-608.png?v1 608w, https://s.w.org/images/core/4.6/inline-link-checker-992.png?v1 992w" sizes="(max-width: 500px) calc(100vw - 40px), (max-width: 781px) calc((100vw - 70px) * .466), (max-width: 959px) calc((100vw - 116px) * .469), (max-width: 1290px) calc((100vw - 240px) * .472), 496px"/>
-				<h3><?php _e( 'Inline Link Checker' ); ?></h3>
-				<p><?php
-					printf(
-						/* translators: %s: Home URL appended with 'wordpress.org'  */
-						__( 'Ever accidentally made a link to %s? Now WordPress automatically checks to make sure you didn&#8217;t.' ),
-						home_url( 'wordpress.org' )
-					);
-				?></p>
-			</div>
-			<div class="col">
-				<img src="https://s.w.org/images/core/4.6/content-recovery-561.png?v1" alt="" srcset="https://s.w.org/images/core/4.6/content-recovery-701.png?v1 701w, https://s.w.org/images/core/4.6/content-recovery-200.png?v1 200w, https://s.w.org/images/core/4.6/content-recovery-400.png?v1 400w, https://s.w.org/images/core/4.6/content-recovery-561.png?v1 561w, https://s.w.org/images/core/4.6/content-recovery-992.png?v1 992w" sizes="(max-width: 500px) calc(100vw - 40px), (max-width: 781px) calc((100vw - 70px) * .466), (max-width: 959px) calc((100vw - 116px) * .469), (max-width: 1290px) calc((100vw - 240px) * .472), 496px"/>
-				<h3><?php _e( 'Content Recovery' ); ?></h3>
-				<p><?php _e( 'As you type, WordPress saves your content to the browser. Recovering saved content is even easier with WordPress 4.6.' ); ?></p>
-			</div>
-		</div>
-
-		<hr />
-
-		<div class="changelog">
-			<h2><?php _e( 'Under the Hood' ); ?></h2>
-
-			<div class="under-the-hood three-col">
-				<div class="col">
-					<h3><?php _e( 'Resource Hints' ); ?></h3>
-					<p><?php
-						printf(
-							/* translators: %s: https://make.wordpress.org/core/2016/07/06/resource-hints-in-4-6/ */
-							__( '<a href="%s">Resource hints help browsers</a> decide which resources to fetch and preprocess. WordPress 4.6 adds them automatically for your styles and scripts making your site even faster.' ),
-							'https://make.wordpress.org/core/2016/07/06/resource-hints-in-4-6/'
-						);
-					?></p>
-				</div>
-				<div class="col">
-					<h3><?php _e( 'Robust Requests' ); ?></h3>
-					<p><?php _e( 'The HTTP API now leverages the Requests library, improving HTTP standard support and adding case-insensitive headers, parallel HTTP requests, and support for Internationalized Domain Names.' ); ?></p>
-				</div>
-				<div class="col">
-					<h3><?php
-						/* translators: 1: WP_Term_Query, 2: WP_Post_Type */
-						printf( __( '%1$s and %2$s' ), '<code>WP_Term_Query</code>', '<code>WP_Post_Type</code>' );
-					?></h3>
-					<p><?php
-						printf(
-							/* translators: 1: WP_Term_Query, 2: WP_Post_Type */
-							__( 'A new %1$s class adds flexibility to query term information while a new %2$s object makes interacting with post types more predictable.' ),
-							'<code>WP_Term_Query</code>',
-							'<code>WP_Post_Type</code>'
-						);
-					?></p>
-				</div>
-			</div>
-
-			<div class="under-the-hood three-col">
-				<div class="col">
-					<h3><?php _e( 'Meta Registration API' ); ?></h3>
-					<p><?php
-						printf(
-							/* translators: %s: https://make.wordpress.org/core/2016/07/08/enhancing-register_meta-in-4-6/  */
-							__( 'The Meta Registration API <a href="%s">has been expanded</a> to support types, descriptions, and REST API visibility.' ),
-							'https://make.wordpress.org/core/2016/07/08/enhancing-register_meta-in-4-6/'
-						);
-					?></p>
-				</div>
-				<div class="col">
-					<h3><?php _e( 'Translations On Demand' ); ?></h3>
-					<p><?php _e( 'WordPress will install and use the newest language packs for your plugins and themes as soon as they&#8217;re available from <a href="https://translate.wordpress.org/">WordPress.org&#8217;s community of translators</a>.' ); ?></p>
-				</div>
-				<div class="col">
-					<h3><?php _e( 'JavaScript Library Updates' ); ?></h3>
-					<p><?php _e( 'Masonry 3.3.2, imagesLoaded 3.2.0, MediaElement.js 2.22.0, TinyMCE 4.4.1, and Backbone.js 1.3.3 are bundled.' ); ?></p>
-				</div>
-			</div>
-
-			<div class="under-the-hood two-col">
-				<div class="col">
-					<h3><?php _e( 'Customizer APIs for Setting Validation and Notifications' ); ?></h3>
-					<p><?php _e( 'Settings now have an <a href="https://make.wordpress.org/core/2016/07/05/customizer-apis-in-4-6-for-setting-validation-and-notifications/">API for enforcing validation constraints</a>. Likewise, customizer controls now support notifications, which are used to display validation errors instead of failing silently.' ); ?></p>
-				</div>
-				<div class="col">
-					<h3><?php _e( 'Multisite, now faster than ever' ); ?></h3>
-					<p><?php
-						printf(
-							/* translators: 1: WP_Site_Query, 2: WP_Network_Query */
-							__( 'Cached and comprehensive site queries improve your network admin experience. The addition of %1$s and %2$s help craft advanced queries with less effort.' ),
-							'<code>WP_Site_Query</code>',
-							'<code>WP_Network_Query</code>'
-						);
-					?></p>
-				</div>
-			</div>
-		</div>
-
-		<hr />
-
-		<div class="return-to-dashboard">
-			<?php if ( current_user_can( 'update_core' ) && isset( $_GET['updated'] ) ) : ?>
-				<a href="<?php echo esc_url( self_admin_url( 'update-core.php' ) ); ?>">
-					<?php is_multisite() ? _e( 'Return to Updates' ) : _e( 'Return to Dashboard &rarr; Updates' ); ?>
-				</a> |
-			<?php endif; ?>
-			<a href="<?php echo esc_url( self_admin_url() ); ?>"><?php is_blog_admin() ? _e( 'Go to Dashboard &rarr; Home' ) : _e( 'Go to Dashboard' ); ?></a>
-		</div>
-
-	</div>
-<?php
-
-include( ABSPATH . 'wp-admin/admin-footer.php' );
-
-// These are strings we may use to describe maintenance/security releases, where we aim for no new strings.
-return;
-
-__( 'Maintenance Release' );
-__( 'Maintenance Releases' );
-
-__( 'Security Release' );
-__( 'Security Releases' );
-
-__( 'Maintenance and Security Release' );
-__( 'Maintenance and Security Releases' );
-
-/* translators: %s: WordPress version number */
-__( '<strong>Version %s</strong> addressed one security issue.' );
-/* translators: %s: WordPress version number */
-__( '<strong>Version %s</strong> addressed some security issues.' );
-
-/* translators: 1: WordPress version number, 2: plural number of bugs. */
-_n_noop( '<strong>Version %1$s</strong> addressed %2$s bug.',
-         '<strong>Version %1$s</strong> addressed %2$s bugs.' );
-
-/* translators: 1: WordPress version number, 2: plural number of bugs. Singular security issue. */
-_n_noop( '<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bug.',
-         '<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bugs.' );
-
-/* translators: 1: WordPress version number, 2: plural number of bugs. More than one security issue. */
-_n_noop( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
-         '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.' );
-
-/* translators: %s: Codex URL */
-__( 'For more information, see <a href="%s">the release notes</a>.' );
Index: www/wp-includes/SimplePie/Caption.php
===================================================================
--- www/wp-includes/SimplePie/Caption.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_Caption.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/requests/Exception/HTTP/511.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/511.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/511.php	(revision UNDEFINED)
@@ -1,29 +0,0 @@
-<?php
-/**
- * Exception for 511 Network Authentication Required responses
- *
- * @see https://tools.ietf.org/html/rfc6585
- * @package Requests
- */
-
-/**
- * Exception for 511 Network Authentication Required responses
- *
- * @see https://tools.ietf.org/html/rfc6585
- * @package Requests
- */
-class Requests_Exception_HTTP_511 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 511;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Network Authentication Required';
-}
\ No newline at end of file
Index: www/wp-includes/class-wp-customize-panel.php
===================================================================
--- www/wp-includes/class-wp-customize-panel.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Panel.php	(revision )
@@ -385,5 +385,3 @@
 	}
 }
 
-/** WP_Customize_Nav_Menus_Panel class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menus-panel.php' );
Index: www/wp-includes/customize/class-wp-customize-site-icon-control.php
===================================================================
--- www/wp-includes/customize/class-wp-customize-site-icon-control.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Site_Icon_Control.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/IXR/class-IXR-client.php
===================================================================
--- www/wp-includes/IXR/class-IXR-client.php	(revision 38565)
+++ www/wp-includes/autoload/ixr/IXR_Client.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/Requests/Exception/HTTP/413.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/413.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_413.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/category-template.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/category-template.php	(revision 38565)
+++ www/wp-includes/category-template.php	(revision 38565)
@@ -1,1358 +0,0 @@
-<?php
-/**
- * Taxonomy API: Core category-specific template tags
- *
- * @package WordPress
- * @subpackage Template
- * @since 1.2.0
- */
-
-/**
- * Retrieve category link URL.
- *
- * @since 1.0.0
- * @see get_term_link()
- *
- * @param int|object $category Category ID or object.
- * @return string Link on success, empty string if category does not exist.
- */
-function get_category_link( $category ) {
-	if ( ! is_object( $category ) )
-		$category = (int) $category;
-
-	$category = get_term_link( $category, 'category' );
-
-	if ( is_wp_error( $category ) )
-		return '';
-
-	return $category;
-}
-
-/**
- * Retrieve category parents with separator.
- *
- * @since 1.2.0
- *
- * @param int $id Category ID.
- * @param bool $link Optional, default is false. Whether to format with link.
- * @param string $separator Optional, default is '/'. How to separate categories.
- * @param bool $nicename Optional, default is false. Whether to use nice name for display.
- * @param array $visited Optional. Already linked to categories to prevent duplicates.
- * @return string|WP_Error A list of category parents on success, WP_Error on failure.
- */
-function get_category_parents( $id, $link = false, $separator = '/', $nicename = false, $visited = array() ) {
-	$chain = '';
-	$parent = get_term( $id, 'category' );
-	if ( is_wp_error( $parent ) )
-		return $parent;
-
-	if ( $nicename )
-		$name = $parent->slug;
-	else
-		$name = $parent->name;
-
-	if ( $parent->parent && ( $parent->parent != $parent->term_id ) && !in_array( $parent->parent, $visited ) ) {
-		$visited[] = $parent->parent;
-		$chain .= get_category_parents( $parent->parent, $link, $separator, $nicename, $visited );
-	}
-
-	if ( $link )
-		$chain .= '<a href="' . esc_url( get_category_link( $parent->term_id ) ) . '">'.$name.'</a>' . $separator;
-	else
-		$chain .= $name.$separator;
-	return $chain;
-}
-
-/**
- * Retrieve post categories.
- *
- * This tag may be used outside The Loop by passing a post id as the parameter.
- *
- * Note: This function only returns results from the default "category" taxonomy.
- * For custom taxonomies use get_the_terms().
- *
- * @since 0.71
- *
- * @param int $id Optional, default to current post ID. The post ID.
- * @return array Array of WP_Term objects, one for each category assigned to the post.
- */
-function get_the_category( $id = false ) {
-	$categories = get_the_terms( $id, 'category' );
-	if ( ! $categories || is_wp_error( $categories ) )
-		$categories = array();
-
-	$categories = array_values( $categories );
-
-	foreach ( array_keys( $categories ) as $key ) {
-		_make_cat_compat( $categories[$key] );
-	}
-
-	/**
-	 * Filters the array of categories to return for a post.
-	 *
-	 * @since 3.1.0
-	 * @since 4.4.0 Added `$id` parameter.
-	 *
-	 * @param array $categories An array of categories to return for the post.
-	 * @param int   $id         ID of the post.
-	 */
-	return apply_filters( 'get_the_categories', $categories, $id );
-}
-
-/**
- * Sort categories by name.
- *
- * Used by usort() as a callback, should not be used directly. Can actually be
- * used to sort any term object.
- *
- * @since 2.3.0
- * @access private
- *
- * @param object $a
- * @param object $b
- * @return int
- */
-function _usort_terms_by_name( $a, $b ) {
-	return strcmp( $a->name, $b->name );
-}
-
-/**
- * Sort categories by ID.
- *
- * Used by usort() as a callback, should not be used directly. Can actually be
- * used to sort any term object.
- *
- * @since 2.3.0
- * @access private
- *
- * @param object $a
- * @param object $b
- * @return int
- */
-function _usort_terms_by_ID( $a, $b ) {
-	if ( $a->term_id > $b->term_id )
-		return 1;
-	elseif ( $a->term_id < $b->term_id )
-		return -1;
-	else
-		return 0;
-}
-
-/**
- * Retrieve category name based on category ID.
- *
- * @since 0.71
- *
- * @param int $cat_ID Category ID.
- * @return string|WP_Error Category name on success, WP_Error on failure.
- */
-function get_the_category_by_ID( $cat_ID ) {
-	$cat_ID = (int) $cat_ID;
-	$category = get_term( $cat_ID, 'category' );
-
-	if ( is_wp_error( $category ) )
-		return $category;
-
-	return ( $category ) ? $category->name : '';
-}
-
-/**
- * Retrieve category list in either HTML list or custom format.
- *
- * @since 1.5.1
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param string $separator Optional, default is empty string. Separator for between the categories.
- * @param string $parents Optional. How to display the parents.
- * @param int $post_id Optional. Post ID to retrieve categories.
- * @return string
- */
-function get_the_category_list( $separator = '', $parents='', $post_id = false ) {
-	global $wp_rewrite;
-	if ( ! is_object_in_taxonomy( get_post_type( $post_id ), 'category' ) ) {
-		/** This filter is documented in wp-includes/category-template.php */
-		return apply_filters( 'the_category', '', $separator, $parents );
-	}
-
-	/**
-	 * Filters the categories before building the category list.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param array    $categories An array of the post's categories.
-	 * @param int|bool $post_id    ID of the post we're retrieving categories for. When `false`, we assume the
-	 *                             current post in the loop.
-	 */
-	$categories = apply_filters( 'the_category_list', get_the_category( $post_id ), $post_id );
-
-	if ( empty( $categories ) ) {
-		/** This filter is documented in wp-includes/category-template.php */
-		return apply_filters( 'the_category', __( 'Uncategorized' ), $separator, $parents );
-	}
-
-	$rel = ( is_object( $wp_rewrite ) && $wp_rewrite->using_permalinks() ) ? 'rel="category tag"' : 'rel="category"';
-
-	$thelist = '';
-	if ( '' == $separator ) {
-		$thelist .= '<ul class="post-categories">';
-		foreach ( $categories as $category ) {
-			$thelist .= "\n\t<li>";
-			switch ( strtolower( $parents ) ) {
-				case 'multiple':
-					if ( $category->parent )
-						$thelist .= get_category_parents( $category->parent, true, $separator );
-					$thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" ' . $rel . '>' . $category->name.'</a></li>';
-					break;
-				case 'single':
-					$thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '"  ' . $rel . '>';
-					if ( $category->parent )
-						$thelist .= get_category_parents( $category->parent, false, $separator );
-					$thelist .= $category->name.'</a></li>';
-					break;
-				case '':
-				default:
-					$thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" ' . $rel . '>' . $category->name.'</a></li>';
-			}
-		}
-		$thelist .= '</ul>';
-	} else {
-		$i = 0;
-		foreach ( $categories as $category ) {
-			if ( 0 < $i )
-				$thelist .= $separator;
-			switch ( strtolower( $parents ) ) {
-				case 'multiple':
-					if ( $category->parent )
-						$thelist .= get_category_parents( $category->parent, true, $separator );
-					$thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" ' . $rel . '>' . $category->name.'</a>';
-					break;
-				case 'single':
-					$thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" ' . $rel . '>';
-					if ( $category->parent )
-						$thelist .= get_category_parents( $category->parent, false, $separator );
-					$thelist .= "$category->name</a>";
-					break;
-				case '':
-				default:
-					$thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" ' . $rel . '>' . $category->name.'</a>';
-			}
-			++$i;
-		}
-	}
-
-	/**
-	 * Filters the category or list of categories.
-	 *
-	 * @since 1.2.0
-	 *
-	 * @param array  $thelist   List of categories for the current post.
-	 * @param string $separator Separator used between the categories.
-	 * @param string $parents   How to display the category parents. Accepts 'multiple',
-	 *                          'single', or empty.
-	 */
-	return apply_filters( 'the_category', $thelist, $separator, $parents );
-}
-
-/**
- * Check if the current post in within any of the given categories.
- *
- * The given categories are checked against the post's categories' term_ids, names and slugs.
- * Categories given as integers will only be checked against the post's categories' term_ids.
- *
- * Prior to v2.5 of WordPress, category names were not supported.
- * Prior to v2.7, category slugs were not supported.
- * Prior to v2.7, only one category could be compared: in_category( $single_category ).
- * Prior to v2.7, this function could only be used in the WordPress Loop.
- * As of 2.7, the function can be used anywhere if it is provided a post ID or post object.
- *
- * @since 1.2.0
- *
- * @param int|string|array $category Category ID, name or slug, or array of said.
- * @param int|object $post Optional. Post to check instead of the current post. (since 2.7.0)
- * @return bool True if the current post is in any of the given categories.
- */
-function in_category( $category, $post = null ) {
-	if ( empty( $category ) )
-		return false;
-
-	return has_category( $category, $post );
-}
-
-/**
- * Display the category list for the post.
- *
- * @since 0.71
- *
- * @param string $separator Optional, default is empty string. Separator for between the categories.
- * @param string $parents Optional. How to display the parents.
- * @param int $post_id Optional. Post ID to retrieve categories.
- */
-function the_category( $separator = '', $parents='', $post_id = false ) {
-	echo get_the_category_list( $separator, $parents, $post_id );
-}
-
-/**
- * Retrieve category description.
- *
- * @since 1.0.0
- *
- * @param int $category Optional. Category ID. Will use global category ID by default.
- * @return string Category description, available.
- */
-function category_description( $category = 0 ) {
-	return term_description( $category, 'category' );
-}
-
-/**
- * Display or retrieve the HTML dropdown list of categories.
- *
- * The 'hierarchical' argument, which is disabled by default, will override the
- * depth argument, unless it is true. When the argument is false, it will
- * display all of the categories. When it is enabled it will use the value in
- * the 'depth' argument.
- *
- * @since 2.1.0
- * @since 4.2.0 Introduced the `value_field` argument.
- * @since 4.6.0 Introduced the `required` argument.
- *
- * @param string|array $args {
- *     Optional. Array or string of arguments to generate a categories drop-down element.
- *
- *     @type string       $show_option_all   Text to display for showing all categories. Default empty.
- *     @type string       $show_option_none  Text to display for showing no categories. Default empty.
- *     @type string       $option_none_value Value to use when no category is selected. Default empty.
- *     @type string       $orderby           Which column to use for ordering categories. See get_terms() for a list
- *                                           of accepted values. Default 'id' (term_id).
- *     @type string       $order             Whether to order terms in ascending or descending order. Accepts 'ASC'
- *                                           or 'DESC'. Default 'ASC'.
- *     @type bool         $pad_counts        See get_terms() for an argument description. Default false.
- *     @type bool|int     $show_count        Whether to include post counts. Accepts 0, 1, or their bool equivalents.
- *                                           Default 0.
- *     @type bool|int     $hide_empty        Whether to hide categories that don't have any posts. Accepts 0, 1, or
- *                                           their bool equivalents. Default 1.
- *     @type int          $child_of          Term ID to retrieve child terms of. See get_terms(). Default 0.
- *     @type array|string $exclude           Array or comma/space-separated string of term ids to exclude.
- *                                           If `$include` is non-empty, `$exclude` is ignored. Default empty array.
- *     @type bool|int     $echo              Whether to echo or return the generated markup. Accepts 0, 1, or their
- *                                           bool equivalents. Default 1.
- *     @type bool|int     $hierarchical      Whether to traverse the taxonomy hierarchy. Accepts 0, 1, or their bool
- *                                           equivalents. Default 0.
- *     @type int          $depth             Maximum depth. Default 0.
- *     @type int          $tab_index         Tab index for the select element. Default 0 (no tabindex).
- *     @type string       $name              Value for the 'name' attribute of the select element. Default 'cat'.
- *     @type string       $id                Value for the 'id' attribute of the select element. Defaults to the value
- *                                           of `$name`.
- *     @type string       $class             Value for the 'class' attribute of the select element. Default 'postform'.
- *     @type int|string   $selected          Value of the option that should be selected. Default 0.
- *     @type string       $value_field       Term field that should be used to populate the 'value' attribute
- *                                           of the option elements. Accepts any valid term field: 'term_id', 'name',
- *                                           'slug', 'term_group', 'term_taxonomy_id', 'taxonomy', 'description',
- *                                           'parent', 'count'. Default 'term_id'.
- *     @type string|array $taxonomy          Name of the category or categories to retrieve. Default 'category'.
- *     @type bool         $hide_if_empty     True to skip generating markup if no categories are found.
- *                                           Default false (create select element even if no categories are found).
- *     @type bool         $required          Whether the `<select>` element should have the HTML5 'required' attribute.
- *                                           Default false.
- * }
- * @return string HTML content only if 'echo' argument is 0.
- */
-function wp_dropdown_categories( $args = '' ) {
-	$defaults = array(
-		'show_option_all'   => '',
-		'show_option_none'  => '',
-		'orderby'           => 'id',
-		'order'             => 'ASC',
-		'show_count'        => 0,
-		'hide_empty'        => 1,
-		'child_of'          => 0,
-		'exclude'           => '',
-		'echo'              => 1,
-		'selected'          => 0,
-		'hierarchical'      => 0,
-		'name'              => 'cat',
-		'id'                => '',
-		'class'             => 'postform',
-		'depth'             => 0,
-		'tab_index'         => 0,
-		'taxonomy'          => 'category',
-		'hide_if_empty'     => false,
-		'option_none_value' => -1,
-		'value_field'       => 'term_id',
-		'required'          => false,
-	);
-
-	$defaults['selected'] = ( is_category() ) ? get_query_var( 'cat' ) : 0;
-
-	// Back compat.
-	if ( isset( $args['type'] ) && 'link' == $args['type'] ) {
-		/* translators: 1: "type => link", 2: "taxonomy => link_category" alternative */
-		_deprecated_argument( __FUNCTION__, '3.0.0',
-			sprintf( __( '%1$s is deprecated. Use %2$s instead.' ),
-				'<code>type => link</code>',
-				'<code>taxonomy => link_category</code>'
-			)
-		);
-		$args['taxonomy'] = 'link_category';
-	}
-
-	$r = wp_parse_args( $args, $defaults );
-	$option_none_value = $r['option_none_value'];
-
-	if ( ! isset( $r['pad_counts'] ) && $r['show_count'] && $r['hierarchical'] ) {
-		$r['pad_counts'] = true;
-	}
-
-	$tab_index = $r['tab_index'];
-
-	$tab_index_attribute = '';
-	if ( (int) $tab_index > 0 ) {
-		$tab_index_attribute = " tabindex=\"$tab_index\"";
-	}
-
-	// Avoid clashes with the 'name' param of get_terms().
-	$get_terms_args = $r;
-	unset( $get_terms_args['name'] );
-	$categories = get_terms( $r['taxonomy'], $get_terms_args );
-
-	$name = esc_attr( $r['name'] );
-	$class = esc_attr( $r['class'] );
-	$id = $r['id'] ? esc_attr( $r['id'] ) : $name;
-	$required = $r['required'] ? 'required' : '';
-
-	if ( ! $r['hide_if_empty'] || ! empty( $categories ) ) {
-		$output = "<select $required name='$name' id='$id' class='$class' $tab_index_attribute>\n";
-	} else {
-		$output = '';
-	}
-	if ( empty( $categories ) && ! $r['hide_if_empty'] && ! empty( $r['show_option_none'] ) ) {
-
-		/**
-		 * Filters a taxonomy drop-down display element.
-		 *
-		 * A variety of taxonomy drop-down display elements can be modified
-		 * just prior to display via this filter. Filterable arguments include
-		 * 'show_option_none', 'show_option_all', and various forms of the
-		 * term name.
-		 *
-		 * @since 1.2.0
-		 *
-		 * @see wp_dropdown_categories()
-		 *
-		 * @param string $element Taxonomy element to list.
-		 */
-		$show_option_none = apply_filters( 'list_cats', $r['show_option_none'] );
-		$output .= "\t<option value='" . esc_attr( $option_none_value ) . "' selected='selected'>$show_option_none</option>\n";
-	}
-
-	if ( ! empty( $categories ) ) {
-
-		if ( $r['show_option_all'] ) {
-
-			/** This filter is documented in wp-includes/category-template.php */
-			$show_option_all = apply_filters( 'list_cats', $r['show_option_all'] );
-			$selected = ( '0' === strval($r['selected']) ) ? " selected='selected'" : '';
-			$output .= "\t<option value='0'$selected>$show_option_all</option>\n";
-		}
-
-		if ( $r['show_option_none'] ) {
-
-			/** This filter is documented in wp-includes/category-template.php */
-			$show_option_none = apply_filters( 'list_cats', $r['show_option_none'] );
-			$selected = selected( $option_none_value, $r['selected'], false );
-			$output .= "\t<option value='" . esc_attr( $option_none_value ) . "'$selected>$show_option_none</option>\n";
-		}
-
-		if ( $r['hierarchical'] ) {
-			$depth = $r['depth'];  // Walk the full depth.
-		} else {
-			$depth = -1; // Flat.
-		}
-		$output .= walk_category_dropdown_tree( $categories, $depth, $r );
-	}
-
-	if ( ! $r['hide_if_empty'] || ! empty( $categories ) ) {
-		$output .= "</select>\n";
-	}
-	/**
-	 * Filters the taxonomy drop-down output.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param string $output HTML output.
-	 * @param array  $r      Arguments used to build the drop-down.
-	 */
-	$output = apply_filters( 'wp_dropdown_cats', $output, $r );
-
-	if ( $r['echo'] ) {
-		echo $output;
-	}
-	return $output;
-}
-
-/**
- * Display or retrieve the HTML list of categories.
- *
- * @since 2.1.0
- * @since 4.4.0 Introduced the `hide_title_if_empty` and `separator` arguments. The `current_category` argument was modified to
- *              optionally accept an array of values.
- *
- * @param string|array $args {
- *     Array of optional arguments.
- *
- *     @type int          $child_of              Term ID to retrieve child terms of. See get_terms(). Default 0.
- *     @type int|array    $current_category      ID of category, or array of IDs of categories, that should get the
- *                                               'current-cat' class. Default 0.
- *     @type int          $depth                 Category depth. Used for tab indentation. Default 0.
- *     @type bool|int     $echo                  True to echo markup, false to return it. Default 1.
- *     @type array|string $exclude               Array or comma/space-separated string of term IDs to exclude.
- *                                               If `$hierarchical` is true, descendants of `$exclude` terms will also
- *                                               be excluded; see `$exclude_tree`. See get_terms().
- *                                               Default empty string.
- *     @type array|string $exclude_tree          Array or comma/space-separated string of term IDs to exclude, along
- *                                               with their descendants. See get_terms(). Default empty string.
- *     @type string       $feed                  Text to use for the feed link. Default 'Feed for all posts filed
- *                                               under [cat name]'.
- *     @type string       $feed_image            URL of an image to use for the feed link. Default empty string.
- *     @type string       $feed_type             Feed type. Used to build feed link. See get_term_feed_link().
- *                                               Default empty string (default feed).
- *     @type bool|int     $hide_empty            Whether to hide categories that don't have any posts attached to them.
- *                                               Default 1.
- *     @type bool         $hide_title_if_empty   Whether to hide the `$title_li` element if there are no terms in
- *                                               the list. Default false (title will always be shown).
- *     @type bool         $hierarchical          Whether to include terms that have non-empty descendants.
- *                                               See get_terms(). Default true.
- *     @type string       $order                 Which direction to order categories. Accepts 'ASC' or 'DESC'.
- *                                               Default 'ASC'.
- *     @type string       $orderby               The column to use for ordering categories. Default 'ID'.
- *     @type string       $separator             Separator between links. Default '<br />'.
- *     @type bool|int     $show_count            Whether to show how many posts are in the category. Default 0.
- *     @type string       $show_option_all       Text to display for showing all categories. Default empty string.
- *     @type string       $show_option_none      Text to display for the 'no categories' option.
- *                                               Default 'No categories'.
- *     @type string       $style                 The style used to display the categories list. If 'list', categories
- *                                               will be output as an unordered list. If left empty or another value,
- *                                               categories will be output separated by `<br>` tags. Default 'list'.
- *     @type string       $taxonomy              Taxonomy name. Default 'category'.
- *     @type string       $title_li              Text to use for the list title `<li>` element. Pass an empty string
- *                                               to disable. Default 'Categories'.
- *     @type bool|int     $use_desc_for_title    Whether to use the category description as the title attribute.
- *                                               Default 1.
- * }
- * @return false|string HTML content only if 'echo' argument is 0.
- */
-function wp_list_categories( $args = '' ) {
-	$defaults = array(
-		'child_of'            => 0,
-		'current_category'    => 0,
-		'depth'               => 0,
-		'echo'                => 1,
-		'exclude'             => '',
-		'exclude_tree'        => '',
-		'feed'                => '',
-		'feed_image'          => '',
-		'feed_type'           => '',
-		'hide_empty'          => 1,
-		'hide_title_if_empty' => false,
-		'hierarchical'        => true,
-		'order'               => 'ASC',
-		'orderby'             => 'name',
-		'separator'           => '<br />',
-		'show_count'          => 0,
-		'show_option_all'     => '',
-		'show_option_none'    => __( 'No categories' ),
-		'style'               => 'list',
-		'taxonomy'            => 'category',
-		'title_li'            => __( 'Categories' ),
-		'use_desc_for_title'  => 1,
-	);
-
-	$r = wp_parse_args( $args, $defaults );
-
-	if ( !isset( $r['pad_counts'] ) && $r['show_count'] && $r['hierarchical'] )
-		$r['pad_counts'] = true;
-
-	// Descendants of exclusions should be excluded too.
-	if ( true == $r['hierarchical'] ) {
-		$exclude_tree = array();
-
-		if ( $r['exclude_tree'] ) {
-			$exclude_tree = array_merge( $exclude_tree, wp_parse_id_list( $r['exclude_tree'] ) );
-		}
-
-		if ( $r['exclude'] ) {
-			$exclude_tree = array_merge( $exclude_tree, wp_parse_id_list( $r['exclude'] ) );
-		}
-
-		$r['exclude_tree'] = $exclude_tree;
-		$r['exclude'] = '';
-	}
-
-	if ( ! isset( $r['class'] ) )
-		$r['class'] = ( 'category' == $r['taxonomy'] ) ? 'categories' : $r['taxonomy'];
-
-	if ( ! taxonomy_exists( $r['taxonomy'] ) ) {
-		return false;
-	}
-
-	$show_option_all = $r['show_option_all'];
-	$show_option_none = $r['show_option_none'];
-
-	$categories = get_categories( $r );
-
-	$output = '';
-	if ( $r['title_li'] && 'list' == $r['style'] && ( ! empty( $categories ) || ! $r['hide_title_if_empty'] ) ) {
-		$output = '<li class="' . esc_attr( $r['class'] ) . '">' . $r['title_li'] . '<ul>';
-	}
-	if ( empty( $categories ) ) {
-		if ( ! empty( $show_option_none ) ) {
-			if ( 'list' == $r['style'] ) {
-				$output .= '<li class="cat-item-none">' . $show_option_none . '</li>';
-			} else {
-				$output .= $show_option_none;
-			}
-		}
-	} else {
-		if ( ! empty( $show_option_all ) ) {
-
-			$posts_page = '';
-
-			// For taxonomies that belong only to custom post types, point to a valid archive.
-			$taxonomy_object = get_taxonomy( $r['taxonomy'] );
-			if ( ! in_array( 'post', $taxonomy_object->object_type ) && ! in_array( 'page', $taxonomy_object->object_type ) ) {
-				foreach ( $taxonomy_object->object_type as $object_type ) {
-					$_object_type = get_post_type_object( $object_type );
-
-					// Grab the first one.
-					if ( ! empty( $_object_type->has_archive ) ) {
-						$posts_page = get_post_type_archive_link( $object_type );
-						break;
-					}
-				}
-			}
-
-			// Fallback for the 'All' link is the posts page.
-			if ( ! $posts_page ) {
-				if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) ) {
-					$posts_page = get_permalink( get_option( 'page_for_posts' ) );
-				} else {
-					$posts_page = home_url( '/' );
-				}
-			}
-
-			$posts_page = esc_url( $posts_page );
-			if ( 'list' == $r['style'] ) {
-				$output .= "<li class='cat-item-all'><a href='$posts_page'>$show_option_all</a></li>";
-			} else {
-				$output .= "<a href='$posts_page'>$show_option_all</a>";
-			}
-		}
-
-		if ( empty( $r['current_category'] ) && ( is_category() || is_tax() || is_tag() ) ) {
-			$current_term_object = get_queried_object();
-			if ( $current_term_object && $r['taxonomy'] === $current_term_object->taxonomy ) {
-				$r['current_category'] = get_queried_object_id();
-			}
-		}
-
-		if ( $r['hierarchical'] ) {
-			$depth = $r['depth'];
-		} else {
-			$depth = -1; // Flat.
-		}
-		$output .= walk_category_tree( $categories, $depth, $r );
-	}
-
-	if ( $r['title_li'] && 'list' == $r['style'] )
-		$output .= '</ul></li>';
-
-	/**
-	 * Filters the HTML output of a taxonomy list.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param string $output HTML output.
-	 * @param array  $args   An array of taxonomy-listing arguments.
-	 */
-	$html = apply_filters( 'wp_list_categories', $output, $args );
-
-	if ( $r['echo'] ) {
-		echo $html;
-	} else {
-		return $html;
-	}
-}
-
-/**
- * Display tag cloud.
- *
- * The text size is set by the 'smallest' and 'largest' arguments, which will
- * use the 'unit' argument value for the CSS text size unit. The 'format'
- * argument can be 'flat' (default), 'list', or 'array'. The flat value for the
- * 'format' argument will separate tags with spaces. The list value for the
- * 'format' argument will format the tags in a UL HTML list. The array value for
- * the 'format' argument will return in PHP array type format.
- *
- * The 'orderby' argument will accept 'name' or 'count' and defaults to 'name'.
- * The 'order' is the direction to sort, defaults to 'ASC' and can be 'DESC'.
- *
- * The 'number' argument is how many tags to return. By default, the limit will
- * be to return the top 45 tags in the tag cloud list.
- *
- * The 'topic_count_text' argument is a nooped plural from _n_noop() to generate the
- * text for the tooltip of the tag link.
- *
- * The 'topic_count_text_callback' argument is a function, which given the count
- * of the posts with that tag returns a text for the tooltip of the tag link.
- *
- * The 'post_type' argument is used only when 'link' is set to 'edit'. It determines the post_type
- * passed to edit.php for the popular tags edit links.
- *
- * The 'exclude' and 'include' arguments are used for the get_tags() function. Only one
- * should be used, because only one will be used and the other ignored, if they are both set.
- *
- * @since 2.3.0
- *
- * @param array|string|null $args Optional. Override default arguments.
- * @return void|array Generated tag cloud, only if no failures and 'array' is set for the 'format' argument.
- *                    Otherwise, this function outputs the tag cloud.
- */
-function wp_tag_cloud( $args = '' ) {
-	$defaults = array(
-		'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 45,
-		'format' => 'flat', 'separator' => "\n", 'orderby' => 'name', 'order' => 'ASC',
-		'exclude' => '', 'include' => '', 'link' => 'view', 'taxonomy' => 'post_tag', 'post_type' => '', 'echo' => true
-	);
-	$args = wp_parse_args( $args, $defaults );
-
-	$tags = get_terms( $args['taxonomy'], array_merge( $args, array( 'orderby' => 'count', 'order' => 'DESC' ) ) ); // Always query top tags
-
-	if ( empty( $tags ) || is_wp_error( $tags ) )
-		return;
-
-	foreach ( $tags as $key => $tag ) {
-		if ( 'edit' == $args['link'] )
-			$link = get_edit_term_link( $tag->term_id, $tag->taxonomy, $args['post_type'] );
-		else
-			$link = get_term_link( intval($tag->term_id), $tag->taxonomy );
-		if ( is_wp_error( $link ) )
-			return;
-
-		$tags[ $key ]->link = $link;
-		$tags[ $key ]->id = $tag->term_id;
-	}
-
-	$return = wp_generate_tag_cloud( $tags, $args ); // Here's where those top tags get sorted according to $args
-
-	/**
-	 * Filters the tag cloud output.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param string $return HTML output of the tag cloud.
-	 * @param array  $args   An array of tag cloud arguments.
-	 */
-	$return = apply_filters( 'wp_tag_cloud', $return, $args );
-
-	if ( 'array' == $args['format'] || empty($args['echo']) )
-		return $return;
-
-	echo $return;
-}
-
-/**
- * Default topic count scaling for tag links
- *
- * @param int $count number of posts with that tag
- * @return int scaled count
- */
-function default_topic_count_scale( $count ) {
-	return round(log10($count + 1) * 100);
-}
-
-/**
- * Generates a tag cloud (heatmap) from provided data.
- *
- * @todo Complete functionality.
- * @since 2.3.0
- *
- * @param array $tags List of tags.
- * @param string|array $args {
- *     Optional. Array of string of arguments for generating a tag cloud.
- *
- *     @type int      $smallest                   Smallest font size used to display tags. Paired
- *                                                with the value of `$unit`, to determine CSS text
- *                                                size unit. Default 8 (pt).
- *     @type int      $largest                    Largest font size used to display tags. Paired
- *                                                with the value of `$unit`, to determine CSS text
- *                                                size unit. Default 22 (pt).
- *     @type string   $unit                       CSS text size unit to use with the `$smallest`
- *                                                and `$largest` values. Accepts any valid CSS text
- *                                                size unit. Default 'pt'.
- *     @type int      $number                     The number of tags to return. Accepts any
- *                                                positive integer or zero to return all.
- *                                                Default 0.
- *     @type string   $format                     Format to display the tag cloud in. Accepts 'flat'
- *                                                (tags separated with spaces), 'list' (tags displayed
- *                                                in an unordered list), or 'array' (returns an array).
- *                                                Default 'flat'.
- *     @type string   $separator                  HTML or text to separate the tags. Default "\n" (newline).
- *     @type string   $orderby                    Value to order tags by. Accepts 'name' or 'count'.
- *                                                Default 'name'. The {@see 'tag_cloud_sort'} filter
- *                                                can also affect how tags are sorted.
- *     @type string   $order                      How to order the tags. Accepts 'ASC' (ascending),
- *                                                'DESC' (descending), or 'RAND' (random). Default 'ASC'.
- *     @type int|bool $filter                     Whether to enable filtering of the final output
- *                                                via {@see 'wp_generate_tag_cloud'}. Default 1|true.
- *     @type string   $topic_count_text           Nooped plural text from _n_noop() to supply to
- *                                                tag tooltips. Default null.
- *     @type callable $topic_count_text_callback  Callback used to generate nooped plural text for
- *                                                tag tooltips based on the count. Default null.
- *     @type callable $topic_count_scale_callback Callback used to determine the tag count scaling
- *                                                value. Default default_topic_count_scale().
- * }
- * @return string|array Tag cloud as a string or an array, depending on 'format' argument.
- */
-function wp_generate_tag_cloud( $tags, $args = '' ) {
-	$defaults = array(
-		'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 0,
-		'format' => 'flat', 'separator' => "\n", 'orderby' => 'name', 'order' => 'ASC',
-		'topic_count_text' => null, 'topic_count_text_callback' => null,
-		'topic_count_scale_callback' => 'default_topic_count_scale', 'filter' => 1,
-	);
-
-	$args = wp_parse_args( $args, $defaults );
-
-	$return = ( 'array' === $args['format'] ) ? array() : '';
-
-	if ( empty( $tags ) ) {
-		return $return;
-	}
-
-	// Juggle topic count tooltips:
-	if ( isset( $args['topic_count_text'] ) ) {
-		// First look for nooped plural support via topic_count_text.
-		$translate_nooped_plural = $args['topic_count_text'];
-	} elseif ( ! empty( $args['topic_count_text_callback'] ) ) {
-		// Look for the alternative callback style. Ignore the previous default.
-		if ( $args['topic_count_text_callback'] === 'default_topic_count_text' ) {
-			$translate_nooped_plural = _n_noop( '%s topic', '%s topics' );
-		} else {
-			$translate_nooped_plural = false;
-		}
-	} elseif ( isset( $args['single_text'] ) && isset( $args['multiple_text'] ) ) {
-		// If no callback exists, look for the old-style single_text and multiple_text arguments.
-		$translate_nooped_plural = _n_noop( $args['single_text'], $args['multiple_text'] );
-	} else {
-		// This is the default for when no callback, plural, or argument is passed in.
-		$translate_nooped_plural = _n_noop( '%s topic', '%s topics' );
-	}
-
-	/**
-	 * Filters how the items in a tag cloud are sorted.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param array $tags Ordered array of terms.
-	 * @param array $args An array of tag cloud arguments.
-	 */
-	$tags_sorted = apply_filters( 'tag_cloud_sort', $tags, $args );
-	if ( empty( $tags_sorted ) ) {
-		return $return;
-	}
-
-	if ( $tags_sorted !== $tags ) {
-		$tags = $tags_sorted;
-		unset( $tags_sorted );
-	} else {
-		if ( 'RAND' === $args['order'] ) {
-			shuffle( $tags );
-		} else {
-			// SQL cannot save you; this is a second (potentially different) sort on a subset of data.
-			if ( 'name' === $args['orderby'] ) {
-				uasort( $tags, '_wp_object_name_sort_cb' );
-			} else {
-				uasort( $tags, '_wp_object_count_sort_cb' );
-			}
-
-			if ( 'DESC' === $args['order'] ) {
-				$tags = array_reverse( $tags, true );
-			}
-		}
-	}
-
-	if ( $args['number'] > 0 )
-		$tags = array_slice( $tags, 0, $args['number'] );
-
-	$counts = array();
-	$real_counts = array(); // For the alt tag
-	foreach ( (array) $tags as $key => $tag ) {
-		$real_counts[ $key ] = $tag->count;
-		$counts[ $key ] = call_user_func( $args['topic_count_scale_callback'], $tag->count );
-	}
-
-	$min_count = min( $counts );
-	$spread = max( $counts ) - $min_count;
-	if ( $spread <= 0 )
-		$spread = 1;
-	$font_spread = $args['largest'] - $args['smallest'];
-	if ( $font_spread < 0 )
-		$font_spread = 1;
-	$font_step = $font_spread / $spread;
-
-	// Assemble the data that will be used to generate the tag cloud markup.
-	$tags_data = array();
-	foreach ( $tags as $key => $tag ) {
-		$tag_id = isset( $tag->id ) ? $tag->id : $key;
-
-		$count = $counts[ $key ];
-		$real_count = $real_counts[ $key ];
-
-		if ( $translate_nooped_plural ) {
-			$title = sprintf( translate_nooped_plural( $translate_nooped_plural, $real_count ), number_format_i18n( $real_count ) );
-		} else {
-			$title = call_user_func( $args['topic_count_text_callback'], $real_count, $tag, $args );
-		}
-
-		$tags_data[] = array(
-			'id'         => $tag_id,
-			'url'        => '#' != $tag->link ? $tag->link : '#',
-			'name'	     => $tag->name,
-			'title'      => $title,
-			'slug'       => $tag->slug,
-			'real_count' => $real_count,
-			'class'	     => 'tag-link-' . $tag_id,
-			'font_size'  => $args['smallest'] + ( $count - $min_count ) * $font_step,
-		);
-	}
-
-	/**
-	 * Filters the data used to generate the tag cloud.
-	 *
-	 * @since 4.3.0
-	 *
-	 * @param array $tags_data An array of term data for term used to generate the tag cloud.
-	 */
-	$tags_data = apply_filters( 'wp_generate_tag_cloud_data', $tags_data );
-
-	$a = array();
-
-	// generate the output links array
-	foreach ( $tags_data as $key => $tag_data ) {
-		$class = $tag_data['class'] . ' tag-link-position-' . ( $key + 1 );
-		$a[] = "<a href='" . esc_url( $tag_data['url'] ) . "' class='" . esc_attr( $class ) . "' title='" . esc_attr( $tag_data['title'] ) . "' style='font-size: " . esc_attr( str_replace( ',', '.', $tag_data['font_size'] ) . $args['unit'] ) . ";'>" . esc_html( $tag_data['name'] ) . "</a>";
-	}
-
-	switch ( $args['format'] ) {
-		case 'array' :
-			$return =& $a;
-			break;
-		case 'list' :
-			$return = "<ul class='wp-tag-cloud'>\n\t<li>";
-			$return .= join( "</li>\n\t<li>", $a );
-			$return .= "</li>\n</ul>\n";
-			break;
-		default :
-			$return = join( $args['separator'], $a );
-			break;
-	}
-
-	if ( $args['filter'] ) {
-		/**
-		 * Filters the generated output of a tag cloud.
-		 *
-		 * The filter is only evaluated if a true value is passed
-		 * to the $filter argument in wp_generate_tag_cloud().
-		 *
-		 * @since 2.3.0
-		 *
-		 * @see wp_generate_tag_cloud()
-		 *
-		 * @param array|string $return String containing the generated HTML tag cloud output
-		 *                             or an array of tag links if the 'format' argument
-		 *                             equals 'array'.
-		 * @param array        $tags   An array of terms used in the tag cloud.
-		 * @param array        $args   An array of wp_generate_tag_cloud() arguments.
-		 */
-		return apply_filters( 'wp_generate_tag_cloud', $return, $tags, $args );
-	}
-
-	else
-		return $return;
-}
-
-/**
- * Serves as a callback for comparing objects based on name.
- *
- * Used with `uasort()`.
- *
- * @since 3.1.0
- * @access private
- *
- * @param object $a The first object to compare.
- * @param object $b The second object to compare.
- * @return int Negative number if `$a->name` is less than `$b->name`, zero if they are equal,
- *             or greater than zero if `$a->name` is greater than `$b->name`.
- */
-function _wp_object_name_sort_cb( $a, $b ) {
-	return strnatcasecmp( $a->name, $b->name );
-}
-
-/**
- * Serves as a callback for comparing objects based on count.
- *
- * Used with `uasort()`.
- *
- * @since 3.1.0
- * @access private
- *
- * @param object $a The first object to compare.
- * @param object $b The second object to compare.
- * @return bool Whether the count value for `$a` is greater than the count value for `$b`.
- */
-function _wp_object_count_sort_cb( $a, $b ) {
-	return ( $a->count > $b->count );
-}
-
-//
-// Helper functions
-//
-
-/**
- * Retrieve HTML list content for category list.
- *
- * @uses Walker_Category to create HTML list content.
- * @since 2.1.0
- * @see Walker_Category::walk() for parameters and return description.
- * @return string
- */
-function walk_category_tree() {
-	$args = func_get_args();
-	// the user's options are the third parameter
-	if ( empty( $args[2]['walker'] ) || ! ( $args[2]['walker'] instanceof Walker ) ) {
-		$walker = new Walker_Category;
-	} else {
-		$walker = $args[2]['walker'];
-	}
-	return call_user_func_array( array( $walker, 'walk' ), $args );
-}
-
-/**
- * Retrieve HTML dropdown (select) content for category list.
- *
- * @uses Walker_CategoryDropdown to create HTML dropdown content.
- * @since 2.1.0
- * @see Walker_CategoryDropdown::walk() for parameters and return description.
- * @return string
- */
-function walk_category_dropdown_tree() {
-	$args = func_get_args();
-	// the user's options are the third parameter
-	if ( empty( $args[2]['walker'] ) || ! ( $args[2]['walker'] instanceof Walker ) ) {
-		$walker = new Walker_CategoryDropdown;
-	} else {
-		$walker = $args[2]['walker'];
-	}
-	return call_user_func_array( array( $walker, 'walk' ), $args );
-}
-
-//
-// Tags
-//
-
-/**
- * Retrieve the link to the tag.
- *
- * @since 2.3.0
- * @see get_term_link()
- *
- * @param int|object $tag Tag ID or object.
- * @return string Link on success, empty string if tag does not exist.
- */
-function get_tag_link( $tag ) {
-	if ( ! is_object( $tag ) )
-		$tag = (int) $tag;
-
-	$tag = get_term_link( $tag, 'post_tag' );
-
-	if ( is_wp_error( $tag ) )
-		return '';
-
-	return $tag;
-}
-
-/**
- * Retrieve the tags for a post.
- *
- * @since 2.3.0
- *
- * @param int $id Post ID.
- * @return array|false|WP_Error Array of tag objects on success, false on failure.
- */
-function get_the_tags( $id = 0 ) {
-
-	/**
-	 * Filters the array of tags for the given post.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @see get_the_terms()
-	 *
-	 * @param array $terms An array of tags for the given post.
-	 */
-	return apply_filters( 'get_the_tags', get_the_terms( $id, 'post_tag' ) );
-}
-
-/**
- * Retrieve the tags for a post formatted as a string.
- *
- * @since 2.3.0
- *
- * @param string $before Optional. Before tags.
- * @param string $sep Optional. Between tags.
- * @param string $after Optional. After tags.
- * @param int $id Optional. Post ID. Defaults to the current post.
- * @return string|false|WP_Error A list of tags on success, false if there are no terms, WP_Error on failure.
- */
-function get_the_tag_list( $before = '', $sep = '', $after = '', $id = 0 ) {
-
-	/**
-	 * Filters the tags list for a given post.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param string $tag_list List of tags.
-	 * @param string $before   String to use before tags.
-	 * @param string $sep      String to use between the tags.
-	 * @param string $after    String to use after tags.
-	 * @param int    $id       Post ID.
-	 */
-	return apply_filters( 'the_tags', get_the_term_list( $id, 'post_tag', $before, $sep, $after ), $before, $sep, $after, $id );
-}
-
-/**
- * Retrieve the tags for a post.
- *
- * @since 2.3.0
- *
- * @param string $before Optional. Before list.
- * @param string $sep Optional. Separate items using this.
- * @param string $after Optional. After list.
- */
-function the_tags( $before = null, $sep = ', ', $after = '' ) {
-	if ( null === $before )
-		$before = __('Tags: ');
-	echo get_the_tag_list($before, $sep, $after);
-}
-
-/**
- * Retrieve tag description.
- *
- * @since 2.8.0
- *
- * @param int $tag Optional. Tag ID. Will use global tag ID by default.
- * @return string Tag description, available.
- */
-function tag_description( $tag = 0 ) {
-	return term_description( $tag );
-}
-
-/**
- * Retrieve term description.
- *
- * @since 2.8.0
- *
- * @param int $term Optional. Term ID. Will use global term ID by default.
- * @param string $taxonomy Optional taxonomy name. Defaults to 'post_tag'.
- * @return string Term description, available.
- */
-function term_description( $term = 0, $taxonomy = 'post_tag' ) {
-	if ( ! $term && ( is_tax() || is_tag() || is_category() ) ) {
-		$term = get_queried_object();
-		if ( $term ) {
-			$taxonomy = $term->taxonomy;
-			$term = $term->term_id;
-		}
-	}
-	$description = get_term_field( 'description', $term, $taxonomy );
-	return is_wp_error( $description ) ? '' : $description;
-}
-
-/**
- * Retrieve the terms of the taxonomy that are attached to the post.
- *
- * @since 2.5.0
- *
- * @param int|object $post Post ID or object.
- * @param string $taxonomy Taxonomy name.
- * @return array|false|WP_Error Array of WP_Term objects on success, false if there are no terms
- *                              or the post does not exist, WP_Error on failure.
- */
-function get_the_terms( $post, $taxonomy ) {
-	if ( ! $post = get_post( $post ) )
-		return false;
-
-	$terms = get_object_term_cache( $post->ID, $taxonomy );
-	if ( false === $terms ) {
-		$terms = wp_get_object_terms( $post->ID, $taxonomy );
-		if ( ! is_wp_error( $terms ) ) {
-			$term_ids = wp_list_pluck( $terms, 'term_id' );
-			wp_cache_add( $post->ID, $term_ids, $taxonomy . '_relationships' );
-		}
-	}
-
-	/**
-	 * Filters the list of terms attached to the given post.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param array|WP_Error $terms    List of attached terms, or WP_Error on failure.
-	 * @param int            $post_id  Post ID.
-	 * @param string         $taxonomy Name of the taxonomy.
-	 */
-	$terms = apply_filters( 'get_the_terms', $terms, $post->ID, $taxonomy );
-
-	if ( empty( $terms ) )
-		return false;
-
-	return $terms;
-}
-
-/**
- * Retrieve a post's terms as a list with specified format.
- *
- * @since 2.5.0
- *
- * @param int $id Post ID.
- * @param string $taxonomy Taxonomy name.
- * @param string $before Optional. Before list.
- * @param string $sep Optional. Separate items using this.
- * @param string $after Optional. After list.
- * @return string|false|WP_Error A list of terms on success, false if there are no terms, WP_Error on failure.
- */
-function get_the_term_list( $id, $taxonomy, $before = '', $sep = '', $after = '' ) {
-	$terms = get_the_terms( $id, $taxonomy );
-
-	if ( is_wp_error( $terms ) )
-		return $terms;
-
-	if ( empty( $terms ) )
-		return false;
-
-	$links = array();
-
-	foreach ( $terms as $term ) {
-		$link = get_term_link( $term, $taxonomy );
-		if ( is_wp_error( $link ) ) {
-			return $link;
-		}
-		$links[] = '<a href="' . esc_url( $link ) . '" rel="tag">' . $term->name . '</a>';
-	}
-
-	/**
-	 * Filters the term links for a given taxonomy.
-	 *
-	 * The dynamic portion of the filter name, `$taxonomy`, refers
-	 * to the taxonomy slug.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param array $links An array of term links.
-	 */
-	$term_links = apply_filters( "term_links-{$taxonomy}", $links );
-
-	return $before . join( $sep, $term_links ) . $after;
-}
-
-/**
- * Display the terms in a list.
- *
- * @since 2.5.0
- *
- * @param int $id Post ID.
- * @param string $taxonomy Taxonomy name.
- * @param string $before Optional. Before list.
- * @param string $sep Optional. Separate items using this.
- * @param string $after Optional. After list.
- * @return false|void False on WordPress error.
- */
-function the_terms( $id, $taxonomy, $before = '', $sep = ', ', $after = '' ) {
-	$term_list = get_the_term_list( $id, $taxonomy, $before, $sep, $after );
-
-	if ( is_wp_error( $term_list ) )
-		return false;
-
-	/**
-	 * Filters the list of terms to display.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param array  $term_list List of terms to display.
-	 * @param string $taxonomy  The taxonomy name.
-	 * @param string $before    String to use before the terms.
-	 * @param string $sep       String to use between the terms.
-	 * @param string $after     String to use after the terms.
-	 */
-	echo apply_filters( 'the_terms', $term_list, $taxonomy, $before, $sep, $after );
-}
-
-/**
- * Check if the current post has any of given category.
- *
- * @since 3.1.0
- *
- * @param string|int|array $category Optional. The category name/term_id/slug or array of them to check for.
- * @param int|object $post Optional. Post to check instead of the current post.
- * @return bool True if the current post has any of the given categories (or any category, if no category specified).
- */
-function has_category( $category = '', $post = null ) {
-	return has_term( $category, 'category', $post );
-}
-
-/**
- * Check if the current post has any of given tags.
- *
- * The given tags are checked against the post's tags' term_ids, names and slugs.
- * Tags given as integers will only be checked against the post's tags' term_ids.
- * If no tags are given, determines if post has any tags.
- *
- * Prior to v2.7 of WordPress, tags given as integers would also be checked against the post's tags' names and slugs (in addition to term_ids)
- * Prior to v2.7, this function could only be used in the WordPress Loop.
- * As of 2.7, the function can be used anywhere if it is provided a post ID or post object.
- *
- * @since 2.6.0
- *
- * @param string|int|array $tag Optional. The tag name/term_id/slug or array of them to check for.
- * @param int|object $post Optional. Post to check instead of the current post. (since 2.7.0)
- * @return bool True if the current post has any of the given tags (or any tag, if no tag specified).
- */
-function has_tag( $tag = '', $post = null ) {
-	return has_term( $tag, 'post_tag', $post );
-}
-
-/**
- * Check if the current post has any of given terms.
- *
- * The given terms are checked against the post's terms' term_ids, names and slugs.
- * Terms given as integers will only be checked against the post's terms' term_ids.
- * If no terms are given, determines if post has any terms.
- *
- * @since 3.1.0
- *
- * @param string|int|array $term Optional. The term name/term_id/slug or array of them to check for.
- * @param string $taxonomy Taxonomy name
- * @param int|object $post Optional. Post to check instead of the current post.
- * @return bool True if the current post has any of the given tags (or any tag, if no tag specified).
- */
-function has_term( $term = '', $taxonomy = '', $post = null ) {
-	$post = get_post($post);
-
-	if ( !$post )
-		return false;
-
-	$r = is_object_in_term( $post->ID, $taxonomy, $term );
-	if ( is_wp_error( $r ) )
-		return false;
-
-	return $r;
-}
Index: www/wp-includes/autoload/requests/Exception/HTTP/400.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/400.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/400.php	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-<?php
-/**
- * Exception for 400 Bad Request responses
- *
- * @package Requests
- */
-
-/**
- * Exception for 400 Bad Request responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_400 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 400;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Bad Request';
-}
\ No newline at end of file
Index: www/wp-admin/setup-config.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/setup-config.php	(revision 38565)
+++ www/wp-admin/setup-config.php	(revision 38565)
@@ -1,415 +0,0 @@
-<?php
-/**
- * Retrieves and creates the wp-config.php file.
- *
- * The permissions for the base directory must allow for writing files in order
- * for the wp-config.php to be created using this page.
- *
- * @internal This file must be parsable by PHP4.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/**
- * We are installing.
- */
-define('WP_INSTALLING', true);
-
-/**
- * We are blissfully unaware of anything.
- */
-define('WP_SETUP_CONFIG', true);
-
-/**
- * Disable error reporting
- *
- * Set this to error_reporting( -1 ) for debugging
- */
-error_reporting(0);
-
-if ( ! defined( 'ABSPATH' ) ) {
-	define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' );
-}
-
-require( ABSPATH . 'wp-settings.php' );
-
-/** Load WordPress Administration Upgrade API */
-require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
-
-/** Load WordPress Translation Install API */
-require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
-
-nocache_headers();
-
-// Support wp-config-sample.php one level up, for the develop repo.
-if ( file_exists( ABSPATH . 'wp-config-sample.php' ) )
-	$config_file = file( ABSPATH . 'wp-config-sample.php' );
-elseif ( file_exists( dirname( ABSPATH ) . '/wp-config-sample.php' ) )
-	$config_file = file( dirname( ABSPATH ) . '/wp-config-sample.php' );
-else
-	wp_die( __( 'Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file to your WordPress installation.' ) );
-
-// Check if wp-config.php has been created
-if ( file_exists( ABSPATH . 'wp-config.php' ) )
-	wp_die( '<p>' . sprintf(
-			/* translators: %s: install.php */
-			__( "The file 'wp-config.php' already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='%s'>installing now</a>." ),
-			'install.php'
-		) . '</p>'
-	);
-
-// Check if wp-config.php exists above the root directory but is not part of another install
-if ( @file_exists( ABSPATH . '../wp-config.php' ) && ! @file_exists( ABSPATH . '../wp-settings.php' ) ) {
-	wp_die( '<p>' . sprintf(
-			/* translators: %s: install.php */
-			__( "The file 'wp-config.php' already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='%s'>installing now</a>." ),
-			'install.php'
-		) . '</p>'
-	);
-}
-
-$step = isset( $_GET['step'] ) ? (int) $_GET['step'] : -1;
-
-/**
- * Display setup wp-config.php file header.
- *
- * @ignore
- * @since 2.3.0
- *
- * @global string    $wp_local_package
- * @global WP_Locale $wp_locale
- *
- * @param string|array $body_classes
- */
-function setup_config_display_header( $body_classes = array() ) {
-	$body_classes = (array) $body_classes;
-	$body_classes[] = 'wp-core-ui';
-	if ( is_rtl() ) {
-		$body_classes[] = 'rtl';
-	}
-
-	header( 'Content-Type: text/html; charset=utf-8' );
-?>
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml"<?php if ( is_rtl() ) echo ' dir="rtl"'; ?>>
-<head>
-	<meta name="viewport" content="width=device-width" />
-	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-	<meta name="robots" content="noindex,nofollow" />
-	<title><?php _e( 'WordPress &rsaquo; Setup Configuration File' ); ?></title>
-	<?php wp_admin_css( 'install', true ); ?>
-</head>
-<body class="<?php echo implode( ' ', $body_classes ); ?>">
-<p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>" tabindex="-1"><?php _e( 'WordPress' ); ?></a></p>
-<?php
-} // end function setup_config_display_header();
-
-$language = '';
-if ( ! empty( $_REQUEST['language'] ) ) {
-	$language = preg_replace( '/[^a-zA-Z_]/', '', $_REQUEST['language'] );
-} elseif ( isset( $GLOBALS['wp_local_package'] ) ) {
-	$language = $GLOBALS['wp_local_package'];
-}
-
-switch($step) {
-	case -1:
-		if ( wp_can_install_language_pack() && empty( $language ) && ( $languages = wp_get_available_translations() ) ) {
-			setup_config_display_header( 'language-chooser' );
-			echo '<h1 class="screen-reader-text">Select a default language</h1>';
-			echo '<form id="setup" method="post" action="?step=0">';
-			wp_install_language_form( $languages );
-			echo '</form>';
-			break;
-		}
-
-		// Deliberately fall through if we can't reach the translations API.
-
-	case 0:
-		if ( ! empty( $language ) ) {
-			$loaded_language = wp_download_language_pack( $language );
-			if ( $loaded_language ) {
-				load_default_textdomain( $loaded_language );
-				$GLOBALS['wp_locale'] = new WP_Locale();
-			}
-		}
-
-		setup_config_display_header();
-		$step_1 = 'setup-config.php?step=1';
-		if ( isset( $_REQUEST['noapi'] ) ) {
-			$step_1 .= '&amp;noapi';
-		}
-		if ( ! empty( $loaded_language ) ) {
-			$step_1 .= '&amp;language=' . $loaded_language;
-		}
-?>
-<h1 class="screen-reader-text"><?php _e( 'Before getting started' ) ?></h1>
-<p><?php _e( 'Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.' ) ?></p>
-<ol>
-	<li><?php _e( 'Database name' ); ?></li>
-	<li><?php _e( 'Database username' ); ?></li>
-	<li><?php _e( 'Database password' ); ?></li>
-	<li><?php _e( 'Database host' ); ?></li>
-	<li><?php _e( 'Table prefix (if you want to run more than one WordPress in a single database)' ); ?></li>
-</ol>
-<p><?php
-	/* translators: %s: wp-config.php */
-	printf( __( 'We&#8217;re going to use this information to create a %s file.' ),
-		'<code>wp-config.php</code>'
-	);
-	?>
-	<strong><?php
-		/* translators: 1: wp-config-sample.php, 2: wp-config.php */
-		printf( __( 'If for any reason this automatic file creation doesn&#8217;t work, don&#8217;t worry. All this does is fill in the database information to a configuration file. You may also simply open %1$s in a text editor, fill in your information, and save it as %2$s.' ),
-			'<code>wp-config-sample.php</code>',
-			'<code>wp-config.php</code>'
-		);
-	?></strong>
-	<?php
-	/* translators: %s: Codex URL */
-	printf( __( 'Need more help? <a href="%s">We got it</a>.' ),
-		__( 'https://codex.wordpress.org/Editing_wp-config.php' )
-	);
-?></p>
-<p><?php _e( 'In all likelihood, these items were supplied to you by your Web Host. If you don&#8217;t have this information, then you will need to contact them before you can continue. If you&#8217;re all ready&hellip;' ); ?></p>
-
-<p class="step"><a href="<?php echo $step_1; ?>" class="button button-large"><?php _e( 'Let&#8217;s go!' ); ?></a></p>
-<?php
-	break;
-
-	case 1:
-		load_default_textdomain( $language );
-		$GLOBALS['wp_locale'] = new WP_Locale();
-
-		setup_config_display_header();
-	?>
-<h1 class="screen-reader-text"><?php _e( 'Set up your database connection' ) ?></h1>
-<form method="post" action="setup-config.php?step=2">
-	<p><?php _e( 'Below you should enter your database connection details. If you&#8217;re not sure about these, contact your host.' ); ?></p>
-	<table class="form-table">
-		<tr>
-			<th scope="row"><label for="dbname"><?php _e( 'Database Name' ); ?></label></th>
-			<td><input name="dbname" id="dbname" type="text" size="25" value="wordpress" /></td>
-			<td><?php _e( 'The name of the database you want to use with WordPress.' ); ?></td>
-		</tr>
-		<tr>
-			<th scope="row"><label for="uname"><?php _e( 'Username' ); ?></label></th>
-			<td><input name="uname" id="uname" type="text" size="25" value="<?php echo htmlspecialchars( _x( 'username', 'example username' ), ENT_QUOTES ); ?>" /></td>
-			<td><?php _e( 'Your database username.' ); ?></td>
-		</tr>
-		<tr>
-			<th scope="row"><label for="pwd"><?php _e( 'Password' ); ?></label></th>
-			<td><input name="pwd" id="pwd" type="text" size="25" value="<?php echo htmlspecialchars( _x( 'password', 'example password' ), ENT_QUOTES ); ?>" autocomplete="off" /></td>
-			<td><?php _e( 'Your database password.' ); ?></td>
-		</tr>
-		<tr>
-			<th scope="row"><label for="dbhost"><?php _e( 'Database Host' ); ?></label></th>
-			<td><input name="dbhost" id="dbhost" type="text" size="25" value="localhost" /></td>
-			<td><?php
-				/* translators: %s: localhost */
-				printf( __( 'You should be able to get this info from your web host, if %s doesn&#8217;t work.' ),'<code>localhost</code>' );
-			?></td>
-		</tr>
-		<tr>
-			<th scope="row"><label for="prefix"><?php _e( 'Table Prefix' ); ?></label></th>
-			<td><input name="prefix" id="prefix" type="text" value="wp_" size="25" /></td>
-			<td><?php _e( 'If you want to run multiple WordPress installations in a single database, change this.' ); ?></td>
-		</tr>
-	</table>
-	<?php if ( isset( $_GET['noapi'] ) ) { ?><input name="noapi" type="hidden" value="1" /><?php } ?>
-	<input type="hidden" name="language" value="<?php echo esc_attr( $language ); ?>" />
-	<p class="step"><input name="submit" type="submit" value="<?php echo htmlspecialchars( __( 'Submit' ), ENT_QUOTES ); ?>" class="button button-large" /></p>
-</form>
-<?php
-	break;
-
-	case 2:
-	load_default_textdomain( $language );
-	$GLOBALS['wp_locale'] = new WP_Locale();
-
-	$dbname = trim( wp_unslash( $_POST[ 'dbname' ] ) );
-	$uname = trim( wp_unslash( $_POST[ 'uname' ] ) );
-	$pwd = trim( wp_unslash( $_POST[ 'pwd' ] ) );
-	$dbhost = trim( wp_unslash( $_POST[ 'dbhost' ] ) );
-	$prefix = trim( wp_unslash( $_POST[ 'prefix' ] ) );
-
-	$step_1 = 'setup-config.php?step=1';
-	$install = 'install.php';
-	if ( isset( $_REQUEST['noapi'] ) ) {
-		$step_1 .= '&amp;noapi';
-	}
-
-	if ( ! empty( $language ) ) {
-		$step_1 .= '&amp;language=' . $language;
-		$install .= '?language=' . $language;
-	} else {
-		$install .= '?language=en_US';
-	}
-
-	$tryagain_link = '</p><p class="step"><a href="' . $step_1 . '" onclick="javascript:history.go(-1);return false;" class="button button-large">' . __( 'Try again' ) . '</a>';
-
-	if ( empty( $prefix ) )
-		wp_die( __( '<strong>ERROR</strong>: "Table Prefix" must not be empty.' . $tryagain_link ) );
-
-	// Validate $prefix: it can only contain letters, numbers and underscores.
-	if ( preg_match( '|[^a-z0-9_]|i', $prefix ) )
-		wp_die( __( '<strong>ERROR</strong>: "Table Prefix" can only contain numbers, letters, and underscores.' . $tryagain_link ) );
-
-	// Test the db connection.
-	/**#@+
-	 * @ignore
-	 */
-	define('DB_NAME', $dbname);
-	define('DB_USER', $uname);
-	define('DB_PASSWORD', $pwd);
-	define('DB_HOST', $dbhost);
-	/**#@-*/
-
-	// Re-construct $wpdb with these new values.
-	unset( $wpdb );
-	require_wp_db();
-
-	/*
-	 * The wpdb constructor bails when WP_SETUP_CONFIG is set, so we must
-	 * fire this manually. We'll fail here if the values are no good.
-	 */
-	$wpdb->db_connect();
-
-	if ( ! empty( $wpdb->error ) )
-		wp_die( $wpdb->error->get_error_message() . $tryagain_link );
-
-	$wpdb->query( "SELECT $prefix" );
-	if ( ! $wpdb->last_error ) {
-		// MySQL was able to parse the prefix as a value, which we don't want. Bail.
-		wp_die( __( '<strong>ERROR</strong>: "Table Prefix" is invalid.' ) );
-	}
-
-	// Generate keys and salts using secure CSPRNG; fallback to API if enabled; further fallback to original wp_generate_password().
-	try {
-		$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_ []{}<>~`+=,.;:/?|';
-		$max = strlen($chars) - 1;
-		for ( $i = 0; $i < 8; $i++ ) {
-			$key = '';
-			for ( $j = 0; $j < 64; $j++ ) {
-				$key .= substr( $chars, random_int( 0, $max ), 1 );
-			}
-			$secret_keys[] = $key;
-		}
-	} catch ( Exception $ex ) {
-		$no_api = isset( $_POST['noapi'] );
-
-		if ( ! $no_api ) {
-			$secret_keys = wp_remote_get( 'https://api.wordpress.org/secret-key/1.1/salt/' );
-		}
-
-		if ( $no_api || is_wp_error( $secret_keys ) ) {
-			$secret_keys = array();
-			for ( $i = 0; $i < 8; $i++ ) {
-				$secret_keys[] = wp_generate_password( 64, true, true );
-			}
-		} else {
-			$secret_keys = explode( "\n", wp_remote_retrieve_body( $secret_keys ) );
-			foreach ( $secret_keys as $k => $v ) {
-				$secret_keys[$k] = substr( $v, 28, 64 );
-			}
-		}
-	}
-
-	$key = 0;
-	// Not a PHP5-style by-reference foreach, as this file must be parseable by PHP4.
-	foreach ( $config_file as $line_num => $line ) {
-		if ( '$table_prefix  =' == substr( $line, 0, 16 ) ) {
-			$config_file[ $line_num ] = '$table_prefix  = \'' . addcslashes( $prefix, "\\'" ) . "';\r\n";
-			continue;
-		}
-
-		if ( ! preg_match( '/^define\(\'([A-Z_]+)\',([ ]+)/', $line, $match ) )
-			continue;
-
-		$constant = $match[1];
-		$padding  = $match[2];
-
-		switch ( $constant ) {
-			case 'DB_NAME'     :
-			case 'DB_USER'     :
-			case 'DB_PASSWORD' :
-			case 'DB_HOST'     :
-				$config_file[ $line_num ] = "define('" . $constant . "'," . $padding . "'" . addcslashes( constant( $constant ), "\\'" ) . "');\r\n";
-				break;
-			case 'DB_CHARSET'  :
-				if ( 'utf8mb4' === $wpdb->charset || ( ! $wpdb->charset && $wpdb->has_cap( 'utf8mb4' ) ) ) {
-					$config_file[ $line_num ] = "define('" . $constant . "'," . $padding . "'utf8mb4');\r\n";
-				}
-				break;
-			case 'AUTH_KEY'         :
-			case 'SECURE_AUTH_KEY'  :
-			case 'LOGGED_IN_KEY'    :
-			case 'NONCE_KEY'        :
-			case 'AUTH_SALT'        :
-			case 'SECURE_AUTH_SALT' :
-			case 'LOGGED_IN_SALT'   :
-			case 'NONCE_SALT'       :
-				$config_file[ $line_num ] = "define('" . $constant . "'," . $padding . "'" . $secret_keys[$key++] . "');\r\n";
-				break;
-		}
-	}
-	unset( $line );
-
-	if ( ! is_writable(ABSPATH) ) :
-		setup_config_display_header();
-?>
-<p><?php
-	/* translators: %s: wp-config.php */
-	printf( __( 'Sorry, but I can&#8217;t write the %s file.' ), '<code>wp-config.php</code>' );
-?></p>
-<p><?php
-	/* translators: %s: wp-config.php */
-	printf( __( 'You can create the %s manually and paste the following text into it.' ), '<code>wp-config.php</code>' );
-?></p>
-<textarea id="wp-config" cols="98" rows="15" class="code" readonly="readonly"><?php
-		foreach ( $config_file as $line ) {
-			echo htmlentities($line, ENT_COMPAT, 'UTF-8');
-		}
-?></textarea>
-<p><?php _e( 'After you&#8217;ve done that, click &#8220;Run the install.&#8221;' ); ?></p>
-<p class="step"><a href="<?php echo $install; ?>" class="button button-large"><?php _e( 'Run the install' ); ?></a></p>
-<script>
-(function(){
-if ( ! /iPad|iPod|iPhone/.test( navigator.userAgent ) ) {
-	var el = document.getElementById('wp-config');
-	el.focus();
-	el.select();
-}
-})();
-</script>
-<?php
-	else :
-		/*
-		 * If this file doesn't exist, then we are using the wp-config-sample.php
-		 * file one level up, which is for the develop repo.
-		 */
-		if ( file_exists( ABSPATH . 'wp-config-sample.php' ) )
-			$path_to_wp_config = ABSPATH . 'wp-config.php';
-		else
-			$path_to_wp_config = dirname( ABSPATH ) . '/wp-config.php';
-
-		$handle = fopen( $path_to_wp_config, 'w' );
-		foreach ( $config_file as $line ) {
-			fwrite( $handle, $line );
-		}
-		fclose( $handle );
-		chmod( $path_to_wp_config, 0666 );
-		setup_config_display_header();
-?>
-<h1 class="screen-reader-text"><?php _e( 'Successful database connection' ) ?></h1>
-<p><?php _e( 'All right, sparky! You&#8217;ve made it through this part of the installation. WordPress can now communicate with your database. If you are ready, time now to&hellip;' ); ?></p>
-
-<p class="step"><a href="<?php echo $install; ?>" class="button button-large"><?php _e( 'Run the install' ); ?></a></p>
-<?php
-	endif;
-	break;
-}
-?>
-<?php wp_print_scripts( 'language-chooser' ); ?>
-</body>
-</html>
Index: www/wp-includes/autoload/feed/MagpieRSS.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/feed/MagpieRSS.php	(revision )
+++ www/wp-includes/autoload/feed/MagpieRSS.php	(revision )
@@ -0,0 +1,385 @@
+<?php
+
+/**
+ * MagpieRSS: a simple RSS integration tool
+ *
+ * A compiled file for RSS syndication
+ *
+ * @author Kellan Elliott-McCrea <kellan@protest.net>
+ * @version 0.51
+ * @license GPL
+ *
+ * @package External
+ * @subpackage MagpieRSS
+ * @deprecated 3.0.0 Use SimplePie instead.
+ */
+
+class MagpieRSS {
+	var $parser;
+	var $current_item	= array();	// item currently being parsed
+	var $items			= array();	// collection of parsed items
+	var $channel		= array();	// hash of channel fields
+	var $textinput		= array();
+	var $image			= array();
+	var $feed_type;
+	var $feed_version;
+
+	// parser variables
+	var $stack				= array(); // parser stack
+	var $inchannel			= false;
+	var $initem 			= false;
+	var $incontent			= false; // if in Atom <content mode="xml"> field
+	var $intextinput		= false;
+	var $inimage 			= false;
+	var $current_field		= '';
+	var $current_namespace	= false;
+
+	//var $ERROR = "";
+
+	var $_CONTENT_CONSTRUCTS = array('content', 'summary', 'info', 'title', 'tagline', 'copyright');
+
+	/**
+	 * PHP5 constructor.
+	 */
+	function __construct( $source ) {
+
+		# if PHP xml isn't compiled in, die
+		#
+		if ( !function_exists('xml_parser_create') )
+			trigger_error( "Failed to load PHP's XML Extension. https://secure.php.net/manual/en/ref.xml.php" );
+
+		$parser = @xml_parser_create();
+
+		if ( !is_resource($parser) )
+			trigger_error( "Failed to create an instance of PHP's XML parser. https://secure.php.net/manual/en/ref.xml.php");
+
+		$this->parser = $parser;
+
+		# pass in parser, and a reference to this object
+		# set up handlers
+		#
+		xml_set_object( $this->parser, $this );
+		xml_set_element_handler($this->parser,
+			'feed_start_element', 'feed_end_element' );
+
+		xml_set_character_data_handler( $this->parser, 'feed_cdata' );
+
+		$status = xml_parse( $this->parser, $source );
+
+		if (! $status ) {
+			$errorcode = xml_get_error_code( $this->parser );
+			if ( $errorcode != XML_ERROR_NONE ) {
+				$xml_error = xml_error_string( $errorcode );
+				$error_line = xml_get_current_line_number($this->parser);
+				$error_col = xml_get_current_column_number($this->parser);
+				$errormsg = "$xml_error at line $error_line, column $error_col";
+
+				$this->error( $errormsg );
+			}
+		}
+
+		xml_parser_free( $this->parser );
+
+		$this->normalize();
+	}
+
+	/**
+	 * PHP4 constructor.
+	 */
+	public function MagpieRSS( $source ) {
+		self::__construct( $source );
+	}
+
+	function feed_start_element($p, $element, &$attrs) {
+		$el = $element = strtolower($element);
+		$attrs = array_change_key_case($attrs, CASE_LOWER);
+
+		// check for a namespace, and split if found
+		$ns	= false;
+		if ( strpos( $element, ':' ) ) {
+			list($ns, $el) = explode( ':', $element, 2);
+		}
+		if ( $ns and $ns != 'rdf' ) {
+			$this->current_namespace = $ns;
+		}
+
+		# if feed type isn't set, then this is first element of feed
+		# identify feed from root element
+		#
+		if (!isset($this->feed_type) ) {
+			if ( $el == 'rdf' ) {
+				$this->feed_type = RSS;
+				$this->feed_version = '1.0';
+			}
+			elseif ( $el == 'rss' ) {
+				$this->feed_type = RSS;
+				$this->feed_version = $attrs['version'];
+			}
+			elseif ( $el == 'feed' ) {
+				$this->feed_type = ATOM;
+				$this->feed_version = $attrs['version'];
+				$this->inchannel = true;
+			}
+			return;
+		}
+
+		if ( $el == 'channel' )
+		{
+			$this->inchannel = true;
+		}
+		elseif ($el == 'item' or $el == 'entry' )
+		{
+			$this->initem = true;
+			if ( isset($attrs['rdf:about']) ) {
+				$this->current_item['about'] = $attrs['rdf:about'];
+			}
+		}
+
+		// if we're in the default namespace of an RSS feed,
+		//  record textinput or image fields
+		elseif (
+			$this->feed_type == RSS and
+			$this->current_namespace == '' and
+			$el == 'textinput' )
+		{
+			$this->intextinput = true;
+		}
+
+		elseif (
+			$this->feed_type == RSS and
+			$this->current_namespace == '' and
+			$el == 'image' )
+		{
+			$this->inimage = true;
+		}
+
+		# handle atom content constructs
+		elseif ( $this->feed_type == ATOM and in_array($el, $this->_CONTENT_CONSTRUCTS) )
+		{
+			// avoid clashing w/ RSS mod_content
+			if ($el == 'content' ) {
+				$el = 'atom_content';
+			}
+
+			$this->incontent = $el;
+
+		}
+
+		// if inside an Atom content construct (e.g. content or summary) field treat tags as text
+		elseif ($this->feed_type == ATOM and $this->incontent )
+		{
+			// if tags are inlined, then flatten
+			$attrs_str = join(' ',
+				array_map(array('MagpieRSS', 'map_attrs'),
+					array_keys($attrs),
+					array_values($attrs) ) );
+
+			$this->append_content( "<$element $attrs_str>"  );
+
+			array_unshift( $this->stack, $el );
+		}
+
+		// Atom support many links per containging element.
+		// Magpie treats link elements of type rel='alternate'
+		// as being equivalent to RSS's simple link element.
+		//
+		elseif ($this->feed_type == ATOM and $el == 'link' )
+		{
+			if ( isset($attrs['rel']) and $attrs['rel'] == 'alternate' )
+			{
+				$link_el = 'link';
+			}
+			else {
+				$link_el = 'link_' . $attrs['rel'];
+			}
+
+			$this->append($link_el, $attrs['href']);
+		}
+		// set stack[0] to current element
+		else {
+			array_unshift($this->stack, $el);
+		}
+	}
+
+	function feed_cdata ($p, $text) {
+
+		if ($this->feed_type == ATOM and $this->incontent)
+		{
+			$this->append_content( $text );
+		}
+		else {
+			$current_el = join('_', array_reverse($this->stack));
+			$this->append($current_el, $text);
+		}
+	}
+
+	function feed_end_element ($p, $el) {
+		$el = strtolower($el);
+
+		if ( $el == 'item' or $el == 'entry' )
+		{
+			$this->items[] = $this->current_item;
+			$this->current_item = array();
+			$this->initem = false;
+		}
+		elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'textinput' )
+		{
+			$this->intextinput = false;
+		}
+		elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'image' )
+		{
+			$this->inimage = false;
+		}
+		elseif ($this->feed_type == ATOM and in_array($el, $this->_CONTENT_CONSTRUCTS) )
+		{
+			$this->incontent = false;
+		}
+		elseif ($el == 'channel' or $el == 'feed' )
+		{
+			$this->inchannel = false;
+		}
+		elseif ($this->feed_type == ATOM and $this->incontent  ) {
+			// balance tags properly
+			// note: This may not actually be necessary
+			if ( $this->stack[0] == $el )
+			{
+				$this->append_content("</$el>");
+			}
+			else {
+				$this->append_content("<$el />");
+			}
+
+			array_shift( $this->stack );
+		}
+		else {
+			array_shift( $this->stack );
+		}
+
+		$this->current_namespace = false;
+	}
+
+	function concat (&$str1, $str2="") {
+		if (!isset($str1) ) {
+			$str1="";
+		}
+		$str1 .= $str2;
+	}
+
+	function append_content($text) {
+		if ( $this->initem ) {
+			$this->concat( $this->current_item[ $this->incontent ], $text );
+		}
+		elseif ( $this->inchannel ) {
+			$this->concat( $this->channel[ $this->incontent ], $text );
+		}
+	}
+
+	// smart append - field and namespace aware
+	function append($el, $text) {
+		if (!$el) {
+			return;
+		}
+		if ( $this->current_namespace )
+		{
+			if ( $this->initem ) {
+				$this->concat(
+					$this->current_item[ $this->current_namespace ][ $el ], $text);
+			}
+			elseif ($this->inchannel) {
+				$this->concat(
+					$this->channel[ $this->current_namespace][ $el ], $text );
+			}
+			elseif ($this->intextinput) {
+				$this->concat(
+					$this->textinput[ $this->current_namespace][ $el ], $text );
+			}
+			elseif ($this->inimage) {
+				$this->concat(
+					$this->image[ $this->current_namespace ][ $el ], $text );
+			}
+		}
+		else {
+			if ( $this->initem ) {
+				$this->concat(
+					$this->current_item[ $el ], $text);
+			}
+			elseif ($this->intextinput) {
+				$this->concat(
+					$this->textinput[ $el ], $text );
+			}
+			elseif ($this->inimage) {
+				$this->concat(
+					$this->image[ $el ], $text );
+			}
+			elseif ($this->inchannel) {
+				$this->concat(
+					$this->channel[ $el ], $text );
+			}
+
+		}
+	}
+
+	function normalize () {
+		// if atom populate rss fields
+		if ( $this->is_atom() ) {
+			$this->channel['descripton'] = $this->channel['tagline'];
+			for ( $i = 0; $i < count($this->items); $i++) {
+				$item = $this->items[$i];
+				if ( isset($item['summary']) )
+					$item['description'] = $item['summary'];
+				if ( isset($item['atom_content']))
+					$item['content']['encoded'] = $item['atom_content'];
+
+				$this->items[$i] = $item;
+			}
+		}
+		elseif ( $this->is_rss() ) {
+			$this->channel['tagline'] = $this->channel['description'];
+			for ( $i = 0; $i < count($this->items); $i++) {
+				$item = $this->items[$i];
+				if ( isset($item['description']))
+					$item['summary'] = $item['description'];
+				if ( isset($item['content']['encoded'] ) )
+					$item['atom_content'] = $item['content']['encoded'];
+
+				$this->items[$i] = $item;
+			}
+		}
+	}
+
+	function is_rss () {
+		if ( $this->feed_type == RSS ) {
+			return $this->feed_version;
+		}
+		else {
+			return false;
+		}
+	}
+
+	function is_atom() {
+		if ( $this->feed_type == ATOM ) {
+			return $this->feed_version;
+		}
+		else {
+			return false;
+		}
+	}
+
+	function map_attrs($k, $v) {
+		return "$k=\"$v\"";
+	}
+
+	function error( $errormsg, $lvl = E_USER_WARNING ) {
+		// append PHP's error message if track_errors enabled
+		if ( isset($php_errormsg) ) {
+			$errormsg .= " ($php_errormsg)";
+		}
+		if ( MAGPIE_DEBUG ) {
+			trigger_error( $errormsg, $lvl);
+		} else {
+			error_log( $errormsg, 0);
+		}
+	}
+
+}
+
Index: www/wp-includes/customize/class-wp-customize-nav-menu-auto-add-control.php
===================================================================
--- www/wp-includes/customize/class-wp-customize-nav-menu-auto-add-control.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Nav_Menu_Auto_Add_Control.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/json/Services_JSON_Error.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/json/Services_JSON_Error.php	(revision )
+++ www/wp-includes/autoload/json/Services_JSON_Error.php	(revision )
@@ -0,0 +1,33 @@
+<?php
+
+if (class_exists('PEAR_Error')) {
+
+    class Services_JSON_Error extends PEAR_Error
+    {
+        function __construct($message = 'unknown error', $code = null,
+                                     $mode = null, $options = null, $userinfo = null)
+        {
+            parent::PEAR_Error($message, $code, $mode, $options, $userinfo);
+        }
+
+    }
+
+} else {
+
+    /**
+     * @todo Ultimately, this class shall be descended from PEAR_Error
+     */
+    class Services_JSON_Error
+    {
+	    /**
+	     * PHP5 constructor.
+	     */
+        function __construct( $message = 'unknown error', $code = null,
+                                     $mode = null, $options = null, $userinfo = null )
+        {
+
+        }
+
+    }
+    
+}
\ No newline at end of file
Index: www/wp-includes/Requests/Exception/HTTP/406.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/406.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_406.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/includes/class-theme-installer-skin.php
===================================================================
--- www/wp-admin/includes/class-theme-installer-skin.php	(revision 38565)
+++ www/wp-admin/autoload/upgrader/Theme_Installer_Skin.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-customize-manager.php
===================================================================
--- www/wp-includes/class-wp-customize-manager.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Manager.php	(revision )
@@ -205,42 +205,7 @@
 	 * @since 3.4.0
 	 */
 	public function __construct() {
-		require_once( ABSPATH . WPINC . '/class-wp-customize-setting.php' );
-		require_once( ABSPATH . WPINC . '/class-wp-customize-panel.php' );
-		require_once( ABSPATH . WPINC . '/class-wp-customize-section.php' );
-		require_once( ABSPATH . WPINC . '/class-wp-customize-control.php' );
 
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-color-control.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-media-control.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-upload-control.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-image-control.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-background-image-control.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-cropped-image-control.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-site-icon-control.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-header-image-control.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-theme-control.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-widget-area-customize-control.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-widget-form-customize-control.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-control.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-item-control.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-location-control.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-name-control.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-auto-add-control.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-new-menu-control.php' );
-
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menus-panel.php' );
-
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-themes-section.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-sidebar-section.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-section.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-new-menu-section.php' );
-
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-filter-setting.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-header-image-setting.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-background-image-setting.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-item-setting.php' );
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-setting.php' );
-
 		/**
 		 * Filters the core Customizer components to load.
 		 *
@@ -258,16 +223,13 @@
 		 */
 		$components = apply_filters( 'customize_loaded_components', $this->components, $this );
 
-		require_once( ABSPATH . WPINC . '/customize/class-wp-customize-selective-refresh.php' );
 		$this->selective_refresh = new WP_Customize_Selective_Refresh( $this );
 
 		if ( in_array( 'widgets', $components, true ) ) {
-			require_once( ABSPATH . WPINC . '/class-wp-customize-widgets.php' );
 			$this->widgets = new WP_Customize_Widgets( $this );
 		}
 
 		if ( in_array( 'nav_menus', $components, true ) ) {
-			require_once( ABSPATH . WPINC . '/class-wp-customize-nav-menus.php' );
 			$this->nav_menus = new WP_Customize_Nav_Menus( $this );
 		}
 
Index: www/wp-includes/class-oembed.php
===================================================================
--- www/wp-includes/class-oembed.php	(revision 38565)
+++ www/wp-includes/autoload/embed/WP_oEmbed.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/post.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/post.php	(revision 38565)
+++ www/wp-includes/post.php	(revision 38565)
@@ -1,6072 +0,0 @@
-<?php
-/**
- * Core Post API
- *
- * @package WordPress
- * @subpackage Post
- */
-
-//
-// Post Type Registration
-//
-
-/**
- * Creates the initial post types when 'init' action is fired.
- *
- * See {@see 'init'}.
- *
- * @since 2.9.0
- */
-function create_initial_post_types() {
-	register_post_type( 'post', array(
-		'labels' => array(
-			'name_admin_bar' => _x( 'Post', 'add new from admin bar' ),
-		),
-		'public'  => true,
-		'_builtin' => true, /* internal use only. don't use this when registering your own post type. */
-		'_edit_link' => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */
-		'capability_type' => 'post',
-		'map_meta_cap' => true,
-		'menu_position' => 5,
-		'hierarchical' => false,
-		'rewrite' => false,
-		'query_var' => false,
-		'delete_with_user' => true,
-		'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'post-formats' ),
-	) );
-
-	register_post_type( 'page', array(
-		'labels' => array(
-			'name_admin_bar' => _x( 'Page', 'add new from admin bar' ),
-		),
-		'public' => true,
-		'publicly_queryable' => false,
-		'_builtin' => true, /* internal use only. don't use this when registering your own post type. */
-		'_edit_link' => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */
-		'capability_type' => 'page',
-		'map_meta_cap' => true,
-		'menu_position' => 20,
-		'hierarchical' => true,
-		'rewrite' => false,
-		'query_var' => false,
-		'delete_with_user' => true,
-		'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'page-attributes', 'custom-fields', 'comments', 'revisions' ),
-	) );
-
-	register_post_type( 'attachment', array(
-		'labels' => array(
-			'name' => _x('Media', 'post type general name'),
-			'name_admin_bar' => _x( 'Media', 'add new from admin bar' ),
-			'add_new' => _x( 'Add New', 'add new media' ),
- 			'edit_item' => __( 'Edit Media' ),
- 			'view_item' => __( 'View Attachment Page' ),
-		),
-		'public' => true,
-		'show_ui' => true,
-		'_builtin' => true, /* internal use only. don't use this when registering your own post type. */
-		'_edit_link' => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */
-		'capability_type' => 'post',
-		'capabilities' => array(
-			'create_posts' => 'upload_files',
-		),
-		'map_meta_cap' => true,
-		'hierarchical' => false,
-		'rewrite' => false,
-		'query_var' => false,
-		'show_in_nav_menus' => false,
-		'delete_with_user' => true,
-		'supports' => array( 'title', 'author', 'comments' ),
-	) );
-	add_post_type_support( 'attachment:audio', 'thumbnail' );
-	add_post_type_support( 'attachment:video', 'thumbnail' );
-
-	register_post_type( 'revision', array(
-		'labels' => array(
-			'name' => __( 'Revisions' ),
-			'singular_name' => __( 'Revision' ),
-		),
-		'public' => false,
-		'_builtin' => true, /* internal use only. don't use this when registering your own post type. */
-		'_edit_link' => 'revision.php?revision=%d', /* internal use only. don't use this when registering your own post type. */
-		'capability_type' => 'post',
-		'map_meta_cap' => true,
-		'hierarchical' => false,
-		'rewrite' => false,
-		'query_var' => false,
-		'can_export' => false,
-		'delete_with_user' => true,
-		'supports' => array( 'author' ),
-	) );
-
-	register_post_type( 'nav_menu_item', array(
-		'labels' => array(
-			'name' => __( 'Navigation Menu Items' ),
-			'singular_name' => __( 'Navigation Menu Item' ),
-		),
-		'public' => false,
-		'_builtin' => true, /* internal use only. don't use this when registering your own post type. */
-		'hierarchical' => false,
-		'rewrite' => false,
-		'delete_with_user' => false,
-		'query_var' => false,
-	) );
-
-	register_post_status( 'publish', array(
-		'label'       => _x( 'Published', 'post status' ),
-		'public'      => true,
-		'_builtin'    => true, /* internal use only. */
-		'label_count' => _n_noop( 'Published <span class="count">(%s)</span>', 'Published <span class="count">(%s)</span>' ),
-	) );
-
-	register_post_status( 'future', array(
-		'label'       => _x( 'Scheduled', 'post status' ),
-		'protected'   => true,
-		'_builtin'    => true, /* internal use only. */
-		'label_count' => _n_noop('Scheduled <span class="count">(%s)</span>', 'Scheduled <span class="count">(%s)</span>' ),
-	) );
-
-	register_post_status( 'draft', array(
-		'label'       => _x( 'Draft', 'post status' ),
-		'protected'   => true,
-		'_builtin'    => true, /* internal use only. */
-		'label_count' => _n_noop( 'Draft <span class="count">(%s)</span>', 'Drafts <span class="count">(%s)</span>' ),
-	) );
-
-	register_post_status( 'pending', array(
-		'label'       => _x( 'Pending', 'post status' ),
-		'protected'   => true,
-		'_builtin'    => true, /* internal use only. */
-		'label_count' => _n_noop( 'Pending <span class="count">(%s)</span>', 'Pending <span class="count">(%s)</span>' ),
-	) );
-
-	register_post_status( 'private', array(
-		'label'       => _x( 'Private', 'post status' ),
-		'private'     => true,
-		'_builtin'    => true, /* internal use only. */
-		'label_count' => _n_noop( 'Private <span class="count">(%s)</span>', 'Private <span class="count">(%s)</span>' ),
-	) );
-
-	register_post_status( 'trash', array(
-		'label'       => _x( 'Trash', 'post status' ),
-		'internal'    => true,
-		'_builtin'    => true, /* internal use only. */
-		'label_count' => _n_noop( 'Trash <span class="count">(%s)</span>', 'Trash <span class="count">(%s)</span>' ),
-		'show_in_admin_status_list' => true,
-	) );
-
-	register_post_status( 'auto-draft', array(
-		'label'    => 'auto-draft',
-		'internal' => true,
-		'_builtin' => true, /* internal use only. */
-	) );
-
-	register_post_status( 'inherit', array(
-		'label'    => 'inherit',
-		'internal' => true,
-		'_builtin' => true, /* internal use only. */
-		'exclude_from_search' => false,
-	) );
-}
-
-/**
- * Retrieve attached file path based on attachment ID.
- *
- * By default the path will go through the 'get_attached_file' filter, but
- * passing a true to the $unfiltered argument of get_attached_file() will
- * return the file path unfiltered.
- *
- * The function works by getting the single post meta name, named
- * '_wp_attached_file' and returning it. This is a convenience function to
- * prevent looking up the meta name and provide a mechanism for sending the
- * attached filename through a filter.
- *
- * @since 2.0.0
- *
- * @param int  $attachment_id Attachment ID.
- * @param bool $unfiltered    Optional. Whether to apply filters. Default false.
- * @return string|false The file path to where the attached file should be, false otherwise.
- */
-function get_attached_file( $attachment_id, $unfiltered = false ) {
-	$file = get_post_meta( $attachment_id, '_wp_attached_file', true );
-
-	// If the file is relative, prepend upload dir.
-	if ( $file && 0 !== strpos( $file, '/' ) && ! preg_match( '|^.:\\\|', $file ) && ( ( $uploads = wp_get_upload_dir() ) && false === $uploads['error'] ) ) {
-		$file = $uploads['basedir'] . "/$file";
-	}
-
-	if ( $unfiltered ) {
-		return $file;
-	}
-
-	/**
-	 * Filters the attached file based on the given ID.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param string $file          Path to attached file.
-	 * @param int    $attachment_id Attachment ID.
-	 */
-	return apply_filters( 'get_attached_file', $file, $attachment_id );
-}
-
-/**
- * Update attachment file path based on attachment ID.
- *
- * Used to update the file path of the attachment, which uses post meta name
- * '_wp_attached_file' to store the path of the attachment.
- *
- * @since 2.1.0
- *
- * @param int    $attachment_id Attachment ID.
- * @param string $file          File path for the attachment.
- * @return bool True on success, false on failure.
- */
-function update_attached_file( $attachment_id, $file ) {
-	if ( !get_post( $attachment_id ) )
-		return false;
-
-	/**
-	 * Filters the path to the attached file to update.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param string $file          Path to the attached file to update.
-	 * @param int    $attachment_id Attachment ID.
-	 */
-	$file = apply_filters( 'update_attached_file', $file, $attachment_id );
-
-	if ( $file = _wp_relative_upload_path( $file ) )
-		return update_post_meta( $attachment_id, '_wp_attached_file', $file );
-	else
-		return delete_post_meta( $attachment_id, '_wp_attached_file' );
-}
-
-/**
- * Return relative path to an uploaded file.
- *
- * The path is relative to the current upload dir.
- *
- * @since 2.9.0
- *
- * @param string $path Full path to the file.
- * @return string Relative path on success, unchanged path on failure.
- */
-function _wp_relative_upload_path( $path ) {
-	$new_path = $path;
-
-	$uploads = wp_get_upload_dir();
-	if ( 0 === strpos( $new_path, $uploads['basedir'] ) ) {
-			$new_path = str_replace( $uploads['basedir'], '', $new_path );
-			$new_path = ltrim( $new_path, '/' );
-	}
-
-	/**
-	 * Filters the relative path to an uploaded file.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param string $new_path Relative path to the file.
-	 * @param string $path     Full path to the file.
-	 */
-	return apply_filters( '_wp_relative_upload_path', $new_path, $path );
-}
-
-/**
- * Retrieve all children of the post parent ID.
- *
- * Normally, without any enhancements, the children would apply to pages. In the
- * context of the inner workings of WordPress, pages, posts, and attachments
- * share the same table, so therefore the functionality could apply to any one
- * of them. It is then noted that while this function does not work on posts, it
- * does not mean that it won't work on posts. It is recommended that you know
- * what context you wish to retrieve the children of.
- *
- * Attachments may also be made the child of a post, so if that is an accurate
- * statement (which needs to be verified), it would then be possible to get
- * all of the attachments for a post. Attachments have since changed since
- * version 2.5, so this is most likely inaccurate, but serves generally as an
- * example of what is possible.
- *
- * The arguments listed as defaults are for this function and also of the
- * get_posts() function. The arguments are combined with the get_children defaults
- * and are then passed to the get_posts() function, which accepts additional arguments.
- * You can replace the defaults in this function, listed below and the additional
- * arguments listed in the get_posts() function.
- *
- * The 'post_parent' is the most important argument and important attention
- * needs to be paid to the $args parameter. If you pass either an object or an
- * integer (number), then just the 'post_parent' is grabbed and everything else
- * is lost. If you don't specify any arguments, then it is assumed that you are
- * in The Loop and the post parent will be grabbed for from the current post.
- *
- * The 'post_parent' argument is the ID to get the children. The 'numberposts'
- * is the amount of posts to retrieve that has a default of '-1', which is
- * used to get all of the posts. Giving a number higher than 0 will only
- * retrieve that amount of posts.
- *
- * The 'post_type' and 'post_status' arguments can be used to choose what
- * criteria of posts to retrieve. The 'post_type' can be anything, but WordPress
- * post types are 'post', 'pages', and 'attachments'. The 'post_status'
- * argument will accept any post status within the write administration panels.
- *
- * @since 2.0.0
- *
- * @see get_posts()
- * @todo Check validity of description.
- *
- * @global WP_Post $post
- *
- * @param mixed  $args   Optional. User defined arguments for replacing the defaults. Default empty.
- * @param string $output Optional. Constant for return type. Accepts OBJECT, ARRAY_A, ARRAY_N.
- *                       Default OBJECT.
- * @return array Array of children, where the type of each element is determined by $output parameter.
- *               Empty array on failure.
- */
-function get_children( $args = '', $output = OBJECT ) {
-	$kids = array();
-	if ( empty( $args ) ) {
-		if ( isset( $GLOBALS['post'] ) ) {
-			$args = array('post_parent' => (int) $GLOBALS['post']->post_parent );
-		} else {
-			return $kids;
-		}
-	} elseif ( is_object( $args ) ) {
-		$args = array('post_parent' => (int) $args->post_parent );
-	} elseif ( is_numeric( $args ) ) {
-		$args = array('post_parent' => (int) $args);
-	}
-
-	$defaults = array(
-		'numberposts' => -1, 'post_type' => 'any',
-		'post_status' => 'any', 'post_parent' => 0,
-	);
-
-	$r = wp_parse_args( $args, $defaults );
-
-	$children = get_posts( $r );
-
-	if ( ! $children )
-		return $kids;
-
-	if ( ! empty( $r['fields'] ) )
-		return $children;
-
-	update_post_cache($children);
-
-	foreach ( $children as $key => $child )
-		$kids[$child->ID] = $children[$key];
-
-	if ( $output == OBJECT ) {
-		return $kids;
-	} elseif ( $output == ARRAY_A ) {
-		$weeuns = array();
-		foreach ( (array) $kids as $kid ) {
-			$weeuns[$kid->ID] = get_object_vars($kids[$kid->ID]);
-		}
-		return $weeuns;
-	} elseif ( $output == ARRAY_N ) {
-		$babes = array();
-		foreach ( (array) $kids as $kid ) {
-			$babes[$kid->ID] = array_values(get_object_vars($kids[$kid->ID]));
-		}
-		return $babes;
-	} else {
-		return $kids;
-	}
-}
-
-/**
- * Get extended entry info (<!--more-->).
- *
- * There should not be any space after the second dash and before the word
- * 'more'. There can be text or space(s) after the word 'more', but won't be
- * referenced.
- *
- * The returned array has 'main', 'extended', and 'more_text' keys. Main has the text before
- * the `<!--more-->`. The 'extended' key has the content after the
- * `<!--more-->` comment. The 'more_text' key has the custom "Read More" text.
- *
- * @since 1.0.0
- *
- * @param string $post Post content.
- * @return array Post before ('main'), after ('extended'), and custom read more ('more_text').
- */
-function get_extended( $post ) {
-	//Match the new style more links.
-	if ( preg_match('/<!--more(.*?)?-->/', $post, $matches) ) {
-		list($main, $extended) = explode($matches[0], $post, 2);
-		$more_text = $matches[1];
-	} else {
-		$main = $post;
-		$extended = '';
-		$more_text = '';
-	}
-
-	//  leading and trailing whitespace.
-	$main = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $main);
-	$extended = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $extended);
-	$more_text = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $more_text);
-
-	return array( 'main' => $main, 'extended' => $extended, 'more_text' => $more_text );
-}
-
-/**
- * Retrieves post data given a post ID or post object.
- *
- * See sanitize_post() for optional $filter values. Also, the parameter
- * `$post`, must be given as a variable, since it is passed by reference.
- *
- * @since 1.5.1
- *
- * @global WP_Post $post
- *
- * @param int|WP_Post|null $post   Optional. Post ID or post object. Defaults to global $post.
- * @param string           $output Optional, default is Object. Accepts OBJECT, ARRAY_A, or ARRAY_N.
- *                                 Default OBJECT.
- * @param string           $filter Optional. Type of filter to apply. Accepts 'raw', 'edit', 'db',
- *                                 or 'display'. Default 'raw'.
- * @return WP_Post|array|null Type corresponding to $output on success or null on failure.
- *                            When $output is OBJECT, a `WP_Post` instance is returned.
- */
-function get_post( $post = null, $output = OBJECT, $filter = 'raw' ) {
-	if ( empty( $post ) && isset( $GLOBALS['post'] ) )
-		$post = $GLOBALS['post'];
-
-	if ( $post instanceof WP_Post ) {
-		$_post = $post;
-	} elseif ( is_object( $post ) ) {
-		if ( empty( $post->filter ) ) {
-			$_post = sanitize_post( $post, 'raw' );
-			$_post = new WP_Post( $_post );
-		} elseif ( 'raw' == $post->filter ) {
-			$_post = new WP_Post( $post );
-		} else {
-			$_post = WP_Post::get_instance( $post->ID );
-		}
-	} else {
-		$_post = WP_Post::get_instance( $post );
-	}
-
-	if ( ! $_post )
-		return null;
-
-	$_post = $_post->filter( $filter );
-
-	if ( $output == ARRAY_A )
-		return $_post->to_array();
-	elseif ( $output == ARRAY_N )
-		return array_values( $_post->to_array() );
-
-	return $_post;
-}
-
-/**
- * Retrieve ancestors of a post.
- *
- * @since 2.5.0
- *
- * @param int|WP_Post $post Post ID or post object.
- * @return array Ancestor IDs or empty array if none are found.
- */
-function get_post_ancestors( $post ) {
-	$post = get_post( $post );
-
-	if ( ! $post || empty( $post->post_parent ) || $post->post_parent == $post->ID )
-		return array();
-
-	$ancestors = array();
-
-	$id = $ancestors[] = $post->post_parent;
-
-	while ( $ancestor = get_post( $id ) ) {
-		// Loop detection: If the ancestor has been seen before, break.
-		if ( empty( $ancestor->post_parent ) || ( $ancestor->post_parent == $post->ID ) || in_array( $ancestor->post_parent, $ancestors ) )
-			break;
-
-		$id = $ancestors[] = $ancestor->post_parent;
-	}
-
-	return $ancestors;
-}
-
-/**
- * Retrieve data from a post field based on Post ID.
- *
- * Examples of the post field will be, 'post_type', 'post_status', 'post_content',
- * etc and based off of the post object property or key names.
- *
- * The context values are based off of the taxonomy filter functions and
- * supported values are found within those functions.
- *
- * @since 2.3.0
- * @since 4.5.0 The `$post` parameter was made optional.
- *
- * @see sanitize_post_field()
- *
- * @param string      $field   Post field name.
- * @param int|WP_Post $post    Optional. Post ID or post object. Defaults to current post.
- * @param string      $context Optional. How to filter the field. Accepts 'raw', 'edit', 'db',
- *                             or 'display'. Default 'display'.
- * @return string The value of the post field on success, empty string on failure.
- */
-function get_post_field( $field, $post = null, $context = 'display' ) {
-	$post = get_post( $post );
-
-	if ( !$post )
-		return '';
-
-	if ( !isset($post->$field) )
-		return '';
-
-	return sanitize_post_field($field, $post->$field, $post->ID, $context);
-}
-
-/**
- * Retrieve the mime type of an attachment based on the ID.
- *
- * This function can be used with any post type, but it makes more sense with
- * attachments.
- *
- * @since 2.0.0
- *
- * @param int|WP_Post $ID Optional. Post ID or post object. Default empty.
- * @return string|false The mime type on success, false on failure.
- */
-function get_post_mime_type( $ID = '' ) {
-	$post = get_post($ID);
-
-	if ( is_object($post) )
-		return $post->post_mime_type;
-
-	return false;
-}
-
-/**
- * Retrieve the post status based on the Post ID.
- *
- * If the post ID is of an attachment, then the parent post status will be given
- * instead.
- *
- * @since 2.0.0
- *
- * @param int|WP_Post $ID Optional. Post ID or post object. Default empty.
- * @return string|false Post status on success, false on failure.
- */
-function get_post_status( $ID = '' ) {
-	$post = get_post($ID);
-
-	if ( !is_object($post) )
-		return false;
-
-	if ( 'attachment' == $post->post_type ) {
-		if ( 'private' == $post->post_status )
-			return 'private';
-
-		// Unattached attachments are assumed to be published.
-		if ( ( 'inherit' == $post->post_status ) && ( 0 == $post->post_parent) )
-			return 'publish';
-
-		// Inherit status from the parent.
-		if ( $post->post_parent && ( $post->ID != $post->post_parent ) ) {
-			$parent_post_status = get_post_status( $post->post_parent );
-			if ( 'trash' == $parent_post_status ) {
-				return get_post_meta( $post->post_parent, '_wp_trash_meta_status', true );
-			} else {
-				return $parent_post_status;
-			}
-		}
-
-	}
-
-	/**
-	 * Filters the post status.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param string  $post_status The post status.
-	 * @param WP_Post $post        The post object.
-	 */
-	return apply_filters( 'get_post_status', $post->post_status, $post );
-}
-
-/**
- * Retrieve all of the WordPress supported post statuses.
- *
- * Posts have a limited set of valid status values, this provides the
- * post_status values and descriptions.
- *
- * @since 2.5.0
- *
- * @return array List of post statuses.
- */
-function get_post_statuses() {
-	$status = array(
-		'draft'   => __( 'Draft' ),
-		'pending' => __( 'Pending Review' ),
-		'private' => __( 'Private' ),
-		'publish' => __( 'Published' )
-	);
-
-	return $status;
-}
-
-/**
- * Retrieve all of the WordPress support page statuses.
- *
- * Pages have a limited set of valid status values, this provides the
- * post_status values and descriptions.
- *
- * @since 2.5.0
- *
- * @return array List of page statuses.
- */
-function get_page_statuses() {
-	$status = array(
-		'draft'   => __( 'Draft' ),
-		'private' => __( 'Private' ),
-		'publish' => __( 'Published' )
-	);
-
-	return $status;
-}
-
-/**
- * Register a post status. Do not use before init.
- *
- * A simple function for creating or modifying a post status based on the
- * parameters given. The function will accept an array (second optional
- * parameter), along with a string for the post status name.
- *
- * Arguments prefixed with an _underscore shouldn't be used by plugins and themes.
- *
- * @since 3.0.0
- * @global array $wp_post_statuses Inserts new post status object into the list
- *
- * @param string $post_status Name of the post status.
- * @param array|string $args {
- *     Optional. Array or string of post status arguments.
- *
- *     @type bool|string $label                     A descriptive name for the post status marked
- *                                                  for translation. Defaults to value of $post_status.
- *     @type bool|array  $label_count               Descriptive text to use for nooped plurals.
- *                                                  Default array of $label, twice
- *     @type bool        $exclude_from_search       Whether to exclude posts with this post status
- *                                                  from search results. Default is value of $internal.
- *     @type bool        $_builtin                  Whether the status is built-in. Core-use only.
- *                                                  Default false.
- *     @type bool        $public                    Whether posts of this status should be shown
- *                                                  in the front end of the site. Default false.
- *     @type bool        $internal                  Whether the status is for internal use only.
- *                                                  Default false.
- *     @type bool        $protected                 Whether posts with this status should be protected.
- *                                                  Default false.
- *     @type bool        $private                   Whether posts with this status should be private.
- *                                                  Default false.
- *     @type bool        $publicly_queryable        Whether posts with this status should be publicly-
- *                                                  queryable. Default is value of $public.
- *     @type bool        $show_in_admin_all_list    Whether to include posts in the edit listing for
- *                                                  their post type. Default is value of $internal.
- *     @type bool        $show_in_admin_status_list Show in the list of statuses with post counts at
- *                                                  the top of the edit listings,
- *                                                  e.g. All (12) | Published (9) | My Custom Status (2)
- *                                                  Default is value of $internal.
- * }
- * @return object
- */
-function register_post_status( $post_status, $args = array() ) {
-	global $wp_post_statuses;
-
-	if (!is_array($wp_post_statuses))
-		$wp_post_statuses = array();
-
-	// Args prefixed with an underscore are reserved for internal use.
-	$defaults = array(
-		'label' => false,
-		'label_count' => false,
-		'exclude_from_search' => null,
-		'_builtin' => false,
-		'public' => null,
-		'internal' => null,
-		'protected' => null,
-		'private' => null,
-		'publicly_queryable' => null,
-		'show_in_admin_status_list' => null,
-		'show_in_admin_all_list' => null,
-	);
-	$args = wp_parse_args($args, $defaults);
-	$args = (object) $args;
-
-	$post_status = sanitize_key($post_status);
-	$args->name = $post_status;
-
-	// Set various defaults.
-	if ( null === $args->public && null === $args->internal && null === $args->protected && null === $args->private )
-		$args->internal = true;
-
-	if ( null === $args->public  )
-		$args->public = false;
-
-	if ( null === $args->private  )
-		$args->private = false;
-
-	if ( null === $args->protected  )
-		$args->protected = false;
-
-	if ( null === $args->internal  )
-		$args->internal = false;
-
-	if ( null === $args->publicly_queryable )
-		$args->publicly_queryable = $args->public;
-
-	if ( null === $args->exclude_from_search )
-		$args->exclude_from_search = $args->internal;
-
-	if ( null === $args->show_in_admin_all_list )
-		$args->show_in_admin_all_list = !$args->internal;
-
-	if ( null === $args->show_in_admin_status_list )
-		$args->show_in_admin_status_list = !$args->internal;
-
-	if ( false === $args->label )
-		$args->label = $post_status;
-
-	if ( false === $args->label_count )
-		$args->label_count = array( $args->label, $args->label );
-
-	$wp_post_statuses[$post_status] = $args;
-
-	return $args;
-}
-
-/**
- * Retrieve a post status object by name.
- *
- * @since 3.0.0
- *
- * @global array $wp_post_statuses List of post statuses.
- *
- * @see register_post_status()
- *
- * @param string $post_status The name of a registered post status.
- * @return object|null A post status object.
- */
-function get_post_status_object( $post_status ) {
-	global $wp_post_statuses;
-
-	if ( empty($wp_post_statuses[$post_status]) )
-		return null;
-
-	return $wp_post_statuses[$post_status];
-}
-
-/**
- * Get a list of post statuses.
- *
- * @since 3.0.0
- *
- * @global array $wp_post_statuses List of post statuses.
- *
- * @see register_post_status()
- *
- * @param array|string $args     Optional. Array or string of post status arguments to compare against
- *                               properties of the global `$wp_post_statuses objects`. Default empty array.
- * @param string       $output   Optional. The type of output to return, either 'names' or 'objects'. Default 'names'.
- * @param string       $operator Optional. The logical operation to perform. 'or' means only one element
- *                               from the array needs to match; 'and' means all elements must match.
- *                               Default 'and'.
- * @return array A list of post status names or objects.
- */
-function get_post_stati( $args = array(), $output = 'names', $operator = 'and' ) {
-	global $wp_post_statuses;
-
-	$field = ('names' == $output) ? 'name' : false;
-
-	return wp_filter_object_list($wp_post_statuses, $args, $operator, $field);
-}
-
-/**
- * Whether the post type is hierarchical.
- *
- * A false return value might also mean that the post type does not exist.
- *
- * @since 3.0.0
- *
- * @see get_post_type_object()
- *
- * @param string $post_type Post type name
- * @return bool Whether post type is hierarchical.
- */
-function is_post_type_hierarchical( $post_type ) {
-	if ( ! post_type_exists( $post_type ) )
-		return false;
-
-	$post_type = get_post_type_object( $post_type );
-	return $post_type->hierarchical;
-}
-
-/**
- * Check if a post type is registered.
- *
- * @since 3.0.0
- *
- * @see get_post_type_object()
- *
- * @param string $post_type Post type name.
- * @return bool Whether post type is registered.
- */
-function post_type_exists( $post_type ) {
-	return (bool) get_post_type_object( $post_type );
-}
-
-/**
- * Retrieves the post type of the current post or of a given post.
- *
- * @since 2.1.0
- *
- * @param int|WP_Post|null $post Optional. Post ID or post object. Default is global $post.
- * @return string|false          Post type on success, false on failure.
- */
-function get_post_type( $post = null ) {
-	if ( $post = get_post( $post ) )
-		return $post->post_type;
-
-	return false;
-}
-
-/**
- * Retrieves a post type object by name.
- *
- * @since 3.0.0
- * @since 4.6.0 Object returned is now an instance of WP_Post_Type.
- *
- * @global array $wp_post_types List of post types.
- *
- * @see register_post_type()
- *
- * @param string $post_type The name of a registered post type.
- * @return WP_Post_Type|null WP_Post_Type object if it exists, null otherwise.
- */
-function get_post_type_object( $post_type ) {
-	global $wp_post_types;
-
-	if ( ! is_scalar( $post_type ) || empty( $wp_post_types[ $post_type ] ) ) {
-		return null;
-	}
-
-	return $wp_post_types[ $post_type ];
-}
-
-/**
- * Get a list of all registered post type objects.
- *
- * @since 2.9.0
- *
- * @global array $wp_post_types List of post types.
- *
- * @see register_post_type() for accepted arguments.
- *
- * @param array|string $args     Optional. An array of key => value arguments to match against
- *                               the post type objects. Default empty array.
- * @param string       $output   Optional. The type of output to return. Accepts post type 'names'
- *                               or 'objects'. Default 'names'.
- * @param string       $operator Optional. The logical operation to perform. 'or' means only one
- *                               element from the array needs to match; 'and' means all elements
- *                               must match; 'not' means no elements may match. Default 'and'.
- * @return array A list of post type names or objects.
- */
-function get_post_types( $args = array(), $output = 'names', $operator = 'and' ) {
-	global $wp_post_types;
-
-	$field = ('names' == $output) ? 'name' : false;
-
-	return wp_filter_object_list($wp_post_types, $args, $operator, $field);
-}
-
-/**
- * Registers a post type.
- *
- * Note: Post type registrations should not be hooked before the
- * {@see 'init'} action. Also, any taxonomy connections should be
- * registered via the `$taxonomies` argument to ensure consistency
- * when hooks such as {@see 'parse_query'} or {@see 'pre_get_posts'}
- * are used.
- *
- * Post types can support any number of built-in core features such
- * as meta boxes, custom fields, post thumbnails, post statuses,
- * comments, and more. See the `$supports` argument for a complete
- * list of supported features.
- *
- * @since 2.9.0
- * @since 3.0.0 The `show_ui` argument is now enforced on the new post screen.
- * @since 4.4.0 The `show_ui` argument is now enforced on the post type listing
- *              screen and post editing screen.
- * @since 4.6.0 Post type object returned is now an instance of WP_Post_Type.
- *
- * @global array $wp_post_types List of post types.
- *
- * @param string $post_type Post type key. Must not exceed 20 characters and may
- *                          only contain lowercase alphanumeric characters, dashes,
- *                          and underscores. See sanitize_key().
- * @param array|string $args {
- *     Array or string of arguments for registering a post type.
- *
- *     @type string      $label                Name of the post type shown in the menu. Usually plural.
- *                                             Default is value of $labels['name'].
- *     @type array       $labels               An array of labels for this post type. If not set, post
- *                                             labels are inherited for non-hierarchical types and page
- *                                             labels for hierarchical ones. See get_post_type_labels() for a full
- *                                             list of supported labels.
- *     @type string      $description          A short descriptive summary of what the post type is.
- *                                             Default empty.
- *     @type bool        $public               Whether a post type is intended for use publicly either via
- *                                             the admin interface or by front-end users. While the default
- *                                             settings of $exclude_from_search, $publicly_queryable, $show_ui,
- *                                             and $show_in_nav_menus are inherited from public, each does not
- *                                             rely on this relationship and controls a very specific intention.
- *                                             Default false.
- *     @type bool        $hierarchical         Whether the post type is hierarchical (e.g. page). Default false.
- *     @type bool        $exclude_from_search  Whether to exclude posts with this post type from front end search
- *                                             results. Default is the opposite value of $public.
- *     @type bool        $publicly_queryable   Whether queries can be performed on the front end for the post type
- *                                             as part of parse_request(). Endpoints would include:
- *                                             * ?post_type={post_type_key}
- *                                             * ?{post_type_key}={single_post_slug}
- *                                             * ?{post_type_query_var}={single_post_slug}
- *                                             If not set, the default is inherited from $public.
- *     @type bool        $show_ui              Whether to generate and allow a UI for managing this post type in the
- *                                             admin. Default is value of $public.
- *     @type bool        $show_in_menu         Where to show the post type in the admin menu. To work, $show_ui
- *                                             must be true. If true, the post type is shown in its own top level
- *                                             menu. If false, no menu is shown. If a string of an existing top
- *                                             level menu (eg. 'tools.php' or 'edit.php?post_type=page'), the post
- *                                             type will be placed as a sub-menu of that.
- *                                             Default is value of $show_ui.
- *     @type bool        $show_in_nav_menus    Makes this post type available for selection in navigation menus.
- *                                             Default is value $public.
- *     @type bool        $show_in_admin_bar    Makes this post type available via the admin bar. Default is value
- *                                             of $show_in_menu.
- *     @type int         $menu_position        The position in the menu order the post type should appear. To work,
- *                                             $show_in_menu must be true. Default null (at the bottom).
- *     @type string      $menu_icon            The url to the icon to be used for this menu. Pass a base64-encoded
- *                                             SVG using a data URI, which will be colored to match the color scheme
- *                                             -- this should begin with 'data:image/svg+xml;base64,'. Pass the name
- *                                             of a Dashicons helper class to use a font icon, e.g.
- *                                             'dashicons-chart-pie'. Pass 'none' to leave div.wp-menu-image empty
- *                                             so an icon can be added via CSS. Defaults to use the posts icon.
- *     @type string      $capability_type      The string to use to build the read, edit, and delete capabilities.
- *                                             May be passed as an array to allow for alternative plurals when using
- *                                             this argument as a base to construct the capabilities, e.g.
- *                                             array('story', 'stories'). Default 'post'.
- *     @type array       $capabilities         Array of capabilities for this post type. $capability_type is used
- *                                             as a base to construct capabilities by default.
- *                                             See get_post_type_capabilities().
- *     @type bool        $map_meta_cap         Whether to use the internal default meta capability handling.
- *                                             Default false.
- *     @type array       $supports             Core feature(s) the post type supports. Serves as an alias for calling
- *                                             add_post_type_support() directly. Core features include 'title',
- *                                             'editor', 'comments', 'revisions', 'trackbacks', 'author', 'excerpt',
- *                                             'page-attributes', 'thumbnail', 'custom-fields', and 'post-formats'.
- *                                             Additionally, the 'revisions' feature dictates whether the post type
- *                                             will store revisions, and the 'comments' feature dictates whether the
- *                                             comments count will show on the edit screen. Defaults is an array
- *                                             containing 'title' and 'editor'.
- *     @type callable    $register_meta_box_cb Provide a callback function that sets up the meta boxes for the
- *                                             edit form. Do remove_meta_box() and add_meta_box() calls in the
- *                                             callback. Default null.
- *     @type array       $taxonomies           An array of taxonomy identifiers that will be registered for the
- *                                             post type. Taxonomies can be registered later with register_taxonomy()
- *                                             or register_taxonomy_for_object_type().
- *                                             Default empty array.
- *     @type bool|string $has_archive          Whether there should be post type archives, or if a string, the
- *                                             archive slug to use. Will generate the proper rewrite rules if
- *                                             $rewrite is enabled. Default false.
- *     @type bool|array  $rewrite              {
- *         Triggers the handling of rewrites for this post type. To prevent rewrite, set to false.
- *         Defaults to true, using $post_type as slug. To specify rewrite rules, an array can be
- *         passed with any of these keys:
- *
- *         @type string $slug       Customize the permastruct slug. Defaults to $post_type key.
- *         @type bool   $with_front Whether the permastruct should be prepended with WP_Rewrite::$front.
- *                                  Default true.
- *         @type bool   $feeds      Whether the feed permastruct should be built for this post type.
- *                                  Default is value of $has_archive.
- *         @type bool   $pages      Whether the permastruct should provide for pagination. Default true.
- *         @type const  $ep_mask    Endpoint mask to assign. If not specified and permalink_epmask is set,
- *                                  inherits from $permalink_epmask. If not specified and permalink_epmask
- *                                  is not set, defaults to EP_PERMALINK.
- *     }
- *     @type string|bool $query_var            Sets the query_var key for this post type. Defaults to $post_type
- *                                             key. If false, a post type cannot be loaded at
- *                                             ?{query_var}={post_slug}. If specified as a string, the query
- *                                             ?{query_var_string}={post_slug} will be valid.
- *     @type bool        $can_export           Whether to allow this post type to be exported. Default true.
- *     @type bool        $delete_with_user     Whether to delete posts of this type when deleting a user. If true,
- *                                             posts of this type belonging to the user will be moved to trash
- *                                             when then user is deleted. If false, posts of this type belonging
- *                                             to the user will *not* be trashed or deleted. If not set (the default),
- *                                             posts are trashed if post_type_supports('author'). Otherwise posts
- *                                             are not trashed or deleted. Default null.
- *     @type bool        $_builtin             FOR INTERNAL USE ONLY! True if this post type is a native or
- *                                             "built-in" post_type. Default false.
- *     @type string      $_edit_link           FOR INTERNAL USE ONLY! URL segment to use for edit link of
- *                                             this post type. Default 'post.php?post=%d'.
- * }
- * @return WP_Post_Type|WP_Error The registered post type object, or an error object.
- */
-function register_post_type( $post_type, $args = array() ) {
-	global $wp_post_types;
-
-	if ( ! is_array( $wp_post_types ) ) {
-		$wp_post_types = array();
-	}
-
-	// Sanitize post type name
-	$post_type = sanitize_key( $post_type );
-
-	if ( empty( $post_type ) || strlen( $post_type ) > 20 ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Post type names must be between 1 and 20 characters in length.' ), '4.2.0' );
-		return new WP_Error( 'post_type_length_invalid', __( 'Post type names must be between 1 and 20 characters in length.' ) );
-	}
-
-	$post_type_object = new WP_Post_Type( $post_type, $args );
-	$post_type_object->add_supports();
-	$post_type_object->add_rewrite_rules();
-	$post_type_object->register_meta_boxes();
-
-	$wp_post_types[ $post_type ] = $post_type_object;
-
-	$post_type_object->add_hooks();
-	$post_type_object->register_taxonomies();
-
-	/**
-	 * Fires after a post type is registered.
-	 *
-	 * @since 3.3.0
-	 * @since 4.6.0 Converted the `$post_type` parameter to accept a WP_Post_Type object.
-	 *
-	 * @param string       $post_type        Post type.
-	 * @param WP_Post_Type $post_type_object Arguments used to register the post type.
-	 */
-	do_action( 'registered_post_type', $post_type, $post_type_object );
-
-	return $post_type_object;
-}
-
-/**
- * Unregisters a post type.
- *
- * Can not be used to unregister built-in post types.
- *
- * @since 4.5.0
- *
- * @global array $wp_post_types List of post types.
- *
- * @param string $post_type Post type to unregister.
- * @return bool|WP_Error True on success, WP_Error on failure or if the post type doesn't exist.
- */
-function unregister_post_type( $post_type ) {
-	global $wp_post_types;
-
-	if ( ! post_type_exists( $post_type ) ) {
-		return new WP_Error( 'invalid_post_type', __( 'Invalid post type.' ) );
-	}
-
-	$post_type_object = get_post_type_object( $post_type );
-
-	// Do not allow unregistering internal post types.
-	if ( $post_type_object->_builtin ) {
-		return new WP_Error( 'invalid_post_type', __( 'Unregistering a built-in post type is not allowed' ) );
-	}
-
-	$post_type_object->remove_supports();
-	$post_type_object->remove_rewrite_rules();
-	$post_type_object->unregister_meta_boxes();
-	$post_type_object->remove_hooks();
-	$post_type_object->unregister_taxonomies();
-
-	unset( $wp_post_types[ $post_type ] );
-
-	/**
-	 * Fires after a post type was unregistered.
-	 *
-	 * @since 4.5.0
-	 *
-	 * @param string $post_type Post type key.
-	 */
-	do_action( 'unregistered_post_type', $post_type );
-
-	return true;
-}
-
-/**
- * Build an object with all post type capabilities out of a post type object
- *
- * Post type capabilities use the 'capability_type' argument as a base, if the
- * capability is not set in the 'capabilities' argument array or if the
- * 'capabilities' argument is not supplied.
- *
- * The capability_type argument can optionally be registered as an array, with
- * the first value being singular and the second plural, e.g. array('story, 'stories')
- * Otherwise, an 's' will be added to the value for the plural form. After
- * registration, capability_type will always be a string of the singular value.
- *
- * By default, seven keys are accepted as part of the capabilities array:
- *
- * - edit_post, read_post, and delete_post are meta capabilities, which are then
- *   generally mapped to corresponding primitive capabilities depending on the
- *   context, which would be the post being edited/read/deleted and the user or
- *   role being checked. Thus these capabilities would generally not be granted
- *   directly to users or roles.
- *
- * - edit_posts - Controls whether objects of this post type can be edited.
- * - edit_others_posts - Controls whether objects of this type owned by other users
- *   can be edited. If the post type does not support an author, then this will
- *   behave like edit_posts.
- * - publish_posts - Controls publishing objects of this post type.
- * - read_private_posts - Controls whether private objects can be read.
- *
- * These four primitive capabilities are checked in core in various locations.
- * There are also seven other primitive capabilities which are not referenced
- * directly in core, except in map_meta_cap(), which takes the three aforementioned
- * meta capabilities and translates them into one or more primitive capabilities
- * that must then be checked against the user or role, depending on the context.
- *
- * - read - Controls whether objects of this post type can be read.
- * - delete_posts - Controls whether objects of this post type can be deleted.
- * - delete_private_posts - Controls whether private objects can be deleted.
- * - delete_published_posts - Controls whether published objects can be deleted.
- * - delete_others_posts - Controls whether objects owned by other users can be
- *   can be deleted. If the post type does not support an author, then this will
- *   behave like delete_posts.
- * - edit_private_posts - Controls whether private objects can be edited.
- * - edit_published_posts - Controls whether published objects can be edited.
- *
- * These additional capabilities are only used in map_meta_cap(). Thus, they are
- * only assigned by default if the post type is registered with the 'map_meta_cap'
- * argument set to true (default is false).
- *
- * @since 3.0.0
- *
- * @see register_post_type()
- * @see map_meta_cap()
- *
- * @param object $args Post type registration arguments.
- * @return object object with all the capabilities as member variables.
- */
-function get_post_type_capabilities( $args ) {
-	if ( ! is_array( $args->capability_type ) )
-		$args->capability_type = array( $args->capability_type, $args->capability_type . 's' );
-
-	// Singular base for meta capabilities, plural base for primitive capabilities.
-	list( $singular_base, $plural_base ) = $args->capability_type;
-
-	$default_capabilities = array(
-		// Meta capabilities
-		'edit_post'          => 'edit_'         . $singular_base,
-		'read_post'          => 'read_'         . $singular_base,
-		'delete_post'        => 'delete_'       . $singular_base,
-		// Primitive capabilities used outside of map_meta_cap():
-		'edit_posts'         => 'edit_'         . $plural_base,
-		'edit_others_posts'  => 'edit_others_'  . $plural_base,
-		'publish_posts'      => 'publish_'      . $plural_base,
-		'read_private_posts' => 'read_private_' . $plural_base,
-	);
-
-	// Primitive capabilities used within map_meta_cap():
-	if ( $args->map_meta_cap ) {
-		$default_capabilities_for_mapping = array(
-			'read'                   => 'read',
-			'delete_posts'           => 'delete_'           . $plural_base,
-			'delete_private_posts'   => 'delete_private_'   . $plural_base,
-			'delete_published_posts' => 'delete_published_' . $plural_base,
-			'delete_others_posts'    => 'delete_others_'    . $plural_base,
-			'edit_private_posts'     => 'edit_private_'     . $plural_base,
-			'edit_published_posts'   => 'edit_published_'   . $plural_base,
-		);
-		$default_capabilities = array_merge( $default_capabilities, $default_capabilities_for_mapping );
-	}
-
-	$capabilities = array_merge( $default_capabilities, $args->capabilities );
-
-	// Post creation capability simply maps to edit_posts by default:
-	if ( ! isset( $capabilities['create_posts'] ) )
-		$capabilities['create_posts'] = $capabilities['edit_posts'];
-
-	// Remember meta capabilities for future reference.
-	if ( $args->map_meta_cap )
-		_post_type_meta_capabilities( $capabilities );
-
-	return (object) $capabilities;
-}
-
-/**
- * Store or return a list of post type meta caps for map_meta_cap().
- *
- * @since 3.1.0
- * @access private
- *
- * @global array $post_type_meta_caps Used to store meta capabilities.
- *
- * @param array $capabilities Post type meta capabilities.
- */
-function _post_type_meta_capabilities( $capabilities = null ) {
-	global $post_type_meta_caps;
-
-	foreach ( $capabilities as $core => $custom ) {
-		if ( in_array( $core, array( 'read_post', 'delete_post', 'edit_post' ) ) ) {
-			$post_type_meta_caps[ $custom ] = $core;
-		}
-	}
-}
-
-/**
- * Builds an object with all post type labels out of a post type object.
- *
- * Accepted keys of the label array in the post type object:
- *
- * - `name` - General name for the post type, usually plural. The same and overridden
- *          by `$post_type_object->label`. Default is 'Posts' / 'Pages'.
- * - `singular_name` - Name for one object of this post type. Default is 'Post' / 'Page'.
- * - `add_new` - Default is 'Add New' for both hierarchical and non-hierarchical types.
- *             When internationalizing this string, please use a {@link https://codex.wordpress.org/I18n_for_WordPress_Developers#Disambiguation_by_context gettext context}
- *             matching your post type. Example: `_x( 'Add New', 'product', 'textdomain' );`.
- * - `add_new_item` - Label for adding a new singular item. Default is 'Add New Post' / 'Add New Page'.
- * - `edit_item` - Label for editing a singular item. Default is 'Edit Post' / 'Edit Page'.
- * - `new_item` - Label for the new item page title. Default is 'New Post' / 'New Page'.
- * - `view_item` - Label for viewing a singular item. Default is 'View Post' / 'View Page'.
- * - `search_items` - Label for searching plural items. Default is 'Search Posts' / 'Search Pages'.
- * - `not_found` - Label used when no items are found. Default is 'No posts found' / 'No pages found'.
- * - `not_found_in_trash` - Label used when no items are in the trash. Default is 'No posts found in Trash' /
- *                        'No pages found in Trash'.
- * - `parent_item_colon` - Label used to prefix parents of hierarchical items. Not used on non-hierarchical
- *                       post types. Default is 'Parent Page:'.
- * - `all_items` - Label to signify all items in a submenu link. Default is 'All Posts' / 'All Pages'.
- * - `archives` - Label for archives in nav menus. Default is 'Post Archives' / 'Page Archives'.
- * - `insert_into_item` - Label for the media frame button. Default is 'Insert into post' / 'Insert into page'.
- * - `uploaded_to_this_item` - Label for the media frame filter. Default is 'Uploaded to this post' /
- *                           'Uploaded to this page'.
- * - `featured_image` - Label for the Featured Image meta box title. Default is 'Featured Image'.
- * - `set_featured_image` - Label for setting the featured image. Default is 'Set featured image'.
- * - `remove_featured_image` - Label for removing the featured image. Default is 'Remove featured image'.
- * - `use_featured_image` - Label in the media frame for using a featured image. Default is 'Use as featured image'.
- * - `menu_name` - Label for the menu name. Default is the same as `name`.
- * - `filter_items_list` - Label for the table views hidden heading. Default is 'Filter posts list' /
- *                       'Filter pages list'.
- * - `items_list_navigation` - Label for the table pagination hidden heading. Default is 'Posts list navigation' /
- *                           'Pages list navigation'.
- * - `items_list` - Label for the table hidden heading. Default is 'Posts list' / 'Pages list'.
- *
- * Above, the first default value is for non-hierarchical post types (like posts)
- * and the second one is for hierarchical post types (like pages).
- *
- * Note: To set labels used in post type admin notices, see the {@see 'post_updated_messages'} filter.
- *
- * @since 3.0.0
- * @since 4.3.0 Added the `featured_image`, `set_featured_image`, `remove_featured_image`,
- *              and `use_featured_image` labels.
- * @since 4.4.0 Added the `insert_into_item`, `uploaded_to_this_item`, `filter_items_list`,
- *              `items_list_navigation`, and `items_list` labels.
- * @since 4.6.0 Converted the `$post_type` parameter to accept a WP_Post_Type object.
- *
- * @access private
- *
- * @param object|WP_Post_Type $post_type_object Post type object.
- * @return object Object with all the labels as member variables.
- */
-function get_post_type_labels( $post_type_object ) {
-	$nohier_vs_hier_defaults = array(
-		'name' => array( _x('Posts', 'post type general name'), _x('Pages', 'post type general name') ),
-		'singular_name' => array( _x('Post', 'post type singular name'), _x('Page', 'post type singular name') ),
-		'add_new' => array( _x('Add New', 'post'), _x('Add New', 'page') ),
-		'add_new_item' => array( __('Add New Post'), __('Add New Page') ),
-		'edit_item' => array( __('Edit Post'), __('Edit Page') ),
-		'new_item' => array( __('New Post'), __('New Page') ),
-		'view_item' => array( __('View Post'), __('View Page') ),
-		'search_items' => array( __('Search Posts'), __('Search Pages') ),
-		'not_found' => array( __('No posts found.'), __('No pages found.') ),
-		'not_found_in_trash' => array( __('No posts found in Trash.'), __('No pages found in Trash.') ),
-		'parent_item_colon' => array( null, __('Parent Page:') ),
-		'all_items' => array( __( 'All Posts' ), __( 'All Pages' ) ),
-		'archives' => array( __( 'Post Archives' ), __( 'Page Archives' ) ),
-		'insert_into_item' => array( __( 'Insert into post' ), __( 'Insert into page' ) ),
-		'uploaded_to_this_item' => array( __( 'Uploaded to this post' ), __( 'Uploaded to this page' ) ),
-		'featured_image' => array( __( 'Featured Image' ), __( 'Featured Image' ) ),
-		'set_featured_image' => array( __( 'Set featured image' ), __( 'Set featured image' ) ),
-		'remove_featured_image' => array( __( 'Remove featured image' ), __( 'Remove featured image' ) ),
-		'use_featured_image' => array( __( 'Use as featured image' ), __( 'Use as featured image' ) ),
-		'filter_items_list' => array( __( 'Filter posts list' ), __( 'Filter pages list' ) ),
-		'items_list_navigation' => array( __( 'Posts list navigation' ), __( 'Pages list navigation' ) ),
-		'items_list' => array( __( 'Posts list' ), __( 'Pages list' ) ),
-	);
-	$nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name'];
-
-	$labels = _get_custom_object_labels( $post_type_object, $nohier_vs_hier_defaults );
-
-	$post_type = $post_type_object->name;
-
-	$default_labels = clone $labels;
-
-	/**
-	 * Filters the labels of a specific post type.
-	 *
-	 * The dynamic portion of the hook name, `$post_type`, refers to
-	 * the post type slug.
-	 *
-	 * @since 3.5.0
-	 *
-	 * @see get_post_type_labels() for the full list of labels.
-	 *
-	 * @param object $labels Object with labels for the post type as member variables.
-	 */
-	$labels = apply_filters( "post_type_labels_{$post_type}", $labels );
-
-	// Ensure that the filtered labels contain all required default values.
-	$labels = (object) array_merge( (array) $default_labels, (array) $labels );
-
-	return $labels;
-}
-
-/**
- * Build an object with custom-something object (post type, taxonomy) labels
- * out of a custom-something object
- *
- * @since 3.0.0
- * @access private
- *
- * @param object $object                  A custom-something object.
- * @param array  $nohier_vs_hier_defaults Hierarchical vs non-hierarchical default labels.
- * @return object Object containing labels for the given custom-something object.
- */
-function _get_custom_object_labels( $object, $nohier_vs_hier_defaults ) {
-	$object->labels = (array) $object->labels;
-
-	if ( isset( $object->label ) && empty( $object->labels['name'] ) )
-		$object->labels['name'] = $object->label;
-
-	if ( !isset( $object->labels['singular_name'] ) && isset( $object->labels['name'] ) )
-		$object->labels['singular_name'] = $object->labels['name'];
-
-	if ( ! isset( $object->labels['name_admin_bar'] ) )
-		$object->labels['name_admin_bar'] = isset( $object->labels['singular_name'] ) ? $object->labels['singular_name'] : $object->name;
-
-	if ( !isset( $object->labels['menu_name'] ) && isset( $object->labels['name'] ) )
-		$object->labels['menu_name'] = $object->labels['name'];
-
-	if ( !isset( $object->labels['all_items'] ) && isset( $object->labels['menu_name'] ) )
-		$object->labels['all_items'] = $object->labels['menu_name'];
-
-	if ( !isset( $object->labels['archives'] ) && isset( $object->labels['all_items'] ) ) {
-		$object->labels['archives'] = $object->labels['all_items'];
-	}
-
-	$defaults = array();
-	foreach ( $nohier_vs_hier_defaults as $key => $value ) {
-		$defaults[$key] = $object->hierarchical ? $value[1] : $value[0];
-	}
-	$labels = array_merge( $defaults, $object->labels );
-	$object->labels = (object) $object->labels;
-
-	return (object) $labels;
-}
-
-/**
- * Add submenus for post types.
- *
- * @access private
- * @since 3.1.0
- */
-function _add_post_type_submenus() {
-	foreach ( get_post_types( array( 'show_ui' => true ) ) as $ptype ) {
-		$ptype_obj = get_post_type_object( $ptype );
-		// Sub-menus only.
-		if ( ! $ptype_obj->show_in_menu || $ptype_obj->show_in_menu === true )
-			continue;
-		add_submenu_page( $ptype_obj->show_in_menu, $ptype_obj->labels->name, $ptype_obj->labels->all_items, $ptype_obj->cap->edit_posts, "edit.php?post_type=$ptype" );
-	}
-}
-
-/**
- * Register support of certain features for a post type.
- *
- * All core features are directly associated with a functional area of the edit
- * screen, such as the editor or a meta box. Features include: 'title', 'editor',
- * 'comments', 'revisions', 'trackbacks', 'author', 'excerpt', 'page-attributes',
- * 'thumbnail', 'custom-fields', and 'post-formats'.
- *
- * Additionally, the 'revisions' feature dictates whether the post type will
- * store revisions, and the 'comments' feature dictates whether the comments
- * count will show on the edit screen.
- *
- * @since 3.0.0
- *
- * @global array $_wp_post_type_features
- *
- * @param string       $post_type The post type for which to add the feature.
- * @param string|array $feature   The feature being added, accepts an array of
- *                                feature strings or a single string.
- */
-function add_post_type_support( $post_type, $feature ) {
-	global $_wp_post_type_features;
-
-	$features = (array) $feature;
-	foreach ($features as $feature) {
-		if ( func_num_args() == 2 )
-			$_wp_post_type_features[$post_type][$feature] = true;
-		else
-			$_wp_post_type_features[$post_type][$feature] = array_slice( func_get_args(), 2 );
-	}
-}
-
-/**
- * Remove support for a feature from a post type.
- *
- * @since 3.0.0
- *
- * @global array $_wp_post_type_features
- *
- * @param string $post_type The post type for which to remove the feature.
- * @param string $feature   The feature being removed.
- */
-function remove_post_type_support( $post_type, $feature ) {
-	global $_wp_post_type_features;
-
-	unset( $_wp_post_type_features[ $post_type ][ $feature ] );
-}
-
-/**
- * Get all the post type features
- *
- * @since 3.4.0
- *
- * @global array $_wp_post_type_features
- *
- * @param string $post_type The post type.
- * @return array Post type supports list.
- */
-function get_all_post_type_supports( $post_type ) {
-	global $_wp_post_type_features;
-
-	if ( isset( $_wp_post_type_features[$post_type] ) )
-		return $_wp_post_type_features[$post_type];
-
-	return array();
-}
-
-/**
- * Check a post type's support for a given feature.
- *
- * @since 3.0.0
- *
- * @global array $_wp_post_type_features
- *
- * @param string $post_type The post type being checked.
- * @param string $feature   The feature being checked.
- * @return bool Whether the post type supports the given feature.
- */
-function post_type_supports( $post_type, $feature ) {
-	global $_wp_post_type_features;
-
-	return ( isset( $_wp_post_type_features[$post_type][$feature] ) );
-}
-
-/**
- * Retrieves a list of post type names that support a specific feature.
- *
- * @since 4.5.0
- *
- * @global array $_wp_post_type_features Post type features
- *
- * @param array|string $feature  Single feature or an array of features the post types should support.
- * @param string       $operator Optional. The logical operation to perform. 'or' means
- *                               only one element from the array needs to match; 'and'
- *                               means all elements must match; 'not' means no elements may
- *                               match. Default 'and'.
- * @return array A list of post type names.
- */
-function get_post_types_by_support( $feature, $operator = 'and' ) {
-	global $_wp_post_type_features;
-
-	$features = array_fill_keys( (array) $feature, true );
-
-	return array_keys( wp_filter_object_list( $_wp_post_type_features, $features, $operator ) );
-}
-
-/**
- * Update the post type for the post ID.
- *
- * The page or post cache will be cleaned for the post ID.
- *
- * @since 2.5.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int    $post_id   Optional. Post ID to change post type. Default 0.
- * @param string $post_type Optional. Post type. Accepts 'post' or 'page' to
- *                          name a few. Default 'post'.
- * @return int|false Amount of rows changed. Should be 1 for success and 0 for failure.
- */
-function set_post_type( $post_id = 0, $post_type = 'post' ) {
-	global $wpdb;
-
-	$post_type = sanitize_post_field('post_type', $post_type, $post_id, 'db');
-	$return = $wpdb->update( $wpdb->posts, array('post_type' => $post_type), array('ID' => $post_id) );
-
-	clean_post_cache( $post_id );
-
-	return $return;
-}
-
-/**
- * Determines whether a post type is considered "viewable".
- *
- * For built-in post types such as posts and pages, the 'public' value will be evaluated.
- * For all others, the 'publicly_queryable' value will be used.
- *
- * @since 4.4.0
- * @since 4.5.0 Added the ability to pass a post type name in addition to object.
- * @since 4.6.0 Converted the `$post_type` parameter to accept a WP_Post_Type object.
- *
- * @param string|WP_Post_Type $post_type Post type name or object.
- * @return bool Whether the post type should be considered viewable.
- */
-function is_post_type_viewable( $post_type ) {
-	if ( is_scalar( $post_type ) ) {
-		$post_type = get_post_type_object( $post_type );
-		if ( ! $post_type ) {
-			return false;
-		}
-	}
-
-	return $post_type->publicly_queryable || ( $post_type->_builtin && $post_type->public );
-}
-
-/**
- * Retrieve list of latest posts or posts matching criteria.
- *
- * The defaults are as follows:
- *
- * @since 1.2.0
- *
- * @see WP_Query::parse_query()
- *
- * @param array $args {
- *     Optional. Arguments to retrieve posts. See WP_Query::parse_query() for all
- *     available arguments.
- *
- *     @type int        $numberposts      Total number of posts to retrieve. Is an alias of $posts_per_page
- *                                        in WP_Query. Accepts -1 for all. Default 5.
- *     @type int|string $category         Category ID or comma-separated list of IDs (this or any children).
- *                                        Is an alias of $cat in WP_Query. Default 0.
- *     @type array      $include          An array of post IDs to retrieve, sticky posts will be included.
- *                                        Is an alias of $post__in in WP_Query. Default empty array.
- *     @type array      $exclude          An array of post IDs not to retrieve. Default empty array.
- *     @type bool       $suppress_filters Whether to suppress filters. Default true.
- * }
- * @return array List of posts.
- */
-function get_posts( $args = null ) {
-	$defaults = array(
-		'numberposts' => 5,
-		'category' => 0, 'orderby' => 'date',
-		'order' => 'DESC', 'include' => array(),
-		'exclude' => array(), 'meta_key' => '',
-		'meta_value' =>'', 'post_type' => 'post',
-		'suppress_filters' => true
-	);
-
-	$r = wp_parse_args( $args, $defaults );
-	if ( empty( $r['post_status'] ) )
-		$r['post_status'] = ( 'attachment' == $r['post_type'] ) ? 'inherit' : 'publish';
-	if ( ! empty($r['numberposts']) && empty($r['posts_per_page']) )
-		$r['posts_per_page'] = $r['numberposts'];
-	if ( ! empty($r['category']) )
-		$r['cat'] = $r['category'];
-	if ( ! empty($r['include']) ) {
-		$incposts = wp_parse_id_list( $r['include'] );
-		$r['posts_per_page'] = count($incposts);  // only the number of posts included
-		$r['post__in'] = $incposts;
-	} elseif ( ! empty($r['exclude']) )
-		$r['post__not_in'] = wp_parse_id_list( $r['exclude'] );
-
-	$r['ignore_sticky_posts'] = true;
-	$r['no_found_rows'] = true;
-
-	$get_posts = new WP_Query;
-	return $get_posts->query($r);
-
-}
-
-//
-// Post meta functions
-//
-
-/**
- * Add meta data field to a post.
- *
- * Post meta data is called "Custom Fields" on the Administration Screen.
- *
- * @since 1.5.0
- *
- * @param int    $post_id    Post ID.
- * @param string $meta_key   Metadata name.
- * @param mixed  $meta_value Metadata value. Must be serializable if non-scalar.
- * @param bool   $unique     Optional. Whether the same key should not be added.
- *                           Default false.
- * @return int|false Meta ID on success, false on failure.
- */
-function add_post_meta( $post_id, $meta_key, $meta_value, $unique = false ) {
-	// Make sure meta is added to the post, not a revision.
-	if ( $the_post = wp_is_post_revision($post_id) )
-		$post_id = $the_post;
-
-	return add_metadata('post', $post_id, $meta_key, $meta_value, $unique);
-}
-
-/**
- * Remove metadata matching criteria from a post.
- *
- * You can match based on the key, or key and value. Removing based on key and
- * value, will keep from removing duplicate metadata with the same key. It also
- * allows removing all metadata matching key, if needed.
- *
- * @since 1.5.0
- *
- * @param int    $post_id    Post ID.
- * @param string $meta_key   Metadata name.
- * @param mixed  $meta_value Optional. Metadata value. Must be serializable if
- *                           non-scalar. Default empty.
- * @return bool True on success, false on failure.
- */
-function delete_post_meta( $post_id, $meta_key, $meta_value = '' ) {
-	// Make sure meta is added to the post, not a revision.
-	if ( $the_post = wp_is_post_revision($post_id) )
-		$post_id = $the_post;
-
-	return delete_metadata('post', $post_id, $meta_key, $meta_value);
-}
-
-/**
- * Retrieve post meta field for a post.
- *
- * @since 1.5.0
- *
- * @param int    $post_id Post ID.
- * @param string $key     Optional. The meta key to retrieve. By default, returns
- *                        data for all keys. Default empty.
- * @param bool   $single  Optional. Whether to return a single value. Default false.
- * @return mixed Will be an array if $single is false. Will be value of meta data
- *               field if $single is true.
- */
-function get_post_meta( $post_id, $key = '', $single = false ) {
-	return get_metadata('post', $post_id, $key, $single);
-}
-
-/**
- * Update post meta field based on post ID.
- *
- * Use the $prev_value parameter to differentiate between meta fields with the
- * same key and post ID.
- *
- * If the meta field for the post does not exist, it will be added.
- *
- * @since 1.5.0
- *
- * @param int    $post_id    Post ID.
- * @param string $meta_key   Metadata key.
- * @param mixed  $meta_value Metadata value. Must be serializable if non-scalar.
- * @param mixed  $prev_value Optional. Previous value to check before removing.
- *                           Default empty.
- * @return int|bool Meta ID if the key didn't exist, true on successful update,
- *                  false on failure.
- */
-function update_post_meta( $post_id, $meta_key, $meta_value, $prev_value = '' ) {
-	// Make sure meta is added to the post, not a revision.
-	if ( $the_post = wp_is_post_revision($post_id) )
-		$post_id = $the_post;
-
-	return update_metadata('post', $post_id, $meta_key, $meta_value, $prev_value);
-}
-
-/**
- * Delete everything from post meta matching meta key.
- *
- * @since 2.3.0
- *
- * @param string $post_meta_key Key to search for when deleting.
- * @return bool Whether the post meta key was deleted from the database.
- */
-function delete_post_meta_by_key( $post_meta_key ) {
-	return delete_metadata( 'post', null, $post_meta_key, '', true );
-}
-
-/**
- * Retrieve post meta fields, based on post ID.
- *
- * The post meta fields are retrieved from the cache where possible,
- * so the function is optimized to be called more than once.
- *
- * @since 1.2.0
- *
- * @param int $post_id Optional. Post ID. Default is ID of the global $post.
- * @return array Post meta for the given post.
- */
-function get_post_custom( $post_id = 0 ) {
-	$post_id = absint( $post_id );
-	if ( ! $post_id )
-		$post_id = get_the_ID();
-
-	return get_post_meta( $post_id );
-}
-
-/**
- * Retrieve meta field names for a post.
- *
- * If there are no meta fields, then nothing (null) will be returned.
- *
- * @since 1.2.0
- *
- * @param int $post_id Optional. Post ID. Default is ID of the global $post.
- * @return array|void Array of the keys, if retrieved.
- */
-function get_post_custom_keys( $post_id = 0 ) {
-	$custom = get_post_custom( $post_id );
-
-	if ( !is_array($custom) )
-		return;
-
-	if ( $keys = array_keys($custom) )
-		return $keys;
-}
-
-/**
- * Retrieve values for a custom post field.
- *
- * The parameters must not be considered optional. All of the post meta fields
- * will be retrieved and only the meta field key values returned.
- *
- * @since 1.2.0
- *
- * @param string $key     Optional. Meta field key. Default empty.
- * @param int    $post_id Optional. Post ID. Default is ID of the global $post.
- * @return array|null Meta field values.
- */
-function get_post_custom_values( $key = '', $post_id = 0 ) {
-	if ( !$key )
-		return null;
-
-	$custom = get_post_custom($post_id);
-
-	return isset($custom[$key]) ? $custom[$key] : null;
-}
-
-/**
- * Check if post is sticky.
- *
- * Sticky posts should remain at the top of The Loop. If the post ID is not
- * given, then The Loop ID for the current post will be used.
- *
- * @since 2.7.0
- *
- * @param int $post_id Optional. Post ID. Default is ID of the global $post.
- * @return bool Whether post is sticky.
- */
-function is_sticky( $post_id = 0 ) {
-	$post_id = absint( $post_id );
-
-	if ( ! $post_id )
-		$post_id = get_the_ID();
-
-	$stickies = get_option( 'sticky_posts' );
-
-	if ( ! is_array( $stickies ) )
-		return false;
-
-	if ( in_array( $post_id, $stickies ) )
-		return true;
-
-	return false;
-}
-
-/**
- * Sanitize every post field.
- *
- * If the context is 'raw', then the post object or array will get minimal
- * sanitization of the integer fields.
- *
- * @since 2.3.0
- *
- * @see sanitize_post_field()
- *
- * @param object|WP_Post|array $post    The Post Object or Array
- * @param string               $context Optional. How to sanitize post fields.
- *                                      Accepts 'raw', 'edit', 'db', or 'display'.
- *                                      Default 'display'.
- * @return object|WP_Post|array The now sanitized Post Object or Array (will be the
- *                              same type as $post).
- */
-function sanitize_post( $post, $context = 'display' ) {
-	if ( is_object($post) ) {
-		// Check if post already filtered for this context.
-		if ( isset($post->filter) && $context == $post->filter )
-			return $post;
-		if ( !isset($post->ID) )
-			$post->ID = 0;
-		foreach ( array_keys(get_object_vars($post)) as $field )
-			$post->$field = sanitize_post_field($field, $post->$field, $post->ID, $context);
-		$post->filter = $context;
-	} elseif ( is_array( $post ) ) {
-		// Check if post already filtered for this context.
-		if ( isset($post['filter']) && $context == $post['filter'] )
-			return $post;
-		if ( !isset($post['ID']) )
-			$post['ID'] = 0;
-		foreach ( array_keys($post) as $field )
-			$post[$field] = sanitize_post_field($field, $post[$field], $post['ID'], $context);
-		$post['filter'] = $context;
-	}
-	return $post;
-}
-
-/**
- * Sanitize post field based on context.
- *
- * Possible context values are:  'raw', 'edit', 'db', 'display', 'attribute' and
- * 'js'. The 'display' context is used by default. 'attribute' and 'js' contexts
- * are treated like 'display' when calling filters.
- *
- * @since 2.3.0
- * @since 4.4.0 Like `sanitize_post()`, `$context` defaults to 'display'.
- *
- * @param string $field   The Post Object field name.
- * @param mixed  $value   The Post Object value.
- * @param int    $post_id Post ID.
- * @param string $context Optional. How to sanitize post fields. Looks for 'raw', 'edit',
- *                        'db', 'display', 'attribute' and 'js'. Default 'display'.
- * @return mixed Sanitized value.
- */
-function sanitize_post_field( $field, $value, $post_id, $context = 'display' ) {
-	$int_fields = array('ID', 'post_parent', 'menu_order');
-	if ( in_array($field, $int_fields) )
-		$value = (int) $value;
-
-	// Fields which contain arrays of integers.
-	$array_int_fields = array( 'ancestors' );
-	if ( in_array($field, $array_int_fields) ) {
-		$value = array_map( 'absint', $value);
-		return $value;
-	}
-
-	if ( 'raw' == $context )
-		return $value;
-
-	$prefixed = false;
-	if ( false !== strpos($field, 'post_') ) {
-		$prefixed = true;
-		$field_no_prefix = str_replace('post_', '', $field);
-	}
-
-	if ( 'edit' == $context ) {
-		$format_to_edit = array('post_content', 'post_excerpt', 'post_title', 'post_password');
-
-		if ( $prefixed ) {
-
-			/**
-			 * Filters the value of a specific post field to edit.
-			 *
-			 * The dynamic portion of the hook name, `$field`, refers to the post
-			 * field name.
-			 *
-			 * @since 2.3.0
-			 *
-			 * @param mixed $value   Value of the post field.
-			 * @param int   $post_id Post ID.
-			 */
-			$value = apply_filters( "edit_{$field}", $value, $post_id );
-
-			/**
-			 * Filters the value of a specific post field to edit.
-			 *
-			 * The dynamic portion of the hook name, `$field_no_prefix`, refers to
-			 * the post field name.
-			 *
-			 * @since 2.3.0
-			 *
-			 * @param mixed $value   Value of the post field.
-			 * @param int   $post_id Post ID.
-			 */
-			$value = apply_filters( "{$field_no_prefix}_edit_pre", $value, $post_id );
-		} else {
-			$value = apply_filters( "edit_post_{$field}", $value, $post_id );
-		}
-
-		if ( in_array($field, $format_to_edit) ) {
-			if ( 'post_content' == $field )
-				$value = format_to_edit($value, user_can_richedit());
-			else
-				$value = format_to_edit($value);
-		} else {
-			$value = esc_attr($value);
-		}
-	} elseif ( 'db' == $context ) {
-		if ( $prefixed ) {
-
-			/**
-			 * Filters the value of a specific post field before saving.
-			 *
-			 * The dynamic portion of the hook name, `$field`, refers to the post
-			 * field name.
-			 *
-			 * @since 2.3.0
-			 *
-			 * @param mixed $value Value of the post field.
-			 */
-			$value = apply_filters( "pre_{$field}", $value );
-
-			/**
-			 * Filters the value of a specific field before saving.
-			 *
-			 * The dynamic portion of the hook name, `$field_no_prefix`, refers
-			 * to the post field name.
-			 *
-			 * @since 2.3.0
-			 *
-			 * @param mixed $value Value of the post field.
-			 */
-			$value = apply_filters( "{$field_no_prefix}_save_pre", $value );
-		} else {
-			$value = apply_filters( "pre_post_{$field}", $value );
-
-			/**
-			 * Filters the value of a specific post field before saving.
-			 *
-			 * The dynamic portion of the hook name, `$field`, refers to the post
-			 * field name.
-			 *
-			 * @since 2.3.0
-			 *
-			 * @param mixed $value Value of the post field.
-			 */
-			$value = apply_filters( "{$field}_pre", $value );
-		}
-	} else {
-
-		// Use display filters by default.
-		if ( $prefixed ) {
-
-			/**
-			 * Filters the value of a specific post field for display.
-			 *
-			 * The dynamic portion of the hook name, `$field`, refers to the post
-			 * field name.
-			 *
-			 * @since 2.3.0
-			 *
-			 * @param mixed  $value   Value of the prefixed post field.
-			 * @param int    $post_id Post ID.
-			 * @param string $context Context for how to sanitize the field. Possible
-			 *                        values include 'raw', 'edit', 'db', 'display',
-			 *                        'attribute' and 'js'.
-			 */
-			$value = apply_filters( $field, $value, $post_id, $context );
-		} else {
-			$value = apply_filters( "post_{$field}", $value, $post_id, $context );
-		}
-
-		if ( 'attribute' == $context ) {
-			$value = esc_attr( $value );
-		} elseif ( 'js' == $context ) {
-			$value = esc_js( $value );
-		}
-	}
-
-	return $value;
-}
-
-/**
- * Make a post sticky.
- *
- * Sticky posts should be displayed at the top of the front page.
- *
- * @since 2.7.0
- *
- * @param int $post_id Post ID.
- */
-function stick_post( $post_id ) {
-	$stickies = get_option('sticky_posts');
-
-	if ( !is_array($stickies) )
-		$stickies = array($post_id);
-
-	if ( ! in_array($post_id, $stickies) )
-		$stickies[] = $post_id;
-
-	$updated = update_option( 'sticky_posts', $stickies );
-
-	if ( $updated ) {
-		/**
-		 * Fires once a post has been added to the sticky list.
-		 *
-		 * @since 4.6.0
-		 *
-		 * @param int $post_id ID of the post that was stuck.
-		 */
-		do_action( 'post_stuck', $post_id );
-	}
-}
-
-/**
- * Un-stick a post.
- *
- * Sticky posts should be displayed at the top of the front page.
- *
- * @since 2.7.0
- *
- * @param int $post_id Post ID.
- */
-function unstick_post( $post_id ) {
-	$stickies = get_option('sticky_posts');
-
-	if ( !is_array($stickies) )
-		return;
-
-	if ( ! in_array($post_id, $stickies) )
-		return;
-
-	$offset = array_search($post_id, $stickies);
-	if ( false === $offset )
-		return;
-
-	array_splice($stickies, $offset, 1);
-
-	$updated = update_option( 'sticky_posts', $stickies );
-
-	if ( $updated ) {
-		/**
-		 * Fires once a post has been removed from the sticky list.
-		 *
-		 * @since 4.6.0
-		 *
-		 * @param int $post_id ID of the post that was unstuck.
-		 */
-		do_action( 'post_unstuck', $post_id );
-	}
-}
-
-/**
- * Return the cache key for wp_count_posts() based on the passed arguments.
- *
- * @since 3.9.0
- *
- * @param string $type Optional. Post type to retrieve count Default 'post'.
- * @param string $perm Optional. 'readable' or empty. Default empty.
- * @return string The cache key.
- */
-function _count_posts_cache_key( $type = 'post', $perm = '' ) {
-	$cache_key = 'posts-' . $type;
-	if ( 'readable' == $perm && is_user_logged_in() ) {
-		$post_type_object = get_post_type_object( $type );
-		if ( $post_type_object && ! current_user_can( $post_type_object->cap->read_private_posts ) ) {
-			$cache_key .= '_' . $perm . '_' . get_current_user_id();
-		}
-	}
-	return $cache_key;
-}
-
-/**
- * Count number of posts of a post type and if user has permissions to view.
- *
- * This function provides an efficient method of finding the amount of post's
- * type a blog has. Another method is to count the amount of items in
- * get_posts(), but that method has a lot of overhead with doing so. Therefore,
- * when developing for 2.5+, use this function instead.
- *
- * The $perm parameter checks for 'readable' value and if the user can read
- * private posts, it will display that for the user that is signed in.
- *
- * @since 2.5.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $type Optional. Post type to retrieve count. Default 'post'.
- * @param string $perm Optional. 'readable' or empty. Default empty.
- * @return object Number of posts for each status.
- */
-function wp_count_posts( $type = 'post', $perm = '' ) {
-	global $wpdb;
-
-	if ( ! post_type_exists( $type ) )
-		return new stdClass;
-
-	$cache_key = _count_posts_cache_key( $type, $perm );
-
-	$counts = wp_cache_get( $cache_key, 'counts' );
-	if ( false !== $counts ) {
-		/** This filter is documented in wp-includes/post.php */
-		return apply_filters( 'wp_count_posts', $counts, $type, $perm );
-	}
-
-	$query = "SELECT post_status, COUNT( * ) AS num_posts FROM {$wpdb->posts} WHERE post_type = %s";
-	if ( 'readable' == $perm && is_user_logged_in() ) {
-		$post_type_object = get_post_type_object($type);
-		if ( ! current_user_can( $post_type_object->cap->read_private_posts ) ) {
-			$query .= $wpdb->prepare( " AND (post_status != 'private' OR ( post_author = %d AND post_status = 'private' ))",
-				get_current_user_id()
-			);
-		}
-	}
-	$query .= ' GROUP BY post_status';
-
-	$results = (array) $wpdb->get_results( $wpdb->prepare( $query, $type ), ARRAY_A );
-	$counts = array_fill_keys( get_post_stati(), 0 );
-
-	foreach ( $results as $row ) {
-		$counts[ $row['post_status'] ] = $row['num_posts'];
-	}
-
-	$counts = (object) $counts;
-	wp_cache_set( $cache_key, $counts, 'counts' );
-
-	/**
-	 * Modify returned post counts by status for the current post type.
-	 *
-	 * @since 3.7.0
-	 *
-	 * @param object $counts An object containing the current post_type's post
-	 *                       counts by status.
-	 * @param string $type   Post type.
-	 * @param string $perm   The permission to determine if the posts are 'readable'
-	 *                       by the current user.
-	 */
-	return apply_filters( 'wp_count_posts', $counts, $type, $perm );
-}
-
-/**
- * Count number of attachments for the mime type(s).
- *
- * If you set the optional mime_type parameter, then an array will still be
- * returned, but will only have the item you are looking for. It does not give
- * you the number of attachments that are children of a post. You can get that
- * by counting the number of children that post has.
- *
- * @since 2.5.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string|array $mime_type Optional. Array or comma-separated list of
- *                                MIME patterns. Default empty.
- * @return object An object containing the attachment counts by mime type.
- */
-function wp_count_attachments( $mime_type = '' ) {
-	global $wpdb;
-
-	$and = wp_post_mime_type_where( $mime_type );
-	$count = $wpdb->get_results( "SELECT post_mime_type, COUNT( * ) AS num_posts FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status != 'trash' $and GROUP BY post_mime_type", ARRAY_A );
-
-	$counts = array();
-	foreach ( (array) $count as $row ) {
-		$counts[ $row['post_mime_type'] ] = $row['num_posts'];
-	}
-	$counts['trash'] = $wpdb->get_var( "SELECT COUNT( * ) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status = 'trash' $and");
-
-	/**
-	 * Modify returned attachment counts by mime type.
-	 *
-	 * @since 3.7.0
-	 *
-	 * @param object $counts    An object containing the attachment counts by
-	 *                          mime type.
-	 * @param string $mime_type The mime type pattern used to filter the attachments
-	 *                          counted.
-	 */
-	return apply_filters( 'wp_count_attachments', (object) $counts, $mime_type );
-}
-
-/**
- * Get default post mime types.
- *
- * @since 2.9.0
- *
- * @return array List of post mime types.
- */
-function get_post_mime_types() {
-	$post_mime_types = array(	//	array( adj, noun )
-		'image' => array(__('Images'), __('Manage Images'), _n_noop('Image <span class="count">(%s)</span>', 'Images <span class="count">(%s)</span>')),
-		'audio' => array(__('Audio'), __('Manage Audio'), _n_noop('Audio <span class="count">(%s)</span>', 'Audio <span class="count">(%s)</span>')),
-		'video' => array(__('Video'), __('Manage Video'), _n_noop('Video <span class="count">(%s)</span>', 'Video <span class="count">(%s)</span>')),
-	);
-
-	/**
-	 * Filters the default list of post mime types.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param array $post_mime_types Default list of post mime types.
-	 */
-	return apply_filters( 'post_mime_types', $post_mime_types );
-}
-
-/**
- * Check a MIME-Type against a list.
- *
- * If the wildcard_mime_types parameter is a string, it must be comma separated
- * list. If the real_mime_types is a string, it is also comma separated to
- * create the list.
- *
- * @since 2.5.0
- *
- * @param string|array $wildcard_mime_types Mime types, e.g. audio/mpeg or image (same as image/*)
- *                                          or flash (same as *flash*).
- * @param string|array $real_mime_types     Real post mime type values.
- * @return array array(wildcard=>array(real types)).
- */
-function wp_match_mime_types( $wildcard_mime_types, $real_mime_types ) {
-	$matches = array();
-	if ( is_string( $wildcard_mime_types ) ) {
-		$wildcard_mime_types = array_map( 'trim', explode( ',', $wildcard_mime_types ) );
-	}
-	if ( is_string( $real_mime_types ) ) {
-		$real_mime_types = array_map( 'trim', explode( ',', $real_mime_types ) );
-	}
-
-	$patternses = array();
-	$wild = '[-._a-z0-9]*';
-
-	foreach ( (array) $wildcard_mime_types as $type ) {
-		$mimes = array_map( 'trim', explode( ',', $type ) );
-		foreach ( $mimes as $mime ) {
-			$regex = str_replace( '__wildcard__', $wild, preg_quote( str_replace( '*', '__wildcard__', $mime ) ) );
-			$patternses[][$type] = "^$regex$";
-			if ( false === strpos( $mime, '/' ) ) {
-				$patternses[][$type] = "^$regex/";
-				$patternses[][$type] = $regex;
-			}
-		}
-	}
-	asort( $patternses );
-
-	foreach ( $patternses as $patterns ) {
-		foreach ( $patterns as $type => $pattern ) {
-			foreach ( (array) $real_mime_types as $real ) {
-				if ( preg_match( "#$pattern#", $real ) && ( empty( $matches[$type] ) || false === array_search( $real, $matches[$type] ) ) ) {
-					$matches[$type][] = $real;
-				}
-			}
-		}
-	}
-	return $matches;
-}
-
-/**
- * Convert MIME types into SQL.
- *
- * @since 2.5.0
- *
- * @param string|array $post_mime_types List of mime types or comma separated string
- *                                      of mime types.
- * @param string       $table_alias     Optional. Specify a table alias, if needed.
- *                                      Default empty.
- * @return string The SQL AND clause for mime searching.
- */
-function wp_post_mime_type_where( $post_mime_types, $table_alias = '' ) {
-	$where = '';
-	$wildcards = array('', '%', '%/%');
-	if ( is_string($post_mime_types) )
-		$post_mime_types = array_map('trim', explode(',', $post_mime_types));
-
-	$wheres = array();
-
-	foreach ( (array) $post_mime_types as $mime_type ) {
-		$mime_type = preg_replace('/\s/', '', $mime_type);
-		$slashpos = strpos($mime_type, '/');
-		if ( false !== $slashpos ) {
-			$mime_group = preg_replace('/[^-*.a-zA-Z0-9]/', '', substr($mime_type, 0, $slashpos));
-			$mime_subgroup = preg_replace('/[^-*.+a-zA-Z0-9]/', '', substr($mime_type, $slashpos + 1));
-			if ( empty($mime_subgroup) )
-				$mime_subgroup = '*';
-			else
-				$mime_subgroup = str_replace('/', '', $mime_subgroup);
-			$mime_pattern = "$mime_group/$mime_subgroup";
-		} else {
-			$mime_pattern = preg_replace('/[^-*.a-zA-Z0-9]/', '', $mime_type);
-			if ( false === strpos($mime_pattern, '*') )
-				$mime_pattern .= '/*';
-		}
-
-		$mime_pattern = preg_replace('/\*+/', '%', $mime_pattern);
-
-		if ( in_array( $mime_type, $wildcards ) )
-			return '';
-
-		if ( false !== strpos($mime_pattern, '%') )
-			$wheres[] = empty($table_alias) ? "post_mime_type LIKE '$mime_pattern'" : "$table_alias.post_mime_type LIKE '$mime_pattern'";
-		else
-			$wheres[] = empty($table_alias) ? "post_mime_type = '$mime_pattern'" : "$table_alias.post_mime_type = '$mime_pattern'";
-	}
-	if ( !empty($wheres) )
-		$where = ' AND (' . join(' OR ', $wheres) . ') ';
-	return $where;
-}
-
-/**
- * Trash or delete a post or page.
- *
- * When the post and page is permanently deleted, everything that is tied to
- * it is deleted also. This includes comments, post meta fields, and terms
- * associated with the post.
- *
- * The post or page is moved to trash instead of permanently deleted unless
- * trash is disabled, item is already in the trash, or $force_delete is true.
- *
- * @since 1.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- * @see wp_delete_attachment()
- * @see wp_trash_post()
- *
- * @param int  $postid       Optional. Post ID. Default 0.
- * @param bool $force_delete Optional. Whether to bypass trash and force deletion.
- *                           Default false.
- * @return array|false|WP_Post False on failure.
- */
-function wp_delete_post( $postid = 0, $force_delete = false ) {
-	global $wpdb;
-
-	if ( !$post = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID = %d", $postid)) )
-		return $post;
-
-	if ( !$force_delete && ( $post->post_type == 'post' || $post->post_type == 'page') && get_post_status( $postid ) != 'trash' && EMPTY_TRASH_DAYS )
-		return wp_trash_post( $postid );
-
-	if ( $post->post_type == 'attachment' )
-		return wp_delete_attachment( $postid, $force_delete );
-
-	/**
-	 * Filters whether a post deletion should take place.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param bool    $delete       Whether to go forward with deletion.
-	 * @param WP_Post $post         Post object.
-	 * @param bool    $force_delete Whether to bypass the trash.
-	 */
-	$check = apply_filters( 'pre_delete_post', null, $post, $force_delete );
-	if ( null !== $check ) {
-		return $check;
-	}
-
-	/**
-	 * Fires before a post is deleted, at the start of wp_delete_post().
-	 *
-	 * @since 3.2.0
-	 *
-	 * @see wp_delete_post()
-	 *
-	 * @param int $postid Post ID.
-	 */
-	do_action( 'before_delete_post', $postid );
-
-	delete_post_meta($postid,'_wp_trash_meta_status');
-	delete_post_meta($postid,'_wp_trash_meta_time');
-
-	wp_delete_object_term_relationships($postid, get_object_taxonomies($post->post_type));
-
-	$parent_data = array( 'post_parent' => $post->post_parent );
-	$parent_where = array( 'post_parent' => $postid );
-
-	if ( is_post_type_hierarchical( $post->post_type ) ) {
-		// Point children of this page to its parent, also clean the cache of affected children.
-		$children_query = $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE post_parent = %d AND post_type = %s", $postid, $post->post_type );
-		$children = $wpdb->get_results( $children_query );
-		if ( $children ) {
-			$wpdb->update( $wpdb->posts, $parent_data, $parent_where + array( 'post_type' => $post->post_type ) );
-		}
-	}
-
-	// Do raw query. wp_get_post_revisions() is filtered.
-	$revision_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'revision'", $postid ) );
-	// Use wp_delete_post (via wp_delete_post_revision) again. Ensures any meta/misplaced data gets cleaned up.
-	foreach ( $revision_ids as $revision_id )
-		wp_delete_post_revision( $revision_id );
-
-	// Point all attachments to this post up one level.
-	$wpdb->update( $wpdb->posts, $parent_data, $parent_where + array( 'post_type' => 'attachment' ) );
-
-	wp_defer_comment_counting( true );
-
-	$comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = %d", $postid ));
-	foreach ( $comment_ids as $comment_id ) {
-		wp_delete_comment( $comment_id, true );
-	}
-
-	wp_defer_comment_counting( false );
-
-	$post_meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d ", $postid ));
-	foreach ( $post_meta_ids as $mid )
-		delete_metadata_by_mid( 'post', $mid );
-
-	/**
-	 * Fires immediately before a post is deleted from the database.
-	 *
-	 * @since 1.2.0
-	 *
-	 * @param int $postid Post ID.
-	 */
-	do_action( 'delete_post', $postid );
-	$result = $wpdb->delete( $wpdb->posts, array( 'ID' => $postid ) );
-	if ( ! $result ) {
-		return false;
-	}
-
-	/**
-	 * Fires immediately after a post is deleted from the database.
-	 *
-	 * @since 2.2.0
-	 *
-	 * @param int $postid Post ID.
-	 */
-	do_action( 'deleted_post', $postid );
-
-	clean_post_cache( $post );
-
-	if ( is_post_type_hierarchical( $post->post_type ) && $children ) {
-		foreach ( $children as $child )
-			clean_post_cache( $child );
-	}
-
-	wp_clear_scheduled_hook('publish_future_post', array( $postid ) );
-
-	/**
-	 * Fires after a post is deleted, at the conclusion of wp_delete_post().
-	 *
-	 * @since 3.2.0
-	 *
-	 * @see wp_delete_post()
-	 *
-	 * @param int $postid Post ID.
-	 */
-	do_action( 'after_delete_post', $postid );
-
-	return $post;
-}
-
-/**
- * Reset the page_on_front, show_on_front, and page_for_post settings when
- * a linked page is deleted or trashed.
- *
- * Also ensures the post is no longer sticky.
- *
- * @since 3.7.0
- * @access private
- *
- * @param int $post_id Post ID.
- */
-function _reset_front_page_settings_for_post( $post_id ) {
-	$post = get_post( $post_id );
-	if ( 'page' == $post->post_type ) {
-	 	/*
-	 	 * If the page is defined in option page_on_front or post_for_posts,
-	 	 * adjust the corresponding options.
-	 	 */
-		if ( get_option( 'page_on_front' ) == $post->ID ) {
-			update_option( 'show_on_front', 'posts' );
-			update_option( 'page_on_front', 0 );
-		}
-		if ( get_option( 'page_for_posts' ) == $post->ID ) {
-			delete_option( 'page_for_posts', 0 );
-		}
-	}
-	unstick_post( $post->ID );
-}
-
-/**
- * Move a post or page to the Trash
- *
- * If trash is disabled, the post or page is permanently deleted.
- *
- * @since 2.9.0
- *
- * @see wp_delete_post()
- *
- * @param int $post_id Optional. Post ID. Default is ID of the global $post
- *                     if EMPTY_TRASH_DAYS equals true.
- * @return false|array|WP_Post|null Post data array, otherwise false.
- */
-function wp_trash_post( $post_id = 0 ) {
-	if ( !EMPTY_TRASH_DAYS )
-		return wp_delete_post($post_id, true);
-
-	if ( !$post = get_post($post_id, ARRAY_A) )
-		return $post;
-
-	if ( $post['post_status'] == 'trash' )
-		return false;
-
-	/**
-	 * Fires before a post is sent to the trash.
-	 *
-	 * @since 3.3.0
-	 *
-	 * @param int $post_id Post ID.
-	 */
-	do_action( 'wp_trash_post', $post_id );
-
-	add_post_meta($post_id,'_wp_trash_meta_status', $post['post_status']);
-	add_post_meta($post_id,'_wp_trash_meta_time', time());
-
-	$post['post_status'] = 'trash';
-	wp_insert_post( wp_slash( $post ) );
-
-	wp_trash_post_comments($post_id);
-
-	/**
-	 * Fires after a post is sent to the trash.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param int $post_id Post ID.
-	 */
-	do_action( 'trashed_post', $post_id );
-
-	return $post;
-}
-
-/**
- * Restore a post or page from the Trash.
- *
- * @since 2.9.0
- *
- * @param int $post_id Optional. Post ID. Default is ID of the global $post.
- * @return WP_Post|false WP_Post object. False on failure.
- */
-function wp_untrash_post( $post_id = 0 ) {
-	if ( !$post = get_post($post_id, ARRAY_A) )
-		return $post;
-
-	if ( $post['post_status'] != 'trash' )
-		return false;
-
-	/**
-	 * Fires before a post is restored from the trash.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param int $post_id Post ID.
-	 */
-	do_action( 'untrash_post', $post_id );
-
-	$post_status = get_post_meta($post_id, '_wp_trash_meta_status', true);
-
-	$post['post_status'] = $post_status;
-
-	delete_post_meta($post_id, '_wp_trash_meta_status');
-	delete_post_meta($post_id, '_wp_trash_meta_time');
-
-	wp_insert_post( wp_slash( $post ) );
-
-	wp_untrash_post_comments($post_id);
-
-	/**
-	 * Fires after a post is restored from the trash.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param int $post_id Post ID.
-	 */
-	do_action( 'untrashed_post', $post_id );
-
-	return $post;
-}
-
-/**
- * Moves comments for a post to the trash.
- *
- * @since 2.9.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int|WP_Post|null $post Optional. Post ID or post object. Defaults to global $post.
- * @return mixed|void False on failure.
- */
-function wp_trash_post_comments( $post = null ) {
-	global $wpdb;
-
-	$post = get_post($post);
-	if ( empty($post) )
-		return;
-
-	$post_id = $post->ID;
-
-	/**
-	 * Fires before comments are sent to the trash.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param int $post_id Post ID.
-	 */
-	do_action( 'trash_post_comments', $post_id );
-
-	$comments = $wpdb->get_results( $wpdb->prepare("SELECT comment_ID, comment_approved FROM $wpdb->comments WHERE comment_post_ID = %d", $post_id) );
-	if ( empty($comments) )
-		return;
-
-	// Cache current status for each comment.
-	$statuses = array();
-	foreach ( $comments as $comment )
-		$statuses[$comment->comment_ID] = $comment->comment_approved;
-	add_post_meta($post_id, '_wp_trash_meta_comments_status', $statuses);
-
-	// Set status for all comments to post-trashed.
-	$result = $wpdb->update($wpdb->comments, array('comment_approved' => 'post-trashed'), array('comment_post_ID' => $post_id));
-
-	clean_comment_cache( array_keys($statuses) );
-
-	/**
-	 * Fires after comments are sent to the trash.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param int   $post_id  Post ID.
-	 * @param array $statuses Array of comment statuses.
-	 */
-	do_action( 'trashed_post_comments', $post_id, $statuses );
-
-	return $result;
-}
-
-/**
- * Restore comments for a post from the trash.
- *
- * @since 2.9.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int|WP_Post|null $post Optional. Post ID or post object. Defaults to global $post.
- * @return true|void
- */
-function wp_untrash_post_comments( $post = null ) {
-	global $wpdb;
-
-	$post = get_post($post);
-	if ( empty($post) )
-		return;
-
-	$post_id = $post->ID;
-
-	$statuses = get_post_meta($post_id, '_wp_trash_meta_comments_status', true);
-
-	if ( empty($statuses) )
-		return true;
-
-	/**
-	 * Fires before comments are restored for a post from the trash.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param int $post_id Post ID.
-	 */
-	do_action( 'untrash_post_comments', $post_id );
-
-	// Restore each comment to its original status.
-	$group_by_status = array();
-	foreach ( $statuses as $comment_id => $comment_status )
-		$group_by_status[$comment_status][] = $comment_id;
-
-	foreach ( $group_by_status as $status => $comments ) {
-		// Sanity check. This shouldn't happen.
-		if ( 'post-trashed' == $status ) {
-			$status = '0';
-		}
-		$comments_in = implode( ', ', array_map( 'intval', $comments ) );
-		$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->comments SET comment_approved = %s WHERE comment_ID IN ($comments_in)", $status ) );
-	}
-
-	clean_comment_cache( array_keys($statuses) );
-
-	delete_post_meta($post_id, '_wp_trash_meta_comments_status');
-
-	/**
-	 * Fires after comments are restored for a post from the trash.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param int $post_id Post ID.
-	 */
-	do_action( 'untrashed_post_comments', $post_id );
-}
-
-/**
- * Retrieve the list of categories for a post.
- *
- * Compatibility layer for themes and plugins. Also an easy layer of abstraction
- * away from the complexity of the taxonomy layer.
- *
- * @since 2.1.0
- *
- * @see wp_get_object_terms()
- *
- * @param int   $post_id Optional. The Post ID. Does not default to the ID of the
- *                       global $post. Default 0.
- * @param array $args    Optional. Category arguments. See wp_get_object_terms(). Default empty.
- * @return array List of categories. If the `$fields` argument passed via `$args` is 'all' or
- *               'all_with_object_id', an array of WP_Term objects will be returned. If `$fields`
- *               is 'ids', an array of category ids. If `$fields` is 'names', an array of category names.
- */
-function wp_get_post_categories( $post_id = 0, $args = array() ) {
-	$post_id = (int) $post_id;
-
-	$defaults = array('fields' => 'ids');
-	$args = wp_parse_args( $args, $defaults );
-
-	$cats = wp_get_object_terms($post_id, 'category', $args);
-	return $cats;
-}
-
-/**
- * Retrieve the tags for a post.
- *
- * There is only one default for this function, called 'fields' and by default
- * is set to 'all'. There are other defaults that can be overridden in
- * wp_get_object_terms().
- *
- * @since 2.3.0
- *
- * @param int   $post_id Optional. The Post ID. Does not default to the ID of the
- *                       global $post. Default 0.
- * @param array $args Optional. Overwrite the defaults
- * @return array List of post tags.
- */
-function wp_get_post_tags( $post_id = 0, $args = array() ) {
-	return wp_get_post_terms( $post_id, 'post_tag', $args);
-}
-
-/**
- * Retrieve the terms for a post.
- *
- * There is only one default for this function, called 'fields' and by default
- * is set to 'all'. There are other defaults that can be overridden in
- * wp_get_object_terms().
- *
- * @since 2.8.0
- *
- * @param int    $post_id  Optional. The Post ID. Does not default to the ID of the
- *                         global $post. Default 0.
- * @param string $taxonomy Optional. The taxonomy for which to retrieve terms. Default 'post_tag'.
- * @param array  $args     Optional. wp_get_object_terms() arguments. Default empty array.
- * @return array|WP_Error  List of post terms or empty array if no terms were found. WP_Error object
- *                         if `$taxonomy` doesn't exist.
- */
-function wp_get_post_terms( $post_id = 0, $taxonomy = 'post_tag', $args = array() ) {
-	$post_id = (int) $post_id;
-
-	$defaults = array('fields' => 'all');
-	$args = wp_parse_args( $args, $defaults );
-
-	$tags = wp_get_object_terms($post_id, $taxonomy, $args);
-
-	return $tags;
-}
-
-/**
- * Retrieve a number of recent posts.
- *
- * @since 1.0.0
- *
- * @see get_posts()
- *
- * @param array  $args       Optional. Arguments to retrieve posts. Default empty array.
- * @param string $output     Optional. Type of output. Accepts ARRAY_A or ''. Default ARRAY_A.
- * @return array|false Associative array if $output equals ARRAY_A, array or false if no results.
- */
-function wp_get_recent_posts( $args = array(), $output = ARRAY_A ) {
-
-	if ( is_numeric( $args ) ) {
-		_deprecated_argument( __FUNCTION__, '3.1.0', __( 'Passing an integer number of posts is deprecated. Pass an array of arguments instead.' ) );
-		$args = array( 'numberposts' => absint( $args ) );
-	}
-
-	// Set default arguments.
-	$defaults = array(
-		'numberposts' => 10, 'offset' => 0,
-		'category' => 0, 'orderby' => 'post_date',
-		'order' => 'DESC', 'include' => '',
-		'exclude' => '', 'meta_key' => '',
-		'meta_value' =>'', 'post_type' => 'post', 'post_status' => 'draft, publish, future, pending, private',
-		'suppress_filters' => true
-	);
-
-	$r = wp_parse_args( $args, $defaults );
-
-	$results = get_posts( $r );
-
-	// Backward compatibility. Prior to 3.1 expected posts to be returned in array.
-	if ( ARRAY_A == $output ){
-		foreach ( $results as $key => $result ) {
-			$results[$key] = get_object_vars( $result );
-		}
-		return $results ? $results : array();
-	}
-
-	return $results ? $results : false;
-
-}
-
-/**
- * Insert or update a post.
- *
- * If the $postarr parameter has 'ID' set to a value, then post will be updated.
- *
- * You can set the post date manually, by setting the values for 'post_date'
- * and 'post_date_gmt' keys. You can close the comments or open the comments by
- * setting the value for 'comment_status' key.
- *
- * @since 1.0.0
- * @since 4.2.0 Support was added for encoding emoji in the post title, content, and excerpt.
- * @since 4.4.0 A 'meta_input' array can now be passed to `$postarr` to add post meta data.
- *
- * @see sanitize_post()
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param array $postarr {
- *     An array of elements that make up a post to update or insert.
- *
- *     @type int    $ID                    The post ID. If equal to something other than 0,
- *                                         the post with that ID will be updated. Default 0.
- *     @type int    $post_author           The ID of the user who added the post. Default is
- *                                         the current user ID.
- *     @type string $post_date             The date of the post. Default is the current time.
- *     @type string $post_date_gmt         The date of the post in the GMT timezone. Default is
- *                                         the value of `$post_date`.
- *     @type mixed  $post_content          The post content. Default empty.
- *     @type string $post_content_filtered The filtered post content. Default empty.
- *     @type string $post_title            The post title. Default empty.
- *     @type string $post_excerpt          The post excerpt. Default empty.
- *     @type string $post_status           The post status. Default 'draft'.
- *     @type string $post_type             The post type. Default 'post'.
- *     @type string $comment_status        Whether the post can accept comments. Accepts 'open' or 'closed'.
- *                                         Default is the value of 'default_comment_status' option.
- *     @type string $ping_status           Whether the post can accept pings. Accepts 'open' or 'closed'.
- *                                         Default is the value of 'default_ping_status' option.
- *     @type string $post_password         The password to access the post. Default empty.
- *     @type string $post_name             The post name. Default is the sanitized post title
- *                                         when creating a new post.
- *     @type string $to_ping               Space or carriage return-separated list of URLs to ping.
- *                                         Default empty.
- *     @type string $pinged                Space or carriage return-separated list of URLs that have
- *                                         been pinged. Default empty.
- *     @type string $post_modified         The date when the post was last modified. Default is
- *                                         the current time.
- *     @type string $post_modified_gmt     The date when the post was last modified in the GMT
- *                                         timezone. Default is the current time.
- *     @type int    $post_parent           Set this for the post it belongs to, if any. Default 0.
- *     @type int    $menu_order            The order the post should be displayed in. Default 0.
- *     @type string $post_mime_type        The mime type of the post. Default empty.
- *     @type string $guid                  Global Unique ID for referencing the post. Default empty.
- *     @type array  $post_category         Array of category names, slugs, or IDs.
- *                                         Defaults to value of the 'default_category' option.
- *     @type array  $tax_input             Array of taxonomy terms keyed by their taxonomy name. Default empty.
- *     @type array  $meta_input            Array of post meta values keyed by their post meta key. Default empty.
- * }
- * @param bool  $wp_error Optional. Whether to return a WP_Error on failure. Default false.
- * @return int|WP_Error The post ID on success. The value 0 or WP_Error on failure.
- */
-function wp_insert_post( $postarr, $wp_error = false ) {
-	global $wpdb;
-
-	$user_id = get_current_user_id();
-
-	$defaults = array(
-		'post_author' => $user_id,
-		'post_content' => '',
-		'post_content_filtered' => '',
-		'post_title' => '',
-		'post_excerpt' => '',
-		'post_status' => 'draft',
-		'post_type' => 'post',
-		'comment_status' => '',
-		'ping_status' => '',
-		'post_password' => '',
-		'to_ping' =>  '',
-		'pinged' => '',
-		'post_parent' => 0,
-		'menu_order' => 0,
-		'guid' => '',
-		'import_id' => 0,
-		'context' => '',
-	);
-
-	$postarr = wp_parse_args($postarr, $defaults);
-
-	unset( $postarr[ 'filter' ] );
-
-	$postarr = sanitize_post($postarr, 'db');
-
-	// Are we updating or creating?
-	$post_ID = 0;
-	$update = false;
-	$guid = $postarr['guid'];
-
-	if ( ! empty( $postarr['ID'] ) ) {
-		$update = true;
-
-		// Get the post ID and GUID.
-		$post_ID = $postarr['ID'];
-		$post_before = get_post( $post_ID );
-		if ( is_null( $post_before ) ) {
-			if ( $wp_error ) {
-				return new WP_Error( 'invalid_post', __( 'Invalid post ID.' ) );
-			}
-			return 0;
-		}
-
-		$guid = get_post_field( 'guid', $post_ID );
-		$previous_status = get_post_field('post_status', $post_ID );
-	} else {
-		$previous_status = 'new';
-	}
-
-	$post_type = empty( $postarr['post_type'] ) ? 'post' : $postarr['post_type'];
-
-	$post_title = $postarr['post_title'];
-	$post_content = $postarr['post_content'];
-	$post_excerpt = $postarr['post_excerpt'];
-	if ( isset( $postarr['post_name'] ) ) {
-		$post_name = $postarr['post_name'];
-	} elseif ( $update ) {
-		// For an update, don't modify the post_name if it wasn't supplied as an argument.
-		$post_name = $post_before->post_name;
-	}
-
-	$maybe_empty = 'attachment' !== $post_type
-		&& ! $post_content && ! $post_title && ! $post_excerpt
-		&& post_type_supports( $post_type, 'editor' )
-		&& post_type_supports( $post_type, 'title' )
-		&& post_type_supports( $post_type, 'excerpt' );
-
-	/**
-	 * Filters whether the post should be considered "empty".
-	 *
-	 * The post is considered "empty" if both:
-	 * 1. The post type supports the title, editor, and excerpt fields
-	 * 2. The title, editor, and excerpt fields are all empty
-	 *
-	 * Returning a truthy value to the filter will effectively short-circuit
-	 * the new post being inserted, returning 0. If $wp_error is true, a WP_Error
-	 * will be returned instead.
-	 *
-	 * @since 3.3.0
-	 *
-	 * @param bool  $maybe_empty Whether the post should be considered "empty".
-	 * @param array $postarr     Array of post data.
-	 */
-	if ( apply_filters( 'wp_insert_post_empty_content', $maybe_empty, $postarr ) ) {
-		if ( $wp_error ) {
-			return new WP_Error( 'empty_content', __( 'Content, title, and excerpt are empty.' ) );
-		} else {
-			return 0;
-		}
-	}
-
-	$post_status = empty( $postarr['post_status'] ) ? 'draft' : $postarr['post_status'];
-	if ( 'attachment' === $post_type && ! in_array( $post_status, array( 'inherit', 'private', 'trash' ) ) ) {
-		$post_status = 'inherit';
-	}
-
-	if ( ! empty( $postarr['post_category'] ) ) {
-		// Filter out empty terms.
-		$post_category = array_filter( $postarr['post_category'] );
-	}
-
-	// Make sure we set a valid category.
-	if ( empty( $post_category ) || 0 == count( $post_category ) || ! is_array( $post_category ) ) {
-		// 'post' requires at least one category.
-		if ( 'post' == $post_type && 'auto-draft' != $post_status ) {
-			$post_category = array( get_option('default_category') );
-		} else {
-			$post_category = array();
-		}
-	}
-
-	// Don't allow contributors to set the post slug for pending review posts.
-	if ( 'pending' == $post_status && !current_user_can( 'publish_posts' ) ) {
-		$post_name = '';
-	}
-
-	/*
-	 * Create a valid post name. Drafts and pending posts are allowed to have
-	 * an empty post name.
-	 */
-	if ( empty($post_name) ) {
-		if ( !in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) ) {
-			$post_name = sanitize_title($post_title);
-		} else {
-			$post_name = '';
-		}
-	} else {
-		// On updates, we need to check to see if it's using the old, fixed sanitization context.
-		$check_name = sanitize_title( $post_name, '', 'old-save' );
-		if ( $update && strtolower( urlencode( $post_name ) ) == $check_name && get_post_field( 'post_name', $post_ID ) == $check_name ) {
-			$post_name = $check_name;
-		} else { // new post, or slug has changed.
-			$post_name = sanitize_title($post_name);
-		}
-	}
-
-	/*
-	 * If the post date is empty (due to having been new or a draft) and status
-	 * is not 'draft' or 'pending', set date to now.
-	 */
-	if ( empty( $postarr['post_date'] ) || '0000-00-00 00:00:00' == $postarr['post_date'] ) {
-		if ( empty( $postarr['post_date_gmt'] ) || '0000-00-00 00:00:00' == $postarr['post_date_gmt'] ) {
-			$post_date = current_time( 'mysql' );
-		} else {
-			$post_date = get_date_from_gmt( $postarr['post_date_gmt'] );
-		}
-	} else {
-		$post_date = $postarr['post_date'];
-	}
-
-	// Validate the date.
-	$mm = substr( $post_date, 5, 2 );
-	$jj = substr( $post_date, 8, 2 );
-	$aa = substr( $post_date, 0, 4 );
-	$valid_date = wp_checkdate( $mm, $jj, $aa, $post_date );
-	if ( ! $valid_date ) {
-		if ( $wp_error ) {
-			return new WP_Error( 'invalid_date', __( 'Whoops, the provided date is invalid.' ) );
-		} else {
-			return 0;
-		}
-	}
-
-	if ( empty( $postarr['post_date_gmt'] ) || '0000-00-00 00:00:00' == $postarr['post_date_gmt'] ) {
-		if ( ! in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) ) {
-			$post_date_gmt = get_gmt_from_date( $post_date );
-		} else {
-			$post_date_gmt = '0000-00-00 00:00:00';
-		}
-	} else {
-		$post_date_gmt = $postarr['post_date_gmt'];
-	}
-
-	if ( $update || '0000-00-00 00:00:00' == $post_date ) {
-		$post_modified     = current_time( 'mysql' );
-		$post_modified_gmt = current_time( 'mysql', 1 );
-	} else {
-		$post_modified     = $post_date;
-		$post_modified_gmt = $post_date_gmt;
-	}
-
-	if ( 'attachment' !== $post_type ) {
-		if ( 'publish' == $post_status ) {
-			$now = gmdate('Y-m-d H:i:59');
-			if ( mysql2date('U', $post_date_gmt, false) > mysql2date('U', $now, false) ) {
-				$post_status = 'future';
-			}
-		} elseif ( 'future' == $post_status ) {
-			$now = gmdate('Y-m-d H:i:59');
-			if ( mysql2date('U', $post_date_gmt, false) <= mysql2date('U', $now, false) ) {
-				$post_status = 'publish';
-			}
-		}
-	}
-
-	// Comment status.
-	if ( empty( $postarr['comment_status'] ) ) {
-		if ( $update ) {
-			$comment_status = 'closed';
-		} else {
-			$comment_status = get_default_comment_status( $post_type );
-		}
-	} else {
-		$comment_status = $postarr['comment_status'];
-	}
-
-	// These variables are needed by compact() later.
-	$post_content_filtered = $postarr['post_content_filtered'];
-	$post_author = isset( $postarr['post_author'] ) ? $postarr['post_author'] : $user_id;
-	$ping_status = empty( $postarr['ping_status'] ) ? get_default_comment_status( $post_type, 'pingback' ) : $postarr['ping_status'];
-	$to_ping = isset( $postarr['to_ping'] ) ? sanitize_trackback_urls( $postarr['to_ping'] ) : '';
-	$pinged = isset( $postarr['pinged'] ) ? $postarr['pinged'] : '';
-	$import_id = isset( $postarr['import_id'] ) ? $postarr['import_id'] : 0;
-
-	/*
-	 * The 'wp_insert_post_parent' filter expects all variables to be present.
-	 * Previously, these variables would have already been extracted
-	 */
-	if ( isset( $postarr['menu_order'] ) ) {
-		$menu_order = (int) $postarr['menu_order'];
-	} else {
-		$menu_order = 0;
-	}
-
-	$post_password = isset( $postarr['post_password'] ) ? $postarr['post_password'] : '';
-	if ( 'private' == $post_status ) {
-		$post_password = '';
-	}
-
-	if ( isset( $postarr['post_parent'] ) ) {
-		$post_parent = (int) $postarr['post_parent'];
-	} else {
-		$post_parent = 0;
-	}
-
-	/**
-	 * Filters the post parent -- used to check for and prevent hierarchy loops.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param int   $post_parent Post parent ID.
-	 * @param int   $post_ID     Post ID.
-	 * @param array $new_postarr Array of parsed post data.
-	 * @param array $postarr     Array of sanitized, but otherwise unmodified post data.
-	 */
-	$post_parent = apply_filters( 'wp_insert_post_parent', $post_parent, $post_ID, compact( array_keys( $postarr ) ), $postarr );
-
-	/*
-	 * If the post is being untrashed and it has a desired slug stored in post meta,
-	 * reassign it.
-	 */
-	if ( 'trash' === $previous_status && 'trash' !== $post_status ) {
-		$desired_post_slug = get_post_meta( $post_ID, '_wp_desired_post_slug', true );
-		if ( $desired_post_slug ) {
-			delete_post_meta( $post_ID, '_wp_desired_post_slug' );
-			$post_name = $desired_post_slug;
-		}
-	}
-
-	// If a trashed post has the desired slug, change it and let this post have it.
-	if ( 'trash' !== $post_status && $post_name ) {
-		wp_add_trashed_suffix_to_post_name_for_trashed_posts( $post_name, $post_ID );
-	}
-
-	// When trashing an existing post, change its slug to allow non-trashed posts to use it.
-	if ( 'trash' === $post_status && 'trash' !== $previous_status && 'new' !== $previous_status ) {
-		$post_name = wp_add_trashed_suffix_to_post_name_for_post( $post_ID );
-	}
-
-	$post_name = wp_unique_post_slug( $post_name, $post_ID, $post_status, $post_type, $post_parent );
-
-	// Don't unslash.
-	$post_mime_type = isset( $postarr['post_mime_type'] ) ? $postarr['post_mime_type'] : '';
-
-	// Expected_slashed (everything!).
-	$data = compact( 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_content_filtered', 'post_title', 'post_excerpt', 'post_status', 'post_type', 'comment_status', 'ping_status', 'post_password', 'post_name', 'to_ping', 'pinged', 'post_modified', 'post_modified_gmt', 'post_parent', 'menu_order', 'post_mime_type', 'guid' );
-
-	$emoji_fields = array( 'post_title', 'post_content', 'post_excerpt' );
-
-	foreach ( $emoji_fields as $emoji_field ) {
-		if ( isset( $data[ $emoji_field ] ) ) {
-			$charset = $wpdb->get_col_charset( $wpdb->posts, $emoji_field );
-			if ( 'utf8' === $charset ) {
-				$data[ $emoji_field ] = wp_encode_emoji( $data[ $emoji_field ] );
-			}
-		}
-	}
-
-	if ( 'attachment' === $post_type ) {
-		/**
-		 * Filters attachment post data before it is updated in or added to the database.
-		 *
-		 * @since 3.9.0
-		 *
-		 * @param array $data    An array of sanitized attachment post data.
-		 * @param array $postarr An array of unsanitized attachment post data.
-		 */
-		$data = apply_filters( 'wp_insert_attachment_data', $data, $postarr );
-	} else {
-		/**
-		 * Filters slashed post data just before it is inserted into the database.
-		 *
-		 * @since 2.7.0
-		 *
-		 * @param array $data    An array of slashed post data.
-		 * @param array $postarr An array of sanitized, but otherwise unmodified post data.
-		 */
-		$data = apply_filters( 'wp_insert_post_data', $data, $postarr );
-	}
-	$data = wp_unslash( $data );
-	$where = array( 'ID' => $post_ID );
-
-	if ( $update ) {
-		/**
-		 * Fires immediately before an existing post is updated in the database.
-		 *
-		 * @since 2.5.0
-		 *
-		 * @param int   $post_ID Post ID.
-		 * @param array $data    Array of unslashed post data.
-		 */
-		do_action( 'pre_post_update', $post_ID, $data );
-		if ( false === $wpdb->update( $wpdb->posts, $data, $where ) ) {
-			if ( $wp_error ) {
-				return new WP_Error('db_update_error', __('Could not update post in the database'), $wpdb->last_error);
-			} else {
-				return 0;
-			}
-		}
-	} else {
-		// If there is a suggested ID, use it if not already present.
-		if ( ! empty( $import_id ) ) {
-			$import_id = (int) $import_id;
-			if ( ! $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE ID = %d", $import_id) ) ) {
-				$data['ID'] = $import_id;
-			}
-		}
-		if ( false === $wpdb->insert( $wpdb->posts, $data ) ) {
-			if ( $wp_error ) {
-				return new WP_Error('db_insert_error', __('Could not insert post into the database'), $wpdb->last_error);
-			} else {
-				return 0;
-			}
-		}
-		$post_ID = (int) $wpdb->insert_id;
-
-		// Use the newly generated $post_ID.
-		$where = array( 'ID' => $post_ID );
-	}
-
-	if ( empty( $data['post_name'] ) && ! in_array( $data['post_status'], array( 'draft', 'pending', 'auto-draft' ) ) ) {
-		$data['post_name'] = wp_unique_post_slug( sanitize_title( $data['post_title'], $post_ID ), $post_ID, $data['post_status'], $post_type, $post_parent );
-		$wpdb->update( $wpdb->posts, array( 'post_name' => $data['post_name'] ), $where );
-		clean_post_cache( $post_ID );
-	}
-
-	if ( is_object_in_taxonomy( $post_type, 'category' ) ) {
-		wp_set_post_categories( $post_ID, $post_category );
-	}
-
-	if ( isset( $postarr['tags_input'] ) && is_object_in_taxonomy( $post_type, 'post_tag' ) ) {
-		wp_set_post_tags( $post_ID, $postarr['tags_input'] );
-	}
-
-	// New-style support for all custom taxonomies.
-	if ( ! empty( $postarr['tax_input'] ) ) {
-		foreach ( $postarr['tax_input'] as $taxonomy => $tags ) {
-			$taxonomy_obj = get_taxonomy($taxonomy);
-			if ( ! $taxonomy_obj ) {
-				/* translators: %s: taxonomy name */
-				_doing_it_wrong( __FUNCTION__, sprintf( __( 'Invalid taxonomy: %s.' ), $taxonomy ), '4.4.0' );
-				continue;
-			}
-
-			// array = hierarchical, string = non-hierarchical.
-			if ( is_array( $tags ) ) {
-				$tags = array_filter($tags);
-			}
-			if ( current_user_can( $taxonomy_obj->cap->assign_terms ) ) {
-				wp_set_post_terms( $post_ID, $tags, $taxonomy );
-			}
-		}
-	}
-
-	if ( ! empty( $postarr['meta_input'] ) ) {
-		foreach ( $postarr['meta_input'] as $field => $value ) {
-			update_post_meta( $post_ID, $field, $value );
-		}
-	}
-
-	$current_guid = get_post_field( 'guid', $post_ID );
-
-	// Set GUID.
-	if ( ! $update && '' == $current_guid ) {
-		$wpdb->update( $wpdb->posts, array( 'guid' => get_permalink( $post_ID ) ), $where );
-	}
-
-	if ( 'attachment' === $postarr['post_type'] ) {
-		if ( ! empty( $postarr['file'] ) ) {
-			update_attached_file( $post_ID, $postarr['file'] );
-		}
-
-		if ( ! empty( $postarr['context'] ) ) {
-			add_post_meta( $post_ID, '_wp_attachment_context', $postarr['context'], true );
-		}
-	}
-
-	// Set or remove featured image.
-	if ( isset( $postarr['_thumbnail_id'] ) ) {
-		$thumbnail_support = current_theme_supports( 'post-thumbnails', $post_type ) && post_type_supports( $post_type, 'thumbnail' ) || 'revision' === $post_type;
-		if ( ! $thumbnail_support && 'attachment' === $post_type && $post_mime_type ) {
-			if ( wp_attachment_is( 'audio', $post_ID ) ) {
-				$thumbnail_support = post_type_supports( 'attachment:audio', 'thumbnail' ) || current_theme_supports( 'post-thumbnails', 'attachment:audio' );
-			} elseif ( wp_attachment_is( 'video', $post_ID ) ) {
-				$thumbnail_support = post_type_supports( 'attachment:video', 'thumbnail' ) || current_theme_supports( 'post-thumbnails', 'attachment:video' );
-			}
-		}
-
-		if ( $thumbnail_support ) {
-			$thumbnail_id = intval( $postarr['_thumbnail_id'] );
-			if ( -1 === $thumbnail_id ) {
-				delete_post_thumbnail( $post_ID );
-			} else {
-				set_post_thumbnail( $post_ID, $thumbnail_id );
-			}
-		}
-	}
-
-	clean_post_cache( $post_ID );
-
-	$post = get_post( $post_ID );
-
-	if ( ! empty( $postarr['page_template'] ) && 'page' == $data['post_type'] ) {
-		$post->page_template = $postarr['page_template'];
-		$page_templates = wp_get_theme()->get_page_templates( $post );
-		if ( 'default' != $postarr['page_template'] && ! isset( $page_templates[ $postarr['page_template'] ] ) ) {
-			if ( $wp_error ) {
-				return new WP_Error('invalid_page_template', __('The page template is invalid.'));
-			}
-			update_post_meta( $post_ID, '_wp_page_template', 'default' );
-		} else {
-			update_post_meta( $post_ID, '_wp_page_template', $postarr['page_template'] );
-		}
-	}
-
-	if ( 'attachment' !== $postarr['post_type'] ) {
-		wp_transition_post_status( $data['post_status'], $previous_status, $post );
-	} else {
-		if ( $update ) {
-			/**
-			 * Fires once an existing attachment has been updated.
-			 *
-			 * @since 2.0.0
-			 *
-			 * @param int $post_ID Attachment ID.
-			 */
-			do_action( 'edit_attachment', $post_ID );
-			$post_after = get_post( $post_ID );
-
-			/**
-			 * Fires once an existing attachment has been updated.
-			 *
-			 * @since 4.4.0
-			 *
-			 * @param int     $post_ID      Post ID.
-			 * @param WP_Post $post_after   Post object following the update.
-			 * @param WP_Post $post_before  Post object before the update.
-			 */
-			do_action( 'attachment_updated', $post_ID, $post_after, $post_before );
-		} else {
-
-			/**
-			 * Fires once an attachment has been added.
-			 *
-			 * @since 2.0.0
-			 *
-			 * @param int $post_ID Attachment ID.
-			 */
-			do_action( 'add_attachment', $post_ID );
-		}
-
-		return $post_ID;
-	}
-
-	if ( $update ) {
-		/**
-		 * Fires once an existing post has been updated.
-		 *
-		 * @since 1.2.0
-		 *
-		 * @param int     $post_ID Post ID.
-		 * @param WP_Post $post    Post object.
-		 */
-		do_action( 'edit_post', $post_ID, $post );
-		$post_after = get_post($post_ID);
-
-		/**
-		 * Fires once an existing post has been updated.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param int     $post_ID      Post ID.
-		 * @param WP_Post $post_after   Post object following the update.
-		 * @param WP_Post $post_before  Post object before the update.
-		 */
-		do_action( 'post_updated', $post_ID, $post_after, $post_before);
-	}
-
-	/**
-	 * Fires once a post has been saved.
-	 *
-	 * The dynamic portion of the hook name, `$post->post_type`, refers to
-	 * the post type slug.
-	 *
-	 * @since 3.7.0
-	 *
-	 * @param int     $post_ID Post ID.
-	 * @param WP_Post $post    Post object.
-	 * @param bool    $update  Whether this is an existing post being updated or not.
-	 */
-	do_action( "save_post_{$post->post_type}", $post_ID, $post, $update );
-
-	/**
-	 * Fires once a post has been saved.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param int     $post_ID Post ID.
-	 * @param WP_Post $post    Post object.
-	 * @param bool    $update  Whether this is an existing post being updated or not.
-	 */
-	do_action( 'save_post', $post_ID, $post, $update );
-
-	/**
-	 * Fires once a post has been saved.
-	 *
-	 * @since 2.0.0
-	 *
-	 * @param int     $post_ID Post ID.
-	 * @param WP_Post $post    Post object.
-	 * @param bool    $update  Whether this is an existing post being updated or not.
-	 */
-	do_action( 'wp_insert_post', $post_ID, $post, $update );
-
-	return $post_ID;
-}
-
-/**
- * Update a post with new post data.
- *
- * The date does not have to be set for drafts. You can set the date and it will
- * not be overridden.
- *
- * @since 1.0.0
- *
- * @param array|object $postarr  Optional. Post data. Arrays are expected to be escaped,
- *                               objects are not. Default array.
- * @param bool         $wp_error Optional. Allow return of WP_Error on failure. Default false.
- * @return int|WP_Error The value 0 or WP_Error on failure. The post ID on success.
- */
-function wp_update_post( $postarr = array(), $wp_error = false ) {
-	if ( is_object($postarr) ) {
-		// Non-escaped post was passed.
-		$postarr = get_object_vars($postarr);
-		$postarr = wp_slash($postarr);
-	}
-
-	// First, get all of the original fields.
-	$post = get_post($postarr['ID'], ARRAY_A);
-
-	if ( is_null( $post ) ) {
-		if ( $wp_error )
-			return new WP_Error( 'invalid_post', __( 'Invalid post ID.' ) );
-		return 0;
-	}
-
-	// Escape data pulled from DB.
-	$post = wp_slash($post);
-
-	// Passed post category list overwrites existing category list if not empty.
-	if ( isset($postarr['post_category']) && is_array($postarr['post_category'])
-			 && 0 != count($postarr['post_category']) )
-		$post_cats = $postarr['post_category'];
-	else
-		$post_cats = $post['post_category'];
-
-	// Drafts shouldn't be assigned a date unless explicitly done so by the user.
-	if ( isset( $post['post_status'] ) && in_array($post['post_status'], array('draft', 'pending', 'auto-draft')) && empty($postarr['edit_date']) &&
-			 ('0000-00-00 00:00:00' == $post['post_date_gmt']) )
-		$clear_date = true;
-	else
-		$clear_date = false;
-
-	// Merge old and new fields with new fields overwriting old ones.
-	$postarr = array_merge($post, $postarr);
-	$postarr['post_category'] = $post_cats;
-	if ( $clear_date ) {
-		$postarr['post_date'] = current_time('mysql');
-		$postarr['post_date_gmt'] = '';
-	}
-
-	if ($postarr['post_type'] == 'attachment')
-		return wp_insert_attachment($postarr);
-
-	return wp_insert_post( $postarr, $wp_error );
-}
-
-/**
- * Publish a post by transitioning the post status.
- *
- * @since 2.1.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int|WP_Post $post Post ID or post object.
- */
-function wp_publish_post( $post ) {
-	global $wpdb;
-
-	if ( ! $post = get_post( $post ) )
-		return;
-
-	if ( 'publish' == $post->post_status )
-		return;
-
-	$wpdb->update( $wpdb->posts, array( 'post_status' => 'publish' ), array( 'ID' => $post->ID ) );
-
-	clean_post_cache( $post->ID );
-
-	$old_status = $post->post_status;
-	$post->post_status = 'publish';
-	wp_transition_post_status( 'publish', $old_status, $post );
-
-	/** This action is documented in wp-includes/post.php */
-	do_action( 'edit_post', $post->ID, $post );
-
-	/** This action is documented in wp-includes/post.php */
-	do_action( "save_post_{$post->post_type}", $post->ID, $post, true );
-
-	/** This action is documented in wp-includes/post.php */
-	do_action( 'save_post', $post->ID, $post, true );
-
-	/** This action is documented in wp-includes/post.php */
-	do_action( 'wp_insert_post', $post->ID, $post, true );
-}
-
-/**
- * Publish future post and make sure post ID has future post status.
- *
- * Invoked by cron 'publish_future_post' event. This safeguard prevents cron
- * from publishing drafts, etc.
- *
- * @since 2.5.0
- *
- * @param int|WP_Post $post_id Post ID or post object.
- */
-function check_and_publish_future_post( $post_id ) {
-	$post = get_post($post_id);
-
-	if ( empty($post) )
-		return;
-
-	if ( 'future' != $post->post_status )
-		return;
-
-	$time = strtotime( $post->post_date_gmt . ' GMT' );
-
-	// Uh oh, someone jumped the gun!
-	if ( $time > time() ) {
-		wp_clear_scheduled_hook( 'publish_future_post', array( $post_id ) ); // clear anything else in the system
-		wp_schedule_single_event( $time, 'publish_future_post', array( $post_id ) );
-		return;
-	}
-
-	// wp_publish_post() returns no meaningful value.
-	wp_publish_post( $post_id );
-}
-
-/**
- * Computes a unique slug for the post, when given the desired slug and some post details.
- *
- * @since 2.8.0
- *
- * @global wpdb       $wpdb WordPress database abstraction object.
- * @global WP_Rewrite $wp_rewrite
- *
- * @param string $slug        The desired slug (post_name).
- * @param int    $post_ID     Post ID.
- * @param string $post_status No uniqueness checks are made if the post is still draft or pending.
- * @param string $post_type   Post type.
- * @param int    $post_parent Post parent ID.
- * @return string Unique slug for the post, based on $post_name (with a -1, -2, etc. suffix)
- */
-function wp_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_parent ) {
-	if ( in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) || ( 'inherit' == $post_status && 'revision' == $post_type ) )
-		return $slug;
-
-	global $wpdb, $wp_rewrite;
-
-	$original_slug = $slug;
-
-	$feeds = $wp_rewrite->feeds;
-	if ( ! is_array( $feeds ) )
-		$feeds = array();
-
-	if ( 'attachment' == $post_type ) {
-		// Attachment slugs must be unique across all types.
-		$check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND ID != %d LIMIT 1";
-		$post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $slug, $post_ID ) );
-
-		/**
-		 * Filters whether the post slug would make a bad attachment slug.
-		 *
-		 * @since 3.1.0
-		 *
-		 * @param bool   $bad_slug Whether the slug would be bad as an attachment slug.
-		 * @param string $slug     The post slug.
-		 */
-		if ( $post_name_check || in_array( $slug, $feeds ) || 'embed' === $slug || apply_filters( 'wp_unique_post_slug_is_bad_attachment_slug', false, $slug ) ) {
-			$suffix = 2;
-			do {
-				$alt_post_name = _truncate_post_slug( $slug, 200 - ( strlen( $suffix ) + 1 ) ) . "-$suffix";
-				$post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $alt_post_name, $post_ID ) );
-				$suffix++;
-			} while ( $post_name_check );
-			$slug = $alt_post_name;
-		}
-	} elseif ( is_post_type_hierarchical( $post_type ) ) {
-		if ( 'nav_menu_item' == $post_type )
-			return $slug;
-
-		/*
-		 * Page slugs must be unique within their own trees. Pages are in a separate
-		 * namespace than posts so page slugs are allowed to overlap post slugs.
-		 */
-		$check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND post_type IN ( %s, 'attachment' ) AND ID != %d AND post_parent = %d LIMIT 1";
-		$post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $slug, $post_type, $post_ID, $post_parent ) );
-
-		/**
-		 * Filters whether the post slug would make a bad hierarchical post slug.
-		 *
-		 * @since 3.1.0
-		 *
-		 * @param bool   $bad_slug    Whether the post slug would be bad in a hierarchical post context.
-		 * @param string $slug        The post slug.
-		 * @param string $post_type   Post type.
-		 * @param int    $post_parent Post parent ID.
-		 */
-		if ( $post_name_check || in_array( $slug, $feeds ) || 'embed' === $slug || preg_match( "@^($wp_rewrite->pagination_base)?\d+$@", $slug )  || apply_filters( 'wp_unique_post_slug_is_bad_hierarchical_slug', false, $slug, $post_type, $post_parent ) ) {
-			$suffix = 2;
-			do {
-				$alt_post_name = _truncate_post_slug( $slug, 200 - ( strlen( $suffix ) + 1 ) ) . "-$suffix";
-				$post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $alt_post_name, $post_type, $post_ID, $post_parent ) );
-				$suffix++;
-			} while ( $post_name_check );
-			$slug = $alt_post_name;
-		}
-	} else {
-		// Post slugs must be unique across all posts.
-		$check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND post_type = %s AND ID != %d LIMIT 1";
-		$post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $slug, $post_type, $post_ID ) );
-
-		// Prevent new post slugs that could result in URLs that conflict with date archives.
-		$post = get_post( $post_ID );
-		$conflicts_with_date_archive = false;
-		if ( 'post' === $post_type && ( ! $post || $post->post_name !== $slug ) && preg_match( '/^[0-9]+$/', $slug ) && $slug_num = intval( $slug ) ) {
-			$permastructs   = array_values( array_filter( explode( '/', get_option( 'permalink_structure' ) ) ) );
-			$postname_index = array_search( '%postname%', $permastructs );
-
-			/*
-			 * Potential date clashes are as follows:
-			 *
-			 * - Any integer in the first permastruct position could be a year.
-			 * - An integer between 1 and 12 that follows 'year' conflicts with 'monthnum'.
-			 * - An integer between 1 and 31 that follows 'monthnum' conflicts with 'day'.
-			 */
-			if ( 0 === $postname_index ||
-				( $postname_index && '%year%' === $permastructs[ $postname_index - 1 ] && 13 > $slug_num ) ||
-				( $postname_index && '%monthnum%' === $permastructs[ $postname_index - 1 ] && 32 > $slug_num )
-			) {
-				$conflicts_with_date_archive = true;
-			}
-		}
-
-		/**
-		 * Filters whether the post slug would be bad as a flat slug.
-		 *
-		 * @since 3.1.0
-		 *
-		 * @param bool   $bad_slug  Whether the post slug would be bad as a flat slug.
-		 * @param string $slug      The post slug.
-		 * @param string $post_type Post type.
-		 */
-		if ( $post_name_check || in_array( $slug, $feeds ) || 'embed' === $slug || $conflicts_with_date_archive || apply_filters( 'wp_unique_post_slug_is_bad_flat_slug', false, $slug, $post_type ) ) {
-			$suffix = 2;
-			do {
-				$alt_post_name = _truncate_post_slug( $slug, 200 - ( strlen( $suffix ) + 1 ) ) . "-$suffix";
-				$post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $alt_post_name, $post_type, $post_ID ) );
-				$suffix++;
-			} while ( $post_name_check );
-			$slug = $alt_post_name;
-		}
-	}
-
-	/**
-	 * Filters the unique post slug.
-	 *
-	 * @since 3.3.0
-	 *
-	 * @param string $slug          The post slug.
-	 * @param int    $post_ID       Post ID.
-	 * @param string $post_status   The post status.
-	 * @param string $post_type     Post type.
-	 * @param int    $post_parent   Post parent ID
-	 * @param string $original_slug The original post slug.
-	 */
-	return apply_filters( 'wp_unique_post_slug', $slug, $post_ID, $post_status, $post_type, $post_parent, $original_slug );
-}
-
-/**
- * Truncate a post slug.
- *
- * @since 3.6.0
- * @access private
- *
- * @see utf8_uri_encode()
- *
- * @param string $slug   The slug to truncate.
- * @param int    $length Optional. Max length of the slug. Default 200 (characters).
- * @return string The truncated slug.
- */
-function _truncate_post_slug( $slug, $length = 200 ) {
-	if ( strlen( $slug ) > $length ) {
-		$decoded_slug = urldecode( $slug );
-		if ( $decoded_slug === $slug )
-			$slug = substr( $slug, 0, $length );
-		else
-			$slug = utf8_uri_encode( $decoded_slug, $length );
-	}
-
-	return rtrim( $slug, '-' );
-}
-
-/**
- * Add tags to a post.
- *
- * @see wp_set_post_tags()
- *
- * @since 2.3.0
- *
- * @param int          $post_id Optional. The Post ID. Does not default to the ID of the global $post.
- * @param string|array $tags    Optional. An array of tags to set for the post, or a string of tags
- *                              separated by commas. Default empty.
- * @return array|false|WP_Error Array of affected term IDs. WP_Error or false on failure.
- */
-function wp_add_post_tags( $post_id = 0, $tags = '' ) {
-	return wp_set_post_tags($post_id, $tags, true);
-}
-
-/**
- * Set the tags for a post.
- *
- * @since 2.3.0
- *
- * @see wp_set_object_terms()
- *
- * @param int          $post_id Optional. The Post ID. Does not default to the ID of the global $post.
- * @param string|array $tags    Optional. An array of tags to set for the post, or a string of tags
- *                              separated by commas. Default empty.
- * @param bool         $append  Optional. If true, don't delete existing tags, just add on. If false,
- *                              replace the tags with the new tags. Default false.
- * @return array|false|WP_Error Array of term taxonomy IDs of affected terms. WP_Error or false on failure.
- */
-function wp_set_post_tags( $post_id = 0, $tags = '', $append = false ) {
-	return wp_set_post_terms( $post_id, $tags, 'post_tag', $append);
-}
-
-/**
- * Set the terms for a post.
- *
- * @since 2.8.0
- *
- * @see wp_set_object_terms()
- *
- * @param int          $post_id  Optional. The Post ID. Does not default to the ID of the global $post.
- * @param string|array $tags     Optional. An array of terms to set for the post, or a string of terms
- *                               separated by commas. Default empty.
- * @param string       $taxonomy Optional. Taxonomy name. Default 'post_tag'.
- * @param bool         $append   Optional. If true, don't delete existing terms, just add on. If false,
- *                               replace the terms with the new terms. Default false.
- * @return array|false|WP_Error Array of term taxonomy IDs of affected terms. WP_Error or false on failure.
- */
-function wp_set_post_terms( $post_id = 0, $tags = '', $taxonomy = 'post_tag', $append = false ) {
-	$post_id = (int) $post_id;
-
-	if ( !$post_id )
-		return false;
-
-	if ( empty($tags) )
-		$tags = array();
-
-	if ( ! is_array( $tags ) ) {
-		$comma = _x( ',', 'tag delimiter' );
-		if ( ',' !== $comma )
-			$tags = str_replace( $comma, ',', $tags );
-		$tags = explode( ',', trim( $tags, " \n\t\r\0\x0B," ) );
-	}
-
-	/*
-	 * Hierarchical taxonomies must always pass IDs rather than names so that
-	 * children with the same names but different parents aren't confused.
-	 */
-	if ( is_taxonomy_hierarchical( $taxonomy ) ) {
-		$tags = array_unique( array_map( 'intval', $tags ) );
-	}
-
-	return wp_set_object_terms( $post_id, $tags, $taxonomy, $append );
-}
-
-/**
- * Set categories for a post.
- *
- * If the post categories parameter is not set, then the default category is
- * going used.
- *
- * @since 2.1.0
- *
- * @param int       $post_ID         Optional. The Post ID. Does not default to the ID
- *                                   of the global $post. Default 0.
- * @param array|int $post_categories Optional. List of categories or ID of category.
- *                                   Default empty array.
- * @param bool      $append         If true, don't delete existing categories, just add on.
- *                                  If false, replace the categories with the new categories.
- * @return array|false|WP_Error Array of term taxonomy IDs of affected categories. WP_Error or false on failure.
- */
-function wp_set_post_categories( $post_ID = 0, $post_categories = array(), $append = false ) {
-	$post_ID = (int) $post_ID;
-	$post_type = get_post_type( $post_ID );
-	$post_status = get_post_status( $post_ID );
-	// If $post_categories isn't already an array, make it one:
-	$post_categories = (array) $post_categories;
-	if ( empty( $post_categories ) ) {
-		if ( 'post' == $post_type && 'auto-draft' != $post_status ) {
-			$post_categories = array( get_option('default_category') );
-			$append = false;
-		} else {
-			$post_categories = array();
-		}
-	} elseif ( 1 == count( $post_categories ) && '' == reset( $post_categories ) ) {
-		return true;
-	}
-
-	return wp_set_post_terms( $post_ID, $post_categories, 'category', $append );
-}
-
-/**
- * Fires actions related to the transitioning of a post's status.
- *
- * When a post is saved, the post status is "transitioned" from one status to another,
- * though this does not always mean the status has actually changed before and after
- * the save. This function fires a number of action hooks related to that transition:
- * the generic {@see 'transition_post_status'} action, as well as the dynamic hooks
- * {@see '$old_status_to_$new_status'} and {@see '$new_status_$post->post_type'}. Note
- * that the function does not transition the post object in the database.
- *
- * For instance: When publishing a post for the first time, the post status may transition
- * from 'draft' – or some other status – to 'publish'. However, if a post is already
- * published and is simply being updated, the "old" and "new" statuses may both be 'publish'
- * before and after the transition.
- *
- * @since 2.3.0
- *
- * @param string  $new_status Transition to this post status.
- * @param string  $old_status Previous post status.
- * @param WP_Post $post Post data.
- */
-function wp_transition_post_status( $new_status, $old_status, $post ) {
-	/**
-	 * Fires when a post is transitioned from one status to another.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param string  $new_status New post status.
-	 * @param string  $old_status Old post status.
-	 * @param WP_Post $post       Post object.
-	 */
-	do_action( 'transition_post_status', $new_status, $old_status, $post );
-
-	/**
-	 * Fires when a post is transitioned from one status to another.
-	 *
-	 * The dynamic portions of the hook name, `$new_status` and `$old status`,
-	 * refer to the old and new post statuses, respectively.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param WP_Post $post Post object.
-	 */
-	do_action( "{$old_status}_to_{$new_status}", $post );
-
-	/**
-	 * Fires when a post is transitioned from one status to another.
-	 *
-	 * The dynamic portions of the hook name, `$new_status` and `$post->post_type`,
-	 * refer to the new post status and post type, respectively.
-	 *
-	 * Please note: When this action is hooked using a particular post status (like
-	 * 'publish', as `publish_{$post->post_type}`), it will fire both when a post is
-	 * first transitioned to that status from something else, as well as upon
-	 * subsequent post updates (old and new status are both the same).
-	 *
-	 * Therefore, if you are looking to only fire a callback when a post is first
-	 * transitioned to a status, use the {@see 'transition_post_status'} hook instead.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param int     $post_id Post ID.
-	 * @param WP_Post $post    Post object.
-	 */
-	do_action( "{$new_status}_{$post->post_type}", $post->ID, $post );
-}
-
-//
-// Comment, trackback, and pingback functions.
-//
-
-/**
- * Add a URL to those already pinged.
- *
- * @since 1.5.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int    $post_id Post ID.
- * @param string $uri     Ping URI.
- * @return int|false How many rows were updated.
- */
-function add_ping( $post_id, $uri ) {
-	global $wpdb;
-	$pung = $wpdb->get_var( $wpdb->prepare( "SELECT pinged FROM $wpdb->posts WHERE ID = %d", $post_id ));
-	$pung = trim($pung);
-	$pung = preg_split('/\s/', $pung);
-	$pung[] = $uri;
-	$new = implode("\n", $pung);
-
-	/**
-	 * Filters the new ping URL to add for the given post.
-	 *
-	 * @since 2.0.0
-	 *
-	 * @param string $new New ping URL to add.
-	 */
-	$new = apply_filters( 'add_ping', $new );
-
-	// expected_slashed ($new).
-	$new = wp_unslash($new);
-	return $wpdb->update( $wpdb->posts, array( 'pinged' => $new ), array( 'ID' => $post_id ) );
-}
-
-/**
- * Retrieve enclosures already enclosed for a post.
- *
- * @since 1.5.0
- *
- * @param int $post_id Post ID.
- * @return array List of enclosures.
- */
-function get_enclosed( $post_id ) {
-	$custom_fields = get_post_custom( $post_id );
-	$pung = array();
-	if ( !is_array( $custom_fields ) )
-		return $pung;
-
-	foreach ( $custom_fields as $key => $val ) {
-		if ( 'enclosure' != $key || !is_array( $val ) )
-			continue;
-		foreach ( $val as $enc ) {
-			$enclosure = explode( "\n", $enc );
-			$pung[] = trim( $enclosure[ 0 ] );
-		}
-	}
-
-	/**
-	 * Filters the list of enclosures already enclosed for the given post.
-	 *
-	 * @since 2.0.0
-	 *
-	 * @param array $pung    Array of enclosures for the given post.
-	 * @param int   $post_id Post ID.
-	 */
-	return apply_filters( 'get_enclosed', $pung, $post_id );
-}
-
-/**
- * Retrieve URLs already pinged for a post.
- *
- * @since 1.5.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int $post_id Post ID.
- * @return array
- */
-function get_pung( $post_id ) {
-	global $wpdb;
-	$pung = $wpdb->get_var( $wpdb->prepare( "SELECT pinged FROM $wpdb->posts WHERE ID = %d", $post_id ));
-	$pung = trim($pung);
-	$pung = preg_split('/\s/', $pung);
-
-	/**
-	 * Filters the list of already-pinged URLs for the given post.
-	 *
-	 * @since 2.0.0
-	 *
-	 * @param array $pung Array of URLs already pinged for the given post.
-	 */
-	return apply_filters( 'get_pung', $pung );
-}
-
-/**
- * Retrieve URLs that need to be pinged.
- *
- * @since 1.5.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int $post_id Post ID
- * @return array
- */
-function get_to_ping( $post_id ) {
-	global $wpdb;
-	$to_ping = $wpdb->get_var( $wpdb->prepare( "SELECT to_ping FROM $wpdb->posts WHERE ID = %d", $post_id ));
-	$to_ping = sanitize_trackback_urls( $to_ping );
-	$to_ping = preg_split('/\s/', $to_ping, -1, PREG_SPLIT_NO_EMPTY);
-
-	/**
-	 * Filters the list of URLs yet to ping for the given post.
-	 *
-	 * @since 2.0.0
-	 *
-	 * @param array $to_ping List of URLs yet to ping.
-	 */
-	return apply_filters( 'get_to_ping', $to_ping );
-}
-
-/**
- * Do trackbacks for a list of URLs.
- *
- * @since 1.0.0
- *
- * @param string $tb_list Comma separated list of URLs.
- * @param int    $post_id Post ID.
- */
-function trackback_url_list( $tb_list, $post_id ) {
-	if ( ! empty( $tb_list ) ) {
-		// Get post data.
-		$postdata = get_post( $post_id, ARRAY_A );
-
-		// Form an excerpt.
-		$excerpt = strip_tags( $postdata['post_excerpt'] ? $postdata['post_excerpt'] : $postdata['post_content'] );
-
-		if ( strlen( $excerpt ) > 255 ) {
-			$excerpt = substr( $excerpt, 0, 252 ) . '&hellip;';
-		}
-
-		$trackback_urls = explode( ',', $tb_list );
-		foreach ( (array) $trackback_urls as $tb_url ) {
-			$tb_url = trim( $tb_url );
-			trackback( $tb_url, wp_unslash( $postdata['post_title'] ), $excerpt, $post_id );
-		}
-	}
-}
-
-//
-// Page functions
-//
-
-/**
- * Get a list of page IDs.
- *
- * @since 2.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @return array List of page IDs.
- */
-function get_all_page_ids() {
-	global $wpdb;
-
-	$page_ids = wp_cache_get('all_page_ids', 'posts');
-	if ( ! is_array( $page_ids ) ) {
-		$page_ids = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_type = 'page'");
-		wp_cache_add('all_page_ids', $page_ids, 'posts');
-	}
-
-	return $page_ids;
-}
-
-/**
- * Retrieves page data given a page ID or page object.
- *
- * Use get_post() instead of get_page().
- *
- * @since 1.5.1
- * @deprecated 3.5.0 Use get_post()
- *
- * @param mixed  $page   Page object or page ID. Passed by reference.
- * @param string $output Optional. What to output. Accepts OBJECT, ARRAY_A, or ARRAY_N.
- *                       Default OBJECT.
- * @param string $filter Optional. How the return value should be filtered. Accepts 'raw',
- *                       'edit', 'db', 'display'. Default 'raw'.
- * @return WP_Post|array|null WP_Post on success or null on failure.
- */
-function get_page( $page, $output = OBJECT, $filter = 'raw') {
-	return get_post( $page, $output, $filter );
-}
-
-/**
- * Retrieves a page given its path.
- *
- * @since 2.1.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string       $page_path Page path.
- * @param string       $output    Optional. Output type. Accepts OBJECT, ARRAY_N, or ARRAY_A.
- *                                Default OBJECT.
- * @param string|array $post_type Optional. Post type or array of post types. Default 'page'.
- * @return WP_Post|array|void WP_Post on success.
- */
-function get_page_by_path( $page_path, $output = OBJECT, $post_type = 'page' ) {
-	global $wpdb;
-
-	$last_changed = wp_cache_get( 'last_changed', 'posts' );
-	if ( false === $last_changed ) {
-		$last_changed = microtime();
-		wp_cache_set( 'last_changed', $last_changed, 'posts' );
-	}
-
-	$hash = md5( $page_path . serialize( $post_type ) );
-	$cache_key = "get_page_by_path:$hash:$last_changed";
-	$cached = wp_cache_get( $cache_key, 'posts' );
-	if ( false !== $cached ) {
-		// Special case: '0' is a bad `$page_path`.
-		if ( '0' === $cached || 0 === $cached ) {
-			return;
-		} else {
-			return get_post( $cached, $output );
-		}
-	}
-
-	$page_path = rawurlencode(urldecode($page_path));
-	$page_path = str_replace('%2F', '/', $page_path);
-	$page_path = str_replace('%20', ' ', $page_path);
-	$parts = explode( '/', trim( $page_path, '/' ) );
-	$parts = esc_sql( $parts );
-	$parts = array_map( 'sanitize_title_for_query', $parts );
-
-	$in_string = "'" . implode( "','", $parts ) . "'";
-
-	if ( is_array( $post_type ) ) {
-		$post_types = $post_type;
-	} else {
-		$post_types = array( $post_type, 'attachment' );
-	}
-
-	$post_types = esc_sql( $post_types );
-	$post_type_in_string = "'" . implode( "','", $post_types ) . "'";
-	$sql = "
-		SELECT ID, post_name, post_parent, post_type
-		FROM $wpdb->posts
-		WHERE post_name IN ($in_string)
-		AND post_type IN ($post_type_in_string)
-	";
-
-	$pages = $wpdb->get_results( $sql, OBJECT_K );
-
-	$revparts = array_reverse( $parts );
-
-	$foundid = 0;
-	foreach ( (array) $pages as $page ) {
-		if ( $page->post_name == $revparts[0] ) {
-			$count = 0;
-			$p = $page;
-
-			/*
-			 * Loop through the given path parts from right to left,
-			 * ensuring each matches the post ancestry.
-			 */
-			while ( $p->post_parent != 0 && isset( $pages[ $p->post_parent ] ) ) {
-				$count++;
-				$parent = $pages[ $p->post_parent ];
-				if ( ! isset( $revparts[ $count ] ) || $parent->post_name != $revparts[ $count ] )
-					break;
-				$p = $parent;
-			}
-
-			if ( $p->post_parent == 0 && $count+1 == count( $revparts ) && $p->post_name == $revparts[ $count ] ) {
-				$foundid = $page->ID;
-				if ( $page->post_type == $post_type )
-					break;
-			}
-		}
-	}
-
-	// We cache misses as well as hits.
-	wp_cache_set( $cache_key, $foundid, 'posts' );
-
-	if ( $foundid ) {
-		return get_post( $foundid, $output );
-	}
-}
-
-/**
- * Retrieve a page given its title.
- *
- * @since 2.1.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string       $page_title Page title
- * @param string       $output     Optional. Output type. OBJECT, ARRAY_N, or ARRAY_A.
- *                                 Default OBJECT.
- * @param string|array $post_type  Optional. Post type or array of post types. Default 'page'.
- * @return WP_Post|array|void WP_Post on success or null on failure
- */
-function get_page_by_title( $page_title, $output = OBJECT, $post_type = 'page' ) {
-	global $wpdb;
-
-	if ( is_array( $post_type ) ) {
-		$post_type = esc_sql( $post_type );
-		$post_type_in_string = "'" . implode( "','", $post_type ) . "'";
-		$sql = $wpdb->prepare( "
-			SELECT ID
-			FROM $wpdb->posts
-			WHERE post_title = %s
-			AND post_type IN ($post_type_in_string)
-		", $page_title );
-	} else {
-		$sql = $wpdb->prepare( "
-			SELECT ID
-			FROM $wpdb->posts
-			WHERE post_title = %s
-			AND post_type = %s
-		", $page_title, $post_type );
-	}
-
-	$page = $wpdb->get_var( $sql );
-
-	if ( $page ) {
-		return get_post( $page, $output );
-	}
-}
-
-/**
- * Identify descendants of a given page ID in a list of page objects.
- *
- * Descendants are identified from the `$pages` array passed to the function. No database queries are performed.
- *
- * @since 1.5.1
- *
- * @param int   $page_id Page ID.
- * @param array $pages   List of page objects from which descendants should be identified.
- * @return array List of page children.
- */
-function get_page_children( $page_id, $pages ) {
-	// Build a hash of ID -> children.
-	$children = array();
-	foreach ( (array) $pages as $page ) {
-		$children[ intval( $page->post_parent ) ][] = $page;
-	}
-
-	$page_list = array();
-
-	// Start the search by looking at immediate children.
-	if ( isset( $children[ $page_id ] ) ) {
-		// Always start at the end of the stack in order to preserve original `$pages` order.
-		$to_look = array_reverse( $children[ $page_id ] );
-
-		while ( $to_look ) {
-			$p = array_pop( $to_look );
-			$page_list[] = $p;
-			if ( isset( $children[ $p->ID ] ) ) {
-				foreach ( array_reverse( $children[ $p->ID ] ) as $child ) {
-					// Append to the `$to_look` stack to descend the tree.
-					$to_look[] = $child;
-				}
-			}
-		}
-	}
-
-	return $page_list;
-}
-
-/**
- * Order the pages with children under parents in a flat list.
- *
- * It uses auxiliary structure to hold parent-children relationships and
- * runs in O(N) complexity
- *
- * @since 2.0.0
- *
- * @param array $pages   Posts array, passed by reference.
- * @param int   $page_id Optional. Parent page ID. Default 0.
- * @return array A list arranged by hierarchy. Children immediately follow their parents.
- */
-function get_page_hierarchy( &$pages, $page_id = 0 ) {
-	if ( empty( $pages ) ) {
-		return array();
-	}
-
-	$children = array();
-	foreach ( (array) $pages as $p ) {
-		$parent_id = intval( $p->post_parent );
-		$children[ $parent_id ][] = $p;
-	}
-
-	$result = array();
-	_page_traverse_name( $page_id, $children, $result );
-
-	return $result;
-}
-
-/**
- * Traverse and return all the nested children post names of a root page.
- *
- * $children contains parent-children relations
- *
- * @since 2.9.0
- *
- * @see _page_traverse_name()
- *
- * @param int   $page_id   Page ID.
- * @param array $children  Parent-children relations, passed by reference.
- * @param array $result    Result, passed by reference.
- */
-function _page_traverse_name( $page_id, &$children, &$result ){
-	if ( isset( $children[ $page_id ] ) ){
-		foreach ( (array)$children[ $page_id ] as $child ) {
-			$result[ $child->ID ] = $child->post_name;
-			_page_traverse_name( $child->ID, $children, $result );
-		}
-	}
-}
-
-/**
- * Build the URI path for a page.
- *
- * Sub pages will be in the "directory" under the parent page post name.
- *
- * @since 1.5.0
- * @since 4.6.0 Converted the `$page` parameter to optional.
- *
- * @param WP_Post|object|int $page Optional. Page ID or WP_Post object. Default is global $post.
- * @return string|false Page URI, false on error.
- */
-function get_page_uri( $page = 0 ) {
-	if ( ! $page instanceof WP_Post ) {
-		$page = get_post( $page );
-	}
-
-	if ( ! $page )
-		return false;
-
-	$uri = $page->post_name;
-
-	foreach ( $page->ancestors as $parent ) {
-		$parent = get_post( $parent );
-		if ( $parent && $parent->post_name ) {
-			$uri = $parent->post_name . '/' . $uri;
-		}
-	}
-
-	/**
-	 * Filters the URI for a page.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param string  $uri  Page URI.
-	 * @param WP_Post $page Page object.
-	 */
-	return apply_filters( 'get_page_uri', $uri, $page );
-}
-
-/**
- * Retrieve a list of pages.
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @since 1.5.0
- *
- * @param array|string $args {
- *     Optional. Array or string of arguments to retrieve pages.
- *
- *     @type int          $child_of     Page ID to return child and grandchild pages of. Note: The value
- *                                      of `$hierarchical` has no bearing on whether `$child_of` returns
- *                                      hierarchical results. Default 0, or no restriction.
- *     @type string       $sort_order   How to sort retrieved pages. Accepts 'ASC', 'DESC'. Default 'ASC'.
- *     @type string       $sort_column  What columns to sort pages by, comma-separated. Accepts 'post_author',
- *                                      'post_date', 'post_title', 'post_name', 'post_modified', 'menu_order',
- *                                      'post_modified_gmt', 'post_parent', 'ID', 'rand', 'comment_count'.
- *                                      'post_' can be omitted for any values that start with it.
- *                                      Default 'post_title'.
- *     @type bool         $hierarchical Whether to return pages hierarchically. If false in conjunction with
- *                                      `$child_of` also being false, both arguments will be disregarded.
- *                                      Default true.
- *     @type array        $exclude      Array of page IDs to exclude. Default empty array.
- *     @type array        $include      Array of page IDs to include. Cannot be used with `$child_of`,
- *                                      `$parent`, `$exclude`, `$meta_key`, `$meta_value`, or `$hierarchical`.
- *                                      Default empty array.
- *     @type string       $meta_key     Only include pages with this meta key. Default empty.
- *     @type string       $meta_value   Only include pages with this meta value. Requires `$meta_key`.
- *                                      Default empty.
- *     @type string       $authors      A comma-separated list of author IDs. Default empty.
- *     @type int          $parent       Page ID to return direct children of. Default -1, or no restriction.
- *     @type string|array $exclude_tree Comma-separated string or array of page IDs to exclude.
- *                                      Default empty array.
- *     @type int          $number       The number of pages to return. Default 0, or all pages.
- *     @type int          $offset       The number of pages to skip before returning. Requires `$number`.
- *                                      Default 0.
- *     @type string       $post_type    The post type to query. Default 'page'.
- *     @type string       $post_status  A comma-separated list of post status types to include.
- *                                      Default 'publish'.
- * }
- * @return array|false List of pages matching defaults or `$args`.
- */
-function get_pages( $args = array() ) {
-	global $wpdb;
-
-	$defaults = array(
-		'child_of' => 0, 'sort_order' => 'ASC',
-		'sort_column' => 'post_title', 'hierarchical' => 1,
-		'exclude' => array(), 'include' => array(),
-		'meta_key' => '', 'meta_value' => '',
-		'authors' => '', 'parent' => -1, 'exclude_tree' => array(),
-		'number' => '', 'offset' => 0,
-		'post_type' => 'page', 'post_status' => 'publish',
-	);
-
-	$r = wp_parse_args( $args, $defaults );
-
-	$number = (int) $r['number'];
-	$offset = (int) $r['offset'];
-	$child_of = (int) $r['child_of'];
-	$hierarchical = $r['hierarchical'];
-	$exclude = $r['exclude'];
-	$meta_key = $r['meta_key'];
-	$meta_value = $r['meta_value'];
-	$parent = $r['parent'];
-	$post_status = $r['post_status'];
-
-	// Make sure the post type is hierarchical.
-	$hierarchical_post_types = get_post_types( array( 'hierarchical' => true ) );
-	if ( ! in_array( $r['post_type'], $hierarchical_post_types ) ) {
-		return false;
-	}
-
-	if ( $parent > 0 && ! $child_of ) {
-		$hierarchical = false;
-	}
-
-	// Make sure we have a valid post status.
-	if ( ! is_array( $post_status ) ) {
-		$post_status = explode( ',', $post_status );
-	}
-	if ( array_diff( $post_status, get_post_stati() ) ) {
-		return false;
-	}
-
-	// $args can be whatever, only use the args defined in defaults to compute the key.
-	$key = md5( serialize( wp_array_slice_assoc( $r, array_keys( $defaults ) ) ) );
-	$last_changed = wp_cache_get( 'last_changed', 'posts' );
-	if ( ! $last_changed ) {
-		$last_changed = microtime();
-		wp_cache_set( 'last_changed', $last_changed, 'posts' );
-	}
-
-	$cache_key = "get_pages:$key:$last_changed";
-	if ( $cache = wp_cache_get( $cache_key, 'posts' ) ) {
-		// Convert to WP_Post instances.
-		$pages = array_map( 'get_post', $cache );
-		/** This filter is documented in wp-includes/post.php */
-		$pages = apply_filters( 'get_pages', $pages, $r );
-		return $pages;
-	}
-
-	$inclusions = '';
-	if ( ! empty( $r['include'] ) ) {
-		$child_of = 0; //ignore child_of, parent, exclude, meta_key, and meta_value params if using include
-		$parent = -1;
-		$exclude = '';
-		$meta_key = '';
-		$meta_value = '';
-		$hierarchical = false;
-		$incpages = wp_parse_id_list( $r['include'] );
-		if ( ! empty( $incpages ) ) {
-			$inclusions = ' AND ID IN (' . implode( ',', $incpages ) .  ')';
-		}
-	}
-
-	$exclusions = '';
-	if ( ! empty( $exclude ) ) {
-		$expages = wp_parse_id_list( $exclude );
-		if ( ! empty( $expages ) ) {
-			$exclusions = ' AND ID NOT IN (' . implode( ',', $expages ) .  ')';
-		}
-	}
-
-	$author_query = '';
-	if ( ! empty( $r['authors'] ) ) {
-		$post_authors = preg_split( '/[\s,]+/', $r['authors'] );
-
-		if ( ! empty( $post_authors ) ) {
-			foreach ( $post_authors as $post_author ) {
-				//Do we have an author id or an author login?
-				if ( 0 == intval($post_author) ) {
-					$post_author = get_user_by('login', $post_author);
-					if ( empty( $post_author ) ) {
-						continue;
-					}
-					if ( empty( $post_author->ID ) ) {
-						continue;
-					}
-					$post_author = $post_author->ID;
-				}
-
-				if ( '' == $author_query ) {
-					$author_query = $wpdb->prepare(' post_author = %d ', $post_author);
-				} else {
-					$author_query .= $wpdb->prepare(' OR post_author = %d ', $post_author);
-				}
-			}
-			if ( '' != $author_query ) {
-				$author_query = " AND ($author_query)";
-			}
-		}
-	}
-
-	$join = '';
-	$where = "$exclusions $inclusions ";
-	if ( '' !== $meta_key || '' !== $meta_value ) {
-		$join = " LEFT JOIN $wpdb->postmeta ON ( $wpdb->posts.ID = $wpdb->postmeta.post_id )";
-
-		// meta_key and meta_value might be slashed
-		$meta_key = wp_unslash($meta_key);
-		$meta_value = wp_unslash($meta_value);
-		if ( '' !== $meta_key ) {
-			$where .= $wpdb->prepare(" AND $wpdb->postmeta.meta_key = %s", $meta_key);
-		}
-		if ( '' !== $meta_value ) {
-			$where .= $wpdb->prepare(" AND $wpdb->postmeta.meta_value = %s", $meta_value);
-		}
-
-	}
-
-	if ( is_array( $parent ) ) {
-		$post_parent__in = implode( ',', array_map( 'absint', (array) $parent ) );
-		if ( ! empty( $post_parent__in ) ) {
-			$where .= " AND post_parent IN ($post_parent__in)";
-		}
-	} elseif ( $parent >= 0 ) {
-		$where .= $wpdb->prepare(' AND post_parent = %d ', $parent);
-	}
-
-	if ( 1 == count( $post_status ) ) {
-		$where_post_type = $wpdb->prepare( "post_type = %s AND post_status = %s", $r['post_type'], reset( $post_status ) );
-	} else {
-		$post_status = implode( "', '", $post_status );
-		$where_post_type = $wpdb->prepare( "post_type = %s AND post_status IN ('$post_status')", $r['post_type'] );
-	}
-
-	$orderby_array = array();
-	$allowed_keys = array( 'author', 'post_author', 'date', 'post_date', 'title', 'post_title', 'name', 'post_name', 'modified',
-		'post_modified', 'modified_gmt', 'post_modified_gmt', 'menu_order', 'parent', 'post_parent',
-		'ID', 'rand', 'comment_count' );
-
-	foreach ( explode( ',', $r['sort_column'] ) as $orderby ) {
-		$orderby = trim( $orderby );
-		if ( ! in_array( $orderby, $allowed_keys ) ) {
-			continue;
-		}
-
-		switch ( $orderby ) {
-			case 'menu_order':
-				break;
-			case 'ID':
-				$orderby = "$wpdb->posts.ID";
-				break;
-			case 'rand':
-				$orderby = 'RAND()';
-				break;
-			case 'comment_count':
-				$orderby = "$wpdb->posts.comment_count";
-				break;
-			default:
-				if ( 0 === strpos( $orderby, 'post_' ) ) {
-					$orderby = "$wpdb->posts." . $orderby;
-				} else {
-					$orderby = "$wpdb->posts.post_" . $orderby;
-				}
-		}
-
-		$orderby_array[] = $orderby;
-
-	}
-	$sort_column = ! empty( $orderby_array ) ? implode( ',', $orderby_array ) : "$wpdb->posts.post_title";
-
-	$sort_order = strtoupper( $r['sort_order'] );
-	if ( '' !== $sort_order && ! in_array( $sort_order, array( 'ASC', 'DESC' ) ) ) {
-		$sort_order = 'ASC';
-	}
-
-	$query = "SELECT * FROM $wpdb->posts $join WHERE ($where_post_type) $where ";
-	$query .= $author_query;
-	$query .= " ORDER BY " . $sort_column . " " . $sort_order ;
-
-	if ( ! empty( $number ) ) {
-		$query .= ' LIMIT ' . $offset . ',' . $number;
-	}
-
-	$pages = $wpdb->get_results($query);
-
-	if ( empty($pages) ) {
-		/** This filter is documented in wp-includes/post.php */
-		$pages = apply_filters( 'get_pages', array(), $r );
-		return $pages;
-	}
-
-	// Sanitize before caching so it'll only get done once.
-	$num_pages = count($pages);
-	for ($i = 0; $i < $num_pages; $i++) {
-		$pages[$i] = sanitize_post($pages[$i], 'raw');
-	}
-
-	// Update cache.
-	update_post_cache( $pages );
-
-	if ( $child_of || $hierarchical ) {
-		$pages = get_page_children($child_of, $pages);
-	}
-
-	if ( ! empty( $r['exclude_tree'] ) ) {
-		$exclude = wp_parse_id_list( $r['exclude_tree'] );
-		foreach ( $exclude as $id ) {
-			$children = get_page_children( $id, $pages );
-			foreach ( $children as $child ) {
-				$exclude[] = $child->ID;
-			}
-		}
-
-		$num_pages = count( $pages );
-		for ( $i = 0; $i < $num_pages; $i++ ) {
-			if ( in_array( $pages[$i]->ID, $exclude ) ) {
-				unset( $pages[$i] );
-			}
-		}
-	}
-
-	$page_structure = array();
-	foreach ( $pages as $page ) {
-		$page_structure[] = $page->ID;
-	}
-
-	wp_cache_set( $cache_key, $page_structure, 'posts' );
-
-	// Convert to WP_Post instances
-	$pages = array_map( 'get_post', $pages );
-
-	/**
-	 * Filters the retrieved list of pages.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param array $pages List of pages to retrieve.
-	 * @param array $r     Array of get_pages() arguments.
-	 */
-	return apply_filters( 'get_pages', $pages, $r );
-}
-
-//
-// Attachment functions
-//
-
-/**
- * Check if the attachment URI is local one and is really an attachment.
- *
- * @since 2.0.0
- *
- * @param string $url URL to check
- * @return bool True on success, false on failure.
- */
-function is_local_attachment($url) {
-	if (strpos($url, home_url()) === false)
-		return false;
-	if (strpos($url, home_url('/?attachment_id=')) !== false)
-		return true;
-	if ( $id = url_to_postid($url) ) {
-		$post = get_post($id);
-		if ( 'attachment' == $post->post_type )
-			return true;
-	}
-	return false;
-}
-
-/**
- * Insert an attachment.
- *
- * If you set the 'ID' in the $args parameter, it will mean that you are
- * updating and attempt to update the attachment. You can also set the
- * attachment name or title by setting the key 'post_name' or 'post_title'.
- *
- * You can set the dates for the attachment manually by setting the 'post_date'
- * and 'post_date_gmt' keys' values.
- *
- * By default, the comments will use the default settings for whether the
- * comments are allowed. You can close them manually or keep them open by
- * setting the value for the 'comment_status' key.
- *
- * @since 2.0.0
- * @since 4.7.0 Added the `$wp_error` parameter to allow a WP_Error to be returned on failure.
- *
- * @see wp_insert_post()
- *
- * @param string|array $args     Arguments for inserting an attachment.
- * @param string       $file     Optional. Filename.
- * @param int          $parent   Optional. Parent post ID.
- * @param bool         $wp_error Optional. Whether to return a WP_Error on failure. Default false.
- * @return int|WP_Error The attachment ID on success. The value 0 or WP_Error on failure.
- */
-function wp_insert_attachment( $args, $file = false, $parent = 0, $wp_error = false ) {
-	$defaults = array(
-		'file'        => $file,
-		'post_parent' => 0
-	);
-
-	$data = wp_parse_args( $args, $defaults );
-
-	if ( ! empty( $parent ) ) {
-		$data['post_parent'] = $parent;
-	}
-
-	$data['post_type'] = 'attachment';
-
-	return wp_insert_post( $data, $wp_error );
-}
-
-/**
- * Trash or delete an attachment.
- *
- * When an attachment is permanently deleted, the file will also be removed.
- * Deletion removes all post meta fields, taxonomy, comments, etc. associated
- * with the attachment (except the main post).
- *
- * The attachment is moved to the trash instead of permanently deleted unless trash
- * for media is disabled, item is already in the trash, or $force_delete is true.
- *
- * @since 2.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int  $post_id      Attachment ID.
- * @param bool $force_delete Optional. Whether to bypass trash and force deletion.
- *                           Default false.
- * @return mixed False on failure. Post data on success.
- */
-function wp_delete_attachment( $post_id, $force_delete = false ) {
-	global $wpdb;
-
-	if ( !$post = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID = %d", $post_id) ) )
-		return $post;
-
-	if ( 'attachment' != $post->post_type )
-		return false;
-
-	if ( !$force_delete && EMPTY_TRASH_DAYS && MEDIA_TRASH && 'trash' != $post->post_status )
-		return wp_trash_post( $post_id );
-
-	delete_post_meta($post_id, '_wp_trash_meta_status');
-	delete_post_meta($post_id, '_wp_trash_meta_time');
-
-	$meta = wp_get_attachment_metadata( $post_id );
-	$backup_sizes = get_post_meta( $post->ID, '_wp_attachment_backup_sizes', true );
-	$file = get_attached_file( $post_id );
-
-	if ( is_multisite() )
-		delete_transient( 'dirsize_cache' );
-
-	/**
-	 * Fires before an attachment is deleted, at the start of wp_delete_attachment().
-	 *
-	 * @since 2.0.0
-	 *
-	 * @param int $post_id Attachment ID.
-	 */
-	do_action( 'delete_attachment', $post_id );
-
-	wp_delete_object_term_relationships($post_id, array('category', 'post_tag'));
-	wp_delete_object_term_relationships($post_id, get_object_taxonomies($post->post_type));
-
-	// Delete all for any posts.
-	delete_metadata( 'post', null, '_thumbnail_id', $post_id, true );
-
-	wp_defer_comment_counting( true );
-
-	$comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = %d", $post_id ));
-	foreach ( $comment_ids as $comment_id ) {
-		wp_delete_comment( $comment_id, true );
-	}
-
-	wp_defer_comment_counting( false );
-
-	$post_meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d ", $post_id ));
-	foreach ( $post_meta_ids as $mid )
-		delete_metadata_by_mid( 'post', $mid );
-
-	/** This action is documented in wp-includes/post.php */
-	do_action( 'delete_post', $post_id );
-	$result = $wpdb->delete( $wpdb->posts, array( 'ID' => $post_id ) );
-	if ( ! $result ) {
-		return false;
-	}
-	/** This action is documented in wp-includes/post.php */
-	do_action( 'deleted_post', $post_id );
-
-	$uploadpath = wp_get_upload_dir();
-
-	if ( ! empty($meta['thumb']) ) {
-		// Don't delete the thumb if another attachment uses it.
-		if (! $wpdb->get_row( $wpdb->prepare( "SELECT meta_id FROM $wpdb->postmeta WHERE meta_key = '_wp_attachment_metadata' AND meta_value LIKE %s AND post_id <> %d", '%' . $wpdb->esc_like( $meta['thumb'] ) . '%', $post_id)) ) {
-			$thumbfile = str_replace(basename($file), $meta['thumb'], $file);
-			/** This filter is documented in wp-includes/functions.php */
-			$thumbfile = apply_filters( 'wp_delete_file', $thumbfile );
-			@ unlink( path_join($uploadpath['basedir'], $thumbfile) );
-		}
-	}
-
-	// Remove intermediate and backup images if there are any.
-	if ( isset( $meta['sizes'] ) && is_array( $meta['sizes'] ) ) {
-		foreach ( $meta['sizes'] as $size => $sizeinfo ) {
-			$intermediate_file = str_replace( basename( $file ), $sizeinfo['file'], $file );
-			/** This filter is documented in wp-includes/functions.php */
-			$intermediate_file = apply_filters( 'wp_delete_file', $intermediate_file );
-			@ unlink( path_join( $uploadpath['basedir'], $intermediate_file ) );
-		}
-	}
-
-	if ( is_array($backup_sizes) ) {
-		foreach ( $backup_sizes as $size ) {
-			$del_file = path_join( dirname($meta['file']), $size['file'] );
-			/** This filter is documented in wp-includes/functions.php */
-			$del_file = apply_filters( 'wp_delete_file', $del_file );
-			@ unlink( path_join($uploadpath['basedir'], $del_file) );
-		}
-	}
-
-	wp_delete_file( $file );
-
-	clean_post_cache( $post );
-
-	return $post;
-}
-
-/**
- * Retrieve attachment meta field for attachment ID.
- *
- * @since 2.1.0
- *
- * @param int  $post_id    Attachment ID. Default 0.
- * @param bool $unfiltered Optional. If true, filters are not run. Default false.
- * @return mixed Attachment meta field. False on failure.
- */
-function wp_get_attachment_metadata( $post_id = 0, $unfiltered = false ) {
-	$post_id = (int) $post_id;
-	if ( !$post = get_post( $post_id ) )
-		return false;
-
-	$data = get_post_meta( $post->ID, '_wp_attachment_metadata', true );
-
-	if ( $unfiltered )
-		return $data;
-
-	/**
-	 * Filters the attachment meta data.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param array|bool $data    Array of meta data for the given attachment, or false
-	 *                            if the object does not exist.
-	 * @param int        $post_id Attachment ID.
-	 */
-	return apply_filters( 'wp_get_attachment_metadata', $data, $post->ID );
-}
-
-/**
- * Update metadata for an attachment.
- *
- * @since 2.1.0
- *
- * @param int   $post_id Attachment ID.
- * @param array $data    Attachment data.
- * @return int|bool False if $post is invalid.
- */
-function wp_update_attachment_metadata( $post_id, $data ) {
-	$post_id = (int) $post_id;
-	if ( !$post = get_post( $post_id ) )
-		return false;
-
-	/**
-	 * Filters the updated attachment meta data.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param array $data    Array of updated attachment meta data.
-	 * @param int   $post_id Attachment ID.
-	 */
-	if ( $data = apply_filters( 'wp_update_attachment_metadata', $data, $post->ID ) )
-		return update_post_meta( $post->ID, '_wp_attachment_metadata', $data );
-	else
-		return delete_post_meta( $post->ID, '_wp_attachment_metadata' );
-}
-
-/**
- * Retrieve the URL for an attachment.
- *
- * @since 2.1.0
- *
- * @global string $pagenow
- *
- * @param int $post_id Optional. Attachment ID. Default 0.
- * @return string|false Attachment URL, otherwise false.
- */
-function wp_get_attachment_url( $post_id = 0 ) {
-	$post_id = (int) $post_id;
-	if ( !$post = get_post( $post_id ) )
-		return false;
-
-	if ( 'attachment' != $post->post_type )
-		return false;
-
-	$url = '';
-	// Get attached file.
-	if ( $file = get_post_meta( $post->ID, '_wp_attached_file', true ) ) {
-		// Get upload directory.
-		if ( ( $uploads = wp_get_upload_dir() ) && false === $uploads['error'] ) {
-			// Check that the upload base exists in the file location.
-			if ( 0 === strpos( $file, $uploads['basedir'] ) ) {
-				// Replace file location with url location.
-				$url = str_replace($uploads['basedir'], $uploads['baseurl'], $file);
-			} elseif ( false !== strpos($file, 'wp-content/uploads') ) {
-				// Get the directory name relative to the basedir (back compat for pre-2.7 uploads)
-				$url = trailingslashit( $uploads['baseurl'] . '/' . _wp_get_attachment_relative_path( $file ) ) . basename( $file );
-			} else {
-				// It's a newly-uploaded file, therefore $file is relative to the basedir.
-				$url = $uploads['baseurl'] . "/$file";
-			}
-		}
-	}
-
-	/*
-	 * If any of the above options failed, Fallback on the GUID as used pre-2.7,
-	 * not recommended to rely upon this.
-	 */
-	if ( empty($url) ) {
-		$url = get_the_guid( $post->ID );
-	}
-
-	// On SSL front end, URLs should be HTTPS.
-	if ( is_ssl() && ! is_admin() && 'wp-login.php' !== $GLOBALS['pagenow'] ) {
-		$url = set_url_scheme( $url );
-	}
-
-	/**
-	 * Filters the attachment URL.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param string $url     URL for the given attachment.
-	 * @param int    $post_id Attachment ID.
-	 */
-	$url = apply_filters( 'wp_get_attachment_url', $url, $post->ID );
-
-	if ( empty( $url ) )
-		return false;
-
-	return $url;
-}
-
-/**
- * Retrieves the caption for an attachment.
- *
- * @since 4.6.0
- *
- * @param int $post_id Optional. Attachment ID. Default is the ID of the global `$post`.
- * @return string|false False on failure. Attachment caption on success.
- */
-function wp_get_attachment_caption( $post_id = 0 ) {
-	$post_id = (int) $post_id;
-	if ( ! $post = get_post( $post_id ) ) {
-		return false;
-	}
-
-	if ( 'attachment' !== $post->post_type ) {
-		return false;
-	}
-
-	$caption = $post->post_excerpt;
-
-	/**
-	 * Filters the attachment caption.
-	 *
-	 * @since 4.6.0
-	 *
-	 * @param string $caption Caption for the given attachment.
-	 * @param int    $post_id Attachment ID.
-	 */
-	return apply_filters( 'wp_get_attachment_caption', $caption, $post->ID );
-}
-
-/**
- * Retrieve thumbnail for an attachment.
- *
- * @since 2.1.0
- *
- * @param int $post_id Optional. Attachment ID. Default 0.
- * @return string|false False on failure. Thumbnail file path on success.
- */
-function wp_get_attachment_thumb_file( $post_id = 0 ) {
-	$post_id = (int) $post_id;
-	if ( !$post = get_post( $post_id ) )
-		return false;
-	if ( !is_array( $imagedata = wp_get_attachment_metadata( $post->ID ) ) )
-		return false;
-
-	$file = get_attached_file( $post->ID );
-
-	if ( !empty($imagedata['thumb']) && ($thumbfile = str_replace(basename($file), $imagedata['thumb'], $file)) && file_exists($thumbfile) ) {
-		/**
-		 * Filters the attachment thumbnail file path.
-		 *
-		 * @since 2.1.0
-		 *
-		 * @param string $thumbfile File path to the attachment thumbnail.
-		 * @param int    $post_id   Attachment ID.
-		 */
-		return apply_filters( 'wp_get_attachment_thumb_file', $thumbfile, $post->ID );
-	}
-	return false;
-}
-
-/**
- * Retrieve URL for an attachment thumbnail.
- *
- * @since 2.1.0
- *
- * @param int $post_id Optional. Attachment ID. Default 0.
- * @return string|false False on failure. Thumbnail URL on success.
- */
-function wp_get_attachment_thumb_url( $post_id = 0 ) {
-	$post_id = (int) $post_id;
-	if ( !$post = get_post( $post_id ) )
-		return false;
-	if ( !$url = wp_get_attachment_url( $post->ID ) )
-		return false;
-
-	$sized = image_downsize( $post_id, 'thumbnail' );
-	if ( $sized )
-		return $sized[0];
-
-	if ( !$thumb = wp_get_attachment_thumb_file( $post->ID ) )
-		return false;
-
-	$url = str_replace(basename($url), basename($thumb), $url);
-
-	/**
-	 * Filters the attachment thumbnail URL.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param string $url     URL for the attachment thumbnail.
-	 * @param int    $post_id Attachment ID.
-	 */
-	return apply_filters( 'wp_get_attachment_thumb_url', $url, $post->ID );
-}
-
-/**
- * Verifies an attachment is of a given type.
- *
- * @since 4.2.0
- *
- * @param string      $type Attachment type. Accepts 'image', 'audio', or 'video'.
- * @param int|WP_Post $post Optional. Attachment ID or object. Default is global $post.
- * @return bool True if one of the accepted types, false otherwise.
- */
-function wp_attachment_is( $type, $post = null ) {
-	if ( ! $post = get_post( $post ) ) {
-		return false;
-	}
-
-	if ( ! $file = get_attached_file( $post->ID ) ) {
-		return false;
-	}
-
-	if ( 0 === strpos( $post->post_mime_type, $type . '/' ) ) {
-		return true;
-	}
-
-	$check = wp_check_filetype( $file );
-	if ( empty( $check['ext'] ) ) {
-		return false;
-	}
-
-	$ext = $check['ext'];
-
-	if ( 'import' !== $post->post_mime_type ) {
-		return $type === $ext;
-	}
-
-	switch ( $type ) {
-	case 'image':
-		$image_exts = array( 'jpg', 'jpeg', 'jpe', 'gif', 'png' );
-		return in_array( $ext, $image_exts );
-
-	case 'audio':
-		return in_array( $ext, wp_get_audio_extensions() );
-
-	case 'video':
-		return in_array( $ext, wp_get_video_extensions() );
-
-	default:
-		return $type === $ext;
-	}
-}
-
-/**
- * Checks if the attachment is an image.
- *
- * @since 2.1.0
- * @since 4.2.0 Modified into wrapper for wp_attachment_is() and
- *              allowed WP_Post object to be passed.
- *
- * @param int|WP_Post $post Optional. Attachment ID or object. Default is global $post.
- * @return bool Whether the attachment is an image.
- */
-function wp_attachment_is_image( $post = null ) {
-	return wp_attachment_is( 'image', $post );
-}
-
-/**
- * Retrieve the icon for a MIME type.
- *
- * @since 2.1.0
- *
- * @param string|int $mime MIME type or attachment ID.
- * @return string|false Icon, false otherwise.
- */
-function wp_mime_type_icon( $mime = 0 ) {
-	if ( !is_numeric($mime) )
-		$icon = wp_cache_get("mime_type_icon_$mime");
-
-	$post_id = 0;
-	if ( empty($icon) ) {
-		$post_mimes = array();
-		if ( is_numeric($mime) ) {
-			$mime = (int) $mime;
-			if ( $post = get_post( $mime ) ) {
-				$post_id = (int) $post->ID;
-				$file = get_attached_file( $post_id );
-				$ext = preg_replace('/^.+?\.([^.]+)$/', '$1', $file);
-				if ( !empty($ext) ) {
-					$post_mimes[] = $ext;
-					if ( $ext_type = wp_ext2type( $ext ) )
-						$post_mimes[] = $ext_type;
-				}
-				$mime = $post->post_mime_type;
-			} else {
-				$mime = 0;
-			}
-		} else {
-			$post_mimes[] = $mime;
-		}
-
-		$icon_files = wp_cache_get('icon_files');
-
-		if ( !is_array($icon_files) ) {
-			/**
-			 * Filters the icon directory path.
-			 *
-			 * @since 2.0.0
-			 *
-			 * @param string $path Icon directory absolute path.
-			 */
-			$icon_dir = apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/media' );
-
-			/**
-			 * Filters the icon directory URI.
-			 *
-			 * @since 2.0.0
-			 *
-			 * @param string $uri Icon directory URI.
-			 */
-			$icon_dir_uri = apply_filters( 'icon_dir_uri', includes_url( 'images/media' ) );
-
-			/**
-			 * Filters the list of icon directory URIs.
-			 *
-			 * @since 2.5.0
-			 *
-			 * @param array $uris List of icon directory URIs.
-			 */
-			$dirs = apply_filters( 'icon_dirs', array( $icon_dir => $icon_dir_uri ) );
-			$icon_files = array();
-			while ( $dirs ) {
-				$keys = array_keys( $dirs );
-				$dir = array_shift( $keys );
-				$uri = array_shift($dirs);
-				if ( $dh = opendir($dir) ) {
-					while ( false !== $file = readdir($dh) ) {
-						$file = basename($file);
-						if ( substr($file, 0, 1) == '.' )
-							continue;
-						if ( !in_array(strtolower(substr($file, -4)), array('.png', '.gif', '.jpg') ) ) {
-							if ( is_dir("$dir/$file") )
-								$dirs["$dir/$file"] = "$uri/$file";
-							continue;
-						}
-						$icon_files["$dir/$file"] = "$uri/$file";
-					}
-					closedir($dh);
-				}
-			}
-			wp_cache_add( 'icon_files', $icon_files, 'default', 600 );
-		}
-
-		$types = array();
-		// Icon basename - extension = MIME wildcard.
-		foreach ( $icon_files as $file => $uri )
-			$types[ preg_replace('/^([^.]*).*$/', '$1', basename($file)) ] =& $icon_files[$file];
-
-		if ( ! empty($mime) ) {
-			$post_mimes[] = substr($mime, 0, strpos($mime, '/'));
-			$post_mimes[] = substr($mime, strpos($mime, '/') + 1);
-			$post_mimes[] = str_replace('/', '_', $mime);
-		}
-
-		$matches = wp_match_mime_types(array_keys($types), $post_mimes);
-		$matches['default'] = array('default');
-
-		foreach ( $matches as $match => $wilds ) {
-			foreach ( $wilds as $wild ) {
-				if ( ! isset( $types[ $wild ] ) ) {
-					continue;
-				}
-
-				$icon = $types[ $wild ];
-				if ( ! is_numeric( $mime ) ) {
-					wp_cache_add( "mime_type_icon_$mime", $icon );
-				}
-				break 2;
-			}
-		}
-	}
-
-	/**
-	 * Filters the mime type icon.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param string $icon    Path to the mime type icon.
-	 * @param string $mime    Mime type.
-	 * @param int    $post_id Attachment ID. Will equal 0 if the function passed
-	 *                        the mime type.
-	 */
-	return apply_filters( 'wp_mime_type_icon', $icon, $mime, $post_id );
-}
-
-/**
- * Check for changed slugs for published post objects and save the old slug.
- *
- * The function is used when a post object of any type is updated,
- * by comparing the current and previous post objects.
- *
- * If the slug was changed and not already part of the old slugs then it will be
- * added to the post meta field ('_wp_old_slug') for storing old slugs for that
- * post.
- *
- * The most logically usage of this function is redirecting changed post objects, so
- * that those that linked to an changed post will be redirected to the new post.
- *
- * @since 2.1.0
- *
- * @param int     $post_id     Post ID.
- * @param WP_Post $post        The Post Object
- * @param WP_Post $post_before The Previous Post Object
- */
-function wp_check_for_changed_slugs( $post_id, $post, $post_before ) {
-	// Don't bother if it hasn't changed.
-	if ( $post->post_name == $post_before->post_name ) {
-		return;
-	}
-
-	// We're only concerned with published, non-hierarchical objects.
-	if ( ! ( 'publish' === $post->post_status || ( 'attachment' === get_post_type( $post ) && 'inherit' === $post->post_status ) ) || is_post_type_hierarchical( $post->post_type ) ) {
-		return;
-	}
-
-	$old_slugs = (array) get_post_meta( $post_id, '_wp_old_slug' );
-
-	// If we haven't added this old slug before, add it now.
-	if ( ! empty( $post_before->post_name ) && ! in_array( $post_before->post_name, $old_slugs ) ) {
-		add_post_meta( $post_id, '_wp_old_slug', $post_before->post_name );
-	}
-
-	// If the new slug was used previously, delete it from the list.
-	if ( in_array( $post->post_name, $old_slugs ) ) {
-		delete_post_meta( $post_id, '_wp_old_slug', $post->post_name );
-	}
-}
-
-/**
- * Retrieve the private post SQL based on capability.
- *
- * This function provides a standardized way to appropriately select on the
- * post_status of a post type. The function will return a piece of SQL code
- * that can be added to a WHERE clause; this SQL is constructed to allow all
- * published posts, and all private posts to which the user has access.
- *
- * @since 2.2.0
- * @since 4.3.0 Added the ability to pass an array to `$post_type`.
- *
- * @param string|array $post_type Single post type or an array of post types. Currently only supports 'post' or 'page'.
- * @return string SQL code that can be added to a where clause.
- */
-function get_private_posts_cap_sql( $post_type ) {
-	return get_posts_by_author_sql( $post_type, false );
-}
-
-/**
- * Retrieve the post SQL based on capability, author, and type.
- *
- * @since 3.0.0
- * @since 4.3.0 Introduced the ability to pass an array of post types to `$post_type`.
- *
- * @see get_private_posts_cap_sql()
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param array|string   $post_type   Single post type or an array of post types.
- * @param bool           $full        Optional. Returns a full WHERE statement instead of just
- *                                    an 'andalso' term. Default true.
- * @param int            $post_author Optional. Query posts having a single author ID. Default null.
- * @param bool           $public_only Optional. Only return public posts. Skips cap checks for
- *                                    $current_user.  Default false.
- * @return string SQL WHERE code that can be added to a query.
- */
-function get_posts_by_author_sql( $post_type, $full = true, $post_author = null, $public_only = false ) {
-	global $wpdb;
-
-	if ( is_array( $post_type ) ) {
-		$post_types = $post_type;
-	} else {
-		$post_types = array( $post_type );
-	}
-
-	$post_type_clauses = array();
-	foreach ( $post_types as $post_type ) {
-		$post_type_obj = get_post_type_object( $post_type );
-		if ( ! $post_type_obj ) {
-			continue;
-		}
-
-		/**
-		 * Filters the capability to read private posts for a custom post type
-		 * when generating SQL for getting posts by author.
-		 *
-		 * @since 2.2.0
-		 * @deprecated 3.2.0 The hook transitioned from "somewhat useless" to "totally useless".
-		 *
-		 * @param string $cap Capability.
-		 */
-		if ( ! $cap = apply_filters( 'pub_priv_sql_capability', '' ) ) {
-			$cap = current_user_can( $post_type_obj->cap->read_private_posts );
-		}
-
-		// Only need to check the cap if $public_only is false.
-		$post_status_sql = "post_status = 'publish'";
-		if ( false === $public_only ) {
-			if ( $cap ) {
-				// Does the user have the capability to view private posts? Guess so.
-				$post_status_sql .= " OR post_status = 'private'";
-			} elseif ( is_user_logged_in() ) {
-				// Users can view their own private posts.
-				$id = get_current_user_id();
-				if ( null === $post_author || ! $full ) {
-					$post_status_sql .= " OR post_status = 'private' AND post_author = $id";
-				} elseif ( $id == (int) $post_author ) {
-					$post_status_sql .= " OR post_status = 'private'";
-				} // else none
-			} // else none
-		}
-
-		$post_type_clauses[] = "( post_type = '" . $post_type . "' AND ( $post_status_sql ) )";
-	}
-
-	if ( empty( $post_type_clauses ) ) {
-		return $full ? 'WHERE 1 = 0' : '1 = 0';
-	}
-
-	$sql = '( '. implode( ' OR ', $post_type_clauses ) . ' )';
-
-	if ( null !== $post_author ) {
-		$sql .= $wpdb->prepare( ' AND post_author = %d', $post_author );
-	}
-
-	if ( $full ) {
-		$sql = 'WHERE ' . $sql;
-	}
-
-	return $sql;
-}
-
-/**
- * Retrieve the date that the last post was published.
- *
- * The server timezone is the default and is the difference between GMT and
- * server time. The 'blog' value is the date when the last post was posted. The
- * 'gmt' is when the last post was posted in GMT formatted date.
- *
- * @since 0.71
- * @since 4.4.0 The `$post_type` argument was added.
- *
- * @param string $timezone  Optional. The timezone for the timestamp. Accepts 'server', 'blog', or 'gmt'.
- *                          'server' uses the server's internal timezone.
- *                          'blog' uses the `post_modified` field, which proxies to the timezone set for the site.
- *                          'gmt' uses the `post_modified_gmt` field.
- *                          Default 'server'.
- * @param string $post_type Optional. The post type to check. Default 'any'.
- * @return string The date of the last post.
- */
-function get_lastpostdate( $timezone = 'server', $post_type = 'any' ) {
-	/**
-	 * Filters the date the last post was published.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param string $date     Date the last post was published.
-	 * @param string $timezone Location to use for getting the post published date.
-	 *                         See get_lastpostdate() for accepted `$timezone` values.
-	 */
-	return apply_filters( 'get_lastpostdate', _get_last_post_time( $timezone, 'date', $post_type ), $timezone );
-}
-
-/**
- * Get the timestamp of the last time any post was modified.
- *
- * The server timezone is the default and is the difference between GMT and
- * server time. The 'blog' value is just when the last post was modified. The
- * 'gmt' is when the last post was modified in GMT time.
- *
- * @since 1.2.0
- * @since 4.4.0 The `$post_type` argument was added.
- *
- * @param string $timezone  Optional. The timezone for the timestamp. See get_lastpostdate()
- *                          for information on accepted values.
- *                          Default 'server'.
- * @param string $post_type Optional. The post type to check. Default 'any'.
- * @return string The timestamp.
- */
-function get_lastpostmodified( $timezone = 'server', $post_type = 'any' ) {
-	/**
-	 * Pre-filter the return value of get_lastpostmodified() before the query is run.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param string $lastpostmodified Date the last post was modified.
-	 *                                 Returning anything other than false will short-circuit the function.
-	 * @param string $timezone         Location to use for getting the post modified date.
-	 *                                 See get_lastpostdate() for accepted `$timezone` values.
-	 * @param string $post_type        The post type to check.
-	 */
-	$lastpostmodified = apply_filters( 'pre_get_lastpostmodified', false, $timezone, $post_type );
-	if ( false !== $lastpostmodified ) {
-		return $lastpostmodified;
-	}
-
-	$lastpostmodified = _get_last_post_time( $timezone, 'modified', $post_type );
-
-	$lastpostdate = get_lastpostdate($timezone);
-	if ( $lastpostdate > $lastpostmodified ) {
-		$lastpostmodified = $lastpostdate;
-	}
-
-	/**
-	 * Filters the date the last post was modified.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param string $lastpostmodified Date the last post was modified.
-	 * @param string $timezone         Location to use for getting the post modified date.
-	 *                                 See get_lastpostdate() for accepted `$timezone` values.
-	 */
-	return apply_filters( 'get_lastpostmodified', $lastpostmodified, $timezone );
-}
-
-/**
- * Get the timestamp of the last time any post was modified or published.
- *
- * @since 3.1.0
- * @since 4.4.0 The `$post_type` argument was added.
- * @access private
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $timezone  The timezone for the timestamp. See get_lastpostdate().
- *                          for information on accepted values.
- * @param string $field     Post field to check. Accepts 'date' or 'modified'.
- * @param string $post_type Optional. The post type to check. Default 'any'.
- * @return string|false The timestamp.
- */
-function _get_last_post_time( $timezone, $field, $post_type = 'any' ) {
-	global $wpdb;
-
-	if ( ! in_array( $field, array( 'date', 'modified' ) ) ) {
-		return false;
-	}
-
-	$timezone = strtolower( $timezone );
-
-	$key = "lastpost{$field}:$timezone";
-	if ( 'any' !== $post_type ) {
-		$key .= ':' . sanitize_key( $post_type );
-	}
-
-	$date = wp_cache_get( $key, 'timeinfo' );
-
-	if ( ! $date ) {
-		if ( 'any' === $post_type ) {
-			$post_types = get_post_types( array( 'public' => true ) );
-			array_walk( $post_types, array( $wpdb, 'escape_by_ref' ) );
-			$post_types = "'" . implode( "', '", $post_types ) . "'";
-		} else {
-			$post_types = "'" . sanitize_key( $post_type ) . "'";
-		}
-
-		switch ( $timezone ) {
-			case 'gmt':
-				$date = $wpdb->get_var("SELECT post_{$field}_gmt FROM $wpdb->posts WHERE post_status = 'publish' AND post_type IN ({$post_types}) ORDER BY post_{$field}_gmt DESC LIMIT 1");
-				break;
-			case 'blog':
-				$date = $wpdb->get_var("SELECT post_{$field} FROM $wpdb->posts WHERE post_status = 'publish' AND post_type IN ({$post_types}) ORDER BY post_{$field}_gmt DESC LIMIT 1");
-				break;
-			case 'server':
-				$add_seconds_server = date( 'Z' );
-				$date = $wpdb->get_var("SELECT DATE_ADD(post_{$field}_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type IN ({$post_types}) ORDER BY post_{$field}_gmt DESC LIMIT 1");
-				break;
-		}
-
-		if ( $date ) {
-			wp_cache_set( $key, $date, 'timeinfo' );
-		}
-	}
-
-	return $date;
-}
-
-/**
- * Updates posts in cache.
- *
- * @since 1.5.1
- *
- * @param array $posts Array of post objects, passed by reference.
- */
-function update_post_cache( &$posts ) {
-	if ( ! $posts )
-		return;
-
-	foreach ( $posts as $post )
-		wp_cache_add( $post->ID, $post, 'posts' );
-}
-
-/**
- * Will clean the post in the cache.
- *
- * Cleaning means delete from the cache of the post. Will call to clean the term
- * object cache associated with the post ID.
- *
- * This function not run if $_wp_suspend_cache_invalidation is not empty. See
- * wp_suspend_cache_invalidation().
- *
- * @since 2.0.0
- *
- * @global bool $_wp_suspend_cache_invalidation
- *
- * @param int|WP_Post $post Post ID or post object to remove from the cache.
- */
-function clean_post_cache( $post ) {
-	global $_wp_suspend_cache_invalidation;
-
-	if ( ! empty( $_wp_suspend_cache_invalidation ) )
-		return;
-
-	$post = get_post( $post );
-	if ( empty( $post ) )
-		return;
-
-	wp_cache_delete( $post->ID, 'posts' );
-	wp_cache_delete( $post->ID, 'post_meta' );
-
-	clean_object_term_cache( $post->ID, $post->post_type );
-
-	wp_cache_delete( 'wp_get_archives', 'general' );
-
-	/**
-	 * Fires immediately after the given post's cache is cleaned.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param int     $post_id Post ID.
-	 * @param WP_Post $post    Post object.
-	 */
-	do_action( 'clean_post_cache', $post->ID, $post );
-
-	if ( 'page' == $post->post_type ) {
-		wp_cache_delete( 'all_page_ids', 'posts' );
-
-		/**
-		 * Fires immediately after the given page's cache is cleaned.
-		 *
-		 * @since 2.5.0
-		 *
-		 * @param int $post_id Post ID.
-		 */
-		do_action( 'clean_page_cache', $post->ID );
-	}
-
-	wp_cache_set( 'last_changed', microtime(), 'posts' );
-}
-
-/**
- * Call major cache updating functions for list of Post objects.
- *
- * @since 1.5.0
- *
- * @param array  $posts             Array of Post objects
- * @param string $post_type         Optional. Post type. Default 'post'.
- * @param bool   $update_term_cache Optional. Whether to update the term cache. Default true.
- * @param bool   $update_meta_cache Optional. Whether to update the meta cache. Default true.
- */
-function update_post_caches( &$posts, $post_type = 'post', $update_term_cache = true, $update_meta_cache = true ) {
-	// No point in doing all this work if we didn't match any posts.
-	if ( !$posts )
-		return;
-
-	update_post_cache($posts);
-
-	$post_ids = array();
-	foreach ( $posts as $post )
-		$post_ids[] = $post->ID;
-
-	if ( ! $post_type )
-		$post_type = 'any';
-
-	if ( $update_term_cache ) {
-		if ( is_array($post_type) ) {
-			$ptypes = $post_type;
-		} elseif ( 'any' == $post_type ) {
-			$ptypes = array();
-			// Just use the post_types in the supplied posts.
-			foreach ( $posts as $post ) {
-				$ptypes[] = $post->post_type;
-			}
-			$ptypes = array_unique($ptypes);
-		} else {
-			$ptypes = array($post_type);
-		}
-
-		if ( ! empty($ptypes) )
-			update_object_term_cache($post_ids, $ptypes);
-	}
-
-	if ( $update_meta_cache )
-		update_postmeta_cache($post_ids);
-}
-
-/**
- * Updates metadata cache for list of post IDs.
- *
- * Performs SQL query to retrieve the metadata for the post IDs and updates the
- * metadata cache for the posts. Therefore, the functions, which call this
- * function, do not need to perform SQL queries on their own.
- *
- * @since 2.1.0
- *
- * @param array $post_ids List of post IDs.
- * @return array|false Returns false if there is nothing to update or an array
- *                     of metadata.
- */
-function update_postmeta_cache( $post_ids ) {
-	return update_meta_cache('post', $post_ids);
-}
-
-/**
- * Will clean the attachment in the cache.
- *
- * Cleaning means delete from the cache. Optionally will clean the term
- * object cache associated with the attachment ID.
- *
- * This function will not run if $_wp_suspend_cache_invalidation is not empty.
- *
- * @since 3.0.0
- *
- * @global bool $_wp_suspend_cache_invalidation
- *
- * @param int  $id          The attachment ID in the cache to clean.
- * @param bool $clean_terms Optional. Whether to clean terms cache. Default false.
- */
-function clean_attachment_cache( $id, $clean_terms = false ) {
-	global $_wp_suspend_cache_invalidation;
-
-	if ( !empty($_wp_suspend_cache_invalidation) )
-		return;
-
-	$id = (int) $id;
-
-	wp_cache_delete($id, 'posts');
-	wp_cache_delete($id, 'post_meta');
-
-	if ( $clean_terms )
-		clean_object_term_cache($id, 'attachment');
-
-	/**
-	 * Fires after the given attachment's cache is cleaned.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param int $id Attachment ID.
-	 */
-	do_action( 'clean_attachment_cache', $id );
-}
-
-//
-// Hooks
-//
-
-/**
- * Hook for managing future post transitions to published.
- *
- * @since 2.3.0
- * @access private
- *
- * @see wp_clear_scheduled_hook()
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string  $new_status New post status.
- * @param string  $old_status Previous post status.
- * @param WP_Post $post       Post object.
- */
-function _transition_post_status( $new_status, $old_status, $post ) {
-	global $wpdb;
-
-	if ( $old_status != 'publish' && $new_status == 'publish' ) {
-		// Reset GUID if transitioning to publish and it is empty.
-		if ( '' == get_the_guid($post->ID) )
-			$wpdb->update( $wpdb->posts, array( 'guid' => get_permalink( $post->ID ) ), array( 'ID' => $post->ID ) );
-
-		/**
-		 * Fires when a post's status is transitioned from private to published.
-		 *
-		 * @since 1.5.0
-		 * @deprecated 2.3.0 Use 'private_to_publish' instead.
-		 *
-		 * @param int $post_id Post ID.
-		 */
-		do_action('private_to_published', $post->ID);
-	}
-
-	// If published posts changed clear the lastpostmodified cache.
-	if ( 'publish' == $new_status || 'publish' == $old_status) {
-		foreach ( array( 'server', 'gmt', 'blog' ) as $timezone ) {
-			wp_cache_delete( "lastpostmodified:$timezone", 'timeinfo' );
-			wp_cache_delete( "lastpostdate:$timezone", 'timeinfo' );
-			wp_cache_delete( "lastpostdate:$timezone:{$post->post_type}", 'timeinfo' );
-		}
-	}
-
-	if ( $new_status !== $old_status ) {
-		wp_cache_delete( _count_posts_cache_key( $post->post_type ), 'counts' );
-		wp_cache_delete( _count_posts_cache_key( $post->post_type, 'readable' ), 'counts' );
-	}
-
-	// Always clears the hook in case the post status bounced from future to draft.
-	wp_clear_scheduled_hook('publish_future_post', array( $post->ID ) );
-}
-
-/**
- * Hook used to schedule publication for a post marked for the future.
- *
- * The $post properties used and must exist are 'ID' and 'post_date_gmt'.
- *
- * @since 2.3.0
- * @access private
- *
- * @param int     $deprecated Not used. Can be set to null. Never implemented. Not marked
- *                            as deprecated with _deprecated_argument() as it conflicts with
- *                            wp_transition_post_status() and the default filter for _future_post_hook().
- * @param WP_Post $post       Post object.
- */
-function _future_post_hook( $deprecated, $post ) {
-	wp_clear_scheduled_hook( 'publish_future_post', array( $post->ID ) );
-	wp_schedule_single_event( strtotime( get_gmt_from_date( $post->post_date ) . ' GMT') , 'publish_future_post', array( $post->ID ) );
-}
-
-/**
- * Hook to schedule pings and enclosures when a post is published.
- *
- * Uses XMLRPC_REQUEST and WP_IMPORTING constants.
- *
- * @since 2.3.0
- * @access private
- *
- * @param int $post_id The ID in the database table of the post being published.
- */
-function _publish_post_hook( $post_id ) {
-	if ( defined( 'XMLRPC_REQUEST' ) ) {
-		/**
-		 * Fires when _publish_post_hook() is called during an XML-RPC request.
-		 *
-		 * @since 2.1.0
-		 *
-		 * @param int $post_id Post ID.
-		 */
-		do_action( 'xmlrpc_publish_post', $post_id );
-	}
-
-	if ( defined('WP_IMPORTING') )
-		return;
-
-	if ( get_option('default_pingback_flag') )
-		add_post_meta( $post_id, '_pingme', '1' );
-	add_post_meta( $post_id, '_encloseme', '1' );
-
-	wp_schedule_single_event(time(), 'do_pings');
-}
-
-/**
- * Return the post's parent's post_ID
- *
- * @since 3.1.0
- *
- * @param int $post_ID
- *
- * @return int|false Post parent ID, otherwise false.
- */
-function wp_get_post_parent_id( $post_ID ) {
-	$post = get_post( $post_ID );
-	if ( !$post || is_wp_error( $post ) )
-		return false;
-	return (int) $post->post_parent;
-}
-
-/**
- * Check the given subset of the post hierarchy for hierarchy loops.
- *
- * Prevents loops from forming and breaks those that it finds. Attached
- * to the {@see 'wp_insert_post_parent'} filter.
- *
- * @since 3.1.0
- *
- * @see wp_find_hierarchy_loop()
- *
- * @param int $post_parent ID of the parent for the post we're checking.
- * @param int $post_ID     ID of the post we're checking.
- * @return int The new post_parent for the post, 0 otherwise.
- */
-function wp_check_post_hierarchy_for_loops( $post_parent, $post_ID ) {
-	// Nothing fancy here - bail.
-	if ( !$post_parent )
-		return 0;
-
-	// New post can't cause a loop.
-	if ( empty( $post_ID ) )
-		return $post_parent;
-
-	// Can't be its own parent.
-	if ( $post_parent == $post_ID )
-		return 0;
-
-	// Now look for larger loops.
-	if ( !$loop = wp_find_hierarchy_loop( 'wp_get_post_parent_id', $post_ID, $post_parent ) )
-		return $post_parent; // No loop
-
-	// Setting $post_parent to the given value causes a loop.
-	if ( isset( $loop[$post_ID] ) )
-		return 0;
-
-	// There's a loop, but it doesn't contain $post_ID. Break the loop.
-	foreach ( array_keys( $loop ) as $loop_member )
-		wp_update_post( array( 'ID' => $loop_member, 'post_parent' => 0 ) );
-
-	return $post_parent;
-}
-
-/**
- * Set a post thumbnail.
- *
- * @since 3.1.0
- *
- * @param int|WP_Post $post         Post ID or post object where thumbnail should be attached.
- * @param int         $thumbnail_id Thumbnail to attach.
- * @return int|bool True on success, false on failure.
- */
-function set_post_thumbnail( $post, $thumbnail_id ) {
-	$post = get_post( $post );
-	$thumbnail_id = absint( $thumbnail_id );
-	if ( $post && $thumbnail_id && get_post( $thumbnail_id ) ) {
-		if ( wp_get_attachment_image( $thumbnail_id, 'thumbnail' ) )
-			return update_post_meta( $post->ID, '_thumbnail_id', $thumbnail_id );
-		else
-			return delete_post_meta( $post->ID, '_thumbnail_id' );
-	}
-	return false;
-}
-
-/**
- * Remove a post thumbnail.
- *
- * @since 3.3.0
- *
- * @param int|WP_Post $post Post ID or post object where thumbnail should be removed from.
- * @return bool True on success, false on failure.
- */
-function delete_post_thumbnail( $post ) {
-	$post = get_post( $post );
-	if ( $post )
-		return delete_post_meta( $post->ID, '_thumbnail_id' );
-	return false;
-}
-
-/**
- * Delete auto-drafts for new posts that are > 7 days old.
- *
- * @since 3.4.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- */
-function wp_delete_auto_drafts() {
-	global $wpdb;
-
-	// Cleanup old auto-drafts more than 7 days old.
-	$old_posts = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_status = 'auto-draft' AND DATE_SUB( NOW(), INTERVAL 7 DAY ) > post_date" );
-	foreach ( (array) $old_posts as $delete ) {
-		// Force delete.
-		wp_delete_post( $delete, true );
-	}
-}
-
-/**
- * Queues posts for lazy-loading of term meta.
- *
- * @since 4.5.0
- *
- * @param array $posts Array of WP_Post objects.
- */
-function wp_queue_posts_for_term_meta_lazyload( $posts ) {
-	$post_type_taxonomies = $term_ids = array();
-	foreach ( $posts as $post ) {
-		if ( ! ( $post instanceof WP_Post ) ) {
-			continue;
-		}
-
-		if ( ! isset( $post_type_taxonomies[ $post->post_type ] ) ) {
-			$post_type_taxonomies[ $post->post_type ] = get_object_taxonomies( $post->post_type );
-		}
-
-		foreach ( $post_type_taxonomies[ $post->post_type ] as $taxonomy ) {
-			// Term cache should already be primed by `update_post_term_cache()`.
-			$terms = get_object_term_cache( $post->ID, $taxonomy );
-			if ( false !== $terms ) {
-				foreach ( $terms as $term ) {
-					if ( ! isset( $term_ids[ $term->term_id ] ) ) {
-						$term_ids[] = $term->term_id;
-					}
-				}
-			}
-		}
-	}
-
-	if ( $term_ids ) {
-		$lazyloader = wp_metadata_lazyloader();
-		$lazyloader->queue_objects( 'term', $term_ids );
-	}
-}
-
-/**
- * Update the custom taxonomies' term counts when a post's status is changed.
- *
- * For example, default posts term counts (for custom taxonomies) don't include
- * private / draft posts.
- *
- * @since 3.3.0
- * @access private
- *
- * @param string  $new_status New post status.
- * @param string  $old_status Old post status.
- * @param WP_Post $post       Post object.
- */
-function _update_term_count_on_transition_post_status( $new_status, $old_status, $post ) {
-	// Update counts for the post's terms.
-	foreach ( (array) get_object_taxonomies( $post->post_type ) as $taxonomy ) {
-		$tt_ids = wp_get_object_terms( $post->ID, $taxonomy, array( 'fields' => 'tt_ids' ) );
-		wp_update_term_count( $tt_ids, $taxonomy );
-	}
-}
-
-/**
- * Adds any posts from the given ids to the cache that do not already exist in cache
- *
- * @since 3.4.0
- * @access private
- *
- * @see update_post_caches()
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param array $ids               ID list.
- * @param bool  $update_term_cache Optional. Whether to update the term cache. Default true.
- * @param bool  $update_meta_cache Optional. Whether to update the meta cache. Default true.
- */
-function _prime_post_caches( $ids, $update_term_cache = true, $update_meta_cache = true ) {
-	global $wpdb;
-
-	$non_cached_ids = _get_non_cached_ids( $ids, 'posts' );
-	if ( !empty( $non_cached_ids ) ) {
-		$fresh_posts = $wpdb->get_results( sprintf( "SELECT $wpdb->posts.* FROM $wpdb->posts WHERE ID IN (%s)", join( ",", $non_cached_ids ) ) );
-
-		update_post_caches( $fresh_posts, 'any', $update_term_cache, $update_meta_cache );
-	}
-}
-
-/**
- * Adds a suffix if any trashed posts have a given slug.
- *
- * Store its desired (i.e. current) slug so it can try to reclaim it
- * if the post is untrashed.
- *
- * For internal use.
- *
- * @since 4.5.0
- * @access private
- *
- * @param string $post_name Slug.
- * @param string $post_ID   Optional. Post ID that should be ignored. Default 0.
- */
-function wp_add_trashed_suffix_to_post_name_for_trashed_posts( $post_name, $post_ID = 0 ) {
-	$trashed_posts_with_desired_slug = get_posts( array(
-		'name' => $post_name,
-		'post_status' => 'trash',
-		'post_type' => 'any',
-		'nopaging' => true,
-		'post__not_in' => array( $post_ID )
-	) );
-
-	if ( ! empty( $trashed_posts_with_desired_slug ) ) {
-		foreach ( $trashed_posts_with_desired_slug as $_post ) {
-			wp_add_trashed_suffix_to_post_name_for_post( $_post );
-		}
-	}
-}
-
-/**
- * Adds a trashed suffix for a given post.
- *
- * Store its desired (i.e. current) slug so it can try to reclaim it
- * if the post is untrashed.
- *
- * For internal use.
- *
- * @since 4.5.0
- * @access private
- *
- * @param WP_Post $post The post.
- * @return string New slug for the post.
- */
-function wp_add_trashed_suffix_to_post_name_for_post( $post ) {
-	global $wpdb;
-
-	$post = get_post( $post );
-
-	if ( '__trashed' === substr( $post->post_name, -9 ) ) {
-		return $post->post_name;
-	}
-	add_post_meta( $post->ID, '_wp_desired_post_slug', $post->post_name );
-	$post_name = _truncate_post_slug( $post->post_name, 191 ) . '__trashed';
-	$wpdb->update( $wpdb->posts, array( 'post_name' => $post_name ), array( 'ID' => $post->ID ) );
-	clean_post_cache( $post->ID );
-	return $post_name;
-}
Index: www/wp-includes/class-walker-category.php
===================================================================
--- www/wp-includes/class-walker-category.php	(revision 38565)
+++ www/wp-includes/autoload/walker/Walker_Category.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/constants/pomo.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/constants/pomo.php	(revision )
+++ www/wp-includes/constants/pomo.php	(revision )
@@ -0,0 +1,7 @@
+<?php
+
+if ( ! defined( 'PO_MAX_LINE_LEN' ) ) {
+	define('PO_MAX_LINE_LEN', 79);
+}
+
+ini_set('auto_detect_line_endings', 1);
Index: www/wp-config.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-config.php	(revision )
+++ www/wp-config.php	(revision )
@@ -0,0 +1,97 @@
+<?php
+/**
+ * The base configuration for WordPress
+ *
+ * The wp-config.php creation script uses this file during the
+ * installation. You don't have to use the web site, you can
+ * copy this file to "wp-config.php" and fill in the values.
+ *
+ * This file contains the following configurations:
+ *
+ * * MySQL settings
+ * * Secret keys
+ * * Database table prefix
+ * * ABSPATH
+ *
+ * @link https://codex.wordpress.org/Editing_wp-config.php
+ *
+ * @package WordPress
+ */
+
+// ** MySQL settings - You can get this info from your web host ** //
+/** The name of the database for WordPress */
+define('DB_NAME', 'wordpress');
+
+/** MySQL database username */
+define('DB_USER', 'wordpress');
+
+/** MySQL database password */
+define('DB_PASSWORD', 'wordpress');
+
+/** MySQL hostname */
+define('DB_HOST', 'localhost');
+
+/** Database Charset to use in creating database tables. */
+define('DB_CHARSET', 'utf8mb4');
+
+/** The Database Collate type. Don't change this if in doubt. */
+define('DB_COLLATE', '');
+
+define( 'WP_HOME', 'http://wptrunk.dev' );
+define( 'WP_SITEURL', 'http://wptrunk.dev' );
+
+/**#@+
+ * Authentication Unique Keys and Salts.
+ *
+ * Change these to different unique phrases!
+ * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
+ * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
+ *
+ * @since 2.6.0
+ */
+define('AUTH_KEY',         'JL>_N*U>6Ik:v}P?~|RHS=s~`NZ_qfe.S*DzoB4#O~0|cg>>-rfP&oF4RS^r]+%%');
+define('SECURE_AUTH_KEY',  ' V9eW2r</*lLH~M,m&&T~NDT$]({qp3!E4WA25-UM./pf4OSnjm8>~/yE!,!~(Ep');
+define('LOGGED_IN_KEY',    'LaH(>Hhk&}PLltJ<_3O;.Qpgd}ZB8*yO0*umsE7PWuLDG,Bj!KmXh+dCOF|8=.yg');
+define('NONCE_KEY',        'a1+@bSJYa3jC!&y]{-A@CGc2?{5GSW ax>0Sr?Fn(;jWbW$I6UhRT]Mf0?)#zQi#');
+define('AUTH_SALT',        '}rMB{W6E#j-V8v2rArY4wxTe/$S<KS2^C?z$)V6l|3r+I?t6LV*e4DYc_q|G=jE.');
+define('SECURE_AUTH_SALT', 'o3~ c;Dz4hL0[RDa.Z=E15&d~aAu4qV0:nrHJ(?BRZ1|9>2sejszpyA4@G,_*quI');
+define('LOGGED_IN_SALT',   'uW-y2uYJwbQ}MJ>b?eTV<]IKU|CNqwH<%Vc2JOmjri6=HBQp+[xb0vy9#-NKNhkd');
+define('NONCE_SALT',       'q3D{;7/Q(_${IHJfSC9D?^}9)6B^_5,KAkG12$sm=o~FV5`we6StZL=>R!@>veQ~');
+
+/**#@-*/
+
+/**
+ * WordPress Database Table prefix.
+ *
+ * You can have multiple installations in one database if you give each
+ * a unique prefix. Only numbers, letters, and underscores please!
+ */
+$table_prefix  = 'wp_';
+
+/**
+ * For developers: WordPress debugging mode.
+ *
+ * Change this to true to enable the display of notices during development.
+ * It is strongly recommended that plugin and theme developers use WP_DEBUG
+ * in their development environments.
+ *
+ * For information on other constants that can be used for debugging,
+ * visit the Codex.
+ *
+ * @link https://codex.wordpress.org/Debugging_in_WordPress
+ */
+define('WP_DEBUG', true);
+
+ini_set('display_errors', 1);
+ini_set('display_startup_errors', 1);
+
+error_reporting(E_ALL);
+
+/* That's all, stop editing! Happy blogging. */
+
+/** Absolute path to the WordPress directory. */
+if ( !defined('ABSPATH') )
+	define('ABSPATH', dirname(__FILE__) . '/');
+
+/** Sets up WordPress vars and included files. */
+require_once(ABSPATH . 'wp-settings.php');
Index: www/wp-admin/link-parse-opml.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/link-parse-opml.php	(revision 38565)
+++ www/wp-admin/link-parse-opml.php	(revision 38565)
@@ -1,90 +0,0 @@
-<?php
-/**
- * Parse OPML XML files and store in globals.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-if ( ! defined('ABSPATH') )
-	die();
-
-/**
- * @global string $opml
- */
-global $opml;
-
-/**
- * XML callback function for the start of a new XML tag.
- *
- * @since 0.71
- * @access private
- *
- * @global array $names
- * @global array $urls
- * @global array $targets
- * @global array $descriptions
- * @global array $feeds
- *
- * @param mixed $parser XML Parser resource.
- * @param string $tagName XML element name.
- * @param array $attrs XML element attributes.
- */
-function startElement($parser, $tagName, $attrs) {
-	global $names, $urls, $targets, $descriptions, $feeds;
-
-	if ( 'OUTLINE' === $tagName ) {
-		$name = '';
-		if ( isset( $attrs['TEXT'] ) ) {
-			$name = $attrs['TEXT'];
-		}
-		if ( isset( $attrs['TITLE'] ) ) {
-			$name = $attrs['TITLE'];
-		}
-		$url = '';
-		if ( isset( $attrs['URL'] ) ) {
-			$url = $attrs['URL'];
-		}
-		if ( isset( $attrs['HTMLURL'] ) ) {
-			$url = $attrs['HTMLURL'];
-		}
-
-		// Save the data away.
-		$names[] = $name;
-		$urls[] = $url;
-		$targets[] = isset( $attrs['TARGET'] ) ? $attrs['TARGET'] :  '';
-		$feeds[] = isset( $attrs['XMLURL'] ) ? $attrs['XMLURL'] :  '';
-		$descriptions[] = isset( $attrs['DESCRIPTION'] ) ? $attrs['DESCRIPTION'] :  '';
-	} // End if outline.
-}
-
-/**
- * XML callback function that is called at the end of a XML tag.
- *
- * @since 0.71
- * @access private
- *
- * @param mixed $parser XML Parser resource.
- * @param string $tagName XML tag name.
- */
-function endElement($parser, $tagName) {
-	// Nothing to do.
-}
-
-// Create an XML parser
-$xml_parser = xml_parser_create();
-
-// Set the functions to handle opening and closing tags
-xml_set_element_handler($xml_parser, "startElement", "endElement");
-
-if ( ! xml_parse( $xml_parser, $opml, true ) ) {
-	printf(
-		/* translators: 1: error message, 2: line number */
-		__( 'XML Error: %1$s at line %2$s' ),
-		xml_error_string( xml_get_error_code( $xml_parser ) ),
-		xml_get_current_line_number( $xml_parser )
-	);
-}
-
-// Free up memory used by the XML parser
-xml_parser_free($xml_parser);
Index: www/wp-includes/Requests/Session.php
===================================================================
--- www/wp-includes/Requests/Session.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Session.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/widgets/class-wp-widget-recent-posts.php
===================================================================
--- www/wp-includes/widgets/class-wp-widget-recent-posts.php	(revision 38565)
+++ www/wp-includes/autoload/widgets/WP_Widget_Recent_Posts.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/includes/class-wp-screen.php
===================================================================
--- www/wp-admin/includes/class-wp-screen.php	(revision 38565)
+++ www/wp-admin/autoload/WP_Screen.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/id3/ID3/module.audio.ogg.php
===================================================================
--- www/wp-includes/autoload/id3/ID3/module.audio.ogg.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/id3/ID3/module.audio.ogg.php	(revision UNDEFINED)
@@ -1,839 +0,0 @@
-<?php
-/////////////////////////////////////////////////////////////////
-/// getID3() by James Heinrich <info@getid3.org>               //
-//  available at http://getid3.sourceforge.net                 //
-//            or http://www.getid3.org                         //
-//          also https://github.com/JamesHeinrich/getID3       //
-/////////////////////////////////////////////////////////////////
-// See readme.txt for more details                             //
-/////////////////////////////////////////////////////////////////
-//                                                             //
-// module.audio.ogg.php                                        //
-// module for analyzing Ogg Vorbis, OggFLAC and Speex files    //
-// dependencies: module.audio.flac.php                         //
-//                                                            ///
-/////////////////////////////////////////////////////////////////
-
-getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.flac.php', __FILE__, true);
-
-class getid3_ogg extends getid3_handler
-{
-	// http://xiph.org/vorbis/doc/Vorbis_I_spec.html
-	public function Analyze() {
-		$info = &$this->getid3->info;
-
-		$info['fileformat'] = 'ogg';
-
-		// Warn about illegal tags - only vorbiscomments are allowed
-		if (isset($info['id3v2'])) {
-			$info['warning'][] = 'Illegal ID3v2 tag present.';
-		}
-		if (isset($info['id3v1'])) {
-			$info['warning'][] = 'Illegal ID3v1 tag present.';
-		}
-		if (isset($info['ape'])) {
-			$info['warning'][] = 'Illegal APE tag present.';
-		}
-
-
-		// Page 1 - Stream Header
-
-		$this->fseek($info['avdataoffset']);
-
-		$oggpageinfo = $this->ParseOggPageHeader();
-		$info['ogg']['pageheader'][$oggpageinfo['page_seqno']] = $oggpageinfo;
-
-		if ($this->ftell() >= $this->getid3->fread_buffer_size()) {
-			$info['error'][] = 'Could not find start of Ogg page in the first '.$this->getid3->fread_buffer_size().' bytes (this might not be an Ogg-Vorbis file?)';
-			unset($info['fileformat']);
-			unset($info['ogg']);
-			return false;
-		}
-
-		$filedata = $this->fread($oggpageinfo['page_length']);
-		$filedataoffset = 0;
-
-		if (substr($filedata, 0, 4) == 'fLaC') {
-
-			$info['audio']['dataformat']   = 'flac';
-			$info['audio']['bitrate_mode'] = 'vbr';
-			$info['audio']['lossless']     = true;
-
-		} elseif (substr($filedata, 1, 6) == 'vorbis') {
-
-			$this->ParseVorbisPageHeader($filedata, $filedataoffset, $oggpageinfo);
-
-		} elseif (substr($filedata, 0, 8) == 'OpusHead') {
-
-			if( $this->ParseOpusPageHeader($filedata, $filedataoffset, $oggpageinfo) == false ) {
-				return false;
-			}
-
-		} elseif (substr($filedata, 0, 8) == 'Speex   ') {
-
-			// http://www.speex.org/manual/node10.html
-
-			$info['audio']['dataformat']   = 'speex';
-			$info['mime_type']             = 'audio/speex';
-			$info['audio']['bitrate_mode'] = 'abr';
-			$info['audio']['lossless']     = false;
-
-			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['speex_string']           =                              substr($filedata, $filedataoffset, 8); // hard-coded to 'Speex   '
-			$filedataoffset += 8;
-			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['speex_version']          =                              substr($filedata, $filedataoffset, 20);
-			$filedataoffset += 20;
-			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['speex_version_id']       = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
-			$filedataoffset += 4;
-			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['header_size']            = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
-			$filedataoffset += 4;
-			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['rate']                   = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
-			$filedataoffset += 4;
-			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['mode']                   = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
-			$filedataoffset += 4;
-			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['mode_bitstream_version'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
-			$filedataoffset += 4;
-			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['nb_channels']            = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
-			$filedataoffset += 4;
-			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['bitrate']                = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
-			$filedataoffset += 4;
-			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['framesize']              = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
-			$filedataoffset += 4;
-			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['vbr']                    = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
-			$filedataoffset += 4;
-			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['frames_per_packet']      = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
-			$filedataoffset += 4;
-			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['extra_headers']          = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
-			$filedataoffset += 4;
-			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['reserved1']              = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
-			$filedataoffset += 4;
-			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['reserved2']              = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
-			$filedataoffset += 4;
-
-			$info['speex']['speex_version'] = trim($info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['speex_version']);
-			$info['speex']['sample_rate']   = $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['rate'];
-			$info['speex']['channels']      = $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['nb_channels'];
-			$info['speex']['vbr']           = (bool) $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['vbr'];
-			$info['speex']['band_type']     = $this->SpeexBandModeLookup($info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['mode']);
-
-			$info['audio']['sample_rate']   = $info['speex']['sample_rate'];
-			$info['audio']['channels']      = $info['speex']['channels'];
-			if ($info['speex']['vbr']) {
-				$info['audio']['bitrate_mode'] = 'vbr';
-			}
-
-		} elseif (substr($filedata, 0, 7) == "\x80".'theora') {
-
-			// http://www.theora.org/doc/Theora.pdf (section 6.2)
-
-			$info['ogg']['pageheader']['theora']['theora_magic']             =                           substr($filedata, $filedataoffset,  7); // hard-coded to "\x80.'theora'
-			$filedataoffset += 7;
-			$info['ogg']['pageheader']['theora']['version_major']            = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  1));
-			$filedataoffset += 1;
-			$info['ogg']['pageheader']['theora']['version_minor']            = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  1));
-			$filedataoffset += 1;
-			$info['ogg']['pageheader']['theora']['version_revision']         = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  1));
-			$filedataoffset += 1;
-			$info['ogg']['pageheader']['theora']['frame_width_macroblocks']  = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  2));
-			$filedataoffset += 2;
-			$info['ogg']['pageheader']['theora']['frame_height_macroblocks'] = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  2));
-			$filedataoffset += 2;
-			$info['ogg']['pageheader']['theora']['resolution_x']             = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  3));
-			$filedataoffset += 3;
-			$info['ogg']['pageheader']['theora']['resolution_y']             = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  3));
-			$filedataoffset += 3;
-			$info['ogg']['pageheader']['theora']['picture_offset_x']         = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  1));
-			$filedataoffset += 1;
-			$info['ogg']['pageheader']['theora']['picture_offset_y']         = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  1));
-			$filedataoffset += 1;
-			$info['ogg']['pageheader']['theora']['frame_rate_numerator']     = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  4));
-			$filedataoffset += 4;
-			$info['ogg']['pageheader']['theora']['frame_rate_denominator']   = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  4));
-			$filedataoffset += 4;
-			$info['ogg']['pageheader']['theora']['pixel_aspect_numerator']   = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  3));
-			$filedataoffset += 3;
-			$info['ogg']['pageheader']['theora']['pixel_aspect_denominator'] = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  3));
-			$filedataoffset += 3;
-			$info['ogg']['pageheader']['theora']['color_space_id']           = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  1));
-			$filedataoffset += 1;
-			$info['ogg']['pageheader']['theora']['nominal_bitrate']          = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  3));
-			$filedataoffset += 3;
-			$info['ogg']['pageheader']['theora']['flags']                    = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  2));
-			$filedataoffset += 2;
-
-			$info['ogg']['pageheader']['theora']['quality']         = ($info['ogg']['pageheader']['theora']['flags'] & 0xFC00) >> 10;
-			$info['ogg']['pageheader']['theora']['kfg_shift']       = ($info['ogg']['pageheader']['theora']['flags'] & 0x03E0) >>  5;
-			$info['ogg']['pageheader']['theora']['pixel_format_id'] = ($info['ogg']['pageheader']['theora']['flags'] & 0x0018) >>  3;
-			$info['ogg']['pageheader']['theora']['reserved']        = ($info['ogg']['pageheader']['theora']['flags'] & 0x0007) >>  0; // should be 0
-			$info['ogg']['pageheader']['theora']['color_space']     = self::TheoraColorSpace($info['ogg']['pageheader']['theora']['color_space_id']);
-			$info['ogg']['pageheader']['theora']['pixel_format']    = self::TheoraPixelFormat($info['ogg']['pageheader']['theora']['pixel_format_id']);
-
-			$info['video']['dataformat']   = 'theora';
-			$info['mime_type']             = 'video/ogg';
-			//$info['audio']['bitrate_mode'] = 'abr';
-			//$info['audio']['lossless']     = false;
-			$info['video']['resolution_x'] = $info['ogg']['pageheader']['theora']['resolution_x'];
-			$info['video']['resolution_y'] = $info['ogg']['pageheader']['theora']['resolution_y'];
-			if ($info['ogg']['pageheader']['theora']['frame_rate_denominator'] > 0) {
-				$info['video']['frame_rate'] = (float) $info['ogg']['pageheader']['theora']['frame_rate_numerator'] / $info['ogg']['pageheader']['theora']['frame_rate_denominator'];
-			}
-			if ($info['ogg']['pageheader']['theora']['pixel_aspect_denominator'] > 0) {
-				$info['video']['pixel_aspect_ratio'] = (float) $info['ogg']['pageheader']['theora']['pixel_aspect_numerator'] / $info['ogg']['pageheader']['theora']['pixel_aspect_denominator'];
-			}
-$info['warning'][] = 'Ogg Theora (v3) not fully supported in this version of getID3 ['.$this->getid3->version().'] -- bitrate, playtime and all audio data are currently unavailable';
-
-
-		} elseif (substr($filedata, 0, 8) == "fishead\x00") {
-
-			// Ogg Skeleton version 3.0 Format Specification
-			// http://xiph.org/ogg/doc/skeleton.html
-			$filedataoffset += 8;
-			$info['ogg']['skeleton']['fishead']['raw']['version_major']                = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  2));
-			$filedataoffset += 2;
-			$info['ogg']['skeleton']['fishead']['raw']['version_minor']                = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  2));
-			$filedataoffset += 2;
-			$info['ogg']['skeleton']['fishead']['raw']['presentationtime_numerator']   = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  8));
-			$filedataoffset += 8;
-			$info['ogg']['skeleton']['fishead']['raw']['presentationtime_denominator'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  8));
-			$filedataoffset += 8;
-			$info['ogg']['skeleton']['fishead']['raw']['basetime_numerator']           = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  8));
-			$filedataoffset += 8;
-			$info['ogg']['skeleton']['fishead']['raw']['basetime_denominator']         = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  8));
-			$filedataoffset += 8;
-			$info['ogg']['skeleton']['fishead']['raw']['utc']                          = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 20));
-			$filedataoffset += 20;
-
-			$info['ogg']['skeleton']['fishead']['version']          = $info['ogg']['skeleton']['fishead']['raw']['version_major'].'.'.$info['ogg']['skeleton']['fishead']['raw']['version_minor'];
-			$info['ogg']['skeleton']['fishead']['presentationtime'] = $info['ogg']['skeleton']['fishead']['raw']['presentationtime_numerator'] / $info['ogg']['skeleton']['fishead']['raw']['presentationtime_denominator'];
-			$info['ogg']['skeleton']['fishead']['basetime']         = $info['ogg']['skeleton']['fishead']['raw']['basetime_numerator']         / $info['ogg']['skeleton']['fishead']['raw']['basetime_denominator'];
-			$info['ogg']['skeleton']['fishead']['utc']              = $info['ogg']['skeleton']['fishead']['raw']['utc'];
-
-
-			$counter = 0;
-			do {
-				$oggpageinfo = $this->ParseOggPageHeader();
-				$info['ogg']['pageheader'][$oggpageinfo['page_seqno'].'.'.$counter++] = $oggpageinfo;
-				$filedata = $this->fread($oggpageinfo['page_length']);
-				$this->fseek($oggpageinfo['page_end_offset']);
-
-				if (substr($filedata, 0, 8) == "fisbone\x00") {
-
-					$filedataoffset = 8;
-					$info['ogg']['skeleton']['fisbone']['raw']['message_header_offset']   = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  4));
-					$filedataoffset += 4;
-					$info['ogg']['skeleton']['fisbone']['raw']['serial_number']           = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  4));
-					$filedataoffset += 4;
-					$info['ogg']['skeleton']['fisbone']['raw']['number_header_packets']   = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  4));
-					$filedataoffset += 4;
-					$info['ogg']['skeleton']['fisbone']['raw']['granulerate_numerator']   = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  8));
-					$filedataoffset += 8;
-					$info['ogg']['skeleton']['fisbone']['raw']['granulerate_denominator'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  8));
-					$filedataoffset += 8;
-					$info['ogg']['skeleton']['fisbone']['raw']['basegranule']             = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  8));
-					$filedataoffset += 8;
-					$info['ogg']['skeleton']['fisbone']['raw']['preroll']                 = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  4));
-					$filedataoffset += 4;
-					$info['ogg']['skeleton']['fisbone']['raw']['granuleshift']            = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  1));
-					$filedataoffset += 1;
-					$info['ogg']['skeleton']['fisbone']['raw']['padding']                 =                              substr($filedata, $filedataoffset,  3);
-					$filedataoffset += 3;
-
-				} elseif (substr($filedata, 1, 6) == 'theora') {
-
-					$info['video']['dataformat'] = 'theora1';
-					$info['error'][] = 'Ogg Theora (v1) not correctly handled in this version of getID3 ['.$this->getid3->version().']';
-					//break;
-
-				} elseif (substr($filedata, 1, 6) == 'vorbis') {
-
-					$this->ParseVorbisPageHeader($filedata, $filedataoffset, $oggpageinfo);
-
-				} else {
-					$info['error'][] = 'unexpected';
-					//break;
-				}
-			//} while ($oggpageinfo['page_seqno'] == 0);
-			} while (($oggpageinfo['page_seqno'] == 0) && (substr($filedata, 0, 8) != "fisbone\x00"));
-
-			$this->fseek($oggpageinfo['page_start_offset']);
-
-			$info['error'][] = 'Ogg Skeleton not correctly handled in this version of getID3 ['.$this->getid3->version().']';
-			//return false;
-
-		} else {
-
-			$info['error'][] = 'Expecting either "Speex   ", "OpusHead" or "vorbis" identifier strings, found "'.substr($filedata, 0, 8).'"';
-			unset($info['ogg']);
-			unset($info['mime_type']);
-			return false;
-
-		}
-
-		// Page 2 - Comment Header
-		$oggpageinfo = $this->ParseOggPageHeader();
-		$info['ogg']['pageheader'][$oggpageinfo['page_seqno']] = $oggpageinfo;
-
-		switch ($info['audio']['dataformat']) {
-			case 'vorbis':
-				$filedata = $this->fread($info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_length']);
-				$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['packet_type'] = getid3_lib::LittleEndian2Int(substr($filedata, 0, 1));
-				$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['stream_type'] =                              substr($filedata, 1, 6); // hard-coded to 'vorbis'
-
-				$this->ParseVorbisComments();
-				break;
-
-			case 'flac':
-				$flac = new getid3_flac($this->getid3);
-				if (!$flac->parseMETAdata()) {
-					$info['error'][] = 'Failed to parse FLAC headers';
-					return false;
-				}
-				unset($flac);
-				break;
-
-			case 'speex':
-				$this->fseek($info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_length'], SEEK_CUR);
-				$this->ParseVorbisComments();
-				break;
-
-			case 'opus':
-				$filedata = $this->fread($info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_length']);
-				$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['stream_type'] = substr($filedata, 0, 8); // hard-coded to 'OpusTags'
-				if(substr($filedata, 0, 8)  != 'OpusTags') {
-					$info['error'][] = 'Expected "OpusTags" as header but got "'.substr($filedata, 0, 8).'"';
-					return false;
-				}
-
-				$this->ParseVorbisComments();
-				break;
-
-		}
-
-		// Last Page - Number of Samples
-		if (!getid3_lib::intValueSupported($info['avdataend'])) {
-
-			$info['warning'][] = 'Unable to parse Ogg end chunk file (PHP does not support file operations beyond '.round(PHP_INT_MAX / 1073741824).'GB)';
-
-		} else {
-
-			$this->fseek(max($info['avdataend'] - $this->getid3->fread_buffer_size(), 0));
-			$LastChunkOfOgg = strrev($this->fread($this->getid3->fread_buffer_size()));
-			if ($LastOggSpostion = strpos($LastChunkOfOgg, 'SggO')) {
-				$this->fseek($info['avdataend'] - ($LastOggSpostion + strlen('SggO')));
-				$info['avdataend'] = $this->ftell();
-				$info['ogg']['pageheader']['eos'] = $this->ParseOggPageHeader();
-				$info['ogg']['samples']   = $info['ogg']['pageheader']['eos']['pcm_abs_position'];
-				if ($info['ogg']['samples'] == 0) {
-					$info['error'][] = 'Corrupt Ogg file: eos.number of samples == zero';
-					return false;
-				}
-				if (!empty($info['audio']['sample_rate'])) {
-					$info['ogg']['bitrate_average'] = (($info['avdataend'] - $info['avdataoffset']) * 8) / ($info['ogg']['samples'] / $info['audio']['sample_rate']);
-				}
-			}
-
-		}
-
-		if (!empty($info['ogg']['bitrate_average'])) {
-			$info['audio']['bitrate'] = $info['ogg']['bitrate_average'];
-		} elseif (!empty($info['ogg']['bitrate_nominal'])) {
-			$info['audio']['bitrate'] = $info['ogg']['bitrate_nominal'];
-		} elseif (!empty($info['ogg']['bitrate_min']) && !empty($info['ogg']['bitrate_max'])) {
-			$info['audio']['bitrate'] = ($info['ogg']['bitrate_min'] + $info['ogg']['bitrate_max']) / 2;
-		}
-		if (isset($info['audio']['bitrate']) && !isset($info['playtime_seconds'])) {
-			if ($info['audio']['bitrate'] == 0) {
-				$info['error'][] = 'Corrupt Ogg file: bitrate_audio == zero';
-				return false;
-			}
-			$info['playtime_seconds'] = (float) ((($info['avdataend'] - $info['avdataoffset']) * 8) / $info['audio']['bitrate']);
-		}
-
-		if (isset($info['ogg']['vendor'])) {
-			$info['audio']['encoder'] = preg_replace('/^Encoded with /', '', $info['ogg']['vendor']);
-
-			// Vorbis only
-			if ($info['audio']['dataformat'] == 'vorbis') {
-
-				// Vorbis 1.0 starts with Xiph.Org
-				if  (preg_match('/^Xiph.Org/', $info['audio']['encoder'])) {
-
-					if ($info['audio']['bitrate_mode'] == 'abr') {
-
-						// Set -b 128 on abr files
-						$info['audio']['encoder_options'] = '-b '.round($info['ogg']['bitrate_nominal'] / 1000);
-
-					} elseif (($info['audio']['bitrate_mode'] == 'vbr') && ($info['audio']['channels'] == 2) && ($info['audio']['sample_rate'] >= 44100) && ($info['audio']['sample_rate'] <= 48000)) {
-						// Set -q N on vbr files
-						$info['audio']['encoder_options'] = '-q '.$this->get_quality_from_nominal_bitrate($info['ogg']['bitrate_nominal']);
-
-					}
-				}
-
-				if (empty($info['audio']['encoder_options']) && !empty($info['ogg']['bitrate_nominal'])) {
-					$info['audio']['encoder_options'] = 'Nominal bitrate: '.intval(round($info['ogg']['bitrate_nominal'] / 1000)).'kbps';
-				}
-			}
-		}
-
-		return true;
-	}
-
-	public function ParseVorbisPageHeader(&$filedata, &$filedataoffset, &$oggpageinfo) {
-		$info = &$this->getid3->info;
-		$info['audio']['dataformat'] = 'vorbis';
-		$info['audio']['lossless']   = false;
-
-		$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['packet_type'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 1));
-		$filedataoffset += 1;
-		$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['stream_type'] = substr($filedata, $filedataoffset, 6); // hard-coded to 'vorbis'
-		$filedataoffset += 6;
-		$info['ogg']['bitstreamversion'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
-		$filedataoffset += 4;
-		$info['ogg']['numberofchannels'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 1));
-		$filedataoffset += 1;
-		$info['audio']['channels']       = $info['ogg']['numberofchannels'];
-		$info['ogg']['samplerate']       = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
-		$filedataoffset += 4;
-		if ($info['ogg']['samplerate'] == 0) {
-			$info['error'][] = 'Corrupt Ogg file: sample rate == zero';
-			return false;
-		}
-		$info['audio']['sample_rate']    = $info['ogg']['samplerate'];
-		$info['ogg']['samples']          = 0; // filled in later
-		$info['ogg']['bitrate_average']  = 0; // filled in later
-		$info['ogg']['bitrate_max']      = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
-		$filedataoffset += 4;
-		$info['ogg']['bitrate_nominal']  = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
-		$filedataoffset += 4;
-		$info['ogg']['bitrate_min']      = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
-		$filedataoffset += 4;
-		$info['ogg']['blocksize_small']  = pow(2,  getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 1)) & 0x0F);
-		$info['ogg']['blocksize_large']  = pow(2, (getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 1)) & 0xF0) >> 4);
-		$info['ogg']['stop_bit']         = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 1)); // must be 1, marks end of packet
-
-		$info['audio']['bitrate_mode'] = 'vbr'; // overridden if actually abr
-		if ($info['ogg']['bitrate_max'] == 0xFFFFFFFF) {
-			unset($info['ogg']['bitrate_max']);
-			$info['audio']['bitrate_mode'] = 'abr';
-		}
-		if ($info['ogg']['bitrate_nominal'] == 0xFFFFFFFF) {
-			unset($info['ogg']['bitrate_nominal']);
-		}
-		if ($info['ogg']['bitrate_min'] == 0xFFFFFFFF) {
-			unset($info['ogg']['bitrate_min']);
-			$info['audio']['bitrate_mode'] = 'abr';
-		}
-		return true;
-	}
-
-	// http://tools.ietf.org/html/draft-ietf-codec-oggopus-03
-	public function ParseOpusPageHeader(&$filedata, &$filedataoffset, &$oggpageinfo) {
-		$info = &$this->getid3->info;
-		$info['audio']['dataformat']   = 'opus';
-		$info['mime_type']             = 'audio/ogg; codecs=opus';
-
-		/** @todo find a usable way to detect abr (vbr that is padded to be abr) */
-		$info['audio']['bitrate_mode'] = 'vbr';
-
-		$info['audio']['lossless']     = false;
-
-		$info['ogg']['pageheader']['opus']['opus_magic'] = substr($filedata, $filedataoffset, 8); // hard-coded to 'OpusHead'
-		$filedataoffset += 8;
-		$info['ogg']['pageheader']['opus']['version']    = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  1));
-		$filedataoffset += 1;
-
-		if ($info['ogg']['pageheader']['opus']['version'] < 1 || $info['ogg']['pageheader']['opus']['version'] > 15) {
-			$info['error'][] = 'Unknown opus version number (only accepting 1-15)';
-			return false;
-		}
-
-		$info['ogg']['pageheader']['opus']['out_channel_count'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  1));
-		$filedataoffset += 1;
-
-		if ($info['ogg']['pageheader']['opus']['out_channel_count'] == 0) {
-			$info['error'][] = 'Invalid channel count in opus header (must not be zero)';
-			return false;
-		}
-
-		$info['ogg']['pageheader']['opus']['pre_skip'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  2));
-		$filedataoffset += 2;
-
-		$info['ogg']['pageheader']['opus']['sample_rate'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  4));
-		$filedataoffset += 4;
-
-		//$info['ogg']['pageheader']['opus']['output_gain'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  2));
-		//$filedataoffset += 2;
-
-		//$info['ogg']['pageheader']['opus']['channel_mapping_family'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  1));
-		//$filedataoffset += 1;
-
-		$info['opus']['opus_version']      = $info['ogg']['pageheader']['opus']['version'];
-		$info['opus']['sample_rate']       = $info['ogg']['pageheader']['opus']['sample_rate'];
-		$info['opus']['out_channel_count'] = $info['ogg']['pageheader']['opus']['out_channel_count'];
-
-		$info['audio']['channels']      = $info['opus']['out_channel_count'];
-		$info['audio']['sample_rate']   = $info['opus']['sample_rate'];
-		return true;
-	}
-
-
-	public function ParseOggPageHeader() {
-		// http://xiph.org/ogg/vorbis/doc/framing.html
-		$oggheader['page_start_offset'] = $this->ftell(); // where we started from in the file
-
-		$filedata = $this->fread($this->getid3->fread_buffer_size());
-		$filedataoffset = 0;
-		while ((substr($filedata, $filedataoffset++, 4) != 'OggS')) {
-			if (($this->ftell() - $oggheader['page_start_offset']) >= $this->getid3->fread_buffer_size()) {
-				// should be found before here
-				return false;
-			}
-			if ((($filedataoffset + 28) > strlen($filedata)) || (strlen($filedata) < 28)) {
-				if ($this->feof() || (($filedata .= $this->fread($this->getid3->fread_buffer_size())) === false)) {
-					// get some more data, unless eof, in which case fail
-					return false;
-				}
-			}
-		}
-		$filedataoffset += strlen('OggS') - 1; // page, delimited by 'OggS'
-
-		$oggheader['stream_structver']  = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 1));
-		$filedataoffset += 1;
-		$oggheader['flags_raw']         = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 1));
-		$filedataoffset += 1;
-		$oggheader['flags']['fresh']    = (bool) ($oggheader['flags_raw'] & 0x01); // fresh packet
-		$oggheader['flags']['bos']      = (bool) ($oggheader['flags_raw'] & 0x02); // first page of logical bitstream (bos)
-		$oggheader['flags']['eos']      = (bool) ($oggheader['flags_raw'] & 0x04); // last page of logical bitstream (eos)
-
-		$oggheader['pcm_abs_position']  = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 8));
-		$filedataoffset += 8;
-		$oggheader['stream_serialno']   = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
-		$filedataoffset += 4;
-		$oggheader['page_seqno']        = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
-		$filedataoffset += 4;
-		$oggheader['page_checksum']     = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
-		$filedataoffset += 4;
-		$oggheader['page_segments']     = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 1));
-		$filedataoffset += 1;
-		$oggheader['page_length'] = 0;
-		for ($i = 0; $i < $oggheader['page_segments']; $i++) {
-			$oggheader['segment_table'][$i] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 1));
-			$filedataoffset += 1;
-			$oggheader['page_length'] += $oggheader['segment_table'][$i];
-		}
-		$oggheader['header_end_offset'] = $oggheader['page_start_offset'] + $filedataoffset;
-		$oggheader['page_end_offset']   = $oggheader['header_end_offset'] + $oggheader['page_length'];
-		$this->fseek($oggheader['header_end_offset']);
-
-		return $oggheader;
-	}
-
-    // http://xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-810005
-	public function ParseVorbisComments() {
-		$info = &$this->getid3->info;
-
-		$OriginalOffset = $this->ftell();
-		$commentdataoffset = 0;
-		$VorbisCommentPage = 1;
-
-		switch ($info['audio']['dataformat']) {
-			case 'vorbis':
-			case 'speex':
-			case 'opus':
-				$CommentStartOffset = $info['ogg']['pageheader'][$VorbisCommentPage]['page_start_offset'];  // Second Ogg page, after header block
-				$this->fseek($CommentStartOffset);
-				$commentdataoffset = 27 + $info['ogg']['pageheader'][$VorbisCommentPage]['page_segments'];
-				$commentdata = $this->fread(self::OggPageSegmentLength($info['ogg']['pageheader'][$VorbisCommentPage], 1) + $commentdataoffset);
-
-				if ($info['audio']['dataformat'] == 'vorbis') {
-					$commentdataoffset += (strlen('vorbis') + 1);
-				}
-				else if ($info['audio']['dataformat'] == 'opus') {
-					$commentdataoffset += strlen('OpusTags');
-				}
-
-				break;
-
-			case 'flac':
-				$CommentStartOffset = $info['flac']['VORBIS_COMMENT']['raw']['offset'] + 4;
-				$this->fseek($CommentStartOffset);
-				$commentdata = $this->fread($info['flac']['VORBIS_COMMENT']['raw']['block_length']);
-				break;
-
-			default:
-				return false;
-		}
-
-		$VendorSize = getid3_lib::LittleEndian2Int(substr($commentdata, $commentdataoffset, 4));
-		$commentdataoffset += 4;
-
-		$info['ogg']['vendor'] = substr($commentdata, $commentdataoffset, $VendorSize);
-		$commentdataoffset += $VendorSize;
-
-		$CommentsCount = getid3_lib::LittleEndian2Int(substr($commentdata, $commentdataoffset, 4));
-		$commentdataoffset += 4;
-		$info['avdataoffset'] = $CommentStartOffset + $commentdataoffset;
-
-		$basicfields = array('TITLE', 'ARTIST', 'ALBUM', 'TRACKNUMBER', 'GENRE', 'DATE', 'DESCRIPTION', 'COMMENT');
-		$ThisFileInfo_ogg_comments_raw = &$info['ogg']['comments_raw'];
-		for ($i = 0; $i < $CommentsCount; $i++) {
-
-			if ($i >= 10000) {
-				// https://github.com/owncloud/music/issues/212#issuecomment-43082336
-				$info['warning'][] = 'Unexpectedly large number ('.$CommentsCount.') of Ogg comments - breaking after reading '.$i.' comments';
-				break;
-			}
-
-			$ThisFileInfo_ogg_comments_raw[$i]['dataoffset'] = $CommentStartOffset + $commentdataoffset;
-
-			if ($this->ftell() < ($ThisFileInfo_ogg_comments_raw[$i]['dataoffset'] + 4)) {
-				if ($oggpageinfo = $this->ParseOggPageHeader()) {
-					$info['ogg']['pageheader'][$oggpageinfo['page_seqno']] = $oggpageinfo;
-
-					$VorbisCommentPage++;
-
-					// First, save what we haven't read yet
-					$AsYetUnusedData = substr($commentdata, $commentdataoffset);
-
-					// Then take that data off the end
-					$commentdata     = substr($commentdata, 0, $commentdataoffset);
-
-					// Add [headerlength] bytes of dummy data for the Ogg Page Header, just to keep absolute offsets correct
-					$commentdata .= str_repeat("\x00", 27 + $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_segments']);
-					$commentdataoffset += (27 + $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_segments']);
-
-					// Finally, stick the unused data back on the end
-					$commentdata .= $AsYetUnusedData;
-
-					//$commentdata .= $this->fread($info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_length']);
-					$commentdata .= $this->fread($this->OggPageSegmentLength($info['ogg']['pageheader'][$VorbisCommentPage], 1));
-				}
-
-			}
-			$ThisFileInfo_ogg_comments_raw[$i]['size'] = getid3_lib::LittleEndian2Int(substr($commentdata, $commentdataoffset, 4));
-
-			// replace avdataoffset with position just after the last vorbiscomment
-			$info['avdataoffset'] = $ThisFileInfo_ogg_comments_raw[$i]['dataoffset'] + $ThisFileInfo_ogg_comments_raw[$i]['size'] + 4;
-
-			$commentdataoffset += 4;
-			while ((strlen($commentdata) - $commentdataoffset) < $ThisFileInfo_ogg_comments_raw[$i]['size']) {
-				if (($ThisFileInfo_ogg_comments_raw[$i]['size'] > $info['avdataend']) || ($ThisFileInfo_ogg_comments_raw[$i]['size'] < 0)) {
-					$info['warning'][] = 'Invalid Ogg comment size (comment #'.$i.', claims to be '.number_format($ThisFileInfo_ogg_comments_raw[$i]['size']).' bytes) - aborting reading comments';
-					break 2;
-				}
-
-				$VorbisCommentPage++;
-
-				$oggpageinfo = $this->ParseOggPageHeader();
-				$info['ogg']['pageheader'][$oggpageinfo['page_seqno']] = $oggpageinfo;
-
-				// First, save what we haven't read yet
-				$AsYetUnusedData = substr($commentdata, $commentdataoffset);
-
-				// Then take that data off the end
-				$commentdata     = substr($commentdata, 0, $commentdataoffset);
-
-				// Add [headerlength] bytes of dummy data for the Ogg Page Header, just to keep absolute offsets correct
-				$commentdata .= str_repeat("\x00", 27 + $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_segments']);
-				$commentdataoffset += (27 + $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_segments']);
-
-				// Finally, stick the unused data back on the end
-				$commentdata .= $AsYetUnusedData;
-
-				//$commentdata .= $this->fread($info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_length']);
-				if (!isset($info['ogg']['pageheader'][$VorbisCommentPage])) {
-					$info['warning'][] = 'undefined Vorbis Comment page "'.$VorbisCommentPage.'" at offset '.$this->ftell();
-					break;
-				}
-				$readlength = self::OggPageSegmentLength($info['ogg']['pageheader'][$VorbisCommentPage], 1);
-				if ($readlength <= 0) {
-					$info['warning'][] = 'invalid length Vorbis Comment page "'.$VorbisCommentPage.'" at offset '.$this->ftell();
-					break;
-				}
-				$commentdata .= $this->fread($readlength);
-
-				//$filebaseoffset += $oggpageinfo['header_end_offset'] - $oggpageinfo['page_start_offset'];
-			}
-			$ThisFileInfo_ogg_comments_raw[$i]['offset'] = $commentdataoffset;
-			$commentstring = substr($commentdata, $commentdataoffset, $ThisFileInfo_ogg_comments_raw[$i]['size']);
-			$commentdataoffset += $ThisFileInfo_ogg_comments_raw[$i]['size'];
-
-			if (!$commentstring) {
-
-				// no comment?
-				$info['warning'][] = 'Blank Ogg comment ['.$i.']';
-
-			} elseif (strstr($commentstring, '=')) {
-
-				$commentexploded = explode('=', $commentstring, 2);
-				$ThisFileInfo_ogg_comments_raw[$i]['key']   = strtoupper($commentexploded[0]);
-				$ThisFileInfo_ogg_comments_raw[$i]['value'] = (isset($commentexploded[1]) ? $commentexploded[1] : '');
-
-				if ($ThisFileInfo_ogg_comments_raw[$i]['key'] == 'METADATA_BLOCK_PICTURE') {
-
-					// http://wiki.xiph.org/VorbisComment#METADATA_BLOCK_PICTURE
-					// The unencoded format is that of the FLAC picture block. The fields are stored in big endian order as in FLAC, picture data is stored according to the relevant standard.
-					// http://flac.sourceforge.net/format.html#metadata_block_picture
-					$flac = new getid3_flac($this->getid3);
-					$flac->setStringMode(base64_decode($ThisFileInfo_ogg_comments_raw[$i]['value']));
-					$flac->parsePICTURE();
-					$info['ogg']['comments']['picture'][] = $flac->getid3->info['flac']['PICTURE'][0];
-					unset($flac);
-
-				} elseif ($ThisFileInfo_ogg_comments_raw[$i]['key'] == 'COVERART') {
-
-					$data = base64_decode($ThisFileInfo_ogg_comments_raw[$i]['value']);
-					$this->notice('Found deprecated COVERART tag, it should be replaced in honor of METADATA_BLOCK_PICTURE structure');
-					/** @todo use 'coverartmime' where available */
-					$imageinfo = getid3_lib::GetDataImageSize($data);
-					if ($imageinfo === false || !isset($imageinfo['mime'])) {
-						$this->warning('COVERART vorbiscomment tag contains invalid image');
-						continue;
-					}
-
-					$ogg = new self($this->getid3);
-					$ogg->setStringMode($data);
-					$info['ogg']['comments']['picture'][] = array(
-						'image_mime'   => $imageinfo['mime'],
-						'datalength'   => strlen($data),
-						'picturetype'  => 'cover art',
-						'image_height' => $imageinfo['height'],
-						'image_width'  => $imageinfo['width'],
-						'data'         => $ogg->saveAttachment('coverart', 0, strlen($data), $imageinfo['mime']),
-					);
-					unset($ogg);
-
-				} else {
-
-					$info['ogg']['comments'][strtolower($ThisFileInfo_ogg_comments_raw[$i]['key'])][] = $ThisFileInfo_ogg_comments_raw[$i]['value'];
-
-				}
-
-			} else {
-
-				$info['warning'][] = '[known problem with CDex >= v1.40, < v1.50b7] Invalid Ogg comment name/value pair ['.$i.']: '.$commentstring;
-
-			}
-			unset($ThisFileInfo_ogg_comments_raw[$i]);
-		}
-		unset($ThisFileInfo_ogg_comments_raw);
-
-
-		// Replay Gain Adjustment
-		// http://privatewww.essex.ac.uk/~djmrob/replaygain/
-		if (isset($info['ogg']['comments']) && is_array($info['ogg']['comments'])) {
-			foreach ($info['ogg']['comments'] as $index => $commentvalue) {
-				switch ($index) {
-					case 'rg_audiophile':
-					case 'replaygain_album_gain':
-						$info['replay_gain']['album']['adjustment'] = (double) $commentvalue[0];
-						unset($info['ogg']['comments'][$index]);
-						break;
-
-					case 'rg_radio':
-					case 'replaygain_track_gain':
-						$info['replay_gain']['track']['adjustment'] = (double) $commentvalue[0];
-						unset($info['ogg']['comments'][$index]);
-						break;
-
-					case 'replaygain_album_peak':
-						$info['replay_gain']['album']['peak'] = (double) $commentvalue[0];
-						unset($info['ogg']['comments'][$index]);
-						break;
-
-					case 'rg_peak':
-					case 'replaygain_track_peak':
-						$info['replay_gain']['track']['peak'] = (double) $commentvalue[0];
-						unset($info['ogg']['comments'][$index]);
-						break;
-
-					case 'replaygain_reference_loudness':
-						$info['replay_gain']['reference_volume'] = (double) $commentvalue[0];
-						unset($info['ogg']['comments'][$index]);
-						break;
-
-					default:
-						// do nothing
-						break;
-				}
-			}
-		}
-
-		$this->fseek($OriginalOffset);
-
-		return true;
-	}
-
-	public static function SpeexBandModeLookup($mode) {
-		static $SpeexBandModeLookup = array();
-		if (empty($SpeexBandModeLookup)) {
-			$SpeexBandModeLookup[0] = 'narrow';
-			$SpeexBandModeLookup[1] = 'wide';
-			$SpeexBandModeLookup[2] = 'ultra-wide';
-		}
-		return (isset($SpeexBandModeLookup[$mode]) ? $SpeexBandModeLookup[$mode] : null);
-	}
-
-
-	public static function OggPageSegmentLength($OggInfoArray, $SegmentNumber=1) {
-		for ($i = 0; $i < $SegmentNumber; $i++) {
-			$segmentlength = 0;
-			foreach ($OggInfoArray['segment_table'] as $key => $value) {
-				$segmentlength += $value;
-				if ($value < 255) {
-					break;
-				}
-			}
-		}
-		return $segmentlength;
-	}
-
-
-	public static function get_quality_from_nominal_bitrate($nominal_bitrate) {
-
-		// decrease precision
-		$nominal_bitrate = $nominal_bitrate / 1000;
-
-		if ($nominal_bitrate < 128) {
-			// q-1 to q4
-			$qval = ($nominal_bitrate - 64) / 16;
-		} elseif ($nominal_bitrate < 256) {
-			// q4 to q8
-			$qval = $nominal_bitrate / 32;
-		} elseif ($nominal_bitrate < 320) {
-			// q8 to q9
-			$qval = ($nominal_bitrate + 256) / 64;
-		} else {
-			// q9 to q10
-			$qval = ($nominal_bitrate + 1300) / 180;
-		}
-		//return $qval; // 5.031324
-		//return intval($qval); // 5
-		return round($qval, 1); // 5 or 4.9
-	}
-
-	public static function TheoraColorSpace($colorspace_id) {
-		// http://www.theora.org/doc/Theora.pdf (table 6.3)
-		static $TheoraColorSpaceLookup = array();
-		if (empty($TheoraColorSpaceLookup)) {
-			$TheoraColorSpaceLookup[0] = 'Undefined';
-			$TheoraColorSpaceLookup[1] = 'Rec. 470M';
-			$TheoraColorSpaceLookup[2] = 'Rec. 470BG';
-			$TheoraColorSpaceLookup[3] = 'Reserved';
-		}
-		return (isset($TheoraColorSpaceLookup[$colorspace_id]) ? $TheoraColorSpaceLookup[$colorspace_id] : null);
-	}
-
-	public static function TheoraPixelFormat($pixelformat_id) {
-		// http://www.theora.org/doc/Theora.pdf (table 6.4)
-		static $TheoraPixelFormatLookup = array();
-		if (empty($TheoraPixelFormatLookup)) {
-			$TheoraPixelFormatLookup[0] = '4:2:0';
-			$TheoraPixelFormatLookup[1] = 'Reserved';
-			$TheoraPixelFormatLookup[2] = '4:2:2';
-			$TheoraPixelFormatLookup[3] = '4:4:4';
-		}
-		return (isset($TheoraPixelFormatLookup[$pixelformat_id]) ? $TheoraPixelFormatLookup[$pixelformat_id] : null);
-	}
-
-}
Index: www/wp-includes/autoload/requests/Hooks.php
===================================================================
--- www/wp-includes/autoload/requests/Hooks.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Hooks.php	(revision UNDEFINED)
@@ -1,68 +0,0 @@
-<?php
-/**
- * Handles adding and dispatching events
- *
- * @package Requests
- * @subpackage Utilities
- */
-
-/**
- * Handles adding and dispatching events
- *
- * @package Requests
- * @subpackage Utilities
- */
-class Requests_Hooks implements Requests_Hooker {
-	/**
-	 * Registered callbacks for each hook
-	 *
-	 * @var array
-	 */
-	protected $hooks = array();
-
-	/**
-	 * Constructor
-	 */
-	public function __construct() {
-		// pass
-	}
-
-	/**
-	 * Register a callback for a hook
-	 *
-	 * @param string $hook Hook name
-	 * @param callback $callback Function/method to call on event
-	 * @param int $priority Priority number. <0 is executed earlier, >0 is executed later
-	 */
-	public function register($hook, $callback, $priority = 0) {
-		if (!isset($this->hooks[$hook])) {
-			$this->hooks[$hook] = array();
-		}
-		if (!isset($this->hooks[$hook][$priority])) {
-			$this->hooks[$hook][$priority] = array();
-		}
-
-		$this->hooks[$hook][$priority][] = $callback;
-	}
-
-	/**
-	 * Dispatch a message
-	 *
-	 * @param string $hook Hook name
-	 * @param array $parameters Parameters to pass to callbacks
-	 * @return boolean Successfulness
-	 */
-	public function dispatch($hook, $parameters = array()) {
-		if (empty($this->hooks[$hook])) {
-			return false;
-		}
-
-		foreach ($this->hooks[$hook] as $priority => $hooked) {
-			foreach ($hooked as $callback) {
-				call_user_func_array($callback, $parameters);
-			}
-		}
-
-		return true;
-	}
-}
\ No newline at end of file
Index: www/wp-includes/autoload/WP_Error.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/WP_Error.php	(revision )
+++ www/wp-includes/autoload/WP_Error.php	(revision )
@@ -0,0 +1,204 @@
+<?php
+/**
+ * WordPress Error API.
+ *
+ * Contains the WP_Error class and the is_wp_error() function.
+ *
+ * @package WordPress
+ */
+
+/**
+ * WordPress Error class.
+ *
+ * Container for checking for WordPress errors and error messages. Return
+ * WP_Error and use is_wp_error() to check if this class is returned. Many
+ * core WordPress functions pass this class in the event of an error and
+ * if not handled properly will result in code errors.
+ *
+ * @package WordPress
+ * @since 2.1.0
+ */
+class WP_Error {
+	/**
+	 * Stores the list of errors.
+	 *
+	 * @since 2.1.0
+	 * @var array
+	 */
+	public $errors = array();
+
+	/**
+	 * Stores the list of data for error codes.
+	 *
+	 * @since 2.1.0
+	 * @var array
+	 */
+	public $error_data = array();
+
+	/**
+	 * Initialize the error.
+	 *
+	 * If `$code` is empty, the other parameters will be ignored.
+	 * When `$code` is not empty, `$message` will be used even if
+	 * it is empty. The `$data` parameter will be used only if it
+	 * is not empty.
+	 *
+	 * Though the class is constructed with a single error code and
+	 * message, multiple codes can be added using the `add()` method.
+	 *
+	 * @since 2.1.0
+	 *
+	 * @param string|int $code Error code
+	 * @param string $message Error message
+	 * @param mixed $data Optional. Error data.
+	 */
+	public function __construct( $code = '', $message = '', $data = '' ) {
+		if ( empty($code) )
+			return;
+
+		$this->errors[$code][] = $message;
+
+		if ( ! empty($data) )
+			$this->error_data[$code] = $data;
+	}
+
+	/**
+	 * Retrieve all error codes.
+	 *
+	 * @since 2.1.0
+	 * @access public
+	 *
+	 * @return array List of error codes, if available.
+	 */
+	public function get_error_codes() {
+		if ( empty($this->errors) )
+			return array();
+
+		return array_keys($this->errors);
+	}
+
+	/**
+	 * Retrieve first error code available.
+	 *
+	 * @since 2.1.0
+	 * @access public
+	 *
+	 * @return string|int Empty string, if no error codes.
+	 */
+	public function get_error_code() {
+		$codes = $this->get_error_codes();
+
+		if ( empty($codes) )
+			return '';
+
+		return $codes[0];
+	}
+
+	/**
+	 * Retrieve all error messages or error messages matching code.
+	 *
+	 * @since 2.1.0
+	 *
+	 * @param string|int $code Optional. Retrieve messages matching code, if exists.
+	 * @return array Error strings on success, or empty array on failure (if using code parameter).
+	 */
+	public function get_error_messages($code = '') {
+		// Return all messages if no code specified.
+		if ( empty($code) ) {
+			$all_messages = array();
+			foreach ( (array) $this->errors as $code => $messages )
+				$all_messages = array_merge($all_messages, $messages);
+
+			return $all_messages;
+		}
+
+		if ( isset($this->errors[$code]) )
+			return $this->errors[$code];
+		else
+			return array();
+	}
+
+	/**
+	 * Get single error message.
+	 *
+	 * This will get the first message available for the code. If no code is
+	 * given then the first code available will be used.
+	 *
+	 * @since 2.1.0
+	 *
+	 * @param string|int $code Optional. Error code to retrieve message.
+	 * @return string
+	 */
+	public function get_error_message($code = '') {
+		if ( empty($code) )
+			$code = $this->get_error_code();
+		$messages = $this->get_error_messages($code);
+		if ( empty($messages) )
+			return '';
+		return $messages[0];
+	}
+
+	/**
+	 * Retrieve error data for error code.
+	 *
+	 * @since 2.1.0
+	 *
+	 * @param string|int $code Optional. Error code.
+	 * @return mixed Error data, if it exists.
+	 */
+	public function get_error_data($code = '') {
+		if ( empty($code) )
+			$code = $this->get_error_code();
+
+		if ( isset($this->error_data[$code]) )
+			return $this->error_data[$code];
+	}
+
+	/**
+	 * Add an error or append additional message to an existing error.
+	 *
+	 * @since 2.1.0
+	 * @access public
+	 *
+	 * @param string|int $code Error code.
+	 * @param string $message Error message.
+	 * @param mixed $data Optional. Error data.
+	 */
+	public function add($code, $message, $data = '') {
+		$this->errors[$code][] = $message;
+		if ( ! empty($data) )
+			$this->error_data[$code] = $data;
+	}
+
+	/**
+	 * Add data for error code.
+	 *
+	 * The error code can only contain one error data.
+	 *
+	 * @since 2.1.0
+	 *
+	 * @param mixed $data Error data.
+	 * @param string|int $code Error code.
+	 */
+	public function add_data($data, $code = '') {
+		if ( empty($code) )
+			$code = $this->get_error_code();
+
+		$this->error_data[$code] = $data;
+	}
+
+	/**
+	 * Removes the specified error.
+	 *
+	 * This function removes all error messages associated with the specified
+	 * error code, along with any error data for that code.
+	 *
+	 * @since 4.1.0
+	 *
+	 * @param string|int $code Error code.
+	 */
+	public function remove( $code ) {
+		unset( $this->errors[ $code ] );
+		unset( $this->error_data[ $code ] );
+	}
+}
Index: www/wp-includes/Requests/Exception/HTTP/304.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/304.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_304.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/IXR/class-IXR-error.php
===================================================================
--- www/wp-includes/IXR/class-IXR-error.php	(revision 38565)
+++ www/wp-includes/autoload/ixr/IXR_Error.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/edit-tags.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/edit-tags.php	(revision 38565)
+++ www/wp-admin/edit-tags.php	(revision 38565)
@@ -1,627 +0,0 @@
-<?php
-/**
- * Edit Tags Administration Screen.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-if ( ! $taxnow )
-	wp_die( __( 'Invalid taxonomy.' ) );
-
-$tax = get_taxonomy( $taxnow );
-
-if ( ! $tax )
-	wp_die( __( 'Invalid taxonomy.' ) );
-
-if ( ! in_array( $tax->name, get_taxonomies( array( 'show_ui' => true ) ) ) ) {
-   wp_die( __( 'Sorry, you are not allowed to manage these items.' ) );
-}
-
-if ( ! current_user_can( $tax->cap->manage_terms ) ) {
-	wp_die(
-		'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-		'<p>' . __( 'Sorry, you are not allowed to manage these items.' ) . '</p>',
-		403
-	);
-}
-
-/**
- * $post_type is set when the WP_Terms_List_Table instance is created
- *
- * @global string $post_type
- */
-global $post_type;
-
-$wp_list_table = _get_list_table('WP_Terms_List_Table');
-$pagenum = $wp_list_table->get_pagenum();
-
-$title = $tax->labels->name;
-
-if ( 'post' != $post_type ) {
-	$parent_file = ( 'attachment' == $post_type ) ? 'upload.php' : "edit.php?post_type=$post_type";
-	$submenu_file = "edit-tags.php?taxonomy=$taxonomy&amp;post_type=$post_type";
-} elseif ( 'link_category' == $tax->name ) {
-	$parent_file = 'link-manager.php';
-	$submenu_file = 'edit-tags.php?taxonomy=link_category';
-} else {
-	$parent_file = 'edit.php';
-	$submenu_file = "edit-tags.php?taxonomy=$taxonomy";
-}
-
-add_screen_option( 'per_page', array( 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page' ) );
-
-get_current_screen()->set_screen_reader_content( array(
-	'heading_pagination' => $tax->labels->items_list_navigation,
-	'heading_list'       => $tax->labels->items_list,
-) );
-
-$location = false;
-$referer = wp_get_referer();
-
-switch ( $wp_list_table->current_action() ) {
-
-case 'add-tag':
-
-	check_admin_referer( 'add-tag', '_wpnonce_add-tag' );
-
-	if ( ! current_user_can( $tax->cap->edit_terms ) ) {
-		wp_die(
-			'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-			'<p>' . __( 'Sorry, you are not allowed to add this item.' ) . '</p>',
-			403
-		);
-	}
-
-	$ret = wp_insert_term( $_POST['tag-name'], $taxonomy, $_POST );
-	$location = 'edit-tags.php?taxonomy=' . $taxonomy;
-	if ( 'post' != $post_type )
-		$location .= '&post_type=' . $post_type;
-
-	if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) {
-		$location = $referer;
-	}
-
-	if ( $ret && !is_wp_error( $ret ) )
-		$location = add_query_arg( 'message', 1, $location );
-	else
-		$location = add_query_arg( array( 'error' => true, 'message' => 4 ), $location );
-
-	break;
-
-case 'delete':
-	$location = 'edit-tags.php?taxonomy=' . $taxonomy;
-	if ( 'post' != $post_type )
-		$location .= '&post_type=' . $post_type;
-
-	if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) {
-		$location = $referer;
-	}
-
-	if ( ! isset( $_REQUEST['tag_ID'] ) ) {
-		break;
-	}
-
-	$tag_ID = (int) $_REQUEST['tag_ID'];
-	check_admin_referer( 'delete-tag_' . $tag_ID );
-
-	if ( ! current_user_can( $tax->cap->delete_terms ) ) {
-		wp_die(
-			'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-			'<p>' . __( 'Sorry, you are not allowed to delete this item.' ) . '</p>',
-			403
-		);
-	}
-
-	wp_delete_term( $tag_ID, $taxonomy );
-
-	$location = add_query_arg( 'message', 2, $location );
-
-	break;
-
-case 'bulk-delete':
-	check_admin_referer( 'bulk-tags' );
-
-	if ( ! current_user_can( $tax->cap->delete_terms ) ) {
-		wp_die(
-			'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-			'<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>',
-			403
-		);
-	}
-
-	$tags = (array) $_REQUEST['delete_tags'];
-	foreach ( $tags as $tag_ID ) {
-		wp_delete_term( $tag_ID, $taxonomy );
-	}
-
-	$location = 'edit-tags.php?taxonomy=' . $taxonomy;
-	if ( 'post' != $post_type )
-		$location .= '&post_type=' . $post_type;
-	if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) {
-		$location = $referer;
-	}
-
-	$location = add_query_arg( 'message', 6, $location );
-
-	break;
-
-case 'edit':
-	if ( ! isset( $_REQUEST['tag_ID'] ) ) {
-		break;
-	}
-
-	$term_id = (int) $_REQUEST['tag_ID'];
-	$term    = get_term( $term_id );
-
-	if ( ! $term instanceof WP_Term ) {
-		wp_die( __( 'You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?' ) );
-	}
-
-	wp_redirect( esc_url_raw( get_edit_term_link( $term_id, $taxonomy, $post_type ) ) );
-	exit;
-
-case 'editedtag':
-	$tag_ID = (int) $_POST['tag_ID'];
-	check_admin_referer( 'update-tag_' . $tag_ID );
-
-	if ( ! current_user_can( $tax->cap->edit_terms ) ) {
-		wp_die(
-			'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-			'<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
-			403
-		);
-	}
-
-	$tag = get_term( $tag_ID, $taxonomy );
-	if ( ! $tag )
-		wp_die( __( 'You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?' ) );
-
-	$ret = wp_update_term( $tag_ID, $taxonomy, $_POST );
-
-	$location = 'edit-tags.php?taxonomy=' . $taxonomy;
-	if ( 'post' != $post_type )
-		$location .= '&post_type=' . $post_type;
-
-	if ( $referer && false !== strpos( $referer, 'edit-tags.php' ) ) {
-		$location = $referer;
-	}
-
-	if ( $ret && !is_wp_error( $ret ) )
-		$location = add_query_arg( 'message', 3, $location );
-	else
-		$location = add_query_arg( array( 'error' => true, 'message' => 5 ), $location );
-	break;
-}
-
-if ( ! $location && ! empty( $_REQUEST['_wp_http_referer'] ) ) {
-	$location = remove_query_arg( array('_wp_http_referer', '_wpnonce'), wp_unslash($_SERVER['REQUEST_URI']) );
-}
-
-if ( $location ) {
-	if ( ! empty( $_REQUEST['paged'] ) ) {
-		$location = add_query_arg( 'paged', (int) $_REQUEST['paged'], $location );
-	}
-
-	/**
-	 * Filters the taxonomy redirect destination URL.
-	 *
-	 * @since 4.6.0
-	 * 
-	 * @param string $location The destination URL.
-	 * @param object $tax      The taxonomy object.
-	 */
-	wp_redirect( apply_filters( 'redirect_term_location', $location, $tax ) );
-	exit;
-}
-
-$wp_list_table->prepare_items();
-$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
-
-if ( $pagenum > $total_pages && $total_pages > 0 ) {
-	wp_redirect( add_query_arg( 'paged', $total_pages ) );
-	exit;
-}
-
-wp_enqueue_script('admin-tags');
-if ( current_user_can($tax->cap->edit_terms) )
-	wp_enqueue_script('inline-edit-tax');
-
-if ( 'category' == $taxonomy || 'link_category' == $taxonomy || 'post_tag' == $taxonomy  ) {
-	$help ='';
-	if ( 'category' == $taxonomy )
-		$help = '<p>' . sprintf(__( 'You can use categories to define sections of your site and group related posts. The default category is &#8220;Uncategorized&#8221; until you change it in your <a href="%s">writing settings</a>.' ) , 'options-writing.php' ) . '</p>';
-	elseif ( 'link_category' == $taxonomy )
-		$help = '<p>' . __( 'You can create groups of links by using Link Categories. Link Category names must be unique and Link Categories are separate from the categories you use for posts.' ) . '</p>';
-	else
-		$help = '<p>' . __( 'You can assign keywords to your posts using <strong>tags</strong>. Unlike categories, tags have no hierarchy, meaning there&#8217;s no relationship from one tag to another.' ) . '</p>';
-
-	if ( 'link_category' == $taxonomy )
-		$help .= '<p>' . __( 'You can delete Link Categories in the Bulk Action pull-down, but that action does not delete the links within the category. Instead, it moves them to the default Link Category.' ) . '</p>';
-	else
-		$help .='<p>' . __( 'What&#8217;s the difference between categories and tags? Normally, tags are ad-hoc keywords that identify important information in your post (names, subjects, etc) that may or may not recur in other posts, while categories are pre-determined sections. If you think of your site like a book, the categories are like the Table of Contents and the tags are like the terms in the index.' ) . '</p>';
-
-	get_current_screen()->add_help_tab( array(
-		'id'      => 'overview',
-		'title'   => __('Overview'),
-		'content' => $help,
-	) );
-
-	if ( 'category' == $taxonomy || 'post_tag' == $taxonomy ) {
-		if ( 'category' == $taxonomy )
-			$help = '<p>' . __( 'When adding a new category on this screen, you&#8217;ll fill in the following fields:' ) . '</p>';
-		else
-			$help = '<p>' . __( 'When adding a new tag on this screen, you&#8217;ll fill in the following fields:' ) . '</p>';
-
-		$help .= '<ul>' .
-		'<li>' . __( '<strong>Name</strong> &mdash; The name is how it appears on your site.' ) . '</li>';
-
-		if ( ! global_terms_enabled() )
-			$help .= '<li>' . __( '<strong>Slug</strong> &mdash; The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ) . '</li>';
-
-		if ( 'category' == $taxonomy )
-			$help .= '<li>' . __( '<strong>Parent</strong> &mdash; Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have child categories for Bebop and Big Band. Totally optional. To create a subcategory, just choose another category from the Parent dropdown.' ) . '</li>';
-
-		$help .= '<li>' . __( '<strong>Description</strong> &mdash; The description is not prominent by default; however, some themes may display it.' ) . '</li>' .
-		'</ul>' .
-		'<p>' . __( 'You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.' ) . '</p>';
-
-		get_current_screen()->add_help_tab( array(
-			'id'      => 'adding-terms',
-			'title'   => 'category' == $taxonomy ? __( 'Adding Categories' ) : __( 'Adding Tags' ),
-			'content' => $help,
-		) );
-	}
-
-	$help = '<p><strong>' . __( 'For more information:' ) . '</strong></p>';
-
-	if ( 'category' == $taxonomy )
-		$help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Categories_Screen" target="_blank">Documentation on Categories</a>' ) . '</p>';
-	elseif ( 'link_category' == $taxonomy )
-		$help .= '<p>' . __( '<a href="https://codex.wordpress.org/Links_Link_Categories_Screen" target="_blank">Documentation on Link Categories</a>' ) . '</p>';
-	else
-		$help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Tags_Screen" target="_blank">Documentation on Tags</a>' ) . '</p>';
-
-	$help .= '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>';
-
-	get_current_screen()->set_help_sidebar( $help );
-
-	unset( $help );
-}
-
-require_once( ABSPATH . 'wp-admin/admin-header.php' );
-
-if ( ! current_user_can( $tax->cap->edit_terms ) ) {
-	wp_die(
-		'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-		'<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
-		403
-	);
-}
-
-/** Also used by the Edit Tag  form */
-require_once( ABSPATH . 'wp-admin/includes/edit-tag-messages.php' );
-
-$class = ( isset( $_REQUEST['error'] ) ) ? 'error' : 'updated';
-
-if ( is_plugin_active( 'wpcat2tag-importer/wpcat2tag-importer.php' ) ) {
-	$import_link = admin_url( 'admin.php?import=wpcat2tag' );
-} else {
-	$import_link = admin_url( 'import.php' );
-}
-
-?>
-
-<div class="wrap nosubsub">
-<h1><?php echo esc_html( $title );
-if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
-	/* translators: %s: search keywords */
-	printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( wp_unslash( $_REQUEST['s'] ) ) );
-}
-?>
-</h1>
-
-<?php if ( $message ) : ?>
-<div id="message" class="<?php echo $class; ?> notice is-dismissible"><p><?php echo $message; ?></p></div>
-<?php $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'message', 'error' ), $_SERVER['REQUEST_URI'] );
-endif; ?>
-<div id="ajax-response"></div>
-
-<form class="search-form wp-clearfix" method="get">
-<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
-<input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
-
-<?php $wp_list_table->search_box( $tax->labels->search_items, 'tag' ); ?>
-
-</form>
-
-<div id="col-container" class="wp-clearfix">
-
-<div id="col-left">
-<div class="col-wrap">
-
-<?php
-
-if ( current_user_can($tax->cap->edit_terms) ) {
-	if ( 'category' == $taxonomy ) {
-		/**
- 		 * Fires before the Add Category form.
-		 *
-		 * @since 2.1.0
-		 * @deprecated 3.0.0 Use {$taxonomy}_pre_add_form instead.
-		 *
-		 * @param object $arg Optional arguments cast to an object.
-		 */
-		do_action( 'add_category_form_pre', (object) array( 'parent' => 0 ) );
-	} elseif ( 'link_category' == $taxonomy ) {
-		/**
-		 * Fires before the link category form.
-		 *
-		 * @since 2.3.0
-		 * @deprecated 3.0.0 Use {$taxonomy}_pre_add_form instead.
-		 *
-		 * @param object $arg Optional arguments cast to an object.
-		 */
-		do_action( 'add_link_category_form_pre', (object) array( 'parent' => 0 ) );
-	} else {
-		/**
-		 * Fires before the Add Tag form.
-		 *
-		 * @since 2.5.0
-		 * @deprecated 3.0.0 Use {$taxonomy}_pre_add_form instead.
-		 *
-		 * @param string $taxonomy The taxonomy slug.
-		 */
-		do_action( 'add_tag_form_pre', $taxonomy );
-	}
-
-	/**
-	 * Fires before the Add Term form for all taxonomies.
-	 *
-	 * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $taxonomy The taxonomy slug.
-	 */
-	do_action( "{$taxonomy}_pre_add_form", $taxonomy );
-?>
-
-<div class="form-wrap">
-<h2><?php echo $tax->labels->add_new_item; ?></h2>
-<form id="addtag" method="post" action="edit-tags.php" class="validate"
-<?php
-/**
- * Fires at the beginning of the Add Tag form.
- *
- * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
- *
- * @since 3.7.0
- */
-do_action( "{$taxonomy}_term_new_form_tag" );
-?>>
-<input type="hidden" name="action" value="add-tag" />
-<input type="hidden" name="screen" value="<?php echo esc_attr($current_screen->id); ?>" />
-<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
-<input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
-<?php wp_nonce_field('add-tag', '_wpnonce_add-tag'); ?>
-
-<div class="form-field form-required term-name-wrap">
-	<label for="tag-name"><?php _ex( 'Name', 'term name' ); ?></label>
-	<input name="tag-name" id="tag-name" type="text" value="" size="40" aria-required="true" />
-	<p><?php _e('The name is how it appears on your site.'); ?></p>
-</div>
-<?php if ( ! global_terms_enabled() ) : ?>
-<div class="form-field term-slug-wrap">
-	<label for="tag-slug"><?php _e( 'Slug' ); ?></label>
-	<input name="slug" id="tag-slug" type="text" value="" size="40" />
-	<p><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p>
-</div>
-<?php endif; // global_terms_enabled() ?>
-<?php if ( is_taxonomy_hierarchical($taxonomy) ) : ?>
-<div class="form-field term-parent-wrap">
-	<label for="parent"><?php _ex( 'Parent', 'term parent' ); ?></label>
-	<?php
-	$dropdown_args = array(
-		'hide_empty'       => 0,
-		'hide_if_empty'    => false,
-		'taxonomy'         => $taxonomy,
-		'name'             => 'parent',
-		'orderby'          => 'name',
-		'hierarchical'     => true,
-		'show_option_none' => __( 'None' ),
-	);
-
-	/**
-	 * Filters the taxonomy parent drop-down on the Edit Term page.
-	 *
-	 * @since 3.7.0
-	 * @since 4.2.0 Added `$context` parameter.
-	 *
-	 * @param array  $dropdown_args {
-	 *     An array of taxonomy parent drop-down arguments.
-	 *
-	 *     @type int|bool $hide_empty       Whether to hide terms not attached to any posts. Default 0|false.
-	 *     @type bool     $hide_if_empty    Whether to hide the drop-down if no terms exist. Default false.
-	 *     @type string   $taxonomy         The taxonomy slug.
-	 *     @type string   $name             Value of the name attribute to use for the drop-down select element.
-	 *                                      Default 'parent'.
-	 *     @type string   $orderby          The field to order by. Default 'name'.
-	 *     @type bool     $hierarchical     Whether the taxonomy is hierarchical. Default true.
-	 *     @type string   $show_option_none Label to display if there are no terms. Default 'None'.
-	 * }
-	 * @param string $taxonomy The taxonomy slug.
-	 * @param string $context  Filter context. Accepts 'new' or 'edit'.
-	 */
-	$dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy, 'new' );
-
-	wp_dropdown_categories( $dropdown_args );
-	?>
-	<?php if ( 'category' == $taxonomy ) : // @todo: Generic text for hierarchical taxonomies ?>
-		<p><?php _e('Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.'); ?></p>
-	<?php endif; ?>
-</div>
-<?php endif; // is_taxonomy_hierarchical() ?>
-<div class="form-field term-description-wrap">
-	<label for="tag-description"><?php _e( 'Description' ); ?></label>
-	<textarea name="description" id="tag-description" rows="5" cols="40"></textarea>
-	<p><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></p>
-</div>
-
-<?php
-if ( ! is_taxonomy_hierarchical( $taxonomy ) ) {
-	/**
-	 * Fires after the Add Tag form fields for non-hierarchical taxonomies.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $taxonomy The taxonomy slug.
-	 */
-	do_action( 'add_tag_form_fields', $taxonomy );
-}
-
-/**
- * Fires after the Add Term form fields.
- *
- * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
- *
- * @since 3.0.0
- *
- * @param string $taxonomy The taxonomy slug.
- */
-do_action( "{$taxonomy}_add_form_fields", $taxonomy );
-
-submit_button( $tax->labels->add_new_item );
-
-if ( 'category' == $taxonomy ) {
-	/**
-	 * Fires at the end of the Edit Category form.
-	 *
-	 * @since 2.1.0
-	 * @deprecated 3.0.0 Use {$taxonomy}_add_form instead.
-	 *
-	 * @param object $arg Optional arguments cast to an object.
-	 */
-	do_action( 'edit_category_form', (object) array( 'parent' => 0 ) );
-} elseif ( 'link_category' == $taxonomy ) {
-	/**
-	 * Fires at the end of the Edit Link form.
-	 *
-	 * @since 2.3.0
-	 * @deprecated 3.0.0 Use {$taxonomy}_add_form instead.
-	 *
-	 * @param object $arg Optional arguments cast to an object.
-	 */
-	do_action( 'edit_link_category_form', (object) array( 'parent' => 0 ) );
-} else {
-	/**
-	 * Fires at the end of the Add Tag form.
-	 *
-	 * @since 2.7.0
-	 * @deprecated 3.0.0 Use {$taxonomy}_add_form instead.
-	 *
-	 * @param string $taxonomy The taxonomy slug.
-	 */
-	do_action( 'add_tag_form', $taxonomy );
-}
-
-/**
- * Fires at the end of the Add Term form for all taxonomies.
- *
- * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
- *
- * @since 3.0.0
- *
- * @param string $taxonomy The taxonomy slug.
- */
-do_action( "{$taxonomy}_add_form", $taxonomy );
-?>
-</form></div>
-<?php }
-
-if ( ! is_null( $tax->labels->popular_items ) ) {
-	if ( current_user_can( $tax->cap->edit_terms ) ) {
-		$tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'post_type' => $post_type, 'echo' => false, 'link' => 'edit' ) );
-	} else {
-		$tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false ) );
-	}
-
-	if ( $tag_cloud ) :
-	?>
-<div class="tagcloud">
-<h2><?php echo $tax->labels->popular_items; ?></h2>
-<?php echo $tag_cloud; unset( $tag_cloud ); ?>
-</div>
-<?php
-	endif;
-}
-
-?>
-
-</div>
-</div><!-- /col-left -->
-
-<div id="col-right">
-<div class="col-wrap">
-<form id="posts-filter" method="post">
-<input type="hidden" name="taxonomy" value="<?php echo esc_attr( $taxonomy ); ?>" />
-<input type="hidden" name="post_type" value="<?php echo esc_attr( $post_type ); ?>" />
-
-<?php $wp_list_table->display(); ?>
-
-</form>
-
-<?php if ( 'category' == $taxonomy ) : ?>
-<div class="form-wrap edit-term-notes">
-<p>
-	<?php
-	echo '<strong>' . __( 'Note:' ) . '</strong><br />';
-	printf(
-		/* translators: %s: default category */
-		__( 'Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category %s.' ),
-		/** This filter is documented in wp-includes/category-template.php */
-		'<strong>' . apply_filters( 'the_category', get_cat_name( get_option( 'default_category') ) ) . '</strong>'
-	);
-	?>
-</p>
-<?php if ( current_user_can( 'import' ) ) : ?>
-<p><?php printf( __( 'Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.' ), esc_url( $import_link ) ) ?></p>
-<?php endif; ?>
-</div>
-<?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?>
-<div class="form-wrap edit-term-notes">
-<p><?php printf( __( 'Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>.' ), esc_url( $import_link ) ) ;?></p>
-</div>
-<?php endif;
-
-/**
- * Fires after the taxonomy list table.
- *
- * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
- *
- * @since 3.0.0
- *
- * @param string $taxonomy The taxonomy name.
- */
-do_action( "after-{$taxonomy}-table", $taxonomy );
-?>
-
-</div>
-</div><!-- /col-right -->
-
-</div><!-- /col-container -->
-</div><!-- /wrap -->
-
-<?php if ( ! wp_is_mobile() ) : ?>
-<script type="text/javascript">
-try{document.forms.addtag['tag-name'].focus();}catch(e){}
-</script>
-<?php
-endif;
-
-$wp_list_table->inline_edit();
-
-include( ABSPATH . 'wp-admin/admin-footer.php' );
Index: www/wp-admin/upgrade-functions.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/upgrade-functions.php	(revision 38565)
+++ www/wp-admin/upgrade-functions.php	(revision 38565)
@@ -1,12 +0,0 @@
-<?php
-/**
- * WordPress Upgrade Functions. Old file, must not be used. Include
- * wp-admin/includes/upgrade.php instead.
- *
- * @deprecated 2.5.0
- * @package WordPress
- * @subpackage Administration
- */
-
-_deprecated_file( basename(__FILE__), '2.5.0', 'wp-admin/includes/upgrade.php' );
-require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
Index: www/wp-includes/class-wp-customize-setting.php
===================================================================
--- www/wp-includes/class-wp-customize-setting.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Setting.php	(revision )
@@ -895,18 +895,3 @@
 		return isset( $result );
 	}
 }
-
-/** WP_Customize_Filter_Setting class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-filter-setting.php' );
-
-/** WP_Customize_Header_Image_Setting class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-header-image-setting.php' );
-
-/** WP_Customize_Background_Image_Setting class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-background-image-setting.php' );
-
-/** WP_Customize_Nav_Menu_Item_Setting class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-item-setting.php' );
-
-/** WP_Customize_Nav_Menu_Setting class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-setting.php' );
Index: www/wp-includes/SimplePie/Net/IPv6.php
===================================================================
--- www/wp-includes/SimplePie/Net/IPv6.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_Net_IPv6.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/install.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/install.php	(revision 38565)
+++ www/wp-admin/install.php	(revision 38565)
@@ -1,425 +0,0 @@
-<?php
-/**
- * WordPress Installer
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-// Sanity check.
-if ( false ) {
-?>
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-	<title>Error: PHP is not running</title>
-</head>
-<body class="wp-core-ui">
-	<p id="logo"><a href="https://wordpress.org/">WordPress</a></p>
-	<h1>Error: PHP is not running</h1>
-	<p>WordPress requires that your web server is running PHP. Your server does not have PHP installed, or PHP is turned off.</p>
-</body>
-</html>
-<?php
-}
-
-/**
- * We are installing WordPress.
- *
- * @since 1.5.1
- * @var bool
- */
-define( 'WP_INSTALLING', true );
-
-/** Load WordPress Bootstrap */
-require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
-
-/** Load WordPress Administration Upgrade API */
-require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
-
-/** Load WordPress Translation Install API */
-require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
-
-/** Load wpdb */
-require_once( ABSPATH . WPINC . '/wp-db.php' );
-
-nocache_headers();
-
-$step = isset( $_GET['step'] ) ? (int) $_GET['step'] : 0;
-
-/**
- * Display install header.
- *
- * @since 2.5.0
- *
- * @param string $body_classes
- */
-function display_header( $body_classes = '' ) {
-	header( 'Content-Type: text/html; charset=utf-8' );
-	if ( is_rtl() ) {
-		$body_classes .= 'rtl';
-	}
-	if ( $body_classes ) {
-		$body_classes = ' ' . $body_classes;
-	}
-?>
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
-<head>
-	<meta name="viewport" content="width=device-width" />
-	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-	<meta name="robots" content="noindex,nofollow" />
-	<title><?php _e( 'WordPress &rsaquo; Installation' ); ?></title>
-	<?php
-		wp_admin_css( 'install', true );
-		wp_admin_css( 'dashicons', true );
-	?>
-</head>
-<body class="wp-core-ui<?php echo $body_classes ?>">
-<p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>" tabindex="-1"><?php _e( 'WordPress' ); ?></a></p>
-
-<?php
-} // end display_header()
-
-/**
- * Display installer setup form.
- *
- * @since 2.8.0
- *
- * @param string|null $error
- */
-function display_setup_form( $error = null ) {
-	global $wpdb;
-
-	$sql = $wpdb->prepare( "SHOW TABLES LIKE %s", $wpdb->esc_like( $wpdb->users ) );
-	$user_table = ( $wpdb->get_var( $sql ) != null );
-
-	// Ensure that Blogs appear in search engines by default.
-	$blog_public = 1;
-	if ( isset( $_POST['weblog_title'] ) ) {
-		$blog_public = isset( $_POST['blog_public'] );
-	}
-
-	$weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : '';
-	$user_name = isset($_POST['user_name']) ? trim( wp_unslash( $_POST['user_name'] ) ) : '';
-	$admin_email  = isset( $_POST['admin_email']  ) ? trim( wp_unslash( $_POST['admin_email'] ) ) : '';
-
-	if ( ! is_null( $error ) ) {
-?>
-<h1><?php _ex( 'Welcome', 'Howdy' ); ?></h1>
-<p class="message"><?php echo $error; ?></p>
-<?php } ?>
-<form id="setup" method="post" action="install.php?step=2" novalidate="novalidate">
-	<table class="form-table">
-		<tr>
-			<th scope="row"><label for="weblog_title"><?php _e( 'Site Title' ); ?></label></th>
-			<td><input name="weblog_title" type="text" id="weblog_title" size="25" value="<?php echo esc_attr( $weblog_title ); ?>" /></td>
-		</tr>
-		<tr>
-			<th scope="row"><label for="user_login"><?php _e('Username'); ?></label></th>
-			<td>
-			<?php
-			if ( $user_table ) {
-				_e('User(s) already exists.');
-				echo '<input name="user_name" type="hidden" value="admin" />';
-			} else {
-				?><input name="user_name" type="text" id="user_login" size="25" value="<?php echo esc_attr( sanitize_user( $user_name, true ) ); ?>" />
-				<p><?php _e( 'Usernames can have only alphanumeric characters, spaces, underscores, hyphens, periods, and the @ symbol.' ); ?></p>
-			<?php
-			} ?>
-			</td>
-		</tr>
-		<?php if ( ! $user_table ) : ?>
-		<tr class="form-field form-required user-pass1-wrap">
-			<th scope="row">
-				<label for="pass1">
-					<?php _e( 'Password' ); ?>
-				</label>
-			</th>
-			<td>
-				<div class="">
-					<?php $initial_password = isset( $_POST['admin_password'] ) ? stripslashes( $_POST['admin_password'] ) : wp_generate_password( 18 ); ?>
-					<input type="password" name="admin_password" id="pass1" class="regular-text" autocomplete="off" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
-					<button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-start-masked="<?php echo (int) isset( $_POST['admin_password'] ); ?>" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
-						<span class="dashicons dashicons-hidden"></span>
-						<span class="text"><?php _e( 'Hide' ); ?></span>
-					</button>
-					<div id="pass-strength-result" aria-live="polite"></div>
-				</div>
-				<p><span class="description important hide-if-no-js">
-				<strong><?php _e( 'Important:' ); ?></strong>
-				<?php /* translators: The non-breaking space prevents 1Password from thinking the text "log in" should trigger a password save prompt. */ ?>
-				<?php _e( 'You will need this password to log&nbsp;in. Please store it in a secure location.' ); ?></span></p>
-			</td>
-		</tr>
-		<tr class="form-field form-required user-pass2-wrap hide-if-js">
-			<th scope="row">
-				<label for="pass2"><?php _e( 'Repeat Password' ); ?>
-					<span class="description"><?php _e( '(required)' ); ?></span>
-				</label>
-			</th>
-			<td>
-				<input name="admin_password2" type="password" id="pass2" autocomplete="off" />
-			</td>
-		</tr>
-		<tr class="pw-weak">
-			<th scope="row"><?php _e( 'Confirm Password' ); ?></th>
-			<td>
-				<label>
-					<input type="checkbox" name="pw_weak" class="pw-checkbox" />
-					<?php _e( 'Confirm use of weak password' ); ?>
-				</label>
-			</td>
-		</tr>
-		<?php endif; ?>
-		<tr>
-			<th scope="row"><label for="admin_email"><?php _e( 'Your Email' ); ?></label></th>
-			<td><input name="admin_email" type="email" id="admin_email" size="25" value="<?php echo esc_attr( $admin_email ); ?>" />
-			<p><?php _e( 'Double-check your email address before continuing.' ); ?></p></td>
-		</tr>
-		<tr>
-			<th scope="row"><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?></th>
-			<td>
-				<fieldset>
-					<legend class="screen-reader-text"><span><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?> </span></legend>
-					<?php
-					if ( has_action( 'blog_privacy_selector' ) ) { ?>
-						<input id="blog-public" type="radio" name="blog_public" value="1" <?php checked( 1, $blog_public ); ?> />
-						<label for="blog-public"><?php _e( 'Allow search engines to index this site' );?></label><br/>
-						<input id="blog-norobots" type="radio" name="blog_public" value="0" <?php checked( 0, $blog_public ); ?> />
-						<label for="blog-norobots"><?php _e( 'Discourage search engines from indexing this site' ); ?></label>
-						<p class="description"><?php _e( 'Note: Neither of these options blocks access to your site &mdash; it is up to search engines to honor your request.' ); ?></p>
-						<?php
-						/** This action is documented in wp-admin/options-reading.php */
-						do_action( 'blog_privacy_selector' );
-					 } else { ?>
-						<label for="blog_public"><input name="blog_public" type="checkbox" id="blog_public" value="0" <?php checked( 0, $blog_public ); ?> />
-						<?php _e( 'Discourage search engines from indexing this site' ); ?></label>
-						<p class="description"><?php _e( 'It is up to search engines to honor this request.' ); ?></p>
-					<?php } ?>
-				</fieldset>
-			</td>
-		</tr>
-	</table>
-	<p class="step"><?php submit_button( __( 'Install WordPress' ), 'large', 'Submit', false, array( 'id' => 'submit' ) ); ?></p>
-	<input type="hidden" name="language" value="<?php echo isset( $_REQUEST['language'] ) ? esc_attr( $_REQUEST['language'] ) : ''; ?>" />
-</form>
-<?php
-} // end display_setup_form()
-
-// Let's check to make sure WP isn't already installed.
-if ( is_blog_installed() ) {
-	display_header();
-	die(
-		'<h1>' . __( 'Already Installed' ) . '</h1>' .
-		'<p>' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '</p>' .
-		'<p class="step"><a href="' . esc_url( wp_login_url() ) . '" class="button button-large">' . __( 'Log In' ) . '</a></p>' .
-		'</body></html>'
-	);
-}
-
-/**
- * @global string $wp_version
- * @global string $required_php_version
- * @global string $required_mysql_version
- * @global wpdb   $wpdb
- */
-global $wp_version, $required_php_version, $required_mysql_version;
-
-$php_version    = phpversion();
-$mysql_version  = $wpdb->db_version();
-$php_compat     = version_compare( $php_version, $required_php_version, '>=' );
-$mysql_compat   = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' );
-
-if ( !$mysql_compat && !$php_compat )
-	$compat = sprintf( __( 'You cannot install because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version );
-elseif ( !$php_compat )
-	$compat = sprintf( __( 'You cannot install because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_php_version, $php_version );
-elseif ( !$mysql_compat )
-	$compat = sprintf( __( 'You cannot install because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_mysql_version, $mysql_version );
-
-if ( !$mysql_compat || !$php_compat ) {
-	display_header();
-	die( '<h1>' . __( 'Insufficient Requirements' ) . '</h1><p>' . $compat . '</p></body></html>' );
-}
-
-if ( ! is_string( $wpdb->base_prefix ) || '' === $wpdb->base_prefix ) {
-	display_header();
-	die(
-		'<h1>' . __( 'Configuration Error' ) . '</h1>' .
-		'<p>' . sprintf(
-			/* translators: %s: wp-config.php */
-			__( 'Your %s file has an empty database table prefix, which is not supported.' ),
-			'<code>wp-config.php</code>'
-		) . '</p></body></html>'
-	);
-}
-
-// Set error message if DO_NOT_UPGRADE_GLOBAL_TABLES isn't set as it will break install.
-if ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
-	display_header();
-	die(
-		'<h1>' . __( 'Configuration Error' ) . '</h1>' .
-		'<p>' . sprintf(
-			/* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */
-			__( 'The constant %s cannot be defined when installing WordPress.' ),
-			'<code>DO_NOT_UPGRADE_GLOBAL_TABLES</code>'
-		) . '</p></body></html>'
-	);
-}
-
-/**
- * @global string    $wp_local_package
- * @global WP_Locale $wp_locale
- */
-$language = '';
-if ( ! empty( $_REQUEST['language'] ) ) {
-	$language = preg_replace( '/[^a-zA-Z_]/', '', $_REQUEST['language'] );
-} elseif ( isset( $GLOBALS['wp_local_package'] ) ) {
-	$language = $GLOBALS['wp_local_package'];
-}
-
-$scripts_to_print = array( 'jquery' );
-
-switch($step) {
-	case 0: // Step 0
-		if ( wp_can_install_language_pack() && empty( $language ) && ( $languages = wp_get_available_translations() ) ) {
-			$scripts_to_print[] = 'language-chooser';
-			display_header( 'language-chooser' );
-			echo '<form id="setup" method="post" action="?step=1">';
-			wp_install_language_form( $languages );
-			echo '</form>';
-			break;
-		}
-
-		// Deliberately fall through if we can't reach the translations API.
-
-	case 1: // Step 1, direct link or from language chooser.
-		if ( ! empty( $language ) ) {
-			$loaded_language = wp_download_language_pack( $language );
-			if ( $loaded_language ) {
-				load_default_textdomain( $loaded_language );
-				$GLOBALS['wp_locale'] = new WP_Locale();
-			}
-		}
-
-		$scripts_to_print[] = 'user-profile';
-
-		display_header();
-?>
-<h1><?php _ex( 'Welcome', 'Howdy' ); ?></h1>
-<p><?php _e( 'Welcome to the famous five-minute WordPress installation process! Just fill in the information below and you&#8217;ll be on your way to using the most extendable and powerful personal publishing platform in the world.' ); ?></p>
-
-<h2><?php _e( 'Information needed' ); ?></h2>
-<p><?php _e( 'Please provide the following information. Don&#8217;t worry, you can always change these settings later.' ); ?></p>
-
-<?php
-		display_setup_form();
-		break;
-	case 2:
-		if ( ! empty( $language ) && load_default_textdomain( $language ) ) {
-			$loaded_language = $language;
-			$GLOBALS['wp_locale'] = new WP_Locale();
-		} else {
-			$loaded_language = 'en_US';
-		}
-
-		if ( ! empty( $wpdb->error ) )
-			wp_die( $wpdb->error->get_error_message() );
-
-		$scripts_to_print[] = 'user-profile';
-
-		// Fill in the data we gathered
-		$weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : '';
-		$user_name = isset($_POST['user_name']) ? trim( wp_unslash( $_POST['user_name'] ) ) : '';
-		$admin_password = isset($_POST['admin_password']) ? wp_unslash( $_POST['admin_password'] ) : '';
-		$admin_password_check = isset($_POST['admin_password2']) ? wp_unslash( $_POST['admin_password2'] ) : '';
-		$admin_email  = isset( $_POST['admin_email'] ) ?trim( wp_unslash( $_POST['admin_email'] ) ) : '';
-		$public       = isset( $_POST['blog_public'] ) ? (int) $_POST['blog_public'] : 1;
-
-		// Check email address.
-		$error = false;
-		if ( empty( $user_name ) ) {
-			// TODO: poka-yoke
-			display_header();
-			display_setup_form( __( 'Please provide a valid username.' ) );
-			$error = true;
-		} elseif ( $user_name != sanitize_user( $user_name, true ) ) {
-			display_header();
-			display_setup_form( __( 'The username you provided has invalid characters.' ) );
-			$error = true;
-		} elseif ( $admin_password != $admin_password_check ) {
-			// TODO: poka-yoke
-			display_header();
-			display_setup_form( __( 'Your passwords do not match. Please try again.' ) );
-			$error = true;
-		} elseif ( empty( $admin_email ) ) {
-			// TODO: poka-yoke
-			display_header();
-			display_setup_form( __( 'You must provide an email address.' ) );
-			$error = true;
-		} elseif ( ! is_email( $admin_email ) ) {
-			// TODO: poka-yoke
-			display_header();
-			display_setup_form( __( 'Sorry, that isn&#8217;t a valid email address. Email addresses look like <code>username@example.com</code>.' ) );
-			$error = true;
-		}
-
-		if ( $error === false ) {
-			$wpdb->show_errors();
-			$result = wp_install( $weblog_title, $user_name, $admin_email, $public, '', wp_slash( $admin_password ), $loaded_language );
-
-			// Log the user in and send them to wp-admin:
-			if ( ! headers_sent() ) {
-				wp_set_auth_cookie( $result['user_id'], true, is_ssl() );
-				wp_redirect( admin_url() );
-				exit;
-			}
-
-			// If headers have already been sent, fall back to a "Success!" message:
-			display_header();
-?>
-
-<h1><?php _e( 'Success!' ); ?></h1>
-
-<p><?php _e( 'WordPress has been installed. Thank you, and enjoy!' ); ?></p>
-
-<table class="form-table install-success">
-	<tr>
-		<th><?php _e( 'Username' ); ?></th>
-		<td><?php echo esc_html( sanitize_user( $user_name, true ) ); ?></td>
-	</tr>
-	<tr>
-		<th><?php _e( 'Password' ); ?></th>
-		<td><?php
-		if ( ! empty( $result['password'] ) && empty( $admin_password_check ) ): ?>
-			<code><?php echo esc_html( $result['password'] ) ?></code><br />
-		<?php endif ?>
-			<p><?php echo $result['password_message'] ?></p>
-		</td>
-	</tr>
-</table>
-
-<p class="step"><a href="<?php echo esc_url( wp_login_url() ); ?>" class="button button-large"><?php _e( 'Log In' ); ?></a></p>
-
-<?php
-		}
-		break;
-}
-
-if ( ! wp_is_mobile() ) {
-	?>
-<script type="text/javascript">var t = document.getElementById('weblog_title'); if (t){ t.focus(); }</script>
-	<?php
-}
-
-wp_print_scripts( $scripts_to_print );
-?>
-<script type="text/javascript">
-jQuery( function( $ ) {
-	$( '.hide-if-no-js' ).removeClass( 'hide-if-no-js' );
-} );
-</script>
-</body>
-</html>
Index: www/wp-includes/Requests/Auth.php
===================================================================
--- www/wp-includes/Requests/Auth.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Auth.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/bookmark.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/bookmark.php	(revision 38565)
+++ www/wp-includes/bookmark.php	(revision 38565)
@@ -1,420 +0,0 @@
-<?php
-/**
- * Link/Bookmark API
- *
- * @package WordPress
- * @subpackage Bookmark
- */
-
-/**
- * Retrieve Bookmark data
- *
- * @since 2.1.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int|stdClass $bookmark
- * @param string $output Optional. Either OBJECT, ARRAY_N, or ARRAY_A constant
- * @param string $filter Optional, default is 'raw'.
- * @return array|object|null Type returned depends on $output value.
- */
-function get_bookmark($bookmark, $output = OBJECT, $filter = 'raw') {
-	global $wpdb;
-
-	if ( empty($bookmark) ) {
-		if ( isset($GLOBALS['link']) )
-			$_bookmark = & $GLOBALS['link'];
-		else
-			$_bookmark = null;
-	} elseif ( is_object($bookmark) ) {
-		wp_cache_add($bookmark->link_id, $bookmark, 'bookmark');
-		$_bookmark = $bookmark;
-	} else {
-		if ( isset($GLOBALS['link']) && ($GLOBALS['link']->link_id == $bookmark) ) {
-			$_bookmark = & $GLOBALS['link'];
-		} elseif ( ! $_bookmark = wp_cache_get($bookmark, 'bookmark') ) {
-			$_bookmark = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->links WHERE link_id = %d LIMIT 1", $bookmark));
-			if ( $_bookmark ) {
-				$_bookmark->link_category = array_unique( wp_get_object_terms( $_bookmark->link_id, 'link_category', array( 'fields' => 'ids' ) ) );
-				wp_cache_add( $_bookmark->link_id, $_bookmark, 'bookmark' );
-			}
-		}
-	}
-
-	if ( ! $_bookmark )
-		return $_bookmark;
-
-	$_bookmark = sanitize_bookmark($_bookmark, $filter);
-
-	if ( $output == OBJECT ) {
-		return $_bookmark;
-	} elseif ( $output == ARRAY_A ) {
-		return get_object_vars($_bookmark);
-	} elseif ( $output == ARRAY_N ) {
-		return array_values(get_object_vars($_bookmark));
-	} else {
-		return $_bookmark;
-	}
-}
-
-/**
- * Retrieve single bookmark data item or field.
- *
- * @since 2.3.0
- *
- * @param string $field The name of the data field to return
- * @param int $bookmark The bookmark ID to get field
- * @param string $context Optional. The context of how the field will be used.
- * @return string|WP_Error
- */
-function get_bookmark_field( $field, $bookmark, $context = 'display' ) {
-	$bookmark = (int) $bookmark;
-	$bookmark = get_bookmark( $bookmark );
-
-	if ( is_wp_error($bookmark) )
-		return $bookmark;
-
-	if ( !is_object($bookmark) )
-		return '';
-
-	if ( !isset($bookmark->$field) )
-		return '';
-
-	return sanitize_bookmark_field($field, $bookmark->$field, $bookmark->link_id, $context);
-}
-
-/**
- * Retrieves the list of bookmarks
- *
- * Attempts to retrieve from the cache first based on MD5 hash of arguments. If
- * that fails, then the query will be built from the arguments and executed. The
- * results will be stored to the cache.
- *
- * @since 2.1.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string|array $args {
- *     Optional. String or array of arguments to retrieve bookmarks.
- *
- *     @type string   $orderby        How to order the links by. Accepts post fields. Default 'name'.
- *     @type string   $order          Whether to order bookmarks in ascending or descending order.
- *                                    Accepts 'ASC' (ascending) or 'DESC' (descending). Default 'ASC'.
- *     @type int      $limit          Amount of bookmarks to display. Accepts 1+ or -1 for all.
- *                                    Default -1.
- *     @type string   $category       Comma-separated list of category ids to include links from.
- *                                    Default empty.
- *     @type string   $category_name  Category to retrieve links for by name. Default empty.
- *     @type int|bool $hide_invisible Whether to show or hide links marked as 'invisible'. Accepts
- *                                    1|true or 0|false. Default 1|true.
- *     @type int|bool $show_updated   Whether to display the time the bookmark was last updated.
- *                                    Accepts 1|true or 0|false. Default 0|false.
- *     @type string   $include        Comma-separated list of bookmark IDs to include. Default empty.
- *     @type string   $exclude        Comma-separated list of bookmark IDs to exclude. Default empty.
- * }
- * @return array List of bookmark row objects.
- */
-function get_bookmarks( $args = '' ) {
-	global $wpdb;
-
-	$defaults = array(
-		'orderby' => 'name', 'order' => 'ASC',
-		'limit' => -1, 'category' => '',
-		'category_name' => '', 'hide_invisible' => 1,
-		'show_updated' => 0, 'include' => '',
-		'exclude' => '', 'search' => ''
-	);
-
-	$r = wp_parse_args( $args, $defaults );
-
-	$key = md5( serialize( $r ) );
-	$cache = false;
-	if ( 'rand' !== $r['orderby'] && $cache = wp_cache_get( 'get_bookmarks', 'bookmark' ) ) {
-		if ( is_array( $cache ) && isset( $cache[ $key ] ) ) {
-			$bookmarks = $cache[ $key ];
-			/**
-			 * Filters the returned list of bookmarks.
-			 *
-			 * The first time the hook is evaluated in this file, it returns the cached
-			 * bookmarks list. The second evaluation returns a cached bookmarks list if the
-			 * link category is passed but does not exist. The third evaluation returns
-			 * the full cached results.
-			 *
-			 * @since 2.1.0
-			 *
-			 * @see get_bookmarks()
-			 *
-			 * @param array $bookmarks List of the cached bookmarks.
-			 * @param array $r         An array of bookmark query arguments.
-			 */
-			return apply_filters( 'get_bookmarks', $bookmarks, $r );
-		}
-	}
-
-	if ( ! is_array( $cache ) ) {
-		$cache = array();
-	}
-
-	$inclusions = '';
-	if ( ! empty( $r['include'] ) ) {
-		$r['exclude'] = '';  //ignore exclude, category, and category_name params if using include
-		$r['category'] = '';
-		$r['category_name'] = '';
-		$inclinks = preg_split( '/[\s,]+/', $r['include'] );
-		if ( count( $inclinks ) ) {
-			foreach ( $inclinks as $inclink ) {
-				if ( empty( $inclusions ) ) {
-					$inclusions = ' AND ( link_id = ' . intval( $inclink ) . ' ';
-				} else {
-					$inclusions .= ' OR link_id = ' . intval( $inclink ) . ' ';
-				}
-			}
-		}
-	}
-	if (! empty( $inclusions ) ) {
-		$inclusions .= ')';
-	}
-
-	$exclusions = '';
-	if ( ! empty( $r['exclude'] ) ) {
-		$exlinks = preg_split( '/[\s,]+/', $r['exclude'] );
-		if ( count( $exlinks ) ) {
-			foreach ( $exlinks as $exlink ) {
-				if ( empty( $exclusions ) ) {
-					$exclusions = ' AND ( link_id <> ' . intval( $exlink ) . ' ';
-				} else {
-					$exclusions .= ' AND link_id <> ' . intval( $exlink ) . ' ';
-				}
-			}
-		}
-	}
-	if ( ! empty( $exclusions ) ) {
-		$exclusions .= ')';
-	}
-
-	if ( ! empty( $r['category_name'] ) ) {
-		if ( $r['category'] = get_term_by('name', $r['category_name'], 'link_category') ) {
-			$r['category'] = $r['category']->term_id;
-		} else {
-			$cache[ $key ] = array();
-			wp_cache_set( 'get_bookmarks', $cache, 'bookmark' );
-			/** This filter is documented in wp-includes/bookmark.php */
-			return apply_filters( 'get_bookmarks', array(), $r );
-		}
-	}
-
-	$search = '';
-	if ( ! empty( $r['search'] ) ) {
-		$like = '%' . $wpdb->esc_like( $r['search'] ) . '%';
-		$search = $wpdb->prepare(" AND ( (link_url LIKE %s) OR (link_name LIKE %s) OR (link_description LIKE %s) ) ", $like, $like, $like );
-	}
-
-	$category_query = '';
-	$join = '';
-	if ( ! empty( $r['category'] ) ) {
-		$incategories = preg_split( '/[\s,]+/', $r['category'] );
-		if ( count($incategories) ) {
-			foreach ( $incategories as $incat ) {
-				if ( empty( $category_query ) ) {
-					$category_query = ' AND ( tt.term_id = ' . intval( $incat ) . ' ';
-				} else {
-					$category_query .= ' OR tt.term_id = ' . intval( $incat ) . ' ';
-				}
-			}
-		}
-	}
-	if ( ! empty( $category_query ) ) {
-		$category_query .= ") AND taxonomy = 'link_category'";
-		$join = " INNER JOIN $wpdb->term_relationships AS tr ON ($wpdb->links.link_id = tr.object_id) INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_taxonomy_id = tr.term_taxonomy_id";
-	}
-
-	if ( $r['show_updated'] ) {
-		$recently_updated_test = ", IF (DATE_ADD(link_updated, INTERVAL 120 MINUTE) >= NOW(), 1,0) as recently_updated ";
-	} else {
-		$recently_updated_test = '';
-	}
-
-	$get_updated = ( $r['show_updated'] ) ? ', UNIX_TIMESTAMP(link_updated) AS link_updated_f ' : '';
-
-	$orderby = strtolower( $r['orderby'] );
-	$length = '';
-	switch ( $orderby ) {
-		case 'length':
-			$length = ", CHAR_LENGTH(link_name) AS length";
-			break;
-		case 'rand':
-			$orderby = 'rand()';
-			break;
-		case 'link_id':
-			$orderby = "$wpdb->links.link_id";
-			break;
-		default:
-			$orderparams = array();
-			$keys = array( 'link_id', 'link_name', 'link_url', 'link_visible', 'link_rating', 'link_owner', 'link_updated', 'link_notes', 'link_description' );
-			foreach ( explode( ',', $orderby ) as $ordparam ) {
-				$ordparam = trim( $ordparam );
-
-				if ( in_array( 'link_' . $ordparam, $keys ) ) {
-					$orderparams[] = 'link_' . $ordparam;
-				} elseif ( in_array( $ordparam, $keys ) ) {
-					$orderparams[] = $ordparam;
-				}
-			}
-			$orderby = implode( ',', $orderparams );
-	}
-
-	if ( empty( $orderby ) ) {
-		$orderby = 'link_name';
-	}
-
-	$order = strtoupper( $r['order'] );
-	if ( '' !== $order && ! in_array( $order, array( 'ASC', 'DESC' ) ) ) {
-		$order = 'ASC';
-	}
-
-	$visible = '';
-	if ( $r['hide_invisible'] ) {
-		$visible = "AND link_visible = 'Y'";
-	}
-
-	$query = "SELECT * $length $recently_updated_test $get_updated FROM $wpdb->links $join WHERE 1=1 $visible $category_query";
-	$query .= " $exclusions $inclusions $search";
-	$query .= " ORDER BY $orderby $order";
-	if ( $r['limit'] != -1 ) {
-		$query .= ' LIMIT ' . $r['limit'];
-	}
-
-	$results = $wpdb->get_results( $query );
-
-	if ( 'rand()' !== $orderby ) {
-		$cache[ $key ] = $results;
-		wp_cache_set( 'get_bookmarks', $cache, 'bookmark' );
-	}
-
-	/** This filter is documented in wp-includes/bookmark.php */
-	return apply_filters( 'get_bookmarks', $results, $r );
-}
-
-/**
- * Sanitizes all bookmark fields
- *
- * @since 2.3.0
- *
- * @param object|array $bookmark Bookmark row
- * @param string $context Optional, default is 'display'. How to filter the
- *		fields
- * @return object|array Same type as $bookmark but with fields sanitized.
- */
-function sanitize_bookmark($bookmark, $context = 'display') {
-	$fields = array('link_id', 'link_url', 'link_name', 'link_image', 'link_target', 'link_category',
-		'link_description', 'link_visible', 'link_owner', 'link_rating', 'link_updated',
-		'link_rel', 'link_notes', 'link_rss', );
-
-	if ( is_object($bookmark) ) {
-		$do_object = true;
-		$link_id = $bookmark->link_id;
-	} else {
-		$do_object = false;
-		$link_id = $bookmark['link_id'];
-	}
-
-	foreach ( $fields as $field ) {
-		if ( $do_object ) {
-			if ( isset($bookmark->$field) )
-				$bookmark->$field = sanitize_bookmark_field($field, $bookmark->$field, $link_id, $context);
-		} else {
-			if ( isset($bookmark[$field]) )
-				$bookmark[$field] = sanitize_bookmark_field($field, $bookmark[$field], $link_id, $context);
-		}
-	}
-
-	return $bookmark;
-}
-
-/**
- * Sanitizes a bookmark field.
- *
- * Sanitizes the bookmark fields based on what the field name is. If the field
- * has a strict value set, then it will be tested for that, else a more generic
- * filtering is applied. After the more strict filter is applied, if the `$context`
- * is 'raw' then the value is immediately return.
- *
- * Hooks exist for the more generic cases. With the 'edit' context, the {@see 'edit_$field'}
- * filter will be called and passed the `$value` and `$bookmark_id` respectively.
- *
- * With the 'db' context, the {@see 'pre_$field'} filter is called and passed the value.
- * The 'display' context is the final context and has the `$field` has the filter name
- * and is passed the `$value`, `$bookmark_id`, and `$context`, respectively.
- *
- * @since 2.3.0
- *
- * @param string $field       The bookmark field.
- * @param mixed  $value       The bookmark field value.
- * @param int    $bookmark_id Bookmark ID.
- * @param string $context     How to filter the field value. Accepts 'raw', 'edit', 'attribute',
- *                            'js', 'db', or 'display'
- * @return mixed The filtered value.
- */
-function sanitize_bookmark_field( $field, $value, $bookmark_id, $context ) {
-	switch ( $field ) {
-	case 'link_id' : // ints
-	case 'link_rating' :
-		$value = (int) $value;
-		break;
-	case 'link_category' : // array( ints )
-		$value = array_map('absint', (array) $value);
-		// We return here so that the categories aren't filtered.
-		// The 'link_category' filter is for the name of a link category, not an array of a link's link categories
-		return $value;
-
-	case 'link_visible' : // bool stored as Y|N
-		$value = preg_replace('/[^YNyn]/', '', $value);
-		break;
-	case 'link_target' : // "enum"
-		$targets = array('_top', '_blank');
-		if ( ! in_array($value, $targets) )
-			$value = '';
-		break;
-	}
-
-	if ( 'raw' == $context )
-		return $value;
-
-	if ( 'edit' == $context ) {
-		/** This filter is documented in wp-includes/post.php */
-		$value = apply_filters( "edit_$field", $value, $bookmark_id );
-
-		if ( 'link_notes' == $field ) {
-			$value = esc_html( $value ); // textarea_escaped
-		} else {
-			$value = esc_attr($value);
-		}
-	} elseif ( 'db' == $context ) {
-		/** This filter is documented in wp-includes/post.php */
-		$value = apply_filters( "pre_$field", $value );
-	} else {
-		/** This filter is documented in wp-includes/post.php */
-		$value = apply_filters( $field, $value, $bookmark_id, $context );
-
-		if ( 'attribute' == $context ) {
-			$value = esc_attr( $value );
-		} elseif ( 'js' == $context ) {
-			$value = esc_js( $value );
-		}
-	}
-
-	return $value;
-}
-
-/**
- * Deletes the bookmark cache.
- *
- * @since 2.7.0
- *
- * @param int $bookmark_id Bookmark ID.
- */
-function clean_bookmark_cache( $bookmark_id ) {
-	wp_cache_delete( $bookmark_id, 'bookmark' );
-	wp_cache_delete( 'get_bookmarks', 'bookmark' );
-	clean_object_term_cache( $bookmark_id, 'link');
-}
Index: www/wp-includes/update.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/update.php	(revision 38565)
+++ www/wp-includes/update.php	(revision 38565)
@@ -1,704 +0,0 @@
-<?php
-/**
- * A simple set of functions to check our version 1.0 update service.
- *
- * @package WordPress
- * @since 2.3.0
- */
-
-/**
- * Check WordPress version against the newest version.
- *
- * The WordPress version, PHP version, and Locale is sent. Checks against the
- * WordPress server at api.wordpress.org server. Will only check if WordPress
- * isn't installing.
- *
- * @since 2.3.0
- * @global string $wp_version Used to check against the newest WordPress version.
- * @global wpdb   $wpdb
- * @global string $wp_local_package
- *
- * @param array $extra_stats Extra statistics to report to the WordPress.org API.
- * @param bool  $force_check Whether to bypass the transient cache and force a fresh update check. Defaults to false, true if $extra_stats is set.
- */
-function wp_version_check( $extra_stats = array(), $force_check = false ) {
-	if ( wp_installing() ) {
-		return;
-	}
-
-	global $wpdb, $wp_local_package;
-	// include an unmodified $wp_version
-	include( ABSPATH . WPINC . '/version.php' );
-	$php_version = phpversion();
-
-	$current = get_site_transient( 'update_core' );
-	$translations = wp_get_installed_translations( 'core' );
-
-	// Invalidate the transient when $wp_version changes
-	if ( is_object( $current ) && $wp_version != $current->version_checked )
-		$current = false;
-
-	if ( ! is_object($current) ) {
-		$current = new stdClass;
-		$current->updates = array();
-		$current->version_checked = $wp_version;
-	}
-
-	if ( ! empty( $extra_stats ) )
-		$force_check = true;
-
-	// Wait 60 seconds between multiple version check requests
-	$timeout = 60;
-	$time_not_changed = isset( $current->last_checked ) && $timeout > ( time() - $current->last_checked );
-	if ( ! $force_check && $time_not_changed ) {
-		return;
-	}
-
-	/**
-	 * Filters the locale requested for WordPress core translations.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param string $locale Current locale.
-	 */
-	$locale = apply_filters( 'core_version_check_locale', get_locale() );
-
-	// Update last_checked for current to prevent multiple blocking requests if request hangs
-	$current->last_checked = time();
-	set_site_transient( 'update_core', $current );
-
-	if ( method_exists( $wpdb, 'db_version' ) )
-		$mysql_version = preg_replace('/[^0-9.].*/', '', $wpdb->db_version());
-	else
-		$mysql_version = 'N/A';
-
-	if ( is_multisite() ) {
-		$user_count = get_user_count();
-		$num_blogs = get_blog_count();
-		$wp_install = network_site_url();
-		$multisite_enabled = 1;
-	} else {
-		$user_count = count_users();
-		$user_count = $user_count['total_users'];
-		$multisite_enabled = 0;
-		$num_blogs = 1;
-		$wp_install = home_url( '/' );
-	}
-
-	$query = array(
-		'version'            => $wp_version,
-		'php'                => $php_version,
-		'locale'             => $locale,
-		'mysql'              => $mysql_version,
-		'local_package'      => isset( $wp_local_package ) ? $wp_local_package : '',
-		'blogs'              => $num_blogs,
-		'users'              => $user_count,
-		'multisite_enabled'  => $multisite_enabled,
-		'initial_db_version' => get_site_option( 'initial_db_version' ),
-	);
-
-	$post_body = array(
-		'translations' => wp_json_encode( $translations ),
-	);
-
-	if ( is_array( $extra_stats ) )
-		$post_body = array_merge( $post_body, $extra_stats );
-
-	$url = $http_url = 'http://api.wordpress.org/core/version-check/1.7/?' . http_build_query( $query, null, '&' );
-	if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
-		$url = set_url_scheme( $url, 'https' );
-
-	$options = array(
-		'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3 ),
-		'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' ),
-		'headers' => array(
-			'wp_install' => $wp_install,
-			'wp_blog' => home_url( '/' )
-		),
-		'body' => $post_body,
-	);
-
-	$response = wp_remote_post( $url, $options );
-	if ( $ssl && is_wp_error( $response ) ) {
-		trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
-		$response = wp_remote_post( $http_url, $options );
-	}
-
-	if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
-		return;
-	}
-
-	$body = trim( wp_remote_retrieve_body( $response ) );
-	$body = json_decode( $body, true );
-
-	if ( ! is_array( $body ) || ! isset( $body['offers'] ) ) {
-		return;
-	}
-
-	$offers = $body['offers'];
-
-	foreach ( $offers as &$offer ) {
-		foreach ( $offer as $offer_key => $value ) {
-			if ( 'packages' == $offer_key )
-				$offer['packages'] = (object) array_intersect_key( array_map( 'esc_url', $offer['packages'] ),
-					array_fill_keys( array( 'full', 'no_content', 'new_bundled', 'partial', 'rollback' ), '' ) );
-			elseif ( 'download' == $offer_key )
-				$offer['download'] = esc_url( $value );
-			else
-				$offer[ $offer_key ] = esc_html( $value );
-		}
-		$offer = (object) array_intersect_key( $offer, array_fill_keys( array( 'response', 'download', 'locale',
-			'packages', 'current', 'version', 'php_version', 'mysql_version', 'new_bundled', 'partial_version', 'notify_email', 'support_email', 'new_files' ), '' ) );
-	}
-
-	$updates = new stdClass();
-	$updates->updates = $offers;
-	$updates->last_checked = time();
-	$updates->version_checked = $wp_version;
-
-	if ( isset( $body['translations'] ) )
-		$updates->translations = $body['translations'];
-
-	set_site_transient( 'update_core', $updates );
-
-	if ( ! empty( $body['ttl'] ) ) {
-		$ttl = (int) $body['ttl'];
-		if ( $ttl && ( time() + $ttl < wp_next_scheduled( 'wp_version_check' ) ) ) {
-			// Queue an event to re-run the update check in $ttl seconds.
-			wp_schedule_single_event( time() + $ttl, 'wp_version_check' );
-		}
-	}
-
-	// Trigger background updates if running non-interactively, and we weren't called from the update handler.
-	if ( defined( 'DOING_CRON' ) && DOING_CRON && ! doing_action( 'wp_maybe_auto_update' ) ) {
-		do_action( 'wp_maybe_auto_update' );
-	}
-}
-
-/**
- * Check plugin versions against the latest versions hosted on WordPress.org.
- *
- * The WordPress version, PHP version, and Locale is sent along with a list of
- * all plugins installed. Checks against the WordPress server at
- * api.wordpress.org. Will only check if WordPress isn't installing.
- *
- * @since 2.3.0
- * @global string $wp_version Used to notify the WordPress version.
- *
- * @param array $extra_stats Extra statistics to report to the WordPress.org API.
- */
-function wp_update_plugins( $extra_stats = array() ) {
-	if ( wp_installing() ) {
-		return;
-	}
-
-	// include an unmodified $wp_version
-	include( ABSPATH . WPINC . '/version.php' );
-
-	// If running blog-side, bail unless we've not checked in the last 12 hours
-	if ( !function_exists( 'get_plugins' ) )
-		require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
-
-	$plugins = get_plugins();
-	$translations = wp_get_installed_translations( 'plugins' );
-
-	$active  = get_option( 'active_plugins', array() );
-	$current = get_site_transient( 'update_plugins' );
-	if ( ! is_object($current) )
-		$current = new stdClass;
-
-	$new_option = new stdClass;
-	$new_option->last_checked = time();
-
-	// Check for update on a different schedule, depending on the page.
-	switch ( current_filter() ) {
-		case 'upgrader_process_complete' :
-			$timeout = 0;
-			break;
-		case 'load-update-core.php' :
-			$timeout = MINUTE_IN_SECONDS;
-			break;
-		case 'load-plugins.php' :
-		case 'load-update.php' :
-			$timeout = HOUR_IN_SECONDS;
-			break;
-		default :
-			if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
-				$timeout = 0;
-			} else {
-				$timeout = 12 * HOUR_IN_SECONDS;
-			}
-	}
-
-	$time_not_changed = isset( $current->last_checked ) && $timeout > ( time() - $current->last_checked );
-
-	if ( $time_not_changed && ! $extra_stats ) {
-		$plugin_changed = false;
-		foreach ( $plugins as $file => $p ) {
-			$new_option->checked[ $file ] = $p['Version'];
-
-			if ( !isset( $current->checked[ $file ] ) || strval($current->checked[ $file ]) !== strval($p['Version']) )
-				$plugin_changed = true;
-		}
-
-		if ( isset ( $current->response ) && is_array( $current->response ) ) {
-			foreach ( $current->response as $plugin_file => $update_details ) {
-				if ( ! isset($plugins[ $plugin_file ]) ) {
-					$plugin_changed = true;
-					break;
-				}
-			}
-		}
-
-		// Bail if we've checked recently and if nothing has changed
-		if ( ! $plugin_changed ) {
-			return;
-		}
-	}
-
-	// Update last_checked for current to prevent multiple blocking requests if request hangs
-	$current->last_checked = time();
-	set_site_transient( 'update_plugins', $current );
-
-	$to_send = compact( 'plugins', 'active' );
-
-	$locales = array_values( get_available_languages() );
-
-	/**
-	 * Filters the locales requested for plugin translations.
-	 *
-	 * @since 3.7.0
-	 * @since 4.5.0 The default value of the `$locales` parameter changed to include all locales.
-	 *
-	 * @param array $locales Plugin locales. Default is all available locales of the site.
-	 */
-	$locales = apply_filters( 'plugins_update_check_locales', $locales );
-	$locales = array_unique( $locales );
-
-	if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
-		$timeout = 30;
-	} else {
-		// Three seconds, plus one extra second for every 10 plugins
-		$timeout = 3 + (int) ( count( $plugins ) / 10 );
-	}
-
-	$options = array(
-		'timeout' => $timeout,
-		'body' => array(
-			'plugins'      => wp_json_encode( $to_send ),
-			'translations' => wp_json_encode( $translations ),
-			'locale'       => wp_json_encode( $locales ),
-			'all'          => wp_json_encode( true ),
-		),
-		'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
-	);
-
-	if ( $extra_stats ) {
-		$options['body']['update_stats'] = wp_json_encode( $extra_stats );
-	}
-
-	$url = $http_url = 'http://api.wordpress.org/plugins/update-check/1.1/';
-	if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
-		$url = set_url_scheme( $url, 'https' );
-
-	$raw_response = wp_remote_post( $url, $options );
-	if ( $ssl && is_wp_error( $raw_response ) ) {
-		trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
-		$raw_response = wp_remote_post( $http_url, $options );
-	}
-
-	if ( is_wp_error( $raw_response ) || 200 != wp_remote_retrieve_response_code( $raw_response ) ) {
-		return;
-	}
-
-	$response = json_decode( wp_remote_retrieve_body( $raw_response ), true );
-	foreach ( $response['plugins'] as &$plugin ) {
-		$plugin = (object) $plugin;
-		if ( isset( $plugin->compatibility ) ) {
-			$plugin->compatibility = (object) $plugin->compatibility;
-			foreach ( $plugin->compatibility as &$data ) {
-				$data = (object) $data;
-			}
-		}
-	}
-	unset( $plugin, $data );
-	foreach ( $response['no_update'] as &$plugin ) {
-		$plugin = (object) $plugin;
-	}
-	unset( $plugin );
-
-	if ( is_array( $response ) ) {
-		$new_option->response = $response['plugins'];
-		$new_option->translations = $response['translations'];
-		// TODO: Perhaps better to store no_update in a separate transient with an expiry?
-		$new_option->no_update = $response['no_update'];
-	} else {
-		$new_option->response = array();
-		$new_option->translations = array();
-		$new_option->no_update = array();
-	}
-
-	set_site_transient( 'update_plugins', $new_option );
-}
-
-/**
- * Check theme versions against the latest versions hosted on WordPress.org.
- *
- * A list of all themes installed in sent to WP. Checks against the
- * WordPress server at api.wordpress.org. Will only check if WordPress isn't
- * installing.
- *
- * @since 2.7.0
- *
- * @param array $extra_stats Extra statistics to report to the WordPress.org API.
- */
-function wp_update_themes( $extra_stats = array() ) {
-	if ( wp_installing() ) {
-		return;
-	}
-
-	// include an unmodified $wp_version
-	include( ABSPATH . WPINC . '/version.php' );
-
-	$installed_themes = wp_get_themes();
-	$translations = wp_get_installed_translations( 'themes' );
-
-	$last_update = get_site_transient( 'update_themes' );
-	if ( ! is_object($last_update) )
-		$last_update = new stdClass;
-
-	$themes = $checked = $request = array();
-
-	// Put slug of current theme into request.
-	$request['active'] = get_option( 'stylesheet' );
-
-	foreach ( $installed_themes as $theme ) {
-		$checked[ $theme->get_stylesheet() ] = $theme->get('Version');
-
-		$themes[ $theme->get_stylesheet() ] = array(
-			'Name'       => $theme->get('Name'),
-			'Title'      => $theme->get('Name'),
-			'Version'    => $theme->get('Version'),
-			'Author'     => $theme->get('Author'),
-			'Author URI' => $theme->get('AuthorURI'),
-			'Template'   => $theme->get_template(),
-			'Stylesheet' => $theme->get_stylesheet(),
-		);
-	}
-
-	// Check for update on a different schedule, depending on the page.
-	switch ( current_filter() ) {
-		case 'upgrader_process_complete' :
-			$timeout = 0;
-			break;
-		case 'load-update-core.php' :
-			$timeout = MINUTE_IN_SECONDS;
-			break;
-		case 'load-themes.php' :
-		case 'load-update.php' :
-			$timeout = HOUR_IN_SECONDS;
-			break;
-		default :
-			if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
-				$timeout = 0;
-			} else {
-				$timeout = 12 * HOUR_IN_SECONDS;
-			}
-	}
-
-	$time_not_changed = isset( $last_update->last_checked ) && $timeout > ( time() - $last_update->last_checked );
-
-	if ( $time_not_changed && ! $extra_stats ) {
-		$theme_changed = false;
-		foreach ( $checked as $slug => $v ) {
-			if ( !isset( $last_update->checked[ $slug ] ) || strval($last_update->checked[ $slug ]) !== strval($v) )
-				$theme_changed = true;
-		}
-
-		if ( isset ( $last_update->response ) && is_array( $last_update->response ) ) {
-			foreach ( $last_update->response as $slug => $update_details ) {
-				if ( ! isset($checked[ $slug ]) ) {
-					$theme_changed = true;
-					break;
-				}
-			}
-		}
-
-		// Bail if we've checked recently and if nothing has changed
-		if ( ! $theme_changed ) {
-			return;
-		}
-	}
-
-	// Update last_checked for current to prevent multiple blocking requests if request hangs
-	$last_update->last_checked = time();
-	set_site_transient( 'update_themes', $last_update );
-
-	$request['themes'] = $themes;
-
-	$locales = array_values( get_available_languages() );
-
-	/**
-	 * Filters the locales requested for theme translations.
-	 *
-	 * @since 3.7.0
-	 * @since 4.5.0 The default value of the `$locales` parameter changed to include all locales.
-	 *
-	 * @param array $locales Theme locales. Default is all available locales of the site.
-	 */
-	$locales = apply_filters( 'themes_update_check_locales', $locales );
-	$locales = array_unique( $locales );
-
-	if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
-		$timeout = 30;
-	} else {
-		// Three seconds, plus one extra second for every 10 themes
-		$timeout = 3 + (int) ( count( $themes ) / 10 );
-	}
-
-	$options = array(
-		'timeout' => $timeout,
-		'body' => array(
-			'themes'       => wp_json_encode( $request ),
-			'translations' => wp_json_encode( $translations ),
-			'locale'       => wp_json_encode( $locales ),
-		),
-		'user-agent'	=> 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
-	);
-
-	if ( $extra_stats ) {
-		$options['body']['update_stats'] = wp_json_encode( $extra_stats );
-	}
-
-	$url = $http_url = 'http://api.wordpress.org/themes/update-check/1.1/';
-	if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
-		$url = set_url_scheme( $url, 'https' );
-
-	$raw_response = wp_remote_post( $url, $options );
-	if ( $ssl && is_wp_error( $raw_response ) ) {
-		trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
-		$raw_response = wp_remote_post( $http_url, $options );
-	}
-
-	if ( is_wp_error( $raw_response ) || 200 != wp_remote_retrieve_response_code( $raw_response ) ) {
-		return;
-	}
-
-	$new_update = new stdClass;
-	$new_update->last_checked = time();
-	$new_update->checked = $checked;
-
-	$response = json_decode( wp_remote_retrieve_body( $raw_response ), true );
-
-	if ( is_array( $response ) ) {
-		$new_update->response     = $response['themes'];
-		$new_update->translations = $response['translations'];
-	}
-
-	set_site_transient( 'update_themes', $new_update );
-}
-
-/**
- * Performs WordPress automatic background updates.
- *
- * @since 3.7.0
- */
-function wp_maybe_auto_update() {
-	include_once( ABSPATH . '/wp-admin/includes/admin.php' );
-	include_once( ABSPATH . '/wp-admin/includes/class-wp-upgrader.php' );
-
-	$upgrader = new WP_Automatic_Updater;
-	$upgrader->run();
-}
-
-/**
- * Retrieves a list of all language updates available.
- *
- * @since 3.7.0
- *
- * @return array
- */
-function wp_get_translation_updates() {
-	$updates = array();
-	$transients = array( 'update_core' => 'core', 'update_plugins' => 'plugin', 'update_themes' => 'theme' );
-	foreach ( $transients as $transient => $type ) {
-		$transient = get_site_transient( $transient );
-		if ( empty( $transient->translations ) )
-			continue;
-
-		foreach ( $transient->translations as $translation ) {
-			$updates[] = (object) $translation;
-		}
-	}
-	return $updates;
-}
-
-/**
- * Collect counts and UI strings for available updates
- *
- * @since 3.3.0
- *
- * @return array
- */
-function wp_get_update_data() {
-	$counts = array( 'plugins' => 0, 'themes' => 0, 'wordpress' => 0, 'translations' => 0 );
-
-	if ( $plugins = current_user_can( 'update_plugins' ) ) {
-		$update_plugins = get_site_transient( 'update_plugins' );
-		if ( ! empty( $update_plugins->response ) )
-			$counts['plugins'] = count( $update_plugins->response );
-	}
-
-	if ( $themes = current_user_can( 'update_themes' ) ) {
-		$update_themes = get_site_transient( 'update_themes' );
-		if ( ! empty( $update_themes->response ) )
-			$counts['themes'] = count( $update_themes->response );
-	}
-
-	if ( ( $core = current_user_can( 'update_core' ) ) && function_exists( 'get_core_updates' ) ) {
-		$update_wordpress = get_core_updates( array('dismissed' => false) );
-		if ( ! empty( $update_wordpress ) && ! in_array( $update_wordpress[0]->response, array('development', 'latest') ) && current_user_can('update_core') )
-			$counts['wordpress'] = 1;
-	}
-
-	if ( ( $core || $plugins || $themes ) && wp_get_translation_updates() )
-		$counts['translations'] = 1;
-
-	$counts['total'] = $counts['plugins'] + $counts['themes'] + $counts['wordpress'] + $counts['translations'];
-	$titles = array();
-	if ( $counts['wordpress'] )
-		$titles['wordpress'] = sprintf( __( '%d WordPress Update'), $counts['wordpress'] );
-	if ( $counts['plugins'] )
-		$titles['plugins'] = sprintf( _n( '%d Plugin Update', '%d Plugin Updates', $counts['plugins'] ), $counts['plugins'] );
-	if ( $counts['themes'] )
-		$titles['themes'] = sprintf( _n( '%d Theme Update', '%d Theme Updates', $counts['themes'] ), $counts['themes'] );
-	if ( $counts['translations'] )
-		$titles['translations'] = __( 'Translation Updates' );
-
-	$update_title = $titles ? esc_attr( implode( ', ', $titles ) ) : '';
-
-	$update_data = array( 'counts' => $counts, 'title' => $update_title );
-	/**
-	 * Filters the returned array of update data for plugins, themes, and WordPress core.
-	 *
-	 * @since 3.5.0
-	 *
-	 * @param array $update_data {
-	 *     Fetched update data.
-	 *
-	 *     @type array   $counts       An array of counts for available plugin, theme, and WordPress updates.
-	 *     @type string  $update_title Titles of available updates.
-	 * }
-	 * @param array $titles An array of update counts and UI strings for available updates.
-	 */
-	return apply_filters( 'wp_get_update_data', $update_data, $titles );
-}
-
-/**
- * Determines whether core should be updated.
- *
- * @since 2.8.0
- *
- * @global string $wp_version
- */
-function _maybe_update_core() {
-	// include an unmodified $wp_version
-	include( ABSPATH . WPINC . '/version.php' );
-
-	$current = get_site_transient( 'update_core' );
-
-	if ( isset( $current->last_checked, $current->version_checked ) &&
-		12 * HOUR_IN_SECONDS > ( time() - $current->last_checked ) &&
-		$current->version_checked == $wp_version ) {
-		return;
-	}
-	wp_version_check();
-}
-/**
- * Check the last time plugins were run before checking plugin versions.
- *
- * This might have been backported to WordPress 2.6.1 for performance reasons.
- * This is used for the wp-admin to check only so often instead of every page
- * load.
- *
- * @since 2.7.0
- * @access private
- */
-function _maybe_update_plugins() {
-	$current = get_site_transient( 'update_plugins' );
-	if ( isset( $current->last_checked ) && 12 * HOUR_IN_SECONDS > ( time() - $current->last_checked ) )
-		return;
-	wp_update_plugins();
-}
-
-/**
- * Check themes versions only after a duration of time.
- *
- * This is for performance reasons to make sure that on the theme version
- * checker is not run on every page load.
- *
- * @since 2.7.0
- * @access private
- */
-function _maybe_update_themes() {
-	$current = get_site_transient( 'update_themes' );
-	if ( isset( $current->last_checked ) && 12 * HOUR_IN_SECONDS > ( time() - $current->last_checked ) )
-		return;
-	wp_update_themes();
-}
-
-/**
- * Schedule core, theme, and plugin update checks.
- *
- * @since 3.1.0
- */
-function wp_schedule_update_checks() {
-	if ( ! wp_next_scheduled( 'wp_version_check' ) && ! wp_installing() )
-		wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
-
-	if ( ! wp_next_scheduled( 'wp_update_plugins' ) && ! wp_installing() )
-		wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
-
-	if ( ! wp_next_scheduled( 'wp_update_themes' ) && ! wp_installing() )
-		wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
-}
-
-/**
- * Clear existing update caches for plugins, themes, and core.
- *
- * @since 4.1.0
- */
-function wp_clean_update_cache() {
-	if ( function_exists( 'wp_clean_plugins_cache' ) ) {
-		wp_clean_plugins_cache();
-	} else {
-		delete_site_transient( 'update_plugins' );
-	}
-	wp_clean_themes_cache();
-	delete_site_transient( 'update_core' );
-}
-
-if ( ( ! is_main_site() && ! is_network_admin() ) || wp_doing_ajax() ) {
-	return;
-}
-
-add_action( 'admin_init', '_maybe_update_core' );
-add_action( 'wp_version_check', 'wp_version_check' );
-
-add_action( 'load-plugins.php', 'wp_update_plugins' );
-add_action( 'load-update.php', 'wp_update_plugins' );
-add_action( 'load-update-core.php', 'wp_update_plugins' );
-add_action( 'admin_init', '_maybe_update_plugins' );
-add_action( 'wp_update_plugins', 'wp_update_plugins' );
-
-add_action( 'load-themes.php', 'wp_update_themes' );
-add_action( 'load-update.php', 'wp_update_themes' );
-add_action( 'load-update-core.php', 'wp_update_themes' );
-add_action( 'admin_init', '_maybe_update_themes' );
-add_action( 'wp_update_themes', 'wp_update_themes' );
-
-add_action( 'update_option_WPLANG', 'wp_clean_update_cache' , 10, 0 );
-
-add_action( 'wp_maybe_auto_update', 'wp_maybe_auto_update' );
-
-add_action( 'init', 'wp_schedule_update_checks' );
Index: www/wp-admin/includes/class-wp-terms-list-table.php
===================================================================
--- www/wp-admin/includes/class-wp-terms-list-table.php	(revision 38565)
+++ www/wp-admin/autoload/list-table/WP_Terms_List_Table.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/includes/class-wp-internal-pointers.php
===================================================================
--- www/wp-admin/includes/class-wp-internal-pointers.php	(revision 38565)
+++ www/wp-admin/autoload/WP_Internal_Pointers.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/requests/Exception/HTTP/414.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/414.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/414.php	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-<?php
-/**
- * Exception for 414 Request-URI Too Large responses
- *
- * @package Requests
- */
-
-/**
- * Exception for 414 Request-URI Too Large responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_414 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 414;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Request-URI Too Large';
-}
\ No newline at end of file
Index: www/wp-includes/theme.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/theme.php	(revision 38565)
+++ www/wp-includes/theme.php	(revision 38565)
@@ -1,2191 +0,0 @@
-<?php
-/**
- * Theme, template, and stylesheet functions.
- *
- * @package WordPress
- * @subpackage Theme
- */
-
-/**
- * Returns an array of WP_Theme objects based on the arguments.
- *
- * Despite advances over get_themes(), this function is quite expensive, and grows
- * linearly with additional themes. Stick to wp_get_theme() if possible.
- *
- * @since 3.4.0
- *
- * @global array $wp_theme_directories
- * @staticvar array $_themes
- *
- * @param array $args The search arguments. Optional.
- * - errors      mixed  True to return themes with errors, false to return themes without errors, null
- *                      to return all themes. Defaults to false.
- * - allowed     mixed  (Multisite) True to return only allowed themes for a site. False to return only
- *                      disallowed themes for a site. 'site' to return only site-allowed themes. 'network'
- *                      to return only network-allowed themes. Null to return all themes. Defaults to null.
- * - blog_id     int    (Multisite) The blog ID used to calculate which themes are allowed. Defaults to 0,
- *                      synonymous for the current blog.
- * @return array Array of WP_Theme objects.
- */
-function wp_get_themes( $args = array() ) {
-	global $wp_theme_directories;
-
-	$defaults = array( 'errors' => false, 'allowed' => null, 'blog_id' => 0 );
-	$args = wp_parse_args( $args, $defaults );
-
-	$theme_directories = search_theme_directories();
-
-	if ( count( $wp_theme_directories ) > 1 ) {
-		// Make sure the current theme wins out, in case search_theme_directories() picks the wrong
-		// one in the case of a conflict. (Normally, last registered theme root wins.)
-		$current_theme = get_stylesheet();
-		if ( isset( $theme_directories[ $current_theme ] ) ) {
-			$root_of_current_theme = get_raw_theme_root( $current_theme );
-			if ( ! in_array( $root_of_current_theme, $wp_theme_directories ) )
-				$root_of_current_theme = WP_CONTENT_DIR . $root_of_current_theme;
-			$theme_directories[ $current_theme ]['theme_root'] = $root_of_current_theme;
-		}
-	}
-
-	if ( empty( $theme_directories ) )
-		return array();
-
-	if ( is_multisite() && null !== $args['allowed'] ) {
-		$allowed = $args['allowed'];
-		if ( 'network' === $allowed )
-			$theme_directories = array_intersect_key( $theme_directories, WP_Theme::get_allowed_on_network() );
-		elseif ( 'site' === $allowed )
-			$theme_directories = array_intersect_key( $theme_directories, WP_Theme::get_allowed_on_site( $args['blog_id'] ) );
-		elseif ( $allowed )
-			$theme_directories = array_intersect_key( $theme_directories, WP_Theme::get_allowed( $args['blog_id'] ) );
-		else
-			$theme_directories = array_diff_key( $theme_directories, WP_Theme::get_allowed( $args['blog_id'] ) );
-	}
-
-	$themes = array();
-	static $_themes = array();
-
-	foreach ( $theme_directories as $theme => $theme_root ) {
-		if ( isset( $_themes[ $theme_root['theme_root'] . '/' . $theme ] ) )
-			$themes[ $theme ] = $_themes[ $theme_root['theme_root'] . '/' . $theme ];
-		else
-			$themes[ $theme ] = $_themes[ $theme_root['theme_root'] . '/' . $theme ] = new WP_Theme( $theme, $theme_root['theme_root'] );
-	}
-
-	if ( null !== $args['errors'] ) {
-		foreach ( $themes as $theme => $wp_theme ) {
-			if ( $wp_theme->errors() != $args['errors'] )
-				unset( $themes[ $theme ] );
-		}
-	}
-
-	return $themes;
-}
-
-/**
- * Gets a WP_Theme object for a theme.
- *
- * @since 3.4.0
- *
- * @global array $wp_theme_directories
- *
- * @param string $stylesheet Directory name for the theme. Optional. Defaults to current theme.
- * @param string $theme_root Absolute path of the theme root to look in. Optional. If not specified, get_raw_theme_root()
- * 	                         is used to calculate the theme root for the $stylesheet provided (or current theme).
- * @return WP_Theme Theme object. Be sure to check the object's exists() method if you need to confirm the theme's existence.
- */
-function wp_get_theme( $stylesheet = null, $theme_root = null ) {
-	global $wp_theme_directories;
-
-	if ( empty( $stylesheet ) )
-		$stylesheet = get_stylesheet();
-
-	if ( empty( $theme_root ) ) {
-		$theme_root = get_raw_theme_root( $stylesheet );
-		if ( false === $theme_root )
-			$theme_root = WP_CONTENT_DIR . '/themes';
-		elseif ( ! in_array( $theme_root, (array) $wp_theme_directories ) )
-			$theme_root = WP_CONTENT_DIR . $theme_root;
-	}
-
-	return new WP_Theme( $stylesheet, $theme_root );
-}
-
-/**
- * Clears the cache held by get_theme_roots() and WP_Theme.
- *
- * @since 3.5.0
- * @param bool $clear_update_cache Whether to clear the Theme updates cache
- */
-function wp_clean_themes_cache( $clear_update_cache = true ) {
-	if ( $clear_update_cache )
-		delete_site_transient( 'update_themes' );
-	search_theme_directories( true );
-	foreach ( wp_get_themes( array( 'errors' => null ) ) as $theme )
-		$theme->cache_delete();
-}
-
-/**
- * Whether a child theme is in use.
- *
- * @since 3.0.0
- *
- * @return bool true if a child theme is in use, false otherwise.
- **/
-function is_child_theme() {
-	return ( TEMPLATEPATH !== STYLESHEETPATH );
-}
-
-/**
- * Retrieve name of the current stylesheet.
- *
- * The theme name that the administrator has currently set the front end theme
- * as.
- *
- * For all intents and purposes, the template name and the stylesheet name are
- * going to be the same for most cases.
- *
- * @since 1.5.0
- *
- * @return string Stylesheet name.
- */
-function get_stylesheet() {
-	/**
-	 * Filters the name of current stylesheet.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $stylesheet Name of the current stylesheet.
-	 */
-	return apply_filters( 'stylesheet', get_option( 'stylesheet' ) );
-}
-
-/**
- * Retrieve stylesheet directory path for current theme.
- *
- * @since 1.5.0
- *
- * @return string Path to current theme directory.
- */
-function get_stylesheet_directory() {
-	$stylesheet = get_stylesheet();
-	$theme_root = get_theme_root( $stylesheet );
-	$stylesheet_dir = "$theme_root/$stylesheet";
-
-	/**
-	 * Filters the stylesheet directory path for current theme.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $stylesheet_dir Absolute path to the current theme.
-	 * @param string $stylesheet     Directory name of the current theme.
-	 * @param string $theme_root     Absolute path to themes directory.
-	 */
-	return apply_filters( 'stylesheet_directory', $stylesheet_dir, $stylesheet, $theme_root );
-}
-
-/**
- * Retrieve stylesheet directory URI.
- *
- * @since 1.5.0
- *
- * @return string
- */
-function get_stylesheet_directory_uri() {
-	$stylesheet = str_replace( '%2F', '/', rawurlencode( get_stylesheet() ) );
-	$theme_root_uri = get_theme_root_uri( $stylesheet );
-	$stylesheet_dir_uri = "$theme_root_uri/$stylesheet";
-
-	/**
-	 * Filters the stylesheet directory URI.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $stylesheet_dir_uri Stylesheet directory URI.
-	 * @param string $stylesheet         Name of the activated theme's directory.
-	 * @param string $theme_root_uri     Themes root URI.
-	 */
-	return apply_filters( 'stylesheet_directory_uri', $stylesheet_dir_uri, $stylesheet, $theme_root_uri );
-}
-
-/**
- * Retrieves the URI of current theme stylesheet.
- *
- * The stylesheet file name is 'style.css' which is appended to the stylesheet directory URI path.
- * See get_stylesheet_directory_uri().
- *
- * @since 1.5.0
- *
- * @return string
- */
-function get_stylesheet_uri() {
-	$stylesheet_dir_uri = get_stylesheet_directory_uri();
-	$stylesheet_uri = $stylesheet_dir_uri . '/style.css';
-	/**
-	 * Filters the URI of the current theme stylesheet.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $stylesheet_uri     Stylesheet URI for the current theme/child theme.
-	 * @param string $stylesheet_dir_uri Stylesheet directory URI for the current theme/child theme.
-	 */
-	return apply_filters( 'stylesheet_uri', $stylesheet_uri, $stylesheet_dir_uri );
-}
-
-/**
- * Retrieves the localized stylesheet URI.
- *
- * The stylesheet directory for the localized stylesheet files are located, by
- * default, in the base theme directory. The name of the locale file will be the
- * locale followed by '.css'. If that does not exist, then the text direction
- * stylesheet will be checked for existence, for example 'ltr.css'.
- *
- * The theme may change the location of the stylesheet directory by either using
- * the {@see 'stylesheet_directory_uri'} or {@see 'locale_stylesheet_uri'} filters.
- *
- * If you want to change the location of the stylesheet files for the entire
- * WordPress workflow, then change the former. If you just have the locale in a
- * separate folder, then change the latter.
- *
- * @since 2.1.0
- *
- * @global WP_Locale $wp_locale
- *
- * @return string
- */
-function get_locale_stylesheet_uri() {
-	global $wp_locale;
-	$stylesheet_dir_uri = get_stylesheet_directory_uri();
-	$dir = get_stylesheet_directory();
-	$locale = get_locale();
-	if ( file_exists("$dir/$locale.css") )
-		$stylesheet_uri = "$stylesheet_dir_uri/$locale.css";
-	elseif ( !empty($wp_locale->text_direction) && file_exists("$dir/{$wp_locale->text_direction}.css") )
-		$stylesheet_uri = "$stylesheet_dir_uri/{$wp_locale->text_direction}.css";
-	else
-		$stylesheet_uri = '';
-	/**
-	 * Filters the localized stylesheet URI.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param string $stylesheet_uri     Localized stylesheet URI.
-	 * @param string $stylesheet_dir_uri Stylesheet directory URI.
-	 */
-	return apply_filters( 'locale_stylesheet_uri', $stylesheet_uri, $stylesheet_dir_uri );
-}
-
-/**
- * Retrieve name of the current theme.
- *
- * @since 1.5.0
- *
- * @return string Template name.
- */
-function get_template() {
-	/**
-	 * Filters the name of the current theme.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $template Current theme's directory name.
-	 */
-	return apply_filters( 'template', get_option( 'template' ) );
-}
-
-/**
- * Retrieve current theme directory.
- *
- * @since 1.5.0
- *
- * @return string Template directory path.
- */
-function get_template_directory() {
-	$template = get_template();
-	$theme_root = get_theme_root( $template );
-	$template_dir = "$theme_root/$template";
-
-	/**
-	 * Filters the current theme directory path.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $template_dir The URI of the current theme directory.
-	 * @param string $template     Directory name of the current theme.
-	 * @param string $theme_root   Absolute path to the themes directory.
-	 */
-	return apply_filters( 'template_directory', $template_dir, $template, $theme_root );
-}
-
-/**
- * Retrieve theme directory URI.
- *
- * @since 1.5.0
- *
- * @return string Template directory URI.
- */
-function get_template_directory_uri() {
-	$template = str_replace( '%2F', '/', rawurlencode( get_template() ) );
-	$theme_root_uri = get_theme_root_uri( $template );
-	$template_dir_uri = "$theme_root_uri/$template";
-
-	/**
-	 * Filters the current theme directory URI.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $template_dir_uri The URI of the current theme directory.
-	 * @param string $template         Directory name of the current theme.
-	 * @param string $theme_root_uri   The themes root URI.
-	 */
-	return apply_filters( 'template_directory_uri', $template_dir_uri, $template, $theme_root_uri );
-}
-
-/**
- * Retrieve theme roots.
- *
- * @since 2.9.0
- *
- * @global array $wp_theme_directories
- *
- * @return array|string An array of theme roots keyed by template/stylesheet or a single theme root if all themes have the same root.
- */
-function get_theme_roots() {
-	global $wp_theme_directories;
-
-	if ( count($wp_theme_directories) <= 1 )
-		return '/themes';
-
-	$theme_roots = get_site_transient( 'theme_roots' );
-	if ( false === $theme_roots ) {
-		search_theme_directories( true ); // Regenerate the transient.
-		$theme_roots = get_site_transient( 'theme_roots' );
-	}
-	return $theme_roots;
-}
-
-/**
- * Register a directory that contains themes.
- *
- * @since 2.9.0
- *
- * @global array $wp_theme_directories
- *
- * @param string $directory Either the full filesystem path to a theme folder or a folder within WP_CONTENT_DIR
- * @return bool
- */
-function register_theme_directory( $directory ) {
-	global $wp_theme_directories;
-
-	if ( ! file_exists( $directory ) ) {
-		// Try prepending as the theme directory could be relative to the content directory
-		$directory = WP_CONTENT_DIR . '/' . $directory;
-		// If this directory does not exist, return and do not register
-		if ( ! file_exists( $directory ) ) {
-			return false;
-		}
-	}
-
-	if ( ! is_array( $wp_theme_directories ) ) {
-		$wp_theme_directories = array();
-	}
-
-	$untrailed = untrailingslashit( $directory );
-	if ( ! empty( $untrailed ) && ! in_array( $untrailed, $wp_theme_directories ) ) {
-		$wp_theme_directories[] = $untrailed;
-	}
-
-	return true;
-}
-
-/**
- * Search all registered theme directories for complete and valid themes.
- *
- * @since 2.9.0
- *
- * @global array $wp_theme_directories
- * @staticvar array $found_themes
- *
- * @param bool $force Optional. Whether to force a new directory scan. Defaults to false.
- * @return array|false Valid themes found
- */
-function search_theme_directories( $force = false ) {
-	global $wp_theme_directories;
-	static $found_themes = null;
-
-	if ( empty( $wp_theme_directories ) )
-		return false;
-
-	if ( ! $force && isset( $found_themes ) )
-		return $found_themes;
-
-	$found_themes = array();
-
-	$wp_theme_directories = (array) $wp_theme_directories;
-	$relative_theme_roots = array();
-
-	// Set up maybe-relative, maybe-absolute array of theme directories.
-	// We always want to return absolute, but we need to cache relative
-	// to use in get_theme_root().
-	foreach ( $wp_theme_directories as $theme_root ) {
-		if ( 0 === strpos( $theme_root, WP_CONTENT_DIR ) )
-			$relative_theme_roots[ str_replace( WP_CONTENT_DIR, '', $theme_root ) ] = $theme_root;
-		else
-			$relative_theme_roots[ $theme_root ] = $theme_root;
-	}
-
-	/**
-	 * Filters whether to get the cache of the registered theme directories.
-	 *
-	 * @since 3.4.0
-	 *
-	 * @param bool   $cache_expiration Whether to get the cache of the theme directories. Default false.
-	 * @param string $cache_directory  Directory to be searched for the cache.
-	 */
-	if ( $cache_expiration = apply_filters( 'wp_cache_themes_persistently', false, 'search_theme_directories' ) ) {
-		$cached_roots = get_site_transient( 'theme_roots' );
-		if ( is_array( $cached_roots ) ) {
-			foreach ( $cached_roots as $theme_dir => $theme_root ) {
-				// A cached theme root is no longer around, so skip it.
-				if ( ! isset( $relative_theme_roots[ $theme_root ] ) )
-					continue;
-				$found_themes[ $theme_dir ] = array(
-					'theme_file' => $theme_dir . '/style.css',
-					'theme_root' => $relative_theme_roots[ $theme_root ], // Convert relative to absolute.
-				);
-			}
-			return $found_themes;
-		}
-		if ( ! is_int( $cache_expiration ) )
-			$cache_expiration = 1800; // half hour
-	} else {
-		$cache_expiration = 1800; // half hour
-	}
-
-	/* Loop the registered theme directories and extract all themes */
-	foreach ( $wp_theme_directories as $theme_root ) {
-
-		// Start with directories in the root of the current theme directory.
-		$dirs = @ scandir( $theme_root );
-		if ( ! $dirs ) {
-			trigger_error( "$theme_root is not readable", E_USER_NOTICE );
-			continue;
-		}
-		foreach ( $dirs as $dir ) {
-			if ( ! is_dir( $theme_root . '/' . $dir ) || $dir[0] == '.' || $dir == 'CVS' )
-				continue;
-			if ( file_exists( $theme_root . '/' . $dir . '/style.css' ) ) {
-				// wp-content/themes/a-single-theme
-				// wp-content/themes is $theme_root, a-single-theme is $dir
-				$found_themes[ $dir ] = array(
-					'theme_file' => $dir . '/style.css',
-					'theme_root' => $theme_root,
-				);
-			} else {
-				$found_theme = false;
-				// wp-content/themes/a-folder-of-themes/*
-				// wp-content/themes is $theme_root, a-folder-of-themes is $dir, then themes are $sub_dirs
-				$sub_dirs = @ scandir( $theme_root . '/' . $dir );
-				if ( ! $sub_dirs ) {
-					trigger_error( "$theme_root/$dir is not readable", E_USER_NOTICE );
-					continue;
-				}
-				foreach ( $sub_dirs as $sub_dir ) {
-					if ( ! is_dir( $theme_root . '/' . $dir . '/' . $sub_dir ) || $dir[0] == '.' || $dir == 'CVS' )
-						continue;
-					if ( ! file_exists( $theme_root . '/' . $dir . '/' . $sub_dir . '/style.css' ) )
-						continue;
-					$found_themes[ $dir . '/' . $sub_dir ] = array(
-						'theme_file' => $dir . '/' . $sub_dir . '/style.css',
-						'theme_root' => $theme_root,
-					);
-					$found_theme = true;
-				}
-				// Never mind the above, it's just a theme missing a style.css.
-				// Return it; WP_Theme will catch the error.
-				if ( ! $found_theme )
-					$found_themes[ $dir ] = array(
-						'theme_file' => $dir . '/style.css',
-						'theme_root' => $theme_root,
-					);
-			}
-		}
-	}
-
-	asort( $found_themes );
-
-	$theme_roots = array();
-	$relative_theme_roots = array_flip( $relative_theme_roots );
-
-	foreach ( $found_themes as $theme_dir => $theme_data ) {
-		$theme_roots[ $theme_dir ] = $relative_theme_roots[ $theme_data['theme_root'] ]; // Convert absolute to relative.
-	}
-
-	if ( $theme_roots != get_site_transient( 'theme_roots' ) )
-		set_site_transient( 'theme_roots', $theme_roots, $cache_expiration );
-
-	return $found_themes;
-}
-
-/**
- * Retrieve path to themes directory.
- *
- * Does not have trailing slash.
- *
- * @since 1.5.0
- *
- * @global array $wp_theme_directories
- *
- * @param string $stylesheet_or_template The stylesheet or template name of the theme
- * @return string Theme path.
- */
-function get_theme_root( $stylesheet_or_template = false ) {
-	global $wp_theme_directories;
-
-	if ( $stylesheet_or_template && $theme_root = get_raw_theme_root( $stylesheet_or_template ) ) {
-		// Always prepend WP_CONTENT_DIR unless the root currently registered as a theme directory.
-		// This gives relative theme roots the benefit of the doubt when things go haywire.
-		if ( ! in_array( $theme_root, (array) $wp_theme_directories ) )
-			$theme_root = WP_CONTENT_DIR . $theme_root;
-	} else {
-		$theme_root = WP_CONTENT_DIR . '/themes';
-	}
-
-	/**
-	 * Filters the absolute path to the themes directory.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $theme_root Absolute path to themes directory.
-	 */
-	return apply_filters( 'theme_root', $theme_root );
-}
-
-/**
- * Retrieve URI for themes directory.
- *
- * Does not have trailing slash.
- *
- * @since 1.5.0
- *
- * @global array $wp_theme_directories
- *
- * @param string $stylesheet_or_template Optional. The stylesheet or template name of the theme.
- * 	                                     Default is to leverage the main theme root.
- * @param string $theme_root             Optional. The theme root for which calculations will be based, preventing
- * 	                                     the need for a get_raw_theme_root() call.
- * @return string Themes URI.
- */
-function get_theme_root_uri( $stylesheet_or_template = false, $theme_root = false ) {
-	global $wp_theme_directories;
-
-	if ( $stylesheet_or_template && ! $theme_root )
-		$theme_root = get_raw_theme_root( $stylesheet_or_template );
-
-	if ( $stylesheet_or_template && $theme_root ) {
-		if ( in_array( $theme_root, (array) $wp_theme_directories ) ) {
-			// Absolute path. Make an educated guess. YMMV -- but note the filter below.
-			if ( 0 === strpos( $theme_root, WP_CONTENT_DIR ) )
-				$theme_root_uri = content_url( str_replace( WP_CONTENT_DIR, '', $theme_root ) );
-			elseif ( 0 === strpos( $theme_root, ABSPATH ) )
-				$theme_root_uri = site_url( str_replace( ABSPATH, '', $theme_root ) );
-			elseif ( 0 === strpos( $theme_root, WP_PLUGIN_DIR ) || 0 === strpos( $theme_root, WPMU_PLUGIN_DIR ) )
-				$theme_root_uri = plugins_url( basename( $theme_root ), $theme_root );
-			else
-				$theme_root_uri = $theme_root;
-		} else {
-			$theme_root_uri = content_url( $theme_root );
-		}
-	} else {
-		$theme_root_uri = content_url( 'themes' );
-	}
-
-	/**
-	 * Filters the URI for themes directory.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $theme_root_uri         The URI for themes directory.
-	 * @param string $siteurl                WordPress web address which is set in General Options.
-	 * @param string $stylesheet_or_template Stylesheet or template name of the theme.
-	 */
-	return apply_filters( 'theme_root_uri', $theme_root_uri, get_option( 'siteurl' ), $stylesheet_or_template );
-}
-
-/**
- * Get the raw theme root relative to the content directory with no filters applied.
- *
- * @since 3.1.0
- *
- * @global array $wp_theme_directories
- *
- * @param string $stylesheet_or_template The stylesheet or template name of the theme
- * @param bool   $skip_cache             Optional. Whether to skip the cache.
- *                                       Defaults to false, meaning the cache is used.
- * @return string Theme root
- */
-function get_raw_theme_root( $stylesheet_or_template, $skip_cache = false ) {
-	global $wp_theme_directories;
-
-	if ( count($wp_theme_directories) <= 1 )
-		return '/themes';
-
-	$theme_root = false;
-
-	// If requesting the root for the current theme, consult options to avoid calling get_theme_roots()
-	if ( ! $skip_cache ) {
-		if ( get_option('stylesheet') == $stylesheet_or_template )
-			$theme_root = get_option('stylesheet_root');
-		elseif ( get_option('template') == $stylesheet_or_template )
-			$theme_root = get_option('template_root');
-	}
-
-	if ( empty($theme_root) ) {
-		$theme_roots = get_theme_roots();
-		if ( !empty($theme_roots[$stylesheet_or_template]) )
-			$theme_root = $theme_roots[$stylesheet_or_template];
-	}
-
-	return $theme_root;
-}
-
-/**
- * Display localized stylesheet link element.
- *
- * @since 2.1.0
- */
-function locale_stylesheet() {
-	$stylesheet = get_locale_stylesheet_uri();
-	if ( empty($stylesheet) )
-		return;
-	echo '<link rel="stylesheet" href="' . $stylesheet . '" type="text/css" media="screen" />';
-}
-
-/**
- * Switches the theme.
- *
- * Accepts one argument: $stylesheet of the theme. It also accepts an additional function signature
- * of two arguments: $template then $stylesheet. This is for backward compatibility.
- *
- * @since 2.5.0
- *
- * @global array                $wp_theme_directories
- * @global WP_Customize_Manager $wp_customize
- * @global array                $sidebars_widgets
- *
- * @param string $stylesheet Stylesheet name
- */
-function switch_theme( $stylesheet ) {
-	global $wp_theme_directories, $wp_customize, $sidebars_widgets;
-
-	$_sidebars_widgets = null;
-	if ( 'wp_ajax_customize_save' === current_action() ) {
-		$_sidebars_widgets = $wp_customize->post_value( $wp_customize->get_setting( 'old_sidebars_widgets_data' ) );
-	} elseif ( is_array( $sidebars_widgets ) ) {
-		$_sidebars_widgets = $sidebars_widgets;
-	}
-
-	if ( is_array( $_sidebars_widgets ) ) {
-		set_theme_mod( 'sidebars_widgets', array( 'time' => time(), 'data' => $_sidebars_widgets ) );
-	}
-
-	$nav_menu_locations = get_theme_mod( 'nav_menu_locations' );
-
-	if ( func_num_args() > 1 ) {
-		$stylesheet = func_get_arg( 1 );
-	}
-
-	$old_theme = wp_get_theme();
-	$new_theme = wp_get_theme( $stylesheet );
-	$template  = $new_theme->get_template();
-
-	update_option( 'template', $template );
-	update_option( 'stylesheet', $stylesheet );
-
-	if ( count( $wp_theme_directories ) > 1 ) {
-		update_option( 'template_root', get_raw_theme_root( $template, true ) );
-		update_option( 'stylesheet_root', get_raw_theme_root( $stylesheet, true ) );
-	} else {
-		delete_option( 'template_root' );
-		delete_option( 'stylesheet_root' );
-	}
-
-	$new_name  = $new_theme->get('Name');
-
-	update_option( 'current_theme', $new_name );
-
-	// Migrate from the old mods_{name} option to theme_mods_{slug}.
-	if ( is_admin() && false === get_option( 'theme_mods_' . $stylesheet ) ) {
-		$default_theme_mods = (array) get_option( 'mods_' . $new_name );
-		if ( ! empty( $nav_menu_locations ) && empty( $default_theme_mods['nav_menu_locations'] ) ) {
-			$default_theme_mods['nav_menu_locations'] = $nav_menu_locations;
-		}
-		add_option( "theme_mods_$stylesheet", $default_theme_mods );
-	} else {
-		/*
-		 * Since retrieve_widgets() is called when initializing a theme in the Customizer,
-		 * we need to remove the theme mods to avoid overwriting changes made via
-		 * the Customizer when accessing wp-admin/widgets.php.
-		 */
-		if ( 'wp_ajax_customize_save' === current_action() ) {
-			remove_theme_mod( 'sidebars_widgets' );
-		}
-
-		if ( ! empty( $nav_menu_locations ) ) {
-			$nav_mods = get_theme_mod( 'nav_menu_locations' );
-			if ( empty( $nav_mods ) ) {
-				set_theme_mod( 'nav_menu_locations', $nav_menu_locations );
-			}
-		}
-	}
-
-	update_option( 'theme_switched', $old_theme->get_stylesheet() );
-
-	/**
-	 * Fires after the theme is switched.
-	 *
-	 * @since 1.5.0
-	 * @since 4.5.0 Introduced the `$old_theme` parameter.
-	 *
-	 * @param string   $new_name  Name of the new theme.
-	 * @param WP_Theme $new_theme WP_Theme instance of the new theme.
-	 * @param WP_Theme $old_theme WP_Theme instance of the old theme.
-	 */
-	do_action( 'switch_theme', $new_name, $new_theme, $old_theme );
-}
-
-/**
- * Checks that current theme files 'index.php' and 'style.css' exists.
- *
- * Does not initially check the default theme, which is the fallback and should always exist.
- * But if it doesn't exist, it'll fall back to the latest core default theme that does exist.
- * Will switch theme to the fallback theme if current theme does not validate.
- *
- * You can use the {@see 'validate_current_theme'} filter to return false to
- * disable this functionality.
- *
- * @since 1.5.0
- * @see WP_DEFAULT_THEME
- *
- * @return bool
- */
-function validate_current_theme() {
-	/**
-	 * Filters whether to validate the current theme.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param bool $validate Whether to validate the current theme. Default true.
-	 */
-	if ( wp_installing() || ! apply_filters( 'validate_current_theme', true ) )
-		return true;
-
-	if ( ! file_exists( get_template_directory() . '/index.php' ) ) {
-		// Invalid.
-	} elseif ( ! file_exists( get_template_directory() . '/style.css' ) ) {
-		// Invalid.
-	} elseif ( is_child_theme() && ! file_exists( get_stylesheet_directory() . '/style.css' ) ) {
-		// Invalid.
-	} else {
-		// Valid.
-		return true;
-	}
-
-	$default = wp_get_theme( WP_DEFAULT_THEME );
-	if ( $default->exists() ) {
-		switch_theme( WP_DEFAULT_THEME );
-		return false;
-	}
-
-	/**
-	 * If we're in an invalid state but WP_DEFAULT_THEME doesn't exist,
-	 * switch to the latest core default theme that's installed.
-	 * If it turns out that this latest core default theme is our current
-	 * theme, then there's nothing we can do about that, so we have to bail,
-	 * rather than going into an infinite loop. (This is why there are
-	 * checks against WP_DEFAULT_THEME above, also.) We also can't do anything
-	 * if it turns out there is no default theme installed. (That's `false`.)
-	 */
-	$default = WP_Theme::get_core_default_theme();
-	if ( false === $default || get_stylesheet() == $default->get_stylesheet() ) {
-		return true;
-	}
-
-	switch_theme( $default->get_stylesheet() );
-	return false;
-}
-
-/**
- * Retrieve all theme modifications.
- *
- * @since 3.1.0
- *
- * @return array|void Theme modifications.
- */
-function get_theme_mods() {
-	$theme_slug = get_option( 'stylesheet' );
-	$mods = get_option( "theme_mods_$theme_slug" );
-	if ( false === $mods ) {
-		$theme_name = get_option( 'current_theme' );
-		if ( false === $theme_name )
-			$theme_name = wp_get_theme()->get('Name');
-		$mods = get_option( "mods_$theme_name" ); // Deprecated location.
-		if ( is_admin() && false !== $mods ) {
-			update_option( "theme_mods_$theme_slug", $mods );
-			delete_option( "mods_$theme_name" );
-		}
-	}
-	return $mods;
-}
-
-/**
- * Retrieve theme modification value for the current theme.
- *
- * If the modification name does not exist, then the $default will be passed
- * through {@link https://secure.php.net/sprintf sprintf()} PHP function with the first
- * string the template directory URI and the second string the stylesheet
- * directory URI.
- *
- * @since 2.1.0
- *
- * @param string      $name    Theme modification name.
- * @param bool|string $default
- * @return string
- */
-function get_theme_mod( $name, $default = false ) {
-	$mods = get_theme_mods();
-
-	if ( isset( $mods[$name] ) ) {
-		/**
-		 * Filters the theme modification, or 'theme_mod', value.
-		 *
-		 * The dynamic portion of the hook name, `$name`, refers to
-		 * the key name of the modification array. For example,
-		 * 'header_textcolor', 'header_image', and so on depending
-		 * on the theme options.
-		 *
-		 * @since 2.2.0
-		 *
-		 * @param string $current_mod The value of the current theme modification.
-		 */
-		return apply_filters( "theme_mod_{$name}", $mods[$name] );
-	}
-
-	if ( is_string( $default ) )
-		$default = sprintf( $default, get_template_directory_uri(), get_stylesheet_directory_uri() );
-
-	/** This filter is documented in wp-includes/theme.php */
-	return apply_filters( "theme_mod_{$name}", $default );
-}
-
-/**
- * Update theme modification value for the current theme.
- *
- * @since 2.1.0
- *
- * @param string $name  Theme modification name.
- * @param mixed  $value Theme modification value.
- */
-function set_theme_mod( $name, $value ) {
-	$mods = get_theme_mods();
-	$old_value = isset( $mods[ $name ] ) ? $mods[ $name ] : false;
-
-	/**
-	 * Filters the theme mod value on save.
-	 *
-	 * The dynamic portion of the hook name, `$name`, refers to the key name of
-	 * the modification array. For example, 'header_textcolor', 'header_image',
-	 * and so on depending on the theme options.
-	 *
-	 * @since 3.9.0
-	 *
-	 * @param string $value     The new value of the theme mod.
-	 * @param string $old_value The current value of the theme mod.
-	 */
-	$mods[ $name ] = apply_filters( "pre_set_theme_mod_{$name}", $value, $old_value );
-
-	$theme = get_option( 'stylesheet' );
-	update_option( "theme_mods_$theme", $mods );
-}
-
-/**
- * Remove theme modification name from current theme list.
- *
- * If removing the name also removes all elements, then the entire option will
- * be removed.
- *
- * @since 2.1.0
- *
- * @param string $name Theme modification name.
- */
-function remove_theme_mod( $name ) {
-	$mods = get_theme_mods();
-
-	if ( ! isset( $mods[ $name ] ) )
-		return;
-
-	unset( $mods[ $name ] );
-
-	if ( empty( $mods ) ) {
-		remove_theme_mods();
-		return;
-	}
-	$theme = get_option( 'stylesheet' );
-	update_option( "theme_mods_$theme", $mods );
-}
-
-/**
- * Remove theme modifications option for current theme.
- *
- * @since 2.1.0
- */
-function remove_theme_mods() {
-	delete_option( 'theme_mods_' . get_option( 'stylesheet' ) );
-
-	// Old style.
-	$theme_name = get_option( 'current_theme' );
-	if ( false === $theme_name )
-		$theme_name = wp_get_theme()->get('Name');
-	delete_option( 'mods_' . $theme_name );
-}
-
-/**
- * Retrieves the custom header text color in HEX format.
- *
- * @since 2.1.0
- *
- * @return string Header text color in HEX format (minus the hash symbol).
- */
-function get_header_textcolor() {
-	return get_theme_mod('header_textcolor', get_theme_support( 'custom-header', 'default-text-color' ) );
-}
-
-/**
- * Displays the custom header text color in HEX format (minus the hash symbol).
- *
- * @since 2.1.0
- */
-function header_textcolor() {
-	echo get_header_textcolor();
-}
-
-/**
- * Whether to display the header text.
- *
- * @since 3.4.0
- *
- * @return bool
- */
-function display_header_text() {
-	if ( ! current_theme_supports( 'custom-header', 'header-text' ) )
-		return false;
-
-	$text_color = get_theme_mod( 'header_textcolor', get_theme_support( 'custom-header', 'default-text-color' ) );
-	return 'blank' !== $text_color;
-}
-
-/**
- * Check whether a header image is set or not.
- *
- * @since 4.2.0
- *
- * @see get_header_image()
- *
- * @return bool Whether a header image is set or not.
- */
-function has_header_image() {
-	return (bool) get_header_image();
-}
-
-/**
- * Retrieve header image for custom header.
- *
- * @since 2.1.0
- *
- * @return string|false
- */
-function get_header_image() {
-	$url = get_theme_mod( 'header_image', get_theme_support( 'custom-header', 'default-image' ) );
-
-	if ( 'remove-header' == $url )
-		return false;
-
-	if ( is_random_header_image() )
-		$url = get_random_header_image();
-
-	return esc_url_raw( set_url_scheme( $url ) );
-}
-
-/**
- * Create image tag markup for a custom header image.
- *
- * @since 4.4.0
- *
- * @param array $attr Optional. Additional attributes for the image tag. Can be used
- *                              to override the default attributes. Default empty.
- * @return string HTML image element markup or empty string on failure.
- */
-function get_header_image_tag( $attr = array() ) {
-	$header = get_custom_header();
-
-	if ( empty( $header->url ) ) {
-		return '';
-	}
-
-	$width = absint( $header->width );
-	$height = absint( $header->height );
-
-	$attr = wp_parse_args(
-		$attr,
-		array(
-			'src' => $header->url,
-			'width' => $width,
-			'height' => $height,
-			'alt' => get_bloginfo( 'name' ),
-		)
-	);
-
-	// Generate 'srcset' and 'sizes' if not already present.
-	if ( empty( $attr['srcset'] ) && ! empty( $header->attachment_id ) ) {
-		$image_meta = get_post_meta( $header->attachment_id, '_wp_attachment_metadata', true );
-		$size_array = array( $width, $height );
-
-		if ( is_array( $image_meta ) ) {
-			$srcset = wp_calculate_image_srcset( $size_array, $header->url, $image_meta, $header->attachment_id );
-			$sizes = ! empty( $attr['sizes'] ) ? $attr['sizes'] : wp_calculate_image_sizes( $size_array, $header->url, $image_meta, $header->attachment_id );
-
-			if ( $srcset && $sizes ) {
-				$attr['srcset'] = $srcset;
-				$attr['sizes'] = $sizes;
-			}
-		}
-	}
-
-	$attr = array_map( 'esc_attr', $attr );
-	$html = '<img';
-
-	foreach ( $attr as $name => $value ) {
-		$html .= ' ' . $name . '="' . $value . '"';
-	}
-
-	$html .= ' />';
-
-	/**
-	 * Filters the markup of header images.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param string $html   The HTML image tag markup being filtered.
-	 * @param object $header The custom header object returned by 'get_custom_header()'.
-	 * @param array  $attr   Array of the attributes for the image tag.
-	 */
-	return apply_filters( 'get_header_image_tag', $html, $header, $attr );
-}
-
-/**
- * Display the image markup for a custom header image.
- *
- * @since 4.4.0
- *
- * @param array $attr Optional. Attributes for the image markup. Default empty.
- */
-function the_header_image_tag( $attr = array() ) {
-	echo get_header_image_tag( $attr );
-}
-
-/**
- * Get random header image data from registered images in theme.
- *
- * @since 3.4.0
- *
- * @access private
- *
- * @global array  $_wp_default_headers
- * @staticvar object $_wp_random_header
- *
- * @return object
- */
-function _get_random_header_data() {
-	static $_wp_random_header = null;
-
-	if ( empty( $_wp_random_header ) ) {
-		global $_wp_default_headers;
-		$header_image_mod = get_theme_mod( 'header_image', '' );
-		$headers = array();
-
-		if ( 'random-uploaded-image' == $header_image_mod )
-			$headers = get_uploaded_header_images();
-		elseif ( ! empty( $_wp_default_headers ) ) {
-			if ( 'random-default-image' == $header_image_mod ) {
-				$headers = $_wp_default_headers;
-			} else {
-				if ( current_theme_supports( 'custom-header', 'random-default' ) )
-					$headers = $_wp_default_headers;
-			}
-		}
-
-		if ( empty( $headers ) )
-			return new stdClass;
-
-		$_wp_random_header = (object) $headers[ array_rand( $headers ) ];
-
-		$_wp_random_header->url =  sprintf( $_wp_random_header->url, get_template_directory_uri(), get_stylesheet_directory_uri() );
-		$_wp_random_header->thumbnail_url =  sprintf( $_wp_random_header->thumbnail_url, get_template_directory_uri(), get_stylesheet_directory_uri() );
-	}
-	return $_wp_random_header;
-}
-
-/**
- * Get random header image url from registered images in theme.
- *
- * @since 3.2.0
- *
- * @return string Path to header image
- */
-function get_random_header_image() {
-	$random_image = _get_random_header_data();
-	if ( empty( $random_image->url ) )
-		return '';
-	return $random_image->url;
-}
-
-/**
- * Check if random header image is in use.
- *
- * Always true if user expressly chooses the option in Appearance > Header.
- * Also true if theme has multiple header images registered, no specific header image
- * is chosen, and theme turns on random headers with add_theme_support().
- *
- * @since 3.2.0
- *
- * @param string $type The random pool to use. any|default|uploaded
- * @return bool
- */
-function is_random_header_image( $type = 'any' ) {
-	$header_image_mod = get_theme_mod( 'header_image', get_theme_support( 'custom-header', 'default-image' ) );
-
-	if ( 'any' == $type ) {
-		if ( 'random-default-image' == $header_image_mod || 'random-uploaded-image' == $header_image_mod || ( '' != get_random_header_image() && empty( $header_image_mod ) ) )
-			return true;
-	} else {
-		if ( "random-$type-image" == $header_image_mod )
-			return true;
-		elseif ( 'default' == $type && empty( $header_image_mod ) && '' != get_random_header_image() )
-			return true;
-	}
-
-	return false;
-}
-
-/**
- * Display header image URL.
- *
- * @since 2.1.0
- */
-function header_image() {
-	$image = get_header_image();
-	if ( $image ) {
-		echo esc_url( $image );
-	}
-}
-
-/**
- * Get the header images uploaded for the current theme.
- *
- * @since 3.2.0
- *
- * @return array
- */
-function get_uploaded_header_images() {
-	$header_images = array();
-
-	// @todo caching
-	$headers = get_posts( array( 'post_type' => 'attachment', 'meta_key' => '_wp_attachment_is_custom_header', 'meta_value' => get_option('stylesheet'), 'orderby' => 'none', 'nopaging' => true ) );
-
-	if ( empty( $headers ) )
-		return array();
-
-	foreach ( (array) $headers as $header ) {
-		$url = esc_url_raw( wp_get_attachment_url( $header->ID ) );
-		$header_data = wp_get_attachment_metadata( $header->ID );
-		$header_index = $header->ID;
-
-		$header_images[$header_index] = array();
-		$header_images[$header_index]['attachment_id'] = $header->ID;
-		$header_images[$header_index]['url'] =  $url;
-		$header_images[$header_index]['thumbnail_url'] = $url;
-		$header_images[$header_index]['alt_text'] = get_post_meta( $header->ID, '_wp_attachment_image_alt', true );
-
-		if ( isset( $header_data['width'] ) )
-			$header_images[$header_index]['width'] = $header_data['width'];
-		if ( isset( $header_data['height'] ) )
-			$header_images[$header_index]['height'] = $header_data['height'];
-	}
-
-	return $header_images;
-}
-
-/**
- * Get the header image data.
- *
- * @since 3.4.0
- *
- * @global array $_wp_default_headers
- *
- * @return object
- */
-function get_custom_header() {
-	global $_wp_default_headers;
-
-	if ( is_random_header_image() ) {
-		$data = _get_random_header_data();
-	} else {
-		$data = get_theme_mod( 'header_image_data' );
-		if ( ! $data && current_theme_supports( 'custom-header', 'default-image' ) ) {
-			$directory_args = array( get_template_directory_uri(), get_stylesheet_directory_uri() );
-			$data = array();
-			$data['url'] = $data['thumbnail_url'] = vsprintf( get_theme_support( 'custom-header', 'default-image' ), $directory_args );
-			if ( ! empty( $_wp_default_headers ) ) {
-				foreach ( (array) $_wp_default_headers as $default_header ) {
-					$url = vsprintf( $default_header['url'], $directory_args );
-					if ( $data['url'] == $url ) {
-						$data = $default_header;
-						$data['url'] = $url;
-						$data['thumbnail_url'] = vsprintf( $data['thumbnail_url'], $directory_args );
-						break;
-					}
-				}
-			}
-		}
-	}
-
-	$default = array(
-		'url'           => '',
-		'thumbnail_url' => '',
-		'width'         => get_theme_support( 'custom-header', 'width' ),
-		'height'        => get_theme_support( 'custom-header', 'height' ),
-	);
-	return (object) wp_parse_args( $data, $default );
-}
-
-/**
- * Register a selection of default headers to be displayed by the custom header admin UI.
- *
- * @since 3.0.0
- *
- * @global array $_wp_default_headers
- *
- * @param array $headers Array of headers keyed by a string id. The ids point to arrays containing 'url', 'thumbnail_url', and 'description' keys.
- */
-function register_default_headers( $headers ) {
-	global $_wp_default_headers;
-
-	$_wp_default_headers = array_merge( (array) $_wp_default_headers, (array) $headers );
-}
-
-/**
- * Unregister default headers.
- *
- * This function must be called after register_default_headers() has already added the
- * header you want to remove.
- *
- * @see register_default_headers()
- * @since 3.0.0
- *
- * @global array $_wp_default_headers
- *
- * @param string|array $header The header string id (key of array) to remove, or an array thereof.
- * @return bool|void A single header returns true on success, false on failure.
- *                   There is currently no return value for multiple headers.
- */
-function unregister_default_headers( $header ) {
-	global $_wp_default_headers;
-	if ( is_array( $header ) ) {
-		array_map( 'unregister_default_headers', $header );
-	} elseif ( isset( $_wp_default_headers[ $header ] ) ) {
-		unset( $_wp_default_headers[ $header ] );
-		return true;
-	} else {
-		return false;
-	}
-}
-
-/**
- * Retrieve background image for custom background.
- *
- * @since 3.0.0
- *
- * @return string
- */
-function get_background_image() {
-	return get_theme_mod('background_image', get_theme_support( 'custom-background', 'default-image' ) );
-}
-
-/**
- * Display background image path.
- *
- * @since 3.0.0
- */
-function background_image() {
-	echo get_background_image();
-}
-
-/**
- * Retrieve value for custom background color.
- *
- * @since 3.0.0
- *
- * @return string
- */
-function get_background_color() {
-	return get_theme_mod('background_color', get_theme_support( 'custom-background', 'default-color' ) );
-}
-
-/**
- * Display background color value.
- *
- * @since 3.0.0
- */
-function background_color() {
-	echo get_background_color();
-}
-
-/**
- * Default custom background callback.
- *
- * @since 3.0.0
- * @access protected
- */
-function _custom_background_cb() {
-	// $background is the saved custom image, or the default image.
-	$background = set_url_scheme( get_background_image() );
-
-	// $color is the saved custom color.
-	// A default has to be specified in style.css. It will not be printed here.
-	$color = get_background_color();
-
-	if ( $color === get_theme_support( 'custom-background', 'default-color' ) ) {
-		$color = false;
-	}
-
-	if ( ! $background && ! $color )
-		return;
-
-	$style = $color ? "background-color: #$color;" : '';
-
-	if ( $background ) {
-		$image = " background-image: url('$background');";
-
-		$repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) );
-		if ( ! in_array( $repeat, array( 'no-repeat', 'repeat-x', 'repeat-y', 'repeat' ) ) )
-			$repeat = 'repeat';
-		$repeat = " background-repeat: $repeat;";
-
-		$position = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) );
-		if ( ! in_array( $position, array( 'center', 'right', 'left' ) ) )
-			$position = 'left';
-		$position = " background-position: top $position;";
-
-		$attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) );
-		if ( ! in_array( $attachment, array( 'fixed', 'scroll' ) ) )
-			$attachment = 'scroll';
-		$attachment = " background-attachment: $attachment;";
-
-		$style .= $image . $repeat . $position . $attachment;
-	}
-?>
-<style type="text/css" id="custom-background-css">
-body.custom-background { <?php echo trim( $style ); ?> }
-</style>
-<?php
-}
-
-/**
- * Add callback for custom TinyMCE editor stylesheets.
- *
- * The parameter $stylesheet is the name of the stylesheet, relative to
- * the theme root. It also accepts an array of stylesheets.
- * It is optional and defaults to 'editor-style.css'.
- *
- * This function automatically adds another stylesheet with -rtl prefix, e.g. editor-style-rtl.css.
- * If that file doesn't exist, it is removed before adding the stylesheet(s) to TinyMCE.
- * If an array of stylesheets is passed to add_editor_style(),
- * RTL is only added for the first stylesheet.
- *
- * Since version 3.4 the TinyMCE body has .rtl CSS class.
- * It is a better option to use that class and add any RTL styles to the main stylesheet.
- *
- * @since 3.0.0
- *
- * @global array $editor_styles
- *
- * @param array|string $stylesheet Optional. Stylesheet name or array thereof, relative to theme root.
- * 	                               Defaults to 'editor-style.css'
- */
-function add_editor_style( $stylesheet = 'editor-style.css' ) {
-	add_theme_support( 'editor-style' );
-
-	if ( ! is_admin() )
-		return;
-
-	global $editor_styles;
-	$editor_styles = (array) $editor_styles;
-	$stylesheet    = (array) $stylesheet;
-	if ( is_rtl() ) {
-		$rtl_stylesheet = str_replace('.css', '-rtl.css', $stylesheet[0]);
-		$stylesheet[] = $rtl_stylesheet;
-	}
-
-	$editor_styles = array_merge( $editor_styles, $stylesheet );
-}
-
-/**
- * Removes all visual editor stylesheets.
- *
- * @since 3.1.0
- *
- * @global array $editor_styles
- *
- * @return bool True on success, false if there were no stylesheets to remove.
- */
-function remove_editor_styles() {
-	if ( ! current_theme_supports( 'editor-style' ) )
-		return false;
-	_remove_theme_support( 'editor-style' );
-	if ( is_admin() )
-		$GLOBALS['editor_styles'] = array();
-	return true;
-}
-
-/**
- * Retrieve any registered editor stylesheets
- *
- * @since 4.0.0
- *
- * @global array $editor_styles Registered editor stylesheets
- *
- * @return array If registered, a list of editor stylesheet URLs.
- */
-function get_editor_stylesheets() {
-	$stylesheets = array();
-	// load editor_style.css if the current theme supports it
-	if ( ! empty( $GLOBALS['editor_styles'] ) && is_array( $GLOBALS['editor_styles'] ) ) {
-		$editor_styles = $GLOBALS['editor_styles'];
-
-		$editor_styles = array_unique( array_filter( $editor_styles ) );
-		$style_uri = get_stylesheet_directory_uri();
-		$style_dir = get_stylesheet_directory();
-
-		// Support externally referenced styles (like, say, fonts).
-		foreach ( $editor_styles as $key => $file ) {
-			if ( preg_match( '~^(https?:)?//~', $file ) ) {
-				$stylesheets[] = esc_url_raw( $file );
-				unset( $editor_styles[ $key ] );
-			}
-		}
-
-		// Look in a parent theme first, that way child theme CSS overrides.
-		if ( is_child_theme() ) {
-			$template_uri = get_template_directory_uri();
-			$template_dir = get_template_directory();
-
-			foreach ( $editor_styles as $key => $file ) {
-				if ( $file && file_exists( "$template_dir/$file" ) ) {
-					$stylesheets[] = "$template_uri/$file";
-				}
-			}
-		}
-
-		foreach ( $editor_styles as $file ) {
-			if ( $file && file_exists( "$style_dir/$file" ) ) {
-				$stylesheets[] = "$style_uri/$file";
-			}
-		}
-	}
-
-	/**
-	 * Filters the array of stylesheets applied to the editor.
-	 *
-	 * @since 4.3.0
-	 *
-	 * @param array $stylesheets Array of stylesheets to be applied to the editor.
-	 */
-	return apply_filters( 'editor_stylesheets', $stylesheets );
-}
-
-/**
- * Registers theme support for a given feature.
- *
- * Must be called in the theme's functions.php file to work.
- * If attached to a hook, it must be {@see 'after_setup_theme'}.
- * The {@see 'init'} hook may be too late for some features.
- *
- * @since 2.9.0
- * @since 3.6.0 The `html5` feature was added
- * @since 3.9.0 The `html5` feature now also accepts 'gallery' and 'caption'
- * @since 4.1.0 The `title-tag` feature was added
- * @since 4.5.0 The `customize-selective-refresh-widgets` feature was added
- *
- * @global array $_wp_theme_features
- *
- * @param string $feature  The feature being added. Likely core values include 'post-formats',
- *                         'post-thumbnails', 'html5', 'custom-logo', 'custom-header-uploads',
- *                         'custom-header', 'custom-background', 'title-tag', etc.
- * @param mixed  $args,... Optional extra arguments to pass along with certain features.
- * @return void|bool False on failure, void otherwise.
- */
-function add_theme_support( $feature ) {
-	global $_wp_theme_features;
-
-	if ( func_num_args() == 1 )
-		$args = true;
-	else
-		$args = array_slice( func_get_args(), 1 );
-
-	switch ( $feature ) {
-		case 'post-thumbnails':
-			// All post types are already supported.
-			if ( true === get_theme_support( 'post-thumbnails' ) ) {
-				return;
-			}
-
-			/*
-			 * Merge post types with any that already declared their support
-			 * for post thumbnails.
-			 */
-			if ( is_array( $args[0] ) && isset( $_wp_theme_features['post-thumbnails'] ) ) {
-				$args[0] = array_unique( array_merge( $_wp_theme_features['post-thumbnails'][0], $args[0] ) );
-			}
-
-			break;
-
-		case 'post-formats' :
-			if ( is_array( $args[0] ) ) {
-				$post_formats = get_post_format_slugs();
-				unset( $post_formats['standard'] );
-
-				$args[0] = array_intersect( $args[0], array_keys( $post_formats ) );
-			}
-			break;
-
-		case 'html5' :
-			// You can't just pass 'html5', you need to pass an array of types.
-			if ( empty( $args[0] ) ) {
-				// Build an array of types for back-compat.
-				$args = array( 0 => array( 'comment-list', 'comment-form', 'search-form' ) );
-			} elseif ( ! is_array( $args[0] ) ) {
-				_doing_it_wrong( "add_theme_support( 'html5' )", __( 'You need to pass an array of types.' ), '3.6.1' );
-				return false;
-			}
-
-			// Calling 'html5' again merges, rather than overwrites.
-			if ( isset( $_wp_theme_features['html5'] ) )
-				$args[0] = array_merge( $_wp_theme_features['html5'][0], $args[0] );
-			break;
-
-		case 'custom-logo':
-			if ( ! is_array( $args ) ) {
-				$args = array( 0 => array() );
-			}
-			$defaults = array(
-				'width'       => null,
-				'height'      => null,
-				'flex-width'  => false,
-				'flex-height' => false,
-				'header-text' => '',
-			);
-			$args[0] = wp_parse_args( array_intersect_key( $args[0], $defaults ), $defaults );
-
-			// Allow full flexibility if no size is specified.
-			if ( is_null( $args[0]['width'] ) && is_null( $args[0]['height'] ) ) {
-				$args[0]['flex-width']  = true;
-				$args[0]['flex-height'] = true;
-			}
-			break;
-
-		case 'custom-header-uploads' :
-			return add_theme_support( 'custom-header', array( 'uploads' => true ) );
-
-		case 'custom-header' :
-			if ( ! is_array( $args ) )
-				$args = array( 0 => array() );
-
-			$defaults = array(
-				'default-image' => '',
-				'random-default' => false,
-				'width' => 0,
-				'height' => 0,
-				'flex-height' => false,
-				'flex-width' => false,
-				'default-text-color' => '',
-				'header-text' => true,
-				'uploads' => true,
-				'wp-head-callback' => '',
-				'admin-head-callback' => '',
-				'admin-preview-callback' => '',
-			);
-
-			$jit = isset( $args[0]['__jit'] );
-			unset( $args[0]['__jit'] );
-
-			// Merge in data from previous add_theme_support() calls.
-			// The first value registered wins. (A child theme is set up first.)
-			if ( isset( $_wp_theme_features['custom-header'] ) )
-				$args[0] = wp_parse_args( $_wp_theme_features['custom-header'][0], $args[0] );
-
-			// Load in the defaults at the end, as we need to insure first one wins.
-			// This will cause all constants to be defined, as each arg will then be set to the default.
-			if ( $jit )
-				$args[0] = wp_parse_args( $args[0], $defaults );
-
-			// If a constant was defined, use that value. Otherwise, define the constant to ensure
-			// the constant is always accurate (and is not defined later,  overriding our value).
-			// As stated above, the first value wins.
-			// Once we get to wp_loaded (just-in-time), define any constants we haven't already.
-			// Constants are lame. Don't reference them. This is just for backward compatibility.
-
-			if ( defined( 'NO_HEADER_TEXT' ) )
-				$args[0]['header-text'] = ! NO_HEADER_TEXT;
-			elseif ( isset( $args[0]['header-text'] ) )
-				define( 'NO_HEADER_TEXT', empty( $args[0]['header-text'] ) );
-
-			if ( defined( 'HEADER_IMAGE_WIDTH' ) )
-				$args[0]['width'] = (int) HEADER_IMAGE_WIDTH;
-			elseif ( isset( $args[0]['width'] ) )
-				define( 'HEADER_IMAGE_WIDTH', (int) $args[0]['width'] );
-
-			if ( defined( 'HEADER_IMAGE_HEIGHT' ) )
-				$args[0]['height'] = (int) HEADER_IMAGE_HEIGHT;
-			elseif ( isset( $args[0]['height'] ) )
-				define( 'HEADER_IMAGE_HEIGHT', (int) $args[0]['height'] );
-
-			if ( defined( 'HEADER_TEXTCOLOR' ) )
-				$args[0]['default-text-color'] = HEADER_TEXTCOLOR;
-			elseif ( isset( $args[0]['default-text-color'] ) )
-				define( 'HEADER_TEXTCOLOR', $args[0]['default-text-color'] );
-
-			if ( defined( 'HEADER_IMAGE' ) )
-				$args[0]['default-image'] = HEADER_IMAGE;
-			elseif ( isset( $args[0]['default-image'] ) )
-				define( 'HEADER_IMAGE', $args[0]['default-image'] );
-
-			if ( $jit && ! empty( $args[0]['default-image'] ) )
-				$args[0]['random-default'] = false;
-
-			// If headers are supported, and we still don't have a defined width or height,
-			// we have implicit flex sizes.
-			if ( $jit ) {
-				if ( empty( $args[0]['width'] ) && empty( $args[0]['flex-width'] ) )
-					$args[0]['flex-width'] = true;
-				if ( empty( $args[0]['height'] ) && empty( $args[0]['flex-height'] ) )
-					$args[0]['flex-height'] = true;
-			}
-
-			break;
-
-		case 'custom-background' :
-			if ( ! is_array( $args ) )
-				$args = array( 0 => array() );
-
-			$defaults = array(
-				'default-image'          => '',
-				'default-repeat'         => 'repeat',
-				'default-position-x'     => 'left',
-				'default-attachment'     => 'scroll',
-				'default-color'          => '',
-				'wp-head-callback'       => '_custom_background_cb',
-				'admin-head-callback'    => '',
-				'admin-preview-callback' => '',
-			);
-
-			$jit = isset( $args[0]['__jit'] );
-			unset( $args[0]['__jit'] );
-
-			// Merge in data from previous add_theme_support() calls. The first value registered wins.
-			if ( isset( $_wp_theme_features['custom-background'] ) )
-				$args[0] = wp_parse_args( $_wp_theme_features['custom-background'][0], $args[0] );
-
-			if ( $jit )
-				$args[0] = wp_parse_args( $args[0], $defaults );
-
-			if ( defined( 'BACKGROUND_COLOR' ) )
-				$args[0]['default-color'] = BACKGROUND_COLOR;
-			elseif ( isset( $args[0]['default-color'] ) || $jit )
-				define( 'BACKGROUND_COLOR', $args[0]['default-color'] );
-
-			if ( defined( 'BACKGROUND_IMAGE' ) )
-				$args[0]['default-image'] = BACKGROUND_IMAGE;
-			elseif ( isset( $args[0]['default-image'] ) || $jit )
-				define( 'BACKGROUND_IMAGE', $args[0]['default-image'] );
-
-			break;
-
-		// Ensure that 'title-tag' is accessible in the admin.
-		case 'title-tag' :
-			// Can be called in functions.php but must happen before wp_loaded, i.e. not in header.php.
-			if ( did_action( 'wp_loaded' ) ) {
-				/* translators: 1: Theme support 2: hook name */
-				_doing_it_wrong( "add_theme_support( 'title-tag' )", sprintf( __( 'Theme support for %1$s should be registered before the %2$s hook.' ),
-					'<code>title-tag</code>', '<code>wp_loaded</code>' ), '4.1.0' );
-
-				return false;
-			}
-	}
-
-	$_wp_theme_features[ $feature ] = $args;
-}
-
-/**
- * Registers the internal custom header and background routines.
- *
- * @since 3.4.0
- * @access private
- *
- * @global Custom_Image_Header $custom_image_header
- * @global Custom_Background   $custom_background
- */
-function _custom_header_background_just_in_time() {
-	global $custom_image_header, $custom_background;
-
-	if ( current_theme_supports( 'custom-header' ) ) {
-		// In case any constants were defined after an add_custom_image_header() call, re-run.
-		add_theme_support( 'custom-header', array( '__jit' => true ) );
-
-		$args = get_theme_support( 'custom-header' );
-		if ( $args[0]['wp-head-callback'] )
-			add_action( 'wp_head', $args[0]['wp-head-callback'] );
-
-		if ( is_admin() ) {
-			require_once( ABSPATH . 'wp-admin/custom-header.php' );
-			$custom_image_header = new Custom_Image_Header( $args[0]['admin-head-callback'], $args[0]['admin-preview-callback'] );
-		}
-	}
-
-	if ( current_theme_supports( 'custom-background' ) ) {
-		// In case any constants were defined after an add_custom_background() call, re-run.
-		add_theme_support( 'custom-background', array( '__jit' => true ) );
-
-		$args = get_theme_support( 'custom-background' );
-		add_action( 'wp_head', $args[0]['wp-head-callback'] );
-
-		if ( is_admin() ) {
-			require_once( ABSPATH . 'wp-admin/custom-background.php' );
-			$custom_background = new Custom_Background( $args[0]['admin-head-callback'], $args[0]['admin-preview-callback'] );
-		}
-	}
-}
-
-/**
- * Adds CSS to hide header text for custom logo, based on Customizer setting.
- *
- * @since 4.5.0
- * @access private
- */
-function _custom_logo_header_styles() {
-	if ( ! current_theme_supports( 'custom-header', 'header-text' ) && get_theme_support( 'custom-logo', 'header-text' ) && ! get_theme_mod( 'header_text', true ) ) {
-		$classes = (array) get_theme_support( 'custom-logo', 'header-text' );
-		$classes = array_map( 'sanitize_html_class', $classes );
-		$classes = '.' . implode( ', .', $classes );
-
-		?>
-		<!-- Custom Logo: hide header text -->
-		<style id="custom-logo-css" type="text/css">
-			<?php echo $classes; ?> {
-				position: absolute;
-				clip: rect(1px, 1px, 1px, 1px);
-			}
-		</style>
-	<?php
-	}
-}
-
-/**
- * Gets the theme support arguments passed when registering that support
- *
- * @since 3.1.0
- *
- * @global array $_wp_theme_features
- *
- * @param string $feature the feature to check
- * @return mixed The array of extra arguments or the value for the registered feature.
- */
-function get_theme_support( $feature ) {
-	global $_wp_theme_features;
-	if ( ! isset( $_wp_theme_features[ $feature ] ) )
-		return false;
-
-	if ( func_num_args() <= 1 )
-		return $_wp_theme_features[ $feature ];
-
-	$args = array_slice( func_get_args(), 1 );
-	switch ( $feature ) {
-		case 'custom-logo' :
-		case 'custom-header' :
-		case 'custom-background' :
-			if ( isset( $_wp_theme_features[ $feature ][0][ $args[0] ] ) )
-				return $_wp_theme_features[ $feature ][0][ $args[0] ];
-			return false;
-
-		default :
-			return $_wp_theme_features[ $feature ];
-	}
-}
-
-/**
- * Allows a theme to de-register its support of a certain feature
- *
- * Should be called in the theme's functions.php file. Generally would
- * be used for child themes to override support from the parent theme.
- *
- * @since 3.0.0
- * @see add_theme_support()
- * @param string $feature the feature being added
- * @return bool|void Whether feature was removed.
- */
-function remove_theme_support( $feature ) {
-	// Blacklist: for internal registrations not used directly by themes.
-	if ( in_array( $feature, array( 'editor-style', 'widgets', 'menus' ) ) )
-		return false;
-
-	return _remove_theme_support( $feature );
-}
-
-/**
- * Do not use. Removes theme support internally, ignorant of the blacklist.
- *
- * @access private
- * @since 3.1.0
- *
- * @global array               $_wp_theme_features
- * @global Custom_Image_Header $custom_image_header
- * @global Custom_Background   $custom_background
- *
- * @param string $feature
- */
-function _remove_theme_support( $feature ) {
-	global $_wp_theme_features;
-
-	switch ( $feature ) {
-		case 'custom-header-uploads' :
-			if ( ! isset( $_wp_theme_features['custom-header'] ) )
-				return false;
-			add_theme_support( 'custom-header', array( 'uploads' => false ) );
-			return; // Do not continue - custom-header-uploads no longer exists.
-	}
-
-	if ( ! isset( $_wp_theme_features[ $feature ] ) )
-		return false;
-
-	switch ( $feature ) {
-		case 'custom-header' :
-			if ( ! did_action( 'wp_loaded' ) )
-				break;
-			$support = get_theme_support( 'custom-header' );
-			if ( $support[0]['wp-head-callback'] )
-				remove_action( 'wp_head', $support[0]['wp-head-callback'] );
-			remove_action( 'admin_menu', array( $GLOBALS['custom_image_header'], 'init' ) );
-			unset( $GLOBALS['custom_image_header'] );
-			break;
-
-		case 'custom-background' :
-			if ( ! did_action( 'wp_loaded' ) )
-				break;
-			$support = get_theme_support( 'custom-background' );
-			remove_action( 'wp_head', $support[0]['wp-head-callback'] );
-			remove_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) );
-			unset( $GLOBALS['custom_background'] );
-			break;
-	}
-
-	unset( $_wp_theme_features[ $feature ] );
-	return true;
-}
-
-/**
- * Checks a theme's support for a given feature
- *
- * @since 2.9.0
- *
- * @global array $_wp_theme_features
- *
- * @param string $feature the feature being checked
- * @return bool
- */
-function current_theme_supports( $feature ) {
-	global $_wp_theme_features;
-
-	if ( 'custom-header-uploads' == $feature )
-		return current_theme_supports( 'custom-header', 'uploads' );
-
-	if ( !isset( $_wp_theme_features[$feature] ) )
-		return false;
-
-	// If no args passed then no extra checks need be performed
-	if ( func_num_args() <= 1 )
-		return true;
-
-	$args = array_slice( func_get_args(), 1 );
-
-	switch ( $feature ) {
-		case 'post-thumbnails':
-			// post-thumbnails can be registered for only certain content/post types by passing
-			// an array of types to add_theme_support(). If no array was passed, then
-			// any type is accepted
-			if ( true === $_wp_theme_features[$feature] )  // Registered for all types
-				return true;
-			$content_type = $args[0];
-			return in_array( $content_type, $_wp_theme_features[$feature][0] );
-
-		case 'html5':
-		case 'post-formats':
-			// specific post formats can be registered by passing an array of types to
-			// add_theme_support()
-
-			// Specific areas of HTML5 support *must* be passed via an array to add_theme_support()
-
-			$type = $args[0];
-			return in_array( $type, $_wp_theme_features[$feature][0] );
-
-		case 'custom-logo':
-		case 'custom-header':
-		case 'custom-background':
-			// Specific capabilities can be registered by passing an array to add_theme_support().
-			return ( isset( $_wp_theme_features[ $feature ][0][ $args[0] ] ) && $_wp_theme_features[ $feature ][0][ $args[0] ] );
-	}
-
-	/**
-	 * Filters whether the current theme supports a specific feature.
-	 *
-	 * The dynamic portion of the hook name, `$feature`, refers to the specific theme
-	 * feature. Possible values include 'post-formats', 'post-thumbnails', 'custom-background',
-	 * 'custom-header', 'menus', 'automatic-feed-links', 'html5', and `customize-selective-refresh-widgets`.
-	 *
-	 * @since 3.4.0
-	 *
-	 * @param bool   true     Whether the current theme supports the given feature. Default true.
-	 * @param array  $args    Array of arguments for the feature.
-	 * @param string $feature The theme feature.
-	 */
-	return apply_filters( "current_theme_supports-{$feature}", true, $args, $_wp_theme_features[$feature] );
-}
-
-/**
- * Checks a theme's support for a given feature before loading the functions which implement it.
- *
- * @since 2.9.0
- *
- * @param string $feature The feature being checked.
- * @param string $include Path to the file.
- * @return bool True if the current theme supports the supplied feature, false otherwise.
- */
-function require_if_theme_supports( $feature, $include ) {
-	if ( current_theme_supports( $feature ) ) {
-		require ( $include );
-		return true;
-	}
-	return false;
-}
-
-/**
- * Checks an attachment being deleted to see if it's a header or background image.
- *
- * If true it removes the theme modification which would be pointing at the deleted
- * attachment.
- *
- * @access private
- * @since 3.0.0
- * @since 4.3.0 Also removes `header_image_data`.
- * @since 4.5.0 Also removes custom logo theme mods.
- *
- * @param int $id The attachment id.
- */
-function _delete_attachment_theme_mod( $id ) {
-	$attachment_image = wp_get_attachment_url( $id );
-	$header_image     = get_header_image();
-	$background_image = get_background_image();
-	$custom_logo_id   = get_theme_mod( 'custom_logo' );
-
-	if ( $custom_logo_id && $custom_logo_id == $id ) {
-		remove_theme_mod( 'custom_logo' );
-		remove_theme_mod( 'header_text' );
-	}
-
-	if ( $header_image && $header_image == $attachment_image ) {
-		remove_theme_mod( 'header_image' );
-		remove_theme_mod( 'header_image_data' );
-	}
-
-	if ( $background_image && $background_image == $attachment_image ) {
-		remove_theme_mod( 'background_image' );
-	}
-}
-
-/**
- * Checks if a theme has been changed and runs 'after_switch_theme' hook on the next WP load.
- *
- * See {@see 'after_switch_theme'}.
- *
- * @since 3.3.0
- */
-function check_theme_switched() {
-	if ( $stylesheet = get_option( 'theme_switched' ) ) {
-		$old_theme = wp_get_theme( $stylesheet );
-
-		// Prevent retrieve_widgets() from running since Customizer already called it up front
-		if ( get_option( 'theme_switched_via_customizer' ) ) {
-			remove_action( 'after_switch_theme', '_wp_sidebars_changed' );
-			update_option( 'theme_switched_via_customizer', false );
-		}
-
-		if ( $old_theme->exists() ) {
-			/**
-			 * Fires on the first WP load after a theme switch if the old theme still exists.
-			 *
-			 * This action fires multiple times and the parameters differs
-			 * according to the context, if the old theme exists or not.
-			 * If the old theme is missing, the parameter will be the slug
-			 * of the old theme.
-			 *
-			 * @since 3.3.0
-			 *
-			 * @param string   $old_name  Old theme name.
-			 * @param WP_Theme $old_theme WP_Theme instance of the old theme.
-			 */
-			do_action( 'after_switch_theme', $old_theme->get( 'Name' ), $old_theme );
-		} else {
-			/** This action is documented in wp-includes/theme.php */
-			do_action( 'after_switch_theme', $stylesheet );
-		}
-		flush_rewrite_rules();
-
-		update_option( 'theme_switched', false );
-	}
-}
-
-/**
- * Includes and instantiates the WP_Customize_Manager class.
- *
- * Loads the Customizer at plugins_loaded when accessing the customize.php admin
- * page or when any request includes a wp_customize=on param, either as a GET
- * query var or as POST data. This param is a signal for whether to bootstrap
- * the Customizer when WordPress is loading, especially in the Customizer preview
- * or when making Customizer Ajax requests for widgets or menus.
- *
- * @since 3.4.0
- *
- * @global WP_Customize_Manager $wp_customize
- */
-function _wp_customize_include() {
-	if ( ! ( ( isset( $_REQUEST['wp_customize'] ) && 'on' == $_REQUEST['wp_customize'] )
-		|| ( is_admin() && 'customize.php' == basename( $_SERVER['PHP_SELF'] ) )
-	) ) {
-		return;
-	}
-
-	require_once ABSPATH . WPINC . '/class-wp-customize-manager.php'; 
-	$GLOBALS['wp_customize'] = new WP_Customize_Manager();
-}
-
-/**
- * Adds settings for the customize-loader script.
- *
- * @since 3.4.0
- */
-function _wp_customize_loader_settings() {
-	$admin_origin = parse_url( admin_url() );
-	$home_origin  = parse_url( home_url() );
-	$cross_domain = ( strtolower( $admin_origin[ 'host' ] ) != strtolower( $home_origin[ 'host' ] ) );
-
-	$browser = array(
-		'mobile' => wp_is_mobile(),
-		'ios'    => wp_is_mobile() && preg_match( '/iPad|iPod|iPhone/', $_SERVER['HTTP_USER_AGENT'] ),
-	);
-
-	$settings = array(
-		'url'           => esc_url( admin_url( 'customize.php' ) ),
-		'isCrossDomain' => $cross_domain,
-		'browser'       => $browser,
-		'l10n'          => array(
-			'saveAlert'       => __( 'The changes you made will be lost if you navigate away from this page.' ),
-			'mainIframeTitle' => __( 'Customizer' ),
-		),
-	);
-
-	$script = 'var _wpCustomizeLoaderSettings = ' . wp_json_encode( $settings ) . ';';
-
-	$wp_scripts = wp_scripts();
-	$data = $wp_scripts->get_data( 'customize-loader', 'data' );
-	if ( $data )
-		$script = "$data\n$script";
-
-	$wp_scripts->add_data( 'customize-loader', 'data', $script );
-}
-
-/**
- * Returns a URL to load the Customizer.
- *
- * @since 3.4.0
- *
- * @param string $stylesheet Optional. Theme to customize. Defaults to current theme.
- * 	                         The theme's stylesheet will be urlencoded if necessary.
- * @return string
- */
-function wp_customize_url( $stylesheet = null ) {
-	$url = admin_url( 'customize.php' );
-	if ( $stylesheet )
-		$url .= '?theme=' . urlencode( $stylesheet );
-	return esc_url( $url );
-}
-
-/**
- * Prints a script to check whether or not the Customizer is supported,
- * and apply either the no-customize-support or customize-support class
- * to the body.
- *
- * This function MUST be called inside the body tag.
- *
- * Ideally, call this function immediately after the body tag is opened.
- * This prevents a flash of unstyled content.
- *
- * It is also recommended that you add the "no-customize-support" class
- * to the body tag by default.
- *
- * @since 3.4.0
- */
-function wp_customize_support_script() {
-	$admin_origin = parse_url( admin_url() );
-	$home_origin  = parse_url( home_url() );
-	$cross_domain = ( strtolower( $admin_origin[ 'host' ] ) != strtolower( $home_origin[ 'host' ] ) );
-
-	?>
-	<script type="text/javascript">
-		(function() {
-			var request, b = document.body, c = 'className', cs = 'customize-support', rcs = new RegExp('(^|\\s+)(no-)?'+cs+'(\\s+|$)');
-
-<?php		if ( $cross_domain ): ?>
-			request = (function(){ var xhr = new XMLHttpRequest(); return ('withCredentials' in xhr); })();
-<?php		else: ?>
-			request = true;
-<?php		endif; ?>
-
-			b[c] = b[c].replace( rcs, ' ' );
-			b[c] += ( window.postMessage && request ? ' ' : ' no-' ) + cs;
-		}());
-	</script>
-	<?php
-}
-
-/**
- * Whether the site is being previewed in the Customizer.
- *
- * @since 4.0.0
- *
- * @global WP_Customize_Manager $wp_customize Customizer instance.
- *
- * @return bool True if the site is being previewed in the Customizer, false otherwise.
- */
-function is_customize_preview() {
-	global $wp_customize;
-
-	return ( $wp_customize instanceof WP_Customize_Manager ) && $wp_customize->is_preview();
-}
Index: www/wp-includes/Requests/Exception/HTTP/502.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/502.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_502.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/theme-editor.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/theme-editor.php	(revision 38565)
+++ www/wp-admin/theme-editor.php	(revision 38565)
@@ -1,298 +0,0 @@
-<?php
-/**
- * Theme editor administration panel.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-if ( is_multisite() && ! is_network_admin() ) {
-	wp_redirect( network_admin_url( 'theme-editor.php' ) );
-	exit();
-}
-
-if ( !current_user_can('edit_themes') )
-	wp_die('<p>'.__('Sorry, you are not allowed to edit templates for this site.').'</p>');
-
-$title = __("Edit Themes");
-$parent_file = 'themes.php';
-
-get_current_screen()->add_help_tab( array(
-'id'		=> 'overview',
-'title'		=> __('Overview'),
-'content'	=>
-	'<p>' . __('You can use the Theme Editor to edit the individual CSS and PHP files which make up your theme.') . '</p>
-	<p>' . __( 'Begin by choosing a theme to edit from the dropdown menu and clicking the Select button. A list then appears of the theme&#8217;s template files. Clicking once on any file name causes the file to appear in the large Editor box.' ) . '</p>
-	<p>' . __('For PHP files, you can use the Documentation dropdown to select from functions recognized in that file. Look Up takes you to a web page with reference material about that particular function.') . '</p>
-	<p id="newcontent-description">' . __( 'In the editing area the Tab key enters a tab character. To move below this area by pressing Tab, press the Esc key followed by the Tab key. In some cases the Esc key will need to be pressed twice before the Tab key will allow you to continue.' ) . '</p>
-	<p>' . __('After typing in your edits, click Update File.') . '</p>
-	<p>' . __('<strong>Advice:</strong> think very carefully about your site crashing if you are live-editing the theme currently in use.') . '</p>
-	<p>' . sprintf( __('Upgrading to a newer version of the same theme will override changes made here. To avoid this, consider creating a <a href="%s" target="_blank">child theme</a> instead.'), __('https://codex.wordpress.org/Child_Themes') ) . '</p>' .
-	( is_network_admin() ? '<p>' . __('Any edits to files from this screen will be reflected on all sites in the network.') . '</p>' : '' )
-) );
-
-get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Theme_Development" target="_blank">Documentation on Theme Development</a>') . '</p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Using_Themes" target="_blank">Documentation on Using Themes</a>') . '</p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Editing_Files" target="_blank">Documentation on Editing Files</a>') . '</p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Template_Tags" target="_blank">Documentation on Template Tags</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
-);
-
-wp_reset_vars( array( 'action', 'error', 'file', 'theme' ) );
-
-if ( $theme ) {
-	$stylesheet = $theme;
-} else {
-	$stylesheet = get_stylesheet();
-}
-
-$theme = wp_get_theme( $stylesheet );
-
-if ( ! $theme->exists() ) {
-	wp_die( __( 'The requested theme does not exist.' ) );
-}
-
-if ( $theme->errors() && 'theme_no_stylesheet' == $theme->errors()->get_error_code() ) {
-	wp_die( __( 'The requested theme does not exist.' ) . ' ' . $theme->errors()->get_error_message() );
-}
-
-$allowed_files = $style_files = array();
-$has_templates = false;
-$default_types = array( 'php', 'css' );
-
-/**
- * Filters the list of file types allowed for editing in the Theme editor.
- *
- * @since 4.4.0
- *
- * @param array    $default_types List of file types. Default types include 'php' and 'css'.
- * @param WP_Theme $theme         The current Theme object.
- */
-$file_types = apply_filters( 'wp_theme_editor_filetypes', $default_types, $theme );
-
-// Ensure that default types are still there.
-$file_types = array_unique( array_merge( $file_types, $default_types ) );
-
-foreach ( $file_types as $type ) {
-	switch ( $type ) {
-		case 'php':
-			$allowed_files += $theme->get_files( 'php', 1 );
-			$has_templates = ! empty( $allowed_files );
-			break;
-		case 'css':
-			$style_files = $theme->get_files( 'css' );
-			$allowed_files['style.css'] = $style_files['style.css'];
-			$allowed_files += $style_files;
-			break;
-		default:
-			$allowed_files += $theme->get_files( $type );
-			break;
-	}
-}
-
-if ( empty( $file ) ) {
-	$relative_file = 'style.css';
-	$file = $allowed_files['style.css'];
-} else {
-	$relative_file = $file;
-	$file = $theme->get_stylesheet_directory() . '/' . $relative_file;
-}
-
-validate_file_to_edit( $file, $allowed_files );
-$scrollto = isset( $_REQUEST['scrollto'] ) ? (int) $_REQUEST['scrollto'] : 0;
-
-switch( $action ) {
-case 'update':
-	check_admin_referer( 'edit-theme_' . $file . $stylesheet );
-	$newcontent = wp_unslash( $_POST['newcontent'] );
-	$location = 'theme-editor.php?file=' . urlencode( $relative_file ) . '&theme=' . urlencode( $stylesheet ) . '&scrollto=' . $scrollto;
-	if ( is_writeable( $file ) ) {
-		// is_writable() not always reliable, check return value. see comments @ https://secure.php.net/is_writable
-		$f = fopen( $file, 'w+' );
-		if ( $f !== false ) {
-			fwrite( $f, $newcontent );
-			fclose( $f );
-			$location .= '&updated=true';
-			$theme->cache_delete();
-		}
-	}
-	wp_redirect( $location );
-	exit;
-
-default:
-
-	require_once( ABSPATH . 'wp-admin/admin-header.php' );
-
-	update_recently_edited( $file );
-
-	if ( ! is_file( $file ) )
-		$error = true;
-
-	$content = '';
-	if ( ! $error && filesize( $file ) > 0 ) {
-		$f = fopen($file, 'r');
-		$content = fread($f, filesize($file));
-
-		if ( '.php' == substr( $file, strrpos( $file, '.' ) ) ) {
-			$functions = wp_doc_link_parse( $content );
-
-			$docs_select = '<select name="docs-list" id="docs-list">';
-			$docs_select .= '<option value="">' . esc_attr__( 'Function Name&hellip;' ) . '</option>';
-			foreach ( $functions as $function ) {
-				$docs_select .= '<option value="' . esc_attr( urlencode( $function ) ) . '">' . htmlspecialchars( $function ) . '()</option>';
-			}
-			$docs_select .= '</select>';
-		}
-
-		$content = esc_textarea( $content );
-	}
-
-	if ( isset( $_GET['updated'] ) ) : ?>
- <div id="message" class="updated notice is-dismissible"><p><?php _e( 'File edited successfully.' ) ?></p></div>
-<?php endif;
-
-$description = get_file_description( $relative_file );
-$file_show = array_search( $file, array_filter( $allowed_files ) );
-if ( $description != $file_show )
-	$description .= ' <span>(' . $file_show . ')</span>';
-?>
-<div class="wrap">
-<h1><?php echo esc_html( $title ); ?></h1>
-
-<div class="fileedit-sub">
-<div class="alignleft">
-<h2><?php echo $theme->display( 'Name' ); if ( $description ) echo ': ' . $description; ?></h2>
-</div>
-<div class="alignright">
-	<form action="theme-editor.php" method="post">
-		<strong><label for="theme"><?php _e('Select theme to edit:'); ?> </label></strong>
-		<select name="theme" id="theme">
-<?php
-foreach ( wp_get_themes( array( 'errors' => null ) ) as $a_stylesheet => $a_theme ) {
-	if ( $a_theme->errors() && 'theme_no_stylesheet' == $a_theme->errors()->get_error_code() )
-		continue;
-
-	$selected = $a_stylesheet == $stylesheet ? ' selected="selected"' : '';
-	echo "\n\t" . '<option value="' . esc_attr( $a_stylesheet ) . '"' . $selected . '>' . $a_theme->display('Name') . '</option>';
-}
-?>
-		</select>
-		<?php submit_button( __( 'Select' ), 'button', 'Submit', false ); ?>
-	</form>
-</div>
-<br class="clear" />
-</div>
-<?php
-if ( $theme->errors() )
-	echo '<div class="error"><p><strong>' . __( 'This theme is broken.' ) . '</strong> ' . $theme->errors()->get_error_message() . '</p></div>';
-?>
-	<div id="templateside">
-<?php
-if ( $allowed_files ) :
-	$previous_file_type = '';
-
-	foreach ( $allowed_files as $filename => $absolute_filename ) :
-		$file_type = substr( $filename, strrpos( $filename, '.' ) );
-
-		if ( $file_type !== $previous_file_type ) {
-			if ( '' !== $previous_file_type ) {
-				echo "\t</ul>\n";
-			}
-
-			switch ( $file_type ) {
-				case '.php':
-					if ( $has_templates || $theme->parent() ) :
-						echo "\t<h2>" . __( 'Templates' ) . "</h2>\n";
-						if ( $theme->parent() ) {
-							echo '<p class="howto">' . sprintf( __( 'This child theme inherits templates from a parent theme, %s.' ),
-								sprintf( '<a href="%s">%s</a>',
-									self_admin_url( 'theme-editor.php?theme=' . urlencode( $theme->get_template() ) ),
-									$theme->parent()->display( 'Name' )
-								)
-							) . "</p>\n";
-						}
-					endif;
-					break;
-				case '.css':
-					echo "\t<h2>" . _x( 'Styles', 'Theme stylesheets in theme editor' ) . "</h2>\n";
-					break;
-				default:
-					/* translators: %s: file extension */
-					echo "\t<h2>" . sprintf( __( '%s files' ), $file_type ) . "</h2>\n";
-					break;
-			}
-
-			echo "\t<ul>\n";
-		}
-
-		$file_description = get_file_description( $filename );
-		if ( $filename !== basename( $absolute_filename ) || $file_description !== $filename ) {
-			$file_description .= '<br /><span class="nonessential">(' . $filename . ')</span>';
-		}
-
-		if ( $absolute_filename === $file ) {
-			$file_description = '<span class="highlight">' . $file_description . '</span>';
-		}
-
-		$previous_file_type = $file_type;
-?>
-		<li><a href="theme-editor.php?file=<?php echo urlencode( $filename ) ?>&amp;theme=<?php echo urlencode( $stylesheet ) ?>"><?php echo $file_description; ?></a></li>
-<?php
-	endforeach;
-?>
-</ul>
-<?php endif; ?>
-</div>
-<?php if ( $error ) :
-	echo '<div class="error"><p>' . __('Oops, no such file exists! Double check the name and try again, merci.') . '</p></div>';
-else : ?>
-	<form name="template" id="template" action="theme-editor.php" method="post">
-	<?php wp_nonce_field( 'edit-theme_' . $file . $stylesheet ); ?>
-		<div><textarea cols="70" rows="30" name="newcontent" id="newcontent" aria-describedby="newcontent-description"><?php echo $content; ?></textarea>
-		<input type="hidden" name="action" value="update" />
-		<input type="hidden" name="file" value="<?php echo esc_attr( $relative_file ); ?>" />
-		<input type="hidden" name="theme" value="<?php echo esc_attr( $theme->get_stylesheet() ); ?>" />
-		<input type="hidden" name="scrollto" id="scrollto" value="<?php echo $scrollto; ?>" />
-		</div>
-	<?php if ( ! empty( $functions ) ) : ?>
-		<div id="documentation" class="hide-if-no-js">
-		<label for="docs-list"><?php _e('Documentation:') ?></label>
-		<?php echo $docs_select; ?>
-		<input type="button" class="button" value="<?php esc_attr_e( 'Look Up' ); ?>" onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'https://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_locale() ) ?>&amp;version=<?php echo urlencode( get_bloginfo( 'version' ) ) ?>&amp;redirect=true'); }" />
-		</div>
-	<?php endif; ?>
-
-		<div>
-		<?php if ( is_child_theme() && $theme->get_stylesheet() == get_template() ) : ?>
-			<p><?php if ( is_writeable( $file ) ) { ?><strong><?php _e( 'Caution:' ); ?></strong><?php } ?>
-			<?php _e( 'This is a file in your current parent theme.' ); ?></p>
-		<?php endif; ?>
-<?php
-	if ( is_writeable( $file ) ) :
-		submit_button( __( 'Update File' ), 'primary', 'submit', true );
-	else : ?>
-<p><em><?php _e('You need to make this file writable before you can save your changes. See <a href="https://codex.wordpress.org/Changing_File_Permissions">the Codex</a> for more information.'); ?></em></p>
-<?php endif; ?>
-		</div>
-	</form>
-<?php
-endif; // $error
-?>
-<br class="clear" />
-</div>
-<script type="text/javascript">
-jQuery(document).ready(function($){
-	$('#template').submit(function(){ $('#scrollto').val( $('#newcontent').scrollTop() ); });
-	$('#newcontent').scrollTop( $('#scrollto').val() );
-});
-</script>
-<?php
-break;
-}
-
-include(ABSPATH . 'wp-admin/admin-footer.php' );
Index: www/wp-includes/customize/class-wp-customize-sidebar-section.php
===================================================================
--- www/wp-includes/customize/class-wp-customize-sidebar-section.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Sidebar_Section.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/feed-rss2.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/feed-rss2.php	(revision 38565)
+++ www/wp-includes/feed-rss2.php	(revision 38565)
@@ -1,121 +0,0 @@
-<?php
-/**
- * RSS2 Feed Template for displaying RSS2 Posts feed.
- *
- * @package WordPress
- */
-
-header('Content-Type: ' . feed_content_type('rss2') . '; charset=' . get_option('blog_charset'), true);
-$more = 1;
-
-echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
-
-/**
- * Fires between the xml and rss tags in a feed.
- *
- * @since 4.0.0
- *
- * @param string $context Type of feed. Possible values include 'rss2', 'rss2-comments',
- *                        'rdf', 'atom', and 'atom-comments'.
- */
-do_action( 'rss_tag_pre', 'rss2' );
-?>
-<rss version="2.0"
-	xmlns:content="http://purl.org/rss/1.0/modules/content/"
-	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
-	xmlns:dc="http://purl.org/dc/elements/1.1/"
-	xmlns:atom="http://www.w3.org/2005/Atom"
-	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
-	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
-	<?php
-	/**
-	 * Fires at the end of the RSS root to add namespaces.
-	 *
-	 * @since 2.0.0
-	 */
-	do_action( 'rss2_ns' );
-	?>
->
-
-<channel>
-	<title><?php wp_title_rss(); ?></title>
-	<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
-	<link><?php bloginfo_rss('url') ?></link>
-	<description><?php bloginfo_rss("description") ?></description>
-	<lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate>
-	<language><?php bloginfo_rss( 'language' ); ?></language>
-	<sy:updatePeriod><?php
-		$duration = 'hourly';
-
-		/**
-		 * Filters how often to update the RSS feed.
-		 *
-		 * @since 2.1.0
-		 *
-		 * @param string $duration The update period. Accepts 'hourly', 'daily', 'weekly', 'monthly',
-		 *                         'yearly'. Default 'hourly'.
-		 */
-		echo apply_filters( 'rss_update_period', $duration );
-	?></sy:updatePeriod>
-	<sy:updateFrequency><?php
-		$frequency = '1';
-
-		/**
-		 * Filters the RSS update frequency.
-		 *
-		 * @since 2.1.0
-		 *
-		 * @param string $frequency An integer passed as a string representing the frequency
-		 *                          of RSS updates within the update period. Default '1'.
-		 */
-		echo apply_filters( 'rss_update_frequency', $frequency );
-	?></sy:updateFrequency>
-	<?php
-	/**
-	 * Fires at the end of the RSS2 Feed Header.
-	 *
-	 * @since 2.0.0
-	 */
-	do_action( 'rss2_head');
-
-	while( have_posts()) : the_post();
-	?>
-	<item>
-		<title><?php the_title_rss() ?></title>
-		<link><?php the_permalink_rss() ?></link>
-<?php if ( get_comments_number() || comments_open() ) : ?>
-		<comments><?php comments_link_feed(); ?></comments>
-<?php endif; ?>
-		<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>
-		<dc:creator><![CDATA[<?php the_author() ?>]]></dc:creator>
-		<?php the_category_rss('rss2') ?>
-
-		<guid isPermaLink="false"><?php the_guid(); ?></guid>
-<?php if (get_option('rss_use_excerpt')) : ?>
-		<description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>
-<?php else : ?>
-		<description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>
-	<?php $content = get_the_content_feed('rss2'); ?>
-	<?php if ( strlen( $content ) > 0 ) : ?>
-		<content:encoded><![CDATA[<?php echo $content; ?>]]></content:encoded>
-	<?php else : ?>
-		<content:encoded><![CDATA[<?php the_excerpt_rss(); ?>]]></content:encoded>
-	<?php endif; ?>
-<?php endif; ?>
-<?php if ( get_comments_number() || comments_open() ) : ?>
-		<wfw:commentRss><?php echo esc_url( get_post_comments_feed_link(null, 'rss2') ); ?></wfw:commentRss>
-		<slash:comments><?php echo get_comments_number(); ?></slash:comments>
-<?php endif; ?>
-<?php rss_enclosure(); ?>
-	<?php
-	/**
-	 * Fires at the end of each RSS2 feed item.
-	 *
-	 * @since 2.0.0
-	 */
-	do_action( 'rss2_item' );
-	?>
-	</item>
-	<?php endwhile; ?>
-</channel>
-</rss>
Index: www/wp-admin/ms-sites.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/ms-sites.php	(revision 38565)
+++ www/wp-admin/ms-sites.php	(revision 38565)
@@ -1,13 +0,0 @@
-<?php
-/**
- * Multisite sites administration panel.
- *
- * @package WordPress
- * @subpackage Multisite
- * @since 3.0.0
- */
-
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-wp_redirect( network_admin_url('sites.php') );
-exit;
Index: www/wp-includes/ID3/module.audio-video.asf.php
===================================================================
--- www/wp-includes/ID3/module.audio-video.asf.php	(revision 38565)
+++ www/wp-includes/autoload/id3/getid3_asf.php	(revision )
@@ -14,8 +14,6 @@
 //                                                            ///
 /////////////////////////////////////////////////////////////////
 
-getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio-video.riff.php', __FILE__, true);
-
 class getid3_asf extends getid3_handler {
 
 	public function __construct(getID3 $getid3) {
Index: www/wp-admin/install-helper.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/install-helper.php	(revision 38565)
+++ www/wp-admin/install-helper.php	(revision 38565)
@@ -1,200 +0,0 @@
-<?php
-/**
- * Plugins may load this file to gain access to special helper functions for
- * plugin installation. This file is not included by WordPress and it is
- * recommended, to prevent fatal errors, that this file is included using
- * require_once().
- *
- * These functions are not optimized for speed, but they should only be used
- * once in a while, so speed shouldn't be a concern. If it is and you are
- * needing to use these functions a lot, you might experience time outs. If you
- * do, then it is advised to just write the SQL code yourself.
- *
- *     check_column( 'wp_links', 'link_description', 'mediumtext' );
- *     if ( check_column( $wpdb->comments, 'comment_author', 'tinytext' ) ) {
- *         echo "ok\n";
- *     }
- *
- *     $error_count = 0;
- *     $tablename = $wpdb->links;
- *     // Check the column.
- *     if ( ! check_column($wpdb->links, 'link_description', 'varchar( 255 )' ) ) {
- *         $ddl = "ALTER TABLE $wpdb->links MODIFY COLUMN link_description varchar(255) NOT NULL DEFAULT '' ";
- *         $q = $wpdb->query( $ddl );
- *     }
- *
- *     if ( check_column( $wpdb->links, 'link_description', 'varchar( 255 )' ) ) {
- *         $res .= $tablename . ' - ok <br />';
- *     } else {
- *         $res .= 'There was a problem with ' . $tablename . '<br />';
- *         ++$error_count;
- *     }
- *
- * @package WordPress
- * @subpackage Plugin
- */
-
-/** Load WordPress Bootstrap */
-require_once(dirname(dirname(__FILE__)).'/wp-load.php');
-
-if ( ! function_exists('maybe_create_table') ) :
-/**
- * Create database table, if it doesn't already exist.
- *
- * @since 1.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $table_name Database table name.
- * @param string $create_ddl Create database table SQL.
- * @return bool False on error, true if already exists or success.
- */
-function maybe_create_table($table_name, $create_ddl) {
-	global $wpdb;
-	foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) {
-		if ($table == $table_name) {
-			return true;
-		}
-	}
-	// Didn't find it, so try to create it.
-	$wpdb->query($create_ddl);
-
-	// We cannot directly tell that whether this succeeded!
-	foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) {
-		if ($table == $table_name) {
-			return true;
-		}
-	}
-	return false;
-}
-endif;
-
-if ( ! function_exists('maybe_add_column') ) :
-/**
- * Add column to database table, if column doesn't already exist in table.
- *
- * @since 1.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $table_name Database table name
- * @param string $column_name Table column name
- * @param string $create_ddl SQL to add column to table.
- * @return bool False on failure. True, if already exists or was successful.
- */
-function maybe_add_column($table_name, $column_name, $create_ddl) {
-	global $wpdb;
-	foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
-
-		if ($column == $column_name) {
-			return true;
-		}
-	}
-
-	// Didn't find it, so try to create it.
-	$wpdb->query($create_ddl);
-
-	// We cannot directly tell that whether this succeeded!
-	foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
-		if ($column == $column_name) {
-			return true;
-		}
-	}
-	return false;
-}
-endif;
-
-/**
- * Drop column from database table, if it exists.
- *
- * @since 1.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $table_name Table name
- * @param string $column_name Column name
- * @param string $drop_ddl SQL statement to drop column.
- * @return bool False on failure, true on success or doesn't exist.
- */
-function maybe_drop_column($table_name, $column_name, $drop_ddl) {
-	global $wpdb;
-	foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
-		if ($column == $column_name) {
-
-			// Found it, so try to drop it.
-			$wpdb->query($drop_ddl);
-
-			// We cannot directly tell that whether this succeeded!
-			foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
-				if ($column == $column_name) {
-					return false;
-				}
-			}
-		}
-	}
-	// Else didn't find it.
-	return true;
-}
-
-/**
- * Check column matches criteria.
- *
- * Uses the SQL DESC for retrieving the table info for the column. It will help
- * understand the parameters, if you do more research on what column information
- * is returned by the SQL statement. Pass in null to skip checking that
- * criteria.
- *
- * Column names returned from DESC table are case sensitive and are listed:
- *      Field
- *      Type
- *      Null
- *      Key
- *      Default
- *      Extra
- *
- * @since 1.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $table_name Table name
- * @param string $col_name   Column name
- * @param string $col_type   Column type
- * @param bool   $is_null    Optional. Check is null.
- * @param mixed  $key        Optional. Key info.
- * @param mixed  $default    Optional. Default value.
- * @param mixed  $extra      Optional. Extra value.
- * @return bool True, if matches. False, if not matching.
- */
-function check_column($table_name, $col_name, $col_type, $is_null = null, $key = null, $default = null, $extra = null) {
-	global $wpdb;
-	$diffs = 0;
-	$results = $wpdb->get_results("DESC $table_name");
-
-	foreach ($results as $row ) {
-
-		if ($row->Field == $col_name) {
-
-			// Got our column, check the params.
-			if (($col_type != null) && ($row->Type != $col_type)) {
-				++$diffs;
-			}
-			if (($is_null != null) && ($row->Null != $is_null)) {
-				++$diffs;
-			}
-			if (($key != null) && ($row->Key  != $key)) {
-				++$diffs;
-			}
-			if (($default != null) && ($row->Default != $default)) {
-				++$diffs;
-			}
-			if (($extra != null) && ($row->Extra != $extra)) {
-				++$diffs;
-			}
-			if ($diffs > 0) {
-				return false;
-			}
-			return true;
-		} // end if found our column
-	}
-	return false;
-}
Index: www/wp-includes/autoload/pomo/NOOP_Translations.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/pomo/NOOP_Translations.php	(revision )
+++ www/wp-includes/autoload/pomo/NOOP_Translations.php	(revision )
@@ -0,0 +1,93 @@
+<?php
+/**
+ * Class for a set of entries for translation and their associated headers
+ *
+ * @version $Id: translations.php 1157 2015-11-20 04:30:11Z dd32 $
+ * @package pomo
+ * @subpackage translations
+ */
+
+/**
+ * Provides the same interface as Translations, but doesn't do anything
+ */
+class NOOP_Translations {
+	var $entries = array();
+	var $headers = array();
+
+	function add_entry($entry) {
+		return true;
+	}
+
+	/**
+	 *
+	 * @param string $header
+	 * @param string $value
+	 */
+	function set_header($header, $value) {
+	}
+
+	/**
+	 *
+	 * @param array $headers
+	 */
+	function set_headers($headers) {
+	}
+
+	/**
+	 * @param string $header
+	 * @return false
+	 */
+	function get_header($header) {
+		return false;
+	}
+
+	/**
+	 * @param Translation_Entry $entry
+	 * @return false
+	 */
+	function translate_entry(&$entry) {
+		return false;
+	}
+
+	/**
+	 * @param string $singular
+	 * @param string|null $context
+	 * @return string
+	 */
+	function translate($singular, $context=null) {
+		return $singular;
+	}
+
+	/**
+	 *
+	 * @param int $count
+	 * @return bool
+	 */
+	function select_plural_form($count) {
+		return 1 == $count? 0 : 1;
+	}
+
+	/**
+	 * @return int
+	 */
+	function get_plural_forms_count() {
+		return 2;
+	}
+
+	/**
+	 * @param string $singular
+	 * @param string $plural
+	 * @param int    $count
+	 * @param string|null $context
+	 * @return string
+	 */
+	function translate_plural( $singular, $plural, $count, $context = null) {
+			return 1 == $count? $singular : $plural;
+	}
+
+	/**
+	 * @param object $other
+	 */
+	function merge_with(&$other) {
+	}
+}
Index: www/wp-includes/autoload/customize/class-wp-customize-nav-menu-setting.php
===================================================================
--- www/wp-includes/autoload/customize/class-wp-customize-nav-menu-setting.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/customize/class-wp-customize-nav-menu-setting.php	(revision UNDEFINED)
@@ -1,656 +0,0 @@
-<?php
-/**
- * Customize API: WP_Customize_Nav_Menu_Setting class
- *
- * @package WordPress
- * @subpackage Customize
- * @since 4.4.0
- */
-
-/**
- * Customize Setting to represent a nav_menu.
- *
- * Subclass of WP_Customize_Setting to represent a nav_menu taxonomy term, and
- * the IDs for the nav_menu_items associated with the nav menu.
- *
- * @since 4.3.0
- *
- * @see wp_get_nav_menu_object()
- * @see WP_Customize_Setting
- */
-class WP_Customize_Nav_Menu_Setting extends WP_Customize_Setting {
-
-	const ID_PATTERN = '/^nav_menu\[(?P<id>-?\d+)\]$/';
-
-	const TAXONOMY = 'nav_menu';
-
-	const TYPE = 'nav_menu';
-
-	/**
-	 * Setting type.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var string
-	 */
-	public $type = self::TYPE;
-
-	/**
-	 * Default setting value.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var array
-	 *
-	 * @see wp_get_nav_menu_object()
-	 */
-	public $default = array(
-		'name'        => '',
-		'description' => '',
-		'parent'      => 0,
-		'auto_add'    => false,
-	);
-
-	/**
-	 * Default transport.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var string
-	 */
-	public $transport = 'postMessage';
-
-	/**
-	 * The term ID represented by this setting instance.
-	 *
-	 * A negative value represents a placeholder ID for a new menu not yet saved.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var int
-	 */
-	public $term_id;
-
-	/**
-	 * Previous (placeholder) term ID used before creating a new menu.
-	 *
-	 * This value will be exported to JS via the {@see 'customize_save_response'} filter
-	 * so that JavaScript can update the settings to refer to the newly-assigned
-	 * term ID. This value is always negative to indicate it does not refer to
-	 * a real term.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var int
-	 *
-	 * @see WP_Customize_Nav_Menu_Setting::update()
-	 * @see WP_Customize_Nav_Menu_Setting::amend_customize_save_response()
-	 */
-	public $previous_term_id;
-
-	/**
-	 * Whether or not update() was called.
-	 *
-	 * @since 4.3.0
-	 * @access protected
-	 * @var bool
-	 */
-	protected $is_updated = false;
-
-	/**
-	 * Status for calling the update method, used in customize_save_response filter.
-	 *
-	 * See {@see 'customize_save_response'}.
-	 *
-	 * When status is inserted, the placeholder term ID is stored in `$previous_term_id`.
-	 * When status is error, the error is stored in `$update_error`.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var string updated|inserted|deleted|error
-	 *
-	 * @see WP_Customize_Nav_Menu_Setting::update()
-	 * @see WP_Customize_Nav_Menu_Setting::amend_customize_save_response()
-	 */
-	public $update_status;
-
-	/**
-	 * Any error object returned by wp_update_nav_menu_object() when setting is updated.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var WP_Error
-	 *
-	 * @see WP_Customize_Nav_Menu_Setting::update()
-	 * @see WP_Customize_Nav_Menu_Setting::amend_customize_save_response()
-	 */
-	public $update_error;
-
-	/**
-	 * Constructor.
-	 *
-	 * Any supplied $args override class property defaults.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 *
-	 * @param WP_Customize_Manager $manager Bootstrap Customizer instance.
-	 * @param string               $id      An specific ID of the setting. Can be a
-	 *                                      theme mod or option name.
-	 * @param array                $args    Optional. Setting arguments.
-	 *
-	 * @throws Exception If $id is not valid for this setting type.
-	 */
-	public function __construct( WP_Customize_Manager $manager, $id, array $args = array() ) {
-		if ( empty( $manager->nav_menus ) ) {
-			throw new Exception( 'Expected WP_Customize_Manager::$nav_menus to be set.' );
-		}
-
-		if ( ! preg_match( self::ID_PATTERN, $id, $matches ) ) {
-			throw new Exception( "Illegal widget setting ID: $id" );
-		}
-
-		$this->term_id = intval( $matches['id'] );
-
-		parent::__construct( $manager, $id, $args );
-	}
-
-	/**
-	 * Get the instance data for a given widget setting.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 *
-	 * @see wp_get_nav_menu_object()
-	 *
-	 * @return array Instance data.
-	 */
-	public function value() {
-		if ( $this->is_previewed && $this->_previewed_blog_id === get_current_blog_id() ) {
-			$undefined  = new stdClass(); // Symbol.
-			$post_value = $this->post_value( $undefined );
-
-			if ( $undefined === $post_value ) {
-				$value = $this->_original_value;
-			} else {
-				$value = $post_value;
-			}
-		} else {
-			$value = false;
-
-			// Note that a term_id of less than one indicates a nav_menu not yet inserted.
-			if ( $this->term_id > 0 ) {
-				$term = wp_get_nav_menu_object( $this->term_id );
-
-				if ( $term ) {
-					$value = wp_array_slice_assoc( (array) $term, array_keys( $this->default ) );
-
-					$nav_menu_options  = (array) get_option( 'nav_menu_options', array() );
-					$value['auto_add'] = false;
-
-					if ( isset( $nav_menu_options['auto_add'] ) && is_array( $nav_menu_options['auto_add'] ) ) {
-						$value['auto_add'] = in_array( $term->term_id, $nav_menu_options['auto_add'] );
-					}
-				}
-			}
-
-			if ( ! is_array( $value ) ) {
-				$value = $this->default;
-			}
-		}
-		return $value;
-	}
-
-	/**
-	 * Handle previewing the setting.
-	 *
-	 * @since 4.3.0
-	 * @since 4.4.0 Added boolean return value
-	 * @access public
-	 *
-	 * @see WP_Customize_Manager::post_value()
-	 *
-	 * @return bool False if method short-circuited due to no-op.
-	 */
-	public function preview() {
-		if ( $this->is_previewed ) {
-			return false;
-		}
-
-		$undefined = new stdClass();
-		$is_placeholder = ( $this->term_id < 0 );
-		$is_dirty = ( $undefined !== $this->post_value( $undefined ) );
-		if ( ! $is_placeholder && ! $is_dirty ) {
-			return false;
-		}
-
-		$this->is_previewed       = true;
-		$this->_original_value    = $this->value();
-		$this->_previewed_blog_id = get_current_blog_id();
-
-		add_filter( 'wp_get_nav_menus', array( $this, 'filter_wp_get_nav_menus' ), 10, 2 );
-		add_filter( 'wp_get_nav_menu_object', array( $this, 'filter_wp_get_nav_menu_object' ), 10, 2 );
-		add_filter( 'default_option_nav_menu_options', array( $this, 'filter_nav_menu_options' ) );
-		add_filter( 'option_nav_menu_options', array( $this, 'filter_nav_menu_options' ) );
-
-		return true;
-	}
-
-	/**
-	 * Filters the wp_get_nav_menus() result to ensure the inserted menu object is included, and the deleted one is removed.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 *
-	 * @see wp_get_nav_menus()
-	 *
-	 * @param array $menus An array of menu objects.
-	 * @param array $args  An array of arguments used to retrieve menu objects.
-	 * @return array
-	 */
-	public function filter_wp_get_nav_menus( $menus, $args ) {
-		if ( get_current_blog_id() !== $this->_previewed_blog_id ) {
-			return $menus;
-		}
-
-		$setting_value = $this->value();
-		$is_delete = ( false === $setting_value );
-		$index = -1;
-
-		// Find the existing menu item's position in the list.
-		foreach ( $menus as $i => $menu ) {
-			if ( (int) $this->term_id === (int) $menu->term_id || (int) $this->previous_term_id === (int) $menu->term_id ) {
-				$index = $i;
-				break;
-			}
-		}
-
-		if ( $is_delete ) {
-			// Handle deleted menu by removing it from the list.
-			if ( -1 !== $index ) {
-				array_splice( $menus, $index, 1 );
-			}
-		} else {
-			// Handle menus being updated or inserted.
-			$menu_obj = (object) array_merge( array(
-				'term_id'          => $this->term_id,
-				'term_taxonomy_id' => $this->term_id,
-				'slug'             => sanitize_title( $setting_value['name'] ),
-				'count'            => 0,
-				'term_group'       => 0,
-				'taxonomy'         => self::TAXONOMY,
-				'filter'           => 'raw',
-			), $setting_value );
-
-			array_splice( $menus, $index, ( -1 === $index ? 0 : 1 ), array( $menu_obj ) );
-		}
-
-		// Make sure the menu objects get re-sorted after an update/insert.
-		if ( ! $is_delete && ! empty( $args['orderby'] ) ) {
-			$this->_current_menus_sort_orderby = $args['orderby'];
-			usort( $menus, array( $this, '_sort_menus_by_orderby' ) );
-		}
-		// @todo add support for $args['hide_empty'] === true
-
-		return $menus;
-	}
-
-	/**
-	 * Temporary non-closure passing of orderby value to function.
-	 *
-	 * @since 4.3.0
-	 * @access protected
-	 * @var string
-	 *
-	 * @see WP_Customize_Nav_Menu_Setting::filter_wp_get_nav_menus()
-	 * @see WP_Customize_Nav_Menu_Setting::_sort_menus_by_orderby()
-	 */
-	protected $_current_menus_sort_orderby;
-
-	/**
-	 * Sort menu objects by the class-supplied orderby property.
-	 *
-	 * This is a workaround for a lack of closures.
-	 *
-	 * @since 4.3.0
-	 * @access protected
-	 * @param object $menu1
-	 * @param object $menu2
-	 * @return int
-	 *
-	 * @see WP_Customize_Nav_Menu_Setting::filter_wp_get_nav_menus()
-	 */
-	protected function _sort_menus_by_orderby( $menu1, $menu2 ) {
-		$key = $this->_current_menus_sort_orderby;
-		return strcmp( $menu1->$key, $menu2->$key );
-	}
-
-	/**
-	 * Filters the wp_get_nav_menu_object() result to supply the previewed menu object.
-	 *
-	 * Requesting a nav_menu object by anything but ID is not supported.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 *
-	 * @see wp_get_nav_menu_object()
-	 *
-	 * @param object|null $menu_obj Object returned by wp_get_nav_menu_object().
-	 * @param string      $menu_id  ID of the nav_menu term. Requests by slug or name will be ignored.
-	 * @return object|null
-	 */
-	public function filter_wp_get_nav_menu_object( $menu_obj, $menu_id ) {
-		$ok = (
-			get_current_blog_id() === $this->_previewed_blog_id
-			&&
-			is_int( $menu_id )
-			&&
-			$menu_id === $this->term_id
-		);
-		if ( ! $ok ) {
-			return $menu_obj;
-		}
-
-		$setting_value = $this->value();
-
-		// Handle deleted menus.
-		if ( false === $setting_value ) {
-			return false;
-		}
-
-		// Handle sanitization failure by preventing short-circuiting.
-		if ( null === $setting_value ) {
-			return $menu_obj;
-		}
-
-		$menu_obj = (object) array_merge( array(
-				'term_id'          => $this->term_id,
-				'term_taxonomy_id' => $this->term_id,
-				'slug'             => sanitize_title( $setting_value['name'] ),
-				'count'            => 0,
-				'term_group'       => 0,
-				'taxonomy'         => self::TAXONOMY,
-				'filter'           => 'raw',
-			), $setting_value );
-
-		return $menu_obj;
-	}
-
-	/**
-	 * Filters the nav_menu_options option to include this menu's auto_add preference.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 *
-	 * @param array $nav_menu_options Nav menu options including auto_add.
-	 * @return array (Kaybe) modified nav menu options.
-	 */
-	public function filter_nav_menu_options( $nav_menu_options ) {
-		if ( $this->_previewed_blog_id !== get_current_blog_id() ) {
-			return $nav_menu_options;
-		}
-
-		$menu = $this->value();
-		$nav_menu_options = $this->filter_nav_menu_options_value(
-			$nav_menu_options,
-			$this->term_id,
-			false === $menu ? false : $menu['auto_add']
-		);
-
-		return $nav_menu_options;
-	}
-
-	/**
-	 * Sanitize an input.
-	 *
-	 * Note that parent::sanitize() erroneously does wp_unslash() on $value, but
-	 * we remove that in this override.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 *
-	 * @param array $value The value to sanitize.
-	 * @return array|false|null Null if an input isn't valid. False if it is marked for deletion.
-	 *                          Otherwise the sanitized value.
-	 */
-	public function sanitize( $value ) {
-		// Menu is marked for deletion.
-		if ( false === $value ) {
-			return $value;
-		}
-
-		// Invalid.
-		if ( ! is_array( $value ) ) {
-			return null;
-		}
-
-		$default = array(
-			'name'        => '',
-			'description' => '',
-			'parent'      => 0,
-			'auto_add'    => false,
-		);
-		$value = array_merge( $default, $value );
-		$value = wp_array_slice_assoc( $value, array_keys( $default ) );
-
-		$value['name']        = trim( esc_html( $value['name'] ) ); // This sanitization code is used in wp-admin/nav-menus.php.
-		$value['description'] = sanitize_text_field( $value['description'] );
-		$value['parent']      = max( 0, intval( $value['parent'] ) );
-		$value['auto_add']    = ! empty( $value['auto_add'] );
-
-		if ( '' === $value['name'] ) {
-			$value['name'] = _x( '(unnamed)', 'Missing menu name.' );
-		}
-
-		/** This filter is documented in wp-includes/class-wp-customize-setting.php */
-		return apply_filters( "customize_sanitize_{$this->id}", $value, $this );
-	}
-
-	/**
-	 * Storage for data to be sent back to client in customize_save_response filter.
-	 *
-	 * See {@see 'customize_save_response'}.
-	 *
-	 * @access protected
-	 * @since 4.3.0
-	 * @var array
-	 *
-	 * @see WP_Customize_Nav_Menu_Setting::amend_customize_save_response()
-	 */
-	protected $_widget_nav_menu_updates = array();
-
-	/**
-	 * Create/update the nav_menu term for this setting.
-	 *
-	 * Any created menus will have their assigned term IDs exported to the client
-	 * via the {@see 'customize_save_response'} filter. Likewise, any errors will be exported
-	 * to the client via the customize_save_response() filter.
-	 *
-	 * To delete a menu, the client can send false as the value.
-	 *
-	 * @since 4.3.0
-	 * @access protected
-	 *
-	 * @see wp_update_nav_menu_object()
-	 *
-	 * @param array|false $value {
-	 *     The value to update. Note that slug cannot be updated via wp_update_nav_menu_object().
-	 *     If false, then the menu will be deleted entirely.
-	 *
-	 *     @type string $name        The name of the menu to save.
-	 *     @type string $description The term description. Default empty string.
-	 *     @type int    $parent      The id of the parent term. Default 0.
-	 *     @type bool   $auto_add    Whether pages will auto_add to this menu. Default false.
-	 * }
-	 * @return null|void
-	 */
-	protected function update( $value ) {
-		if ( $this->is_updated ) {
-			return;
-		}
-
-		$this->is_updated = true;
-		$is_placeholder   = ( $this->term_id < 0 );
-		$is_delete        = ( false === $value );
-
-		add_filter( 'customize_save_response', array( $this, 'amend_customize_save_response' ) );
-
-		$auto_add = null;
-		if ( $is_delete ) {
-			// If the current setting term is a placeholder, a delete request is a no-op.
-			if ( $is_placeholder ) {
-				$this->update_status = 'deleted';
-			} else {
-				$r = wp_delete_nav_menu( $this->term_id );
-
-				if ( is_wp_error( $r ) ) {
-					$this->update_status = 'error';
-					$this->update_error  = $r;
-				} else {
-					$this->update_status = 'deleted';
-					$auto_add = false;
-				}
-			}
-		} else {
-			// Insert or update menu.
-			$menu_data = wp_array_slice_assoc( $value, array( 'description', 'parent' ) );
-			$menu_data['menu-name'] = $value['name'];
-
-			$menu_id = $is_placeholder ? 0 : $this->term_id;
-			$r = wp_update_nav_menu_object( $menu_id, wp_slash( $menu_data ) );
-			$original_name = $menu_data['menu-name'];
-			$name_conflict_suffix = 1;
-			while ( is_wp_error( $r ) && 'menu_exists' === $r->get_error_code() ) {
-				$name_conflict_suffix += 1;
-				/* translators: 1: original menu name, 2: duplicate count */
-				$menu_data['menu-name'] = sprintf( __( '%1$s (%2$d)' ), $original_name, $name_conflict_suffix );
-				$r = wp_update_nav_menu_object( $menu_id, wp_slash( $menu_data ) );
-			}
-
-			if ( is_wp_error( $r ) ) {
-				$this->update_status = 'error';
-				$this->update_error  = $r;
-			} else {
-				if ( $is_placeholder ) {
-					$this->previous_term_id = $this->term_id;
-					$this->term_id          = $r;
-					$this->update_status    = 'inserted';
-				} else {
-					$this->update_status = 'updated';
-				}
-
-				$auto_add = $value['auto_add'];
-			}
-		}
-
-		if ( null !== $auto_add ) {
-			$nav_menu_options = $this->filter_nav_menu_options_value(
-				(array) get_option( 'nav_menu_options', array() ),
-				$this->term_id,
-				$auto_add
-			);
-			update_option( 'nav_menu_options', $nav_menu_options );
-		}
-
-		if ( 'inserted' === $this->update_status ) {
-			// Make sure that new menus assigned to nav menu locations use their new IDs.
-			foreach ( $this->manager->settings() as $setting ) {
-				if ( ! preg_match( '/^nav_menu_locations\[/', $setting->id ) ) {
-					continue;
-				}
-
-				$post_value = $setting->post_value( null );
-				if ( ! is_null( $post_value ) && $this->previous_term_id === intval( $post_value ) ) {
-					$this->manager->set_post_value( $setting->id, $this->term_id );
-					$setting->save();
-				}
-			}
-
-			// Make sure that any nav_menu widgets referencing the placeholder nav menu get updated and sent back to client.
-			foreach ( array_keys( $this->manager->unsanitized_post_values() ) as $setting_id ) {
-				$nav_menu_widget_setting = $this->manager->get_setting( $setting_id );
-				if ( ! $nav_menu_widget_setting || ! preg_match( '/^widget_nav_menu\[/', $nav_menu_widget_setting->id ) ) {
-					continue;
-				}
-
-				$widget_instance = $nav_menu_widget_setting->post_value(); // Note that this calls WP_Customize_Widgets::sanitize_widget_instance().
-				if ( empty( $widget_instance['nav_menu'] ) || intval( $widget_instance['nav_menu'] ) !== $this->previous_term_id ) {
-					continue;
-				}
-
-				$widget_instance['nav_menu'] = $this->term_id;
-				$updated_widget_instance = $this->manager->widgets->sanitize_widget_js_instance( $widget_instance );
-				$this->manager->set_post_value( $nav_menu_widget_setting->id, $updated_widget_instance );
-				$nav_menu_widget_setting->save();
-
-				$this->_widget_nav_menu_updates[ $nav_menu_widget_setting->id ] = $updated_widget_instance;
-			}
-		}
-	}
-
-	/**
-	 * Updates a nav_menu_options array.
-	 *
-	 * @since 4.3.0
-	 * @access protected
-	 *
-	 * @see WP_Customize_Nav_Menu_Setting::filter_nav_menu_options()
-	 * @see WP_Customize_Nav_Menu_Setting::update()
-	 *
-	 * @param array $nav_menu_options Array as returned by get_option( 'nav_menu_options' ).
-	 * @param int   $menu_id          The term ID for the given menu.
-	 * @param bool  $auto_add         Whether to auto-add or not.
-	 * @return array (Maybe) modified nav_menu_otions array.
-	 */
-	protected function filter_nav_menu_options_value( $nav_menu_options, $menu_id, $auto_add ) {
-		$nav_menu_options = (array) $nav_menu_options;
-		if ( ! isset( $nav_menu_options['auto_add'] ) ) {
-			$nav_menu_options['auto_add'] = array();
-		}
-
-		$i = array_search( $menu_id, $nav_menu_options['auto_add'] );
-		if ( $auto_add && false === $i ) {
-			array_push( $nav_menu_options['auto_add'], $this->term_id );
-		} elseif ( ! $auto_add && false !== $i ) {
-			array_splice( $nav_menu_options['auto_add'], $i, 1 );
-		}
-
-		return $nav_menu_options;
-	}
-
-	/**
-	 * Export data for the JS client.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 *
-	 * @see WP_Customize_Nav_Menu_Setting::update()
-	 *
-	 * @param array $data Additional information passed back to the 'saved' event on `wp.customize`.
-	 * @return array Export data.
-	 */
-	public function amend_customize_save_response( $data ) {
-		if ( ! isset( $data['nav_menu_updates'] ) ) {
-			$data['nav_menu_updates'] = array();
-		}
-		if ( ! isset( $data['widget_nav_menu_updates'] ) ) {
-			$data['widget_nav_menu_updates'] = array();
-		}
-
-		$data['nav_menu_updates'][] = array(
-			'term_id'          => $this->term_id,
-			'previous_term_id' => $this->previous_term_id,
-			'error'            => $this->update_error ? $this->update_error->get_error_code() : null,
-			'status'           => $this->update_status,
-			'saved_value'      => 'deleted' === $this->update_status ? null : $this->value(),
-		);
-
-		$data['widget_nav_menu_updates'] = array_merge(
-			$data['widget_nav_menu_updates'],
-			$this->_widget_nav_menu_updates
-		);
-		$this->_widget_nav_menu_updates = array();
-
-		return $data;
-	}
-}
Index: www/wp-includes/rss.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/rss.php	(revision 38565)
+++ www/wp-includes/rss.php	(revision 38565)
@@ -1,956 +0,0 @@
-<?php
-/**
- * MagpieRSS: a simple RSS integration tool
- *
- * A compiled file for RSS syndication
- *
- * @author Kellan Elliott-McCrea <kellan@protest.net>
- * @version 0.51
- * @license GPL
- *
- * @package External
- * @subpackage MagpieRSS
- * @deprecated 3.0.0 Use SimplePie instead.
- */
-
-/**
- * Deprecated. Use SimplePie (class-simplepie.php) instead.
- */
-_deprecated_file( basename( __FILE__ ), '3.0.0', WPINC . '/class-simplepie.php' );
-
-/**
- * Fires before MagpieRSS is loaded, to optionally replace it.
- *
- * @since 2.3.0
- * @deprecated 3.0.0
- */
-do_action( 'load_feed_engine' );
-
-/** RSS feed constant. */
-define('RSS', 'RSS');
-define('ATOM', 'Atom');
-define('MAGPIE_USER_AGENT', 'WordPress/' . $GLOBALS['wp_version']);
-
-class MagpieRSS {
-	var $parser;
-	var $current_item	= array();	// item currently being parsed
-	var $items			= array();	// collection of parsed items
-	var $channel		= array();	// hash of channel fields
-	var $textinput		= array();
-	var $image			= array();
-	var $feed_type;
-	var $feed_version;
-
-	// parser variables
-	var $stack				= array(); // parser stack
-	var $inchannel			= false;
-	var $initem 			= false;
-	var $incontent			= false; // if in Atom <content mode="xml"> field
-	var $intextinput		= false;
-	var $inimage 			= false;
-	var $current_field		= '';
-	var $current_namespace	= false;
-
-	//var $ERROR = "";
-
-	var $_CONTENT_CONSTRUCTS = array('content', 'summary', 'info', 'title', 'tagline', 'copyright');
-
-	/**
-	 * PHP5 constructor.
-	 */
-	function __construct( $source ) {
-
-		# if PHP xml isn't compiled in, die
-		#
-		if ( !function_exists('xml_parser_create') )
-			trigger_error( "Failed to load PHP's XML Extension. https://secure.php.net/manual/en/ref.xml.php" );
-
-		$parser = @xml_parser_create();
-
-		if ( !is_resource($parser) )
-			trigger_error( "Failed to create an instance of PHP's XML parser. https://secure.php.net/manual/en/ref.xml.php");
-
-		$this->parser = $parser;
-
-		# pass in parser, and a reference to this object
-		# set up handlers
-		#
-		xml_set_object( $this->parser, $this );
-		xml_set_element_handler($this->parser,
-				'feed_start_element', 'feed_end_element' );
-
-		xml_set_character_data_handler( $this->parser, 'feed_cdata' );
-
-		$status = xml_parse( $this->parser, $source );
-
-		if (! $status ) {
-			$errorcode = xml_get_error_code( $this->parser );
-			if ( $errorcode != XML_ERROR_NONE ) {
-				$xml_error = xml_error_string( $errorcode );
-				$error_line = xml_get_current_line_number($this->parser);
-				$error_col = xml_get_current_column_number($this->parser);
-				$errormsg = "$xml_error at line $error_line, column $error_col";
-
-				$this->error( $errormsg );
-			}
-		}
-
-		xml_parser_free( $this->parser );
-
-		$this->normalize();
-	}
-
-	/**
-	 * PHP4 constructor.
-	 */
-	public function MagpieRSS( $source ) {
-		self::__construct( $source );
-	}
-
-	function feed_start_element($p, $element, &$attrs) {
-		$el = $element = strtolower($element);
-		$attrs = array_change_key_case($attrs, CASE_LOWER);
-
-		// check for a namespace, and split if found
-		$ns	= false;
-		if ( strpos( $element, ':' ) ) {
-			list($ns, $el) = explode( ':', $element, 2);
-		}
-		if ( $ns and $ns != 'rdf' ) {
-			$this->current_namespace = $ns;
-		}
-
-		# if feed type isn't set, then this is first element of feed
-		# identify feed from root element
-		#
-		if (!isset($this->feed_type) ) {
-			if ( $el == 'rdf' ) {
-				$this->feed_type = RSS;
-				$this->feed_version = '1.0';
-			}
-			elseif ( $el == 'rss' ) {
-				$this->feed_type = RSS;
-				$this->feed_version = $attrs['version'];
-			}
-			elseif ( $el == 'feed' ) {
-				$this->feed_type = ATOM;
-				$this->feed_version = $attrs['version'];
-				$this->inchannel = true;
-			}
-			return;
-		}
-
-		if ( $el == 'channel' )
-		{
-			$this->inchannel = true;
-		}
-		elseif ($el == 'item' or $el == 'entry' )
-		{
-			$this->initem = true;
-			if ( isset($attrs['rdf:about']) ) {
-				$this->current_item['about'] = $attrs['rdf:about'];
-			}
-		}
-
-		// if we're in the default namespace of an RSS feed,
-		//  record textinput or image fields
-		elseif (
-			$this->feed_type == RSS and
-			$this->current_namespace == '' and
-			$el == 'textinput' )
-		{
-			$this->intextinput = true;
-		}
-
-		elseif (
-			$this->feed_type == RSS and
-			$this->current_namespace == '' and
-			$el == 'image' )
-		{
-			$this->inimage = true;
-		}
-
-		# handle atom content constructs
-		elseif ( $this->feed_type == ATOM and in_array($el, $this->_CONTENT_CONSTRUCTS) )
-		{
-			// avoid clashing w/ RSS mod_content
-			if ($el == 'content' ) {
-				$el = 'atom_content';
-			}
-
-			$this->incontent = $el;
-
-		}
-
-		// if inside an Atom content construct (e.g. content or summary) field treat tags as text
-		elseif ($this->feed_type == ATOM and $this->incontent )
-		{
-			// if tags are inlined, then flatten
-			$attrs_str = join(' ',
-					array_map(array('MagpieRSS', 'map_attrs'),
-					array_keys($attrs),
-					array_values($attrs) ) );
-
-			$this->append_content( "<$element $attrs_str>"  );
-
-			array_unshift( $this->stack, $el );
-		}
-
-		// Atom support many links per containging element.
-		// Magpie treats link elements of type rel='alternate'
-		// as being equivalent to RSS's simple link element.
-		//
-		elseif ($this->feed_type == ATOM and $el == 'link' )
-		{
-			if ( isset($attrs['rel']) and $attrs['rel'] == 'alternate' )
-			{
-				$link_el = 'link';
-			}
-			else {
-				$link_el = 'link_' . $attrs['rel'];
-			}
-
-			$this->append($link_el, $attrs['href']);
-		}
-		// set stack[0] to current element
-		else {
-			array_unshift($this->stack, $el);
-		}
-	}
-
-	function feed_cdata ($p, $text) {
-
-		if ($this->feed_type == ATOM and $this->incontent)
-		{
-			$this->append_content( $text );
-		}
-		else {
-			$current_el = join('_', array_reverse($this->stack));
-			$this->append($current_el, $text);
-		}
-	}
-
-	function feed_end_element ($p, $el) {
-		$el = strtolower($el);
-
-		if ( $el == 'item' or $el == 'entry' )
-		{
-			$this->items[] = $this->current_item;
-			$this->current_item = array();
-			$this->initem = false;
-		}
-		elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'textinput' )
-		{
-			$this->intextinput = false;
-		}
-		elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'image' )
-		{
-			$this->inimage = false;
-		}
-		elseif ($this->feed_type == ATOM and in_array($el, $this->_CONTENT_CONSTRUCTS) )
-		{
-			$this->incontent = false;
-		}
-		elseif ($el == 'channel' or $el == 'feed' )
-		{
-			$this->inchannel = false;
-		}
-		elseif ($this->feed_type == ATOM and $this->incontent  ) {
-			// balance tags properly
-			// note: This may not actually be necessary
-			if ( $this->stack[0] == $el )
-			{
-				$this->append_content("</$el>");
-			}
-			else {
-				$this->append_content("<$el />");
-			}
-
-			array_shift( $this->stack );
-		}
-		else {
-			array_shift( $this->stack );
-		}
-
-		$this->current_namespace = false;
-	}
-
-	function concat (&$str1, $str2="") {
-		if (!isset($str1) ) {
-			$str1="";
-		}
-		$str1 .= $str2;
-	}
-
-	function append_content($text) {
-		if ( $this->initem ) {
-			$this->concat( $this->current_item[ $this->incontent ], $text );
-		}
-		elseif ( $this->inchannel ) {
-			$this->concat( $this->channel[ $this->incontent ], $text );
-		}
-	}
-
-	// smart append - field and namespace aware
-	function append($el, $text) {
-		if (!$el) {
-			return;
-		}
-		if ( $this->current_namespace )
-		{
-			if ( $this->initem ) {
-				$this->concat(
-					$this->current_item[ $this->current_namespace ][ $el ], $text);
-			}
-			elseif ($this->inchannel) {
-				$this->concat(
-					$this->channel[ $this->current_namespace][ $el ], $text );
-			}
-			elseif ($this->intextinput) {
-				$this->concat(
-					$this->textinput[ $this->current_namespace][ $el ], $text );
-			}
-			elseif ($this->inimage) {
-				$this->concat(
-					$this->image[ $this->current_namespace ][ $el ], $text );
-			}
-		}
-		else {
-			if ( $this->initem ) {
-				$this->concat(
-					$this->current_item[ $el ], $text);
-			}
-			elseif ($this->intextinput) {
-				$this->concat(
-					$this->textinput[ $el ], $text );
-			}
-			elseif ($this->inimage) {
-				$this->concat(
-					$this->image[ $el ], $text );
-			}
-			elseif ($this->inchannel) {
-				$this->concat(
-					$this->channel[ $el ], $text );
-			}
-
-		}
-	}
-
-	function normalize () {
-		// if atom populate rss fields
-		if ( $this->is_atom() ) {
-			$this->channel['descripton'] = $this->channel['tagline'];
-			for ( $i = 0; $i < count($this->items); $i++) {
-				$item = $this->items[$i];
-				if ( isset($item['summary']) )
-					$item['description'] = $item['summary'];
-				if ( isset($item['atom_content']))
-					$item['content']['encoded'] = $item['atom_content'];
-
-				$this->items[$i] = $item;
-			}
-		}
-		elseif ( $this->is_rss() ) {
-			$this->channel['tagline'] = $this->channel['description'];
-			for ( $i = 0; $i < count($this->items); $i++) {
-				$item = $this->items[$i];
-				if ( isset($item['description']))
-					$item['summary'] = $item['description'];
-				if ( isset($item['content']['encoded'] ) )
-					$item['atom_content'] = $item['content']['encoded'];
-
-				$this->items[$i] = $item;
-			}
-		}
-	}
-
-	function is_rss () {
-		if ( $this->feed_type == RSS ) {
-			return $this->feed_version;
-		}
-		else {
-			return false;
-		}
-	}
-
-	function is_atom() {
-		if ( $this->feed_type == ATOM ) {
-			return $this->feed_version;
-		}
-		else {
-			return false;
-		}
-	}
-
-	function map_attrs($k, $v) {
-		return "$k=\"$v\"";
-	}
-
-	function error( $errormsg, $lvl = E_USER_WARNING ) {
-		// append PHP's error message if track_errors enabled
-		if ( isset($php_errormsg) ) {
-			$errormsg .= " ($php_errormsg)";
-		}
-		if ( MAGPIE_DEBUG ) {
-			trigger_error( $errormsg, $lvl);
-		} else {
-			error_log( $errormsg, 0);
-		}
-	}
-
-}
-
-if ( !function_exists('fetch_rss') ) :
-/**
- * Build Magpie object based on RSS from URL.
- *
- * @since 1.5.0
- * @package External
- * @subpackage MagpieRSS
- *
- * @param string $url URL to retrieve feed
- * @return bool|MagpieRSS false on failure or MagpieRSS object on success.
- */
-function fetch_rss ($url) {
-	// initialize constants
-	init();
-
-	if ( !isset($url) ) {
-		// error("fetch_rss called without a url");
-		return false;
-	}
-
-	// if cache is disabled
-	if ( !MAGPIE_CACHE_ON ) {
-		// fetch file, and parse it
-		$resp = _fetch_remote_file( $url );
-		if ( is_success( $resp->status ) ) {
-			return _response_to_rss( $resp );
-		}
-		else {
-			// error("Failed to fetch $url and cache is off");
-			return false;
-		}
-	}
-	// else cache is ON
-	else {
-		// Flow
-		// 1. check cache
-		// 2. if there is a hit, make sure it's fresh
-		// 3. if cached obj fails freshness check, fetch remote
-		// 4. if remote fails, return stale object, or error
-
-		$cache = new RSSCache( MAGPIE_CACHE_DIR, MAGPIE_CACHE_AGE );
-
-		if (MAGPIE_DEBUG and $cache->ERROR) {
-			debug($cache->ERROR, E_USER_WARNING);
-		}
-
-		$cache_status 	 = 0;		// response of check_cache
-		$request_headers = array(); // HTTP headers to send with fetch
-		$rss 			 = 0;		// parsed RSS object
-		$errormsg		 = 0;		// errors, if any
-
-		if (!$cache->ERROR) {
-			// return cache HIT, MISS, or STALE
-			$cache_status = $cache->check_cache( $url );
-		}
-
-		// if object cached, and cache is fresh, return cached obj
-		if ( $cache_status == 'HIT' ) {
-			$rss = $cache->get( $url );
-			if ( isset($rss) and $rss ) {
-				$rss->from_cache = 1;
-				if ( MAGPIE_DEBUG > 1) {
-				debug("MagpieRSS: Cache HIT", E_USER_NOTICE);
-			}
-				return $rss;
-			}
-		}
-
-		// else attempt a conditional get
-
-		// set up headers
-		if ( $cache_status == 'STALE' ) {
-			$rss = $cache->get( $url );
-			if ( isset($rss->etag) and $rss->last_modified ) {
-				$request_headers['If-None-Match'] = $rss->etag;
-				$request_headers['If-Last-Modified'] = $rss->last_modified;
-			}
-		}
-
-		$resp = _fetch_remote_file( $url, $request_headers );
-
-		if (isset($resp) and $resp) {
-			if ($resp->status == '304' ) {
-				// we have the most current copy
-				if ( MAGPIE_DEBUG > 1) {
-					debug("Got 304 for $url");
-				}
-				// reset cache on 304 (at minutillo insistent prodding)
-				$cache->set($url, $rss);
-				return $rss;
-			}
-			elseif ( is_success( $resp->status ) ) {
-				$rss = _response_to_rss( $resp );
-				if ( $rss ) {
-					if (MAGPIE_DEBUG > 1) {
-						debug("Fetch successful");
-					}
-					// add object to cache
-					$cache->set( $url, $rss );
-					return $rss;
-				}
-			}
-			else {
-				$errormsg = "Failed to fetch $url. ";
-				if ( $resp->error ) {
-					# compensate for Snoopy's annoying habbit to tacking
-					# on '\n'
-					$http_error = substr($resp->error, 0, -2);
-					$errormsg .= "(HTTP Error: $http_error)";
-				}
-				else {
-					$errormsg .=  "(HTTP Response: " . $resp->response_code .')';
-				}
-			}
-		}
-		else {
-			$errormsg = "Unable to retrieve RSS file for unknown reasons.";
-		}
-
-		// else fetch failed
-
-		// attempt to return cached object
-		if ($rss) {
-			if ( MAGPIE_DEBUG ) {
-				debug("Returning STALE object for $url");
-			}
-			return $rss;
-		}
-
-		// else we totally failed
-		// error( $errormsg );
-
-		return false;
-
-	} // end if ( !MAGPIE_CACHE_ON ) {
-} // end fetch_rss()
-endif;
-
-/**
- * Retrieve URL headers and content using WP HTTP Request API.
- *
- * @since 1.5.0
- * @package External
- * @subpackage MagpieRSS
- *
- * @param string $url URL to retrieve
- * @param array $headers Optional. Headers to send to the URL.
- * @return Snoopy style response
- */
-function _fetch_remote_file($url, $headers = "" ) {
-	$resp = wp_safe_remote_request( $url, array( 'headers' => $headers, 'timeout' => MAGPIE_FETCH_TIME_OUT ) );
-	if ( is_wp_error($resp) ) {
-		$error = array_shift($resp->errors);
-
-		$resp = new stdClass;
-		$resp->status = 500;
-		$resp->response_code = 500;
-		$resp->error = $error[0] . "\n"; //\n = Snoopy compatibility
-		return $resp;
-	}
-
-	// Snoopy returns headers unprocessed.
-	// Also note, WP_HTTP lowercases all keys, Snoopy did not.
-	$return_headers = array();
-	foreach ( wp_remote_retrieve_headers( $resp ) as $key => $value ) {
-		if ( !is_array($value) ) {
-			$return_headers[] = "$key: $value";
-		} else {
-			foreach ( $value as $v )
-				$return_headers[] = "$key: $v";
-		}
-	}
-
-	$response = new stdClass;
-	$response->status = wp_remote_retrieve_response_code( $resp );
-	$response->response_code = wp_remote_retrieve_response_code( $resp );
-	$response->headers = $return_headers;
-	$response->results = wp_remote_retrieve_body( $resp );
-
-	return $response;
-}
-
-/**
- * Retrieve
- *
- * @since 1.5.0
- * @package External
- * @subpackage MagpieRSS
- *
- * @param array $resp
- * @return MagpieRSS|bool
- */
-function _response_to_rss ($resp) {
-	$rss = new MagpieRSS( $resp->results );
-
-	// if RSS parsed successfully
-	if ( $rss && (!isset($rss->ERROR) || !$rss->ERROR) ) {
-
-		// find Etag, and Last-Modified
-		foreach ( (array) $resp->headers as $h) {
-			// 2003-03-02 - Nicola Asuni (www.tecnick.com) - fixed bug "Undefined offset: 1"
-			if (strpos($h, ": ")) {
-				list($field, $val) = explode(": ", $h, 2);
-			}
-			else {
-				$field = $h;
-				$val = "";
-			}
-
-			if ( $field == 'etag' ) {
-				$rss->etag = $val;
-			}
-
-			if ( $field == 'last-modified' ) {
-				$rss->last_modified = $val;
-			}
-		}
-
-		return $rss;
-	} // else construct error message
-	else {
-		$errormsg = "Failed to parse RSS file.";
-
-		if ($rss) {
-			$errormsg .= " (" . $rss->ERROR . ")";
-		}
-		// error($errormsg);
-
-		return false;
-	} // end if ($rss and !$rss->error)
-}
-
-/**
- * Set up constants with default values, unless user overrides.
- *
- * @since 1.5.0
- * @package External
- * @subpackage MagpieRSS
- */
-function init () {
-	if ( defined('MAGPIE_INITALIZED') ) {
-		return;
-	}
-	else {
-		define('MAGPIE_INITALIZED', 1);
-	}
-
-	if ( !defined('MAGPIE_CACHE_ON') ) {
-		define('MAGPIE_CACHE_ON', 1);
-	}
-
-	if ( !defined('MAGPIE_CACHE_DIR') ) {
-		define('MAGPIE_CACHE_DIR', './cache');
-	}
-
-	if ( !defined('MAGPIE_CACHE_AGE') ) {
-		define('MAGPIE_CACHE_AGE', 60*60); // one hour
-	}
-
-	if ( !defined('MAGPIE_CACHE_FRESH_ONLY') ) {
-		define('MAGPIE_CACHE_FRESH_ONLY', 0);
-	}
-
-		if ( !defined('MAGPIE_DEBUG') ) {
-		define('MAGPIE_DEBUG', 0);
-	}
-
-	if ( !defined('MAGPIE_USER_AGENT') ) {
-		$ua = 'WordPress/' . $GLOBALS['wp_version'];
-
-		if ( MAGPIE_CACHE_ON ) {
-			$ua = $ua . ')';
-		}
-		else {
-			$ua = $ua . '; No cache)';
-		}
-
-		define('MAGPIE_USER_AGENT', $ua);
-	}
-
-	if ( !defined('MAGPIE_FETCH_TIME_OUT') ) {
-		define('MAGPIE_FETCH_TIME_OUT', 2);	// 2 second timeout
-	}
-
-	// use gzip encoding to fetch rss files if supported?
-	if ( !defined('MAGPIE_USE_GZIP') ) {
-		define('MAGPIE_USE_GZIP', true);
-	}
-}
-
-function is_info ($sc) {
-	return $sc >= 100 && $sc < 200;
-}
-
-function is_success ($sc) {
-	return $sc >= 200 && $sc < 300;
-}
-
-function is_redirect ($sc) {
-	return $sc >= 300 && $sc < 400;
-}
-
-function is_error ($sc) {
-	return $sc >= 400 && $sc < 600;
-}
-
-function is_client_error ($sc) {
-	return $sc >= 400 && $sc < 500;
-}
-
-function is_server_error ($sc) {
-	return $sc >= 500 && $sc < 600;
-}
-
-class RSSCache {
-	var $BASE_CACHE;	// where the cache files are stored
-	var $MAX_AGE	= 43200;  		// when are files stale, default twelve hours
-	var $ERROR 		= '';			// accumulate error messages
-
-	/**
-	 * PHP5 constructor.
-	 */
-	function __construct( $base = '', $age = '' ) {
-		$this->BASE_CACHE = WP_CONTENT_DIR . '/cache';
-		if ( $base ) {
-			$this->BASE_CACHE = $base;
-		}
-		if ( $age ) {
-			$this->MAX_AGE = $age;
-		}
-
-	}
-
-	/**
-	 * PHP4 constructor.
-	 */
-	public function RSSCache( $base = '', $age = '' ) {
-		self::__construct( $base, $age );
-	}
-
-/*=======================================================================*\
-	Function:	set
-	Purpose:	add an item to the cache, keyed on url
-	Input:		url from wich the rss file was fetched
-	Output:		true on success
-\*=======================================================================*/
-	function set ($url, $rss) {
-		$cache_option = 'rss_' . $this->file_name( $url );
-
-		set_transient($cache_option, $rss, $this->MAX_AGE);
-
-		return $cache_option;
-	}
-
-/*=======================================================================*\
-	Function:	get
-	Purpose:	fetch an item from the cache
-	Input:		url from wich the rss file was fetched
-	Output:		cached object on HIT, false on MISS
-\*=======================================================================*/
-	function get ($url) {
-		$this->ERROR = "";
-		$cache_option = 'rss_' . $this->file_name( $url );
-
-		if ( ! $rss = get_transient( $cache_option ) ) {
-			$this->debug(
-				"Cache doesn't contain: $url (cache option: $cache_option)"
-			);
-			return 0;
-		}
-
-		return $rss;
-	}
-
-/*=======================================================================*\
-	Function:	check_cache
-	Purpose:	check a url for membership in the cache
-				and whether the object is older then MAX_AGE (ie. STALE)
-	Input:		url from wich the rss file was fetched
-	Output:		cached object on HIT, false on MISS
-\*=======================================================================*/
-	function check_cache ( $url ) {
-		$this->ERROR = "";
-		$cache_option = 'rss_' . $this->file_name( $url );
-
-		if ( get_transient($cache_option) ) {
-			// object exists and is current
-				return 'HIT';
-		} else {
-			// object does not exist
-			return 'MISS';
-		}
-	}
-
-/*=======================================================================*\
-	Function:	serialize
-\*=======================================================================*/
-	function serialize ( $rss ) {
-		return serialize( $rss );
-	}
-
-/*=======================================================================*\
-	Function:	unserialize
-\*=======================================================================*/
-	function unserialize ( $data ) {
-		return unserialize( $data );
-	}
-
-/*=======================================================================*\
-	Function:	file_name
-	Purpose:	map url to location in cache
-	Input:		url from wich the rss file was fetched
-	Output:		a file name
-\*=======================================================================*/
-	function file_name ($url) {
-		return md5( $url );
-	}
-
-/*=======================================================================*\
-	Function:	error
-	Purpose:	register error
-\*=======================================================================*/
-	function error ($errormsg, $lvl=E_USER_WARNING) {
-		// append PHP's error message if track_errors enabled
-		if ( isset($php_errormsg) ) {
-			$errormsg .= " ($php_errormsg)";
-		}
-		$this->ERROR = $errormsg;
-		if ( MAGPIE_DEBUG ) {
-			trigger_error( $errormsg, $lvl);
-		}
-		else {
-			error_log( $errormsg, 0);
-		}
-	}
-			function debug ($debugmsg, $lvl=E_USER_NOTICE) {
-		if ( MAGPIE_DEBUG ) {
-			$this->error("MagpieRSS [debug] $debugmsg", $lvl);
-		}
-	}
-}
-
-if ( !function_exists('parse_w3cdtf') ) :
-function parse_w3cdtf ( $date_str ) {
-
-	# regex to match wc3dtf
-	$pat = "/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(:(\d{2}))?(?:([-+])(\d{2}):?(\d{2})|(Z))?/";
-
-	if ( preg_match( $pat, $date_str, $match ) ) {
-		list( $year, $month, $day, $hours, $minutes, $seconds) =
-			array( $match[1], $match[2], $match[3], $match[4], $match[5], $match[7]);
-
-		# calc epoch for current date assuming GMT
-		$epoch = gmmktime( $hours, $minutes, $seconds, $month, $day, $year);
-
-		$offset = 0;
-		if ( $match[11] == 'Z' ) {
-			# zulu time, aka GMT
-		}
-		else {
-			list( $tz_mod, $tz_hour, $tz_min ) =
-				array( $match[8], $match[9], $match[10]);
-
-			# zero out the variables
-			if ( ! $tz_hour ) { $tz_hour = 0; }
-			if ( ! $tz_min ) { $tz_min = 0; }
-
-			$offset_secs = (($tz_hour*60)+$tz_min)*60;
-
-			# is timezone ahead of GMT?  then subtract offset
-			#
-			if ( $tz_mod == '+' ) {
-				$offset_secs = $offset_secs * -1;
-			}
-
-			$offset = $offset_secs;
-		}
-		$epoch = $epoch + $offset;
-		return $epoch;
-	}
-	else {
-		return -1;
-	}
-}
-endif;
-
-if ( !function_exists('wp_rss') ) :
-/**
- * Display all RSS items in a HTML ordered list.
- *
- * @since 1.5.0
- * @package External
- * @subpackage MagpieRSS
- *
- * @param string $url URL of feed to display. Will not auto sense feed URL.
- * @param int $num_items Optional. Number of items to display, default is all.
- */
-function wp_rss( $url, $num_items = -1 ) {
-	if ( $rss = fetch_rss( $url ) ) {
-		echo '<ul>';
-
-		if ( $num_items !== -1 ) {
-			$rss->items = array_slice( $rss->items, 0, $num_items );
-		}
-
-		foreach ( (array) $rss->items as $item ) {
-			printf(
-				'<li><a href="%1$s" title="%2$s">%3$s</a></li>',
-				esc_url( $item['link'] ),
-				esc_attr( strip_tags( $item['description'] ) ),
-				esc_html( $item['title'] )
-			);
-		}
-
-		echo '</ul>';
-	} else {
-		_e( 'An error has occurred, which probably means the feed is down. Try again later.' );
-	}
-}
-endif;
-
-if ( !function_exists('get_rss') ) :
-/**
- * Display RSS items in HTML list items.
- *
- * You have to specify which HTML list you want, either ordered or unordered
- * before using the function. You also have to specify how many items you wish
- * to display. You can't display all of them like you can with wp_rss()
- * function.
- *
- * @since 1.5.0
- * @package External
- * @subpackage MagpieRSS
- *
- * @param string $url URL of feed to display. Will not auto sense feed URL.
- * @param int $num_items Optional. Number of items to display, default is all.
- * @return bool False on failure.
- */
-function get_rss ($url, $num_items = 5) { // Like get posts, but for RSS
-	$rss = fetch_rss($url);
-	if ( $rss ) {
-		$rss->items = array_slice($rss->items, 0, $num_items);
-		foreach ( (array) $rss->items as $item ) {
-			echo "<li>\n";
-			echo "<a href='$item[link]' title='$item[description]'>";
-			echo esc_html($item['title']);
-			echo "</a><br />\n";
-			echo "</li>\n";
-		}
-	} else {
-		return false;
-	}
-}
-endif;
Index: www/wp-includes/class-wp-http-cookie.php
===================================================================
--- www/wp-includes/class-wp-http-cookie.php	(revision 38565)
+++ www/wp-includes/autoload/http/WP_Http_Cookie.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-requests.php
===================================================================
--- www/wp-includes/class-requests.php	(revision 38565)
+++ www/wp-includes/autoload/external/Requests.php	(revision )
@@ -124,39 +124,6 @@
 	private function __construct() {}
 
 	/**
-	 * Autoloader for Requests
-	 *
-	 * Register this with {@see register_autoloader()} if you'd like to avoid
-	 * having to create your own.
-	 *
-	 * (You can also use `spl_autoload_register` directly if you'd prefer.)
-	 *
-	 * @codeCoverageIgnore
-	 *
-	 * @param string $class Class name to load
-	 */
-	public static function autoloader($class) {
-		// Check that the class starts with "Requests"
-		if (strpos($class, 'Requests') !== 0) {
-			return;
-		}
-
-		$file = str_replace('_', '/', $class);
-		if (file_exists(dirname(__FILE__) . '/' . $file . '.php')) {
-			require_once(dirname(__FILE__) . '/' . $file . '.php');
-		}
-	}
-
-	/**
-	 * Register the built-in autoloader
-	 *
-	 * @codeCoverageIgnore
-	 */
-	public static function register_autoloader() {
-		spl_autoload_register(array('Requests', 'autoloader'));
-	}
-
-	/**
 	 * Register a transport
 	 *
 	 * @param string $transport Transport class to add, must support the Requests_Transport interface
Index: www/wp-admin/includes/class-wp-importer.php
===================================================================
--- www/wp-admin/includes/class-wp-importer.php	(revision 38565)
+++ www/wp-admin/autoload/WP_Importer.php	(revision )
@@ -260,60 +260,3 @@
 	}
 }
 
-/**
- * Returns value of command line params.
- * Exits when a required param is not set.
- *
- * @param string $param
- * @param bool   $required
- * @return mixed
- */
-function get_cli_args( $param, $required = false ) {
-	$args = $_SERVER['argv'];
-
-	$out = array();
-
-	$last_arg = null;
-	$return = null;
-
-	$il = sizeof( $args );
-
-	for ( $i = 1, $il; $i < $il; $i++ ) {
-		if ( (bool) preg_match( "/^--(.+)/", $args[$i], $match ) ) {
-			$parts = explode( "=", $match[1] );
-			$key = preg_replace( "/[^a-z0-9]+/", "", $parts[0] );
-
-			if ( isset( $parts[1] ) ) {
-				$out[$key] = $parts[1];
-			} else {
-				$out[$key] = true;
-			}
-
-			$last_arg = $key;
-		} elseif ( (bool) preg_match( "/^-([a-zA-Z0-9]+)/", $args[$i], $match ) ) {
-			for ( $j = 0, $jl = strlen( $match[1] ); $j < $jl; $j++ ) {
-				$key = $match[1]{$j};
-				$out[$key] = true;
-			}
-
-			$last_arg = $key;
-		} elseif ( $last_arg !== null ) {
-			$out[$last_arg] = $args[$i];
-		}
-	}
-
-	// Check array for specified param
-	if ( isset( $out[$param] ) ) {
-		// Set return value
-		$return = $out[$param];
-	}
-
-	// Check for missing required param
-	if ( !isset( $out[$param] ) && $required ) {
-		// Display message and exit
-		echo "\"$param\" parameter is required but was not specified\n";
-		exit();
-	}
-
-	return $return;
-}
Index: www/wp-includes/class-phpass.php
===================================================================
--- www/wp-includes/class-phpass.php	(revision 38565)
+++ www/wp-includes/autoload/external/PasswordHash.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/edit-comments.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/edit-comments.php	(revision 38565)
+++ www/wp-admin/edit-comments.php	(revision 38565)
@@ -1,310 +0,0 @@
-<?php
-/**
- * Edit Comments Administration Screen.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-if ( ! current_user_can( 'edit_posts' ) ) {
-	wp_die(
-		'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-		'<p>' . __( 'Sorry, you are not allowed to edit comments.' ) . '</p>',
-		403
-	);
-}
-
-$wp_list_table = _get_list_table('WP_Comments_List_Table');
-$pagenum = $wp_list_table->get_pagenum();
-
-$doaction = $wp_list_table->current_action();
-
-if ( $doaction ) {
-	check_admin_referer( 'bulk-comments' );
-
-	if ( 'delete_all' == $doaction && !empty( $_REQUEST['pagegen_timestamp'] ) ) {
-		$comment_status = wp_unslash( $_REQUEST['comment_status'] );
-		$delete_time = wp_unslash( $_REQUEST['pagegen_timestamp'] );
-		$comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT comment_ID FROM $wpdb->comments WHERE comment_approved = %s AND %s > comment_date_gmt", $comment_status, $delete_time ) );
-		$doaction = 'delete';
-	} elseif ( isset( $_REQUEST['delete_comments'] ) ) {
-		$comment_ids = $_REQUEST['delete_comments'];
-		$doaction = ( $_REQUEST['action'] != -1 ) ? $_REQUEST['action'] : $_REQUEST['action2'];
-	} elseif ( isset( $_REQUEST['ids'] ) ) {
-		$comment_ids = array_map( 'absint', explode( ',', $_REQUEST['ids'] ) );
-	} elseif ( wp_get_referer() ) {
-		wp_safe_redirect( wp_get_referer() );
-		exit;
-	}
-
-	$approved = $unapproved = $spammed = $unspammed = $trashed = $untrashed = $deleted = 0;
-
-	$redirect_to = remove_query_arg( array( 'trashed', 'untrashed', 'deleted', 'spammed', 'unspammed', 'approved', 'unapproved', 'ids' ), wp_get_referer() );
-	$redirect_to = add_query_arg( 'paged', $pagenum, $redirect_to );
-
-	wp_defer_comment_counting( true );
-
-	foreach ( $comment_ids as $comment_id ) { // Check the permissions on each
-		if ( !current_user_can( 'edit_comment', $comment_id ) )
-			continue;
-
-		switch ( $doaction ) {
-			case 'approve' :
-				wp_set_comment_status( $comment_id, 'approve' );
-				$approved++;
-				break;
-			case 'unapprove' :
-				wp_set_comment_status( $comment_id, 'hold' );
-				$unapproved++;
-				break;
-			case 'spam' :
-				wp_spam_comment( $comment_id );
-				$spammed++;
-				break;
-			case 'unspam' :
-				wp_unspam_comment( $comment_id );
-				$unspammed++;
-				break;
-			case 'trash' :
-				wp_trash_comment( $comment_id );
-				$trashed++;
-				break;
-			case 'untrash' :
-				wp_untrash_comment( $comment_id );
-				$untrashed++;
-				break;
-			case 'delete' :
-				wp_delete_comment( $comment_id );
-				$deleted++;
-				break;
-		}
-	}
-
-	wp_defer_comment_counting( false );
-
-	if ( $approved )
-		$redirect_to = add_query_arg( 'approved', $approved, $redirect_to );
-	if ( $unapproved )
-		$redirect_to = add_query_arg( 'unapproved', $unapproved, $redirect_to );
-	if ( $spammed )
-		$redirect_to = add_query_arg( 'spammed', $spammed, $redirect_to );
-	if ( $unspammed )
-		$redirect_to = add_query_arg( 'unspammed', $unspammed, $redirect_to );
-	if ( $trashed )
-		$redirect_to = add_query_arg( 'trashed', $trashed, $redirect_to );
-	if ( $untrashed )
-		$redirect_to = add_query_arg( 'untrashed', $untrashed, $redirect_to );
-	if ( $deleted )
-		$redirect_to = add_query_arg( 'deleted', $deleted, $redirect_to );
-	if ( $trashed || $spammed )
-		$redirect_to = add_query_arg( 'ids', join( ',', $comment_ids ), $redirect_to );
-
-	wp_safe_redirect( $redirect_to );
-	exit;
-} elseif ( ! empty( $_GET['_wp_http_referer'] ) ) {
-	 wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
-	 exit;
-}
-
-$wp_list_table->prepare_items();
-
-wp_enqueue_script('admin-comments');
-enqueue_comment_hotkeys_js();
-
-if ( $post_id ) {
-	$comments_count = wp_count_comments( $post_id );
-	$draft_or_post_title = wp_html_excerpt( _draft_or_post_title( $post_id ), 50, '&hellip;' );
-	if ( $comments_count->moderated > 0 ) {
-		/* translators: 1: comments count 2: post title */
-		$title = sprintf( __( 'Comments (%1$s) on &#8220;%2$s&#8221;' ),
-			number_format_i18n( $comments_count->moderated ),
-			$draft_or_post_title
-		);
-	} else {
-		/* translators: %s: post title */
-		$title = sprintf( __( 'Comments on &#8220;%s&#8221;' ),
-			$draft_or_post_title
-		);
-	}
-} else {
-	$comments_count = wp_count_comments();
-	if ( $comments_count->moderated > 0 ) {
-		/* translators: %s: comments count */
-		$title = sprintf( __( 'Comments (%s)' ),
-			number_format_i18n( $comments_count->moderated )
-		);
-	} else {
-		$title = __( 'Comments' );
-	}
-}
-
-add_screen_option( 'per_page' );
-
-get_current_screen()->add_help_tab( array(
-'id'		=> 'overview',
-'title'		=> __('Overview'),
-'content'	=>
-	'<p>' . __( 'You can manage comments made on your site similar to the way you manage posts and other content. This screen is customizable in the same ways as other management screens, and you can act on comments using the on-hover action links or the Bulk Actions.' ) . '</p>'
-) );
-get_current_screen()->add_help_tab( array(
-'id'		=> 'moderating-comments',
-'title'		=> __('Moderating Comments'),
-'content'	=>
-		'<p>' . __( 'A red bar on the left means the comment is waiting for you to moderate it.' ) . '</p>' .
-		'<p>' . __( 'In the <strong>Author</strong> column, in addition to the author&#8217;s name, email address, and blog URL, the commenter&#8217;s IP address is shown. Clicking on this link will show you all the comments made from this IP address.' ) . '</p>' .
-		'<p>' . __( 'In the <strong>Comment</strong> column, hovering over any comment gives you options to approve, reply (and approve), quick edit, edit, spam mark, or trash that comment.' ) . '</p>' .
-		'<p>' . __( 'In the <strong>In Response To</strong> column, there are three elements. The text is the name of the post that inspired the comment, and links to the post editor for that entry. The View Post link leads to that post on your live site. The small bubble with the number in it shows the number of approved comments that post has received. If there are pending comments, a red notification circle with the number of pending comments is displayed. Clicking the notification circle will filter the comments screen to show only pending comments on that post.' ) . '</p>' .
-		'<p>' . __( 'In the <strong>Submitted On</strong> column, the date and time the comment was left on your site appears. Clicking on the date/time link will take you to that comment on your live site.' ) . '</p>' .
-		'<p>' . __( 'Many people take advantage of keyboard shortcuts to moderate their comments more quickly. Use the link to the side to learn more.' ) . '</p>'
-) );
-
-get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
-	'<p>' . __( '<a href="https://codex.wordpress.org/Administration_Screens#Comments" target="_blank">Documentation on Comments</a>' ) . '</p>' .
-	'<p>' . __( '<a href="https://codex.wordpress.org/Comment_Spam" target="_blank">Documentation on Comment Spam</a>' ) . '</p>' .
-	'<p>' . __( '<a href="https://codex.wordpress.org/Keyboard_Shortcuts" target="_blank">Documentation on Keyboard Shortcuts</a>' ) . '</p>' .
-	'<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
-);
-
-get_current_screen()->set_screen_reader_content( array(
-	'heading_views'      => __( 'Filter comments list' ),
-	'heading_pagination' => __( 'Comments list navigation' ),
-	'heading_list'       => __( 'Comments list' ),
-) );
-
-require_once( ABSPATH . 'wp-admin/admin-header.php' );
-?>
-
-<div class="wrap">
-<h1><?php
-if ( $post_id ) {
-	/* translators: %s: link to post */
-	printf( __( 'Comments on &#8220;%s&#8221;' ),
-		sprintf( '<a href="%1$s">%2$s</a>',
-			get_edit_post_link( $post_id ),
-			wp_html_excerpt( _draft_or_post_title( $post_id ), 50, '&hellip;' )
-		)
-	);
-} else {
-	_e( 'Comments' );
-}
-
-if ( isset($_REQUEST['s']) && strlen( $_REQUEST['s'] ) ) {
-	echo '<span class="subtitle">';
-	/* translators: %s: search keywords */
-	printf( __( 'Search results for &#8220;%s&#8221;' ),
-		wp_html_excerpt( esc_html( wp_unslash( $_REQUEST['s'] ) ), 50, '&hellip;' )
-	);
-	echo '</span>';
-}
-?></h1>
-
-<?php
-if ( isset( $_REQUEST['error'] ) ) {
-	$error = (int) $_REQUEST['error'];
-	$error_msg = '';
-	switch ( $error ) {
-		case 1 :
-			$error_msg = __( 'Invalid comment ID.' );
-			break;
-		case 2 :
-			$error_msg = __( 'Sorry, you are not allowed to edit comments on this post.' );
-			break;
-	}
-	if ( $error_msg )
-		echo '<div id="moderated" class="error"><p>' . $error_msg . '</p></div>';
-}
-
-if ( isset($_REQUEST['approved']) || isset($_REQUEST['deleted']) || isset($_REQUEST['trashed']) || isset($_REQUEST['untrashed']) || isset($_REQUEST['spammed']) || isset($_REQUEST['unspammed']) || isset($_REQUEST['same']) ) {
-	$approved  = isset( $_REQUEST['approved']  ) ? (int) $_REQUEST['approved']  : 0;
-	$deleted   = isset( $_REQUEST['deleted']   ) ? (int) $_REQUEST['deleted']   : 0;
-	$trashed   = isset( $_REQUEST['trashed']   ) ? (int) $_REQUEST['trashed']   : 0;
-	$untrashed = isset( $_REQUEST['untrashed'] ) ? (int) $_REQUEST['untrashed'] : 0;
-	$spammed   = isset( $_REQUEST['spammed']   ) ? (int) $_REQUEST['spammed']   : 0;
-	$unspammed = isset( $_REQUEST['unspammed'] ) ? (int) $_REQUEST['unspammed'] : 0;
-	$same      = isset( $_REQUEST['same'] )      ? (int) $_REQUEST['same']      : 0;
-
-	if ( $approved > 0 || $deleted > 0 || $trashed > 0 || $untrashed > 0 || $spammed > 0 || $unspammed > 0 || $same > 0 ) {
-		if ( $approved > 0 ) {
-			/* translators: %s: number of comments approved */
-			$messages[] = sprintf( _n( '%s comment approved', '%s comments approved', $approved ), $approved );
-		}
-
-		if ( $spammed > 0 ) {
-			$ids = isset($_REQUEST['ids']) ? $_REQUEST['ids'] : 0;
-			/* translators: %s: number of comments marked as spam */
-			$messages[] = sprintf( _n( '%s comment marked as spam.', '%s comments marked as spam.', $spammed ), $spammed ) . ' <a href="' . esc_url( wp_nonce_url( "edit-comments.php?doaction=undo&action=unspam&ids=$ids", "bulk-comments" ) ) . '">' . __('Undo') . '</a><br />';
-		}
-
-		if ( $unspammed > 0 ) {
-			/* translators: %s: number of comments restored from the spam */
-			$messages[] = sprintf( _n( '%s comment restored from the spam', '%s comments restored from the spam', $unspammed ), $unspammed );
-		}
-
-		if ( $trashed > 0 ) {
-			$ids = isset($_REQUEST['ids']) ? $_REQUEST['ids'] : 0;
-			/* translators: %s: number of comments moved to the Trash */
-			$messages[] = sprintf( _n( '%s comment moved to the Trash.', '%s comments moved to the Trash.', $trashed ), $trashed ) . ' <a href="' . esc_url( wp_nonce_url( "edit-comments.php?doaction=undo&action=untrash&ids=$ids", "bulk-comments" ) ) . '">' . __('Undo') . '</a><br />';
-		}
-
-		if ( $untrashed > 0 ) {
-			/* translators: %s: number of comments restored from the Trash */
-			$messages[] = sprintf( _n( '%s comment restored from the Trash', '%s comments restored from the Trash', $untrashed ), $untrashed );
-		}
-
-		if ( $deleted > 0 ) {
-			/* translators: %s: number of comments permanently deleted */
-			$messages[] = sprintf( _n( '%s comment permanently deleted', '%s comments permanently deleted', $deleted ), $deleted );
-		}
-
-		if ( $same > 0 && $comment = get_comment( $same ) ) {
-			switch ( $comment->comment_approved ) {
-				case '1' :
-					$messages[] = __('This comment is already approved.') . ' <a href="' . esc_url( admin_url( "comment.php?action=editcomment&c=$same" ) ) . '">' . __( 'Edit comment' ) . '</a>';
-					break;
-				case 'trash' :
-					$messages[] = __( 'This comment is already in the Trash.' ) . ' <a href="' . esc_url( admin_url( 'edit-comments.php?comment_status=trash' ) ) . '"> ' . __( 'View Trash' ) . '</a>';
-					break;
-				case 'spam' :
-					$messages[] = __( 'This comment is already marked as spam.' ) . ' <a href="' . esc_url( admin_url( "comment.php?action=editcomment&c=$same" ) ) . '">' . __( 'Edit comment' ) . '</a>';
-					break;
-			}
-		}
-
-		echo '<div id="moderated" class="updated notice is-dismissible"><p>' . implode( "<br/>\n", $messages ) . '</p></div>';
-	}
-}
-?>
-
-<?php $wp_list_table->views(); ?>
-
-<form id="comments-form" method="get">
-
-<?php $wp_list_table->search_box( __( 'Search Comments' ), 'comment' ); ?>
-
-<?php if ( $post_id ) : ?>
-<input type="hidden" name="p" value="<?php echo esc_attr( intval( $post_id ) ); ?>" />
-<?php endif; ?>
-<input type="hidden" name="comment_status" value="<?php echo esc_attr($comment_status); ?>" />
-<input type="hidden" name="pagegen_timestamp" value="<?php echo esc_attr(current_time('mysql', 1)); ?>" />
-
-<input type="hidden" name="_total" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg('total_items') ); ?>" />
-<input type="hidden" name="_per_page" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg('per_page') ); ?>" />
-<input type="hidden" name="_page" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg('page') ); ?>" />
-
-<?php if ( isset($_REQUEST['paged']) ) { ?>
-	<input type="hidden" name="paged" value="<?php echo esc_attr( absint( $_REQUEST['paged'] ) ); ?>" />
-<?php } ?>
-
-<?php $wp_list_table->display(); ?>
-</form>
-</div>
-
-<div id="ajax-response"></div>
-
-<?php
-wp_comment_reply('-1', true, 'detail');
-wp_comment_trashnotice();
-include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>
Index: www/wp-includes/class-walker-page.php
===================================================================
--- www/wp-includes/class-walker-page.php	(revision 38565)
+++ www/wp-includes/autoload/walker/Walker_Page.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/requests/Proxy.php
===================================================================
--- www/wp-includes/autoload/requests/Proxy.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Proxy.php	(revision UNDEFINED)
@@ -1,35 +0,0 @@
-<?php
-/**
- * Proxy connection interface
- *
- * @package Requests
- * @subpackage Proxy
- * @since 1.6
- */
-
-/**
- * Proxy connection interface
- *
- * Implement this interface to handle proxy settings and authentication
- *
- * Parameters should be passed via the constructor where possible, as this
- * makes it much easier for users to use your provider.
- *
- * @see Requests_Hooks
- * @package Requests
- * @subpackage Proxy
- * @since 1.6
- */
-interface Requests_Proxy {
-	/**
-	 * Register hooks as needed
-	 *
-	 * This method is called in {@see Requests::request} when the user has set
-	 * an instance as the 'auth' option. Use this callback to register all the
-	 * hooks you'll need.
-	 *
-	 * @see Requests_Hooks::register
-	 * @param Requests_Hooks $hooks Hook system
-	 */
-	public function register(Requests_Hooks &$hooks);
-}
\ No newline at end of file
Index: www/wp-admin/autoload/zip/PclZip.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/autoload/zip/PclZip.php	(revision )
+++ www/wp-admin/autoload/zip/PclZip.php	(revision )
@@ -0,0 +1,5238 @@
+<?php
+// --------------------------------------------------------------------------------
+// PhpConcept Library - Zip Module 2.8.2
+// --------------------------------------------------------------------------------
+// License GNU/LGPL - Vincent Blavet - August 2009
+// http://www.phpconcept.net
+// --------------------------------------------------------------------------------
+//
+// Presentation :
+//   PclZip is a PHP library that manage ZIP archives.
+//   So far tests show that archives generated by PclZip are readable by
+//   WinZip application and other tools.
+//
+// Description :
+//   See readme.txt and http://www.phpconcept.net
+//
+// Warning :
+//   This library and the associated files are non commercial, non professional
+//   work.
+//   It should not have unexpected results. However if any damage is caused by
+//   this software the author can not be responsible.
+//   The use of this software is at the risk of the user.
+//
+// --------------------------------------------------------------------------------
+// $Id: pclzip.lib.php,v 1.60 2009/09/30 21:01:04 vblavet Exp $
+// --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Class : PclZip
+  // Description :
+  //   PclZip is the class that represent a Zip archive.
+  //   The public methods allow the manipulation of the archive.
+  // Attributes :
+  //   Attributes must not be accessed directly.
+  // Methods :
+  //   PclZip() : Object creator
+  //   create() : Creates the Zip archive
+  //   listContent() : List the content of the Zip archive
+  //   extract() : Extract the content of the archive
+  //   properties() : List the properties of the archive
+  // --------------------------------------------------------------------------------
+  class PclZip
+  {
+    // ----- Filename of the zip file
+    var $zipname = '';
+
+    // ----- File descriptor of the zip file
+    var $zip_fd = 0;
+
+    // ----- Internal error handling
+    var $error_code = 1;
+    var $error_string = '';
+
+    // ----- Current status of the magic_quotes_runtime
+    // This value store the php configuration for magic_quotes
+    // The class can then disable the magic_quotes and reset it after
+    var $magic_quotes_status;
+
+  // --------------------------------------------------------------------------------
+  // Function : PclZip()
+  // Description :
+  //   Creates a PclZip object and set the name of the associated Zip archive
+  //   filename.
+  //   Note that no real action is taken, if the archive does not exist it is not
+  //   created. Use create() for that.
+  // --------------------------------------------------------------------------------
+  function __construct($p_zipname)
+  {
+
+    // ----- Tests the zlib
+    if (!function_exists('gzopen'))
+    {
+      die('Abort '.basename(__FILE__).' : Missing zlib extensions');
+    }
+
+    // ----- Set the attributes
+    $this->zipname = $p_zipname;
+    $this->zip_fd = 0;
+    $this->magic_quotes_status = -1;
+
+    // ----- Return
+    return;
+  }
+
+  public function PclZip($p_zipname) {
+    self::__construct($p_zipname);
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function :
+  //   create($p_filelist, $p_add_dir="", $p_remove_dir="")
+  //   create($p_filelist, $p_option, $p_option_value, ...)
+  // Description :
+  //   This method supports two different synopsis. The first one is historical.
+  //   This method creates a Zip Archive. The Zip file is created in the
+  //   filesystem. The files and directories indicated in $p_filelist
+  //   are added in the archive. See the parameters description for the
+  //   supported format of $p_filelist.
+  //   When a directory is in the list, the directory and its content is added
+  //   in the archive.
+  //   In this synopsis, the function takes an optional variable list of
+  //   options. See bellow the supported options.
+  // Parameters :
+  //   $p_filelist : An array containing file or directory names, or
+  //                 a string containing one filename or one directory name, or
+  //                 a string containing a list of filenames and/or directory
+  //                 names separated by spaces.
+  //   $p_add_dir : A path to add before the real path of the archived file,
+  //                in order to have it memorized in the archive.
+  //   $p_remove_dir : A path to remove from the real path of the file to archive,
+  //                   in order to have a shorter path memorized in the archive.
+  //                   When $p_add_dir and $p_remove_dir are set, $p_remove_dir
+  //                   is removed first, before $p_add_dir is added.
+  // Options :
+  //   PCLZIP_OPT_ADD_PATH :
+  //   PCLZIP_OPT_REMOVE_PATH :
+  //   PCLZIP_OPT_REMOVE_ALL_PATH :
+  //   PCLZIP_OPT_COMMENT :
+  //   PCLZIP_CB_PRE_ADD :
+  //   PCLZIP_CB_POST_ADD :
+  // Return Values :
+  //   0 on failure,
+  //   The list of the added files, with a status of the add action.
+  //   (see PclZip::listContent() for list entry format)
+  // --------------------------------------------------------------------------------
+  function create($p_filelist)
+  {
+    $v_result=1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Set default values
+    $v_options = array();
+    $v_options[PCLZIP_OPT_NO_COMPRESSION] = FALSE;
+
+    // ----- Look for variable options arguments
+    $v_size = func_num_args();
+
+    // ----- Look for arguments
+    if ($v_size > 1) {
+      // ----- Get the arguments
+      $v_arg_list = func_get_args();
+
+      // ----- Remove from the options list the first argument
+      array_shift($v_arg_list);
+      $v_size--;
+
+      // ----- Look for first arg
+      if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
+
+        // ----- Parse the options
+        $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
+                                            array (PCLZIP_OPT_REMOVE_PATH => 'optional',
+                                                   PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
+                                                   PCLZIP_OPT_ADD_PATH => 'optional',
+                                                   PCLZIP_CB_PRE_ADD => 'optional',
+                                                   PCLZIP_CB_POST_ADD => 'optional',
+                                                   PCLZIP_OPT_NO_COMPRESSION => 'optional',
+                                                   PCLZIP_OPT_COMMENT => 'optional',
+                                                   PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional',
+                                                   PCLZIP_OPT_TEMP_FILE_ON => 'optional',
+                                                   PCLZIP_OPT_TEMP_FILE_OFF => 'optional'
+                                                   //, PCLZIP_OPT_CRYPT => 'optional'
+                                             ));
+        if ($v_result != 1) {
+          return 0;
+        }
+      }
+
+      // ----- Look for 2 args
+      // Here we need to support the first historic synopsis of the
+      // method.
+      else {
+
+        // ----- Get the first argument
+        $v_options[PCLZIP_OPT_ADD_PATH] = $v_arg_list[0];
+
+        // ----- Look for the optional second argument
+        if ($v_size == 2) {
+          $v_options[PCLZIP_OPT_REMOVE_PATH] = $v_arg_list[1];
+        }
+        else if ($v_size > 2) {
+          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER,
+		                       "Invalid number / type of arguments");
+          return 0;
+        }
+      }
+    }
+
+    // ----- Look for default option values
+    $this->privOptionDefaultThreshold($v_options);
+
+    // ----- Init
+    $v_string_list = array();
+    $v_att_list = array();
+    $v_filedescr_list = array();
+    $p_result_list = array();
+
+    // ----- Look if the $p_filelist is really an array
+    if (is_array($p_filelist)) {
+
+      // ----- Look if the first element is also an array
+      //       This will mean that this is a file description entry
+      if (isset($p_filelist[0]) && is_array($p_filelist[0])) {
+        $v_att_list = $p_filelist;
+      }
+
+      // ----- The list is a list of string names
+      else {
+        $v_string_list = $p_filelist;
+      }
+    }
+
+    // ----- Look if the $p_filelist is a string
+    else if (is_string($p_filelist)) {
+      // ----- Create a list from the string
+      $v_string_list = explode(PCLZIP_SEPARATOR, $p_filelist);
+    }
+
+    // ----- Invalid variable type for $p_filelist
+    else {
+      PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_filelist");
+      return 0;
+    }
+
+    // ----- Reformat the string list
+    if (sizeof($v_string_list) != 0) {
+      foreach ($v_string_list as $v_string) {
+        if ($v_string != '') {
+          $v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string;
+        }
+        else {
+        }
+      }
+    }
+
+    // ----- For each file in the list check the attributes
+    $v_supported_attributes
+    = array ( PCLZIP_ATT_FILE_NAME => 'mandatory'
+             ,PCLZIP_ATT_FILE_NEW_SHORT_NAME => 'optional'
+             ,PCLZIP_ATT_FILE_NEW_FULL_NAME => 'optional'
+             ,PCLZIP_ATT_FILE_MTIME => 'optional'
+             ,PCLZIP_ATT_FILE_CONTENT => 'optional'
+             ,PCLZIP_ATT_FILE_COMMENT => 'optional'
+						);
+    foreach ($v_att_list as $v_entry) {
+      $v_result = $this->privFileDescrParseAtt($v_entry,
+                                               $v_filedescr_list[],
+                                               $v_options,
+                                               $v_supported_attributes);
+      if ($v_result != 1) {
+        return 0;
+      }
+    }
+
+    // ----- Expand the filelist (expand directories)
+    $v_result = $this->privFileDescrExpand($v_filedescr_list, $v_options);
+    if ($v_result != 1) {
+      return 0;
+    }
+
+    // ----- Call the create fct
+    $v_result = $this->privCreate($v_filedescr_list, $p_result_list, $v_options);
+    if ($v_result != 1) {
+      return 0;
+    }
+
+    // ----- Return
+    return $p_result_list;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function :
+  //   add($p_filelist, $p_add_dir="", $p_remove_dir="")
+  //   add($p_filelist, $p_option, $p_option_value, ...)
+  // Description :
+  //   This method supports two synopsis. The first one is historical.
+  //   This methods add the list of files in an existing archive.
+  //   If a file with the same name already exists, it is added at the end of the
+  //   archive, the first one is still present.
+  //   If the archive does not exist, it is created.
+  // Parameters :
+  //   $p_filelist : An array containing file or directory names, or
+  //                 a string containing one filename or one directory name, or
+  //                 a string containing a list of filenames and/or directory
+  //                 names separated by spaces.
+  //   $p_add_dir : A path to add before the real path of the archived file,
+  //                in order to have it memorized in the archive.
+  //   $p_remove_dir : A path to remove from the real path of the file to archive,
+  //                   in order to have a shorter path memorized in the archive.
+  //                   When $p_add_dir and $p_remove_dir are set, $p_remove_dir
+  //                   is removed first, before $p_add_dir is added.
+  // Options :
+  //   PCLZIP_OPT_ADD_PATH :
+  //   PCLZIP_OPT_REMOVE_PATH :
+  //   PCLZIP_OPT_REMOVE_ALL_PATH :
+  //   PCLZIP_OPT_COMMENT :
+  //   PCLZIP_OPT_ADD_COMMENT :
+  //   PCLZIP_OPT_PREPEND_COMMENT :
+  //   PCLZIP_CB_PRE_ADD :
+  //   PCLZIP_CB_POST_ADD :
+  // Return Values :
+  //   0 on failure,
+  //   The list of the added files, with a status of the add action.
+  //   (see PclZip::listContent() for list entry format)
+  // --------------------------------------------------------------------------------
+  function add($p_filelist)
+  {
+    $v_result=1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Set default values
+    $v_options = array();
+    $v_options[PCLZIP_OPT_NO_COMPRESSION] = FALSE;
+
+    // ----- Look for variable options arguments
+    $v_size = func_num_args();
+
+    // ----- Look for arguments
+    if ($v_size > 1) {
+      // ----- Get the arguments
+      $v_arg_list = func_get_args();
+
+      // ----- Remove form the options list the first argument
+      array_shift($v_arg_list);
+      $v_size--;
+
+      // ----- Look for first arg
+      if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
+
+        // ----- Parse the options
+        $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
+                                            array (PCLZIP_OPT_REMOVE_PATH => 'optional',
+                                                   PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
+                                                   PCLZIP_OPT_ADD_PATH => 'optional',
+                                                   PCLZIP_CB_PRE_ADD => 'optional',
+                                                   PCLZIP_CB_POST_ADD => 'optional',
+                                                   PCLZIP_OPT_NO_COMPRESSION => 'optional',
+                                                   PCLZIP_OPT_COMMENT => 'optional',
+                                                   PCLZIP_OPT_ADD_COMMENT => 'optional',
+                                                   PCLZIP_OPT_PREPEND_COMMENT => 'optional',
+                                                   PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional',
+                                                   PCLZIP_OPT_TEMP_FILE_ON => 'optional',
+                                                   PCLZIP_OPT_TEMP_FILE_OFF => 'optional'
+                                                   //, PCLZIP_OPT_CRYPT => 'optional'
+												   ));
+        if ($v_result != 1) {
+          return 0;
+        }
+      }
+
+      // ----- Look for 2 args
+      // Here we need to support the first historic synopsis of the
+      // method.
+      else {
+
+        // ----- Get the first argument
+        $v_options[PCLZIP_OPT_ADD_PATH] = $v_add_path = $v_arg_list[0];
+
+        // ----- Look for the optional second argument
+        if ($v_size == 2) {
+          $v_options[PCLZIP_OPT_REMOVE_PATH] = $v_arg_list[1];
+        }
+        else if ($v_size > 2) {
+          // ----- Error log
+          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments");
+
+          // ----- Return
+          return 0;
+        }
+      }
+    }
+
+    // ----- Look for default option values
+    $this->privOptionDefaultThreshold($v_options);
+
+    // ----- Init
+    $v_string_list = array();
+    $v_att_list = array();
+    $v_filedescr_list = array();
+    $p_result_list = array();
+
+    // ----- Look if the $p_filelist is really an array
+    if (is_array($p_filelist)) {
+
+      // ----- Look if the first element is also an array
+      //       This will mean that this is a file description entry
+      if (isset($p_filelist[0]) && is_array($p_filelist[0])) {
+        $v_att_list = $p_filelist;
+      }
+
+      // ----- The list is a list of string names
+      else {
+        $v_string_list = $p_filelist;
+      }
+    }
+
+    // ----- Look if the $p_filelist is a string
+    else if (is_string($p_filelist)) {
+      // ----- Create a list from the string
+      $v_string_list = explode(PCLZIP_SEPARATOR, $p_filelist);
+    }
+
+    // ----- Invalid variable type for $p_filelist
+    else {
+      PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type '".gettype($p_filelist)."' for p_filelist");
+      return 0;
+    }
+
+    // ----- Reformat the string list
+    if (sizeof($v_string_list) != 0) {
+      foreach ($v_string_list as $v_string) {
+        $v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string;
+      }
+    }
+
+    // ----- For each file in the list check the attributes
+    $v_supported_attributes
+    = array ( PCLZIP_ATT_FILE_NAME => 'mandatory'
+             ,PCLZIP_ATT_FILE_NEW_SHORT_NAME => 'optional'
+             ,PCLZIP_ATT_FILE_NEW_FULL_NAME => 'optional'
+             ,PCLZIP_ATT_FILE_MTIME => 'optional'
+             ,PCLZIP_ATT_FILE_CONTENT => 'optional'
+             ,PCLZIP_ATT_FILE_COMMENT => 'optional'
+						);
+    foreach ($v_att_list as $v_entry) {
+      $v_result = $this->privFileDescrParseAtt($v_entry,
+                                               $v_filedescr_list[],
+                                               $v_options,
+                                               $v_supported_attributes);
+      if ($v_result != 1) {
+        return 0;
+      }
+    }
+
+    // ----- Expand the filelist (expand directories)
+    $v_result = $this->privFileDescrExpand($v_filedescr_list, $v_options);
+    if ($v_result != 1) {
+      return 0;
+    }
+
+    // ----- Call the create fct
+    $v_result = $this->privAdd($v_filedescr_list, $p_result_list, $v_options);
+    if ($v_result != 1) {
+      return 0;
+    }
+
+    // ----- Return
+    return $p_result_list;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : listContent()
+  // Description :
+  //   This public method, gives the list of the files and directories, with their
+  //   properties.
+  //   The properties of each entries in the list are (used also in other functions) :
+  //     filename : Name of the file. For a create or add action it is the filename
+  //                given by the user. For an extract function it is the filename
+  //                of the extracted file.
+  //     stored_filename : Name of the file / directory stored in the archive.
+  //     size : Size of the stored file.
+  //     compressed_size : Size of the file's data compressed in the archive
+  //                       (without the headers overhead)
+  //     mtime : Last known modification date of the file (UNIX timestamp)
+  //     comment : Comment associated with the file
+  //     folder : true | false
+  //     index : index of the file in the archive
+  //     status : status of the action (depending of the action) :
+  //              Values are :
+  //                ok : OK !
+  //                filtered : the file / dir is not extracted (filtered by user)
+  //                already_a_directory : the file can not be extracted because a
+  //                                      directory with the same name already exists
+  //                write_protected : the file can not be extracted because a file
+  //                                  with the same name already exists and is
+  //                                  write protected
+  //                newer_exist : the file was not extracted because a newer file exists
+  //                path_creation_fail : the file is not extracted because the folder
+  //                                     does not exist and can not be created
+  //                write_error : the file was not extracted because there was a
+  //                              error while writing the file
+  //                read_error : the file was not extracted because there was a error
+  //                             while reading the file
+  //                invalid_header : the file was not extracted because of an archive
+  //                                 format error (bad file header)
+  //   Note that each time a method can continue operating when there
+  //   is an action error on a file, the error is only logged in the file status.
+  // Return Values :
+  //   0 on an unrecoverable failure,
+  //   The list of the files in the archive.
+  // --------------------------------------------------------------------------------
+  function listContent()
+  {
+    $v_result=1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Check archive
+    if (!$this->privCheckFormat()) {
+      return(0);
+    }
+
+    // ----- Call the extracting fct
+    $p_list = array();
+    if (($v_result = $this->privList($p_list)) != 1)
+    {
+      unset($p_list);
+      return(0);
+    }
+
+    // ----- Return
+    return $p_list;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function :
+  //   extract($p_path="./", $p_remove_path="")
+  //   extract([$p_option, $p_option_value, ...])
+  // Description :
+  //   This method supports two synopsis. The first one is historical.
+  //   This method extract all the files / directories from the archive to the
+  //   folder indicated in $p_path.
+  //   If you want to ignore the 'root' part of path of the memorized files
+  //   you can indicate this in the optional $p_remove_path parameter.
+  //   By default, if a newer file with the same name already exists, the
+  //   file is not extracted.
+  //
+  //   If both PCLZIP_OPT_PATH and PCLZIP_OPT_ADD_PATH aoptions
+  //   are used, the path indicated in PCLZIP_OPT_ADD_PATH is append
+  //   at the end of the path value of PCLZIP_OPT_PATH.
+  // Parameters :
+  //   $p_path : Path where the files and directories are to be extracted
+  //   $p_remove_path : First part ('root' part) of the memorized path
+  //                    (if any similar) to remove while extracting.
+  // Options :
+  //   PCLZIP_OPT_PATH :
+  //   PCLZIP_OPT_ADD_PATH :
+  //   PCLZIP_OPT_REMOVE_PATH :
+  //   PCLZIP_OPT_REMOVE_ALL_PATH :
+  //   PCLZIP_CB_PRE_EXTRACT :
+  //   PCLZIP_CB_POST_EXTRACT :
+  // Return Values :
+  //   0 or a negative value on failure,
+  //   The list of the extracted files, with a status of the action.
+  //   (see PclZip::listContent() for list entry format)
+  // --------------------------------------------------------------------------------
+  function extract()
+  {
+    $v_result=1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Check archive
+    if (!$this->privCheckFormat()) {
+      return(0);
+    }
+
+    // ----- Set default values
+    $v_options = array();
+//    $v_path = "./";
+    $v_path = '';
+    $v_remove_path = "";
+    $v_remove_all_path = false;
+
+    // ----- Look for variable options arguments
+    $v_size = func_num_args();
+
+    // ----- Default values for option
+    $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE;
+
+    // ----- Look for arguments
+    if ($v_size > 0) {
+      // ----- Get the arguments
+      $v_arg_list = func_get_args();
+
+      // ----- Look for first arg
+      if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
+
+        // ----- Parse the options
+        $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
+                                            array (PCLZIP_OPT_PATH => 'optional',
+                                                   PCLZIP_OPT_REMOVE_PATH => 'optional',
+                                                   PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
+                                                   PCLZIP_OPT_ADD_PATH => 'optional',
+                                                   PCLZIP_CB_PRE_EXTRACT => 'optional',
+                                                   PCLZIP_CB_POST_EXTRACT => 'optional',
+                                                   PCLZIP_OPT_SET_CHMOD => 'optional',
+                                                   PCLZIP_OPT_BY_NAME => 'optional',
+                                                   PCLZIP_OPT_BY_EREG => 'optional',
+                                                   PCLZIP_OPT_BY_PREG => 'optional',
+                                                   PCLZIP_OPT_BY_INDEX => 'optional',
+                                                   PCLZIP_OPT_EXTRACT_AS_STRING => 'optional',
+                                                   PCLZIP_OPT_EXTRACT_IN_OUTPUT => 'optional',
+                                                   PCLZIP_OPT_REPLACE_NEWER => 'optional'
+                                                   ,PCLZIP_OPT_STOP_ON_ERROR => 'optional'
+                                                   ,PCLZIP_OPT_EXTRACT_DIR_RESTRICTION => 'optional',
+                                                   PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional',
+                                                   PCLZIP_OPT_TEMP_FILE_ON => 'optional',
+                                                   PCLZIP_OPT_TEMP_FILE_OFF => 'optional'
+												    ));
+        if ($v_result != 1) {
+          return 0;
+        }
+
+        // ----- Set the arguments
+        if (isset($v_options[PCLZIP_OPT_PATH])) {
+          $v_path = $v_options[PCLZIP_OPT_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) {
+          $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) {
+          $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_ADD_PATH])) {
+          // ----- Check for '/' in last path char
+          if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) {
+            $v_path .= '/';
+          }
+          $v_path .= $v_options[PCLZIP_OPT_ADD_PATH];
+        }
+      }
+
+      // ----- Look for 2 args
+      // Here we need to support the first historic synopsis of the
+      // method.
+      else {
+
+        // ----- Get the first argument
+        $v_path = $v_arg_list[0];
+
+        // ----- Look for the optional second argument
+        if ($v_size == 2) {
+          $v_remove_path = $v_arg_list[1];
+        }
+        else if ($v_size > 2) {
+          // ----- Error log
+          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments");
+
+          // ----- Return
+          return 0;
+        }
+      }
+    }
+
+    // ----- Look for default option values
+    $this->privOptionDefaultThreshold($v_options);
+
+    // ----- Trace
+
+    // ----- Call the extracting fct
+    $p_list = array();
+    $v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path,
+	                                     $v_remove_all_path, $v_options);
+    if ($v_result < 1) {
+      unset($p_list);
+      return(0);
+    }
+
+    // ----- Return
+    return $p_list;
+  }
+  // --------------------------------------------------------------------------------
+
+
+  // --------------------------------------------------------------------------------
+  // Function :
+  //   extractByIndex($p_index, $p_path="./", $p_remove_path="")
+  //   extractByIndex($p_index, [$p_option, $p_option_value, ...])
+  // Description :
+  //   This method supports two synopsis. The first one is historical.
+  //   This method is doing a partial extract of the archive.
+  //   The extracted files or folders are identified by their index in the
+  //   archive (from 0 to n).
+  //   Note that if the index identify a folder, only the folder entry is
+  //   extracted, not all the files included in the archive.
+  // Parameters :
+  //   $p_index : A single index (integer) or a string of indexes of files to
+  //              extract. The form of the string is "0,4-6,8-12" with only numbers
+  //              and '-' for range or ',' to separate ranges. No spaces or ';'
+  //              are allowed.
+  //   $p_path : Path where the files and directories are to be extracted
+  //   $p_remove_path : First part ('root' part) of the memorized path
+  //                    (if any similar) to remove while extracting.
+  // Options :
+  //   PCLZIP_OPT_PATH :
+  //   PCLZIP_OPT_ADD_PATH :
+  //   PCLZIP_OPT_REMOVE_PATH :
+  //   PCLZIP_OPT_REMOVE_ALL_PATH :
+  //   PCLZIP_OPT_EXTRACT_AS_STRING : The files are extracted as strings and
+  //     not as files.
+  //     The resulting content is in a new field 'content' in the file
+  //     structure.
+  //     This option must be used alone (any other options are ignored).
+  //   PCLZIP_CB_PRE_EXTRACT :
+  //   PCLZIP_CB_POST_EXTRACT :
+  // Return Values :
+  //   0 on failure,
+  //   The list of the extracted files, with a status of the action.
+  //   (see PclZip::listContent() for list entry format)
+  // --------------------------------------------------------------------------------
+  //function extractByIndex($p_index, options...)
+  function extractByIndex($p_index)
+  {
+    $v_result=1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Check archive
+    if (!$this->privCheckFormat()) {
+      return(0);
+    }
+
+    // ----- Set default values
+    $v_options = array();
+//    $v_path = "./";
+    $v_path = '';
+    $v_remove_path = "";
+    $v_remove_all_path = false;
+
+    // ----- Look for variable options arguments
+    $v_size = func_num_args();
+
+    // ----- Default values for option
+    $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE;
+
+    // ----- Look for arguments
+    if ($v_size > 1) {
+      // ----- Get the arguments
+      $v_arg_list = func_get_args();
+
+      // ----- Remove form the options list the first argument
+      array_shift($v_arg_list);
+      $v_size--;
+
+      // ----- Look for first arg
+      if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
+
+        // ----- Parse the options
+        $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
+                                            array (PCLZIP_OPT_PATH => 'optional',
+                                                   PCLZIP_OPT_REMOVE_PATH => 'optional',
+                                                   PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
+                                                   PCLZIP_OPT_EXTRACT_AS_STRING => 'optional',
+                                                   PCLZIP_OPT_ADD_PATH => 'optional',
+                                                   PCLZIP_CB_PRE_EXTRACT => 'optional',
+                                                   PCLZIP_CB_POST_EXTRACT => 'optional',
+                                                   PCLZIP_OPT_SET_CHMOD => 'optional',
+                                                   PCLZIP_OPT_REPLACE_NEWER => 'optional'
+                                                   ,PCLZIP_OPT_STOP_ON_ERROR => 'optional'
+                                                   ,PCLZIP_OPT_EXTRACT_DIR_RESTRICTION => 'optional',
+                                                   PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional',
+                                                   PCLZIP_OPT_TEMP_FILE_ON => 'optional',
+                                                   PCLZIP_OPT_TEMP_FILE_OFF => 'optional'
+												   ));
+        if ($v_result != 1) {
+          return 0;
+        }
+
+        // ----- Set the arguments
+        if (isset($v_options[PCLZIP_OPT_PATH])) {
+          $v_path = $v_options[PCLZIP_OPT_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) {
+          $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) {
+          $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_ADD_PATH])) {
+          // ----- Check for '/' in last path char
+          if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) {
+            $v_path .= '/';
+          }
+          $v_path .= $v_options[PCLZIP_OPT_ADD_PATH];
+        }
+        if (!isset($v_options[PCLZIP_OPT_EXTRACT_AS_STRING])) {
+          $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE;
+        }
+        else {
+        }
+      }
+
+      // ----- Look for 2 args
+      // Here we need to support the first historic synopsis of the
+      // method.
+      else {
+
+        // ----- Get the first argument
+        $v_path = $v_arg_list[0];
+
+        // ----- Look for the optional second argument
+        if ($v_size == 2) {
+          $v_remove_path = $v_arg_list[1];
+        }
+        else if ($v_size > 2) {
+          // ----- Error log
+          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments");
+
+          // ----- Return
+          return 0;
+        }
+      }
+    }
+
+    // ----- Trace
+
+    // ----- Trick
+    // Here I want to reuse extractByRule(), so I need to parse the $p_index
+    // with privParseOptions()
+    $v_arg_trick = array (PCLZIP_OPT_BY_INDEX, $p_index);
+    $v_options_trick = array();
+    $v_result = $this->privParseOptions($v_arg_trick, sizeof($v_arg_trick), $v_options_trick,
+                                        array (PCLZIP_OPT_BY_INDEX => 'optional' ));
+    if ($v_result != 1) {
+        return 0;
+    }
+    $v_options[PCLZIP_OPT_BY_INDEX] = $v_options_trick[PCLZIP_OPT_BY_INDEX];
+
+    // ----- Look for default option values
+    $this->privOptionDefaultThreshold($v_options);
+
+    // ----- Call the extracting fct
+    if (($v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path, $v_remove_all_path, $v_options)) < 1) {
+        return(0);
+    }
+
+    // ----- Return
+    return $p_list;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function :
+  //   delete([$p_option, $p_option_value, ...])
+  // Description :
+  //   This method removes files from the archive.
+  //   If no parameters are given, then all the archive is emptied.
+  // Parameters :
+  //   None or optional arguments.
+  // Options :
+  //   PCLZIP_OPT_BY_INDEX :
+  //   PCLZIP_OPT_BY_NAME :
+  //   PCLZIP_OPT_BY_EREG :
+  //   PCLZIP_OPT_BY_PREG :
+  // Return Values :
+  //   0 on failure,
+  //   The list of the files which are still present in the archive.
+  //   (see PclZip::listContent() for list entry format)
+  // --------------------------------------------------------------------------------
+  function delete()
+  {
+    $v_result=1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Check archive
+    if (!$this->privCheckFormat()) {
+      return(0);
+    }
+
+    // ----- Set default values
+    $v_options = array();
+
+    // ----- Look for variable options arguments
+    $v_size = func_num_args();
+
+    // ----- Look for arguments
+    if ($v_size > 0) {
+      // ----- Get the arguments
+      $v_arg_list = func_get_args();
+
+      // ----- Parse the options
+      $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
+                                        array (PCLZIP_OPT_BY_NAME => 'optional',
+                                               PCLZIP_OPT_BY_EREG => 'optional',
+                                               PCLZIP_OPT_BY_PREG => 'optional',
+                                               PCLZIP_OPT_BY_INDEX => 'optional' ));
+      if ($v_result != 1) {
+          return 0;
+      }
+    }
+
+    // ----- Magic quotes trick
+    $this->privDisableMagicQuotes();
+
+    // ----- Call the delete fct
+    $v_list = array();
+    if (($v_result = $this->privDeleteByRule($v_list, $v_options)) != 1) {
+      $this->privSwapBackMagicQuotes();
+      unset($v_list);
+      return(0);
+    }
+
+    // ----- Magic quotes trick
+    $this->privSwapBackMagicQuotes();
+
+    // ----- Return
+    return $v_list;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : deleteByIndex()
+  // Description :
+  //   ***** Deprecated *****
+  //   delete(PCLZIP_OPT_BY_INDEX, $p_index) should be prefered.
+  // --------------------------------------------------------------------------------
+  function deleteByIndex($p_index)
+  {
+
+    $p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index);
+
+    // ----- Return
+    return $p_list;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : properties()
+  // Description :
+  //   This method gives the properties of the archive.
+  //   The properties are :
+  //     nb : Number of files in the archive
+  //     comment : Comment associated with the archive file
+  //     status : not_exist, ok
+  // Parameters :
+  //   None
+  // Return Values :
+  //   0 on failure,
+  //   An array with the archive properties.
+  // --------------------------------------------------------------------------------
+  function properties()
+  {
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Magic quotes trick
+    $this->privDisableMagicQuotes();
+
+    // ----- Check archive
+    if (!$this->privCheckFormat()) {
+      $this->privSwapBackMagicQuotes();
+      return(0);
+    }
+
+    // ----- Default properties
+    $v_prop = array();
+    $v_prop['comment'] = '';
+    $v_prop['nb'] = 0;
+    $v_prop['status'] = 'not_exist';
+
+    // ----- Look if file exists
+    if (@is_file($this->zipname))
+    {
+      // ----- Open the zip file
+      if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0)
+      {
+        $this->privSwapBackMagicQuotes();
+
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode');
+
+        // ----- Return
+        return 0;
+      }
+
+      // ----- Read the central directory informations
+      $v_central_dir = array();
+      if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
+      {
+        $this->privSwapBackMagicQuotes();
+        return 0;
+      }
+
+      // ----- Close the zip file
+      $this->privCloseFd();
+
+      // ----- Set the user attributes
+      $v_prop['comment'] = $v_central_dir['comment'];
+      $v_prop['nb'] = $v_central_dir['entries'];
+      $v_prop['status'] = 'ok';
+    }
+
+    // ----- Magic quotes trick
+    $this->privSwapBackMagicQuotes();
+
+    // ----- Return
+    return $v_prop;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : duplicate()
+  // Description :
+  //   This method creates an archive by copying the content of an other one. If
+  //   the archive already exist, it is replaced by the new one without any warning.
+  // Parameters :
+  //   $p_archive : The filename of a valid archive, or
+  //                a valid PclZip object.
+  // Return Values :
+  //   1 on success.
+  //   0 or a negative value on error (error code).
+  // --------------------------------------------------------------------------------
+  function duplicate($p_archive)
+  {
+    $v_result = 1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Look if the $p_archive is a PclZip object
+    if ((is_object($p_archive)) && (get_class($p_archive) == 'pclzip'))
+    {
+
+      // ----- Duplicate the archive
+      $v_result = $this->privDuplicate($p_archive->zipname);
+    }
+
+    // ----- Look if the $p_archive is a string (so a filename)
+    else if (is_string($p_archive))
+    {
+
+      // ----- Check that $p_archive is a valid zip file
+      // TBC : Should also check the archive format
+      if (!is_file($p_archive)) {
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "No file with filename '".$p_archive."'");
+        $v_result = PCLZIP_ERR_MISSING_FILE;
+      }
+      else {
+        // ----- Duplicate the archive
+        $v_result = $this->privDuplicate($p_archive);
+      }
+    }
+
+    // ----- Invalid variable
+    else
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add");
+      $v_result = PCLZIP_ERR_INVALID_PARAMETER;
+    }
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : merge()
+  // Description :
+  //   This method merge the $p_archive_to_add archive at the end of the current
+  //   one ($this).
+  //   If the archive ($this) does not exist, the merge becomes a duplicate.
+  //   If the $p_archive_to_add archive does not exist, the merge is a success.
+  // Parameters :
+  //   $p_archive_to_add : It can be directly the filename of a valid zip archive,
+  //                       or a PclZip object archive.
+  // Return Values :
+  //   1 on success,
+  //   0 or negative values on error (see below).
+  // --------------------------------------------------------------------------------
+  function merge($p_archive_to_add)
+  {
+    $v_result = 1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Check archive
+    if (!$this->privCheckFormat()) {
+      return(0);
+    }
+
+    // ----- Look if the $p_archive_to_add is a PclZip object
+    if ((is_object($p_archive_to_add)) && (get_class($p_archive_to_add) == 'pclzip'))
+    {
+
+      // ----- Merge the archive
+      $v_result = $this->privMerge($p_archive_to_add);
+    }
+
+    // ----- Look if the $p_archive_to_add is a string (so a filename)
+    else if (is_string($p_archive_to_add))
+    {
+
+      // ----- Create a temporary archive
+      $v_object_archive = new PclZip($p_archive_to_add);
+
+      // ----- Merge the archive
+      $v_result = $this->privMerge($v_object_archive);
+    }
+
+    // ----- Invalid variable
+    else
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add");
+      $v_result = PCLZIP_ERR_INVALID_PARAMETER;
+    }
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+
+
+  // --------------------------------------------------------------------------------
+  // Function : errorCode()
+  // Description :
+  // Parameters :
+  // --------------------------------------------------------------------------------
+  function errorCode()
+  {
+    if (PCLZIP_ERROR_EXTERNAL == 1) {
+      return(PclErrorCode());
+    }
+    else {
+      return($this->error_code);
+    }
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : errorName()
+  // Description :
+  // Parameters :
+  // --------------------------------------------------------------------------------
+  function errorName($p_with_code=false)
+  {
+    $v_name = array ( PCLZIP_ERR_NO_ERROR => 'PCLZIP_ERR_NO_ERROR',
+                      PCLZIP_ERR_WRITE_OPEN_FAIL => 'PCLZIP_ERR_WRITE_OPEN_FAIL',
+                      PCLZIP_ERR_READ_OPEN_FAIL => 'PCLZIP_ERR_READ_OPEN_FAIL',
+                      PCLZIP_ERR_INVALID_PARAMETER => 'PCLZIP_ERR_INVALID_PARAMETER',
+                      PCLZIP_ERR_MISSING_FILE => 'PCLZIP_ERR_MISSING_FILE',
+                      PCLZIP_ERR_FILENAME_TOO_LONG => 'PCLZIP_ERR_FILENAME_TOO_LONG',
+                      PCLZIP_ERR_INVALID_ZIP => 'PCLZIP_ERR_INVALID_ZIP',
+                      PCLZIP_ERR_BAD_EXTRACTED_FILE => 'PCLZIP_ERR_BAD_EXTRACTED_FILE',
+                      PCLZIP_ERR_DIR_CREATE_FAIL => 'PCLZIP_ERR_DIR_CREATE_FAIL',
+                      PCLZIP_ERR_BAD_EXTENSION => 'PCLZIP_ERR_BAD_EXTENSION',
+                      PCLZIP_ERR_BAD_FORMAT => 'PCLZIP_ERR_BAD_FORMAT',
+                      PCLZIP_ERR_DELETE_FILE_FAIL => 'PCLZIP_ERR_DELETE_FILE_FAIL',
+                      PCLZIP_ERR_RENAME_FILE_FAIL => 'PCLZIP_ERR_RENAME_FILE_FAIL',
+                      PCLZIP_ERR_BAD_CHECKSUM => 'PCLZIP_ERR_BAD_CHECKSUM',
+                      PCLZIP_ERR_INVALID_ARCHIVE_ZIP => 'PCLZIP_ERR_INVALID_ARCHIVE_ZIP',
+                      PCLZIP_ERR_MISSING_OPTION_VALUE => 'PCLZIP_ERR_MISSING_OPTION_VALUE',
+                      PCLZIP_ERR_INVALID_OPTION_VALUE => 'PCLZIP_ERR_INVALID_OPTION_VALUE',
+                      PCLZIP_ERR_UNSUPPORTED_COMPRESSION => 'PCLZIP_ERR_UNSUPPORTED_COMPRESSION',
+                      PCLZIP_ERR_UNSUPPORTED_ENCRYPTION => 'PCLZIP_ERR_UNSUPPORTED_ENCRYPTION'
+                      ,PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE => 'PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE'
+                      ,PCLZIP_ERR_DIRECTORY_RESTRICTION => 'PCLZIP_ERR_DIRECTORY_RESTRICTION'
+                    );
+
+    if (isset($v_name[$this->error_code])) {
+      $v_value = $v_name[$this->error_code];
+    }
+    else {
+      $v_value = 'NoName';
+    }
+
+    if ($p_with_code) {
+      return($v_value.' ('.$this->error_code.')');
+    }
+    else {
+      return($v_value);
+    }
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : errorInfo()
+  // Description :
+  // Parameters :
+  // --------------------------------------------------------------------------------
+  function errorInfo($p_full=false)
+  {
+    if (PCLZIP_ERROR_EXTERNAL == 1) {
+      return(PclErrorString());
+    }
+    else {
+      if ($p_full) {
+        return($this->errorName(true)." : ".$this->error_string);
+      }
+      else {
+        return($this->error_string." [code ".$this->error_code."]");
+      }
+    }
+  }
+  // --------------------------------------------------------------------------------
+
+
+// --------------------------------------------------------------------------------
+// ***** UNDER THIS LINE ARE DEFINED PRIVATE INTERNAL FUNCTIONS *****
+// *****                                                        *****
+// *****       THESES FUNCTIONS MUST NOT BE USED DIRECTLY       *****
+// --------------------------------------------------------------------------------
+
+
+
+  // --------------------------------------------------------------------------------
+  // Function : privCheckFormat()
+  // Description :
+  //   This method check that the archive exists and is a valid zip archive.
+  //   Several level of check exists. (futur)
+  // Parameters :
+  //   $p_level : Level of check. Default 0.
+  //              0 : Check the first bytes (magic codes) (default value))
+  //              1 : 0 + Check the central directory (futur)
+  //              2 : 1 + Check each file header (futur)
+  // Return Values :
+  //   true on success,
+  //   false on error, the error code is set.
+  // --------------------------------------------------------------------------------
+  function privCheckFormat($p_level=0)
+  {
+    $v_result = true;
+
+	// ----- Reset the file system cache
+    clearstatcache();
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Look if the file exits
+    if (!is_file($this->zipname)) {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "Missing archive file '".$this->zipname."'");
+      return(false);
+    }
+
+    // ----- Check that the file is readeable
+    if (!is_readable($this->zipname)) {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '".$this->zipname."'");
+      return(false);
+    }
+
+    // ----- Check the magic code
+    // TBC
+
+    // ----- Check the central header
+    // TBC
+
+    // ----- Check each file header
+    // TBC
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privParseOptions()
+  // Description :
+  //   This internal methods reads the variable list of arguments ($p_options_list,
+  //   $p_size) and generate an array with the options and values ($v_result_list).
+  //   $v_requested_options contains the options that can be present and those that
+  //   must be present.
+  //   $v_requested_options is an array, with the option value as key, and 'optional',
+  //   or 'mandatory' as value.
+  // Parameters :
+  //   See above.
+  // Return Values :
+  //   1 on success.
+  //   0 on failure.
+  // --------------------------------------------------------------------------------
+  function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options=false)
+  {
+    $v_result=1;
+
+    // ----- Read the options
+    $i=0;
+    while ($i<$p_size) {
+
+      // ----- Check if the option is supported
+      if (!isset($v_requested_options[$p_options_list[$i]])) {
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid optional parameter '".$p_options_list[$i]."' for this method");
+
+        // ----- Return
+        return PclZip::errorCode();
+      }
+
+      // ----- Look for next option
+      switch ($p_options_list[$i]) {
+        // ----- Look for options that request a path value
+        case PCLZIP_OPT_PATH :
+        case PCLZIP_OPT_REMOVE_PATH :
+        case PCLZIP_OPT_ADD_PATH :
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value
+          $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], FALSE);
+          $i++;
+        break;
+
+        case PCLZIP_OPT_TEMP_FILE_THRESHOLD :
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+            return PclZip::errorCode();
+          }
+
+          // ----- Check for incompatible options
+          if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) {
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'");
+            return PclZip::errorCode();
+          }
+
+          // ----- Check the value
+          $v_value = $p_options_list[$i+1];
+          if ((!is_integer($v_value)) || ($v_value<0)) {
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Integer expected for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value (and convert it in bytes)
+          $v_result_list[$p_options_list[$i]] = $v_value*1048576;
+          $i++;
+        break;
+
+        case PCLZIP_OPT_TEMP_FILE_ON :
+          // ----- Check for incompatible options
+          if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) {
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'");
+            return PclZip::errorCode();
+          }
+
+          $v_result_list[$p_options_list[$i]] = true;
+        break;
+
+        case PCLZIP_OPT_TEMP_FILE_OFF :
+          // ----- Check for incompatible options
+          if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_ON])) {
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_ON'");
+            return PclZip::errorCode();
+          }
+          // ----- Check for incompatible options
+          if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) {
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_THRESHOLD'");
+            return PclZip::errorCode();
+          }
+
+          $v_result_list[$p_options_list[$i]] = true;
+        break;
+
+        case PCLZIP_OPT_EXTRACT_DIR_RESTRICTION :
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value
+          if (   is_string($p_options_list[$i+1])
+              && ($p_options_list[$i+1] != '')) {
+            $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], FALSE);
+            $i++;
+          }
+          else {
+          }
+        break;
+
+        // ----- Look for options that request an array of string for value
+        case PCLZIP_OPT_BY_NAME :
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value
+          if (is_string($p_options_list[$i+1])) {
+              $v_result_list[$p_options_list[$i]][0] = $p_options_list[$i+1];
+          }
+          else if (is_array($p_options_list[$i+1])) {
+              $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
+          }
+          else {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            return PclZip::errorCode();
+          }
+          $i++;
+        break;
+
+        // ----- Look for options that request an EREG or PREG expression
+        case PCLZIP_OPT_BY_EREG :
+          // ereg() is deprecated starting with PHP 5.3. Move PCLZIP_OPT_BY_EREG
+          // to PCLZIP_OPT_BY_PREG
+          $p_options_list[$i] = PCLZIP_OPT_BY_PREG;
+        case PCLZIP_OPT_BY_PREG :
+        //case PCLZIP_OPT_CRYPT :
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value
+          if (is_string($p_options_list[$i+1])) {
+              $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
+          }
+          else {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            return PclZip::errorCode();
+          }
+          $i++;
+        break;
+
+        // ----- Look for options that takes a string
+        case PCLZIP_OPT_COMMENT :
+        case PCLZIP_OPT_ADD_COMMENT :
+        case PCLZIP_OPT_PREPEND_COMMENT :
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE,
+			                     "Missing parameter value for option '"
+								 .PclZipUtilOptionText($p_options_list[$i])
+								 ."'");
+
+            // ----- Return
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value
+          if (is_string($p_options_list[$i+1])) {
+              $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
+          }
+          else {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE,
+			                     "Wrong parameter value for option '"
+								 .PclZipUtilOptionText($p_options_list[$i])
+								 ."'");
+
+            // ----- Return
+            return PclZip::errorCode();
+          }
+          $i++;
+        break;
+
+        // ----- Look for options that request an array of index
+        case PCLZIP_OPT_BY_INDEX :
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value
+          $v_work_list = array();
+          if (is_string($p_options_list[$i+1])) {
+
+              // ----- Remove spaces
+              $p_options_list[$i+1] = strtr($p_options_list[$i+1], ' ', '');
+
+              // ----- Parse items
+              $v_work_list = explode(",", $p_options_list[$i+1]);
+          }
+          else if (is_integer($p_options_list[$i+1])) {
+              $v_work_list[0] = $p_options_list[$i+1].'-'.$p_options_list[$i+1];
+          }
+          else if (is_array($p_options_list[$i+1])) {
+              $v_work_list = $p_options_list[$i+1];
+          }
+          else {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Value must be integer, string or array for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            return PclZip::errorCode();
+          }
+
+          // ----- Reduce the index list
+          // each index item in the list must be a couple with a start and
+          // an end value : [0,3], [5-5], [8-10], ...
+          // ----- Check the format of each item
+          $v_sort_flag=false;
+          $v_sort_value=0;
+          for ($j=0; $j<sizeof($v_work_list); $j++) {
+              // ----- Explode the item
+              $v_item_list = explode("-", $v_work_list[$j]);
+              $v_size_item_list = sizeof($v_item_list);
+
+              // ----- TBC : Here we might check that each item is a
+              // real integer ...
+
+              // ----- Look for single value
+              if ($v_size_item_list == 1) {
+                  // ----- Set the option value
+                  $v_result_list[$p_options_list[$i]][$j]['start'] = $v_item_list[0];
+                  $v_result_list[$p_options_list[$i]][$j]['end'] = $v_item_list[0];
+              }
+              elseif ($v_size_item_list == 2) {
+                  // ----- Set the option value
+                  $v_result_list[$p_options_list[$i]][$j]['start'] = $v_item_list[0];
+                  $v_result_list[$p_options_list[$i]][$j]['end'] = $v_item_list[1];
+              }
+              else {
+                  // ----- Error log
+                  PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Too many values in index range for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+                  // ----- Return
+                  return PclZip::errorCode();
+              }
+
+
+              // ----- Look for list sort
+              if ($v_result_list[$p_options_list[$i]][$j]['start'] < $v_sort_value) {
+                  $v_sort_flag=true;
+
+                  // ----- TBC : An automatic sort should be writen ...
+                  // ----- Error log
+                  PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Invalid order of index range for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+                  // ----- Return
+                  return PclZip::errorCode();
+              }
+              $v_sort_value = $v_result_list[$p_options_list[$i]][$j]['start'];
+          }
+
+          // ----- Sort the items
+          if ($v_sort_flag) {
+              // TBC : To Be Completed
+          }
+
+          // ----- Next option
+          $i++;
+        break;
+
+        // ----- Look for options that request no value
+        case PCLZIP_OPT_REMOVE_ALL_PATH :
+        case PCLZIP_OPT_EXTRACT_AS_STRING :
+        case PCLZIP_OPT_NO_COMPRESSION :
+        case PCLZIP_OPT_EXTRACT_IN_OUTPUT :
+        case PCLZIP_OPT_REPLACE_NEWER :
+        case PCLZIP_OPT_STOP_ON_ERROR :
+          $v_result_list[$p_options_list[$i]] = true;
+        break;
+
+        // ----- Look for options that request an octal value
+        case PCLZIP_OPT_SET_CHMOD :
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value
+          $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
+          $i++;
+        break;
+
+        // ----- Look for options that request a call-back
+        case PCLZIP_CB_PRE_EXTRACT :
+        case PCLZIP_CB_POST_EXTRACT :
+        case PCLZIP_CB_PRE_ADD :
+        case PCLZIP_CB_POST_ADD :
+        /* for futur use
+        case PCLZIP_CB_PRE_DELETE :
+        case PCLZIP_CB_POST_DELETE :
+        case PCLZIP_CB_PRE_LIST :
+        case PCLZIP_CB_POST_LIST :
+        */
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value
+          $v_function_name = $p_options_list[$i+1];
+
+          // ----- Check that the value is a valid existing function
+          if (!function_exists($v_function_name)) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Function '".$v_function_name."()' is not an existing function for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            return PclZip::errorCode();
+          }
+
+          // ----- Set the attribute
+          $v_result_list[$p_options_list[$i]] = $v_function_name;
+          $i++;
+        break;
+
+        default :
+          // ----- Error log
+          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER,
+		                       "Unknown parameter '"
+							   .$p_options_list[$i]."'");
+
+          // ----- Return
+          return PclZip::errorCode();
+      }
+
+      // ----- Next options
+      $i++;
+    }
+
+    // ----- Look for mandatory options
+    if ($v_requested_options !== false) {
+      for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) {
+        // ----- Look for mandatory option
+        if ($v_requested_options[$key] == 'mandatory') {
+          // ----- Look if present
+          if (!isset($v_result_list[$key])) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")");
+
+            // ----- Return
+            return PclZip::errorCode();
+          }
+        }
+      }
+    }
+
+    // ----- Look for default values
+    if (!isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) {
+
+    }
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privOptionDefaultThreshold()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privOptionDefaultThreshold(&$p_options)
+  {
+    $v_result=1;
+
+    if (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD])
+        || isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) {
+      return $v_result;
+    }
+
+    // ----- Get 'memory_limit' configuration value
+    $v_memory_limit = ini_get('memory_limit');
+    $v_memory_limit = trim($v_memory_limit);
+    $v_memory_limit_int = (int) $v_memory_limit;
+    $last = strtolower(substr($v_memory_limit, -1));
+
+    if($last == 'g')
+        //$v_memory_limit_int = $v_memory_limit_int*1024*1024*1024;
+        $v_memory_limit_int = $v_memory_limit_int*1073741824;
+    if($last == 'm')
+        //$v_memory_limit_int = $v_memory_limit_int*1024*1024;
+        $v_memory_limit_int = $v_memory_limit_int*1048576;
+    if($last == 'k')
+        $v_memory_limit_int = $v_memory_limit_int*1024;
+
+    $p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] = floor($v_memory_limit_int*PCLZIP_TEMPORARY_FILE_RATIO);
+
+
+    // ----- Sanity check : No threshold if value lower than 1M
+    if ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] < 1048576) {
+      unset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]);
+    }
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privFileDescrParseAtt()
+  // Description :
+  // Parameters :
+  // Return Values :
+  //   1 on success.
+  //   0 on failure.
+  // --------------------------------------------------------------------------------
+  function privFileDescrParseAtt(&$p_file_list, &$p_filedescr, $v_options, $v_requested_options=false)
+  {
+    $v_result=1;
+
+    // ----- For each file in the list check the attributes
+    foreach ($p_file_list as $v_key => $v_value) {
+
+      // ----- Check if the option is supported
+      if (!isset($v_requested_options[$v_key])) {
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file attribute '".$v_key."' for this file");
+
+        // ----- Return
+        return PclZip::errorCode();
+      }
+
+      // ----- Look for attribute
+      switch ($v_key) {
+        case PCLZIP_ATT_FILE_NAME :
+          if (!is_string($v_value)) {
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'");
+            return PclZip::errorCode();
+          }
+
+          $p_filedescr['filename'] = PclZipUtilPathReduction($v_value);
+
+          if ($p_filedescr['filename'] == '') {
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '".PclZipUtilOptionText($v_key)."'");
+            return PclZip::errorCode();
+          }
+
+        break;
+
+        case PCLZIP_ATT_FILE_NEW_SHORT_NAME :
+          if (!is_string($v_value)) {
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'");
+            return PclZip::errorCode();
+          }
+
+          $p_filedescr['new_short_name'] = PclZipUtilPathReduction($v_value);
+
+          if ($p_filedescr['new_short_name'] == '') {
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty short filename for attribute '".PclZipUtilOptionText($v_key)."'");
+            return PclZip::errorCode();
+          }
+        break;
+
+        case PCLZIP_ATT_FILE_NEW_FULL_NAME :
+          if (!is_string($v_value)) {
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'");
+            return PclZip::errorCode();
+          }
+
+          $p_filedescr['new_full_name'] = PclZipUtilPathReduction($v_value);
+
+          if ($p_filedescr['new_full_name'] == '') {
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty full filename for attribute '".PclZipUtilOptionText($v_key)."'");
+            return PclZip::errorCode();
+          }
+        break;
+
+        // ----- Look for options that takes a string
+        case PCLZIP_ATT_FILE_COMMENT :
+          if (!is_string($v_value)) {
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'");
+            return PclZip::errorCode();
+          }
+
+          $p_filedescr['comment'] = $v_value;
+        break;
+
+        case PCLZIP_ATT_FILE_MTIME :
+          if (!is_integer($v_value)) {
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". Integer expected for attribute '".PclZipUtilOptionText($v_key)."'");
+            return PclZip::errorCode();
+          }
+
+          $p_filedescr['mtime'] = $v_value;
+        break;
+
+        case PCLZIP_ATT_FILE_CONTENT :
+          $p_filedescr['content'] = $v_value;
+        break;
+
+        default :
+          // ----- Error log
+          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER,
+		                           "Unknown parameter '".$v_key."'");
+
+          // ----- Return
+          return PclZip::errorCode();
+      }
+
+      // ----- Look for mandatory options
+      if ($v_requested_options !== false) {
+        for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) {
+          // ----- Look for mandatory option
+          if ($v_requested_options[$key] == 'mandatory') {
+            // ----- Look if present
+            if (!isset($p_file_list[$key])) {
+              PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")");
+              return PclZip::errorCode();
+            }
+          }
+        }
+      }
+
+    // end foreach
+    }
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privFileDescrExpand()
+  // Description :
+  //   This method look for each item of the list to see if its a file, a folder
+  //   or a string to be added as file. For any other type of files (link, other)
+  //   just ignore the item.
+  //   Then prepare the information that will be stored for that file.
+  //   When its a folder, expand the folder with all the files that are in that
+  //   folder (recursively).
+  // Parameters :
+  // Return Values :
+  //   1 on success.
+  //   0 on failure.
+  // --------------------------------------------------------------------------------
+  function privFileDescrExpand(&$p_filedescr_list, &$p_options)
+  {
+    $v_result=1;
+
+    // ----- Create a result list
+    $v_result_list = array();
+
+    // ----- Look each entry
+    for ($i=0; $i<sizeof($p_filedescr_list); $i++) {
+
+      // ----- Get filedescr
+      $v_descr = $p_filedescr_list[$i];
+
+      // ----- Reduce the filename
+      $v_descr['filename'] = PclZipUtilTranslateWinPath($v_descr['filename'], false);
+      $v_descr['filename'] = PclZipUtilPathReduction($v_descr['filename']);
+
+      // ----- Look for real file or folder
+      if (file_exists($v_descr['filename'])) {
+        if (@is_file($v_descr['filename'])) {
+          $v_descr['type'] = 'file';
+        }
+        else if (@is_dir($v_descr['filename'])) {
+          $v_descr['type'] = 'folder';
+        }
+        else if (@is_link($v_descr['filename'])) {
+          // skip
+          continue;
+        }
+        else {
+          // skip
+          continue;
+        }
+      }
+
+      // ----- Look for string added as file
+      else if (isset($v_descr['content'])) {
+        $v_descr['type'] = 'virtual_file';
+      }
+
+      // ----- Missing file
+      else {
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "File '".$v_descr['filename']."' does not exist");
+
+        // ----- Return
+        return PclZip::errorCode();
+      }
+
+      // ----- Calculate the stored filename
+      $this->privCalculateStoredFilename($v_descr, $p_options);
+
+      // ----- Add the descriptor in result list
+      $v_result_list[sizeof($v_result_list)] = $v_descr;
+
+      // ----- Look for folder
+      if ($v_descr['type'] == 'folder') {
+        // ----- List of items in folder
+        $v_dirlist_descr = array();
+        $v_dirlist_nb = 0;
+        if ($v_folder_handler = @opendir($v_descr['filename'])) {
+          while (($v_item_handler = @readdir($v_folder_handler)) !== false) {
+
+            // ----- Skip '.' and '..'
+            if (($v_item_handler == '.') || ($v_item_handler == '..')) {
+                continue;
+            }
+
+            // ----- Compose the full filename
+            $v_dirlist_descr[$v_dirlist_nb]['filename'] = $v_descr['filename'].'/'.$v_item_handler;
+
+            // ----- Look for different stored filename
+            // Because the name of the folder was changed, the name of the
+            // files/sub-folders also change
+            if (($v_descr['stored_filename'] != $v_descr['filename'])
+                 && (!isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH]))) {
+              if ($v_descr['stored_filename'] != '') {
+                $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_descr['stored_filename'].'/'.$v_item_handler;
+              }
+              else {
+                $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_item_handler;
+              }
+            }
+
+            $v_dirlist_nb++;
+          }
+
+          @closedir($v_folder_handler);
+        }
+        else {
+          // TBC : unable to open folder in read mode
+        }
+
+        // ----- Expand each element of the list
+        if ($v_dirlist_nb != 0) {
+          // ----- Expand
+          if (($v_result = $this->privFileDescrExpand($v_dirlist_descr, $p_options)) != 1) {
+            return $v_result;
+          }
+
+          // ----- Concat the resulting list
+          $v_result_list = array_merge($v_result_list, $v_dirlist_descr);
+        }
+        else {
+        }
+
+        // ----- Free local array
+        unset($v_dirlist_descr);
+      }
+    }
+
+    // ----- Get the result list
+    $p_filedescr_list = $v_result_list;
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privCreate()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privCreate($p_filedescr_list, &$p_result_list, &$p_options)
+  {
+    $v_result=1;
+    $v_list_detail = array();
+
+    // ----- Magic quotes trick
+    $this->privDisableMagicQuotes();
+
+    // ----- Open the file in write mode
+    if (($v_result = $this->privOpenFd('wb')) != 1)
+    {
+      // ----- Return
+      return $v_result;
+    }
+
+    // ----- Add the list of files
+    $v_result = $this->privAddList($p_filedescr_list, $p_result_list, $p_options);
+
+    // ----- Close
+    $this->privCloseFd();
+
+    // ----- Magic quotes trick
+    $this->privSwapBackMagicQuotes();
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privAdd()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privAdd($p_filedescr_list, &$p_result_list, &$p_options)
+  {
+    $v_result=1;
+    $v_list_detail = array();
+
+    // ----- Look if the archive exists or is empty
+    if ((!is_file($this->zipname)) || (filesize($this->zipname) == 0))
+    {
+
+      // ----- Do a create
+      $v_result = $this->privCreate($p_filedescr_list, $p_result_list, $p_options);
+
+      // ----- Return
+      return $v_result;
+    }
+    // ----- Magic quotes trick
+    $this->privDisableMagicQuotes();
+
+    // ----- Open the zip file
+    if (($v_result=$this->privOpenFd('rb')) != 1)
+    {
+      // ----- Magic quotes trick
+      $this->privSwapBackMagicQuotes();
+
+      // ----- Return
+      return $v_result;
+    }
+
+    // ----- Read the central directory informations
+    $v_central_dir = array();
+    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
+    {
+      $this->privCloseFd();
+      $this->privSwapBackMagicQuotes();
+      return $v_result;
+    }
+
+    // ----- Go to beginning of File
+    @rewind($this->zip_fd);
+
+    // ----- Creates a temporay file
+    $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';
+
+    // ----- Open the temporary file in write mode
+    if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0)
+    {
+      $this->privCloseFd();
+      $this->privSwapBackMagicQuotes();
+
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode');
+
+      // ----- Return
+      return PclZip::errorCode();
+    }
+
+    // ----- Copy the files from the archive to the temporary file
+    // TBC : Here I should better append the file and go back to erase the central dir
+    $v_size = $v_central_dir['offset'];
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      $v_buffer = fread($this->zip_fd, $v_read_size);
+      @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Swap the file descriptor
+    // Here is a trick : I swap the temporary fd with the zip fd, in order to use
+    // the following methods on the temporary fil and not the real archive
+    $v_swap = $this->zip_fd;
+    $this->zip_fd = $v_zip_temp_fd;
+    $v_zip_temp_fd = $v_swap;
+
+    // ----- Add the files
+    $v_header_list = array();
+    if (($v_result = $this->privAddFileList($p_filedescr_list, $v_header_list, $p_options)) != 1)
+    {
+      fclose($v_zip_temp_fd);
+      $this->privCloseFd();
+      @unlink($v_zip_temp_name);
+      $this->privSwapBackMagicQuotes();
+
+      // ----- Return
+      return $v_result;
+    }
+
+    // ----- Store the offset of the central dir
+    $v_offset = @ftell($this->zip_fd);
+
+    // ----- Copy the block of file headers from the old archive
+    $v_size = $v_central_dir['size'];
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      $v_buffer = @fread($v_zip_temp_fd, $v_read_size);
+      @fwrite($this->zip_fd, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Create the Central Dir files header
+    for ($i=0, $v_count=0; $i<sizeof($v_header_list); $i++)
+    {
+      // ----- Create the file header
+      if ($v_header_list[$i]['status'] == 'ok') {
+        if (($v_result = $this->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
+          fclose($v_zip_temp_fd);
+          $this->privCloseFd();
+          @unlink($v_zip_temp_name);
+          $this->privSwapBackMagicQuotes();
+
+          // ----- Return
+          return $v_result;
+        }
+        $v_count++;
+      }
+
+      // ----- Transform the header to a 'usable' info
+      $this->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);
+    }
+
+    // ----- Zip file comment
+    $v_comment = $v_central_dir['comment'];
+    if (isset($p_options[PCLZIP_OPT_COMMENT])) {
+      $v_comment = $p_options[PCLZIP_OPT_COMMENT];
+    }
+    if (isset($p_options[PCLZIP_OPT_ADD_COMMENT])) {
+      $v_comment = $v_comment.$p_options[PCLZIP_OPT_ADD_COMMENT];
+    }
+    if (isset($p_options[PCLZIP_OPT_PREPEND_COMMENT])) {
+      $v_comment = $p_options[PCLZIP_OPT_PREPEND_COMMENT].$v_comment;
+    }
+
+    // ----- Calculate the size of the central header
+    $v_size = @ftell($this->zip_fd)-$v_offset;
+
+    // ----- Create the central dir footer
+    if (($v_result = $this->privWriteCentralHeader($v_count+$v_central_dir['entries'], $v_size, $v_offset, $v_comment)) != 1)
+    {
+      // ----- Reset the file list
+      unset($v_header_list);
+      $this->privSwapBackMagicQuotes();
+
+      // ----- Return
+      return $v_result;
+    }
+
+    // ----- Swap back the file descriptor
+    $v_swap = $this->zip_fd;
+    $this->zip_fd = $v_zip_temp_fd;
+    $v_zip_temp_fd = $v_swap;
+
+    // ----- Close
+    $this->privCloseFd();
+
+    // ----- Close the temporary file
+    @fclose($v_zip_temp_fd);
+
+    // ----- Magic quotes trick
+    $this->privSwapBackMagicQuotes();
+
+    // ----- Delete the zip file
+    // TBC : I should test the result ...
+    @unlink($this->zipname);
+
+    // ----- Rename the temporary file
+    // TBC : I should test the result ...
+    //@rename($v_zip_temp_name, $this->zipname);
+    PclZipUtilRename($v_zip_temp_name, $this->zipname);
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privOpenFd()
+  // Description :
+  // Parameters :
+  // --------------------------------------------------------------------------------
+  function privOpenFd($p_mode)
+  {
+    $v_result=1;
+
+    // ----- Look if already open
+    if ($this->zip_fd != 0)
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Zip file \''.$this->zipname.'\' already open');
+
+      // ----- Return
+      return PclZip::errorCode();
+    }
+
+    // ----- Open the zip file
+    if (($this->zip_fd = @fopen($this->zipname, $p_mode)) == 0)
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in '.$p_mode.' mode');
+
+      // ----- Return
+      return PclZip::errorCode();
+    }
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privCloseFd()
+  // Description :
+  // Parameters :
+  // --------------------------------------------------------------------------------
+  function privCloseFd()
+  {
+    $v_result=1;
+
+    if ($this->zip_fd != 0)
+      @fclose($this->zip_fd);
+    $this->zip_fd = 0;
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privAddList()
+  // Description :
+  //   $p_add_dir and $p_remove_dir will give the ability to memorize a path which is
+  //   different from the real path of the file. This is usefull if you want to have PclTar
+  //   running in any directory, and memorize relative path from an other directory.
+  // Parameters :
+  //   $p_list : An array containing the file or directory names to add in the tar
+  //   $p_result_list : list of added files with their properties (specially the status field)
+  //   $p_add_dir : Path to add in the filename path archived
+  //   $p_remove_dir : Path to remove in the filename path archived
+  // Return Values :
+  // --------------------------------------------------------------------------------
+//  function privAddList($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options)
+  function privAddList($p_filedescr_list, &$p_result_list, &$p_options)
+  {
+    $v_result=1;
+
+    // ----- Add the files
+    $v_header_list = array();
+    if (($v_result = $this->privAddFileList($p_filedescr_list, $v_header_list, $p_options)) != 1)
+    {
+      // ----- Return
+      return $v_result;
+    }
+
+    // ----- Store the offset of the central dir
+    $v_offset = @ftell($this->zip_fd);
+
+    // ----- Create the Central Dir files header
+    for ($i=0,$v_count=0; $i<sizeof($v_header_list); $i++)
+    {
+      // ----- Create the file header
+      if ($v_header_list[$i]['status'] == 'ok') {
+        if (($v_result = $this->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
+          // ----- Return
+          return $v_result;
+        }
+        $v_count++;
+      }
+
+      // ----- Transform the header to a 'usable' info
+      $this->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);
+    }
+
+    // ----- Zip file comment
+    $v_comment = '';
+    if (isset($p_options[PCLZIP_OPT_COMMENT])) {
+      $v_comment = $p_options[PCLZIP_OPT_COMMENT];
+    }
+
+    // ----- Calculate the size of the central header
+    $v_size = @ftell($this->zip_fd)-$v_offset;
+
+    // ----- Create the central dir footer
+    if (($v_result = $this->privWriteCentralHeader($v_count, $v_size, $v_offset, $v_comment)) != 1)
+    {
+      // ----- Reset the file list
+      unset($v_header_list);
+
+      // ----- Return
+      return $v_result;
+    }
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privAddFileList()
+  // Description :
+  // Parameters :
+  //   $p_filedescr_list : An array containing the file description
+  //                      or directory names to add in the zip
+  //   $p_result_list : list of added files with their properties (specially the status field)
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privAddFileList($p_filedescr_list, &$p_result_list, &$p_options)
+  {
+    $v_result=1;
+    $v_header = array();
+
+    // ----- Recuperate the current number of elt in list
+    $v_nb = sizeof($p_result_list);
+
+    // ----- Loop on the files
+    for ($j=0; ($j<sizeof($p_filedescr_list)) && ($v_result==1); $j++) {
+      // ----- Format the filename
+      $p_filedescr_list[$j]['filename']
+      = PclZipUtilTranslateWinPath($p_filedescr_list[$j]['filename'], false);
+
+
+      // ----- Skip empty file names
+      // TBC : Can this be possible ? not checked in DescrParseAtt ?
+      if ($p_filedescr_list[$j]['filename'] == "") {
+        continue;
+      }
+
+      // ----- Check the filename
+      if (   ($p_filedescr_list[$j]['type'] != 'virtual_file')
+          && (!file_exists($p_filedescr_list[$j]['filename']))) {
+        PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "File '".$p_filedescr_list[$j]['filename']."' does not exist");
+        return PclZip::errorCode();
+      }
+
+      // ----- Look if it is a file or a dir with no all path remove option
+      // or a dir with all its path removed
+//      if (   (is_file($p_filedescr_list[$j]['filename']))
+//          || (   is_dir($p_filedescr_list[$j]['filename'])
+      if (   ($p_filedescr_list[$j]['type'] == 'file')
+          || ($p_filedescr_list[$j]['type'] == 'virtual_file')
+          || (   ($p_filedescr_list[$j]['type'] == 'folder')
+              && (   !isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH])
+                  || !$p_options[PCLZIP_OPT_REMOVE_ALL_PATH]))
+          ) {
+
+        // ----- Add the file
+        $v_result = $this->privAddFile($p_filedescr_list[$j], $v_header,
+                                       $p_options);
+        if ($v_result != 1) {
+          return $v_result;
+        }
+
+        // ----- Store the file infos
+        $p_result_list[$v_nb++] = $v_header;
+      }
+    }
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privAddFile()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privAddFile($p_filedescr, &$p_header, &$p_options)
+  {
+    $v_result=1;
+
+    // ----- Working variable
+    $p_filename = $p_filedescr['filename'];
+
+    // TBC : Already done in the fileAtt check ... ?
+    if ($p_filename == "") {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file list parameter (invalid or empty list)");
+
+      // ----- Return
+      return PclZip::errorCode();
+    }
+
+    // ----- Look for a stored different filename
+    /* TBC : Removed
+    if (isset($p_filedescr['stored_filename'])) {
+      $v_stored_filename = $p_filedescr['stored_filename'];
+    }
+    else {
+      $v_stored_filename = $p_filedescr['stored_filename'];
+    }
+    */
+
+    // ----- Set the file properties
+    clearstatcache();
+    $p_header['version'] = 20;
+    $p_header['version_extracted'] = 10;
+    $p_header['flag'] = 0;
+    $p_header['compression'] = 0;
+    $p_header['crc'] = 0;
+    $p_header['compressed_size'] = 0;
+    $p_header['filename_len'] = strlen($p_filename);
+    $p_header['extra_len'] = 0;
+    $p_header['disk'] = 0;
+    $p_header['internal'] = 0;
+    $p_header['offset'] = 0;
+    $p_header['filename'] = $p_filename;
+// TBC : Removed    $p_header['stored_filename'] = $v_stored_filename;
+    $p_header['stored_filename'] = $p_filedescr['stored_filename'];
+    $p_header['extra'] = '';
+    $p_header['status'] = 'ok';
+    $p_header['index'] = -1;
+
+    // ----- Look for regular file
+    if ($p_filedescr['type']=='file') {
+      $p_header['external'] = 0x00000000;
+      $p_header['size'] = filesize($p_filename);
+    }
+
+    // ----- Look for regular folder
+    else if ($p_filedescr['type']=='folder') {
+      $p_header['external'] = 0x00000010;
+      $p_header['mtime'] = filemtime($p_filename);
+      $p_header['size'] = filesize($p_filename);
+    }
+
+    // ----- Look for virtual file
+    else if ($p_filedescr['type'] == 'virtual_file') {
+      $p_header['external'] = 0x00000000;
+      $p_header['size'] = strlen($p_filedescr['content']);
+    }
+
+
+    // ----- Look for filetime
+    if (isset($p_filedescr['mtime'])) {
+      $p_header['mtime'] = $p_filedescr['mtime'];
+    }
+    else if ($p_filedescr['type'] == 'virtual_file') {
+      $p_header['mtime'] = time();
+    }
+    else {
+      $p_header['mtime'] = filemtime($p_filename);
+    }
+
+    // ------ Look for file comment
+    if (isset($p_filedescr['comment'])) {
+      $p_header['comment_len'] = strlen($p_filedescr['comment']);
+      $p_header['comment'] = $p_filedescr['comment'];
+    }
+    else {
+      $p_header['comment_len'] = 0;
+      $p_header['comment'] = '';
+    }
+
+    // ----- Look for pre-add callback
+    if (isset($p_options[PCLZIP_CB_PRE_ADD])) {
+
+      // ----- Generate a local information
+      $v_local_header = array();
+      $this->privConvertHeader2FileInfo($p_header, $v_local_header);
+
+      // ----- Call the callback
+      // Here I do not use call_user_func() because I need to send a reference to the
+      // header.
+      $v_result = $p_options[PCLZIP_CB_PRE_ADD](PCLZIP_CB_PRE_ADD, $v_local_header);
+      if ($v_result == 0) {
+        // ----- Change the file status
+        $p_header['status'] = "skipped";
+        $v_result = 1;
+      }
+
+      // ----- Update the informations
+      // Only some fields can be modified
+      if ($p_header['stored_filename'] != $v_local_header['stored_filename']) {
+        $p_header['stored_filename'] = PclZipUtilPathReduction($v_local_header['stored_filename']);
+      }
+    }
+
+    // ----- Look for empty stored filename
+    if ($p_header['stored_filename'] == "") {
+      $p_header['status'] = "filtered";
+    }
+
+    // ----- Check the path length
+    if (strlen($p_header['stored_filename']) > 0xFF) {
+      $p_header['status'] = 'filename_too_long';
+    }
+
+    // ----- Look if no error, or file not skipped
+    if ($p_header['status'] == 'ok') {
+
+      // ----- Look for a file
+      if ($p_filedescr['type'] == 'file') {
+        // ----- Look for using temporary file to zip
+        if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF]))
+            && (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON])
+                || (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD])
+                    && ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] <= $p_header['size'])) ) ) {
+          $v_result = $this->privAddFileUsingTempFile($p_filedescr, $p_header, $p_options);
+          if ($v_result < PCLZIP_ERR_NO_ERROR) {
+            return $v_result;
+          }
+        }
+
+        // ----- Use "in memory" zip algo
+        else {
+
+        // ----- Open the source file
+        if (($v_file = @fopen($p_filename, "rb")) == 0) {
+          PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to open file '$p_filename' in binary read mode");
+          return PclZip::errorCode();
+        }
+
+        // ----- Read the file content
+        $v_content = @fread($v_file, $p_header['size']);
+
+        // ----- Close the file
+        @fclose($v_file);
+
+        // ----- Calculate the CRC
+        $p_header['crc'] = @crc32($v_content);
+
+        // ----- Look for no compression
+        if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) {
+          // ----- Set header parameters
+          $p_header['compressed_size'] = $p_header['size'];
+          $p_header['compression'] = 0;
+        }
+
+        // ----- Look for normal compression
+        else {
+          // ----- Compress the content
+          $v_content = @gzdeflate($v_content);
+
+          // ----- Set header parameters
+          $p_header['compressed_size'] = strlen($v_content);
+          $p_header['compression'] = 8;
+        }
+
+        // ----- Call the header generation
+        if (($v_result = $this->privWriteFileHeader($p_header)) != 1) {
+          @fclose($v_file);
+          return $v_result;
+        }
+
+        // ----- Write the compressed (or not) content
+        @fwrite($this->zip_fd, $v_content, $p_header['compressed_size']);
+
+        }
+
+      }
+
+      // ----- Look for a virtual file (a file from string)
+      else if ($p_filedescr['type'] == 'virtual_file') {
+
+        $v_content = $p_filedescr['content'];
+
+        // ----- Calculate the CRC
+        $p_header['crc'] = @crc32($v_content);
+
+        // ----- Look for no compression
+        if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) {
+          // ----- Set header parameters
+          $p_header['compressed_size'] = $p_header['size'];
+          $p_header['compression'] = 0;
+        }
+
+        // ----- Look for normal compression
+        else {
+          // ----- Compress the content
+          $v_content = @gzdeflate($v_content);
+
+          // ----- Set header parameters
+          $p_header['compressed_size'] = strlen($v_content);
+          $p_header['compression'] = 8;
+        }
+
+        // ----- Call the header generation
+        if (($v_result = $this->privWriteFileHeader($p_header)) != 1) {
+          @fclose($v_file);
+          return $v_result;
+        }
+
+        // ----- Write the compressed (or not) content
+        @fwrite($this->zip_fd, $v_content, $p_header['compressed_size']);
+      }
+
+      // ----- Look for a directory
+      else if ($p_filedescr['type'] == 'folder') {
+        // ----- Look for directory last '/'
+        if (@substr($p_header['stored_filename'], -1) != '/') {
+          $p_header['stored_filename'] .= '/';
+        }
+
+        // ----- Set the file properties
+        $p_header['size'] = 0;
+        //$p_header['external'] = 0x41FF0010;   // Value for a folder : to be checked
+        $p_header['external'] = 0x00000010;   // Value for a folder : to be checked
+
+        // ----- Call the header generation
+        if (($v_result = $this->privWriteFileHeader($p_header)) != 1)
+        {
+          return $v_result;
+        }
+      }
+    }
+
+    // ----- Look for post-add callback
+    if (isset($p_options[PCLZIP_CB_POST_ADD])) {
+
+      // ----- Generate a local information
+      $v_local_header = array();
+      $this->privConvertHeader2FileInfo($p_header, $v_local_header);
+
+      // ----- Call the callback
+      // Here I do not use call_user_func() because I need to send a reference to the
+      // header.
+      $v_result = $p_options[PCLZIP_CB_POST_ADD](PCLZIP_CB_POST_ADD, $v_local_header);
+      if ($v_result == 0) {
+        // ----- Ignored
+        $v_result = 1;
+      }
+
+      // ----- Update the informations
+      // Nothing can be modified
+    }
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privAddFileUsingTempFile()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privAddFileUsingTempFile($p_filedescr, &$p_header, &$p_options)
+  {
+    $v_result=PCLZIP_ERR_NO_ERROR;
+
+    // ----- Working variable
+    $p_filename = $p_filedescr['filename'];
+
+
+    // ----- Open the source file
+    if (($v_file = @fopen($p_filename, "rb")) == 0) {
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to open file '$p_filename' in binary read mode");
+      return PclZip::errorCode();
+    }
+
+    // ----- Creates a compressed temporary file
+    $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.gz';
+    if (($v_file_compressed = @gzopen($v_gzip_temp_name, "wb")) == 0) {
+      fclose($v_file);
+      PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary write mode');
+      return PclZip::errorCode();
+    }
+
+    // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks
+    $v_size = filesize($p_filename);
+    while ($v_size != 0) {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      $v_buffer = @fread($v_file, $v_read_size);
+      //$v_binary_data = pack('a'.$v_read_size, $v_buffer);
+      @gzputs($v_file_compressed, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Close the file
+    @fclose($v_file);
+    @gzclose($v_file_compressed);
+
+    // ----- Check the minimum file size
+    if (filesize($v_gzip_temp_name) < 18) {
+      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'gzip temporary file \''.$v_gzip_temp_name.'\' has invalid filesize - should be minimum 18 bytes');
+      return PclZip::errorCode();
+    }
+
+    // ----- Extract the compressed attributes
+    if (($v_file_compressed = @fopen($v_gzip_temp_name, "rb")) == 0) {
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode');
+      return PclZip::errorCode();
+    }
+
+    // ----- Read the gzip file header
+    $v_binary_data = @fread($v_file_compressed, 10);
+    $v_data_header = unpack('a1id1/a1id2/a1cm/a1flag/Vmtime/a1xfl/a1os', $v_binary_data);
+
+    // ----- Check some parameters
+    $v_data_header['os'] = bin2hex($v_data_header['os']);
+
+    // ----- Read the gzip file footer
+    @fseek($v_file_compressed, filesize($v_gzip_temp_name)-8);
+    $v_binary_data = @fread($v_file_compressed, 8);
+    $v_data_footer = unpack('Vcrc/Vcompressed_size', $v_binary_data);
+
+    // ----- Set the attributes
+    $p_header['compression'] = ord($v_data_header['cm']);
+    //$p_header['mtime'] = $v_data_header['mtime'];
+    $p_header['crc'] = $v_data_footer['crc'];
+    $p_header['compressed_size'] = filesize($v_gzip_temp_name)-18;
+
+    // ----- Close the file
+    @fclose($v_file_compressed);
+
+    // ----- Call the header generation
+    if (($v_result = $this->privWriteFileHeader($p_header)) != 1) {
+      return $v_result;
+    }
+
+    // ----- Add the compressed data
+    if (($v_file_compressed = @fopen($v_gzip_temp_name, "rb")) == 0)
+    {
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode');
+      return PclZip::errorCode();
+    }
+
+    // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks
+    fseek($v_file_compressed, 10);
+    $v_size = $p_header['compressed_size'];
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      $v_buffer = @fread($v_file_compressed, $v_read_size);
+      //$v_binary_data = pack('a'.$v_read_size, $v_buffer);
+      @fwrite($this->zip_fd, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Close the file
+    @fclose($v_file_compressed);
+
+    // ----- Unlink the temporary file
+    @unlink($v_gzip_temp_name);
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privCalculateStoredFilename()
+  // Description :
+  //   Based on file descriptor properties and global options, this method
+  //   calculate the filename that will be stored in the archive.
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privCalculateStoredFilename(&$p_filedescr, &$p_options)
+  {
+    $v_result=1;
+
+    // ----- Working variables
+    $p_filename = $p_filedescr['filename'];
+    if (isset($p_options[PCLZIP_OPT_ADD_PATH])) {
+      $p_add_dir = $p_options[PCLZIP_OPT_ADD_PATH];
+    }
+    else {
+      $p_add_dir = '';
+    }
+    if (isset($p_options[PCLZIP_OPT_REMOVE_PATH])) {
+      $p_remove_dir = $p_options[PCLZIP_OPT_REMOVE_PATH];
+    }
+    else {
+      $p_remove_dir = '';
+    }
+    if (isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH])) {
+      $p_remove_all_dir = $p_options[PCLZIP_OPT_REMOVE_ALL_PATH];
+    }
+    else {
+      $p_remove_all_dir = 0;
+    }
+
+
+    // ----- Look for full name change
+    if (isset($p_filedescr['new_full_name'])) {
+      // ----- Remove drive letter if any
+      $v_stored_filename = PclZipUtilTranslateWinPath($p_filedescr['new_full_name']);
+    }
+
+    // ----- Look for path and/or short name change
+    else {
+
+      // ----- Look for short name change
+      // Its when we cahnge just the filename but not the path
+      if (isset($p_filedescr['new_short_name'])) {
+        $v_path_info = pathinfo($p_filename);
+        $v_dir = '';
+        if ($v_path_info['dirname'] != '') {
+          $v_dir = $v_path_info['dirname'].'/';
+        }
+        $v_stored_filename = $v_dir.$p_filedescr['new_short_name'];
+      }
+      else {
+        // ----- Calculate the stored filename
+        $v_stored_filename = $p_filename;
+      }
+
+      // ----- Look for all path to remove
+      if ($p_remove_all_dir) {
+        $v_stored_filename = basename($p_filename);
+      }
+      // ----- Look for partial path remove
+      else if ($p_remove_dir != "") {
+        if (substr($p_remove_dir, -1) != '/')
+          $p_remove_dir .= "/";
+
+        if (   (substr($p_filename, 0, 2) == "./")
+            || (substr($p_remove_dir, 0, 2) == "./")) {
+
+          if (   (substr($p_filename, 0, 2) == "./")
+              && (substr($p_remove_dir, 0, 2) != "./")) {
+            $p_remove_dir = "./".$p_remove_dir;
+          }
+          if (   (substr($p_filename, 0, 2) != "./")
+              && (substr($p_remove_dir, 0, 2) == "./")) {
+            $p_remove_dir = substr($p_remove_dir, 2);
+          }
+        }
+
+        $v_compare = PclZipUtilPathInclusion($p_remove_dir,
+                                             $v_stored_filename);
+        if ($v_compare > 0) {
+          if ($v_compare == 2) {
+            $v_stored_filename = "";
+          }
+          else {
+            $v_stored_filename = substr($v_stored_filename,
+                                        strlen($p_remove_dir));
+          }
+        }
+      }
+
+      // ----- Remove drive letter if any
+      $v_stored_filename = PclZipUtilTranslateWinPath($v_stored_filename);
+
+      // ----- Look for path to add
+      if ($p_add_dir != "") {
+        if (substr($p_add_dir, -1) == "/")
+          $v_stored_filename = $p_add_dir.$v_stored_filename;
+        else
+          $v_stored_filename = $p_add_dir."/".$v_stored_filename;
+      }
+    }
+
+    // ----- Filename (reduce the path of stored name)
+    $v_stored_filename = PclZipUtilPathReduction($v_stored_filename);
+    $p_filedescr['stored_filename'] = $v_stored_filename;
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privWriteFileHeader()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privWriteFileHeader(&$p_header)
+  {
+    $v_result=1;
+
+    // ----- Store the offset position of the file
+    $p_header['offset'] = ftell($this->zip_fd);
+
+    // ----- Transform UNIX mtime to DOS format mdate/mtime
+    $v_date = getdate($p_header['mtime']);
+    $v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2;
+    $v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday'];
+
+    // ----- Packed data
+    $v_binary_data = pack("VvvvvvVVVvv", 0x04034b50,
+	                      $p_header['version_extracted'], $p_header['flag'],
+                          $p_header['compression'], $v_mtime, $v_mdate,
+                          $p_header['crc'], $p_header['compressed_size'],
+						  $p_header['size'],
+                          strlen($p_header['stored_filename']),
+						  $p_header['extra_len']);
+
+    // ----- Write the first 148 bytes of the header in the archive
+    fputs($this->zip_fd, $v_binary_data, 30);
+
+    // ----- Write the variable fields
+    if (strlen($p_header['stored_filename']) != 0)
+    {
+      fputs($this->zip_fd, $p_header['stored_filename'], strlen($p_header['stored_filename']));
+    }
+    if ($p_header['extra_len'] != 0)
+    {
+      fputs($this->zip_fd, $p_header['extra'], $p_header['extra_len']);
+    }
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privWriteCentralFileHeader()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privWriteCentralFileHeader(&$p_header)
+  {
+    $v_result=1;
+
+    // TBC
+    //for(reset($p_header); $key = key($p_header); next($p_header)) {
+    //}
+
+    // ----- Transform UNIX mtime to DOS format mdate/mtime
+    $v_date = getdate($p_header['mtime']);
+    $v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2;
+    $v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday'];
+
+
+    // ----- Packed data
+    $v_binary_data = pack("VvvvvvvVVVvvvvvVV", 0x02014b50,
+	                      $p_header['version'], $p_header['version_extracted'],
+                          $p_header['flag'], $p_header['compression'],
+						  $v_mtime, $v_mdate, $p_header['crc'],
+                          $p_header['compressed_size'], $p_header['size'],
+                          strlen($p_header['stored_filename']),
+						  $p_header['extra_len'], $p_header['comment_len'],
+                          $p_header['disk'], $p_header['internal'],
+						  $p_header['external'], $p_header['offset']);
+
+    // ----- Write the 42 bytes of the header in the zip file
+    fputs($this->zip_fd, $v_binary_data, 46);
+
+    // ----- Write the variable fields
+    if (strlen($p_header['stored_filename']) != 0)
+    {
+      fputs($this->zip_fd, $p_header['stored_filename'], strlen($p_header['stored_filename']));
+    }
+    if ($p_header['extra_len'] != 0)
+    {
+      fputs($this->zip_fd, $p_header['extra'], $p_header['extra_len']);
+    }
+    if ($p_header['comment_len'] != 0)
+    {
+      fputs($this->zip_fd, $p_header['comment'], $p_header['comment_len']);
+    }
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privWriteCentralHeader()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privWriteCentralHeader($p_nb_entries, $p_size, $p_offset, $p_comment)
+  {
+    $v_result=1;
+
+    // ----- Packed data
+    $v_binary_data = pack("VvvvvVVv", 0x06054b50, 0, 0, $p_nb_entries,
+	                      $p_nb_entries, $p_size,
+						  $p_offset, strlen($p_comment));
+
+    // ----- Write the 22 bytes of the header in the zip file
+    fputs($this->zip_fd, $v_binary_data, 22);
+
+    // ----- Write the variable fields
+    if (strlen($p_comment) != 0)
+    {
+      fputs($this->zip_fd, $p_comment, strlen($p_comment));
+    }
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privList()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privList(&$p_list)
+  {
+    $v_result=1;
+
+    // ----- Magic quotes trick
+    $this->privDisableMagicQuotes();
+
+    // ----- Open the zip file
+    if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0)
+    {
+      // ----- Magic quotes trick
+      $this->privSwapBackMagicQuotes();
+
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode');
+
+      // ----- Return
+      return PclZip::errorCode();
+    }
+
+    // ----- Read the central directory informations
+    $v_central_dir = array();
+    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
+    {
+      $this->privSwapBackMagicQuotes();
+      return $v_result;
+    }
+
+    // ----- Go to beginning of Central Dir
+    @rewind($this->zip_fd);
+    if (@fseek($this->zip_fd, $v_central_dir['offset']))
+    {
+      $this->privSwapBackMagicQuotes();
+
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
+
+      // ----- Return
+      return PclZip::errorCode();
+    }
+
+    // ----- Read each entry
+    for ($i=0; $i<$v_central_dir['entries']; $i++)
+    {
+      // ----- Read the file header
+      if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1)
+      {
+        $this->privSwapBackMagicQuotes();
+        return $v_result;
+      }
+      $v_header['index'] = $i;
+
+      // ----- Get the only interesting attributes
+      $this->privConvertHeader2FileInfo($v_header, $p_list[$i]);
+      unset($v_header);
+    }
+
+    // ----- Close the zip file
+    $this->privCloseFd();
+
+    // ----- Magic quotes trick
+    $this->privSwapBackMagicQuotes();
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privConvertHeader2FileInfo()
+  // Description :
+  //   This function takes the file informations from the central directory
+  //   entries and extract the interesting parameters that will be given back.
+  //   The resulting file infos are set in the array $p_info
+  //     $p_info['filename'] : Filename with full path. Given by user (add),
+  //                           extracted in the filesystem (extract).
+  //     $p_info['stored_filename'] : Stored filename in the archive.
+  //     $p_info['size'] = Size of the file.
+  //     $p_info['compressed_size'] = Compressed size of the file.
+  //     $p_info['mtime'] = Last modification date of the file.
+  //     $p_info['comment'] = Comment associated with the file.
+  //     $p_info['folder'] = true/false : indicates if the entry is a folder or not.
+  //     $p_info['status'] = status of the action on the file.
+  //     $p_info['crc'] = CRC of the file content.
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privConvertHeader2FileInfo($p_header, &$p_info)
+  {
+    $v_result=1;
+
+    // ----- Get the interesting attributes
+    $v_temp_path = PclZipUtilPathReduction($p_header['filename']);
+    $p_info['filename'] = $v_temp_path;
+    $v_temp_path = PclZipUtilPathReduction($p_header['stored_filename']);
+    $p_info['stored_filename'] = $v_temp_path;
+    $p_info['size'] = $p_header['size'];
+    $p_info['compressed_size'] = $p_header['compressed_size'];
+    $p_info['mtime'] = $p_header['mtime'];
+    $p_info['comment'] = $p_header['comment'];
+    $p_info['folder'] = (($p_header['external']&0x00000010)==0x00000010);
+    $p_info['index'] = $p_header['index'];
+    $p_info['status'] = $p_header['status'];
+    $p_info['crc'] = $p_header['crc'];
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privExtractByRule()
+  // Description :
+  //   Extract a file or directory depending of rules (by index, by name, ...)
+  // Parameters :
+  //   $p_file_list : An array where will be placed the properties of each
+  //                  extracted file
+  //   $p_path : Path to add while writing the extracted files
+  //   $p_remove_path : Path to remove (from the file memorized path) while writing the
+  //                    extracted files. If the path does not match the file path,
+  //                    the file is extracted with its memorized path.
+  //                    $p_remove_path does not apply to 'list' mode.
+  //                    $p_path and $p_remove_path are commulative.
+  // Return Values :
+  //   1 on success,0 or less on error (see error code list)
+  // --------------------------------------------------------------------------------
+  function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
+  {
+    $v_result=1;
+
+    // ----- Magic quotes trick
+    $this->privDisableMagicQuotes();
+
+    // ----- Check the path
+    if (   ($p_path == "")
+	    || (   (substr($p_path, 0, 1) != "/")
+		    && (substr($p_path, 0, 3) != "../")
+			&& (substr($p_path,1,2)!=":/")))
+      $p_path = "./".$p_path;
+
+    // ----- Reduce the path last (and duplicated) '/'
+    if (($p_path != "./") && ($p_path != "/"))
+    {
+      // ----- Look for the path end '/'
+      while (substr($p_path, -1) == "/")
+      {
+        $p_path = substr($p_path, 0, strlen($p_path)-1);
+      }
+    }
+
+    // ----- Look for path to remove format (should end by /)
+    if (($p_remove_path != "") && (substr($p_remove_path, -1) != '/'))
+    {
+      $p_remove_path .= '/';
+    }
+    $p_remove_path_size = strlen($p_remove_path);
+
+    // ----- Open the zip file
+    if (($v_result = $this->privOpenFd('rb')) != 1)
+    {
+      $this->privSwapBackMagicQuotes();
+      return $v_result;
+    }
+
+    // ----- Read the central directory informations
+    $v_central_dir = array();
+    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
+    {
+      // ----- Close the zip file
+      $this->privCloseFd();
+      $this->privSwapBackMagicQuotes();
+
+      return $v_result;
+    }
+
+    // ----- Start at beginning of Central Dir
+    $v_pos_entry = $v_central_dir['offset'];
+
+    // ----- Read each entry
+    $j_start = 0;
+    for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++)
+    {
+
+      // ----- Read next Central dir entry
+      @rewind($this->zip_fd);
+      if (@fseek($this->zip_fd, $v_pos_entry))
+      {
+        // ----- Close the zip file
+        $this->privCloseFd();
+        $this->privSwapBackMagicQuotes();
+
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
+
+        // ----- Return
+        return PclZip::errorCode();
+      }
+
+      // ----- Read the file header
+      $v_header = array();
+      if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1)
+      {
+        // ----- Close the zip file
+        $this->privCloseFd();
+        $this->privSwapBackMagicQuotes();
+
+        return $v_result;
+      }
+
+      // ----- Store the index
+      $v_header['index'] = $i;
+
+      // ----- Store the file position
+      $v_pos_entry = ftell($this->zip_fd);
+
+      // ----- Look for the specific extract rules
+      $v_extract = false;
+
+      // ----- Look for extract by name rule
+      if (   (isset($p_options[PCLZIP_OPT_BY_NAME]))
+          && ($p_options[PCLZIP_OPT_BY_NAME] != 0)) {
+
+          // ----- Look if the filename is in the list
+          for ($j=0; ($j<sizeof($p_options[PCLZIP_OPT_BY_NAME])) && (!$v_extract); $j++) {
+
+              // ----- Look for a directory
+              if (substr($p_options[PCLZIP_OPT_BY_NAME][$j], -1) == "/") {
+
+                  // ----- Look if the directory is in the filename path
+                  if (   (strlen($v_header['stored_filename']) > strlen($p_options[PCLZIP_OPT_BY_NAME][$j]))
+                      && (substr($v_header['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) {
+                      $v_extract = true;
+                  }
+              }
+              // ----- Look for a filename
+              elseif ($v_header['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) {
+                  $v_extract = true;
+              }
+          }
+      }
+
+      // ----- Look for extract by ereg rule
+      // ereg() is deprecated with PHP 5.3
+      /*
+      else if (   (isset($p_options[PCLZIP_OPT_BY_EREG]))
+               && ($p_options[PCLZIP_OPT_BY_EREG] != "")) {
+
+          if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header['stored_filename'])) {
+              $v_extract = true;
+          }
+      }
+      */
+
+      // ----- Look for extract by preg rule
+      else if (   (isset($p_options[PCLZIP_OPT_BY_PREG]))
+               && ($p_options[PCLZIP_OPT_BY_PREG] != "")) {
+
+          if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header['stored_filename'])) {
+              $v_extract = true;
+          }
+      }
+
+      // ----- Look for extract by index rule
+      else if (   (isset($p_options[PCLZIP_OPT_BY_INDEX]))
+               && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) {
+
+          // ----- Look if the index is in the list
+          for ($j=$j_start; ($j<sizeof($p_options[PCLZIP_OPT_BY_INDEX])) && (!$v_extract); $j++) {
+
+              if (($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) {
+                  $v_extract = true;
+              }
+              if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) {
+                  $j_start = $j+1;
+              }
+
+              if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) {
+                  break;
+              }
+          }
+      }
+
+      // ----- Look for no rule, which means extract all the archive
+      else {
+          $v_extract = true;
+      }
+
+	  // ----- Check compression method
+	  if (   ($v_extract)
+	      && (   ($v_header['compression'] != 8)
+		      && ($v_header['compression'] != 0))) {
+          $v_header['status'] = 'unsupported_compression';
+
+          // ----- Look for PCLZIP_OPT_STOP_ON_ERROR
+          if (   (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
+		      && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
+
+              $this->privSwapBackMagicQuotes();
+
+              PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_COMPRESSION,
+			                       "Filename '".$v_header['stored_filename']."' is "
+				  	    	  	   ."compressed by an unsupported compression "
+				  	    	  	   ."method (".$v_header['compression'].") ");
+
+              return PclZip::errorCode();
+		  }
+	  }
+
+	  // ----- Check encrypted files
+	  if (($v_extract) && (($v_header['flag'] & 1) == 1)) {
+          $v_header['status'] = 'unsupported_encryption';
+
+          // ----- Look for PCLZIP_OPT_STOP_ON_ERROR
+          if (   (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
+		      && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
+
+              $this->privSwapBackMagicQuotes();
+
+              PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION,
+			                       "Unsupported encryption for "
+				  	    	  	   ." filename '".$v_header['stored_filename']
+								   ."'");
+
+              return PclZip::errorCode();
+		  }
+    }
+
+      // ----- Look for real extraction
+      if (($v_extract) && ($v_header['status'] != 'ok')) {
+          $v_result = $this->privConvertHeader2FileInfo($v_header,
+		                                        $p_file_list[$v_nb_extracted++]);
+          if ($v_result != 1) {
+              $this->privCloseFd();
+              $this->privSwapBackMagicQuotes();
+              return $v_result;
+          }
+
+          $v_extract = false;
+      }
+
+      // ----- Look for real extraction
+      if ($v_extract)
+      {
+
+        // ----- Go to the file position
+        @rewind($this->zip_fd);
+        if (@fseek($this->zip_fd, $v_header['offset']))
+        {
+          // ----- Close the zip file
+          $this->privCloseFd();
+
+          $this->privSwapBackMagicQuotes();
+
+          // ----- Error log
+          PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
+
+          // ----- Return
+          return PclZip::errorCode();
+        }
+
+        // ----- Look for extraction as string
+        if ($p_options[PCLZIP_OPT_EXTRACT_AS_STRING]) {
+
+          $v_string = '';
+
+          // ----- Extracting the file
+          $v_result1 = $this->privExtractFileAsString($v_header, $v_string, $p_options);
+          if ($v_result1 < 1) {
+            $this->privCloseFd();
+            $this->privSwapBackMagicQuotes();
+            return $v_result1;
+          }
+
+          // ----- Get the only interesting attributes
+          if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted])) != 1)
+          {
+            // ----- Close the zip file
+            $this->privCloseFd();
+            $this->privSwapBackMagicQuotes();
+
+            return $v_result;
+          }
+
+          // ----- Set the file content
+          $p_file_list[$v_nb_extracted]['content'] = $v_string;
+
+          // ----- Next extracted file
+          $v_nb_extracted++;
+
+          // ----- Look for user callback abort
+          if ($v_result1 == 2) {
+          	break;
+          }
+        }
+        // ----- Look for extraction in standard output
+        elseif (   (isset($p_options[PCLZIP_OPT_EXTRACT_IN_OUTPUT]))
+		        && ($p_options[PCLZIP_OPT_EXTRACT_IN_OUTPUT])) {
+          // ----- Extracting the file in standard output
+          $v_result1 = $this->privExtractFileInOutput($v_header, $p_options);
+          if ($v_result1 < 1) {
+            $this->privCloseFd();
+            $this->privSwapBackMagicQuotes();
+            return $v_result1;
+          }
+
+          // ----- Get the only interesting attributes
+          if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1) {
+            $this->privCloseFd();
+            $this->privSwapBackMagicQuotes();
+            return $v_result;
+          }
+
+          // ----- Look for user callback abort
+          if ($v_result1 == 2) {
+          	break;
+          }
+        }
+        // ----- Look for normal extraction
+        else {
+          // ----- Extracting the file
+          $v_result1 = $this->privExtractFile($v_header,
+		                                      $p_path, $p_remove_path,
+											  $p_remove_all_path,
+											  $p_options);
+          if ($v_result1 < 1) {
+            $this->privCloseFd();
+            $this->privSwapBackMagicQuotes();
+            return $v_result1;
+          }
+
+          // ----- Get the only interesting attributes
+          if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1)
+          {
+            // ----- Close the zip file
+            $this->privCloseFd();
+            $this->privSwapBackMagicQuotes();
+
+            return $v_result;
+          }
+
+          // ----- Look for user callback abort
+          if ($v_result1 == 2) {
+          	break;
+          }
+        }
+      }
+    }
+
+    // ----- Close the zip file
+    $this->privCloseFd();
+    $this->privSwapBackMagicQuotes();
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privExtractFile()
+  // Description :
+  // Parameters :
+  // Return Values :
+  //
+  // 1 : ... ?
+  // PCLZIP_ERR_USER_ABORTED(2) : User ask for extraction stop in callback
+  // --------------------------------------------------------------------------------
+  function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
+  {
+    $v_result=1;
+
+    // ----- Read the file header
+    if (($v_result = $this->privReadFileHeader($v_header)) != 1)
+    {
+      // ----- Return
+      return $v_result;
+    }
+
+
+    // ----- Check that the file header is coherent with $p_entry info
+    if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) {
+        // TBC
+    }
+
+    // ----- Look for all path to remove
+    if ($p_remove_all_path == true) {
+        // ----- Look for folder entry that not need to be extracted
+        if (($p_entry['external']&0x00000010)==0x00000010) {
+
+            $p_entry['status'] = "filtered";
+
+            return $v_result;
+        }
+
+        // ----- Get the basename of the path
+        $p_entry['filename'] = basename($p_entry['filename']);
+    }
+
+    // ----- Look for path to remove
+    else if ($p_remove_path != "")
+    {
+      if (PclZipUtilPathInclusion($p_remove_path, $p_entry['filename']) == 2)
+      {
+
+        // ----- Change the file status
+        $p_entry['status'] = "filtered";
+
+        // ----- Return
+        return $v_result;
+      }
+
+      $p_remove_path_size = strlen($p_remove_path);
+      if (substr($p_entry['filename'], 0, $p_remove_path_size) == $p_remove_path)
+      {
+
+        // ----- Remove the path
+        $p_entry['filename'] = substr($p_entry['filename'], $p_remove_path_size);
+
+      }
+    }
+
+    // ----- Add the path
+    if ($p_path != '') {
+      $p_entry['filename'] = $p_path."/".$p_entry['filename'];
+    }
+
+    // ----- Check a base_dir_restriction
+    if (isset($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION])) {
+      $v_inclusion
+      = PclZipUtilPathInclusion($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION],
+                                $p_entry['filename']);
+      if ($v_inclusion == 0) {
+
+        PclZip::privErrorLog(PCLZIP_ERR_DIRECTORY_RESTRICTION,
+			                     "Filename '".$p_entry['filename']."' is "
+								 ."outside PCLZIP_OPT_EXTRACT_DIR_RESTRICTION");
+
+        return PclZip::errorCode();
+      }
+    }
+
+    // ----- Look for pre-extract callback
+    if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) {
+
+      // ----- Generate a local information
+      $v_local_header = array();
+      $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
+
+      // ----- Call the callback
+      // Here I do not use call_user_func() because I need to send a reference to the
+      // header.
+      $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header);
+      if ($v_result == 0) {
+        // ----- Change the file status
+        $p_entry['status'] = "skipped";
+        $v_result = 1;
+      }
+
+      // ----- Look for abort result
+      if ($v_result == 2) {
+        // ----- This status is internal and will be changed in 'skipped'
+        $p_entry['status'] = "aborted";
+      	$v_result = PCLZIP_ERR_USER_ABORTED;
+      }
+
+      // ----- Update the informations
+      // Only some fields can be modified
+      $p_entry['filename'] = $v_local_header['filename'];
+    }
+
+
+    // ----- Look if extraction should be done
+    if ($p_entry['status'] == 'ok') {
+
+    // ----- Look for specific actions while the file exist
+    if (file_exists($p_entry['filename']))
+    {
+
+      // ----- Look if file is a directory
+      if (is_dir($p_entry['filename']))
+      {
+
+        // ----- Change the file status
+        $p_entry['status'] = "already_a_directory";
+
+        // ----- Look for PCLZIP_OPT_STOP_ON_ERROR
+        // For historical reason first PclZip implementation does not stop
+        // when this kind of error occurs.
+        if (   (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
+		    && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
+
+            PclZip::privErrorLog(PCLZIP_ERR_ALREADY_A_DIRECTORY,
+			                     "Filename '".$p_entry['filename']."' is "
+								 ."already used by an existing directory");
+
+            return PclZip::errorCode();
+		    }
+      }
+      // ----- Look if file is write protected
+      else if (!is_writeable($p_entry['filename']))
+      {
+
+        // ----- Change the file status
+        $p_entry['status'] = "write_protected";
+
+        // ----- Look for PCLZIP_OPT_STOP_ON_ERROR
+        // For historical reason first PclZip implementation does not stop
+        // when this kind of error occurs.
+        if (   (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
+		    && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
+
+            PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL,
+			                     "Filename '".$p_entry['filename']."' exists "
+								 ."and is write protected");
+
+            return PclZip::errorCode();
+		    }
+      }
+
+      // ----- Look if the extracted file is older
+      else if (filemtime($p_entry['filename']) > $p_entry['mtime'])
+      {
+        // ----- Change the file status
+        if (   (isset($p_options[PCLZIP_OPT_REPLACE_NEWER]))
+		    && ($p_options[PCLZIP_OPT_REPLACE_NEWER]===true)) {
+	  	  }
+		    else {
+            $p_entry['status'] = "newer_exist";
+
+            // ----- Look for PCLZIP_OPT_STOP_ON_ERROR
+            // For historical reason first PclZip implementation does not stop
+            // when this kind of error occurs.
+            if (   (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
+		        && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
+
+                PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL,
+			             "Newer version of '".$p_entry['filename']."' exists "
+					    ."and option PCLZIP_OPT_REPLACE_NEWER is not selected");
+
+                return PclZip::errorCode();
+		      }
+		    }
+      }
+      else {
+      }
+    }
+
+    // ----- Check the directory availability and create it if necessary
+    else {
+      if ((($p_entry['external']&0x00000010)==0x00000010) || (substr($p_entry['filename'], -1) == '/'))
+        $v_dir_to_check = $p_entry['filename'];
+      else if (!strstr($p_entry['filename'], "/"))
+        $v_dir_to_check = "";
+      else
+        $v_dir_to_check = dirname($p_entry['filename']);
+
+        if (($v_result = $this->privDirCheck($v_dir_to_check, (($p_entry['external']&0x00000010)==0x00000010))) != 1) {
+
+          // ----- Change the file status
+          $p_entry['status'] = "path_creation_fail";
+
+          // ----- Return
+          //return $v_result;
+          $v_result = 1;
+        }
+      }
+    }
+
+    // ----- Look if extraction should be done
+    if ($p_entry['status'] == 'ok') {
+
+      // ----- Do the extraction (if not a folder)
+      if (!(($p_entry['external']&0x00000010)==0x00000010))
+      {
+        // ----- Look for not compressed file
+        if ($p_entry['compression'] == 0) {
+
+    		  // ----- Opening destination file
+          if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0)
+          {
+
+            // ----- Change the file status
+            $p_entry['status'] = "write_error";
+
+            // ----- Return
+            return $v_result;
+          }
+
+
+          // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks
+          $v_size = $p_entry['compressed_size'];
+          while ($v_size != 0)
+          {
+            $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+            $v_buffer = @fread($this->zip_fd, $v_read_size);
+            /* Try to speed up the code
+            $v_binary_data = pack('a'.$v_read_size, $v_buffer);
+            @fwrite($v_dest_file, $v_binary_data, $v_read_size);
+            */
+            @fwrite($v_dest_file, $v_buffer, $v_read_size);
+            $v_size -= $v_read_size;
+          }
+
+          // ----- Closing the destination file
+          fclose($v_dest_file);
+
+          // ----- Change the file mtime
+          touch($p_entry['filename'], $p_entry['mtime']);
+
+
+        }
+        else {
+          // ----- TBC
+          // Need to be finished
+          if (($p_entry['flag'] & 1) == 1) {
+            PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, 'File \''.$p_entry['filename'].'\' is encrypted. Encrypted files are not supported.');
+            return PclZip::errorCode();
+          }
+
+
+          // ----- Look for using temporary file to unzip
+          if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF]))
+              && (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON])
+                  || (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD])
+                      && ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] <= $p_entry['size'])) ) ) {
+            $v_result = $this->privExtractFileUsingTempFile($p_entry, $p_options);
+            if ($v_result < PCLZIP_ERR_NO_ERROR) {
+              return $v_result;
+            }
+          }
+
+          // ----- Look for extract in memory
+          else {
+
+
+            // ----- Read the compressed file in a buffer (one shot)
+            $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
+
+            // ----- Decompress the file
+            $v_file_content = @gzinflate($v_buffer);
+            unset($v_buffer);
+            if ($v_file_content === FALSE) {
+
+              // ----- Change the file status
+              // TBC
+              $p_entry['status'] = "error";
+
+              return $v_result;
+            }
+
+            // ----- Opening destination file
+            if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) {
+
+              // ----- Change the file status
+              $p_entry['status'] = "write_error";
+
+              return $v_result;
+            }
+
+            // ----- Write the uncompressed data
+            @fwrite($v_dest_file, $v_file_content, $p_entry['size']);
+            unset($v_file_content);
+
+            // ----- Closing the destination file
+            @fclose($v_dest_file);
+
+          }
+
+          // ----- Change the file mtime
+          @touch($p_entry['filename'], $p_entry['mtime']);
+        }
+
+        // ----- Look for chmod option
+        if (isset($p_options[PCLZIP_OPT_SET_CHMOD])) {
+
+          // ----- Change the mode of the file
+          @chmod($p_entry['filename'], $p_options[PCLZIP_OPT_SET_CHMOD]);
+        }
+
+      }
+    }
+
+  	// ----- Change abort status
+  	if ($p_entry['status'] == "aborted") {
+        $p_entry['status'] = "skipped";
+  	}
+
+    // ----- Look for post-extract callback
+    elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {
+
+      // ----- Generate a local information
+      $v_local_header = array();
+      $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
+
+      // ----- Call the callback
+      // Here I do not use call_user_func() because I need to send a reference to the
+      // header.
+      $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header);
+
+      // ----- Look for abort result
+      if ($v_result == 2) {
+      	$v_result = PCLZIP_ERR_USER_ABORTED;
+      }
+    }
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privExtractFileUsingTempFile()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privExtractFileUsingTempFile(&$p_entry, &$p_options)
+  {
+    $v_result=1;
+
+    // ----- Creates a temporary file
+    $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.gz';
+    if (($v_dest_file = @fopen($v_gzip_temp_name, "wb")) == 0) {
+      fclose($v_file);
+      PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary write mode');
+      return PclZip::errorCode();
+    }
+
+
+    // ----- Write gz file format header
+    $v_binary_data = pack('va1a1Va1a1', 0x8b1f, Chr($p_entry['compression']), Chr(0x00), time(), Chr(0x00), Chr(3));
+    @fwrite($v_dest_file, $v_binary_data, 10);
+
+    // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks
+    $v_size = $p_entry['compressed_size'];
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      $v_buffer = @fread($this->zip_fd, $v_read_size);
+      //$v_binary_data = pack('a'.$v_read_size, $v_buffer);
+      @fwrite($v_dest_file, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Write gz file format footer
+    $v_binary_data = pack('VV', $p_entry['crc'], $p_entry['size']);
+    @fwrite($v_dest_file, $v_binary_data, 8);
+
+    // ----- Close the temporary file
+    @fclose($v_dest_file);
+
+    // ----- Opening destination file
+    if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) {
+      $p_entry['status'] = "write_error";
+      return $v_result;
+    }
+
+    // ----- Open the temporary gz file
+    if (($v_src_file = @gzopen($v_gzip_temp_name, 'rb')) == 0) {
+      @fclose($v_dest_file);
+      $p_entry['status'] = "read_error";
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode');
+      return PclZip::errorCode();
+    }
+
+
+    // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks
+    $v_size = $p_entry['size'];
+    while ($v_size != 0) {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      $v_buffer = @gzread($v_src_file, $v_read_size);
+      //$v_binary_data = pack('a'.$v_read_size, $v_buffer);
+      @fwrite($v_dest_file, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+    @fclose($v_dest_file);
+    @gzclose($v_src_file);
+
+    // ----- Delete the temporary file
+    @unlink($v_gzip_temp_name);
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privExtractFileInOutput()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privExtractFileInOutput(&$p_entry, &$p_options)
+  {
+    $v_result=1;
+
+    // ----- Read the file header
+    if (($v_result = $this->privReadFileHeader($v_header)) != 1) {
+      return $v_result;
+    }
+
+
+    // ----- Check that the file header is coherent with $p_entry info
+    if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) {
+        // TBC
+    }
+
+    // ----- Look for pre-extract callback
+    if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) {
+
+      // ----- Generate a local information
+      $v_local_header = array();
+      $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
+
+      // ----- Call the callback
+      // Here I do not use call_user_func() because I need to send a reference to the
+      // header.
+//      eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);');
+      $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header);
+      if ($v_result == 0) {
+        // ----- Change the file status
+        $p_entry['status'] = "skipped";
+        $v_result = 1;
+      }
+
+      // ----- Look for abort result
+      if ($v_result == 2) {
+        // ----- This status is internal and will be changed in 'skipped'
+        $p_entry['status'] = "aborted";
+      	$v_result = PCLZIP_ERR_USER_ABORTED;
+      }
+
+      // ----- Update the informations
+      // Only some fields can be modified
+      $p_entry['filename'] = $v_local_header['filename'];
+    }
+
+    // ----- Trace
+
+    // ----- Look if extraction should be done
+    if ($p_entry['status'] == 'ok') {
+
+      // ----- Do the extraction (if not a folder)
+      if (!(($p_entry['external']&0x00000010)==0x00000010)) {
+        // ----- Look for not compressed file
+        if ($p_entry['compressed_size'] == $p_entry['size']) {
+
+          // ----- Read the file in a buffer (one shot)
+          $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
+
+          // ----- Send the file to the output
+          echo $v_buffer;
+          unset($v_buffer);
+        }
+        else {
+
+          // ----- Read the compressed file in a buffer (one shot)
+          $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
+
+          // ----- Decompress the file
+          $v_file_content = gzinflate($v_buffer);
+          unset($v_buffer);
+
+          // ----- Send the file to the output
+          echo $v_file_content;
+          unset($v_file_content);
+        }
+      }
+    }
+
+	// ----- Change abort status
+	if ($p_entry['status'] == "aborted") {
+      $p_entry['status'] = "skipped";
+	}
+
+    // ----- Look for post-extract callback
+    elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {
+
+      // ----- Generate a local information
+      $v_local_header = array();
+      $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
+
+      // ----- Call the callback
+      // Here I do not use call_user_func() because I need to send a reference to the
+      // header.
+      $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header);
+
+      // ----- Look for abort result
+      if ($v_result == 2) {
+      	$v_result = PCLZIP_ERR_USER_ABORTED;
+      }
+    }
+
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privExtractFileAsString()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privExtractFileAsString(&$p_entry, &$p_string, &$p_options)
+  {
+    $v_result=1;
+
+    // ----- Read the file header
+    $v_header = array();
+    if (($v_result = $this->privReadFileHeader($v_header)) != 1)
+    {
+      // ----- Return
+      return $v_result;
+    }
+
+
+    // ----- Check that the file header is coherent with $p_entry info
+    if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) {
+        // TBC
+    }
+
+    // ----- Look for pre-extract callback
+    if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) {
+
+      // ----- Generate a local information
+      $v_local_header = array();
+      $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
+
+      // ----- Call the callback
+      // Here I do not use call_user_func() because I need to send a reference to the
+      // header.
+      $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header);
+      if ($v_result == 0) {
+        // ----- Change the file status
+        $p_entry['status'] = "skipped";
+        $v_result = 1;
+      }
+
+      // ----- Look for abort result
+      if ($v_result == 2) {
+        // ----- This status is internal and will be changed in 'skipped'
+        $p_entry['status'] = "aborted";
+      	$v_result = PCLZIP_ERR_USER_ABORTED;
+      }
+
+      // ----- Update the informations
+      // Only some fields can be modified
+      $p_entry['filename'] = $v_local_header['filename'];
+    }
+
+
+    // ----- Look if extraction should be done
+    if ($p_entry['status'] == 'ok') {
+
+      // ----- Do the extraction (if not a folder)
+      if (!(($p_entry['external']&0x00000010)==0x00000010)) {
+        // ----- Look for not compressed file
+  //      if ($p_entry['compressed_size'] == $p_entry['size'])
+        if ($p_entry['compression'] == 0) {
+
+          // ----- Reading the file
+          $p_string = @fread($this->zip_fd, $p_entry['compressed_size']);
+        }
+        else {
+
+          // ----- Reading the file
+          $v_data = @fread($this->zip_fd, $p_entry['compressed_size']);
+
+          // ----- Decompress the file
+          if (($p_string = @gzinflate($v_data)) === FALSE) {
+              // TBC
+          }
+        }
+
+        // ----- Trace
+      }
+      else {
+          // TBC : error : can not extract a folder in a string
+      }
+
+    }
+
+  	// ----- Change abort status
+  	if ($p_entry['status'] == "aborted") {
+        $p_entry['status'] = "skipped";
+  	}
+
+    // ----- Look for post-extract callback
+    elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {
+
+      // ----- Generate a local information
+      $v_local_header = array();
+      $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
+
+      // ----- Swap the content to header
+      $v_local_header['content'] = $p_string;
+      $p_string = '';
+
+      // ----- Call the callback
+      // Here I do not use call_user_func() because I need to send a reference to the
+      // header.
+      $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header);
+
+      // ----- Swap back the content to header
+      $p_string = $v_local_header['content'];
+      unset($v_local_header['content']);
+
+      // ----- Look for abort result
+      if ($v_result == 2) {
+      	$v_result = PCLZIP_ERR_USER_ABORTED;
+      }
+    }
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privReadFileHeader()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privReadFileHeader(&$p_header)
+  {
+    $v_result=1;
+
+    // ----- Read the 4 bytes signature
+    $v_binary_data = @fread($this->zip_fd, 4);
+    $v_data = unpack('Vid', $v_binary_data);
+
+    // ----- Check signature
+    if ($v_data['id'] != 0x04034b50)
+    {
+
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure');
+
+      // ----- Return
+      return PclZip::errorCode();
+    }
+
+    // ----- Read the first 42 bytes of the header
+    $v_binary_data = fread($this->zip_fd, 26);
+
+    // ----- Look for invalid block size
+    if (strlen($v_binary_data) != 26)
+    {
+      $p_header['filename'] = "";
+      $p_header['status'] = "invalid_header";
+
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data));
+
+      // ----- Return
+      return PclZip::errorCode();
+    }
+
+    // ----- Extract the values
+    $v_data = unpack('vversion/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len', $v_binary_data);
+
+    // ----- Get filename
+    $p_header['filename'] = fread($this->zip_fd, $v_data['filename_len']);
+
+    // ----- Get extra_fields
+    if ($v_data['extra_len'] != 0) {
+      $p_header['extra'] = fread($this->zip_fd, $v_data['extra_len']);
+    }
+    else {
+      $p_header['extra'] = '';
+    }
+
+    // ----- Extract properties
+    $p_header['version_extracted'] = $v_data['version'];
+    $p_header['compression'] = $v_data['compression'];
+    $p_header['size'] = $v_data['size'];
+    $p_header['compressed_size'] = $v_data['compressed_size'];
+    $p_header['crc'] = $v_data['crc'];
+    $p_header['flag'] = $v_data['flag'];
+    $p_header['filename_len'] = $v_data['filename_len'];
+
+    // ----- Recuperate date in UNIX format
+    $p_header['mdate'] = $v_data['mdate'];
+    $p_header['mtime'] = $v_data['mtime'];
+    if ($p_header['mdate'] && $p_header['mtime'])
+    {
+      // ----- Extract time
+      $v_hour = ($p_header['mtime'] & 0xF800) >> 11;
+      $v_minute = ($p_header['mtime'] & 0x07E0) >> 5;
+      $v_seconde = ($p_header['mtime'] & 0x001F)*2;
+
+      // ----- Extract date
+      $v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980;
+      $v_month = ($p_header['mdate'] & 0x01E0) >> 5;
+      $v_day = $p_header['mdate'] & 0x001F;
+
+      // ----- Get UNIX date format
+      $p_header['mtime'] = @mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year);
+
+    }
+    else
+    {
+      $p_header['mtime'] = time();
+    }
+
+    // TBC
+    //for(reset($v_data); $key = key($v_data); next($v_data)) {
+    //}
+
+    // ----- Set the stored filename
+    $p_header['stored_filename'] = $p_header['filename'];
+
+    // ----- Set the status field
+    $p_header['status'] = "ok";
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privReadCentralFileHeader()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privReadCentralFileHeader(&$p_header)
+  {
+    $v_result=1;
+
+    // ----- Read the 4 bytes signature
+    $v_binary_data = @fread($this->zip_fd, 4);
+    $v_data = unpack('Vid', $v_binary_data);
+
+    // ----- Check signature
+    if ($v_data['id'] != 0x02014b50)
+    {
+
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure');
+
+      // ----- Return
+      return PclZip::errorCode();
+    }
+
+    // ----- Read the first 42 bytes of the header
+    $v_binary_data = fread($this->zip_fd, 42);
+
+    // ----- Look for invalid block size
+    if (strlen($v_binary_data) != 42)
+    {
+      $p_header['filename'] = "";
+      $p_header['status'] = "invalid_header";
+
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data));
+
+      // ----- Return
+      return PclZip::errorCode();
+    }
+
+    // ----- Extract the values
+    $p_header = unpack('vversion/vversion_extracted/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len/vcomment_len/vdisk/vinternal/Vexternal/Voffset', $v_binary_data);
+
+    // ----- Get filename
+    if ($p_header['filename_len'] != 0)
+      $p_header['filename'] = fread($this->zip_fd, $p_header['filename_len']);
+    else
+      $p_header['filename'] = '';
+
+    // ----- Get extra
+    if ($p_header['extra_len'] != 0)
+      $p_header['extra'] = fread($this->zip_fd, $p_header['extra_len']);
+    else
+      $p_header['extra'] = '';
+
+    // ----- Get comment
+    if ($p_header['comment_len'] != 0)
+      $p_header['comment'] = fread($this->zip_fd, $p_header['comment_len']);
+    else
+      $p_header['comment'] = '';
+
+    // ----- Extract properties
+
+    // ----- Recuperate date in UNIX format
+    //if ($p_header['mdate'] && $p_header['mtime'])
+    // TBC : bug : this was ignoring time with 0/0/0
+    if (1)
+    {
+      // ----- Extract time
+      $v_hour = ($p_header['mtime'] & 0xF800) >> 11;
+      $v_minute = ($p_header['mtime'] & 0x07E0) >> 5;
+      $v_seconde = ($p_header['mtime'] & 0x001F)*2;
+
+      // ----- Extract date
+      $v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980;
+      $v_month = ($p_header['mdate'] & 0x01E0) >> 5;
+      $v_day = $p_header['mdate'] & 0x001F;
+
+      // ----- Get UNIX date format
+      $p_header['mtime'] = @mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year);
+
+    }
+    else
+    {
+      $p_header['mtime'] = time();
+    }
+
+    // ----- Set the stored filename
+    $p_header['stored_filename'] = $p_header['filename'];
+
+    // ----- Set default status to ok
+    $p_header['status'] = 'ok';
+
+    // ----- Look if it is a directory
+    if (substr($p_header['filename'], -1) == '/') {
+      //$p_header['external'] = 0x41FF0010;
+      $p_header['external'] = 0x00000010;
+    }
+
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privCheckFileHeaders()
+  // Description :
+  // Parameters :
+  // Return Values :
+  //   1 on success,
+  //   0 on error;
+  // --------------------------------------------------------------------------------
+  function privCheckFileHeaders(&$p_local_header, &$p_central_header)
+  {
+    $v_result=1;
+
+  	// ----- Check the static values
+  	// TBC
+  	if ($p_local_header['filename'] != $p_central_header['filename']) {
+  	}
+  	if ($p_local_header['version_extracted'] != $p_central_header['version_extracted']) {
+  	}
+  	if ($p_local_header['flag'] != $p_central_header['flag']) {
+  	}
+  	if ($p_local_header['compression'] != $p_central_header['compression']) {
+  	}
+  	if ($p_local_header['mtime'] != $p_central_header['mtime']) {
+  	}
+  	if ($p_local_header['filename_len'] != $p_central_header['filename_len']) {
+  	}
+
+  	// ----- Look for flag bit 3
+  	if (($p_local_header['flag'] & 8) == 8) {
+          $p_local_header['size'] = $p_central_header['size'];
+          $p_local_header['compressed_size'] = $p_central_header['compressed_size'];
+          $p_local_header['crc'] = $p_central_header['crc'];
+  	}
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privReadEndCentralDir()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privReadEndCentralDir(&$p_central_dir)
+  {
+    $v_result=1;
+
+    // ----- Go to the end of the zip file
+    $v_size = filesize($this->zipname);
+    @fseek($this->zip_fd, $v_size);
+    if (@ftell($this->zip_fd) != $v_size)
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \''.$this->zipname.'\'');
+
+      // ----- Return
+      return PclZip::errorCode();
+    }
+
+    // ----- First try : look if this is an archive with no commentaries (most of the time)
+    // in this case the end of central dir is at 22 bytes of the file end
+    $v_found = 0;
+    if ($v_size > 26) {
+      @fseek($this->zip_fd, $v_size-22);
+      if (($v_pos = @ftell($this->zip_fd)) != ($v_size-22))
+      {
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\'');
+
+        // ----- Return
+        return PclZip::errorCode();
+      }
+
+      // ----- Read for bytes
+      $v_binary_data = @fread($this->zip_fd, 4);
+      $v_data = @unpack('Vid', $v_binary_data);
+
+      // ----- Check signature
+      if ($v_data['id'] == 0x06054b50) {
+        $v_found = 1;
+      }
+
+      $v_pos = ftell($this->zip_fd);
+    }
+
+    // ----- Go back to the maximum possible size of the Central Dir End Record
+    if (!$v_found) {
+      $v_maximum_size = 65557; // 0xFFFF + 22;
+      if ($v_maximum_size > $v_size)
+        $v_maximum_size = $v_size;
+      @fseek($this->zip_fd, $v_size-$v_maximum_size);
+      if (@ftell($this->zip_fd) != ($v_size-$v_maximum_size))
+      {
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\'');
+
+        // ----- Return
+        return PclZip::errorCode();
+      }
+
+      // ----- Read byte per byte in order to find the signature
+      $v_pos = ftell($this->zip_fd);
+      $v_bytes = 0x00000000;
+      while ($v_pos < $v_size)
+      {
+        // ----- Read a byte
+        $v_byte = @fread($this->zip_fd, 1);
+
+        // -----  Add the byte
+        //$v_bytes = ($v_bytes << 8) | Ord($v_byte);
+        // Note we mask the old value down such that once shifted we can never end up with more than a 32bit number
+        // Otherwise on systems where we have 64bit integers the check below for the magic number will fail.
+        $v_bytes = ( ($v_bytes & 0xFFFFFF) << 8) | Ord($v_byte);
+
+        // ----- Compare the bytes
+        if ($v_bytes == 0x504b0506)
+        {
+          $v_pos++;
+          break;
+        }
+
+        $v_pos++;
+      }
+
+      // ----- Look if not found end of central dir
+      if ($v_pos == $v_size)
+      {
+
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Unable to find End of Central Dir Record signature");
+
+        // ----- Return
+        return PclZip::errorCode();
+      }
+    }
+
+    // ----- Read the first 18 bytes of the header
+    $v_binary_data = fread($this->zip_fd, 18);
+
+    // ----- Look for invalid block size
+    if (strlen($v_binary_data) != 18)
+    {
+
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid End of Central Dir Record size : ".strlen($v_binary_data));
+
+      // ----- Return
+      return PclZip::errorCode();
+    }
+
+    // ----- Extract the values
+    $v_data = unpack('vdisk/vdisk_start/vdisk_entries/ventries/Vsize/Voffset/vcomment_size', $v_binary_data);
+
+    // ----- Check the global size
+    if (($v_pos + $v_data['comment_size'] + 18) != $v_size) {
+
+	  // ----- Removed in release 2.2 see readme file
+	  // The check of the file size is a little too strict.
+	  // Some bugs where found when a zip is encrypted/decrypted with 'crypt'.
+	  // While decrypted, zip has training 0 bytes
+	  if (0) {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT,
+	                       'The central dir is not at the end of the archive.'
+						   .' Some trailing bytes exists after the archive.');
+
+      // ----- Return
+      return PclZip::errorCode();
+	  }
+    }
+
+    // ----- Get comment
+    if ($v_data['comment_size'] != 0) {
+      $p_central_dir['comment'] = fread($this->zip_fd, $v_data['comment_size']);
+    }
+    else
+      $p_central_dir['comment'] = '';
+
+    $p_central_dir['entries'] = $v_data['entries'];
+    $p_central_dir['disk_entries'] = $v_data['disk_entries'];
+    $p_central_dir['offset'] = $v_data['offset'];
+    $p_central_dir['size'] = $v_data['size'];
+    $p_central_dir['disk'] = $v_data['disk'];
+    $p_central_dir['disk_start'] = $v_data['disk_start'];
+
+    // TBC
+    //for(reset($p_central_dir); $key = key($p_central_dir); next($p_central_dir)) {
+    //}
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privDeleteByRule()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privDeleteByRule(&$p_result_list, &$p_options)
+  {
+    $v_result=1;
+    $v_list_detail = array();
+
+    // ----- Open the zip file
+    if (($v_result=$this->privOpenFd('rb')) != 1)
+    {
+      // ----- Return
+      return $v_result;
+    }
+
+    // ----- Read the central directory informations
+    $v_central_dir = array();
+    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
+    {
+      $this->privCloseFd();
+      return $v_result;
+    }
+
+    // ----- Go to beginning of File
+    @rewind($this->zip_fd);
+
+    // ----- Scan all the files
+    // ----- Start at beginning of Central Dir
+    $v_pos_entry = $v_central_dir['offset'];
+    @rewind($this->zip_fd);
+    if (@fseek($this->zip_fd, $v_pos_entry))
+    {
+      // ----- Close the zip file
+      $this->privCloseFd();
+
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
+
+      // ----- Return
+      return PclZip::errorCode();
+    }
+
+    // ----- Read each entry
+    $v_header_list = array();
+    $j_start = 0;
+    for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++)
+    {
+
+      // ----- Read the file header
+      $v_header_list[$v_nb_extracted] = array();
+      if (($v_result = $this->privReadCentralFileHeader($v_header_list[$v_nb_extracted])) != 1)
+      {
+        // ----- Close the zip file
+        $this->privCloseFd();
+
+        return $v_result;
+      }
+
+
+      // ----- Store the index
+      $v_header_list[$v_nb_extracted]['index'] = $i;
+
+      // ----- Look for the specific extract rules
+      $v_found = false;
+
+      // ----- Look for extract by name rule
+      if (   (isset($p_options[PCLZIP_OPT_BY_NAME]))
+          && ($p_options[PCLZIP_OPT_BY_NAME] != 0)) {
+
+          // ----- Look if the filename is in the list
+          for ($j=0; ($j<sizeof($p_options[PCLZIP_OPT_BY_NAME])) && (!$v_found); $j++) {
+
+              // ----- Look for a directory
+              if (substr($p_options[PCLZIP_OPT_BY_NAME][$j], -1) == "/") {
+
+                  // ----- Look if the directory is in the filename path
+                  if (   (strlen($v_header_list[$v_nb_extracted]['stored_filename']) > strlen($p_options[PCLZIP_OPT_BY_NAME][$j]))
+                      && (substr($v_header_list[$v_nb_extracted]['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) {
+                      $v_found = true;
+                  }
+                  elseif (   (($v_header_list[$v_nb_extracted]['external']&0x00000010)==0x00000010) /* Indicates a folder */
+                          && ($v_header_list[$v_nb_extracted]['stored_filename'].'/' == $p_options[PCLZIP_OPT_BY_NAME][$j])) {
+                      $v_found = true;
+                  }
+              }
+              // ----- Look for a filename
+              elseif ($v_header_list[$v_nb_extracted]['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) {
+                  $v_found = true;
+              }
+          }
+      }
+
+      // ----- Look for extract by ereg rule
+      // ereg() is deprecated with PHP 5.3
+      /*
+      else if (   (isset($p_options[PCLZIP_OPT_BY_EREG]))
+               && ($p_options[PCLZIP_OPT_BY_EREG] != "")) {
+
+          if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header_list[$v_nb_extracted]['stored_filename'])) {
+              $v_found = true;
+          }
+      }
+      */
+
+      // ----- Look for extract by preg rule
+      else if (   (isset($p_options[PCLZIP_OPT_BY_PREG]))
+               && ($p_options[PCLZIP_OPT_BY_PREG] != "")) {
+
+          if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header_list[$v_nb_extracted]['stored_filename'])) {
+              $v_found = true;
+          }
+      }
+
+      // ----- Look for extract by index rule
+      else if (   (isset($p_options[PCLZIP_OPT_BY_INDEX]))
+               && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) {
+
+          // ----- Look if the index is in the list
+          for ($j=$j_start; ($j<sizeof($p_options[PCLZIP_OPT_BY_INDEX])) && (!$v_found); $j++) {
+
+              if (($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) {
+                  $v_found = true;
+              }
+              if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) {
+                  $j_start = $j+1;
+              }
+
+              if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) {
+                  break;
+              }
+          }
+      }
+      else {
+      	$v_found = true;
+      }
+
+      // ----- Look for deletion
+      if ($v_found)
+      {
+        unset($v_header_list[$v_nb_extracted]);
+      }
+      else
+      {
+        $v_nb_extracted++;
+      }
+    }
+
+    // ----- Look if something need to be deleted
+    if ($v_nb_extracted > 0) {
+
+        // ----- Creates a temporay file
+        $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';
+
+        // ----- Creates a temporary zip archive
+        $v_temp_zip = new PclZip($v_zip_temp_name);
+
+        // ----- Open the temporary zip file in write mode
+        if (($v_result = $v_temp_zip->privOpenFd('wb')) != 1) {
+            $this->privCloseFd();
+
+            // ----- Return
+            return $v_result;
+        }
+
+        // ----- Look which file need to be kept
+        for ($i=0; $i<sizeof($v_header_list); $i++) {
+
+            // ----- Calculate the position of the header
+            @rewind($this->zip_fd);
+            if (@fseek($this->zip_fd,  $v_header_list[$i]['offset'])) {
+                // ----- Close the zip file
+                $this->privCloseFd();
+                $v_temp_zip->privCloseFd();
+                @unlink($v_zip_temp_name);
+
+                // ----- Error log
+                PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
+
+                // ----- Return
+                return PclZip::errorCode();
+            }
+
+            // ----- Read the file header
+            $v_local_header = array();
+            if (($v_result = $this->privReadFileHeader($v_local_header)) != 1) {
+                // ----- Close the zip file
+                $this->privCloseFd();
+                $v_temp_zip->privCloseFd();
+                @unlink($v_zip_temp_name);
+
+                // ----- Return
+                return $v_result;
+            }
+
+            // ----- Check that local file header is same as central file header
+            if ($this->privCheckFileHeaders($v_local_header,
+			                                $v_header_list[$i]) != 1) {
+                // TBC
+            }
+            unset($v_local_header);
+
+            // ----- Write the file header
+            if (($v_result = $v_temp_zip->privWriteFileHeader($v_header_list[$i])) != 1) {
+                // ----- Close the zip file
+                $this->privCloseFd();
+                $v_temp_zip->privCloseFd();
+                @unlink($v_zip_temp_name);
+
+                // ----- Return
+                return $v_result;
+            }
+
+            // ----- Read/write the data block
+            if (($v_result = PclZipUtilCopyBlock($this->zip_fd, $v_temp_zip->zip_fd, $v_header_list[$i]['compressed_size'])) != 1) {
+                // ----- Close the zip file
+                $this->privCloseFd();
+                $v_temp_zip->privCloseFd();
+                @unlink($v_zip_temp_name);
+
+                // ----- Return
+                return $v_result;
+            }
+        }
+
+        // ----- Store the offset of the central dir
+        $v_offset = @ftell($v_temp_zip->zip_fd);
+
+        // ----- Re-Create the Central Dir files header
+        for ($i=0; $i<sizeof($v_header_list); $i++) {
+            // ----- Create the file header
+            if (($v_result = $v_temp_zip->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
+                $v_temp_zip->privCloseFd();
+                $this->privCloseFd();
+                @unlink($v_zip_temp_name);
+
+                // ----- Return
+                return $v_result;
+            }
+
+            // ----- Transform the header to a 'usable' info
+            $v_temp_zip->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);
+        }
+
+
+        // ----- Zip file comment
+        $v_comment = '';
+        if (isset($p_options[PCLZIP_OPT_COMMENT])) {
+          $v_comment = $p_options[PCLZIP_OPT_COMMENT];
+        }
+
+        // ----- Calculate the size of the central header
+        $v_size = @ftell($v_temp_zip->zip_fd)-$v_offset;
+
+        // ----- Create the central dir footer
+        if (($v_result = $v_temp_zip->privWriteCentralHeader(sizeof($v_header_list), $v_size, $v_offset, $v_comment)) != 1) {
+            // ----- Reset the file list
+            unset($v_header_list);
+            $v_temp_zip->privCloseFd();
+            $this->privCloseFd();
+            @unlink($v_zip_temp_name);
+
+            // ----- Return
+            return $v_result;
+        }
+
+        // ----- Close
+        $v_temp_zip->privCloseFd();
+        $this->privCloseFd();
+
+        // ----- Delete the zip file
+        // TBC : I should test the result ...
+        @unlink($this->zipname);
+
+        // ----- Rename the temporary file
+        // TBC : I should test the result ...
+        //@rename($v_zip_temp_name, $this->zipname);
+        PclZipUtilRename($v_zip_temp_name, $this->zipname);
+
+        // ----- Destroy the temporary archive
+        unset($v_temp_zip);
+    }
+
+    // ----- Remove every files : reset the file
+    else if ($v_central_dir['entries'] != 0) {
+        $this->privCloseFd();
+
+        if (($v_result = $this->privOpenFd('wb')) != 1) {
+          return $v_result;
+        }
+
+        if (($v_result = $this->privWriteCentralHeader(0, 0, 0, '')) != 1) {
+          return $v_result;
+        }
+
+        $this->privCloseFd();
+    }
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privDirCheck()
+  // Description :
+  //   Check if a directory exists, if not it creates it and all the parents directory
+  //   which may be useful.
+  // Parameters :
+  //   $p_dir : Directory path to check.
+  // Return Values :
+  //    1 : OK
+  //   -1 : Unable to create directory
+  // --------------------------------------------------------------------------------
+  function privDirCheck($p_dir, $p_is_dir=false)
+  {
+    $v_result = 1;
+
+
+    // ----- Remove the final '/'
+    if (($p_is_dir) && (substr($p_dir, -1)=='/'))
+    {
+      $p_dir = substr($p_dir, 0, strlen($p_dir)-1);
+    }
+
+    // ----- Check the directory availability
+    if ((is_dir($p_dir)) || ($p_dir == ""))
+    {
+      return 1;
+    }
+
+    // ----- Extract parent directory
+    $p_parent_dir = dirname($p_dir);
+
+    // ----- Just a check
+    if ($p_parent_dir != $p_dir)
+    {
+      // ----- Look for parent directory
+      if ($p_parent_dir != "")
+      {
+        if (($v_result = $this->privDirCheck($p_parent_dir)) != 1)
+        {
+          return $v_result;
+        }
+      }
+    }
+
+    // ----- Create the directory
+    if (!@mkdir($p_dir, 0777))
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_DIR_CREATE_FAIL, "Unable to create directory '$p_dir'");
+
+      // ----- Return
+      return PclZip::errorCode();
+    }
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privMerge()
+  // Description :
+  //   If $p_archive_to_add does not exist, the function exit with a success result.
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privMerge(&$p_archive_to_add)
+  {
+    $v_result=1;
+
+    // ----- Look if the archive_to_add exists
+    if (!is_file($p_archive_to_add->zipname))
+    {
+
+      // ----- Nothing to merge, so merge is a success
+      $v_result = 1;
+
+      // ----- Return
+      return $v_result;
+    }
+
+    // ----- Look if the archive exists
+    if (!is_file($this->zipname))
+    {
+
+      // ----- Do a duplicate
+      $v_result = $this->privDuplicate($p_archive_to_add->zipname);
+
+      // ----- Return
+      return $v_result;
+    }
+
+    // ----- Open the zip file
+    if (($v_result=$this->privOpenFd('rb')) != 1)
+    {
+      // ----- Return
+      return $v_result;
+    }
+
+    // ----- Read the central directory informations
+    $v_central_dir = array();
+    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
+    {
+      $this->privCloseFd();
+      return $v_result;
+    }
+
+    // ----- Go to beginning of File
+    @rewind($this->zip_fd);
+
+    // ----- Open the archive_to_add file
+    if (($v_result=$p_archive_to_add->privOpenFd('rb')) != 1)
+    {
+      $this->privCloseFd();
+
+      // ----- Return
+      return $v_result;
+    }
+
+    // ----- Read the central directory informations
+    $v_central_dir_to_add = array();
+    if (($v_result = $p_archive_to_add->privReadEndCentralDir($v_central_dir_to_add)) != 1)
+    {
+      $this->privCloseFd();
+      $p_archive_to_add->privCloseFd();
+
+      return $v_result;
+    }
+
+    // ----- Go to beginning of File
+    @rewind($p_archive_to_add->zip_fd);
+
+    // ----- Creates a temporay file
+    $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';
+
+    // ----- Open the temporary file in write mode
+    if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0)
+    {
+      $this->privCloseFd();
+      $p_archive_to_add->privCloseFd();
+
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode');
+
+      // ----- Return
+      return PclZip::errorCode();
+    }
+
+    // ----- Copy the files from the archive to the temporary file
+    // TBC : Here I should better append the file and go back to erase the central dir
+    $v_size = $v_central_dir['offset'];
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      $v_buffer = fread($this->zip_fd, $v_read_size);
+      @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Copy the files from the archive_to_add into the temporary file
+    $v_size = $v_central_dir_to_add['offset'];
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      $v_buffer = fread($p_archive_to_add->zip_fd, $v_read_size);
+      @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Store the offset of the central dir
+    $v_offset = @ftell($v_zip_temp_fd);
+
+    // ----- Copy the block of file headers from the old archive
+    $v_size = $v_central_dir['size'];
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      $v_buffer = @fread($this->zip_fd, $v_read_size);
+      @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Copy the block of file headers from the archive_to_add
+    $v_size = $v_central_dir_to_add['size'];
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      $v_buffer = @fread($p_archive_to_add->zip_fd, $v_read_size);
+      @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Merge the file comments
+    $v_comment = $v_central_dir['comment'].' '.$v_central_dir_to_add['comment'];
+
+    // ----- Calculate the size of the (new) central header
+    $v_size = @ftell($v_zip_temp_fd)-$v_offset;
+
+    // ----- Swap the file descriptor
+    // Here is a trick : I swap the temporary fd with the zip fd, in order to use
+    // the following methods on the temporary fil and not the real archive fd
+    $v_swap = $this->zip_fd;
+    $this->zip_fd = $v_zip_temp_fd;
+    $v_zip_temp_fd = $v_swap;
+
+    // ----- Create the central dir footer
+    if (($v_result = $this->privWriteCentralHeader($v_central_dir['entries']+$v_central_dir_to_add['entries'], $v_size, $v_offset, $v_comment)) != 1)
+    {
+      $this->privCloseFd();
+      $p_archive_to_add->privCloseFd();
+      @fclose($v_zip_temp_fd);
+      $this->zip_fd = null;
+
+      // ----- Reset the file list
+      unset($v_header_list);
+
+      // ----- Return
+      return $v_result;
+    }
+
+    // ----- Swap back the file descriptor
+    $v_swap = $this->zip_fd;
+    $this->zip_fd = $v_zip_temp_fd;
+    $v_zip_temp_fd = $v_swap;
+
+    // ----- Close
+    $this->privCloseFd();
+    $p_archive_to_add->privCloseFd();
+
+    // ----- Close the temporary file
+    @fclose($v_zip_temp_fd);
+
+    // ----- Delete the zip file
+    // TBC : I should test the result ...
+    @unlink($this->zipname);
+
+    // ----- Rename the temporary file
+    // TBC : I should test the result ...
+    //@rename($v_zip_temp_name, $this->zipname);
+    PclZipUtilRename($v_zip_temp_name, $this->zipname);
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privDuplicate()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privDuplicate($p_archive_filename)
+  {
+    $v_result=1;
+
+    // ----- Look if the $p_archive_filename exists
+    if (!is_file($p_archive_filename))
+    {
+
+      // ----- Nothing to duplicate, so duplicate is a success.
+      $v_result = 1;
+
+      // ----- Return
+      return $v_result;
+    }
+
+    // ----- Open the zip file
+    if (($v_result=$this->privOpenFd('wb')) != 1)
+    {
+      // ----- Return
+      return $v_result;
+    }
+
+    // ----- Open the temporary file in write mode
+    if (($v_zip_temp_fd = @fopen($p_archive_filename, 'rb')) == 0)
+    {
+      $this->privCloseFd();
+
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive file \''.$p_archive_filename.'\' in binary write mode');
+
+      // ----- Return
+      return PclZip::errorCode();
+    }
+
+    // ----- Copy the files from the archive to the temporary file
+    // TBC : Here I should better append the file and go back to erase the central dir
+    $v_size = filesize($p_archive_filename);
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      $v_buffer = fread($v_zip_temp_fd, $v_read_size);
+      @fwrite($this->zip_fd, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Close
+    $this->privCloseFd();
+
+    // ----- Close the temporary file
+    @fclose($v_zip_temp_fd);
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privErrorLog()
+  // Description :
+  // Parameters :
+  // --------------------------------------------------------------------------------
+  function privErrorLog($p_error_code=0, $p_error_string='')
+  {
+    if (PCLZIP_ERROR_EXTERNAL == 1) {
+      PclError($p_error_code, $p_error_string);
+    }
+    else {
+      $this->error_code = $p_error_code;
+      $this->error_string = $p_error_string;
+    }
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privErrorReset()
+  // Description :
+  // Parameters :
+  // --------------------------------------------------------------------------------
+  function privErrorReset()
+  {
+    if (PCLZIP_ERROR_EXTERNAL == 1) {
+      PclErrorReset();
+    }
+    else {
+      $this->error_code = 0;
+      $this->error_string = '';
+    }
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privDisableMagicQuotes()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privDisableMagicQuotes()
+  {
+    $v_result=1;
+
+    // ----- Look if function exists
+    if (   (!function_exists("get_magic_quotes_runtime"))
+	    || (!function_exists("set_magic_quotes_runtime"))) {
+      return $v_result;
+	}
+
+    // ----- Look if already done
+    if ($this->magic_quotes_status != -1) {
+      return $v_result;
+	}
+
+	// ----- Get and memorize the magic_quote value
+	$this->magic_quotes_status = @get_magic_quotes_runtime();
+
+	// ----- Disable magic_quotes
+	if ($this->magic_quotes_status == 1) {
+	  @set_magic_quotes_runtime(0);
+	}
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privSwapBackMagicQuotes()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privSwapBackMagicQuotes()
+  {
+    $v_result=1;
+
+    // ----- Look if function exists
+    if (   (!function_exists("get_magic_quotes_runtime"))
+	    || (!function_exists("set_magic_quotes_runtime"))) {
+      return $v_result;
+	}
+
+    // ----- Look if something to do
+    if ($this->magic_quotes_status != -1) {
+      return $v_result;
+	}
+
+	// ----- Swap back magic_quotes
+	if ($this->magic_quotes_status == 1) {
+  	  @set_magic_quotes_runtime($this->magic_quotes_status);
+	}
+
+    // ----- Return
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  }
+  // End of class
+  // --------------------------------------------------------------------------------
Index: www/wp-includes/Requests/Exception/HTTP/403.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/403.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_403.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-customize-nav-menus.php
===================================================================
--- www/wp-includes/class-wp-customize-nav-menus.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Nav_Menus.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-classmapgen.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-classmapgen.php	(revision )
+++ www/wp-classmapgen.php	(revision )
@@ -0,0 +1,70 @@
+<?php
+/**
+ * Generates a classmap for classes in /wp-includes and /wp-admin
+ * It should be saved to the www root and when run it saves to wp-classmap.php
+ * wp-classmap.php could then be loaded by wp-settings.php
+ *
+ * THIS IS A STRAWMAN PROPOSAL - https://en.wikipedia.org/wiki/Straw_man_proposal
+ */
+global $classmap;
+$classmap = array();
+
+/**_custom_header_background_just_in_time
+ * @param SplFileInfo $file
+ */
+function handle_file( $file ) {
+	global $classmap;
+
+	do {
+
+		if ( $file->isDir() ) {
+			continue;
+		}
+
+		if ( 'php' !== strtolower( $file->getExtension() ) ) {
+			continue;
+		}
+
+		$php_code = file_get_contents( $file->getRealPath() );
+
+		/**
+		 * @see http://stackoverflow.com/a/12011255/102699
+		 */
+		$token = '([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)';
+
+		if ( ! preg_match_all( "/\n\s*(final|abstract)?\s*(class|interface|trait)\s+{$token}/", $php_code, $matches ) ) {
+			continue;
+		}
+
+		$dir = preg_quote( __DIR__ );
+		$file_path = preg_replace( "#^{$dir}/(.+)$#", '$1', $file->getRealPath() );
+
+
+		foreach( $matches[ 3 ] as $token ) {
+			$classmap[ $token ] = $file_path;
+		}
+
+	} while ( false );
+
+}
+
+$files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( __DIR__ . '/wp-includes' ) );
+foreach( $files as $file ) {
+	handle_file( $file );
+}
+$files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( __DIR__ . '/wp-admin' ) );
+foreach( $files as $file ) {
+	handle_file( $file );
+}
+ob_start();
+var_export( $classmap );
+$classmap = ob_get_clean();
+$classmap = '<?' . <<<PHP
+php
+// WordPress Core Classmap
+return {$classmap};
+PHP;
+
+header( 'Content-type:text/plain');
+echo $classmap;
+file_put_contents( __DIR__ . '/wp-classmap.php', $classmap );
Index: www/wp-includes/Requests/Exception/HTTP/416.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/416.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_416.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/simplepie/Cache/File.php
===================================================================
--- www/wp-includes/autoload/simplepie/Cache/File.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/simplepie/Cache/File.php	(revision UNDEFINED)
@@ -1,173 +0,0 @@
-<?php
-/**
- * SimplePie
- *
- * A PHP-Based RSS and Atom Feed Framework.
- * Takes the hard work out of managing a complete RSS/Atom solution.
- *
- * Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 	* Redistributions of source code must retain the above copyright notice, this list of
- * 	  conditions and the following disclaimer.
- *
- * 	* Redistributions in binary form must reproduce the above copyright notice, this list
- * 	  of conditions and the following disclaimer in the documentation and/or other materials
- * 	  provided with the distribution.
- *
- * 	* Neither the name of the SimplePie Team nor the names of its contributors may be used
- * 	  to endorse or promote products derived from this software without specific prior
- * 	  written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
- * AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * @package SimplePie
- * @version 1.3.1
- * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
- * @author Ryan Parman
- * @author Geoffrey Sneddon
- * @author Ryan McCue
- * @link http://simplepie.org/ SimplePie
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
- */
-
-/**
- * Caches data to the filesystem
- *
- * @package SimplePie
- * @subpackage Caching
- */
-class SimplePie_Cache_File implements SimplePie_Cache_Base
-{
-	/**
-	 * Location string
-	 *
-	 * @see SimplePie::$cache_location
-	 * @var string
-	 */
-	protected $location;
-
-	/**
-	 * Filename
-	 *
-	 * @var string
-	 */
-	protected $filename;
-
-	/**
-	 * File extension
-	 *
-	 * @var string
-	 */
-	protected $extension;
-
-	/**
-	 * File path
-	 *
-	 * @var string
-	 */
-	protected $name;
-
-	/**
-	 * Create a new cache object
-	 *
-	 * @param string $location Location string (from SimplePie::$cache_location)
-	 * @param string $name Unique ID for the cache
-	 * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
-	 */
-	public function __construct($location, $name, $type)
-	{
-		$this->location = $location;
-		$this->filename = $name;
-		$this->extension = $type;
-		$this->name = "$this->location/$this->filename.$this->extension";
-	}
-
-	/**
-	 * Save data to the cache
-	 *
-	 * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
-	 * @return bool Successfulness
-	 */
-	public function save($data)
-	{
-		if (file_exists($this->name) && is_writeable($this->name) || file_exists($this->location) && is_writeable($this->location))
-		{
-			if ($data instanceof SimplePie)
-			{
-				$data = $data->data;
-			}
-
-			$data = serialize($data);
-			return (bool) file_put_contents($this->name, $data);
-		}
-		return false;
-	}
-
-	/**
-	 * Retrieve the data saved to the cache
-	 *
-	 * @return array Data for SimplePie::$data
-	 */
-	public function load()
-	{
-		if (file_exists($this->name) && is_readable($this->name))
-		{
-			return unserialize(file_get_contents($this->name));
-		}
-		return false;
-	}
-
-	/**
-	 * Retrieve the last modified time for the cache
-	 *
-	 * @return int Timestamp
-	 */
-	public function mtime()
-	{
-		if (file_exists($this->name))
-		{
-			return filemtime($this->name);
-		}
-		return false;
-	}
-
-	/**
-	 * Set the last modified time to the current time
-	 *
-	 * @return bool Success status
-	 */
-	public function touch()
-	{
-		if (file_exists($this->name))
-		{
-			return touch($this->name);
-		}
-		return false;
-	}
-
-	/**
-	 * Remove the cache
-	 *
-	 * @return bool Success status
-	 */
-	public function unlink()
-	{
-		if (file_exists($this->name))
-		{
-			return unlink($this->name);
-		}
-		return false;
-	}
-}
Index: www/wp-includes/Text/Diff/Renderer.php
===================================================================
--- www/wp-includes/Text/Diff/Renderer.php	(revision 38565)
+++ www/wp-includes/autoload/text-diff/Text_Diff_Renderer.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-locale.php
===================================================================
--- www/wp-includes/class-wp-locale.php	(revision 38565)
+++ www/wp-includes/autoload/WP_Locale.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-site.php
===================================================================
--- www/wp-includes/class-wp-site.php	(revision 38565)
+++ www/wp-includes/autoload/object/WP_Site.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/includes/class-wp-upgrader.php
===================================================================
--- www/wp-admin/includes/class-wp-upgrader.php	(revision 38565)
+++ www/wp-admin/autoload/upgrader/WP_Upgrader.php	(revision )
@@ -9,39 +9,6 @@
  * @since 2.8.0
  */
 
-/** WP_Upgrader_Skin class */
-require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader-skin.php';
-
-/** Plugin_Upgrader_Skin class */
-require_once ABSPATH . 'wp-admin/includes/class-plugin-upgrader-skin.php';
-
-/** Theme_Upgrader_Skin class */
-require_once ABSPATH . 'wp-admin/includes/class-theme-upgrader-skin.php';
-
-/** Bulk_Upgrader_Skin class */
-require_once ABSPATH . 'wp-admin/includes/class-bulk-upgrader-skin.php';
-
-/** Bulk_Plugin_Upgrader_Skin class */
-require_once ABSPATH . 'wp-admin/includes/class-bulk-plugin-upgrader-skin.php';
-
-/** Bulk_Theme_Upgrader_Skin class */
-require_once ABSPATH . 'wp-admin/includes/class-bulk-theme-upgrader-skin.php';
-
-/** Plugin_Installer_Skin class */
-require_once ABSPATH . 'wp-admin/includes/class-plugin-installer-skin.php';
-
-/** Theme_Installer_Skin class */
-require_once ABSPATH . 'wp-admin/includes/class-theme-installer-skin.php';
-
-/** Language_Pack_Upgrader_Skin class */
-require_once ABSPATH . 'wp-admin/includes/class-language-pack-upgrader-skin.php';
-
-/** Automatic_Upgrader_Skin class */
-require_once ABSPATH . 'wp-admin/includes/class-automatic-upgrader-skin.php';
-
-/** WP_Ajax_Upgrader_Skin class */
-require_once ABSPATH . 'wp-admin/includes/class-wp-ajax-upgrader-skin.php';
-
 /**
  * Core class used for upgrading/installing a local set of files via
  * the Filesystem Abstraction classes from a Zip file.
@@ -887,21 +854,3 @@
 	}
 
 }
-
-/** Plugin_Upgrader class */
-require_once ABSPATH . 'wp-admin/includes/class-plugin-upgrader.php';
-
-/** Theme_Upgrader class */
-require_once ABSPATH . 'wp-admin/includes/class-theme-upgrader.php';
-
-/** Language_Pack_Upgrader class */
-require_once ABSPATH . 'wp-admin/includes/class-language-pack-upgrader.php';
-
-/** Core_Upgrader class */
-require_once ABSPATH . 'wp-admin/includes/class-core-upgrader.php';
-
-/** File_Upload_Upgrader class */
-require_once ABSPATH . 'wp-admin/includes/class-file-upload-upgrader.php';
-
-/** WP_Automatic_Updater class */
-require_once ABSPATH . 'wp-admin/includes/class-wp-automatic-updater.php';
Index: www/wp-admin/ms-themes.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/ms-themes.php	(revision 38565)
+++ www/wp-admin/ms-themes.php	(revision 38565)
@@ -1,13 +0,0 @@
-<?php
-/**
- * Multisite themes administration panel.
- *
- * @package WordPress
- * @subpackage Multisite
- * @since 3.0.0
- */
-
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-wp_redirect( network_admin_url('themes.php') );
-exit;
Index: www/wp-admin/theme-install.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/theme-install.php	(revision 38565)
+++ www/wp-admin/theme-install.php	(revision 38565)
@@ -1,337 +0,0 @@
-<?php
-/**
- * Install theme administration panel.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-require( ABSPATH . 'wp-admin/includes/theme-install.php' );
-
-wp_reset_vars( array( 'tab' ) );
-
-if ( ! current_user_can('install_themes') )
-	wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) );
-
-if ( is_multisite() && ! is_network_admin() ) {
-	wp_redirect( network_admin_url( 'theme-install.php' ) );
-	exit();
-}
-
-$title = __( 'Add Themes' );
-$parent_file = 'themes.php';
-
-if ( ! is_network_admin() ) {
-	$submenu_file = 'themes.php';
-}
-
-$installed_themes = search_theme_directories();
-foreach ( $installed_themes as $k => $v ) {
-	if ( false !== strpos( $k, '/' ) ) {
-		unset( $installed_themes[ $k ] );
-	}
-}
-
-wp_localize_script( 'theme', '_wpThemeSettings', array(
-	'themes'   => false,
-	'settings' => array(
-		'isInstall'     => true,
-		'canInstall'    => current_user_can( 'install_themes' ),
-		'installURI'    => current_user_can( 'install_themes' ) ? self_admin_url( 'theme-install.php' ) : null,
-		'adminUrl'      => parse_url( self_admin_url(), PHP_URL_PATH )
-	),
-	'l10n' => array(
-		'addNew' => __( 'Add New Theme' ),
-		'search' => __( 'Search Themes' ),
-		'searchPlaceholder' => __( 'Search themes...' ), // placeholder (no ellipsis)
-		'upload' => __( 'Upload Theme' ),
-		'back'   => __( 'Back' ),
-		'error'  => __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ),
-		'themesFound'   => __( 'Number of Themes found: %d' ),
-		'noThemesFound' => __( 'No themes found. Try a different search.' ),
-		'collapseSidebar'    => __( 'Collapse Sidebar' ),
-		'expandSidebar'      => __( 'Expand Sidebar' ),
-	),
-	'installedThemes' => array_keys( $installed_themes ),
-) );
-
-wp_enqueue_script( 'theme' );
-wp_enqueue_script( 'updates' );
-
-if ( $tab ) {
-	/**
-	 * Fires before each of the tabs are rendered on the Install Themes page.
-	 *
-	 * The dynamic portion of the hook name, `$tab`, refers to the current
-	 * theme install tab. Possible values are 'dashboard', 'search', 'upload',
-	 * 'featured', 'new', or 'updated'.
-	 *
-	 * @since 2.8.0
-	 */
-	do_action( "install_themes_pre_{$tab}" );
-}
-
-$help_overview =
-	'<p>' . sprintf(
-			/* translators: %s: Theme Directory URL */
-			__( 'You can find additional themes for your site by using the Theme Browser/Installer on this screen, which will display themes from the <a href="%s" target="_blank">WordPress Theme Directory</a>. These themes are designed and developed by third parties, are available free of charge, and are compatible with the license WordPress uses.' ),
-			__( 'https://wordpress.org/themes/' )
-		) . '</p>' .
-	'<p>' . __( 'You can Search for themes by keyword, author, or tag, or can get more specific and search by criteria listed in the feature filter.' ) . ' <span id="live-search-desc">' . __( 'The search results will be updated as you type.' ) . '</span></p>' .
-	'<p>' . __( 'Alternately, you can browse the themes that are Featured, Popular, or Latest. When you find a theme you like, you can preview it or install it.' ) . '</p>' .
-	'<p>' . sprintf(
-			/* translators: %s: /wp-content/themes */
-			__( 'You can Upload a theme manually if you have already downloaded its ZIP archive onto your computer (make sure it is from a trusted and original source). You can also do it the old-fashioned way and copy a downloaded theme&#8217;s folder via FTP into your %s directory.' ),
-			'<code>/wp-content/themes</code>'
-		) . '</p>';
-
-get_current_screen()->add_help_tab( array(
-	'id'      => 'overview',
-	'title'   => __('Overview'),
-	'content' => $help_overview
-) );
-
-$help_installing =
-	'<p>' . __('Once you have generated a list of themes, you can preview and install any of them. Click on the thumbnail of the theme you&#8217;re interested in previewing. It will open up in a full-screen Preview page to give you a better idea of how that theme will look.') . '</p>' .
-	'<p>' . __('To install the theme so you can preview it with your site&#8217;s content and customize its theme options, click the "Install" button at the top of the left-hand pane. The theme files will be downloaded to your website automatically. When this is complete, the theme is now available for activation, which you can do by clicking the "Activate" link, or by navigating to your Manage Themes screen and clicking the "Live Preview" link under any installed theme&#8217;s thumbnail image.') . '</p>';
-
-get_current_screen()->add_help_tab( array(
-	'id'      => 'installing',
-	'title'   => __('Previewing and Installing'),
-	'content' => $help_installing
-) );
-
-get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Using_Themes#Adding_New_Themes" target="_blank">Documentation on Adding New Themes</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
-);
-
-include(ABSPATH . 'wp-admin/admin-header.php');
-
-?>
-<div class="wrap">
-	<h1><?php
-	echo esc_html( $title );
-
-	/**
-	 * Filters the tabs shown on the Add Themes screen.
-	 *
-	 * This filter is for backward compatibility only, for the suppression of the upload tab.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param array $tabs The tabs shown on the Add Themes screen. Default is 'upload'.
-	 */
-	$tabs = apply_filters( 'install_themes_tabs', array( 'upload' => __( 'Upload Theme' ) ) );
-	if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_themes' ) ) {
-		echo ' <button type="button" class="upload-view-toggle page-title-action hide-if-no-js" aria-expanded="false">' . __( 'Upload Theme' ) . '</button>';
-	}
-	?></h1>
-	<div class="error hide-if-js">
-		<p><?php _e( 'The Theme Installer screen requires JavaScript.' ); ?></p>
-	</div>
-
-	<div class="upload-theme">
-	<?php install_themes_upload(); ?>
-	</div>
-
-	<h2 class="screen-reader-text hide-if-no-js"><?php _e( 'Filter themes list' ); ?></h2>
-
-	<div class="wp-filter hide-if-no-js">
-		<div class="filter-count">
-			<span class="count theme-count"></span>
-		</div>
-
-		<ul class="filter-links">
-			<li><a href="#" data-sort="featured"><?php _ex( 'Featured', 'themes' ); ?></a></li>
-			<li><a href="#" data-sort="popular"><?php _ex( 'Popular', 'themes' ); ?></a></li>
-			<li><a href="#" data-sort="new"><?php _ex( 'Latest', 'themes' ); ?></a></li>
-			<li><a href="#" data-sort="favorites"><?php _ex( 'Favorites', 'themes' ); ?></a></li>
-		</ul>
-
-		<a class="drawer-toggle" href="#"><?php _e( 'Feature Filter' ); ?></a>
-
-		<div class="search-form"></div>
-
-		<div class="favorites-form">
-			<?php
-			$action = 'save_wporg_username_' . get_current_user_id();
-			if ( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( wp_unslash( $_GET['_wpnonce'] ), $action ) ) {
-				$user = isset( $_GET['user'] ) ? wp_unslash( $_GET['user'] ) : get_user_option( 'wporg_favorites' );
-				update_user_meta( get_current_user_id(), 'wporg_favorites', $user );
-			} else {
-				$user = get_user_option( 'wporg_favorites' );
-			}
-			?>
-			<p class="install-help"><?php _e( 'If you have marked themes as favorites on WordPress.org, you can browse them here.' ); ?></p>
-
-			<p>
-				<label for="wporg-username-input"><?php _e( 'Your WordPress.org username:' ); ?></label>
-				<input type="hidden" id="wporg-username-nonce" name="_wpnonce" value="<?php echo esc_attr( wp_create_nonce( $action ) ); ?>" />
-				<input type="search" id="wporg-username-input" value="<?php echo esc_attr( $user ); ?>" />
-				<input type="button" class="button button-secondary favorites-form-submit" value="<?php esc_attr_e( 'Get Favorites' ); ?>" />
-			</p>
-		</div>
-
-		<div class="filter-drawer">
-			<div class="buttons">
-				<a class="apply-filters button button-secondary" href="#"><?php _e( 'Apply Filters' ); ?><span></span></a>
-				<a class="clear-filters button button-secondary" href="#"><?php _e( 'Clear' ); ?></a>
-			</div>
-		<?php
-		$feature_list = get_theme_feature_list();
-		foreach ( $feature_list as $feature_name => $features ) {
-			echo '<fieldset class="filter-group">';
-			$feature_name = esc_html( $feature_name );
-			echo '<legend>' . $feature_name . '</legend>';
-			echo '<div class="filter-group-feature">';
-			foreach ( $features as $feature => $feature_name ) {
-				$feature = esc_attr( $feature );
-				echo '<input type="checkbox" id="filter-id-' . $feature . '" value="' . $feature . '" /> ';
-				echo '<label for="filter-id-' . $feature . '">' . $feature_name . '</label><br>';
-			}
-			echo '</div>';
-			echo '</fieldset>';
-		}
-		?>
-			<div class="filtered-by">
-				<span><?php _e( 'Filtering by:' ); ?></span>
-				<div class="tags"></div>
-				<a href="#"><?php _e( 'Edit' ); ?></a>
-			</div>
-		</div>
-	</div>
-	<h2 class="screen-reader-text hide-if-no-js"><?php _e( 'Themes list' ); ?></h2>
-	<div class="theme-browser content-filterable"></div>
-	<div class="theme-install-overlay wp-full-overlay expanded"></div>
-
-	<p class="no-themes"><?php _e( 'No themes found. Try a different search.' ); ?></p>
-	<span class="spinner"></span>
-
-<?php
-if ( $tab ) {
-	/**
-	 * Fires at the top of each of the tabs on the Install Themes page.
-	 *
-	 * The dynamic portion of the hook name, `$tab`, refers to the current
-	 * theme install tab. Possible values are 'dashboard', 'search', 'upload',
-	 * 'featured', 'new', or 'updated'.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param int $paged Number of the current page of results being viewed.
-	 */
-	do_action( "install_themes_{$tab}", $paged );
-}
-?>
-</div>
-
-<script id="tmpl-theme" type="text/template">
-	<# if ( data.screenshot_url ) { #>
-		<div class="theme-screenshot">
-			<img src="{{ data.screenshot_url }}" alt="" />
-		</div>
-	<# } else { #>
-		<div class="theme-screenshot blank"></div>
-	<# } #>
-	<span class="more-details"><?php _ex( 'Details &amp; Preview', 'theme' ); ?></span>
-	<div class="theme-author">
-		<?php
-		/* translators: %s: Theme author name */
-		printf( __( 'By %s' ), '{{ data.author }}' );
-		?>
-	</div>
-	<h3 class="theme-name">{{ data.name }}</h3>
-
-	<div class="theme-actions">
-		<# if ( data.installed ) { #>
-			<?php
-			/* translators: %s: Theme name */
-			$aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
-			?>
-			<# if ( data.activate_url ) { #>
-				<a class="button button-primary activate" href="{{ data.activate_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
-			<# } #>
-			<# if ( data.customize_url ) { #>
-				<a class="button button-secondary load-customize" href="{{ data.customize_url }}"><?php _e( 'Live Preview' ); ?></a>
-			<# } else { #>
-				<button class="button-secondary preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
-			<# } #>
-		<# } else { #>
-			<?php
-			/* translators: %s: Theme name */
-			$aria_label = sprintf( __( 'Install %s' ), '{{ data.name }}' );
-			?>
-			<a class="button button-primary theme-install" data-name="{{ data.name }}" data-slug="{{ data.id }}" href="{{ data.install_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Install' ); ?></a>
-			<button class="button-secondary preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
-		<# } #>
-	</div>
-
-	<# if ( data.installed ) { #>
-		<div class="notice notice-success notice-alt"><p><?php _ex( 'Installed', 'theme' ); ?></p></div>
-	<# } #>
-</script>
-
-<script id="tmpl-theme-preview" type="text/template">
-	<div class="wp-full-overlay-sidebar">
-		<div class="wp-full-overlay-header">
-			<button class="close-full-overlay"><span class="screen-reader-text"><?php _e( 'Close' ); ?></span></button>
-			<button class="previous-theme"><span class="screen-reader-text"><?php _ex( 'Previous', 'Button label for a theme' ); ?></span></button>
-			<button class="next-theme"><span class="screen-reader-text"><?php _ex( 'Next', 'Button label for a theme' ); ?></span></button>
-			<# if ( data.installed ) { #>
-				<a class="button button-primary activate" href="{{ data.activate_url }}"><?php _e( 'Activate' ); ?></a>
-			<# } else { #>
-				<a href="{{ data.install_url }}" class="button button-primary theme-install" data-name="{{ data.name }}" data-slug="{{ data.id }}"><?php _e( 'Install' ); ?></a>
-			<# } #>
-		</div>
-		<div class="wp-full-overlay-sidebar-content">
-			<div class="install-theme-info">
-				<h3 class="theme-name">{{ data.name }}</h3>
-					<span class="theme-by">
-						<?php
-						/* translators: %s: Theme author name */
-						printf( __( 'By %s' ), '{{ data.author }}' );
-						?>
-					</span>
-
-					<img class="theme-screenshot" src="{{ data.screenshot_url }}" alt="" />
-
-					<div class="theme-details">
-						<# if ( data.rating ) { #>
-							<div class="theme-rating">
-								{{{ data.stars }}}
-								<span class="num-ratings">({{ data.num_ratings }})</span>
-							</div>
-						<# } else { #>
-							<span class="no-rating"><?php _e( 'This theme has not been rated yet.' ); ?></span>
-						<# } #>
-						<div class="theme-version">
-							<?php
-							/* translators: %s: Theme version */
-							printf( __( 'Version: %s' ), '{{ data.version }}' );
-							?>
-						</div>
-						<div class="theme-description">{{{ data.description }}}</div>
-					</div>
-				</div>
-			</div>
-			<div class="wp-full-overlay-footer">
-				<button type="button" class="collapse-sidebar button-secondary" aria-expanded="true" aria-label="<?php esc_attr_e( 'Collapse Sidebar' ); ?>">
-					<span class="collapse-sidebar-arrow"></span>
-					<span class="collapse-sidebar-label"><?php _e( 'Collapse' ); ?></span>
-				</button>
-			</div>
-		</div>
-		<div class="wp-full-overlay-main">
-		<iframe src="{{ data.preview_url }}" title="<?php esc_attr_e( 'Preview' ); ?>"></iframe>
-	</div>
-</script>
-
-<?php
-wp_print_request_filesystem_credentials_modal();
-wp_print_admin_notice_templates();
-
-include(ABSPATH . 'wp-admin/admin-footer.php');
Index: www/wp-admin/upgrade.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/upgrade.php	(revision 38565)
+++ www/wp-admin/upgrade.php	(revision 38565)
@@ -1,127 +0,0 @@
-<?php
-/**
- * Upgrade WordPress Page.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/**
- * We are upgrading WordPress.
- *
- * @since 1.5.1
- * @var bool
- */
-define( 'WP_INSTALLING', true );
-
-/** Load WordPress Bootstrap */
-require( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
-
-nocache_headers();
-
-timer_start();
-require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
-
-delete_site_transient('update_core');
-
-if ( isset( $_GET['step'] ) )
-	$step = $_GET['step'];
-else
-	$step = 0;
-
-// Do it. No output.
-if ( 'upgrade_db' === $step ) {
-	wp_upgrade();
-	die( '0' );
-}
-
-/**
- * @global string $wp_version
- * @global string $required_php_version
- * @global string $required_mysql_version
- * @global wpdb   $wpdb
- */
-global $wp_version, $required_php_version, $required_mysql_version;
-
-$step = (int) $step;
-
-$php_version    = phpversion();
-$mysql_version  = $wpdb->db_version();
-$php_compat     = version_compare( $php_version, $required_php_version, '>=' );
-if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
-	$mysql_compat = true;
-else
-	$mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' );
-
-@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
-?>
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
-<head>
-	<meta name="viewport" content="width=device-width" />
-	<meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php echo get_option( 'blog_charset' ); ?>" />
-	<meta name="robots" content="noindex,nofollow" />
-	<title><?php _e( 'WordPress &rsaquo; Update' ); ?></title>
-	<?php
-	wp_admin_css( 'install', true );
-	wp_admin_css( 'ie', true );
-	?>
-</head>
-<body class="wp-core-ui">
-<p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>" tabindex="-1"><?php _e( 'WordPress' ); ?></a></p>
-
-<?php if ( get_option( 'db_version' ) == $wp_db_version || !is_blog_installed() ) : ?>
-
-<h1><?php _e( 'No Update Required' ); ?></h1>
-<p><?php _e( 'Your WordPress database is already up-to-date!' ); ?></p>
-<p class="step"><a class="button button-large" href="<?php echo get_option( 'home' ); ?>/"><?php _e( 'Continue' ); ?></a></p>
-
-<?php elseif ( !$php_compat || !$mysql_compat ) :
-	if ( !$mysql_compat && !$php_compat )
-		printf( __('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version );
-	elseif ( !$php_compat )
-		printf( __('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version );
-	elseif ( !$mysql_compat )
-		printf( __('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.'), $wp_version, $required_mysql_version, $mysql_version );
-?>
-<?php else :
-switch ( $step ) :
-	case 0:
-		$goback = wp_get_referer();
-		if ( $goback ) {
-			$goback = esc_url_raw( $goback );
-			$goback = urlencode( $goback );
-		}
-?>
-<h1><?php _e( 'Database Update Required' ); ?></h1>
-<p><?php _e( 'WordPress has been updated! Before we send you on your way, we have to update your database to the newest version.' ); ?></p>
-<p><?php _e( 'The database update process may take a little while, so please be patient.' ); ?></p>
-<p class="step"><a class="button button-large button-primary" href="upgrade.php?step=1&amp;backto=<?php echo $goback; ?>"><?php _e( 'Update WordPress Database' ); ?></a></p>
-<?php
-		break;
-	case 1:
-		wp_upgrade();
-
-			$backto = !empty($_GET['backto']) ? wp_unslash( urldecode( $_GET['backto'] ) ) : __get_option( 'home' ) . '/';
-			$backto = esc_url( $backto );
-			$backto = wp_validate_redirect($backto, __get_option( 'home' ) . '/');
-?>
-<h1><?php _e( 'Update Complete' ); ?></h1>
-	<p><?php _e( 'Your WordPress database has been successfully updated!' ); ?></p>
-	<p class="step"><a class="button button-large" href="<?php echo $backto; ?>"><?php _e( 'Continue' ); ?></a></p>
-
-<!--
-<pre>
-<?php printf( __( '%s queries' ), $wpdb->num_queries ); ?>
-
-<?php printf( __( '%s seconds' ), timer_stop( 0 ) ); ?>
-</pre>
--->
-
-<?php
-		break;
-endswitch;
-endif;
-?>
-</body>
-</html>
Index: www/wp-includes/l10n.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/l10n.php	(revision 38565)
+++ www/wp-includes/l10n.php	(revision 38565)
@@ -1,1151 +0,0 @@
-<?php
-/**
- * Core Translation API
- *
- * @package WordPress
- * @subpackage i18n
- * @since 1.2.0
- */
-
-/**
- * Retrieves the current locale.
- *
- * If the locale is set, then it will filter the locale in the {@see 'locale'}
- * filter hook and return the value.
- *
- * If the locale is not set already, then the WPLANG constant is used if it is
- * defined. Then it is filtered through the {@see 'locale'} filter hook and
- * the value for the locale global set and the locale is returned.
- *
- * The process to get the locale should only be done once, but the locale will
- * always be filtered using the {@see 'locale'} hook.
- *
- * @since 1.5.0
- *
- * @global string $locale
- * @global string $wp_local_package
- *
- * @return string The locale of the blog or from the {@see 'locale'} hook.
- */
-function get_locale() {
-	global $locale, $wp_local_package;
-
-	if ( isset( $locale ) ) {
-		/**
-		 * Filters WordPress install's locale ID.
-		 *
-		 * @since 1.5.0
-		 *
-		 * @param string $locale The locale ID.
-		 */
-		return apply_filters( 'locale', $locale );
-	}
-
-	if ( isset( $wp_local_package ) ) {
-		$locale = $wp_local_package;
-	}
-
-	// WPLANG was defined in wp-config.
-	if ( defined( 'WPLANG' ) ) {
-		$locale = WPLANG;
-	}
-
-	// If multisite, check options.
-	if ( is_multisite() ) {
-		// Don't check blog option when installing.
-		if ( wp_installing() || ( false === $ms_locale = get_option( 'WPLANG' ) ) ) {
-			$ms_locale = get_site_option( 'WPLANG' );
-		}
-
-		if ( $ms_locale !== false ) {
-			$locale = $ms_locale;
-		}
-	} else {
-		$db_locale = get_option( 'WPLANG' );
-		if ( $db_locale !== false ) {
-			$locale = $db_locale;
-		}
-	}
-
-	if ( empty( $locale ) ) {
-		$locale = 'en_US';
-	}
-
-	/** This filter is documented in wp-includes/l10n.php */
-	return apply_filters( 'locale', $locale );
-}
-
-/**
- * Retrieve the translation of $text.
- *
- * If there is no translation, or the text domain isn't loaded, the original text is returned.
- *
- * *Note:* Don't use translate() directly, use __() or related functions.
- *
- * @since 2.2.0
- *
- * @param string $text   Text to translate.
- * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
- *                       Default 'default'.
- * @return string Translated text
- */
-function translate( $text, $domain = 'default' ) {
-	$translations = get_translations_for_domain( $domain );
-	$translation  = $translations->translate( $text );
-
-	/**
-	 * Filters text with its translation.
-	 *
-	 * @since 2.0.11
-	 *
-	 * @param string $translation  Translated text.
-	 * @param string $text         Text to translate.
-	 * @param string $domain       Text domain. Unique identifier for retrieving translated strings.
-	 */
-	return apply_filters( 'gettext', $translation, $text, $domain );
-}
-
-/**
- * Remove last item on a pipe-delimited string.
- *
- * Meant for removing the last item in a string, such as 'Role name|User role'. The original
- * string will be returned if no pipe '|' characters are found in the string.
- *
- * @since 2.8.0
- *
- * @param string $string A pipe-delimited string.
- * @return string Either $string or everything before the last pipe.
- */
-function before_last_bar( $string ) {
-	$last_bar = strrpos( $string, '|' );
-	if ( false === $last_bar ) {
-		return $string;
-	} else {
-		return substr( $string, 0, $last_bar );
-	}
-}
-
-/**
- * Retrieve the translation of $text in the context defined in $context.
- *
- * If there is no translation, or the text domain isn't loaded the original
- * text is returned.
- *
- * *Note:* Don't use translate_with_gettext_context() directly, use _x() or related functions.
- *
- * @since 2.8.0
- *
- * @param string $text    Text to translate.
- * @param string $context Context information for the translators.
- * @param string $domain  Optional. Text domain. Unique identifier for retrieving translated strings.
- *                        Default 'default'.
- * @return string Translated text on success, original text on failure.
- */
-function translate_with_gettext_context( $text, $context, $domain = 'default' ) {
-	$translations = get_translations_for_domain( $domain );
-	$translation  = $translations->translate( $text, $context );
-	/**
-	 * Filters text with its translation based on context information.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param string $translation  Translated text.
-	 * @param string $text         Text to translate.
-	 * @param string $context      Context information for the translators.
-	 * @param string $domain       Text domain. Unique identifier for retrieving translated strings.
-	 */
-	return apply_filters( 'gettext_with_context', $translation, $text, $context, $domain );
-}
-
-/**
- * Retrieve the translation of $text.
- *
- * If there is no translation, or the text domain isn't loaded, the original text is returned.
- *
- * @since 2.1.0
- *
- * @param string $text   Text to translate.
- * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
- *                       Default 'default'.
- * @return string Translated text.
- */
-function __( $text, $domain = 'default' ) {
-	return translate( $text, $domain );
-}
-
-/**
- * Retrieve the translation of $text and escapes it for safe use in an attribute.
- *
- * If there is no translation, or the text domain isn't loaded, the original text is returned.
- *
- * @since 2.8.0
- *
- * @param string $text   Text to translate.
- * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
- *                       Default 'default'.
- * @return string Translated text on success, original text on failure.
- */
-function esc_attr__( $text, $domain = 'default' ) {
-	return esc_attr( translate( $text, $domain ) );
-}
-
-/**
- * Retrieve the translation of $text and escapes it for safe use in HTML output.
- *
- * If there is no translation, or the text domain isn't loaded, the original text is returned.
- *
- * @since 2.8.0
- *
- * @param string $text   Text to translate.
- * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
- *                       Default 'default'.
- * @return string Translated text
- */
-function esc_html__( $text, $domain = 'default' ) {
-	return esc_html( translate( $text, $domain ) );
-}
-
-/**
- * Display translated text.
- *
- * @since 1.2.0
- *
- * @param string $text   Text to translate.
- * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
- *                       Default 'default'.
- */
-function _e( $text, $domain = 'default' ) {
-	echo translate( $text, $domain );
-}
-
-/**
- * Display translated text that has been escaped for safe use in an attribute.
- *
- * @since 2.8.0
- *
- * @param string $text   Text to translate.
- * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
- *                       Default 'default'.
- */
-function esc_attr_e( $text, $domain = 'default' ) {
-	echo esc_attr( translate( $text, $domain ) );
-}
-
-/**
- * Display translated text that has been escaped for safe use in HTML output.
- *
- * @since 2.8.0
- *
- * @param string $text   Text to translate.
- * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
- *                       Default 'default'.
- */
-function esc_html_e( $text, $domain = 'default' ) {
-	echo esc_html( translate( $text, $domain ) );
-}
-
-/**
- * Retrieve translated string with gettext context.
- *
- * Quite a few times, there will be collisions with similar translatable text
- * found in more than two places, but with different translated context.
- *
- * By including the context in the pot file, translators can translate the two
- * strings differently.
- *
- * @since 2.8.0
- *
- * @param string $text    Text to translate.
- * @param string $context Context information for the translators.
- * @param string $domain  Optional. Text domain. Unique identifier for retrieving translated strings.
- *                        Default 'default'.
- * @return string Translated context string without pipe.
- */
-function _x( $text, $context, $domain = 'default' ) {
-	return translate_with_gettext_context( $text, $context, $domain );
-}
-
-/**
- * Display translated string with gettext context.
- *
- * @since 3.0.0
- *
- * @param string $text    Text to translate.
- * @param string $context Context information for the translators.
- * @param string $domain  Optional. Text domain. Unique identifier for retrieving translated strings.
- *                        Default 'default'.
- * @return string Translated context string without pipe.
- */
-function _ex( $text, $context, $domain = 'default' ) {
-	echo _x( $text, $context, $domain );
-}
-
-/**
- * Translate string with gettext context, and escapes it for safe use in an attribute.
- *
- * @since 2.8.0
- *
- * @param string $text    Text to translate.
- * @param string $context Context information for the translators.
- * @param string $domain  Optional. Text domain. Unique identifier for retrieving translated strings.
- *                        Default 'default'.
- * @return string Translated text
- */
-function esc_attr_x( $text, $context, $domain = 'default' ) {
-	return esc_attr( translate_with_gettext_context( $text, $context, $domain ) );
-}
-
-/**
- * Translate string with gettext context, and escapes it for safe use in HTML output.
- *
- * @since 2.9.0
- *
- * @param string $text    Text to translate.
- * @param string $context Context information for the translators.
- * @param string $domain  Optional. Text domain. Unique identifier for retrieving translated strings.
- *                        Default 'default'.
- * @return string Translated text.
- */
-function esc_html_x( $text, $context, $domain = 'default' ) {
-	return esc_html( translate_with_gettext_context( $text, $context, $domain ) );
-}
-
-/**
- * Translates and retrieves the singular or plural form based on the supplied number.
- *
- * Used when you want to use the appropriate form of a string based on whether a
- * number is singular or plural.
- *
- * Example:
- *
- *     printf( _n( '%s person', '%s people', $count, 'text-domain' ), number_format_i18n( $count ) );
- *
- * @since 2.8.0
- *
- * @param string $single The text to be used if the number is singular.
- * @param string $plural The text to be used if the number is plural.
- * @param int    $number The number to compare against to use either the singular or plural form.
- * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
- *                       Default 'default'.
- * @return string The translated singular or plural form.
- */
-function _n( $single, $plural, $number, $domain = 'default' ) {
-	$translations = get_translations_for_domain( $domain );
-	$translation  = $translations->translate_plural( $single, $plural, $number );
-
-	/**
-	 * Filters the singular or plural form of a string.
-	 *
-	 * @since 2.2.0
-	 *
-	 * @param string $translation Translated text.
-	 * @param string $single      The text to be used if the number is singular.
-	 * @param string $plural      The text to be used if the number is plural.
-	 * @param string $number      The number to compare against to use either the singular or plural form.
-	 * @param string $domain      Text domain. Unique identifier for retrieving translated strings.
-	 */
-	return apply_filters( 'ngettext', $translation, $single, $plural, $number, $domain );
-}
-
-/**
- * Translates and retrieves the singular or plural form based on the supplied number, with gettext context.
- *
- * This is a hybrid of _n() and _x(). It supports context and plurals.
- *
- * Used when you want to use the appropriate form of a string with context based on whether a
- * number is singular or plural.
- *
- * Example of a generic phrase which is disambiguated via the context parameter:
- *
- *     printf( _nx( '%s group', '%s groups', $people, 'group of people', 'text-domain' ), number_format_i18n( $people ) );
- *     printf( _nx( '%s group', '%s groups', $animals, 'group of animals', 'text-domain' ), number_format_i18n( $animals ) );
- *
- * @since 2.8.0
- *
- * @param string $single  The text to be used if the number is singular.
- * @param string $plural  The text to be used if the number is plural.
- * @param int    $number  The number to compare against to use either the singular or plural form.
- * @param string $context Context information for the translators.
- * @param string $domain  Optional. Text domain. Unique identifier for retrieving translated strings.
- *                        Default 'default'.
- * @return string The translated singular or plural form.
- */
-function _nx($single, $plural, $number, $context, $domain = 'default') {
-	$translations = get_translations_for_domain( $domain );
-	$translation  = $translations->translate_plural( $single, $plural, $number, $context );
-
-	/**
-	 * Filters the singular or plural form of a string with gettext context.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param string $translation Translated text.
-	 * @param string $single      The text to be used if the number is singular.
-	 * @param string $plural      The text to be used if the number is plural.
-	 * @param string $number      The number to compare against to use either the singular or plural form.
-	 * @param string $context     Context information for the translators.
-	 * @param string $domain      Text domain. Unique identifier for retrieving translated strings.
-	 */
-	return apply_filters( 'ngettext_with_context', $translation, $single, $plural, $number, $context, $domain );
-}
-
-/**
- * Registers plural strings in POT file, but does not translate them.
- *
- * Used when you want to keep structures with translatable plural
- * strings and use them later when the number is known.
- *
- * Example:
- *
- *     $message = _n_noop( '%s post', '%s posts', 'text-domain' );
- *     ...
- *     printf( translate_nooped_plural( $message, $count, 'text-domain' ), number_format_i18n( $count ) );
- *
- * @since 2.5.0
- *
- * @param string $singular Singular form to be localized.
- * @param string $plural   Plural form to be localized.
- * @param string $domain   Optional. Text domain. Unique identifier for retrieving translated strings.
- *                         Default null.
- * @return array {
- *     Array of translation information for the strings.
- *
- *     @type string $0        Singular form to be localized. No longer used.
- *     @type string $1        Plural form to be localized. No longer used.
- *     @type string $singular Singular form to be localized.
- *     @type string $plural   Plural form to be localized.
- *     @type null   $context  Context information for the translators.
- *     @type string $domain   Text domain.
- * }
- */
-function _n_noop( $singular, $plural, $domain = null ) {
-	return array( 0 => $singular, 1 => $plural, 'singular' => $singular, 'plural' => $plural, 'context' => null, 'domain' => $domain );
-}
-
-/**
- * Registers plural strings with gettext context in POT file, but does not translate them.
- *
- * Used when you want to keep structures with translatable plural
- * strings and use them later when the number is known.
- *
- * Example of a generic phrase which is disambiguated via the context parameter:
- *
- *     $messages = array(
- *      	'people'  => _nx_noop( '%s group', '%s groups', 'people', 'text-domain' ),
- *      	'animals' => _nx_noop( '%s group', '%s groups', 'animals', 'text-domain' ),
- *     );
- *     ...
- *     $message = $messages[ $type ];
- *     printf( translate_nooped_plural( $message, $count, 'text-domain' ), number_format_i18n( $count ) );
- *
- * @since 2.8.0
- *
- * @param string $singular Singular form to be localized.
- * @param string $plural   Plural form to be localized.
- * @param string $context  Context information for the translators.
- * @param string $domain   Optional. Text domain. Unique identifier for retrieving translated strings.
- *                         Default null.
- * @return array {
- *     Array of translation information for the strings.
- *
- *     @type string $0        Singular form to be localized. No longer used.
- *     @type string $1        Plural form to be localized. No longer used.
- *     @type string $2        Context information for the translators. No longer used.
- *     @type string $singular Singular form to be localized.
- *     @type string $plural   Plural form to be localized.
- *     @type string $context  Context information for the translators.
- *     @type string $domain   Text domain.
- * }
- */
-function _nx_noop( $singular, $plural, $context, $domain = null ) {
-	return array( 0 => $singular, 1 => $plural, 2 => $context, 'singular' => $singular, 'plural' => $plural, 'context' => $context, 'domain' => $domain );
-}
-
-/**
- * Translates and retrieves the singular or plural form of a string that's been registered
- * with _n_noop() or _nx_noop().
- *
- * Used when you want to use a translatable plural string once the number is known.
- *
- * Example:
- *
- *     $message = _n_noop( '%s post', '%s posts', 'text-domain' );
- *     ...
- *     printf( translate_nooped_plural( $message, $count, 'text-domain' ), number_format_i18n( $count ) );
- *
- * @since 3.1.0
- *
- * @param array  $nooped_plural Array with singular, plural, and context keys, usually the result of _n_noop() or _nx_noop().
- * @param int    $count         Number of objects.
- * @param string $domain        Optional. Text domain. Unique identifier for retrieving translated strings. If $nooped_plural contains
- *                              a text domain passed to _n_noop() or _nx_noop(), it will override this value. Default 'default'.
- * @return string Either $single or $plural translated text.
- */
-function translate_nooped_plural( $nooped_plural, $count, $domain = 'default' ) {
-	if ( $nooped_plural['domain'] )
-		$domain = $nooped_plural['domain'];
-
-	if ( $nooped_plural['context'] )
-		return _nx( $nooped_plural['singular'], $nooped_plural['plural'], $count, $nooped_plural['context'], $domain );
-	else
-		return _n( $nooped_plural['singular'], $nooped_plural['plural'], $count, $domain );
-}
-
-/**
- * Load a .mo file into the text domain $domain.
- *
- * If the text domain already exists, the translations will be merged. If both
- * sets have the same string, the translation from the original value will be taken.
- *
- * On success, the .mo file will be placed in the $l10n global by $domain
- * and will be a MO object.
- *
- * @since 1.5.0
- *
- * @global array $l10n          An array of all currently loaded text domains.
- * @global array $l10n_unloaded An array of all text domains that have been unloaded again.
- *
- * @param string $domain Text domain. Unique identifier for retrieving translated strings.
- * @param string $mofile Path to the .mo file.
- * @return bool True on success, false on failure.
- */
-function load_textdomain( $domain, $mofile ) {
-	global $l10n, $l10n_unloaded;
-
-	$l10n_unloaded = (array) $l10n_unloaded;
-
-	/**
-	 * Filters whether to override the .mo file loading.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param bool   $override Whether to override the .mo file loading. Default false.
-	 * @param string $domain   Text domain. Unique identifier for retrieving translated strings.
-	 * @param string $mofile   Path to the MO file.
-	 */
-	$plugin_override = apply_filters( 'override_load_textdomain', false, $domain, $mofile );
-
-	if ( true == $plugin_override ) {
-		unset( $l10n_unloaded[ $domain ] );
-
-		return true;
-	}
-
-	/**
-	 * Fires before the MO translation file is loaded.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param string $domain Text domain. Unique identifier for retrieving translated strings.
-	 * @param string $mofile Path to the .mo file.
-	 */
-	do_action( 'load_textdomain', $domain, $mofile );
-
-	/**
-	 * Filters MO file path for loading translations for a specific text domain.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param string $mofile Path to the MO file.
-	 * @param string $domain Text domain. Unique identifier for retrieving translated strings.
-	 */
-	$mofile = apply_filters( 'load_textdomain_mofile', $mofile, $domain );
-
-	if ( !is_readable( $mofile ) ) return false;
-
-	$mo = new MO();
-	if ( !$mo->import_from_file( $mofile ) ) return false;
-
-	if ( isset( $l10n[$domain] ) )
-		$mo->merge_with( $l10n[$domain] );
-
-	unset( $l10n_unloaded[ $domain ] );
-
-	$l10n[$domain] = &$mo;
-
-	return true;
-}
-
-/**
- * Unload translations for a text domain.
- *
- * @since 3.0.0
- *
- * @global array $l10n          An array of all currently loaded text domains.
- * @global array $l10n_unloaded An array of all text domains that have been unloaded again.
- *
- * @param string $domain Text domain. Unique identifier for retrieving translated strings.
- * @return bool Whether textdomain was unloaded.
- */
-function unload_textdomain( $domain ) {
-	global $l10n, $l10n_unloaded;
-
-	$l10n_unloaded = (array) $l10n_unloaded;
-
-	/**
-	 * Filters whether to override the text domain unloading.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param bool   $override Whether to override the text domain unloading. Default false.
-	 * @param string $domain   Text domain. Unique identifier for retrieving translated strings.
-	 */
-	$plugin_override = apply_filters( 'override_unload_textdomain', false, $domain );
-
-	if ( $plugin_override ) {
-		$l10n_unloaded[ $domain ] = true;
-
-		return true;
-	}
-
-	/**
-	 * Fires before the text domain is unloaded.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $domain Text domain. Unique identifier for retrieving translated strings.
-	 */
-	do_action( 'unload_textdomain', $domain );
-
-	if ( isset( $l10n[$domain] ) ) {
-		unset( $l10n[$domain] );
-
-		$l10n_unloaded[ $domain ] = true;
-
-		return true;
-	}
-
-	return false;
-}
-
-/**
- * Load default translated strings based on locale.
- *
- * Loads the .mo file in WP_LANG_DIR constant path from WordPress root.
- * The translated (.mo) file is named based on the locale.
- *
- * @see load_textdomain()
- *
- * @since 1.5.0
- *
- * @param string $locale Optional. Locale to load. Default is the value of get_locale().
- * @return bool Whether the textdomain was loaded.
- */
-function load_default_textdomain( $locale = null ) {
-	if ( null === $locale ) {
-		$locale = get_locale();
-	}
-
-	// Unload previously loaded strings so we can switch translations.
-	unload_textdomain( 'default' );
-
-	$return = load_textdomain( 'default', WP_LANG_DIR . "/$locale.mo" );
-
-	if ( ( is_multisite() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) ) && ! file_exists(  WP_LANG_DIR . "/admin-$locale.mo" ) ) {
-		load_textdomain( 'default', WP_LANG_DIR . "/ms-$locale.mo" );
-		return $return;
-	}
-
-	if ( is_admin() || wp_installing() || ( defined( 'WP_REPAIRING' ) && WP_REPAIRING ) ) {
-		load_textdomain( 'default', WP_LANG_DIR . "/admin-$locale.mo" );
-	}
-
-	if ( is_network_admin() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) )
-		load_textdomain( 'default', WP_LANG_DIR . "/admin-network-$locale.mo" );
-
-	return $return;
-}
-
-/**
- * Loads a plugin's translated strings.
- *
- * If the path is not given then it will be the root of the plugin directory.
- *
- * The .mo file should be named based on the text domain with a dash, and then the locale exactly.
- *
- * @since 1.5.0
- * @since 4.6.0 The function now tries to load the .mo file from the languages directory first.
- *
- * @param string $domain          Unique identifier for retrieving translated strings
- * @param string $deprecated      Optional. Use the $plugin_rel_path parameter instead. Default false.
- * @param string $plugin_rel_path Optional. Relative path to WP_PLUGIN_DIR where the .mo file resides.
- *                                Default false.
- * @return bool True when textdomain is successfully loaded, false otherwise.
- */
-function load_plugin_textdomain( $domain, $deprecated = false, $plugin_rel_path = false ) {
-	/**
-	 * Filters a plugin's locale.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $locale The plugin's current locale.
-	 * @param string $domain Text domain. Unique identifier for retrieving translated strings.
-	 */
-	$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
-
-	$mofile = $domain . '-' . $locale . '.mo';
-
-	// Try to load from the languages directory first.
-	if ( load_textdomain( $domain, WP_LANG_DIR . '/plugins/' . $mofile ) ) {
-		return true;
-	}
-
-	if ( false !== $plugin_rel_path ) {
-		$path = WP_PLUGIN_DIR . '/' . trim( $plugin_rel_path, '/' );
-	} elseif ( false !== $deprecated ) {
-		_deprecated_argument( __FUNCTION__, '2.7.0' );
-		$path = ABSPATH . trim( $deprecated, '/' );
-	} else {
-		$path = WP_PLUGIN_DIR;
-	}
-
-	return load_textdomain( $domain, $path . '/' . $mofile );
-}
-
-/**
- * Load the translated strings for a plugin residing in the mu-plugins directory.
- *
- * @since 3.0.0
- * @since 4.6.0 The function now tries to load the .mo file from the languages directory first.
- *
- * @param string $domain             Text domain. Unique identifier for retrieving translated strings.
- * @param string $mu_plugin_rel_path Optional. Relative to `WPMU_PLUGIN_DIR` directory in which the .mo
- *                                   file resides. Default empty string.
- * @return bool True when textdomain is successfully loaded, false otherwise.
- */
-function load_muplugin_textdomain( $domain, $mu_plugin_rel_path = '' ) {
-	/** This filter is documented in wp-includes/l10n.php */
-	$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
-
-	$mofile = $domain . '-' . $locale . '.mo';
-
-	// Try to load from the languages directory first.
-	if ( load_textdomain( $domain, WP_LANG_DIR . '/plugins/' . $mofile ) ) {
-		return true;
-	}
-
-	$path = trailingslashit( WPMU_PLUGIN_DIR . '/' . ltrim( $mu_plugin_rel_path, '/' ) );
-
-	return load_textdomain( $domain, $path . '/' . $mofile );
-}
-
-/**
- * Load the theme's translated strings.
- *
- * If the current locale exists as a .mo file in the theme's root directory, it
- * will be included in the translated strings by the $domain.
- *
- * The .mo files must be named based on the locale exactly.
- *
- * @since 1.5.0
- * @since 4.6.0 The function now tries to load the .mo file from the languages directory first.
- *
- * @param string $domain Text domain. Unique identifier for retrieving translated strings.
- * @param string $path   Optional. Path to the directory containing the .mo file.
- *                       Default false.
- * @return bool True when textdomain is successfully loaded, false otherwise.
- */
-function load_theme_textdomain( $domain, $path = false ) {
-	/**
-	 * Filters a theme's locale.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $locale The theme's current locale.
-	 * @param string $domain Text domain. Unique identifier for retrieving translated strings.
-	 */
-	$locale = apply_filters( 'theme_locale', get_locale(), $domain );
-
-	$mofile = $domain . '-' . $locale . '.mo';
-
-	// Try to load from the languages directory first.
-	if ( load_textdomain( $domain, WP_LANG_DIR . '/themes/' . $mofile ) ) {
-		return true;
-	}
-
-	if ( ! $path ) {
-		$path = get_template_directory();
-	}
-
-	return load_textdomain( $domain, $path . '/' . $locale . '.mo' );
-}
-
-/**
- * Load the child themes translated strings.
- *
- * If the current locale exists as a .mo file in the child themes
- * root directory, it will be included in the translated strings by the $domain.
- *
- * The .mo files must be named based on the locale exactly.
- *
- * @since 2.9.0
- *
- * @param string $domain Text domain. Unique identifier for retrieving translated strings.
- * @param string $path   Optional. Path to the directory containing the .mo file.
- *                       Default false.
- * @return bool True when the theme textdomain is successfully loaded, false otherwise.
- */
-function load_child_theme_textdomain( $domain, $path = false ) {
-	if ( ! $path )
-		$path = get_stylesheet_directory();
-	return load_theme_textdomain( $domain, $path );
-}
-
-/**
- * Loads plugin and theme textdomains just-in-time.
- *
- * When a textdomain is encountered for the first time, we try to load
- * the translation file from `wp-content/languages`, removing the need
- * to call load_plugin_texdomain() or load_theme_texdomain().
- *
- * Holds a cached list of available .mo files to improve performance.
- *
- * @since 4.6.0
- * @access private
- *
- * @see get_translations_for_domain()
- * @global array $l10n_unloaded An array of all text domains that have been unloaded again.
- *
- * @param string $domain Text domain. Unique identifier for retrieving translated strings.
- * @return bool True when the textdomain is successfully loaded, false otherwise.
- */
-function _load_textdomain_just_in_time( $domain ) {
-	global $l10n_unloaded;
-
-	$l10n_unloaded = (array) $l10n_unloaded;
-
-	static $cached_mofiles = null;
-
-	// Short-circuit if domain is 'default' which is reserved for core.
-	if ( 'default' === $domain || isset( $l10n_unloaded[ $domain ] ) ) {
-		return false;
-	}
-
-	if ( null === $cached_mofiles ) {
-		$cached_mofiles = array();
-
-		$locations = array(
-			WP_LANG_DIR . '/plugins',
-			WP_LANG_DIR . '/themes',
-		);
-
-		foreach ( $locations as $location ) {
-			foreach ( get_available_languages( $location ) as $file ) {
-				$cached_mofiles[] = "{$location}/{$file}.mo";
-			}
-		}
-	}
-
-	$locale = get_locale();
-	$mofile = "{$domain}-{$locale}.mo";
-
-	if ( in_array( WP_LANG_DIR . '/plugins/' . $mofile, $cached_mofiles ) ) {
-		return load_textdomain( $domain, WP_LANG_DIR . '/plugins/' . $mofile );
-	}
-
-	if ( in_array( WP_LANG_DIR . '/themes/' . $mofile, $cached_mofiles ) ) {
-		return load_textdomain( $domain, WP_LANG_DIR . '/themes/' . $mofile );
-	}
-
-	return false;
-}
-
-/**
- * Return the Translations instance for a text domain.
- *
- * If there isn't one, returns empty Translations instance.
- *
- * @since 2.8.0
- *
- * @global array $l10n
- *
- * @param string $domain Text domain. Unique identifier for retrieving translated strings.
- * @return Translations|NOOP_Translations A Translations instance.
- */
-function get_translations_for_domain( $domain ) {
-	global $l10n;
-	if ( isset( $l10n[ $domain ] ) || ( _load_textdomain_just_in_time( $domain ) && isset( $l10n[ $domain ] ) ) ) {
-		return $l10n[ $domain ];
-	}
-
-	static $noop_translations = null;
-	if ( null === $noop_translations ) {
-		$noop_translations = new NOOP_Translations;
-	}
-
-	return $noop_translations;
-}
-
-/**
- * Whether there are translations for the text domain.
- *
- * @since 3.0.0
- *
- * @global array $l10n
- *
- * @param string $domain Text domain. Unique identifier for retrieving translated strings.
- * @return bool Whether there are translations.
- */
-function is_textdomain_loaded( $domain ) {
-	global $l10n;
-	return isset( $l10n[ $domain ] );
-}
-
-/**
- * Translates role name.
- *
- * Since the role names are in the database and not in the source there
- * are dummy gettext calls to get them into the POT file and this function
- * properly translates them back.
- *
- * The before_last_bar() call is needed, because older installs keep the roles
- * using the old context format: 'Role name|User role' and just skipping the
- * content after the last bar is easier than fixing them in the DB. New installs
- * won't suffer from that problem.
- *
- * @since 2.8.0
- *
- * @param string $name The role name.
- * @return string Translated role name on success, original name on failure.
- */
-function translate_user_role( $name ) {
-	return translate_with_gettext_context( before_last_bar($name), 'User role' );
-}
-
-/**
- * Get all available languages based on the presence of *.mo files in a given directory.
- *
- * The default directory is WP_LANG_DIR.
- *
- * @since 3.0.0
- *
- * @param string $dir A directory to search for language files.
- *                    Default WP_LANG_DIR.
- * @return array An array of language codes or an empty array if no languages are present. Language codes are formed by stripping the .mo extension from the language file names.
- */
-function get_available_languages( $dir = null ) {
-	$languages = array();
-
-	$lang_files = glob( ( is_null( $dir) ? WP_LANG_DIR : $dir ) . '/*.mo' );
-	if ( $lang_files ) {
-		foreach ( $lang_files as $lang_file ) {
-			$lang_file = basename( $lang_file, '.mo' );
-			if ( 0 !== strpos( $lang_file, 'continents-cities' ) && 0 !== strpos( $lang_file, 'ms-' ) &&
-				0 !== strpos( $lang_file, 'admin-' ) ) {
-				$languages[] = $lang_file;
-			}
-		}
-	}
-
-	return $languages;
-}
-
-/**
- * Get installed translations.
- *
- * Looks in the wp-content/languages directory for translations of
- * plugins or themes.
- *
- * @since 3.7.0
- *
- * @param string $type What to search for. Accepts 'plugins', 'themes', 'core'.
- * @return array Array of language data.
- */
-function wp_get_installed_translations( $type ) {
-	if ( $type !== 'themes' && $type !== 'plugins' && $type !== 'core' )
-		return array();
-
-	$dir = 'core' === $type ? '' : "/$type";
-
-	if ( ! is_dir( WP_LANG_DIR ) )
-		return array();
-
-	if ( $dir && ! is_dir( WP_LANG_DIR . $dir ) )
-		return array();
-
-	$files = scandir( WP_LANG_DIR . $dir );
-	if ( ! $files )
-		return array();
-
-	$language_data = array();
-
-	foreach ( $files as $file ) {
-		if ( '.' === $file[0] || is_dir( WP_LANG_DIR . "$dir/$file" ) ) {
-			continue;
-		}
-		if ( substr( $file, -3 ) !== '.po' ) {
-			continue;
-		}
-		if ( ! preg_match( '/(?:(.+)-)?([a-z]{2,3}(?:_[A-Z]{2})?(?:_[a-z0-9]+)?).po/', $file, $match ) ) {
-			continue;
-		}
-		if ( ! in_array( substr( $file, 0, -3 ) . '.mo', $files ) )  {
-			continue;
-		}
-
-		list( , $textdomain, $language ) = $match;
-		if ( '' === $textdomain ) {
-			$textdomain = 'default';
-		}
-		$language_data[ $textdomain ][ $language ] = wp_get_pomo_file_data( WP_LANG_DIR . "$dir/$file" );
-	}
-	return $language_data;
-}
-
-/**
- * Extract headers from a PO file.
- *
- * @since 3.7.0
- *
- * @param string $po_file Path to PO file.
- * @return array PO file headers.
- */
-function wp_get_pomo_file_data( $po_file ) {
-	$headers = get_file_data( $po_file, array(
-		'POT-Creation-Date'  => '"POT-Creation-Date',
-		'PO-Revision-Date'   => '"PO-Revision-Date',
-		'Project-Id-Version' => '"Project-Id-Version',
-		'X-Generator'        => '"X-Generator',
-	) );
-	foreach ( $headers as $header => $value ) {
-		// Remove possible contextual '\n' and closing double quote.
-		$headers[ $header ] = preg_replace( '~(\\\n)?"$~', '', $value );
-	}
-	return $headers;
-}
-
-/**
- * Language selector.
- *
- * @since 4.0.0
- * @since 4.3.0 Introduced the `echo` argument.
- *
- * @see get_available_languages()
- * @see wp_get_available_translations()
- *
- * @param string|array $args {
- *     Optional. Array or string of arguments for outputting the language selector.
- *
- *     @type string   $id                           ID attribute of the select element. Default empty.
- *     @type string   $name                         Name attribute of the select element. Default empty.
- *     @type array    $languages                    List of installed languages, contain only the locales.
- *                                                  Default empty array.
- *     @type array    $translations                 List of available translations. Default result of
- *                                                  wp_get_available_translations().
- *     @type string   $selected                     Language which should be selected. Default empty.
- *     @type bool|int $echo                         Whether to echo the generated markup. Accepts 0, 1, or their
- *                                                  boolean equivalents. Default 1.
- *     @type bool     $show_available_translations  Whether to show available translations. Default true.
- * }
- * @return string HTML content
- */
-function wp_dropdown_languages( $args = array() ) {
-
-	$args = wp_parse_args( $args, array(
-		'id'           => '',
-		'name'         => '',
-		'languages'    => array(),
-		'translations' => array(),
-		'selected'     => '',
-		'echo'         => 1,
-		'show_available_translations' => true,
-	) );
-
-	$translations = $args['translations'];
-	if ( empty( $translations ) ) {
-		require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
-		$translations = wp_get_available_translations();
-	}
-
-	/*
-	 * $args['languages'] should only contain the locales. Find the locale in
-	 * $translations to get the native name. Fall back to locale.
-	 */
-	$languages = array();
-	foreach ( $args['languages'] as $locale ) {
-		if ( isset( $translations[ $locale ] ) ) {
-			$translation = $translations[ $locale ];
-			$languages[] = array(
-				'language'    => $translation['language'],
-				'native_name' => $translation['native_name'],
-				'lang'        => current( $translation['iso'] ),
-			);
-
-			// Remove installed language from available translations.
-			unset( $translations[ $locale ] );
-		} else {
-			$languages[] = array(
-				'language'    => $locale,
-				'native_name' => $locale,
-				'lang'        => '',
-			);
-		}
-	}
-
-	$translations_available = ( ! empty( $translations ) && $args['show_available_translations'] );
-
-	$output = sprintf( '<select name="%s" id="%s">', esc_attr( $args['name'] ), esc_attr( $args['id'] ) );
-
-	// Holds the HTML markup.
-	$structure = array();
-
-	// List installed languages.
-	if ( $translations_available ) {
-		$structure[] = '<optgroup label="' . esc_attr_x( 'Installed', 'translations' ) . '">';
-	}
-	$structure[] = '<option value="" lang="en" data-installed="1">English (United States)</option>';
-	foreach ( $languages as $language ) {
-		$structure[] = sprintf(
-			'<option value="%s" lang="%s"%s data-installed="1">%s</option>',
-			esc_attr( $language['language'] ),
-			esc_attr( $language['lang'] ),
-			selected( $language['language'], $args['selected'], false ),
-			esc_html( $language['native_name'] )
-		);
-	}
-	if ( $translations_available ) {
-		$structure[] = '</optgroup>';
-	}
-
-	// List available translations.
-	if ( $translations_available ) {
-		$structure[] = '<optgroup label="' . esc_attr_x( 'Available', 'translations' ) . '">';
-		foreach ( $translations as $translation ) {
-			$structure[] = sprintf(
-				'<option value="%s" lang="%s"%s>%s</option>',
-				esc_attr( $translation['language'] ),
-				esc_attr( current( $translation['iso'] ) ),
-				selected( $translation['language'], $args['selected'], false ),
-				esc_html( $translation['native_name'] )
-			);
-		}
-		$structure[] = '</optgroup>';
-	}
-
-	$output .= join( "\n", $structure );
-
-	$output .= '</select>';
-
-	if ( $args['echo'] ) {
-		echo $output;
-	}
-
-	return $output;
-}
-
-/**
- * Checks if current locale is RTL.
- *
- * @since 3.0.0
- *
- * @global WP_Locale $wp_locale
- *
- * @return bool Whether locale is RTL.
- */
-function is_rtl() {
-	global $wp_locale;
-	if ( ! ( $wp_locale instanceof WP_Locale ) ) {
-		return false;
-	}
-	return $wp_locale->is_rtl();
-}
\ No newline at end of file
Index: www/wp-admin/includes/class-wp-site-icon.php
===================================================================
--- www/wp-admin/includes/class-wp-site-icon.php	(revision 38565)
+++ www/wp-admin/autoload/appearance/WP_Site_Icon.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/ID3/module.audio.flac.php
===================================================================
--- www/wp-includes/ID3/module.audio.flac.php	(revision 38565)
+++ www/wp-includes/autoload/id3/getid3_flac.php	(revision )
@@ -14,9 +14,6 @@
 //                                                            ///
 /////////////////////////////////////////////////////////////////
 
-
-getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.ogg.php', __FILE__, true);
-
 /**
 * @tutorial http://flac.sourceforge.net/format.html
 */
Index: www/wp-includes/autoload/requests/Exception/HTTP/504.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/504.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/504.php	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-<?php
-/**
- * Exception for 504 Gateway Timeout responses
- *
- * @package Requests
- */
-
-/**
- * Exception for 504 Gateway Timeout responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_504 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 504;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Gateway Timeout';
-}
\ No newline at end of file
Index: www/wp-admin/includes/class-wp-links-list-table.php
===================================================================
--- www/wp-admin/includes/class-wp-links-list-table.php	(revision 38565)
+++ www/wp-admin/autoload/list-table/WP_Links_List_Table.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/feed/wp_atom_server.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/feed/wp_atom_server.php	(revision )
+++ www/wp-includes/autoload/feed/wp_atom_server.php	(revision )
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * WordPress AtomPub API implementation.
+ *
+ * Originally stored in wp-app.php, and later wp-includes/class-wp-atom-server.php.
+ * It is kept here in case a plugin directly referred to the class.
+ *
+ * @since 2.2.0
+ * @deprecated 3.5.0
+ *
+ * @link https://wordpress.org/plugins/atom-publishing-protocol/
+ */
+class wp_atom_server {
+	public function __call( $name, $arguments ) {
+		_deprecated_function( __CLASS__ . '::' . $name, '3.5.0', 'the Atom Publishing Protocol plugin' );
+	}
+
+	public static function __callStatic( $name, $arguments ) {
+		_deprecated_function( __CLASS__ . '::' . $name, '3.5.0', 'the Atom Publishing Protocol plugin' );
+	}
+}
Index: www/wp-includes/widgets/class-wp-nav-menu-widget.php
===================================================================
--- www/wp-includes/widgets/class-wp-nav-menu-widget.php	(revision 38565)
+++ www/wp-includes/autoload/widgets/WP_Nav_Menu_Widget.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/admin-bar.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/admin-bar.php	(revision 38565)
+++ www/wp-includes/admin-bar.php	(revision 38565)
@@ -1,961 +0,0 @@
-<?php
-/**
- * Toolbar API: Top-level Toolbar functionality
- *
- * @package WordPress
- * @subpackage Toolbar
- * @since 3.1.0
- */
-
-/**
- * Instantiate the admin bar object and set it up as a global for access elsewhere.
- *
- * UNHOOKING THIS FUNCTION WILL NOT PROPERLY REMOVE THE ADMIN BAR.
- * For that, use show_admin_bar(false) or the {@see 'show_admin_bar'} filter.
- *
- * @since 3.1.0
- * @access private
- *
- * @global WP_Admin_Bar $wp_admin_bar
- *
- * @return bool Whether the admin bar was successfully initialized.
- */
-function _wp_admin_bar_init() {
-	global $wp_admin_bar;
-
-	if ( ! is_admin_bar_showing() )
-		return false;
-
-	/* Load the admin bar class code ready for instantiation */
-	require_once( ABSPATH . WPINC . '/class-wp-admin-bar.php' );
-
-	/* Instantiate the admin bar */
-
-	/**
-	 * Filters the admin bar class to instantiate.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param string $wp_admin_bar_class Admin bar class to use. Default 'WP_Admin_Bar'.
-	 */
-	$admin_bar_class = apply_filters( 'wp_admin_bar_class', 'WP_Admin_Bar' );
-	if ( class_exists( $admin_bar_class ) )
-		$wp_admin_bar = new $admin_bar_class;
-	else
-		return false;
-
-	$wp_admin_bar->initialize();
-	$wp_admin_bar->add_menus();
-
-	return true;
-}
-
-/**
- * Renders the admin bar to the page based on the $wp_admin_bar->menu member var.
- *
- * This is called very late on the footer actions so that it will render after
- * anything else being added to the footer.
- *
- * It includes the {@see 'admin_bar_menu'} action which should be used to hook in and
- * add new menus to the admin bar. That way you can be sure that you are adding at most
- * optimal point, right before the admin bar is rendered. This also gives you access to
- * the `$post` global, among others.
- *
- * @since 3.1.0
- *
- * @global WP_Admin_Bar $wp_admin_bar
- */
-function wp_admin_bar_render() {
-	global $wp_admin_bar;
-
-	if ( ! is_admin_bar_showing() || ! is_object( $wp_admin_bar ) )
-		return;
-
-	/**
-	 * Load all necessary admin bar items.
-	 *
-	 * This is the hook used to add, remove, or manipulate admin bar items.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param WP_Admin_Bar $wp_admin_bar WP_Admin_Bar instance, passed by reference
-	 */
-	do_action_ref_array( 'admin_bar_menu', array( &$wp_admin_bar ) );
-
-	/**
-	 * Fires before the admin bar is rendered.
-	 *
-	 * @since 3.1.0
-	 */
-	do_action( 'wp_before_admin_bar_render' );
-
-	$wp_admin_bar->render();
-
-	/**
-	 * Fires after the admin bar is rendered.
-	 *
-	 * @since 3.1.0
-	 */
-	do_action( 'wp_after_admin_bar_render' );
-}
-
-/**
- * Add the WordPress logo menu.
- *
- * @since 3.3.0
- *
- * @param WP_Admin_Bar $wp_admin_bar
- */
-function wp_admin_bar_wp_menu( $wp_admin_bar ) {
-	$wp_admin_bar->add_menu( array(
-		'id'    => 'wp-logo',
-		'title' => '<span class="ab-icon"></span><span class="screen-reader-text">' . __( 'About WordPress' ) . '</span>',
-		'href'  => self_admin_url( 'about.php' ),
-	) );
-
-	if ( is_user_logged_in() ) {
-		// Add "About WordPress" link
-		$wp_admin_bar->add_menu( array(
-			'parent' => 'wp-logo',
-			'id'     => 'about',
-			'title'  => __('About WordPress'),
-			'href'   => self_admin_url( 'about.php' ),
-		) );
-	}
-
-	// Add WordPress.org link
-	$wp_admin_bar->add_menu( array(
-		'parent'    => 'wp-logo-external',
-		'id'        => 'wporg',
-		'title'     => __('WordPress.org'),
-		'href'      => __('https://wordpress.org/'),
-	) );
-
-	// Add codex link
-	$wp_admin_bar->add_menu( array(
-		'parent'    => 'wp-logo-external',
-		'id'        => 'documentation',
-		'title'     => __('Documentation'),
-		'href'      => __('https://codex.wordpress.org/'),
-	) );
-
-	// Add forums link
-	$wp_admin_bar->add_menu( array(
-		'parent'    => 'wp-logo-external',
-		'id'        => 'support-forums',
-		'title'     => __('Support Forums'),
-		'href'      => __('https://wordpress.org/support/'),
-	) );
-
-	// Add feedback link
-	$wp_admin_bar->add_menu( array(
-		'parent'    => 'wp-logo-external',
-		'id'        => 'feedback',
-		'title'     => __('Feedback'),
-		'href'      => __('https://wordpress.org/support/forum/requests-and-feedback'),
-	) );
-}
-
-/**
- * Add the sidebar toggle button.
- *
- * @since 3.8.0
- *
- * @param WP_Admin_Bar $wp_admin_bar
- */
-function wp_admin_bar_sidebar_toggle( $wp_admin_bar ) {
-	if ( is_admin() ) {
-		$wp_admin_bar->add_menu( array(
-			'id'    => 'menu-toggle',
-			'title' => '<span class="ab-icon"></span><span class="screen-reader-text">' . __( 'Menu' ) . '</span>',
-			'href'  => '#',
-		) );
-	}
-}
-
-/**
- * Add the "My Account" item.
- *
- * @since 3.3.0
- *
- * @param WP_Admin_Bar $wp_admin_bar
- */
-function wp_admin_bar_my_account_item( $wp_admin_bar ) {
-	$user_id      = get_current_user_id();
-	$current_user = wp_get_current_user();
-
-	if ( ! $user_id )
-		return;
-
-	if ( current_user_can( 'read' ) ) {
-		$profile_url = get_edit_profile_url( $user_id );
-	} elseif ( is_multisite() ) {
-		$profile_url = get_dashboard_url( $user_id, 'profile.php' );
-	} else {
-		$profile_url = false;
-	}
-
-	$avatar = get_avatar( $user_id, 26 );
-	/* translators: %s: current user's display name */
-	$howdy  = sprintf( __( 'Howdy, %s' ), $current_user->display_name );
-	$class  = empty( $avatar ) ? '' : 'with-avatar';
-
-	$wp_admin_bar->add_menu( array(
-		'id'        => 'my-account',
-		'parent'    => 'top-secondary',
-		'title'     => $howdy . $avatar,
-		'href'      => $profile_url,
-		'meta'      => array(
-			'class'     => $class,
-		),
-	) );
-}
-
-/**
- * Add the "My Account" submenu items.
- *
- * @since 3.1.0
- *
- * @param WP_Admin_Bar $wp_admin_bar
- */
-function wp_admin_bar_my_account_menu( $wp_admin_bar ) {
-	$user_id      = get_current_user_id();
-	$current_user = wp_get_current_user();
-
-	if ( ! $user_id )
-		return;
-
-	if ( current_user_can( 'read' ) ) {
-		$profile_url = get_edit_profile_url( $user_id );
-	} elseif ( is_multisite() ) {
-		$profile_url = get_dashboard_url( $user_id, 'profile.php' );
-	} else {
-		$profile_url = false;
-	}
-
-	$wp_admin_bar->add_group( array(
-		'parent' => 'my-account',
-		'id'     => 'user-actions',
-	) );
-
-	$user_info  = get_avatar( $user_id, 64 );
-	$user_info .= "<span class='display-name'>{$current_user->display_name}</span>";
-
-	if ( $current_user->display_name !== $current_user->user_login )
-		$user_info .= "<span class='username'>{$current_user->user_login}</span>";
-
-	$wp_admin_bar->add_menu( array(
-		'parent' => 'user-actions',
-		'id'     => 'user-info',
-		'title'  => $user_info,
-		'href'   => $profile_url,
-		'meta'   => array(
-			'tabindex' => -1,
-		),
-	) );
-
-	if ( false !== $profile_url ) {
-		$wp_admin_bar->add_menu( array(
-			'parent' => 'user-actions',
-			'id'     => 'edit-profile',
-			'title'  => __( 'Edit My Profile' ),
-			'href'   => $profile_url,
-		) );
-	}
-
-	$wp_admin_bar->add_menu( array(
-		'parent' => 'user-actions',
-		'id'     => 'logout',
-		'title'  => __( 'Log Out' ),
-		'href'   => wp_logout_url(),
-	) );
-}
-
-/**
- * Add the "Site Name" menu.
- *
- * @since 3.3.0
- *
- * @param WP_Admin_Bar $wp_admin_bar
- */
-function wp_admin_bar_site_menu( $wp_admin_bar ) {
-	// Don't show for logged out users.
-	if ( ! is_user_logged_in() )
-		return;
-
-	// Show only when the user is a member of this site, or they're a super admin.
-	if ( ! is_user_member_of_blog() && ! is_super_admin() )
-		return;
-
-	$blogname = get_bloginfo('name');
-
-	if ( ! $blogname ) {
-		$blogname = preg_replace( '#^(https?://)?(www.)?#', '', get_home_url() );
-	}
-
-	if ( is_network_admin() ) {
-		/* translators: %s: site name */ 
-		$blogname = sprintf( __( 'Network Admin: %s' ), esc_html( get_current_site()->site_name ) );
-	} elseif ( is_user_admin() ) {
-		/* translators: %s: site name */ 
-		$blogname = sprintf( __( 'User Dashboard: %s' ), esc_html( get_current_site()->site_name ) );
-	}
-
-	$title = wp_html_excerpt( $blogname, 40, '&hellip;' );
-
-	$wp_admin_bar->add_menu( array(
-		'id'    => 'site-name',
-		'title' => $title,
-		'href'  => ( is_admin() || ! current_user_can( 'read' ) ) ? home_url( '/' ) : admin_url(),
-	) );
-
-	// Create submenu items.
-
-	if ( is_admin() ) {
-		// Add an option to visit the site.
-		$wp_admin_bar->add_menu( array(
-			'parent' => 'site-name',
-			'id'     => 'view-site',
-			'title'  => __( 'Visit Site' ),
-			'href'   => home_url( '/' ),
-		) );
-
-		if ( is_blog_admin() && is_multisite() && current_user_can( 'manage_sites' ) ) {
-			$wp_admin_bar->add_menu( array(
-				'parent' => 'site-name',
-				'id'     => 'edit-site',
-				'title'  => __( 'Edit Site' ),
-				'href'   => network_admin_url( 'site-info.php?id=' . get_current_blog_id() ),
-			) );
-		}
-
-	} else if ( current_user_can( 'read' ) ) {
-		// We're on the front end, link to the Dashboard.
-		$wp_admin_bar->add_menu( array(
-			'parent' => 'site-name',
-			'id'     => 'dashboard',
-			'title'  => __( 'Dashboard' ),
-			'href'   => admin_url(),
-		) );
-
-		// Add the appearance submenu items.
-		wp_admin_bar_appearance_menu( $wp_admin_bar );
-	}
-}
-
-/**
- * Adds the "Customize" link to the Toolbar.
- *
- * @since 4.3.0
- *
- * @param WP_Admin_Bar $wp_admin_bar WP_Admin_Bar instance.
- */
-function wp_admin_bar_customize_menu( $wp_admin_bar ) {
-	// Don't show for users who can't access the customizer or when in the admin.
-	if ( ! current_user_can( 'customize' ) || is_admin() ) {
-		return;
-	}
-
-	$current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
-	$customize_url = add_query_arg( 'url', urlencode( $current_url ), wp_customize_url() );
-
-	$wp_admin_bar->add_menu( array(
-		'id'     => 'customize',
-		'title'  => __( 'Customize' ),
-		'href'   => $customize_url,
-		'meta'   => array(
-			'class' => 'hide-if-no-customize',
-		),
-	) );
-	add_action( 'wp_before_admin_bar_render', 'wp_customize_support_script' );
-}
-
-/**
- * Add the "My Sites/[Site Name]" menu and all submenus.
- *
- * @since 3.1.0
- *
- * @param WP_Admin_Bar $wp_admin_bar
- */
-function wp_admin_bar_my_sites_menu( $wp_admin_bar ) {
-	// Don't show for logged out users or single site mode.
-	if ( ! is_user_logged_in() || ! is_multisite() )
-		return;
-
-	// Show only when the user has at least one site, or they're a super admin.
-	if ( count( $wp_admin_bar->user->blogs ) < 1 && ! is_super_admin() )
-		return;
-
-	if ( $wp_admin_bar->user->active_blog ) {
-		$my_sites_url = get_admin_url( $wp_admin_bar->user->active_blog->blog_id, 'my-sites.php' );
-	} else {
-		$my_sites_url = admin_url( 'my-sites.php' );
-	}
-
-	$wp_admin_bar->add_menu( array(
-		'id'    => 'my-sites',
-		'title' => __( 'My Sites' ),
-		'href'  => $my_sites_url,
-	) );
-
-	if ( is_super_admin() ) {
-		$wp_admin_bar->add_group( array(
-			'parent' => 'my-sites',
-			'id'     => 'my-sites-super-admin',
-		) );
-
-		$wp_admin_bar->add_menu( array(
-			'parent' => 'my-sites-super-admin',
-			'id'     => 'network-admin',
-			'title'  => __('Network Admin'),
-			'href'   => network_admin_url(),
-		) );
-
-		$wp_admin_bar->add_menu( array(
-			'parent' => 'network-admin',
-			'id'     => 'network-admin-d',
-			'title'  => __( 'Dashboard' ),
-			'href'   => network_admin_url(),
-		) );
-		$wp_admin_bar->add_menu( array(
-			'parent' => 'network-admin',
-			'id'     => 'network-admin-s',
-			'title'  => __( 'Sites' ),
-			'href'   => network_admin_url( 'sites.php' ),
-		) );
-		$wp_admin_bar->add_menu( array(
-			'parent' => 'network-admin',
-			'id'     => 'network-admin-u',
-			'title'  => __( 'Users' ),
-			'href'   => network_admin_url( 'users.php' ),
-		) );
-		$wp_admin_bar->add_menu( array(
-			'parent' => 'network-admin',
-			'id'     => 'network-admin-t',
-			'title'  => __( 'Themes' ),
-			'href'   => network_admin_url( 'themes.php' ),
-		) );
-		$wp_admin_bar->add_menu( array(
-			'parent' => 'network-admin',
-			'id'     => 'network-admin-p',
-			'title'  => __( 'Plugins' ),
-			'href'   => network_admin_url( 'plugins.php' ),
-		) );
-		$wp_admin_bar->add_menu( array(
-			'parent' => 'network-admin',
-			'id'     => 'network-admin-o',
-			'title'  => __( 'Settings' ),
-			'href'   => network_admin_url( 'settings.php' ),
-		) );
-	}
-
-	// Add site links
-	$wp_admin_bar->add_group( array(
-		'parent' => 'my-sites',
-		'id'     => 'my-sites-list',
-		'meta'   => array(
-			'class' => is_super_admin() ? 'ab-sub-secondary' : '',
-		),
-	) );
-
-	foreach ( (array) $wp_admin_bar->user->blogs as $blog ) {
-		switch_to_blog( $blog->userblog_id );
-
-		$blavatar = '<div class="blavatar"></div>';
-
-		$blogname = $blog->blogname;
-
-		if ( ! $blogname ) {
-			$blogname = preg_replace( '#^(https?://)?(www.)?#', '', get_home_url() );
-		}
-
-		$menu_id  = 'blog-' . $blog->userblog_id;
-
-		$wp_admin_bar->add_menu( array(
-			'parent'    => 'my-sites-list',
-			'id'        => $menu_id,
-			'title'     => $blavatar . $blogname,
-			'href'      => admin_url(),
-		) );
-
-		$wp_admin_bar->add_menu( array(
-			'parent' => $menu_id,
-			'id'     => $menu_id . '-d',
-			'title'  => __( 'Dashboard' ),
-			'href'   => admin_url(),
-		) );
-
-		if ( current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
-			$wp_admin_bar->add_menu( array(
-				'parent' => $menu_id,
-				'id'     => $menu_id . '-n',
-				'title'  => __( 'New Post' ),
-				'href'   => admin_url( 'post-new.php' ),
-			) );
-		}
-
-		if ( current_user_can( 'edit_posts' ) ) {
-			$wp_admin_bar->add_menu( array(
-				'parent' => $menu_id,
-				'id'     => $menu_id . '-c',
-				'title'  => __( 'Manage Comments' ),
-				'href'   => admin_url( 'edit-comments.php' ),
-			) );
-		}
-
-		$wp_admin_bar->add_menu( array(
-			'parent' => $menu_id,
-			'id'     => $menu_id . '-v',
-			'title'  => __( 'Visit Site' ),
-			'href'   => home_url( '/' ),
-		) );
-
-		restore_current_blog();
-	}
-}
-
-/**
- * Provide a shortlink.
- *
- * @since 3.1.0
- *
- * @param WP_Admin_Bar $wp_admin_bar
- */
-function wp_admin_bar_shortlink_menu( $wp_admin_bar ) {
-	$short = wp_get_shortlink( 0, 'query' );
-	$id = 'get-shortlink';
-
-	if ( empty( $short ) )
-		return;
-
-	$html = '<input class="shortlink-input" type="text" readonly="readonly" value="' . esc_attr( $short ) . '" />';
-
-	$wp_admin_bar->add_menu( array(
-		'id' => $id,
-		'title' => __( 'Shortlink' ),
-		'href' => $short,
-		'meta' => array( 'html' => $html ),
-	) );
-}
-
-/**
- * Provide an edit link for posts and terms.
- *
- * @since 3.1.0
- *
- * @global WP_Term  $tag
- * @global WP_Query $wp_the_query
- *
- * @param WP_Admin_Bar $wp_admin_bar
- */
-function wp_admin_bar_edit_menu( $wp_admin_bar ) {
-	global $tag, $wp_the_query;
-
-	if ( is_admin() ) {
-		$current_screen = get_current_screen();
-		$post = get_post();
-
-		if ( 'post' == $current_screen->base
-			&& 'add' != $current_screen->action
-			&& ( $post_type_object = get_post_type_object( $post->post_type ) )
-			&& current_user_can( 'read_post', $post->ID )
-			&& ( $post_type_object->public )
-			&& ( $post_type_object->show_in_admin_bar ) )
-		{
-			if ( 'draft' == $post->post_status ) {
-				$preview_link = get_preview_post_link( $post );
-				$wp_admin_bar->add_menu( array(
-					'id' => 'preview',
-					'title' => $post_type_object->labels->view_item,
-					'href' => esc_url( $preview_link ),
-					'meta' => array( 'target' => 'wp-preview-' . $post->ID ),
-				) );
-			} else {
-				$wp_admin_bar->add_menu( array(
-					'id' => 'view',
-					'title' => $post_type_object->labels->view_item,
-					'href' => get_permalink( $post->ID )
-				) );
-			}
-		} elseif ( 'term' == $current_screen->base
-			&& isset( $tag ) && is_object( $tag ) && ! is_wp_error( $tag )
-			&& ( $tax = get_taxonomy( $tag->taxonomy ) )
-			&& $tax->public )
-		{
-			$wp_admin_bar->add_menu( array(
-				'id' => 'view',
-				'title' => $tax->labels->view_item,
-				'href' => get_term_link( $tag )
-			) );
-		}
-	} else {
-		$current_object = $wp_the_query->get_queried_object();
-
-		if ( empty( $current_object ) )
-			return;
-
-		if ( ! empty( $current_object->post_type )
-			&& ( $post_type_object = get_post_type_object( $current_object->post_type ) )
-			&& current_user_can( 'edit_post', $current_object->ID )
-			&& $post_type_object->show_in_admin_bar
-			&& $edit_post_link = get_edit_post_link( $current_object->ID ) )
-		{
-			$wp_admin_bar->add_menu( array(
-				'id' => 'edit',
-				'title' => $post_type_object->labels->edit_item,
-				'href' => $edit_post_link
-			) );
-		} elseif ( ! empty( $current_object->taxonomy )
-			&& ( $tax = get_taxonomy( $current_object->taxonomy ) )
-			&& current_user_can( $tax->cap->edit_terms )
-			&& $edit_term_link = get_edit_term_link( $current_object->term_id, $current_object->taxonomy ) )
-		{
-			$wp_admin_bar->add_menu( array(
-				'id' => 'edit',
-				'title' => $tax->labels->edit_item,
-				'href' => $edit_term_link
-			) );
-		}
-	}
-}
-
-/**
- * Add "Add New" menu.
- *
- * @since 3.1.0
- *
- * @param WP_Admin_Bar $wp_admin_bar
- */
-function wp_admin_bar_new_content_menu( $wp_admin_bar ) {
-	$actions = array();
-
-	$cpts = (array) get_post_types( array( 'show_in_admin_bar' => true ), 'objects' );
-
-	if ( isset( $cpts['post'] ) && current_user_can( $cpts['post']->cap->create_posts ) )
-		$actions[ 'post-new.php' ] = array( $cpts['post']->labels->name_admin_bar, 'new-post' );
-
-	if ( isset( $cpts['attachment'] ) && current_user_can( 'upload_files' ) )
-		$actions[ 'media-new.php' ] = array( $cpts['attachment']->labels->name_admin_bar, 'new-media' );
-
-	if ( current_user_can( 'manage_links' ) )
-		$actions[ 'link-add.php' ] = array( _x( 'Link', 'add new from admin bar' ), 'new-link' );
-
-	if ( isset( $cpts['page'] ) && current_user_can( $cpts['page']->cap->create_posts ) )
-		$actions[ 'post-new.php?post_type=page' ] = array( $cpts['page']->labels->name_admin_bar, 'new-page' );
-
-	unset( $cpts['post'], $cpts['page'], $cpts['attachment'] );
-
-	// Add any additional custom post types.
-	foreach ( $cpts as $cpt ) {
-		if ( ! current_user_can( $cpt->cap->create_posts ) )
-			continue;
-
-		$key = 'post-new.php?post_type=' . $cpt->name;
-		$actions[ $key ] = array( $cpt->labels->name_admin_bar, 'new-' . $cpt->name );
-	}
-	// Avoid clash with parent node and a 'content' post type.
-	if ( isset( $actions['post-new.php?post_type=content'] ) )
-		$actions['post-new.php?post_type=content'][1] = 'add-new-content';
-
-	if ( current_user_can( 'create_users' ) || current_user_can( 'promote_users' ) )
-		$actions[ 'user-new.php' ] = array( _x( 'User', 'add new from admin bar' ), 'new-user' );
-
-	if ( ! $actions )
-		return;
-
-	$title = '<span class="ab-icon"></span><span class="ab-label">' . _x( 'New', 'admin bar menu group label' ) . '</span>';
-
-	$wp_admin_bar->add_menu( array(
-		'id'    => 'new-content',
-		'title' => $title,
-		'href'  => admin_url( current( array_keys( $actions ) ) ),
-	) );
-
-	foreach ( $actions as $link => $action ) {
-		list( $title, $id ) = $action;
-
-		$wp_admin_bar->add_menu( array(
-			'parent'    => 'new-content',
-			'id'        => $id,
-			'title'     => $title,
-			'href'      => admin_url( $link )
-		) );
-	}
-}
-
-/**
- * Add edit comments link with awaiting moderation count bubble.
- *
- * @since 3.1.0
- *
- * @param WP_Admin_Bar $wp_admin_bar
- */
-function wp_admin_bar_comments_menu( $wp_admin_bar ) {
-	if ( !current_user_can('edit_posts') )
-		return;
-
-	$awaiting_mod = wp_count_comments();
-	$awaiting_mod = $awaiting_mod->moderated;
-	$awaiting_text = sprintf( _n( '%s comment awaiting moderation', '%s comments awaiting moderation', $awaiting_mod ), number_format_i18n( $awaiting_mod ) );
-
-	$icon  = '<span class="ab-icon"></span>';
-	$title = '<span id="ab-awaiting-mod" class="ab-label awaiting-mod pending-count count-' . $awaiting_mod . '" aria-hidden="true">' . number_format_i18n( $awaiting_mod ) . '</span>';
-	$title .= '<span class="screen-reader-text">' . $awaiting_text . '</span>';
-
-	$wp_admin_bar->add_menu( array(
-		'id'    => 'comments',
-		'title' => $icon . $title,
-		'href'  => admin_url('edit-comments.php'),
-	) );
-}
-
-/**
- * Add appearance submenu items to the "Site Name" menu.
- *
- * @since 3.1.0
- *
- * @param WP_Admin_Bar $wp_admin_bar
- */
-function wp_admin_bar_appearance_menu( $wp_admin_bar ) {
-	$wp_admin_bar->add_group( array( 'parent' => 'site-name', 'id' => 'appearance' ) );
-
-	if ( current_user_can( 'switch_themes' ) ) {
-		$wp_admin_bar->add_menu( array(
-			'parent' => 'appearance',
-			'id'     => 'themes',
-			'title'  => __( 'Themes' ),
-			'href'   => admin_url( 'themes.php' ),
-		) );
-	}
-
-	if ( ! current_user_can( 'edit_theme_options' ) ) {
-		return;
-	}
-
-	if ( current_theme_supports( 'widgets' )  ) {
-		$wp_admin_bar->add_menu( array(
-			'parent' => 'appearance',
-			'id'     => 'widgets',
-			'title'  => __( 'Widgets' ),
-			'href'   => admin_url( 'widgets.php' ),
-		) );
-	}
-
-	if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) )
-		$wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'menus', 'title' => __('Menus'), 'href' => admin_url('nav-menus.php') ) );
-
-	if ( current_theme_supports( 'custom-background' ) ) {
-		$wp_admin_bar->add_menu( array(
-			'parent' => 'appearance',
-			'id'     => 'background',
-			'title'  => __( 'Background' ),
-			'href'   => admin_url( 'themes.php?page=custom-background' ),
-			'meta'   => array(
-				'class' => 'hide-if-customize',
-			),
-		) );
-	}
-
-	if ( current_theme_supports( 'custom-header' ) ) {
-		$wp_admin_bar->add_menu( array(
-			'parent' => 'appearance',
-			'id'     => 'header',
-			'title'  => __( 'Header' ),
-			'href'   => admin_url( 'themes.php?page=custom-header' ),
-			'meta'   => array(
-				'class' => 'hide-if-customize',
-			),
-		) );
-	}
-
-}
-
-/**
- * Provide an update link if theme/plugin/core updates are available.
- *
- * @since 3.1.0
- *
- * @param WP_Admin_Bar $wp_admin_bar
- */
-function wp_admin_bar_updates_menu( $wp_admin_bar ) {
-
-	$update_data = wp_get_update_data();
-
-	if ( !$update_data['counts']['total'] )
-		return;
-
-	$title = '<span class="ab-icon"></span><span class="ab-label">' . number_format_i18n( $update_data['counts']['total'] ) . '</span>';
-	$title .= '<span class="screen-reader-text">' . $update_data['title'] . '</span>';
-
-	$wp_admin_bar->add_menu( array(
-		'id'    => 'updates',
-		'title' => $title,
-		'href'  => network_admin_url( 'update-core.php' ),
-		'meta'  => array(
-			'title' => $update_data['title'],
-		),
-	) );
-}
-
-/**
- * Add search form.
- *
- * @since 3.3.0
- *
- * @param WP_Admin_Bar $wp_admin_bar
- */
-function wp_admin_bar_search_menu( $wp_admin_bar ) {
-	if ( is_admin() )
-		return;
-
-	$form  = '<form action="' . esc_url( home_url( '/' ) ) . '" method="get" id="adminbarsearch">';
-	$form .= '<input class="adminbar-input" name="s" id="adminbar-search" type="text" value="" maxlength="150" />';
-	$form .= '<label for="adminbar-search" class="screen-reader-text">' . __( 'Search' ) . '</label>';
-	$form .= '<input type="submit" class="adminbar-button" value="' . __('Search') . '"/>';
-	$form .= '</form>';
-
-	$wp_admin_bar->add_menu( array(
-		'parent' => 'top-secondary',
-		'id'     => 'search',
-		'title'  => $form,
-		'meta'   => array(
-			'class'    => 'admin-bar-search',
-			'tabindex' => -1,
-		)
-	) );
-}
-
-/**
- * Add secondary menus.
- *
- * @since 3.3.0
- *
- * @param WP_Admin_Bar $wp_admin_bar
- */
-function wp_admin_bar_add_secondary_groups( $wp_admin_bar ) {
-	$wp_admin_bar->add_group( array(
-		'id'     => 'top-secondary',
-		'meta'   => array(
-			'class' => 'ab-top-secondary',
-		),
-	) );
-
-	$wp_admin_bar->add_group( array(
-		'parent' => 'wp-logo',
-		'id'     => 'wp-logo-external',
-		'meta'   => array(
-			'class' => 'ab-sub-secondary',
-		),
-	) );
-}
-
-/**
- * Style and scripts for the admin bar.
- *
- * @since 3.1.0
- */
-function wp_admin_bar_header() { ?>
-<style type="text/css" media="print">#wpadminbar { display:none; }</style>
-<?php
-}
-
-/**
- * Default admin bar callback.
- *
- * @since 3.1.0
- */
-function _admin_bar_bump_cb() { ?>
-<style type="text/css" media="screen">
-	html { margin-top: 32px !important; }
-	* html body { margin-top: 32px !important; }
-	@media screen and ( max-width: 782px ) {
-		html { margin-top: 46px !important; }
-		* html body { margin-top: 46px !important; }
-	}
-</style>
-<?php
-}
-
-/**
- * Sets the display status of the admin bar.
- *
- * This can be called immediately upon plugin load. It does not need to be called
- * from a function hooked to the {@see 'init'} action.
- *
- * @since 3.1.0
- *
- * @global bool $show_admin_bar
- *
- * @param bool $show Whether to allow the admin bar to show.
- */
-function show_admin_bar( $show ) {
-	global $show_admin_bar;
-	$show_admin_bar = (bool) $show;
-}
-
-/**
- * Determine whether the admin bar should be showing.
- *
- * @since 3.1.0
- *
- * @global bool   $show_admin_bar
- * @global string $pagenow
- *
- * @return bool Whether the admin bar should be showing.
- */
-function is_admin_bar_showing() {
-	global $show_admin_bar, $pagenow;
-
-	// For all these types of requests, we never want an admin bar.
-	if ( defined('XMLRPC_REQUEST') || defined('DOING_AJAX') || defined('IFRAME_REQUEST') )
-		return false;
-
-	if ( is_embed() ) {
-		return false;
-	}
-
-	// Integrated into the admin.
-	if ( is_admin() )
-		return true;
-
-	if ( ! isset( $show_admin_bar ) ) {
-		if ( ! is_user_logged_in() || 'wp-login.php' == $pagenow ) {
-			$show_admin_bar = false;
-		} else {
-			$show_admin_bar = _get_admin_bar_pref();
-		}
-	}
-
-	/**
-	 * Filters whether to show the admin bar.
-	 *
-	 * Returning false to this hook is the recommended way to hide the admin bar.
-	 * The user's display preference is used for logged in users.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param bool $show_admin_bar Whether the admin bar should be shown. Default false.
-	 */
-	$show_admin_bar = apply_filters( 'show_admin_bar', $show_admin_bar );
-
-	return $show_admin_bar;
-}
-
-/**
- * Retrieve the admin bar display preference of a user.
- *
- * @since 3.1.0
- * @access private
- *
- * @param string $context Context of this preference check. Defaults to 'front'. The 'admin'
- * 	preference is no longer used.
- * @param int $user Optional. ID of the user to check, defaults to 0 for current user.
- * @return bool Whether the admin bar should be showing for this user.
- */
-function _get_admin_bar_pref( $context = 'front', $user = 0 ) {
-	$pref = get_user_option( "show_admin_bar_{$context}", $user );
-	if ( false === $pref )
-		return true;
-
-	return 'true' === $pref;
-}
Index: www/wp-includes/post-thumbnail-template.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/post-thumbnail-template.php	(revision 38565)
+++ www/wp-includes/post-thumbnail-template.php	(revision 38565)
@@ -1,253 +0,0 @@
-<?php
-/**
- * WordPress Post Thumbnail Template Functions.
- *
- * Support for post thumbnails.
- * Theme's functions.php must call add_theme_support( 'post-thumbnails' ) to use these.
- *
- * @package WordPress
- * @subpackage Template
- */
-
-/**
- * Check if post has an image attached.
- *
- * @since 2.9.0
- * @since 4.4.0 `$post` can be a post ID or WP_Post object.
- *
- * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`.
- * @return bool Whether the post has an image attached.
- */
-function has_post_thumbnail( $post = null ) {
-	return (bool) get_post_thumbnail_id( $post );
-}
-
-/**
- * Retrieve post thumbnail ID.
- *
- * @since 2.9.0
- * @since 4.4.0 `$post` can be a post ID or WP_Post object.
- *
- * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`.
- * @return string|int Post thumbnail ID or empty string.
- */
-function get_post_thumbnail_id( $post = null ) {
-	$post = get_post( $post );
-	if ( ! $post ) {
-		return '';
-	}
-	return get_post_meta( $post->ID, '_thumbnail_id', true );
-}
-
-/**
- * Display the post thumbnail.
- *
- * When a theme adds 'post-thumbnail' support, a special 'post-thumbnail' image size
- * is registered, which differs from the 'thumbnail' image size managed via the
- * Settings > Media screen.
- *
- * When using the_post_thumbnail() or related functions, the 'post-thumbnail' image
- * size is used by default, though a different size can be specified instead as needed.
- *
- * @since 2.9.0
- *
- * @see get_the_post_thumbnail()
- *
- * @param string|array $size Optional. Image size to use. Accepts any valid image size, or
- *                           an array of width and height values in pixels (in that order).
- *                           Default 'post-thumbnail'.
- * @param string|array $attr Optional. Query string or array of attributes. Default empty.
- */
-function the_post_thumbnail( $size = 'post-thumbnail', $attr = '' ) {
-	echo get_the_post_thumbnail( null, $size, $attr );
-}
-
-/**
- * Update cache for thumbnails in the current loop.
- *
- * @since 3.2.0
- *
- * @global WP_Query $wp_query
- *
- * @param WP_Query $wp_query Optional. A WP_Query instance. Defaults to the $wp_query global.
- */
-function update_post_thumbnail_cache( $wp_query = null ) {
-	if ( ! $wp_query )
-		$wp_query = $GLOBALS['wp_query'];
-
-	if ( $wp_query->thumbnails_cached )
-		return;
-
-	$thumb_ids = array();
-	foreach ( $wp_query->posts as $post ) {
-		if ( $id = get_post_thumbnail_id( $post->ID ) )
-			$thumb_ids[] = $id;
-	}
-
-	if ( ! empty ( $thumb_ids ) ) {
-		_prime_post_caches( $thumb_ids, false, true );
-	}
-
-	$wp_query->thumbnails_cached = true;
-}
-
-/**
- * Retrieve the post thumbnail.
- *
- * When a theme adds 'post-thumbnail' support, a special 'post-thumbnail' image size
- * is registered, which differs from the 'thumbnail' image size managed via the
- * Settings > Media screen.
- *
- * When using the_post_thumbnail() or related functions, the 'post-thumbnail' image
- * size is used by default, though a different size can be specified instead as needed.
- *
- * @since 2.9.0
- * @since 4.4.0 `$post` can be a post ID or WP_Post object.
- *
- * @param int|WP_Post  $post Optional. Post ID or WP_Post object.  Default is global `$post`.
- * @param string|array $size Optional. Image size to use. Accepts any valid image size, or
- *                           an array of width and height values in pixels (in that order).
- *                           Default 'post-thumbnail'.
- * @param string|array $attr Optional. Query string or array of attributes. Default empty.
- * @return string The post thumbnail image tag.
- */
-function get_the_post_thumbnail( $post = null, $size = 'post-thumbnail', $attr = '' ) {
-	$post = get_post( $post );
-	if ( ! $post ) {
-		return '';
-	}
-	$post_thumbnail_id = get_post_thumbnail_id( $post );
-
-	/**
-	 * Filters the post thumbnail size.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param string|array $size The post thumbnail size. Image size or array of width and height
-	 *                           values (in that order). Default 'post-thumbnail'.
-	 */
-	$size = apply_filters( 'post_thumbnail_size', $size );
-
-	if ( $post_thumbnail_id ) {
-
-		/**
-		 * Fires before fetching the post thumbnail HTML.
-		 *
-		 * Provides "just in time" filtering of all filters in wp_get_attachment_image().
-		 *
-		 * @since 2.9.0
-		 *
-		 * @param int          $post_id           The post ID.
-		 * @param string       $post_thumbnail_id The post thumbnail ID.
-		 * @param string|array $size              The post thumbnail size. Image size or array of width
-		 *                                        and height values (in that order). Default 'post-thumbnail'.
-		 */
-		do_action( 'begin_fetch_post_thumbnail_html', $post->ID, $post_thumbnail_id, $size );
-		if ( in_the_loop() )
-			update_post_thumbnail_cache();
-		$html = wp_get_attachment_image( $post_thumbnail_id, $size, false, $attr );
-
-		/**
-		 * Fires after fetching the post thumbnail HTML.
-		 *
-		 * @since 2.9.0
-		 *
-		 * @param int          $post_id           The post ID.
-		 * @param string       $post_thumbnail_id The post thumbnail ID.
-		 * @param string|array $size              The post thumbnail size. Image size or array of width
-		 *                                        and height values (in that order). Default 'post-thumbnail'.
-		 */
-		do_action( 'end_fetch_post_thumbnail_html', $post->ID, $post_thumbnail_id, $size );
-
-	} else {
-		$html = '';
-	}
-	/**
-	 * Filters the post thumbnail HTML.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param string       $html              The post thumbnail HTML.
-	 * @param int          $post_id           The post ID.
-	 * @param string       $post_thumbnail_id The post thumbnail ID.
-	 * @param string|array $size              The post thumbnail size. Image size or array of width and height
-	 *                                        values (in that order). Default 'post-thumbnail'.
-	 * @param string       $attr              Query string of attributes.
-	 */
-	return apply_filters( 'post_thumbnail_html', $html, $post->ID, $post_thumbnail_id, $size, $attr );
-}
-
-/**
- * Return the post thumbnail URL.
- *
- * @since 4.4.0
- *
- * @param int|WP_Post  $post Optional. Post ID or WP_Post object.  Default is global `$post`.
- * @param string|array $size Optional. Registered image size to retrieve the source for or a flat
- *                           array of height and width dimensions. Default 'post-thumbnail'.
- * @return string|false Post thumbnail URL or false if no URL is available.
- */
-function get_the_post_thumbnail_url( $post = null, $size = 'post-thumbnail' ) {
-	$post_thumbnail_id = get_post_thumbnail_id( $post );
-	if ( ! $post_thumbnail_id ) {
-		return false;
-	}
-	return wp_get_attachment_image_url( $post_thumbnail_id, $size );
-}
-
-/**
- * Display the post thumbnail URL.
- *
- * @since 4.4.0
- *
- * @param string|array $size Optional. Image size to use. Accepts any valid image size,
- *                           or an array of width and height values in pixels (in that order).
- *                           Default 'post-thumbnail'.
- */
-function the_post_thumbnail_url( $size = 'post-thumbnail' ) {
-	$url = get_the_post_thumbnail_url( null, $size );
-	if ( $url ) {
-		echo esc_url( $url );
-	}
-}
-
-/**
- * Returns the post thumbnail caption.
- *
- * @since 4.6.0
- *
- * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`.
- * @return string Post thumbnail caption.
- */
-function get_the_post_thumbnail_caption( $post = null ) {
-	$post_thumbnail_id = get_post_thumbnail_id( $post );
-	if ( ! $post_thumbnail_id ) {
-		return '';
-	}
-
-	$caption = wp_get_attachment_caption( $post_thumbnail_id );
-
-	if ( ! $caption ) {
-		$caption = '';
-	}
-
-	return $caption;
-}
-
-/**
- * Displays the post thumbnail caption.
- *
- * @since 4.6.0
- *
- * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`.
- */
-function the_post_thumbnail_caption( $post = null ) {
-	/**
-	 * Filters the displayed post thumbnail caption.
-	 *
-	 * @since 4.6.0
-	 *
-	 * @param string $caption Caption for the given attachment.
-	 */
-	echo apply_filters( 'the_post_thumbnail_caption', get_the_post_thumbnail_caption( $post ) );
-}
Index: www/wp-includes/class-wp-rewrite.php
===================================================================
--- www/wp-includes/class-wp-rewrite.php	(revision 38565)
+++ www/wp-includes/autoload/WP_Rewrite.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/query.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/query.php	(revision 38565)
+++ www/wp-includes/query.php	(revision 38565)
@@ -1,941 +0,0 @@
-<?php
-/**
- * WordPress Query API
- *
- * The query API attempts to get which part of WordPress the user is on. It
- * also provides functionality for getting URL query information.
- *
- * @link https://codex.wordpress.org/The_Loop More information on The Loop.
- *
- * @package WordPress
- * @subpackage Query
- */
-
-/**
- * Retrieve variable in the WP_Query class.
- *
- * @since 1.5.0
- * @since 3.9.0 The `$default` argument was introduced.
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @param string $var       The variable key to retrieve.
- * @param mixed  $default   Optional. Value to return if the query variable is not set. Default empty.
- * @return mixed Contents of the query variable.
- */
-function get_query_var( $var, $default = '' ) {
-	global $wp_query;
-	return $wp_query->get( $var, $default );
-}
-
-/**
- * Retrieve the currently-queried object.
- *
- * Wrapper for WP_Query::get_queried_object().
- *
- * @since 3.1.0
- * @access public
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return object Queried object.
- */
-function get_queried_object() {
-	global $wp_query;
-	return $wp_query->get_queried_object();
-}
-
-/**
- * Retrieve ID of the current queried object.
- *
- * Wrapper for WP_Query::get_queried_object_id().
- *
- * @since 3.1.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return int ID of the queried object.
- */
-function get_queried_object_id() {
-	global $wp_query;
-	return $wp_query->get_queried_object_id();
-}
-
-/**
- * Set query variable.
- *
- * @since 2.2.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @param string $var   Query variable key.
- * @param mixed  $value Query variable value.
- */
-function set_query_var( $var, $value ) {
-	global $wp_query;
-	$wp_query->set( $var, $value );
-}
-
-/**
- * Sets up The Loop with query parameters.
- *
- * Note: This function will completely override the main query and isn't intended for use
- * by plugins or themes. Its overly-simplistic approach to modifying the main query can be
- * problematic and should be avoided wherever possible. In most cases, there are better,
- * more performant options for modifying the main query such as via the {@see 'pre_get_posts'}
- * action within WP_Query.
- *
- * This must not be used within the WordPress Loop.
- *
- * @since 1.5.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @param array|string $query Array or string of WP_Query arguments.
- * @return array List of post objects.
- */
-function query_posts($query) {
-	$GLOBALS['wp_query'] = new WP_Query();
-	return $GLOBALS['wp_query']->query($query);
-}
-
-/**
- * Destroys the previous query and sets up a new query.
- *
- * This should be used after query_posts() and before another query_posts().
- * This will remove obscure bugs that occur when the previous WP_Query object
- * is not destroyed properly before another is set up.
- *
- * @since 2.3.0
- *
- * @global WP_Query $wp_query     Global WP_Query instance.
- * @global WP_Query $wp_the_query Copy of the global WP_Query instance created during wp_reset_query().
- */
-function wp_reset_query() {
-	$GLOBALS['wp_query'] = $GLOBALS['wp_the_query'];
-	wp_reset_postdata();
-}
-
-/**
- * After looping through a separate query, this function restores
- * the $post global to the current post in the main query.
- *
- * @since 3.0.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- */
-function wp_reset_postdata() {
-	global $wp_query;
-
-	if ( isset( $wp_query ) ) {
-		$wp_query->reset_postdata();
-	}
-}
-
-/*
- * Query type checks.
- */
-
-/**
- * Is the query for an existing archive page?
- *
- * Month, Year, Category, Author, Post Type archive...
- *
- * @since 1.5.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return bool
- */
-function is_archive() {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_archive();
-}
-
-/**
- * Is the query for an existing post type archive page?
- *
- * @since 3.1.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @param string|array $post_types Optional. Post type or array of posts types to check against.
- * @return bool
- */
-function is_post_type_archive( $post_types = '' ) {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_post_type_archive( $post_types );
-}
-
-/**
- * Is the query for an existing attachment page?
- *
- * @since 2.0.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @param int|string|array|object $attachment Attachment ID, title, slug, or array of such.
- * @return bool
- */
-function is_attachment( $attachment = '' ) {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_attachment( $attachment );
-}
-
-/**
- * Is the query for an existing author archive page?
- *
- * If the $author parameter is specified, this function will additionally
- * check if the query is for one of the authors specified.
- *
- * @since 1.5.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @param mixed $author Optional. User ID, nickname, nicename, or array of User IDs, nicknames, and nicenames
- * @return bool
- */
-function is_author( $author = '' ) {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_author( $author );
-}
-
-/**
- * Is the query for an existing category archive page?
- *
- * If the $category parameter is specified, this function will additionally
- * check if the query is for one of the categories specified.
- *
- * @since 1.5.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @param mixed $category Optional. Category ID, name, slug, or array of Category IDs, names, and slugs.
- * @return bool
- */
-function is_category( $category = '' ) {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_category( $category );
-}
-
-/**
- * Is the query for an existing tag archive page?
- *
- * If the $tag parameter is specified, this function will additionally
- * check if the query is for one of the tags specified.
- *
- * @since 2.3.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @param mixed $tag Optional. Tag ID, name, slug, or array of Tag IDs, names, and slugs.
- * @return bool
- */
-function is_tag( $tag = '' ) {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_tag( $tag );
-}
-
-/**
- * Is the query for an existing custom taxonomy archive page?
- *
- * If the $taxonomy parameter is specified, this function will additionally
- * check if the query is for that specific $taxonomy.
- *
- * If the $term parameter is specified in addition to the $taxonomy parameter,
- * this function will additionally check if the query is for one of the terms
- * specified.
- *
- * @since 2.5.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @param string|array     $taxonomy Optional. Taxonomy slug or slugs.
- * @param int|string|array $term     Optional. Term ID, name, slug or array of Term IDs, names, and slugs.
- * @return bool True for custom taxonomy archive pages, false for built-in taxonomies (category and tag archives).
- */
-function is_tax( $taxonomy = '', $term = '' ) {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_tax( $taxonomy, $term );
-}
-
-/**
- * Is the query for an existing date archive?
- *
- * @since 1.5.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return bool
- */
-function is_date() {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_date();
-}
-
-/**
- * Is the query for an existing day archive?
- *
- * @since 1.5.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return bool
- */
-function is_day() {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_day();
-}
-
-/**
- * Is the query for a feed?
- *
- * @since 1.5.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @param string|array $feeds Optional feed types to check.
- * @return bool
- */
-function is_feed( $feeds = '' ) {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_feed( $feeds );
-}
-
-/**
- * Is the query for a comments feed?
- *
- * @since 3.0.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return bool
- */
-function is_comment_feed() {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_comment_feed();
-}
-
-/**
- * Is the query for the front page of the site?
- *
- * This is for what is displayed at your site's main URL.
- *
- * Depends on the site's "Front page displays" Reading Settings 'show_on_front' and 'page_on_front'.
- *
- * If you set a static page for the front page of your site, this function will return
- * true when viewing that page.
- *
- * Otherwise the same as @see is_home()
- *
- * @since 2.5.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return bool True, if front of site.
- */
-function is_front_page() {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_front_page();
-}
-
-/**
- * Determines if the query is for the blog homepage.
- *
- * The blog homepage is the page that shows the time-based blog content of the site.
- *
- * is_home() is dependent on the site's "Front page displays" Reading Settings 'show_on_front'
- * and 'page_for_posts'.
- *
- * If a static page is set for the front page of the site, this function will return true only
- * on the page you set as the "Posts page".
- *
- * @since 1.5.0
- *
- * @see is_front_page()
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return bool True if blog view homepage, otherwise false.
- */
-function is_home() {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_home();
-}
-
-/**
- * Is the query for an existing month archive?
- *
- * @since 1.5.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return bool
- */
-function is_month() {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_month();
-}
-
-/**
- * Is the query for an existing single page?
- *
- * If the $page parameter is specified, this function will additionally
- * check if the query is for one of the pages specified.
- *
- * @see is_single()
- * @see is_singular()
- *
- * @since 1.5.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @param int|string|array $page Optional. Page ID, title, slug, or array of such. Default empty.
- * @return bool Whether the query is for an existing single page.
- */
-function is_page( $page = '' ) {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_page( $page );
-}
-
-/**
- * Is the query for paged result and not for the first page?
- *
- * @since 1.5.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return bool
- */
-function is_paged() {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_paged();
-}
-
-/**
- * Is the query for a post or page preview?
- *
- * @since 2.0.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return bool
- */
-function is_preview() {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_preview();
-}
-
-/**
- * Is the query for the robots file?
- *
- * @since 2.1.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return bool
- */
-function is_robots() {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_robots();
-}
-
-/**
- * Is the query for a search?
- *
- * @since 1.5.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return bool
- */
-function is_search() {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_search();
-}
-
-/**
- * Is the query for an existing single post?
- *
- * Works for any post type, except attachments and pages
- *
- * If the $post parameter is specified, this function will additionally
- * check if the query is for one of the Posts specified.
- *
- * @see is_page()
- * @see is_singular()
- *
- * @since 1.5.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @param int|string|array $post Optional. Post ID, title, slug, or array of such. Default empty.
- * @return bool Whether the query is for an existing single post.
- */
-function is_single( $post = '' ) {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_single( $post );
-}
-
-/**
- * Is the query for an existing single post of any post type (post, attachment, page, ... )?
- *
- * If the $post_types parameter is specified, this function will additionally
- * check if the query is for one of the Posts Types specified.
- *
- * @see is_page()
- * @see is_single()
- *
- * @since 1.5.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @param string|array $post_types Optional. Post type or array of post types. Default empty.
- * @return bool Whether the query is for an existing single post of any of the given post types.
- */
-function is_singular( $post_types = '' ) {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_singular( $post_types );
-}
-
-/**
- * Is the query for a specific time?
- *
- * @since 1.5.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return bool
- */
-function is_time() {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_time();
-}
-
-/**
- * Is the query for a trackback endpoint call?
- *
- * @since 1.5.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return bool
- */
-function is_trackback() {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_trackback();
-}
-
-/**
- * Is the query for an existing year archive?
- *
- * @since 1.5.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return bool
- */
-function is_year() {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_year();
-}
-
-/**
- * Is the query a 404 (returns no results)?
- *
- * @since 1.5.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return bool
- */
-function is_404() {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_404();
-}
-
-/**
- * Is the query for an embedded post?
- *
- * @since 4.4.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return bool Whether we're in an embedded post or not.
- */
-function is_embed() {
-	global $wp_query;
-
-	if ( ! isset( $wp_query ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
-		return false;
-	}
-
-	return $wp_query->is_embed();
-}
-
-/**
- * Is the query the main query?
- *
- * @since 3.3.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return bool
- */
-function is_main_query() {
-	if ( 'pre_get_posts' === current_filter() ) {
-		$message = sprintf(
-			/* translators: 1: pre_get_posts 2: WP_Query->is_main_query() 3: is_main_query() 4: link to codex is_main_query() page. */
-			__( 'In %1$s, use the %2$s method, not the %3$s function. See %4$s.' ),
-			'<code>pre_get_posts</code>',
-			'<code>WP_Query->is_main_query()</code>',
-			'<code>is_main_query()</code>',
-			__( 'https://codex.wordpress.org/Function_Reference/is_main_query' )
-		);
-		_doing_it_wrong( __FUNCTION__, $message, '3.7.0' );
-	}
-
-	global $wp_query;
-	return $wp_query->is_main_query();
-}
-
-/*
- * The Loop. Post loop control.
- */
-
-/**
- * Whether current WordPress query has results to loop over.
- *
- * @since 1.5.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return bool
- */
-function have_posts() {
-	global $wp_query;
-	return $wp_query->have_posts();
-}
-
-/**
- * Whether the caller is in the Loop.
- *
- * @since 2.0.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return bool True if caller is within loop, false if loop hasn't started or ended.
- */
-function in_the_loop() {
-	global $wp_query;
-	return $wp_query->in_the_loop;
-}
-
-/**
- * Rewind the loop posts.
- *
- * @since 1.5.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- */
-function rewind_posts() {
-	global $wp_query;
-	$wp_query->rewind_posts();
-}
-
-/**
- * Iterate the post index in the loop.
- *
- * @since 1.5.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- */
-function the_post() {
-	global $wp_query;
-	$wp_query->the_post();
-}
-
-/*
- * Comments loop.
- */
-
-/**
- * Whether there are comments to loop over.
- *
- * @since 2.2.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return bool
- */
-function have_comments() {
-	global $wp_query;
-	return $wp_query->have_comments();
-}
-
-/**
- * Iterate comment index in the comment loop.
- *
- * @since 2.2.0
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @return object
- */
-function the_comment() {
-	global $wp_query;
-	return $wp_query->the_comment();
-}
-
-/**
- * Redirect old slugs to the correct permalink.
- *
- * Attempts to find the current slug from the past slugs.
- *
- * @since 2.1.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- */
-function wp_old_slug_redirect() {
-	if ( is_404() && '' !== get_query_var( 'name' ) ) {
-		global $wpdb;
-
-		// Guess the current post_type based on the query vars.
-		if ( get_query_var( 'post_type' ) ) {
-			$post_type = get_query_var( 'post_type' );
-		} elseif ( get_query_var( 'attachment' ) ) {
-			$post_type = 'attachment';
-		} elseif ( get_query_var( 'pagename' ) ) {
-			$post_type = 'page';
-		} else {
-			$post_type = 'post';
-		}
-
-		if ( is_array( $post_type ) ) {
-			if ( count( $post_type ) > 1 ) {
-				return;
-			}
-			$post_type = reset( $post_type );
-		}
-
-		// Do not attempt redirect for hierarchical post types
-		if ( is_post_type_hierarchical( $post_type ) ) {
-			return;
-		}
-
-		$query = $wpdb->prepare("SELECT post_id FROM $wpdb->postmeta, $wpdb->posts WHERE ID = post_id AND post_type = %s AND meta_key = '_wp_old_slug' AND meta_value = %s", $post_type, get_query_var( 'name' ) );
-
-		// if year, monthnum, or day have been specified, make our query more precise
-		// just in case there are multiple identical _wp_old_slug values
-		if ( get_query_var( 'year' ) ) {
-			$query .= $wpdb->prepare(" AND YEAR(post_date) = %d", get_query_var( 'year' ) );
-		}
-		if ( get_query_var( 'monthnum' ) ) {
-			$query .= $wpdb->prepare(" AND MONTH(post_date) = %d", get_query_var( 'monthnum' ) );
-		}
-		if ( get_query_var( 'day' ) ) {
-			$query .= $wpdb->prepare(" AND DAYOFMONTH(post_date) = %d", get_query_var( 'day' ) );
-		}
-
-		$id = (int) $wpdb->get_var( $query );
-
-		if ( ! $id ) {
-			return;
-		}
-
-		$link = get_permalink( $id );
-
-		if ( get_query_var( 'paged' ) > 1 ) {
-			$link = user_trailingslashit( trailingslashit( $link ) . 'page/' . get_query_var( 'paged' ) );
-		} elseif( is_embed() ) {
-			$link = user_trailingslashit( trailingslashit( $link ) . 'embed' );
-		}
-
-		/**
-		 * Filters the old slug redirect URL.
-		 *
-		 * @since 4.4.0
-		 *
-		 * @param string $link The redirect URL.
-		 */
-		$link = apply_filters( 'old_slug_redirect_url', $link );
-
-		if ( ! $link ) {
-			return;
-		}
-
-		wp_redirect( $link, 301 ); // Permanent redirect
-		exit;
-	}
-}
-
-/**
- * Set up global post data.
- *
- * @since 1.5.0
- * @since 4.4.0 Added the ability to pass a post ID to `$post`.
- *
- * @global WP_Query $wp_query Global WP_Query instance.
- *
- * @param WP_Post|object|int $post WP_Post instance or Post ID/object.
- * @return bool True when finished.
- */
-function setup_postdata( $post ) {
-	global $wp_query;
-
-	if ( ! empty( $wp_query ) && $wp_query instanceof WP_Query ) {
-		return $wp_query->setup_postdata( $post );
-	}
-
-	return false;
-}
Index: www/wp-includes/class-wp-meta-query.php
===================================================================
--- www/wp-includes/class-wp-meta-query.php	(revision 38565)
+++ www/wp-includes/autoload/query/WP_Meta_Query.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/ID3/license.txt
===================================================================
--- www/wp-includes/ID3/license.txt	(revision 38565)
+++ www/wp-includes/autoload/id3/license.txt	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/author-template.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/author-template.php	(revision 38565)
+++ www/wp-includes/author-template.php	(revision 38565)
@@ -1,509 +0,0 @@
-<?php
-/**
- * Author Template functions for use in themes.
- *
- * These functions must be used within the WordPress Loop.
- *
- * @link https://codex.wordpress.org/Author_Templates
- *
- * @package WordPress
- * @subpackage Template
- */
-
-/**
- * Retrieve the author of the current post.
- *
- * @since 1.5.0
- *
- * @global object $authordata The current author's DB object.
- *
- * @param string $deprecated Deprecated.
- * @return string|null The author's display name.
- */
-function get_the_author($deprecated = '') {
-	global $authordata;
-
-	if ( !empty( $deprecated ) )
-		_deprecated_argument( __FUNCTION__, '2.1.0' );
-
-	/**
-	 * Filters the display name of the current post's author.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param string $authordata->display_name The author's display name.
-	 */
-	return apply_filters('the_author', is_object($authordata) ? $authordata->display_name : null);
-}
-
-/**
- * Display the name of the author of the current post.
- *
- * The behavior of this function is based off of old functionality predating
- * get_the_author(). This function is not deprecated, but is designed to echo
- * the value from get_the_author() and as an result of any old theme that might
- * still use the old behavior will also pass the value from get_the_author().
- *
- * The normal, expected behavior of this function is to echo the author and not
- * return it. However, backward compatibility has to be maintained.
- *
- * @since 0.71
- * @see get_the_author()
- * @link https://codex.wordpress.org/Template_Tags/the_author
- *
- * @param string $deprecated Deprecated.
- * @param string $deprecated_echo Deprecated. Use get_the_author(). Echo the string or return it.
- * @return string|null The author's display name, from get_the_author().
- */
-function the_author( $deprecated = '', $deprecated_echo = true ) {
-	if ( ! empty( $deprecated ) ) {
-		_deprecated_argument( __FUNCTION__, '2.1.0' );
-	}
-
-	if ( true !== $deprecated_echo ) {
-		_deprecated_argument( __FUNCTION__, '1.5.0',
-			/* translators: %s: get_the_author() */
-			sprintf( __( 'Use %s instead if you do not want the value echoed.' ),
-				'<code>get_the_author()</code>'
-			)
-		);
-	}
-
-	if ( $deprecated_echo ) {
-		echo get_the_author();
-	}
-
-	return get_the_author();
-}
-
-/**
- * Retrieve the author who last edited the current post.
- *
- * @since 2.8.0
- *
- * @return string|void The author's display name.
- */
-function get_the_modified_author() {
-	if ( $last_id = get_post_meta( get_post()->ID, '_edit_last', true) ) {
-		$last_user = get_userdata($last_id);
-
-		/**
-		 * Filters the display name of the author who last edited the current post.
-		 *
-		 * @since 2.8.0
-		 *
-		 * @param string $last_user->display_name The author's display name.
-		 */
-		return apply_filters('the_modified_author', $last_user->display_name);
-	}
-}
-
-/**
- * Display the name of the author who last edited the current post,
- * if the author's ID is available.
- *
- * @since 2.8.0
- *
- * @see get_the_author()
- */
-function the_modified_author() {
-	echo get_the_modified_author();
-}
-
-/**
- * Retrieve the requested data of the author of the current post.
- * @link https://codex.wordpress.org/Template_Tags/the_author_meta
- * @since 2.8.0
- *
- * @global object $authordata The current author's DB object.
- *
- * @param string $field selects the field of the users record.
- * @param int $user_id Optional. User ID.
- * @return string The author's field from the current author's DB object.
- */
-function get_the_author_meta( $field = '', $user_id = false ) {
-	$original_user_id = $user_id;
-
-	if ( ! $user_id ) {
-		global $authordata;
-		$user_id = isset( $authordata->ID ) ? $authordata->ID : 0;
-	} else {
-		$authordata = get_userdata( $user_id );
-	}
-
-	if ( in_array( $field, array( 'login', 'pass', 'nicename', 'email', 'url', 'registered', 'activation_key', 'status' ) ) )
-		$field = 'user_' . $field;
-
-	$value = isset( $authordata->$field ) ? $authordata->$field : '';
-
-	/**
-	 * Filters the value of the requested user metadata.
-	 *
-	 * The filter name is dynamic and depends on the $field parameter of the function.
-	 *
-	 * @since 2.8.0
-	 * @since 4.3.0 The `$original_user_id` parameter was added.
-	 *
-	 * @param string   $value            The value of the metadata.
-	 * @param int      $user_id          The user ID for the value.
-	 * @param int|bool $original_user_id The original user ID, as passed to the function.
-	 */
-	return apply_filters( 'get_the_author_' . $field, $value, $user_id, $original_user_id );
-}
-
-/**
- * Outputs the field from the user's DB object. Defaults to current post's author.
- *
- * @link https://codex.wordpress.org/Template_Tags/the_author_meta
- *
- * @since 2.8.0
- *
- * @param string $field selects the field of the users record.
- * @param int $user_id Optional. User ID.
- */
-function the_author_meta( $field = '', $user_id = false ) {
-	$author_meta = get_the_author_meta( $field, $user_id );
-
-	/**
-	 * The value of the requested user metadata.
-	 *
-	 * The filter name is dynamic and depends on the $field parameter of the function.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param string $author_meta The value of the metadata.
-	 * @param int    $user_id     The user ID.
-	 */
-	echo apply_filters( 'the_author_' . $field, $author_meta, $user_id );
-}
-
-/**
- * Retrieve either author's link or author's name.
- *
- * If the author has a home page set, return an HTML link, otherwise just return the
- * author's name.
- *
- * @return string|null An HTML link if the author's url exist in user meta,
- *                     else the result of get_the_author().
- */
-function get_the_author_link() {
-	if ( get_the_author_meta('url') ) {
-		return sprintf( '<a href="%1$s" title="%2$s" rel="author external">%3$s</a>',
-			esc_url( get_the_author_meta('url') ),
-			/* translators: %s: author's display name */
-			esc_attr( sprintf( __( 'Visit %s&#8217;s website' ), get_the_author() ) ),
-			get_the_author()
-		);
-	} else {
-		return get_the_author();
-	}
-}
-
-/**
- * Display either author's link or author's name.
- *
- * If the author has a home page set, echo an HTML link, otherwise just echo the
- * author's name.
- *
- * @link https://codex.wordpress.org/Template_Tags/the_author_link
- *
- * @since 2.1.0
- */
-function the_author_link() {
-	echo get_the_author_link();
-}
-
-/**
- * Retrieve the number of posts by the author of the current post.
- *
- * @since 1.5.0
- *
- * @return int The number of posts by the author.
- */
-function get_the_author_posts() {
-	$post = get_post();
-	if ( ! $post ) {
-		return 0;
-	}
-	return count_user_posts( $post->post_author, $post->post_type );
-}
-
-/**
- * Display the number of posts by the author of the current post.
- *
- * @link https://codex.wordpress.org/Template_Tags/the_author_posts
- * @since 0.71
- */
-function the_author_posts() {
-	echo get_the_author_posts();
-}
-
-/**
- * Retrieves an HTML link to the author page of the current post's author.
- *
- * Returns an HTML-formatted link using get_author_posts_url().
- *
- * @since 4.4.0
- *
- * @global object $authordata The current author's DB object.
- *
- * @return string An HTML link to the author page.
- */
-function get_the_author_posts_link() {
-	global $authordata;
-	if ( ! is_object( $authordata ) ) {
-		return;
-	}
-
-	$link = sprintf( '<a href="%1$s" title="%2$s" rel="author">%3$s</a>',
-		esc_url( get_author_posts_url( $authordata->ID, $authordata->user_nicename ) ),
-		/* translators: %s: author's display name */
-		esc_attr( sprintf( __( 'Posts by %s' ), get_the_author() ) ),
-		get_the_author()
-	);
-
-	/**
-	 * Filters the link to the author page of the author of the current post.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param string $link HTML link.
-	 */
-	return apply_filters( 'the_author_posts_link', $link );
-}
-
-/**
- * Displays an HTML link to the author page of the current post's author.
- *
- * @since 1.2.0
- * @since 4.4.0 Converted into a wrapper for get_the_author_posts_link()
- *
- * @param string $deprecated Unused.
- */
-function the_author_posts_link( $deprecated = '' ) {
-	if ( ! empty( $deprecated ) ) {
-		_deprecated_argument( __FUNCTION__, '2.1.0' );
-	}
-	echo get_the_author_posts_link();
-}
-
-/**
- * Retrieve the URL to the author page for the user with the ID provided.
- *
- * @since 2.1.0
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param int    $author_id       Author ID.
- * @param string $author_nicename Optional. The author's nicename (slug). Default empty.
- * @return string The URL to the author's page.
- */
-function get_author_posts_url( $author_id, $author_nicename = '' ) {
-	global $wp_rewrite;
-	$auth_ID = (int) $author_id;
-	$link = $wp_rewrite->get_author_permastruct();
-
-	if ( empty($link) ) {
-		$file = home_url( '/' );
-		$link = $file . '?author=' . $auth_ID;
-	} else {
-		if ( '' == $author_nicename ) {
-			$user = get_userdata($author_id);
-			if ( !empty($user->user_nicename) )
-				$author_nicename = $user->user_nicename;
-		}
-		$link = str_replace('%author%', $author_nicename, $link);
-		$link = home_url( user_trailingslashit( $link ) );
-	}
-
-	/**
-	 * Filters the URL to the author's page.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param string $link            The URL to the author's page.
-	 * @param int    $author_id       The author's id.
-	 * @param string $author_nicename The author's nice name.
-	 */
-	$link = apply_filters( 'author_link', $link, $author_id, $author_nicename );
-
-	return $link;
-}
-
-/**
- * List all the authors of the site, with several options available.
- *
- * @link https://codex.wordpress.org/Template_Tags/wp_list_authors
- *
- * @since 1.2.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string|array $args {
- *     Optional. Array or string of default arguments.
- *
- *     @type string       $orderby       How to sort the authors. Accepts 'nicename', 'email', 'url', 'registered',
- *                                       'user_nicename', 'user_email', 'user_url', 'user_registered', 'name',
- *                                       'display_name', 'post_count', 'ID', 'meta_value', 'user_login'. Default 'name'.
- *     @type string       $order         Sorting direction for $orderby. Accepts 'ASC', 'DESC'. Default 'ASC'.
- *     @type int          $number        Maximum authors to return or display. Default empty (all authors).
- *     @type bool         $optioncount   Show the count in parenthesis next to the author's name. Default false.
- *     @type bool         $exclude_admin Whether to exclude the 'admin' account, if it exists. Default false.
- *     @type bool         $show_fullname Whether to show the author's full name. Default false.
- *     @type bool         $hide_empty    Whether to hide any authors with no posts. Default true.
- *     @type string       $feed          If not empty, show a link to the author's feed and use this text as the alt
- *                                       parameter of the link. Default empty.
- *     @type string       $feed_image    If not empty, show a link to the author's feed and use this image URL as
- *                                       clickable anchor. Default empty.
- *     @type string       $feed_type     The feed type to link to, such as 'rss2'. Defaults to default feed type.
- *     @type bool         $echo          Whether to output the result or instead return it. Default true.
- *     @type string       $style         If 'list', each author is wrapped in an `<li>` element, otherwise the authors
- *                                       will be separated by commas.
- *     @type bool         $html          Whether to list the items in HTML form or plaintext. Default true.
- *     @type array|string $exclude       Array or comma/space-separated list of author IDs to exclude. Default empty.
- *     @type array|string $include       Array or comma/space-separated list of author IDs to include. Default empty.
- * }
- * @return string|void The output, if echo is set to false.
- */
-function wp_list_authors( $args = '' ) {
-	global $wpdb;
-
-	$defaults = array(
-		'orderby' => 'name', 'order' => 'ASC', 'number' => '',
-		'optioncount' => false, 'exclude_admin' => true,
-		'show_fullname' => false, 'hide_empty' => true,
-		'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true,
-		'style' => 'list', 'html' => true, 'exclude' => '', 'include' => ''
-	);
-
-	$args = wp_parse_args( $args, $defaults );
-
-	$return = '';
-
-	$query_args = wp_array_slice_assoc( $args, array( 'orderby', 'order', 'number', 'exclude', 'include' ) );
-	$query_args['fields'] = 'ids';
-	$authors = get_users( $query_args );
-
-	$author_count = array();
-	foreach ( (array) $wpdb->get_results( "SELECT DISTINCT post_author, COUNT(ID) AS count FROM $wpdb->posts WHERE " . get_private_posts_cap_sql( 'post' ) . " GROUP BY post_author" ) as $row ) {
-		$author_count[$row->post_author] = $row->count;
-	}
-	foreach ( $authors as $author_id ) {
-		$author = get_userdata( $author_id );
-
-		if ( $args['exclude_admin'] && 'admin' == $author->display_name ) {
-			continue;
-		}
-
-		$posts = isset( $author_count[$author->ID] ) ? $author_count[$author->ID] : 0;
-
-		if ( ! $posts && $args['hide_empty'] ) {
-			continue;
-		}
-
-		if ( $args['show_fullname'] && $author->first_name && $author->last_name ) {
-			$name = "$author->first_name $author->last_name";
-		} else {
-			$name = $author->display_name;
-		}
-
-		if ( ! $args['html'] ) {
-			$return .= $name . ', ';
-
-			continue; // No need to go further to process HTML.
-		}
-
-		if ( 'list' == $args['style'] ) {
-			$return .= '<li>';
-		}
-
-		$link = sprintf( '<a href="%1$s" title="%2$s">%3$s</a>',
-			get_author_posts_url( $author->ID, $author->user_nicename ),
-			/* translators: %s: author's display name */
-			esc_attr( sprintf( __( 'Posts by %s' ), $author->display_name ) ),
-			$name
-		);
-
-		if ( ! empty( $args['feed_image'] ) || ! empty( $args['feed'] ) ) {
-			$link .= ' ';
-			if ( empty( $args['feed_image'] ) ) {
-				$link .= '(';
-			}
-
-			$link .= '<a href="' . get_author_feed_link( $author->ID, $args['feed_type'] ) . '"';
-
-			$alt = '';
-			if ( ! empty( $args['feed'] ) ) {
-				$alt = ' alt="' . esc_attr( $args['feed'] ) . '"';
-				$name = $args['feed'];
-			}
-
-			$link .= '>';
-
-			if ( ! empty( $args['feed_image'] ) ) {
-				$link .= '<img src="' . esc_url( $args['feed_image'] ) . '" style="border: none;"' . $alt . ' />';
-			} else {
-				$link .= $name;
-			}
-
-			$link .= '</a>';
-
-			if ( empty( $args['feed_image'] ) ) {
-				$link .= ')';
-			}
-		}
-
-		if ( $args['optioncount'] ) {
-			$link .= ' ('. $posts . ')';
-		}
-
-		$return .= $link;
-		$return .= ( 'list' == $args['style'] ) ? '</li>' : ', ';
-	}
-
-	$return = rtrim( $return, ', ' );
-
-	if ( ! $args['echo'] ) {
-		return $return;
-	}
-	echo $return;
-}
-
-/**
- * Does this site have more than one author
- *
- * Checks to see if more than one author has published posts.
- *
- * @since 3.2.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @return bool Whether or not we have more than one author
- */
-function is_multi_author() {
-	global $wpdb;
-
-	if ( false === ( $is_multi_author = get_transient( 'is_multi_author' ) ) ) {
-		$rows = (array) $wpdb->get_col("SELECT DISTINCT post_author FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' LIMIT 2");
-		$is_multi_author = 1 < count( $rows ) ? 1 : 0;
-		set_transient( 'is_multi_author', $is_multi_author );
-	}
-
-	/**
-	 * Filters whether the site has more than one author with published posts.
-	 *
-	 * @since 3.2.0
-	 *
-	 * @param bool $is_multi_author Whether $is_multi_author should evaluate as true.
-	 */
-	return apply_filters( 'is_multi_author', (bool) $is_multi_author );
-}
-
-/**
- * Helper function to clear the cache for number of authors.
- *
- * @private
- */
-function __clear_multi_author_cache() {
-	delete_transient( 'is_multi_author' );
-}
Index: www/wp-includes/random_compat/random_bytes_mcrypt.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/random_compat/random_bytes_mcrypt.php	(revision 38565)
+++ www/wp-includes/random_compat/random_bytes_mcrypt.php	(revision 38565)
@@ -1,76 +0,0 @@
-<?php
-/**
- * Random_* Compatibility Library 
- * for using the new PHP 7 random_* API in PHP 5 projects
- * 
- * The MIT License (MIT)
- * 
- * Copyright (c) 2015 Paragon Initiative Enterprises
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-
-/**
- * Powered by ext/mcrypt (and thankfully NOT libmcrypt)
- * 
- * @ref https://bugs.php.net/bug.php?id=55169
- * @ref https://github.com/php/php-src/blob/c568ffe5171d942161fc8dda066bce844bdef676/ext/mcrypt/mcrypt.c#L1321-L1386
- * 
- * @param int $bytes
- * 
- * @throws Exception
- * 
- * @return string
- */
-function random_bytes($bytes)
-{
-    try {
-        $bytes = RandomCompat_intval($bytes);
-    } catch (TypeError $ex) {
-        throw new TypeError(
-            'random_bytes(): $bytes must be an integer'
-        );
-    }
-
-    if ($bytes < 1) {
-        throw new Error(
-            'Length must be greater than 0'
-        );
-    }
-
-    $buf = @mcrypt_create_iv($bytes, MCRYPT_DEV_URANDOM);
-    if (
-        $buf !== false
-        &&
-        RandomCompat_strlen($buf) === $bytes
-    ) {
-        /**
-         * Return our random entropy buffer here:
-         */
-        return $buf;
-    }
-
-    /**
-     * If we reach here, PHP has failed us.
-     */
-    throw new Exception(
-        'Could not gather sufficient random data'
-    );
-}
Index: www/wp-includes/autoload/requests/Exception/HTTP/410.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/410.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/410.php	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-<?php
-/**
- * Exception for 410 Gone responses
- *
- * @package Requests
- */
-
-/**
- * Exception for 410 Gone responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_410 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 410;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Gone';
-}
\ No newline at end of file
Index: www/wp-admin/includes/class-wp-press-this.php
===================================================================
--- www/wp-admin/includes/class-wp-press-this.php	(revision 38565)
+++ www/wp-admin/autoload/WP_Press_This.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-image-editor-gd.php
===================================================================
--- www/wp-includes/class-wp-image-editor-gd.php	(revision 38565)
+++ www/wp-includes/autoload/image/WP_Image_Editor_GD.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/requests/IDNAEncoder.php
===================================================================
--- www/wp-includes/autoload/requests/IDNAEncoder.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/IDNAEncoder.php	(revision UNDEFINED)
@@ -1,388 +0,0 @@
-<?php
-
-/**
- * IDNA URL encoder
- *
- * Note: Not fully compliant, as nameprep does nothing yet.
- *
- * @package Requests
- * @subpackage Utilities
- * @see https://tools.ietf.org/html/rfc3490 IDNA specification
- * @see https://tools.ietf.org/html/rfc3492 Punycode/Bootstrap specification
- */
-class Requests_IDNAEncoder {
-	/**
-	 * ACE prefix used for IDNA
-	 *
-	 * @see https://tools.ietf.org/html/rfc3490#section-5
-	 * @var string
-	 */
-	const ACE_PREFIX = 'xn--';
-
-	/**#@+
-	 * Bootstrap constant for Punycode
-	 *
-	 * @see https://tools.ietf.org/html/rfc3492#section-5
-	 * @var int
-	 */
-	const BOOTSTRAP_BASE         = 36;
-	const BOOTSTRAP_TMIN         = 1;
-	const BOOTSTRAP_TMAX         = 26;
-	const BOOTSTRAP_SKEW         = 38;
-	const BOOTSTRAP_DAMP         = 700;
-	const BOOTSTRAP_INITIAL_BIAS = 72;
-	const BOOTSTRAP_INITIAL_N    = 128;
-	/**#@-*/
-
-	/**
-	 * Encode a hostname using Punycode
-	 *
-	 * @param string $string Hostname
-	 * @return string Punycode-encoded hostname
-	 */
-	public static function encode($string) {
-		$parts = explode('.', $string);
-		foreach ($parts as &$part) {
-			$part = self::to_ascii($part);
-		}
-		return implode('.', $parts);
-	}
-
-	/**
-	 * Convert a UTF-8 string to an ASCII string using Punycode
-	 *
-	 * @throws Requests_Exception Provided string longer than 64 ASCII characters (`idna.provided_too_long`)
-	 * @throws Requests_Exception Prepared string longer than 64 ASCII characters (`idna.prepared_too_long`)
-	 * @throws Requests_Exception Provided string already begins with xn-- (`idna.provided_is_prefixed`)
-	 * @throws Requests_Exception Encoded string longer than 64 ASCII characters (`idna.encoded_too_long`)
-	 *
-	 * @param string $string ASCII or UTF-8 string (max length 64 characters)
-	 * @return string ASCII string
-	 */
-	public static function to_ascii($string) {
-		// Step 1: Check if the string is already ASCII
-		if (self::is_ascii($string)) {
-			// Skip to step 7
-			if (strlen($string) < 64) {
-				return $string;
-			}
-
-			throw new Requests_Exception('Provided string is too long', 'idna.provided_too_long', $string);
-		}
-
-		// Step 2: nameprep
-		$string = self::nameprep($string);
-
-		// Step 3: UseSTD3ASCIIRules is false, continue
-		// Step 4: Check if it's ASCII now
-		if (self::is_ascii($string)) {
-			// Skip to step 7
-			if (strlen($string) < 64) {
-				return $string;
-			}
-
-			throw new Requests_Exception('Prepared string is too long', 'idna.prepared_too_long', $string);
-		}
-
-		// Step 5: Check ACE prefix
-		if (strpos($string, self::ACE_PREFIX) === 0) {
-			throw new Requests_Exception('Provided string begins with ACE prefix', 'idna.provided_is_prefixed', $string);
-		}
-
-		// Step 6: Encode with Punycode
-		$string = self::punycode_encode($string);
-
-		// Step 7: Prepend ACE prefix
-		$string = self::ACE_PREFIX . $string;
-
-		// Step 8: Check size
-		if (strlen($string) < 64) {
-			return $string;
-		}
-
-		throw new Requests_Exception('Encoded string is too long', 'idna.encoded_too_long', $string);
-	}
-
-	/**
-	 * Check whether a given string contains only ASCII characters
-	 *
-	 * @internal (Testing found regex was the fastest implementation)
-	 *
-	 * @param string $string
-	 * @return bool Is the string ASCII-only?
-	 */
-	protected static function is_ascii($string) {
-		return (preg_match('/(?:[^\x00-\x7F])/', $string) !== 1);
-	}
-
-	/**
-	 * Prepare a string for use as an IDNA name
-	 *
-	 * @todo Implement this based on RFC 3491 and the newer 5891
-	 * @param string $string
-	 * @return string Prepared string
-	 */
-	protected static function nameprep($string) {
-		return $string;
-	}
-
-	/**
-	 * Convert a UTF-8 string to a UCS-4 codepoint array
-	 *
-	 * Based on Requests_IRI::replace_invalid_with_pct_encoding()
-	 *
-	 * @throws Requests_Exception Invalid UTF-8 codepoint (`idna.invalidcodepoint`)
-	 * @param string $input
-	 * @return array Unicode code points
-	 */
-	protected static function utf8_to_codepoints($input) {
-		$codepoints = array();
-
-		// Get number of bytes
-		$strlen = strlen($input);
-
-		for ($position = 0; $position < $strlen; $position++) {
-			$value = ord($input[$position]);
-
-			// One byte sequence:
-			if ((~$value & 0x80) === 0x80) {
-				$character = $value;
-				$length = 1;
-				$remaining = 0;
-			}
-			// Two byte sequence:
-			elseif (($value & 0xE0) === 0xC0) {
-				$character = ($value & 0x1F) << 6;
-				$length = 2;
-				$remaining = 1;
-			}
-			// Three byte sequence:
-			elseif (($value & 0xF0) === 0xE0) {
-				$character = ($value & 0x0F) << 12;
-				$length = 3;
-				$remaining = 2;
-			}
-			// Four byte sequence:
-			elseif (($value & 0xF8) === 0xF0) {
-				$character = ($value & 0x07) << 18;
-				$length = 4;
-				$remaining = 3;
-			}
-			// Invalid byte:
-			else {
-				throw new Requests_Exception('Invalid Unicode codepoint', 'idna.invalidcodepoint', $value);
-			}
-
-			if ($remaining > 0) {
-				if ($position + $length > $strlen) {
-					throw new Requests_Exception('Invalid Unicode codepoint', 'idna.invalidcodepoint', $character);
-				}
-				for ($position++; $remaining > 0; $position++) {
-					$value = ord($input[$position]);
-
-					// If it is invalid, count the sequence as invalid and reprocess the current byte:
-					if (($value & 0xC0) !== 0x80) {
-						throw new Requests_Exception('Invalid Unicode codepoint', 'idna.invalidcodepoint', $character);
-					}
-
-					$character |= ($value & 0x3F) << (--$remaining * 6);
-				}
-				$position--;
-			}
-
-			if (
-				// Non-shortest form sequences are invalid
-				   $length > 1 && $character <= 0x7F
-				|| $length > 2 && $character <= 0x7FF
-				|| $length > 3 && $character <= 0xFFFF
-				// Outside of range of ucschar codepoints
-				// Noncharacters
-				|| ($character & 0xFFFE) === 0xFFFE
-				|| $character >= 0xFDD0 && $character <= 0xFDEF
-				|| (
-					// Everything else not in ucschar
-					   $character > 0xD7FF && $character < 0xF900
-					|| $character < 0x20
-					|| $character > 0x7E && $character < 0xA0
-					|| $character > 0xEFFFD
-				)
-			) {
-				throw new Requests_Exception('Invalid Unicode codepoint', 'idna.invalidcodepoint', $character);
-			}
-
-			$codepoints[] = $character;
-		}
-
-		return $codepoints;
-	}
-
-	/**
-	 * RFC3492-compliant encoder
-	 *
-	 * @internal Pseudo-code from Section 6.3 is commented with "#" next to relevant code
-	 * @throws Requests_Exception On character outside of the domain (never happens with Punycode) (`idna.character_outside_domain`)
-	 *
-	 * @param string $input UTF-8 encoded string to encode
-	 * @return string Punycode-encoded string
-	 */
-	public static function punycode_encode($input) {
-		$output = '';
-#		let n = initial_n
-		$n = self::BOOTSTRAP_INITIAL_N;
-#		let delta = 0
-		$delta = 0;
-#		let bias = initial_bias
-		$bias = self::BOOTSTRAP_INITIAL_BIAS;
-#		let h = b = the number of basic code points in the input
-		$h = $b = 0; // see loop
-#		copy them to the output in order
-		$codepoints = self::utf8_to_codepoints($input);
-		$extended = array();
-
-		foreach ($codepoints as $char) {
-			if ($char < 128) {
-				// Character is valid ASCII
-				// TODO: this should also check if it's valid for a URL
-				$output .= chr($char);
-				$h++;
-			}
-			// Check if the character is non-ASCII, but below initial n
-			// This never occurs for Punycode, so ignore in coverage
-			// @codeCoverageIgnoreStart
-			elseif ($char < $n) {
-				throw new Requests_Exception('Invalid character', 'idna.character_outside_domain', $char);
-			}
-			// @codeCoverageIgnoreEnd
-			else {
-				$extended[$char] = true;
-			}
-		}
-		$extended = array_keys($extended);
-		sort($extended);
-		$b = $h;
-#		[copy them] followed by a delimiter if b > 0
-		if (strlen($output) > 0) {
-			$output .= '-';
-		}
-#		{if the input contains a non-basic code point < n then fail}
-#		while h < length(input) do begin
-		while ($h < count($codepoints)) {
-#			let m = the minimum code point >= n in the input
-			$m = array_shift($extended);
-			//printf('next code point to insert is %s' . PHP_EOL, dechex($m));
-#			let delta = delta + (m - n) * (h + 1), fail on overflow
-			$delta += ($m - $n) * ($h + 1);
-#			let n = m
-			$n = $m;
-#			for each code point c in the input (in order) do begin
-			for ($num = 0; $num < count($codepoints); $num++) {
-				$c = $codepoints[$num];
-#				if c < n then increment delta, fail on overflow
-				if ($c < $n) {
-					$delta++;
-				}
-#				if c == n then begin
-				elseif ($c === $n) {
-#					let q = delta
-					$q = $delta;
-#					for k = base to infinity in steps of base do begin
-					for ($k = self::BOOTSTRAP_BASE; ; $k += self::BOOTSTRAP_BASE) {
-#						let t = tmin if k <= bias {+ tmin}, or
-#								tmax if k >= bias + tmax, or k - bias otherwise
-						if ($k <= ($bias + self::BOOTSTRAP_TMIN)) {
-							$t = self::BOOTSTRAP_TMIN;
-						}
-						elseif ($k >= ($bias + self::BOOTSTRAP_TMAX)) {
-							$t = self::BOOTSTRAP_TMAX;
-						}
-						else {
-							$t = $k - $bias;
-						}
-#						if q < t then break
-						if ($q < $t) {
-							break;
-						}
-#						output the code point for digit t + ((q - t) mod (base - t))
-						$digit = $t + (($q - $t) % (self::BOOTSTRAP_BASE - $t));
-						$output .= self::digit_to_char($digit);
-#						let q = (q - t) div (base - t)
-						$q = floor(($q - $t) / (self::BOOTSTRAP_BASE - $t));
-#					end
-					}
-#					output the code point for digit q
-					$output .= self::digit_to_char($q);
-#					let bias = adapt(delta, h + 1, test h equals b?)
-					$bias = self::adapt($delta, $h + 1, $h === $b);
-#					let delta = 0
-					$delta = 0;
-#					increment h
-					$h++;
-#				end
-				}
-#			end
-			}
-#			increment delta and n
-			$delta++;
-			$n++;
-#		end
-		}
-
-		return $output;
-	}
-
-	/**
-	 * Convert a digit to its respective character
-	 *
-	 * @see https://tools.ietf.org/html/rfc3492#section-5
-	 * @throws Requests_Exception On invalid digit (`idna.invalid_digit`)
-	 *
-	 * @param int $digit Digit in the range 0-35
-	 * @return string Single character corresponding to digit
-	 */
-	protected static function digit_to_char($digit) {
-		// @codeCoverageIgnoreStart
-		// As far as I know, this never happens, but still good to be sure.
-		if ($digit < 0 || $digit > 35) {
-			throw new Requests_Exception(sprintf('Invalid digit %d', $digit), 'idna.invalid_digit', $digit);
-		}
-		// @codeCoverageIgnoreEnd
-		$digits = 'abcdefghijklmnopqrstuvwxyz0123456789';
-		return substr($digits, $digit, 1);
-	}
-
-	/**
-	 * Adapt the bias
-	 *
-	 * @see https://tools.ietf.org/html/rfc3492#section-6.1
-	 * @param int $delta
-	 * @param int $numpoints
-	 * @param bool $firsttime
-	 * @return int New bias
-	 */
-	protected static function adapt($delta, $numpoints, $firsttime) {
-#	function adapt(delta,numpoints,firsttime):
-#		if firsttime then let delta = delta div damp
-		if ($firsttime) {
-			$delta = floor($delta / self::BOOTSTRAP_DAMP);
-		}
-#		else let delta = delta div 2
-		else {
-			$delta = floor($delta / 2);
-		}
-#		let delta = delta + (delta div numpoints)
-		$delta += floor($delta / $numpoints);
-#		let k = 0
-		$k = 0;
-#		while delta > ((base - tmin) * tmax) div 2 do begin
-		$max = floor(((self::BOOTSTRAP_BASE - self::BOOTSTRAP_TMIN) * self::BOOTSTRAP_TMAX) / 2);
-		while ($delta > $max) {
-#			let delta = delta div (base - tmin)
-			$delta = floor($delta / (self::BOOTSTRAP_BASE - self::BOOTSTRAP_TMIN));
-#			let k = k + base
-			$k += self::BOOTSTRAP_BASE;
-#		end
-		}
-#		return k + (((base - tmin + 1) * delta) div (delta + skew))
-		return $k + floor(((self::BOOTSTRAP_BASE - self::BOOTSTRAP_TMIN + 1) * $delta) / ($delta + self::BOOTSTRAP_SKEW));
-	}
-}
\ No newline at end of file
Index: www/wp-includes/Requests/Exception/HTTP/402.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/402.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_402.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/IXR/class-IXR-message.php
===================================================================
--- www/wp-includes/IXR/class-IXR-message.php	(revision 38565)
+++ www/wp-includes/autoload/ixr/IXR_Message.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/simplepie/Cache/Memcache.php
===================================================================
--- www/wp-includes/autoload/simplepie/Cache/Memcache.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/simplepie/Cache/Memcache.php	(revision UNDEFINED)
@@ -1,183 +0,0 @@
-<?php
-/**
- * SimplePie
- *
- * A PHP-Based RSS and Atom Feed Framework.
- * Takes the hard work out of managing a complete RSS/Atom solution.
- *
- * Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 	* Redistributions of source code must retain the above copyright notice, this list of
- * 	  conditions and the following disclaimer.
- *
- * 	* Redistributions in binary form must reproduce the above copyright notice, this list
- * 	  of conditions and the following disclaimer in the documentation and/or other materials
- * 	  provided with the distribution.
- *
- * 	* Neither the name of the SimplePie Team nor the names of its contributors may be used
- * 	  to endorse or promote products derived from this software without specific prior
- * 	  written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
- * AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * @package SimplePie
- * @version 1.3.1
- * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
- * @author Ryan Parman
- * @author Geoffrey Sneddon
- * @author Ryan McCue
- * @link http://simplepie.org/ SimplePie
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
- */
-
-/**
- * Caches data to memcache
- *
- * Registered for URLs with the "memcache" protocol
- *
- * For example, `memcache://localhost:11211/?timeout=3600&prefix=sp_` will
- * connect to memcache on `localhost` on port 11211. All tables will be
- * prefixed with `sp_` and data will expire after 3600 seconds
- *
- * @package SimplePie
- * @subpackage Caching
- * @uses Memcache
- */
-class SimplePie_Cache_Memcache implements SimplePie_Cache_Base
-{
-	/**
-	 * Memcache instance
-	 *
-	 * @var Memcache
-	 */
-	protected $cache;
-
-	/**
-	 * Options
-	 *
-	 * @var array
-	 */
-	protected $options;
-
-	/**
-	 * Cache name
-	 *
-	 * @var string
-	 */
-	protected $name;
-
-	/**
-	 * Create a new cache object
-	 *
-	 * @param string $location Location string (from SimplePie::$cache_location)
-	 * @param string $name Unique ID for the cache
-	 * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
-	 */
-	public function __construct($location, $name, $type)
-	{
-		$this->options = array(
-			'host' => '127.0.0.1',
-			'port' => 11211,
-			'extras' => array(
-				'timeout' => 3600, // one hour
-				'prefix' => 'simplepie_',
-			),
-		);
-		$parsed = SimplePie_Cache::parse_URL($location);
-		$this->options['host'] = empty($parsed['host']) ? $this->options['host'] : $parsed['host'];
-		$this->options['port'] = empty($parsed['port']) ? $this->options['port'] : $parsed['port'];
-		$this->options['extras'] = array_merge($this->options['extras'], $parsed['extras']);
-		$this->name = $this->options['extras']['prefix'] . md5("$name:$type");
-
-		$this->cache = new Memcache();
-		$this->cache->addServer($this->options['host'], (int) $this->options['port']);
-	}
-
-	/**
-	 * Save data to the cache
-	 *
-	 * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
-	 * @return bool Successfulness
-	 */
-	public function save($data)
-	{
-		if ($data instanceof SimplePie)
-		{
-			$data = $data->data;
-		}
-		return $this->cache->set($this->name, serialize($data), MEMCACHE_COMPRESSED, (int) $this->options['extras']['timeout']);
-	}
-
-	/**
-	 * Retrieve the data saved to the cache
-	 *
-	 * @return array Data for SimplePie::$data
-	 */
-	public function load()
-	{
-		$data = $this->cache->get($this->name);
-
-		if ($data !== false)
-		{
-			return unserialize($data);
-		}
-		return false;
-	}
-
-	/**
-	 * Retrieve the last modified time for the cache
-	 *
-	 * @return int Timestamp
-	 */
-	public function mtime()
-	{
-		$data = $this->cache->get($this->name);
-
-		if ($data !== false)
-		{
-			// essentially ignore the mtime because Memcache expires on it's own
-			return time();
-		}
-
-		return false;
-	}
-
-	/**
-	 * Set the last modified time to the current time
-	 *
-	 * @return bool Success status
-	 */
-	public function touch()
-	{
-		$data = $this->cache->get($this->name);
-
-		if ($data !== false)
-		{
-			return $this->cache->set($this->name, $data, MEMCACHE_COMPRESSED, (int) $this->duration);
-		}
-
-		return false;
-	}
-
-	/**
-	 * Remove the cache
-	 *
-	 * @return bool Success status
-	 */
-	public function unlink()
-	{
-		return $this->cache->delete($this->name, 0);
-	}
-}
Index: www/wp-includes/rss-functions.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/rss-functions.php	(revision 38565)
+++ www/wp-includes/rss-functions.php	(revision 38565)
@@ -1,9 +0,0 @@
-<?php
-/**
- * Deprecated. Use rss.php instead.
- *
- * @package WordPress
- */
-
-_deprecated_file( basename(__FILE__), '2.1.0', WPINC . '/rss.php' );
-require_once( ABSPATH . WPINC . '/rss.php' );
Index: www/wp-includes/class-wp-session-tokens.php
===================================================================
--- www/wp-includes/class-wp-session-tokens.php	(revision 38565)
+++ www/wp-includes/autoload/session/WP_Session_Tokens.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/media-template.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/media-template.php	(revision 38565)
+++ www/wp-includes/media-template.php	(revision 38565)
@@ -1,1265 +0,0 @@
-<?php
-/**
- * WordPress media templates.
- *
- * @package WordPress
- * @subpackage Media
- * @since 3.5.0
- */
-
-/**
- * Output the markup for a audio tag to be used in an Underscore template
- * when data.model is passed.
- *
- * @since 3.9.0
- */
-function wp_underscore_audio_template() {
-	$audio_types = wp_get_audio_extensions();
-?>
-<audio style="visibility: hidden"
-	controls
-	class="wp-audio-shortcode"
-	width="{{ _.isUndefined( data.model.width ) ? 400 : data.model.width }}"
-	preload="{{ _.isUndefined( data.model.preload ) ? 'none' : data.model.preload }}"
-	<#
-	<?php foreach ( array( 'autoplay', 'loop' ) as $attr ):
-	?>if ( ! _.isUndefined( data.model.<?php echo $attr ?> ) && data.model.<?php echo $attr ?> ) {
-		#> <?php echo $attr ?><#
-	}
-	<?php endforeach ?>#>
->
-	<# if ( ! _.isEmpty( data.model.src ) ) { #>
-	<source src="{{ data.model.src }}" type="{{ wp.media.view.settings.embedMimes[ data.model.src.split('.').pop() ] }}" />
-	<# } #>
-
-	<?php foreach ( $audio_types as $type ):
-	?><# if ( ! _.isEmpty( data.model.<?php echo $type ?> ) ) { #>
-	<source src="{{ data.model.<?php echo $type ?> }}" type="{{ wp.media.view.settings.embedMimes[ '<?php echo $type ?>' ] }}" />
-	<# } #>
-	<?php endforeach;
-?></audio>
-<?php
-}
-
-/**
- * Output the markup for a video tag to be used in an Underscore template
- * when data.model is passed.
- *
- * @since 3.9.0
- */
-function wp_underscore_video_template() {
-	$video_types = wp_get_video_extensions();
-?>
-<#  var w_rule = '', classes = [],
-		w, h, settings = wp.media.view.settings,
-		isYouTube = isVimeo = false;
-
-	if ( ! _.isEmpty( data.model.src ) ) {
-		isYouTube = data.model.src.match(/youtube|youtu\.be/);
-		isVimeo = -1 !== data.model.src.indexOf('vimeo');
-	}
-
-	if ( settings.contentWidth && data.model.width >= settings.contentWidth ) {
-		w = settings.contentWidth;
-	} else {
-		w = data.model.width;
-	}
-
-	if ( w !== data.model.width ) {
-		h = Math.ceil( ( data.model.height * w ) / data.model.width );
-	} else {
-		h = data.model.height;
- 	}
-
-	if ( w ) {
-		w_rule = 'width: ' + w + 'px; ';
-	}
-
-	if ( isYouTube ) {
-		classes.push( 'youtube-video' );
-	}
-
-	if ( isVimeo ) {
-		classes.push( 'vimeo-video' );
-	}
-
-#>
-<div style="{{ w_rule }}" class="wp-video">
-<video controls
-	class="wp-video-shortcode {{ classes.join( ' ' ) }}"
-	<# if ( w ) { #>width="{{ w }}"<# } #>
-	<# if ( h ) { #>height="{{ h }}"<# } #>
-	<?php
-	$props = array( 'poster' => '', 'preload' => 'metadata' );
-	foreach ( $props as $key => $value ):
-		if ( empty( $value ) ) {
-		?><#
-		if ( ! _.isUndefined( data.model.<?php echo $key ?> ) && data.model.<?php echo $key ?> ) {
-			#> <?php echo $key ?>="{{ data.model.<?php echo $key ?> }}"<#
-		} #>
-		<?php } else {
-			echo $key ?>="{{ _.isUndefined( data.model.<?php echo $key ?> ) ? '<?php echo $value ?>' : data.model.<?php echo $key ?> }}"<?php
-		}
-	endforeach;
-	?><#
-	<?php foreach ( array( 'autoplay', 'loop' ) as $attr ):
-	?> if ( ! _.isUndefined( data.model.<?php echo $attr ?> ) && data.model.<?php echo $attr ?> ) {
-		#> <?php echo $attr ?><#
-	}
-	<?php endforeach ?>#>
->
-	<# if ( ! _.isEmpty( data.model.src ) ) {
-		if ( isYouTube ) { #>
-		<source src="{{ data.model.src }}" type="video/youtube" />
-		<# } else if ( isVimeo ) { #>
-		<source src="{{ data.model.src }}" type="video/vimeo" />
-		<# } else { #>
-		<source src="{{ data.model.src }}" type="{{ settings.embedMimes[ data.model.src.split('.').pop() ] }}" />
-		<# }
-	} #>
-
-	<?php foreach ( $video_types as $type ):
-	?><# if ( data.model.<?php echo $type ?> ) { #>
-	<source src="{{ data.model.<?php echo $type ?> }}" type="{{ settings.embedMimes[ '<?php echo $type ?>' ] }}" />
-	<# } #>
-	<?php endforeach; ?>
-	{{{ data.model.content }}}
-</video>
-</div>
-<?php
-}
-
-/**
- * Prints the templates used in the media manager.
- *
- * @since 3.5.0
- *
- * @global bool $is_IE
- */
-function wp_print_media_templates() {
-	global $is_IE;
-	$class = 'media-modal wp-core-ui';
-	if ( $is_IE && strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') !== false )
-		$class .= ' ie7';
-	?>
-	<!--[if lte IE 8]>
-	<style>
-		.attachment:focus {
-			outline: #1e8cbe solid;
-		}
-		.selected.attachment {
-			outline: #1e8cbe solid;
-		}
-	</style>
-	<![endif]-->
-	<script type="text/html" id="tmpl-media-frame">
-		<div class="media-frame-menu"></div>
-		<div class="media-frame-title"></div>
-		<div class="media-frame-router"></div>
-		<div class="media-frame-content"></div>
-		<div class="media-frame-toolbar"></div>
-		<div class="media-frame-uploader"></div>
-	</script>
-
-	<script type="text/html" id="tmpl-media-modal">
-		<div class="<?php echo $class; ?>">
-			<button type="button" class="button-link media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close media panel' ); ?></span></span></button>
-			<div class="media-modal-content"></div>
-		</div>
-		<div class="media-modal-backdrop"></div>
-	</script>
-
-	<script type="text/html" id="tmpl-uploader-window">
-		<div class="uploader-window-content">
-			<h1><?php _e( 'Drop files to upload' ); ?></h1>
-		</div>
-	</script>
-
-	<script type="text/html" id="tmpl-uploader-editor">
-		<div class="uploader-editor-content">
-			<div class="uploader-editor-title"><?php _e( 'Drop files to upload' ); ?></div>
-		</div>
-	</script>
-
-	<script type="text/html" id="tmpl-uploader-inline">
-		<# var messageClass = data.message ? 'has-upload-message' : 'no-upload-message'; #>
-		<# if ( data.canClose ) { #>
-		<button class="close dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Close uploader' ); ?></span></button>
-		<# } #>
-		<div class="uploader-inline-content {{ messageClass }}">
-		<# if ( data.message ) { #>
-			<h2 class="upload-message">{{ data.message }}</h2>
-		<# } #>
-		<?php if ( ! _device_can_upload() ) : ?>
-			<h2 class="upload-instructions"><?php printf( __( 'The web browser on your device cannot be used to upload files. You may be able to use the <a href="%s">native app for your device</a> instead.' ), 'https://apps.wordpress.org/' ); ?></h2>
-		<?php elseif ( is_multisite() && ! is_upload_space_available() ) : ?>
-			<h2 class="upload-instructions"><?php _e( 'Upload Limit Exceeded' ); ?></h2>
-			<?php
-			/** This action is documented in wp-admin/includes/media.php */
-			do_action( 'upload_ui_over_quota' ); ?>
-
-		<?php else : ?>
-			<div class="upload-ui">
-				<h2 class="upload-instructions drop-instructions"><?php _e( 'Drop files anywhere to upload' ); ?></h2>
-				<p class="upload-instructions drop-instructions"><?php _ex( 'or', 'Uploader: Drop files here - or - Select Files' ); ?></p>
-				<button type="button" class="browser button button-hero"><?php _e( 'Select Files' ); ?></button>
-			</div>
-
-			<div class="upload-inline-status"></div>
-
-			<div class="post-upload-ui">
-				<?php
-				/** This action is documented in wp-admin/includes/media.php */
-				do_action( 'pre-upload-ui' );
-				/** This action is documented in wp-admin/includes/media.php */
-				do_action( 'pre-plupload-upload-ui' );
-
-				if ( 10 === remove_action( 'post-plupload-upload-ui', 'media_upload_flash_bypass' ) ) {
-					/** This action is documented in wp-admin/includes/media.php */
-					do_action( 'post-plupload-upload-ui' );
-					add_action( 'post-plupload-upload-ui', 'media_upload_flash_bypass' );
-				} else {
-					/** This action is documented in wp-admin/includes/media.php */
-					do_action( 'post-plupload-upload-ui' );
-				}
-
-				$max_upload_size = wp_max_upload_size();
-				if ( ! $max_upload_size ) {
-					$max_upload_size = 0;
-				}
-				?>
-
-				<p class="max-upload-size"><?php
-					printf( __( 'Maximum upload file size: %s.' ), esc_html( size_format( $max_upload_size ) ) );
-				?></p>
-
-				<# if ( data.suggestedWidth && data.suggestedHeight ) { #>
-					<p class="suggested-dimensions">
-						<?php _e( 'Suggested image dimensions:' ); ?> {{data.suggestedWidth}} &times; {{data.suggestedHeight}}
-					</p>
-				<# } #>
-
-				<?php
-				/** This action is documented in wp-admin/includes/media.php */
-				do_action( 'post-upload-ui' ); ?>
-			</div>
-		<?php endif; ?>
-		</div>
-	</script>
-
-	<script type="text/html" id="tmpl-media-library-view-switcher">
-		<a href="<?php echo esc_url( add_query_arg( 'mode', 'list', $_SERVER['REQUEST_URI'] ) ) ?>" class="view-list">
-			<span class="screen-reader-text"><?php _e( 'List View' ); ?></span>
-		</a>
-		<a href="<?php echo esc_url( add_query_arg( 'mode', 'grid', $_SERVER['REQUEST_URI'] ) ) ?>" class="view-grid current">
-			<span class="screen-reader-text"><?php _e( 'Grid View' ); ?></span>
-		</a>
-	</script>
-
-	<script type="text/html" id="tmpl-uploader-status">
-		<h2><?php _e( 'Uploading' ); ?></h2>
-		<button type="button" class="button-link upload-dismiss-errors"><span class="screen-reader-text"><?php _e( 'Dismiss Errors' ); ?></span></button>
-
-		<div class="media-progress-bar"><div></div></div>
-		<div class="upload-details">
-			<span class="upload-count">
-				<span class="upload-index"></span> / <span class="upload-total"></span>
-			</span>
-			<span class="upload-detail-separator">&ndash;</span>
-			<span class="upload-filename"></span>
-		</div>
-		<div class="upload-errors"></div>
-	</script>
-
-	<script type="text/html" id="tmpl-uploader-status-error">
-		<span class="upload-error-filename">{{{ data.filename }}}</span>
-		<span class="upload-error-message">{{ data.message }}</span>
-	</script>
-
-	<script type="text/html" id="tmpl-edit-attachment-frame">
-		<div class="edit-media-header">
-			<button class="left dashicons <# if ( ! data.hasPrevious ) { #> disabled <# } #>"><span class="screen-reader-text"><?php _e( 'Edit previous media item' ); ?></span></button>
-			<button class="right dashicons <# if ( ! data.hasNext ) { #> disabled <# } #>"><span class="screen-reader-text"><?php _e( 'Edit next media item' ); ?></span></button>
-		</div>
-		<div class="media-frame-title"></div>
-		<div class="media-frame-content"></div>
-	</script>
-
-	<script type="text/html" id="tmpl-attachment-details-two-column">
-		<div class="attachment-media-view {{ data.orientation }}">
-			<div class="thumbnail thumbnail-{{ data.type }}">
-				<# if ( data.uploading ) { #>
-					<div class="media-progress-bar"><div></div></div>
-				<# } else if ( 'image' === data.type && data.sizes && data.sizes.large ) { #>
-					<img class="details-image" src="{{ data.sizes.large.url }}" draggable="false" alt="" />
-				<# } else if ( 'image' === data.type && data.sizes && data.sizes.full ) { #>
-					<img class="details-image" src="{{ data.sizes.full.url }}" draggable="false" alt="" />
-				<# } else if ( -1 === jQuery.inArray( data.type, [ 'audio', 'video' ] ) ) { #>
-					<img class="details-image icon" src="{{ data.icon }}" draggable="false" alt="" />
-				<# } #>
-
-				<# if ( 'audio' === data.type ) { #>
-				<div class="wp-media-wrapper">
-					<audio style="visibility: hidden" controls class="wp-audio-shortcode" width="100%" preload="none">
-						<source type="{{ data.mime }}" src="{{ data.url }}"/>
-					</audio>
-				</div>
-				<# } else if ( 'video' === data.type ) {
-					var w_rule = '';
-					if ( data.width ) {
-						w_rule = 'width: ' + data.width + 'px;';
-					} else if ( wp.media.view.settings.contentWidth ) {
-						w_rule = 'width: ' + wp.media.view.settings.contentWidth + 'px;';
-					}
-				#>
-				<div style="{{ w_rule }}" class="wp-media-wrapper wp-video">
-					<video controls="controls" class="wp-video-shortcode" preload="metadata"
-						<# if ( data.width ) { #>width="{{ data.width }}"<# } #>
-						<# if ( data.height ) { #>height="{{ data.height }}"<# } #>
-						<# if ( data.image && data.image.src !== data.icon ) { #>poster="{{ data.image.src }}"<# } #>>
-						<source type="{{ data.mime }}" src="{{ data.url }}"/>
-					</video>
-				</div>
-				<# } #>
-
-				<div class="attachment-actions">
-					<# if ( 'image' === data.type && ! data.uploading && data.sizes && data.can.save ) { #>
-					<button type="button" class="button edit-attachment"><?php _e( 'Edit Image' ); ?></button>
-					<# } #>
-				</div>
-			</div>
-		</div>
-		<div class="attachment-info">
-			<span class="settings-save-status">
-				<span class="spinner"></span>
-				<span class="saved"><?php esc_html_e('Saved.'); ?></span>
-			</span>
-			<div class="details">
-				<div class="filename"><strong><?php _e( 'File name:' ); ?></strong> {{ data.filename }}</div>
-				<div class="filename"><strong><?php _e( 'File type:' ); ?></strong> {{ data.mime }}</div>
-				<div class="uploaded"><strong><?php _e( 'Uploaded on:' ); ?></strong> {{ data.dateFormatted }}</div>
-
-				<div class="file-size"><strong><?php _e( 'File size:' ); ?></strong> {{ data.filesizeHumanReadable }}</div>
-				<# if ( 'image' === data.type && ! data.uploading ) { #>
-					<# if ( data.width && data.height ) { #>
-						<div class="dimensions"><strong><?php _e( 'Dimensions:' ); ?></strong> {{ data.width }} &times; {{ data.height }}</div>
-					<# } #>
-				<# } #>
-
-				<# if ( data.fileLength ) { #>
-					<div class="file-length"><strong><?php _e( 'Length:' ); ?></strong> {{ data.fileLength }}</div>
-				<# } #>
-
-				<# if ( 'audio' === data.type && data.meta.bitrate ) { #>
-					<div class="bitrate">
-						<strong><?php _e( 'Bitrate:' ); ?></strong> {{ Math.round( data.meta.bitrate / 1000 ) }}kb/s
-						<# if ( data.meta.bitrate_mode ) { #>
-						{{ ' ' + data.meta.bitrate_mode.toUpperCase() }}
-						<# } #>
-					</div>
-				<# } #>
-
-				<div class="compat-meta">
-					<# if ( data.compat && data.compat.meta ) { #>
-						{{{ data.compat.meta }}}
-					<# } #>
-				</div>
-			</div>
-
-			<div class="settings">
-				<label class="setting" data-setting="url">
-					<span class="name"><?php _e('URL'); ?></span>
-					<input type="text" value="{{ data.url }}" readonly />
-				</label>
-				<# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #>
-				<?php if ( post_type_supports( 'attachment', 'title' ) ) : ?>
-				<label class="setting" data-setting="title">
-					<span class="name"><?php _e('Title'); ?></span>
-					<input type="text" value="{{ data.title }}" {{ maybeReadOnly }} />
-				</label>
-				<?php endif; ?>
-				<# if ( 'audio' === data.type ) { #>
-				<?php foreach ( array(
-					'artist' => __( 'Artist' ),
-					'album' => __( 'Album' ),
-				) as $key => $label ) : ?>
-				<label class="setting" data-setting="<?php echo esc_attr( $key ) ?>">
-					<span class="name"><?php echo $label ?></span>
-					<input type="text" value="{{ data.<?php echo $key ?> || data.meta.<?php echo $key ?> || '' }}" />
-				</label>
-				<?php endforeach; ?>
-				<# } #>
-				<label class="setting" data-setting="caption">
-					<span class="name"><?php _e( 'Caption' ); ?></span>
-					<textarea {{ maybeReadOnly }}>{{ data.caption }}</textarea>
-				</label>
-				<# if ( 'image' === data.type ) { #>
-					<label class="setting" data-setting="alt">
-						<span class="name"><?php _e( 'Alt Text' ); ?></span>
-						<input type="text" value="{{ data.alt }}" {{ maybeReadOnly }} />
-					</label>
-				<# } #>
-				<label class="setting" data-setting="description">
-					<span class="name"><?php _e('Description'); ?></span>
-					<textarea {{ maybeReadOnly }}>{{ data.description }}</textarea>
-				</label>
-				<label class="setting">
-					<span class="name"><?php _e( 'Uploaded By' ); ?></span>
-					<span class="value">{{ data.authorName }}</span>
-				</label>
-				<# if ( data.uploadedToTitle ) { #>
-					<label class="setting">
-						<span class="name"><?php _e( 'Uploaded To' ); ?></span>
-						<# if ( data.uploadedToLink ) { #>
-							<span class="value"><a href="{{ data.uploadedToLink }}">{{ data.uploadedToTitle }}</a></span>
-						<# } else { #>
-							<span class="value">{{ data.uploadedToTitle }}</span>
-						<# } #>
-					</label>
-				<# } #>
-				<div class="attachment-compat"></div>
-			</div>
-
-			<div class="actions">
-				<a class="view-attachment" href="{{ data.link }}"><?php _e( 'View attachment page' ); ?></a>
-				<# if ( data.can.save ) { #> |
-					<a href="post.php?post={{ data.id }}&action=edit"><?php _e( 'Edit more details' ); ?></a>
-				<# } #>
-				<# if ( ! data.uploading && data.can.remove ) { #> |
-					<?php if ( MEDIA_TRASH ): ?>
-						<# if ( 'trash' === data.status ) { #>
-							<button type="button" class="button-link untrash-attachment"><?php _e( 'Untrash' ); ?></button>
-						<# } else { #>
-							<button type="button" class="button-link trash-attachment"><?php _ex( 'Trash', 'verb' ); ?></button>
-						<# } #>
-					<?php else: ?>
-						<button type="button" class="button-link delete-attachment"><?php _e( 'Delete Permanently' ); ?></button>
-					<?php endif; ?>
-				<# } #>
-			</div>
-
-		</div>
-	</script>
-
-	<script type="text/html" id="tmpl-attachment">
-		<div class="attachment-preview js--select-attachment type-{{ data.type }} subtype-{{ data.subtype }} {{ data.orientation }}">
-			<div class="thumbnail">
-				<# if ( data.uploading ) { #>
-					<div class="media-progress-bar"><div style="width: {{ data.percent }}%"></div></div>
-				<# } else if ( 'image' === data.type && data.sizes ) { #>
-					<div class="centered">
-						<img src="{{ data.size.url }}" draggable="false" alt="" />
-					</div>
-				<# } else { #>
-					<div class="centered">
-						<# if ( data.image && data.image.src && data.image.src !== data.icon ) { #>
-							<img src="{{ data.image.src }}" class="thumbnail" draggable="false" alt="" />
-						<# } else { #>
-							<img src="{{ data.icon }}" class="icon" draggable="false" alt="" />
-						<# } #>
-					</div>
-					<div class="filename">
-						<div>{{ data.filename }}</div>
-					</div>
-				<# } #>
-			</div>
-			<# if ( data.buttons.close ) { #>
-				<button type="button" class="button-link attachment-close media-modal-icon"><span class="screen-reader-text"><?php _e( 'Remove' ); ?></span></button>
-			<# } #>
-		</div>
-		<# if ( data.buttons.check ) { #>
-			<button type="button" class="button-link check" tabindex="-1"><span class="media-modal-icon"></span><span class="screen-reader-text"><?php _e( 'Deselect' ); ?></span></button>
-		<# } #>
-		<#
-		var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly';
-		if ( data.describe ) {
-			if ( 'image' === data.type ) { #>
-				<input type="text" value="{{ data.caption }}" class="describe" data-setting="caption"
-					placeholder="<?php esc_attr_e('Caption this image&hellip;'); ?>" {{ maybeReadOnly }} />
-			<# } else { #>
-				<input type="text" value="{{ data.title }}" class="describe" data-setting="title"
-					<# if ( 'video' === data.type ) { #>
-						placeholder="<?php esc_attr_e('Describe this video&hellip;'); ?>"
-					<# } else if ( 'audio' === data.type ) { #>
-						placeholder="<?php esc_attr_e('Describe this audio file&hellip;'); ?>"
-					<# } else { #>
-						placeholder="<?php esc_attr_e('Describe this media file&hellip;'); ?>"
-					<# } #> {{ maybeReadOnly }} />
-			<# }
-		} #>
-	</script>
-
-	<script type="text/html" id="tmpl-attachment-details">
-		<h2>
-			<?php _e( 'Attachment Details' ); ?>
-			<span class="settings-save-status">
-				<span class="spinner"></span>
-				<span class="saved"><?php esc_html_e('Saved.'); ?></span>
-			</span>
-		</h2>
-		<div class="attachment-info">
-			<div class="thumbnail thumbnail-{{ data.type }}">
-				<# if ( data.uploading ) { #>
-					<div class="media-progress-bar"><div></div></div>
-				<# } else if ( 'image' === data.type && data.sizes ) { #>
-					<img src="{{ data.size.url }}" draggable="false" alt="" />
-				<# } else { #>
-					<img src="{{ data.icon }}" class="icon" draggable="false" alt="" />
-				<# } #>
-			</div>
-			<div class="details">
-				<div class="filename">{{ data.filename }}</div>
-				<div class="uploaded">{{ data.dateFormatted }}</div>
-
-				<div class="file-size">{{ data.filesizeHumanReadable }}</div>
-				<# if ( 'image' === data.type && ! data.uploading ) { #>
-					<# if ( data.width && data.height ) { #>
-						<div class="dimensions">{{ data.width }} &times; {{ data.height }}</div>
-					<# } #>
-
-					<# if ( data.can.save && data.sizes ) { #>
-						<a class="edit-attachment" href="{{ data.editLink }}&amp;image-editor" target="_blank"><?php _e( 'Edit Image' ); ?></a>
-					<# } #>
-				<# } #>
-
-				<# if ( data.fileLength ) { #>
-					<div class="file-length"><?php _e( 'Length:' ); ?> {{ data.fileLength }}</div>
-				<# } #>
-
-				<# if ( ! data.uploading && data.can.remove ) { #>
-					<?php if ( MEDIA_TRASH ): ?>
-					<# if ( 'trash' === data.status ) { #>
-						<button type="button" class="button-link untrash-attachment"><?php _e( 'Untrash' ); ?></button>
-					<# } else { #>
-						<button type="button" class="button-link trash-attachment"><?php _ex( 'Trash', 'verb' ); ?></button>
-					<# } #>
-					<?php else: ?>
-						<button type="button" class="button-link delete-attachment"><?php _e( 'Delete Permanently' ); ?></button>
-					<?php endif; ?>
-				<# } #>
-
-				<div class="compat-meta">
-					<# if ( data.compat && data.compat.meta ) { #>
-						{{{ data.compat.meta }}}
-					<# } #>
-				</div>
-			</div>
-		</div>
-
-		<label class="setting" data-setting="url">
-			<span class="name"><?php _e('URL'); ?></span>
-			<input type="text" value="{{ data.url }}" readonly />
-		</label>
-		<# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #>
-		<?php if ( post_type_supports( 'attachment', 'title' ) ) : ?>
-		<label class="setting" data-setting="title">
-			<span class="name"><?php _e('Title'); ?></span>
-			<input type="text" value="{{ data.title }}" {{ maybeReadOnly }} />
-		</label>
-		<?php endif; ?>
-		<# if ( 'audio' === data.type ) { #>
-		<?php foreach ( array(
-			'artist' => __( 'Artist' ),
-			'album' => __( 'Album' ),
-		) as $key => $label ) : ?>
-		<label class="setting" data-setting="<?php echo esc_attr( $key ) ?>">
-			<span class="name"><?php echo $label ?></span>
-			<input type="text" value="{{ data.<?php echo $key ?> || data.meta.<?php echo $key ?> || '' }}" />
-		</label>
-		<?php endforeach; ?>
-		<# } #>
-		<label class="setting" data-setting="caption">
-			<span class="name"><?php _e('Caption'); ?></span>
-			<textarea {{ maybeReadOnly }}>{{ data.caption }}</textarea>
-		</label>
-		<# if ( 'image' === data.type ) { #>
-			<label class="setting" data-setting="alt">
-				<span class="name"><?php _e('Alt Text'); ?></span>
-				<input type="text" value="{{ data.alt }}" {{ maybeReadOnly }} />
-			</label>
-		<# } #>
-		<label class="setting" data-setting="description">
-			<span class="name"><?php _e('Description'); ?></span>
-			<textarea {{ maybeReadOnly }}>{{ data.description }}</textarea>
-		</label>
-	</script>
-
-	<script type="text/html" id="tmpl-media-selection">
-		<div class="selection-info">
-			<span class="count"></span>
-			<# if ( data.editable ) { #>
-				<button type="button" class="button-link edit-selection"><?php _e( 'Edit Selection' ); ?></button>
-			<# } #>
-			<# if ( data.clearable ) { #>
-				<button type="button" class="button-link clear-selection"><?php _e( 'Clear' ); ?></button>
-			<# } #>
-		</div>
-		<div class="selection-view"></div>
-	</script>
-
-	<script type="text/html" id="tmpl-attachment-display-settings">
-		<h2><?php _e( 'Attachment Display Settings' ); ?></h2>
-
-		<# if ( 'image' === data.type ) { #>
-			<label class="setting">
-				<span><?php _e('Alignment'); ?></span>
-				<select class="alignment"
-					data-setting="align"
-					<# if ( data.userSettings ) { #>
-						data-user-setting="align"
-					<# } #>>
-
-					<option value="left">
-						<?php esc_html_e( 'Left' ); ?>
-					</option>
-					<option value="center">
-						<?php esc_html_e( 'Center' ); ?>
-					</option>
-					<option value="right">
-						<?php esc_html_e( 'Right' ); ?>
-					</option>
-					<option value="none" selected>
-						<?php esc_html_e( 'None' ); ?>
-					</option>
-				</select>
-			</label>
-		<# } #>
-
-		<div class="setting">
-			<label>
-				<# if ( data.model.canEmbed ) { #>
-					<span><?php _e('Embed or Link'); ?></span>
-				<# } else { #>
-					<span><?php _e('Link To'); ?></span>
-				<# } #>
-
-				<select class="link-to"
-					data-setting="link"
-					<# if ( data.userSettings && ! data.model.canEmbed ) { #>
-						data-user-setting="urlbutton"
-					<# } #>>
-
-				<# if ( data.model.canEmbed ) { #>
-					<option value="embed" selected>
-						<?php esc_html_e( 'Embed Media Player' ); ?>
-					</option>
-					<option value="file">
-				<# } else { #>
-					<option value="none" selected>
-						<?php esc_html_e( 'None' ); ?>
-					</option>
-					<option value="file">
-				<# } #>
-					<# if ( data.model.canEmbed ) { #>
-						<?php esc_html_e( 'Link to Media File' ); ?>
-					<# } else { #>
-						<?php esc_html_e( 'Media File' ); ?>
-					<# } #>
-					</option>
-					<option value="post">
-					<# if ( data.model.canEmbed ) { #>
-						<?php esc_html_e( 'Link to Attachment Page' ); ?>
-					<# } else { #>
-						<?php esc_html_e( 'Attachment Page' ); ?>
-					<# } #>
-					</option>
-				<# if ( 'image' === data.type ) { #>
-					<option value="custom">
-						<?php esc_html_e( 'Custom URL' ); ?>
-					</option>
-				<# } #>
-				</select>
-			</label>
-			<input type="text" class="link-to-custom" data-setting="linkUrl" />
-		</div>
-
-		<# if ( 'undefined' !== typeof data.sizes ) { #>
-			<label class="setting">
-				<span><?php _e('Size'); ?></span>
-				<select class="size" name="size"
-					data-setting="size"
-					<# if ( data.userSettings ) { #>
-						data-user-setting="imgsize"
-					<# } #>>
-					<?php
-					/** This filter is documented in wp-admin/includes/media.php */
-					$sizes = apply_filters( 'image_size_names_choose', array(
-						'thumbnail' => __('Thumbnail'),
-						'medium'    => __('Medium'),
-						'large'     => __('Large'),
-						'full'      => __('Full Size'),
-					) );
-
-					foreach ( $sizes as $value => $name ) : ?>
-						<#
-						var size = data.sizes['<?php echo esc_js( $value ); ?>'];
-						if ( size ) { #>
-							<option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, 'full' ); ?>>
-								<?php echo esc_html( $name ); ?> &ndash; {{ size.width }} &times; {{ size.height }}
-							</option>
-						<# } #>
-					<?php endforeach; ?>
-				</select>
-			</label>
-		<# } #>
-	</script>
-
-	<script type="text/html" id="tmpl-gallery-settings">
-		<h2><?php _e( 'Gallery Settings' ); ?></h2>
-
-		<label class="setting">
-			<span><?php _e('Link To'); ?></span>
-			<select class="link-to"
-				data-setting="link"
-				<# if ( data.userSettings ) { #>
-					data-user-setting="urlbutton"
-				<# } #>>
-
-				<option value="post" <# if ( ! wp.media.galleryDefaults.link || 'post' == wp.media.galleryDefaults.link ) {
-					#>selected="selected"<# }
-				#>>
-					<?php esc_html_e( 'Attachment Page' ); ?>
-				</option>
-				<option value="file" <# if ( 'file' == wp.media.galleryDefaults.link ) { #>selected="selected"<# } #>>
-					<?php esc_html_e( 'Media File' ); ?>
-				</option>
-				<option value="none" <# if ( 'none' == wp.media.galleryDefaults.link ) { #>selected="selected"<# } #>>
-					<?php esc_html_e( 'None' ); ?>
-				</option>
-			</select>
-		</label>
-
-		<label class="setting">
-			<span><?php _e('Columns'); ?></span>
-			<select class="columns" name="columns"
-				data-setting="columns">
-				<?php for ( $i = 1; $i <= 9; $i++ ) : ?>
-					<option value="<?php echo esc_attr( $i ); ?>" <#
-						if ( <?php echo $i ?> == wp.media.galleryDefaults.columns ) { #>selected="selected"<# }
-					#>>
-						<?php echo esc_html( $i ); ?>
-					</option>
-				<?php endfor; ?>
-			</select>
-		</label>
-
-		<label class="setting">
-			<span><?php _e( 'Random Order' ); ?></span>
-			<input type="checkbox" data-setting="_orderbyRandom" />
-		</label>
-
-		<label class="setting size">
-			<span><?php _e( 'Size' ); ?></span>
-			<select class="size" name="size"
-				data-setting="size"
-				<# if ( data.userSettings ) { #>
-					data-user-setting="imgsize"
-				<# } #>
-				>
-				<?php
-				// This filter is documented in wp-admin/includes/media.php
-				$size_names = apply_filters( 'image_size_names_choose', array(
-					'thumbnail' => __( 'Thumbnail' ),
-					'medium'    => __( 'Medium' ),
-					'large'     => __( 'Large' ),
-					'full'      => __( 'Full Size' ),
-				) );
-
-				foreach ( $size_names as $size => $label ) : ?>
-					<option value="<?php echo esc_attr( $size ); ?>">
-						<?php echo esc_html( $label ); ?>
-					</option>
-				<?php endforeach; ?>
-			</select>
-		</label>
-	</script>
-
-	<script type="text/html" id="tmpl-playlist-settings">
-		<h2><?php _e( 'Playlist Settings' ); ?></h2>
-
-		<# var emptyModel = _.isEmpty( data.model ),
-			isVideo = 'video' === data.controller.get('library').props.get('type'); #>
-
-		<label class="setting">
-			<input type="checkbox" data-setting="tracklist" <# if ( emptyModel ) { #>
-				checked="checked"
-			<# } #> />
-			<# if ( isVideo ) { #>
-			<span><?php _e( 'Show Video List' ); ?></span>
-			<# } else { #>
-			<span><?php _e( 'Show Tracklist' ); ?></span>
-			<# } #>
-		</label>
-
-		<# if ( ! isVideo ) { #>
-		<label class="setting">
-			<input type="checkbox" data-setting="artists" <# if ( emptyModel ) { #>
-				checked="checked"
-			<# } #> />
-			<span><?php _e( 'Show Artist Name in Tracklist' ); ?></span>
-		</label>
-		<# } #>
-
-		<label class="setting">
-			<input type="checkbox" data-setting="images" <# if ( emptyModel ) { #>
-				checked="checked"
-			<# } #> />
-			<span><?php _e( 'Show Images' ); ?></span>
-		</label>
-	</script>
-
-	<script type="text/html" id="tmpl-embed-link-settings">
-		<label class="setting link-text">
-			<span><?php _e( 'Link Text' ); ?></span>
-			<input type="text" class="alignment" data-setting="linkText" />
-		</label>
-		<div class="embed-container" style="display: none;">
-			<div class="embed-preview"></div>
-		</div>
-	</script>
-
-	<script type="text/html" id="tmpl-embed-image-settings">
-		<div class="thumbnail">
-			<img src="{{ data.model.url }}" draggable="false" alt="" />
-		</div>
-
-		<?php
-		/** This filter is documented in wp-admin/includes/media.php */
-		if ( ! apply_filters( 'disable_captions', '' ) ) : ?>
-			<label class="setting caption">
-				<span><?php _e('Caption'); ?></span>
-				<textarea data-setting="caption" />
-			</label>
-		<?php endif; ?>
-
-		<label class="setting alt-text">
-			<span><?php _e('Alt Text'); ?></span>
-			<input type="text" data-setting="alt" />
-		</label>
-
-		<div class="setting align">
-			<span><?php _e('Align'); ?></span>
-			<div class="button-group button-large" data-setting="align">
-				<button class="button" value="left">
-					<?php esc_html_e( 'Left' ); ?>
-				</button>
-				<button class="button" value="center">
-					<?php esc_html_e( 'Center' ); ?>
-				</button>
-				<button class="button" value="right">
-					<?php esc_html_e( 'Right' ); ?>
-				</button>
-				<button class="button active" value="none">
-					<?php esc_html_e( 'None' ); ?>
-				</button>
-			</div>
-		</div>
-
-		<div class="setting link-to">
-			<span><?php _e('Link To'); ?></span>
-			<div class="button-group button-large" data-setting="link">
-				<button class="button" value="file">
-					<?php esc_html_e( 'Image URL' ); ?>
-				</button>
-				<button class="button" value="custom">
-					<?php esc_html_e( 'Custom URL' ); ?>
-				</button>
-				<button class="button active" value="none">
-					<?php esc_html_e( 'None' ); ?>
-				</button>
-			</div>
-			<input type="text" class="link-to-custom" data-setting="linkUrl" />
-		</div>
-	</script>
-
-	<script type="text/html" id="tmpl-image-details">
-		<div class="media-embed">
-			<div class="embed-media-settings">
-				<div class="column-image">
-					<div class="image">
-						<img src="{{ data.model.url }}" draggable="false" alt="" />
-
-						<# if ( data.attachment && window.imageEdit ) { #>
-							<div class="actions">
-								<input type="button" class="edit-attachment button" value="<?php esc_attr_e( 'Edit Original' ); ?>" />
-								<input type="button" class="replace-attachment button" value="<?php esc_attr_e( 'Replace' ); ?>" />
-							</div>
-						<# } #>
-					</div>
-				</div>
-				<div class="column-settings">
-					<?php
-					/** This filter is documented in wp-admin/includes/media.php */
-					if ( ! apply_filters( 'disable_captions', '' ) ) : ?>
-						<label class="setting caption">
-							<span><?php _e('Caption'); ?></span>
-							<textarea data-setting="caption">{{ data.model.caption }}</textarea>
-						</label>
-					<?php endif; ?>
-
-					<label class="setting alt-text">
-						<span><?php _e('Alternative Text'); ?></span>
-						<input type="text" data-setting="alt" value="{{ data.model.alt }}" />
-					</label>
-
-					<h2><?php _e( 'Display Settings' ); ?></h2>
-					<div class="setting align">
-						<span><?php _e('Align'); ?></span>
-						<div class="button-group button-large" data-setting="align">
-							<button class="button" value="left">
-								<?php esc_html_e( 'Left' ); ?>
-							</button>
-							<button class="button" value="center">
-								<?php esc_html_e( 'Center' ); ?>
-							</button>
-							<button class="button" value="right">
-								<?php esc_html_e( 'Right' ); ?>
-							</button>
-							<button class="button active" value="none">
-								<?php esc_html_e( 'None' ); ?>
-							</button>
-						</div>
-					</div>
-
-					<# if ( data.attachment ) { #>
-						<# if ( 'undefined' !== typeof data.attachment.sizes ) { #>
-							<label class="setting size">
-								<span><?php _e('Size'); ?></span>
-								<select class="size" name="size"
-									data-setting="size"
-									<# if ( data.userSettings ) { #>
-										data-user-setting="imgsize"
-									<# } #>>
-									<?php
-									/** This filter is documented in wp-admin/includes/media.php */
-									$sizes = apply_filters( 'image_size_names_choose', array(
-										'thumbnail' => __('Thumbnail'),
-										'medium'    => __('Medium'),
-										'large'     => __('Large'),
-										'full'      => __('Full Size'),
-									) );
-
-									foreach ( $sizes as $value => $name ) : ?>
-										<#
-										var size = data.sizes['<?php echo esc_js( $value ); ?>'];
-										if ( size ) { #>
-											<option value="<?php echo esc_attr( $value ); ?>">
-												<?php echo esc_html( $name ); ?> &ndash; {{ size.width }} &times; {{ size.height }}
-											</option>
-										<# } #>
-									<?php endforeach; ?>
-									<option value="<?php echo esc_attr( 'custom' ); ?>">
-										<?php _e( 'Custom Size' ); ?>
-									</option>
-								</select>
-							</label>
-						<# } #>
-							<div class="custom-size<# if ( data.model.size !== 'custom' ) { #> hidden<# } #>">
-								<label><span><?php _e( 'Width' ); ?> <small>(px)</small></span> <input data-setting="customWidth" type="number" step="1" value="{{ data.model.customWidth }}" /></label><span class="sep">&times;</span><label><span><?php _e( 'Height' ); ?> <small>(px)</small></span><input data-setting="customHeight" type="number" step="1" value="{{ data.model.customHeight }}" /></label>
-							</div>
-					<# } #>
-
-					<div class="setting link-to">
-						<span><?php _e('Link To'); ?></span>
-						<select data-setting="link">
-						<# if ( data.attachment ) { #>
-							<option value="file">
-								<?php esc_html_e( 'Media File' ); ?>
-							</option>
-							<option value="post">
-								<?php esc_html_e( 'Attachment Page' ); ?>
-							</option>
-						<# } else { #>
-							<option value="file">
-								<?php esc_html_e( 'Image URL' ); ?>
-							</option>
-						<# } #>
-							<option value="custom">
-								<?php esc_html_e( 'Custom URL' ); ?>
-							</option>
-							<option value="none">
-								<?php esc_html_e( 'None' ); ?>
-							</option>
-						</select>
-						<input type="text" class="link-to-custom" data-setting="linkUrl" />
-					</div>
-					<div class="advanced-section">
-						<h2><button type="button" class="button-link advanced-toggle"><?php _e( 'Advanced Options' ); ?></button></h2>
-						<div class="advanced-settings hidden">
-							<div class="advanced-image">
-								<label class="setting title-text">
-									<span><?php _e('Image Title Attribute'); ?></span>
-									<input type="text" data-setting="title" value="{{ data.model.title }}" />
-								</label>
-								<label class="setting extra-classes">
-									<span><?php _e('Image CSS Class'); ?></span>
-									<input type="text" data-setting="extraClasses" value="{{ data.model.extraClasses }}" />
-								</label>
-							</div>
-							<div class="advanced-link">
-								<div class="setting link-target">
-									<label><input type="checkbox" data-setting="linkTargetBlank" value="_blank" <# if ( data.model.linkTargetBlank ) { #>checked="checked"<# } #>><?php _e( 'Open link in a new tab' ); ?></label>
-								</div>
-								<label class="setting link-rel">
-									<span><?php _e('Link Rel'); ?></span>
-									<input type="text" data-setting="linkRel" value="{{ data.model.linkClassName }}" />
-								</label>
-								<label class="setting link-class-name">
-									<span><?php _e('Link CSS Class'); ?></span>
-									<input type="text" data-setting="linkClassName" value="{{ data.model.linkClassName }}" />
-								</label>
-							</div>
-						</div>
-					</div>
-				</div>
-			</div>
-		</div>
-	</script>
-
-	<script type="text/html" id="tmpl-image-editor">
-		<div id="media-head-{{ data.id }}"></div>
-		<div id="image-editor-{{ data.id }}"></div>
-	</script>
-
-	<script type="text/html" id="tmpl-audio-details">
-		<# var ext, html5types = {
-			mp3: wp.media.view.settings.embedMimes.mp3,
-			ogg: wp.media.view.settings.embedMimes.ogg
-		}; #>
-
-		<?php $audio_types = wp_get_audio_extensions(); ?>
-		<div class="media-embed media-embed-details">
-			<div class="embed-media-settings embed-audio-settings">
-				<?php wp_underscore_audio_template() ?>
-
-				<# if ( ! _.isEmpty( data.model.src ) ) {
-					ext = data.model.src.split('.').pop();
-					if ( html5types[ ext ] ) {
-						delete html5types[ ext ];
-					}
-				#>
-				<label class="setting">
-					<span>SRC</span>
-					<input type="text" disabled="disabled" data-setting="src" value="{{ data.model.src }}" />
-					<button type="button" class="button-link remove-setting"><?php _e( 'Remove audio source' ); ?></button>
-				</label>
-				<# } #>
-				<?php
-
-				foreach ( $audio_types as $type ):
-				?><# if ( ! _.isEmpty( data.model.<?php echo $type ?> ) ) {
-					if ( ! _.isUndefined( html5types.<?php echo $type ?> ) ) {
-						delete html5types.<?php echo $type ?>;
-					}
-				#>
-				<label class="setting">
-					<span><?php echo strtoupper( $type ) ?></span>
-					<input type="text" disabled="disabled" data-setting="<?php echo $type ?>" value="{{ data.model.<?php echo $type ?> }}" />
-					<button type="button" class="button-link remove-setting"><?php _e( 'Remove audio source' ); ?></button>
-				</label>
-				<# } #>
-				<?php endforeach ?>
-
-				<# if ( ! _.isEmpty( html5types ) ) { #>
-				<div class="setting">
-					<span><?php _e( 'Add alternate sources for maximum HTML5 playback:' ) ?></span>
-					<div class="button-large">
-					<# _.each( html5types, function (mime, type) { #>
-					<button class="button add-media-source" data-mime="{{ mime }}">{{ type }}</button>
-					<# } ) #>
-					</div>
-				</div>
-				<# } #>
-
-				<div class="setting preload">
-					<span><?php _e( 'Preload' ); ?></span>
-					<div class="button-group button-large" data-setting="preload">
-						<button class="button" value="auto"><?php _ex( 'Auto', 'auto preload' ); ?></button>
-						<button class="button" value="metadata"><?php _e( 'Metadata' ); ?></button>
-						<button class="button active" value="none"><?php _e( 'None' ); ?></button>
-					</div>
-				</div>
-
-				<label class="setting checkbox-setting">
-					<input type="checkbox" data-setting="autoplay" />
-					<span><?php _e( 'Autoplay' ); ?></span>
-				</label>
-
-				<label class="setting checkbox-setting">
-					<input type="checkbox" data-setting="loop" />
-					<span><?php _e( 'Loop' ); ?></span>
-				</label>
-			</div>
-		</div>
-	</script>
-
-	<script type="text/html" id="tmpl-video-details">
-		<# var ext, html5types = {
-			mp4: wp.media.view.settings.embedMimes.mp4,
-			ogv: wp.media.view.settings.embedMimes.ogv,
-			webm: wp.media.view.settings.embedMimes.webm
-		}; #>
-
-		<?php $video_types = wp_get_video_extensions(); ?>
-		<div class="media-embed media-embed-details">
-			<div class="embed-media-settings embed-video-settings">
-				<div class="wp-video-holder">
-				<#
-				var w = ! data.model.width || data.model.width > 640 ? 640 : data.model.width,
-					h = ! data.model.height ? 360 : data.model.height;
-
-				if ( data.model.width && w !== data.model.width ) {
-					h = Math.ceil( ( h * w ) / data.model.width );
-				}
-				#>
-
-				<?php wp_underscore_video_template() ?>
-
-				<# if ( ! _.isEmpty( data.model.src ) ) {
-					ext = data.model.src.split('.').pop();
-					if ( html5types[ ext ] ) {
-						delete html5types[ ext ];
-					}
-				#>
-				<label class="setting">
-					<span>SRC</span>
-					<input type="text" disabled="disabled" data-setting="src" value="{{ data.model.src }}" />
-					<button type="button" class="button-link remove-setting"><?php _e( 'Remove video source' ); ?></button>
-				</label>
-				<# } #>
-				<?php foreach ( $video_types as $type ):
-				?><# if ( ! _.isEmpty( data.model.<?php echo $type ?> ) ) {
-					if ( ! _.isUndefined( html5types.<?php echo $type ?> ) ) {
-						delete html5types.<?php echo $type ?>;
-					}
-				#>
-				<label class="setting">
-					<span><?php echo strtoupper( $type ) ?></span>
-					<input type="text" disabled="disabled" data-setting="<?php echo $type ?>" value="{{ data.model.<?php echo $type ?> }}" />
-					<button type="button" class="button-link remove-setting"><?php _e( 'Remove video source' ); ?></button>
-				</label>
-				<# } #>
-				<?php endforeach ?>
-				</div>
-
-				<# if ( ! _.isEmpty( html5types ) ) { #>
-				<div class="setting">
-					<span><?php _e( 'Add alternate sources for maximum HTML5 playback:' ); ?></span>
-					<div class="button-large">
-					<# _.each( html5types, function (mime, type) { #>
-					<button class="button add-media-source" data-mime="{{ mime }}">{{ type }}</button>
-					<# } ) #>
-					</div>
-				</div>
-				<# } #>
-
-				<# if ( ! _.isEmpty( data.model.poster ) ) { #>
-				<label class="setting">
-					<span><?php _e( 'Poster Image' ); ?></span>
-					<input type="text" disabled="disabled" data-setting="poster" value="{{ data.model.poster }}" />
-					<button type="button" class="button-link remove-setting"><?php _e( 'Remove poster image' ); ?></button>
-				</label>
-				<# } #>
-				<div class="setting preload">
-					<span><?php _e( 'Preload' ); ?></span>
-					<div class="button-group button-large" data-setting="preload">
-						<button class="button" value="auto"><?php _ex( 'Auto', 'auto preload' ); ?></button>
-						<button class="button" value="metadata"><?php _e( 'Metadata' ); ?></button>
-						<button class="button active" value="none"><?php _e( 'None' ); ?></button>
-					</div>
-				</div>
-
-				<label class="setting checkbox-setting">
-					<input type="checkbox" data-setting="autoplay" />
-					<span><?php _e( 'Autoplay' ); ?></span>
-				</label>
-
-				<label class="setting checkbox-setting">
-					<input type="checkbox" data-setting="loop" />
-					<span><?php _e( 'Loop' ); ?></span>
-				</label>
-
-				<label class="setting" data-setting="content">
-					<span><?php _e( 'Tracks (subtitles, captions, descriptions, chapters, or metadata)' ); ?></span>
-					<#
-					var content = '';
-					if ( ! _.isEmpty( data.model.content ) ) {
-						var tracks = jQuery( data.model.content ).filter( 'track' );
-						_.each( tracks.toArray(), function (track) {
-							content += track.outerHTML; #>
-						<p>
-							<input class="content-track" type="text" value="{{ track.outerHTML }}" />
-							<button type="button" class="button-link remove-setting remove-track"><?php _ex( 'Remove video track', 'media' ); ?></button>
-						</p>
-						<# } ); #>
-					<# } else { #>
-					<em><?php _e( 'There are no associated subtitles.' ); ?></em>
-					<# } #>
-					<textarea class="hidden content-setting">{{ content }}</textarea>
-				</label>
-			</div>
-		</div>
-	</script>
-
-	<script type="text/html" id="tmpl-editor-gallery">
-		<# if ( data.attachments.length ) { #>
-			<div class="gallery gallery-columns-{{ data.columns }}">
-				<# _.each( data.attachments, function( attachment, index ) { #>
-					<dl class="gallery-item">
-						<dt class="gallery-icon">
-							<# if ( attachment.thumbnail ) { #>
-								<img src="{{ attachment.thumbnail.url }}" width="{{ attachment.thumbnail.width }}" height="{{ attachment.thumbnail.height }}" alt="" />
-							<# } else { #>
-								<img src="{{ attachment.url }}" alt="" />
-							<# } #>
-						</dt>
-						<# if ( attachment.caption ) { #>
-							<dd class="wp-caption-text gallery-caption">
-								{{{ data.verifyHTML( attachment.caption ) }}}
-							</dd>
-						<# } #>
-					</dl>
-					<# if ( index % data.columns === data.columns - 1 ) { #>
-						<br style="clear: both;">
-					<# } #>
-				<# } ); #>
-			</div>
-		<# } else { #>
-			<div class="wpview-error">
-				<div class="dashicons dashicons-format-gallery"></div><p><?php _e( 'No items found.' ); ?></p>
-			</div>
-		<# } #>
-	</script>
-
-	<script type="text/html" id="tmpl-crop-content">
-		<img class="crop-image" src="{{ data.url }}" alt="<?php esc_attr_e( 'Image crop area preview. Requires mouse interaction.' ); ?>">
-		<div class="upload-errors"></div>
-	</script>
-
-	<script type="text/html" id="tmpl-site-icon-preview">
-		<h2><?php _e( 'Preview' ); ?></h2>
-		<strong aria-hidden="true"><?php _e( 'As a browser icon' ); ?></strong>
-		<div class="favicon-preview">
-			<img src="<?php echo esc_url( admin_url( 'images/' . ( is_rtl() ? 'browser-rtl.png' : 'browser.png' ) ) ); ?>" class="browser-preview" width="182" height="" alt="" />
-
-			<div class="favicon">
-				<img id="preview-favicon" src="{{ data.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/>
-			</div>
-			<span class="browser-title" aria-hidden="true"><?php bloginfo( 'name' ); ?></span>
-		</div>
-
-		<strong aria-hidden="true"><?php _e( 'As an app icon' ); ?></strong>
-		<div class="app-icon-preview">
-			<img id="preview-app-icon" src="{{ data.url }}" alt="<?php esc_attr_e( 'Preview as an app icon' ); ?>"/>
-		</div>
-	</script>
-
-	<?php
-
-	/**
-	 * Fires when the custom Backbone media templates are printed.
-	 *
-	 * @since 3.5.0
-	 */
-	do_action( 'print_media_templates' );
-}
Index: www/wp-includes/wp-diff.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/wp-diff.php	(revision 38565)
+++ www/wp-includes/wp-diff.php	(revision 38565)
@@ -1,21 +0,0 @@
-<?php
-/**
- * WordPress Diff bastard child of old MediaWiki Diff Formatter.
- *
- * Basically all that remains is the table structure and some method names.
- *
- * @package WordPress
- * @subpackage Diff
- */
-
-if ( ! class_exists( 'Text_Diff', false ) ) {
-	/** Text_Diff class */
-	require( ABSPATH . WPINC . '/Text/Diff.php' );
-	/** Text_Diff_Renderer class */
-	require( ABSPATH . WPINC . '/Text/Diff/Renderer.php' );
-	/** Text_Diff_Renderer_inline class */
-	require( ABSPATH . WPINC . '/Text/Diff/Renderer/inline.php' );
-}
-
-require( ABSPATH . WPINC . '/class-wp-text-diff-renderer-table.php' );
-require( ABSPATH . WPINC . '/class-wp-text-diff-renderer-inline.php' );
\ No newline at end of file
Index: www/wp-includes/autoload/customize/class-wp-customize-nav-menus-panel.php
===================================================================
--- www/wp-includes/autoload/customize/class-wp-customize-nav-menus-panel.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/customize/class-wp-customize-nav-menus-panel.php	(revision UNDEFINED)
@@ -1,100 +0,0 @@
-<?php
-/**
- * Customize API: WP_Customize_Nav_Menus_Panel class
- *
- * @package WordPress
- * @subpackage Customize
- * @since 4.4.0
- */
-
-/**
- * Customize Nav Menus Panel Class
- *
- * Needed to add screen options.
- *
- * @since 4.3.0
- *
- * @see WP_Customize_Panel
- */
-class WP_Customize_Nav_Menus_Panel extends WP_Customize_Panel {
-
-	/**
-	 * Control type.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var string
-	 */
-	public $type = 'nav_menus';
-
-	/**
-	 * Render screen options for Menus.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 */
-	public function render_screen_options() {
-		// Adds the screen options.
-		require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
-		add_filter( 'manage_nav-menus_columns', 'wp_nav_menu_manage_columns' );
-
-		// Display screen options.
-		$screen = WP_Screen::get( 'nav-menus.php' );
-		$screen->render_screen_options( array( 'wrap' => false ) );
-	}
-
-	/**
-	 * Returns the advanced options for the nav menus page.
-	 *
-	 * Link title attribute added as it's a relatively advanced concept for new users.
-	 *
-	 * @since 4.3.0
-	 * @deprecated 4.5.0 Deprecated in favor of wp_nav_menu_manage_columns().
-	 */
-	public function wp_nav_menu_manage_columns() {
-		_deprecated_function( __METHOD__, '4.5.0', 'wp_nav_menu_manage_columns' );
-		require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
-		return wp_nav_menu_manage_columns();
-	}
-
-	/**
-	 * An Underscore (JS) template for this panel's content (but not its container).
-	 *
-	 * Class variables for this panel class are available in the `data` JS object;
-	 * export custom variables by overriding WP_Customize_Panel::json().
-	 *
-	 * @since 4.3.0
-	 * @access protected
-	 *
-	 * @see WP_Customize_Panel::print_template()
-	 */
-	protected function content_template() {
-		?>
-		<li class="panel-meta customize-info accordion-section <# if ( ! data.description ) { #> cannot-expand<# } #>">
-			<button type="button" class="customize-panel-back" tabindex="-1">
-				<span class="screen-reader-text"><?php _e( 'Back' ); ?></span>
-			</button>
-			<div class="accordion-section-title">
-				<span class="preview-notice">
-					<?php
-					/* translators: %s: the site/panel title in the Customizer */
-					printf( __( 'You are customizing %s' ), '<strong class="panel-title">{{ data.title }}</strong>' );
-					?>
-				</span>
-				<button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false">
-					<span class="screen-reader-text"><?php _e( 'Help' ); ?></span>
-				</button>
-				<button type="button" class="customize-screen-options-toggle" aria-expanded="false">
-					<span class="screen-reader-text"><?php _e( 'Menu Options' ); ?></span>
-				</button>
-			</div>
-			<# if ( data.description ) { #>
-			<div class="description customize-panel-description">{{{ data.description }}}</div>
-			<# } #>
-			<div id="screen-options-wrap">
-				<?php $this->render_screen_options(); ?>
-			</div>
-		</li>
-	<?php
-	}
-}
Index: www/wp-includes/ms-functions.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/ms-functions.php	(revision 38565)
+++ www/wp-includes/ms-functions.php	(revision 38565)
@@ -1,2425 +0,0 @@
-<?php
-/**
- * Multisite WordPress API
- *
- * @package WordPress
- * @subpackage Multisite
- * @since 3.0.0
- */
-
-/**
- * Gets the network's site and user counts.
- *
- * @since MU 1.0
- *
- * @return array Site and user count for the network.
- */
-function get_sitestats() {
-	$stats = array(
-		'blogs' => get_blog_count(),
-		'users' => get_user_count(),
-	);
-
-	return $stats;
-}
-
-/**
- * Get one of a user's active blogs
- *
- * Returns the user's primary blog, if they have one and
- * it is active. If it's inactive, function returns another
- * active blog of the user. If none are found, the user
- * is added as a Subscriber to the Dashboard Blog and that blog
- * is returned.
- *
- * @since MU 1.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int $user_id The unique ID of the user
- * @return WP_Site|void The blog object
- */
-function get_active_blog_for_user( $user_id ) {
-	global $wpdb;
-	$blogs = get_blogs_of_user( $user_id );
-	if ( empty( $blogs ) )
-		return;
-
-	if ( !is_multisite() )
-		return $blogs[$wpdb->blogid];
-
-	$primary_blog = get_user_meta( $user_id, 'primary_blog', true );
-	$first_blog = current($blogs);
-	if ( false !== $primary_blog ) {
-		if ( ! isset( $blogs[ $primary_blog ] ) ) {
-			update_user_meta( $user_id, 'primary_blog', $first_blog->userblog_id );
-			$primary = get_blog_details( $first_blog->userblog_id );
-		} else {
-			$primary = get_blog_details( $primary_blog );
-		}
-	} else {
-		//TODO Review this call to add_user_to_blog too - to get here the user must have a role on this blog?
-		add_user_to_blog( $first_blog->userblog_id, $user_id, 'subscriber' );
-		update_user_meta( $user_id, 'primary_blog', $first_blog->userblog_id );
-		$primary = $first_blog;
-	}
-
-	if ( ( ! is_object( $primary ) ) || ( $primary->archived == 1 || $primary->spam == 1 || $primary->deleted == 1 ) ) {
-		$blogs = get_blogs_of_user( $user_id, true ); // if a user's primary blog is shut down, check their other blogs.
-		$ret = false;
-		if ( is_array( $blogs ) && count( $blogs ) > 0 ) {
-			foreach ( (array) $blogs as $blog_id => $blog ) {
-				if ( $blog->site_id != $wpdb->siteid )
-					continue;
-				$details = get_blog_details( $blog_id );
-				if ( is_object( $details ) && $details->archived == 0 && $details->spam == 0 && $details->deleted == 0 ) {
-					$ret = $blog;
-					if ( get_user_meta( $user_id , 'primary_blog', true ) != $blog_id )
-						update_user_meta( $user_id, 'primary_blog', $blog_id );
-					if ( !get_user_meta($user_id , 'source_domain', true) )
-						update_user_meta( $user_id, 'source_domain', $blog->domain );
-					break;
-				}
-			}
-		} else {
-			return;
-		}
-		return $ret;
-	} else {
-		return $primary;
-	}
-}
-
-/**
- * The number of active users in your installation.
- *
- * The count is cached and updated twice daily. This is not a live count.
- *
- * @since MU 2.7
- *
- * @return int
- */
-function get_user_count() {
-	return get_site_option( 'user_count' );
-}
-
-/**
- * The number of active sites on your installation.
- *
- * The count is cached and updated twice daily. This is not a live count.
- *
- * @since MU 1.0
- *
- * @param int $network_id Deprecated, not supported.
- * @return int
- */
-function get_blog_count( $network_id = 0 ) {
-	if ( func_num_args() )
-		_deprecated_argument( __FUNCTION__, '3.1.0' );
-
-	return get_site_option( 'blog_count' );
-}
-
-/**
- * Get a blog post from any site on the network.
- *
- * @since MU 1.0
- *
- * @param int $blog_id ID of the blog.
- * @param int $post_id ID of the post you're looking for.
- * @return WP_Post|null WP_Post on success or null on failure
- */
-function get_blog_post( $blog_id, $post_id ) {
-	switch_to_blog( $blog_id );
-	$post = get_post( $post_id );
-	restore_current_blog();
-
-	return $post;
-}
-
-/**
- * Adds a user to a blog.
- *
- * Use the {@see 'add_user_to_blog'} action to fire an event when users are added to a blog.
- *
- * @since MU 1.0
- *
- * @param int    $blog_id ID of the blog you're adding the user to.
- * @param int    $user_id ID of the user you're adding.
- * @param string $role    The role you want the user to have
- * @return true|WP_Error
- */
-function add_user_to_blog( $blog_id, $user_id, $role ) {
-	switch_to_blog($blog_id);
-
-	$user = get_userdata( $user_id );
-
-	if ( ! $user ) {
-		restore_current_blog();
-		return new WP_Error( 'user_does_not_exist', __( 'The requested user does not exist.' ) );
-	}
-
-	if ( !get_user_meta($user_id, 'primary_blog', true) ) {
-		update_user_meta($user_id, 'primary_blog', $blog_id);
-		$details = get_blog_details($blog_id);
-		update_user_meta($user_id, 'source_domain', $details->domain);
-	}
-
-	$user->set_role($role);
-
-	/**
-	 * Fires immediately after a user is added to a site.
-	 *
-	 * @since MU
-	 *
-	 * @param int    $user_id User ID.
-	 * @param string $role    User role.
-	 * @param int    $blog_id Blog ID.
-	 */
-	do_action( 'add_user_to_blog', $user_id, $role, $blog_id );
-	wp_cache_delete( $user_id, 'users' );
-	wp_cache_delete( $blog_id . '_user_count', 'blog-details' );
-	restore_current_blog();
-	return true;
-}
-
-/**
- * Remove a user from a blog.
- *
- * Use the {@see 'remove_user_from_blog'} action to fire an event when
- * users are removed from a blog.
- *
- * Accepts an optional `$reassign` parameter, if you want to
- * reassign the user's blog posts to another user upon removal.
- *
- * @since MU 1.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int    $user_id  ID of the user you're removing.
- * @param int    $blog_id  ID of the blog you're removing the user from.
- * @param string $reassign Optional. A user to whom to reassign posts.
- * @return true|WP_Error
- */
-function remove_user_from_blog($user_id, $blog_id = '', $reassign = '') {
-	global $wpdb;
-	switch_to_blog($blog_id);
-	$user_id = (int) $user_id;
-	/**
-	 * Fires before a user is removed from a site.
-	 *
-	 * @since MU
-	 *
-	 * @param int $user_id User ID.
-	 * @param int $blog_id Blog ID.
-	 */
-	do_action( 'remove_user_from_blog', $user_id, $blog_id );
-
-	// If being removed from the primary blog, set a new primary if the user is assigned
-	// to multiple blogs.
-	$primary_blog = get_user_meta($user_id, 'primary_blog', true);
-	if ( $primary_blog == $blog_id ) {
-		$new_id = '';
-		$new_domain = '';
-		$blogs = get_blogs_of_user($user_id);
-		foreach ( (array) $blogs as $blog ) {
-			if ( $blog->userblog_id == $blog_id )
-				continue;
-			$new_id = $blog->userblog_id;
-			$new_domain = $blog->domain;
-			break;
-		}
-
-		update_user_meta($user_id, 'primary_blog', $new_id);
-		update_user_meta($user_id, 'source_domain', $new_domain);
-	}
-
-	// wp_revoke_user($user_id);
-	$user = get_userdata( $user_id );
-	if ( ! $user ) {
-		restore_current_blog();
-		return new WP_Error('user_does_not_exist', __('That user does not exist.'));
-	}
-
-	$user->remove_all_caps();
-
-	$blogs = get_blogs_of_user($user_id);
-	if ( count($blogs) == 0 ) {
-		update_user_meta($user_id, 'primary_blog', '');
-		update_user_meta($user_id, 'source_domain', '');
-	}
-
-	if ( $reassign != '' ) {
-		$reassign = (int) $reassign;
-		$post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_author = %d", $user_id ) );
-		$link_ids = $wpdb->get_col( $wpdb->prepare( "SELECT link_id FROM $wpdb->links WHERE link_owner = %d", $user_id ) );
-
-		if ( ! empty( $post_ids ) ) {
-			$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET post_author = %d WHERE post_author = %d", $reassign, $user_id ) );
-			array_walk( $post_ids, 'clean_post_cache' );
-		}
-
-		if ( ! empty( $link_ids ) ) {
-			$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->links SET link_owner = %d WHERE link_owner = %d", $reassign, $user_id ) );
-			array_walk( $link_ids, 'clean_bookmark_cache' );
-		}
-	}
-
-	restore_current_blog();
-
-	return true;
-}
-
-/**
- * Get the permalink for a post on another blog.
- *
- * @since MU 1.0
- *
- * @param int $blog_id ID of the source blog.
- * @param int $post_id ID of the desired post.
- * @return string The post's permalink
- */
-function get_blog_permalink( $blog_id, $post_id ) {
-	switch_to_blog( $blog_id );
-	$link = get_permalink( $post_id );
-	restore_current_blog();
-
-	return $link;
-}
-
-/**
- * Get a blog's numeric ID from its URL.
- *
- * On a subdirectory installation like example.com/blog1/,
- * $domain will be the root 'example.com' and $path the
- * subdirectory '/blog1/'. With subdomains like blog1.example.com,
- * $domain is 'blog1.example.com' and $path is '/'.
- *
- * @since MU 2.6.5
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $domain
- * @param string $path   Optional. Not required for subdomain installations.
- * @return int 0 if no blog found, otherwise the ID of the matching blog
- */
-function get_blog_id_from_url( $domain, $path = '/' ) {
-	$domain = strtolower( $domain );
-	$path = strtolower( $path );
-	$id = wp_cache_get( md5( $domain . $path ), 'blog-id-cache' );
-
-	if ( $id == -1 ) // blog does not exist
-		return 0;
-	elseif ( $id )
-		return (int) $id;
-
-	$args = array(
-		'domain' => $domain,
-		'path' => $path,
-		'fields' => 'ids',
-	);
-	$result = get_sites( $args );
-	$id = array_shift( $result );
-
-	if ( ! $id ) {
-		wp_cache_set( md5( $domain . $path ), -1, 'blog-id-cache' );
-		return 0;
-	}
-
-	wp_cache_set( md5( $domain . $path ), $id, 'blog-id-cache' );
-
-	return $id;
-}
-
-// Admin functions
-
-/**
- * Checks an email address against a list of banned domains.
- *
- * This function checks against the Banned Email Domains list
- * at wp-admin/network/settings.php. The check is only run on
- * self-registrations; user creation at wp-admin/network/users.php
- * bypasses this check.
- *
- * @since MU
- *
- * @param string $user_email The email provided by the user at registration.
- * @return bool Returns true when the email address is banned.
- */
-function is_email_address_unsafe( $user_email ) {
-	$banned_names = get_site_option( 'banned_email_domains' );
-	if ( $banned_names && ! is_array( $banned_names ) )
-		$banned_names = explode( "\n", $banned_names );
-
-	$is_email_address_unsafe = false;
-
-	if ( $banned_names && is_array( $banned_names ) ) {
-		$banned_names = array_map( 'strtolower', $banned_names );
-		$normalized_email = strtolower( $user_email );
-
-		list( $email_local_part, $email_domain ) = explode( '@', $normalized_email );
-
-		foreach ( $banned_names as $banned_domain ) {
-			if ( ! $banned_domain )
-				continue;
-
-			if ( $email_domain == $banned_domain ) {
-				$is_email_address_unsafe = true;
-				break;
-			}
-
-			$dotted_domain = ".$banned_domain";
-			if ( $dotted_domain === substr( $normalized_email, -strlen( $dotted_domain ) ) ) {
-				$is_email_address_unsafe = true;
-				break;
-			}
-		}
-	}
-
-	/**
-	 * Filters whether an email address is unsafe.
-	 *
-	 * @since 3.5.0
-	 *
-	 * @param bool   $is_email_address_unsafe Whether the email address is "unsafe". Default false.
-	 * @param string $user_email              User email address.
-	 */
-	return apply_filters( 'is_email_address_unsafe', $is_email_address_unsafe, $user_email );
-}
-
-/**
- * Sanitize and validate data required for a user sign-up.
- *
- * Verifies the validity and uniqueness of user names and user email addresses,
- * and checks email addresses against admin-provided domain whitelists and blacklists.
- *
- * The {@see 'wpmu_validate_user_signup'} hook provides an easy way to modify the sign-up
- * process. The value $result, which is passed to the hook, contains both the user-provided
- * info and the error messages created by the function. {@see 'wpmu_validate_user_signup'}
- * allows you to process the data in any way you'd like, and unset the relevant errors if
- * necessary.
- *
- * @since MU
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $user_name  The login name provided by the user.
- * @param string $user_email The email provided by the user.
- * @return array Contains username, email, and error messages.
- */
-function wpmu_validate_user_signup($user_name, $user_email) {
-	global $wpdb;
-
-	$errors = new WP_Error();
-
-	$orig_username = $user_name;
-	$user_name = preg_replace( '/\s+/', '', sanitize_user( $user_name, true ) );
-
-	if ( $user_name != $orig_username || preg_match( '/[^a-z0-9]/', $user_name ) ) {
-		$errors->add( 'user_name', __( 'Usernames can only contain lowercase letters (a-z) and numbers.' ) );
-		$user_name = $orig_username;
-	}
-
-	$user_email = sanitize_email( $user_email );
-
-	if ( empty( $user_name ) )
-	   	$errors->add('user_name', __( 'Please enter a username.' ) );
-
-	$illegal_names = get_site_option( 'illegal_names' );
-	if ( ! is_array( $illegal_names ) ) {
-		$illegal_names = array(  'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator' );
-		add_site_option( 'illegal_names', $illegal_names );
-	}
-	if ( in_array( $user_name, $illegal_names ) ) {
-		$errors->add( 'user_name',  __( 'Sorry, that username is not allowed.' ) );
-	}
-
-	/** This filter is documented in wp-includes/user.php */
-	$illegal_logins = (array) apply_filters( 'illegal_user_logins', array() );
-
-	if ( in_array( strtolower( $user_name ), array_map( 'strtolower', $illegal_logins ) ) ) {
-		$errors->add( 'user_name',  __( 'Sorry, that username is not allowed.' ) );
-	}
-
-	if ( is_email_address_unsafe( $user_email ) )
-		$errors->add('user_email',  __('You cannot use that email address to signup. We are having problems with them blocking some of our email. Please use another email provider.'));
-
-	if ( strlen( $user_name ) < 4 )
-		$errors->add('user_name',  __( 'Username must be at least 4 characters.' ) );
-
-	if ( strlen( $user_name ) > 60 ) {
-		$errors->add( 'user_name', __( 'Username may not be longer than 60 characters.' ) );
-	}
-
-	// all numeric?
-	if ( preg_match( '/^[0-9]*$/', $user_name ) )
-		$errors->add('user_name', __('Sorry, usernames must have letters too!'));
-
-	if ( !is_email( $user_email ) )
-		$errors->add('user_email', __( 'Please enter a valid email address.' ) );
-
-	$limited_email_domains = get_site_option( 'limited_email_domains' );
-	if ( is_array( $limited_email_domains ) && ! empty( $limited_email_domains ) ) {
-		$emaildomain = substr( $user_email, 1 + strpos( $user_email, '@' ) );
-		if ( ! in_array( $emaildomain, $limited_email_domains ) ) {
-			$errors->add('user_email', __('Sorry, that email address is not allowed!'));
-		}
-	}
-
-	// Check if the username has been used already.
-	if ( username_exists($user_name) )
-		$errors->add( 'user_name', __( 'Sorry, that username already exists!' ) );
-
-	// Check if the email address has been used already.
-	if ( email_exists($user_email) )
-		$errors->add( 'user_email', __( 'Sorry, that email address is already used!' ) );
-
-	// Has someone already signed up for this username?
-	$signup = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->signups WHERE user_login = %s", $user_name) );
-	if ( $signup != null ) {
-		$registered_at =  mysql2date('U', $signup->registered);
-		$now = current_time( 'timestamp', true );
-		$diff = $now - $registered_at;
-		// If registered more than two days ago, cancel registration and let this signup go through.
-		if ( $diff > 2 * DAY_IN_SECONDS )
-			$wpdb->delete( $wpdb->signups, array( 'user_login' => $user_name ) );
-		else
-			$errors->add('user_name', __('That username is currently reserved but may be available in a couple of days.'));
-	}
-
-	$signup = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->signups WHERE user_email = %s", $user_email) );
-	if ( $signup != null ) {
-		$diff = current_time( 'timestamp', true ) - mysql2date('U', $signup->registered);
-		// If registered more than two days ago, cancel registration and let this signup go through.
-		if ( $diff > 2 * DAY_IN_SECONDS )
-			$wpdb->delete( $wpdb->signups, array( 'user_email' => $user_email ) );
-		else
-			$errors->add('user_email', __('That email address has already been used. Please check your inbox for an activation email. It will become available in a couple of days if you do nothing.'));
-	}
-
-	$result = array('user_name' => $user_name, 'orig_username' => $orig_username, 'user_email' => $user_email, 'errors' => $errors);
-
-	/**
-	 * Filters the validated user registration details.
-	 *
-	 * This does not allow you to override the username or email of the user during
-	 * registration. The values are solely used for validation and error handling.
-	 *
-	 * @since MU
-	 *
-	 * @param array $result {
-	 *     The array of user name, email and the error messages.
-	 *
-	 *     @type string   $user_name     Sanitized and unique username.
-	 *     @type string   $orig_username Original username.
-	 *     @type string   $user_email    User email address.
-	 *     @type WP_Error $errors        WP_Error object containing any errors found.
-	 * }
-	 */
-	return apply_filters( 'wpmu_validate_user_signup', $result );
-}
-
-/**
- * Processes new site registrations.
- *
- * Checks the data provided by the user during blog signup. Verifies
- * the validity and uniqueness of blog paths and domains.
- *
- * This function prevents the current user from registering a new site
- * with a blogname equivalent to another user's login name. Passing the
- * $user parameter to the function, where $user is the other user, is
- * effectively an override of this limitation.
- *
- * Filter {@see 'wpmu_validate_blog_signup'} if you want to modify
- * the way that WordPress validates new site signups.
- *
- * @since MU
- *
- * @global wpdb   $wpdb
- * @global string $domain
- *
- * @param string         $blogname   The blog name provided by the user. Must be unique.
- * @param string         $blog_title The blog title provided by the user.
- * @param WP_User|string $user       Optional. The user object to check against the new site name.
- * @return array Contains the new site data and error messages.
- */
-function wpmu_validate_blog_signup( $blogname, $blog_title, $user = '' ) {
-	global $wpdb, $domain;
-
-	$current_site = get_current_site();
-	$base = $current_site->path;
-
-	$blog_title = strip_tags( $blog_title );
-
-	$errors = new WP_Error();
-	$illegal_names = get_site_option( 'illegal_names' );
-	if ( $illegal_names == false ) {
-		$illegal_names = array( 'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator' );
-		add_site_option( 'illegal_names', $illegal_names );
-	}
-
-	/*
-	 * On sub dir installs, some names are so illegal, only a filter can
-	 * spring them from jail.
-	 */
-	if ( ! is_subdomain_install() ) {
-		$illegal_names = array_merge( $illegal_names, get_subdirectory_reserved_names() );
-	}
-
-	if ( empty( $blogname ) )
-		$errors->add('blogname', __( 'Please enter a site name.' ) );
-
-	if ( preg_match( '/[^a-z0-9]+/', $blogname ) ) {
-		$errors->add( 'blogname', __( 'Site names can only contain lowercase letters (a-z) and numbers.' ) );
-	}
-
-	if ( in_array( $blogname, $illegal_names ) )
-		$errors->add('blogname',  __( 'That name is not allowed.' ) );
-
-	if ( strlen( $blogname ) < 4 && !is_super_admin() )
-		$errors->add('blogname',  __( 'Site name must be at least 4 characters.' ) );
-
-	// do not allow users to create a blog that conflicts with a page on the main blog.
-	if ( !is_subdomain_install() && $wpdb->get_var( $wpdb->prepare( "SELECT post_name FROM " . $wpdb->get_blog_prefix( $current_site->blog_id ) . "posts WHERE post_type = 'page' AND post_name = %s", $blogname ) ) )
-		$errors->add( 'blogname', __( 'Sorry, you may not use that site name.' ) );
-
-	// all numeric?
-	if ( preg_match( '/^[0-9]*$/', $blogname ) )
-		$errors->add('blogname', __('Sorry, site names must have letters too!'));
-
-	/**
-	 * Filters the new site name during registration.
-	 *
-	 * The name is the site's subdomain or the site's subdirectory
-	 * path depending on the network settings.
-	 *
-	 * @since MU
-	 *
-	 * @param string $blogname Site name.
-	 */
-	$blogname = apply_filters( 'newblogname', $blogname );
-
-	$blog_title = wp_unslash(  $blog_title );
-
-	if ( empty( $blog_title ) )
-		$errors->add('blog_title', __( 'Please enter a site title.' ) );
-
-	// Check if the domain/path has been used already.
-	if ( is_subdomain_install() ) {
-		$mydomain = $blogname . '.' . preg_replace( '|^www\.|', '', $domain );
-		$path = $base;
-	} else {
-		$mydomain = "$domain";
-		$path = $base.$blogname.'/';
-	}
-	if ( domain_exists($mydomain, $path, $current_site->id) )
-		$errors->add( 'blogname', __( 'Sorry, that site already exists!' ) );
-
-	if ( username_exists( $blogname ) ) {
-		if ( ! is_object( $user ) || ( is_object($user) && ( $user->user_login != $blogname ) ) )
-			$errors->add( 'blogname', __( 'Sorry, that site is reserved!' ) );
-	}
-
-	// Has someone already signed up for this domain?
-	$signup = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->signups WHERE domain = %s AND path = %s", $mydomain, $path) ); // TODO: Check email too?
-	if ( ! empty($signup) ) {
-		$diff = current_time( 'timestamp', true ) - mysql2date('U', $signup->registered);
-		// If registered more than two days ago, cancel registration and let this signup go through.
-		if ( $diff > 2 * DAY_IN_SECONDS )
-			$wpdb->delete( $wpdb->signups, array( 'domain' => $mydomain , 'path' => $path ) );
-		else
-			$errors->add('blogname', __('That site is currently reserved but may be available in a couple days.'));
-	}
-
-	$result = array('domain' => $mydomain, 'path' => $path, 'blogname' => $blogname, 'blog_title' => $blog_title, 'user' => $user, 'errors' => $errors);
-
-	/**
-	 * Filters site details and error messages following registration.
-	 *
-	 * @since MU
-	 *
-	 * @param array $result {
-	 *     Array of domain, path, blog name, blog title, user and error messages.
-	 *
-	 *     @type string         $domain     Domain for the site.
-	 *     @type string         $path       Path for the site. Used in subdirectory installs.
-	 *     @type string         $blogname   The unique site name (slug).
-	 *     @type string         $blog_title Blog title.
-	 *     @type string|WP_User $user       By default, an empty string. A user object if provided.
-	 *     @type WP_Error       $errors     WP_Error containing any errors found.
-	 * }
-	 */
-	return apply_filters( 'wpmu_validate_blog_signup', $result );
-}
-
-/**
- * Record site signup information for future activation.
- *
- * @since MU
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $domain     The requested domain.
- * @param string $path       The requested path.
- * @param string $title      The requested site title.
- * @param string $user       The user's requested login name.
- * @param string $user_email The user's email address.
- * @param array  $meta       By default, contains the requested privacy setting and lang_id.
- */
-function wpmu_signup_blog( $domain, $path, $title, $user, $user_email, $meta = array() )  {
-	global $wpdb;
-
-	$key = substr( md5( time() . rand() . $domain ), 0, 16 );
-	$meta = serialize($meta);
-
-	$wpdb->insert( $wpdb->signups, array(
-		'domain' => $domain,
-		'path' => $path,
-		'title' => $title,
-		'user_login' => $user,
-		'user_email' => $user_email,
-		'registered' => current_time('mysql', true),
-		'activation_key' => $key,
-		'meta' => $meta
-	) );
-
-	/**
-	 * Fires after site signup information has been written to the database.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param string $domain     The requested domain.
-	 * @param string $path       The requested path.
-	 * @param string $title      The requested site title.
-	 * @param string $user       The user's requested login name.
-	 * @param string $user_email The user's email address.
-	 * @param string $key        The user's activation key
-	 * @param array  $meta       By default, contains the requested privacy setting and lang_id.
-	 */
-	do_action( 'after_signup_site', $domain, $path, $title, $user, $user_email, $key, $meta );
-}
-
-/**
- * Record user signup information for future activation.
- *
- * This function is used when user registration is open but
- * new site registration is not.
- *
- * @since MU
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $user       The user's requested login name.
- * @param string $user_email The user's email address.
- * @param array  $meta       By default, this is an empty array.
- */
-function wpmu_signup_user( $user, $user_email, $meta = array() ) {
-	global $wpdb;
-
-	// Format data
-	$user = preg_replace( '/\s+/', '', sanitize_user( $user, true ) );
-	$user_email = sanitize_email( $user_email );
-	$key = substr( md5( time() . rand() . $user_email ), 0, 16 );
-	$meta = serialize($meta);
-
-	$wpdb->insert( $wpdb->signups, array(
-		'domain' => '',
-		'path' => '',
-		'title' => '',
-		'user_login' => $user,
-		'user_email' => $user_email,
-		'registered' => current_time('mysql', true),
-		'activation_key' => $key,
-		'meta' => $meta
-	) );
-
-	/**
-	 * Fires after a user's signup information has been written to the database.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param string $user       The user's requested login name.
-	 * @param string $user_email The user's email address.
-	 * @param string $key        The user's activation key
-	 * @param array  $meta       Additional signup meta. By default, this is an empty array.
-	 */
-	do_action( 'after_signup_user', $user, $user_email, $key, $meta );
-}
-
-/**
- * Notify user of signup success.
- *
- * This is the notification function used when site registration
- * is enabled.
- *
- * Filter {@see 'wpmu_signup_blog_notification'} to bypass this function or
- * replace it with your own notification behavior.
- *
- * Filter {@see 'wpmu_signup_blog_notification_email'} and
- * {@see 'wpmu_signup_blog_notification_subject'} to change the content
- * and subject line of the email sent to newly registered users.
- *
- * @since MU
- *
- * @param string $domain     The new blog domain.
- * @param string $path       The new blog path.
- * @param string $title      The site title.
- * @param string $user       The user's login name.
- * @param string $user_email The user's email address.
- * @param string $key        The activation key created in wpmu_signup_blog()
- * @param array  $meta       By default, contains the requested privacy setting and lang_id.
- * @return bool
- */
-function wpmu_signup_blog_notification( $domain, $path, $title, $user, $user_email, $key, $meta = array() ) {
-	/**
-	 * Filters whether to bypass the new site email notification.
-	 *
-	 * @since MU
-	 *
-	 * @param string|bool $domain     Site domain.
-	 * @param string      $path       Site path.
-	 * @param string      $title      Site title.
-	 * @param string      $user       User login name.
-	 * @param string      $user_email User email address.
-	 * @param string      $key        Activation key created in wpmu_signup_blog().
-	 * @param array       $meta       By default, contains the requested privacy setting and lang_id.
-	 */
-	if ( ! apply_filters( 'wpmu_signup_blog_notification', $domain, $path, $title, $user, $user_email, $key, $meta ) ) {
-		return false;
-	}
-
-	// Send email with activation link.
-	if ( !is_subdomain_install() || get_current_site()->id != 1 )
-		$activate_url = network_site_url("wp-activate.php?key=$key");
-	else
-		$activate_url = "http://{$domain}{$path}wp-activate.php?key=$key"; // @todo use *_url() API
-
-	$activate_url = esc_url($activate_url);
-	$admin_email = get_site_option( 'admin_email' );
-	if ( $admin_email == '' )
-		$admin_email = 'support@' . $_SERVER['SERVER_NAME'];
-	$from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
-	$message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
-	$message = sprintf(
-		/**
-		 * Filters the message content of the new blog notification email.
-		 *
-		 * Content should be formatted for transmission via wp_mail().
-		 *
-		 * @since MU
-		 *
-		 * @param string $content    Content of the notification email.
-		 * @param string $domain     Site domain.
-		 * @param string $path       Site path.
-		 * @param string $title      Site title.
-		 * @param string $user       User login name.
-		 * @param string $user_email User email address.
-		 * @param string $key        Activation key created in wpmu_signup_blog().
-		 * @param array  $meta       By default, contains the requested privacy setting and lang_id.
-		 */
-		apply_filters( 'wpmu_signup_blog_notification_email',
-			__( "To activate your blog, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\nAfter you activate, you can visit your site here:\n\n%s" ),
-			$domain, $path, $title, $user, $user_email, $key, $meta
-		),
-		$activate_url,
-		esc_url( "http://{$domain}{$path}" ),
-		$key
-	);
-	// TODO: Don't hard code activation link.
-	$subject = sprintf(
-		/**
-		 * Filters the subject of the new blog notification email.
-		 *
-		 * @since MU
-		 *
-		 * @param string $subject    Subject of the notification email.
-		 * @param string $domain     Site domain.
-		 * @param string $path       Site path.
-		 * @param string $title      Site title.
-		 * @param string $user       User login name.
-		 * @param string $user_email User email address.
-		 * @param string $key        Activation key created in wpmu_signup_blog().
-		 * @param array  $meta       By default, contains the requested privacy setting and lang_id.
-		 */
-		apply_filters( 'wpmu_signup_blog_notification_subject',
-			__( '[%1$s] Activate %2$s' ),
-			$domain, $path, $title, $user, $user_email, $key, $meta
-		),
-		$from_name,
-		esc_url( 'http://' . $domain . $path )
-	);
-	wp_mail( $user_email, wp_specialchars_decode( $subject ), $message, $message_headers );
-	return true;
-}
-
-/**
- * Notify user of signup success.
- *
- * This is the notification function used when no new site has
- * been requested.
- *
- * Filter {@see 'wpmu_signup_user_notification'} to bypass this function or
- * replace it with your own notification behavior.
- *
- * Filter {@see 'wpmu_signup_user_notification_email'} and
- * {@see 'wpmu_signup_user_notification_subject'} to change the content
- * and subject line of the email sent to newly registered users.
- *
- * @since MU
- *
- * @param string $user       The user's login name.
- * @param string $user_email The user's email address.
- * @param string $key        The activation key created in wpmu_signup_user()
- * @param array  $meta       By default, an empty array.
- * @return bool
- */
-function wpmu_signup_user_notification( $user, $user_email, $key, $meta = array() ) {
-	/**
-	 * Filters whether to bypass the email notification for new user sign-up.
-	 *
-	 * @since MU
-	 *
-	 * @param string $user       User login name.
-	 * @param string $user_email User email address.
-	 * @param string $key        Activation key created in wpmu_signup_user().
-	 * @param array  $meta       Signup meta data.
-	 */
-	if ( ! apply_filters( 'wpmu_signup_user_notification', $user, $user_email, $key, $meta ) )
-		return false;
-
-	// Send email with activation link.
-	$admin_email = get_site_option( 'admin_email' );
-	if ( $admin_email == '' )
-		$admin_email = 'support@' . $_SERVER['SERVER_NAME'];
-	$from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
-	$message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
-	$message = sprintf(
-		/**
-		 * Filters the content of the notification email for new user sign-up.
-		 *
-		 * Content should be formatted for transmission via wp_mail().
-		 *
-		 * @since MU
-		 *
-		 * @param string $content    Content of the notification email.
-		 * @param string $user       User login name.
-		 * @param string $user_email User email address.
-		 * @param string $key        Activation key created in wpmu_signup_user().
-		 * @param array  $meta       Signup meta data.
-		 */
-		apply_filters( 'wpmu_signup_user_notification_email',
-			__( "To activate your user, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login." ),
-			$user, $user_email, $key, $meta
-		),
-		site_url( "wp-activate.php?key=$key" )
-	);
-	// TODO: Don't hard code activation link.
-	$subject = sprintf(
-		/**
-		 * Filters the subject of the notification email of new user signup.
-		 *
-		 * @since MU
-		 *
-		 * @param string $subject    Subject of the notification email.
-		 * @param string $user       User login name.
-		 * @param string $user_email User email address.
-		 * @param string $key        Activation key created in wpmu_signup_user().
-		 * @param array  $meta       Signup meta data.
-		 */
-		apply_filters( 'wpmu_signup_user_notification_subject',
-			__( '[%1$s] Activate %2$s' ),
-			$user, $user_email, $key, $meta
-		),
-		$from_name,
-		$user
-	);
-	wp_mail( $user_email, wp_specialchars_decode( $subject ), $message, $message_headers );
-	return true;
-}
-
-/**
- * Activate a signup.
- *
- * Hook to {@see 'wpmu_activate_user'} or {@see 'wpmu_activate_blog'} for events
- * that should happen only when users or sites are self-created (since
- * those actions are not called when users and sites are created
- * by a Super Admin).
- *
- * @since MU
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $key The activation key provided to the user.
- * @return array|WP_Error An array containing information about the activated user and/or blog
- */
-function wpmu_activate_signup($key) {
-	global $wpdb;
-
-	$signup = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->signups WHERE activation_key = %s", $key) );
-
-	if ( empty( $signup ) )
-		return new WP_Error( 'invalid_key', __( 'Invalid activation key.' ) );
-
-	if ( $signup->active ) {
-		if ( empty( $signup->domain ) )
-			return new WP_Error( 'already_active', __( 'The user is already active.' ), $signup );
-		else
-			return new WP_Error( 'already_active', __( 'The site is already active.' ), $signup );
-	}
-
-	$meta = maybe_unserialize($signup->meta);
-	$password = wp_generate_password( 12, false );
-
-	$user_id = username_exists($signup->user_login);
-
-	if ( ! $user_id )
-		$user_id = wpmu_create_user($signup->user_login, $password, $signup->user_email);
-	else
-		$user_already_exists = true;
-
-	if ( ! $user_id )
-		return new WP_Error('create_user', __('Could not create user'), $signup);
-
-	$now = current_time('mysql', true);
-
-	if ( empty($signup->domain) ) {
-		$wpdb->update( $wpdb->signups, array('active' => 1, 'activated' => $now), array('activation_key' => $key) );
-
-		if ( isset( $user_already_exists ) )
-			return new WP_Error( 'user_already_exists', __( 'That username is already activated.' ), $signup);
-
-		/**
-		 * Fires immediately after a new user is activated.
-		 *
-		 * @since MU
-		 *
-		 * @param int   $user_id  User ID.
-		 * @param int   $password User password.
-		 * @param array $meta     Signup meta data.
-		 */
-		do_action( 'wpmu_activate_user', $user_id, $password, $meta );
-		return array( 'user_id' => $user_id, 'password' => $password, 'meta' => $meta );
-	}
-
-	$blog_id = wpmu_create_blog( $signup->domain, $signup->path, $signup->title, $user_id, $meta, $wpdb->siteid );
-
-	// TODO: What to do if we create a user but cannot create a blog?
-	if ( is_wp_error($blog_id) ) {
-		// If blog is taken, that means a previous attempt to activate this blog failed in between creating the blog and
-		// setting the activation flag. Let's just set the active flag and instruct the user to reset their password.
-		if ( 'blog_taken' == $blog_id->get_error_code() ) {
-			$blog_id->add_data( $signup );
-			$wpdb->update( $wpdb->signups, array( 'active' => 1, 'activated' => $now ), array( 'activation_key' => $key ) );
-		}
-		return $blog_id;
-	}
-
-	$wpdb->update( $wpdb->signups, array('active' => 1, 'activated' => $now), array('activation_key' => $key) );
-	/**
-	 * Fires immediately after a site is activated.
-	 *
-	 * @since MU
-	 *
-	 * @param int    $blog_id       Blog ID.
-	 * @param int    $user_id       User ID.
-	 * @param int    $password      User password.
-	 * @param string $signup_title  Site title.
-	 * @param array  $meta          Signup meta data.
-	 */
-	do_action( 'wpmu_activate_blog', $blog_id, $user_id, $password, $signup->title, $meta );
-
-	return array('blog_id' => $blog_id, 'user_id' => $user_id, 'password' => $password, 'title' => $signup->title, 'meta' => $meta);
-}
-
-/**
- * Create a user.
- *
- * This function runs when a user self-registers as well as when
- * a Super Admin creates a new user. Hook to {@see 'wpmu_new_user'} for events
- * that should affect all new users, but only on Multisite (otherwise
- * use {@see'user_register'}).
- *
- * @since MU
- *
- * @param string $user_name The new user's login name.
- * @param string $password  The new user's password.
- * @param string $email     The new user's email address.
- * @return int|false Returns false on failure, or int $user_id on success
- */
-function wpmu_create_user( $user_name, $password, $email ) {
-	$user_name = preg_replace( '/\s+/', '', sanitize_user( $user_name, true ) );
-
-	$user_id = wp_create_user( $user_name, $password, $email );
-	if ( is_wp_error( $user_id ) )
-		return false;
-
-	// Newly created users have no roles or caps until they are added to a blog.
-	delete_user_option( $user_id, 'capabilities' );
-	delete_user_option( $user_id, 'user_level' );
-
-	/**
-	 * Fires immediately after a new user is created.
-	 *
-	 * @since MU
-	 *
-	 * @param int $user_id User ID.
-	 */
-	do_action( 'wpmu_new_user', $user_id );
-
-	return $user_id;
-}
-
-/**
- * Create a site.
- *
- * This function runs when a user self-registers a new site as well
- * as when a Super Admin creates a new site. Hook to {@see 'wpmu_new_blog'}
- * for events that should affect all new sites.
- *
- * On subdirectory installs, $domain is the same as the main site's
- * domain, and the path is the subdirectory name (eg 'example.com'
- * and '/blog1/'). On subdomain installs, $domain is the new subdomain +
- * root domain (eg 'blog1.example.com'), and $path is '/'.
- *
- * @since MU
- *
- * @param string $domain  The new site's domain.
- * @param string $path    The new site's path.
- * @param string $title   The new site's title.
- * @param int    $user_id The user ID of the new site's admin.
- * @param array  $meta    Optional. Used to set initial site options.
- * @param int    $site_id Optional. Only relevant on multi-network installs.
- * @return int|WP_Error Returns WP_Error object on failure, int $blog_id on success
- */
-function wpmu_create_blog( $domain, $path, $title, $user_id, $meta = array(), $site_id = 1 ) {
-	$defaults = array( 'public' => 0 );
-	$meta = wp_parse_args( $meta, $defaults );
-
-	$domain = preg_replace( '/\s+/', '', sanitize_user( $domain, true ) );
-
-	if ( is_subdomain_install() )
-		$domain = str_replace( '@', '', $domain );
-
-	$title = strip_tags( $title );
-	$user_id = (int) $user_id;
-
-	if ( empty($path) )
-		$path = '/';
-
-	// Check if the domain has been used already. We should return an error message.
-	if ( domain_exists($domain, $path, $site_id) )
-		return new WP_Error( 'blog_taken', __( 'Sorry, that site already exists!' ) );
-
-	if ( ! wp_installing() ) {
-		wp_installing( true );
-	}
-
-	if ( ! $blog_id = insert_blog($domain, $path, $site_id) )
-		return new WP_Error('insert_blog', __('Could not create site.'));
-
-	switch_to_blog($blog_id);
-	install_blog($blog_id, $title);
-	wp_install_defaults($user_id);
-
-	add_user_to_blog($blog_id, $user_id, 'administrator');
-
-	foreach ( $meta as $key => $value ) {
-		if ( in_array( $key, array( 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id' ) ) )
-			update_blog_status( $blog_id, $key, $value );
-		else
-			update_option( $key, $value );
-	}
-
-	add_option( 'WPLANG', get_site_option( 'WPLANG' ) );
-	update_option( 'blog_public', (int) $meta['public'] );
-
-	if ( ! is_super_admin( $user_id ) && ! get_user_meta( $user_id, 'primary_blog', true ) )
-		update_user_meta( $user_id, 'primary_blog', $blog_id );
-
-	restore_current_blog();
-	/**
-	 * Fires immediately after a new site is created.
-	 *
-	 * @since MU
-	 *
-	 * @param int    $blog_id Blog ID.
-	 * @param int    $user_id User ID.
-	 * @param string $domain  Site domain.
-	 * @param string $path    Site path.
-	 * @param int    $site_id Site ID. Only relevant on multi-network installs.
-	 * @param array  $meta    Meta data. Used to set initial site options.
-	 */
-	do_action( 'wpmu_new_blog', $blog_id, $user_id, $domain, $path, $site_id, $meta );
-
-	wp_cache_set( 'last_changed', microtime(), 'sites' );
-
-	return $blog_id;
-}
-
-/**
- * Notifies the network admin that a new site has been activated.
- *
- * Filter {@see 'newblog_notify_siteadmin'} to change the content of
- * the notification email.
- *
- * @since MU
- *
- * @param int    $blog_id    The new site's ID.
- * @param string $deprecated Not used.
- * @return bool
- */
-function newblog_notify_siteadmin( $blog_id, $deprecated = '' ) {
-	if ( get_site_option( 'registrationnotification' ) != 'yes' )
-		return false;
-
-	$email = get_site_option( 'admin_email' );
-	if ( is_email($email) == false )
-		return false;
-
-	$options_site_url = esc_url(network_admin_url('settings.php'));
-
-	switch_to_blog( $blog_id );
-	$blogname = get_option( 'blogname' );
-	$siteurl = site_url();
-	restore_current_blog();
-
-	$msg = sprintf( __( 'New Site: %1$s
-URL: %2$s
-Remote IP: %3$s
-
-Disable these notifications: %4$s' ), $blogname, $siteurl, wp_unslash( $_SERVER['REMOTE_ADDR'] ), $options_site_url);
-	/**
-	 * Filters the message body of the new site activation email sent
-	 * to the network administrator.
-	 *
-	 * @since MU
-	 *
-	 * @param string $msg Email body.
-	 */
-	$msg = apply_filters( 'newblog_notify_siteadmin', $msg );
-
-	wp_mail( $email, sprintf( __( 'New Site Registration: %s' ), $siteurl ), $msg );
-	return true;
-}
-
-/**
- * Notifies the network admin that a new user has been activated.
- *
- * Filter {@see 'newuser_notify_siteadmin'} to change the content of
- * the notification email.
- *
- * @since MU
- *
- * @param int $user_id The new user's ID.
- * @return bool
- */
-function newuser_notify_siteadmin( $user_id ) {
-	if ( get_site_option( 'registrationnotification' ) != 'yes' )
-		return false;
-
-	$email = get_site_option( 'admin_email' );
-
-	if ( is_email($email) == false )
-		return false;
-
-	$user = get_userdata( $user_id );
-
-	$options_site_url = esc_url(network_admin_url('settings.php'));
-	$msg = sprintf(__('New User: %1$s
-Remote IP: %2$s
-
-Disable these notifications: %3$s'), $user->user_login, wp_unslash( $_SERVER['REMOTE_ADDR'] ), $options_site_url);
-
-	/**
-	 * Filters the message body of the new user activation email sent
-	 * to the network administrator.
-	 *
-	 * @since MU
-	 *
-	 * @param string  $msg  Email body.
-	 * @param WP_User $user WP_User instance of the new user.
-	 */
-	$msg = apply_filters( 'newuser_notify_siteadmin', $msg, $user );
-	wp_mail( $email, sprintf(__('New User Registration: %s'), $user->user_login), $msg );
-	return true;
-}
-
-/**
- * Check whether a blogname is already taken.
- *
- * Used during the new site registration process to ensure
- * that each blogname is unique.
- *
- * @since MU
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $domain  The domain to be checked.
- * @param string $path    The path to be checked.
- * @param int    $site_id Optional. Relevant only on multi-network installs.
- * @return int
- */
-function domain_exists($domain, $path, $site_id = 1) {
-	$path = trailingslashit( $path );
-	$args = array(
-		'network_id' => $site_id,
-		'domain' => $domain,
-		'path' => $path,
-		'fields' => 'ids',
-	);
-	$result = get_sites( $args );
-	$result = array_shift( $result );
-
-	/**
-	 * Filters whether a blogname is taken.
-	 *
-	 * @since 3.5.0
-	 *
-	 * @param int|null $result  The blog_id if the blogname exists, null otherwise.
-	 * @param string   $domain  Domain to be checked.
-	 * @param string   $path    Path to be checked.
-	 * @param int      $site_id Site ID. Relevant only on multi-network installs.
-	 */
-	return apply_filters( 'domain_exists', $result, $domain, $path, $site_id );
-}
-
-/**
- * Store basic site info in the blogs table.
- *
- * This function creates a row in the wp_blogs table and returns
- * the new blog's ID. It is the first step in creating a new blog.
- *
- * @since MU
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $domain  The domain of the new site.
- * @param string $path    The path of the new site.
- * @param int    $site_id Unless you're running a multi-network install, be sure to set this value to 1.
- * @return int|false The ID of the new row
- */
-function insert_blog($domain, $path, $site_id) {
-	global $wpdb;
-
-	$path = trailingslashit($path);
-	$site_id = (int) $site_id;
-
-	$result = $wpdb->insert( $wpdb->blogs, array('site_id' => $site_id, 'domain' => $domain, 'path' => $path, 'registered' => current_time('mysql')) );
-	if ( ! $result )
-		return false;
-
-	$blog_id = $wpdb->insert_id;
-	refresh_blog_details( $blog_id );
-
-	wp_maybe_update_network_site_counts();
-
-	return $blog_id;
-}
-
-/**
- * Install an empty blog.
- *
- * Creates the new blog tables and options. If calling this function
- * directly, be sure to use switch_to_blog() first, so that $wpdb
- * points to the new blog.
- *
- * @since MU
- *
- * @global wpdb     $wpdb
- * @global WP_Roles $wp_roles
- *
- * @param int    $blog_id    The value returned by insert_blog().
- * @param string $blog_title The title of the new site.
- */
-function install_blog( $blog_id, $blog_title = '' ) {
-	global $wpdb, $wp_roles;
-	// Cast for security
-	$blog_id = (int) $blog_id;
-
-	require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
-
-	$suppress = $wpdb->suppress_errors();
-	if ( $wpdb->get_results( "DESCRIBE {$wpdb->posts}" ) )
-		die( '<h1>' . __( 'Already Installed' ) . '</h1><p>' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '</p></body></html>' );
-	$wpdb->suppress_errors( $suppress );
-
-	$url = get_blogaddress_by_id( $blog_id );
-
-	// Set everything up
-	make_db_current_silent( 'blog' );
-	populate_options();
-	populate_roles();
-
-	// populate_roles() clears previous role definitions so we start over.
-	$wp_roles = new WP_Roles();
-
-	$siteurl = $home = untrailingslashit( $url );
-
-	if ( ! is_subdomain_install() ) {
-
- 		if ( 'https' === parse_url( get_site_option( 'siteurl' ), PHP_URL_SCHEME ) ) {
- 			$siteurl = set_url_scheme( $siteurl, 'https' );
- 		}
- 		if ( 'https' === parse_url( get_home_url( get_current_site()->blog_id ), PHP_URL_SCHEME ) ) {
- 			$home = set_url_scheme( $home, 'https' );
- 		}
-
-	}
-
-	update_option( 'siteurl', $siteurl );
-	update_option( 'home', $home );
-
-	if ( get_site_option( 'ms_files_rewriting' ) )
-		update_option( 'upload_path', UPLOADBLOGSDIR . "/$blog_id/files" );
-	else
-		update_option( 'upload_path', get_blog_option( get_current_site()->blog_id, 'upload_path' ) );
-
-	update_option( 'blogname', wp_unslash( $blog_title ) );
-	update_option( 'admin_email', '' );
-
-	// remove all perms
-	$table_prefix = $wpdb->get_blog_prefix();
-	delete_metadata( 'user', 0, $table_prefix . 'user_level',   null, true ); // delete all
-	delete_metadata( 'user', 0, $table_prefix . 'capabilities', null, true ); // delete all
-}
-
-/**
- * Set blog defaults.
- *
- * This function creates a row in the wp_blogs table.
- *
- * @since MU
- * @deprecated MU
- * @deprecated Use wp_install_defaults()
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int $blog_id Ignored in this function.
- * @param int $user_id
- */
-function install_blog_defaults($blog_id, $user_id) {
-	global $wpdb;
-
-	require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
-
-	$suppress = $wpdb->suppress_errors();
-
-	wp_install_defaults($user_id);
-
-	$wpdb->suppress_errors( $suppress );
-}
-
-/**
- * Notify a user that their blog activation has been successful.
- *
- * Filter {@see 'wpmu_welcome_notification'} to disable or bypass.
- *
- * Filter {@see 'update_welcome_email'} and {@see 'update_welcome_subject'} to
- * modify the content and subject line of the notification email.
- *
- * @since MU
- *
- * @param int    $blog_id
- * @param int    $user_id
- * @param string $password
- * @param string $title    The new blog's title
- * @param array  $meta     Optional. Not used in the default function, but is passed along to hooks for customization.
- * @return bool
- */
-function wpmu_welcome_notification( $blog_id, $user_id, $password, $title, $meta = array() ) {
-	$current_site = get_current_site();
-
-	/**
-	 * Filters whether to bypass the welcome email after site activation.
-	 *
-	 * Returning false disables the welcome email.
-	 *
-	 * @since MU
-	 *
-	 * @param int|bool $blog_id  Blog ID.
-	 * @param int      $user_id  User ID.
-	 * @param string   $password User password.
-	 * @param string   $title    Site title.
-	 * @param array    $meta     Signup meta data.
-	 */
-	if ( ! apply_filters( 'wpmu_welcome_notification', $blog_id, $user_id, $password, $title, $meta ) )
-		return false;
-
-	$welcome_email = get_site_option( 'welcome_email' );
-	if ( $welcome_email == false ) {
-		/* translators: Do not translate USERNAME, SITE_NAME, BLOG_URL, PASSWORD: those are placeholders. */
-		$welcome_email = __( 'Howdy USERNAME,
-
-Your new SITE_NAME site has been successfully set up at:
-BLOG_URL
-
-You can log in to the administrator account with the following information:
-
-Username: USERNAME
-Password: PASSWORD
-Log in here: BLOG_URLwp-login.php
-
-We hope you enjoy your new site. Thanks!
-
---The Team @ SITE_NAME' );
-	}
-
-	$url = get_blogaddress_by_id($blog_id);
-	$user = get_userdata( $user_id );
-
-	$welcome_email = str_replace( 'SITE_NAME', $current_site->site_name, $welcome_email );
-	$welcome_email = str_replace( 'BLOG_TITLE', $title, $welcome_email );
-	$welcome_email = str_replace( 'BLOG_URL', $url, $welcome_email );
-	$welcome_email = str_replace( 'USERNAME', $user->user_login, $welcome_email );
-	$welcome_email = str_replace( 'PASSWORD', $password, $welcome_email );
-
-	/**
-	 * Filters the content of the welcome email after site activation.
-	 *
-	 * Content should be formatted for transmission via wp_mail().
-	 *
-	 * @since MU
-	 *
-	 * @param string $welcome_email Message body of the email.
-	 * @param int    $blog_id       Blog ID.
-	 * @param int    $user_id       User ID.
-	 * @param string $password      User password.
-	 * @param string $title         Site title.
-	 * @param array  $meta          Signup meta data.
-	 */
-	$welcome_email = apply_filters( 'update_welcome_email', $welcome_email, $blog_id, $user_id, $password, $title, $meta );
-	$admin_email = get_site_option( 'admin_email' );
-
-	if ( $admin_email == '' )
-		$admin_email = 'support@' . $_SERVER['SERVER_NAME'];
-
-	$from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
-	$message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
-	$message = $welcome_email;
-
-	if ( empty( $current_site->site_name ) ) {
-		$current_site->site_name = 'WordPress';
-	}
-
-	/**
-	 * Filters the subject of the welcome email after site activation.
-	 *
-	 * @since MU
-	 *
-	 * @param string $subject Subject of the email.
-	 */
-	$subject = apply_filters( 'update_welcome_subject', sprintf( __( 'New %1$s Site: %2$s' ), $current_site->site_name, wp_unslash( $title ) ) );
-	wp_mail( $user->user_email, wp_specialchars_decode( $subject ), $message, $message_headers );
-	return true;
-}
-
-/**
- * Notify a user that their account activation has been successful.
- *
- * Filter {@see 'wpmu_welcome_user_notification'} to disable or bypass.
- *
- * Filter {@see 'update_welcome_user_email'} and {@see 'update_welcome_user_subject'} to
- * modify the content and subject line of the notification email.
- *
- * @since MU
- *
- * @param int    $user_id
- * @param string $password
- * @param array  $meta     Optional. Not used in the default function, but is passed along to hooks for customization.
- * @return bool
- */
-function wpmu_welcome_user_notification( $user_id, $password, $meta = array() ) {
-	$current_site = get_current_site();
-
-	/**
- 	 * Filters whether to bypass the welcome email after user activation.
-	 *
-	 * Returning false disables the welcome email.
-	 *
-	 * @since MU
-	 *
-	 * @param int    $user_id  User ID.
-	 * @param string $password User password.
-	 * @param array  $meta     Signup meta data.
-	 */
-	if ( ! apply_filters( 'wpmu_welcome_user_notification', $user_id, $password, $meta ) )
-		return false;
-
-	$welcome_email = get_site_option( 'welcome_user_email' );
-
-	$user = get_userdata( $user_id );
-
-	/**
-	 * Filters the content of the welcome email after user activation.
-	 *
-	 * Content should be formatted for transmission via wp_mail().
-	 *
-	 * @since MU
-	 *
-	 * @param string $welcome_email The message body of the account activation success email.
-	 * @param int    $user_id       User ID.
-	 * @param string $password      User password.
-	 * @param array  $meta          Signup meta data.
-	 */
-	$welcome_email = apply_filters( 'update_welcome_user_email', $welcome_email, $user_id, $password, $meta );
-	$welcome_email = str_replace( 'SITE_NAME', $current_site->site_name, $welcome_email );
-	$welcome_email = str_replace( 'USERNAME', $user->user_login, $welcome_email );
-	$welcome_email = str_replace( 'PASSWORD', $password, $welcome_email );
-	$welcome_email = str_replace( 'LOGINLINK', wp_login_url(), $welcome_email );
-
-	$admin_email = get_site_option( 'admin_email' );
-
-	if ( $admin_email == '' )
-		$admin_email = 'support@' . $_SERVER['SERVER_NAME'];
-
-	$from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
-	$message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
-	$message = $welcome_email;
-
-	if ( empty( $current_site->site_name ) )
-		$current_site->site_name = 'WordPress';
-
-	/**
-	 * Filters the subject of the welcome email after user activation.
-	 *
-	 * @since MU
-	 *
-	 * @param string $subject Subject of the email.
-	 */
-	$subject = apply_filters( 'update_welcome_user_subject', sprintf( __( 'New %1$s User: %2$s' ), $current_site->site_name, $user->user_login) );
-	wp_mail( $user->user_email, wp_specialchars_decode( $subject ), $message, $message_headers );
-	return true;
-}
-
-/**
- * Get a user's most recent post.
- *
- * Walks through each of a user's blogs to find the post with
- * the most recent post_date_gmt.
- *
- * @since MU
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int $user_id
- * @return array Contains the blog_id, post_id, post_date_gmt, and post_gmt_ts
- */
-function get_most_recent_post_of_user( $user_id ) {
-	global $wpdb;
-
-	$user_blogs = get_blogs_of_user( (int) $user_id );
-	$most_recent_post = array();
-
-	// Walk through each blog and get the most recent post
-	// published by $user_id
-	foreach ( (array) $user_blogs as $blog ) {
-		$prefix = $wpdb->get_blog_prefix( $blog->userblog_id );
-		$recent_post = $wpdb->get_row( $wpdb->prepare("SELECT ID, post_date_gmt FROM {$prefix}posts WHERE post_author = %d AND post_type = 'post' AND post_status = 'publish' ORDER BY post_date_gmt DESC LIMIT 1", $user_id ), ARRAY_A);
-
-		// Make sure we found a post
-		if ( isset($recent_post['ID']) ) {
-			$post_gmt_ts = strtotime($recent_post['post_date_gmt']);
-
-			// If this is the first post checked or if this post is
-			// newer than the current recent post, make it the new
-			// most recent post.
-			if ( !isset($most_recent_post['post_gmt_ts']) || ( $post_gmt_ts > $most_recent_post['post_gmt_ts'] ) ) {
-				$most_recent_post = array(
-					'blog_id'		=> $blog->userblog_id,
-					'post_id'		=> $recent_post['ID'],
-					'post_date_gmt'	=> $recent_post['post_date_gmt'],
-					'post_gmt_ts'	=> $post_gmt_ts
-				);
-			}
-		}
-	}
-
-	return $most_recent_post;
-}
-
-// Misc functions
-
-/**
- * Get the size of a directory.
- *
- * A helper function that is used primarily to check whether
- * a blog has exceeded its allowed upload space.
- *
- * @since MU
- *
- * @param string $directory Full path of a directory.
- * @return int Size of the directory in MB.
- */
-function get_dirsize( $directory ) {
-	$dirsize = get_transient( 'dirsize_cache' );
-	if ( is_array( $dirsize ) && isset( $dirsize[ $directory ][ 'size' ] ) )
-		return $dirsize[ $directory ][ 'size' ];
-
-	if ( ! is_array( $dirsize ) )
-		$dirsize = array();
-
-	// Exclude individual site directories from the total when checking the main site,
-	// as they are subdirectories and should not be counted.
-	if ( is_main_site() ) {
-		$dirsize[ $directory ][ 'size' ] = recurse_dirsize( $directory, $directory . '/sites' );
-	} else {
-		$dirsize[ $directory ][ 'size' ] = recurse_dirsize( $directory );
-	}
-
-	set_transient( 'dirsize_cache', $dirsize, HOUR_IN_SECONDS );
-	return $dirsize[ $directory ][ 'size' ];
-}
-
-/**
- * Get the size of a directory recursively.
- *
- * Used by get_dirsize() to get a directory's size when it contains
- * other directories.
- *
- * @since MU
- * @since 4.3.0 $exclude parameter added.
- *
- * @param string $directory Full path of a directory.
- * @param string $exclude   Optional. Full path of a subdirectory to exclude from the total.
- * @return int|false Size in MB if a valid directory. False if not.
- */
-function recurse_dirsize( $directory, $exclude = null ) {
-	$size = 0;
-
-	$directory = untrailingslashit( $directory );
-
-	if ( ! file_exists( $directory ) || ! is_dir( $directory ) || ! is_readable( $directory ) || $directory === $exclude ) {
-		return false;
-	}
-
-	if ($handle = opendir($directory)) {
-		while(($file = readdir($handle)) !== false) {
-			$path = $directory.'/'.$file;
-			if ($file != '.' && $file != '..') {
-				if (is_file($path)) {
-					$size += filesize($path);
-				} elseif (is_dir($path)) {
-					$handlesize = recurse_dirsize( $path, $exclude );
-					if ($handlesize > 0)
-						$size += $handlesize;
-				}
-			}
-		}
-		closedir($handle);
-	}
-	return $size;
-}
-
-/**
- * Check an array of MIME types against a whitelist.
- *
- * WordPress ships with a set of allowed upload filetypes,
- * which is defined in wp-includes/functions.php in
- * get_allowed_mime_types(). This function is used to filter
- * that list against the filetype whitelist provided by Multisite
- * Super Admins at wp-admin/network/settings.php.
- *
- * @since MU
- *
- * @param array $mimes
- * @return array
- */
-function check_upload_mimes( $mimes ) {
-	$site_exts = explode( ' ', get_site_option( 'upload_filetypes', 'jpg jpeg png gif' ) );
-	$site_mimes = array();
-	foreach ( $site_exts as $ext ) {
-		foreach ( $mimes as $ext_pattern => $mime ) {
-			if ( $ext != '' && strpos( $ext_pattern, $ext ) !== false )
-				$site_mimes[$ext_pattern] = $mime;
-		}
-	}
-	return $site_mimes;
-}
-
-/**
- * Update a blog's post count.
- *
- * WordPress MS stores a blog's post count as an option so as
- * to avoid extraneous COUNTs when a blog's details are fetched
- * with get_blog_details(). This function is called when posts
- * are published or unpublished to make sure the count stays current.
- *
- * @since MU
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $deprecated Not used.
- */
-function update_posts_count( $deprecated = '' ) {
-	global $wpdb;
-	update_option( 'post_count', (int) $wpdb->get_var( "SELECT COUNT(ID) FROM {$wpdb->posts} WHERE post_status = 'publish' and post_type = 'post'" ) );
-}
-
-/**
- * Logs user registrations.
- *
- * @since MU
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int $blog_id
- * @param int $user_id
- */
-function wpmu_log_new_registrations( $blog_id, $user_id ) {
-	global $wpdb;
-	$user = get_userdata( (int) $user_id );
-	if ( $user )
-		$wpdb->insert( $wpdb->registration_log, array('email' => $user->user_email, 'IP' => preg_replace( '/[^0-9., ]/', '', wp_unslash( $_SERVER['REMOTE_ADDR'] ) ), 'blog_id' => $blog_id, 'date_registered' => current_time('mysql')) );
-}
-
-/**
- * Maintains a canonical list of terms by syncing terms created for each blog with the global terms table.
- *
- * @since 3.0.0
- *
- * @see term_id_filter
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- * @staticvar int $global_terms_recurse
- *
- * @param int    $term_id    An ID for a term on the current blog.
- * @param string $deprecated Not used.
- * @return int An ID from the global terms table mapped from $term_id.
- */
-function global_terms( $term_id, $deprecated = '' ) {
-	global $wpdb;
-	static $global_terms_recurse = null;
-
-	if ( !global_terms_enabled() )
-		return $term_id;
-
-	// prevent a race condition
-	$recurse_start = false;
-	if ( $global_terms_recurse === null ) {
-		$recurse_start = true;
-		$global_terms_recurse = 1;
-	} elseif ( 10 < $global_terms_recurse++ ) {
-		return $term_id;
-	}
-
-	$term_id = intval( $term_id );
-	$c = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->terms WHERE term_id = %d", $term_id ) );
-
-	$global_id = $wpdb->get_var( $wpdb->prepare( "SELECT cat_ID FROM $wpdb->sitecategories WHERE category_nicename = %s", $c->slug ) );
-	if ( $global_id == null ) {
-		$used_global_id = $wpdb->get_var( $wpdb->prepare( "SELECT cat_ID FROM $wpdb->sitecategories WHERE cat_ID = %d", $c->term_id ) );
-		if ( null == $used_global_id ) {
-			$wpdb->insert( $wpdb->sitecategories, array( 'cat_ID' => $term_id, 'cat_name' => $c->name, 'category_nicename' => $c->slug ) );
-			$global_id = $wpdb->insert_id;
-			if ( empty( $global_id ) )
-				return $term_id;
-		} else {
-			$max_global_id = $wpdb->get_var( "SELECT MAX(cat_ID) FROM $wpdb->sitecategories" );
-			$max_local_id = $wpdb->get_var( "SELECT MAX(term_id) FROM $wpdb->terms" );
-			$new_global_id = max( $max_global_id, $max_local_id ) + mt_rand( 100, 400 );
-			$wpdb->insert( $wpdb->sitecategories, array( 'cat_ID' => $new_global_id, 'cat_name' => $c->name, 'category_nicename' => $c->slug ) );
-			$global_id = $wpdb->insert_id;
-		}
-	} elseif ( $global_id != $term_id ) {
-		$local_id = $wpdb->get_var( $wpdb->prepare( "SELECT term_id FROM $wpdb->terms WHERE term_id = %d", $global_id ) );
-		if ( null != $local_id ) {
-			global_terms( $local_id );
-			if ( 10 < $global_terms_recurse ) {
-				$global_id = $term_id;
-			}
-		}
-	}
-
-	if ( $global_id != $term_id ) {
-		if ( get_option( 'default_category' ) == $term_id )
-			update_option( 'default_category', $global_id );
-
-		$wpdb->update( $wpdb->terms, array('term_id' => $global_id), array('term_id' => $term_id) );
-		$wpdb->update( $wpdb->term_taxonomy, array('term_id' => $global_id), array('term_id' => $term_id) );
-		$wpdb->update( $wpdb->term_taxonomy, array('parent' => $global_id), array('parent' => $term_id) );
-
-		clean_term_cache($term_id);
-	}
-	if ( $recurse_start )
-		$global_terms_recurse = null;
-
-	return $global_id;
-}
-
-/**
- * Ensure that the current site's domain is listed in the allowed redirect host list.
- *
- * @see wp_validate_redirect()
- * @since MU
- *
- * @param array|string $deprecated Not used.
- * @return array The current site's domain
- */
-function redirect_this_site( $deprecated = '' ) {
-	return array( get_current_site()->domain );
-}
-
-/**
- * Check whether an upload is too big.
- *
- * @since MU
- *
- * @blessed
- *
- * @param array $upload
- * @return string|array If the upload is under the size limit, $upload is returned. Otherwise returns an error message.
- */
-function upload_is_file_too_big( $upload ) {
-	if ( ! is_array( $upload ) || defined( 'WP_IMPORTING' ) || get_site_option( 'upload_space_check_disabled' ) )
-		return $upload;
-
-	if ( strlen( $upload['bits'] )  > ( KB_IN_BYTES * get_site_option( 'fileupload_maxk', 1500 ) ) ) {
-		return sprintf( __( 'This file is too big. Files must be less than %d KB in size.' ) . '<br />', get_site_option( 'fileupload_maxk', 1500 ) );
-	}
-
-	return $upload;
-}
-
-/**
- * Add a nonce field to the signup page.
- *
- * @since MU
- */
-function signup_nonce_fields() {
-	$id = mt_rand();
-	echo "<input type='hidden' name='signup_form_id' value='{$id}' />";
-	wp_nonce_field('signup_form_' . $id, '_signup_form', false);
-}
-
-/**
- * Process the signup nonce created in signup_nonce_fields().
- *
- * @since MU
- *
- * @param array $result
- * @return array
- */
-function signup_nonce_check( $result ) {
-	if ( !strpos( $_SERVER[ 'PHP_SELF' ], 'wp-signup.php' ) )
-		return $result;
-
-	if ( wp_create_nonce('signup_form_' . $_POST[ 'signup_form_id' ]) != $_POST['_signup_form'] )
-		wp_die( __( 'Please try again.' ) );
-
-	return $result;
-}
-
-/**
- * Correct 404 redirects when NOBLOGREDIRECT is defined.
- *
- * @since MU
- */
-function maybe_redirect_404() {
-	/**
-	 * Filters the redirect URL for 404s on the main site.
-	 *
-	 * The filter is only evaluated if the NOBLOGREDIRECT constant is defined.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $no_blog_redirect The redirect URL defined in NOBLOGREDIRECT.
-	 */
-	if ( is_main_site() && is_404() && defined( 'NOBLOGREDIRECT' ) && ( $destination = apply_filters( 'blog_redirect_404', NOBLOGREDIRECT ) ) ) {
-		if ( $destination == '%siteurl%' )
-			$destination = network_home_url();
-		wp_redirect( $destination );
-		exit();
-	}
-}
-
-/**
- * Add a new user to a blog by visiting /newbloguser/username/.
- *
- * This will only work when the user's details are saved as an option
- * keyed as 'new_user_x', where 'x' is the username of the user to be
- * added, as when a user is invited through the regular WP Add User interface.
- *
- * @since MU
- */
-function maybe_add_existing_user_to_blog() {
-	if ( false === strpos( $_SERVER[ 'REQUEST_URI' ], '/newbloguser/' ) )
-		return;
-
-	$parts = explode( '/', $_SERVER[ 'REQUEST_URI' ] );
-	$key = array_pop( $parts );
-
-	if ( $key == '' )
-		$key = array_pop( $parts );
-
-	$details = get_option( 'new_user_' . $key );
-	if ( !empty( $details ) )
-		delete_option( 'new_user_' . $key );
-
-	if ( empty( $details ) || is_wp_error( add_existing_user_to_blog( $details ) ) )
-		wp_die( sprintf(__('An error occurred adding you to this site. Back to the <a href="%s">homepage</a>.'), home_url() ) );
-
-	wp_die( sprintf( __( 'You have been added to this site. Please visit the <a href="%s">homepage</a> or <a href="%s">log in</a> using your username and password.' ), home_url(), admin_url() ), __( 'WordPress &rsaquo; Success' ), array( 'response' => 200 ) );
-}
-
-/**
- * Add a user to a blog based on details from maybe_add_existing_user_to_blog().
- *
- * @since MU
- *
- * @param array $details
- * @return true|WP_Error|void
- */
-function add_existing_user_to_blog( $details = false ) {
-	if ( is_array( $details ) ) {
-		$blog_id = get_current_blog_id();
-		$result = add_user_to_blog( $blog_id, $details[ 'user_id' ], $details[ 'role' ] );
-		/**
-		 * Fires immediately after an existing user is added to a site.
-		 *
-		 * @since MU
-		 *
-		 * @param int   $user_id User ID.
-		 * @param mixed $result  True on success or a WP_Error object if the user doesn't exist.
-		 */
-		do_action( 'added_existing_user', $details['user_id'], $result );
-		return $result;
-	}
-}
-
-/**
- * Adds a newly created user to the appropriate blog
- *
- * To add a user in general, use add_user_to_blog(). This function
- * is specifically hooked into the {@see 'wpmu_activate_user'} action.
- *
- * @since MU
- * @see add_user_to_blog()
- *
- * @param int   $user_id
- * @param mixed $password Ignored.
- * @param array $meta
- */
-function add_new_user_to_blog( $user_id, $password, $meta ) {
-	if ( !empty( $meta[ 'add_to_blog' ] ) ) {
-		$blog_id = $meta[ 'add_to_blog' ];
-		$role = $meta[ 'new_role' ];
-		remove_user_from_blog($user_id, get_current_site()->blog_id); // remove user from main blog.
-		add_user_to_blog( $blog_id, $user_id, $role );
-		update_user_meta( $user_id, 'primary_blog', $blog_id );
-	}
-}
-
-/**
- * Correct From host on outgoing mail to match the site domain
- *
- * @since MU
- *
- * @param PHPMailer $phpmailer The PHPMailer instance, passed by reference.
- */
-function fix_phpmailer_messageid( $phpmailer ) {
-	$phpmailer->Hostname = get_current_site()->domain;
-}
-
-/**
- * Check to see whether a user is marked as a spammer, based on user login.
- *
- * @since MU
- *
- * @param string|WP_User $user Optional. Defaults to current user. WP_User object,
- * 	                           or user login name as a string.
- * @return bool
- */
-function is_user_spammy( $user = null ) {
-    if ( ! ( $user instanceof WP_User ) ) {
-		if ( $user ) {
-			$user = get_user_by( 'login', $user );
-		} else {
-			$user = wp_get_current_user();
-		}
-	}
-
-	return $user && isset( $user->spam ) && 1 == $user->spam;
-}
-
-/**
- * Update this blog's 'public' setting in the global blogs table.
- *
- * Public blogs have a setting of 1, private blogs are 0.
- *
- * @since MU
- *
- * @param int $old_value
- * @param int $value     The new public value
- */
-function update_blog_public( $old_value, $value ) {
-	update_blog_status( get_current_blog_id(), 'public', (int) $value );
-}
-
-/**
- * Check whether a usermeta key has to do with the current blog.
- *
- * @since MU
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $key
- * @param int    $user_id Optional. Defaults to current user.
- * @param int    $blog_id Optional. Defaults to current blog.
- * @return bool
- */
-function is_user_option_local( $key, $user_id = 0, $blog_id = 0 ) {
-	global $wpdb;
-
-	$current_user = wp_get_current_user();
-	if ( $blog_id == 0 ) {
-		$blog_id = $wpdb->blogid;
-	}
-	$local_key = $wpdb->get_blog_prefix( $blog_id ) . $key;
-
-	return isset( $current_user->$local_key );
-}
-
-/**
- * Check whether users can self-register, based on Network settings.
- *
- * @since MU
- *
- * @return bool
- */
-function users_can_register_signup_filter() {
-	$registration = get_site_option('registration');
-	return ( $registration == 'all' || $registration == 'user' );
-}
-
-/**
- * Ensure that the welcome message is not empty. Currently unused.
- *
- * @since MU
- *
- * @param string $text
- * @return string
- */
-function welcome_user_msg_filter( $text ) {
-	if ( !$text ) {
-		remove_filter( 'site_option_welcome_user_email', 'welcome_user_msg_filter' );
-
-		/* translators: Do not translate USERNAME, PASSWORD, LOGINLINK, SITE_NAME: those are placeholders. */
-		$text = __( 'Howdy USERNAME,
-
-Your new account is set up.
-
-You can log in with the following information:
-Username: USERNAME
-Password: PASSWORD
-LOGINLINK
-
-Thanks!
-
---The Team @ SITE_NAME' );
-		update_site_option( 'welcome_user_email', $text );
-	}
-	return $text;
-}
-
-/**
- * Whether to force SSL on content.
- *
- * @since 2.8.5
- *
- * @staticvar bool $forced_content
- *
- * @param bool $force
- * @return bool True if forced, false if not forced.
- */
-function force_ssl_content( $force = '' ) {
-	static $forced_content = false;
-
-	if ( '' != $force ) {
-		$old_forced = $forced_content;
-		$forced_content = $force;
-		return $old_forced;
-	}
-
-	return $forced_content;
-}
-
-/**
- * Formats a URL to use https.
- *
- * Useful as a filter.
- *
- * @since 2.8.5
- *
- * @param string $url URL
- * @return string URL with https as the scheme
- */
-function filter_SSL( $url ) {
-	if ( ! is_string( $url ) )
-		return get_bloginfo( 'url' ); // Return home blog url with proper scheme
-
-	if ( force_ssl_content() && is_ssl() )
-		$url = set_url_scheme( $url, 'https' );
-
-	return $url;
-}
-
-/**
- * Schedule update of the network-wide counts for the current network.
- *
- * @since 3.1.0
- */
-function wp_schedule_update_network_counts() {
-	if ( !is_main_site() )
-		return;
-
-	if ( ! wp_next_scheduled('update_network_counts') && ! wp_installing() )
-		wp_schedule_event(time(), 'twicedaily', 'update_network_counts');
-}
-
-/**
- *  Update the network-wide counts for the current network.
- *
- *  @since 3.1.0
- */
-function wp_update_network_counts() {
-	wp_update_network_user_counts();
-	wp_update_network_site_counts();
-}
-
-/**
- * Update the count of sites for the current network.
- *
- * If enabled through the {@see 'enable_live_network_counts'} filter, update the sites count
- * on a network when a site is created or its status is updated.
- *
- * @since 3.7.0
- */
-function wp_maybe_update_network_site_counts() {
-	$is_small_network = ! wp_is_large_network( 'sites' );
-
-	/**
-	 * Filters whether to update network site or user counts when a new site is created.
-	 *
-	 * @since 3.7.0
-	 *
-	 * @see wp_is_large_network()
-	 *
-	 * @param bool   $small_network Whether the network is considered small.
-	 * @param string $context       Context. Either 'users' or 'sites'.
-	 */
-	if ( ! apply_filters( 'enable_live_network_counts', $is_small_network, 'sites' ) )
-		return;
-
-	wp_update_network_site_counts();
-}
-
-/**
- * Update the network-wide users count.
- *
- * If enabled through the {@see 'enable_live_network_counts'} filter, update the users count
- * on a network when a user is created or its status is updated.
- *
- * @since 3.7.0
- */
-function wp_maybe_update_network_user_counts() {
-	$is_small_network = ! wp_is_large_network( 'users' );
-
-	/** This filter is documented in wp-includes/ms-functions.php */
-	if ( ! apply_filters( 'enable_live_network_counts', $is_small_network, 'users' ) )
-		return;
-
-	wp_update_network_user_counts();
-}
-
-/**
- * Update the network-wide site count.
- *
- * @since 3.7.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- */
-function wp_update_network_site_counts() {
-	global $wpdb;
-
-	$count = get_sites( array(
-		'network_id' => $wpdb->siteid,
-		'spam'       => 0,
-		'deleted'    => 0,
-		'archived'   => 0,
-		'count'      => true,
-	) );
-
-	update_site_option( 'blog_count', $count );
-}
-
-/**
- * Update the network-wide user count.
- *
- * @since 3.7.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- */
-function wp_update_network_user_counts() {
-	global $wpdb;
-
-	$count = $wpdb->get_var( "SELECT COUNT(ID) as c FROM $wpdb->users WHERE spam = '0' AND deleted = '0'" );
-	update_site_option( 'user_count', $count );
-}
-
-/**
- * Returns the space used by the current blog.
- *
- * @since 3.5.0
- *
- * @return int Used space in megabytes
- */
-function get_space_used() {
-	/**
-	 * Filters the amount of storage space used by the current site.
-	 *
-	 * @since 3.5.0
-	 *
-	 * @param int|bool $space_used The amount of used space, in megabytes. Default false.
-	 */
-	$space_used = apply_filters( 'pre_get_space_used', false );
-	if ( false === $space_used ) {
-		$upload_dir = wp_upload_dir();
-		$space_used = get_dirsize( $upload_dir['basedir'] ) / MB_IN_BYTES;
-	}
-
-	return $space_used;
-}
-
-/**
- * Returns the upload quota for the current blog.
- *
- * @since MU
- *
- * @return int Quota in megabytes
- */
-function get_space_allowed() {
-	$space_allowed = get_option( 'blog_upload_space' );
-
-	if ( ! is_numeric( $space_allowed ) )
-		$space_allowed = get_site_option( 'blog_upload_space' );
-
-	if ( ! is_numeric( $space_allowed ) )
-		$space_allowed = 100;
-
-	/**
-	 * Filters the upload quota for the current site.
-	 *
-	 * @since 3.7.0
-	 *
-	 * @param int $space_allowed Upload quota in megabytes for the current blog.
-	 */
-	return apply_filters( 'get_space_allowed', $space_allowed );
-}
-
-/**
- * Determines if there is any upload space left in the current blog's quota.
- *
- * @since 3.0.0
- *
- * @return int of upload space available in bytes
- */
-function get_upload_space_available() {
-	$allowed = get_space_allowed();
-	if ( $allowed < 0 ) {
-		$allowed = 0;
-	}
-	$space_allowed = $allowed * MB_IN_BYTES;
-	if ( get_site_option( 'upload_space_check_disabled' ) )
-		return $space_allowed;
-
-	$space_used = get_space_used() * MB_IN_BYTES;
-
-	if ( ( $space_allowed - $space_used ) <= 0 )
-		return 0;
-
-	return $space_allowed - $space_used;
-}
-
-/**
- * Determines if there is any upload space left in the current blog's quota.
- *
- * @since 3.0.0
- * @return bool True if space is available, false otherwise.
- */
-function is_upload_space_available() {
-	if ( get_site_option( 'upload_space_check_disabled' ) )
-		return true;
-
-	return (bool) get_upload_space_available();
-}
-
-/**
- * Filters the maximum upload file size allowed, in bytes.
- *
- * @since 3.0.0
- *
- * @param  int $size Upload size limit in bytes.
- * @return int       Upload size limit in bytes.
- */
-function upload_size_limit_filter( $size ) {
-	$fileupload_maxk = KB_IN_BYTES * get_site_option( 'fileupload_maxk', 1500 );
-	if ( get_site_option( 'upload_space_check_disabled' ) )
-		return min( $size, $fileupload_maxk );
-
-	return min( $size, $fileupload_maxk, get_upload_space_available() );
-}
-
-/**
- * Whether or not we have a large network.
- *
- * The default criteria for a large network is either more than 10,000 users or more than 10,000 sites.
- * Plugins can alter this criteria using the {@see 'wp_is_large_network'} filter.
- *
- * @since 3.3.0
- * @param string $using 'sites or 'users'. Default is 'sites'.
- * @return bool True if the network meets the criteria for large. False otherwise.
- */
-function wp_is_large_network( $using = 'sites' ) {
-	if ( 'users' == $using ) {
-		$count = get_user_count();
-		/**
-		 * Filters whether the network is considered large.
-		 *
-		 * @since 3.3.0
-		 *
-		 * @param bool   $is_large_network Whether the network has more than 10000 users or sites.
-		 * @param string $component        The component to count. Accepts 'users', or 'sites'.
-		 * @param int    $count            The count of items for the component.
-		 */
-		return apply_filters( 'wp_is_large_network', $count > 10000, 'users', $count );
-	}
-
-	$count = get_blog_count();
-	/** This filter is documented in wp-includes/ms-functions.php */
-	return apply_filters( 'wp_is_large_network', $count > 10000, 'sites', $count );
-}
-
-/**
- * Retrieves a list of reserved site on a sub-directory Multisite install.
- *
- * @since 4.4.0
- *
- * @return array $names Array of reserved subdirectory names.
- */
-function get_subdirectory_reserved_names() {
-	$names = array(
-		'page', 'comments', 'blog', 'files', 'feed', 'wp-admin',
-		'wp-content', 'wp-includes', 'wp-json', 'embed'
-	);
-
-	/**
-	 * Filters reserved site names on a sub-directory Multisite install.
-	 *
-	 * @since 3.0.0
-	 * @since 4.4.0 'wp-admin', 'wp-content', 'wp-includes', 'wp-json', and 'embed' were added
-	 *              to the reserved names list.
-	 *
-	 * @param array $subdirectory_reserved_names Array of reserved names.
-	 */
-	return apply_filters( 'subdirectory_reserved_names', $names );
-}
Index: www/wp-includes/formatting.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/formatting.php	(revision 38565)
+++ www/wp-includes/formatting.php	(revision 38565)
@@ -1,5290 +0,0 @@
-<?php
-/**
- * Main WordPress Formatting API.
- *
- * Handles many functions for formatting output.
- *
- * @package WordPress
- */
-
-/**
- * Replaces common plain text characters into formatted entities
- *
- * As an example,
- *
- *     'cause today's effort makes it worth tomorrow's "holiday" ...
- *
- * Becomes:
- *
- *     &#8217;cause today&#8217;s effort makes it worth tomorrow&#8217;s &#8220;holiday&#8221; &#8230;
- *
- * Code within certain html blocks are skipped.
- *
- * Do not use this function before the {@see 'init'} action hook; everything will break.
- *
- * @since 0.71
- *
- * @global array $wp_cockneyreplace Array of formatted entities for certain common phrases
- * @global array $shortcode_tags
- * @staticvar array $static_characters
- * @staticvar array $static_replacements
- * @staticvar array $dynamic_characters
- * @staticvar array $dynamic_replacements
- * @staticvar array $default_no_texturize_tags
- * @staticvar array $default_no_texturize_shortcodes
- * @staticvar bool  $run_texturize
- *
- * @param string $text The text to be formatted
- * @param bool   $reset Set to true for unit testing. Translated patterns will reset.
- * @return string The string replaced with html entities
- */
-function wptexturize( $text, $reset = false ) {
-	global $wp_cockneyreplace, $shortcode_tags;
-	static $static_characters = null,
-		$static_replacements = null,
-		$dynamic_characters = null,
-		$dynamic_replacements = null,
-		$default_no_texturize_tags = null,
-		$default_no_texturize_shortcodes = null,
-		$run_texturize = true,
-		$apos = null,
-		$prime = null,
-		$double_prime = null,
-		$opening_quote = null,
-		$closing_quote = null,
-		$opening_single_quote = null,
-		$closing_single_quote = null,
-		$open_q_flag = '<!--oq-->',
-		$open_sq_flag = '<!--osq-->',
-		$apos_flag = '<!--apos-->';
-
-	// If there's nothing to do, just stop.
-	if ( empty( $text ) || false === $run_texturize ) {
-		return $text;
-	}
-
-	// Set up static variables. Run once only.
-	if ( $reset || ! isset( $static_characters ) ) {
-		/**
-		 * Filters whether to skip running wptexturize().
-		 *
-		 * Passing false to the filter will effectively short-circuit wptexturize().
-		 * returning the original text passed to the function instead.
-		 *
-		 * The filter runs only once, the first time wptexturize() is called.
-		 *
-		 * @since 4.0.0
-		 *
-		 * @see wptexturize()
-		 *
-		 * @param bool $run_texturize Whether to short-circuit wptexturize().
-		 */
-		$run_texturize = apply_filters( 'run_wptexturize', $run_texturize );
-		if ( false === $run_texturize ) {
-			return $text;
-		}
-
-		/* translators: opening curly double quote */
-		$opening_quote = _x( '&#8220;', 'opening curly double quote' );
-		/* translators: closing curly double quote */
-		$closing_quote = _x( '&#8221;', 'closing curly double quote' );
-
-		/* translators: apostrophe, for example in 'cause or can't */
-		$apos = _x( '&#8217;', 'apostrophe' );
-
-		/* translators: prime, for example in 9' (nine feet) */
-		$prime = _x( '&#8242;', 'prime' );
-		/* translators: double prime, for example in 9" (nine inches) */
-		$double_prime = _x( '&#8243;', 'double prime' );
-
-		/* translators: opening curly single quote */
-		$opening_single_quote = _x( '&#8216;', 'opening curly single quote' );
-		/* translators: closing curly single quote */
-		$closing_single_quote = _x( '&#8217;', 'closing curly single quote' );
-
-		/* translators: en dash */
-		$en_dash = _x( '&#8211;', 'en dash' );
-		/* translators: em dash */
-		$em_dash = _x( '&#8212;', 'em dash' );
-
-		$default_no_texturize_tags = array('pre', 'code', 'kbd', 'style', 'script', 'tt');
-		$default_no_texturize_shortcodes = array('code');
-
-		// if a plugin has provided an autocorrect array, use it
-		if ( isset($wp_cockneyreplace) ) {
-			$cockney = array_keys( $wp_cockneyreplace );
-			$cockneyreplace = array_values( $wp_cockneyreplace );
-		} else {
-			/* translators: This is a comma-separated list of words that defy the syntax of quotations in normal use,
-			 * for example...  'We do not have enough words yet' ... is a typical quoted phrase.  But when we write
-			 * lines of code 'til we have enough of 'em, then we need to insert apostrophes instead of quotes.
-			 */
-			$cockney = explode( ',', _x( "'tain't,'twere,'twas,'tis,'twill,'til,'bout,'nuff,'round,'cause,'em",
-				'Comma-separated list of words to texturize in your language' ) );
-
-			$cockneyreplace = explode( ',', _x( '&#8217;tain&#8217;t,&#8217;twere,&#8217;twas,&#8217;tis,&#8217;twill,&#8217;til,&#8217;bout,&#8217;nuff,&#8217;round,&#8217;cause,&#8217;em',
-				'Comma-separated list of replacement words in your language' ) );
-		}
-
-		$static_characters = array_merge( array( '...', '``', '\'\'', ' (tm)' ), $cockney );
-		$static_replacements = array_merge( array( '&#8230;', $opening_quote, $closing_quote, ' &#8482;' ), $cockneyreplace );
-
-
-		// Pattern-based replacements of characters.
-		// Sort the remaining patterns into several arrays for performance tuning.
-		$dynamic_characters = array( 'apos' => array(), 'quote' => array(), 'dash' => array() );
-		$dynamic_replacements = array( 'apos' => array(), 'quote' => array(), 'dash' => array() );
-		$dynamic = array();
-		$spaces = wp_spaces_regexp();
-
-		// '99' and '99" are ambiguous among other patterns; assume it's an abbreviated year at the end of a quotation.
-		if ( "'" !== $apos || "'" !== $closing_single_quote ) {
-			$dynamic[ '/\'(\d\d)\'(?=\Z|[.,:;!?)}\-\]]|&gt;|' . $spaces . ')/' ] = $apos_flag . '$1' . $closing_single_quote;
-		}
-		if ( "'" !== $apos || '"' !== $closing_quote ) {
-			$dynamic[ '/\'(\d\d)"(?=\Z|[.,:;!?)}\-\]]|&gt;|' . $spaces . ')/' ] = $apos_flag . '$1' . $closing_quote;
-		}
-
-		// '99 '99s '99's (apostrophe)  But never '9 or '99% or '999 or '99.0.
-		if ( "'" !== $apos ) {
-			$dynamic[ '/\'(?=\d\d(?:\Z|(?![%\d]|[.,]\d)))/' ] = $apos_flag;
-		}
-
-		// Quoted Numbers like '0.42'
-		if ( "'" !== $opening_single_quote && "'" !== $closing_single_quote ) {
-			$dynamic[ '/(?<=\A|' . $spaces . ')\'(\d[.,\d]*)\'/' ] = $open_sq_flag . '$1' . $closing_single_quote;
-		}
-
-		// Single quote at start, or preceded by (, {, <, [, ", -, or spaces.
-		if ( "'" !== $opening_single_quote ) {
-			$dynamic[ '/(?<=\A|[([{"\-]|&lt;|' . $spaces . ')\'/' ] = $open_sq_flag;
-		}
-
-		// Apostrophe in a word.  No spaces, double apostrophes, or other punctuation.
-		if ( "'" !== $apos ) {
-			$dynamic[ '/(?<!' . $spaces . ')\'(?!\Z|[.,:;!?"\'(){}[\]\-]|&[lg]t;|' . $spaces . ')/' ] = $apos_flag;
-		}
-
-		$dynamic_characters['apos'] = array_keys( $dynamic );
-		$dynamic_replacements['apos'] = array_values( $dynamic );
-		$dynamic = array();
-
-		// Quoted Numbers like "42"
-		if ( '"' !== $opening_quote && '"' !== $closing_quote ) {
-			$dynamic[ '/(?<=\A|' . $spaces . ')"(\d[.,\d]*)"/' ] = $open_q_flag . '$1' . $closing_quote;
-		}
-
-		// Double quote at start, or preceded by (, {, <, [, -, or spaces, and not followed by spaces.
-		if ( '"' !== $opening_quote ) {
-			$dynamic[ '/(?<=\A|[([{\-]|&lt;|' . $spaces . ')"(?!' . $spaces . ')/' ] = $open_q_flag;
-		}
-
-		$dynamic_characters['quote'] = array_keys( $dynamic );
-		$dynamic_replacements['quote'] = array_values( $dynamic );
-		$dynamic = array();
-
-		// Dashes and spaces
-		$dynamic[ '/---/' ] = $em_dash;
-		$dynamic[ '/(?<=^|' . $spaces . ')--(?=$|' . $spaces . ')/' ] = $em_dash;
-		$dynamic[ '/(?<!xn)--/' ] = $en_dash;
-		$dynamic[ '/(?<=^|' . $spaces . ')-(?=$|' . $spaces . ')/' ] = $en_dash;
-
-		$dynamic_characters['dash'] = array_keys( $dynamic );
-		$dynamic_replacements['dash'] = array_values( $dynamic );
-	}
-
-	// Must do this every time in case plugins use these filters in a context sensitive manner
-	/**
-	 * Filters the list of HTML elements not to texturize.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param array $default_no_texturize_tags An array of HTML element names.
-	 */
-	$no_texturize_tags = apply_filters( 'no_texturize_tags', $default_no_texturize_tags );
-	/**
-	 * Filters the list of shortcodes not to texturize.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param array $default_no_texturize_shortcodes An array of shortcode names.
-	 */
-	$no_texturize_shortcodes = apply_filters( 'no_texturize_shortcodes', $default_no_texturize_shortcodes );
-
-	$no_texturize_tags_stack = array();
-	$no_texturize_shortcodes_stack = array();
-
-	// Look for shortcodes and HTML elements.
-
-	preg_match_all( '@\[/?([^<>&/\[\]\x00-\x20=]++)@', $text, $matches );
-	$tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
-	$found_shortcodes = ! empty( $tagnames );
-	$shortcode_regex = $found_shortcodes ? _get_wptexturize_shortcode_regex( $tagnames ) : '';
-	$regex = _get_wptexturize_split_regex( $shortcode_regex );
-
-	$textarr = preg_split( $regex, $text, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY );
-
-	foreach ( $textarr as &$curl ) {
-		// Only call _wptexturize_pushpop_element if $curl is a delimiter.
-		$first = $curl[0];
-		if ( '<' === $first ) {
-			if ( '<!--' === substr( $curl, 0, 4 ) ) {
-				// This is an HTML comment delimiter.
-				continue;
-			} else {
-				// This is an HTML element delimiter.
-
-				// Replace each & with &#038; unless it already looks like an entity.
-				$curl = preg_replace( '/&(?!#(?:\d+|x[a-f0-9]+);|[a-z1-4]{1,8};)/i', '&#038;', $curl );
-
-				_wptexturize_pushpop_element( $curl, $no_texturize_tags_stack, $no_texturize_tags );
-			}
-
-		} elseif ( '' === trim( $curl ) ) {
-			// This is a newline between delimiters.  Performance improves when we check this.
-			continue;
-
-		} elseif ( '[' === $first && $found_shortcodes && 1 === preg_match( '/^' . $shortcode_regex . '$/', $curl ) ) {
-			// This is a shortcode delimiter.
-
-			if ( '[[' !== substr( $curl, 0, 2 ) && ']]' !== substr( $curl, -2 ) ) {
-				// Looks like a normal shortcode.
-				_wptexturize_pushpop_element( $curl, $no_texturize_shortcodes_stack, $no_texturize_shortcodes );
-			} else {
-				// Looks like an escaped shortcode.
-				continue;
-			}
-
-		} elseif ( empty( $no_texturize_shortcodes_stack ) && empty( $no_texturize_tags_stack ) ) {
-			// This is neither a delimiter, nor is this content inside of no_texturize pairs.  Do texturize.
-
-			$curl = str_replace( $static_characters, $static_replacements, $curl );
-
-			if ( false !== strpos( $curl, "'" ) ) {
-				$curl = preg_replace( $dynamic_characters['apos'], $dynamic_replacements['apos'], $curl );
-				$curl = wptexturize_primes( $curl, "'", $prime, $open_sq_flag, $closing_single_quote );
-				$curl = str_replace( $apos_flag, $apos, $curl );
-				$curl = str_replace( $open_sq_flag, $opening_single_quote, $curl );
-			}
-			if ( false !== strpos( $curl, '"' ) ) {
-				$curl = preg_replace( $dynamic_characters['quote'], $dynamic_replacements['quote'], $curl );
-				$curl = wptexturize_primes( $curl, '"', $double_prime, $open_q_flag, $closing_quote );
-				$curl = str_replace( $open_q_flag, $opening_quote, $curl );
-			}
-			if ( false !== strpos( $curl, '-' ) ) {
-				$curl = preg_replace( $dynamic_characters['dash'], $dynamic_replacements['dash'], $curl );
-			}
-
-			// 9x9 (times), but never 0x9999
-			if ( 1 === preg_match( '/(?<=\d)x\d/', $curl ) ) {
-				// Searching for a digit is 10 times more expensive than for the x, so we avoid doing this one!
-				$curl = preg_replace( '/\b(\d(?(?<=0)[\d\.,]+|[\d\.,]*))x(\d[\d\.,]*)\b/', '$1&#215;$2', $curl );
-			}
-
-			// Replace each & with &#038; unless it already looks like an entity.
-			$curl = preg_replace( '/&(?!#(?:\d+|x[a-f0-9]+);|[a-z1-4]{1,8};)/i', '&#038;', $curl );
-		}
-	}
-
-	return implode( '', $textarr );
-}
-
-/**
- * Implements a logic tree to determine whether or not "7'." represents seven feet,
- * then converts the special char into either a prime char or a closing quote char.
- *
- * @since 4.3.0
- *
- * @param string $haystack    The plain text to be searched.
- * @param string $needle      The character to search for such as ' or ".
- * @param string $prime       The prime char to use for replacement.
- * @param string $open_quote  The opening quote char. Opening quote replacement must be
- *                            accomplished already.
- * @param string $close_quote The closing quote char to use for replacement.
- * @return string The $haystack value after primes and quotes replacements.
- */
-function wptexturize_primes( $haystack, $needle, $prime, $open_quote, $close_quote ) {
-	$spaces = wp_spaces_regexp();
-	$flag = '<!--wp-prime-or-quote-->';
-	$quote_pattern = "/$needle(?=\\Z|[.,:;!?)}\\-\\]]|&gt;|" . $spaces . ")/";
-	$prime_pattern    = "/(?<=\\d)$needle/";
-	$flag_after_digit = "/(?<=\\d)$flag/";
-	$flag_no_digit    = "/(?<!\\d)$flag/";
-
-	$sentences = explode( $open_quote, $haystack );
-
-	foreach ( $sentences as $key => &$sentence ) {
-		if ( false === strpos( $sentence, $needle ) ) {
-			continue;
-		} elseif ( 0 !== $key && 0 === substr_count( $sentence, $close_quote ) ) {
-			$sentence = preg_replace( $quote_pattern, $flag, $sentence, -1, $count );
-			if ( $count > 1 ) {
-				// This sentence appears to have multiple closing quotes.  Attempt Vulcan logic.
-				$sentence = preg_replace( $flag_no_digit, $close_quote, $sentence, -1, $count2 );
-				if ( 0 === $count2 ) {
-					// Try looking for a quote followed by a period.
-					$count2 = substr_count( $sentence, "$flag." );
-					if ( $count2 > 0 ) {
-						// Assume the rightmost quote-period match is the end of quotation.
-						$pos = strrpos( $sentence, "$flag." );
-					} else {
-						// When all else fails, make the rightmost candidate a closing quote.
-						// This is most likely to be problematic in the context of bug #18549.
-						$pos = strrpos( $sentence, $flag );
-					}
-					$sentence = substr_replace( $sentence, $close_quote, $pos, strlen( $flag ) );
-				}
-				// Use conventional replacement on any remaining primes and quotes.
-				$sentence = preg_replace( $prime_pattern, $prime, $sentence );
-				$sentence = preg_replace( $flag_after_digit, $prime, $sentence );
-				$sentence = str_replace( $flag, $close_quote, $sentence );
-			} elseif ( 1 == $count ) {
-				// Found only one closing quote candidate, so give it priority over primes.
-				$sentence = str_replace( $flag, $close_quote, $sentence );
-				$sentence = preg_replace( $prime_pattern, $prime, $sentence );
-			} else {
-				// No closing quotes found.  Just run primes pattern.
-				$sentence = preg_replace( $prime_pattern, $prime, $sentence );
-			}
-		} else {
-			$sentence = preg_replace( $prime_pattern, $prime, $sentence );
-			$sentence = preg_replace( $quote_pattern, $close_quote, $sentence );
-		}
-		if ( '"' == $needle && false !== strpos( $sentence, '"' ) ) {
-			$sentence = str_replace( '"', $close_quote, $sentence );
-		}
-	}
-
-	return implode( $open_quote, $sentences );
-}
-
-/**
- * Search for disabled element tags. Push element to stack on tag open and pop
- * on tag close.
- *
- * Assumes first char of $text is tag opening and last char is tag closing.
- * Assumes second char of $text is optionally '/' to indicate closing as in </html>.
- *
- * @since 2.9.0
- * @access private
- *
- * @param string $text Text to check. Must be a tag like `<html>` or `[shortcode]`.
- * @param array  $stack List of open tag elements.
- * @param array  $disabled_elements The tag names to match against. Spaces are not allowed in tag names.
- */
-function _wptexturize_pushpop_element( $text, &$stack, $disabled_elements ) {
-	// Is it an opening tag or closing tag?
-	if ( isset( $text[1] ) && '/' !== $text[1] ) {
-		$opening_tag = true;
-		$name_offset = 1;
-	} elseif ( 0 == count( $stack ) ) {
-		// Stack is empty. Just stop.
-		return;
-	} else {
-		$opening_tag = false;
-		$name_offset = 2;
-	}
-
-	// Parse out the tag name.
-	$space = strpos( $text, ' ' );
-	if ( false === $space ) {
-		$space = -1;
-	} else {
-		$space -= $name_offset;
-	}
-	$tag = substr( $text, $name_offset, $space );
-
-	// Handle disabled tags.
-	if ( in_array( $tag, $disabled_elements ) ) {
-		if ( $opening_tag ) {
-			/*
-			 * This disables texturize until we find a closing tag of our type
-			 * (e.g. <pre>) even if there was invalid nesting before that
-			 *
-			 * Example: in the case <pre>sadsadasd</code>"baba"</pre>
-			 *          "baba" won't be texturize
-			 */
-
-			array_push( $stack, $tag );
-		} elseif ( end( $stack ) == $tag ) {
-			array_pop( $stack );
-		}
-	}
-}
-
-/**
- * Replaces double line-breaks with paragraph elements.
- *
- * A group of regex replaces used to identify text formatted with newlines and
- * replace double line-breaks with HTML paragraph tags. The remaining line-breaks
- * after conversion become <<br />> tags, unless $br is set to '0' or 'false'.
- *
- * @since 0.71
- *
- * @param string $pee The text which has to be formatted.
- * @param bool   $br  Optional. If set, this will convert all remaining line-breaks
- *                    after paragraphing. Default true.
- * @return string Text which has been converted into correct paragraph tags.
- */
-function wpautop( $pee, $br = true ) {
-	$pre_tags = array();
-
-	if ( trim($pee) === '' )
-		return '';
-
-	// Just to make things a little easier, pad the end.
-	$pee = $pee . "\n";
-
-	/*
-	 * Pre tags shouldn't be touched by autop.
-	 * Replace pre tags with placeholders and bring them back after autop.
-	 */
-	if ( strpos($pee, '<pre') !== false ) {
-		$pee_parts = explode( '</pre>', $pee );
-		$last_pee = array_pop($pee_parts);
-		$pee = '';
-		$i = 0;
-
-		foreach ( $pee_parts as $pee_part ) {
-			$start = strpos($pee_part, '<pre');
-
-			// Malformed html?
-			if ( $start === false ) {
-				$pee .= $pee_part;
-				continue;
-			}
-
-			$name = "<pre wp-pre-tag-$i></pre>";
-			$pre_tags[$name] = substr( $pee_part, $start ) . '</pre>';
-
-			$pee .= substr( $pee_part, 0, $start ) . $name;
-			$i++;
-		}
-
-		$pee .= $last_pee;
-	}
-	// Change multiple <br>s into two line breaks, which will turn into paragraphs.
-	$pee = preg_replace('|<br\s*/?>\s*<br\s*/?>|', "\n\n", $pee);
-
-	$allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)';
-
-	// Add a double line break above block-level opening tags.
-	$pee = preg_replace('!(<' . $allblocks . '[\s/>])!', "\n\n$1", $pee);
-
-	// Add a double line break below block-level closing tags.
-	$pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee);
-
-	// Standardize newline characters to "\n".
-	$pee = str_replace(array("\r\n", "\r"), "\n", $pee);
-
-	// Find newlines in all elements and add placeholders.
-	$pee = wp_replace_in_html_tags( $pee, array( "\n" => " <!-- wpnl --> " ) );
-
-	// Collapse line breaks before and after <option> elements so they don't get autop'd.
-	if ( strpos( $pee, '<option' ) !== false ) {
-		$pee = preg_replace( '|\s*<option|', '<option', $pee );
-		$pee = preg_replace( '|</option>\s*|', '</option>', $pee );
-	}
-
-	/*
-	 * Collapse line breaks inside <object> elements, before <param> and <embed> elements
-	 * so they don't get autop'd.
-	 */
-	if ( strpos( $pee, '</object>' ) !== false ) {
-		$pee = preg_replace( '|(<object[^>]*>)\s*|', '$1', $pee );
-		$pee = preg_replace( '|\s*</object>|', '</object>', $pee );
-		$pee = preg_replace( '%\s*(</?(?:param|embed)[^>]*>)\s*%', '$1', $pee );
-	}
-
-	/*
-	 * Collapse line breaks inside <audio> and <video> elements,
-	 * before and after <source> and <track> elements.
-	 */
-	if ( strpos( $pee, '<source' ) !== false || strpos( $pee, '<track' ) !== false ) {
-		$pee = preg_replace( '%([<\[](?:audio|video)[^>\]]*[>\]])\s*%', '$1', $pee );
-		$pee = preg_replace( '%\s*([<\[]/(?:audio|video)[>\]])%', '$1', $pee );
-		$pee = preg_replace( '%\s*(<(?:source|track)[^>]*>)\s*%', '$1', $pee );
-	}
-
-	// Remove more than two contiguous line breaks.
-	$pee = preg_replace("/\n\n+/", "\n\n", $pee);
-
-	// Split up the contents into an array of strings, separated by double line breaks.
-	$pees = preg_split('/\n\s*\n/', $pee, -1, PREG_SPLIT_NO_EMPTY);
-
-	// Reset $pee prior to rebuilding.
-	$pee = '';
-
-	// Rebuild the content as a string, wrapping every bit with a <p>.
-	foreach ( $pees as $tinkle ) {
-		$pee .= '<p>' . trim($tinkle, "\n") . "</p>\n";
-	}
-
-	// Under certain strange conditions it could create a P of entirely whitespace.
-	$pee = preg_replace('|<p>\s*</p>|', '', $pee);
-
-	// Add a closing <p> inside <div>, <address>, or <form> tag if missing.
-	$pee = preg_replace('!<p>([^<]+)</(div|address|form)>!', "<p>$1</p></$2>", $pee);
-
-	// If an opening or closing block element tag is wrapped in a <p>, unwrap it.
-	$pee = preg_replace('!<p>\s*(</?' . $allblocks . '[^>]*>)\s*</p>!', "$1", $pee);
-
-	// In some cases <li> may get wrapped in <p>, fix them.
-	$pee = preg_replace("|<p>(<li.+?)</p>|", "$1", $pee);
-
-	// If a <blockquote> is wrapped with a <p>, move it inside the <blockquote>.
-	$pee = preg_replace('|<p><blockquote([^>]*)>|i', "<blockquote$1><p>", $pee);
-	$pee = str_replace('</blockquote></p>', '</p></blockquote>', $pee);
-
-	// If an opening or closing block element tag is preceded by an opening <p> tag, remove it.
-	$pee = preg_replace('!<p>\s*(</?' . $allblocks . '[^>]*>)!', "$1", $pee);
-
-	// If an opening or closing block element tag is followed by a closing <p> tag, remove it.
-	$pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\s*</p>!', "$1", $pee);
-
-	// Optionally insert line breaks.
-	if ( $br ) {
-		// Replace newlines that shouldn't be touched with a placeholder.
-		$pee = preg_replace_callback('/<(script|style).*?<\/\\1>/s', '_autop_newline_preservation_helper', $pee);
-
-		// Normalize <br>
-		$pee = str_replace( array( '<br>', '<br/>' ), '<br />', $pee );
-
-		// Replace any new line characters that aren't preceded by a <br /> with a <br />.
-		$pee = preg_replace('|(?<!<br />)\s*\n|', "<br />\n", $pee);
-
-		// Replace newline placeholders with newlines.
-		$pee = str_replace('<WPPreserveNewline />', "\n", $pee);
-	}
-
-	// If a <br /> tag is after an opening or closing block tag, remove it.
-	$pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\s*<br />!', "$1", $pee);
-
-	// If a <br /> tag is before a subset of opening or closing block tags, remove it.
-	$pee = preg_replace('!<br />(\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $pee);
-	$pee = preg_replace( "|\n</p>$|", '</p>', $pee );
-
-	// Replace placeholder <pre> tags with their original content.
-	if ( !empty($pre_tags) )
-		$pee = str_replace(array_keys($pre_tags), array_values($pre_tags), $pee);
-
-	// Restore newlines in all elements.
-	if ( false !== strpos( $pee, '<!-- wpnl -->' ) ) {
-		$pee = str_replace( array( ' <!-- wpnl --> ', '<!-- wpnl -->' ), "\n", $pee );
-	}
-
-	return $pee;
-}
-
-/**
- * Separate HTML elements and comments from the text.
- *
- * @since 4.2.4
- *
- * @param string $input The text which has to be formatted.
- * @return array The formatted text.
- */
-function wp_html_split( $input ) {
-	return preg_split( get_html_split_regex(), $input, -1, PREG_SPLIT_DELIM_CAPTURE );
-}
-
-/**
- * Retrieve the regular expression for an HTML element.
- *
- * @since 4.4.0
- *
- * @return string The regular expression
- */
-function get_html_split_regex() {
-	static $regex;
-
-	if ( ! isset( $regex ) ) {
-		$comments =
-			  '!'           // Start of comment, after the <.
-			. '(?:'         // Unroll the loop: Consume everything until --> is found.
-			.     '-(?!->)' // Dash not followed by end of comment.
-			.     '[^\-]*+' // Consume non-dashes.
-			. ')*+'         // Loop possessively.
-			. '(?:-->)?';   // End of comment. If not found, match all input.
-
-		$cdata =
-			  '!\[CDATA\['  // Start of comment, after the <.
-			. '[^\]]*+'     // Consume non-].
-			. '(?:'         // Unroll the loop: Consume everything until ]]> is found.
-			.     '](?!]>)' // One ] not followed by end of comment.
-			.     '[^\]]*+' // Consume non-].
-			. ')*+'         // Loop possessively.
-			. '(?:]]>)?';   // End of comment. If not found, match all input.
-
-		$escaped =
-			  '(?='           // Is the element escaped?
-			.    '!--'
-			. '|'
-			.    '!\[CDATA\['
-			. ')'
-			. '(?(?=!-)'      // If yes, which type?
-			.     $comments
-			. '|'
-			.     $cdata
-			. ')';
-
-		$regex =
-			  '/('              // Capture the entire match.
-			.     '<'           // Find start of element.
-			.     '(?'          // Conditional expression follows.
-			.         $escaped  // Find end of escaped element.
-			.     '|'           // ... else ...
-			.         '[^>]*>?' // Find end of normal element.
-			.     ')'
-			. ')/';
-	}
-
-	return $regex;
-}
-
-/**
- * Retrieve the combined regular expression for HTML and shortcodes.
- *
- * @access private
- * @ignore
- * @internal This function will be removed in 4.5.0 per Shortcode API Roadmap.
- * @since 4.4.0
- *
- * @param string $shortcode_regex The result from _get_wptexturize_shortcode_regex().  Optional.
- * @return string The regular expression
- */
-function _get_wptexturize_split_regex( $shortcode_regex = '' ) {
-	static $html_regex;
-
-	if ( ! isset( $html_regex ) ) {
-		$comment_regex =
-			  '!'           // Start of comment, after the <.
-			. '(?:'         // Unroll the loop: Consume everything until --> is found.
-			.     '-(?!->)' // Dash not followed by end of comment.
-			.     '[^\-]*+' // Consume non-dashes.
-			. ')*+'         // Loop possessively.
-			. '(?:-->)?';   // End of comment. If not found, match all input.
-
-		$html_regex =			 // Needs replaced with wp_html_split() per Shortcode API Roadmap.
-			  '<'                // Find start of element.
-			. '(?(?=!--)'        // Is this a comment?
-			.     $comment_regex // Find end of comment.
-			. '|'
-			.     '[^>]*>?'      // Find end of element. If not found, match all input.
-			. ')';
-	}
-
-	if ( empty( $shortcode_regex ) ) {
-		$regex = '/(' . $html_regex . ')/';
-	} else {
-		$regex = '/(' . $html_regex . '|' . $shortcode_regex . ')/';
-	}
-
-	return $regex;
-}
-
-/**
- * Retrieve the regular expression for shortcodes.
- *
- * @access private
- * @ignore
- * @internal This function will be removed in 4.5.0 per Shortcode API Roadmap.
- * @since 4.4.0
- *
- * @param array $tagnames List of shortcodes to find.
- * @return string The regular expression
- */
-function _get_wptexturize_shortcode_regex( $tagnames ) {
-	$tagregexp = join( '|', array_map( 'preg_quote', $tagnames ) );
-	$tagregexp = "(?:$tagregexp)(?=[\\s\\]\\/])"; // Excerpt of get_shortcode_regex().
-	$regex =
-		  '\['              // Find start of shortcode.
-		. '[\/\[]?'         // Shortcodes may begin with [/ or [[
-		. $tagregexp        // Only match registered shortcodes, because performance.
-		. '(?:'
-		.     '[^\[\]<>]+'  // Shortcodes do not contain other shortcodes. Quantifier critical.
-		. '|'
-		.     '<[^\[\]>]*>' // HTML elements permitted. Prevents matching ] before >.
-		. ')*+'             // Possessive critical.
-		. '\]'              // Find end of shortcode.
-		. '\]?';            // Shortcodes may end with ]]
-
-	return $regex;
-}
-
-/**
- * Replace characters or phrases within HTML elements only.
- *
- * @since 4.2.3
- *
- * @param string $haystack The text which has to be formatted.
- * @param array $replace_pairs In the form array('from' => 'to', ...).
- * @return string The formatted text.
- */
-function wp_replace_in_html_tags( $haystack, $replace_pairs ) {
-	// Find all elements.
-	$textarr = wp_html_split( $haystack );
-	$changed = false;
-
-	// Optimize when searching for one item.
-	if ( 1 === count( $replace_pairs ) ) {
-		// Extract $needle and $replace.
-		foreach ( $replace_pairs as $needle => $replace );
-
-		// Loop through delimiters (elements) only.
-		for ( $i = 1, $c = count( $textarr ); $i < $c; $i += 2 ) {
-			if ( false !== strpos( $textarr[$i], $needle ) ) {
-				$textarr[$i] = str_replace( $needle, $replace, $textarr[$i] );
-				$changed = true;
-			}
-		}
-	} else {
-		// Extract all $needles.
-		$needles = array_keys( $replace_pairs );
-
-		// Loop through delimiters (elements) only.
-		for ( $i = 1, $c = count( $textarr ); $i < $c; $i += 2 ) {
-			foreach ( $needles as $needle ) {
-				if ( false !== strpos( $textarr[$i], $needle ) ) {
-					$textarr[$i] = strtr( $textarr[$i], $replace_pairs );
-					$changed = true;
-					// After one strtr() break out of the foreach loop and look at next element.
-					break;
-				}
-			}
-		}
-	}
-
-	if ( $changed ) {
-		$haystack = implode( $textarr );
-	}
-
-	return $haystack;
-}
-
-/**
- * Newline preservation help function for wpautop
- *
- * @since 3.1.0
- * @access private
- *
- * @param array $matches preg_replace_callback matches array
- * @return string
- */
-function _autop_newline_preservation_helper( $matches ) {
-	return str_replace( "\n", "<WPPreserveNewline />", $matches[0] );
-}
-
-/**
- * Don't auto-p wrap shortcodes that stand alone
- *
- * Ensures that shortcodes are not wrapped in `<p>...</p>`.
- *
- * @since 2.9.0
- *
- * @global array $shortcode_tags
- *
- * @param string $pee The content.
- * @return string The filtered content.
- */
-function shortcode_unautop( $pee ) {
-	global $shortcode_tags;
-
-	if ( empty( $shortcode_tags ) || !is_array( $shortcode_tags ) ) {
-		return $pee;
-	}
-
-	$tagregexp = join( '|', array_map( 'preg_quote', array_keys( $shortcode_tags ) ) );
-	$spaces = wp_spaces_regexp();
-
-	$pattern =
-		  '/'
-		. '<p>'                              // Opening paragraph
-		. '(?:' . $spaces . ')*+'            // Optional leading whitespace
-		. '('                                // 1: The shortcode
-		.     '\\['                          // Opening bracket
-		.     "($tagregexp)"                 // 2: Shortcode name
-		.     '(?![\\w-])'                   // Not followed by word character or hyphen
-		                                     // Unroll the loop: Inside the opening shortcode tag
-		.     '[^\\]\\/]*'                   // Not a closing bracket or forward slash
-		.     '(?:'
-		.         '\\/(?!\\])'               // A forward slash not followed by a closing bracket
-		.         '[^\\]\\/]*'               // Not a closing bracket or forward slash
-		.     ')*?'
-		.     '(?:'
-		.         '\\/\\]'                   // Self closing tag and closing bracket
-		.     '|'
-		.         '\\]'                      // Closing bracket
-		.         '(?:'                      // Unroll the loop: Optionally, anything between the opening and closing shortcode tags
-		.             '[^\\[]*+'             // Not an opening bracket
-		.             '(?:'
-		.                 '\\[(?!\\/\\2\\])' // An opening bracket not followed by the closing shortcode tag
-		.                 '[^\\[]*+'         // Not an opening bracket
-		.             ')*+'
-		.             '\\[\\/\\2\\]'         // Closing shortcode tag
-		.         ')?'
-		.     ')'
-		. ')'
-		. '(?:' . $spaces . ')*+'            // optional trailing whitespace
-		. '<\\/p>'                           // closing paragraph
-		. '/';
-
-	return preg_replace( $pattern, '$1', $pee );
-}
-
-/**
- * Checks to see if a string is utf8 encoded.
- *
- * NOTE: This function checks for 5-Byte sequences, UTF8
- *       has Bytes Sequences with a maximum length of 4.
- *
- * @author bmorel at ssi dot fr (modified)
- * @since 1.2.1
- *
- * @param string $str The string to be checked
- * @return bool True if $str fits a UTF-8 model, false otherwise.
- */
-function seems_utf8( $str ) {
-	mbstring_binary_safe_encoding();
-	$length = strlen($str);
-	reset_mbstring_encoding();
-	for ($i=0; $i < $length; $i++) {
-		$c = ord($str[$i]);
-		if ($c < 0x80) $n = 0; // 0bbbbbbb
-		elseif (($c & 0xE0) == 0xC0) $n=1; // 110bbbbb
-		elseif (($c & 0xF0) == 0xE0) $n=2; // 1110bbbb
-		elseif (($c & 0xF8) == 0xF0) $n=3; // 11110bbb
-		elseif (($c & 0xFC) == 0xF8) $n=4; // 111110bb
-		elseif (($c & 0xFE) == 0xFC) $n=5; // 1111110b
-		else return false; // Does not match any model
-		for ($j=0; $j<$n; $j++) { // n bytes matching 10bbbbbb follow ?
-			if ((++$i == $length) || ((ord($str[$i]) & 0xC0) != 0x80))
-				return false;
-		}
-	}
-	return true;
-}
-
-/**
- * Converts a number of special characters into their HTML entities.
- *
- * Specifically deals with: &, <, >, ", and '.
- *
- * $quote_style can be set to ENT_COMPAT to encode " to
- * &quot;, or ENT_QUOTES to do both. Default is ENT_NOQUOTES where no quotes are encoded.
- *
- * @since 1.2.2
- * @access private
- *
- * @staticvar string $_charset
- *
- * @param string     $string         The text which is to be encoded.
- * @param int|string $quote_style    Optional. Converts double quotes if set to ENT_COMPAT,
- *                                   both single and double if set to ENT_QUOTES or none if set to ENT_NOQUOTES.
- *                                   Also compatible with old values; converting single quotes if set to 'single',
- *                                   double if set to 'double' or both if otherwise set.
- *                                   Default is ENT_NOQUOTES.
- * @param string     $charset        Optional. The character encoding of the string. Default is false.
- * @param bool       $double_encode  Optional. Whether to encode existing html entities. Default is false.
- * @return string The encoded text with HTML entities.
- */
-function _wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {
-	$string = (string) $string;
-
-	if ( 0 === strlen( $string ) )
-		return '';
-
-	// Don't bother if there are no specialchars - saves some processing
-	if ( ! preg_match( '/[&<>"\']/', $string ) )
-		return $string;
-
-	// Account for the previous behaviour of the function when the $quote_style is not an accepted value
-	if ( empty( $quote_style ) )
-		$quote_style = ENT_NOQUOTES;
-	elseif ( ! in_array( $quote_style, array( 0, 2, 3, 'single', 'double' ), true ) )
-		$quote_style = ENT_QUOTES;
-
-	// Store the site charset as a static to avoid multiple calls to wp_load_alloptions()
-	if ( ! $charset ) {
-		static $_charset = null;
-		if ( ! isset( $_charset ) ) {
-			$alloptions = wp_load_alloptions();
-			$_charset = isset( $alloptions['blog_charset'] ) ? $alloptions['blog_charset'] : '';
-		}
-		$charset = $_charset;
-	}
-
-	if ( in_array( $charset, array( 'utf8', 'utf-8', 'UTF8' ) ) )
-		$charset = 'UTF-8';
-
-	$_quote_style = $quote_style;
-
-	if ( $quote_style === 'double' ) {
-		$quote_style = ENT_COMPAT;
-		$_quote_style = ENT_COMPAT;
-	} elseif ( $quote_style === 'single' ) {
-		$quote_style = ENT_NOQUOTES;
-	}
-
-	if ( ! $double_encode ) {
-		// Guarantee every &entity; is valid, convert &garbage; into &amp;garbage;
-		// This is required for PHP < 5.4.0 because ENT_HTML401 flag is unavailable.
-		$string = wp_kses_normalize_entities( $string );
-	}
-
-	$string = @htmlspecialchars( $string, $quote_style, $charset, $double_encode );
-
-	// Back-compat.
-	if ( 'single' === $_quote_style )
-		$string = str_replace( "'", '&#039;', $string );
-
-	return $string;
-}
-
-/**
- * Converts a number of HTML entities into their special characters.
- *
- * Specifically deals with: &, <, >, ", and '.
- *
- * $quote_style can be set to ENT_COMPAT to decode " entities,
- * or ENT_QUOTES to do both " and '. Default is ENT_NOQUOTES where no quotes are decoded.
- *
- * @since 2.8.0
- *
- * @param string     $string The text which is to be decoded.
- * @param string|int $quote_style Optional. Converts double quotes if set to ENT_COMPAT,
- *                                both single and double if set to ENT_QUOTES or
- *                                none if set to ENT_NOQUOTES.
- *                                Also compatible with old _wp_specialchars() values;
- *                                converting single quotes if set to 'single',
- *                                double if set to 'double' or both if otherwise set.
- *                                Default is ENT_NOQUOTES.
- * @return string The decoded text without HTML entities.
- */
-function wp_specialchars_decode( $string, $quote_style = ENT_NOQUOTES ) {
-	$string = (string) $string;
-
-	if ( 0 === strlen( $string ) ) {
-		return '';
-	}
-
-	// Don't bother if there are no entities - saves a lot of processing
-	if ( strpos( $string, '&' ) === false ) {
-		return $string;
-	}
-
-	// Match the previous behaviour of _wp_specialchars() when the $quote_style is not an accepted value
-	if ( empty( $quote_style ) ) {
-		$quote_style = ENT_NOQUOTES;
-	} elseif ( !in_array( $quote_style, array( 0, 2, 3, 'single', 'double' ), true ) ) {
-		$quote_style = ENT_QUOTES;
-	}
-
-	// More complete than get_html_translation_table( HTML_SPECIALCHARS )
-	$single = array( '&#039;'  => '\'', '&#x27;' => '\'' );
-	$single_preg = array( '/&#0*39;/'  => '&#039;', '/&#x0*27;/i' => '&#x27;' );
-	$double = array( '&quot;' => '"', '&#034;'  => '"', '&#x22;' => '"' );
-	$double_preg = array( '/&#0*34;/'  => '&#034;', '/&#x0*22;/i' => '&#x22;' );
-	$others = array( '&lt;'   => '<', '&#060;'  => '<', '&gt;'   => '>', '&#062;'  => '>', '&amp;'  => '&', '&#038;'  => '&', '&#x26;' => '&' );
-	$others_preg = array( '/&#0*60;/'  => '&#060;', '/&#0*62;/'  => '&#062;', '/&#0*38;/'  => '&#038;', '/&#x0*26;/i' => '&#x26;' );
-
-	if ( $quote_style === ENT_QUOTES ) {
-		$translation = array_merge( $single, $double, $others );
-		$translation_preg = array_merge( $single_preg, $double_preg, $others_preg );
-	} elseif ( $quote_style === ENT_COMPAT || $quote_style === 'double' ) {
-		$translation = array_merge( $double, $others );
-		$translation_preg = array_merge( $double_preg, $others_preg );
-	} elseif ( $quote_style === 'single' ) {
-		$translation = array_merge( $single, $others );
-		$translation_preg = array_merge( $single_preg, $others_preg );
-	} elseif ( $quote_style === ENT_NOQUOTES ) {
-		$translation = $others;
-		$translation_preg = $others_preg;
-	}
-
-	// Remove zero padding on numeric entities
-	$string = preg_replace( array_keys( $translation_preg ), array_values( $translation_preg ), $string );
-
-	// Replace characters according to translation table
-	return strtr( $string, $translation );
-}
-
-/**
- * Checks for invalid UTF8 in a string.
- *
- * @since 2.8.0
- *
- * @staticvar bool $is_utf8
- * @staticvar bool $utf8_pcre
- *
- * @param string  $string The text which is to be checked.
- * @param bool    $strip Optional. Whether to attempt to strip out invalid UTF8. Default is false.
- * @return string The checked text.
- */
-function wp_check_invalid_utf8( $string, $strip = false ) {
-	$string = (string) $string;
-
-	if ( 0 === strlen( $string ) ) {
-		return '';
-	}
-
-	// Store the site charset as a static to avoid multiple calls to get_option()
-	static $is_utf8 = null;
-	if ( ! isset( $is_utf8 ) ) {
-		$is_utf8 = in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) );
-	}
-	if ( ! $is_utf8 ) {
-		return $string;
-	}
-
-	// Check for support for utf8 in the installed PCRE library once and store the result in a static
-	static $utf8_pcre = null;
-	if ( ! isset( $utf8_pcre ) ) {
-		$utf8_pcre = @preg_match( '/^./u', 'a' );
-	}
-	// We can't demand utf8 in the PCRE installation, so just return the string in those cases
-	if ( !$utf8_pcre ) {
-		return $string;
-	}
-
-	// preg_match fails when it encounters invalid UTF8 in $string
-	if ( 1 === @preg_match( '/^./us', $string ) ) {
-		return $string;
-	}
-
-	// Attempt to strip the bad chars if requested (not recommended)
-	if ( $strip && function_exists( 'iconv' ) ) {
-		return iconv( 'utf-8', 'utf-8', $string );
-	}
-
-	return '';
-}
-
-/**
- * Encode the Unicode values to be used in the URI.
- *
- * @since 1.5.0
- *
- * @param string $utf8_string
- * @param int    $length Max  length of the string
- * @return string String with Unicode encoded for URI.
- */
-function utf8_uri_encode( $utf8_string, $length = 0 ) {
-	$unicode = '';
-	$values = array();
-	$num_octets = 1;
-	$unicode_length = 0;
-
-	mbstring_binary_safe_encoding();
-	$string_length = strlen( $utf8_string );
-	reset_mbstring_encoding();
-
-	for ($i = 0; $i < $string_length; $i++ ) {
-
-		$value = ord( $utf8_string[ $i ] );
-
-		if ( $value < 128 ) {
-			if ( $length && ( $unicode_length >= $length ) )
-				break;
-			$unicode .= chr($value);
-			$unicode_length++;
-		} else {
-			if ( count( $values ) == 0 ) {
-				if ( $value < 224 ) {
-					$num_octets = 2;
-				} elseif ( $value < 240 ) {
-					$num_octets = 3;
-				} else {
-					$num_octets = 4;
-				}
-			}
-
-			$values[] = $value;
-
-			if ( $length && ( $unicode_length + ($num_octets * 3) ) > $length )
-				break;
-			if ( count( $values ) == $num_octets ) {
-				for ( $j = 0; $j < $num_octets; $j++ ) {
-					$unicode .= '%' . dechex( $values[ $j ] );
-				}
-
-				$unicode_length += $num_octets * 3;
-
-				$values = array();
-				$num_octets = 1;
-			}
-		}
-	}
-
-	return $unicode;
-}
-
-/**
- * Converts all accent characters to ASCII characters.
- *
- * If there are no accent characters, then the string given is just returned.
- *
- * **Accent characters converted:**
- *
- * Currency signs:
- *
- * |   Code   | Glyph | Replacement |     Description     |
- * | -------- | ----- | ----------- | ------------------- |
- * | U+00A3   | £     | (empty)     | British Pound sign  |
- * | U+20AC   | €     | E           | Euro sign           |
- *
- * Decompositions for Latin-1 Supplement:
- *
- * |  Code   | Glyph | Replacement |               Description              |
- * | ------- | ----- | ----------- | -------------------------------------- |
- * | U+00AA  | ª     | a           | Feminine ordinal indicator             |
- * | U+00BA  | º     | o           | Masculine ordinal indicator            |
- * | U+00C0  | À     | A           | Latin capital letter A with grave      |
- * | U+00C1  | Á     | A           | Latin capital letter A with acute      |
- * | U+00C2  | Â     | A           | Latin capital letter A with circumflex |
- * | U+00C3  | Ã     | A           | Latin capital letter A with tilde      |
- * | U+00C4  | Ä     | A           | Latin capital letter A with diaeresis  |
- * | U+00C5  | Å     | A           | Latin capital letter A with ring above |
- * | U+00C6  | Æ     | AE          | Latin capital letter AE                |
- * | U+00C7  | Ç     | C           | Latin capital letter C with cedilla    |
- * | U+00C8  | È     | E           | Latin capital letter E with grave      |
- * | U+00C9  | É     | E           | Latin capital letter E with acute      |
- * | U+00CA  | Ê     | E           | Latin capital letter E with circumflex |
- * | U+00CB  | Ë     | E           | Latin capital letter E with diaeresis  |
- * | U+00CC  | Ì     | I           | Latin capital letter I with grave      |
- * | U+00CD  | Í     | I           | Latin capital letter I with acute      |
- * | U+00CE  | Î     | I           | Latin capital letter I with circumflex |
- * | U+00CF  | Ï     | I           | Latin capital letter I with diaeresis  |
- * | U+00D0  | Ð     | D           | Latin capital letter Eth               |
- * | U+00D1  | Ñ     | N           | Latin capital letter N with tilde      |
- * | U+00D2  | Ò     | O           | Latin capital letter O with grave      |
- * | U+00D3  | Ó     | O           | Latin capital letter O with acute      |
- * | U+00D4  | Ô     | O           | Latin capital letter O with circumflex |
- * | U+00D5  | Õ     | O           | Latin capital letter O with tilde      |
- * | U+00D6  | Ö     | O           | Latin capital letter O with diaeresis  |
- * | U+00D8  | Ø     | O           | Latin capital letter O with stroke     |
- * | U+00D9  | Ù     | U           | Latin capital letter U with grave      |
- * | U+00DA  | Ú     | U           | Latin capital letter U with acute      |
- * | U+00DB  | Û     | U           | Latin capital letter U with circumflex |
- * | U+00DC  | Ü     | U           | Latin capital letter U with diaeresis  |
- * | U+00DD  | Ý     | Y           | Latin capital letter Y with acute      |
- * | U+00DE  | Þ     | TH          | Latin capital letter Thorn             |
- * | U+00DF  | ß     | s           | Latin small letter sharp s             |
- * | U+00E0  | à     | a           | Latin small letter a with grave        |
- * | U+00E1  | á     | a           | Latin small letter a with acute        |
- * | U+00E2  | â     | a           | Latin small letter a with circumflex   |
- * | U+00E3  | ã     | a           | Latin small letter a with tilde        |
- * | U+00E4  | ä     | a           | Latin small letter a with diaeresis    |
- * | U+00E5  | å     | a           | Latin small letter a with ring above   |
- * | U+00E6  | æ     | ae          | Latin small letter ae                  |
- * | U+00E7  | ç     | c           | Latin small letter c with cedilla      |
- * | U+00E8  | è     | e           | Latin small letter e with grave        |
- * | U+00E9  | é     | e           | Latin small letter e with acute        |
- * | U+00EA  | ê     | e           | Latin small letter e with circumflex   |
- * | U+00EB  | ë     | e           | Latin small letter e with diaeresis    |
- * | U+00EC  | ì     | i           | Latin small letter i with grave        |
- * | U+00ED  | í     | i           | Latin small letter i with acute        |
- * | U+00EE  | î     | i           | Latin small letter i with circumflex   |
- * | U+00EF  | ï     | i           | Latin small letter i with diaeresis    |
- * | U+00F0  | ð     | d           | Latin small letter Eth                 |
- * | U+00F1  | ñ     | n           | Latin small letter n with tilde        |
- * | U+00F2  | ò     | o           | Latin small letter o with grave        |
- * | U+00F3  | ó     | o           | Latin small letter o with acute        |
- * | U+00F4  | ô     | o           | Latin small letter o with circumflex   |
- * | U+00F5  | õ     | o           | Latin small letter o with tilde        |
- * | U+00F6  | ö     | o           | Latin small letter o with diaeresis    |
- * | U+00F8  | ø     | o           | Latin small letter o with stroke       |
- * | U+00F9  | ù     | u           | Latin small letter u with grave        |
- * | U+00FA  | ú     | u           | Latin small letter u with acute        |
- * | U+00FB  | û     | u           | Latin small letter u with circumflex   |
- * | U+00FC  | ü     | u           | Latin small letter u with diaeresis    |
- * | U+00FD  | ý     | y           | Latin small letter y with acute        |
- * | U+00FE  | þ     | th          | Latin small letter Thorn               |
- * | U+00FF  | ÿ     | y           | Latin small letter y with diaeresis    |
- *
- * Decompositions for Latin Extended-A:
- *
- * |  Code   | Glyph | Replacement |                    Description                    |
- * | ------- | ----- | ----------- | ------------------------------------------------- |
- * | U+0100  | Ā     | A           | Latin capital letter A with macron                |
- * | U+0101  | ā     | a           | Latin small letter a with macron                  |
- * | U+0102  | Ă     | A           | Latin capital letter A with breve                 |
- * | U+0103  | ă     | a           | Latin small letter a with breve                   |
- * | U+0104  | Ą     | A           | Latin capital letter A with ogonek                |
- * | U+0105  | ą     | a           | Latin small letter a with ogonek                  |
- * | U+01006 | Ć     | C           | Latin capital letter C with acute                 |
- * | U+0107  | ć     | c           | Latin small letter c with acute                   |
- * | U+0108  | Ĉ     | C           | Latin capital letter C with circumflex            |
- * | U+0109  | ĉ     | c           | Latin small letter c with circumflex              |
- * | U+010A  | Ċ     | C           | Latin capital letter C with dot above             |
- * | U+010B  | ċ     | c           | Latin small letter c with dot above               |
- * | U+010C  | Č     | C           | Latin capital letter C with caron                 |
- * | U+010D  | č     | c           | Latin small letter c with caron                   |
- * | U+010E  | Ď     | D           | Latin capital letter D with caron                 |
- * | U+010F  | ď     | d           | Latin small letter d with caron                   |
- * | U+0110  | Đ     | D           | Latin capital letter D with stroke                |
- * | U+0111  | đ     | d           | Latin small letter d with stroke                  |
- * | U+0112  | Ē     | E           | Latin capital letter E with macron                |
- * | U+0113  | ē     | e           | Latin small letter e with macron                  |
- * | U+0114  | Ĕ     | E           | Latin capital letter E with breve                 |
- * | U+0115  | ĕ     | e           | Latin small letter e with breve                   |
- * | U+0116  | Ė     | E           | Latin capital letter E with dot above             |
- * | U+0117  | ė     | e           | Latin small letter e with dot above               |
- * | U+0118  | Ę     | E           | Latin capital letter E with ogonek                |
- * | U+0119  | ę     | e           | Latin small letter e with ogonek                  |
- * | U+011A  | Ě     | E           | Latin capital letter E with caron                 |
- * | U+011B  | ě     | e           | Latin small letter e with caron                   |
- * | U+011C  | Ĝ     | G           | Latin capital letter G with circumflex            |
- * | U+011D  | ĝ     | g           | Latin small letter g with circumflex              |
- * | U+011E  | Ğ     | G           | Latin capital letter G with breve                 |
- * | U+011F  | ğ     | g           | Latin small letter g with breve                   |
- * | U+0120  | Ġ     | G           | Latin capital letter G with dot above             |
- * | U+0121  | ġ     | g           | Latin small letter g with dot above               |
- * | U+0122  | Ģ     | G           | Latin capital letter G with cedilla               |
- * | U+0123  | ģ     | g           | Latin small letter g with cedilla                 |
- * | U+0124  | Ĥ     | H           | Latin capital letter H with circumflex            |
- * | U+0125  | ĥ     | h           | Latin small letter h with circumflex              |
- * | U+0126  | Ħ     | H           | Latin capital letter H with stroke                |
- * | U+0127  | ħ     | h           | Latin small letter h with stroke                  |
- * | U+0128  | Ĩ     | I           | Latin capital letter I with tilde                 |
- * | U+0129  | ĩ     | i           | Latin small letter i with tilde                   |
- * | U+012A  | Ī     | I           | Latin capital letter I with macron                |
- * | U+012B  | ī     | i           | Latin small letter i with macron                  |
- * | U+012C  | Ĭ     | I           | Latin capital letter I with breve                 |
- * | U+012D  | ĭ     | i           | Latin small letter i with breve                   |
- * | U+012E  | Į     | I           | Latin capital letter I with ogonek                |
- * | U+012F  | į     | i           | Latin small letter i with ogonek                  |
- * | U+0130  | İ     | I           | Latin capital letter I with dot above             |
- * | U+0131  | ı     | i           | Latin small letter dotless i                      |
- * | U+0132  | Ĳ     | IJ          | Latin capital ligature IJ                         |
- * | U+0133  | ĳ     | ij          | Latin small ligature ij                           |
- * | U+0134  | Ĵ     | J           | Latin capital letter J with circumflex            |
- * | U+0135  | ĵ     | j           | Latin small letter j with circumflex              |
- * | U+0136  | Ķ     | K           | Latin capital letter K with cedilla               |
- * | U+0137  | ķ     | k           | Latin small letter k with cedilla                 |
- * | U+0138  | ĸ     | k           | Latin small letter Kra                            |
- * | U+0139  | Ĺ     | L           | Latin capital letter L with acute                 |
- * | U+013A  | ĺ     | l           | Latin small letter l with acute                   |
- * | U+013B  | Ļ     | L           | Latin capital letter L with cedilla               |
- * | U+013C  | ļ     | l           | Latin small letter l with cedilla                 |
- * | U+013D  | Ľ     | L           | Latin capital letter L with caron                 |
- * | U+013E  | ľ     | l           | Latin small letter l with caron                   |
- * | U+013F  | Ŀ     | L           | Latin capital letter L with middle dot            |
- * | U+0140  | ŀ     | l           | Latin small letter l with middle dot              |
- * | U+0141  | Ł     | L           | Latin capital letter L with stroke                |
- * | U+0142  | ł     | l           | Latin small letter l with stroke                  |
- * | U+0143  | Ń     | N           | Latin capital letter N with acute                 |
- * | U+0144  | ń     | n           | Latin small letter N with acute                   |
- * | U+0145  | Ņ     | N           | Latin capital letter N with cedilla               |
- * | U+0146  | ņ     | n           | Latin small letter n with cedilla                 |
- * | U+0147  | Ň     | N           | Latin capital letter N with caron                 |
- * | U+0148  | ň     | n           | Latin small letter n with caron                   |
- * | U+0149  | ŉ     | n           | Latin small letter n preceded by apostrophe       |
- * | U+014A  | Ŋ     | N           | Latin capital letter Eng                          |
- * | U+014B  | ŋ     | n           | Latin small letter Eng                            |
- * | U+014C  | Ō     | O           | Latin capital letter O with macron                |
- * | U+014D  | ō     | o           | Latin small letter o with macron                  |
- * | U+014E  | Ŏ     | O           | Latin capital letter O with breve                 |
- * | U+014F  | ŏ     | o           | Latin small letter o with breve                   |
- * | U+0150  | Ő     | O           | Latin capital letter O with double acute          |
- * | U+0151  | ő     | o           | Latin small letter o with double acute            |
- * | U+0152  | Œ     | OE          | Latin capital ligature OE                         |
- * | U+0153  | œ     | oe          | Latin small ligature oe                           |
- * | U+0154  | Ŕ     | R           | Latin capital letter R with acute                 |
- * | U+0155  | ŕ     | r           | Latin small letter r with acute                   |
- * | U+0156  | Ŗ     | R           | Latin capital letter R with cedilla               |
- * | U+0157  | ŗ     | r           | Latin small letter r with cedilla                 |
- * | U+0158  | Ř     | R           | Latin capital letter R with caron                 |
- * | U+0159  | ř     | r           | Latin small letter r with caron                   |
- * | U+015A  | Ś     | S           | Latin capital letter S with acute                 |
- * | U+015B  | ś     | s           | Latin small letter s with acute                   |
- * | U+015C  | Ŝ     | S           | Latin capital letter S with circumflex            |
- * | U+015D  | ŝ     | s           | Latin small letter s with circumflex              |
- * | U+015E  | Ş     | S           | Latin capital letter S with cedilla               |
- * | U+015F  | ş     | s           | Latin small letter s with cedilla                 |
- * | U+0160  | Š     | S           | Latin capital letter S with caron                 |
- * | U+0161  | š     | s           | Latin small letter s with caron                   |
- * | U+0162  | Ţ     | T           | Latin capital letter T with cedilla               |
- * | U+0163  | ţ     | t           | Latin small letter t with cedilla                 |
- * | U+0164  | Ť     | T           | Latin capital letter T with caron                 |
- * | U+0165  | ť     | t           | Latin small letter t with caron                   |
- * | U+0166  | Ŧ     | T           | Latin capital letter T with stroke                |
- * | U+0167  | ŧ     | t           | Latin small letter t with stroke                  |
- * | U+0168  | Ũ     | U           | Latin capital letter U with tilde                 |
- * | U+0169  | ũ     | u           | Latin small letter u with tilde                   |
- * | U+016A  | Ū     | U           | Latin capital letter U with macron                |
- * | U+016B  | ū     | u           | Latin small letter u with macron                  |
- * | U+016C  | Ŭ     | U           | Latin capital letter U with breve                 |
- * | U+016D  | ŭ     | u           | Latin small letter u with breve                   |
- * | U+016E  | Ů     | U           | Latin capital letter U with ring above            |
- * | U+016F  | ů     | u           | Latin small letter u with ring above              |
- * | U+0170  | Ű     | U           | Latin capital letter U with double acute          |
- * | U+0171  | ű     | u           | Latin small letter u with double acute            |
- * | U+0172  | Ų     | U           | Latin capital letter U with ogonek                |
- * | U+0173  | ų     | u           | Latin small letter u with ogonek                  |
- * | U+0174  | Ŵ     | W           | Latin capital letter W with circumflex            |
- * | U+0175  | ŵ     | w           | Latin small letter w with circumflex              |
- * | U+0176  | Ŷ     | Y           | Latin capital letter Y with circumflex            |
- * | U+0177  | ŷ     | y           | Latin small letter y with circumflex              |
- * | U+0178  | Ÿ     | Y           | Latin capital letter Y with diaeresis             |
- * | U+0179  | Ź     | Z           | Latin capital letter Z with acute                 |
- * | U+017A  | ź     | z           | Latin small letter z with acute                   |
- * | U+017B  | Ż     | Z           | Latin capital letter Z with dot above             |
- * | U+017C  | ż     | z           | Latin small letter z with dot above               |
- * | U+017D  | Ž     | Z           | Latin capital letter Z with caron                 |
- * | U+017E  | ž     | z           | Latin small letter z with caron                   |
- * | U+017F  | ſ     | s           | Latin small letter long s                         |
- * | U+01A0  | Ơ     | O           | Latin capital letter O with horn                  |
- * | U+01A1  | ơ     | o           | Latin small letter o with horn                    |
- * | U+01AF  | Ư     | U           | Latin capital letter U with horn                  |
- * | U+01B0  | ư     | u           | Latin small letter u with horn                    |
- * | U+01CD  | Ǎ     | A           | Latin capital letter A with caron                 |
- * | U+01CE  | ǎ     | a           | Latin small letter a with caron                   |
- * | U+01CF  | Ǐ     | I           | Latin capital letter I with caron                 |
- * | U+01D0  | ǐ     | i           | Latin small letter i with caron                   |
- * | U+01D1  | Ǒ     | O           | Latin capital letter O with caron                 |
- * | U+01D2  | ǒ     | o           | Latin small letter o with caron                   |
- * | U+01D3  | Ǔ     | U           | Latin capital letter U with caron                 |
- * | U+01D4  | ǔ     | u           | Latin small letter u with caron                   |
- * | U+01D5  | Ǖ     | U           | Latin capital letter U with diaeresis and macron  |
- * | U+01D6  | ǖ     | u           | Latin small letter u with diaeresis and macron    |
- * | U+01D7  | Ǘ     | U           | Latin capital letter U with diaeresis and acute   |
- * | U+01D8  | ǘ     | u           | Latin small letter u with diaeresis and acute     |
- * | U+01D9  | Ǚ     | U           | Latin capital letter U with diaeresis and caron   |
- * | U+01DA  | ǚ     | u           | Latin small letter u with diaeresis and caron     |
- * | U+01DB  | Ǜ     | U           | Latin capital letter U with diaeresis and grave   |
- * | U+01DC  | ǜ     | u           | Latin small letter u with diaeresis and grave     |
- *
- * Decompositions for Latin Extended-B:
- *
- * |   Code   | Glyph | Replacement |                Description                |
- * | -------- | ----- | ----------- | ----------------------------------------- |
- * | U+0218   | Ș     | S           | Latin capital letter S with comma below   |
- * | U+0219   | ș     | s           | Latin small letter s with comma below     |
- * | U+021A   | Ț     | T           | Latin capital letter T with comma below   |
- * | U+021B   | ț     | t           | Latin small letter t with comma below     |
- *
- * Vowels with diacritic (Chinese, Hanyu Pinyin):
- *
- * |   Code   | Glyph | Replacement |                      Description                      |
- * | -------- | ----- | ----------- | ----------------------------------------------------- |
- * | U+0251   | ɑ     | a           | Latin small letter alpha                              |
- * | U+1EA0   | Ạ     | A           | Latin capital letter A with dot below                 |
- * | U+1EA1   | ạ     | a           | Latin small letter a with dot below                   |
- * | U+1EA2   | Ả     | A           | Latin capital letter A with hook above                |
- * | U+1EA3   | ả     | a           | Latin small letter a with hook above                  |
- * | U+1EA4   | Ấ     | A           | Latin capital letter A with circumflex and acute      |
- * | U+1EA5   | ấ     | a           | Latin small letter a with circumflex and acute        |
- * | U+1EA6   | Ầ     | A           | Latin capital letter A with circumflex and grave      |
- * | U+1EA7   | ầ     | a           | Latin small letter a with circumflex and grave        |
- * | U+1EA8   | Ẩ     | A           | Latin capital letter A with circumflex and hook above |
- * | U+1EA9   | ẩ     | a           | Latin small letter a with circumflex and hook above   |
- * | U+1EAA   | Ẫ     | A           | Latin capital letter A with circumflex and tilde      |
- * | U+1EAB   | ẫ     | a           | Latin small letter a with circumflex and tilde        |
- * | U+1EA6   | Ậ     | A           | Latin capital letter A with circumflex and dot below  |
- * | U+1EAD   | ậ     | a           | Latin small letter a with circumflex and dot below    |
- * | U+1EAE   | Ắ     | A           | Latin capital letter A with breve and acute           |
- * | U+1EAF   | ắ     | a           | Latin small letter a with breve and acute             |
- * | U+1EB0   | Ằ     | A           | Latin capital letter A with breve and grave           |
- * | U+1EB1   | ằ     | a           | Latin small letter a with breve and grave             |
- * | U+1EB2   | Ẳ     | A           | Latin capital letter A with breve and hook above      |
- * | U+1EB3   | ẳ     | a           | Latin small letter a with breve and hook above        |
- * | U+1EB4   | Ẵ     | A           | Latin capital letter A with breve and tilde           |
- * | U+1EB5   | ẵ     | a           | Latin small letter a with breve and tilde             |
- * | U+1EB6   | Ặ     | A           | Latin capital letter A with breve and dot below       |
- * | U+1EB7   | ặ     | a           | Latin small letter a with breve and dot below         |
- * | U+1EB8   | Ẹ     | E           | Latin capital letter E with dot below                 |
- * | U+1EB9   | ẹ     | e           | Latin small letter e with dot below                   |
- * | U+1EBA   | Ẻ     | E           | Latin capital letter E with hook above                |
- * | U+1EBB   | ẻ     | e           | Latin small letter e with hook above                  |
- * | U+1EBC   | Ẽ     | E           | Latin capital letter E with tilde                     |
- * | U+1EBD   | ẽ     | e           | Latin small letter e with tilde                       |
- * | U+1EBE   | Ế     | E           | Latin capital letter E with circumflex and acute      |
- * | U+1EBF   | ế     | e           | Latin small letter e with circumflex and acute        |
- * | U+1EC0   | Ề     | E           | Latin capital letter E with circumflex and grave      |
- * | U+1EC1   | ề     | e           | Latin small letter e with circumflex and grave        |
- * | U+1EC2   | Ể     | E           | Latin capital letter E with circumflex and hook above |
- * | U+1EC3   | ể     | e           | Latin small letter e with circumflex and hook above   |
- * | U+1EC4   | Ễ     | E           | Latin capital letter E with circumflex and tilde      |
- * | U+1EC5   | ễ     | e           | Latin small letter e with circumflex and tilde        |
- * | U+1EC6   | Ệ     | E           | Latin capital letter E with circumflex and dot below  |
- * | U+1EC7   | ệ     | e           | Latin small letter e with circumflex and dot below    |
- * | U+1EC8   | Ỉ     | I           | Latin capital letter I with hook above                |
- * | U+1EC9   | ỉ     | i           | Latin small letter i with hook above                  |
- * | U+1ECA   | Ị     | I           | Latin capital letter I with dot below                 |
- * | U+1ECB   | ị     | i           | Latin small letter i with dot below                   |
- * | U+1ECC   | Ọ     | O           | Latin capital letter O with dot below                 |
- * | U+1ECD   | ọ     | o           | Latin small letter o with dot below                   |
- * | U+1ECE   | Ỏ     | O           | Latin capital letter O with hook above                |
- * | U+1ECF   | ỏ     | o           | Latin small letter o with hook above                  |
- * | U+1ED0   | Ố     | O           | Latin capital letter O with circumflex and acute      |
- * | U+1ED1   | ố     | o           | Latin small letter o with circumflex and acute        |
- * | U+1ED2   | Ồ     | O           | Latin capital letter O with circumflex and grave      |
- * | U+1ED3   | ồ     | o           | Latin small letter o with circumflex and grave        |
- * | U+1ED4   | Ổ     | O           | Latin capital letter O with circumflex and hook above |
- * | U+1ED5   | ổ     | o           | Latin small letter o with circumflex and hook above   |
- * | U+1ED6   | Ỗ     | O           | Latin capital letter O with circumflex and tilde      |
- * | U+1ED7   | ỗ     | o           | Latin small letter o with circumflex and tilde        |
- * | U+1ED8   | Ộ     | O           | Latin capital letter O with circumflex and dot below  |
- * | U+1ED9   | ộ     | o           | Latin small letter o with circumflex and dot below    |
- * | U+1EDA   | Ớ     | O           | Latin capital letter O with horn and acute            |
- * | U+1EDB   | ớ     | o           | Latin small letter o with horn and acute              |
- * | U+1EDC   | Ờ     | O           | Latin capital letter O with horn and grave            |
- * | U+1EDD   | ờ     | o           | Latin small letter o with horn and grave              |
- * | U+1EDE   | Ở     | O           | Latin capital letter O with horn and hook above       |
- * | U+1EDF   | ở     | o           | Latin small letter o with horn and hook above         |
- * | U+1EE0   | Ỡ     | O           | Latin capital letter O with horn and tilde            |
- * | U+1EE1   | ỡ     | o           | Latin small letter o with horn and tilde              |
- * | U+1EE2   | Ợ     | O           | Latin capital letter O with horn and dot below        |
- * | U+1EE3   | ợ     | o           | Latin small letter o with horn and dot below          |
- * | U+1EE4   | Ụ     | U           | Latin capital letter U with dot below                 |
- * | U+1EE5   | ụ     | u           | Latin small letter u with dot below                   |
- * | U+1EE6   | Ủ     | U           | Latin capital letter U with hook above                |
- * | U+1EE7   | ủ     | u           | Latin small letter u with hook above                  |
- * | U+1EE8   | Ứ     | U           | Latin capital letter U with horn and acute            |
- * | U+1EE9   | ứ     | u           | Latin small letter u with horn and acute              |
- * | U+1EEA   | Ừ     | U           | Latin capital letter U with horn and grave            |
- * | U+1EEB   | ừ     | u           | Latin small letter u with horn and grave              |
- * | U+1EEC   | Ử     | U           | Latin capital letter U with horn and hook above       |
- * | U+1EED   | ử     | u           | Latin small letter u with horn and hook above         |
- * | U+1EEE   | Ữ     | U           | Latin capital letter U with horn and tilde            |
- * | U+1EEF   | ữ     | u           | Latin small letter u with horn and tilde              |
- * | U+1EF0   | Ự     | U           | Latin capital letter U with horn and dot below        |
- * | U+1EF1   | ự     | u           | Latin small letter u with horn and dot below          |
- * | U+1EF2   | Ỳ     | Y           | Latin capital letter Y with grave                     |
- * | U+1EF3   | ỳ     | y           | Latin small letter y with grave                       |
- * | U+1EF4   | Ỵ     | Y           | Latin capital letter Y with dot below                 |
- * | U+1EF5   | ỵ     | y           | Latin small letter y with dot below                   |
- * | U+1EF6   | Ỷ     | Y           | Latin capital letter Y with hook above                |
- * | U+1EF7   | ỷ     | y           | Latin small letter y with hook above                  |
- * | U+1EF8   | Ỹ     | Y           | Latin capital letter Y with tilde                     |
- * | U+1EF9   | ỹ     | y           | Latin small letter y with tilde                       |
- *
- * German (`de_DE`), German formal (`de_DE_formal`), German (Switzerland) formal (`de_CH`),
- * and German (Switzerland) informal (`de_CH_informal`) locales:
- *
- * |   Code   | Glyph | Replacement |               Description               |
- * | -------- | ----- | ----------- | --------------------------------------- |
- * | U+00C4   | Ä     | Ae          | Latin capital letter A with diaeresis   |
- * | U+00E4   | ä     | ae          | Latin small letter a with diaeresis     |
- * | U+00D6   | Ö     | Oe          | Latin capital letter O with diaeresis   |
- * | U+00F6   | ö     | oe          | Latin small letter o with diaeresis     |
- * | U+00DC   | Ü     | Ue          | Latin capital letter U with diaeresis   |
- * | U+00FC   | ü     | ue          | Latin small letter u with diaeresis     |
- * | U+00DF   | ß     | ss          | Latin small letter sharp s              |
- *
- * Danish (`da_DK`) locale:
- *
- * |   Code   | Glyph | Replacement |               Description               |
- * | -------- | ----- | ----------- | --------------------------------------- |
- * | U+00C6   | Æ     | Ae          | Latin capital letter AE                 |
- * | U+00E6   | æ     | ae          | Latin small letter ae                   |
- * | U+00D8   | Ø     | Oe          | Latin capital letter O with stroke      |
- * | U+00F8   | ø     | oe          | Latin small letter o with stroke        |
- * | U+00C5   | Å     | Aa          | Latin capital letter A with ring above  |
- * | U+00E5   | å     | aa          | Latin small letter a with ring above    |
- *
- * Catalan (`ca`) locale:
- *
- * |   Code   | Glyph | Replacement |               Description               |
- * | -------- | ----- | ----------- | --------------------------------------- |
- * | U+00B7   | l·l   | ll          | Flown dot (between two Ls)              |
- *
- * @since 1.2.1
- * @since 4.6.0 Added locale support for `de_CH`, `de_CH_informal`, and `ca`.
- *
- * @param string $string Text that might have accent characters
- * @return string Filtered string with replaced "nice" characters.
- */
-function remove_accents( $string ) {
-	if ( !preg_match('/[\x80-\xff]/', $string) )
-		return $string;
-
-	if (seems_utf8($string)) {
-		$chars = array(
-		// Decompositions for Latin-1 Supplement
-		'ª' => 'a', 'º' => 'o',
-		'À' => 'A', 'Á' => 'A',
-		'Â' => 'A', 'Ã' => 'A',
-		'Ä' => 'A', 'Å' => 'A',
-		'Æ' => 'AE','Ç' => 'C',
-		'È' => 'E', 'É' => 'E',
-		'Ê' => 'E', 'Ë' => 'E',
-		'Ì' => 'I', 'Í' => 'I',
-		'Î' => 'I', 'Ï' => 'I',
-		'Ð' => 'D', 'Ñ' => 'N',
-		'Ò' => 'O', 'Ó' => 'O',
-		'Ô' => 'O', 'Õ' => 'O',
-		'Ö' => 'O', 'Ù' => 'U',
-		'Ú' => 'U', 'Û' => 'U',
-		'Ü' => 'U', 'Ý' => 'Y',
-		'Þ' => 'TH','ß' => 's',
-		'à' => 'a', 'á' => 'a',
-		'â' => 'a', 'ã' => 'a',
-		'ä' => 'a', 'å' => 'a',
-		'æ' => 'ae','ç' => 'c',
-		'è' => 'e', 'é' => 'e',
-		'ê' => 'e', 'ë' => 'e',
-		'ì' => 'i', 'í' => 'i',
-		'î' => 'i', 'ï' => 'i',
-		'ð' => 'd', 'ñ' => 'n',
-		'ò' => 'o', 'ó' => 'o',
-		'ô' => 'o', 'õ' => 'o',
-		'ö' => 'o', 'ø' => 'o',
-		'ù' => 'u', 'ú' => 'u',
-		'û' => 'u', 'ü' => 'u',
-		'ý' => 'y', 'þ' => 'th',
-		'ÿ' => 'y', 'Ø' => 'O',
-		// Decompositions for Latin Extended-A
-		'Ā' => 'A', 'ā' => 'a',
-		'Ă' => 'A', 'ă' => 'a',
-		'Ą' => 'A', 'ą' => 'a',
-		'Ć' => 'C', 'ć' => 'c',
-		'Ĉ' => 'C', 'ĉ' => 'c',
-		'Ċ' => 'C', 'ċ' => 'c',
-		'Č' => 'C', 'č' => 'c',
-		'Ď' => 'D', 'ď' => 'd',
-		'Đ' => 'D', 'đ' => 'd',
-		'Ē' => 'E', 'ē' => 'e',
-		'Ĕ' => 'E', 'ĕ' => 'e',
-		'Ė' => 'E', 'ė' => 'e',
-		'Ę' => 'E', 'ę' => 'e',
-		'Ě' => 'E', 'ě' => 'e',
-		'Ĝ' => 'G', 'ĝ' => 'g',
-		'Ğ' => 'G', 'ğ' => 'g',
-		'Ġ' => 'G', 'ġ' => 'g',
-		'Ģ' => 'G', 'ģ' => 'g',
-		'Ĥ' => 'H', 'ĥ' => 'h',
-		'Ħ' => 'H', 'ħ' => 'h',
-		'Ĩ' => 'I', 'ĩ' => 'i',
-		'Ī' => 'I', 'ī' => 'i',
-		'Ĭ' => 'I', 'ĭ' => 'i',
-		'Į' => 'I', 'į' => 'i',
-		'İ' => 'I', 'ı' => 'i',
-		'Ĳ' => 'IJ','ĳ' => 'ij',
-		'Ĵ' => 'J', 'ĵ' => 'j',
-		'Ķ' => 'K', 'ķ' => 'k',
-		'ĸ' => 'k', 'Ĺ' => 'L',
-		'ĺ' => 'l', 'Ļ' => 'L',
-		'ļ' => 'l', 'Ľ' => 'L',
-		'ľ' => 'l', 'Ŀ' => 'L',
-		'ŀ' => 'l', 'Ł' => 'L',
-		'ł' => 'l', 'Ń' => 'N',
-		'ń' => 'n', 'Ņ' => 'N',
-		'ņ' => 'n', 'Ň' => 'N',
-		'ň' => 'n', 'ŉ' => 'n',
-		'Ŋ' => 'N', 'ŋ' => 'n',
-		'Ō' => 'O', 'ō' => 'o',
-		'Ŏ' => 'O', 'ŏ' => 'o',
-		'Ő' => 'O', 'ő' => 'o',
-		'Œ' => 'OE','œ' => 'oe',
-		'Ŕ' => 'R','ŕ' => 'r',
-		'Ŗ' => 'R','ŗ' => 'r',
-		'Ř' => 'R','ř' => 'r',
-		'Ś' => 'S','ś' => 's',
-		'Ŝ' => 'S','ŝ' => 's',
-		'Ş' => 'S','ş' => 's',
-		'Š' => 'S', 'š' => 's',
-		'Ţ' => 'T', 'ţ' => 't',
-		'Ť' => 'T', 'ť' => 't',
-		'Ŧ' => 'T', 'ŧ' => 't',
-		'Ũ' => 'U', 'ũ' => 'u',
-		'Ū' => 'U', 'ū' => 'u',
-		'Ŭ' => 'U', 'ŭ' => 'u',
-		'Ů' => 'U', 'ů' => 'u',
-		'Ű' => 'U', 'ű' => 'u',
-		'Ų' => 'U', 'ų' => 'u',
-		'Ŵ' => 'W', 'ŵ' => 'w',
-		'Ŷ' => 'Y', 'ŷ' => 'y',
-		'Ÿ' => 'Y', 'Ź' => 'Z',
-		'ź' => 'z', 'Ż' => 'Z',
-		'ż' => 'z', 'Ž' => 'Z',
-		'ž' => 'z', 'ſ' => 's',
-		// Decompositions for Latin Extended-B
-		'Ș' => 'S', 'ș' => 's',
-		'Ț' => 'T', 'ț' => 't',
-		// Euro Sign
-		'€' => 'E',
-		// GBP (Pound) Sign
-		'£' => '',
-		// Vowels with diacritic (Vietnamese)
-		// unmarked
-		'Ơ' => 'O', 'ơ' => 'o',
-		'Ư' => 'U', 'ư' => 'u',
-		// grave accent
-		'Ầ' => 'A', 'ầ' => 'a',
-		'Ằ' => 'A', 'ằ' => 'a',
-		'Ề' => 'E', 'ề' => 'e',
-		'Ồ' => 'O', 'ồ' => 'o',
-		'Ờ' => 'O', 'ờ' => 'o',
-		'Ừ' => 'U', 'ừ' => 'u',
-		'Ỳ' => 'Y', 'ỳ' => 'y',
-		// hook
-		'Ả' => 'A', 'ả' => 'a',
-		'Ẩ' => 'A', 'ẩ' => 'a',
-		'Ẳ' => 'A', 'ẳ' => 'a',
-		'Ẻ' => 'E', 'ẻ' => 'e',
-		'Ể' => 'E', 'ể' => 'e',
-		'Ỉ' => 'I', 'ỉ' => 'i',
-		'Ỏ' => 'O', 'ỏ' => 'o',
-		'Ổ' => 'O', 'ổ' => 'o',
-		'Ở' => 'O', 'ở' => 'o',
-		'Ủ' => 'U', 'ủ' => 'u',
-		'Ử' => 'U', 'ử' => 'u',
-		'Ỷ' => 'Y', 'ỷ' => 'y',
-		// tilde
-		'Ẫ' => 'A', 'ẫ' => 'a',
-		'Ẵ' => 'A', 'ẵ' => 'a',
-		'Ẽ' => 'E', 'ẽ' => 'e',
-		'Ễ' => 'E', 'ễ' => 'e',
-		'Ỗ' => 'O', 'ỗ' => 'o',
-		'Ỡ' => 'O', 'ỡ' => 'o',
-		'Ữ' => 'U', 'ữ' => 'u',
-		'Ỹ' => 'Y', 'ỹ' => 'y',
-		// acute accent
-		'Ấ' => 'A', 'ấ' => 'a',
-		'Ắ' => 'A', 'ắ' => 'a',
-		'Ế' => 'E', 'ế' => 'e',
-		'Ố' => 'O', 'ố' => 'o',
-		'Ớ' => 'O', 'ớ' => 'o',
-		'Ứ' => 'U', 'ứ' => 'u',
-		// dot below
-		'Ạ' => 'A', 'ạ' => 'a',
-		'Ậ' => 'A', 'ậ' => 'a',
-		'Ặ' => 'A', 'ặ' => 'a',
-		'Ẹ' => 'E', 'ẹ' => 'e',
-		'Ệ' => 'E', 'ệ' => 'e',
-		'Ị' => 'I', 'ị' => 'i',
-		'Ọ' => 'O', 'ọ' => 'o',
-		'Ộ' => 'O', 'ộ' => 'o',
-		'Ợ' => 'O', 'ợ' => 'o',
-		'Ụ' => 'U', 'ụ' => 'u',
-		'Ự' => 'U', 'ự' => 'u',
-		'Ỵ' => 'Y', 'ỵ' => 'y',
-		// Vowels with diacritic (Chinese, Hanyu Pinyin)
-		'ɑ' => 'a',
-		// macron
-		'Ǖ' => 'U', 'ǖ' => 'u',
-		// acute accent
-		'Ǘ' => 'U', 'ǘ' => 'u',
-		// caron
-		'Ǎ' => 'A', 'ǎ' => 'a',
-		'Ǐ' => 'I', 'ǐ' => 'i',
-		'Ǒ' => 'O', 'ǒ' => 'o',
-		'Ǔ' => 'U', 'ǔ' => 'u',
-		'Ǚ' => 'U', 'ǚ' => 'u',
-		// grave accent
-		'Ǜ' => 'U', 'ǜ' => 'u',
-		);
-
-		// Used for locale-specific rules
-		$locale = get_locale();
-
-		if ( 'de_DE' == $locale || 'de_DE_formal' == $locale || 'de_CH' == $locale || 'de_CH_informal' == $locale ) {
-			$chars[ 'Ä' ] = 'Ae';
-			$chars[ 'ä' ] = 'ae';
-			$chars[ 'Ö' ] = 'Oe';
-			$chars[ 'ö' ] = 'oe';
-			$chars[ 'Ü' ] = 'Ue';
-			$chars[ 'ü' ] = 'ue';
-			$chars[ 'ß' ] = 'ss';
-		} elseif ( 'da_DK' === $locale ) {
-			$chars[ 'Æ' ] = 'Ae';
- 			$chars[ 'æ' ] = 'ae';
-			$chars[ 'Ø' ] = 'Oe';
-			$chars[ 'ø' ] = 'oe';
-			$chars[ 'Å' ] = 'Aa';
-			$chars[ 'å' ] = 'aa';
-		} elseif ( 'ca' === $locale ) {
-			$chars[ 'l·l' ] = 'll';
-		}
-
-		$string = strtr($string, $chars);
-	} else {
-		$chars = array();
-		// Assume ISO-8859-1 if not UTF-8
-		$chars['in'] = "\x80\x83\x8a\x8e\x9a\x9e"
-			."\x9f\xa2\xa5\xb5\xc0\xc1\xc2"
-			."\xc3\xc4\xc5\xc7\xc8\xc9\xca"
-			."\xcb\xcc\xcd\xce\xcf\xd1\xd2"
-			."\xd3\xd4\xd5\xd6\xd8\xd9\xda"
-			."\xdb\xdc\xdd\xe0\xe1\xe2\xe3"
-			."\xe4\xe5\xe7\xe8\xe9\xea\xeb"
-			."\xec\xed\xee\xef\xf1\xf2\xf3"
-			."\xf4\xf5\xf6\xf8\xf9\xfa\xfb"
-			."\xfc\xfd\xff";
-
-		$chars['out'] = "EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy";
-
-		$string = strtr($string, $chars['in'], $chars['out']);
-		$double_chars = array();
-		$double_chars['in'] = array("\x8c", "\x9c", "\xc6", "\xd0", "\xde", "\xdf", "\xe6", "\xf0", "\xfe");
-		$double_chars['out'] = array('OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th');
-		$string = str_replace($double_chars['in'], $double_chars['out'], $string);
-	}
-
-	return $string;
-}
-
-/**
- * Sanitizes a filename, replacing whitespace with dashes.
- *
- * Removes special characters that are illegal in filenames on certain
- * operating systems and special characters requiring special escaping
- * to manipulate at the command line. Replaces spaces and consecutive
- * dashes with a single dash. Trims period, dash and underscore from beginning
- * and end of filename. It is not guaranteed that this function will return a
- * filename that is allowed to be uploaded.
- *
- * @since 2.1.0
- *
- * @param string $filename The filename to be sanitized
- * @return string The sanitized filename
- */
-function sanitize_file_name( $filename ) {
-	$filename_raw = $filename;
-	$special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}", "%", "+", chr(0));
-	/**
-	 * Filters the list of characters to remove from a filename.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param array  $special_chars Characters to remove.
-	 * @param string $filename_raw  Filename as it was passed into sanitize_file_name().
-	 */
-	$special_chars = apply_filters( 'sanitize_file_name_chars', $special_chars, $filename_raw );
-	$filename = preg_replace( "#\x{00a0}#siu", ' ', $filename );
-	$filename = str_replace( $special_chars, '', $filename );
-	$filename = str_replace( array( '%20', '+' ), '-', $filename );
-	$filename = preg_replace( '/[\r\n\t -]+/', '-', $filename );
-	$filename = trim( $filename, '.-_' );
-
-	if ( false === strpos( $filename, '.' ) ) {
-		$mime_types = wp_get_mime_types();
-		$filetype = wp_check_filetype( 'test.' . $filename, $mime_types );
-		if ( $filetype['ext'] === $filename ) {
-			$filename = 'unnamed-file.' . $filetype['ext'];
-		}
-	}
-
-	// Split the filename into a base and extension[s]
-	$parts = explode('.', $filename);
-
-	// Return if only one extension
-	if ( count( $parts ) <= 2 ) {
-		/**
-		 * Filters a sanitized filename string.
-		 *
-		 * @since 2.8.0
-		 *
-		 * @param string $filename     Sanitized filename.
-		 * @param string $filename_raw The filename prior to sanitization.
-		 */
-		return apply_filters( 'sanitize_file_name', $filename, $filename_raw );
-	}
-
-	// Process multiple extensions
-	$filename = array_shift($parts);
-	$extension = array_pop($parts);
-	$mimes = get_allowed_mime_types();
-
-	/*
-	 * Loop over any intermediate extensions. Postfix them with a trailing underscore
-	 * if they are a 2 - 5 character long alpha string not in the extension whitelist.
-	 */
-	foreach ( (array) $parts as $part) {
-		$filename .= '.' . $part;
-
-		if ( preg_match("/^[a-zA-Z]{2,5}\d?$/", $part) ) {
-			$allowed = false;
-			foreach ( $mimes as $ext_preg => $mime_match ) {
-				$ext_preg = '!^(' . $ext_preg . ')$!i';
-				if ( preg_match( $ext_preg, $part ) ) {
-					$allowed = true;
-					break;
-				}
-			}
-			if ( !$allowed )
-				$filename .= '_';
-		}
-	}
-	$filename .= '.' . $extension;
-	/** This filter is documented in wp-includes/formatting.php */
-	return apply_filters('sanitize_file_name', $filename, $filename_raw);
-}
-
-/**
- * Sanitizes a username, stripping out unsafe characters.
- *
- * Removes tags, octets, entities, and if strict is enabled, will only keep
- * alphanumeric, _, space, ., -, @. After sanitizing, it passes the username,
- * raw username (the username in the parameter), and the value of $strict as
- * parameters for the {@see 'sanitize_user'} filter.
- *
- * @since 2.0.0
- *
- * @param string $username The username to be sanitized.
- * @param bool   $strict   If set limits $username to specific characters. Default false.
- * @return string The sanitized username, after passing through filters.
- */
-function sanitize_user( $username, $strict = false ) {
-	$raw_username = $username;
-	$username = wp_strip_all_tags( $username );
-	$username = remove_accents( $username );
-	// Kill octets
-	$username = preg_replace( '|%([a-fA-F0-9][a-fA-F0-9])|', '', $username );
-	$username = preg_replace( '/&.+?;/', '', $username ); // Kill entities
-
-	// If strict, reduce to ASCII for max portability.
-	if ( $strict )
-		$username = preg_replace( '|[^a-z0-9 _.\-@]|i', '', $username );
-
-	$username = trim( $username );
-	// Consolidate contiguous whitespace
-	$username = preg_replace( '|\s+|', ' ', $username );
-
-	/**
-	 * Filters a sanitized username string.
-	 *
-	 * @since 2.0.1
-	 *
-	 * @param string $username     Sanitized username.
-	 * @param string $raw_username The username prior to sanitization.
-	 * @param bool   $strict       Whether to limit the sanitization to specific characters. Default false.
-	 */
-	return apply_filters( 'sanitize_user', $username, $raw_username, $strict );
-}
-
-/**
- * Sanitizes a string key.
- *
- * Keys are used as internal identifiers. Lowercase alphanumeric characters, dashes and underscores are allowed.
- *
- * @since 3.0.0
- *
- * @param string $key String key
- * @return string Sanitized key
- */
-function sanitize_key( $key ) {
-	$raw_key = $key;
-	$key = strtolower( $key );
-	$key = preg_replace( '/[^a-z0-9_\-]/', '', $key );
-
-	/**
-	 * Filters a sanitized key string.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $key     Sanitized key.
-	 * @param string $raw_key The key prior to sanitization.
-	 */
-	return apply_filters( 'sanitize_key', $key, $raw_key );
-}
-
-/**
- * Sanitizes a title, or returns a fallback title.
- *
- * Specifically, HTML and PHP tags are stripped. Further actions can be added
- * via the plugin API. If $title is empty and $fallback_title is set, the latter
- * will be used.
- *
- * @since 1.0.0
- *
- * @param string $title          The string to be sanitized.
- * @param string $fallback_title Optional. A title to use if $title is empty.
- * @param string $context        Optional. The operation for which the string is sanitized
- * @return string The sanitized string.
- */
-function sanitize_title( $title, $fallback_title = '', $context = 'save' ) {
-	$raw_title = $title;
-
-	if ( 'save' == $context )
-		$title = remove_accents($title);
-
-	/**
-	 * Filters a sanitized title string.
-	 *
-	 * @since 1.2.0
-	 *
-	 * @param string $title     Sanitized title.
-	 * @param string $raw_title The title prior to sanitization.
-	 * @param string $context   The context for which the title is being sanitized.
-	 */
-	$title = apply_filters( 'sanitize_title', $title, $raw_title, $context );
-
-	if ( '' === $title || false === $title )
-		$title = $fallback_title;
-
-	return $title;
-}
-
-/**
- * Sanitizes a title with the 'query' context.
- *
- * Used for querying the database for a value from URL.
- *
- * @since 3.1.0
- *
- * @param string $title The string to be sanitized.
- * @return string The sanitized string.
- */
-function sanitize_title_for_query( $title ) {
-	return sanitize_title( $title, '', 'query' );
-}
-
-/**
- * Sanitizes a title, replacing whitespace and a few other characters with dashes.
- *
- * Limits the output to alphanumeric characters, underscore (_) and dash (-).
- * Whitespace becomes a dash.
- *
- * @since 1.2.0
- *
- * @param string $title     The title to be sanitized.
- * @param string $raw_title Optional. Not used.
- * @param string $context   Optional. The operation for which the string is sanitized.
- * @return string The sanitized title.
- */
-function sanitize_title_with_dashes( $title, $raw_title = '', $context = 'display' ) {
-	$title = strip_tags($title);
-	// Preserve escaped octets.
-	$title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title);
-	// Remove percent signs that are not part of an octet.
-	$title = str_replace('%', '', $title);
-	// Restore octets.
-	$title = preg_replace('|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title);
-
-	if (seems_utf8($title)) {
-		if (function_exists('mb_strtolower')) {
-			$title = mb_strtolower($title, 'UTF-8');
-		}
-		$title = utf8_uri_encode($title, 200);
-	}
-
-	$title = strtolower($title);
-
-	if ( 'save' == $context ) {
-		// Convert nbsp, ndash and mdash to hyphens
-		$title = str_replace( array( '%c2%a0', '%e2%80%93', '%e2%80%94' ), '-', $title );
-		// Convert nbsp, ndash and mdash HTML entities to hyphens
-		$title = str_replace( array( '&nbsp;', '&#160;', '&ndash;', '&#8211;', '&mdash;', '&#8212;' ), '-', $title );
-
-		// Strip these characters entirely
-		$title = str_replace( array(
-			// iexcl and iquest
-			'%c2%a1', '%c2%bf',
-			// angle quotes
-			'%c2%ab', '%c2%bb', '%e2%80%b9', '%e2%80%ba',
-			// curly quotes
-			'%e2%80%98', '%e2%80%99', '%e2%80%9c', '%e2%80%9d',
-			'%e2%80%9a', '%e2%80%9b', '%e2%80%9e', '%e2%80%9f',
-			// copy, reg, deg, hellip and trade
-			'%c2%a9', '%c2%ae', '%c2%b0', '%e2%80%a6', '%e2%84%a2',
-			// acute accents
-			'%c2%b4', '%cb%8a', '%cc%81', '%cd%81',
-			// grave accent, macron, caron
-			'%cc%80', '%cc%84', '%cc%8c',
-		), '', $title );
-
-		// Convert times to x
-		$title = str_replace( '%c3%97', 'x', $title );
-	}
-
-	$title = preg_replace('/&.+?;/', '', $title); // kill entities
-	$title = str_replace('.', '-', $title);
-
-	$title = preg_replace('/[^%a-z0-9 _-]/', '', $title);
-	$title = preg_replace('/\s+/', '-', $title);
-	$title = preg_replace('|-+|', '-', $title);
-	$title = trim($title, '-');
-
-	return $title;
-}
-
-/**
- * Ensures a string is a valid SQL 'order by' clause.
- *
- * Accepts one or more columns, with or without a sort order (ASC / DESC).
- * e.g. 'column_1', 'column_1, column_2', 'column_1 ASC, column_2 DESC' etc.
- *
- * Also accepts 'RAND()'.
- *
- * @since 2.5.1
- *
- * @param string $orderby Order by clause to be validated.
- * @return string|false Returns $orderby if valid, false otherwise.
- */
-function sanitize_sql_orderby( $orderby ) {
-	if ( preg_match( '/^\s*(([a-z0-9_]+|`[a-z0-9_]+`)(\s+(ASC|DESC))?\s*(,\s*(?=[a-z0-9_`])|$))+$/i', $orderby ) || preg_match( '/^\s*RAND\(\s*\)\s*$/i', $orderby ) ) {
-		return $orderby;
-	}
-	return false;
-}
-
-/**
- * Sanitizes an HTML classname to ensure it only contains valid characters.
- *
- * Strips the string down to A-Z,a-z,0-9,_,-. If this results in an empty
- * string then it will return the alternative value supplied.
- *
- * @todo Expand to support the full range of CDATA that a class attribute can contain.
- *
- * @since 2.8.0
- *
- * @param string $class    The classname to be sanitized
- * @param string $fallback Optional. The value to return if the sanitization ends up as an empty string.
- * 	Defaults to an empty string.
- * @return string The sanitized value
- */
-function sanitize_html_class( $class, $fallback = '' ) {
-	//Strip out any % encoded octets
-	$sanitized = preg_replace( '|%[a-fA-F0-9][a-fA-F0-9]|', '', $class );
-
-	//Limit to A-Z,a-z,0-9,_,-
-	$sanitized = preg_replace( '/[^A-Za-z0-9_-]/', '', $sanitized );
-
-	if ( '' == $sanitized && $fallback ) {
-		return sanitize_html_class( $fallback );
-	}
-	/**
-	 * Filters a sanitized HTML class string.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param string $sanitized The sanitized HTML class.
-	 * @param string $class     HTML class before sanitization.
-	 * @param string $fallback  The fallback string.
-	 */
-	return apply_filters( 'sanitize_html_class', $sanitized, $class, $fallback );
-}
-
-/**
- * Converts lone & characters into `&#038;` (a.k.a. `&amp;`)
- *
- * @since 0.71
- *
- * @param string $content    String of characters to be converted.
- * @param string $deprecated Not used.
- * @return string Converted string.
- */
-function convert_chars( $content, $deprecated = '' ) {
-	if ( ! empty( $deprecated ) ) {
-		_deprecated_argument( __FUNCTION__, '0.71' );
-	}
-
-	if ( strpos( $content, '&' ) !== false ) {
-		$content = preg_replace( '/&([^#])(?![a-z1-4]{1,8};)/i', '&#038;$1', $content );
-	}
-
-	return $content;
-}
-
-/**
- * Converts invalid Unicode references range to valid range.
- *
- * @since 4.3.0
- *
- * @param string $content String with entities that need converting.
- * @return string Converted string.
- */
-function convert_invalid_entities( $content ) {
-	$wp_htmltranswinuni = array(
-		'&#128;' => '&#8364;', // the Euro sign
-		'&#129;' => '',
-		'&#130;' => '&#8218;', // these are Windows CP1252 specific characters
-		'&#131;' => '&#402;',  // they would look weird on non-Windows browsers
-		'&#132;' => '&#8222;',
-		'&#133;' => '&#8230;',
-		'&#134;' => '&#8224;',
-		'&#135;' => '&#8225;',
-		'&#136;' => '&#710;',
-		'&#137;' => '&#8240;',
-		'&#138;' => '&#352;',
-		'&#139;' => '&#8249;',
-		'&#140;' => '&#338;',
-		'&#141;' => '',
-		'&#142;' => '&#381;',
-		'&#143;' => '',
-		'&#144;' => '',
-		'&#145;' => '&#8216;',
-		'&#146;' => '&#8217;',
-		'&#147;' => '&#8220;',
-		'&#148;' => '&#8221;',
-		'&#149;' => '&#8226;',
-		'&#150;' => '&#8211;',
-		'&#151;' => '&#8212;',
-		'&#152;' => '&#732;',
-		'&#153;' => '&#8482;',
-		'&#154;' => '&#353;',
-		'&#155;' => '&#8250;',
-		'&#156;' => '&#339;',
-		'&#157;' => '',
-		'&#158;' => '&#382;',
-		'&#159;' => '&#376;'
-	);
-
-	if ( strpos( $content, '&#1' ) !== false ) {
-		$content = strtr( $content, $wp_htmltranswinuni );
-	}
-
-	return $content;
-}
-
-/**
- * Balances tags if forced to, or if the 'use_balanceTags' option is set to true.
- *
- * @since 0.71
- *
- * @param string $text  Text to be balanced
- * @param bool   $force If true, forces balancing, ignoring the value of the option. Default false.
- * @return string Balanced text
- */
-function balanceTags( $text, $force = false ) {
-	if ( $force || get_option('use_balanceTags') == 1 ) {
-		return force_balance_tags( $text );
-	} else {
-		return $text;
-	}
-}
-
-/**
- * Balances tags of string using a modified stack.
- *
- * @since 2.0.4
- *
- * @author Leonard Lin <leonard@acm.org>
- * @license GPL
- * @copyright November 4, 2001
- * @version 1.1
- * @todo Make better - change loop condition to $text in 1.2
- * @internal Modified by Scott Reilly (coffee2code) 02 Aug 2004
- *		1.1  Fixed handling of append/stack pop order of end text
- *			 Added Cleaning Hooks
- *		1.0  First Version
- *
- * @param string $text Text to be balanced.
- * @return string Balanced text.
- */
-function force_balance_tags( $text ) {
-	$tagstack = array();
-	$stacksize = 0;
-	$tagqueue = '';
-	$newtext = '';
-	// Known single-entity/self-closing tags
-	$single_tags = array( 'area', 'base', 'basefont', 'br', 'col', 'command', 'embed', 'frame', 'hr', 'img', 'input', 'isindex', 'link', 'meta', 'param', 'source' );
-	// Tags that can be immediately nested within themselves
-	$nestable_tags = array( 'blockquote', 'div', 'object', 'q', 'span' );
-
-	// WP bug fix for comments - in case you REALLY meant to type '< !--'
-	$text = str_replace('< !--', '<    !--', $text);
-	// WP bug fix for LOVE <3 (and other situations with '<' before a number)
-	$text = preg_replace('#<([0-9]{1})#', '&lt;$1', $text);
-
-	while ( preg_match("/<(\/?[\w:]*)\s*([^>]*)>/", $text, $regex) ) {
-		$newtext .= $tagqueue;
-
-		$i = strpos($text, $regex[0]);
-		$l = strlen($regex[0]);
-
-		// clear the shifter
-		$tagqueue = '';
-		// Pop or Push
-		if ( isset($regex[1][0]) && '/' == $regex[1][0] ) { // End Tag
-			$tag = strtolower(substr($regex[1],1));
-			// if too many closing tags
-			if ( $stacksize <= 0 ) {
-				$tag = '';
-				// or close to be safe $tag = '/' . $tag;
-			}
-			// if stacktop value = tag close value then pop
-			elseif ( $tagstack[$stacksize - 1] == $tag ) { // found closing tag
-				$tag = '</' . $tag . '>'; // Close Tag
-				// Pop
-				array_pop( $tagstack );
-				$stacksize--;
-			} else { // closing tag not at top, search for it
-				for ( $j = $stacksize-1; $j >= 0; $j-- ) {
-					if ( $tagstack[$j] == $tag ) {
-					// add tag to tagqueue
-						for ( $k = $stacksize-1; $k >= $j; $k--) {
-							$tagqueue .= '</' . array_pop( $tagstack ) . '>';
-							$stacksize--;
-						}
-						break;
-					}
-				}
-				$tag = '';
-			}
-		} else { // Begin Tag
-			$tag = strtolower($regex[1]);
-
-			// Tag Cleaning
-
-			// If it's an empty tag "< >", do nothing
-			if ( '' == $tag ) {
-				// do nothing
-			}
-			// ElseIf it presents itself as a self-closing tag...
-			elseif ( substr( $regex[2], -1 ) == '/' ) {
-				// ...but it isn't a known single-entity self-closing tag, then don't let it be treated as such and
-				// immediately close it with a closing tag (the tag will encapsulate no text as a result)
-				if ( ! in_array( $tag, $single_tags ) )
-					$regex[2] = trim( substr( $regex[2], 0, -1 ) ) . "></$tag";
-			}
-			// ElseIf it's a known single-entity tag but it doesn't close itself, do so
-			elseif ( in_array($tag, $single_tags) ) {
-				$regex[2] .= '/';
-			}
-			// Else it's not a single-entity tag
-			else {
-				// If the top of the stack is the same as the tag we want to push, close previous tag
-				if ( $stacksize > 0 && !in_array($tag, $nestable_tags) && $tagstack[$stacksize - 1] == $tag ) {
-					$tagqueue = '</' . array_pop( $tagstack ) . '>';
-					$stacksize--;
-				}
-				$stacksize = array_push( $tagstack, $tag );
-			}
-
-			// Attributes
-			$attributes = $regex[2];
-			if ( ! empty( $attributes ) && $attributes[0] != '>' )
-				$attributes = ' ' . $attributes;
-
-			$tag = '<' . $tag . $attributes . '>';
-			//If already queuing a close tag, then put this tag on, too
-			if ( !empty($tagqueue) ) {
-				$tagqueue .= $tag;
-				$tag = '';
-			}
-		}
-		$newtext .= substr($text, 0, $i) . $tag;
-		$text = substr($text, $i + $l);
-	}
-
-	// Clear Tag Queue
-	$newtext .= $tagqueue;
-
-	// Add Remaining text
-	$newtext .= $text;
-
-	// Empty Stack
-	while( $x = array_pop($tagstack) )
-		$newtext .= '</' . $x . '>'; // Add remaining tags to close
-
-	// WP fix for the bug with HTML comments
-	$newtext = str_replace("< !--","<!--",$newtext);
-	$newtext = str_replace("<    !--","< !--",$newtext);
-
-	return $newtext;
-}
-
-/**
- * Acts on text which is about to be edited.
- *
- * The $content is run through esc_textarea(), which uses htmlspecialchars()
- * to convert special characters to HTML entities. If `$richedit` is set to true,
- * it is simply a holder for the {@see 'format_to_edit'} filter.
- *
- * @since 0.71
- * @since 4.4.0 The `$richedit` parameter was renamed to `$rich_text` for clarity.
- *
- * @param string $content   The text about to be edited.
- * @param bool   $rich_text Optional. Whether `$content` should be considered rich text,
- *                          in which case it would not be passed through esc_textarea().
- *                          Default false.
- * @return string The text after the filter (and possibly htmlspecialchars()) has been run.
- */
-function format_to_edit( $content, $rich_text = false ) {
-	/**
-	 * Filters the text to be formatted for editing.
-	 *
-	 * @since 1.2.0
-	 *
-	 * @param string $content The text, prior to formatting for editing.
-	 */
-	$content = apply_filters( 'format_to_edit', $content );
-	if ( ! $rich_text )
-		$content = esc_textarea( $content );
-	return $content;
-}
-
-/**
- * Add leading zeros when necessary.
- *
- * If you set the threshold to '4' and the number is '10', then you will get
- * back '0010'. If you set the threshold to '4' and the number is '5000', then you
- * will get back '5000'.
- *
- * Uses sprintf to append the amount of zeros based on the $threshold parameter
- * and the size of the number. If the number is large enough, then no zeros will
- * be appended.
- *
- * @since 0.71
- *
- * @param int $number     Number to append zeros to if not greater than threshold.
- * @param int $threshold  Digit places number needs to be to not have zeros added.
- * @return string Adds leading zeros to number if needed.
- */
-function zeroise( $number, $threshold ) {
-	return sprintf( '%0' . $threshold . 's', $number );
-}
-
-/**
- * Adds backslashes before letters and before a number at the start of a string.
- *
- * @since 0.71
- *
- * @param string $string Value to which backslashes will be added.
- * @return string String with backslashes inserted.
- */
-function backslashit( $string ) {
-	if ( isset( $string[0] ) && $string[0] >= '0' && $string[0] <= '9' )
-		$string = '\\\\' . $string;
-	return addcslashes( $string, 'A..Za..z' );
-}
-
-/**
- * Appends a trailing slash.
- *
- * Will remove trailing forward and backslashes if it exists already before adding
- * a trailing forward slash. This prevents double slashing a string or path.
- *
- * The primary use of this is for paths and thus should be used for paths. It is
- * not restricted to paths and offers no specific path support.
- *
- * @since 1.2.0
- *
- * @param string $string What to add the trailing slash to.
- * @return string String with trailing slash added.
- */
-function trailingslashit( $string ) {
-	return untrailingslashit( $string ) . '/';
-}
-
-/**
- * Removes trailing forward slashes and backslashes if they exist.
- *
- * The primary use of this is for paths and thus should be used for paths. It is
- * not restricted to paths and offers no specific path support.
- *
- * @since 2.2.0
- *
- * @param string $string What to remove the trailing slashes from.
- * @return string String without the trailing slashes.
- */
-function untrailingslashit( $string ) {
-	return rtrim( $string, '/\\' );
-}
-
-/**
- * Adds slashes to escape strings.
- *
- * Slashes will first be removed if magic_quotes_gpc is set, see {@link
- * https://secure.php.net/magic_quotes} for more details.
- *
- * @since 0.71
- *
- * @param string $gpc The string returned from HTTP request data.
- * @return string Returns a string escaped with slashes.
- */
-function addslashes_gpc($gpc) {
-	if ( get_magic_quotes_gpc() )
-		$gpc = stripslashes($gpc);
-
-	return wp_slash($gpc);
-}
-
-/**
- * Navigates through an array, object, or scalar, and removes slashes from the values.
- *
- * @since 2.0.0
- *
- * @param mixed $value The value to be stripped.
- * @return mixed Stripped value.
- */
-function stripslashes_deep( $value ) {
-	return map_deep( $value, 'stripslashes_from_strings_only' );
-}
-
-/**
- * Callback function for `stripslashes_deep()` which strips slashes from strings.
- *
- * @since 4.4.0
- *
- * @param mixed $value The array or string to be stripped.
- * @return mixed $value The stripped value.
- */
-function stripslashes_from_strings_only( $value ) {
-	return is_string( $value ) ? stripslashes( $value ) : $value;
-}
-
-/**
- * Navigates through an array, object, or scalar, and encodes the values to be used in a URL.
- *
- * @since 2.2.0
- *
- * @param mixed $value The array or string to be encoded.
- * @return mixed $value The encoded value.
- */
-function urlencode_deep( $value ) {
-	return map_deep( $value, 'urlencode' );
-}
-
-/**
- * Navigates through an array, object, or scalar, and raw-encodes the values to be used in a URL.
- *
- * @since 3.4.0
- *
- * @param mixed $value The array or string to be encoded.
- * @return mixed $value The encoded value.
- */
-function rawurlencode_deep( $value ) {
-	return map_deep( $value, 'rawurlencode' );
-}
-
-/**
- * Navigates through an array, object, or scalar, and decodes URL-encoded values
- *
- * @since 4.4.0
- *
- * @param mixed $value The array or string to be decoded.
- * @return mixed $value The decoded value.
- */
-function urldecode_deep( $value ) {
-	return map_deep( $value, 'urldecode' );
-}
-
-/**
- * Converts email addresses characters to HTML entities to block spam bots.
- *
- * @since 0.71
- *
- * @param string $email_address Email address.
- * @param int    $hex_encoding  Optional. Set to 1 to enable hex encoding.
- * @return string Converted email address.
- */
-function antispambot( $email_address, $hex_encoding = 0 ) {
-	$email_no_spam_address = '';
-	for ( $i = 0, $len = strlen( $email_address ); $i < $len; $i++ ) {
-		$j = rand( 0, 1 + $hex_encoding );
-		if ( $j == 0 ) {
-			$email_no_spam_address .= '&#' . ord( $email_address[$i] ) . ';';
-		} elseif ( $j == 1 ) {
-			$email_no_spam_address .= $email_address[$i];
-		} elseif ( $j == 2 ) {
-			$email_no_spam_address .= '%' . zeroise( dechex( ord( $email_address[$i] ) ), 2 );
-		}
-	}
-
-	return str_replace( '@', '&#64;', $email_no_spam_address );
-}
-
-/**
- * Callback to convert URI match to HTML A element.
- *
- * This function was backported from 2.5.0 to 2.3.2. Regex callback for make_clickable().
- *
- * @since 2.3.2
- * @access private
- *
- * @param array $matches Single Regex Match.
- * @return string HTML A element with URI address.
- */
-function _make_url_clickable_cb( $matches ) {
-	$url = $matches[2];
-
-	if ( ')' == $matches[3] && strpos( $url, '(' ) ) {
-		// If the trailing character is a closing parethesis, and the URL has an opening parenthesis in it, add the closing parenthesis to the URL.
-		// Then we can let the parenthesis balancer do its thing below.
-		$url .= $matches[3];
-		$suffix = '';
-	} else {
-		$suffix = $matches[3];
-	}
-
-	// Include parentheses in the URL only if paired
-	while ( substr_count( $url, '(' ) < substr_count( $url, ')' ) ) {
-		$suffix = strrchr( $url, ')' ) . $suffix;
-		$url = substr( $url, 0, strrpos( $url, ')' ) );
-	}
-
-	$url = esc_url($url);
-	if ( empty($url) )
-		return $matches[0];
-
-	return $matches[1] . "<a href=\"$url\" rel=\"nofollow\">$url</a>" . $suffix;
-}
-
-/**
- * Callback to convert URL match to HTML A element.
- *
- * This function was backported from 2.5.0 to 2.3.2. Regex callback for make_clickable().
- *
- * @since 2.3.2
- * @access private
- *
- * @param array $matches Single Regex Match.
- * @return string HTML A element with URL address.
- */
-function _make_web_ftp_clickable_cb( $matches ) {
-	$ret = '';
-	$dest = $matches[2];
-	$dest = 'http://' . $dest;
-
-	// removed trailing [.,;:)] from URL
-	if ( in_array( substr($dest, -1), array('.', ',', ';', ':', ')') ) === true ) {
-		$ret = substr($dest, -1);
-		$dest = substr($dest, 0, strlen($dest)-1);
-	}
-
-	$dest = esc_url($dest);
-	if ( empty($dest) )
-		return $matches[0];
-
-	return $matches[1] . "<a href=\"$dest\" rel=\"nofollow\">$dest</a>$ret";
-}
-
-/**
- * Callback to convert email address match to HTML A element.
- *
- * This function was backported from 2.5.0 to 2.3.2. Regex callback for make_clickable().
- *
- * @since 2.3.2
- * @access private
- *
- * @param array $matches Single Regex Match.
- * @return string HTML A element with email address.
- */
-function _make_email_clickable_cb( $matches ) {
-	$email = $matches[2] . '@' . $matches[3];
-	return $matches[1] . "<a href=\"mailto:$email\">$email</a>";
-}
-
-/**
- * Convert plaintext URI to HTML links.
- *
- * Converts URI, www and ftp, and email addresses. Finishes by fixing links
- * within links.
- *
- * @since 0.71
- *
- * @param string $text Content to convert URIs.
- * @return string Content with converted URIs.
- */
-function make_clickable( $text ) {
-	$r = '';
-	$textarr = preg_split( '/(<[^<>]+>)/', $text, -1, PREG_SPLIT_DELIM_CAPTURE ); // split out HTML tags
-	$nested_code_pre = 0; // Keep track of how many levels link is nested inside <pre> or <code>
-	foreach ( $textarr as $piece ) {
-
-		if ( preg_match( '|^<code[\s>]|i', $piece ) || preg_match( '|^<pre[\s>]|i', $piece ) || preg_match( '|^<script[\s>]|i', $piece ) || preg_match( '|^<style[\s>]|i', $piece ) )
-			$nested_code_pre++;
-		elseif ( $nested_code_pre && ( '</code>' === strtolower( $piece ) || '</pre>' === strtolower( $piece ) || '</script>' === strtolower( $piece ) || '</style>' === strtolower( $piece ) ) )
-			$nested_code_pre--;
-
-		if ( $nested_code_pre || empty( $piece ) || ( $piece[0] === '<' && ! preg_match( '|^<\s*[\w]{1,20}+://|', $piece ) ) ) {
-			$r .= $piece;
-			continue;
-		}
-
-		// Long strings might contain expensive edge cases ...
-		if ( 10000 < strlen( $piece ) ) {
-			// ... break it up
-			foreach ( _split_str_by_whitespace( $piece, 2100 ) as $chunk ) { // 2100: Extra room for scheme and leading and trailing paretheses
-				if ( 2101 < strlen( $chunk ) ) {
-					$r .= $chunk; // Too big, no whitespace: bail.
-				} else {
-					$r .= make_clickable( $chunk );
-				}
-			}
-		} else {
-			$ret = " $piece "; // Pad with whitespace to simplify the regexes
-
-			$url_clickable = '~
-				([\\s(<.,;:!?])                                        # 1: Leading whitespace, or punctuation
-				(                                                      # 2: URL
-					[\\w]{1,20}+://                                # Scheme and hier-part prefix
-					(?=\S{1,2000}\s)                               # Limit to URLs less than about 2000 characters long
-					[\\w\\x80-\\xff#%\\~/@\\[\\]*(+=&$-]*+         # Non-punctuation URL character
-					(?:                                            # Unroll the Loop: Only allow puctuation URL character if followed by a non-punctuation URL character
-						[\'.,;:!?)]                            # Punctuation URL character
-						[\\w\\x80-\\xff#%\\~/@\\[\\]*(+=&$-]++ # Non-punctuation URL character
-					)*
-				)
-				(\)?)                                                  # 3: Trailing closing parenthesis (for parethesis balancing post processing)
-			~xS'; // The regex is a non-anchored pattern and does not have a single fixed starting character.
-			      // Tell PCRE to spend more time optimizing since, when used on a page load, it will probably be used several times.
-
-			$ret = preg_replace_callback( $url_clickable, '_make_url_clickable_cb', $ret );
-
-			$ret = preg_replace_callback( '#([\s>])((www|ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]+)#is', '_make_web_ftp_clickable_cb', $ret );
-			$ret = preg_replace_callback( '#([\s>])([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})#i', '_make_email_clickable_cb', $ret );
-
-			$ret = substr( $ret, 1, -1 ); // Remove our whitespace padding.
-			$r .= $ret;
-		}
-	}
-
-	// Cleanup of accidental links within links
-	return preg_replace( '#(<a([ \r\n\t]+[^>]+?>|>))<a [^>]+?>([^>]+?)</a></a>#i', "$1$3</a>", $r );
-}
-
-/**
- * Breaks a string into chunks by splitting at whitespace characters.
- * The length of each returned chunk is as close to the specified length goal as possible,
- * with the caveat that each chunk includes its trailing delimiter.
- * Chunks longer than the goal are guaranteed to not have any inner whitespace.
- *
- * Joining the returned chunks with empty delimiters reconstructs the input string losslessly.
- *
- * Input string must have no null characters (or eventual transformations on output chunks must not care about null characters)
- *
- *     _split_str_by_whitespace( "1234 67890 1234 67890a cd 1234   890 123456789 1234567890a    45678   1 3 5 7 90 ", 10 ) ==
- *     array (
- *         0 => '1234 67890 ',  // 11 characters: Perfect split
- *         1 => '1234 ',        //  5 characters: '1234 67890a' was too long
- *         2 => '67890a cd ',   // 10 characters: '67890a cd 1234' was too long
- *         3 => '1234   890 ',  // 11 characters: Perfect split
- *         4 => '123456789 ',   // 10 characters: '123456789 1234567890a' was too long
- *         5 => '1234567890a ', // 12 characters: Too long, but no inner whitespace on which to split
- *         6 => '   45678   ',  // 11 characters: Perfect split
- *         7 => '1 3 5 7 90 ',  // 11 characters: End of $string
- *     );
- *
- * @since 3.4.0
- * @access private
- *
- * @param string $string The string to split.
- * @param int    $goal   The desired chunk length.
- * @return array Numeric array of chunks.
- */
-function _split_str_by_whitespace( $string, $goal ) {
-	$chunks = array();
-
-	$string_nullspace = strtr( $string, "\r\n\t\v\f ", "\000\000\000\000\000\000" );
-
-	while ( $goal < strlen( $string_nullspace ) ) {
-		$pos = strrpos( substr( $string_nullspace, 0, $goal + 1 ), "\000" );
-
-		if ( false === $pos ) {
-			$pos = strpos( $string_nullspace, "\000", $goal + 1 );
-			if ( false === $pos ) {
-				break;
-			}
-		}
-
-		$chunks[] = substr( $string, 0, $pos + 1 );
-		$string = substr( $string, $pos + 1 );
-		$string_nullspace = substr( $string_nullspace, $pos + 1 );
-	}
-
-	if ( $string ) {
-		$chunks[] = $string;
-	}
-
-	return $chunks;
-}
-
-/**
- * Adds rel nofollow string to all HTML A elements in content.
- *
- * @since 1.5.0
- *
- * @param string $text Content that may contain HTML A elements.
- * @return string Converted content.
- */
-function wp_rel_nofollow( $text ) {
-	// This is a pre save filter, so text is already escaped.
-	$text = stripslashes($text);
-	$text = preg_replace_callback('|<a (.+?)>|i', 'wp_rel_nofollow_callback', $text);
-	return wp_slash( $text );
-}
-
-/**
- * Callback to add rel=nofollow string to HTML A element.
- *
- * Will remove already existing rel="nofollow" and rel='nofollow' from the
- * string to prevent from invalidating (X)HTML.
- *
- * @since 2.3.0
- *
- * @param array $matches Single Match
- * @return string HTML A Element with rel nofollow.
- */
-function wp_rel_nofollow_callback( $matches ) {
-	$text = $matches[1];
-	$atts = shortcode_parse_atts( $matches[1] );
-	$rel  = 'nofollow';
-
-	if ( preg_match( '%href=["\'](' . preg_quote( set_url_scheme( home_url(), 'http' ) ) . ')%i', $text ) ||
-	     preg_match( '%href=["\'](' . preg_quote( set_url_scheme( home_url(), 'https' ) ) . ')%i', $text )
-	) {
-		return "<a $text>";
-	}
-
-	if ( ! empty( $atts['rel'] ) ) {
-		$parts = array_map( 'trim', explode( ' ', $atts['rel'] ) );
-		if ( false === array_search( 'nofollow', $parts ) ) {
-			$parts[] = 'nofollow';
-		}
-		$rel = implode( ' ', $parts );
-		unset( $atts['rel'] );
-
-		$html = '';
-		foreach ( $atts as $name => $value ) {
-			$html .= "{$name}=\"$value\" ";
-		}
-		$text = trim( $html );
-	}
-	return "<a $text rel=\"$rel\">";
-}
-
-/**
- * Convert one smiley code to the icon graphic file equivalent.
- *
- * Callback handler for convert_smilies().
- *
- * Looks up one smiley code in the $wpsmiliestrans global array and returns an
- * `<img>` string for that smiley.
- *
- * @since 2.8.0
- *
- * @global array $wpsmiliestrans
- *
- * @param array $matches Single match. Smiley code to convert to image.
- * @return string Image string for smiley.
- */
-function translate_smiley( $matches ) {
-	global $wpsmiliestrans;
-
-	if ( count( $matches ) == 0 )
-		return '';
-
-	$smiley = trim( reset( $matches ) );
-	$img = $wpsmiliestrans[ $smiley ];
-
-	$matches = array();
-	$ext = preg_match( '/\.([^.]+)$/', $img, $matches ) ? strtolower( $matches[1] ) : false;
-	$image_exts = array( 'jpg', 'jpeg', 'jpe', 'gif', 'png' );
-
-	// Don't convert smilies that aren't images - they're probably emoji.
-	if ( ! in_array( $ext, $image_exts ) ) {
-		return $img;
-	}
-
-	/**
-	 * Filters the Smiley image URL before it's used in the image element.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param string $smiley_url URL for the smiley image.
-	 * @param string $img        Filename for the smiley image.
-	 * @param string $site_url   Site URL, as returned by site_url().
-	 */
-	$src_url = apply_filters( 'smilies_src', includes_url( "images/smilies/$img" ), $img, site_url() );
-
-	return sprintf( '<img src="%s" alt="%s" class="wp-smiley" style="height: 1em; max-height: 1em;" />', esc_url( $src_url ), esc_attr( $smiley ) );
-}
-
-/**
- * Convert text equivalent of smilies to images.
- *
- * Will only convert smilies if the option 'use_smilies' is true and the global
- * used in the function isn't empty.
- *
- * @since 0.71
- *
- * @global string|array $wp_smiliessearch
- *
- * @param string $text Content to convert smilies from text.
- * @return string Converted content with text smilies replaced with images.
- */
-function convert_smilies( $text ) {
-	global $wp_smiliessearch;
-	$output = '';
-	if ( get_option( 'use_smilies' ) && ! empty( $wp_smiliessearch ) ) {
-		// HTML loop taken from texturize function, could possible be consolidated
-		$textarr = preg_split( '/(<.*>)/U', $text, -1, PREG_SPLIT_DELIM_CAPTURE ); // capture the tags as well as in between
-		$stop = count( $textarr );// loop stuff
-
-		// Ignore proessing of specific tags
-		$tags_to_ignore = 'code|pre|style|script|textarea';
-		$ignore_block_element = '';
-
-		for ( $i = 0; $i < $stop; $i++ ) {
-			$content = $textarr[$i];
-
-			// If we're in an ignore block, wait until we find its closing tag
-			if ( '' == $ignore_block_element && preg_match( '/^<(' . $tags_to_ignore . ')>/', $content, $matches ) )  {
-				$ignore_block_element = $matches[1];
-			}
-
-			// If it's not a tag and not in ignore block
-			if ( '' ==  $ignore_block_element && strlen( $content ) > 0 && '<' != $content[0] ) {
-				$content = preg_replace_callback( $wp_smiliessearch, 'translate_smiley', $content );
-			}
-
-			// did we exit ignore block
-			if ( '' != $ignore_block_element && '</' . $ignore_block_element . '>' == $content )  {
-				$ignore_block_element = '';
-			}
-
-			$output .= $content;
-		}
-	} else {
-		// return default text.
-		$output = $text;
-	}
-	return $output;
-}
-
-/**
- * Verifies that an email is valid.
- *
- * Does not grok i18n domains. Not RFC compliant.
- *
- * @since 0.71
- *
- * @param string $email      Email address to verify.
- * @param bool   $deprecated Deprecated.
- * @return string|bool Either false or the valid email address.
- */
-function is_email( $email, $deprecated = false ) {
-	if ( ! empty( $deprecated ) )
-		_deprecated_argument( __FUNCTION__, '3.0.0' );
-
-	// Test for the minimum length the email can be
-	if ( strlen( $email ) < 3 ) {
-		/**
-		 * Filters whether an email address is valid.
-		 *
-		 * This filter is evaluated under several different contexts, such as 'email_too_short',
-		 * 'email_no_at', 'local_invalid_chars', 'domain_period_sequence', 'domain_period_limits',
-		 * 'domain_no_periods', 'sub_hyphen_limits', 'sub_invalid_chars', or no specific context.
-		 *
-		 * @since 2.8.0
-		 *
-		 * @param bool   $is_email Whether the email address has passed the is_email() checks. Default false.
-		 * @param string $email    The email address being checked.
-		 * @param string $context  Context under which the email was tested.
-		 */
-		return apply_filters( 'is_email', false, $email, 'email_too_short' );
-	}
-
-	// Test for an @ character after the first position
-	if ( strpos( $email, '@', 1 ) === false ) {
-		/** This filter is documented in wp-includes/formatting.php */
-		return apply_filters( 'is_email', false, $email, 'email_no_at' );
-	}
-
-	// Split out the local and domain parts
-	list( $local, $domain ) = explode( '@', $email, 2 );
-
-	// LOCAL PART
-	// Test for invalid characters
-	if ( !preg_match( '/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/', $local ) ) {
-		/** This filter is documented in wp-includes/formatting.php */
-		return apply_filters( 'is_email', false, $email, 'local_invalid_chars' );
-	}
-
-	// DOMAIN PART
-	// Test for sequences of periods
-	if ( preg_match( '/\.{2,}/', $domain ) ) {
-		/** This filter is documented in wp-includes/formatting.php */
-		return apply_filters( 'is_email', false, $email, 'domain_period_sequence' );
-	}
-
-	// Test for leading and trailing periods and whitespace
-	if ( trim( $domain, " \t\n\r\0\x0B." ) !== $domain ) {
-		/** This filter is documented in wp-includes/formatting.php */
-		return apply_filters( 'is_email', false, $email, 'domain_period_limits' );
-	}
-
-	// Split the domain into subs
-	$subs = explode( '.', $domain );
-
-	// Assume the domain will have at least two subs
-	if ( 2 > count( $subs ) ) {
-		/** This filter is documented in wp-includes/formatting.php */
-		return apply_filters( 'is_email', false, $email, 'domain_no_periods' );
-	}
-
-	// Loop through each sub
-	foreach ( $subs as $sub ) {
-		// Test for leading and trailing hyphens and whitespace
-		if ( trim( $sub, " \t\n\r\0\x0B-" ) !== $sub ) {
-			/** This filter is documented in wp-includes/formatting.php */
-			return apply_filters( 'is_email', false, $email, 'sub_hyphen_limits' );
-		}
-
-		// Test for invalid characters
-		if ( !preg_match('/^[a-z0-9-]+$/i', $sub ) ) {
-			/** This filter is documented in wp-includes/formatting.php */
-			return apply_filters( 'is_email', false, $email, 'sub_invalid_chars' );
-		}
-	}
-
-	// Congratulations your email made it!
-	/** This filter is documented in wp-includes/formatting.php */
-	return apply_filters( 'is_email', $email, $email, null );
-}
-
-/**
- * Convert to ASCII from email subjects.
- *
- * @since 1.2.0
- *
- * @param string $string Subject line
- * @return string Converted string to ASCII
- */
-function wp_iso_descrambler( $string ) {
-	/* this may only work with iso-8859-1, I'm afraid */
-	if (!preg_match('#\=\?(.+)\?Q\?(.+)\?\=#i', $string, $matches)) {
-		return $string;
-	} else {
-		$subject = str_replace('_', ' ', $matches[2]);
-		return preg_replace_callback( '#\=([0-9a-f]{2})#i', '_wp_iso_convert', $subject );
-	}
-}
-
-/**
- * Helper function to convert hex encoded chars to ASCII
- *
- * @since 3.1.0
- * @access private
- *
- * @param array $match The preg_replace_callback matches array
- * @return string Converted chars
- */
-function _wp_iso_convert( $match ) {
-	return chr( hexdec( strtolower( $match[1] ) ) );
-}
-
-/**
- * Returns a date in the GMT equivalent.
- *
- * Requires and returns a date in the Y-m-d H:i:s format. If there is a
- * timezone_string available, the date is assumed to be in that timezone,
- * otherwise it simply subtracts the value of the 'gmt_offset' option. Return
- * format can be overridden using the $format parameter.
- *
- * @since 1.2.0
- *
- * @param string $string The date to be converted.
- * @param string $format The format string for the returned date (default is Y-m-d H:i:s)
- * @return string GMT version of the date provided.
- */
-function get_gmt_from_date( $string, $format = 'Y-m-d H:i:s' ) {
-	$tz = get_option( 'timezone_string' );
-	if ( $tz ) {
-		$datetime = date_create( $string, new DateTimeZone( $tz ) );
-		if ( ! $datetime ) {
-			return gmdate( $format, 0 );
-		}
-		$datetime->setTimezone( new DateTimeZone( 'UTC' ) );
-		$string_gmt = $datetime->format( $format );
-	} else {
-		if ( ! preg_match( '#([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#', $string, $matches ) ) {
-			$datetime = strtotime( $string );
-			if ( false === $datetime ) {
-				return gmdate( $format, 0 );
-			}
-			return gmdate( $format, $datetime );
-		}
-		$string_time = gmmktime( $matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1] );
-		$string_gmt = gmdate( $format, $string_time - get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );
-	}
-	return $string_gmt;
-}
-
-/**
- * Converts a GMT date into the correct format for the blog.
- *
- * Requires and returns a date in the Y-m-d H:i:s format. If there is a
- * timezone_string available, the returned date is in that timezone, otherwise
- * it simply adds the value of gmt_offset. Return format can be overridden
- * using the $format parameter
- *
- * @since 1.2.0
- *
- * @param string $string The date to be converted.
- * @param string $format The format string for the returned date (default is Y-m-d H:i:s)
- * @return string Formatted date relative to the timezone / GMT offset.
- */
-function get_date_from_gmt( $string, $format = 'Y-m-d H:i:s' ) {
-	$tz = get_option( 'timezone_string' );
-	if ( $tz ) {
-		$datetime = date_create( $string, new DateTimeZone( 'UTC' ) );
-		if ( ! $datetime )
-			return date( $format, 0 );
-		$datetime->setTimezone( new DateTimeZone( $tz ) );
-		$string_localtime = $datetime->format( $format );
-	} else {
-		if ( ! preg_match('#([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#', $string, $matches) )
-			return date( $format, 0 );
-		$string_time = gmmktime( $matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1] );
-		$string_localtime = gmdate( $format, $string_time + get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );
-	}
-	return $string_localtime;
-}
-
-/**
- * Computes an offset in seconds from an iso8601 timezone.
- *
- * @since 1.5.0
- *
- * @param string $timezone Either 'Z' for 0 offset or '±hhmm'.
- * @return int|float The offset in seconds.
- */
-function iso8601_timezone_to_offset( $timezone ) {
-	// $timezone is either 'Z' or '[+|-]hhmm'
-	if ($timezone == 'Z') {
-		$offset = 0;
-	} else {
-		$sign    = (substr($timezone, 0, 1) == '+') ? 1 : -1;
-		$hours   = intval(substr($timezone, 1, 2));
-		$minutes = intval(substr($timezone, 3, 4)) / 60;
-		$offset  = $sign * HOUR_IN_SECONDS * ($hours + $minutes);
-	}
-	return $offset;
-}
-
-/**
- * Converts an iso8601 date to MySQL DateTime format used by post_date[_gmt].
- *
- * @since 1.5.0
- *
- * @param string $date_string Date and time in ISO 8601 format {@link https://en.wikipedia.org/wiki/ISO_8601}.
- * @param string $timezone    Optional. If set to GMT returns the time minus gmt_offset. Default is 'user'.
- * @return string The date and time in MySQL DateTime format - Y-m-d H:i:s.
- */
-function iso8601_to_datetime( $date_string, $timezone = 'user' ) {
-	$timezone = strtolower($timezone);
-
-	if ($timezone == 'gmt') {
-
-		preg_match('#([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(Z|[\+|\-][0-9]{2,4}){0,1}#', $date_string, $date_bits);
-
-		if (!empty($date_bits[7])) { // we have a timezone, so let's compute an offset
-			$offset = iso8601_timezone_to_offset($date_bits[7]);
-		} else { // we don't have a timezone, so we assume user local timezone (not server's!)
-			$offset = HOUR_IN_SECONDS * get_option('gmt_offset');
-		}
-
-		$timestamp = gmmktime($date_bits[4], $date_bits[5], $date_bits[6], $date_bits[2], $date_bits[3], $date_bits[1]);
-		$timestamp -= $offset;
-
-		return gmdate('Y-m-d H:i:s', $timestamp);
-
-	} elseif ($timezone == 'user') {
-		return preg_replace('#([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(Z|[\+|\-][0-9]{2,4}){0,1}#', '$1-$2-$3 $4:$5:$6', $date_string);
-	}
-}
-
-/**
- * Strips out all characters that are not allowable in an email.
- *
- * @since 1.5.0
- *
- * @param string $email Email address to filter.
- * @return string Filtered email address.
- */
-function sanitize_email( $email ) {
-	// Test for the minimum length the email can be
-	if ( strlen( $email ) < 3 ) {
-		/**
-		 * Filters a sanitized email address.
-		 *
-		 * This filter is evaluated under several contexts, including 'email_too_short',
-		 * 'email_no_at', 'local_invalid_chars', 'domain_period_sequence', 'domain_period_limits',
-		 * 'domain_no_periods', 'domain_no_valid_subs', or no context.
-		 *
-		 * @since 2.8.0
-		 *
-		 * @param string $email   The sanitized email address.
-		 * @param string $email   The email address, as provided to sanitize_email().
-		 * @param string $message A message to pass to the user.
-		 */
-		return apply_filters( 'sanitize_email', '', $email, 'email_too_short' );
-	}
-
-	// Test for an @ character after the first position
-	if ( strpos( $email, '@', 1 ) === false ) {
-		/** This filter is documented in wp-includes/formatting.php */
-		return apply_filters( 'sanitize_email', '', $email, 'email_no_at' );
-	}
-
-	// Split out the local and domain parts
-	list( $local, $domain ) = explode( '@', $email, 2 );
-
-	// LOCAL PART
-	// Test for invalid characters
-	$local = preg_replace( '/[^a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]/', '', $local );
-	if ( '' === $local ) {
-		/** This filter is documented in wp-includes/formatting.php */
-		return apply_filters( 'sanitize_email', '', $email, 'local_invalid_chars' );
-	}
-
-	// DOMAIN PART
-	// Test for sequences of periods
-	$domain = preg_replace( '/\.{2,}/', '', $domain );
-	if ( '' === $domain ) {
-		/** This filter is documented in wp-includes/formatting.php */
-		return apply_filters( 'sanitize_email', '', $email, 'domain_period_sequence' );
-	}
-
-	// Test for leading and trailing periods and whitespace
-	$domain = trim( $domain, " \t\n\r\0\x0B." );
-	if ( '' === $domain ) {
-		/** This filter is documented in wp-includes/formatting.php */
-		return apply_filters( 'sanitize_email', '', $email, 'domain_period_limits' );
-	}
-
-	// Split the domain into subs
-	$subs = explode( '.', $domain );
-
-	// Assume the domain will have at least two subs
-	if ( 2 > count( $subs ) ) {
-		/** This filter is documented in wp-includes/formatting.php */
-		return apply_filters( 'sanitize_email', '', $email, 'domain_no_periods' );
-	}
-
-	// Create an array that will contain valid subs
-	$new_subs = array();
-
-	// Loop through each sub
-	foreach ( $subs as $sub ) {
-		// Test for leading and trailing hyphens
-		$sub = trim( $sub, " \t\n\r\0\x0B-" );
-
-		// Test for invalid characters
-		$sub = preg_replace( '/[^a-z0-9-]+/i', '', $sub );
-
-		// If there's anything left, add it to the valid subs
-		if ( '' !== $sub ) {
-			$new_subs[] = $sub;
-		}
-	}
-
-	// If there aren't 2 or more valid subs
-	if ( 2 > count( $new_subs ) ) {
-		/** This filter is documented in wp-includes/formatting.php */
-		return apply_filters( 'sanitize_email', '', $email, 'domain_no_valid_subs' );
-	}
-
-	// Join valid subs into the new domain
-	$domain = join( '.', $new_subs );
-
-	// Put the email back together
-	$email = $local . '@' . $domain;
-
-	// Congratulations your email made it!
-	/** This filter is documented in wp-includes/formatting.php */
-	return apply_filters( 'sanitize_email', $email, $email, null );
-}
-
-/**
- * Determines the difference between two timestamps.
- *
- * The difference is returned in a human readable format such as "1 hour",
- * "5 mins", "2 days".
- *
- * @since 1.5.0
- *
- * @param int $from Unix timestamp from which the difference begins.
- * @param int $to   Optional. Unix timestamp to end the time difference. Default becomes time() if not set.
- * @return string Human readable time difference.
- */
-function human_time_diff( $from, $to = '' ) {
-	if ( empty( $to ) ) {
-		$to = time();
-	}
-
-	$diff = (int) abs( $to - $from );
-
-	if ( $diff < HOUR_IN_SECONDS ) {
-		$mins = round( $diff / MINUTE_IN_SECONDS );
-		if ( $mins <= 1 )
-			$mins = 1;
-		/* translators: min=minute */
-		$since = sprintf( _n( '%s min', '%s mins', $mins ), $mins );
-	} elseif ( $diff < DAY_IN_SECONDS && $diff >= HOUR_IN_SECONDS ) {
-		$hours = round( $diff / HOUR_IN_SECONDS );
-		if ( $hours <= 1 )
-			$hours = 1;
-		$since = sprintf( _n( '%s hour', '%s hours', $hours ), $hours );
-	} elseif ( $diff < WEEK_IN_SECONDS && $diff >= DAY_IN_SECONDS ) {
-		$days = round( $diff / DAY_IN_SECONDS );
-		if ( $days <= 1 )
-			$days = 1;
-		$since = sprintf( _n( '%s day', '%s days', $days ), $days );
-	} elseif ( $diff < MONTH_IN_SECONDS && $diff >= WEEK_IN_SECONDS ) {
-		$weeks = round( $diff / WEEK_IN_SECONDS );
-		if ( $weeks <= 1 )
-			$weeks = 1;
-		$since = sprintf( _n( '%s week', '%s weeks', $weeks ), $weeks );
-	} elseif ( $diff < YEAR_IN_SECONDS && $diff >= MONTH_IN_SECONDS ) {
-		$months = round( $diff / MONTH_IN_SECONDS );
-		if ( $months <= 1 )
-			$months = 1;
-		$since = sprintf( _n( '%s month', '%s months', $months ), $months );
-	} elseif ( $diff >= YEAR_IN_SECONDS ) {
-		$years = round( $diff / YEAR_IN_SECONDS );
-		if ( $years <= 1 )
-			$years = 1;
-		$since = sprintf( _n( '%s year', '%s years', $years ), $years );
-	}
-
-	/**
-	 * Filters the human readable difference between two timestamps.
-	 *
-	 * @since 4.0.0
-	 *
-	 * @param string $since The difference in human readable text.
-	 * @param int    $diff  The difference in seconds.
-	 * @param int    $from  Unix timestamp from which the difference begins.
-	 * @param int    $to    Unix timestamp to end the time difference.
-	 */
-	return apply_filters( 'human_time_diff', $since, $diff, $from, $to );
-}
-
-/**
- * Generates an excerpt from the content, if needed.
- *
- * The excerpt word amount will be 55 words and if the amount is greater than
- * that, then the string ' [&hellip;]' will be appended to the excerpt. If the string
- * is less than 55 words, then the content will be returned as is.
- *
- * The 55 word limit can be modified by plugins/themes using the {@see 'excerpt_length'} filter
- * The ' [&hellip;]' string can be modified by plugins/themes using the {@see 'excerpt_more'} filter
- *
- * @since 1.5.0
- *
- * @param string $text Optional. The excerpt. If set to empty, an excerpt is generated.
- * @return string The excerpt.
- */
-function wp_trim_excerpt( $text = '' ) {
-	$raw_excerpt = $text;
-	if ( '' == $text ) {
-		$text = get_the_content('');
-
-		$text = strip_shortcodes( $text );
-
-		/** This filter is documented in wp-includes/post-template.php */
-		$text = apply_filters( 'the_content', $text );
-		$text = str_replace(']]>', ']]&gt;', $text);
-
-		/**
-		 * Filters the number of words in an excerpt.
-		 *
-		 * @since 2.7.0
-		 *
-		 * @param int $number The number of words. Default 55.
-		 */
-		$excerpt_length = apply_filters( 'excerpt_length', 55 );
-		/**
-		 * Filters the string in the "more" link displayed after a trimmed excerpt.
-		 *
-		 * @since 2.9.0
-		 *
-		 * @param string $more_string The string shown within the more link.
-		 */
-		$excerpt_more = apply_filters( 'excerpt_more', ' ' . '[&hellip;]' );
-		$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );
-	}
-	/**
-	 * Filters the trimmed excerpt string.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param string $text        The trimmed text.
-	 * @param string $raw_excerpt The text prior to trimming.
-	 */
-	return apply_filters( 'wp_trim_excerpt', $text, $raw_excerpt );
-}
-
-/**
- * Trims text to a certain number of words.
- *
- * This function is localized. For languages that count 'words' by the individual
- * character (such as East Asian languages), the $num_words argument will apply
- * to the number of individual characters.
- *
- * @since 3.3.0
- *
- * @param string $text      Text to trim.
- * @param int    $num_words Number of words. Default 55.
- * @param string $more      Optional. What to append if $text needs to be trimmed. Default '&hellip;'.
- * @return string Trimmed text.
- */
-function wp_trim_words( $text, $num_words = 55, $more = null ) {
-	if ( null === $more ) {
-		$more = __( '&hellip;' );
-	}
-
-	$original_text = $text;
-	$text = wp_strip_all_tags( $text );
-
-	/*
-	 * translators: If your word count is based on single characters (e.g. East Asian characters),
-	 * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.
-	 * Do not translate into your own language.
-	 */
-	if ( strpos( _x( 'words', 'Word count type. Do not translate!' ), 'characters' ) === 0 && preg_match( '/^utf\-?8$/i', get_option( 'blog_charset' ) ) ) {
-		$text = trim( preg_replace( "/[\n\r\t ]+/", ' ', $text ), ' ' );
-		preg_match_all( '/./u', $text, $words_array );
-		$words_array = array_slice( $words_array[0], 0, $num_words + 1 );
-		$sep = '';
-	} else {
-		$words_array = preg_split( "/[\n\r\t ]+/", $text, $num_words + 1, PREG_SPLIT_NO_EMPTY );
-		$sep = ' ';
-	}
-
-	if ( count( $words_array ) > $num_words ) {
-		array_pop( $words_array );
-		$text = implode( $sep, $words_array );
-		$text = $text . $more;
-	} else {
-		$text = implode( $sep, $words_array );
-	}
-
-	/**
-	 * Filters the text content after words have been trimmed.
-	 *
-	 * @since 3.3.0
-	 *
-	 * @param string $text          The trimmed text.
-	 * @param int    $num_words     The number of words to trim the text to. Default 5.
-	 * @param string $more          An optional string to append to the end of the trimmed text, e.g. &hellip;.
-	 * @param string $original_text The text before it was trimmed.
-	 */
-	return apply_filters( 'wp_trim_words', $text, $num_words, $more, $original_text );
-}
-
-/**
- * Converts named entities into numbered entities.
- *
- * @since 1.5.1
- *
- * @param string $text The text within which entities will be converted.
- * @return string Text with converted entities.
- */
-function ent2ncr( $text ) {
-
-	/**
-	 * Filters text before named entities are converted into numbered entities.
-	 *
-	 * A non-null string must be returned for the filter to be evaluated.
-	 *
-	 * @since 3.3.0
-	 *
-	 * @param null   $converted_text The text to be converted. Default null.
-	 * @param string $text           The text prior to entity conversion.
-	 */
-	$filtered = apply_filters( 'pre_ent2ncr', null, $text );
-	if ( null !== $filtered )
-		return $filtered;
-
-	$to_ncr = array(
-		'&quot;' => '&#34;',
-		'&amp;' => '&#38;',
-		'&lt;' => '&#60;',
-		'&gt;' => '&#62;',
-		'|' => '&#124;',
-		'&nbsp;' => '&#160;',
-		'&iexcl;' => '&#161;',
-		'&cent;' => '&#162;',
-		'&pound;' => '&#163;',
-		'&curren;' => '&#164;',
-		'&yen;' => '&#165;',
-		'&brvbar;' => '&#166;',
-		'&brkbar;' => '&#166;',
-		'&sect;' => '&#167;',
-		'&uml;' => '&#168;',
-		'&die;' => '&#168;',
-		'&copy;' => '&#169;',
-		'&ordf;' => '&#170;',
-		'&laquo;' => '&#171;',
-		'&not;' => '&#172;',
-		'&shy;' => '&#173;',
-		'&reg;' => '&#174;',
-		'&macr;' => '&#175;',
-		'&hibar;' => '&#175;',
-		'&deg;' => '&#176;',
-		'&plusmn;' => '&#177;',
-		'&sup2;' => '&#178;',
-		'&sup3;' => '&#179;',
-		'&acute;' => '&#180;',
-		'&micro;' => '&#181;',
-		'&para;' => '&#182;',
-		'&middot;' => '&#183;',
-		'&cedil;' => '&#184;',
-		'&sup1;' => '&#185;',
-		'&ordm;' => '&#186;',
-		'&raquo;' => '&#187;',
-		'&frac14;' => '&#188;',
-		'&frac12;' => '&#189;',
-		'&frac34;' => '&#190;',
-		'&iquest;' => '&#191;',
-		'&Agrave;' => '&#192;',
-		'&Aacute;' => '&#193;',
-		'&Acirc;' => '&#194;',
-		'&Atilde;' => '&#195;',
-		'&Auml;' => '&#196;',
-		'&Aring;' => '&#197;',
-		'&AElig;' => '&#198;',
-		'&Ccedil;' => '&#199;',
-		'&Egrave;' => '&#200;',
-		'&Eacute;' => '&#201;',
-		'&Ecirc;' => '&#202;',
-		'&Euml;' => '&#203;',
-		'&Igrave;' => '&#204;',
-		'&Iacute;' => '&#205;',
-		'&Icirc;' => '&#206;',
-		'&Iuml;' => '&#207;',
-		'&ETH;' => '&#208;',
-		'&Ntilde;' => '&#209;',
-		'&Ograve;' => '&#210;',
-		'&Oacute;' => '&#211;',
-		'&Ocirc;' => '&#212;',
-		'&Otilde;' => '&#213;',
-		'&Ouml;' => '&#214;',
-		'&times;' => '&#215;',
-		'&Oslash;' => '&#216;',
-		'&Ugrave;' => '&#217;',
-		'&Uacute;' => '&#218;',
-		'&Ucirc;' => '&#219;',
-		'&Uuml;' => '&#220;',
-		'&Yacute;' => '&#221;',
-		'&THORN;' => '&#222;',
-		'&szlig;' => '&#223;',
-		'&agrave;' => '&#224;',
-		'&aacute;' => '&#225;',
-		'&acirc;' => '&#226;',
-		'&atilde;' => '&#227;',
-		'&auml;' => '&#228;',
-		'&aring;' => '&#229;',
-		'&aelig;' => '&#230;',
-		'&ccedil;' => '&#231;',
-		'&egrave;' => '&#232;',
-		'&eacute;' => '&#233;',
-		'&ecirc;' => '&#234;',
-		'&euml;' => '&#235;',
-		'&igrave;' => '&#236;',
-		'&iacute;' => '&#237;',
-		'&icirc;' => '&#238;',
-		'&iuml;' => '&#239;',
-		'&eth;' => '&#240;',
-		'&ntilde;' => '&#241;',
-		'&ograve;' => '&#242;',
-		'&oacute;' => '&#243;',
-		'&ocirc;' => '&#244;',
-		'&otilde;' => '&#245;',
-		'&ouml;' => '&#246;',
-		'&divide;' => '&#247;',
-		'&oslash;' => '&#248;',
-		'&ugrave;' => '&#249;',
-		'&uacute;' => '&#250;',
-		'&ucirc;' => '&#251;',
-		'&uuml;' => '&#252;',
-		'&yacute;' => '&#253;',
-		'&thorn;' => '&#254;',
-		'&yuml;' => '&#255;',
-		'&OElig;' => '&#338;',
-		'&oelig;' => '&#339;',
-		'&Scaron;' => '&#352;',
-		'&scaron;' => '&#353;',
-		'&Yuml;' => '&#376;',
-		'&fnof;' => '&#402;',
-		'&circ;' => '&#710;',
-		'&tilde;' => '&#732;',
-		'&Alpha;' => '&#913;',
-		'&Beta;' => '&#914;',
-		'&Gamma;' => '&#915;',
-		'&Delta;' => '&#916;',
-		'&Epsilon;' => '&#917;',
-		'&Zeta;' => '&#918;',
-		'&Eta;' => '&#919;',
-		'&Theta;' => '&#920;',
-		'&Iota;' => '&#921;',
-		'&Kappa;' => '&#922;',
-		'&Lambda;' => '&#923;',
-		'&Mu;' => '&#924;',
-		'&Nu;' => '&#925;',
-		'&Xi;' => '&#926;',
-		'&Omicron;' => '&#927;',
-		'&Pi;' => '&#928;',
-		'&Rho;' => '&#929;',
-		'&Sigma;' => '&#931;',
-		'&Tau;' => '&#932;',
-		'&Upsilon;' => '&#933;',
-		'&Phi;' => '&#934;',
-		'&Chi;' => '&#935;',
-		'&Psi;' => '&#936;',
-		'&Omega;' => '&#937;',
-		'&alpha;' => '&#945;',
-		'&beta;' => '&#946;',
-		'&gamma;' => '&#947;',
-		'&delta;' => '&#948;',
-		'&epsilon;' => '&#949;',
-		'&zeta;' => '&#950;',
-		'&eta;' => '&#951;',
-		'&theta;' => '&#952;',
-		'&iota;' => '&#953;',
-		'&kappa;' => '&#954;',
-		'&lambda;' => '&#955;',
-		'&mu;' => '&#956;',
-		'&nu;' => '&#957;',
-		'&xi;' => '&#958;',
-		'&omicron;' => '&#959;',
-		'&pi;' => '&#960;',
-		'&rho;' => '&#961;',
-		'&sigmaf;' => '&#962;',
-		'&sigma;' => '&#963;',
-		'&tau;' => '&#964;',
-		'&upsilon;' => '&#965;',
-		'&phi;' => '&#966;',
-		'&chi;' => '&#967;',
-		'&psi;' => '&#968;',
-		'&omega;' => '&#969;',
-		'&thetasym;' => '&#977;',
-		'&upsih;' => '&#978;',
-		'&piv;' => '&#982;',
-		'&ensp;' => '&#8194;',
-		'&emsp;' => '&#8195;',
-		'&thinsp;' => '&#8201;',
-		'&zwnj;' => '&#8204;',
-		'&zwj;' => '&#8205;',
-		'&lrm;' => '&#8206;',
-		'&rlm;' => '&#8207;',
-		'&ndash;' => '&#8211;',
-		'&mdash;' => '&#8212;',
-		'&lsquo;' => '&#8216;',
-		'&rsquo;' => '&#8217;',
-		'&sbquo;' => '&#8218;',
-		'&ldquo;' => '&#8220;',
-		'&rdquo;' => '&#8221;',
-		'&bdquo;' => '&#8222;',
-		'&dagger;' => '&#8224;',
-		'&Dagger;' => '&#8225;',
-		'&bull;' => '&#8226;',
-		'&hellip;' => '&#8230;',
-		'&permil;' => '&#8240;',
-		'&prime;' => '&#8242;',
-		'&Prime;' => '&#8243;',
-		'&lsaquo;' => '&#8249;',
-		'&rsaquo;' => '&#8250;',
-		'&oline;' => '&#8254;',
-		'&frasl;' => '&#8260;',
-		'&euro;' => '&#8364;',
-		'&image;' => '&#8465;',
-		'&weierp;' => '&#8472;',
-		'&real;' => '&#8476;',
-		'&trade;' => '&#8482;',
-		'&alefsym;' => '&#8501;',
-		'&crarr;' => '&#8629;',
-		'&lArr;' => '&#8656;',
-		'&uArr;' => '&#8657;',
-		'&rArr;' => '&#8658;',
-		'&dArr;' => '&#8659;',
-		'&hArr;' => '&#8660;',
-		'&forall;' => '&#8704;',
-		'&part;' => '&#8706;',
-		'&exist;' => '&#8707;',
-		'&empty;' => '&#8709;',
-		'&nabla;' => '&#8711;',
-		'&isin;' => '&#8712;',
-		'&notin;' => '&#8713;',
-		'&ni;' => '&#8715;',
-		'&prod;' => '&#8719;',
-		'&sum;' => '&#8721;',
-		'&minus;' => '&#8722;',
-		'&lowast;' => '&#8727;',
-		'&radic;' => '&#8730;',
-		'&prop;' => '&#8733;',
-		'&infin;' => '&#8734;',
-		'&ang;' => '&#8736;',
-		'&and;' => '&#8743;',
-		'&or;' => '&#8744;',
-		'&cap;' => '&#8745;',
-		'&cup;' => '&#8746;',
-		'&int;' => '&#8747;',
-		'&there4;' => '&#8756;',
-		'&sim;' => '&#8764;',
-		'&cong;' => '&#8773;',
-		'&asymp;' => '&#8776;',
-		'&ne;' => '&#8800;',
-		'&equiv;' => '&#8801;',
-		'&le;' => '&#8804;',
-		'&ge;' => '&#8805;',
-		'&sub;' => '&#8834;',
-		'&sup;' => '&#8835;',
-		'&nsub;' => '&#8836;',
-		'&sube;' => '&#8838;',
-		'&supe;' => '&#8839;',
-		'&oplus;' => '&#8853;',
-		'&otimes;' => '&#8855;',
-		'&perp;' => '&#8869;',
-		'&sdot;' => '&#8901;',
-		'&lceil;' => '&#8968;',
-		'&rceil;' => '&#8969;',
-		'&lfloor;' => '&#8970;',
-		'&rfloor;' => '&#8971;',
-		'&lang;' => '&#9001;',
-		'&rang;' => '&#9002;',
-		'&larr;' => '&#8592;',
-		'&uarr;' => '&#8593;',
-		'&rarr;' => '&#8594;',
-		'&darr;' => '&#8595;',
-		'&harr;' => '&#8596;',
-		'&loz;' => '&#9674;',
-		'&spades;' => '&#9824;',
-		'&clubs;' => '&#9827;',
-		'&hearts;' => '&#9829;',
-		'&diams;' => '&#9830;'
-	);
-
-	return str_replace( array_keys($to_ncr), array_values($to_ncr), $text );
-}
-
-/**
- * Formats text for the editor.
- *
- * Generally the browsers treat everything inside a textarea as text, but
- * it is still a good idea to HTML entity encode `<`, `>` and `&` in the content.
- *
- * The filter {@see 'format_for_editor'} is applied here. If `$text` is empty the
- * filter will be applied to an empty string.
- *
- * @since 4.3.0
- *
- * @see _WP_Editors::editor()
- *
- * @param string $text           The text to be formatted.
- * @param string $default_editor The default editor for the current user.
- *                               It is usually either 'html' or 'tinymce'.
- * @return string The formatted text after filter is applied.
- */
-function format_for_editor( $text, $default_editor = null ) {
-	if ( $text ) {
-		$text = htmlspecialchars( $text, ENT_NOQUOTES, get_option( 'blog_charset' ) );
-	}
-
-	/**
-	 * Filters the text after it is formatted for the editor.
-	 *
-	 * @since 4.3.0
-	 *
-	 * @param string $text           The formatted text.
-	 * @param string $default_editor The default editor for the current user.
-	 *                               It is usually either 'html' or 'tinymce'.
-	 */
-	return apply_filters( 'format_for_editor', $text, $default_editor );
-}
-
-/**
- * Perform a deep string replace operation to ensure the values in $search are no longer present
- *
- * Repeats the replacement operation until it no longer replaces anything so as to remove "nested" values
- * e.g. $subject = '%0%0%0DDD', $search ='%0D', $result ='' rather than the '%0%0DD' that
- * str_replace would return
- *
- * @since 2.8.1
- * @access private
- *
- * @param string|array $search  The value being searched for, otherwise known as the needle.
- *                              An array may be used to designate multiple needles.
- * @param string       $subject The string being searched and replaced on, otherwise known as the haystack.
- * @return string The string with the replaced svalues.
- */
-function _deep_replace( $search, $subject ) {
-	$subject = (string) $subject;
-
-	$count = 1;
-	while ( $count ) {
-		$subject = str_replace( $search, '', $subject, $count );
-	}
-
-	return $subject;
-}
-
-/**
- * Escapes data for use in a MySQL query.
- *
- * Usually you should prepare queries using wpdb::prepare().
- * Sometimes, spot-escaping is required or useful. One example
- * is preparing an array for use in an IN clause.
- *
- * @since 2.8.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string|array $data Unescaped data
- * @return string|array Escaped data
- */
-function esc_sql( $data ) {
-	global $wpdb;
-	return $wpdb->_escape( $data );
-}
-
-/**
- * Checks and cleans a URL.
- *
- * A number of characters are removed from the URL. If the URL is for displaying
- * (the default behaviour) ampersands are also replaced. The {@see 'clean_url'} filter
- * is applied to the returned cleaned URL.
- *
- * @since 2.8.0
- *
- * @param string $url       The URL to be cleaned.
- * @param array  $protocols Optional. An array of acceptable protocols.
- *		                    Defaults to return value of wp_allowed_protocols()
- * @param string $_context  Private. Use esc_url_raw() for database usage.
- * @return string The cleaned $url after the {@see 'clean_url'} filter is applied.
- */
-function esc_url( $url, $protocols = null, $_context = 'display' ) {
-	$original_url = $url;
-
-	if ( '' == $url )
-		return $url;
-
-	$url = str_replace( ' ', '%20', $url );
-	$url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\[\]\\x80-\\xff]|i', '', $url);
-
-	if ( '' === $url ) {
-		return $url;
-	}
-
-	if ( 0 !== stripos( $url, 'mailto:' ) ) {
-		$strip = array('%0d', '%0a', '%0D', '%0A');
-		$url = _deep_replace($strip, $url);
-	}
-
-	$url = str_replace(';//', '://', $url);
-	/* If the URL doesn't appear to contain a scheme, we
-	 * presume it needs http:// prepended (unless a relative
-	 * link starting with /, # or ? or a php file).
-	 */
-	if ( strpos($url, ':') === false && ! in_array( $url[0], array( '/', '#', '?' ) ) &&
-		! preg_match('/^[a-z0-9-]+?\.php/i', $url) )
-		$url = 'http://' . $url;
-
-	// Replace ampersands and single quotes only when displaying.
-	if ( 'display' == $_context ) {
-		$url = wp_kses_normalize_entities( $url );
-		$url = str_replace( '&amp;', '&#038;', $url );
-		$url = str_replace( "'", '&#039;', $url );
-	}
-
-	if ( ( false !== strpos( $url, '[' ) ) || ( false !== strpos( $url, ']' ) ) ) {
-
-		$parsed = wp_parse_url( $url );
-		$front  = '';
-
-		if ( isset( $parsed['scheme'] ) ) {
-			$front .= $parsed['scheme'] . '://';
-		} elseif ( '/' === $url[0] ) {
-			$front .= '//';
-		}
-
-		if ( isset( $parsed['user'] ) ) {
-			$front .= $parsed['user'];
-		}
-
-		if ( isset( $parsed['pass'] ) ) {
-			$front .= ':' . $parsed['pass'];
-		}
-
-		if ( isset( $parsed['user'] ) || isset( $parsed['pass'] ) ) {
-			$front .= '@';
-		}
-
-		if ( isset( $parsed['host'] ) ) {
-			$front .= $parsed['host'];
-		}
-
-		if ( isset( $parsed['port'] ) ) {
-			$front .= ':' . $parsed['port'];
-		}
-
-		$end_dirty = str_replace( $front, '', $url );
-		$end_clean = str_replace( array( '[', ']' ), array( '%5B', '%5D' ), $end_dirty );
-		$url       = str_replace( $end_dirty, $end_clean, $url );
-
-	}
-
-	if ( '/' === $url[0] ) {
-		$good_protocol_url = $url;
-	} else {
-		if ( ! is_array( $protocols ) )
-			$protocols = wp_allowed_protocols();
-		$good_protocol_url = wp_kses_bad_protocol( $url, $protocols );
-		if ( strtolower( $good_protocol_url ) != strtolower( $url ) )
-			return '';
-	}
-
-	/**
-	 * Filters a string cleaned and escaped for output as a URL.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param string $good_protocol_url The cleaned URL to be returned.
-	 * @param string $original_url      The URL prior to cleaning.
-	 * @param string $_context          If 'display', replace ampersands and single quotes only.
-	 */
-	return apply_filters( 'clean_url', $good_protocol_url, $original_url, $_context );
-}
-
-/**
- * Performs esc_url() for database usage.
- *
- * @since 2.8.0
- *
- * @param string $url       The URL to be cleaned.
- * @param array  $protocols An array of acceptable protocols.
- * @return string The cleaned URL.
- */
-function esc_url_raw( $url, $protocols = null ) {
-	return esc_url( $url, $protocols, 'db' );
-}
-
-/**
- * Convert entities, while preserving already-encoded entities.
- *
- * @link https://secure.php.net/htmlentities Borrowed from the PHP Manual user notes.
- *
- * @since 1.2.2
- *
- * @param string $myHTML The text to be converted.
- * @return string Converted text.
- */
-function htmlentities2( $myHTML ) {
-	$translation_table = get_html_translation_table( HTML_ENTITIES, ENT_QUOTES );
-	$translation_table[chr(38)] = '&';
-	return preg_replace( "/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/", "&amp;", strtr($myHTML, $translation_table) );
-}
-
-/**
- * Escape single quotes, htmlspecialchar " < > &, and fix line endings.
- *
- * Escapes text strings for echoing in JS. It is intended to be used for inline JS
- * (in a tag attribute, for example onclick="..."). Note that the strings have to
- * be in single quotes. The {@see 'js_escape'} filter is also applied here.
- *
- * @since 2.8.0
- *
- * @param string $text The text to be escaped.
- * @return string Escaped text.
- */
-function esc_js( $text ) {
-	$safe_text = wp_check_invalid_utf8( $text );
-	$safe_text = _wp_specialchars( $safe_text, ENT_COMPAT );
-	$safe_text = preg_replace( '/&#(x)?0*(?(1)27|39);?/i', "'", stripslashes( $safe_text ) );
-	$safe_text = str_replace( "\r", '', $safe_text );
-	$safe_text = str_replace( "\n", '\\n', addslashes( $safe_text ) );
-	/**
-	 * Filters a string cleaned and escaped for output in JavaScript.
-	 *
-	 * Text passed to esc_js() is stripped of invalid or special characters,
-	 * and properly slashed for output.
-	 *
-	 * @since 2.0.6
-	 *
-	 * @param string $safe_text The text after it has been escaped.
- 	 * @param string $text      The text prior to being escaped.
-	 */
-	return apply_filters( 'js_escape', $safe_text, $text );
-}
-
-/**
- * Escaping for HTML blocks.
- *
- * @since 2.8.0
- *
- * @param string $text
- * @return string
- */
-function esc_html( $text ) {
-	$safe_text = wp_check_invalid_utf8( $text );
-	$safe_text = _wp_specialchars( $safe_text, ENT_QUOTES );
-	/**
-	 * Filters a string cleaned and escaped for output in HTML.
-	 *
-	 * Text passed to esc_html() is stripped of invalid or special characters
-	 * before output.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param string $safe_text The text after it has been escaped.
- 	 * @param string $text      The text prior to being escaped.
-	 */
-	return apply_filters( 'esc_html', $safe_text, $text );
-}
-
-/**
- * Escaping for HTML attributes.
- *
- * @since 2.8.0
- *
- * @param string $text
- * @return string
- */
-function esc_attr( $text ) {
-	$safe_text = wp_check_invalid_utf8( $text );
-	$safe_text = _wp_specialchars( $safe_text, ENT_QUOTES );
-	/**
-	 * Filters a string cleaned and escaped for output in an HTML attribute.
-	 *
-	 * Text passed to esc_attr() is stripped of invalid or special characters
-	 * before output.
-	 *
-	 * @since 2.0.6
-	 *
-	 * @param string $safe_text The text after it has been escaped.
- 	 * @param string $text      The text prior to being escaped.
-	 */
-	return apply_filters( 'attribute_escape', $safe_text, $text );
-}
-
-/**
- * Escaping for textarea values.
- *
- * @since 3.1.0
- *
- * @param string $text
- * @return string
- */
-function esc_textarea( $text ) {
-	$safe_text = htmlspecialchars( $text, ENT_QUOTES, get_option( 'blog_charset' ) );
-	/**
-	 * Filters a string cleaned and escaped for output in a textarea element.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param string $safe_text The text after it has been escaped.
- 	 * @param string $text      The text prior to being escaped.
-	 */
-	return apply_filters( 'esc_textarea', $safe_text, $text );
-}
-
-/**
- * Escape an HTML tag name.
- *
- * @since 2.5.0
- *
- * @param string $tag_name
- * @return string
- */
-function tag_escape( $tag_name ) {
-	$safe_tag = strtolower( preg_replace('/[^a-zA-Z0-9_:]/', '', $tag_name) );
-	/**
-	 * Filters a string cleaned and escaped for output as an HTML tag.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param string $safe_tag The tag name after it has been escaped.
- 	 * @param string $tag_name The text before it was escaped.
-	 */
-	return apply_filters( 'tag_escape', $safe_tag, $tag_name );
-}
-
-/**
- * Convert full URL paths to absolute paths.
- *
- * Removes the http or https protocols and the domain. Keeps the path '/' at the
- * beginning, so it isn't a true relative link, but from the web root base.
- *
- * @since 2.1.0
- * @since 4.1.0 Support was added for relative URLs.
- *
- * @param string $link Full URL path.
- * @return string Absolute path.
- */
-function wp_make_link_relative( $link ) {
-	return preg_replace( '|^(https?:)?//[^/]+(/?.*)|i', '$2', $link );
-}
-
-/**
- * Sanitises various option values based on the nature of the option.
- *
- * This is basically a switch statement which will pass $value through a number
- * of functions depending on the $option.
- *
- * @since 2.0.5
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $option The name of the option.
- * @param string $value  The unsanitised value.
- * @return string Sanitized value.
- */
-function sanitize_option( $option, $value ) {
-	global $wpdb;
-
-	$original_value = $value;
-	$error = '';
-
-	switch ( $option ) {
-		case 'admin_email' :
-		case 'new_admin_email' :
-			$value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
-			if ( is_wp_error( $value ) ) {
-				$error = $value->get_error_message();
-			} else {
-				$value = sanitize_email( $value );
-				if ( ! is_email( $value ) ) {
-					$error = __( 'The email address entered did not appear to be a valid email address. Please enter a valid email address.' );
-				}
-			}
-			break;
-
-		case 'thumbnail_size_w':
-		case 'thumbnail_size_h':
-		case 'medium_size_w':
-		case 'medium_size_h':
-		case 'medium_large_size_w':
-		case 'medium_large_size_h':
-		case 'large_size_w':
-		case 'large_size_h':
-		case 'mailserver_port':
-		case 'comment_max_links':
-		case 'page_on_front':
-		case 'page_for_posts':
-		case 'rss_excerpt_length':
-		case 'default_category':
-		case 'default_email_category':
-		case 'default_link_category':
-		case 'close_comments_days_old':
-		case 'comments_per_page':
-		case 'thread_comments_depth':
-		case 'users_can_register':
-		case 'start_of_week':
-		case 'site_icon':
-			$value = absint( $value );
-			break;
-
-		case 'posts_per_page':
-		case 'posts_per_rss':
-			$value = (int) $value;
-			if ( empty($value) )
-				$value = 1;
-			if ( $value < -1 )
-				$value = abs($value);
-			break;
-
-		case 'default_ping_status':
-		case 'default_comment_status':
-			// Options that if not there have 0 value but need to be something like "closed"
-			if ( $value == '0' || $value == '')
-				$value = 'closed';
-			break;
-
-		case 'blogdescription':
-		case 'blogname':
-			$value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
-			if ( $value !== $original_value ) {
-				$value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', wp_encode_emoji( $original_value ) );
-			}
-
-			if ( is_wp_error( $value ) ) {
-				$error = $value->get_error_message();
-			} else {
-				$value = esc_html( $value );
-			}
-			break;
-
-		case 'blog_charset':
-			$value = preg_replace('/[^a-zA-Z0-9_-]/', '', $value); // strips slashes
-			break;
-
-		case 'blog_public':
-			// This is the value if the settings checkbox is not checked on POST. Don't rely on this.
-			if ( null === $value )
-				$value = 1;
-			else
-				$value = intval( $value );
-			break;
-
-		case 'date_format':
-		case 'time_format':
-		case 'mailserver_url':
-		case 'mailserver_login':
-		case 'mailserver_pass':
-		case 'upload_path':
-			$value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
-			if ( is_wp_error( $value ) ) {
-				$error = $value->get_error_message();
-			} else {
-				$value = strip_tags( $value );
-				$value = wp_kses_data( $value );
-			}
-			break;
-
-		case 'ping_sites':
-			$value = explode( "\n", $value );
-			$value = array_filter( array_map( 'trim', $value ) );
-			$value = array_filter( array_map( 'esc_url_raw', $value ) );
-			$value = implode( "\n", $value );
-			break;
-
-		case 'gmt_offset':
-			$value = preg_replace('/[^0-9:.-]/', '', $value); // strips slashes
-			break;
-
-		case 'siteurl':
-			$value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
-			if ( is_wp_error( $value ) ) {
-				$error = $value->get_error_message();
-			} else {
-				if ( preg_match( '#http(s?)://(.+)#i', $value ) ) {
-					$value = esc_url_raw( $value );
-				} else {
-					$error = __( 'The WordPress address you entered did not appear to be a valid URL. Please enter a valid URL.' );
-				}
-			}
-			break;
-
-		case 'home':
-			$value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
-			if ( is_wp_error( $value ) ) {
-				$error = $value->get_error_message();
-			} else {
-				if ( preg_match( '#http(s?)://(.+)#i', $value ) ) {
-					$value = esc_url_raw( $value );
-				} else {
-					$error = __( 'The Site address you entered did not appear to be a valid URL. Please enter a valid URL.' );
-				}
-			}
-			break;
-
-		case 'WPLANG':
-			$allowed = get_available_languages();
-			if ( ! is_multisite() && defined( 'WPLANG' ) && '' !== WPLANG && 'en_US' !== WPLANG ) {
-				$allowed[] = WPLANG;
-			}
-			if ( ! in_array( $value, $allowed ) && ! empty( $value ) ) {
-				$value = get_option( $option );
-			}
-			break;
-
-		case 'illegal_names':
-			$value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
-			if ( is_wp_error( $value ) ) {
-				$error = $value->get_error_message();
-			} else {
-				if ( ! is_array( $value ) )
-					$value = explode( ' ', $value );
-
-				$value = array_values( array_filter( array_map( 'trim', $value ) ) );
-
-				if ( ! $value )
-					$value = '';
-			}
-			break;
-
-		case 'limited_email_domains':
-		case 'banned_email_domains':
-			$value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
-			if ( is_wp_error( $value ) ) {
-				$error = $value->get_error_message();
-			} else {
-				if ( ! is_array( $value ) )
-					$value = explode( "\n", $value );
-
-				$domains = array_values( array_filter( array_map( 'trim', $value ) ) );
-				$value = array();
-
-				foreach ( $domains as $domain ) {
-					if ( ! preg_match( '/(--|\.\.)/', $domain ) && preg_match( '|^([a-zA-Z0-9-\.])+$|', $domain ) ) {
-						$value[] = $domain;
-					}
-				}
-				if ( ! $value )
-					$value = '';
-			}
-			break;
-
-		case 'timezone_string':
-			$allowed_zones = timezone_identifiers_list();
-			if ( ! in_array( $value, $allowed_zones ) && ! empty( $value ) ) {
-				$error = __( 'The timezone you have entered is not valid. Please select a valid timezone.' );
-			}
-			break;
-
-		case 'permalink_structure':
-		case 'category_base':
-		case 'tag_base':
-			$value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
-			if ( is_wp_error( $value ) ) {
-				$error = $value->get_error_message();
-			} else {
-				$value = esc_url_raw( $value );
-				$value = str_replace( 'http://', '', $value );
-			}
-
-			if ( 'permalink_structure' === $option && '' !== $value && ! preg_match( '/%[^\/%]+%/', $value ) ) {
-				$error = sprintf(
-					/* translators: %s: Codex URL */
-					__( 'A structure tag is required when using custom permalinks. <a href="%s">Learn more</a>' ),
-					__( 'https://codex.wordpress.org/Using_Permalinks#Choosing_your_permalink_structure' )
-				);
-			}
-			break;
-
-		case 'default_role' :
-			if ( ! get_role( $value ) && get_role( 'subscriber' ) )
-				$value = 'subscriber';
-			break;
-
-		case 'moderation_keys':
-		case 'blacklist_keys':
-			$value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
-			if ( is_wp_error( $value ) ) {
-				$error = $value->get_error_message();
-			} else {
-				$value = explode( "\n", $value );
-				$value = array_filter( array_map( 'trim', $value ) );
-				$value = array_unique( $value );
-				$value = implode( "\n", $value );
-			}
-			break;
-	}
-
-	if ( ! empty( $error ) ) {
-		$value = get_option( $option );
-		if ( function_exists( 'add_settings_error' ) ) {
-			add_settings_error( $option, "invalid_{$option}", $error );
-		}
-	}
-
-	/**
-	 * Filters an option value following sanitization.
-	 *
-	 * @since 2.3.0
-	 * @since 4.3.0 Added the `$original_value` parameter.
-	 *
-	 * @param string $value          The sanitized option value.
-	 * @param string $option         The option name.
-	 * @param string $original_value The original value passed to the function.
-	 */
-	return apply_filters( "sanitize_option_{$option}", $value, $option, $original_value );
-}
-
-/**
- * Maps a function to all non-iterable elements of an array or an object.
- *
- * This is similar to `array_walk_recursive()` but acts upon objects too.
- *
- * @since 4.4.0
- *
- * @param mixed    $value    The array, object, or scalar.
- * @param callable $callback The function to map onto $value.
- * @return mixed The value with the callback applied to all non-arrays and non-objects inside it.
- */
-function map_deep( $value, $callback ) {
-	if ( is_array( $value ) ) {
-		foreach ( $value as $index => $item ) {
-			$value[ $index ] = map_deep( $item, $callback );
-		}
-	} elseif ( is_object( $value ) ) {
-		$object_vars = get_object_vars( $value );
-		foreach ( $object_vars as $property_name => $property_value ) {
-			$value->$property_name = map_deep( $property_value, $callback );
-		}
-	} else {
-		$value = call_user_func( $callback, $value );
-	}
-
-	return $value;
-}
-
-/**
- * Parses a string into variables to be stored in an array.
- *
- * Uses {@link https://secure.php.net/parse_str parse_str()} and stripslashes if
- * {@link https://secure.php.net/magic_quotes magic_quotes_gpc} is on.
- *
- * @since 2.2.1
- *
- * @param string $string The string to be parsed.
- * @param array  $array  Variables will be stored in this array.
- */
-function wp_parse_str( $string, &$array ) {
-	parse_str( $string, $array );
-	if ( get_magic_quotes_gpc() )
-		$array = stripslashes_deep( $array );
-	/**
-	 * Filters the array of variables derived from a parsed string.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param array $array The array populated with variables.
-	 */
-	$array = apply_filters( 'wp_parse_str', $array );
-}
-
-/**
- * Convert lone less than signs.
- *
- * KSES already converts lone greater than signs.
- *
- * @since 2.3.0
- *
- * @param string $text Text to be converted.
- * @return string Converted text.
- */
-function wp_pre_kses_less_than( $text ) {
-	return preg_replace_callback('%<[^>]*?((?=<)|>|$)%', 'wp_pre_kses_less_than_callback', $text);
-}
-
-/**
- * Callback function used by preg_replace.
- *
- * @since 2.3.0
- *
- * @param array $matches Populated by matches to preg_replace.
- * @return string The text returned after esc_html if needed.
- */
-function wp_pre_kses_less_than_callback( $matches ) {
-	if ( false === strpos($matches[0], '>') )
-		return esc_html($matches[0]);
-	return $matches[0];
-}
-
-/**
- * WordPress implementation of PHP sprintf() with filters.
- *
- * @since 2.5.0
- * @link https://secure.php.net/sprintf
- *
- * @param string $pattern   The string which formatted args are inserted.
- * @param mixed  $args ,... Arguments to be formatted into the $pattern string.
- * @return string The formatted string.
- */
-function wp_sprintf( $pattern ) {
-	$args = func_get_args();
-	$len = strlen($pattern);
-	$start = 0;
-	$result = '';
-	$arg_index = 0;
-	while ( $len > $start ) {
-		// Last character: append and break
-		if ( strlen($pattern) - 1 == $start ) {
-			$result .= substr($pattern, -1);
-			break;
-		}
-
-		// Literal %: append and continue
-		if ( substr($pattern, $start, 2) == '%%' ) {
-			$start += 2;
-			$result .= '%';
-			continue;
-		}
-
-		// Get fragment before next %
-		$end = strpos($pattern, '%', $start + 1);
-		if ( false === $end )
-			$end = $len;
-		$fragment = substr($pattern, $start, $end - $start);
-
-		// Fragment has a specifier
-		if ( $pattern[$start] == '%' ) {
-			// Find numbered arguments or take the next one in order
-			if ( preg_match('/^%(\d+)\$/', $fragment, $matches) ) {
-				$arg = isset($args[$matches[1]]) ? $args[$matches[1]] : '';
-				$fragment = str_replace("%{$matches[1]}$", '%', $fragment);
-			} else {
-				++$arg_index;
-				$arg = isset($args[$arg_index]) ? $args[$arg_index] : '';
-			}
-
-			/**
-			 * Filters a fragment from the pattern passed to wp_sprintf().
-			 *
-			 * If the fragment is unchanged, then sprintf() will be run on the fragment.
-			 *
-			 * @since 2.5.0
-			 *
-			 * @param string $fragment A fragment from the pattern.
-			 * @param string $arg      The argument.
-			 */
-			$_fragment = apply_filters( 'wp_sprintf', $fragment, $arg );
-			if ( $_fragment != $fragment )
-				$fragment = $_fragment;
-			else
-				$fragment = sprintf($fragment, strval($arg) );
-		}
-
-		// Append to result and move to next fragment
-		$result .= $fragment;
-		$start = $end;
-	}
-	return $result;
-}
-
-/**
- * Localize list items before the rest of the content.
- *
- * The '%l' must be at the first characters can then contain the rest of the
- * content. The list items will have ', ', ', and', and ' and ' added depending
- * on the amount of list items in the $args parameter.
- *
- * @since 2.5.0
- *
- * @param string $pattern Content containing '%l' at the beginning.
- * @param array  $args    List items to prepend to the content and replace '%l'.
- * @return string Localized list items and rest of the content.
- */
-function wp_sprintf_l( $pattern, $args ) {
-	// Not a match
-	if ( substr($pattern, 0, 2) != '%l' )
-		return $pattern;
-
-	// Nothing to work with
-	if ( empty($args) )
-		return '';
-
-	/**
-	 * Filters the translated delimiters used by wp_sprintf_l().
-	 * Placeholders (%s) are included to assist translators and then
-	 * removed before the array of strings reaches the filter.
-	 *
-	 * Please note: Ampersands and entities should be avoided here.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param array $delimiters An array of translated delimiters.
-	 */
-	$l = apply_filters( 'wp_sprintf_l', array(
-		/* translators: used to join items in a list with more than 2 items */
-		'between'          => sprintf( __('%s, %s'), '', '' ),
-		/* translators: used to join last two items in a list with more than 2 times */
-		'between_last_two' => sprintf( __('%s, and %s'), '', '' ),
-		/* translators: used to join items in a list with only 2 items */
-		'between_only_two' => sprintf( __('%s and %s'), '', '' ),
-	) );
-
-	$args = (array) $args;
-	$result = array_shift($args);
-	if ( count($args) == 1 )
-		$result .= $l['between_only_two'] . array_shift($args);
-	// Loop when more than two args
-	$i = count($args);
-	while ( $i ) {
-		$arg = array_shift($args);
-		$i--;
-		if ( 0 == $i )
-			$result .= $l['between_last_two'] . $arg;
-		else
-			$result .= $l['between'] . $arg;
-	}
-	return $result . substr($pattern, 2);
-}
-
-/**
- * Safely extracts not more than the first $count characters from html string.
- *
- * UTF-8, tags and entities safe prefix extraction. Entities inside will *NOT*
- * be counted as one character. For example &amp; will be counted as 4, &lt; as
- * 3, etc.
- *
- * @since 2.5.0
- *
- * @param string $str   String to get the excerpt from.
- * @param int    $count Maximum number of characters to take.
- * @param string $more  Optional. What to append if $str needs to be trimmed. Defaults to empty string.
- * @return string The excerpt.
- */
-function wp_html_excerpt( $str, $count, $more = null ) {
-	if ( null === $more )
-		$more = '';
-	$str = wp_strip_all_tags( $str, true );
-	$excerpt = mb_substr( $str, 0, $count );
-	// remove part of an entity at the end
-	$excerpt = preg_replace( '/&[^;\s]{0,6}$/', '', $excerpt );
-	if ( $str != $excerpt )
-		$excerpt = trim( $excerpt ) . $more;
-	return $excerpt;
-}
-
-/**
- * Add a Base url to relative links in passed content.
- *
- * By default it supports the 'src' and 'href' attributes. However this can be
- * changed via the 3rd param.
- *
- * @since 2.7.0
- *
- * @global string $_links_add_base
- *
- * @param string $content String to search for links in.
- * @param string $base    The base URL to prefix to links.
- * @param array  $attrs   The attributes which should be processed.
- * @return string The processed content.
- */
-function links_add_base_url( $content, $base, $attrs = array('src', 'href') ) {
-	global $_links_add_base;
-	$_links_add_base = $base;
-	$attrs = implode('|', (array)$attrs);
-	return preg_replace_callback( "!($attrs)=(['\"])(.+?)\\2!i", '_links_add_base', $content );
-}
-
-/**
- * Callback to add a base url to relative links in passed content.
- *
- * @since 2.7.0
- * @access private
- *
- * @global string $_links_add_base
- *
- * @param string $m The matched link.
- * @return string The processed link.
- */
-function _links_add_base( $m ) {
-	global $_links_add_base;
-	//1 = attribute name  2 = quotation mark  3 = URL
-	return $m[1] . '=' . $m[2] .
-		( preg_match( '#^(\w{1,20}):#', $m[3], $protocol ) && in_array( $protocol[1], wp_allowed_protocols() ) ?
-			$m[3] :
-			WP_Http::make_absolute_url( $m[3], $_links_add_base )
-		)
-		. $m[2];
-}
-
-/**
- * Adds a Target attribute to all links in passed content.
- *
- * This function by default only applies to `<a>` tags, however this can be
- * modified by the 3rd param.
- *
- * *NOTE:* Any current target attributed will be stripped and replaced.
- *
- * @since 2.7.0
- *
- * @global string $_links_add_target
- *
- * @param string $content String to search for links in.
- * @param string $target  The Target to add to the links.
- * @param array  $tags    An array of tags to apply to.
- * @return string The processed content.
- */
-function links_add_target( $content, $target = '_blank', $tags = array('a') ) {
-	global $_links_add_target;
-	$_links_add_target = $target;
-	$tags = implode('|', (array)$tags);
-	return preg_replace_callback( "!<($tags)([^>]*)>!i", '_links_add_target', $content );
-}
-
-/**
- * Callback to add a target attribute to all links in passed content.
- *
- * @since 2.7.0
- * @access private
- *
- * @global string $_links_add_target
- *
- * @param string $m The matched link.
- * @return string The processed link.
- */
-function _links_add_target( $m ) {
-	global $_links_add_target;
-	$tag = $m[1];
-	$link = preg_replace('|( target=([\'"])(.*?)\2)|i', '', $m[2]);
-	return '<' . $tag . $link . ' target="' . esc_attr( $_links_add_target ) . '">';
-}
-
-/**
- * Normalize EOL characters and strip duplicate whitespace.
- *
- * @since 2.7.0
- *
- * @param string $str The string to normalize.
- * @return string The normalized string.
- */
-function normalize_whitespace( $str ) {
-	$str  = trim( $str );
-	$str  = str_replace( "\r", "\n", $str );
-	$str  = preg_replace( array( '/\n+/', '/[ \t]+/' ), array( "\n", ' ' ), $str );
-	return $str;
-}
-
-/**
- * Properly strip all HTML tags including script and style
- *
- * This differs from strip_tags() because it removes the contents of
- * the `<script>` and `<style>` tags. E.g. `strip_tags( '<script>something</script>' )`
- * will return 'something'. wp_strip_all_tags will return ''
- *
- * @since 2.9.0
- *
- * @param string $string        String containing HTML tags
- * @param bool   $remove_breaks Optional. Whether to remove left over line breaks and white space chars
- * @return string The processed string.
- */
-function wp_strip_all_tags($string, $remove_breaks = false) {
-	$string = preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $string );
-	$string = strip_tags($string);
-
-	if ( $remove_breaks )
-		$string = preg_replace('/[\r\n\t ]+/', ' ', $string);
-
-	return trim( $string );
-}
-
-/**
- * Sanitizes a string from user input or from the database.
- *
- * - Checks for invalid UTF-8,
- * - Converts single `<` characters to entities
- * - Strips all tags
- * - Removes line breaks, tabs, and extra whitespace
- * - Strips octets
- *
- * @since 2.9.0
- *
- * @see wp_check_invalid_utf8()
- * @see wp_strip_all_tags()
- *
- * @param string $str String to sanitize.
- * @return string Sanitized string.
- */
-function sanitize_text_field( $str ) {
-	$filtered = wp_check_invalid_utf8( $str );
-
-	if ( strpos($filtered, '<') !== false ) {
-		$filtered = wp_pre_kses_less_than( $filtered );
-		// This will strip extra whitespace for us.
-		$filtered = wp_strip_all_tags( $filtered, true );
-	} else {
-		$filtered = trim( preg_replace('/[\r\n\t ]+/', ' ', $filtered) );
-	}
-
-	$found = false;
-	while ( preg_match('/%[a-f0-9]{2}/i', $filtered, $match) ) {
-		$filtered = str_replace($match[0], '', $filtered);
-		$found = true;
-	}
-
-	if ( $found ) {
-		// Strip out the whitespace that may now exist after removing the octets.
-		$filtered = trim( preg_replace('/ +/', ' ', $filtered) );
-	}
-
-	/**
-	 * Filters a sanitized text field string.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param string $filtered The sanitized string.
-	 * @param string $str      The string prior to being sanitized.
-	 */
-	return apply_filters( 'sanitize_text_field', $filtered, $str );
-}
-
-/**
- * i18n friendly version of basename()
- *
- * @since 3.1.0
- *
- * @param string $path   A path.
- * @param string $suffix If the filename ends in suffix this will also be cut off.
- * @return string
- */
-function wp_basename( $path, $suffix = '' ) {
-	return urldecode( basename( str_replace( array( '%2F', '%5C' ), '/', urlencode( $path ) ), $suffix ) );
-}
-
-/**
- * Forever eliminate "Wordpress" from the planet (or at least the little bit we can influence).
- *
- * Violating our coding standards for a good function name.
- *
- * @since 3.0.0
- *
- * @staticvar string|false $dblq
- *
- * @param string $text The text to be modified.
- * @return string The modified text.
- */
-function capital_P_dangit( $text ) {
-	// Simple replacement for titles
-	$current_filter = current_filter();
-	if ( 'the_title' === $current_filter || 'wp_title' === $current_filter )
-		return str_replace( 'Wordpress', 'WordPress', $text );
-	// Still here? Use the more judicious replacement
-	static $dblq = false;
-	if ( false === $dblq ) {
-		$dblq = _x( '&#8220;', 'opening curly double quote' );
-	}
-	return str_replace(
-		array( ' Wordpress', '&#8216;Wordpress', $dblq . 'Wordpress', '>Wordpress', '(Wordpress' ),
-		array( ' WordPress', '&#8216;WordPress', $dblq . 'WordPress', '>WordPress', '(WordPress' ),
-	$text );
-}
-
-/**
- * Sanitize a mime type
- *
- * @since 3.1.3
- *
- * @param string $mime_type Mime type
- * @return string Sanitized mime type
- */
-function sanitize_mime_type( $mime_type ) {
-	$sani_mime_type = preg_replace( '/[^-+*.a-zA-Z0-9\/]/', '', $mime_type );
-	/**
-	 * Filters a mime type following sanitization.
-	 *
-	 * @since 3.1.3
-	 *
-	 * @param string $sani_mime_type The sanitized mime type.
-	 * @param string $mime_type      The mime type prior to sanitization.
-	 */
-	return apply_filters( 'sanitize_mime_type', $sani_mime_type, $mime_type );
-}
-
-/**
- * Sanitize space or carriage return separated URLs that are used to send trackbacks.
- *
- * @since 3.4.0
- *
- * @param string $to_ping Space or carriage return separated URLs
- * @return string URLs starting with the http or https protocol, separated by a carriage return.
- */
-function sanitize_trackback_urls( $to_ping ) {
-	$urls_to_ping = preg_split( '/[\r\n\t ]/', trim( $to_ping ), -1, PREG_SPLIT_NO_EMPTY );
-	foreach ( $urls_to_ping as $k => $url ) {
-		if ( !preg_match( '#^https?://.#i', $url ) )
-			unset( $urls_to_ping[$k] );
-	}
-	$urls_to_ping = array_map( 'esc_url_raw', $urls_to_ping );
-	$urls_to_ping = implode( "\n", $urls_to_ping );
-	/**
-	 * Filters a list of trackback URLs following sanitization.
-	 *
-	 * The string returned here consists of a space or carriage return-delimited list
-	 * of trackback URLs.
-	 *
-	 * @since 3.4.0
-	 *
-	 * @param string $urls_to_ping Sanitized space or carriage return separated URLs.
-	 * @param string $to_ping      Space or carriage return separated URLs before sanitization.
-	 */
-	return apply_filters( 'sanitize_trackback_urls', $urls_to_ping, $to_ping );
-}
-
-/**
- * Add slashes to a string or array of strings.
- *
- * This should be used when preparing data for core API that expects slashed data.
- * This should not be used to escape data going directly into an SQL query.
- *
- * @since 3.6.0
- *
- * @param string|array $value String or array of strings to slash.
- * @return string|array Slashed $value
- */
-function wp_slash( $value ) {
-	if ( is_array( $value ) ) {
-		foreach ( $value as $k => $v ) {
-			if ( is_array( $v ) ) {
-				$value[$k] = wp_slash( $v );
-			} else {
-				$value[$k] = addslashes( $v );
-			}
-		}
-	} else {
-		$value = addslashes( $value );
-	}
-
-	return $value;
-}
-
-/**
- * Remove slashes from a string or array of strings.
- *
- * This should be used to remove slashes from data passed to core API that
- * expects data to be unslashed.
- *
- * @since 3.6.0
- *
- * @param string|array $value String or array of strings to unslash.
- * @return string|array Unslashed $value
- */
-function wp_unslash( $value ) {
-	return stripslashes_deep( $value );
-}
-
-/**
- * Extract and return the first URL from passed content.
- *
- * @since 3.6.0
- *
- * @param string $content A string which might contain a URL.
- * @return string|false The found URL.
- */
-function get_url_in_content( $content ) {
-	if ( empty( $content ) ) {
-		return false;
-	}
-
-	if ( preg_match( '/<a\s[^>]*?href=([\'"])(.+?)\1/is', $content, $matches ) ) {
-		return esc_url_raw( $matches[2] );
-	}
-
-	return false;
-}
-
-/**
- * Returns the regexp for common whitespace characters.
- *
- * By default, spaces include new lines, tabs, nbsp entities, and the UTF-8 nbsp.
- * This is designed to replace the PCRE \s sequence.  In ticket #22692, that
- * sequence was found to be unreliable due to random inclusion of the A0 byte.
- *
- * @since 4.0.0
- *
- * @staticvar string $spaces
- *
- * @return string The spaces regexp.
- */
-function wp_spaces_regexp() {
-	static $spaces = '';
-
-	if ( empty( $spaces ) ) {
-		/**
-		 * Filters the regexp for common whitespace characters.
-		 *
-		 * This string is substituted for the \s sequence as needed in regular
-		 * expressions. For websites not written in English, different characters
-		 * may represent whitespace. For websites not encoded in UTF-8, the 0xC2 0xA0
-		 * sequence may not be in use.
-		 *
-		 * @since 4.0.0
-		 *
-		 * @param string $spaces Regexp pattern for matching common whitespace characters.
-		 */
-		$spaces = apply_filters( 'wp_spaces_regexp', '[\r\n\t ]|\xC2\xA0|&nbsp;' );
-	}
-
-	return $spaces;
-}
-
-/**
- * Print the important emoji-related styles.
- *
- * @since 4.2.0
- *
- * @staticvar bool $printed
- */
-function print_emoji_styles() {
-	static $printed = false;
-
-	if ( $printed ) {
-		return;
-	}
-
-	$printed = true;
-?>
-<style type="text/css">
-img.wp-smiley,
-img.emoji {
-	display: inline !important;
-	border: none !important;
-	box-shadow: none !important;
-	height: 1em !important;
-	width: 1em !important;
-	margin: 0 .07em !important;
-	vertical-align: -0.1em !important;
-	background: none !important;
-	padding: 0 !important;
-}
-</style>
-<?php
-}
-
-/**
- * Print the inline Emoji detection script if it is not already printed.
- *
- * @since 4.2.0
- * @staticvar bool $printed
- */
-function print_emoji_detection_script() {
-	static $printed = false;
-
-	if ( $printed ) {
-		return;
-	}
-
-	$printed = true;
-
-	_print_emoji_detection_script();
-}
-
-/**
- * Prints inline Emoji dection script
- *
- * @ignore
- * @since 4.6.0
- * @access private
- */
-function _print_emoji_detection_script() {
-	$settings = array(
-		/**
-		 * Filters the URL where emoji png images are hosted.
-		 *
-		 * @since 4.2.0
-		 *
-		 * @param string The emoji base URL for png images.
-		 */
-		'baseUrl' => apply_filters( 'emoji_url', 'https://s.w.org/images/core/emoji/2/72x72/' ),
-
-		/**
-		 * Filters the extension of the emoji png files.
-		 *
-		 * @since 4.2.0
-		 *
-		 * @param string The emoji extension for png files. Default .png.
-		 */
-		'ext' => apply_filters( 'emoji_ext', '.png' ),
-
-		/**
-		 * Filters the URL where emoji SVG images are hosted.
-		 *
-		 * @since 4.6.0
-		 *
-		 * @param string The emoji base URL for svg images.
-		 */
-		'svgUrl' => apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/2/svg/' ),
-
-		/**
-		 * Filters the extension of the emoji SVG files.
-		 *
-		 * @since 4.6.0
-		 *
-		 * @param string The emoji extension for svg files. Default .svg.
-		 */
-		'svgExt' => apply_filters( 'emoji_svg_ext', '.svg' ),
-	);
-
-	$version = 'ver=' . get_bloginfo( 'version' );
-
-	if ( SCRIPT_DEBUG ) {
-		$settings['source'] = array(
-			/** This filter is documented in wp-includes/class.wp-scripts.php */
-			'wpemoji' => apply_filters( 'script_loader_src', includes_url( "js/wp-emoji.js?$version" ), 'wpemoji' ),
-			/** This filter is documented in wp-includes/class.wp-scripts.php */
-			'twemoji' => apply_filters( 'script_loader_src', includes_url( "js/twemoji.js?$version" ), 'twemoji' ),
-		);
-
-		?>
-		<script type="text/javascript">
-			window._wpemojiSettings = <?php echo wp_json_encode( $settings ); ?>;
-			<?php readfile( ABSPATH . WPINC . "/js/wp-emoji-loader.js" ); ?>
-		</script>
-		<?php
-	} else {
-		$settings['source'] = array(
-			/** This filter is documented in wp-includes/class.wp-scripts.php */
-			'concatemoji' => apply_filters( 'script_loader_src', includes_url( "js/wp-emoji-release.min.js?$version" ), 'concatemoji' ),
-		);
-
-		/*
-		 * If you're looking at a src version of this file, you'll see an "include"
-		 * statement below. This is used by the `grunt build` process to directly
-		 * include a minified version of wp-emoji-loader.js, instead of using the
-		 * readfile() method from above.
-		 *
-		 * If you're looking at a build version of this file, you'll see a string of
-		 * minified JavaScript. If you need to debug it, please turn on SCRIPT_DEBUG
-		 * and edit wp-emoji-loader.js directly.
-		 */
-		?>
-		<script type="text/javascript">
-			window._wpemojiSettings = <?php echo wp_json_encode( $settings ); ?>;
-			!function(a,b,c){function d(a){var c,d,e,f,g,h=b.createElement("canvas"),i=h.getContext&&h.getContext("2d"),j=String.fromCharCode;if(!i||!i.fillText)return!1;switch(i.textBaseline="top",i.font="600 32px Arial",a){case"flag":return i.fillText(j(55356,56806,55356,56826),0,0),h.toDataURL().length<3e3?!1:(i.clearRect(0,0,h.width,h.height),i.fillText(j(55356,57331,65039,8205,55356,57096),0,0),c=h.toDataURL(),i.clearRect(0,0,h.width,h.height),i.fillText(j(55356,57331,55356,57096),0,0),d=h.toDataURL(),c!==d);case"diversity":return i.fillText(j(55356,57221),0,0),e=i.getImageData(16,16,1,1).data,f=e[0]+","+e[1]+","+e[2]+","+e[3],i.fillText(j(55356,57221,55356,57343),0,0),e=i.getImageData(16,16,1,1).data,g=e[0]+","+e[1]+","+e[2]+","+e[3],f!==g;case"simple":return i.fillText(j(55357,56835),0,0),0!==i.getImageData(16,16,1,1).data[0];case"unicode8":return i.fillText(j(55356,57135),0,0),0!==i.getImageData(16,16,1,1).data[0];case"unicode9":return i.fillText(j(55358,56631),0,0),0!==i.getImageData(16,16,1,1).data[0]}return!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i;for(i=Array("simple","flag","unicode8","diversity","unicode9"),c.supports={everything:!0,everythingExceptFlag:!0},h=0;h<i.length;h++)c.supports[i[h]]=d(i[h]),c.supports.everything=c.supports.everything&&c.supports[i[h]],"flag"!==i[h]&&(c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&c.supports[i[h]]);c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&!c.supports.flag,c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.everything||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);
-		</script>
-		<?php
-	}
-}
-
-/**
- * Convert any 4 byte emoji in a string to their equivalent HTML entity.
- *
- * Currently, only Unicode 7 emoji are supported. Skin tone modifiers are allowed,
- * all other Unicode 8 emoji will be added when the spec is finalised.
- *
- * This allows us to store emoji in a DB using the utf8 character set.
- *
- * @since 4.2.0
- *
- * @param string $content The content to encode.
- * @return string The encoded content.
- */
-function wp_encode_emoji( $content ) {
-	if ( function_exists( 'mb_convert_encoding' ) ) {
-		$regex = '/(
-		     \x23\xE2\x83\xA3               # Digits
-		     [\x30-\x39]\xE2\x83\xA3
-		   | \xF0\x9F[\x85-\x88][\xA6-\xBF] # Enclosed characters
-		   | \xF0\x9F[\x8C-\x97][\x80-\xBF] # Misc
-		   | \xF0\x9F\x98[\x80-\xBF]        # Smilies
-		   | \xF0\x9F\x99[\x80-\x8F]
-		   | \xF0\x9F\x9A[\x80-\xBF]        # Transport and map symbols
-		)/x';
-
-		$matches = array();
-		if ( preg_match_all( $regex, $content, $matches ) ) {
-			if ( ! empty( $matches[1] ) ) {
-				foreach ( $matches[1] as $emoji ) {
-					/*
-					 * UTF-32's hex encoding is the same as HTML's hex encoding.
-					 * So, by converting the emoji from UTF-8 to UTF-32, we magically
-					 * get the correct hex encoding.
-					 */
-					$unpacked = unpack( 'H*', mb_convert_encoding( $emoji, 'UTF-32', 'UTF-8' ) );
-					if ( isset( $unpacked[1] ) ) {
-						$entity = '&#x' . ltrim( $unpacked[1], '0' ) . ';';
-						$content = str_replace( $emoji, $entity, $content );
-					}
-				}
-			}
-		}
-	}
-
-	return $content;
-}
-
-/**
- * Convert emoji to a static img element.
- *
- * @since 4.2.0
- *
- * @param string $text The content to encode.
- * @return string The encoded content.
- */
-function wp_staticize_emoji( $text ) {
-	$text = wp_encode_emoji( $text );
-
-	/** This filter is documented in wp-includes/formatting.php */
-	$cdn_url = apply_filters( 'emoji_url', 'https://s.w.org/images/core/emoji/2/72x72/' );
-
-	/** This filter is documented in wp-includes/formatting.php */
-	$ext = apply_filters( 'emoji_ext', '.png' );
-
-	$output = '';
-	/*
-	 * HTML loop taken from smiley function, which was taken from texturize function.
-	 * It'll never be consolidated.
-	 *
-	 * First, capture the tags as well as in between.
-	 */
-	$textarr = preg_split( '/(<.*>)/U', $text, -1, PREG_SPLIT_DELIM_CAPTURE );
-	$stop = count( $textarr );
-
-	// Ignore processing of specific tags.
-	$tags_to_ignore = 'code|pre|style|script|textarea';
-	$ignore_block_element = '';
-
-	for ( $i = 0; $i < $stop; $i++ ) {
-		$content = $textarr[$i];
-
-		// If we're in an ignore block, wait until we find its closing tag.
-		if ( '' == $ignore_block_element && preg_match( '/^<(' . $tags_to_ignore . ')>/', $content, $matches ) )  {
-			$ignore_block_element = $matches[1];
-		}
-
-		// If it's not a tag and not in ignore block.
-		if ( '' ==  $ignore_block_element && strlen( $content ) > 0 && '<' != $content[0] ) {
-			$matches = array();
-			if ( preg_match_all( '/(&#x1f1(e[6-9a-f]|f[0-9a-f]);){2}/', $content, $matches ) ) {
-				if ( ! empty( $matches[0] ) ) {
-					foreach ( $matches[0] as $flag ) {
-						$chars = str_replace( array( '&#x', ';'), '', $flag );
-
-						list( $char1, $char2 ) = str_split( $chars, 5 );
-						$entity = sprintf( '<img src="%s" alt="%s" class="wp-smiley" style="height: 1em; max-height: 1em;" />', $cdn_url . $char1 . '-' . $char2 . $ext, html_entity_decode( $flag ) );
-
-						$content = str_replace( $flag, $entity, $content );
-					}
-				}
-			}
-
-			// Loosely match the Emoji Unicode range.
-			$regex = '/(&#x[2-3][0-9a-f]{3};|&#x1f[1-6][0-9a-f]{2};)/';
-
-			$matches = array();
-			if ( preg_match_all( $regex, $content, $matches ) ) {
-				if ( ! empty( $matches[1] ) ) {
-					foreach ( $matches[1] as $emoji ) {
-						$char = str_replace( array( '&#x', ';'), '', $emoji );
-						$entity = sprintf( '<img src="%s" alt="%s" class="wp-smiley" style="height: 1em; max-height: 1em;" />', $cdn_url . $char . $ext, html_entity_decode( $emoji ) );
-
-						$content = str_replace( $emoji, $entity, $content );
-					}
-				}
-			}
-		}
-
-		// Did we exit ignore block.
-		if ( '' != $ignore_block_element && '</' . $ignore_block_element . '>' == $content )  {
-			$ignore_block_element = '';
-		}
-
-		$output .= $content;
-	}
-
-	return $output;
-}
-
-/**
- * Convert emoji in emails into static images.
- *
- * @since 4.2.0
- *
- * @param array $mail The email data array.
- * @return array The email data array, with emoji in the message staticized.
- */
-function wp_staticize_emoji_for_email( $mail ) {
-	if ( ! isset( $mail['message'] ) ) {
-		return $mail;
-	}
-
-	/*
-	 * We can only transform the emoji into images if it's a text/html email.
-	 * To do that, here's a cut down version of the same process that happens
-	 * in wp_mail() - get the Content-Type from the headers, if there is one,
-	 * then pass it through the wp_mail_content_type filter, in case a plugin
-	 * is handling changing the Content-Type.
-	 */
-	$headers = array();
-	if ( isset( $mail['headers'] ) ) {
-		if ( is_array( $mail['headers'] ) ) {
-			$headers = $mail['headers'];
-		} else {
-			$headers = explode( "\n", str_replace( "\r\n", "\n", $mail['headers'] ) );
-		}
-	}
-
-	foreach ( $headers as $header ) {
-		if ( strpos($header, ':') === false ) {
-			continue;
-		}
-
-		// Explode them out.
-		list( $name, $content ) = explode( ':', trim( $header ), 2 );
-
-		// Cleanup crew.
-		$name    = trim( $name    );
-		$content = trim( $content );
-
-		if ( 'content-type' === strtolower( $name ) ) {
-			if ( strpos( $content, ';' ) !== false ) {
-				list( $type, $charset ) = explode( ';', $content );
-				$content_type = trim( $type );
-			} else {
-				$content_type = trim( $content );
-			}
-			break;
-		}
-	}
-
-	// Set Content-Type if we don't have a content-type from the input headers.
-	if ( ! isset( $content_type ) ) {
-		$content_type = 'text/plain';
-	}
-
-	/** This filter is documented in wp-includes/pluggable.php */
-	$content_type = apply_filters( 'wp_mail_content_type', $content_type );
-
-	if ( 'text/html' === $content_type ) {
-		$mail['message'] = wp_staticize_emoji( $mail['message'] );
-	}
-
-	return $mail;
-}
-
-/**
- * Shorten a URL, to be used as link text.
- *
- * @since 1.2.0
- * @since 4.4.0 Moved to wp-includes/formatting.php from wp-admin/includes/misc.php and added $length param.
- *
- * @param string $url    URL to shorten.
- * @param int    $length Optional. Maximum length of the shortened URL. Default 35 characters.
- * @return string Shortened URL.
- */
-function url_shorten( $url, $length = 35 ) {
-	$stripped = str_replace( array( 'https://', 'http://', 'www.' ), '', $url );
-	$short_url = untrailingslashit( $stripped );
-
-	if ( strlen( $short_url ) > $length ) {
-		$short_url = substr( $short_url, 0, $length - 3 ) . '&hellip;';
-	}
-	return $short_url;
-}
-
-/**
- * Sanitizes a hex color.
- *
- * Returns either '', a 3 or 6 digit hex color (with #), or nothing.
- * For sanitizing values without a #, see sanitize_hex_color_no_hash().
- *
- * @since 3.4.0
- *
- * @param string $color
- * @return string|void
- */
-function sanitize_hex_color( $color ) {
-	if ( '' === $color ) {
-		return '';
-	}
-
-	// 3 or 6 hex digits, or the empty string.
-	if ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) ) {
-		return $color;
-	}
-}
-
-/**
- * Sanitizes a hex color without a hash. Use sanitize_hex_color() when possible.
- *
- * Saving hex colors without a hash puts the burden of adding the hash on the
- * UI, which makes it difficult to use or upgrade to other color types such as
- * rgba, hsl, rgb, and html color names.
- *
- * Returns either '', a 3 or 6 digit hex color (without a #), or null.
- *
- * @since 3.4.0
- *
- * @param string $color
- * @return string|null
- */
-function sanitize_hex_color_no_hash( $color ) {
-	$color = ltrim( $color, '#' );
-
-	if ( '' === $color ) {
-		return '';
-	}
-
-	return sanitize_hex_color( '#' . $color ) ? $color : null;
-}
-
-/**
- * Ensures that any hex color is properly hashed.
- * Otherwise, returns value untouched.
- *
- * This method should only be necessary if using sanitize_hex_color_no_hash().
- *
- * @since 3.4.0
- *
- * @param string $color
- * @return string
- */
-function maybe_hash_hex_color( $color ) {
-	if ( $unhashed = sanitize_hex_color_no_hash( $color ) ) {
-		return '#' . $unhashed;
-	}
-
-	return $color;
-}
Index: www/wp-includes/Requests/Auth/Basic.php
===================================================================
--- www/wp-includes/Requests/Auth/Basic.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Auth_Basic.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/deprecated.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/deprecated.php	(revision 38565)
+++ www/wp-includes/deprecated.php	(revision 38565)
@@ -1,3760 +0,0 @@
-<?php
-/**
- * Deprecated functions from past WordPress versions. You shouldn't use these
- * functions and look for the alternatives instead. The functions will be
- * removed in a later version.
- *
- * @package WordPress
- * @subpackage Deprecated
- */
-
-/*
- * Deprecated functions come here to die.
- */
-
-/**
- * Retrieves all post data for a given post.
- *
- * @since 0.71
- * @deprecated 1.5.1 Use get_post()
- * @see get_post()
- *
- * @param int $postid Post ID.
- * @return array Post data.
- */
-function get_postdata($postid) {
-	_deprecated_function( __FUNCTION__, '1.5.1', 'get_post()' );
-
-	$post = get_post($postid);
-
-	$postdata = array (
-		'ID' => $post->ID,
-		'Author_ID' => $post->post_author,
-		'Date' => $post->post_date,
-		'Content' => $post->post_content,
-		'Excerpt' => $post->post_excerpt,
-		'Title' => $post->post_title,
-		'Category' => $post->post_category,
-		'post_status' => $post->post_status,
-		'comment_status' => $post->comment_status,
-		'ping_status' => $post->ping_status,
-		'post_password' => $post->post_password,
-		'to_ping' => $post->to_ping,
-		'pinged' => $post->pinged,
-		'post_type' => $post->post_type,
-		'post_name' => $post->post_name
-	);
-
-	return $postdata;
-}
-
-/**
- * Sets up the WordPress Loop.
- *
- * Use The Loop instead.
- *
- * @link https://codex.wordpress.org/The_Loop
- *
- * @since 1.0.1
- * @deprecated 1.5.0
- */
-function start_wp() {
-	global $wp_query;
-
-	_deprecated_function( __FUNCTION__, '1.5.0', __('new WordPress Loop') );
-
-	// Since the old style loop is being used, advance the query iterator here.
-	$wp_query->next_post();
-
-	setup_postdata( get_post() );
-}
-
-/**
- * Returns or prints a category ID.
- *
- * @since 0.71
- * @deprecated 0.71 Use get_the_category()
- * @see get_the_category()
- *
- * @param bool $echo Optional. Whether to echo the output. Default true.
- * @return int Category ID.
- */
-function the_category_ID($echo = true) {
-	_deprecated_function( __FUNCTION__, '0.71', 'get_the_category()' );
-
-	// Grab the first cat in the list.
-	$categories = get_the_category();
-	$cat = $categories[0]->term_id;
-
-	if ( $echo )
-		echo $cat;
-
-	return $cat;
-}
-
-/**
- * Prints a category with optional text before and after.
- *
- * @since 0.71
- * @deprecated 0.71 Use get_the_category_by_ID()
- * @see get_the_category_by_ID()
- *
- * @param string $before Optional. Text to display before the category. Default empty.
- * @param string $after  Optional. Text to display after the category. Default empty.
- */
-function the_category_head( $before = '', $after = '' ) {
-	global $currentcat, $previouscat;
-
-	_deprecated_function( __FUNCTION__, '0.71', 'get_the_category_by_ID()' );
-
-	// Grab the first cat in the list.
-	$categories = get_the_category();
-	$currentcat = $categories[0]->category_id;
-	if ( $currentcat != $previouscat ) {
-		echo $before;
-		echo get_the_category_by_ID($currentcat);
-		echo $after;
-		$previouscat = $currentcat;
-	}
-}
-
-/**
- * Prints a link to the previous post.
- *
- * @since 1.5.0
- * @deprecated 2.0.0 Use previous_post_link()
- * @see previous_post_link()
- *
- * @param string $format
- * @param string $previous
- * @param string $title
- * @param string $in_same_cat
- * @param int    $limitprev
- * @param string $excluded_categories
- */
-function previous_post($format='%', $previous='previous post: ', $title='yes', $in_same_cat='no', $limitprev=1, $excluded_categories='') {
-
-	_deprecated_function( __FUNCTION__, '2.0.0', 'previous_post_link()' );
-
-	if ( empty($in_same_cat) || 'no' == $in_same_cat )
-		$in_same_cat = false;
-	else
-		$in_same_cat = true;
-
-	$post = get_previous_post($in_same_cat, $excluded_categories);
-
-	if ( !$post )
-		return;
-
-	$string = '<a href="'.get_permalink($post->ID).'">'.$previous;
-	if ( 'yes' == $title )
-		$string .= apply_filters('the_title', $post->post_title, $post->ID);
-	$string .= '</a>';
-	$format = str_replace('%', $string, $format);
-	echo $format;
-}
-
-/**
- * Prints link to the next post.
- *
- * @since 0.71
- * @deprecated 2.0.0 Use next_post_link()
- * @see next_post_link()
- *
- * @param string $format
- * @param string $next
- * @param string $title
- * @param string $in_same_cat
- * @param int $limitnext
- * @param string $excluded_categories
- */
-function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') {
-	_deprecated_function( __FUNCTION__, '2.0.0', 'next_post_link()' );
-
-	if ( empty($in_same_cat) || 'no' == $in_same_cat )
-		$in_same_cat = false;
-	else
-		$in_same_cat = true;
-
-	$post = get_next_post($in_same_cat, $excluded_categories);
-
-	if ( !$post	)
-		return;
-
-	$string = '<a href="'.get_permalink($post->ID).'">'.$next;
-	if ( 'yes' == $title )
-		$string .= apply_filters('the_title', $post->post_title, $post->ID);
-	$string .= '</a>';
-	$format = str_replace('%', $string, $format);
-	echo $format;
-}
-
-/**
- * Whether user can create a post.
- *
- * @since 1.5.0
- * @deprecated 2.0.0 Use current_user_can()
- * @see current_user_can()
- *
- * @param int $user_id
- * @param int $blog_id Not Used
- * @param int $category_id Not Used
- * @return bool
- */
-function user_can_create_post($user_id, $blog_id = 1, $category_id = 'None') {
-	_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
-
-	$author_data = get_userdata($user_id);
-	return ($author_data->user_level > 1);
-}
-
-/**
- * Whether user can create a post.
- *
- * @since 1.5.0
- * @deprecated 2.0.0 Use current_user_can()
- * @see current_user_can()
- *
- * @param int $user_id
- * @param int $blog_id Not Used
- * @param int $category_id Not Used
- * @return bool
- */
-function user_can_create_draft($user_id, $blog_id = 1, $category_id = 'None') {
-	_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
-
-	$author_data = get_userdata($user_id);
-	return ($author_data->user_level >= 1);
-}
-
-/**
- * Whether user can edit a post.
- *
- * @since 1.5.0
- * @deprecated 2.0.0 Use current_user_can()
- * @see current_user_can()
- *
- * @param int $user_id
- * @param int $post_id
- * @param int $blog_id Not Used
- * @return bool
- */
-function user_can_edit_post($user_id, $post_id, $blog_id = 1) {
-	_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
-
-	$author_data = get_userdata($user_id);
-	$post = get_post($post_id);
-	$post_author_data = get_userdata($post->post_author);
-
-	if ( (($user_id == $post_author_data->ID) && !($post->post_status == 'publish' && $author_data->user_level < 2))
-			 || ($author_data->user_level > $post_author_data->user_level)
-			 || ($author_data->user_level >= 10) ) {
-		return true;
-	} else {
-		return false;
-	}
-}
-
-/**
- * Whether user can delete a post.
- *
- * @since 1.5.0
- * @deprecated 2.0.0 Use current_user_can()
- * @see current_user_can()
- *
- * @param int $user_id
- * @param int $post_id
- * @param int $blog_id Not Used
- * @return bool
- */
-function user_can_delete_post($user_id, $post_id, $blog_id = 1) {
-	_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
-
-	// right now if one can edit, one can delete
-	return user_can_edit_post($user_id, $post_id, $blog_id);
-}
-
-/**
- * Whether user can set new posts' dates.
- *
- * @since 1.5.0
- * @deprecated 2.0.0 Use current_user_can()
- * @see current_user_can()
- *
- * @param int $user_id
- * @param int $blog_id Not Used
- * @param int $category_id Not Used
- * @return bool
- */
-function user_can_set_post_date($user_id, $blog_id = 1, $category_id = 'None') {
-	_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
-
-	$author_data = get_userdata($user_id);
-	return (($author_data->user_level > 4) && user_can_create_post($user_id, $blog_id, $category_id));
-}
-
-/**
- * Whether user can delete a post.
- *
- * @since 1.5.0
- * @deprecated 2.0.0 Use current_user_can()
- * @see current_user_can()
- *
- * @param int $user_id
- * @param int $post_id
- * @param int $blog_id Not Used
- * @return bool returns true if $user_id can edit $post_id's date
- */
-function user_can_edit_post_date($user_id, $post_id, $blog_id = 1) {
-	_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
-
-	$author_data = get_userdata($user_id);
-	return (($author_data->user_level > 4) && user_can_edit_post($user_id, $post_id, $blog_id));
-}
-
-/**
- * Whether user can delete a post.
- *
- * @since 1.5.0
- * @deprecated 2.0.0 Use current_user_can()
- * @see current_user_can()
- *
- * @param int $user_id
- * @param int $post_id
- * @param int $blog_id Not Used
- * @return bool returns true if $user_id can edit $post_id's comments
- */
-function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1) {
-	_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
-
-	// right now if one can edit a post, one can edit comments made on it
-	return user_can_edit_post($user_id, $post_id, $blog_id);
-}
-
-/**
- * Whether user can delete a post.
- *
- * @since 1.5.0
- * @deprecated 2.0.0 Use current_user_can()
- * @see current_user_can()
- *
- * @param int $user_id
- * @param int $post_id
- * @param int $blog_id Not Used
- * @return bool returns true if $user_id can delete $post_id's comments
- */
-function user_can_delete_post_comments($user_id, $post_id, $blog_id = 1) {
-	_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
-
-	// right now if one can edit comments, one can delete comments
-	return user_can_edit_post_comments($user_id, $post_id, $blog_id);
-}
-
-/**
- * Can user can edit other user.
- *
- * @since 1.5.0
- * @deprecated 2.0.0 Use current_user_can()
- * @see current_user_can()
- *
- * @param int $user_id
- * @param int $other_user
- * @return bool
- */
-function user_can_edit_user($user_id, $other_user) {
-	_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
-
-	$user  = get_userdata($user_id);
-	$other = get_userdata($other_user);
-	if ( $user->user_level > $other->user_level || $user->user_level > 8 || $user->ID == $other->ID )
-		return true;
-	else
-		return false;
-}
-
-/**
- * Gets the links associated with category $cat_name.
- *
- * @since 0.71
- * @deprecated 2.1.0 Use get_bookmarks()
- * @see get_bookmarks()
- *
- * @param string $cat_name Optional. The category name to use. If no match is found uses all.
- * @param string $before Optional. The html to output before the link.
- * @param string $after Optional. The html to output after the link.
- * @param string $between Optional. The html to output between the link/image and its description. Not used if no image or $show_images is true.
- * @param bool $show_images Optional. Whether to show images (if defined).
- * @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url', 'description' or 'rating'. Or maybe owner.
- *		If you start the name with an underscore the order will be reversed. You can also specify 'rand' as the order which will return links in a
- *		random order.
- * @param bool $show_description Optional. Whether to show the description if show_images=false/not defined.
- * @param bool $show_rating Optional. Show rating stars/chars.
- * @param int $limit		Optional. Limit to X entries. If not specified, all entries are shown.
- * @param int $show_updated Optional. Whether to show last updated timestamp
- */
-function get_linksbyname($cat_name = "noname", $before = '', $after = '<br />', $between = " ", $show_images = true, $orderby = 'id',
-						 $show_description = true, $show_rating = false,
-						 $limit = -1, $show_updated = 0) {
-	_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
-
-	$cat_id = -1;
-	$cat = get_term_by('name', $cat_name, 'link_category');
-	if ( $cat )
-		$cat_id = $cat->term_id;
-
-	get_links($cat_id, $before, $after, $between, $show_images, $orderby, $show_description, $show_rating, $limit, $show_updated);
-}
-
-/**
- * Gets the links associated with the named category.
- *
- * @since 1.0.1
- * @deprecated 2.1.0 Use wp_list_bookmarks()
- * @see wp_list_bookmarks()
- *
- * @param string $category The category to use.
- * @param string $args
- * @return string|null
- */
-function wp_get_linksbyname($category, $args = '') {
-	_deprecated_function(__FUNCTION__, '2.1.0', 'wp_list_bookmarks()');
-
-	$defaults = array(
-		'after' => '<br />',
-		'before' => '',
-		'categorize' => 0,
-		'category_after' => '',
-		'category_before' => '',
-		'category_name' => $category,
-		'show_description' => 1,
-		'title_li' => '',
-	);
-
-	$r = wp_parse_args( $args, $defaults );
-
-	return wp_list_bookmarks($r);
-}
-
-/**
- * Gets an array of link objects associated with category $cat_name.
- *
- *     $links = get_linkobjectsbyname( 'fred' );
- *     foreach ( $links as $link ) {
- *      	echo '<li>' . $link->link_name . '</li>';
- *     }
- *
- * @since 1.0.1
- * @deprecated 2.1.0 Use get_bookmarks()
- * @see get_bookmarks()
- *
- * @param string $cat_name The category name to use. If no match is found uses all.
- * @param string $orderby The order to output the links. E.g. 'id', 'name', 'url', 'description', or 'rating'.
- *		Or maybe owner. If you start the name with an underscore the order will be reversed. You can also
- *		specify 'rand' as the order which will return links in a random order.
- * @param int $limit Limit to X entries. If not specified, all entries are shown.
- * @return array
- */
-function get_linkobjectsbyname($cat_name = "noname" , $orderby = 'name', $limit = -1) {
-	_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
-
-	$cat_id = -1;
-	$cat = get_term_by('name', $cat_name, 'link_category');
-	if ( $cat )
-		$cat_id = $cat->term_id;
-
-	return get_linkobjects($cat_id, $orderby, $limit);
-}
-
-/**
- * Gets an array of link objects associated with category n.
- *
- * Usage:
- *
- *     $links = get_linkobjects(1);
- *     if ($links) {
- *     	foreach ($links as $link) {
- *     		echo '<li>'.$link->link_name.'<br />'.$link->link_description.'</li>';
- *     	}
- *     }
- *
- * Fields are:
- *
- * - link_id
- * - link_url
- * - link_name
- * - link_image
- * - link_target
- * - link_category
- * - link_description
- * - link_visible
- * - link_owner
- * - link_rating
- * - link_updated
- * - link_rel
- * - link_notes
- *
- * @since 1.0.1
- * @deprecated 2.1.0 Use get_bookmarks()
- * @see get_bookmarks()
- *
- * @param int $category The category to use. If no category supplied uses all
- * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url',
- *		'description', or 'rating'. Or maybe owner. If you start the name with an
- *		underscore the order will be reversed. You can also specify 'rand' as the
- *		order which will return links in a random order.
- * @param int $limit Limit to X entries. If not specified, all entries are shown.
- * @return array
- */
-function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) {
-	_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
-
-	$links = get_bookmarks( array( 'category' => $category, 'orderby' => $orderby, 'limit' => $limit ) ) ;
-
-	$links_array = array();
-	foreach ($links as $link)
-		$links_array[] = $link;
-
-	return $links_array;
-}
-
-/**
- * Gets the links associated with category 'cat_name' and display rating stars/chars.
- *
- * @since 0.71
- * @deprecated 2.1.0 Use get_bookmarks()
- * @see get_bookmarks()
- *
- * @param string $cat_name The category name to use. If no match is found uses all
- * @param string $before The html to output before the link
- * @param string $after The html to output after the link
- * @param string $between The html to output between the link/image and its description. Not used if no image or show_images is true
- * @param bool $show_images Whether to show images (if defined).
- * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url',
- *		'description', or 'rating'. Or maybe owner. If you start the name with an
- *		underscore the order will be reversed. You can also specify 'rand' as the
- *		order which will return links in a random order.
- * @param bool $show_description Whether to show the description if show_images=false/not defined
- * @param int $limit Limit to X entries. If not specified, all entries are shown.
- * @param int $show_updated Whether to show last updated timestamp
- */
-function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = '<br />', $between = " ",
-									$show_images = true, $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
-	_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
-
-	get_linksbyname($cat_name, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
-}
-
-/**
- * Gets the links associated with category n and display rating stars/chars.
- *
- * @since 0.71
- * @deprecated 2.1.0 Use get_bookmarks()
- * @see get_bookmarks()
- *
- * @param int $category The category to use. If no category supplied uses all
- * @param string $before The html to output before the link
- * @param string $after The html to output after the link
- * @param string $between The html to output between the link/image and its description. Not used if no image or show_images == true
- * @param bool $show_images Whether to show images (if defined).
- * @param string $orderby The order to output the links. E.g. 'id', 'name', 'url',
- *		'description', or 'rating'. Or maybe owner. If you start the name with an
- *		underscore the order will be reversed. You can also specify 'rand' as the
- *		order which will return links in a random order.
- * @param bool $show_description Whether to show the description if show_images=false/not defined.
- * @param int $limit Limit to X entries. If not specified, all entries are shown.
- * @param int $show_updated Whether to show last updated timestamp
- */
-function get_links_withrating($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true,
-							  $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
-	_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
-
-	get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
-}
-
-/**
- * Gets the auto_toggle setting.
- *
- * @since 0.71
- * @deprecated 2.1.0
- *
- * @param int $id The category to get. If no category supplied uses 0
- * @return int Only returns 0.
- */
-function get_autotoggle($id = 0) {
-	_deprecated_function( __FUNCTION__, '2.1.0' );
-	return 0;
-}
-
-/**
- * Lists categories.
- *
- * @since 0.71
- * @deprecated 2.1.0 Use wp_list_categories()
- * @see wp_list_categories()
- *
- * @param int $optionall
- * @param string $all
- * @param string $sort_column
- * @param string $sort_order
- * @param string $file
- * @param bool $list
- * @param int $optiondates
- * @param int $optioncount
- * @param int $hide_empty
- * @param int $use_desc_for_title
- * @param bool $children
- * @param int $child_of
- * @param int $categories
- * @param int $recurse
- * @param string $feed
- * @param string $feed_image
- * @param string $exclude
- * @param bool $hierarchical
- * @return false|null
- */
-function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0,
-				   $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0,
-				   $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=false) {
-	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_categories()' );
-
-	$query = compact('optionall', 'all', 'sort_column', 'sort_order', 'file', 'list', 'optiondates', 'optioncount', 'hide_empty', 'use_desc_for_title', 'children',
-		'child_of', 'categories', 'recurse', 'feed', 'feed_image', 'exclude', 'hierarchical');
-	return wp_list_cats($query);
-}
-
-/**
- * Lists categories.
- *
- * @since 1.2.0
- * @deprecated 2.1.0 Use wp_list_categories()
- * @see wp_list_categories()
- *
- * @param string|array $args
- * @return false|null|string
- */
-function wp_list_cats($args = '') {
-	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_categories()' );
-
-	$r = wp_parse_args( $args );
-
-	// Map to new names.
-	if ( isset($r['optionall']) && isset($r['all']))
-		$r['show_option_all'] = $r['all'];
-	if ( isset($r['sort_column']) )
-		$r['orderby'] = $r['sort_column'];
-	if ( isset($r['sort_order']) )
-		$r['order'] = $r['sort_order'];
-	if ( isset($r['optiondates']) )
-		$r['show_last_update'] = $r['optiondates'];
-	if ( isset($r['optioncount']) )
-		$r['show_count'] = $r['optioncount'];
-	if ( isset($r['list']) )
-		$r['style'] = $r['list'] ? 'list' : 'break';
-	$r['title_li'] = '';
-
-	return wp_list_categories($r);
-}
-
-/**
- * Deprecated method for generating a drop-down of categories.
- *
- * @since 0.71
- * @deprecated 2.1.0 Use wp_dropdown_categories()
- * @see wp_dropdown_categories()
- *
- * @param int $optionall
- * @param string $all
- * @param string $orderby
- * @param string $order
- * @param int $show_last_update
- * @param int $show_count
- * @param int $hide_empty
- * @param bool $optionnone
- * @param int $selected
- * @param int $exclude
- * @return string
- */
-function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc',
-		$show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = false,
-		$selected = 0, $exclude = 0) {
-	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_dropdown_categories()' );
-
-	$show_option_all = '';
-	if ( $optionall )
-		$show_option_all = $all;
-
-	$show_option_none = '';
-	if ( $optionnone )
-		$show_option_none = __('None');
-
-	$vars = compact('show_option_all', 'show_option_none', 'orderby', 'order',
-					'show_last_update', 'show_count', 'hide_empty', 'selected', 'exclude');
-	$query = add_query_arg($vars, '');
-	return wp_dropdown_categories($query);
-}
-
-/**
- * Lists authors.
- *
- * @since 1.2.0
- * @deprecated 2.1.0 Use wp_list_authors()
- * @see wp_list_authors()
- *
- * @param bool $optioncount
- * @param bool $exclude_admin
- * @param bool $show_fullname
- * @param bool $hide_empty
- * @param string $feed
- * @param string $feed_image
- * @return null|string
- */
-function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') {
-	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_authors()' );
-
-	$args = compact('optioncount', 'exclude_admin', 'show_fullname', 'hide_empty', 'feed', 'feed_image');
-	return wp_list_authors($args);
-}
-
-/**
- * Retrieves a list of post categories.
- *
- * @since 1.0.1
- * @deprecated 2.1.0 Use wp_get_post_categories()
- * @see wp_get_post_categories()
- *
- * @param int $blogid Not Used
- * @param int $post_ID
- * @return array
- */
-function wp_get_post_cats($blogid = '1', $post_ID = 0) {
-	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_get_post_categories()' );
-	return wp_get_post_categories($post_ID);
-}
-
-/**
- * Sets the categories that the post id belongs to.
- *
- * @since 1.0.1
- * @deprecated 2.1.0
- * @deprecated Use wp_set_post_categories()
- * @see wp_set_post_categories()
- *
- * @param int $blogid Not used
- * @param int $post_ID
- * @param array $post_categories
- * @return bool|mixed
- */
-function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array()) {
-	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_set_post_categories()' );
-	return wp_set_post_categories($post_ID, $post_categories);
-}
-
-/**
- * Retrieves a list of archives.
- *
- * @since 0.71
- * @deprecated 2.1.0 Use wp_get_archives()
- * @see wp_get_archives()
- *
- * @param string $type
- * @param string $limit
- * @param string $format
- * @param string $before
- * @param string $after
- * @param bool $show_post_count
- * @return string|null
- */
-function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) {
-	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_get_archives()' );
-	$args = compact('type', 'limit', 'format', 'before', 'after', 'show_post_count');
-	return wp_get_archives($args);
-}
-
-/**
- * Returns or Prints link to the author's posts.
- *
- * @since 1.2.0
- * @deprecated 2.1.0 Use get_author_posts_url()
- * @see get_author_posts_url()
- *
- * @param bool $echo
- * @param int $author_id
- * @param string $author_nicename Optional.
- * @return string|null
- */
-function get_author_link($echo, $author_id, $author_nicename = '') {
-	_deprecated_function( __FUNCTION__, '2.1.0', 'get_author_posts_url()' );
-
-	$link = get_author_posts_url($author_id, $author_nicename);
-
-	if ( $echo )
-		echo $link;
-	return $link;
-}
-
-/**
- * Print list of pages based on arguments.
- *
- * @since 0.71
- * @deprecated 2.1.0 Use wp_link_pages()
- * @see wp_link_pages()
- *
- * @param string $before
- * @param string $after
- * @param string $next_or_number
- * @param string $nextpagelink
- * @param string $previouspagelink
- * @param string $pagelink
- * @param string $more_file
- * @return string
- */
-function link_pages($before='<br />', $after='<br />', $next_or_number='number', $nextpagelink='next page', $previouspagelink='previous page',
-					$pagelink='%', $more_file='') {
-	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_link_pages()' );
-
-	$args = compact('before', 'after', 'next_or_number', 'nextpagelink', 'previouspagelink', 'pagelink', 'more_file');
-	return wp_link_pages($args);
-}
-
-/**
- * Get value based on option.
- *
- * @since 0.71
- * @deprecated 2.1.0 Use get_option()
- * @see get_option()
- *
- * @param string $option
- * @return string
- */
-function get_settings($option) {
-	_deprecated_function( __FUNCTION__, '2.1.0', 'get_option()' );
-
-	return get_option($option);
-}
-
-/**
- * Print the permalink of the current post in the loop.
- *
- * @since 0.71
- * @deprecated 1.2.0 Use the_permalink()
- * @see the_permalink()
- */
-function permalink_link() {
-	_deprecated_function( __FUNCTION__, '1.2.0', 'the_permalink()' );
-	the_permalink();
-}
-
-/**
- * Print the permalink to the RSS feed.
- *
- * @since 0.71
- * @deprecated 2.3.0 Use the_permalink_rss()
- * @see the_permalink_rss()
- *
- * @param string $deprecated
- */
-function permalink_single_rss($deprecated = '') {
-	_deprecated_function( __FUNCTION__, '2.3.0', 'the_permalink_rss()' );
-	the_permalink_rss();
-}
-
-/**
- * Gets the links associated with category.
- *
- * @since 1.0.1
- * @deprecated 2.1.0 Use wp_list_bookmarks()
- * @see wp_list_bookmarks()
- *
- * @param string $args a query string
- * @return null|string
- */
-function wp_get_links($args = '') {
-	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_bookmarks()' );
-
-	if ( strpos( $args, '=' ) === false ) {
-		$cat_id = $args;
-		$args = add_query_arg( 'category', $cat_id, $args );
-	}
-
-	$defaults = array(
-		'after' => '<br />',
-		'before' => '',
-		'between' => ' ',
-		'categorize' => 0,
-		'category' => '',
-		'echo' => true,
-		'limit' => -1,
-		'orderby' => 'name',
-		'show_description' => true,
-		'show_images' => true,
-		'show_rating' => false,
-		'show_updated' => true,
-		'title_li' => '',
-	);
-
-	$r = wp_parse_args( $args, $defaults );
-
-	return wp_list_bookmarks($r);
-}
-
-/**
- * Gets the links associated with category by id.
- *
- * @since 0.71
- * @deprecated 2.1.0 Use get_bookmarks()
- * @see get_bookmarks()
- *
- * @param int $category The category to use. If no category supplied uses all
- * @param string $before the html to output before the link
- * @param string $after the html to output after the link
- * @param string $between the html to output between the link/image and its description.
- *		Not used if no image or show_images == true
- * @param bool $show_images whether to show images (if defined).
- * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url',
- *		'description', or 'rating'. Or maybe owner. If you start the name with an
- *		underscore the order will be reversed. You can also specify 'rand' as the order
- *		which will return links in a random order.
- * @param bool $show_description whether to show the description if show_images=false/not defined.
- * @param bool $show_rating show rating stars/chars
- * @param int $limit Limit to X entries. If not specified, all entries are shown.
- * @param int $show_updated whether to show last updated timestamp
- * @param bool $echo whether to echo the results, or return them instead
- * @return null|string
- */
-function get_links($category = -1, $before = '', $after = '<br />', $between = ' ', $show_images = true, $orderby = 'name',
-			$show_description = true, $show_rating = false, $limit = -1, $show_updated = 1, $echo = true) {
-	_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
-
-	$order = 'ASC';
-	if ( substr($orderby, 0, 1) == '_' ) {
-		$order = 'DESC';
-		$orderby = substr($orderby, 1);
-	}
-
-	if ( $category == -1 ) //get_bookmarks uses '' to signify all categories
-		$category = '';
-
-	$results = get_bookmarks(array('category' => $category, 'orderby' => $orderby, 'order' => $order, 'show_updated' => $show_updated, 'limit' => $limit));
-
-	if ( !$results )
-		return;
-
-	$output = '';
-
-	foreach ( (array) $results as $row ) {
-		if ( !isset($row->recently_updated) )
-			$row->recently_updated = false;
-		$output .= $before;
-		if ( $show_updated && $row->recently_updated )
-			$output .= get_option('links_recently_updated_prepend');
-		$the_link = '#';
-		if ( !empty($row->link_url) )
-			$the_link = esc_url($row->link_url);
-		$rel = $row->link_rel;
-		if ( '' != $rel )
-			$rel = ' rel="' . $rel . '"';
-
-		$desc = esc_attr(sanitize_bookmark_field('link_description', $row->link_description, $row->link_id, 'display'));
-		$name = esc_attr(sanitize_bookmark_field('link_name', $row->link_name, $row->link_id, 'display'));
-		$title = $desc;
-
-		if ( $show_updated )
-			if (substr($row->link_updated_f, 0, 2) != '00')
-				$title .= ' ('.__('Last updated') . ' ' . date(get_option('links_updated_date_format'), $row->link_updated_f + (get_option('gmt_offset') * HOUR_IN_SECONDS)) . ')';
-
-		if ( '' != $title )
-			$title = ' title="' . $title . '"';
-
-		$alt = ' alt="' . $name . '"';
-
-		$target = $row->link_target;
-		if ( '' != $target )
-			$target = ' target="' . $target . '"';
-
-		$output .= '<a href="' . $the_link . '"' . $rel . $title . $target. '>';
-
-		if ( $row->link_image != null && $show_images ) {
-			if ( strpos($row->link_image, 'http') !== false )
-				$output .= "<img src=\"$row->link_image\" $alt $title />";
-			else // If it's a relative path
-				$output .= "<img src=\"" . get_option('siteurl') . "$row->link_image\" $alt $title />";
-		} else {
-			$output .= $name;
-		}
-
-		$output .= '</a>';
-
-		if ( $show_updated && $row->recently_updated )
-			$output .= get_option('links_recently_updated_append');
-
-		if ( $show_description && '' != $desc )
-			$output .= $between . $desc;
-
-		if ($show_rating) {
-			$output .= $between . get_linkrating($row);
-		}
-
-		$output .= "$after\n";
-	} // end while
-
-	if ( !$echo )
-		return $output;
-	echo $output;
-}
-
-/**
- * Output entire list of links by category.
- *
- * Output a list of all links, listed by category, using the settings in
- * $wpdb->linkcategories and output it as a nested HTML unordered list.
- *
- * @since 1.0.1
- * @deprecated 2.1.0 Use wp_list_bookmarks()
- * @see wp_list_bookmarks()
- *
- * @param string $order Sort link categories by 'name' or 'id'
- */
-function get_links_list($order = 'name') {
-	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_bookmarks()' );
-
-	$order = strtolower($order);
-
-	// Handle link category sorting
-	$direction = 'ASC';
-	if ( '_' == substr($order,0,1) ) {
-		$direction = 'DESC';
-		$order = substr($order,1);
-	}
-
-	if ( !isset($direction) )
-		$direction = '';
-
-	$cats = get_categories(array('type' => 'link', 'orderby' => $order, 'order' => $direction, 'hierarchical' => 0));
-
-	// Display each category
-	if ( $cats ) {
-		foreach ( (array) $cats as $cat ) {
-			// Handle each category.
-
-			// Display the category name
-			echo '  <li id="linkcat-' . $cat->term_id . '" class="linkcat"><h2>' . apply_filters('link_category', $cat->name ) . "</h2>\n\t<ul>\n";
-			// Call get_links() with all the appropriate params
-			get_links($cat->term_id, '<li>', "</li>", "\n", true, 'name', false);
-
-			// Close the last category
-			echo "\n\t</ul>\n</li>\n";
-		}
-	}
-}
-
-/**
- * Show the link to the links popup and the number of links.
- *
- * @since 0.71
- * @deprecated 2.1.0
- *
- * @param string $text the text of the link
- * @param int $width the width of the popup window
- * @param int $height the height of the popup window
- * @param string $file the page to open in the popup window
- * @param bool $count the number of links in the db
- */
-function links_popup_script($text = 'Links', $width=400, $height=400, $file='links.all.php', $count = true) {
-	_deprecated_function( __FUNCTION__, '2.1.0' );
-}
-
-/**
- * Legacy function that retrieved the value of a link's link_rating field.
- *
- * @since 1.0.1
- * @deprecated 2.1.0 Use sanitize_bookmark_field()
- * @see sanitize_bookmark_field()
- *
- * @param object $link Link object.
- * @return mixed Value of the 'link_rating' field, false otherwise.
- */
-function get_linkrating( $link ) {
-	_deprecated_function( __FUNCTION__, '2.1.0', 'sanitize_bookmark_field()' );
-	return sanitize_bookmark_field('link_rating', $link->link_rating, $link->link_id, 'display');
-}
-
-/**
- * Gets the name of category by id.
- *
- * @since 0.71
- * @deprecated 2.1.0 Use get_category()
- * @see get_category()
- *
- * @param int $id The category to get. If no category supplied uses 0
- * @return string
- */
-function get_linkcatname($id = 0) {
-	_deprecated_function( __FUNCTION__, '2.1.0', 'get_category()' );
-
-	$id = (int) $id;
-
-	if ( empty($id) )
-		return '';
-
-	$cats = wp_get_link_cats($id);
-
-	if ( empty($cats) || ! is_array($cats) )
-		return '';
-
-	$cat_id = (int) $cats[0]; // Take the first cat.
-
-	$cat = get_category($cat_id);
-	return $cat->name;
-}
-
-/**
- * Print RSS comment feed link.
- *
- * @since 1.0.1
- * @deprecated 2.5.0 Use post_comments_feed_link()
- * @see post_comments_feed_link()
- *
- * @param string $link_text
- */
-function comments_rss_link($link_text = 'Comments RSS') {
-	_deprecated_function( __FUNCTION__, '2.5.0', 'post_comments_feed_link()' );
-	post_comments_feed_link($link_text);
-}
-
-/**
- * Print/Return link to category RSS2 feed.
- *
- * @since 1.2.0
- * @deprecated 2.5.0 Use get_category_feed_link()
- * @see get_category_feed_link()
- *
- * @param bool $echo
- * @param int $cat_ID
- * @return string
- */
-function get_category_rss_link($echo = false, $cat_ID = 1) {
-	_deprecated_function( __FUNCTION__, '2.5.0', 'get_category_feed_link()' );
-
-	$link = get_category_feed_link($cat_ID, 'rss2');
-
-	if ( $echo )
-		echo $link;
-	return $link;
-}
-
-/**
- * Print/Return link to author RSS feed.
- *
- * @since 1.2.0
- * @deprecated 2.5.0 Use get_author_feed_link()
- * @see get_author_feed_link()
- *
- * @param bool $echo
- * @param int $author_id
- * @return string
- */
-function get_author_rss_link($echo = false, $author_id = 1) {
-	_deprecated_function( __FUNCTION__, '2.5.0', 'get_author_feed_link()' );
-
-	$link = get_author_feed_link($author_id);
-	if ( $echo )
-		echo $link;
-	return $link;
-}
-
-/**
- * Return link to the post RSS feed.
- *
- * @since 1.5.0
- * @deprecated 2.2.0 Use get_post_comments_feed_link()
- * @see get_post_comments_feed_link()
- *
- * @return string
- */
-function comments_rss() {
-	_deprecated_function( __FUNCTION__, '2.2.0', 'get_post_comments_feed_link()' );
-	return esc_url( get_post_comments_feed_link() );
-}
-
-/**
- * An alias of wp_create_user().
- *
- * @since 2.0.0
- * @deprecated 2.0.0 Use wp_create_user()
- * @see wp_create_user()
- *
- * @param string $username The user's username.
- * @param string $password The user's password.
- * @param string $email    The user's email.
- * @return int The new user's ID.
- */
-function create_user($username, $password, $email) {
-	_deprecated_function( __FUNCTION__, '2.0.0', 'wp_create_user()' );
-	return wp_create_user($username, $password, $email);
-}
-
-/**
- * Unused function.
- *
- * @deprecated 2.5.0
- */
-function gzip_compression() {
-	_deprecated_function( __FUNCTION__, '2.5.0' );
-	return false;
-}
-
-/**
- * Retrieve an array of comment data about comment $comment_ID.
- *
- * @since 0.71
- * @deprecated 2.7.0 Use get_comment()
- * @see get_comment()
- *
- * @param int $comment_ID The ID of the comment
- * @param int $no_cache Whether to use the cache (cast to bool)
- * @param bool $include_unapproved Whether to include unapproved comments
- * @return array The comment data
- */
-function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = false ) {
-	_deprecated_function( __FUNCTION__, '2.7.0', 'get_comment()' );
-	return get_comment($comment_ID, ARRAY_A);
-}
-
-/**
- * Retrieve the category name by the category ID.
- *
- * @since 0.71
- * @deprecated 2.8.0 Use get_cat_name()
- * @see get_cat_name()
- *
- * @param int $cat_ID Category ID
- * @return string category name
- */
-function get_catname( $cat_ID ) {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'get_cat_name()' );
-	return get_cat_name( $cat_ID );
-}
-
-/**
- * Retrieve category children list separated before and after the term IDs.
- *
- * @since 1.2.0
- * @deprecated 2.8.0 Use get_term_children()
- * @see get_term_children()
- *
- * @param int $id Category ID to retrieve children.
- * @param string $before Optional. Prepend before category term ID.
- * @param string $after Optional, default is empty string. Append after category term ID.
- * @param array $visited Optional. Category Term IDs that have already been added.
- * @return string
- */
-function get_category_children( $id, $before = '/', $after = '', $visited = array() ) {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'get_term_children()' );
-	if ( 0 == $id )
-		return '';
-
-	$chain = '';
-	/** TODO: consult hierarchy */
-	$cat_ids = get_all_category_ids();
-	foreach ( (array) $cat_ids as $cat_id ) {
-		if ( $cat_id == $id )
-			continue;
-
-		$category = get_category( $cat_id );
-		if ( is_wp_error( $category ) )
-			return $category;
-		if ( $category->parent == $id && !in_array( $category->term_id, $visited ) ) {
-			$visited[] = $category->term_id;
-			$chain .= $before.$category->term_id.$after;
-			$chain .= get_category_children( $category->term_id, $before, $after );
-		}
-	}
-	return $chain;
-}
-
-/**
- * Retrieves all category IDs.
- *
- * @since 2.0.0
- * @deprecated 4.0.0 Use get_terms()
- * @see get_terms()
- *
- * @link https://codex.wordpress.org/Function_Reference/get_all_category_ids
- *
- * @return object List of all of the category IDs.
- */
-function get_all_category_ids() {
-	_deprecated_function( __FUNCTION__, '4.0.0', 'get_terms()' );
-
-	if ( ! $cat_ids = wp_cache_get( 'all_category_ids', 'category' ) ) {
-		$cat_ids = get_terms( 'category', array('fields' => 'ids', 'get' => 'all') );
-		wp_cache_add( 'all_category_ids', $cat_ids, 'category' );
-	}
-
-	return $cat_ids;
-}
-
-/**
- * Retrieve the description of the author of the current post.
- *
- * @since 1.5.0
- * @deprecated 2.8.0 Use get_the_author_meta()
- * @see get_the_author_meta()
- *
- * @return string The author's description.
- */
-function get_the_author_description() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'description\')' );
-	return get_the_author_meta('description');
-}
-
-/**
- * Display the description of the author of the current post.
- *
- * @since 1.0.0
- * @deprecated 2.8.0 Use the_author_meta()
- * @see the_author_meta()
- */
-function the_author_description() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'description\')' );
-	the_author_meta('description');
-}
-
-/**
- * Retrieve the login name of the author of the current post.
- *
- * @since 1.5.0
- * @deprecated 2.8.0 Use get_the_author_meta()
- * @see get_the_author_meta()
- *
- * @return string The author's login name (username).
- */
-function get_the_author_login() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'login\')' );
-	return get_the_author_meta('login');
-}
-
-/**
- * Display the login name of the author of the current post.
- *
- * @since 0.71
- * @deprecated 2.8.0 Use the_author_meta()
- * @see the_author_meta()
- */
-function the_author_login() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'login\')' );
-	the_author_meta('login');
-}
-
-/**
- * Retrieve the first name of the author of the current post.
- *
- * @since 1.5.0
- * @deprecated 2.8.0 Use get_the_author_meta()
- * @see get_the_author_meta()
- *
- * @return string The author's first name.
- */
-function get_the_author_firstname() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'first_name\')' );
-	return get_the_author_meta('first_name');
-}
-
-/**
- * Display the first name of the author of the current post.
- *
- * @since 0.71
- * @deprecated 2.8.0 Use the_author_meta()
- * @see the_author_meta()
- */
-function the_author_firstname() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'first_name\')' );
-	the_author_meta('first_name');
-}
-
-/**
- * Retrieve the last name of the author of the current post.
- *
- * @since 1.5.0
- * @deprecated 2.8.0 Use get_the_author_meta()
- * @see get_the_author_meta()
- *
- * @return string The author's last name.
- */
-function get_the_author_lastname() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'last_name\')' );
-	return get_the_author_meta('last_name');
-}
-
-/**
- * Display the last name of the author of the current post.
- *
- * @since 0.71
- * @deprecated 2.8.0 Use the_author_meta()
- * @see the_author_meta()
- */
-function the_author_lastname() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'last_name\')' );
-	the_author_meta('last_name');
-}
-
-/**
- * Retrieve the nickname of the author of the current post.
- *
- * @since 1.5.0
- * @deprecated 2.8.0 Use get_the_author_meta()
- * @see get_the_author_meta()
- *
- * @return string The author's nickname.
- */
-function get_the_author_nickname() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'nickname\')' );
-	return get_the_author_meta('nickname');
-}
-
-/**
- * Display the nickname of the author of the current post.
- *
- * @since 0.71
- * @deprecated 2.8.0 Use the_author_meta()
- * @see the_author_meta()
- */
-function the_author_nickname() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'nickname\')' );
-	the_author_meta('nickname');
-}
-
-/**
- * Retrieve the email of the author of the current post.
- *
- * @since 1.5.0
- * @deprecated 2.8.0 Use get_the_author_meta()
- * @see get_the_author_meta()
- *
- * @return string The author's username.
- */
-function get_the_author_email() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'email\')' );
-	return get_the_author_meta('email');
-}
-
-/**
- * Display the email of the author of the current post.
- *
- * @since 0.71
- * @deprecated 2.8.0 Use the_author_meta()
- * @see the_author_meta()
- */
-function the_author_email() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'email\')' );
-	the_author_meta('email');
-}
-
-/**
- * Retrieve the ICQ number of the author of the current post.
- *
- * @since 1.5.0
- * @deprecated 2.8.0 Use get_the_author_meta()
- * @see get_the_author_meta()
- *
- * @return string The author's ICQ number.
- */
-function get_the_author_icq() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'icq\')' );
-	return get_the_author_meta('icq');
-}
-
-/**
- * Display the ICQ number of the author of the current post.
- *
- * @since 0.71
- * @deprecated 2.8.0 Use the_author_meta()
- * @see the_author_meta()
- */
-function the_author_icq() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'icq\')' );
-	the_author_meta('icq');
-}
-
-/**
- * Retrieve the Yahoo! IM name of the author of the current post.
- *
- * @since 1.5.0
- * @deprecated 2.8.0 Use get_the_author_meta()
- * @see get_the_author_meta()
- *
- * @return string The author's Yahoo! IM name.
- */
-function get_the_author_yim() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'yim\')' );
-	return get_the_author_meta('yim');
-}
-
-/**
- * Display the Yahoo! IM name of the author of the current post.
- *
- * @since 0.71
- * @deprecated 2.8.0 Use the_author_meta()
- * @see the_author_meta()
- */
-function the_author_yim() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'yim\')' );
-	the_author_meta('yim');
-}
-
-/**
- * Retrieve the MSN address of the author of the current post.
- *
- * @since 1.5.0
- * @deprecated 2.8.0 Use get_the_author_meta()
- * @see get_the_author_meta()
- *
- * @return string The author's MSN address.
- */
-function get_the_author_msn() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'msn\')' );
-	return get_the_author_meta('msn');
-}
-
-/**
- * Display the MSN address of the author of the current post.
- *
- * @since 0.71
- * @deprecated 2.8.0 Use the_author_meta()
- * @see the_author_meta()
- */
-function the_author_msn() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'msn\')' );
-	the_author_meta('msn');
-}
-
-/**
- * Retrieve the AIM address of the author of the current post.
- *
- * @since 1.5.0
- * @deprecated 2.8.0 Use get_the_author_meta()
- * @see get_the_author_meta()
- *
- * @return string The author's AIM address.
- */
-function get_the_author_aim() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'aim\')' );
-	return get_the_author_meta('aim');
-}
-
-/**
- * Display the AIM address of the author of the current post.
- *
- * @since 0.71
- * @deprecated 2.8.0 Use the_author_meta('aim')
- * @see the_author_meta()
- */
-function the_author_aim() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'aim\')' );
-	the_author_meta('aim');
-}
-
-/**
- * Retrieve the specified author's preferred display name.
- *
- * @since 1.0.0
- * @deprecated 2.8.0 Use get_the_author_meta()
- * @see get_the_author_meta()
- *
- * @param int $auth_id The ID of the author.
- * @return string The author's display name.
- */
-function get_author_name( $auth_id = false ) {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'display_name\')' );
-	return get_the_author_meta('display_name', $auth_id);
-}
-
-/**
- * Retrieve the URL to the home page of the author of the current post.
- *
- * @since 1.5.0
- * @deprecated 2.8.0 Use get_the_author_meta()
- * @see get_the_author_meta()
- *
- * @return string The URL to the author's page.
- */
-function get_the_author_url() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'url\')' );
-	return get_the_author_meta('url');
-}
-
-/**
- * Display the URL to the home page of the author of the current post.
- *
- * @since 0.71
- * @deprecated 2.8.0 Use the_author_meta()
- * @see the_author_meta()
- */
-function the_author_url() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'url\')' );
-	the_author_meta('url');
-}
-
-/**
- * Retrieve the ID of the author of the current post.
- *
- * @since 1.5.0
- * @deprecated 2.8.0 Use get_the_author_meta()
- * @see get_the_author_meta()
- *
- * @return string|int The author's ID.
- */
-function get_the_author_ID() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'ID\')' );
-	return get_the_author_meta('ID');
-}
-
-/**
- * Display the ID of the author of the current post.
- *
- * @since 0.71
- * @deprecated 2.8.0 Use the_author_meta()
- * @see the_author_meta()
- */
-function the_author_ID() {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'ID\')' );
-	the_author_meta('ID');
-}
-
-/**
- * Display the post content for the feed.
- *
- * For encoding the html or the $encode_html parameter, there are three possible
- * values. '0' will make urls footnotes and use make_url_footnote(). '1' will
- * encode special characters and automatically display all of the content. The
- * value of '2' will strip all HTML tags from the content.
- *
- * Also note that you cannot set the amount of words and not set the html
- * encoding. If that is the case, then the html encoding will default to 2,
- * which will strip all HTML tags.
- *
- * To restrict the amount of words of the content, you can use the cut
- * parameter. If the content is less than the amount, then there won't be any
- * dots added to the end. If there is content left over, then dots will be added
- * and the rest of the content will be removed.
- *
- * @since 0.71
- *
- * @deprecated 2.9.0 Use the_content_feed()
- * @see the_content_feed()
- *
- * @param string $more_link_text Optional. Text to display when more content is available but not displayed.
- * @param int $stripteaser Optional. Default is 0.
- * @param string $more_file Optional.
- * @param int $cut Optional. Amount of words to keep for the content.
- * @param int $encode_html Optional. How to encode the content.
- */
-function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file='', $cut = 0, $encode_html = 0) {
-	_deprecated_function( __FUNCTION__, '2.9.0', 'the_content_feed' );
-	$content = get_the_content($more_link_text, $stripteaser);
-	$content = apply_filters('the_content_rss', $content);
-	if ( $cut && !$encode_html )
-		$encode_html = 2;
-	if ( 1== $encode_html ) {
-		$content = esc_html($content);
-		$cut = 0;
-	} elseif ( 0 == $encode_html ) {
-		$content = make_url_footnote($content);
-	} elseif ( 2 == $encode_html ) {
-		$content = strip_tags($content);
-	}
-	if ( $cut ) {
-		$blah = explode(' ', $content);
-		if ( count($blah) > $cut ) {
-			$k = $cut;
-			$use_dotdotdot = 1;
-		} else {
-			$k = count($blah);
-			$use_dotdotdot = 0;
-		}
-
-		/** @todo Check performance, might be faster to use array slice instead. */
-		for ( $i=0; $i<$k; $i++ )
-			$excerpt .= $blah[$i].' ';
-		$excerpt .= ($use_dotdotdot) ? '...' : '';
-		$content = $excerpt;
-	}
-	$content = str_replace(']]>', ']]&gt;', $content);
-	echo $content;
-}
-
-/**
- * Strip HTML and put links at the bottom of stripped content.
- *
- * Searches for all of the links, strips them out of the content, and places
- * them at the bottom of the content with numbers.
- *
- * @since 0.71
- * @deprecated 2.9.0
- *
- * @param string $content Content to get links
- * @return string HTML stripped out of content with links at the bottom.
- */
-function make_url_footnote( $content ) {
-	_deprecated_function( __FUNCTION__, '2.9.0', '' );
-	preg_match_all( '/<a(.+?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches );
-	$links_summary = "\n";
-	for ( $i = 0, $c = count( $matches[0] ); $i < $c; $i++ ) {
-		$link_match = $matches[0][$i];
-		$link_number = '['.($i+1).']';
-		$link_url = $matches[2][$i];
-		$link_text = $matches[4][$i];
-		$content = str_replace( $link_match, $link_text . ' ' . $link_number, $content );
-		$link_url = ( ( strtolower( substr( $link_url, 0, 7 ) ) != 'http://' ) && ( strtolower( substr( $link_url, 0, 8 ) ) != 'https://' ) ) ? get_option( 'home' ) . $link_url : $link_url;
-		$links_summary .= "\n" . $link_number . ' ' . $link_url;
-	}
-	$content  = strip_tags( $content );
-	$content .= $links_summary;
-	return $content;
-}
-
-/**
- * Retrieve translated string with vertical bar context
- *
- * Quite a few times, there will be collisions with similar translatable text
- * found in more than two places but with different translated context.
- *
- * In order to use the separate contexts, the _c() function is used and the
- * translatable string uses a pipe ('|') which has the context the string is in.
- *
- * When the translated string is returned, it is everything before the pipe, not
- * including the pipe character. If there is no pipe in the translated text then
- * everything is returned.
- *
- * @since 2.2.0
- * @deprecated 2.9.0 Use _x()
- * @see _x()
- *
- * @param string $text Text to translate
- * @param string $domain Optional. Domain to retrieve the translated text
- * @return string Translated context string without pipe
- */
-function _c( $text, $domain = 'default' ) {
-	_deprecated_function( __FUNCTION__, '2.9.0', '_x()' );
-	return before_last_bar( translate( $text, $domain ) );
-}
-
-/**
- * Translates $text like translate(), but assumes that the text
- * contains a context after its last vertical bar.
- *
- * @since 2.5.0
- * @deprecated 3.0.0 Use _x()
- * @see _x()
- *
- * @param string $text Text to translate
- * @param string $domain Domain to retrieve the translated text
- * @return string Translated text
- */
-function translate_with_context( $text, $domain = 'default' ) {
-	_deprecated_function( __FUNCTION__, '2.9.0', '_x()' );
-	return before_last_bar( translate( $text, $domain ) );
-}
-
-/**
- * Legacy version of _n(), which supports contexts.
- *
- * Strips everything from the translation after the last bar.
- *
- * @since 2.7.0
- * @deprecated 3.0.0 Use _nx()
- * @see _nx()
- *
- * @param string $single The text to be used if the number is singular.
- * @param string $plural The text to be used if the number is plural.
- * @param int    $number The number to compare against to use either the singular or plural form.
- * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
- *                       Default 'default'.
- * @return string The translated singular or plural form.
- */
-function _nc( $single, $plural, $number, $domain = 'default' ) {
-	_deprecated_function( __FUNCTION__, '2.9.0', '_nx()' );
-	return before_last_bar( _n( $single, $plural, $number, $domain ) );
-}
-
-/**
- * Retrieve the plural or single form based on the amount.
- *
- * @since 1.2.0
- * @deprecated 2.8.0 Use _n()
- * @see _n()
- */
-function __ngettext() {
-	_deprecated_function( __FUNCTION__, '2.8.0', '_n()' );
-	$args = func_get_args();
-	return call_user_func_array('_n', $args);
-}
-
-/**
- * Register plural strings in POT file, but don't translate them.
- *
- * @since 2.5.0
- * @deprecated 2.8.0 Use _n_noop()
- * @see _n_noop()
- */
-function __ngettext_noop() {
-	_deprecated_function( __FUNCTION__, '2.8.0', '_n_noop()' );
-	$args = func_get_args();
-	return call_user_func_array('_n_noop', $args);
-
-}
-
-/**
- * Retrieve all autoload options, or all options if no autoloaded ones exist.
- *
- * @since 1.0.0
- * @deprecated 3.0.0 Use wp_load_alloptions())
- * @see wp_load_alloptions()
- *
- * @return array List of all options.
- */
-function get_alloptions() {
-	_deprecated_function( __FUNCTION__, '3.0.0', 'wp_load_alloptions()' );
-	return wp_load_alloptions();
-}
-
-/**
- * Retrieve HTML content of attachment image with link.
- *
- * @since 2.0.0
- * @deprecated 2.5.0 Use wp_get_attachment_link()
- * @see wp_get_attachment_link()
- *
- * @param int $id Optional. Post ID.
- * @param bool $fullsize Optional, default is false. Whether to use full size image.
- * @param array $max_dims Optional. Max image dimensions.
- * @param bool $permalink Optional, default is false. Whether to include permalink to image.
- * @return string
- */
-function get_the_attachment_link($id = 0, $fullsize = false, $max_dims = false, $permalink = false) {
-	_deprecated_function( __FUNCTION__, '2.5.0', 'wp_get_attachment_link()' );
-	$id = (int) $id;
-	$_post = get_post($id);
-
-	if ( ('attachment' != $_post->post_type) || !$url = wp_get_attachment_url($_post->ID) )
-		return __('Missing Attachment');
-
-	if ( $permalink )
-		$url = get_attachment_link($_post->ID);
-
-	$post_title = esc_attr($_post->post_title);
-
-	$innerHTML = get_attachment_innerHTML($_post->ID, $fullsize, $max_dims);
-	return "<a href='$url' title='$post_title'>$innerHTML</a>";
-}
-
-/**
- * Retrieve icon URL and Path.
- *
- * @since 2.1.0
- * @deprecated 2.5.0 Use wp_get_attachment_image_src()
- * @see wp_get_attachment_image_src()
- *
- * @param int $id Optional. Post ID.
- * @param bool $fullsize Optional, default to false. Whether to have full image.
- * @return array Icon URL and full path to file, respectively.
- */
-function get_attachment_icon_src( $id = 0, $fullsize = false ) {
-	_deprecated_function( __FUNCTION__, '2.5.0', 'wp_get_attachment_image_src()' );
-	$id = (int) $id;
-	if ( !$post = get_post($id) )
-		return false;
-
-	$file = get_attached_file( $post->ID );
-
-	if ( !$fullsize && $src = wp_get_attachment_thumb_url( $post->ID ) ) {
-		// We have a thumbnail desired, specified and existing
-
-		$src_file = basename($src);
-	} elseif ( wp_attachment_is_image( $post->ID ) ) {
-		// We have an image without a thumbnail
-
-		$src = wp_get_attachment_url( $post->ID );
-		$src_file = & $file;
-	} elseif ( $src = wp_mime_type_icon( $post->ID ) ) {
-		// No thumb, no image. We'll look for a mime-related icon instead.
-
-		$icon_dir = apply_filters( 'icon_dir', get_template_directory() . '/images' );
-		$src_file = $icon_dir . '/' . basename($src);
-	}
-
-	if ( !isset($src) || !$src )
-		return false;
-
-	return array($src, $src_file);
-}
-
-/**
- * Retrieve HTML content of icon attachment image element.
- *
- * @since 2.0.0
- * @deprecated 2.5.0 Use wp_get_attachment_image()
- * @see wp_get_attachment_image()
- *
- * @param int $id Optional. Post ID.
- * @param bool $fullsize Optional, default to false. Whether to have full size image.
- * @param array $max_dims Optional. Dimensions of image.
- * @return false|string HTML content.
- */
-function get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false ) {
-	_deprecated_function( __FUNCTION__, '2.5.0', 'wp_get_attachment_image()' );
-	$id = (int) $id;
-	if ( !$post = get_post($id) )
-		return false;
-
-	if ( !$src = get_attachment_icon_src( $post->ID, $fullsize ) )
-		return false;
-
-	list($src, $src_file) = $src;
-
-	// Do we need to constrain the image?
-	if ( ($max_dims = apply_filters('attachment_max_dims', $max_dims)) && file_exists($src_file) ) {
-
-		$imagesize = getimagesize($src_file);
-
-		if (($imagesize[0] > $max_dims[0]) || $imagesize[1] > $max_dims[1] ) {
-			$actual_aspect = $imagesize[0] / $imagesize[1];
-			$desired_aspect = $max_dims[0] / $max_dims[1];
-
-			if ( $actual_aspect >= $desired_aspect ) {
-				$height = $actual_aspect * $max_dims[0];
-				$constraint = "width='{$max_dims[0]}' ";
-				$post->iconsize = array($max_dims[0], $height);
-			} else {
-				$width = $max_dims[1] / $actual_aspect;
-				$constraint = "height='{$max_dims[1]}' ";
-				$post->iconsize = array($width, $max_dims[1]);
-			}
-		} else {
-			$post->iconsize = array($imagesize[0], $imagesize[1]);
-			$constraint = '';
-		}
-	} else {
-		$constraint = '';
-	}
-
-	$post_title = esc_attr($post->post_title);
-
-	$icon = "<img src='$src' title='$post_title' alt='$post_title' $constraint/>";
-
-	return apply_filters( 'attachment_icon', $icon, $post->ID );
-}
-
-/**
- * Retrieve HTML content of image element.
- *
- * @since 2.0.0
- * @deprecated 2.5.0 Use wp_get_attachment_image()
- * @see wp_get_attachment_image()
- *
- * @param int $id Optional. Post ID.
- * @param bool $fullsize Optional, default to false. Whether to have full size image.
- * @param array $max_dims Optional. Dimensions of image.
- * @return false|string
- */
-function get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false) {
-	_deprecated_function( __FUNCTION__, '2.5.0', 'wp_get_attachment_image()' );
-	$id = (int) $id;
-	if ( !$post = get_post($id) )
-		return false;
-
-	if ( $innerHTML = get_attachment_icon($post->ID, $fullsize, $max_dims))
-		return $innerHTML;
-
-	$innerHTML = esc_attr($post->post_title);
-
-	return apply_filters('attachment_innerHTML', $innerHTML, $post->ID);
-}
-
-/**
- * Retrieves bookmark data based on ID.
- *
- * @since 2.0.0
- * @deprecated 2.1.0 Use get_bookmark()
- * @see get_bookmark()
- *
- * @param int    $bookmark_id ID of link
- * @param string $output      Optional. Type of output. Accepts OBJECT, ARRAY_N, or ARRAY_A.
- *                            Default OBJECT.
- * @param string $filter      Optional. How to filter the link for output. Accepts 'raw', 'edit',
- *                            'attribute', 'js', 'db', or 'display'. Default 'raw'.
- * @return object|array Bookmark object or array, depending on the type specified by `$output`.
- */
-function get_link( $bookmark_id, $output = OBJECT, $filter = 'raw' ) {
-	_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmark()' );
-	return get_bookmark($bookmark_id, $output, $filter);
-}
-
-/**
- * Performs esc_url() for database or redirect usage.
- *
- * @since 2.3.1
- * @deprecated 2.8.0 Use esc_url_raw()
- * @see esc_url_raw()
- *
- * @param string $url The URL to be cleaned.
- * @param array $protocols An array of acceptable protocols.
- * @return string The cleaned URL.
- */
-function sanitize_url( $url, $protocols = null ) {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'esc_url_raw()' );
-	return esc_url_raw( $url, $protocols );
-}
-
-/**
- * Checks and cleans a URL.
- *
- * A number of characters are removed from the URL. If the URL is for displaying
- * (the default behaviour) ampersands are also replaced. The 'clean_url' filter
- * is applied to the returned cleaned URL.
- *
- * @since 1.2.0
- * @deprecated 3.0.0 Use esc_url()
- * @see Alias for esc_url()
- *
- * @param string $url The URL to be cleaned.
- * @param array $protocols Optional. An array of acceptable protocols.
- * @param string $context Optional. How the URL will be used. Default is 'display'.
- * @return string The cleaned $url after the {@see 'clean_url'} filter is applied.
- */
-function clean_url( $url, $protocols = null, $context = 'display' ) {
-	if ( $context == 'db' )
-		_deprecated_function( 'clean_url( $context = \'db\' )', '3.0.0', 'esc_url_raw()' );
-	else
-		_deprecated_function( __FUNCTION__, '3.0.0', 'esc_url()' );
-	return esc_url( $url, $protocols, $context );
-}
-
-/**
- * Escape single quotes, specialchar double quotes, and fix line endings.
- *
- * The filter {@see 'js_escape'} is also applied by esc_js().
- *
- * @since 2.0.4
- * @deprecated 2.8.0 Use esc_js()
- * @see esc_js()
- *
- * @param string $text The text to be escaped.
- * @return string Escaped text.
- */
-function js_escape( $text ) {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'esc_js()' );
-	return esc_js( $text );
-}
-
-/**
- * Legacy escaping for HTML blocks.
- *
- * @deprecated 2.8.0 Use esc_html()
- * @see esc_html()
- *
- * @param string       $string        String to escape.
- * @param string       $quote_style   Unused.
- * @param false|string $charset       Unused.
- * @param false        $double_encode Whether to double encode. Unused.
- * @return string Escaped `$string`.
- */
-function wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'esc_html()' );
-	if ( func_num_args() > 1 ) { // Maintain back-compat for people passing additional arguments.
-		$args = func_get_args();
-		return call_user_func_array( '_wp_specialchars', $args );
-	} else {
-		return esc_html( $string );
-	}
-}
-
-/**
- * Escaping for HTML attributes.
- *
- * @since 2.0.6
- * @deprecated 2.8.0 Use esc_attr()
- * @see esc_attr()
- *
- * @param string $text
- * @return string
- */
-function attribute_escape( $text ) {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'esc_attr()' );
-	return esc_attr( $text );
-}
-
-/**
- * Register widget for sidebar with backward compatibility.
- *
- * Allows $name to be an array that accepts either three elements to grab the
- * first element and the third for the name or just uses the first element of
- * the array for the name.
- *
- * Passes to wp_register_sidebar_widget() after argument list and backward
- * compatibility is complete.
- *
- * @since 2.2.0
- * @deprecated 2.8.0 Use wp_register_sidebar_widget()
- * @see wp_register_sidebar_widget()
- *
- * @param string|int $name            Widget ID.
- * @param callable   $output_callback Run when widget is called.
- * @param string     $classname       Optional. Classname widget option. Default empty.
- * @param mixed      $params ,...     Widget parameters.
- */
-function register_sidebar_widget($name, $output_callback, $classname = '') {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'wp_register_sidebar_widget()' );
-	// Compat
-	if ( is_array($name) ) {
-		if ( count($name) == 3 )
-			$name = sprintf($name[0], $name[2]);
-		else
-			$name = $name[0];
-	}
-
-	$id = sanitize_title($name);
-	$options = array();
-	if ( !empty($classname) && is_string($classname) )
-		$options['classname'] = $classname;
-	$params = array_slice(func_get_args(), 2);
-	$args = array($id, $name, $output_callback, $options);
-	if ( !empty($params) )
-		$args = array_merge($args, $params);
-
-	call_user_func_array('wp_register_sidebar_widget', $args);
-}
-
-/**
- * Serves as an alias of wp_unregister_sidebar_widget().
- *
- * @since 2.2.0
- * @deprecated 2.8.0 Use wp_unregister_sidebar_widget()
- * @see wp_unregister_sidebar_widget()
- *
- * @param int|string $id Widget ID.
- */
-function unregister_sidebar_widget($id) {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'wp_unregister_sidebar_widget()' );
-	return wp_unregister_sidebar_widget($id);
-}
-
-/**
- * Registers widget control callback for customizing options.
- *
- * Allows $name to be an array that accepts either three elements to grab the
- * first element and the third for the name or just uses the first element of
- * the array for the name.
- *
- * Passes to wp_register_widget_control() after the argument list has
- * been compiled.
- *
- * @since 2.2.0
- * @deprecated 2.8.0 Use wp_register_widget_control()
- * @see wp_register_widget_control()
- *
- * @param int|string $name Sidebar ID.
- * @param callable $control_callback Widget control callback to display and process form.
- * @param int $width Widget width.
- * @param int $height Widget height.
- */
-function register_widget_control($name, $control_callback, $width = '', $height = '') {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'wp_register_widget_control()' );
-	// Compat
-	if ( is_array($name) ) {
-		if ( count($name) == 3 )
-			$name = sprintf($name[0], $name[2]);
-		else
-			$name = $name[0];
-	}
-
-	$id = sanitize_title($name);
-	$options = array();
-	if ( !empty($width) )
-		$options['width'] = $width;
-	if ( !empty($height) )
-		$options['height'] = $height;
-	$params = array_slice(func_get_args(), 4);
-	$args = array($id, $name, $control_callback, $options);
-	if ( !empty($params) )
-		$args = array_merge($args, $params);
-
-	call_user_func_array('wp_register_widget_control', $args);
-}
-
-/**
- * Alias of wp_unregister_widget_control().
- *
- * @since 2.2.0
- * @deprecated 2.8.0 Use wp_unregister_widget_control()
- * @see wp_unregister_widget_control()
- *
- * @param int|string $id Widget ID.
- */
-function unregister_widget_control($id) {
-	_deprecated_function( __FUNCTION__, '2.8.0', 'wp_unregister_widget_control()' );
-	return wp_unregister_widget_control($id);
-}
-
-/**
- * Remove user meta data.
- *
- * @since 2.0.0
- * @deprecated 3.0.0 Use delete_user_meta()
- * @see delete_user_meta()
- *
- * @param int $user_id User ID.
- * @param string $meta_key Metadata key.
- * @param mixed $meta_value Metadata value.
- * @return bool True deletion completed and false if user_id is not a number.
- */
-function delete_usermeta( $user_id, $meta_key, $meta_value = '' ) {
-	_deprecated_function( __FUNCTION__, '3.0.0', 'delete_user_meta()' );
-	global $wpdb;
-	if ( !is_numeric( $user_id ) )
-		return false;
-	$meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key);
-
-	if ( is_array($meta_value) || is_object($meta_value) )
-		$meta_value = serialize($meta_value);
-	$meta_value = trim( $meta_value );
-
-	$cur = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) );
-
-	if ( $cur && $cur->umeta_id )
-		do_action( 'delete_usermeta', $cur->umeta_id, $user_id, $meta_key, $meta_value );
-
-	if ( ! empty($meta_value) )
-		$wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s AND meta_value = %s", $user_id, $meta_key, $meta_value) );
-	else
-		$wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) );
-
-	clean_user_cache( $user_id );
-	wp_cache_delete( $user_id, 'user_meta' );
-
-	if ( $cur && $cur->umeta_id )
-		do_action( 'deleted_usermeta', $cur->umeta_id, $user_id, $meta_key, $meta_value );
-
-	return true;
-}
-
-/**
- * Retrieve user metadata.
- *
- * If $user_id is not a number, then the function will fail over with a 'false'
- * boolean return value. Other returned values depend on whether there is only
- * one item to be returned, which be that single item type. If there is more
- * than one metadata value, then it will be list of metadata values.
- *
- * @since 2.0.0
- * @deprecated 3.0.0 Use get_user_meta()
- * @see get_user_meta()
- *
- * @param int $user_id User ID
- * @param string $meta_key Optional. Metadata key.
- * @return mixed
- */
-function get_usermeta( $user_id, $meta_key = '' ) {
-	_deprecated_function( __FUNCTION__, '3.0.0', 'get_user_meta()' );
-	global $wpdb;
-	$user_id = (int) $user_id;
-
-	if ( !$user_id )
-		return false;
-
-	if ( !empty($meta_key) ) {
-		$meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key);
-		$user = wp_cache_get($user_id, 'users');
-		// Check the cached user object
-		if ( false !== $user && isset($user->$meta_key) )
-			$metas = array($user->$meta_key);
-		else
-			$metas = $wpdb->get_col( $wpdb->prepare("SELECT meta_value FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) );
-	} else {
-		$metas = $wpdb->get_col( $wpdb->prepare("SELECT meta_value FROM $wpdb->usermeta WHERE user_id = %d", $user_id) );
-	}
-
-	if ( empty($metas) ) {
-		if ( empty($meta_key) )
-			return array();
-		else
-			return '';
-	}
-
-	$metas = array_map('maybe_unserialize', $metas);
-
-	if ( count($metas) == 1 )
-		return $metas[0];
-	else
-		return $metas;
-}
-
-/**
- * Update metadata of user.
- *
- * There is no need to serialize values, they will be serialized if it is
- * needed. The metadata key can only be a string with underscores. All else will
- * be removed.
- *
- * Will remove the metadata, if the meta value is empty.
- *
- * @since 2.0.0
- * @deprecated 3.0.0 Use update_user_meta()
- * @see update_user_meta()
- *
- * @param int $user_id User ID
- * @param string $meta_key Metadata key.
- * @param mixed $meta_value Metadata value.
- * @return bool True on successful update, false on failure.
- */
-function update_usermeta( $user_id, $meta_key, $meta_value ) {
-	_deprecated_function( __FUNCTION__, '3.0.0', 'update_user_meta()' );
-	global $wpdb;
-	if ( !is_numeric( $user_id ) )
-		return false;
-	$meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key);
-
-	/** @todo Might need fix because usermeta data is assumed to be already escaped */
-	if ( is_string($meta_value) )
-		$meta_value = stripslashes($meta_value);
-	$meta_value = maybe_serialize($meta_value);
-
-	if (empty($meta_value)) {
-		return delete_usermeta($user_id, $meta_key);
-	}
-
-	$cur = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) );
-
-	if ( $cur )
-		do_action( 'update_usermeta', $cur->umeta_id, $user_id, $meta_key, $meta_value );
-
-	if ( !$cur )
-		$wpdb->insert($wpdb->usermeta, compact('user_id', 'meta_key', 'meta_value') );
-	elseif ( $cur->meta_value != $meta_value )
-		$wpdb->update($wpdb->usermeta, compact('meta_value'), compact('user_id', 'meta_key') );
-	else
-		return false;
-
-	clean_user_cache( $user_id );
-	wp_cache_delete( $user_id, 'user_meta' );
-
-	if ( !$cur )
-		do_action( 'added_usermeta', $wpdb->insert_id, $user_id, $meta_key, $meta_value );
-	else
-		do_action( 'updated_usermeta', $cur->umeta_id, $user_id, $meta_key, $meta_value );
-
-	return true;
-}
-
-/**
- * Get users for the site.
- *
- * For setups that use the multisite feature. Can be used outside of the
- * multisite feature.
- *
- * @since 2.2.0
- * @deprecated 3.1.0 Use get_users()
- * @see get_users()
- *
- * @global wpdb $wpdb    WordPress database abstraction object.
- *
- * @param int $id Site ID.
- * @return array List of users that are part of that site ID
- */
-function get_users_of_blog( $id = '' ) {
-	_deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
-
-	global $wpdb;
-	if ( empty( $id ) ) {
-		$id = get_current_blog_id();
-	}
-	$blog_prefix = $wpdb->get_blog_prefix($id);
-	$users = $wpdb->get_results( "SELECT user_id, user_id AS ID, user_login, display_name, user_email, meta_value FROM $wpdb->users, $wpdb->usermeta WHERE {$wpdb->users}.ID = {$wpdb->usermeta}.user_id AND meta_key = '{$blog_prefix}capabilities' ORDER BY {$wpdb->usermeta}.user_id" );
-	return $users;
-}
-
-/**
- * Enable/disable automatic general feed link outputting.
- *
- * @since 2.8.0
- * @deprecated 3.0.0 Use add_theme_support()
- * @see add_theme_support()
- *
- * @param bool $add Optional, default is true. Add or remove links. Defaults to true.
- */
-function automatic_feed_links( $add = true ) {
-	_deprecated_function( __FUNCTION__, '3.0.0', "add_theme_support( 'automatic-feed-links' )" );
-
-	if ( $add )
-		add_theme_support( 'automatic-feed-links' );
-	else
-		remove_action( 'wp_head', 'feed_links_extra', 3 ); // Just do this yourself in 3.0+
-}
-
-/**
- * Retrieve user data based on field.
- *
- * @since 1.5.0
- * @deprecated 3.0.0 Use get_the_author_meta()
- * @see get_the_author_meta()
- *
- * @param string    $field User meta field.
- * @param false|int $user Optional. User ID to retrieve the field for. Default false (current user).
- * @return string The author's field from the current author's DB object.
- */
-function get_profile( $field, $user = false ) {
-	_deprecated_function( __FUNCTION__, '3.0.0', 'get_the_author_meta()' );
-	if ( $user ) {
-		$user = get_user_by( 'login', $user );
-		$user = $user->ID;
-	}
-	return get_the_author_meta( $field, $user );
-}
-
-/**
- * Retrieves the number of posts a user has written.
- *
- * @since 0.71
- * @deprecated 3.0.0 Use count_user_posts()
- * @see count_user_posts()
- *
- * @param int $userid User to count posts for.
- * @return int Number of posts the given user has written.
- */
-function get_usernumposts( $userid ) {
-	_deprecated_function( __FUNCTION__, '3.0.0', 'count_user_posts()' );
-	return count_user_posts( $userid );
-}
-
-/**
- * Callback used to change %uXXXX to &#YYY; syntax
- *
- * @since 2.8.0
- * @access private
- * @deprecated 3.0.0
- *
- * @param array $matches Single Match
- * @return string An HTML entity
- */
-function funky_javascript_callback($matches) {
-	return "&#".base_convert($matches[1],16,10).";";
-}
-
-/**
- * Fixes JavaScript bugs in browsers.
- *
- * Converts unicode characters to HTML numbered entities.
- *
- * @since 1.5.0
- * @deprecated 3.0.0
- *
- * @global $is_macIE
- * @global $is_winIE
- *
- * @param string $text Text to be made safe.
- * @return string Fixed text.
- */
-function funky_javascript_fix($text) {
-	_deprecated_function( __FUNCTION__, '3.0.0' );
-	// Fixes for browsers' JavaScript bugs.
-	global $is_macIE, $is_winIE;
-
-	if ( $is_winIE || $is_macIE )
-		$text =  preg_replace_callback("/\%u([0-9A-F]{4,4})/",
-					"funky_javascript_callback",
-					$text);
-
-	return $text;
-}
-
-/**
- * Checks that the taxonomy name exists.
- *
- * @since 2.3.0
- * @deprecated 3.0.0 Use taxonomy_exists()
- * @see taxonomy_exists()
- *
- * @param string $taxonomy Name of taxonomy object
- * @return bool Whether the taxonomy exists.
- */
-function is_taxonomy( $taxonomy ) {
-	_deprecated_function( __FUNCTION__, '3.0.0', 'taxonomy_exists()' );
-	return taxonomy_exists( $taxonomy );
-}
-
-/**
- * Check if Term exists.
- *
- * @since 2.3.0
- * @deprecated 3.0.0 Use term_exists()
- * @see term_exists()
- *
- * @param int|string $term The term to check
- * @param string $taxonomy The taxonomy name to use
- * @param int $parent ID of parent term under which to confine the exists search.
- * @return mixed Get the term id or Term Object, if exists.
- */
-function is_term( $term, $taxonomy = '', $parent = 0 ) {
-	_deprecated_function( __FUNCTION__, '3.0.0', 'term_exists()' );
-	return term_exists( $term, $taxonomy, $parent );
-}
-
-/**
- * Is the current admin page generated by a plugin?
- *
- * Use global $plugin_page and/or get_plugin_page_hookname() hooks.
- *
- * @since 1.5.0
- * @deprecated 3.1.0
- *
- * @global $plugin_page
- *
- * @return bool
- */
-function is_plugin_page() {
-	_deprecated_function( __FUNCTION__, '3.1.0'  );
-
-	global $plugin_page;
-
-	if ( isset($plugin_page) )
-		return true;
-
-	return false;
-}
-
-/**
- * Update the categories cache.
- *
- * This function does not appear to be used anymore or does not appear to be
- * needed. It might be a legacy function left over from when there was a need
- * for updating the category cache.
- *
- * @since 1.5.0
- * @deprecated 3.1.0
- *
- * @return bool Always return True
- */
-function update_category_cache() {
-	_deprecated_function( __FUNCTION__, '3.1.0'  );
-
-	return true;
-}
-
-/**
- * Check for PHP timezone support
- *
- * @since 2.9.0
- * @deprecated 3.2.0
- *
- * @return bool
- */
-function wp_timezone_supported() {
-	_deprecated_function( __FUNCTION__, '3.2.0' );
-
-	return true;
-}
-
-/**
- * Displays an editor: TinyMCE, HTML, or both.
- *
- * @since 2.1.0
- * @deprecated 3.3.0 Use wp_editor()
- * @see wp_editor()
- *
- * @param string $content       Textarea content.
- * @param string $id            Optional. HTML ID attribute value. Default 'content'.
- * @param string $prev_id       Optional. Unused.
- * @param bool   $media_buttons Optional. Whether to display media buttons. Default true.
- * @param int    $tab_index     Optional. Unused.
- * @param bool   $extended      Optional. Unused.
- */
-function the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2, $extended = true) {
-	_deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
-
-	wp_editor( $content, $id, array( 'media_buttons' => $media_buttons ) );
-}
-
-/**
- * Perform the query to get the $metavalues array(s) needed by _fill_user and _fill_many_users
- *
- * @since 3.0.0
- * @deprecated 3.3.0
- *
- * @param array $ids User ID numbers list.
- * @return array of arrays. The array is indexed by user_id, containing $metavalues object arrays.
- */
-function get_user_metavalues($ids) {
-	_deprecated_function( __FUNCTION__, '3.3.0' );
-
-	$objects = array();
-
-	$ids = array_map('intval', $ids);
-	foreach ( $ids as $id )
-		$objects[$id] = array();
-
-	$metas = update_meta_cache('user', $ids);
-
-	foreach ( $metas as $id => $meta ) {
-		foreach ( $meta as $key => $metavalues ) {
-			foreach ( $metavalues as $value ) {
-				$objects[$id][] = (object)array( 'user_id' => $id, 'meta_key' => $key, 'meta_value' => $value);
-			}
-		}
-	}
-
-	return $objects;
-}
-
-/**
- * Sanitize every user field.
- *
- * If the context is 'raw', then the user object or array will get minimal santization of the int fields.
- *
- * @since 2.3.0
- * @deprecated 3.3.0
- *
- * @param object|array $user The User Object or Array
- * @param string $context Optional, default is 'display'. How to sanitize user fields.
- * @return object|array The now sanitized User Object or Array (will be the same type as $user)
- */
-function sanitize_user_object($user, $context = 'display') {
-	_deprecated_function( __FUNCTION__, '3.3.0' );
-
-	if ( is_object($user) ) {
-		if ( !isset($user->ID) )
-			$user->ID = 0;
-		if ( ! ( $user instanceof WP_User ) ) {
-			$vars = get_object_vars($user);
-			foreach ( array_keys($vars) as $field ) {
-				if ( is_string($user->$field) || is_numeric($user->$field) )
-					$user->$field = sanitize_user_field($field, $user->$field, $user->ID, $context);
-			}
-		}
-		$user->filter = $context;
-	} else {
-		if ( !isset($user['ID']) )
-			$user['ID'] = 0;
-		foreach ( array_keys($user) as $field )
-			$user[$field] = sanitize_user_field($field, $user[$field], $user['ID'], $context);
-		$user['filter'] = $context;
-	}
-
-	return $user;
-}
-
-/**
- * Get boundary post relational link.
- *
- * Can either be start or end post relational link.
- *
- * @since 2.8.0
- * @deprecated 3.3.0
- *
- * @param string $title Optional. Link title format.
- * @param bool $in_same_cat Optional. Whether link should be in a same category.
- * @param string $excluded_categories Optional. Excluded categories IDs.
- * @param bool $start Optional, default is true. Whether to display link to first or last post.
- * @return string
- */
-function get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '', $start = true) {
-	_deprecated_function( __FUNCTION__, '3.3.0' );
-
-	$posts = get_boundary_post($in_same_cat, $excluded_categories, $start);
-	// If there is no post stop.
-	if ( empty($posts) )
-		return;
-
-	// Even though we limited get_posts to return only 1 item it still returns an array of objects.
-	$post = $posts[0];
-
-	if ( empty($post->post_title) )
-		$post->post_title = $start ? __('First Post') : __('Last Post');
-
-	$date = mysql2date(get_option('date_format'), $post->post_date);
-
-	$title = str_replace('%title', $post->post_title, $title);
-	$title = str_replace('%date', $date, $title);
-	$title = apply_filters('the_title', $title, $post->ID);
-
-	$link = $start ? "<link rel='start' title='" : "<link rel='end' title='";
-	$link .= esc_attr($title);
-	$link .= "' href='" . get_permalink($post) . "' />\n";
-
-	$boundary = $start ? 'start' : 'end';
-	return apply_filters( "{$boundary}_post_rel_link", $link );
-}
-
-/**
- * Display relational link for the first post.
- *
- * @since 2.8.0
- * @deprecated 3.3.0
- *
- * @param string $title Optional. Link title format.
- * @param bool $in_same_cat Optional. Whether link should be in a same category.
- * @param string $excluded_categories Optional. Excluded categories IDs.
- */
-function start_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '') {
-	_deprecated_function( __FUNCTION__, '3.3.0' );
-
-	echo get_boundary_post_rel_link($title, $in_same_cat, $excluded_categories, true);
-}
-
-/**
- * Get site index relational link.
- *
- * @since 2.8.0
- * @deprecated 3.3.0
- *
- * @return string
- */
-function get_index_rel_link() {
-	_deprecated_function( __FUNCTION__, '3.3.0' );
-
-	$link = "<link rel='index' title='" . esc_attr( get_bloginfo( 'name', 'display' ) ) . "' href='" . esc_url( user_trailingslashit( get_bloginfo( 'url', 'display' ) ) ) . "' />\n";
-	return apply_filters( "index_rel_link", $link );
-}
-
-/**
- * Display relational link for the site index.
- *
- * @since 2.8.0
- * @deprecated 3.3.0
- */
-function index_rel_link() {
-	_deprecated_function( __FUNCTION__, '3.3.0' );
-
-	echo get_index_rel_link();
-}
-
-/**
- * Get parent post relational link.
- *
- * @since 2.8.0
- * @deprecated 3.3.0
- *
- * @param string $title Optional. Link title format. Default '%title'.
- * @return string
- */
-function get_parent_post_rel_link( $title = '%title' ) {
-	_deprecated_function( __FUNCTION__, '3.3.0' );
-
-	if ( ! empty( $GLOBALS['post'] ) && ! empty( $GLOBALS['post']->post_parent ) )
-		$post = get_post($GLOBALS['post']->post_parent);
-
-	if ( empty($post) )
-		return;
-
-	$date = mysql2date(get_option('date_format'), $post->post_date);
-
-	$title = str_replace('%title', $post->post_title, $title);
-	$title = str_replace('%date', $date, $title);
-	$title = apply_filters('the_title', $title, $post->ID);
-
-	$link = "<link rel='up' title='";
-	$link .= esc_attr( $title );
-	$link .= "' href='" . get_permalink($post) . "' />\n";
-
-	return apply_filters( "parent_post_rel_link", $link );
-}
-
-/**
- * Display relational link for parent item
- *
- * @since 2.8.0
- * @deprecated 3.3.0
- *
- * @param string $title Optional. Link title format. Default '%title'.
- */
-function parent_post_rel_link( $title = '%title' ) {
-	_deprecated_function( __FUNCTION__, '3.3.0' );
-
-	echo get_parent_post_rel_link($title);
-}
-
-/**
- * Add the "Dashboard"/"Visit Site" menu.
- *
- * @since 3.2.0
- * @deprecated 3.3.0
- *
- * @param WP_Admin_Bar $wp_admin_bar WP_Admin_Bar instance.
- */
-function wp_admin_bar_dashboard_view_site_menu( $wp_admin_bar ) {
-	_deprecated_function( __FUNCTION__, '3.3.0' );
-
-	$user_id = get_current_user_id();
-
-	if ( 0 != $user_id ) {
-		if ( is_admin() )
-			$wp_admin_bar->add_menu( array( 'id' => 'view-site', 'title' => __( 'Visit Site' ), 'href' => home_url() ) );
-		elseif ( is_multisite() )
-			$wp_admin_bar->add_menu( array( 'id' => 'dashboard', 'title' => __( 'Dashboard' ), 'href' => get_dashboard_url( $user_id ) ) );
-		else
-			$wp_admin_bar->add_menu( array( 'id' => 'dashboard', 'title' => __( 'Dashboard' ), 'href' => admin_url() ) );
-	}
-}
-
-/**
- * Checks if the current user belong to a given site.
- *
- * @since MU
- * @deprecated 3.3.0 Use is_user_member_of_blog()
- * @see is_user_member_of_blog()
- *
- * @param int $blog_id Site ID
- * @return bool True if the current users belong to $blog_id, false if not.
- */
-function is_blog_user( $blog_id = 0 ) {
-	_deprecated_function( __FUNCTION__, '3.3.0', 'is_user_member_of_blog()' );
-
-	return is_user_member_of_blog( get_current_user_id(), $blog_id );
-}
-
-/**
- * Open the file handle for debugging.
- *
- * @since 0.71
- * @deprecated 3.4.0 Use error_log()
- * @see error_log()
- *
- * @link https://secure.php.net/manual/en/function.error-log.php
- *
- * @param string $filename File name.
- * @param string $mode     Type of access you required to the stream.
- * @return false Always false.
- */
-function debug_fopen( $filename, $mode ) {
-	_deprecated_function( __FUNCTION__, 'error_log()' );
-	return false;
-}
-
-/**
- * Write contents to the file used for debugging.
- *
- * @since 0.71
- * @deprecated 3.4.0 Use error_log()
- * @see error_log()
- *
- * @link https://secure.php.net/manual/en/function.error-log.php
- *
- * @param mixed  $fp     Unused.
- * @param string $string Message to log.
- */
-function debug_fwrite( $fp, $string ) {
-	_deprecated_function( __FUNCTION__, 'error_log()' );
-	if ( ! empty( $GLOBALS['debug'] ) )
-		error_log( $string );
-}
-
-/**
- * Close the debugging file handle.
- *
- * @since 0.71
- * @deprecated 3.4.0 Use error_log()
- * @see error_log()
- *
- * @link https://secure.php.net/manual/en/function.error-log.php
- *
- * @param mixed $fp Unused.
- */
-function debug_fclose( $fp ) {
-	_deprecated_function( __FUNCTION__, 'error_log()' );
-}
-
-/**
- * Retrieve list of themes with theme data in theme directory.
- *
- * The theme is broken, if it doesn't have a parent theme and is missing either
- * style.css and, or index.php. If the theme has a parent theme then it is
- * broken, if it is missing style.css; index.php is optional.
- *
- * @since 1.5.0
- * @deprecated 3.4.0 Use wp_get_themes()
- * @see wp_get_themes()
- *
- * @return array Theme list with theme data.
- */
-function get_themes() {
-	_deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_themes()' );
-
-	global $wp_themes;
-	if ( isset( $wp_themes ) )
-		return $wp_themes;
-
-	$themes = wp_get_themes();
-	$wp_themes = array();
-
-	foreach ( $themes as $theme ) {
-		$name = $theme->get('Name');
-		if ( isset( $wp_themes[ $name ] ) )
-			$wp_themes[ $name . '/' . $theme->get_stylesheet() ] = $theme;
-		else
-			$wp_themes[ $name ] = $theme;
-	}
-
-	return $wp_themes;
-}
-
-/**
- * Retrieve theme data.
- *
- * @since 1.5.0
- * @deprecated 3.4.0 Use wp_get_theme()
- * @see wp_get_theme()
- *
- * @param string $theme Theme name.
- * @return array|null Null, if theme name does not exist. Theme data, if exists.
- */
-function get_theme( $theme ) {
-	_deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme( $stylesheet )' );
-
-	$themes = get_themes();
-	if ( is_array( $themes ) && array_key_exists( $theme, $themes ) )
-		return $themes[ $theme ];
-	return null;
-}
-
-/**
- * Retrieve current theme name.
- *
- * @since 1.5.0
- * @deprecated 3.4.0 Use wp_get_theme()
- * @see wp_get_theme()
- *
- * @return string
- */
-function get_current_theme() {
-	_deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme()' );
-
-	if ( $theme = get_option( 'current_theme' ) )
-		return $theme;
-
-	return wp_get_theme()->get('Name');
-}
-
-/**
- * Accepts matches array from preg_replace_callback in wpautop() or a string.
- *
- * Ensures that the contents of a `<pre>...</pre>` HTML block are not
- * converted into paragraphs or line-breaks.
- *
- * @since 1.2.0
- * @deprecated 3.4.0
- *
- * @param array|string $matches The array or string
- * @return string The pre block without paragraph/line-break conversion.
- */
-function clean_pre($matches) {
-	_deprecated_function( __FUNCTION__, '3.4.0' );
-
-	if ( is_array($matches) )
-		$text = $matches[1] . $matches[2] . "</pre>";
-	else
-		$text = $matches;
-
-	$text = str_replace(array('<br />', '<br/>', '<br>'), array('', '', ''), $text);
-	$text = str_replace('<p>', "\n", $text);
-	$text = str_replace('</p>', '', $text);
-
-	return $text;
-}
-
-
-/**
- * Add callbacks for image header display.
- *
- * @since 2.1.0
- * @deprecated 3.4.0 Use add_theme_support()
- * @see add_theme_support()
- *
- * @param callable $wp_head_callback Call on the {@see 'wp_head'} action.
- * @param callable $admin_head_callback Call on custom header administration screen.
- * @param callable $admin_preview_callback Output a custom header image div on the custom header administration screen. Optional.
- */
-function add_custom_image_header( $wp_head_callback, $admin_head_callback, $admin_preview_callback = '' ) {
-	_deprecated_function( __FUNCTION__, '3.4.0', 'add_theme_support( \'custom-header\', $args )' );
-	$args = array(
-		'wp-head-callback'    => $wp_head_callback,
-		'admin-head-callback' => $admin_head_callback,
-	);
-	if ( $admin_preview_callback )
-		$args['admin-preview-callback'] = $admin_preview_callback;
-	return add_theme_support( 'custom-header', $args );
-}
-
-/**
- * Remove image header support.
- *
- * @since 3.1.0
- * @deprecated 3.4.0 Use remove_theme_support()
- * @see remove_theme_support()
- *
- * @return null|bool Whether support was removed.
- */
-function remove_custom_image_header() {
-	_deprecated_function( __FUNCTION__, '3.4.0', 'remove_theme_support( \'custom-header\' )' );
-	return remove_theme_support( 'custom-header' );
-}
-
-/**
- * Add callbacks for background image display.
- *
- * @since 3.0.0
- * @deprecated 3.4.0 Use add_theme_support()
- * @see add_theme_support()
- *
- * @param callable $wp_head_callback Call on the {@see 'wp_head'} action.
- * @param callable $admin_head_callback Call on custom background administration screen.
- * @param callable $admin_preview_callback Output a custom background image div on the custom background administration screen. Optional.
- */
-function add_custom_background( $wp_head_callback = '', $admin_head_callback = '', $admin_preview_callback = '' ) {
-	_deprecated_function( __FUNCTION__, '3.4.0', 'add_theme_support( \'custom-background\', $args )' );
-	$args = array();
-	if ( $wp_head_callback )
-		$args['wp-head-callback'] = $wp_head_callback;
-	if ( $admin_head_callback )
-		$args['admin-head-callback'] = $admin_head_callback;
-	if ( $admin_preview_callback )
-		$args['admin-preview-callback'] = $admin_preview_callback;
-	return add_theme_support( 'custom-background', $args );
-}
-
-/**
- * Remove custom background support.
- *
- * @since 3.1.0
- * @deprecated 3.4.0 Use add_custom_background()
- * @see add_custom_background()
- *
- * @return null|bool Whether support was removed.
- */
-function remove_custom_background() {
-	_deprecated_function( __FUNCTION__, '3.4.0', 'remove_theme_support( \'custom-background\' )' );
-	return remove_theme_support( 'custom-background' );
-}
-
-/**
- * Retrieve theme data from parsed theme file.
- *
- * @since 1.5.0
- * @deprecated 3.4.0 Use wp_get_theme()
- * @see wp_get_theme()
- *
- * @param string $theme_file Theme file path.
- * @return array Theme data.
- */
-function get_theme_data( $theme_file ) {
-	_deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme()' );
-	$theme = new WP_Theme( basename( dirname( $theme_file ) ), dirname( dirname( $theme_file ) ) );
-
-	$theme_data = array(
-		'Name' => $theme->get('Name'),
-		'URI' => $theme->display('ThemeURI', true, false),
-		'Description' => $theme->display('Description', true, false),
-		'Author' => $theme->display('Author', true, false),
-		'AuthorURI' => $theme->display('AuthorURI', true, false),
-		'Version' => $theme->get('Version'),
-		'Template' => $theme->get('Template'),
-		'Status' => $theme->get('Status'),
-		'Tags' => $theme->get('Tags'),
-		'Title' => $theme->get('Name'),
-		'AuthorName' => $theme->get('Author'),
-	);
-
-	foreach ( apply_filters( 'extra_theme_headers', array() ) as $extra_header ) {
-		if ( ! isset( $theme_data[ $extra_header ] ) )
-			$theme_data[ $extra_header ] = $theme->get( $extra_header );
-	}
-
-	return $theme_data;
-}
-
-/**
- * Alias of update_post_cache().
- *
- * @see update_post_cache() Posts and pages are the same, alias is intentional
- *
- * @since 1.5.1
- * @deprecated 3.4.0 Use update_post_cache()
- * @see update_post_cache()
- *
- * @param array $pages list of page objects
- */
-function update_page_cache( &$pages ) {
-	_deprecated_function( __FUNCTION__, '3.4.0', 'update_post_cache()' );
-
-	update_post_cache( $pages );
-}
-
-/**
- * Will clean the page in the cache.
- *
- * Clean (read: delete) page from cache that matches $id. Will also clean cache
- * associated with 'all_page_ids' and 'get_pages'.
- *
- * @since 2.0.0
- * @deprecated 3.4.0 Use clean_post_cache
- * @see clean_post_cache()
- *
- * @param int $id Page ID to clean
- */
-function clean_page_cache( $id ) {
-	_deprecated_function( __FUNCTION__, '3.4.0', 'clean_post_cache()' );
-
-	clean_post_cache( $id );
-}
-
-/**
- * Retrieve nonce action "Are you sure" message.
- *
- * Deprecated in 3.4.1 and 3.5.0. Backported to 3.3.3.
- *
- * @since 2.0.4
- * @deprecated 3.4.1 Use wp_nonce_ays()
- * @see wp_nonce_ays()
- *
- * @param string $action Nonce action.
- * @return string Are you sure message.
- */
-function wp_explain_nonce( $action ) {
-	_deprecated_function( __FUNCTION__, '3.4.1', 'wp_nonce_ays()' );
-	return __( 'Are you sure you want to do this?' );
-}
-
-/**
- * Display "sticky" CSS class, if a post is sticky.
- *
- * @since 2.7.0
- * @deprecated 3.5.0 Use post_class()
- * @see post_class()
- *
- * @param int $post_id An optional post ID.
- */
-function sticky_class( $post_id = null ) {
-	_deprecated_function( __FUNCTION__, '3.5.0', 'post_class()' );
-	if ( is_sticky( $post_id ) )
-		echo ' sticky';
-}
-
-/**
- * Retrieve post ancestors.
- *
- * This is no longer needed as WP_Post lazy-loads the ancestors
- * property with get_post_ancestors().
- *
- * @since 2.3.4
- * @deprecated 3.5.0 Use get_post_ancestors()
- * @see get_post_ancestors()
- *
- * @param WP_Post &$post Post object, passed by reference (unused).
- */
-function _get_post_ancestors( &$post ) {
-	_deprecated_function( __FUNCTION__, '3.5.0' );
-}
-
-/**
- * Load an image from a string, if PHP supports it.
- *
- * @since 2.1.0
- * @deprecated 3.5.0 Use wp_get_image_editor()
- * @see wp_get_image_editor()
- *
- * @param string $file Filename of the image to load.
- * @return resource The resulting image resource on success, Error string on failure.
- */
-function wp_load_image( $file ) {
-	_deprecated_function( __FUNCTION__, '3.5.0', 'wp_get_image_editor()' );
-
-	if ( is_numeric( $file ) )
-		$file = get_attached_file( $file );
-
-	if ( ! is_file( $file ) ) {
-		/* translators: %s: file name */
-		return sprintf( __( 'File &#8220;%s&#8221; doesn&#8217;t exist?' ), $file );
-	}
-
-	if ( ! function_exists('imagecreatefromstring') )
-		return __('The GD image library is not installed.');
-
-	// Set artificially high because GD uses uncompressed images in memory.
-	wp_raise_memory_limit( 'image' );
-
-	$image = imagecreatefromstring( file_get_contents( $file ) );
-
-	if ( ! is_resource( $image ) ) {
-		/* translators: %s: file name */
-		return sprintf( __( 'File &#8220;%s&#8221; is not an image.' ), $file );
-	}
-
-	return $image;
-}
-
-/**
- * Scale down an image to fit a particular size and save a new copy of the image.
- *
- * The PNG transparency will be preserved using the function, as well as the
- * image type. If the file going in is PNG, then the resized image is going to
- * be PNG. The only supported image types are PNG, GIF, and JPEG.
- *
- * Some functionality requires API to exist, so some PHP version may lose out
- * support. This is not the fault of WordPress (where functionality is
- * downgraded, not actual defects), but of your PHP version.
- *
- * @since 2.5.0
- * @deprecated 3.5.0 Use wp_get_image_editor()
- * @see wp_get_image_editor()
- *
- * @param string $file Image file path.
- * @param int $max_w Maximum width to resize to.
- * @param int $max_h Maximum height to resize to.
- * @param bool $crop Optional. Whether to crop image or resize.
- * @param string $suffix Optional. File suffix.
- * @param string $dest_path Optional. New image file path.
- * @param int $jpeg_quality Optional, default is 90. Image quality percentage.
- * @return mixed WP_Error on failure. String with new destination path.
- */
-function image_resize( $file, $max_w, $max_h, $crop = false, $suffix = null, $dest_path = null, $jpeg_quality = 90 ) {
-	_deprecated_function( __FUNCTION__, '3.5.0', 'wp_get_image_editor()' );
-
-	$editor = wp_get_image_editor( $file );
-	if ( is_wp_error( $editor ) )
-		return $editor;
-	$editor->set_quality( $jpeg_quality );
-
-	$resized = $editor->resize( $max_w, $max_h, $crop );
-	if ( is_wp_error( $resized ) )
-		return $resized;
-
-	$dest_file = $editor->generate_filename( $suffix, $dest_path );
-	$saved = $editor->save( $dest_file );
-
-	if ( is_wp_error( $saved ) )
-		return $saved;
-
-	return $dest_file;
-}
-
-/**
- * Retrieve a single post, based on post ID.
- *
- * Has categories in 'post_category' property or key. Has tags in 'tags_input'
- * property or key.
- *
- * @since 1.0.0
- * @deprecated 3.5.0 Use get_post()
- * @see get_post()
- *
- * @param int $postid Post ID.
- * @param string $mode How to return result, either OBJECT, ARRAY_N, or ARRAY_A.
- * @return WP_Post|null Post object or array holding post contents and information
- */
-function wp_get_single_post( $postid = 0, $mode = OBJECT ) {
-	_deprecated_function( __FUNCTION__, '3.5.0', 'get_post()' );
-	return get_post( $postid, $mode );
-}
-
-/**
- * Check that the user login name and password is correct.
- *
- * @since 0.71
- * @deprecated 3.5.0 Use wp_authenticate()
- * @see wp_authenticate()
- *
- * @param string $user_login User name.
- * @param string $user_pass User password.
- * @return bool False if does not authenticate, true if username and password authenticates.
- */
-function user_pass_ok($user_login, $user_pass) {
-	_deprecated_function( __FUNCTION__, '3.5.0', 'wp_authenticate()' );
-	$user = wp_authenticate( $user_login, $user_pass );
-	if ( is_wp_error( $user ) )
-		return false;
-
-	return true;
-}
-
-/**
- * Callback formerly fired on the save_post hook. No longer needed.
- *
- * @since 2.3.0
- * @deprecated 3.5.0
- */
-function _save_post_hook() {}
-
-/**
- * Check if the installed version of GD supports particular image type
- *
- * @since 2.9.0
- * @deprecated 3.5.0 Use wp_image_editor_supports()
- * @see wp_image_editor_supports()
- *
- * @param string $mime_type
- * @return bool
- */
-function gd_edit_image_support($mime_type) {
-	_deprecated_function( __FUNCTION__, '3.5.0', 'wp_image_editor_supports()' );
-
-	if ( function_exists('imagetypes') ) {
-		switch( $mime_type ) {
-			case 'image/jpeg':
-				return (imagetypes() & IMG_JPG) != 0;
-			case 'image/png':
-				return (imagetypes() & IMG_PNG) != 0;
-			case 'image/gif':
-				return (imagetypes() & IMG_GIF) != 0;
-		}
-	} else {
-		switch( $mime_type ) {
-			case 'image/jpeg':
-				return function_exists('imagecreatefromjpeg');
-			case 'image/png':
-				return function_exists('imagecreatefrompng');
-			case 'image/gif':
-				return function_exists('imagecreatefromgif');
-		}
-	}
-	return false;
-}
-
-/**
- * Converts an integer byte value to a shorthand byte value.
- *
- * @since 2.3.0
- * @deprecated 3.6.0 Use size_format()
- * @see size_format()
- *
- * @param int $bytes An integer byte value.
- * @return string A shorthand byte value.
- */
-function wp_convert_bytes_to_hr( $bytes ) {
-	_deprecated_function( __FUNCTION__, '3.6.0', 'size_format()' );
-
-	$units = array( 0 => 'B', 1 => 'KB', 2 => 'MB', 3 => 'GB', 4 => 'TB' );
-	$log   = log( $bytes, KB_IN_BYTES );
-	$power = (int) $log;
-	$size  = pow( KB_IN_BYTES, $log - $power );
-
-	if ( ! is_nan( $size ) && array_key_exists( $power, $units ) ) {
-		$unit = $units[ $power ];
-	} else {
-		$size = $bytes;
-		$unit = $units[0];
-	}
-
-	return $size . $unit;
-}
-
-/**
- * Formerly used internally to tidy up the search terms.
- *
- * @since 2.9.0
- * @access private
- * @deprecated 3.7.0
- *
- * @param string $t Search terms to "tidy", e.g. trim.
- * @return string Trimmed search terms.
- */
-function _search_terms_tidy( $t ) {
-	_deprecated_function( __FUNCTION__, '3.7.0' );
-	return trim( $t, "\"'\n\r " );
-}
-
-/**
- * Determine if TinyMCE is available.
- *
- * Checks to see if the user has deleted the tinymce files to slim down
- * their WordPress install.
- *
- * @since 2.1.0
- * @deprecated 3.9.0
- *
- * @return bool Whether TinyMCE exists.
- */
-function rich_edit_exists() {
-	global $wp_rich_edit_exists;
-	_deprecated_function( __FUNCTION__, '3.9.0' );
-
-	if ( ! isset( $wp_rich_edit_exists ) )
-		$wp_rich_edit_exists = file_exists( ABSPATH . WPINC . '/js/tinymce/tinymce.js' );
-
-	return $wp_rich_edit_exists;
-}
-
-/**
- * Old callback for tag link tooltips.
- *
- * @since 2.7.0
- * @access private
- * @deprecated 3.9.0
- *
- * @param int $count Number of topics.
- * @return int Number of topics.
- */
-function default_topic_count_text( $count ) {
-	return $count;
-}
-
-/**
- * Formerly used to escape strings before inserting into the DB.
- *
- * Has not performed this function for many, many years. Use wpdb::prepare() instead.
- *
- * @since 0.71
- * @deprecated 3.9.0
- *
- * @param string $content The text to format.
- * @return string The very same text.
- */
-function format_to_post( $content ) {
-	_deprecated_function( __FUNCTION__, '3.9.0' );
-	return $content;
-}
-
-/**
- * Formerly used to escape strings before searching the DB. It was poorly documented and never worked as described.
- *
- * @since 2.5.0
- * @deprecated 4.0.0 Use wpdb::esc_like()
- * @see wpdb::esc_like()
- *
- * @param string $text The text to be escaped.
- * @return string text, safe for inclusion in LIKE query.
- */
-function like_escape($text) {
-	_deprecated_function( __FUNCTION__, '4.0.0', 'wpdb::esc_like()' );
-	return str_replace( array( "%", "_" ), array( "\\%", "\\_" ), $text );
-}
-
-/**
- * Determines if the URL can be accessed over SSL.
- *
- * Determines if the URL can be accessed over SSL by using the WordPress HTTP API to access
- * the URL using https as the scheme.
- *
- * @since 2.5.0
- * @deprecated 4.0.0
- *
- * @param string $url The URL to test.
- * @return bool Whether SSL access is available.
- */
-function url_is_accessable_via_ssl( $url ) {
-	_deprecated_function( __FUNCTION__, '4.0.0' );
-
-	$response = wp_remote_get( set_url_scheme( $url, 'https' ) );
-
-	if ( !is_wp_error( $response ) ) {
-		$status = wp_remote_retrieve_response_code( $response );
-		if ( 200 == $status || 401 == $status ) {
-			return true;
-		}
-	}
-
-	return false;
-}
-
-/**
- * Start preview theme output buffer.
- *
- * Will only perform task if the user has permissions and template and preview
- * query variables exist.
- *
- * @since 2.6.0
- * @deprecated 4.3.0
- */
-function preview_theme() {
-	_deprecated_function( __FUNCTION__, '4.3.0' );
-}
-
-/**
- * Private function to modify the current template when previewing a theme
- *
- * @since 2.9.0
- * @deprecated 4.3.0
- * @access private
- *
- * @return string
- */
-function _preview_theme_template_filter() {
-	_deprecated_function( __FUNCTION__, '4.3.0' );
-	return '';
-}
-
-/**
- * Private function to modify the current stylesheet when previewing a theme
- *
- * @since 2.9.0
- * @deprecated 4.3.0
- * @access private
- *
- * @return string
- */
-function _preview_theme_stylesheet_filter() {
-	_deprecated_function( __FUNCTION__, '4.3.0' );
-	return '';
-}
-
-/**
- * Callback function for ob_start() to capture all links in the theme.
- *
- * @since 2.6.0
- * @deprecated 4.3.0
- * @access private
- *
- * @param string $content
- * @return string
- */
-function preview_theme_ob_filter( $content ) {
-	_deprecated_function( __FUNCTION__, '4.3.0' );
-	return $content;
-}
-
-/**
- * Manipulates preview theme links in order to control and maintain location.
- *
- * Callback function for preg_replace_callback() to accept and filter matches.
- *
- * @since 2.6.0
- * @deprecated 4.3.0
- * @access private
- *
- * @param array $matches
- * @return string
- */
-function preview_theme_ob_filter_callback( $matches ) {
-	_deprecated_function( __FUNCTION__, '4.3.0' );
-	return '';
-}
-
-/**
- * Formats text for the rich text editor.
- *
- * The {@see 'richedit_pre'} filter is applied here. If $text is empty the filter will
- * be applied to an empty string.
- *
- * @since 2.0.0
- * @deprecated 4.3.0
- *
- * @param string $text The text to be formatted.
- * @return string The formatted text after filter is applied.
- */
-function wp_richedit_pre($text) {
-	_deprecated_function( __FUNCTION__, '4.3.0', 'format_for_editor()' );
-
-	if ( empty( $text ) ) {
-		/**
-		 * Filters text returned for the rich text editor.
-		 *
-		 * This filter is first evaluated, and the value returned, if an empty string
-		 * is passed to wp_richedit_pre(). If an empty string is passed, it results
-		 * in a break tag and line feed.
-		 *
-		 * If a non-empty string is passed, the filter is evaluated on the wp_richedit_pre()
-		 * return after being formatted.
-		 *
-		 * @since 2.0.0
-		 * @deprecated 4.3.0
-		 *
-		 * @param string $output Text for the rich text editor.
-		 */
-		return apply_filters( 'richedit_pre', '' );
-	}
-
-	$output = convert_chars($text);
-	$output = wpautop($output);
-	$output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) );
-
-	/** This filter is documented in wp-includes/deprecated.php */
-	return apply_filters( 'richedit_pre', $output );
-}
-
-/**
- * Formats text for the HTML editor.
- *
- * Unless $output is empty it will pass through htmlspecialchars before the
- * {@see 'htmledit_pre'} filter is applied.
- *
- * @since 2.5.0
- * @deprecated 4.3.0 Use format_for_editor()
- * @see format_for_editor()
- *
- * @param string $output The text to be formatted.
- * @return string Formatted text after filter applied.
- */
-function wp_htmledit_pre($output) {
-	_deprecated_function( __FUNCTION__, '4.3.0', 'format_for_editor()' );
-
-	if ( !empty($output) )
-		$output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) ); // convert only < > &
-
-	/**
-	 * Filters the text before it is formatted for the HTML editor.
-	 *
-	 * @since 2.5.0
-	 * @deprecated 4.3.0
-	 *
-	 * @param string $output The HTML-formatted text.
-	 */
-	return apply_filters( 'htmledit_pre', $output );
-}
-
-/**
- * Retrieve permalink from post ID.
- *
- * @since 1.0.0
- * @deprecated 4.4.0 Use get_permalink()
- * @see get_permalink()
- *
- * @param int|WP_Post $post_id Optional. Post ID or WP_Post object. Default is global $post.
- * @return string|false
- */
-function post_permalink( $post_id = 0 ) {
-	_deprecated_function( __FUNCTION__, '4.4.0', 'get_permalink()' );
-
-	return get_permalink( $post_id );
-}
-
-/**
- * Perform a HTTP HEAD or GET request.
- *
- * If $file_path is a writable filename, this will do a GET request and write
- * the file to that path.
- *
- * @since 2.5.0
- * @deprecated 4.4.0 Use WP_Http
- * @see WP_Http
- *
- * @param string      $url       URL to fetch.
- * @param string|bool $file_path Optional. File path to write request to. Default false.
- * @param int         $red       Optional. The number of Redirects followed, Upon 5 being hit,
- *                               returns false. Default 1.
- * @return bool|string False on failure and string of headers if HEAD request.
- */
-function wp_get_http( $url, $file_path = false, $red = 1 ) {
-	_deprecated_function( __FUNCTION__, '4.4.0', 'WP_Http' );
-
-	@set_time_limit( 60 );
-
-	if ( $red > 5 )
-		return false;
-
-	$options = array();
-	$options['redirection'] = 5;
-
-	if ( false == $file_path )
-		$options['method'] = 'HEAD';
-	else
-		$options['method'] = 'GET';
-
-	$response = wp_safe_remote_request( $url, $options );
-
-	if ( is_wp_error( $response ) )
-		return false;
-
-	$headers = wp_remote_retrieve_headers( $response );
-	$headers['response'] = wp_remote_retrieve_response_code( $response );
-
-	// WP_HTTP no longer follows redirects for HEAD requests.
-	if ( 'HEAD' == $options['method'] && in_array($headers['response'], array(301, 302)) && isset( $headers['location'] ) ) {
-		return wp_get_http( $headers['location'], $file_path, ++$red );
-	}
-
-	if ( false == $file_path )
-		return $headers;
-
-	// GET request - write it to the supplied filename
-	$out_fp = fopen($file_path, 'w');
-	if ( !$out_fp )
-		return $headers;
-
-	fwrite( $out_fp,  wp_remote_retrieve_body( $response ) );
-	fclose($out_fp);
-	clearstatcache();
-
-	return $headers;
-}
-
-/**
- * Whether SSL login should be forced.
- *
- * @since 2.6.0
- * @deprecated 4.4.0 Use force_ssl_admin()
- * @see force_ssl_admin()
- *
- * @param string|bool $force Optional Whether to force SSL login. Default null.
- * @return bool True if forced, false if not forced.
- */
-function force_ssl_login( $force = null ) {
-	_deprecated_function( __FUNCTION__, '4.4.0', 'force_ssl_admin()' );
-	return force_ssl_admin( $force );
-}
-
-/**
- * Retrieve path of comment popup template in current or parent template.
- *
- * @since 1.5.0
- * @deprecated 4.5.0
- *
- * @return string Full path to comments popup template file.
- */
-function get_comments_popup_template() {
-	_deprecated_function( __FUNCTION__, '4.5.0' );
-
-	return '';
-}
-
-/**
- * Whether the current URL is within the comments popup window.
- *
- * @since 1.5.0
- * @deprecated 4.5.0
- *
- * @return bool
- */
-function is_comments_popup() {
-	_deprecated_function( __FUNCTION__, '4.5.0' );
-
-	return false;
-}
-
-/**
- * Display the JS popup script to show a comment.
- *
- * @since 0.71
- * @deprecated 4.5.0
- */
-function comments_popup_script() {
-	_deprecated_function( __FUNCTION__, '4.5.0' );
-}
-
-/**
- * Adds element attributes to open links in new windows.
- *
- * @since 0.71
- * @deprecated 4.5.0
- *
- * @param string $text Content to replace links to open in a new window.
- * @return string Content that has filtered links.
- */
-function popuplinks( $text ) {
-	_deprecated_function( __FUNCTION__, '4.5.0' );
-	$text = preg_replace('/<a (.+?)>/i', "<a $1 target='_blank' rel='external'>", $text);
-	return $text;
-}
-
-/**
- * The Google Video embed handler callback.
- *
- * Deprecated function that previously assisted in turning Google Video URLs
- * into embeds but that service has since been shut down.
- *
- * @since 2.9.0
- * @deprecated 4.6.0
- *
- * @return string An empty string.
- */
-function wp_embed_handler_googlevideo( $matches, $attr, $url, $rawattr ) {
-	_deprecated_function( __FUNCTION__, '4.6.0' );
-
-	return '';
-}
Index: www/wp-includes/Text/Diff/Engine/native.php
===================================================================
--- www/wp-includes/Text/Diff/Engine/native.php	(revision 38565)
+++ www/wp-includes/autoload/text-diff/Text_Diff_Engine_native.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/Requests/Exception/HTTP/407.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/407.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_407.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/requests/Exception/HTTP/429.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/429.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/429.php	(revision UNDEFINED)
@@ -1,29 +0,0 @@
-<?php
-/**
- * Exception for 429 Too Many Requests responses
- *
- * @see https://tools.ietf.org/html/draft-nottingham-http-new-status-04
- * @package Requests
- */
-
-/**
- * Exception for 429 Too Many Requests responses
- *
- * @see https://tools.ietf.org/html/draft-nottingham-http-new-status-04
- * @package Requests
- */
-class Requests_Exception_HTTP_429 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 429;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Too Many Requests';
-}
\ No newline at end of file
Index: www/wp-includes/Requests/Exception/HTTP/Unknown.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/Unknown.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_Unknown.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/random_compat/random.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/random_compat/random.php	(revision 38565)
+++ www/wp-includes/random_compat/random.php	(revision )
@@ -51,7 +51,6 @@
 
     require_once $RandomCompatDIR.'/byte_safe_strings.php';
     require_once $RandomCompatDIR.'/cast_to_int.php';
-    require_once $RandomCompatDIR.'/error_polyfill.php';
 
     if (!function_exists('random_bytes')) {
         /**
Index: www/wp-includes/autoload/id3/ID3/module.audio-video.flv.php
===================================================================
--- www/wp-includes/autoload/id3/ID3/module.audio-video.flv.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/id3/ID3/module.audio-video.flv.php	(revision UNDEFINED)
@@ -1,745 +0,0 @@
-<?php
-/////////////////////////////////////////////////////////////////
-/// getID3() by James Heinrich <info@getid3.org>               //
-//  available at http://getid3.sourceforge.net                 //
-//            or http://www.getid3.org                         //
-//          also https://github.com/JamesHeinrich/getID3       //
-//                                                             //
-//  FLV module by Seth Kaufman <sethØwhirl-i-gig*com>          //
-//                                                             //
-//  * version 0.1 (26 June 2005)                               //
-//                                                             //
-//                                                             //
-//  * version 0.1.1 (15 July 2005)                             //
-//  minor modifications by James Heinrich <info@getid3.org>    //
-//                                                             //
-//  * version 0.2 (22 February 2006)                           //
-//  Support for On2 VP6 codec and meta information             //
-//    by Steve Webster <steve.websterØfeaturecreep*com>        //
-//                                                             //
-//  * version 0.3 (15 June 2006)                               //
-//  Modified to not read entire file into memory               //
-//    by James Heinrich <info@getid3.org>                      //
-//                                                             //
-//  * version 0.4 (07 December 2007)                           //
-//  Bugfixes for incorrectly parsed FLV dimensions             //
-//    and incorrect parsing of onMetaTag                       //
-//    by Evgeny Moysevich <moysevichØgmail*com>                //
-//                                                             //
-//  * version 0.5 (21 May 2009)                                //
-//  Fixed parsing of audio tags and added additional codec     //
-//    details. The duration is now read from onMetaTag (if     //
-//    exists), rather than parsing whole file                  //
-//    by Nigel Barnes <ngbarnesØhotmail*com>                   //
-//                                                             //
-//  * version 0.6 (24 May 2009)                                //
-//  Better parsing of files with h264 video                    //
-//    by Evgeny Moysevich <moysevichØgmail*com>                //
-//                                                             //
-//  * version 0.6.1 (30 May 2011)                              //
-//    prevent infinite loops in expGolombUe()                  //
-//                                                             //
-//  * version 0.7.0 (16 Jul 2013)                              //
-//  handle GETID3_FLV_VIDEO_VP6FLV_ALPHA                       //
-//  improved AVCSequenceParameterSetReader::readData()         //
-//    by Xander Schouwerwou <schouwerwouØgmail*com>            //
-//                                                             //
-/////////////////////////////////////////////////////////////////
-//                                                             //
-// module.audio-video.flv.php                                  //
-// module for analyzing Shockwave Flash Video files            //
-// dependencies: NONE                                          //
-//                                                            ///
-/////////////////////////////////////////////////////////////////
-
-define('GETID3_FLV_TAG_AUDIO',          8);
-define('GETID3_FLV_TAG_VIDEO',          9);
-define('GETID3_FLV_TAG_META',          18);
-
-define('GETID3_FLV_VIDEO_H263',         2);
-define('GETID3_FLV_VIDEO_SCREEN',       3);
-define('GETID3_FLV_VIDEO_VP6FLV',       4);
-define('GETID3_FLV_VIDEO_VP6FLV_ALPHA', 5);
-define('GETID3_FLV_VIDEO_SCREENV2',     6);
-define('GETID3_FLV_VIDEO_H264',         7);
-
-define('H264_AVC_SEQUENCE_HEADER',          0);
-define('H264_PROFILE_BASELINE',            66);
-define('H264_PROFILE_MAIN',                77);
-define('H264_PROFILE_EXTENDED',            88);
-define('H264_PROFILE_HIGH',               100);
-define('H264_PROFILE_HIGH10',             110);
-define('H264_PROFILE_HIGH422',            122);
-define('H264_PROFILE_HIGH444',            144);
-define('H264_PROFILE_HIGH444_PREDICTIVE', 244);
-
-class getid3_flv extends getid3_handler {
-
-	const magic = 'FLV';
-
-	public $max_frames = 100000; // break out of the loop if too many frames have been scanned; only scan this many if meta frame does not contain useful duration
-
-	public function Analyze() {
-		$info = &$this->getid3->info;
-
-		$this->fseek($info['avdataoffset']);
-
-		$FLVdataLength = $info['avdataend'] - $info['avdataoffset'];
-		$FLVheader = $this->fread(5);
-
-		$info['fileformat'] = 'flv';
-		$info['flv']['header']['signature'] =                           substr($FLVheader, 0, 3);
-		$info['flv']['header']['version']   = getid3_lib::BigEndian2Int(substr($FLVheader, 3, 1));
-		$TypeFlags                          = getid3_lib::BigEndian2Int(substr($FLVheader, 4, 1));
-
-		if ($info['flv']['header']['signature'] != self::magic) {
-			$info['error'][] = 'Expecting "'.getid3_lib::PrintHexBytes(self::magic).'" at offset '.$info['avdataoffset'].', found "'.getid3_lib::PrintHexBytes($info['flv']['header']['signature']).'"';
-			unset($info['flv'], $info['fileformat']);
-			return false;
-		}
-
-		$info['flv']['header']['hasAudio'] = (bool) ($TypeFlags & 0x04);
-		$info['flv']['header']['hasVideo'] = (bool) ($TypeFlags & 0x01);
-
-		$FrameSizeDataLength = getid3_lib::BigEndian2Int($this->fread(4));
-		$FLVheaderFrameLength = 9;
-		if ($FrameSizeDataLength > $FLVheaderFrameLength) {
-			$this->fseek($FrameSizeDataLength - $FLVheaderFrameLength, SEEK_CUR);
-		}
-		$Duration = 0;
-		$found_video = false;
-		$found_audio = false;
-		$found_meta  = false;
-		$found_valid_meta_playtime = false;
-		$tagParseCount = 0;
-		$info['flv']['framecount'] = array('total'=>0, 'audio'=>0, 'video'=>0);
-		$flv_framecount = &$info['flv']['framecount'];
-		while ((($this->ftell() + 16) < $info['avdataend']) && (($tagParseCount++ <= $this->max_frames) || !$found_valid_meta_playtime))  {
-			$ThisTagHeader = $this->fread(16);
-
-			$PreviousTagLength = getid3_lib::BigEndian2Int(substr($ThisTagHeader,  0, 4));
-			$TagType           = getid3_lib::BigEndian2Int(substr($ThisTagHeader,  4, 1));
-			$DataLength        = getid3_lib::BigEndian2Int(substr($ThisTagHeader,  5, 3));
-			$Timestamp         = getid3_lib::BigEndian2Int(substr($ThisTagHeader,  8, 3));
-			$LastHeaderByte    = getid3_lib::BigEndian2Int(substr($ThisTagHeader, 15, 1));
-			$NextOffset = $this->ftell() - 1 + $DataLength;
-			if ($Timestamp > $Duration) {
-				$Duration = $Timestamp;
-			}
-
-			$flv_framecount['total']++;
-			switch ($TagType) {
-				case GETID3_FLV_TAG_AUDIO:
-					$flv_framecount['audio']++;
-					if (!$found_audio) {
-						$found_audio = true;
-						$info['flv']['audio']['audioFormat']     = ($LastHeaderByte >> 4) & 0x0F;
-						$info['flv']['audio']['audioRate']       = ($LastHeaderByte >> 2) & 0x03;
-						$info['flv']['audio']['audioSampleSize'] = ($LastHeaderByte >> 1) & 0x01;
-						$info['flv']['audio']['audioType']       =  $LastHeaderByte       & 0x01;
-					}
-					break;
-
-				case GETID3_FLV_TAG_VIDEO:
-					$flv_framecount['video']++;
-					if (!$found_video) {
-						$found_video = true;
-						$info['flv']['video']['videoCodec'] = $LastHeaderByte & 0x07;
-
-						$FLVvideoHeader = $this->fread(11);
-
-						if ($info['flv']['video']['videoCodec'] == GETID3_FLV_VIDEO_H264) {
-							// this code block contributed by: moysevichØgmail*com
-
-							$AVCPacketType = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 0, 1));
-							if ($AVCPacketType == H264_AVC_SEQUENCE_HEADER) {
-								//	read AVCDecoderConfigurationRecord
-								$configurationVersion       = getid3_lib::BigEndian2Int(substr($FLVvideoHeader,  4, 1));
-								$AVCProfileIndication       = getid3_lib::BigEndian2Int(substr($FLVvideoHeader,  5, 1));
-								$profile_compatibility      = getid3_lib::BigEndian2Int(substr($FLVvideoHeader,  6, 1));
-								$lengthSizeMinusOne         = getid3_lib::BigEndian2Int(substr($FLVvideoHeader,  7, 1));
-								$numOfSequenceParameterSets = getid3_lib::BigEndian2Int(substr($FLVvideoHeader,  8, 1));
-
-								if (($numOfSequenceParameterSets & 0x1F) != 0) {
-									//	there is at least one SequenceParameterSet
-									//	read size of the first SequenceParameterSet
-									//$spsSize = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 9, 2));
-									$spsSize = getid3_lib::LittleEndian2Int(substr($FLVvideoHeader, 9, 2));
-									//	read the first SequenceParameterSet
-									$sps = $this->fread($spsSize);
-									if (strlen($sps) == $spsSize) {	//	make sure that whole SequenceParameterSet was red
-										$spsReader = new AVCSequenceParameterSetReader($sps);
-										$spsReader->readData();
-										$info['video']['resolution_x'] = $spsReader->getWidth();
-										$info['video']['resolution_y'] = $spsReader->getHeight();
-									}
-								}
-							}
-							// end: moysevichØgmail*com
-
-						} elseif ($info['flv']['video']['videoCodec'] == GETID3_FLV_VIDEO_H263) {
-
-							$PictureSizeType = (getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 3, 2))) >> 7;
-							$PictureSizeType = $PictureSizeType & 0x0007;
-							$info['flv']['header']['videoSizeType'] = $PictureSizeType;
-							switch ($PictureSizeType) {
-								case 0:
-									//$PictureSizeEnc = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 5, 2));
-									//$PictureSizeEnc <<= 1;
-									//$info['video']['resolution_x'] = ($PictureSizeEnc & 0xFF00) >> 8;
-									//$PictureSizeEnc = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 6, 2));
-									//$PictureSizeEnc <<= 1;
-									//$info['video']['resolution_y'] = ($PictureSizeEnc & 0xFF00) >> 8;
-
-									$PictureSizeEnc['x'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 4, 2)) >> 7;
-									$PictureSizeEnc['y'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 5, 2)) >> 7;
-									$info['video']['resolution_x'] = $PictureSizeEnc['x'] & 0xFF;
-									$info['video']['resolution_y'] = $PictureSizeEnc['y'] & 0xFF;
-									break;
-
-								case 1:
-									$PictureSizeEnc['x'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 4, 3)) >> 7;
-									$PictureSizeEnc['y'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 6, 3)) >> 7;
-									$info['video']['resolution_x'] = $PictureSizeEnc['x'] & 0xFFFF;
-									$info['video']['resolution_y'] = $PictureSizeEnc['y'] & 0xFFFF;
-									break;
-
-								case 2:
-									$info['video']['resolution_x'] = 352;
-									$info['video']['resolution_y'] = 288;
-									break;
-
-								case 3:
-									$info['video']['resolution_x'] = 176;
-									$info['video']['resolution_y'] = 144;
-									break;
-
-								case 4:
-									$info['video']['resolution_x'] = 128;
-									$info['video']['resolution_y'] = 96;
-									break;
-
-								case 5:
-									$info['video']['resolution_x'] = 320;
-									$info['video']['resolution_y'] = 240;
-									break;
-
-								case 6:
-									$info['video']['resolution_x'] = 160;
-									$info['video']['resolution_y'] = 120;
-									break;
-
-								default:
-									$info['video']['resolution_x'] = 0;
-									$info['video']['resolution_y'] = 0;
-									break;
-
-							}
-
-						} elseif ($info['flv']['video']['videoCodec'] ==  GETID3_FLV_VIDEO_VP6FLV_ALPHA) {
-
-							/* contributed by schouwerwouØgmail*com */
-							if (!isset($info['video']['resolution_x'])) { // only when meta data isn't set
-								$PictureSizeEnc['x'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 6, 2));
-								$PictureSizeEnc['y'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 7, 2));
-								$info['video']['resolution_x'] = ($PictureSizeEnc['x'] & 0xFF) << 3;
-								$info['video']['resolution_y'] = ($PictureSizeEnc['y'] & 0xFF) << 3;
-							}
-							/* end schouwerwouØgmail*com */
-
-						}
-						if (!empty($info['video']['resolution_x']) && !empty($info['video']['resolution_y'])) {
-							$info['video']['pixel_aspect_ratio'] = $info['video']['resolution_x'] / $info['video']['resolution_y'];
-						}
-					}
-					break;
-
-				// Meta tag
-				case GETID3_FLV_TAG_META:
-					if (!$found_meta) {
-						$found_meta = true;
-						$this->fseek(-1, SEEK_CUR);
-						$datachunk = $this->fread($DataLength);
-						$AMFstream = new AMFStream($datachunk);
-						$reader = new AMFReader($AMFstream);
-						$eventName = $reader->readData();
-						$info['flv']['meta'][$eventName] = $reader->readData();
-						unset($reader);
-
-						$copykeys = array('framerate'=>'frame_rate', 'width'=>'resolution_x', 'height'=>'resolution_y', 'audiodatarate'=>'bitrate', 'videodatarate'=>'bitrate');
-						foreach ($copykeys as $sourcekey => $destkey) {
-							if (isset($info['flv']['meta']['onMetaData'][$sourcekey])) {
-								switch ($sourcekey) {
-									case 'width':
-									case 'height':
-										$info['video'][$destkey] = intval(round($info['flv']['meta']['onMetaData'][$sourcekey]));
-										break;
-									case 'audiodatarate':
-										$info['audio'][$destkey] = getid3_lib::CastAsInt(round($info['flv']['meta']['onMetaData'][$sourcekey] * 1000));
-										break;
-									case 'videodatarate':
-									case 'frame_rate':
-									default:
-										$info['video'][$destkey] = $info['flv']['meta']['onMetaData'][$sourcekey];
-										break;
-								}
-							}
-						}
-						if (!empty($info['flv']['meta']['onMetaData']['duration'])) {
-							$found_valid_meta_playtime = true;
-						}
-					}
-					break;
-
-				default:
-					// noop
-					break;
-			}
-			$this->fseek($NextOffset);
-		}
-
-		$info['playtime_seconds'] = $Duration / 1000;
-		if ($info['playtime_seconds'] > 0) {
-			$info['bitrate'] = (($info['avdataend'] - $info['avdataoffset']) * 8) / $info['playtime_seconds'];
-		}
-
-		if ($info['flv']['header']['hasAudio']) {
-			$info['audio']['codec']           =   self::audioFormatLookup($info['flv']['audio']['audioFormat']);
-			$info['audio']['sample_rate']     =     self::audioRateLookup($info['flv']['audio']['audioRate']);
-			$info['audio']['bits_per_sample'] = self::audioBitDepthLookup($info['flv']['audio']['audioSampleSize']);
-
-			$info['audio']['channels']   =  $info['flv']['audio']['audioType'] + 1; // 0=mono,1=stereo
-			$info['audio']['lossless']   = ($info['flv']['audio']['audioFormat'] ? false : true); // 0=uncompressed
-			$info['audio']['dataformat'] = 'flv';
-		}
-		if (!empty($info['flv']['header']['hasVideo'])) {
-			$info['video']['codec']      = self::videoCodecLookup($info['flv']['video']['videoCodec']);
-			$info['video']['dataformat'] = 'flv';
-			$info['video']['lossless']   = false;
-		}
-
-		// Set information from meta
-		if (!empty($info['flv']['meta']['onMetaData']['duration'])) {
-			$info['playtime_seconds'] = $info['flv']['meta']['onMetaData']['duration'];
-			$info['bitrate'] = (($info['avdataend'] - $info['avdataoffset']) * 8) / $info['playtime_seconds'];
-		}
-		if (isset($info['flv']['meta']['onMetaData']['audiocodecid'])) {
-			$info['audio']['codec'] = self::audioFormatLookup($info['flv']['meta']['onMetaData']['audiocodecid']);
-		}
-		if (isset($info['flv']['meta']['onMetaData']['videocodecid'])) {
-			$info['video']['codec'] = self::videoCodecLookup($info['flv']['meta']['onMetaData']['videocodecid']);
-		}
-		return true;
-	}
-
-
-	public static function audioFormatLookup($id) {
-		static $lookup = array(
-			0  => 'Linear PCM, platform endian',
-			1  => 'ADPCM',
-			2  => 'mp3',
-			3  => 'Linear PCM, little endian',
-			4  => 'Nellymoser 16kHz mono',
-			5  => 'Nellymoser 8kHz mono',
-			6  => 'Nellymoser',
-			7  => 'G.711A-law logarithmic PCM',
-			8  => 'G.711 mu-law logarithmic PCM',
-			9  => 'reserved',
-			10 => 'AAC',
-			11 => 'Speex',
-			12 => false, // unknown?
-			13 => false, // unknown?
-			14 => 'mp3 8kHz',
-			15 => 'Device-specific sound',
-		);
-		return (isset($lookup[$id]) ? $lookup[$id] : false);
-	}
-
-	public static function audioRateLookup($id) {
-		static $lookup = array(
-			0 =>  5500,
-			1 => 11025,
-			2 => 22050,
-			3 => 44100,
-		);
-		return (isset($lookup[$id]) ? $lookup[$id] : false);
-	}
-
-	public static function audioBitDepthLookup($id) {
-		static $lookup = array(
-			0 =>  8,
-			1 => 16,
-		);
-		return (isset($lookup[$id]) ? $lookup[$id] : false);
-	}
-
-	public static function videoCodecLookup($id) {
-		static $lookup = array(
-			GETID3_FLV_VIDEO_H263         => 'Sorenson H.263',
-			GETID3_FLV_VIDEO_SCREEN       => 'Screen video',
-			GETID3_FLV_VIDEO_VP6FLV       => 'On2 VP6',
-			GETID3_FLV_VIDEO_VP6FLV_ALPHA => 'On2 VP6 with alpha channel',
-			GETID3_FLV_VIDEO_SCREENV2     => 'Screen video v2',
-			GETID3_FLV_VIDEO_H264         => 'Sorenson H.264',
-		);
-		return (isset($lookup[$id]) ? $lookup[$id] : false);
-	}
-}
-
-class AMFStream {
-	public $bytes;
-	public $pos;
-
-	public function __construct(&$bytes) {
-		$this->bytes =& $bytes;
-		$this->pos = 0;
-	}
-
-	public function readByte() {
-		return getid3_lib::BigEndian2Int(substr($this->bytes, $this->pos++, 1));
-	}
-
-	public function readInt() {
-		return ($this->readByte() << 8) + $this->readByte();
-	}
-
-	public function readLong() {
-		return ($this->readByte() << 24) + ($this->readByte() << 16) + ($this->readByte() << 8) + $this->readByte();
-	}
-
-	public function readDouble() {
-		return getid3_lib::BigEndian2Float($this->read(8));
-	}
-
-	public function readUTF() {
-		$length = $this->readInt();
-		return $this->read($length);
-	}
-
-	public function readLongUTF() {
-		$length = $this->readLong();
-		return $this->read($length);
-	}
-
-	public function read($length) {
-		$val = substr($this->bytes, $this->pos, $length);
-		$this->pos += $length;
-		return $val;
-	}
-
-	public function peekByte() {
-		$pos = $this->pos;
-		$val = $this->readByte();
-		$this->pos = $pos;
-		return $val;
-	}
-
-	public function peekInt() {
-		$pos = $this->pos;
-		$val = $this->readInt();
-		$this->pos = $pos;
-		return $val;
-	}
-
-	public function peekLong() {
-		$pos = $this->pos;
-		$val = $this->readLong();
-		$this->pos = $pos;
-		return $val;
-	}
-
-	public function peekDouble() {
-		$pos = $this->pos;
-		$val = $this->readDouble();
-		$this->pos = $pos;
-		return $val;
-	}
-
-	public function peekUTF() {
-		$pos = $this->pos;
-		$val = $this->readUTF();
-		$this->pos = $pos;
-		return $val;
-	}
-
-	public function peekLongUTF() {
-		$pos = $this->pos;
-		$val = $this->readLongUTF();
-		$this->pos = $pos;
-		return $val;
-	}
-}
-
-class AMFReader {
-	public $stream;
-
-	public function __construct(&$stream) {
-		$this->stream =& $stream;
-	}
-
-	public function readData() {
-		$value = null;
-
-		$type = $this->stream->readByte();
-		switch ($type) {
-
-			// Double
-			case 0:
-				$value = $this->readDouble();
-			break;
-
-			// Boolean
-			case 1:
-				$value = $this->readBoolean();
-				break;
-
-			// String
-			case 2:
-				$value = $this->readString();
-				break;
-
-			// Object
-			case 3:
-				$value = $this->readObject();
-				break;
-
-			// null
-			case 6:
-				return null;
-				break;
-
-			// Mixed array
-			case 8:
-				$value = $this->readMixedArray();
-				break;
-
-			// Array
-			case 10:
-				$value = $this->readArray();
-				break;
-
-			// Date
-			case 11:
-				$value = $this->readDate();
-				break;
-
-			// Long string
-			case 13:
-				$value = $this->readLongString();
-				break;
-
-			// XML (handled as string)
-			case 15:
-				$value = $this->readXML();
-				break;
-
-			// Typed object (handled as object)
-			case 16:
-				$value = $this->readTypedObject();
-				break;
-
-			// Long string
-			default:
-				$value = '(unknown or unsupported data type)';
-			break;
-		}
-
-		return $value;
-	}
-
-	public function readDouble() {
-		return $this->stream->readDouble();
-	}
-
-	public function readBoolean() {
-		return $this->stream->readByte() == 1;
-	}
-
-	public function readString() {
-		return $this->stream->readUTF();
-	}
-
-	public function readObject() {
-		// Get highest numerical index - ignored
-//		$highestIndex = $this->stream->readLong();
-
-		$data = array();
-
-		while ($key = $this->stream->readUTF()) {
-			$data[$key] = $this->readData();
-		}
-		// Mixed array record ends with empty string (0x00 0x00) and 0x09
-		if (($key == '') && ($this->stream->peekByte() == 0x09)) {
-			// Consume byte
-			$this->stream->readByte();
-		}
-		return $data;
-	}
-
-	public function readMixedArray() {
-		// Get highest numerical index - ignored
-		$highestIndex = $this->stream->readLong();
-
-		$data = array();
-
-		while ($key = $this->stream->readUTF()) {
-			if (is_numeric($key)) {
-				$key = (float) $key;
-			}
-			$data[$key] = $this->readData();
-		}
-		// Mixed array record ends with empty string (0x00 0x00) and 0x09
-		if (($key == '') && ($this->stream->peekByte() == 0x09)) {
-			// Consume byte
-			$this->stream->readByte();
-		}
-
-		return $data;
-	}
-
-	public function readArray() {
-		$length = $this->stream->readLong();
-		$data = array();
-
-		for ($i = 0; $i < $length; $i++) {
-			$data[] = $this->readData();
-		}
-		return $data;
-	}
-
-	public function readDate() {
-		$timestamp = $this->stream->readDouble();
-		$timezone = $this->stream->readInt();
-		return $timestamp;
-	}
-
-	public function readLongString() {
-		return $this->stream->readLongUTF();
-	}
-
-	public function readXML() {
-		return $this->stream->readLongUTF();
-	}
-
-	public function readTypedObject() {
-		$className = $this->stream->readUTF();
-		return $this->readObject();
-	}
-}
-
-class AVCSequenceParameterSetReader {
-	public $sps;
-	public $start = 0;
-	public $currentBytes = 0;
-	public $currentBits = 0;
-	public $width;
-	public $height;
-
-	public function __construct($sps) {
-		$this->sps = $sps;
-	}
-
-	public function readData() {
-		$this->skipBits(8);
-		$this->skipBits(8);
-		$profile = $this->getBits(8);                               // read profile
-		if ($profile > 0) {
-			$this->skipBits(8);
-			$level_idc = $this->getBits(8);                         // level_idc
-			$this->expGolombUe();                                   // seq_parameter_set_id // sps
-			$this->expGolombUe();                                   // log2_max_frame_num_minus4
-			$picOrderType = $this->expGolombUe();                   // pic_order_cnt_type
-			if ($picOrderType == 0) {
-				$this->expGolombUe();                               // log2_max_pic_order_cnt_lsb_minus4
-			} elseif ($picOrderType == 1) {
-				$this->skipBits(1);                                 // delta_pic_order_always_zero_flag
-				$this->expGolombSe();                               // offset_for_non_ref_pic
-				$this->expGolombSe();                               // offset_for_top_to_bottom_field
-				$num_ref_frames_in_pic_order_cnt_cycle = $this->expGolombUe(); // num_ref_frames_in_pic_order_cnt_cycle
-				for ($i = 0; $i < $num_ref_frames_in_pic_order_cnt_cycle; $i++) {
-					$this->expGolombSe();                           // offset_for_ref_frame[ i ]
-				}
-			}
-			$this->expGolombUe();                                   // num_ref_frames
-			$this->skipBits(1);                                     // gaps_in_frame_num_value_allowed_flag
-			$pic_width_in_mbs_minus1 = $this->expGolombUe();        // pic_width_in_mbs_minus1
-			$pic_height_in_map_units_minus1 = $this->expGolombUe(); // pic_height_in_map_units_minus1
-
-			$frame_mbs_only_flag = $this->getBits(1);               // frame_mbs_only_flag
-			if ($frame_mbs_only_flag == 0) {
-				$this->skipBits(1);                                 // mb_adaptive_frame_field_flag
-			}
-			$this->skipBits(1);                                     // direct_8x8_inference_flag
-			$frame_cropping_flag = $this->getBits(1);               // frame_cropping_flag
-
-			$frame_crop_left_offset   = 0;
-			$frame_crop_right_offset  = 0;
-			$frame_crop_top_offset    = 0;
-			$frame_crop_bottom_offset = 0;
-
-			if ($frame_cropping_flag) {
-				$frame_crop_left_offset   = $this->expGolombUe();   // frame_crop_left_offset
-				$frame_crop_right_offset  = $this->expGolombUe();   // frame_crop_right_offset
-				$frame_crop_top_offset    = $this->expGolombUe();   // frame_crop_top_offset
-				$frame_crop_bottom_offset = $this->expGolombUe();   // frame_crop_bottom_offset
-			}
-			$this->skipBits(1);                                     // vui_parameters_present_flag
-			// etc
-
-			$this->width  = (($pic_width_in_mbs_minus1 + 1) * 16) - ($frame_crop_left_offset * 2) - ($frame_crop_right_offset * 2);
-			$this->height = ((2 - $frame_mbs_only_flag) * ($pic_height_in_map_units_minus1 + 1) * 16) - ($frame_crop_top_offset * 2) - ($frame_crop_bottom_offset * 2);
-		}
-	}
-
-	public function skipBits($bits) {
-		$newBits = $this->currentBits + $bits;
-		$this->currentBytes += (int)floor($newBits / 8);
-		$this->currentBits = $newBits % 8;
-	}
-
-	public function getBit() {
-		$result = (getid3_lib::BigEndian2Int(substr($this->sps, $this->currentBytes, 1)) >> (7 - $this->currentBits)) & 0x01;
-		$this->skipBits(1);
-		return $result;
-	}
-
-	public function getBits($bits) {
-		$result = 0;
-		for ($i = 0; $i < $bits; $i++) {
-			$result = ($result << 1) + $this->getBit();
-		}
-		return $result;
-	}
-
-	public function expGolombUe() {
-		$significantBits = 0;
-		$bit = $this->getBit();
-		while ($bit == 0) {
-			$significantBits++;
-			$bit = $this->getBit();
-
-			if ($significantBits > 31) {
-				// something is broken, this is an emergency escape to prevent infinite loops
-				return 0;
-			}
-		}
-		return (1 << $significantBits) + $this->getBits($significantBits) - 1;
-	}
-
-	public function expGolombSe() {
-		$result = $this->expGolombUe();
-		if (($result & 0x01) == 0) {
-			return -($result >> 1);
-		} else {
-			return ($result + 1) >> 1;
-		}
-	}
-
-	public function getWidth() {
-		return $this->width;
-	}
-
-	public function getHeight() {
-		return $this->height;
-	}
-}
Index: www/wp-includes/autoload/requests/IRI.php
===================================================================
--- www/wp-includes/autoload/requests/IRI.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/IRI.php	(revision UNDEFINED)
@@ -1,1087 +0,0 @@
-<?php
-/**
- * IRI parser/serialiser/normaliser
- *
- * @package Requests
- * @subpackage Utilities
- */
-
-/**
- * IRI parser/serialiser/normaliser
- *
- * Copyright (c) 2007-2010, Geoffrey Sneddon and Steve Minutillo.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  * Redistributions of source code must retain the above copyright notice,
- *       this list of conditions and the following disclaimer.
- *
- *  * Redistributions in binary form must reproduce the above copyright notice,
- *       this list of conditions and the following disclaimer in the documentation
- *       and/or other materials provided with the distribution.
- *
- *  * Neither the name of the SimplePie Team nor the names of its contributors
- *       may be used to endorse or promote products derived from this software
- *       without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * @package Requests
- * @subpackage Utilities
- * @author Geoffrey Sneddon
- * @author Steve Minutillo
- * @copyright 2007-2009 Geoffrey Sneddon and Steve Minutillo
- * @license http://www.opensource.org/licenses/bsd-license.php
- * @link http://hg.gsnedders.com/iri/
- *
- * @property string $iri IRI we're working with
- * @property-read string $uri IRI in URI form, {@see to_uri}
- * @property string $scheme Scheme part of the IRI
- * @property string $authority Authority part, formatted for a URI (userinfo + host + port)
- * @property string $iauthority Authority part of the IRI (userinfo + host + port)
- * @property string $userinfo Userinfo part, formatted for a URI (after '://' and before '@')
- * @property string $iuserinfo Userinfo part of the IRI (after '://' and before '@')
- * @property string $host Host part, formatted for a URI
- * @property string $ihost Host part of the IRI
- * @property string $port Port part of the IRI (after ':')
- * @property string $path Path part, formatted for a URI (after first '/')
- * @property string $ipath Path part of the IRI (after first '/')
- * @property string $query Query part, formatted for a URI (after '?')
- * @property string $iquery Query part of the IRI (after '?')
- * @property string $fragment Fragment, formatted for a URI (after '#')
- * @property string $ifragment Fragment part of the IRI (after '#')
- */
-class Requests_IRI {
-	/**
-	 * Scheme
-	 *
-	 * @var string
-	 */
-	protected $scheme = null;
-
-	/**
-	 * User Information
-	 *
-	 * @var string
-	 */
-	protected $iuserinfo = null;
-
-	/**
-	 * ihost
-	 *
-	 * @var string
-	 */
-	protected $ihost = null;
-
-	/**
-	 * Port
-	 *
-	 * @var string
-	 */
-	protected $port = null;
-
-	/**
-	 * ipath
-	 *
-	 * @var string
-	 */
-	protected $ipath = '';
-
-	/**
-	 * iquery
-	 *
-	 * @var string
-	 */
-	protected $iquery = null;
-
-	/**
-	 * ifragment
-	 *
-	 * @var string
-	 */
-	protected $ifragment = null;
-
-	/**
-	 * Normalization database
-	 *
-	 * Each key is the scheme, each value is an array with each key as the IRI
-	 * part and value as the default value for that part.
-	 */
-	protected $normalization = array(
-		'acap' => array(
-			'port' => 674
-		),
-		'dict' => array(
-			'port' => 2628
-		),
-		'file' => array(
-			'ihost' => 'localhost'
-		),
-		'http' => array(
-			'port' => 80,
-		),
-		'https' => array(
-			'port' => 443,
-		),
-	);
-
-	/**
-	 * Return the entire IRI when you try and read the object as a string
-	 *
-	 * @return string
-	 */
-	public function __toString() {
-		return $this->get_iri();
-	}
-
-	/**
-	 * Overload __set() to provide access via properties
-	 *
-	 * @param string $name Property name
-	 * @param mixed $value Property value
-	 */
-	public function __set($name, $value) {
-		if (method_exists($this, 'set_' . $name)) {
-			call_user_func(array($this, 'set_' . $name), $value);
-		}
-		elseif (
-			   $name === 'iauthority'
-			|| $name === 'iuserinfo'
-			|| $name === 'ihost'
-			|| $name === 'ipath'
-			|| $name === 'iquery'
-			|| $name === 'ifragment'
-		) {
-			call_user_func(array($this, 'set_' . substr($name, 1)), $value);
-		}
-	}
-
-	/**
-	 * Overload __get() to provide access via properties
-	 *
-	 * @param string $name Property name
-	 * @return mixed
-	 */
-	public function __get($name) {
-		// isset() returns false for null, we don't want to do that
-		// Also why we use array_key_exists below instead of isset()
-		$props = get_object_vars($this);
-
-		if (
-			$name === 'iri' ||
-			$name === 'uri' ||
-			$name === 'iauthority' ||
-			$name === 'authority'
-		) {
-			$method = 'get_' . $name;
-			$return = $this->$method();
-		}
-		elseif (array_key_exists($name, $props)) {
-			$return = $this->$name;
-		}
-		// host -> ihost
-		elseif (($prop = 'i' . $name) && array_key_exists($prop, $props)) {
-			$name = $prop;
-			$return = $this->$prop;
-		}
-		// ischeme -> scheme
-		elseif (($prop = substr($name, 1)) && array_key_exists($prop, $props)) {
-			$name = $prop;
-			$return = $this->$prop;
-		}
-		else {
-			trigger_error('Undefined property: ' . get_class($this) . '::' . $name, E_USER_NOTICE);
-			$return = null;
-		}
-
-		if ($return === null && isset($this->normalization[$this->scheme][$name])) {
-			return $this->normalization[$this->scheme][$name];
-		}
-		else {
-			return $return;
-		}
-	}
-
-	/**
-	 * Overload __isset() to provide access via properties
-	 *
-	 * @param string $name Property name
-	 * @return bool
-	 */
-	public function __isset($name) {
-		return (method_exists($this, 'get_' . $name) || isset($this->$name));
-	}
-
-	/**
-	 * Overload __unset() to provide access via properties
-	 *
-	 * @param string $name Property name
-	 */
-	public function __unset($name) {
-		if (method_exists($this, 'set_' . $name)) {
-			call_user_func(array($this, 'set_' . $name), '');
-		}
-	}
-
-	/**
-	 * Create a new IRI object, from a specified string
-	 *
-	 * @param string|null $iri
-	 */
-	public function __construct($iri = null) {
-		$this->set_iri($iri);
-	}
-
-	/**
-	 * Create a new IRI object by resolving a relative IRI
-	 *
-	 * Returns false if $base is not absolute, otherwise an IRI.
-	 *
-	 * @param IRI|string $base (Absolute) Base IRI
-	 * @param IRI|string $relative Relative IRI
-	 * @return IRI|false
-	 */
-	public static function absolutize($base, $relative) {
-		if (!($relative instanceof Requests_IRI)) {
-			$relative = new Requests_IRI($relative);
-		}
-		if (!$relative->is_valid()) {
-			return false;
-		}
-		elseif ($relative->scheme !== null) {
-			return clone $relative;
-		}
-
-		if (!($base instanceof Requests_IRI)) {
-			$base = new Requests_IRI($base);
-		}
-		if ($base->scheme === null || !$base->is_valid()) {
-			return false;
-		}
-
-		if ($relative->get_iri() !== '') {
-			if ($relative->iuserinfo !== null || $relative->ihost !== null || $relative->port !== null) {
-				$target = clone $relative;
-				$target->scheme = $base->scheme;
-			}
-			else {
-				$target = new Requests_IRI;
-				$target->scheme = $base->scheme;
-				$target->iuserinfo = $base->iuserinfo;
-				$target->ihost = $base->ihost;
-				$target->port = $base->port;
-				if ($relative->ipath !== '') {
-					if ($relative->ipath[0] === '/') {
-						$target->ipath = $relative->ipath;
-					}
-					elseif (($base->iuserinfo !== null || $base->ihost !== null || $base->port !== null) && $base->ipath === '') {
-						$target->ipath = '/' . $relative->ipath;
-					}
-					elseif (($last_segment = strrpos($base->ipath, '/')) !== false) {
-						$target->ipath = substr($base->ipath, 0, $last_segment + 1) . $relative->ipath;
-					}
-					else {
-						$target->ipath = $relative->ipath;
-					}
-					$target->ipath = $target->remove_dot_segments($target->ipath);
-					$target->iquery = $relative->iquery;
-				}
-				else {
-					$target->ipath = $base->ipath;
-					if ($relative->iquery !== null) {
-						$target->iquery = $relative->iquery;
-					}
-					elseif ($base->iquery !== null) {
-						$target->iquery = $base->iquery;
-					}
-				}
-				$target->ifragment = $relative->ifragment;
-			}
-		}
-		else {
-			$target = clone $base;
-			$target->ifragment = null;
-		}
-		$target->scheme_normalization();
-		return $target;
-	}
-
-	/**
-	 * Parse an IRI into scheme/authority/path/query/fragment segments
-	 *
-	 * @param string $iri
-	 * @return array
-	 */
-	protected function parse_iri($iri) {
-		$iri = trim($iri, "\x20\x09\x0A\x0C\x0D");
-		$has_match = preg_match('/^((?P<scheme>[^:\/?#]+):)?(\/\/(?P<authority>[^\/?#]*))?(?P<path>[^?#]*)(\?(?P<query>[^#]*))?(#(?P<fragment>.*))?$/', $iri, $match);
-		if (!$has_match) {
-			throw new Requests_Exception('Cannot parse supplied IRI', 'iri.cannot_parse', $iri);
-		}
-
-		if ($match[1] === '') {
-			$match['scheme'] = null;
-		}
-		if (!isset($match[3]) || $match[3] === '') {
-			$match['authority'] = null;
-		}
-		if (!isset($match[5])) {
-			$match['path'] = '';
-		}
-		if (!isset($match[6]) || $match[6] === '') {
-			$match['query'] = null;
-		}
-		if (!isset($match[8]) || $match[8] === '') {
-			$match['fragment'] = null;
-		}
-		return $match;
-	}
-
-	/**
-	 * Remove dot segments from a path
-	 *
-	 * @param string $input
-	 * @return string
-	 */
-	protected function remove_dot_segments($input) {
-		$output = '';
-		while (strpos($input, './') !== false || strpos($input, '/.') !== false || $input === '.' || $input === '..') {
-			// A: If the input buffer begins with a prefix of "../" or "./",
-			// then remove that prefix from the input buffer; otherwise,
-			if (strpos($input, '../') === 0) {
-				$input = substr($input, 3);
-			}
-			elseif (strpos($input, './') === 0) {
-				$input = substr($input, 2);
-			}
-			// B: if the input buffer begins with a prefix of "/./" or "/.",
-			// where "." is a complete path segment, then replace that prefix
-			// with "/" in the input buffer; otherwise,
-			elseif (strpos($input, '/./') === 0) {
-				$input = substr($input, 2);
-			}
-			elseif ($input === '/.') {
-				$input = '/';
-			}
-			// C: if the input buffer begins with a prefix of "/../" or "/..",
-			// where ".." is a complete path segment, then replace that prefix
-			// with "/" in the input buffer and remove the last segment and its
-			// preceding "/" (if any) from the output buffer; otherwise,
-			elseif (strpos($input, '/../') === 0) {
-				$input = substr($input, 3);
-				$output = substr_replace($output, '', strrpos($output, '/'));
-			}
-			elseif ($input === '/..') {
-				$input = '/';
-				$output = substr_replace($output, '', strrpos($output, '/'));
-			}
-			// D: if the input buffer consists only of "." or "..", then remove
-			// that from the input buffer; otherwise,
-			elseif ($input === '.' || $input === '..') {
-				$input = '';
-			}
-			// E: move the first path segment in the input buffer to the end of
-			// the output buffer, including the initial "/" character (if any)
-			// and any subsequent characters up to, but not including, the next
-			// "/" character or the end of the input buffer
-			elseif (($pos = strpos($input, '/', 1)) !== false) {
-				$output .= substr($input, 0, $pos);
-				$input = substr_replace($input, '', 0, $pos);
-			}
-			else {
-				$output .= $input;
-				$input = '';
-			}
-		}
-		return $output . $input;
-	}
-
-	/**
-	 * Replace invalid character with percent encoding
-	 *
-	 * @param string $string Input string
-	 * @param string $extra_chars Valid characters not in iunreserved or
-	 *                            iprivate (this is ASCII-only)
-	 * @param bool $iprivate Allow iprivate
-	 * @return string
-	 */
-	protected function replace_invalid_with_pct_encoding($string, $extra_chars, $iprivate = false) {
-		// Normalize as many pct-encoded sections as possible
-		$string = preg_replace_callback('/(?:%[A-Fa-f0-9]{2})+/', array(&$this, 'remove_iunreserved_percent_encoded'), $string);
-
-		// Replace invalid percent characters
-		$string = preg_replace('/%(?![A-Fa-f0-9]{2})/', '%25', $string);
-
-		// Add unreserved and % to $extra_chars (the latter is safe because all
-		// pct-encoded sections are now valid).
-		$extra_chars .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~%';
-
-		// Now replace any bytes that aren't allowed with their pct-encoded versions
-		$position = 0;
-		$strlen = strlen($string);
-		while (($position += strspn($string, $extra_chars, $position)) < $strlen) {
-			$value = ord($string[$position]);
-
-			// Start position
-			$start = $position;
-
-			// By default we are valid
-			$valid = true;
-
-			// No one byte sequences are valid due to the while.
-			// Two byte sequence:
-			if (($value & 0xE0) === 0xC0) {
-				$character = ($value & 0x1F) << 6;
-				$length = 2;
-				$remaining = 1;
-			}
-			// Three byte sequence:
-			elseif (($value & 0xF0) === 0xE0) {
-				$character = ($value & 0x0F) << 12;
-				$length = 3;
-				$remaining = 2;
-			}
-			// Four byte sequence:
-			elseif (($value & 0xF8) === 0xF0) {
-				$character = ($value & 0x07) << 18;
-				$length = 4;
-				$remaining = 3;
-			}
-			// Invalid byte:
-			else {
-				$valid = false;
-				$length = 1;
-				$remaining = 0;
-			}
-
-			if ($remaining) {
-				if ($position + $length <= $strlen) {
-					for ($position++; $remaining; $position++) {
-						$value = ord($string[$position]);
-
-						// Check that the byte is valid, then add it to the character:
-						if (($value & 0xC0) === 0x80) {
-							$character |= ($value & 0x3F) << (--$remaining * 6);
-						}
-						// If it is invalid, count the sequence as invalid and reprocess the current byte:
-						else {
-							$valid = false;
-							$position--;
-							break;
-						}
-					}
-				}
-				else {
-					$position = $strlen - 1;
-					$valid = false;
-				}
-			}
-
-			// Percent encode anything invalid or not in ucschar
-			if (
-				// Invalid sequences
-				!$valid
-				// Non-shortest form sequences are invalid
-				|| $length > 1 && $character <= 0x7F
-				|| $length > 2 && $character <= 0x7FF
-				|| $length > 3 && $character <= 0xFFFF
-				// Outside of range of ucschar codepoints
-				// Noncharacters
-				|| ($character & 0xFFFE) === 0xFFFE
-				|| $character >= 0xFDD0 && $character <= 0xFDEF
-				|| (
-					// Everything else not in ucschar
-					   $character > 0xD7FF && $character < 0xF900
-					|| $character < 0xA0
-					|| $character > 0xEFFFD
-				)
-				&& (
-					// Everything not in iprivate, if it applies
-					   !$iprivate
-					|| $character < 0xE000
-					|| $character > 0x10FFFD
-				)
-			) {
-				// If we were a character, pretend we weren't, but rather an error.
-				if ($valid) {
-					$position--;
-				}
-
-				for ($j = $start; $j <= $position; $j++) {
-					$string = substr_replace($string, sprintf('%%%02X', ord($string[$j])), $j, 1);
-					$j += 2;
-					$position += 2;
-					$strlen += 2;
-				}
-			}
-		}
-
-		return $string;
-	}
-
-	/**
-	 * Callback function for preg_replace_callback.
-	 *
-	 * Removes sequences of percent encoded bytes that represent UTF-8
-	 * encoded characters in iunreserved
-	 *
-	 * @param array $match PCRE match
-	 * @return string Replacement
-	 */
-	protected function remove_iunreserved_percent_encoded($match) {
-		// As we just have valid percent encoded sequences we can just explode
-		// and ignore the first member of the returned array (an empty string).
-		$bytes = explode('%', $match[0]);
-
-		// Initialize the new string (this is what will be returned) and that
-		// there are no bytes remaining in the current sequence (unsurprising
-		// at the first byte!).
-		$string = '';
-		$remaining = 0;
-
-		// Loop over each and every byte, and set $value to its value
-		for ($i = 1, $len = count($bytes); $i < $len; $i++) {
-			$value = hexdec($bytes[$i]);
-
-			// If we're the first byte of sequence:
-			if (!$remaining) {
-				// Start position
-				$start = $i;
-
-				// By default we are valid
-				$valid = true;
-
-				// One byte sequence:
-				if ($value <= 0x7F) {
-					$character = $value;
-					$length = 1;
-				}
-				// Two byte sequence:
-				elseif (($value & 0xE0) === 0xC0) {
-					$character = ($value & 0x1F) << 6;
-					$length = 2;
-					$remaining = 1;
-				}
-				// Three byte sequence:
-				elseif (($value & 0xF0) === 0xE0) {
-					$character = ($value & 0x0F) << 12;
-					$length = 3;
-					$remaining = 2;
-				}
-				// Four byte sequence:
-				elseif (($value & 0xF8) === 0xF0) {
-					$character = ($value & 0x07) << 18;
-					$length = 4;
-					$remaining = 3;
-				}
-				// Invalid byte:
-				else {
-					$valid = false;
-					$remaining = 0;
-				}
-			}
-			// Continuation byte:
-			else {
-				// Check that the byte is valid, then add it to the character:
-				if (($value & 0xC0) === 0x80) {
-					$remaining--;
-					$character |= ($value & 0x3F) << ($remaining * 6);
-				}
-				// If it is invalid, count the sequence as invalid and reprocess the current byte as the start of a sequence:
-				else {
-					$valid = false;
-					$remaining = 0;
-					$i--;
-				}
-			}
-
-			// If we've reached the end of the current byte sequence, append it to Unicode::$data
-			if (!$remaining) {
-				// Percent encode anything invalid or not in iunreserved
-				if (
-					// Invalid sequences
-					!$valid
-					// Non-shortest form sequences are invalid
-					|| $length > 1 && $character <= 0x7F
-					|| $length > 2 && $character <= 0x7FF
-					|| $length > 3 && $character <= 0xFFFF
-					// Outside of range of iunreserved codepoints
-					|| $character < 0x2D
-					|| $character > 0xEFFFD
-					// Noncharacters
-					|| ($character & 0xFFFE) === 0xFFFE
-					|| $character >= 0xFDD0 && $character <= 0xFDEF
-					// Everything else not in iunreserved (this is all BMP)
-					|| $character === 0x2F
-					|| $character > 0x39 && $character < 0x41
-					|| $character > 0x5A && $character < 0x61
-					|| $character > 0x7A && $character < 0x7E
-					|| $character > 0x7E && $character < 0xA0
-					|| $character > 0xD7FF && $character < 0xF900
-				) {
-					for ($j = $start; $j <= $i; $j++) {
-						$string .= '%' . strtoupper($bytes[$j]);
-					}
-				}
-				else {
-					for ($j = $start; $j <= $i; $j++) {
-						$string .= chr(hexdec($bytes[$j]));
-					}
-				}
-			}
-		}
-
-		// If we have any bytes left over they are invalid (i.e., we are
-		// mid-way through a multi-byte sequence)
-		if ($remaining) {
-			for ($j = $start; $j < $len; $j++) {
-				$string .= '%' . strtoupper($bytes[$j]);
-			}
-		}
-
-		return $string;
-	}
-
-	protected function scheme_normalization() {
-		if (isset($this->normalization[$this->scheme]['iuserinfo']) && $this->iuserinfo === $this->normalization[$this->scheme]['iuserinfo']) {
-			$this->iuserinfo = null;
-		}
-		if (isset($this->normalization[$this->scheme]['ihost']) && $this->ihost === $this->normalization[$this->scheme]['ihost']) {
-			$this->ihost = null;
-		}
-		if (isset($this->normalization[$this->scheme]['port']) && $this->port === $this->normalization[$this->scheme]['port']) {
-			$this->port = null;
-		}
-		if (isset($this->normalization[$this->scheme]['ipath']) && $this->ipath === $this->normalization[$this->scheme]['ipath']) {
-			$this->ipath = '';
-		}
-		if (isset($this->ihost) && empty($this->ipath)) {
-			$this->ipath = '/';
-		}
-		if (isset($this->normalization[$this->scheme]['iquery']) && $this->iquery === $this->normalization[$this->scheme]['iquery']) {
-			$this->iquery = null;
-		}
-		if (isset($this->normalization[$this->scheme]['ifragment']) && $this->ifragment === $this->normalization[$this->scheme]['ifragment']) {
-			$this->ifragment = null;
-		}
-	}
-
-	/**
-	 * Check if the object represents a valid IRI. This needs to be done on each
-	 * call as some things change depending on another part of the IRI.
-	 *
-	 * @return bool
-	 */
-	public function is_valid() {
-		$isauthority = $this->iuserinfo !== null || $this->ihost !== null || $this->port !== null;
-		if ($this->ipath !== '' &&
-			(
-				$isauthority && (
-					$this->ipath[0] !== '/' ||
-					substr($this->ipath, 0, 2) === '//'
-				) ||
-				(
-					$this->scheme === null &&
-					!$isauthority &&
-					strpos($this->ipath, ':') !== false &&
-					(strpos($this->ipath, '/') === false ? true : strpos($this->ipath, ':') < strpos($this->ipath, '/'))
-				)
-			)
-		) {
-			return false;
-		}
-
-		return true;
-	}
-
-	/**
-	 * Set the entire IRI. Returns true on success, false on failure (if there
-	 * are any invalid characters).
-	 *
-	 * @param string $iri
-	 * @return bool
-	 */
-	protected function set_iri($iri) {
-		static $cache;
-		if (!$cache) {
-			$cache = array();
-		}
-
-		if ($iri === null) {
-			return true;
-		}
-		if (isset($cache[$iri])) {
-			list($this->scheme,
-				 $this->iuserinfo,
-				 $this->ihost,
-				 $this->port,
-				 $this->ipath,
-				 $this->iquery,
-				 $this->ifragment,
-				 $return) = $cache[$iri];
-			return $return;
-		}
-
-		$parsed = $this->parse_iri((string) $iri);
-
-		$return = $this->set_scheme($parsed['scheme'])
-			&& $this->set_authority($parsed['authority'])
-			&& $this->set_path($parsed['path'])
-			&& $this->set_query($parsed['query'])
-			&& $this->set_fragment($parsed['fragment']);
-
-		$cache[$iri] = array($this->scheme,
-							 $this->iuserinfo,
-							 $this->ihost,
-							 $this->port,
-							 $this->ipath,
-							 $this->iquery,
-							 $this->ifragment,
-							 $return);
-		return $return;
-	}
-
-	/**
-	 * Set the scheme. Returns true on success, false on failure (if there are
-	 * any invalid characters).
-	 *
-	 * @param string $scheme
-	 * @return bool
-	 */
-	protected function set_scheme($scheme) {
-		if ($scheme === null) {
-			$this->scheme = null;
-		}
-		elseif (!preg_match('/^[A-Za-z][0-9A-Za-z+\-.]*$/', $scheme)) {
-			$this->scheme = null;
-			return false;
-		}
-		else {
-			$this->scheme = strtolower($scheme);
-		}
-		return true;
-	}
-
-	/**
-	 * Set the authority. Returns true on success, false on failure (if there are
-	 * any invalid characters).
-	 *
-	 * @param string $authority
-	 * @return bool
-	 */
-	protected function set_authority($authority) {
-		static $cache;
-		if (!$cache) {
-			$cache = array();
-		}
-
-		if ($authority === null) {
-			$this->iuserinfo = null;
-			$this->ihost = null;
-			$this->port = null;
-			return true;
-		}
-		if (isset($cache[$authority])) {
-			list($this->iuserinfo,
-				 $this->ihost,
-				 $this->port,
-				 $return) = $cache[$authority];
-
-			return $return;
-		}
-
-		$remaining = $authority;
-		if (($iuserinfo_end = strrpos($remaining, '@')) !== false) {
-			$iuserinfo = substr($remaining, 0, $iuserinfo_end);
-			$remaining = substr($remaining, $iuserinfo_end + 1);
-		}
-		else {
-			$iuserinfo = null;
-		}
-		if (($port_start = strpos($remaining, ':', strpos($remaining, ']'))) !== false) {
-			$port = substr($remaining, $port_start + 1);
-			if ($port === false || $port === '') {
-				$port = null;
-			}
-			$remaining = substr($remaining, 0, $port_start);
-		}
-		else {
-			$port = null;
-		}
-
-		$return = $this->set_userinfo($iuserinfo) &&
-				  $this->set_host($remaining) &&
-				  $this->set_port($port);
-
-		$cache[$authority] = array($this->iuserinfo,
-								   $this->ihost,
-								   $this->port,
-								   $return);
-
-		return $return;
-	}
-
-	/**
-	 * Set the iuserinfo.
-	 *
-	 * @param string $iuserinfo
-	 * @return bool
-	 */
-	protected function set_userinfo($iuserinfo) {
-		if ($iuserinfo === null) {
-			$this->iuserinfo = null;
-		}
-		else {
-			$this->iuserinfo = $this->replace_invalid_with_pct_encoding($iuserinfo, '!$&\'()*+,;=:');
-			$this->scheme_normalization();
-		}
-
-		return true;
-	}
-
-	/**
-	 * Set the ihost. Returns true on success, false on failure (if there are
-	 * any invalid characters).
-	 *
-	 * @param string $ihost
-	 * @return bool
-	 */
-	protected function set_host($ihost) {
-		if ($ihost === null) {
-			$this->ihost = null;
-			return true;
-		}
-		if (substr($ihost, 0, 1) === '[' && substr($ihost, -1) === ']') {
-			if (Requests_IPv6::check_ipv6(substr($ihost, 1, -1))) {
-				$this->ihost = '[' . Requests_IPv6::compress(substr($ihost, 1, -1)) . ']';
-			}
-			else {
-				$this->ihost = null;
-				return false;
-			}
-		}
-		else {
-			$ihost = $this->replace_invalid_with_pct_encoding($ihost, '!$&\'()*+,;=');
-
-			// Lowercase, but ignore pct-encoded sections (as they should
-			// remain uppercase). This must be done after the previous step
-			// as that can add unescaped characters.
-			$position = 0;
-			$strlen = strlen($ihost);
-			while (($position += strcspn($ihost, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ%', $position)) < $strlen) {
-				if ($ihost[$position] === '%') {
-					$position += 3;
-				}
-				else {
-					$ihost[$position] = strtolower($ihost[$position]);
-					$position++;
-				}
-			}
-
-			$this->ihost = $ihost;
-		}
-
-		$this->scheme_normalization();
-
-		return true;
-	}
-
-	/**
-	 * Set the port. Returns true on success, false on failure (if there are
-	 * any invalid characters).
-	 *
-	 * @param string $port
-	 * @return bool
-	 */
-	protected function set_port($port) {
-		if ($port === null) {
-			$this->port = null;
-			return true;
-		}
-
-		if (strspn($port, '0123456789') === strlen($port)) {
-			$this->port = (int) $port;
-			$this->scheme_normalization();
-			return true;
-		}
-
-		$this->port = null;
-		return false;
-	}
-
-	/**
-	 * Set the ipath.
-	 *
-	 * @param string $ipath
-	 * @return bool
-	 */
-	protected function set_path($ipath) {
-		static $cache;
-		if (!$cache) {
-			$cache = array();
-		}
-
-		$ipath = (string) $ipath;
-
-		if (isset($cache[$ipath])) {
-			$this->ipath = $cache[$ipath][(int) ($this->scheme !== null)];
-		}
-		else {
-			$valid = $this->replace_invalid_with_pct_encoding($ipath, '!$&\'()*+,;=@:/');
-			$removed = $this->remove_dot_segments($valid);
-
-			$cache[$ipath] = array($valid, $removed);
-			$this->ipath = ($this->scheme !== null) ? $removed : $valid;
-		}
-		$this->scheme_normalization();
-		return true;
-	}
-
-	/**
-	 * Set the iquery.
-	 *
-	 * @param string $iquery
-	 * @return bool
-	 */
-	protected function set_query($iquery) {
-		if ($iquery === null) {
-			$this->iquery = null;
-		}
-		else {
-			$this->iquery = $this->replace_invalid_with_pct_encoding($iquery, '!$&\'()*+,;=:@/?', true);
-			$this->scheme_normalization();
-		}
-		return true;
-	}
-
-	/**
-	 * Set the ifragment.
-	 *
-	 * @param string $ifragment
-	 * @return bool
-	 */
-	protected function set_fragment($ifragment) {
-		if ($ifragment === null) {
-			$this->ifragment = null;
-		}
-		else {
-			$this->ifragment = $this->replace_invalid_with_pct_encoding($ifragment, '!$&\'()*+,;=:@/?');
-			$this->scheme_normalization();
-		}
-		return true;
-	}
-
-	/**
-	 * Convert an IRI to a URI (or parts thereof)
-	 *
-	 * @param string|bool IRI to convert (or false from {@see get_iri})
-	 * @return string|false URI if IRI is valid, false otherwise.
-	 */
-	protected function to_uri($string) {
-		if (!is_string($string)) {
-			return false;
-		}
-
-		static $non_ascii;
-		if (!$non_ascii) {
-			$non_ascii = implode('', range("\x80", "\xFF"));
-		}
-
-		$position = 0;
-		$strlen = strlen($string);
-		while (($position += strcspn($string, $non_ascii, $position)) < $strlen) {
-			$string = substr_replace($string, sprintf('%%%02X', ord($string[$position])), $position, 1);
-			$position += 3;
-			$strlen += 2;
-		}
-
-		return $string;
-	}
-
-	/**
-	 * Get the complete IRI
-	 *
-	 * @return string
-	 */
-	protected function get_iri() {
-		if (!$this->is_valid()) {
-			return false;
-		}
-
-		$iri = '';
-		if ($this->scheme !== null) {
-			$iri .= $this->scheme . ':';
-		}
-		if (($iauthority = $this->get_iauthority()) !== null) {
-			$iri .= '//' . $iauthority;
-		}
-		$iri .= $this->ipath;
-		if ($this->iquery !== null) {
-			$iri .= '?' . $this->iquery;
-		}
-		if ($this->ifragment !== null) {
-			$iri .= '#' . $this->ifragment;
-		}
-
-		return $iri;
-	}
-
-	/**
-	 * Get the complete URI
-	 *
-	 * @return string
-	 */
-	protected function get_uri() {
-		return $this->to_uri($this->get_iri());
-	}
-
-	/**
-	 * Get the complete iauthority
-	 *
-	 * @return string
-	 */
-	protected function get_iauthority() {
-		if ($this->iuserinfo === null && $this->ihost === null && $this->port === null) {
-			return null;
-		}
-
-		$iauthority = '';
-		if ($this->iuserinfo !== null) {
-			$iauthority .= $this->iuserinfo . '@';
-		}
-		if ($this->ihost !== null) {
-			$iauthority .= $this->ihost;
-		}
-		if ($this->port !== null) {
-			$iauthority .= ':' . $this->port;
-		}
-		return $iauthority;
-	}
-
-	/**
-	 * Get the complete authority
-	 *
-	 * @return string
-	 */
-	protected function get_authority() {
-		$iauthority = $this->get_iauthority();
-		if (is_string($iauthority)) {
-			return $this->to_uri($iauthority);
-		}
-		else {
-			return $iauthority;
-		}
-	}
-}
Index: www/wp-includes/cron.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/cron.php	(revision 38565)
+++ www/wp-includes/cron.php	(revision 38565)
@@ -1,507 +0,0 @@
-<?php
-/**
- * WordPress Cron API
- *
- * @package WordPress
- */
-
-/**
- * Schedules an event to run only once.
- *
- * Schedules an event which will execute once by the WordPress actions core at
- * a time which you specify. The action will fire off when someone visits your
- * WordPress site, if the schedule time has passed.
- *
- * Note that scheduling an event to occur within 10 minutes of an existing event
- * with the same action hook will be ignored unless you pass unique `$args` values
- * for each scheduled event.
- *
- * @since 2.1.0
- * @link https://codex.wordpress.org/Function_Reference/wp_schedule_single_event
- *
- * @param int $timestamp Unix timestamp (UTC) for when to run the event.
- * @param string $hook Action hook to execute when event is run.
- * @param array $args Optional. Arguments to pass to the hook's callback function.
- * @return false|void False if the event does not get scheduled.
- */
-function wp_schedule_single_event( $timestamp, $hook, $args = array()) {
-	// Make sure timestamp is a positive integer
-	if ( ! is_numeric( $timestamp ) || $timestamp <= 0 ) {
-		return false;
-	}
-
-	// Don't schedule a duplicate if there's already an identical event due within 10 minutes of it
-	$next = wp_next_scheduled($hook, $args);
-	if ( $next && abs( $next - $timestamp ) <= 10 * MINUTE_IN_SECONDS ) {
-		return false;
-	}
-
-	$crons = _get_cron_array();
-	$event = (object) array( 'hook' => $hook, 'timestamp' => $timestamp, 'schedule' => false, 'args' => $args );
-	/**
-	 * Filters a single event before it is scheduled.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param stdClass $event {
-	 *     An object containing an event's data.
-	 *
-	 *     @type string       $hook      Action hook to execute when event is run.
-	 *     @type int          $timestamp Unix timestamp (UTC) for when to run the event.
-	 *     @type string|false $schedule  How often the event should recur. See `wp_get_schedules()`.
-	 *     @type array        $args      Arguments to pass to the hook's callback function.
-	 * }
-	 */
-	$event = apply_filters( 'schedule_event', $event );
-
-	// A plugin disallowed this event
-	if ( ! $event )
-		return false;
-
-	$key = md5(serialize($event->args));
-
-	$crons[$event->timestamp][$event->hook][$key] = array( 'schedule' => $event->schedule, 'args' => $event->args );
-	uksort( $crons, "strnatcasecmp" );
-	_set_cron_array( $crons );
-}
-
-/**
- * Schedule a recurring event.
- *
- * Schedules a hook which will be executed by the WordPress actions core on a
- * specific interval, specified by you. The action will trigger when someone
- * visits your WordPress site, if the scheduled time has passed.
- *
- * Valid values for the recurrence are hourly, daily, and twicedaily. These can
- * be extended using the {@see 'cron_schedules'} filter in wp_get_schedules().
- *
- * Use wp_next_scheduled() to prevent duplicates
- *
- * @since 2.1.0
- *
- * @param int $timestamp Unix timestamp (UTC) for when to run the event.
- * @param string $recurrence How often the event should recur.
- * @param string $hook Action hook to execute when event is run.
- * @param array $args Optional. Arguments to pass to the hook's callback function.
- * @return false|void False if the event does not get scheduled.
- */
-function wp_schedule_event( $timestamp, $recurrence, $hook, $args = array()) {
-	// Make sure timestamp is a positive integer
-	if ( ! is_numeric( $timestamp ) || $timestamp <= 0 ) {
-		return false;
-	}
-
-	$crons = _get_cron_array();
-	$schedules = wp_get_schedules();
-
-	if ( !isset( $schedules[$recurrence] ) )
-		return false;
-
-	$event = (object) array( 'hook' => $hook, 'timestamp' => $timestamp, 'schedule' => $recurrence, 'args' => $args, 'interval' => $schedules[$recurrence]['interval'] );
-	/** This filter is documented in wp-includes/cron.php */
-	$event = apply_filters( 'schedule_event', $event );
-
-	// A plugin disallowed this event
-	if ( ! $event )
-		return false;
-
-	$key = md5(serialize($event->args));
-
-	$crons[$event->timestamp][$event->hook][$key] = array( 'schedule' => $event->schedule, 'args' => $event->args, 'interval' => $event->interval );
-	uksort( $crons, "strnatcasecmp" );
-	_set_cron_array( $crons );
-}
-
-/**
- * Reschedule a recurring event.
- *
- * @since 2.1.0
- *
- * @param int $timestamp Unix timestamp (UTC) for when to run the event.
- * @param string $recurrence How often the event should recur.
- * @param string $hook Action hook to execute when event is run.
- * @param array $args Optional. Arguments to pass to the hook's callback function.
- * @return false|void False if the event does not get rescheduled.
- */
-function wp_reschedule_event( $timestamp, $recurrence, $hook, $args = array() ) {
-	// Make sure timestamp is a positive integer
-	if ( ! is_numeric( $timestamp ) || $timestamp <= 0 ) {
-		return false;
-	}
-
-	$crons = _get_cron_array();
-	$schedules = wp_get_schedules();
-	$key = md5( serialize( $args ) );
-	$interval = 0;
-
-	// First we try to get it from the schedule
-	if ( isset( $schedules[ $recurrence ] ) ) {
-		$interval = $schedules[ $recurrence ]['interval'];
-	}
-	// Now we try to get it from the saved interval in case the schedule disappears
-	if ( 0 == $interval ) {
-		$interval = $crons[ $timestamp ][ $hook ][ $key ]['interval'];
-	}
-	// Now we assume something is wrong and fail to schedule
-	if ( 0 == $interval ) {
-		return false;
-	}
-
-	$now = time();
-
-	if ( $timestamp >= $now ) {
-		$timestamp = $now + $interval;
-	} else {
-		$timestamp = $now + ( $interval - ( ( $now - $timestamp ) % $interval ) );
-	}
-
-	wp_schedule_event( $timestamp, $recurrence, $hook, $args );
-}
-
-/**
- * Unschedule a previously scheduled event.
- *
- * The $timestamp and $hook parameters are required so that the event can be
- * identified.
- *
- * @since 2.1.0
- *
- * @param int $timestamp Unix timestamp (UTC) for when to run the event.
- * @param string $hook Action hook, the execution of which will be unscheduled.
- * @param array $args Arguments to pass to the hook's callback function.
- * Although not passed to a callback function, these arguments are used
- * to uniquely identify the scheduled event, so they should be the same
- * as those used when originally scheduling the event.
- * @return false|void False if the event does not get unscheduled.
- */
-function wp_unschedule_event( $timestamp, $hook, $args = array() ) {
-	// Make sure timestamp is a positive integer
-	if ( ! is_numeric( $timestamp ) || $timestamp <= 0 ) {
-		return false;
-	}
-
-	$crons = _get_cron_array();
-	$key = md5(serialize($args));
-	unset( $crons[$timestamp][$hook][$key] );
-	if ( empty($crons[$timestamp][$hook]) )
-		unset( $crons[$timestamp][$hook] );
-	if ( empty($crons[$timestamp]) )
-		unset( $crons[$timestamp] );
-	_set_cron_array( $crons );
-}
-
-/**
- * Unschedule all events attached to the specified hook.
- *
- * @since 2.1.0
- *
- * @param string $hook Action hook, the execution of which will be unscheduled.
- * @param array $args Optional. Arguments that were to be passed to the hook's callback function.
- */
-function wp_clear_scheduled_hook( $hook, $args = array() ) {
-	// Backward compatibility
-	// Previously this function took the arguments as discrete vars rather than an array like the rest of the API
-	if ( !is_array($args) ) {
-		_deprecated_argument( __FUNCTION__, '3.0.0', __('This argument has changed to an array to match the behavior of the other cron functions.') );
-		$args = array_slice( func_get_args(), 1 );
-	}
-
-	// This logic duplicates wp_next_scheduled()
-	// It's required due to a scenario where wp_unschedule_event() fails due to update_option() failing,
-	// and, wp_next_scheduled() returns the same schedule in an infinite loop.
-	$crons = _get_cron_array();
-	if ( empty( $crons ) )
-		return;
-
-	$key = md5( serialize( $args ) );
-	foreach ( $crons as $timestamp => $cron ) {
-		if ( isset( $cron[ $hook ][ $key ] ) ) {
-			wp_unschedule_event( $timestamp, $hook, $args );
-		}
-	}
-}
-
-/**
- * Retrieve the next timestamp for an event.
- *
- * @since 2.1.0
- *
- * @param string $hook Action hook to execute when event is run.
- * @param array $args Optional. Arguments to pass to the hook's callback function.
- * @return false|int The Unix timestamp of the next time the scheduled event will occur.
- */
-function wp_next_scheduled( $hook, $args = array() ) {
-	$crons = _get_cron_array();
-	$key = md5(serialize($args));
-	if ( empty($crons) )
-		return false;
-	foreach ( $crons as $timestamp => $cron ) {
-		if ( isset( $cron[$hook][$key] ) )
-			return $timestamp;
-	}
-	return false;
-}
-
-/**
- * Sends a request to run cron through HTTP request that doesn't halt page loading.
- *
- * @since 2.1.0
- *
- * @param int $gmt_time Optional. Unix timestamp (UTC). Default 0 (current time is used).
- */
-function spawn_cron( $gmt_time = 0 ) {
-	if ( ! $gmt_time )
-		$gmt_time = microtime( true );
-
-	if ( defined('DOING_CRON') || isset($_GET['doing_wp_cron']) )
-		return;
-
-	/*
-	 * Get the cron lock, which is a Unix timestamp of when the last cron was spawned
-	 * and has not finished running.
-	 *
-	 * Multiple processes on multiple web servers can run this code concurrently,
-	 * this lock attempts to make spawning as atomic as possible.
-	 */
-	$lock = get_transient('doing_cron');
-
-	if ( $lock > $gmt_time + 10 * MINUTE_IN_SECONDS )
-		$lock = 0;
-
-	// don't run if another process is currently running it or more than once every 60 sec.
-	if ( $lock + WP_CRON_LOCK_TIMEOUT > $gmt_time )
-		return;
-
-	//sanity check
-	$crons = _get_cron_array();
-	if ( !is_array($crons) )
-		return;
-
-	$keys = array_keys( $crons );
-	if ( isset($keys[0]) && $keys[0] > $gmt_time )
-		return;
-
-	if ( defined( 'ALTERNATE_WP_CRON' ) && ALTERNATE_WP_CRON ) {
-		if ( 'GET' !== $_SERVER['REQUEST_METHOD'] || defined( 'DOING_AJAX' ) ||  defined( 'XMLRPC_REQUEST' ) ) {
-			return;
-		}
-
-		$doing_wp_cron = sprintf( '%.22F', $gmt_time );
-		set_transient( 'doing_cron', $doing_wp_cron );
-
-		ob_start();
-		wp_redirect( add_query_arg( 'doing_wp_cron', $doing_wp_cron, wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
-		echo ' ';
-
-		// flush any buffers and send the headers
-		while ( @ob_end_flush() );
-		flush();
-
-		WP_DEBUG ? include_once( ABSPATH . 'wp-cron.php' ) : @include_once( ABSPATH . 'wp-cron.php' );
-		return;
-	}
-
-	// Set the cron lock with the current unix timestamp, when the cron is being spawned.
-	$doing_wp_cron = sprintf( '%.22F', $gmt_time );
-	set_transient( 'doing_cron', $doing_wp_cron );
-
-	/**
-	 * Filters the cron request arguments.
-	 *
-	 * @since 3.5.0
-	 * @since 4.5.0 The `$doing_wp_cron` parameter was added.
-	 *
-	 * @param array $cron_request_array {
-	 *     An array of cron request URL arguments.
-	 *
-	 *     @type string $url  The cron request URL.
-	 *     @type int    $key  The 22 digit GMT microtime.
-	 *     @type array  $args {
-	 *         An array of cron request arguments.
-	 *
-	 *         @type int  $timeout   The request timeout in seconds. Default .01 seconds.
-	 *         @type bool $blocking  Whether to set blocking for the request. Default false.
-	 *         @type bool $sslverify Whether SSL should be verified for the request. Default false.
-	 *     }
-	 * }
-	 * @param string $doing_wp_cron The unix timestamp of the cron lock.
-	 */
-	$cron_request = apply_filters( 'cron_request', array(
-		'url'  => add_query_arg( 'doing_wp_cron', $doing_wp_cron, site_url( 'wp-cron.php' ) ),
-		'key'  => $doing_wp_cron,
-		'args' => array(
-			'timeout'   => 0.01,
-			'blocking'  => false,
-			/** This filter is documented in wp-includes/class-wp-http-streams.php */
-			'sslverify' => apply_filters( 'https_local_ssl_verify', false )
-		)
-	), $doing_wp_cron );
-
-	wp_remote_post( $cron_request['url'], $cron_request['args'] );
-}
-
-/**
- * Run scheduled callbacks or spawn cron for all scheduled events.
- *
- * @since 2.1.0
- */
-function wp_cron() {
-	// Prevent infinite loops caused by lack of wp-cron.php
-	if ( strpos($_SERVER['REQUEST_URI'], '/wp-cron.php') !== false || ( defined('DISABLE_WP_CRON') && DISABLE_WP_CRON ) )
-		return;
-
-	if ( false === $crons = _get_cron_array() )
-		return;
-
-	$gmt_time = microtime( true );
-	$keys = array_keys( $crons );
-	if ( isset($keys[0]) && $keys[0] > $gmt_time )
-		return;
-
-	$schedules = wp_get_schedules();
-	foreach ( $crons as $timestamp => $cronhooks ) {
-		if ( $timestamp > $gmt_time ) break;
-		foreach ( (array) $cronhooks as $hook => $args ) {
-			if ( isset($schedules[$hook]['callback']) && !call_user_func( $schedules[$hook]['callback'] ) )
-				continue;
-			spawn_cron( $gmt_time );
-			break 2;
-		}
-	}
-}
-
-/**
- * Retrieve supported event recurrence schedules.
- *
- * The default supported recurrences are 'hourly', 'twicedaily', and 'daily'. A plugin may
- * add more by hooking into the {@see 'cron_schedules'} filter. The filter accepts an array
- * of arrays. The outer array has a key that is the name of the schedule or for
- * example 'weekly'. The value is an array with two keys, one is 'interval' and
- * the other is 'display'.
- *
- * The 'interval' is a number in seconds of when the cron job should run. So for
- * 'hourly', the time is 3600 or 60*60. For weekly, the value would be
- * 60*60*24*7 or 604800. The value of 'interval' would then be 604800.
- *
- * The 'display' is the description. For the 'weekly' key, the 'display' would
- * be `__( 'Once Weekly' )`.
- *
- * For your plugin, you will be passed an array. you can easily add your
- * schedule by doing the following.
- *
- *     // Filter parameter variable name is 'array'.
- *     $array['weekly'] = array(
- *         'interval' => 604800,
- *     	   'display'  => __( 'Once Weekly' )
- *     );
- *
- *
- * @since 2.1.0
- *
- * @return array
- */
-function wp_get_schedules() {
-	$schedules = array(
-		'hourly'     => array( 'interval' => HOUR_IN_SECONDS,      'display' => __( 'Once Hourly' ) ),
-		'twicedaily' => array( 'interval' => 12 * HOUR_IN_SECONDS, 'display' => __( 'Twice Daily' ) ),
-		'daily'      => array( 'interval' => DAY_IN_SECONDS,       'display' => __( 'Once Daily' ) ),
-	);
-	/**
-	 * Filters the non-default cron schedules.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param array $new_schedules An array of non-default cron schedules. Default empty.
-	 */
-	return array_merge( apply_filters( 'cron_schedules', array() ), $schedules );
-}
-
-/**
- * Retrieve the recurrence schedule for an event.
- *
- * @see wp_get_schedules() for available schedules.
- *
- * @since 2.1.0
- *
- * @param string $hook Action hook to identify the event.
- * @param array $args Optional. Arguments passed to the event's callback function.
- * @return string|false False, if no schedule. Schedule name on success.
- */
-function wp_get_schedule($hook, $args = array()) {
-	$crons = _get_cron_array();
-	$key = md5(serialize($args));
-	if ( empty($crons) )
-		return false;
-	foreach ( $crons as $timestamp => $cron ) {
-		if ( isset( $cron[$hook][$key] ) )
-			return $cron[$hook][$key]['schedule'];
-	}
-	return false;
-}
-
-//
-// Private functions
-//
-
-/**
- * Retrieve cron info array option.
- *
- * @since 2.1.0
- * @access private
- *
- * @return false|array CRON info array.
- */
-function _get_cron_array()  {
-	$cron = get_option('cron');
-	if ( ! is_array($cron) )
-		return false;
-
-	if ( !isset($cron['version']) )
-		$cron = _upgrade_cron_array($cron);
-
-	unset($cron['version']);
-
-	return $cron;
-}
-
-/**
- * Updates the CRON option with the new CRON array.
- *
- * @since 2.1.0
- * @access private
- *
- * @param array $cron Cron info array from _get_cron_array().
- */
-function _set_cron_array($cron) {
-	$cron['version'] = 2;
-	update_option( 'cron', $cron );
-}
-
-/**
- * Upgrade a Cron info array.
- *
- * This function upgrades the Cron info array to version 2.
- *
- * @since 2.1.0
- * @access private
- *
- * @param array $cron Cron info array from _get_cron_array().
- * @return array An upgraded Cron info array.
- */
-function _upgrade_cron_array($cron) {
-	if ( isset($cron['version']) && 2 == $cron['version'])
-		return $cron;
-
-	$new_cron = array();
-
-	foreach ( (array) $cron as $timestamp => $hooks) {
-		foreach ( (array) $hooks as $hook => $args ) {
-			$key = md5(serialize($args['args']));
-			$new_cron[$timestamp][$hook][$key] = $args;
-		}
-	}
-
-	$new_cron['version'] = 2;
-	update_option( 'cron', $new_cron );
-	return $new_cron;
-}
Index: www/wp-includes/ms-settings.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/ms-settings.php	(revision 38565)
+++ www/wp-includes/ms-settings.php	(revision 38565)
@@ -1,114 +0,0 @@
-<?php
-/**
- * Used to set up and fix common variables and include
- * the Multisite procedural and class library.
- *
- * Allows for some configuration in wp-config.php (see ms-default-constants.php)
- *
- * @package WordPress
- * @subpackage Multisite
- * @since 3.0.0
- */
-
-/**
- * Objects representing the current network and current site.
- *
- * These may be populated through a custom `sunrise.php`. If not, then this
- * file will attempt to populate them based on the current request.
- *
- * @global WP_Network $current_site The current network.
- * @global object     $current_blog The current site.
- * @since 3.0.0
- */
-global $current_site, $current_blog;
-
-/** WP_Network class */
-require_once( ABSPATH . WPINC . '/class-wp-network.php' );
-
-/** WP_Site class */
-require_once( ABSPATH . WPINC . '/class-wp-site.php' );
-
-/** Multisite loader */
-require_once( ABSPATH . WPINC . '/ms-load.php' );
-
-/** Default Multisite constants */
-require_once( ABSPATH . WPINC . '/ms-default-constants.php' );
-
-if ( defined( 'SUNRISE' ) ) {
-	include_once( WP_CONTENT_DIR . '/sunrise.php' );
-}
-
-/** Check for and define SUBDOMAIN_INSTALL and the deprecated VHOST constant. */
-ms_subdomain_constants();
-
-// This block will process a request if the current network or current site objects
-// have not been populated in the global scope through something like `sunrise.php`.
-if ( !isset( $current_site ) || !isset( $current_blog ) ) {
-
-	$domain = strtolower( stripslashes( $_SERVER['HTTP_HOST'] ) );
-	if ( substr( $domain, -3 ) == ':80' ) {
-		$domain = substr( $domain, 0, -3 );
-		$_SERVER['HTTP_HOST'] = substr( $_SERVER['HTTP_HOST'], 0, -3 );
-	} elseif ( substr( $domain, -4 ) == ':443' ) {
-		$domain = substr( $domain, 0, -4 );
-		$_SERVER['HTTP_HOST'] = substr( $_SERVER['HTTP_HOST'], 0, -4 );
-	}
-
-	$path = stripslashes( $_SERVER['REQUEST_URI'] );
-	if ( is_admin() ) {
-		$path = preg_replace( '#(.*)/wp-admin/.*#', '$1/', $path );
-	}
-	list( $path ) = explode( '?', $path );
-
-	$bootstrap_result = ms_load_current_site_and_network( $domain, $path, is_subdomain_install() );
-
-	if ( true === $bootstrap_result ) {
-		// `$current_blog` and `$current_site are now populated.
-	} elseif ( false === $bootstrap_result ) {
-		ms_not_installed( $domain, $path );
-	} else {
-		header( 'Location: ' . $bootstrap_result );
-		exit;
-	}
-	unset( $bootstrap_result );
-
-	$blog_id = $current_blog->blog_id;
-	$public  = $current_blog->public;
-
-	if ( empty( $current_blog->site_id ) ) {
-		// This dates to [MU134] and shouldn't be relevant anymore,
-		// but it could be possible for arguments passed to insert_blog() etc.
-		$current_blog->site_id = 1;
-	}
-
-	$site_id = $current_blog->site_id;
-	wp_load_core_site_options( $site_id );
-}
-
-$wpdb->set_prefix( $table_prefix, false ); // $table_prefix can be set in sunrise.php
-$wpdb->set_blog_id( $current_blog->blog_id, $current_blog->site_id );
-$table_prefix = $wpdb->get_blog_prefix();
-$_wp_switched_stack = array();
-$switched = false;
-
-// need to init cache again after blog_id is set
-wp_start_object_cache();
-
-if ( ! $current_site instanceof WP_Network ) {
-	$current_site = new WP_Network( $current_site );
-}
-
-if ( ! $current_blog instanceof WP_Site ) {
-	$current_blog = new WP_Site( $current_blog );
-}
-
-// Define upload directory constants
-ms_upload_constants();
-
-/**
- * Fires after the current site and network have been detected and loaded
- * in multisite's bootstrap.
- *
- * @since 4.6.0
- */
-do_action( 'ms_loaded' );
Index: www/wp-includes/customize/class-wp-customize-new-menu-section.php
===================================================================
--- www/wp-includes/customize/class-wp-customize-new-menu-section.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_New_Menu_Section.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-walker.php
===================================================================
--- www/wp-includes/class-wp-walker.php	(revision 38565)
+++ www/wp-includes/autoload/walker/Walker.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/SimplePie/Cache/Base.php
===================================================================
--- www/wp-includes/SimplePie/Cache/Base.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_Cache_Base.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/media-upload.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/media-upload.php	(revision 38565)
+++ www/wp-admin/media-upload.php	(revision 38565)
@@ -1,112 +0,0 @@
-<?php
-/**
- * Manage media uploaded file.
- *
- * There are many filters in here for media. Plugins can extend functionality
- * by hooking into the filters.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-if ( ! isset( $_GET['inline'] ) )
-	define( 'IFRAME_REQUEST' , true );
-
-/** Load WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-if ( ! current_user_can( 'upload_files' ) ) {
-	wp_die( __( 'Sorry, you are not allowed to upload files.' ), 403 );
-}
-
-wp_enqueue_script('plupload-handlers');
-wp_enqueue_script('image-edit');
-wp_enqueue_script('set-post-thumbnail' );
-wp_enqueue_style('imgareaselect');
-wp_enqueue_script( 'media-gallery' );
-
-@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
-
-// IDs should be integers
-$ID = isset($ID) ? (int) $ID : 0;
-$post_id = isset($post_id)? (int) $post_id : 0;
-
-// Require an ID for the edit screen.
-if ( isset( $action ) && $action == 'edit' && !$ID ) {
-	wp_die(
-		'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-		'<p>' . __( 'Invalid item ID.' ) . '</p>',
-		403
-	);
-}
-
-if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' , $_REQUEST['post_id'] ) ) {
-	wp_die(
-		'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-		'<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
-		403
-	);
-}
-
-// Upload type: image, video, file, ..?
-if ( isset($_GET['type']) ) {
-	$type = strval($_GET['type']);
-} else {
-	/**
-	 * Filters the default media upload type in the legacy (pre-3.5.0) media popup.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param string $type The default media upload type. Possible values include
-	 *                     'image', 'audio', 'video', 'file', etc. Default 'file'.
-	 */
-	$type = apply_filters( 'media_upload_default_type', 'file' );
-}
-
-// Tab: gallery, library, or type-specific.
-if ( isset($_GET['tab']) ) {
-	$tab = strval($_GET['tab']);
-} else {
-	/**
-	 * Filters the default tab in the legacy (pre-3.5.0) media popup.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param string $type The default media popup tab. Default 'type' (From Computer).
-	 */
-	$tab = apply_filters( 'media_upload_default_tab', 'type' );
-}
-
-$body_id = 'media-upload';
-
-// Let the action code decide how to handle the request.
-if ( $tab == 'type' || $tab == 'type_url' || ! array_key_exists( $tab , media_upload_tabs() ) ) {
-	/**
-	 * Fires inside specific upload-type views in the legacy (pre-3.5.0)
-	 * media popup based on the current tab.
-	 *
-	 * The dynamic portion of the hook name, `$type`, refers to the specific
-	 * media upload type. Possible values include 'image', 'audio', 'video',
-	 * 'file', etc.
-	 *
-	 * The hook only fires if the current `$tab` is 'type' (From Computer),
-	 * 'type_url' (From URL), or, if the tab does not exist (i.e., has not
-	 * been registered via the {@see 'media_upload_tabs'} filter.
-	 *
-	 * @since 2.5.0
-	 */
-	do_action( "media_upload_{$type}" );
-} else {
-	/**
-	 * Fires inside limited and specific upload-tab views in the legacy
-	 * (pre-3.5.0) media popup.
-	 *
-	 * The dynamic portion of the hook name, `$tab`, refers to the specific
-	 * media upload tab. Possible values include 'library' (Media Library),
-	 * or any custom tab registered via the {@see 'media_upload_tabs'} filter.
-	 *
-	 * @since 2.5.0
-	 */
-	do_action( "media_upload_{$tab}" );
-}
-
Index: www/wp-includes/Requests/Response.php
===================================================================
--- www/wp-includes/Requests/Response.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Response.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/widgets/class-wp-widget-recent-comments.php
===================================================================
--- www/wp-includes/widgets/class-wp-widget-recent-comments.php	(revision 38565)
+++ www/wp-includes/autoload/widgets/WP_Widget_Recent_Comments.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/rest-api/class-wp-rest-request.php
===================================================================
--- www/wp-includes/rest-api/class-wp-rest-request.php	(revision 38565)
+++ www/wp-includes/autoload/rest-api/WP_REST_Request.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/random/TypeError.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/random/TypeError.php	(revision )
+++ www/wp-includes/random/TypeError.php	(revision )
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Random_* Compatibility Library 
+ * for using the new PHP 7 random_* API in PHP 5 projects
+ * 
+ * The MIT License (MIT)
+ * 
+ * Copyright (c) 2015 Paragon Initiative Enterprises
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+class TypeError extends Error
+{
+
+}
Index: www/wp-includes/autoload/feed/AtomParser.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/feed/AtomParser.php	(revision )
+++ www/wp-includes/autoload/feed/AtomParser.php	(revision )
@@ -0,0 +1,316 @@
+<?php
+/**
+ * Atom Syndication Format PHP Library
+ *
+ * @package AtomLib
+ * @link http://code.google.com/p/phpatomlib/
+ *
+ * @author Elias Torres <elias@torrez.us>
+ * @version 0.4
+ * @since 2.3.0
+ */
+
+/**
+ * AtomLib Atom Parser API
+ *
+ * @package AtomLib
+ */
+class AtomParser {
+
+    var $NS = 'http://www.w3.org/2005/Atom';
+    var $ATOM_CONTENT_ELEMENTS = array('content','summary','title','subtitle','rights');
+    var $ATOM_SIMPLE_ELEMENTS = array('id','updated','published','draft');
+
+    var $debug = false;
+
+    var $depth = 0;
+    var $indent = 2;
+    var $in_content;
+    var $ns_contexts = array();
+    var $ns_decls = array();
+    var $content_ns_decls = array();
+    var $content_ns_contexts = array();
+    var $is_xhtml = false;
+    var $is_html = false;
+    var $is_text = true;
+    var $skipped_div = false;
+
+    var $FILE = "php://input";
+
+    var $feed;
+    var $current;
+
+	/**
+	 * PHP5 constructor.
+	 */
+    function __construct() {
+
+        $this->feed = new AtomFeed();
+        $this->current = null;
+        $this->map_attrs_func = create_function('$k,$v', 'return "$k=\"$v\"";');
+        $this->map_xmlns_func = create_function('$p,$n', '$xd = "xmlns"; if(strlen($n[0])>0) $xd .= ":{$n[0]}"; return "{$xd}=\"{$n[1]}\"";');
+    }
+
+	/**
+	 * PHP4 constructor.
+	 */
+	public function AtomParser() {
+		self::__construct();
+	}
+
+    function _p($msg) {
+        if($this->debug) {
+            print str_repeat(" ", $this->depth * $this->indent) . $msg ."\n";
+        }
+    }
+
+    function error_handler($log_level, $log_text, $error_file, $error_line) {
+        $this->error = $log_text;
+    }
+
+    function parse() {
+
+        set_error_handler(array(&$this, 'error_handler'));
+
+        array_unshift($this->ns_contexts, array());
+
+        $parser = xml_parser_create_ns();
+        xml_set_object($parser, $this);
+        xml_set_element_handler($parser, "start_element", "end_element");
+        xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
+        xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
+        xml_set_character_data_handler($parser, "cdata");
+        xml_set_default_handler($parser, "_default");
+        xml_set_start_namespace_decl_handler($parser, "start_ns");
+        xml_set_end_namespace_decl_handler($parser, "end_ns");
+
+        $this->content = '';
+
+        $ret = true;
+
+        $fp = fopen($this->FILE, "r");
+        while ($data = fread($fp, 4096)) {
+            if($this->debug) $this->content .= $data;
+
+            if(!xml_parse($parser, $data, feof($fp))) {
+                /* translators: 1: error message, 2: line number */
+                trigger_error(sprintf(__('XML Error: %1$s at line %2$s')."\n",
+                    xml_error_string(xml_get_error_code($parser)),
+                    xml_get_current_line_number($parser)));
+                $ret = false;
+                break;
+            }
+        }
+        fclose($fp);
+
+        xml_parser_free($parser);
+
+        restore_error_handler();
+
+        return $ret;
+    }
+
+    function start_element($parser, $name, $attrs) {
+
+        $tag = array_pop(explode(":", $name));
+
+        switch($name) {
+            case $this->NS . ':feed':
+                $this->current = $this->feed;
+                break;
+            case $this->NS . ':entry':
+                $this->current = new AtomEntry();
+                break;
+        };
+
+        $this->_p("start_element('$name')");
+        #$this->_p(print_r($this->ns_contexts,true));
+        #$this->_p('current(' . $this->current . ')');
+
+        array_unshift($this->ns_contexts, $this->ns_decls);
+
+        $this->depth++;
+
+        if(!empty($this->in_content)) {
+
+            $this->content_ns_decls = array();
+
+            if($this->is_html || $this->is_text)
+                trigger_error("Invalid content in element found. Content must not be of type text or html if it contains markup.");
+
+            $attrs_prefix = array();
+
+            // resolve prefixes for attributes
+            foreach($attrs as $key => $value) {
+                $with_prefix = $this->ns_to_prefix($key, true);
+                $attrs_prefix[$with_prefix[1]] = $this->xml_escape($value);
+            }
+
+            $attrs_str = join(' ', array_map($this->map_attrs_func, array_keys($attrs_prefix), array_values($attrs_prefix)));
+            if(strlen($attrs_str) > 0) {
+                $attrs_str = " " . $attrs_str;
+            }
+
+            $with_prefix = $this->ns_to_prefix($name);
+
+            if(!$this->is_declared_content_ns($with_prefix[0])) {
+                array_push($this->content_ns_decls, $with_prefix[0]);
+            }
+
+            $xmlns_str = '';
+            if(count($this->content_ns_decls) > 0) {
+                array_unshift($this->content_ns_contexts, $this->content_ns_decls);
+                $xmlns_str .= join(' ', array_map($this->map_xmlns_func, array_keys($this->content_ns_contexts[0]), array_values($this->content_ns_contexts[0])));
+                if(strlen($xmlns_str) > 0) {
+                    $xmlns_str = " " . $xmlns_str;
+                }
+            }
+
+            array_push($this->in_content, array($tag, $this->depth, "<". $with_prefix[1] ."{$xmlns_str}{$attrs_str}" . ">"));
+
+        } else if(in_array($tag, $this->ATOM_CONTENT_ELEMENTS) || in_array($tag, $this->ATOM_SIMPLE_ELEMENTS)) {
+            $this->in_content = array();
+            $this->is_xhtml = $attrs['type'] == 'xhtml';
+            $this->is_html = $attrs['type'] == 'html' || $attrs['type'] == 'text/html';
+            $this->is_text = !in_array('type',array_keys($attrs)) || $attrs['type'] == 'text';
+            $type = $this->is_xhtml ? 'XHTML' : ($this->is_html ? 'HTML' : ($this->is_text ? 'TEXT' : $attrs['type']));
+
+            if(in_array('src',array_keys($attrs))) {
+                $this->current->$tag = $attrs;
+            } else {
+                array_push($this->in_content, array($tag,$this->depth, $type));
+            }
+        } else if($tag == 'link') {
+            array_push($this->current->links, $attrs);
+        } else if($tag == 'category') {
+            array_push($this->current->categories, $attrs);
+        }
+
+        $this->ns_decls = array();
+    }
+
+    function end_element($parser, $name) {
+
+        $tag = array_pop(explode(":", $name));
+
+        $ccount = count($this->in_content);
+
+        # if we are *in* content, then let's proceed to serialize it
+        if(!empty($this->in_content)) {
+            # if we are ending the original content element
+            # then let's finalize the content
+            if($this->in_content[0][0] == $tag &&
+                $this->in_content[0][1] == $this->depth) {
+                $origtype = $this->in_content[0][2];
+                array_shift($this->in_content);
+                $newcontent = array();
+                foreach($this->in_content as $c) {
+                    if(count($c) == 3) {
+                        array_push($newcontent, $c[2]);
+                    } else {
+                        if($this->is_xhtml || $this->is_text) {
+                            array_push($newcontent, $this->xml_escape($c));
+                        } else {
+                            array_push($newcontent, $c);
+                        }
+                    }
+                }
+                if(in_array($tag, $this->ATOM_CONTENT_ELEMENTS)) {
+                    $this->current->$tag = array($origtype, join('',$newcontent));
+                } else {
+                    $this->current->$tag = join('',$newcontent);
+                }
+                $this->in_content = array();
+            } else if($this->in_content[$ccount-1][0] == $tag &&
+                $this->in_content[$ccount-1][1] == $this->depth) {
+                $this->in_content[$ccount-1][2] = substr($this->in_content[$ccount-1][2],0,-1) . "/>";
+            } else {
+                # else, just finalize the current element's content
+                $endtag = $this->ns_to_prefix($name);
+                array_push($this->in_content, array($tag, $this->depth, "</$endtag[1]>"));
+            }
+        }
+
+        array_shift($this->ns_contexts);
+
+        $this->depth--;
+
+        if($name == ($this->NS . ':entry')) {
+            array_push($this->feed->entries, $this->current);
+            $this->current = null;
+        }
+
+        $this->_p("end_element('$name')");
+    }
+
+    function start_ns($parser, $prefix, $uri) {
+        $this->_p("starting: " . $prefix . ":" . $uri);
+        array_push($this->ns_decls, array($prefix,$uri));
+    }
+
+    function end_ns($parser, $prefix) {
+        $this->_p("ending: #" . $prefix . "#");
+    }
+
+    function cdata($parser, $data) {
+        $this->_p("data: #" . str_replace(array("\n"), array("\\n"), trim($data)) . "#");
+        if(!empty($this->in_content)) {
+            array_push($this->in_content, $data);
+        }
+    }
+
+    function _default($parser, $data) {
+        # when does this gets called?
+    }
+
+
+    function ns_to_prefix($qname, $attr=false) {
+        # split 'http://www.w3.org/1999/xhtml:div' into ('http','//www.w3.org/1999/xhtml','div')
+        $components = explode(":", $qname);
+
+        # grab the last one (e.g 'div')
+        $name = array_pop($components);
+
+        if(!empty($components)) {
+            # re-join back the namespace component
+            $ns = join(":",$components);
+            foreach($this->ns_contexts as $context) {
+                foreach($context as $mapping) {
+                    if($mapping[1] == $ns && strlen($mapping[0]) > 0) {
+                        return array($mapping, "$mapping[0]:$name");
+                    }
+                }
+            }
+        }
+
+        if($attr) {
+            return array(null, $name);
+        } else {
+            foreach($this->ns_contexts as $context) {
+                foreach($context as $mapping) {
+                    if(strlen($mapping[0]) == 0) {
+                        return array($mapping, $name);
+                    }
+                }
+            }
+        }
+    }
+
+    function is_declared_content_ns($new_mapping) {
+        foreach($this->content_ns_contexts as $context) {
+            foreach($context as $mapping) {
+                if($new_mapping == $mapping) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    function xml_escape($string)
+    {
+             return str_replace(array('&','"',"'",'<','>'),
+                array('&amp;','&quot;','&apos;','&lt;','&gt;'),
+                $string );
+    }
+}
Index: www/wp-includes/class.wp-styles.php
===================================================================
--- www/wp-includes/class.wp-styles.php	(revision 38565)
+++ www/wp-includes/autoload/dependency/WP_Styles.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/Requests/Exception/HTTP/431.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/431.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_431.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/IXR/class-IXR-request.php
===================================================================
--- www/wp-includes/IXR/class-IXR-request.php	(revision 38565)
+++ www/wp-includes/autoload/ixr/IXR_Request.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/includes/class-wp-list-table.php
===================================================================
--- www/wp-admin/includes/class-wp-list-table.php	(revision 38565)
+++ www/wp-admin/autoload/list-table/WP_List_Table.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/pomo/streams.php
===================================================================
--- www/wp-includes/autoload/pomo/streams.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/pomo/streams.php	(revision UNDEFINED)
@@ -1,315 +0,0 @@
-<?php
-/**
- * Classes, which help reading streams of data from files.
- * Based on the classes from Danilo Segan <danilo@kvota.net>
- *
- * @version $Id: streams.php 1157 2015-11-20 04:30:11Z dd32 $
- * @package pomo
- * @subpackage streams
- */
-
-if ( ! class_exists( 'POMO_Reader', false ) ):
-class POMO_Reader {
-
-	var $endian = 'little';
-	var $_post = '';
-
-	/**
-	 * PHP5 constructor.
-	 */
-	function __construct() {
-		$this->is_overloaded = ((ini_get("mbstring.func_overload") & 2) != 0) && function_exists('mb_substr');
-		$this->_pos = 0;
-	}
-
-	/**
-	 * PHP4 constructor.
-	 */
-	public function POMO_Reader() {
-		self::__construct();
-	}
-
-	/**
-	 * Sets the endianness of the file.
-	 *
-	 * @param $endian string 'big' or 'little'
-	 */
-	function setEndian($endian) {
-		$this->endian = $endian;
-	}
-
-	/**
-	 * Reads a 32bit Integer from the Stream
-	 *
-	 * @return mixed The integer, corresponding to the next 32 bits from
-	 * 	the stream of false if there are not enough bytes or on error
-	 */
-	function readint32() {
-		$bytes = $this->read(4);
-		if (4 != $this->strlen($bytes))
-			return false;
-		$endian_letter = ('big' == $this->endian)? 'N' : 'V';
-		$int = unpack($endian_letter, $bytes);
-		return reset( $int );
-	}
-
-	/**
-	 * Reads an array of 32-bit Integers from the Stream
-	 *
-	 * @param integer count How many elements should be read
-	 * @return mixed Array of integers or false if there isn't
-	 * 	enough data or on error
-	 */
-	function readint32array($count) {
-		$bytes = $this->read(4 * $count);
-		if (4*$count != $this->strlen($bytes))
-			return false;
-		$endian_letter = ('big' == $this->endian)? 'N' : 'V';
-		return unpack($endian_letter.$count, $bytes);
-	}
-
-	/**
-	 * @param string $string
-	 * @param int    $start
-	 * @param int    $length
-	 * @return string
-	 */
-	function substr($string, $start, $length) {
-		if ($this->is_overloaded) {
-			return mb_substr($string, $start, $length, 'ascii');
-		} else {
-			return substr($string, $start, $length);
-		}
-	}
-
-	/**
-	 * @param string $string
-	 * @return int
-	 */
-	function strlen($string) {
-		if ($this->is_overloaded) {
-			return mb_strlen($string, 'ascii');
-		} else {
-			return strlen($string);
-		}
-	}
-
-	/**
-	 * @param string $string
-	 * @param int    $chunk_size
-	 * @return array
-	 */
-	function str_split($string, $chunk_size) {
-		if (!function_exists('str_split')) {
-			$length = $this->strlen($string);
-			$out = array();
-			for ($i = 0; $i < $length; $i += $chunk_size)
-				$out[] = $this->substr($string, $i, $chunk_size);
-			return $out;
-		} else {
-			return str_split( $string, $chunk_size );
-		}
-	}
-
-	/**
-	 * @return int
-	 */
-	function pos() {
-		return $this->_pos;
-	}
-
-	/**
-	 * @return true
-	 */
-	function is_resource() {
-		return true;
-	}
-
-	/**
-	 * @return true
-	 */
-	function close() {
-		return true;
-	}
-}
-endif;
-
-if ( ! class_exists( 'POMO_FileReader', false ) ):
-class POMO_FileReader extends POMO_Reader {
-
-	/**
-	 * @param string $filename
-	 */
-	function __construct( $filename ) {
-		parent::POMO_Reader();
-		$this->_f = fopen($filename, 'rb');
-	}
-
-	/**
-	 * PHP4 constructor.
-	 */
-	public function POMO_FileReader( $filename ) {
-		self::__construct( $filename );
-	}
-
-	/**
-	 * @param int $bytes
-	 */
-	function read($bytes) {
-		return fread($this->_f, $bytes);
-	}
-
-	/**
-	 * @param int $pos
-	 * @return boolean
-	 */
-	function seekto($pos) {
-		if ( -1 == fseek($this->_f, $pos, SEEK_SET)) {
-			return false;
-		}
-		$this->_pos = $pos;
-		return true;
-	}
-
-	/**
-	 * @return bool
-	 */
-	function is_resource() {
-		return is_resource($this->_f);
-	}
-
-	/**
-	 * @return bool
-	 */
-	function feof() {
-		return feof($this->_f);
-	}
-
-	/**
-	 * @return bool
-	 */
-	function close() {
-		return fclose($this->_f);
-	}
-
-	/**
-	 * @return string
-	 */
-	function read_all() {
-		$all = '';
-		while ( !$this->feof() )
-			$all .= $this->read(4096);
-		return $all;
-	}
-}
-endif;
-
-if ( ! class_exists( 'POMO_StringReader', false ) ):
-/**
- * Provides file-like methods for manipulating a string instead
- * of a physical file.
- */
-class POMO_StringReader extends POMO_Reader {
-
-	var $_str = '';
-
-	/**
-	 * PHP5 constructor.
-	 */
-	function __construct( $str = '' ) {
-		parent::POMO_Reader();
-		$this->_str = $str;
-		$this->_pos = 0;
-	}
-
-	/**
-	 * PHP4 constructor.
-	 */
-	public function POMO_StringReader( $str = '' ) {
-		self::__construct( $str );
-	}
-
-	/**
-	 * @param string $bytes
-	 * @return string
-	 */
-	function read($bytes) {
-		$data = $this->substr($this->_str, $this->_pos, $bytes);
-		$this->_pos += $bytes;
-		if ($this->strlen($this->_str) < $this->_pos) $this->_pos = $this->strlen($this->_str);
-		return $data;
-	}
-
-	/**
-	 * @param int $pos
-	 * @return int
-	 */
-	function seekto($pos) {
-		$this->_pos = $pos;
-		if ($this->strlen($this->_str) < $this->_pos) $this->_pos = $this->strlen($this->_str);
-		return $this->_pos;
-	}
-
-	/**
-	 * @return int
-	 */
-	function length() {
-		return $this->strlen($this->_str);
-	}
-
-	/**
-	 * @return string
-	 */
-	function read_all() {
-		return $this->substr($this->_str, $this->_pos, $this->strlen($this->_str));
-	}
-
-}
-endif;
-
-if ( ! class_exists( 'POMO_CachedFileReader', false ) ):
-/**
- * Reads the contents of the file in the beginning.
- */
-class POMO_CachedFileReader extends POMO_StringReader {
-	/**
-	 * PHP5 constructor.
-	 */
-	function __construct( $filename ) {
-		parent::POMO_StringReader();
-		$this->_str = file_get_contents($filename);
-		if (false === $this->_str)
-			return false;
-		$this->_pos = 0;
-	}
-
-	/**
-	 * PHP4 constructor.
-	 */
-	public function POMO_CachedFileReader( $filename ) {
-		self::__construct( $filename );
-	}
-}
-endif;
-
-if ( ! class_exists( 'POMO_CachedIntFileReader', false ) ):
-/**
- * Reads the contents of the file in the beginning.
- */
-class POMO_CachedIntFileReader extends POMO_CachedFileReader {
-	/**
-	 * PHP5 constructor.
-	 */
-	public function __construct( $filename ) {
-		parent::POMO_CachedFileReader($filename);
-	}
-
-	/**
-	 * PHP4 constructor.
-	 */
-	function POMO_CachedIntFileReader( $filename ) {
-		self::__construct( $filename );
-	}
-}
-endif;
-
Index: www/wp-includes/user.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/user.php	(revision 38565)
+++ www/wp-includes/user.php	(revision 38565)
@@ -1,2505 +0,0 @@
-<?php
-/**
- * Core User API
- *
- * @package WordPress
- * @subpackage Users
- */
-
-/**
- * Authenticates and logs a user in with 'remember' capability.
- *
- * The credentials is an array that has 'user_login', 'user_password', and
- * 'remember' indices. If the credentials is not given, then the log in form
- * will be assumed and used if set.
- *
- * The various authentication cookies will be set by this function and will be
- * set for a longer period depending on if the 'remember' credential is set to
- * true.
- *
- * @since 2.5.0
- *
- * @global string $auth_secure_cookie
- *
- * @param array       $credentials   Optional. User info in order to sign on.
- * @param string|bool $secure_cookie Optional. Whether to use secure cookie.
- * @return WP_User|WP_Error WP_User on success, WP_Error on failure.
- */
-function wp_signon( $credentials = array(), $secure_cookie = '' ) {
-	if ( empty($credentials) ) {
-		$credentials = array(); // Back-compat for plugins passing an empty string.
-
-		if ( ! empty($_POST['log']) )
-			$credentials['user_login'] = $_POST['log'];
-		if ( ! empty($_POST['pwd']) )
-			$credentials['user_password'] = $_POST['pwd'];
-		if ( ! empty($_POST['rememberme']) )
-			$credentials['remember'] = $_POST['rememberme'];
-	}
-
-	if ( !empty($credentials['remember']) )
-		$credentials['remember'] = true;
-	else
-		$credentials['remember'] = false;
-
-	/**
-	 * Fires before the user is authenticated.
-	 *
-	 * The variables passed to the callbacks are passed by reference,
-	 * and can be modified by callback functions.
-	 *
-	 * @since 1.5.1
-	 *
-	 * @todo Decide whether to deprecate the wp_authenticate action.
-	 *
-	 * @param string $user_login    Username, passed by reference.
-	 * @param string $user_password User password, passed by reference.
-	 */
-	do_action_ref_array( 'wp_authenticate', array( &$credentials['user_login'], &$credentials['user_password'] ) );
-
-	if ( '' === $secure_cookie )
-		$secure_cookie = is_ssl();
-
-	/**
-	 * Filters whether to use a secure sign-on cookie.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param bool  $secure_cookie Whether to use a secure sign-on cookie.
-	 * @param array $credentials {
- 	 *     Array of entered sign-on data.
- 	 *
- 	 *     @type string $user_login    Username.
- 	 *     @type string $user_password Password entered.
-	 *     @type bool   $remember      Whether to 'remember' the user. Increases the time
-	 *                                 that the cookie will be kept. Default false.
- 	 * }
-	 */
-	$secure_cookie = apply_filters( 'secure_signon_cookie', $secure_cookie, $credentials );
-
-	global $auth_secure_cookie; // XXX ugly hack to pass this to wp_authenticate_cookie
-	$auth_secure_cookie = $secure_cookie;
-
-	add_filter('authenticate', 'wp_authenticate_cookie', 30, 3);
-
-	$user = wp_authenticate($credentials['user_login'], $credentials['user_password']);
-
-	if ( is_wp_error($user) ) {
-		if ( $user->get_error_codes() == array('empty_username', 'empty_password') ) {
-			$user = new WP_Error('', '');
-		}
-
-		return $user;
-	}
-
-	wp_set_auth_cookie($user->ID, $credentials['remember'], $secure_cookie);
-	/**
-	 * Fires after the user has successfully logged in.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string  $user_login Username.
-	 * @param WP_User $user       WP_User object of the logged-in user.
-	 */
-	do_action( 'wp_login', $user->user_login, $user );
-	return $user;
-}
-
-/**
- * Authenticate a user, confirming the username and password are valid.
- *
- * @since 2.8.0
- *
- * @param WP_User|WP_Error|null $user     WP_User or WP_Error object from a previous callback. Default null.
- * @param string                $username Username for authentication.
- * @param string                $password Password for authentication.
- * @return WP_User|WP_Error WP_User on success, WP_Error on failure.
- */
-function wp_authenticate_username_password($user, $username, $password) {
-	if ( $user instanceof WP_User ) {
-		return $user;
-	}
-
-	if ( empty($username) || empty($password) ) {
-		if ( is_wp_error( $user ) )
-			return $user;
-
-		$error = new WP_Error();
-
-		if ( empty($username) )
-			$error->add('empty_username', __('<strong>ERROR</strong>: The username field is empty.'));
-
-		if ( empty($password) )
-			$error->add('empty_password', __('<strong>ERROR</strong>: The password field is empty.'));
-
-		return $error;
-	}
-
-	$user = get_user_by('login', $username);
-
-	if ( !$user ) {
-		return new WP_Error( 'invalid_username',
-			__( '<strong>ERROR</strong>: Invalid username.' ) .
-			' <a href="' . wp_lostpassword_url() . '">' .
-			__( 'Lost your password?' ) .
-			'</a>'
-		);
-	}
-
-	/**
-	 * Filters whether the given user can be authenticated with the provided $password.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param WP_User|WP_Error $user     WP_User or WP_Error object if a previous
-	 *                                   callback failed authentication.
-	 * @param string           $password Password to check against the user.
-	 */
-	$user = apply_filters( 'wp_authenticate_user', $user, $password );
-	if ( is_wp_error($user) )
-		return $user;
-
-	if ( ! wp_check_password( $password, $user->user_pass, $user->ID ) ) {
-		return new WP_Error( 'incorrect_password',
-			sprintf(
-				/* translators: %s: user name */
-				__( '<strong>ERROR</strong>: The password you entered for the username %s is incorrect.' ),
-				'<strong>' . $username . '</strong>'
-			) .
-			' <a href="' . wp_lostpassword_url() . '">' .
-			__( 'Lost your password?' ) .
-			'</a>'
-		);
-	}
-
-	return $user;
-}
-
-/**
- * Authenticates a user using the email and password.
- *
- * @since 4.5.0
- *
- * @param WP_User|WP_Error|null $user     WP_User or WP_Error object if a previous
- *                                        callback failed authentication.
- * @param string                $email    Email address for authentication.
- * @param string                $password Password for authentication.
- * @return WP_User|WP_Error WP_User on success, WP_Error on failure.
- */
-function wp_authenticate_email_password( $user, $email, $password ) {
-	if ( $user instanceof WP_User ) {
-		return $user;
-	}
-
-	if ( empty( $email ) || empty( $password ) ) {
-		if ( is_wp_error( $user ) ) {
-			return $user;
-		}
-
-		$error = new WP_Error();
-
-		if ( empty( $email ) ) {
-			$error->add( 'empty_username', __( '<strong>ERROR</strong>: The email field is empty.' ) ); // Uses 'empty_username' for back-compat with wp_signon()
-		}
-
-		if ( empty( $password ) ) {
-			$error->add( 'empty_password', __( '<strong>ERROR</strong>: The password field is empty.' ) );
-		}
-
-		return $error;
-	}
-
-	if ( ! is_email( $email ) ) {
-		return $user;
-	}
-
-	$user = get_user_by( 'email', $email );
-
-	if ( ! $user ) {
-		return new WP_Error( 'invalid_email',
-			__( '<strong>ERROR</strong>: Invalid email address.' ) .
-			' <a href="' . wp_lostpassword_url() . '">' .
-			__( 'Lost your password?' ) .
-			'</a>'
-		);
-	}
-
-	/** This filter is documented in wp-includes/user.php */
-	$user = apply_filters( 'wp_authenticate_user', $user, $password );
-
-	if ( is_wp_error( $user ) ) {
-		return $user;
-	}
-
-	if ( ! wp_check_password( $password, $user->user_pass, $user->ID ) ) {
-		return new WP_Error( 'incorrect_password',
-			sprintf(
-				/* translators: %s: email address */
-				__( '<strong>ERROR</strong>: The password you entered for the email address %s is incorrect.' ),
-				'<strong>' . $email . '</strong>'
-			) .
-			' <a href="' . wp_lostpassword_url() . '">' .
-			__( 'Lost your password?' ) .
-			'</a>'
-		);
-	}
-
-	return $user;
-}
-
-/**
- * Authenticate the user using the WordPress auth cookie.
- *
- * @since 2.8.0
- *
- * @global string $auth_secure_cookie
- *
- * @param WP_User|WP_Error|null $user     WP_User or WP_Error object from a previous callback. Default null.
- * @param string                $username Username. If not empty, cancels the cookie authentication.
- * @param string                $password Password. If not empty, cancels the cookie authentication.
- * @return WP_User|WP_Error WP_User on success, WP_Error on failure.
- */
-function wp_authenticate_cookie($user, $username, $password) {
-	if ( $user instanceof WP_User ) {
-		return $user;
-	}
-
-	if ( empty($username) && empty($password) ) {
-		$user_id = wp_validate_auth_cookie();
-		if ( $user_id )
-			return new WP_User($user_id);
-
-		global $auth_secure_cookie;
-
-		if ( $auth_secure_cookie )
-			$auth_cookie = SECURE_AUTH_COOKIE;
-		else
-			$auth_cookie = AUTH_COOKIE;
-
-		if ( !empty($_COOKIE[$auth_cookie]) )
-			return new WP_Error('expired_session', __('Please log in again.'));
-
-		// If the cookie is not set, be silent.
-	}
-
-	return $user;
-}
-
-/**
- * For Multisite blogs, check if the authenticated user has been marked as a
- * spammer, or if the user's primary blog has been marked as spam.
- *
- * @since 3.7.0
- *
- * @param WP_User|WP_Error|null $user WP_User or WP_Error object from a previous callback. Default null.
- * @return WP_User|WP_Error WP_User on success, WP_Error if the user is considered a spammer.
- */
-function wp_authenticate_spam_check( $user ) {
-	if ( $user instanceof WP_User && is_multisite() ) {
-		/**
-		 * Filters whether the user has been marked as a spammer.
-		 *
-		 * @since 3.7.0
-		 *
-		 * @param bool    $spammed Whether the user is considered a spammer.
-		 * @param WP_User $user    User to check against.
-		 */
-		$spammed = apply_filters( 'check_is_user_spammed', is_user_spammy( $user ), $user );
-
-		if ( $spammed )
-			return new WP_Error( 'spammer_account', __( '<strong>ERROR</strong>: Your account has been marked as a spammer.' ) );
-	}
-	return $user;
-}
-
-/**
- * Validates the logged-in cookie.
- *
- * Checks the logged-in cookie if the previous auth cookie could not be
- * validated and parsed.
- *
- * This is a callback for the {@see 'determine_current_user'} filter, rather than API.
- *
- * @since 3.9.0
- *
- * @param int|bool $user_id The user ID (or false) as received from the
- *                       determine_current_user filter.
- * @return int|false User ID if validated, false otherwise. If a user ID from
- *                   an earlier filter callback is received, that value is returned.
- */
-function wp_validate_logged_in_cookie( $user_id ) {
-	if ( $user_id ) {
-		return $user_id;
-	}
-
-	if ( is_blog_admin() || is_network_admin() || empty( $_COOKIE[LOGGED_IN_COOKIE] ) ) {
-		return false;
-	}
-
-	return wp_validate_auth_cookie( $_COOKIE[LOGGED_IN_COOKIE], 'logged_in' );
-}
-
-/**
- * Number of posts user has written.
- *
- * @since 3.0.0
- * @since 4.1.0 Added `$post_type` argument.
- * @since 4.3.0 Added `$public_only` argument. Added the ability to pass an array
- *              of post types to `$post_type`.
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int          $userid      User ID.
- * @param array|string $post_type   Optional. Single post type or array of post types to count the number of posts for. Default 'post'.
- * @param bool         $public_only Optional. Whether to only return counts for public posts. Default false.
- * @return string Number of posts the user has written in this post type.
- */
-function count_user_posts( $userid, $post_type = 'post', $public_only = false ) {
-	global $wpdb;
-
-	$where = get_posts_by_author_sql( $post_type, true, $userid, $public_only );
-
-	$count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts $where" );
-
-	/**
-	 * Filters the number of posts a user has written.
-	 *
-	 * @since 2.7.0
-	 * @since 4.1.0 Added `$post_type` argument.
-	 * @since 4.3.1 Added `$public_only` argument.
-	 *
-	 * @param int          $count       The user's post count.
-	 * @param int          $userid      User ID.
-	 * @param string|array $post_type   Single post type or array of post types to count the number of posts for.
-	 * @param bool         $public_only Whether to limit counted posts to public posts.
-	 */
-	return apply_filters( 'get_usernumposts', $count, $userid, $post_type, $public_only );
-}
-
-/**
- * Number of posts written by a list of users.
- *
- * @since 3.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param array        $users       Array of user IDs.
- * @param string|array $post_type   Optional. Single post type or array of post types to check. Defaults to 'post'.
- * @param bool         $public_only Optional. Only return counts for public posts.  Defaults to false.
- * @return array Amount of posts each user has written.
- */
-function count_many_users_posts( $users, $post_type = 'post', $public_only = false ) {
-	global $wpdb;
-
-	$count = array();
-	if ( empty( $users ) || ! is_array( $users ) )
-		return $count;
-
-	$userlist = implode( ',', array_map( 'absint', $users ) );
-	$where = get_posts_by_author_sql( $post_type, true, null, $public_only );
-
-	$result = $wpdb->get_results( "SELECT post_author, COUNT(*) FROM $wpdb->posts $where AND post_author IN ($userlist) GROUP BY post_author", ARRAY_N );
-	foreach ( $result as $row ) {
-		$count[ $row[0] ] = $row[1];
-	}
-
-	foreach ( $users as $id ) {
-		if ( ! isset( $count[ $id ] ) )
-			$count[ $id ] = 0;
-	}
-
-	return $count;
-}
-
-//
-// User option functions
-//
-
-/**
- * Get the current user's ID
- *
- * @since MU
- *
- * @return int The current user's ID
- */
-function get_current_user_id() {
-	if ( ! function_exists( 'wp_get_current_user' ) )
-		return 0;
-	$user = wp_get_current_user();
-	return ( isset( $user->ID ) ? (int) $user->ID : 0 );
-}
-
-/**
- * Retrieve user option that can be either per Site or per Network.
- *
- * If the user ID is not given, then the current user will be used instead. If
- * the user ID is given, then the user data will be retrieved. The filter for
- * the result, will also pass the original option name and finally the user data
- * object as the third parameter.
- *
- * The option will first check for the per site name and then the per Network name.
- *
- * @since 2.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $option     User option name.
- * @param int    $user       Optional. User ID.
- * @param string $deprecated Use get_option() to check for an option in the options table.
- * @return mixed User option value on success, false on failure.
- */
-function get_user_option( $option, $user = 0, $deprecated = '' ) {
-	global $wpdb;
-
-	if ( !empty( $deprecated ) )
-		_deprecated_argument( __FUNCTION__, '3.0.0' );
-
-	if ( empty( $user ) )
-		$user = get_current_user_id();
-
-	if ( ! $user = get_userdata( $user ) )
-		return false;
-
-	$prefix = $wpdb->get_blog_prefix();
-	if ( $user->has_prop( $prefix . $option ) ) // Blog specific
-		$result = $user->get( $prefix . $option );
-	elseif ( $user->has_prop( $option ) ) // User specific and cross-blog
-		$result = $user->get( $option );
-	else
-		$result = false;
-
-	/**
-	 * Filters a specific user option value.
-	 *
-	 * The dynamic portion of the hook name, `$option`, refers to the user option name.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param mixed   $result Value for the user's option.
-	 * @param string  $option Name of the option being retrieved.
-	 * @param WP_User $user   WP_User object of the user whose option is being retrieved.
-	 */
-	return apply_filters( "get_user_option_{$option}", $result, $option, $user );
-}
-
-/**
- * Update user option with global blog capability.
- *
- * User options are just like user metadata except that they have support for
- * global blog options. If the 'global' parameter is false, which it is by default
- * it will prepend the WordPress table prefix to the option name.
- *
- * Deletes the user option if $newvalue is empty.
- *
- * @since 2.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int    $user_id     User ID.
- * @param string $option_name User option name.
- * @param mixed  $newvalue    User option value.
- * @param bool   $global      Optional. Whether option name is global or blog specific.
- *                            Default false (blog specific).
- * @return int|bool User meta ID if the option didn't exist, true on successful update,
- *                  false on failure.
- */
-function update_user_option( $user_id, $option_name, $newvalue, $global = false ) {
-	global $wpdb;
-
-	if ( !$global )
-		$option_name = $wpdb->get_blog_prefix() . $option_name;
-
-	return update_user_meta( $user_id, $option_name, $newvalue );
-}
-
-/**
- * Delete user option with global blog capability.
- *
- * User options are just like user metadata except that they have support for
- * global blog options. If the 'global' parameter is false, which it is by default
- * it will prepend the WordPress table prefix to the option name.
- *
- * @since 3.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int    $user_id     User ID
- * @param string $option_name User option name.
- * @param bool   $global      Optional. Whether option name is global or blog specific.
- *                            Default false (blog specific).
- * @return bool True on success, false on failure.
- */
-function delete_user_option( $user_id, $option_name, $global = false ) {
-	global $wpdb;
-
-	if ( !$global )
-		$option_name = $wpdb->get_blog_prefix() . $option_name;
-	return delete_user_meta( $user_id, $option_name );
-}
-
-/**
- * Retrieve list of users matching criteria.
- *
- * @since 3.1.0
- *
- * @see WP_User_Query
- *
- * @param array $args Optional. Arguments to retrieve users. See WP_User_Query::prepare_query().
- *                    for more information on accepted arguments.
- * @return array List of users.
- */
-function get_users( $args = array() ) {
-
-	$args = wp_parse_args( $args );
-	$args['count_total'] = false;
-
-	$user_search = new WP_User_Query($args);
-
-	return (array) $user_search->get_results();
-}
-
-/**
- * Get the blogs a user belongs to.
- *
- * @since 3.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int  $user_id User ID
- * @param bool $all     Whether to retrieve all blogs, or only blogs that are not
- *                      marked as deleted, archived, or spam.
- * @return array A list of the user's blogs. An empty array if the user doesn't exist
- *               or belongs to no blogs.
- */
-function get_blogs_of_user( $user_id, $all = false ) {
-	global $wpdb;
-
-	$user_id = (int) $user_id;
-
-	// Logged out users can't have blogs
-	if ( empty( $user_id ) )
-		return array();
-
-	/**
-	 * Filters the list of a user's sites before it is populated.
-	 *
-	 * Passing a non-null value to the filter will effectively short circuit
-	 * get_blogs_of_user(), returning that value instead.
-	 *
-	 * @since 4.6.0
-	 *
-	 * @param null|array $blogs   An array of WP_Site objects of which the user is a member.
-	 * @param int        $user_id User ID.
-	 * @param bool       $all     Whether the returned array should contain all sites, including
-	 *                            those marked 'deleted', 'archived', or 'spam'. Default false.
-	 */
-	$blogs = apply_filters( 'pre_get_blogs_of_user', null, $user_id, $all );
-
-	if ( null !== $blogs ) {
-		return $blogs;
-	}
-
-	$keys = get_user_meta( $user_id );
-	if ( empty( $keys ) )
-		return array();
-
-	if ( ! is_multisite() ) {
-		$blog_id = get_current_blog_id();
-		$blogs = array( $blog_id => new stdClass );
-		$blogs[ $blog_id ]->userblog_id = $blog_id;
-		$blogs[ $blog_id ]->blogname = get_option('blogname');
-		$blogs[ $blog_id ]->domain = '';
-		$blogs[ $blog_id ]->path = '';
-		$blogs[ $blog_id ]->site_id = 1;
-		$blogs[ $blog_id ]->siteurl = get_option('siteurl');
-		$blogs[ $blog_id ]->archived = 0;
-		$blogs[ $blog_id ]->spam = 0;
-		$blogs[ $blog_id ]->deleted = 0;
-		return $blogs;
-	}
-
-	$blogs = array();
-
-	if ( isset( $keys[ $wpdb->base_prefix . 'capabilities' ] ) && defined( 'MULTISITE' ) ) {
-		$blog = get_blog_details( 1 );
-		if ( $blog && isset( $blog->domain ) && ( $all || ( ! $blog->archived && ! $blog->spam && ! $blog->deleted ) ) ) {
-			$blogs[ 1 ] = (object) array(
-				'userblog_id' => 1,
-				'blogname'    => $blog->blogname,
-				'domain'      => $blog->domain,
-				'path'        => $blog->path,
-				'site_id'     => $blog->site_id,
-				'siteurl'     => $blog->siteurl,
-				'archived'    => $blog->archived,
-				'mature'      => $blog->mature,
-				'spam'        => $blog->spam,
-				'deleted'     => $blog->deleted,
-			);
-		}
-		unset( $keys[ $wpdb->base_prefix . 'capabilities' ] );
-	}
-
-	$keys = array_keys( $keys );
-
-	foreach ( $keys as $key ) {
-		if ( 'capabilities' !== substr( $key, -12 ) )
-			continue;
-		if ( $wpdb->base_prefix && 0 !== strpos( $key, $wpdb->base_prefix ) )
-			continue;
-		$blog_id = str_replace( array( $wpdb->base_prefix, '_capabilities' ), '', $key );
-		if ( ! is_numeric( $blog_id ) )
-			continue;
-
-		$blog_id = (int) $blog_id;
-		$blog = get_blog_details( $blog_id );
-		if ( $blog && isset( $blog->domain ) && ( $all || ( ! $blog->archived && ! $blog->spam && ! $blog->deleted ) ) ) {
-			$blogs[ $blog_id ] = (object) array(
-				'userblog_id' => $blog_id,
-				'blogname'    => $blog->blogname,
-				'domain'      => $blog->domain,
-				'path'        => $blog->path,
-				'site_id'     => $blog->site_id,
-				'siteurl'     => $blog->siteurl,
-				'archived'    => $blog->archived,
-				'mature'      => $blog->mature,
-				'spam'        => $blog->spam,
-				'deleted'     => $blog->deleted,
-			);
-		}
-	}
-
-	/**
-	 * Filters the list of blogs a user belongs to.
-	 *
-	 * @since MU
-	 *
-	 * @param array $blogs   An array of blog objects belonging to the user.
-	 * @param int   $user_id User ID.
-	 * @param bool  $all     Whether the returned blogs array should contain all blogs, including
-	 *                       those marked 'deleted', 'archived', or 'spam'. Default false.
-	 */
-	return apply_filters( 'get_blogs_of_user', $blogs, $user_id, $all );
-}
-
-/**
- * Find out whether a user is a member of a given blog.
- *
- * @since MU 1.1
- *
- * @param int $user_id Optional. The unique ID of the user. Defaults to the current user.
- * @param int $blog_id Optional. ID of the blog to check. Defaults to the current site.
- * @return bool
- */
-function is_user_member_of_blog( $user_id = 0, $blog_id = 0 ) {
-	global $wpdb;
-
-	$user_id = (int) $user_id;
-	$blog_id = (int) $blog_id;
-
-	if ( empty( $user_id ) ) {
-		$user_id = get_current_user_id();
-	}
-
-	// Technically not needed, but does save calls to get_blog_details and get_user_meta
-	// in the event that the function is called when a user isn't logged in
-	if ( empty( $user_id ) ) {
-		return false;
-	} else {
-		$user = get_userdata( $user_id );
-		if ( ! $user instanceof WP_User ) {
-			return false;
-		}
-	}
-
-	if ( ! is_multisite() ) {
-		return true;
-	}
-
-	if ( empty( $blog_id ) ) {
-		$blog_id = get_current_blog_id();
-	}
-
-	$blog = get_blog_details( $blog_id );
-
-	if ( ! $blog || ! isset( $blog->domain ) || $blog->archived || $blog->spam || $blog->deleted ) {
-		return false;
-	}
-
-	$keys = get_user_meta( $user_id );
-	if ( empty( $keys ) ) {
-		return false;
-	}
-
-	// no underscore before capabilities in $base_capabilities_key
-	$base_capabilities_key = $wpdb->base_prefix . 'capabilities';
-	$site_capabilities_key = $wpdb->base_prefix . $blog_id . '_capabilities';
-
-	if ( isset( $keys[ $base_capabilities_key ] ) && $blog_id == 1 ) {
-		return true;
-	}
-
-	if ( isset( $keys[ $site_capabilities_key ] ) ) {
-		return true;
-	}
-
-	return false;
-}
-
-/**
- * Add meta data field to a user.
- *
- * Post meta data is called "Custom Fields" on the Administration Screens.
- *
- * @since 3.0.0
- * @link https://codex.wordpress.org/Function_Reference/add_user_meta
- *
- * @param int    $user_id    User ID.
- * @param string $meta_key   Metadata name.
- * @param mixed  $meta_value Metadata value.
- * @param bool   $unique     Optional, default is false. Whether the same key should not be added.
- * @return int|false Meta ID on success, false on failure.
- */
-function add_user_meta($user_id, $meta_key, $meta_value, $unique = false) {
-	return add_metadata('user', $user_id, $meta_key, $meta_value, $unique);
-}
-
-/**
- * Remove metadata matching criteria from a user.
- *
- * You can match based on the key, or key and value. Removing based on key and
- * value, will keep from removing duplicate metadata with the same key. It also
- * allows removing all metadata matching key, if needed.
- *
- * @since 3.0.0
- * @link https://codex.wordpress.org/Function_Reference/delete_user_meta
- *
- * @param int    $user_id    User ID
- * @param string $meta_key   Metadata name.
- * @param mixed  $meta_value Optional. Metadata value.
- * @return bool True on success, false on failure.
- */
-function delete_user_meta($user_id, $meta_key, $meta_value = '') {
-	return delete_metadata('user', $user_id, $meta_key, $meta_value);
-}
-
-/**
- * Retrieve user meta field for a user.
- *
- * @since 3.0.0
- * @link https://codex.wordpress.org/Function_Reference/get_user_meta
- *
- * @param int    $user_id User ID.
- * @param string $key     Optional. The meta key to retrieve. By default, returns data for all keys.
- * @param bool   $single  Whether to return a single value.
- * @return mixed Will be an array if $single is false. Will be value of meta data field if $single is true.
- */
-function get_user_meta($user_id, $key = '', $single = false) {
-	return get_metadata('user', $user_id, $key, $single);
-}
-
-/**
- * Update user meta field based on user ID.
- *
- * Use the $prev_value parameter to differentiate between meta fields with the
- * same key and user ID.
- *
- * If the meta field for the user does not exist, it will be added.
- *
- * @since 3.0.0
- * @link https://codex.wordpress.org/Function_Reference/update_user_meta
- *
- * @param int    $user_id    User ID.
- * @param string $meta_key   Metadata key.
- * @param mixed  $meta_value Metadata value.
- * @param mixed  $prev_value Optional. Previous value to check before removing.
- * @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure.
- */
-function update_user_meta($user_id, $meta_key, $meta_value, $prev_value = '') {
-	return update_metadata('user', $user_id, $meta_key, $meta_value, $prev_value);
-}
-
-/**
- * Count number of users who have each of the user roles.
- *
- * Assumes there are neither duplicated nor orphaned capabilities meta_values.
- * Assumes role names are unique phrases. Same assumption made by WP_User_Query::prepare_query()
- * Using $strategy = 'time' this is CPU-intensive and should handle around 10^7 users.
- * Using $strategy = 'memory' this is memory-intensive and should handle around 10^5 users, but see WP Bug #12257.
- *
- * @since 3.0.0
- * @since 4.4.0 The number of users with no role is now included in the `none` element.
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $strategy 'time' or 'memory'
- * @return array Includes a grand total and an array of counts indexed by role strings.
- */
-function count_users($strategy = 'time') {
-	global $wpdb;
-
-	// Initialize
-	$id = get_current_blog_id();
-	$blog_prefix = $wpdb->get_blog_prefix($id);
-	$result = array();
-
-	if ( 'time' == $strategy ) {
-		$avail_roles = wp_roles()->get_names();
-
-		// Build a CPU-intensive query that will return concise information.
-		$select_count = array();
-		foreach ( $avail_roles as $this_role => $name ) {
-			$select_count[] = $wpdb->prepare( "COUNT(NULLIF(`meta_value` LIKE %s, false))", '%' . $wpdb->esc_like( '"' . $this_role . '"' ) . '%');
-		}
-		$select_count[] = "COUNT(NULLIF(`meta_value` = 'a:0:{}', false))";
-		$select_count = implode(', ', $select_count);
-
-		// Add the meta_value index to the selection list, then run the query.
-		$row = $wpdb->get_row( "SELECT $select_count, COUNT(*) FROM $wpdb->usermeta WHERE meta_key = '{$blog_prefix}capabilities'", ARRAY_N );
-
-		// Run the previous loop again to associate results with role names.
-		$col = 0;
-		$role_counts = array();
-		foreach ( $avail_roles as $this_role => $name ) {
-			$count = (int) $row[$col++];
-			if ($count > 0) {
-				$role_counts[$this_role] = $count;
-			}
-		}
-
-		$role_counts['none'] = (int) $row[$col++];
-
-		// Get the meta_value index from the end of the result set.
-		$total_users = (int) $row[$col];
-
-		$result['total_users'] = $total_users;
-		$result['avail_roles'] =& $role_counts;
-	} else {
-		$avail_roles = array(
-			'none' => 0,
-		);
-
-		$users_of_blog = $wpdb->get_col( "SELECT meta_value FROM $wpdb->usermeta WHERE meta_key = '{$blog_prefix}capabilities'" );
-
-		foreach ( $users_of_blog as $caps_meta ) {
-			$b_roles = maybe_unserialize($caps_meta);
-			if ( ! is_array( $b_roles ) )
-				continue;
-			if ( empty( $b_roles ) ) {
-				$avail_roles['none']++;
-			}
-			foreach ( $b_roles as $b_role => $val ) {
-				if ( isset($avail_roles[$b_role]) ) {
-					$avail_roles[$b_role]++;
-				} else {
-					$avail_roles[$b_role] = 1;
-				}
-			}
-		}
-
-		$result['total_users'] = count( $users_of_blog );
-		$result['avail_roles'] =& $avail_roles;
-	}
-
-	if ( is_multisite() ) {
-		$result['avail_roles']['none'] = 0;
-	}
-
-	return $result;
-}
-
-//
-// Private helper functions
-//
-
-/**
- * Set up global user vars.
- *
- * Used by wp_set_current_user() for back compat. Might be deprecated in the future.
- *
- * @since 2.0.4
- *
- * @global string $user_login    The user username for logging in
- * @global object $userdata      User data.
- * @global int    $user_level    The level of the user
- * @global int    $user_ID       The ID of the user
- * @global string $user_email    The email address of the user
- * @global string $user_url      The url in the user's profile
- * @global string $user_identity The display name of the user
- *
- * @param int $for_user_id Optional. User ID to set up global data.
- */
-function setup_userdata($for_user_id = '') {
-	global $user_login, $userdata, $user_level, $user_ID, $user_email, $user_url, $user_identity;
-
-	if ( '' == $for_user_id )
-		$for_user_id = get_current_user_id();
-	$user = get_userdata( $for_user_id );
-
-	if ( ! $user ) {
-		$user_ID = 0;
-		$user_level = 0;
-		$userdata = null;
-		$user_login = $user_email = $user_url = $user_identity = '';
-		return;
-	}
-
-	$user_ID    = (int) $user->ID;
-	$user_level = (int) $user->user_level;
-	$userdata   = $user;
-	$user_login = $user->user_login;
-	$user_email = $user->user_email;
-	$user_url   = $user->user_url;
-	$user_identity = $user->display_name;
-}
-
-/**
- * Create dropdown HTML content of users.
- *
- * The content can either be displayed, which it is by default or retrieved by
- * setting the 'echo' argument. The 'include' and 'exclude' arguments do not
- * need to be used; all users will be displayed in that case. Only one can be
- * used, either 'include' or 'exclude', but not both.
- *
- * The available arguments are as follows:
- *
- * @since 2.3.0
- * @since 4.5.0 Added the 'display_name_with_login' value for 'show'.
- *
- * @param array|string $args {
- *     Optional. Array or string of arguments to generate a drop-down of users.
- *     See WP_User_Query::prepare_query() for additional available arguments.
- *
- *     @type string       $show_option_all         Text to show as the drop-down default (all).
- *                                                 Default empty.
- *     @type string       $show_option_none        Text to show as the drop-down default when no
- *                                                 users were found. Default empty.
- *     @type int|string   $option_none_value       Value to use for $show_option_non when no users
- *                                                 were found. Default -1.
- *     @type string       $hide_if_only_one_author Whether to skip generating the drop-down
- *                                                 if only one user was found. Default empty.
- *     @type string       $orderby                 Field to order found users by. Accepts user fields.
- *                                                 Default 'display_name'.
- *     @type string       $order                   Whether to order users in ascending or descending
- *                                                 order. Accepts 'ASC' (ascending) or 'DESC' (descending).
- *                                                 Default 'ASC'.
- *     @type array|string $include                 Array or comma-separated list of user IDs to include.
- *                                                 Default empty.
- *     @type array|string $exclude                 Array or comma-separated list of user IDs to exclude.
- *                                                 Default empty.
- *     @type bool|int     $multi                   Whether to skip the ID attribute on the 'select' element.
- *                                                 Accepts 1|true or 0|false. Default 0|false.
- *     @type string       $show                    User data to display. If the selected item is empty
- *                                                 then the 'user_login' will be displayed in parentheses.
- *                                                 Accepts any user field, or 'display_name_with_login' to show
- *                                                 the display name with user_login in parentheses.
- *                                                 Default 'display_name'.
- *     @type int|bool     $echo                    Whether to echo or return the drop-down. Accepts 1|true (echo)
- *                                                 or 0|false (return). Default 1|true.
- *     @type int          $selected                Which user ID should be selected. Default 0.
- *     @type bool         $include_selected        Whether to always include the selected user ID in the drop-
- *                                                 down. Default false.
- *     @type string       $name                    Name attribute of select element. Default 'user'.
- *     @type string       $id                      ID attribute of the select element. Default is the value of $name.
- *     @type string       $class                   Class attribute of the select element. Default empty.
- *     @type int          $blog_id                 ID of blog (Multisite only). Default is ID of the current blog.
- *     @type string       $who                     Which type of users to query. Accepts only an empty string or
- *                                                 'authors'. Default empty.
- * }
- * @return string String of HTML content.
- */
-function wp_dropdown_users( $args = '' ) {
-	$defaults = array(
-		'show_option_all' => '', 'show_option_none' => '', 'hide_if_only_one_author' => '',
-		'orderby' => 'display_name', 'order' => 'ASC',
-		'include' => '', 'exclude' => '', 'multi' => 0,
-		'show' => 'display_name', 'echo' => 1,
-		'selected' => 0, 'name' => 'user', 'class' => '', 'id' => '',
-		'blog_id' => get_current_blog_id(), 'who' => '', 'include_selected' => false,
-		'option_none_value' => -1
-	);
-
-	$defaults['selected'] = is_author() ? get_query_var( 'author' ) : 0;
-
-	$r = wp_parse_args( $args, $defaults );
-
-	$query_args = wp_array_slice_assoc( $r, array( 'blog_id', 'include', 'exclude', 'orderby', 'order', 'who' ) );
-
-	$fields = array( 'ID', 'user_login' );
-
-	$show = ! empty( $r['show'] ) ? $r['show'] : 'display_name';
-	if ( 'display_name_with_login' === $show ) {
-		$fields[] = 'display_name';
-	} else {
-		$fields[] = $show;
-	}
-
-	$query_args['fields'] = $fields;
-
-	$show_option_all = $r['show_option_all'];
-	$show_option_none = $r['show_option_none'];
-	$option_none_value = $r['option_none_value'];
-
-	/**
-	 * Filters the query arguments for the list of users in the dropdown.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param array $query_args The query arguments for get_users().
-	 * @param array $r          The arguments passed to wp_dropdown_users() combined with the defaults.
-	 */
-	$query_args = apply_filters( 'wp_dropdown_users_args', $query_args, $r );
-
-	$users = get_users( $query_args );
-
-	$output = '';
-	if ( ! empty( $users ) && ( empty( $r['hide_if_only_one_author'] ) || count( $users ) > 1 ) ) {
-		$name = esc_attr( $r['name'] );
-		if ( $r['multi'] && ! $r['id'] ) {
-			$id = '';
-		} else {
-			$id = $r['id'] ? " id='" . esc_attr( $r['id'] ) . "'" : " id='$name'";
-		}
-		$output = "<select name='{$name}'{$id} class='" . $r['class'] . "'>\n";
-
-		if ( $show_option_all ) {
-			$output .= "\t<option value='0'>$show_option_all</option>\n";
-		}
-
-		if ( $show_option_none ) {
-			$_selected = selected( $option_none_value, $r['selected'], false );
-			$output .= "\t<option value='" . esc_attr( $option_none_value ) . "'$_selected>$show_option_none</option>\n";
-		}
-
-		if ( $r['include_selected'] && ( $r['selected'] > 0 ) ) {
-			$found_selected = false;
-			$r['selected'] = (int) $r['selected'];
-			foreach ( (array) $users as $user ) {
-				$user->ID = (int) $user->ID;
-				if ( $user->ID === $r['selected'] ) {
-					$found_selected = true;
-				}
-			}
-
-			if ( ! $found_selected ) {
-				$users[] = get_userdata( $r['selected'] );
-			}
-		}
-
-		foreach ( (array) $users as $user ) {
-			if ( 'display_name_with_login' === $show ) {
-				/* translators: 1: display name, 2: user_login */
-				$display = sprintf( _x( '%1$s (%2$s)', 'user dropdown' ), $user->display_name, $user->user_login );
-			} elseif ( ! empty( $user->$show ) ) {
-				$display = $user->$show;
-			} else {
-				$display = '(' . $user->user_login . ')';
-			}
-
-			$_selected = selected( $user->ID, $r['selected'], false );
-			$output .= "\t<option value='$user->ID'$_selected>" . esc_html( $display ) . "</option>\n";
-		}
-
-		$output .= "</select>";
-	}
-
-	/**
-	 * Filters the wp_dropdown_users() HTML output.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param string $output HTML output generated by wp_dropdown_users().
-	 */
-	$html = apply_filters( 'wp_dropdown_users', $output );
-
-	if ( $r['echo'] ) {
-		echo $html;
-	}
-	return $html;
-}
-
-/**
- * Sanitize user field based on context.
- *
- * Possible context values are:  'raw', 'edit', 'db', 'display', 'attribute' and 'js'. The
- * 'display' context is used by default. 'attribute' and 'js' contexts are treated like 'display'
- * when calling filters.
- *
- * @since 2.3.0
- *
- * @param string $field   The user Object field name.
- * @param mixed  $value   The user Object value.
- * @param int    $user_id User ID.
- * @param string $context How to sanitize user fields. Looks for 'raw', 'edit', 'db', 'display',
- *                        'attribute' and 'js'.
- * @return mixed Sanitized value.
- */
-function sanitize_user_field($field, $value, $user_id, $context) {
-	$int_fields = array('ID');
-	if ( in_array($field, $int_fields) )
-		$value = (int) $value;
-
-	if ( 'raw' == $context )
-		return $value;
-
-	if ( !is_string($value) && !is_numeric($value) )
-		return $value;
-
-	$prefixed = false !== strpos( $field, 'user_' );
-
-	if ( 'edit' == $context ) {
-		if ( $prefixed ) {
-
-			/** This filter is documented in wp-includes/post.php */
-			$value = apply_filters( "edit_{$field}", $value, $user_id );
-		} else {
-
-			/**
-			 * Filters a user field value in the 'edit' context.
-			 *
-			 * The dynamic portion of the hook name, `$field`, refers to the prefixed user
-			 * field being filtered, such as 'user_login', 'user_email', 'first_name', etc.
-			 *
-			 * @since 2.9.0
-			 *
-			 * @param mixed $value   Value of the prefixed user field.
-			 * @param int   $user_id User ID.
-			 */
-			$value = apply_filters( "edit_user_{$field}", $value, $user_id );
-		}
-
-		if ( 'description' == $field )
-			$value = esc_html( $value ); // textarea_escaped?
-		else
-			$value = esc_attr($value);
-	} elseif ( 'db' == $context ) {
-		if ( $prefixed ) {
-			/** This filter is documented in wp-includes/post.php */
-			$value = apply_filters( "pre_{$field}", $value );
-		} else {
-
-			/**
-			 * Filters the value of a user field in the 'db' context.
-			 *
-			 * The dynamic portion of the hook name, `$field`, refers to the prefixed user
-			 * field being filtered, such as 'user_login', 'user_email', 'first_name', etc.
- 			 *
-			 * @since 2.9.0
-			 *
-			 * @param mixed $value Value of the prefixed user field.
-			 */
-			$value = apply_filters( "pre_user_{$field}", $value );
-		}
-	} else {
-		// Use display filters by default.
-		if ( $prefixed ) {
-
-			/** This filter is documented in wp-includes/post.php */
-			$value = apply_filters( $field, $value, $user_id, $context );
-		} else {
-
-			/**
-			 * Filters the value of a user field in a standard context.
-			 *
-			 * The dynamic portion of the hook name, `$field`, refers to the prefixed user
-			 * field being filtered, such as 'user_login', 'user_email', 'first_name', etc.
-			 *
-			 * @since 2.9.0
-			 *
-			 * @param mixed  $value   The user object value to sanitize.
-			 * @param int    $user_id User ID.
-			 * @param string $context The context to filter within.
-			 */
-			$value = apply_filters( "user_{$field}", $value, $user_id, $context );
-		}
-	}
-
-	if ( 'user_url' == $field )
-		$value = esc_url($value);
-
-	if ( 'attribute' == $context ) {
-		$value = esc_attr( $value );
-	} elseif ( 'js' == $context ) {
-		$value = esc_js( $value );
-	}
-	return $value;
-}
-
-/**
- * Update all user caches
- *
- * @since 3.0.0
- *
- * @param object|WP_User $user User object to be cached
- * @return bool|null Returns false on failure.
- */
-function update_user_caches( $user ) {
-	if ( $user instanceof WP_User ) {
-		if ( ! $user->exists() ) {
-			return false;
-		}
-
-		$user = $user->data;
-	}
-
-	wp_cache_add($user->ID, $user, 'users');
-	wp_cache_add($user->user_login, $user->ID, 'userlogins');
-	wp_cache_add($user->user_email, $user->ID, 'useremail');
-	wp_cache_add($user->user_nicename, $user->ID, 'userslugs');
-}
-
-/**
- * Clean all user caches
- *
- * @since 3.0.0
- * @since 4.4.0 'clean_user_cache' action was added.
- *
- * @param WP_User|int $user User object or ID to be cleaned from the cache
- */
-function clean_user_cache( $user ) {
-	if ( is_numeric( $user ) )
-		$user = new WP_User( $user );
-
-	if ( ! $user->exists() )
-		return;
-
-	wp_cache_delete( $user->ID, 'users' );
-	wp_cache_delete( $user->user_login, 'userlogins' );
-	wp_cache_delete( $user->user_email, 'useremail' );
-	wp_cache_delete( $user->user_nicename, 'userslugs' );
-
-	/**
-	 * Fires immediately after the given user's cache is cleaned.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param int     $user_id User ID.
-	 * @param WP_User $user    User object.
-	 */
-	do_action( 'clean_user_cache', $user->ID, $user );
-}
-
-/**
- * Checks whether the given username exists.
- *
- * @since 2.0.0
- *
- * @param string $username Username.
- * @return int|false The user's ID on success, and false on failure.
- */
-function username_exists( $username ) {
-	if ( $user = get_user_by( 'login', $username ) ) {
-		return $user->ID;
-	}
-	return false;
-}
-
-/**
- * Checks whether the given email exists.
- *
- * @since 2.1.0
- *
- * @param string $email Email.
- * @return int|false The user's ID on success, and false on failure.
- */
-function email_exists( $email ) {
-	if ( $user = get_user_by( 'email', $email) ) {
-		return $user->ID;
-	}
-	return false;
-}
-
-/**
- * Checks whether a username is valid.
- *
- * @since 2.0.1
- * @since 4.4.0 Empty sanitized usernames are now considered invalid
- *
- * @param string $username Username.
- * @return bool Whether username given is valid
- */
-function validate_username( $username ) {
-	$sanitized = sanitize_user( $username, true );
-	$valid = ( $sanitized == $username && ! empty( $sanitized ) );
-
-	/**
-	 * Filters whether the provided username is valid or not.
-	 *
-	 * @since 2.0.1
-	 *
-	 * @param bool   $valid    Whether given username is valid.
-	 * @param string $username Username to check.
-	 */
-	return apply_filters( 'validate_username', $valid, $username );
-}
-
-/**
- * Insert a user into the database.
- *
- * Most of the `$userdata` array fields have filters associated with the values. Exceptions are
- * 'ID', 'rich_editing', 'comment_shortcuts', 'admin_color', 'use_ssl',
- * 'user_registered', and 'role'. The filters have the prefix 'pre_user_' followed by the field
- * name. An example using 'description' would have the filter called, 'pre_user_description' that
- * can be hooked into.
- *
- * @since 2.0.0
- * @since 3.6.0 The `aim`, `jabber`, and `yim` fields were removed as default user contact
- *              methods for new installs. See wp_get_user_contact_methods().
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param array|object|WP_User $userdata {
- *     An array, object, or WP_User object of user data arguments.
- *
- *     @type int         $ID                   User ID. If supplied, the user will be updated.
- *     @type string      $user_pass            The plain-text user password.
- *     @type string      $user_login           The user's login username.
- *     @type string      $user_nicename        The URL-friendly user name.
- *     @type string      $user_url             The user URL.
- *     @type string      $user_email           The user email address.
- *     @type string      $display_name         The user's display name.
- *                                             Default is the user's username.
- *     @type string      $nickname             The user's nickname.
- *                                             Default is the user's username.
- *     @type string      $first_name           The user's first name. For new users, will be used
- *                                             to build the first part of the user's display name
- *                                             if `$display_name` is not specified.
- *     @type string      $last_name            The user's last name. For new users, will be used
- *                                             to build the second part of the user's display name
- *                                             if `$display_name` is not specified.
- *     @type string      $description          The user's biographical description.
- *     @type string|bool $rich_editing         Whether to enable the rich-editor for the user.
- *                                             False if not empty.
- *     @type string|bool $comment_shortcuts    Whether to enable comment moderation keyboard
- *                                             shortcuts for the user. Default false.
- *     @type string      $admin_color          Admin color scheme for the user. Default 'fresh'.
- *     @type bool        $use_ssl              Whether the user should always access the admin over
- *                                             https. Default false.
- *     @type string      $user_registered      Date the user registered. Format is 'Y-m-d H:i:s'.
- *     @type string|bool $show_admin_bar_front Whether to display the Admin Bar for the user on the
- *                                             site's front end. Default true.
- *     @type string      $role                 User's role.
- * }
- * @return int|WP_Error The newly created user's ID or a WP_Error object if the user could not
- *                      be created.
- */
-function wp_insert_user( $userdata ) {
-	global $wpdb;
-
-	if ( $userdata instanceof stdClass ) {
-		$userdata = get_object_vars( $userdata );
-	} elseif ( $userdata instanceof WP_User ) {
-		$userdata = $userdata->to_array();
-	}
-
-	// Are we updating or creating?
-	if ( ! empty( $userdata['ID'] ) ) {
-		$ID = (int) $userdata['ID'];
-		$update = true;
-		$old_user_data = get_userdata( $ID );
-
-		if ( ! $old_user_data ) {
-			return new WP_Error( 'invalid_user_id', __( 'Invalid user ID.' ) );
-		}
-
-		// hashed in wp_update_user(), plaintext if called directly
-		$user_pass = ! empty( $userdata['user_pass'] ) ? $userdata['user_pass'] : $old_user_data->user_pass;
-	} else {
-		$update = false;
-		// Hash the password
-		$user_pass = wp_hash_password( $userdata['user_pass'] );
-	}
-
-	$sanitized_user_login = sanitize_user( $userdata['user_login'], true );
-
-	/**
-	 * Filters a username after it has been sanitized.
-	 *
-	 * This filter is called before the user is created or updated.
-	 *
-	 * @since 2.0.3
-	 *
-	 * @param string $sanitized_user_login Username after it has been sanitized.
-	 */
-	$pre_user_login = apply_filters( 'pre_user_login', $sanitized_user_login );
-
-	//Remove any non-printable chars from the login string to see if we have ended up with an empty username
-	$user_login = trim( $pre_user_login );
-
-	// user_login must be between 0 and 60 characters.
-	if ( empty( $user_login ) ) {
-		return new WP_Error('empty_user_login', __('Cannot create a user with an empty login name.') );
-	} elseif ( mb_strlen( $user_login ) > 60 ) {
-		return new WP_Error( 'user_login_too_long', __( 'Username may not be longer than 60 characters.' ) );
-	}
-
-	if ( ! $update && username_exists( $user_login ) ) {
-		return new WP_Error( 'existing_user_login', __( 'Sorry, that username already exists!' ) );
-	}
-
-	/**
-	 * Filters the list of blacklisted usernames.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param array $usernames Array of blacklisted usernames.
-	 */
-	$illegal_logins = (array) apply_filters( 'illegal_user_logins', array() );
-
-	if ( in_array( strtolower( $user_login ), array_map( 'strtolower', $illegal_logins ) ) ) {
-		return new WP_Error( 'invalid_username', __( 'Sorry, that username is not allowed.' ) );
-	}
-
-	/*
-	 * If a nicename is provided, remove unsafe user characters before using it.
-	 * Otherwise build a nicename from the user_login.
-	 */
-	if ( ! empty( $userdata['user_nicename'] ) ) {
-		$user_nicename = sanitize_user( $userdata['user_nicename'], true );
-		if ( mb_strlen( $user_nicename ) > 50 ) {
-			return new WP_Error( 'user_nicename_too_long', __( 'Nicename may not be longer than 50 characters.' ) );
-		}
-	} else {
-		$user_nicename = mb_substr( $user_login, 0, 50 );
-	}
-
-	$user_nicename = sanitize_title( $user_nicename );
-
-	// Store values to save in user meta.
-	$meta = array();
-
-	/**
-	 * Filters a user's nicename before the user is created or updated.
-	 *
-	 * @since 2.0.3
-	 *
-	 * @param string $user_nicename The user's nicename.
-	 */
-	$user_nicename = apply_filters( 'pre_user_nicename', $user_nicename );
-
-	$raw_user_url = empty( $userdata['user_url'] ) ? '' : $userdata['user_url'];
-
-	/**
-	 * Filters a user's URL before the user is created or updated.
-	 *
-	 * @since 2.0.3
-	 *
-	 * @param string $raw_user_url The user's URL.
-	 */
-	$user_url = apply_filters( 'pre_user_url', $raw_user_url );
-
-	$raw_user_email = empty( $userdata['user_email'] ) ? '' : $userdata['user_email'];
-
-	/**
-	 * Filters a user's email before the user is created or updated.
-	 *
-	 * @since 2.0.3
-	 *
-	 * @param string $raw_user_email The user's email.
-	 */
-	$user_email = apply_filters( 'pre_user_email', $raw_user_email );
-
-	/*
-	 * If there is no update, just check for `email_exists`. If there is an update,
-	 * check if current email and new email are the same, or not, and check `email_exists`
-	 * accordingly.
-	 */
-	if ( ( ! $update || ( ! empty( $old_user_data ) && 0 !== strcasecmp( $user_email, $old_user_data->user_email ) ) )
-		&& ! defined( 'WP_IMPORTING' )
-		&& email_exists( $user_email )
-	) {
-		return new WP_Error( 'existing_user_email', __( 'Sorry, that email address is already used!' ) );
-	}
-	$nickname = empty( $userdata['nickname'] ) ? $user_login : $userdata['nickname'];
-
-	/**
-	 * Filters a user's nickname before the user is created or updated.
-	 *
-	 * @since 2.0.3
-	 *
-	 * @param string $nickname The user's nickname.
-	 */
-	$meta['nickname'] = apply_filters( 'pre_user_nickname', $nickname );
-
-	$first_name = empty( $userdata['first_name'] ) ? '' : $userdata['first_name'];
-
-	/**
-	 * Filters a user's first name before the user is created or updated.
-	 *
-	 * @since 2.0.3
-	 *
-	 * @param string $first_name The user's first name.
-	 */
-	$meta['first_name'] = apply_filters( 'pre_user_first_name', $first_name );
-
-	$last_name = empty( $userdata['last_name'] ) ? '' : $userdata['last_name'];
-
-	/**
-	 * Filters a user's last name before the user is created or updated.
-	 *
-	 * @since 2.0.3
-	 *
-	 * @param string $last_name The user's last name.
-	 */
-	$meta['last_name'] = apply_filters( 'pre_user_last_name', $last_name );
-
-	if ( empty( $userdata['display_name'] ) ) {
-		if ( $update ) {
-			$display_name = $user_login;
-		} elseif ( $meta['first_name'] && $meta['last_name'] ) {
-			/* translators: 1: first name, 2: last name */
-			$display_name = sprintf( _x( '%1$s %2$s', 'Display name based on first name and last name' ), $meta['first_name'], $meta['last_name'] );
-		} elseif ( $meta['first_name'] ) {
-			$display_name = $meta['first_name'];
-		} elseif ( $meta['last_name'] ) {
-			$display_name = $meta['last_name'];
-		} else {
-			$display_name = $user_login;
-		}
-	} else {
-		$display_name = $userdata['display_name'];
-	}
-
-	/**
-	 * Filters a user's display name before the user is created or updated.
-	 *
-	 * @since 2.0.3
-	 *
-	 * @param string $display_name The user's display name.
-	 */
-	$display_name = apply_filters( 'pre_user_display_name', $display_name );
-
-	$description = empty( $userdata['description'] ) ? '' : $userdata['description'];
-
-	/**
-	 * Filters a user's description before the user is created or updated.
-	 *
-	 * @since 2.0.3
-	 *
-	 * @param string $description The user's description.
-	 */
-	$meta['description'] = apply_filters( 'pre_user_description', $description );
-
-	$meta['rich_editing'] = empty( $userdata['rich_editing'] ) ? 'true' : $userdata['rich_editing'];
-
-	$meta['comment_shortcuts'] = empty( $userdata['comment_shortcuts'] ) || 'false' === $userdata['comment_shortcuts'] ? 'false' : 'true';
-
-	$admin_color = empty( $userdata['admin_color'] ) ? 'fresh' : $userdata['admin_color'];
-	$meta['admin_color'] = preg_replace( '|[^a-z0-9 _.\-@]|i', '', $admin_color );
-
-	$meta['use_ssl'] = empty( $userdata['use_ssl'] ) ? 0 : $userdata['use_ssl'];
-
-	$user_registered = empty( $userdata['user_registered'] ) ? gmdate( 'Y-m-d H:i:s' ) : $userdata['user_registered'];
-
-	$meta['show_admin_bar_front'] = empty( $userdata['show_admin_bar_front'] ) ? 'true' : $userdata['show_admin_bar_front'];
-
-	$user_nicename_check = $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->users WHERE user_nicename = %s AND user_login != %s LIMIT 1" , $user_nicename, $user_login));
-
-	if ( $user_nicename_check ) {
-		$suffix = 2;
-		while ($user_nicename_check) {
-			// user_nicename allows 50 chars. Subtract one for a hyphen, plus the length of the suffix.
-			$base_length = 49 - mb_strlen( $suffix );
-			$alt_user_nicename = mb_substr( $user_nicename, 0, $base_length ) . "-$suffix";
-			$user_nicename_check = $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->users WHERE user_nicename = %s AND user_login != %s LIMIT 1" , $alt_user_nicename, $user_login));
-			$suffix++;
-		}
-		$user_nicename = $alt_user_nicename;
-	}
-
-	$compacted = compact( 'user_pass', 'user_email', 'user_url', 'user_nicename', 'display_name', 'user_registered' );
-	$data = wp_unslash( $compacted );
-
-	if ( $update ) {
-		if ( $user_email !== $old_user_data->user_email ) {
-			$data['user_activation_key'] = '';
-		}
-		$wpdb->update( $wpdb->users, $data, compact( 'ID' ) );
-		$user_id = (int) $ID;
-	} else {
-		$wpdb->insert( $wpdb->users, $data + compact( 'user_login' ) );
-		$user_id = (int) $wpdb->insert_id;
-	}
-
-	$user = new WP_User( $user_id );
-
-	/**
- 	 * Filters a user's meta values and keys before the user is created or updated.
- 	 *
- 	 * Does not include contact methods. These are added using `wp_get_user_contact_methods( $user )`.
- 	 *
- 	 * @since 4.4.0
- 	 *
- 	 * @param array $meta {
- 	 *     Default meta values and keys for the user.
- 	 *
- 	 *     @type string   $nickname             The user's nickname. Default is the user's username.
-	 *     @type string   $first_name           The user's first name.
-	 *     @type string   $last_name            The user's last name.
-	 *     @type string   $description          The user's description.
-	 *     @type bool     $rich_editing         Whether to enable the rich-editor for the user. False if not empty.
-	 *     @type bool     $comment_shortcuts    Whether to enable keyboard shortcuts for the user. Default false.
-	 *     @type string   $admin_color          The color scheme for a user's admin screen. Default 'fresh'.
-	 *     @type int|bool $use_ssl              Whether to force SSL on the user's admin area. 0|false if SSL is
-	 *                                          not forced.
-	 *     @type bool     $show_admin_bar_front Whether to show the admin bar on the front end for the user.
-	 *                                          Default true.
- 	 * }
-	 * @param WP_User $user   User object.
-	 * @param bool    $update Whether the user is being updated rather than created.
- 	 */
-	$meta = apply_filters( 'insert_user_meta', $meta, $user, $update );
-
-	// Update user meta.
-	foreach ( $meta as $key => $value ) {
-		update_user_meta( $user_id, $key, $value );
-	}
-
-	foreach ( wp_get_user_contact_methods( $user ) as $key => $value ) {
-		if ( isset( $userdata[ $key ] ) ) {
-			update_user_meta( $user_id, $key, $userdata[ $key ] );
-		}
-	}
-
-	if ( isset( $userdata['role'] ) ) {
-		$user->set_role( $userdata['role'] );
-	} elseif ( ! $update ) {
-		$user->set_role(get_option('default_role'));
-	}
-	wp_cache_delete( $user_id, 'users' );
-	wp_cache_delete( $user_login, 'userlogins' );
-
-	if ( $update ) {
-		/**
-		 * Fires immediately after an existing user is updated.
-		 *
-		 * @since 2.0.0
-		 *
-		 * @param int    $user_id       User ID.
-		 * @param object $old_user_data Object containing user's data prior to update.
-		 */
-		do_action( 'profile_update', $user_id, $old_user_data );
-	} else {
-		/**
-		 * Fires immediately after a new user is registered.
-		 *
-		 * @since 1.5.0
-		 *
-		 * @param int $user_id User ID.
-		 */
-		do_action( 'user_register', $user_id );
-	}
-
-	return $user_id;
-}
-
-/**
- * Update a user in the database.
- *
- * It is possible to update a user's password by specifying the 'user_pass'
- * value in the $userdata parameter array.
- *
- * If current user's password is being updated, then the cookies will be
- * cleared.
- *
- * @since 2.0.0
- *
- * @see wp_insert_user() For what fields can be set in $userdata.
- *
- * @param mixed $userdata An array of user data or a user object of type stdClass or WP_User.
- * @return int|WP_Error The updated user's ID or a WP_Error object if the user could not be updated.
- */
-function wp_update_user($userdata) {
-	if ( $userdata instanceof stdClass ) {
-		$userdata = get_object_vars( $userdata );
-	} elseif ( $userdata instanceof WP_User ) {
-		$userdata = $userdata->to_array();
-	}
-
-	$ID = isset( $userdata['ID'] ) ? (int) $userdata['ID'] : 0;
-	if ( ! $ID ) {
-		return new WP_Error( 'invalid_user_id', __( 'Invalid user ID.' ) );
-	}
-
-	// First, get all of the original fields
-	$user_obj = get_userdata( $ID );
-	if ( ! $user_obj ) {
-		return new WP_Error( 'invalid_user_id', __( 'Invalid user ID.' ) );
-	}
-
-	$user = $user_obj->to_array();
-
-	// Add additional custom fields
-	foreach ( _get_additional_user_keys( $user_obj ) as $key ) {
-		$user[ $key ] = get_user_meta( $ID, $key, true );
-	}
-
-	// Escape data pulled from DB.
-	$user = add_magic_quotes( $user );
-
-	if ( ! empty( $userdata['user_pass'] ) && $userdata['user_pass'] !== $user_obj->user_pass ) {
-		// If password is changing, hash it now
-		$plaintext_pass = $userdata['user_pass'];
-		$userdata['user_pass'] = wp_hash_password( $userdata['user_pass'] );
-
-		/**
-		 * Filters whether to send the password change email.
-		 *
-		 * @since 4.3.0
-		 *
-		 * @see wp_insert_user() For `$user` and `$userdata` fields.
-		 *
-		 * @param bool  $send     Whether to send the email.
-		 * @param array $user     The original user array.
-		 * @param array $userdata The updated user array.
-		 *
-		 */
-		$send_password_change_email = apply_filters( 'send_password_change_email', true, $user, $userdata );
-	}
-
-	if ( isset( $userdata['user_email'] ) && $user['user_email'] !== $userdata['user_email'] ) {
-		/**
-		 * Filters whether to send the email change email.
-		 *
-		 * @since 4.3.0
-		 *
-		 * @see wp_insert_user() For `$user` and `$userdata` fields.
-		 *
-		 * @param bool  $send     Whether to send the email.
-		 * @param array $user     The original user array.
-		 * @param array $userdata The updated user array.
-		 *
-		 */
-		$send_email_change_email = apply_filters( 'send_email_change_email', true, $user, $userdata );
-	}
-
-	wp_cache_delete( $user['user_email'], 'useremail' );
-	wp_cache_delete( $user['user_nicename'], 'userslugs' );
-
-	// Merge old and new fields with new fields overwriting old ones.
-	$userdata = array_merge( $user, $userdata );
-	$user_id = wp_insert_user( $userdata );
-
-	if ( ! is_wp_error( $user_id ) ) {
-
-		$blog_name = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
-
-		if ( ! empty( $send_password_change_email ) ) {
-
-			/* translators: Do not translate USERNAME, ADMIN_EMAIL, EMAIL, SITENAME, SITEURL: those are placeholders. */
-			$pass_change_text = __( 'Hi ###USERNAME###,
-
-This notice confirms that your password was changed on ###SITENAME###.
-
-If you did not change your password, please contact the Site Administrator at
-###ADMIN_EMAIL###
-
-This email has been sent to ###EMAIL###
-
-Regards,
-All at ###SITENAME###
-###SITEURL###' );
-
-			$pass_change_email = array(
-				'to'      => $user['user_email'],
-				'subject' => __( '[%s] Notice of Password Change' ),
-				'message' => $pass_change_text,
-				'headers' => '',
-			);
-
-			/**
-			 * Filters the contents of the email sent when the user's password is changed.
-			 *
-			 * @since 4.3.0
-			 *
-			 * @param array $pass_change_email {
-			 *            Used to build wp_mail().
-			 *            @type string $to      The intended recipients. Add emails in a comma separated string.
-			 *            @type string $subject The subject of the email.
-			 *            @type string $message The content of the email.
-			 *                The following strings have a special meaning and will get replaced dynamically:
-			 *                - ###USERNAME###    The current user's username.
-			 *                - ###ADMIN_EMAIL### The admin email in case this was unexpected.
-			 *                - ###EMAIL###       The old email.
-			 *                - ###SITENAME###    The name of the site.
-			 *                - ###SITEURL###     The URL to the site.
-			 *            @type string $headers Headers. Add headers in a newline (\r\n) separated string.
-			 *        }
-			 * @param array $user     The original user array.
-			 * @param array $userdata The updated user array.
-			 *
-			 */
-			$pass_change_email = apply_filters( 'password_change_email', $pass_change_email, $user, $userdata );
-
-			$pass_change_email['message'] = str_replace( '###USERNAME###', $user['user_login'], $pass_change_email['message'] );
-			$pass_change_email['message'] = str_replace( '###ADMIN_EMAIL###', get_option( 'admin_email' ), $pass_change_email['message'] );
-			$pass_change_email['message'] = str_replace( '###EMAIL###', $user['user_email'], $pass_change_email['message'] );
-			$pass_change_email['message'] = str_replace( '###SITENAME###', $blog_name, $pass_change_email['message'] );
-			$pass_change_email['message'] = str_replace( '###SITEURL###', home_url(), $pass_change_email['message'] );
-
-			wp_mail( $pass_change_email['to'], sprintf( $pass_change_email['subject'], $blog_name ), $pass_change_email['message'], $pass_change_email['headers'] );
-		}
-
-		if ( ! empty( $send_email_change_email ) ) {
-			/* translators: Do not translate USERNAME, ADMIN_EMAIL, EMAIL, SITENAME, SITEURL: those are placeholders. */
-			$email_change_text = __( 'Hi ###USERNAME###,
-
-This notice confirms that your email was changed on ###SITENAME###.
-
-If you did not change your email, please contact the Site Administrator at
-###ADMIN_EMAIL###
-
-This email has been sent to ###EMAIL###
-
-Regards,
-All at ###SITENAME###
-###SITEURL###' );
-
-			$email_change_email = array(
-				'to'      => $user['user_email'],
-				'subject' => __( '[%s] Notice of Email Change' ),
-				'message' => $email_change_text,
-				'headers' => '',
-			);
-
-			/**
-			 * Filters the contents of the email sent when the user's email is changed.
-			 *
-			 * @since 4.3.0
-			 *
-			 * @param array $email_change_email {
-			 *            Used to build wp_mail().
-			 *            @type string $to      The intended recipients.
-			 *            @type string $subject The subject of the email.
-			 *            @type string $message The content of the email.
-			 *                The following strings have a special meaning and will get replaced dynamically:
-			 *                - ###USERNAME###    The current user's username.
-			 *                - ###ADMIN_EMAIL### The admin email in case this was unexpected.
-			 *                - ###EMAIL###       The old email.
-			 *                - ###SITENAME###    The name of the site.
-			 *                - ###SITEURL###     The URL to the site.
-			 *            @type string $headers Headers.
-			 *        }
-			 * @param array $user The original user array.
-			 * @param array $userdata The updated user array.
-			 */
-			$email_change_email = apply_filters( 'email_change_email', $email_change_email, $user, $userdata );
-
-			$email_change_email['message'] = str_replace( '###USERNAME###', $user['user_login'], $email_change_email['message'] );
-			$email_change_email['message'] = str_replace( '###ADMIN_EMAIL###', get_option( 'admin_email' ), $email_change_email['message'] );
-			$email_change_email['message'] = str_replace( '###EMAIL###', $user['user_email'], $email_change_email['message'] );
-			$email_change_email['message'] = str_replace( '###SITENAME###', $blog_name, $email_change_email['message'] );
-			$email_change_email['message'] = str_replace( '###SITEURL###', home_url(), $email_change_email['message'] );
-
-			wp_mail( $email_change_email['to'], sprintf( $email_change_email['subject'], $blog_name ), $email_change_email['message'], $email_change_email['headers'] );
-		}
-	}
-
-	// Update the cookies if the password changed.
-	$current_user = wp_get_current_user();
-	if ( $current_user->ID == $ID ) {
-		if ( isset($plaintext_pass) ) {
-			wp_clear_auth_cookie();
-
-			// Here we calculate the expiration length of the current auth cookie and compare it to the default expiration.
-			// If it's greater than this, then we know the user checked 'Remember Me' when they logged in.
-			$logged_in_cookie    = wp_parse_auth_cookie( '', 'logged_in' );
-			/** This filter is documented in wp-includes/pluggable.php */
-			$default_cookie_life = apply_filters( 'auth_cookie_expiration', ( 2 * DAY_IN_SECONDS ), $ID, false );
-			$remember            = ( ( $logged_in_cookie['expiration'] - time() ) > $default_cookie_life );
-
-			wp_set_auth_cookie( $ID, $remember );
-		}
-	}
-
-	return $user_id;
-}
-
-/**
- * A simpler way of inserting a user into the database.
- *
- * Creates a new user with just the username, password, and email. For more
- * complex user creation use wp_insert_user() to specify more information.
- *
- * @since 2.0.0
- * @see wp_insert_user() More complete way to create a new user
- *
- * @param string $username The user's username.
- * @param string $password The user's password.
- * @param string $email    Optional. The user's email. Default empty.
- * @return int|WP_Error The newly created user's ID or a WP_Error object if the user could not
- *                      be created.
- */
-function wp_create_user($username, $password, $email = '') {
-	$user_login = wp_slash( $username );
-	$user_email = wp_slash( $email    );
-	$user_pass = $password;
-
-	$userdata = compact('user_login', 'user_email', 'user_pass');
-	return wp_insert_user($userdata);
-}
-
-/**
- * Returns a list of meta keys to be (maybe) populated in wp_update_user().
- *
- * The list of keys returned via this function are dependent on the presence
- * of those keys in the user meta data to be set.
- *
- * @since 3.3.0
- * @access private
- *
- * @param WP_User $user WP_User instance.
- * @return array List of user keys to be populated in wp_update_user().
- */
-function _get_additional_user_keys( $user ) {
-	$keys = array( 'first_name', 'last_name', 'nickname', 'description', 'rich_editing', 'comment_shortcuts', 'admin_color', 'use_ssl', 'show_admin_bar_front' );
-	return array_merge( $keys, array_keys( wp_get_user_contact_methods( $user ) ) );
-}
-
-/**
- * Set up the user contact methods.
- *
- * Default contact methods were removed in 3.6. A filter dictates contact methods.
- *
- * @since 3.7.0
- *
- * @param WP_User $user Optional. WP_User object.
- * @return array Array of contact methods and their labels.
- */
-function wp_get_user_contact_methods( $user = null ) {
-	$methods = array();
-	if ( get_site_option( 'initial_db_version' ) < 23588 ) {
-		$methods = array(
-			'aim'    => __( 'AIM' ),
-			'yim'    => __( 'Yahoo IM' ),
-			'jabber' => __( 'Jabber / Google Talk' )
-		);
-	}
-
-	/**
-	 * Filters the user contact methods.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param array   $methods Array of contact methods and their labels.
- 	 * @param WP_User $user    WP_User object.
-	 */
-	return apply_filters( 'user_contactmethods', $methods, $user );
-}
-
-/**
- * The old private function for setting up user contact methods.
- *
- * Use wp_get_user_contact_methods() instead.
- *
- * @since 2.9.0
- * @access private
- *
- * @param WP_User $user Optional. WP_User object. Default null.
- * @return array Array of contact methods and their labels.
- */
-function _wp_get_user_contactmethods( $user = null ) {
-	return wp_get_user_contact_methods( $user );
-}
-
-/**
- * Gets the text suggesting how to create strong passwords.
- *
- * @since 4.1.0
- *
- * @return string The password hint text.
- */
-function wp_get_password_hint() {
-	$hint = __( 'Hint: The password should be at least twelve characters long. To make it stronger, use upper and lower case letters, numbers, and symbols like ! " ? $ % ^ &amp; ).' );
-
-	/**
-	 * Filters the text describing the site's password complexity policy.
-	 *
-	 * @since 4.1.0
-	 *
-	 * @param string $hint The password hint text.
-	 */
-	return apply_filters( 'password_hint', $hint );
-}
-
-/**
- * Creates, stores, then returns a password reset key for user.
- *
- * @since 4.4.0
- *
- * @global wpdb         $wpdb      WordPress database abstraction object.
- * @global PasswordHash $wp_hasher Portable PHP password hashing framework.
- *
- * @param WP_User $user User to retrieve password reset key for.
- *
- * @return string|WP_Error Password reset key on success. WP_Error on error.
- */
-function get_password_reset_key( $user ) {
-	global $wpdb, $wp_hasher;
-
-	/**
-	 * Fires before a new password is retrieved.
-	 *
-	 * Use the {@see 'retrieve_password'} hook instead.
-	 *
-	 * @since 1.5.0
-	 * @deprecated 1.5.1 Misspelled. Use 'retrieve_password' hook instead.
-	 *
-	 * @param string $user_login The user login name.
-	 */
-	do_action( 'retreive_password', $user->user_login );
-
-	/**
-	 * Fires before a new password is retrieved.
-	 *
-	 * @since 1.5.1
-	 *
-	 * @param string $user_login The user login name.
-	 */
-	do_action( 'retrieve_password', $user->user_login );
-
-	$allow = true;
-	if ( is_multisite() && is_user_spammy( $user ) ) {
-		$allow = false;
-	}
-
-	/**
-	 * Filters whether to allow a password to be reset.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param bool $allow         Whether to allow the password to be reset. Default true.
-	 * @param int  $user_data->ID The ID of the user attempting to reset a password.
-	 */
-	$allow = apply_filters( 'allow_password_reset', $allow, $user->ID );
-
-	if ( ! $allow ) {
-		return new WP_Error( 'no_password_reset', __( 'Password reset is not allowed for this user' ) );
-	} elseif ( is_wp_error( $allow ) ) {
-		return $allow;
-	}
-
-	// Generate something random for a password reset key.
-	$key = wp_generate_password( 20, false );
-
-	/**
-	 * Fires when a password reset key is generated.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param string $user_login The username for the user.
-	 * @param string $key        The generated password reset key.
-	 */
-	do_action( 'retrieve_password_key', $user->user_login, $key );
-
-	// Now insert the key, hashed, into the DB.
-	if ( empty( $wp_hasher ) ) {
-		$wp_hasher = new PasswordHash( 8, true );
-	}
-	$hashed = time() . ':' . $wp_hasher->HashPassword( $key );
-	$key_saved = $wpdb->update( $wpdb->users, array( 'user_activation_key' => $hashed ), array( 'user_login' => $user->user_login ) );
-	if ( false === $key_saved ) {
-		return new WP_Error( 'no_password_key_update', __( 'Could not save password reset key to database.' ) );
-	}
-
-	return $key;
-}
-
-/**
- * Retrieves a user row based on password reset key and login
- *
- * A key is considered 'expired' if it exactly matches the value of the
- * user_activation_key field, rather than being matched after going through the
- * hashing process. This field is now hashed; old values are no longer accepted
- * but have a different WP_Error code so good user feedback can be provided.
- *
- * @since 3.1.0
- *
- * @global wpdb         $wpdb      WordPress database object for queries.
- * @global PasswordHash $wp_hasher Portable PHP password hashing framework instance.
- *
- * @param string $key       Hash to validate sending user's password.
- * @param string $login     The user login.
- * @return WP_User|WP_Error WP_User object on success, WP_Error object for invalid or expired keys.
- */
-function check_password_reset_key($key, $login) {
-	global $wpdb, $wp_hasher;
-
-	$key = preg_replace('/[^a-z0-9]/i', '', $key);
-
-	if ( empty( $key ) || !is_string( $key ) )
-		return new WP_Error('invalid_key', __('Invalid key'));
-
-	if ( empty($login) || !is_string($login) )
-		return new WP_Error('invalid_key', __('Invalid key'));
-
-	$row = $wpdb->get_row( $wpdb->prepare( "SELECT ID, user_activation_key FROM $wpdb->users WHERE user_login = %s", $login ) );
-	if ( ! $row )
-		return new WP_Error('invalid_key', __('Invalid key'));
-
-	if ( empty( $wp_hasher ) ) {
-		$wp_hasher = new PasswordHash( 8, true );
-	}
-
-	/**
-	 * Filters the expiration time of password reset keys.
-	 *
-	 * @since 4.3.0
-	 *
-	 * @param int $expiration The expiration time in seconds.
-	 */
-	$expiration_duration = apply_filters( 'password_reset_expiration', DAY_IN_SECONDS );
-
-	if ( false !== strpos( $row->user_activation_key, ':' ) ) {
-		list( $pass_request_time, $pass_key ) = explode( ':', $row->user_activation_key, 2 );
-		$expiration_time = $pass_request_time + $expiration_duration;
-	} else {
-		$pass_key = $row->user_activation_key;
-		$expiration_time = false;
-	}
-
-	if ( ! $pass_key ) {
-		return new WP_Error( 'invalid_key', __( 'Invalid key' ) );
-	}
-
-	$hash_is_correct = $wp_hasher->CheckPassword( $key, $pass_key );
-
-	if ( $hash_is_correct && $expiration_time && time() < $expiration_time ) {
-		return get_userdata( $row->ID );
-	} elseif ( $hash_is_correct && $expiration_time ) {
-		// Key has an expiration time that's passed
-		return new WP_Error( 'expired_key', __( 'Invalid key' ) );
-	}
-
-	if ( hash_equals( $row->user_activation_key, $key ) || ( $hash_is_correct && ! $expiration_time ) ) {
-		$return = new WP_Error( 'expired_key', __( 'Invalid key' ) );
-		$user_id = $row->ID;
-
-		/**
-		 * Filters the return value of check_password_reset_key() when an
-		 * old-style key is used.
-		 *
-		 * @since 3.7.0 Previously plain-text keys were stored in the database.
-		 * @since 4.3.0 Previously key hashes were stored without an expiration time.
-		 *
-		 * @param WP_Error $return  A WP_Error object denoting an expired key.
-		 *                          Return a WP_User object to validate the key.
-		 * @param int      $user_id The matched user ID.
-		 */
-		return apply_filters( 'password_reset_key_expired', $return, $user_id );
-	}
-
-	return new WP_Error( 'invalid_key', __( 'Invalid key' ) );
-}
-
-/**
- * Handles resetting the user's password.
- *
- * @since 2.5.0
- *
- * @param object $user     The user
- * @param string $new_pass New password for the user in plaintext
- */
-function reset_password( $user, $new_pass ) {
-	/**
-	 * Fires before the user's password is reset.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param object $user     The user.
-	 * @param string $new_pass New user password.
-	 */
-	do_action( 'password_reset', $user, $new_pass );
-
-	wp_set_password( $new_pass, $user->ID );
-	update_user_option( $user->ID, 'default_password_nag', false, true );
-
-	/**
-	 * Fires after the user's password is reset.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param object $user     The user.
-	 * @param string $new_pass New user password.
-	 */
-	do_action( 'after_password_reset', $user, $new_pass );
-}
-
-/**
- * Handles registering a new user.
- *
- * @since 2.5.0
- *
- * @param string $user_login User's username for logging in
- * @param string $user_email User's email address to send password and add
- * @return int|WP_Error Either user's ID or error on failure.
- */
-function register_new_user( $user_login, $user_email ) {
-	$errors = new WP_Error();
-
-	$sanitized_user_login = sanitize_user( $user_login );
-	/**
-	 * Filters the email address of a user being registered.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param string $user_email The email address of the new user.
-	 */
-	$user_email = apply_filters( 'user_registration_email', $user_email );
-
-	// Check the username
-	if ( $sanitized_user_login == '' ) {
-		$errors->add( 'empty_username', __( '<strong>ERROR</strong>: Please enter a username.' ) );
-	} elseif ( ! validate_username( $user_login ) ) {
-		$errors->add( 'invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) );
-		$sanitized_user_login = '';
-	} elseif ( username_exists( $sanitized_user_login ) ) {
-		$errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' ) );
-
-	} else {
-		/** This filter is documented in wp-includes/user.php */
-		$illegal_user_logins = array_map( 'strtolower', (array) apply_filters( 'illegal_user_logins', array() ) );
-		if ( in_array( strtolower( $sanitized_user_login ), $illegal_user_logins ) ) {
-			$errors->add( 'invalid_username', __( '<strong>ERROR</strong>: Sorry, that username is not allowed.' ) );
-		}
-	}
-
-	// Check the email address
-	if ( $user_email == '' ) {
-		$errors->add( 'empty_email', __( '<strong>ERROR</strong>: Please type your email address.' ) );
-	} elseif ( ! is_email( $user_email ) ) {
-		$errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The email address isn&#8217;t correct.' ) );
-		$user_email = '';
-	} elseif ( email_exists( $user_email ) ) {
-		$errors->add( 'email_exists', __( '<strong>ERROR</strong>: This email is already registered, please choose another one.' ) );
-	}
-
-	/**
-	 * Fires when submitting registration form data, before the user is created.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param string   $sanitized_user_login The submitted username after being sanitized.
-	 * @param string   $user_email           The submitted email.
-	 * @param WP_Error $errors               Contains any errors with submitted username and email,
-	 *                                       e.g., an empty field, an invalid username or email,
-	 *                                       or an existing username or email.
-	 */
-	do_action( 'register_post', $sanitized_user_login, $user_email, $errors );
-
-	/**
-	 * Filters the errors encountered when a new user is being registered.
-	 *
-	 * The filtered WP_Error object may, for example, contain errors for an invalid
-	 * or existing username or email address. A WP_Error object should always returned,
-	 * but may or may not contain errors.
-	 *
-	 * If any errors are present in $errors, this will abort the user's registration.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param WP_Error $errors               A WP_Error object containing any errors encountered
-	 *                                       during registration.
-	 * @param string   $sanitized_user_login User's username after it has been sanitized.
-	 * @param string   $user_email           User's email.
-	 */
-	$errors = apply_filters( 'registration_errors', $errors, $sanitized_user_login, $user_email );
-
-	if ( $errors->get_error_code() )
-		return $errors;
-
-	$user_pass = wp_generate_password( 12, false );
-	$user_id = wp_create_user( $sanitized_user_login, $user_pass, $user_email );
-	if ( ! $user_id || is_wp_error( $user_id ) ) {
-		$errors->add( 'registerfail', sprintf( __( '<strong>ERROR</strong>: Couldn&#8217;t register you&hellip; please contact the <a href="mailto:%s">webmaster</a> !' ), get_option( 'admin_email' ) ) );
-		return $errors;
-	}
-
-	update_user_option( $user_id, 'default_password_nag', true, true ); //Set up the Password change nag.
-
-	/**
-	 * Fires after a new user registration has been recorded.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param int $user_id ID of the newly registered user.
-	 */
-	do_action( 'register_new_user', $user_id );
-
-	return $user_id;
-}
-
-/**
- * Initiates email notifications related to the creation of new users.
- *
- * Notifications are sent both to the site admin and to the newly created user.
- *
- * @since 4.4.0
- * @since 4.6.0 Converted the `$notify` parameter to accept 'user' for sending
- *              notifications only to the user created.
- *
- * @param int    $user_id ID of the newly created user.
- * @param string $notify  Optional. Type of notification that should happen. Accepts 'admin'
- *                        or an empty string (admin only), 'user', or 'both' (admin and user).
- *                        Default 'both'.
- */
-function wp_send_new_user_notifications( $user_id, $notify = 'both' ) {
-	wp_new_user_notification( $user_id, null, $notify );
-}
-
-/**
- * Retrieve the current session token from the logged_in cookie.
- *
- * @since 4.0.0
- *
- * @return string Token.
- */
-function wp_get_session_token() {
-	$cookie = wp_parse_auth_cookie( '', 'logged_in' );
-	return ! empty( $cookie['token'] ) ? $cookie['token'] : '';
-}
-
-/**
- * Retrieve a list of sessions for the current user.
- *
- * @since 4.0.0
- * @return array Array of sessions.
- */
-function wp_get_all_sessions() {
-	$manager = WP_Session_Tokens::get_instance( get_current_user_id() );
-	return $manager->get_all();
-}
-
-/**
- * Remove the current session token from the database.
- *
- * @since 4.0.0
- */
-function wp_destroy_current_session() {
-	$token = wp_get_session_token();
-	if ( $token ) {
-		$manager = WP_Session_Tokens::get_instance( get_current_user_id() );
-		$manager->destroy( $token );
-	}
-}
-
-/**
- * Remove all but the current session token for the current user for the database.
- *
- * @since 4.0.0
- */
-function wp_destroy_other_sessions() {
-	$token = wp_get_session_token();
-	if ( $token ) {
-		$manager = WP_Session_Tokens::get_instance( get_current_user_id() );
-		$manager->destroy_others( $token );
-	}
-}
-
-/**
- * Remove all session tokens for the current user from the database.
- *
- * @since 4.0.0
- */
-function wp_destroy_all_sessions() {
-	$manager = WP_Session_Tokens::get_instance( get_current_user_id() );
-	$manager->destroy_all();
-}
-
-/**
- * Get the user IDs of all users with no role on this site.
- *
- * This function returns an empty array when used on Multisite.
- *
- * @since 4.4.0
- *
- * @return array Array of user IDs.
- */
-function wp_get_users_with_no_role() {
-	global $wpdb;
-
-	if ( is_multisite() ) {
-		return array();
-	}
-
-	$prefix = $wpdb->get_blog_prefix();
-	$regex  = implode( '|', wp_roles()->get_names() );
-	$regex  = preg_replace( '/[^a-zA-Z_\|-]/', '', $regex );
-	$users  = $wpdb->get_col( $wpdb->prepare( "
-		SELECT user_id
-		FROM $wpdb->usermeta
-		WHERE meta_key = '{$prefix}capabilities'
-		AND meta_value NOT REGEXP %s
-	", $regex ) );
-
-	return $users;
-}
-
-/**
- * Retrieves the current user object.
- *
- * Will set the current user, if the current user is not set. The current user
- * will be set to the logged-in person. If no user is logged-in, then it will
- * set the current user to 0, which is invalid and won't have any permissions.
- *
- * This function is used by the pluggable functions wp_get_current_user() and
- * get_currentuserinfo(), the latter of which is deprecated but used for backward
- * compatibility.
- *
- * @since 4.5.0
- * @access private
- *
- * @see wp_get_current_user()
- * @global WP_User $current_user Checks if the current user is set.
- *
- * @return WP_User Current WP_User instance.
- */
-function _wp_get_current_user() {
-	global $current_user;
-
-	if ( ! empty( $current_user ) ) {
-		if ( $current_user instanceof WP_User ) {
-			return $current_user;
-		}
-
-		// Upgrade stdClass to WP_User
-		if ( is_object( $current_user ) && isset( $current_user->ID ) ) {
-			$cur_id = $current_user->ID;
-			$current_user = null;
-			wp_set_current_user( $cur_id );
-			return $current_user;
-		}
-
-		// $current_user has a junk value. Force to WP_User with ID 0.
-		$current_user = null;
-		wp_set_current_user( 0 );
-		return $current_user;
-	}
-
-	if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST ) {
-		wp_set_current_user( 0 );
-		return $current_user;
-	}
-
-	/**
-	 * Filters the current user.
-	 *
-	 * The default filters use this to determine the current user from the
-	 * request's cookies, if available.
-	 *
-	 * Returning a value of false will effectively short-circuit setting
-	 * the current user.
-	 *
-	 * @since 3.9.0
-	 *
-	 * @param int|bool $user_id User ID if one has been determined, false otherwise.
-	 */
-	$user_id = apply_filters( 'determine_current_user', false );
-	if ( ! $user_id ) {
-		wp_set_current_user( 0 );
-		return $current_user;
-	}
-
-	wp_set_current_user( $user_id );
-
-	return $current_user;
-}
Index: www/wp-admin/revision.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/revision.php	(revision 38565)
+++ www/wp-admin/revision.php	(revision 38565)
@@ -1,135 +0,0 @@
-<?php
-/**
- * Revisions administration panel
- *
- * Requires wp-admin/includes/revision.php.
- *
- * @package WordPress
- * @subpackage Administration
- * @since 2.6.0
- *
- * @param int    revision Optional. The revision ID.
- * @param string action   The action to take.
- *                        Accepts 'restore', 'view' or 'edit'.
- * @param int    from     The revision to compare from.
- * @param int    to       Optional, required if revision missing. The revision to compare to.
- */
-
-/** WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-require ABSPATH . 'wp-admin/includes/revision.php';
-
-wp_reset_vars( array( 'revision', 'action', 'from', 'to' ) );
-
-$revision_id = absint( $revision );
-
-$from = is_numeric( $from ) ? absint( $from ) : null;
-if ( ! $revision_id )
-	$revision_id = absint( $to );
-$redirect = 'edit.php';
-
-switch ( $action ) {
-case 'restore' :
-	if ( ! $revision = wp_get_post_revision( $revision_id ) )
-		break;
-
-	if ( ! current_user_can( 'edit_post', $revision->post_parent ) )
-		break;
-
-	if ( ! $post = get_post( $revision->post_parent ) )
-		break;
-
-	// Restore if revisions are enabled or this is an autosave.
-	if ( ! wp_revisions_enabled( $post ) && ! wp_is_post_autosave( $revision ) ) {
-		$redirect = 'edit.php?post_type=' . $post->post_type;
-		break;
-	}
-
-	// Don't allow revision restore when post is locked
-	if ( wp_check_post_lock( $post->ID ) )
-		break;
-
-	check_admin_referer( "restore-post_{$revision->ID}" );
-
-	wp_restore_post_revision( $revision->ID );
-	$redirect = add_query_arg( array( 'message' => 5, 'revision' => $revision->ID ), get_edit_post_link( $post->ID, 'url' ) );
-	break;
-case 'view' :
-case 'edit' :
-default :
-	if ( ! $revision = wp_get_post_revision( $revision_id ) )
-		break;
-	if ( ! $post = get_post( $revision->post_parent ) )
-		break;
-
-	if ( ! current_user_can( 'read_post', $revision->ID ) || ! current_user_can( 'edit_post', $revision->post_parent ) )
-		break;
-
-	// Revisions disabled and we're not looking at an autosave
-	if ( ! wp_revisions_enabled( $post ) && ! wp_is_post_autosave( $revision ) ) {
-		$redirect = 'edit.php?post_type=' . $post->post_type;
-		break;
-	}
-
-	$post_edit_link = get_edit_post_link();
-	$post_title     = '<a href="' . $post_edit_link . '">' . _draft_or_post_title() . '</a>';
-	$h1             = sprintf( __( 'Compare Revisions of &#8220;%1$s&#8221;' ), $post_title );
-	$return_to_post = '<a href="' . $post_edit_link . '">' . __( '&larr; Return to editor' ) . '</a>';
-	$title          = __( 'Revisions' );
-
-	$redirect = false;
-	break;
-}
-
-// Empty post_type means either malformed object found, or no valid parent was found.
-if ( ! $redirect && empty( $post->post_type ) )
-	$redirect = 'edit.php';
-
-if ( ! empty( $redirect ) ) {
-	wp_redirect( $redirect );
-	exit;
-}
-
-// This is so that the correct "Edit" menu item is selected.
-if ( ! empty( $post->post_type ) && 'post' != $post->post_type )
-	$parent_file = $submenu_file = 'edit.php?post_type=' . $post->post_type;
-else
-	$parent_file = $submenu_file = 'edit.php';
-
-wp_enqueue_script( 'revisions' );
-wp_localize_script( 'revisions', '_wpRevisionsSettings', wp_prepare_revisions_for_js( $post, $revision_id, $from ) );
-
-/* Revisions Help Tab */
-
-$revisions_overview  = '<p>' . __( 'This screen is used for managing your content revisions.' ) . '</p>';
-$revisions_overview .= '<p>' . __( 'Revisions are saved copies of your post or page, which are periodically created as you update your content. The red text on the left shows the content that was removed. The green text on the right shows the content that was added.' ) . '</p>';
-$revisions_overview .= '<p>' . __( 'From this screen you can review, compare, and restore revisions:' ) . '</p>';
-$revisions_overview .= '<ul><li>' . __( 'To navigate between revisions, <strong>drag the slider handle left or right</strong> or <strong>use the Previous or Next buttons</strong>.' ) . '</li>';
-$revisions_overview .= '<li>' . __( 'Compare two different revisions by <strong>selecting the &#8220;Compare any two revisions&#8221; box</strong> to the side.' ) . '</li>';
-$revisions_overview .= '<li>' . __( 'To restore a revision, <strong>click Restore This Revision</strong>.' ) . '</li></ul>';
-
-get_current_screen()->add_help_tab( array(
-	'id'      => 'revisions-overview',
-	'title'   => __( 'Overview' ),
-	'content' => $revisions_overview
-) );
-
-$revisions_sidebar  = '<p><strong>' . __( 'For more information:' ) . '</strong></p>';
-$revisions_sidebar .= '<p>' . __( '<a href="https://codex.wordpress.org/Revision_Management" target="_blank">Revisions Management</a>' ) . '</p>';
-$revisions_sidebar .= '<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>';
-
-get_current_screen()->set_help_sidebar( $revisions_sidebar );
-
-require_once( ABSPATH . 'wp-admin/admin-header.php' );
-
-?>
-
-<div class="wrap">
-	<h1 class="long-header"><?php echo $h1; ?></h1>
-	<?php echo $return_to_post; ?>
-</div>
-<?php
-wp_print_revision_templates();
-
-require_once( ABSPATH . 'wp-admin/admin-footer.php' );
Index: www/wp-includes/class-wp-feed-cache.php
===================================================================
--- www/wp-includes/class-wp-feed-cache.php	(revision 38565)
+++ www/wp-includes/autoload/feed/WP_Feed_Cache.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/includes/class-bulk-upgrader-skin.php
===================================================================
--- www/wp-admin/includes/class-bulk-upgrader-skin.php	(revision 38565)
+++ www/wp-admin/autoload/upgrader/Bulk_Upgrader_Skin.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/includes/class-language-pack-upgrader.php
===================================================================
--- www/wp-admin/includes/class-language-pack-upgrader.php	(revision 38565)
+++ www/wp-admin/autoload/upgrader/Language_Pack_Upgrader.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/pomo/entry.php
===================================================================
--- www/wp-includes/pomo/entry.php	(revision 38565)
+++ www/wp-includes/autoload/pomo/Translation_Entry.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-xmlrpc-server.php
===================================================================
--- www/wp-includes/class-wp-xmlrpc-server.php	(revision 38565)
+++ www/wp-includes/autoload/wp_xmlrpc_server.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/moderation.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/moderation.php	(revision 38565)
+++ www/wp-admin/moderation.php	(revision 38565)
@@ -1,12 +0,0 @@
-<?php
-/**
- * Comment Moderation Administration Screen.
- *
- * Redirects to edit-comments.php?comment_status=moderated.
- *
- * @package WordPress
- * @subpackage Administration
- */
-require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
-wp_redirect( admin_url('edit-comments.php?comment_status=moderated') );
-exit;
Index: www/wp-includes/Text/Diff.php
===================================================================
--- www/wp-includes/Text/Diff.php	(revision 38565)
+++ www/wp-includes/autoload/text-diff/Text_Diff_Op_change.php	(revision )
@@ -1,477 +1,4 @@
 <?php
-/**
- * General API for generating and formatting diffs - the differences between
- * two sequences of strings.
- *
- * The original PHP version of this code was written by Geoffrey T. Dairiki
- * <dairiki@dairiki.org>, and is used/adapted with his permission.
- *
- * Copyright 2004 Geoffrey T. Dairiki <dairiki@dairiki.org>
- * Copyright 2004-2010 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (LGPL). If you did
- * not receive this file, see http://opensource.org/licenses/lgpl-license.php.
- *
- * @package Text_Diff
- * @author  Geoffrey T. Dairiki <dairiki@dairiki.org>
- */
-class Text_Diff {
-
-    /**
-     * Array of changes.
-     *
-     * @var array
-     */
-    var $_edits;
-
-    /**
-     * Computes diffs between sequences of strings.
-     *
-     * @param string $engine     Name of the diffing engine to use.  'auto'
-     *                           will automatically select the best.
-     * @param array $params      Parameters to pass to the diffing engine.
-     *                           Normally an array of two arrays, each
-     *                           containing the lines from a file.
-     */
-    function __construct( $engine, $params )
-    {
-        // Backward compatibility workaround.
-        if (!is_string($engine)) {
-            $params = array($engine, $params);
-            $engine = 'auto';
-        }
-
-        if ($engine == 'auto') {
-            $engine = extension_loaded('xdiff') ? 'xdiff' : 'native';
-        } else {
-            $engine = basename($engine);
-        }
-
-        // WP #7391
-        require_once dirname(__FILE__).'/Diff/Engine/' . $engine . '.php';
-        $class = 'Text_Diff_Engine_' . $engine;
-        $diff_engine = new $class();
-
-        $this->_edits = call_user_func_array(array($diff_engine, 'diff'), $params);
-    }
-
-	/**
-	 * PHP4 constructor.
-	 */
-	public function Text_Diff( $engine, $params ) {
-		self::__construct( $engine, $params );
-	}
-
-    /**
-     * Returns the array of differences.
-     */
-    function getDiff()
-    {
-        return $this->_edits;
-    }
-
-    /**
-     * returns the number of new (added) lines in a given diff.
-     *
-     * @since Text_Diff 1.1.0
-     *
-     * @return integer The number of new lines
-     */
-    function countAddedLines()
-    {
-        $count = 0;
-        foreach ($this->_edits as $edit) {
-            if (is_a($edit, 'Text_Diff_Op_add') ||
-                is_a($edit, 'Text_Diff_Op_change')) {
-                $count += $edit->nfinal();
-            }
-        }
-        return $count;
-    }
-
-    /**
-     * Returns the number of deleted (removed) lines in a given diff.
-     *
-     * @since Text_Diff 1.1.0
-     *
-     * @return integer The number of deleted lines
-     */
-    function countDeletedLines()
-    {
-        $count = 0;
-        foreach ($this->_edits as $edit) {
-            if (is_a($edit, 'Text_Diff_Op_delete') ||
-                is_a($edit, 'Text_Diff_Op_change')) {
-                $count += $edit->norig();
-            }
-        }
-        return $count;
-    }
-
-    /**
-     * Computes a reversed diff.
-     *
-     * Example:
-     * <code>
-     * $diff = new Text_Diff($lines1, $lines2);
-     * $rev = $diff->reverse();
-     * </code>
-     *
-     * @return Text_Diff  A Diff object representing the inverse of the
-     *                    original diff.  Note that we purposely don't return a
-     *                    reference here, since this essentially is a clone()
-     *                    method.
-     */
-    function reverse()
-    {
-        if (version_compare(zend_version(), '2', '>')) {
-            $rev = clone($this);
-        } else {
-            $rev = $this;
-        }
-        $rev->_edits = array();
-        foreach ($this->_edits as $edit) {
-            $rev->_edits[] = $edit->reverse();
-        }
-        return $rev;
-    }
-
-    /**
-     * Checks for an empty diff.
-     *
-     * @return boolean  True if two sequences were identical.
-     */
-    function isEmpty()
-    {
-        foreach ($this->_edits as $edit) {
-            if (!is_a($edit, 'Text_Diff_Op_copy')) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /**
-     * Computes the length of the Longest Common Subsequence (LCS).
-     *
-     * This is mostly for diagnostic purposes.
-     *
-     * @return integer  The length of the LCS.
-     */
-    function lcs()
-    {
-        $lcs = 0;
-        foreach ($this->_edits as $edit) {
-            if (is_a($edit, 'Text_Diff_Op_copy')) {
-                $lcs += count($edit->orig);
-            }
-        }
-        return $lcs;
-    }
-
-    /**
-     * Gets the original set of lines.
-     *
-     * This reconstructs the $from_lines parameter passed to the constructor.
-     *
-     * @return array  The original sequence of strings.
-     */
-    function getOriginal()
-    {
-        $lines = array();
-        foreach ($this->_edits as $edit) {
-            if ($edit->orig) {
-                array_splice($lines, count($lines), 0, $edit->orig);
-            }
-        }
-        return $lines;
-    }
-
-    /**
-     * Gets the final set of lines.
-     *
-     * This reconstructs the $to_lines parameter passed to the constructor.
-     *
-     * @return array  The sequence of strings.
-     */
-    function getFinal()
-    {
-        $lines = array();
-        foreach ($this->_edits as $edit) {
-            if ($edit->final) {
-                array_splice($lines, count($lines), 0, $edit->final);
-            }
-        }
-        return $lines;
-    }
-
-    /**
-     * Removes trailing newlines from a line of text. This is meant to be used
-     * with array_walk().
-     *
-     * @param string $line  The line to trim.
-     * @param integer $key  The index of the line in the array. Not used.
-     */
-    static function trimNewlines(&$line, $key)
-    {
-        $line = str_replace(array("\n", "\r"), '', $line);
-    }
-
-    /**
-     * Determines the location of the system temporary directory.
-     *
-     * @static
-     *
-     * @access protected
-     *
-     * @return string  A directory name which can be used for temp files.
-     *                 Returns false if one could not be found.
-     */
-    function _getTempDir()
-    {
-        $tmp_locations = array('/tmp', '/var/tmp', 'c:\WUTemp', 'c:\temp',
-                               'c:\windows\temp', 'c:\winnt\temp');
-
-        /* Try PHP's upload_tmp_dir directive. */
-        $tmp = ini_get('upload_tmp_dir');
-
-        /* Otherwise, try to determine the TMPDIR environment variable. */
-        if (!strlen($tmp)) {
-            $tmp = getenv('TMPDIR');
-        }
-
-        /* If we still cannot determine a value, then cycle through a list of
-         * preset possibilities. */
-        while (!strlen($tmp) && count($tmp_locations)) {
-            $tmp_check = array_shift($tmp_locations);
-            if (@is_dir($tmp_check)) {
-                $tmp = $tmp_check;
-            }
-        }
-
-        /* If it is still empty, we have failed, so return false; otherwise
-         * return the directory determined. */
-        return strlen($tmp) ? $tmp : false;
-    }
-
-    /**
-     * Checks a diff for validity.
-     *
-     * This is here only for debugging purposes.
-     */
-    function _check($from_lines, $to_lines)
-    {
-        if (serialize($from_lines) != serialize($this->getOriginal())) {
-            trigger_error("Reconstructed original doesn't match", E_USER_ERROR);
-        }
-        if (serialize($to_lines) != serialize($this->getFinal())) {
-            trigger_error("Reconstructed final doesn't match", E_USER_ERROR);
-        }
-
-        $rev = $this->reverse();
-        if (serialize($to_lines) != serialize($rev->getOriginal())) {
-            trigger_error("Reversed original doesn't match", E_USER_ERROR);
-        }
-        if (serialize($from_lines) != serialize($rev->getFinal())) {
-            trigger_error("Reversed final doesn't match", E_USER_ERROR);
-        }
-
-        $prevtype = null;
-        foreach ($this->_edits as $edit) {
-            if ($prevtype == get_class($edit)) {
-                trigger_error("Edit sequence is non-optimal", E_USER_ERROR);
-            }
-            $prevtype = get_class($edit);
-        }
-
-        return true;
-    }
-
-}
-
-/**
- * @package Text_Diff
- * @author  Geoffrey T. Dairiki <dairiki@dairiki.org>
- */
-class Text_MappedDiff extends Text_Diff {
-
-    /**
-     * Computes a diff between sequences of strings.
-     *
-     * This can be used to compute things like case-insensitve diffs, or diffs
-     * which ignore changes in white-space.
-     *
-     * @param array $from_lines         An array of strings.
-     * @param array $to_lines           An array of strings.
-     * @param array $mapped_from_lines  This array should have the same size
-     *                                  number of elements as $from_lines.  The
-     *                                  elements in $mapped_from_lines and
-     *                                  $mapped_to_lines are what is actually
-     *                                  compared when computing the diff.
-     * @param array $mapped_to_lines    This array should have the same number
-     *                                  of elements as $to_lines.
-     */
-    function __construct($from_lines, $to_lines,
-                             $mapped_from_lines, $mapped_to_lines)
-    {
-        assert(count($from_lines) == count($mapped_from_lines));
-        assert(count($to_lines) == count($mapped_to_lines));
-
-        parent::Text_Diff($mapped_from_lines, $mapped_to_lines);
-
-        $xi = $yi = 0;
-        for ($i = 0; $i < count($this->_edits); $i++) {
-            $orig = &$this->_edits[$i]->orig;
-            if (is_array($orig)) {
-                $orig = array_slice($from_lines, $xi, count($orig));
-                $xi += count($orig);
-            }
-
-            $final = &$this->_edits[$i]->final;
-            if (is_array($final)) {
-                $final = array_slice($to_lines, $yi, count($final));
-                $yi += count($final);
-            }
-        }
-    }
-
-	/**
-	 * PHP4 constructor.
-	 */
-	public function Text_MappedDiff( $from_lines, $to_lines,
-                             $mapped_from_lines, $mapped_to_lines ) {
-		self::__construct( $from_lines, $to_lines,
-                             $mapped_from_lines, $mapped_to_lines );
-	}
-
-}
-
-/**
- * @package Text_Diff
- * @author  Geoffrey T. Dairiki <dairiki@dairiki.org>
- *
- * @access private
- */
-class Text_Diff_Op {
-
-    var $orig;
-    var $final;
-
-    function &reverse()
-    {
-        trigger_error('Abstract method', E_USER_ERROR);
-    }
-
-    function norig()
-    {
-        return $this->orig ? count($this->orig) : 0;
-    }
-
-    function nfinal()
-    {
-        return $this->final ? count($this->final) : 0;
-    }
-
-}
-
-/**
- * @package Text_Diff
- * @author  Geoffrey T. Dairiki <dairiki@dairiki.org>
- *
- * @access private
- */
-class Text_Diff_Op_copy extends Text_Diff_Op {
-
-	/**
-	 * PHP5 constructor.
-	 */
-    function __construct( $orig, $final = false )
-    {
-        if (!is_array($final)) {
-            $final = $orig;
-        }
-        $this->orig = $orig;
-        $this->final = $final;
-    }
-
-	/**
-	 * PHP4 constructor.
-	 */
-	public function Text_Diff_Op_copy( $orig, $final = false ) {
-		self::__construct( $orig, $final );
-	}
-
-    function &reverse()
-    {
-        $reverse = new Text_Diff_Op_copy($this->final, $this->orig);
-        return $reverse;
-    }
-
-}
-
-/**
- * @package Text_Diff
- * @author  Geoffrey T. Dairiki <dairiki@dairiki.org>
- *
- * @access private
- */
-class Text_Diff_Op_delete extends Text_Diff_Op {
-
-	/**
-	 * PHP5 constructor.
-	 */
-	function __construct( $lines )
-    {
-        $this->orig = $lines;
-        $this->final = false;
-    }
-
-	/**
-	 * PHP4 constructor.
-	 */
-	public function Text_Diff_Op_delete( $lines ) {
-		self::__construct( $lines );
-	}
-
-    function &reverse()
-    {
-        $reverse = new Text_Diff_Op_add($this->orig);
-        return $reverse;
-    }
-
-}
-
-/**
- * @package Text_Diff
- * @author  Geoffrey T. Dairiki <dairiki@dairiki.org>
- *
- * @access private
- */
-class Text_Diff_Op_add extends Text_Diff_Op {
-
-	/**
-	 * PHP5 constructor.
-	 */
-    function __construct( $lines )
-    {
-        $this->final = $lines;
-        $this->orig = false;
-    }
-
-	/**
-	 * PHP4 constructor.
-	 */
-	public function Text_Diff_Op_add( $lines ) {
-		self::__construct( $lines );
-	}
-
-    function &reverse()
-    {
-        $reverse = new Text_Diff_Op_delete($this->final);
-        return $reverse;
-    }
-
-}
 
 /**
  * @package Text_Diff
Index: www/wp-includes/class-walker-comment.php
===================================================================
--- www/wp-includes/class-walker-comment.php	(revision 38565)
+++ www/wp-includes/autoload/walker/Walker_Comment.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/option.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/option.php	(revision 38565)
+++ www/wp-includes/option.php	(revision 38565)
@@ -1,1684 +0,0 @@
-<?php
-/**
- * Option API
- *
- * @package WordPress
- * @subpackage Option
- */
-
-/**
- * Retrieves an option value based on an option name.
- *
- * If the option does not exist or does not have a value, then the return value
- * will be false. This is useful to check whether you need to install an option
- * and is commonly used during installation of plugin options and to test
- * whether upgrading is required.
- *
- * If the option was serialized then it will be unserialized when it is returned.
- *
- * Any scalar values will be returned as strings. You may coerce the return type of
- * a given option by registering an {@see 'option_$option'} filter callback.
- *
- * @since 1.5.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $option  Name of option to retrieve. Expected to not be SQL-escaped.
- * @param mixed  $default Optional. Default value to return if the option does not exist.
- * @return mixed Value set for the option.
- */
-function get_option( $option, $default = false ) {
-	global $wpdb;
-
-	$option = trim( $option );
-	if ( empty( $option ) )
-		return false;
-
-	/**
-	 * Filters the value of an existing option before it is retrieved.
-	 *
-	 * The dynamic portion of the hook name, `$option`, refers to the option name.
-	 *
-	 * Passing a truthy value to the filter will short-circuit retrieving
-	 * the option value, returning the passed value instead.
-	 *
-	 * @since 1.5.0
-	 * @since 4.4.0 The `$option` parameter was added.
-	 *
-	 * @param bool|mixed $pre_option Value to return instead of the option value.
-	 *                               Default false to skip it.
-	 * @param string     $option     Option name.
-	 */
-	$pre = apply_filters( "pre_option_{$option}", false, $option );
-	if ( false !== $pre )
-		return $pre;
-
-	if ( defined( 'WP_SETUP_CONFIG' ) )
-		return false;
-
-	if ( ! wp_installing() ) {
-		// prevent non-existent options from triggering multiple queries
-		$notoptions = wp_cache_get( 'notoptions', 'options' );
-		if ( isset( $notoptions[ $option ] ) ) {
-			/**
-			 * Filters the default value for an option.
-			 *
-			 * The dynamic portion of the hook name, `$option`, refers to the option name.
-			 *
-			 * @since 3.4.0
-			 * @since 4.4.0 The `$option` parameter was added.
-			 *
-			 * @param mixed  $default The default value to return if the option does not exist
-			 *                        in the database.
-			 * @param string $option  Option name.
-			 */
-			return apply_filters( "default_option_{$option}", $default, $option );
-		}
-
-		$alloptions = wp_load_alloptions();
-
-		if ( isset( $alloptions[$option] ) ) {
-			$value = $alloptions[$option];
-		} else {
-			$value = wp_cache_get( $option, 'options' );
-
-			if ( false === $value ) {
-				$row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", $option ) );
-
-				// Has to be get_row instead of get_var because of funkiness with 0, false, null values
-				if ( is_object( $row ) ) {
-					$value = $row->option_value;
-					wp_cache_add( $option, $value, 'options' );
-				} else { // option does not exist, so we must cache its non-existence
-					if ( ! is_array( $notoptions ) ) {
-						 $notoptions = array();
-					}
-					$notoptions[$option] = true;
-					wp_cache_set( 'notoptions', $notoptions, 'options' );
-
-					/** This filter is documented in wp-includes/option.php */
-					return apply_filters( 'default_option_' . $option, $default, $option );
-				}
-			}
-		}
-	} else {
-		$suppress = $wpdb->suppress_errors();
-		$row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", $option ) );
-		$wpdb->suppress_errors( $suppress );
-		if ( is_object( $row ) ) {
-			$value = $row->option_value;
-		} else {
-			/** This filter is documented in wp-includes/option.php */
-			return apply_filters( 'default_option_' . $option, $default, $option );
-		}
-	}
-
-	// If home is not set use siteurl.
-	if ( 'home' == $option && '' == $value )
-		return get_option( 'siteurl' );
-
-	if ( in_array( $option, array('siteurl', 'home', 'category_base', 'tag_base') ) )
-		$value = untrailingslashit( $value );
-
-	/**
-	 * Filters the value of an existing option.
-	 *
-	 * The dynamic portion of the hook name, `$option`, refers to the option name.
-	 *
-	 * @since 1.5.0 As 'option_' . $setting
-	 * @since 3.0.0
-	 * @since 4.4.0 The `$option` parameter was added.
-	 *
-	 * @param mixed  $value  Value of the option. If stored serialized, it will be
-	 *                       unserialized prior to being returned.
-	 * @param string $option Option name.
-	 */
-	return apply_filters( "option_{$option}", maybe_unserialize( $value ), $option );
-}
-
-/**
- * Protect WordPress special option from being modified.
- *
- * Will die if $option is in protected list. Protected options are 'alloptions'
- * and 'notoptions' options.
- *
- * @since 2.2.0
- *
- * @param string $option Option name.
- */
-function wp_protect_special_option( $option ) {
-	if ( 'alloptions' === $option || 'notoptions' === $option )
-		wp_die( sprintf( __( '%s is a protected WP option and may not be modified' ), esc_html( $option ) ) );
-}
-
-/**
- * Print option value after sanitizing for forms.
- *
- * @since 1.5.0
- *
- * @param string $option Option name.
- */
-function form_option( $option ) {
-	echo esc_attr( get_option( $option ) );
-}
-
-/**
- * Loads and caches all autoloaded options, if available or all options.
- *
- * @since 2.2.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @return array List of all options.
- */
-function wp_load_alloptions() {
-	global $wpdb;
-
-	if ( ! wp_installing() || ! is_multisite() )
-		$alloptions = wp_cache_get( 'alloptions', 'options' );
-	else
-		$alloptions = false;
-
-	if ( !$alloptions ) {
-		$suppress = $wpdb->suppress_errors();
-		if ( !$alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE autoload = 'yes'" ) )
-			$alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options" );
-		$wpdb->suppress_errors($suppress);
-		$alloptions = array();
-		foreach ( (array) $alloptions_db as $o ) {
-			$alloptions[$o->option_name] = $o->option_value;
-		}
-		if ( ! wp_installing() || ! is_multisite() )
-			wp_cache_add( 'alloptions', $alloptions, 'options' );
-	}
-
-	return $alloptions;
-}
-
-/**
- * Loads and caches certain often requested site options if is_multisite() and a persistent cache is not being used.
- *
- * @since 3.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param int $site_id Optional site ID for which to query the options. Defaults to the current site.
- */
-function wp_load_core_site_options( $site_id = null ) {
-	global $wpdb;
-
-	if ( ! is_multisite() || wp_using_ext_object_cache() || wp_installing() )
-		return;
-
-	if ( empty($site_id) )
-		$site_id = $wpdb->siteid;
-
-	$core_options = array('site_name', 'siteurl', 'active_sitewide_plugins', '_site_transient_timeout_theme_roots', '_site_transient_theme_roots', 'site_admins', 'can_compress_scripts', 'global_terms_enabled', 'ms_files_rewriting' );
-
-	$core_options_in = "'" . implode("', '", $core_options) . "'";
-	$options = $wpdb->get_results( $wpdb->prepare("SELECT meta_key, meta_value FROM $wpdb->sitemeta WHERE meta_key IN ($core_options_in) AND site_id = %d", $site_id) );
-
-	foreach ( $options as $option ) {
-		$key = $option->meta_key;
-		$cache_key = "{$site_id}:$key";
-		$option->meta_value = maybe_unserialize( $option->meta_value );
-
-		wp_cache_set( $cache_key, $option->meta_value, 'site-options' );
-	}
-}
-
-/**
- * Update the value of an option that was already added.
- *
- * You do not need to serialize values. If the value needs to be serialized, then
- * it will be serialized before it is inserted into the database. Remember,
- * resources can not be serialized or added as an option.
- *
- * If the option does not exist, then the option will be added with the option value,
- * with an `$autoload` value of 'yes'.
- *
- * @since 1.0.0
- * @since 4.2.0 The `$autoload` parameter was added.
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string      $option   Option name. Expected to not be SQL-escaped.
- * @param mixed       $value    Option value. Must be serializable if non-scalar. Expected to not be SQL-escaped.
- * @param string|bool $autoload Optional. Whether to load the option when WordPress starts up. For existing options,
- *                              `$autoload` can only be updated using `update_option()` if `$value` is also changed.
- *                              Accepts 'yes'|true to enable or 'no'|false to disable. For non-existent options,
- *                              the default value is 'yes'. Default null.
- * @return bool False if value was not updated and true if value was updated.
- */
-function update_option( $option, $value, $autoload = null ) {
-	global $wpdb;
-
-	$option = trim($option);
-	if ( empty($option) )
-		return false;
-
-	wp_protect_special_option( $option );
-
-	if ( is_object( $value ) )
-		$value = clone $value;
-
-	$value = sanitize_option( $option, $value );
-	$old_value = get_option( $option );
-
-	/**
-	 * Filters a specific option before its value is (maybe) serialized and updated.
-	 *
-	 * The dynamic portion of the hook name, `$option`, refers to the option name.
-	 *
-	 * @since 2.6.0
-	 * @since 4.4.0 The `$option` parameter was added.
-	 *
-	 * @param mixed  $value     The new, unserialized option value.
-	 * @param mixed  $old_value The old option value.
-	 * @param string $option    Option name.
-	 */
-	$value = apply_filters( "pre_update_option_{$option}", $value, $old_value, $option );
-
-	/**
-	 * Filters an option before its value is (maybe) serialized and updated.
-	 *
-	 * @since 3.9.0
-	 *
-	 * @param mixed  $value     The new, unserialized option value.
-	 * @param string $option    Name of the option.
-	 * @param mixed  $old_value The old option value.
-	 */
-	$value = apply_filters( 'pre_update_option', $value, $option, $old_value );
-
-	// If the new and old values are the same, no need to update.
-	if ( $value === $old_value )
-		return false;
-
-	/** This filter is documented in wp-includes/option.php */
-	if ( apply_filters( 'default_option_' . $option, false, $option ) === $old_value ) {
-		// Default setting for new options is 'yes'.
-		if ( null === $autoload ) {
-			$autoload = 'yes';
-		}
-
-		return add_option( $option, $value, '', $autoload );
-	}
-
-	$serialized_value = maybe_serialize( $value );
-
-	/**
-	 * Fires immediately before an option value is updated.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param string $option    Name of the option to update.
-	 * @param mixed  $old_value The old option value.
-	 * @param mixed  $value     The new option value.
-	 */
-	do_action( 'update_option', $option, $old_value, $value );
-
-	$update_args = array(
-		'option_value' => $serialized_value,
-	);
-
-	if ( null !== $autoload ) {
-		$update_args['autoload'] = ( 'no' === $autoload || false === $autoload ) ? 'no' : 'yes';
-	}
-
-	$result = $wpdb->update( $wpdb->options, $update_args, array( 'option_name' => $option ) );
-	if ( ! $result )
-		return false;
-
-	$notoptions = wp_cache_get( 'notoptions', 'options' );
-	if ( is_array( $notoptions ) && isset( $notoptions[$option] ) ) {
-		unset( $notoptions[$option] );
-		wp_cache_set( 'notoptions', $notoptions, 'options' );
-	}
-
-	if ( ! wp_installing() ) {
-		$alloptions = wp_load_alloptions();
-		if ( isset( $alloptions[$option] ) ) {
-			$alloptions[ $option ] = $serialized_value;
-			wp_cache_set( 'alloptions', $alloptions, 'options' );
-		} else {
-			wp_cache_set( $option, $serialized_value, 'options' );
-		}
-	}
-
-	/**
-	 * Fires after the value of a specific option has been successfully updated.
-	 *
-	 * The dynamic portion of the hook name, `$option`, refers to the option name.
-	 *
-	 * @since 2.0.1
-	 * @since 4.4.0 The `$option` parameter was added.
-	 *
-	 * @param mixed  $old_value The old option value.
-	 * @param mixed  $value     The new option value.
-	 * @param string $option    Option name.
-	 */
-	do_action( "update_option_{$option}", $old_value, $value, $option );
-
-	/**
-	 * Fires after the value of an option has been successfully updated.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param string $option    Name of the updated option.
-	 * @param mixed  $old_value The old option value.
-	 * @param mixed  $value     The new option value.
-	 */
-	do_action( 'updated_option', $option, $old_value, $value );
-	return true;
-}
-
-/**
- * Add a new option.
- *
- * You do not need to serialize values. If the value needs to be serialized, then
- * it will be serialized before it is inserted into the database. Remember,
- * resources can not be serialized or added as an option.
- *
- * You can create options without values and then update the values later.
- * Existing options will not be updated and checks are performed to ensure that you
- * aren't adding a protected WordPress option. Care should be taken to not name
- * options the same as the ones which are protected.
- *
- * @since 1.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string         $option      Name of option to add. Expected to not be SQL-escaped.
- * @param mixed          $value       Optional. Option value. Must be serializable if non-scalar. Expected to not be SQL-escaped.
- * @param string         $deprecated  Optional. Description. Not used anymore.
- * @param string|bool    $autoload    Optional. Whether to load the option when WordPress starts up.
- *                                    Default is enabled. Accepts 'no' to disable for legacy reasons.
- * @return bool False if option was not added and true if option was added.
- */
-function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' ) {
-	global $wpdb;
-
-	if ( !empty( $deprecated ) )
-		_deprecated_argument( __FUNCTION__, '2.3.0' );
-
-	$option = trim($option);
-	if ( empty($option) )
-		return false;
-
-	wp_protect_special_option( $option );
-
-	if ( is_object($value) )
-		$value = clone $value;
-
-	$value = sanitize_option( $option, $value );
-
-	// Make sure the option doesn't already exist. We can check the 'notoptions' cache before we ask for a db query
-	$notoptions = wp_cache_get( 'notoptions', 'options' );
-	if ( !is_array( $notoptions ) || !isset( $notoptions[$option] ) )
-		/** This filter is documented in wp-includes/option.php */
-		if ( apply_filters( 'default_option_' . $option, false, $option ) !== get_option( $option ) )
-			return false;
-
-	$serialized_value = maybe_serialize( $value );
-	$autoload = ( 'no' === $autoload || false === $autoload ) ? 'no' : 'yes';
-
-	/**
-	 * Fires before an option is added.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param string $option Name of the option to add.
-	 * @param mixed  $value  Value of the option.
-	 */
-	do_action( 'add_option', $option, $value );
-
-	$result = $wpdb->query( $wpdb->prepare( "INSERT INTO `$wpdb->options` (`option_name`, `option_value`, `autoload`) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`)", $option, $serialized_value, $autoload ) );
-	if ( ! $result )
-		return false;
-
-	if ( ! wp_installing() ) {
-		if ( 'yes' == $autoload ) {
-			$alloptions = wp_load_alloptions();
-			$alloptions[ $option ] = $serialized_value;
-			wp_cache_set( 'alloptions', $alloptions, 'options' );
-		} else {
-			wp_cache_set( $option, $serialized_value, 'options' );
-		}
-	}
-
-	// This option exists now
-	$notoptions = wp_cache_get( 'notoptions', 'options' ); // yes, again... we need it to be fresh
-	if ( is_array( $notoptions ) && isset( $notoptions[$option] ) ) {
-		unset( $notoptions[$option] );
-		wp_cache_set( 'notoptions', $notoptions, 'options' );
-	}
-
-	/**
-	 * Fires after a specific option has been added.
-	 *
-	 * The dynamic portion of the hook name, `$option`, refers to the option name.
-	 *
-	 * @since 2.5.0 As "add_option_{$name}"
-	 * @since 3.0.0
-	 *
-	 * @param string $option Name of the option to add.
-	 * @param mixed  $value  Value of the option.
-	 */
-	do_action( "add_option_{$option}", $option, $value );
-
-	/**
-	 * Fires after an option has been added.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param string $option Name of the added option.
-	 * @param mixed  $value  Value of the option.
-	 */
-	do_action( 'added_option', $option, $value );
-	return true;
-}
-
-/**
- * Removes option by name. Prevents removal of protected WordPress options.
- *
- * @since 1.2.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $option Name of option to remove. Expected to not be SQL-escaped.
- * @return bool True, if option is successfully deleted. False on failure.
- */
-function delete_option( $option ) {
-	global $wpdb;
-
-	$option = trim( $option );
-	if ( empty( $option ) )
-		return false;
-
-	wp_protect_special_option( $option );
-
-	// Get the ID, if no ID then return
-	$row = $wpdb->get_row( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) );
-	if ( is_null( $row ) )
-		return false;
-
-	/**
-	 * Fires immediately before an option is deleted.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param string $option Name of the option to delete.
-	 */
-	do_action( 'delete_option', $option );
-
-	$result = $wpdb->delete( $wpdb->options, array( 'option_name' => $option ) );
-	if ( ! wp_installing() ) {
-		if ( 'yes' == $row->autoload ) {
-			$alloptions = wp_load_alloptions();
-			if ( is_array( $alloptions ) && isset( $alloptions[$option] ) ) {
-				unset( $alloptions[$option] );
-				wp_cache_set( 'alloptions', $alloptions, 'options' );
-			}
-		} else {
-			wp_cache_delete( $option, 'options' );
-		}
-	}
-	if ( $result ) {
-
-		/**
-		 * Fires after a specific option has been deleted.
-		 *
-		 * The dynamic portion of the hook name, `$option`, refers to the option name.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param string $option Name of the deleted option.
-		 */
-		do_action( "delete_option_{$option}", $option );
-
-		/**
-		 * Fires after an option has been deleted.
-		 *
-		 * @since 2.9.0
-		 *
-		 * @param string $option Name of the deleted option.
-		 */
-		do_action( 'deleted_option', $option );
-		return true;
-	}
-	return false;
-}
-
-/**
- * Delete a transient.
- *
- * @since 2.8.0
- *
- * @param string $transient Transient name. Expected to not be SQL-escaped.
- * @return bool true if successful, false otherwise
- */
-function delete_transient( $transient ) {
-
-	/**
-	 * Fires immediately before a specific transient is deleted.
-	 *
-	 * The dynamic portion of the hook name, `$transient`, refers to the transient name.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $transient Transient name.
-	 */
-	do_action( "delete_transient_{$transient}", $transient );
-
-	if ( wp_using_ext_object_cache() ) {
-		$result = wp_cache_delete( $transient, 'transient' );
-	} else {
-		$option_timeout = '_transient_timeout_' . $transient;
-		$option = '_transient_' . $transient;
-		$result = delete_option( $option );
-		if ( $result )
-			delete_option( $option_timeout );
-	}
-
-	if ( $result ) {
-
-		/**
-		 * Fires after a transient is deleted.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param string $transient Deleted transient name.
-		 */
-		do_action( 'deleted_transient', $transient );
-	}
-
-	return $result;
-}
-
-/**
- * Get the value of a transient.
- *
- * If the transient does not exist, does not have a value, or has expired,
- * then the return value will be false.
- *
- * @since 2.8.0
- *
- * @param string $transient Transient name. Expected to not be SQL-escaped.
- * @return mixed Value of transient.
- */
-function get_transient( $transient ) {
-
-	/**
-	 * Filters the value of an existing transient.
-	 *
-	 * The dynamic portion of the hook name, `$transient`, refers to the transient name.
-	 *
-	 * Passing a truthy value to the filter will effectively short-circuit retrieval
-	 * of the transient, returning the passed value instead.
-	 *
-	 * @since 2.8.0
-	 * @since 4.4.0 The `$transient` parameter was added
-	 *
-	 * @param mixed  $pre_transient The default value to return if the transient does not exist.
-	 *                              Any value other than false will short-circuit the retrieval
-	 *                              of the transient, and return the returned value.
-	 * @param string $transient     Transient name.
-	 */
-	$pre = apply_filters( "pre_transient_{$transient}", false, $transient );
-	if ( false !== $pre )
-		return $pre;
-
-	if ( wp_using_ext_object_cache() ) {
-		$value = wp_cache_get( $transient, 'transient' );
-	} else {
-		$transient_option = '_transient_' . $transient;
-		if ( ! wp_installing() ) {
-			// If option is not in alloptions, it is not autoloaded and thus has a timeout
-			$alloptions = wp_load_alloptions();
-			if ( !isset( $alloptions[$transient_option] ) ) {
-				$transient_timeout = '_transient_timeout_' . $transient;
-				$timeout = get_option( $transient_timeout );
-				if ( false !== $timeout && $timeout < time() ) {
-					delete_option( $transient_option  );
-					delete_option( $transient_timeout );
-					$value = false;
-				}
-			}
-		}
-
-		if ( ! isset( $value ) )
-			$value = get_option( $transient_option );
-	}
-
-	/**
-	 * Filters an existing transient's value.
-	 *
-	 * The dynamic portion of the hook name, `$transient`, refers to the transient name.
-	 *
-	 * @since 2.8.0
-	 * @since 4.4.0 The `$transient` parameter was added
-	 *
-	 * @param mixed  $value     Value of transient.
-	 * @param string $transient Transient name.
-	 */
-	return apply_filters( "transient_{$transient}", $value, $transient );
-}
-
-/**
- * Set/update the value of a transient.
- *
- * You do not need to serialize values. If the value needs to be serialized, then
- * it will be serialized before it is set.
- *
- * @since 2.8.0
- *
- * @param string $transient  Transient name. Expected to not be SQL-escaped. Must be
- *                           172 characters or fewer in length.
- * @param mixed  $value      Transient value. Must be serializable if non-scalar.
- *                           Expected to not be SQL-escaped.
- * @param int    $expiration Optional. Time until expiration in seconds. Default 0 (no expiration).
- * @return bool False if value was not set and true if value was set.
- */
-function set_transient( $transient, $value, $expiration = 0 ) {
-
-	$expiration = (int) $expiration;
-
-	/**
-	 * Filters a specific transient before its value is set.
-	 *
-	 * The dynamic portion of the hook name, `$transient`, refers to the transient name.
-	 *
-	 * @since 3.0.0
-	 * @since 4.2.0 The `$expiration` parameter was added.
-	 * @since 4.4.0 The `$transient` parameter was added.
-	 *
-	 * @param mixed  $value      New value of transient.
-	 * @param int    $expiration Time until expiration in seconds.
-	 * @param string $transient  Transient name.
-	 */
-	$value = apply_filters( "pre_set_transient_{$transient}", $value, $expiration, $transient );
-
-	/**
-	 * Filters the expiration for a transient before its value is set.
-	 *
-	 * The dynamic portion of the hook name, `$transient`, refers to the transient name.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param int    $expiration Time until expiration in seconds. Use 0 for no expiration.
-	 * @param mixed  $value      New value of transient.
-	 * @param string $transient  Transient name.
-	 */
-	$expiration = apply_filters( "expiration_of_transient_{$transient}", $expiration, $value, $transient );
-
-	if ( wp_using_ext_object_cache() ) {
-		$result = wp_cache_set( $transient, $value, 'transient', $expiration );
-	} else {
-		$transient_timeout = '_transient_timeout_' . $transient;
-		$transient_option = '_transient_' . $transient;
-		if ( false === get_option( $transient_option ) ) {
-			$autoload = 'yes';
-			if ( $expiration ) {
-				$autoload = 'no';
-				add_option( $transient_timeout, time() + $expiration, '', 'no' );
-			}
-			$result = add_option( $transient_option, $value, '', $autoload );
-		} else {
-			// If expiration is requested, but the transient has no timeout option,
-			// delete, then re-create transient rather than update.
-			$update = true;
-			if ( $expiration ) {
-				if ( false === get_option( $transient_timeout ) ) {
-					delete_option( $transient_option );
-					add_option( $transient_timeout, time() + $expiration, '', 'no' );
-					$result = add_option( $transient_option, $value, '', 'no' );
-					$update = false;
-				} else {
-					update_option( $transient_timeout, time() + $expiration );
-				}
-			}
-			if ( $update ) {
-				$result = update_option( $transient_option, $value );
-			}
-		}
-	}
-
-	if ( $result ) {
-
-		/**
-		 * Fires after the value for a specific transient has been set.
-		 *
-		 * The dynamic portion of the hook name, `$transient`, refers to the transient name.
-		 *
-		 * @since 3.0.0
-		 * @since 3.6.0 The `$value` and `$expiration` parameters were added.
-		 * @since 4.4.0 The `$transient` parameter was added.
-		 *
-		 * @param mixed  $value      Transient value.
-		 * @param int    $expiration Time until expiration in seconds.
-		 * @param string $transient  The name of the transient.
-		 */
-		do_action( "set_transient_{$transient}", $value, $expiration, $transient );
-
-		/**
-		 * Fires after the value for a transient has been set.
-		 *
-		 * @since 3.0.0
-		 * @since 3.6.0 The `$value` and `$expiration` parameters were added.
-		 *
-		 * @param string $transient  The name of the transient.
-		 * @param mixed  $value      Transient value.
-		 * @param int    $expiration Time until expiration in seconds.
-		 */
-		do_action( 'setted_transient', $transient, $value, $expiration );
-	}
-	return $result;
-}
-
-/**
- * Saves and restores user interface settings stored in a cookie.
- *
- * Checks if the current user-settings cookie is updated and stores it. When no
- * cookie exists (different browser used), adds the last saved cookie restoring
- * the settings.
- *
- * @since 2.7.0
- */
-function wp_user_settings() {
-
-	if ( ! is_admin() || wp_doing_ajax() ) {
-		return;
-	}
-
-	if ( ! $user_id = get_current_user_id() ) {
-		return;
-	}
-
-	if ( is_super_admin() && ! is_user_member_of_blog() ) {
-		return;
-	}
-
-	$settings = (string) get_user_option( 'user-settings', $user_id );
-
-	if ( isset( $_COOKIE['wp-settings-' . $user_id] ) ) {
-		$cookie = preg_replace( '/[^A-Za-z0-9=&_]/', '', $_COOKIE['wp-settings-' . $user_id] );
-
-		// No change or both empty
-		if ( $cookie == $settings )
-			return;
-
-		$last_saved = (int) get_user_option( 'user-settings-time', $user_id );
-		$current = isset( $_COOKIE['wp-settings-time-' . $user_id]) ? preg_replace( '/[^0-9]/', '', $_COOKIE['wp-settings-time-' . $user_id] ) : 0;
-
-		// The cookie is newer than the saved value. Update the user_option and leave the cookie as-is
-		if ( $current > $last_saved ) {
-			update_user_option( $user_id, 'user-settings', $cookie, false );
-			update_user_option( $user_id, 'user-settings-time', time() - 5, false );
-			return;
-		}
-	}
-
-	// The cookie is not set in the current browser or the saved value is newer.
-	$secure = ( 'https' === parse_url( admin_url(), PHP_URL_SCHEME ) );
-	setcookie( 'wp-settings-' . $user_id, $settings, time() + YEAR_IN_SECONDS, SITECOOKIEPATH, null, $secure );
-	setcookie( 'wp-settings-time-' . $user_id, time(), time() + YEAR_IN_SECONDS, SITECOOKIEPATH, null, $secure );
-	$_COOKIE['wp-settings-' . $user_id] = $settings;
-}
-
-/**
- * Retrieve user interface setting value based on setting name.
- *
- * @since 2.7.0
- *
- * @param string $name    The name of the setting.
- * @param string $default Optional default value to return when $name is not set.
- * @return mixed the last saved user setting or the default value/false if it doesn't exist.
- */
-function get_user_setting( $name, $default = false ) {
-	$all_user_settings = get_all_user_settings();
-
-	return isset( $all_user_settings[$name] ) ? $all_user_settings[$name] : $default;
-}
-
-/**
- * Add or update user interface setting.
- *
- * Both $name and $value can contain only ASCII letters, numbers and underscores.
- *
- * This function has to be used before any output has started as it calls setcookie().
- *
- * @since 2.8.0
- *
- * @param string $name  The name of the setting.
- * @param string $value The value for the setting.
- * @return bool|null True if set successfully, false if not. Null if the current user can't be established.
- */
-function set_user_setting( $name, $value ) {
-	if ( headers_sent() ) {
-		return false;
-	}
-
-	$all_user_settings = get_all_user_settings();
-	$all_user_settings[$name] = $value;
-
-	return wp_set_all_user_settings( $all_user_settings );
-}
-
-/**
- * Delete user interface settings.
- *
- * Deleting settings would reset them to the defaults.
- *
- * This function has to be used before any output has started as it calls setcookie().
- *
- * @since 2.7.0
- *
- * @param string $names The name or array of names of the setting to be deleted.
- * @return bool|null True if deleted successfully, false if not. Null if the current user can't be established.
- */
-function delete_user_setting( $names ) {
-	if ( headers_sent() ) {
-		return false;
-	}
-
-	$all_user_settings = get_all_user_settings();
-	$names = (array) $names;
-	$deleted = false;
-
-	foreach ( $names as $name ) {
-		if ( isset( $all_user_settings[$name] ) ) {
-			unset( $all_user_settings[$name] );
-			$deleted = true;
-		}
-	}
-
-	if ( $deleted ) {
-		return wp_set_all_user_settings( $all_user_settings );
-	}
-
-	return false;
-}
-
-/**
- * Retrieve all user interface settings.
- *
- * @since 2.7.0
- *
- * @global array $_updated_user_settings
- *
- * @return array the last saved user settings or empty array.
- */
-function get_all_user_settings() {
-	global $_updated_user_settings;
-
-	if ( ! $user_id = get_current_user_id() ) {
-		return array();
-	}
-
-	if ( isset( $_updated_user_settings ) && is_array( $_updated_user_settings ) ) {
-		return $_updated_user_settings;
-	}
-
-	$user_settings = array();
-
-	if ( isset( $_COOKIE['wp-settings-' . $user_id] ) ) {
-		$cookie = preg_replace( '/[^A-Za-z0-9=&_-]/', '', $_COOKIE['wp-settings-' . $user_id] );
-
-		if ( strpos( $cookie, '=' ) ) { // '=' cannot be 1st char
-			parse_str( $cookie, $user_settings );
-		}
-	} else {
-		$option = get_user_option( 'user-settings', $user_id );
-
-		if ( $option && is_string( $option ) ) {
-			parse_str( $option, $user_settings );
-		}
-	}
-
-	$_updated_user_settings = $user_settings;
-	return $user_settings;
-}
-
-/**
- * Private. Set all user interface settings.
- *
- * @since 2.8.0
- * @access private
- *
- * @global array $_updated_user_settings
- *
- * @param array $user_settings User settings.
- * @return bool|null False if the current user can't be found, null if the current
- *                   user is not a super admin or a member of the site, otherwise true.
- */
-function wp_set_all_user_settings( $user_settings ) {
-	global $_updated_user_settings;
-
-	if ( ! $user_id = get_current_user_id() ) {
-		return false;
-	}
-
-	if ( is_super_admin() && ! is_user_member_of_blog() ) {
-		return;
-	}
-
-	$settings = '';
-	foreach ( $user_settings as $name => $value ) {
-		$_name = preg_replace( '/[^A-Za-z0-9_-]+/', '', $name );
-		$_value = preg_replace( '/[^A-Za-z0-9_-]+/', '', $value );
-
-		if ( ! empty( $_name ) ) {
-			$settings .= $_name . '=' . $_value . '&';
-		}
-	}
-
-	$settings = rtrim( $settings, '&' );
-	parse_str( $settings, $_updated_user_settings );
-
-	update_user_option( $user_id, 'user-settings', $settings, false );
-	update_user_option( $user_id, 'user-settings-time', time(), false );
-
-	return true;
-}
-
-/**
- * Delete the user settings of the current user.
- *
- * @since 2.7.0
- */
-function delete_all_user_settings() {
-	if ( ! $user_id = get_current_user_id() ) {
-		return;
-	}
-
-	update_user_option( $user_id, 'user-settings', '', false );
-	setcookie( 'wp-settings-' . $user_id, ' ', time() - YEAR_IN_SECONDS, SITECOOKIEPATH );
-}
-
-/**
- * Retrieve an option value for the current network based on name of option.
- *
- * @since 2.8.0
- * @since 4.4.0 The `$use_cache` parameter was deprecated.
- * @since 4.4.0 Modified into wrapper for get_network_option()
- *
- * @see get_network_option()
- *
- * @param string $option     Name of option to retrieve. Expected to not be SQL-escaped.
- * @param mixed  $default    Optional value to return if option doesn't exist. Default false.
- * @param bool   $deprecated Whether to use cache. Multisite only. Always set to true.
- * @return mixed Value set for the option.
- */
-function get_site_option( $option, $default = false, $deprecated = true ) {
-	return get_network_option( null, $option, $default );
-}
-
-/**
- * Add a new option for the current network.
- *
- * Existing options will not be updated. Note that prior to 3.3 this wasn't the case.
- *
- * @since 2.8.0
- * @since 4.4.0 Modified into wrapper for add_network_option()
- *
- * @see add_network_option()
- *
- * @param string $option Name of option to add. Expected to not be SQL-escaped.
- * @param mixed  $value  Option value, can be anything. Expected to not be SQL-escaped.
- * @return bool False if the option was not added. True if the option was added.
- */
-function add_site_option( $option, $value ) {
-	return add_network_option( null, $option, $value );
-}
-
-/**
- * Removes a option by name for the current network.
- *
- * @since 2.8.0
- * @since 4.4.0 Modified into wrapper for delete_network_option()
- *
- * @see delete_network_option()
- *
- * @param string $option Name of option to remove. Expected to not be SQL-escaped.
- * @return bool True, if succeed. False, if failure.
- */
-function delete_site_option( $option ) {
-	return delete_network_option( null, $option );
-}
-
-/**
- * Update the value of an option that was already added for the current network.
- *
- * @since 2.8.0
- * @since 4.4.0 Modified into wrapper for update_network_option()
- *
- * @see update_network_option()
- *
- * @param string $option Name of option. Expected to not be SQL-escaped.
- * @param mixed  $value  Option value. Expected to not be SQL-escaped.
- * @return bool False if value was not updated. True if value was updated.
- */
-function update_site_option( $option, $value ) {
-	return update_network_option( null, $option, $value );
-}
-
-/**
- * Retrieve a network's option value based on the option name.
- *
- * @since 4.4.0
- *
- * @see get_option()
- *
- * @global wpdb   $wpdb
- *
- * @param int      $network_id ID of the network. Can be null to default to the current network ID.
- * @param string   $option     Name of option to retrieve. Expected to not be SQL-escaped.
- * @param mixed    $default    Optional. Value to return if the option doesn't exist. Default false.
- * @return mixed Value set for the option.
- */
-function get_network_option( $network_id, $option, $default = false ) {
-	global $wpdb;
-
-	if ( $network_id && ! is_numeric( $network_id ) ) {
-		return false;
-	}
-
-	$network_id = (int) $network_id;
-
-	// Fallback to the current network if a network ID is not specified.
-	if ( ! $network_id && is_multisite() ) {
-		$network_id = get_current_site()->id;
-	}
-
-	/**
-	 * Filters an existing network option before it is retrieved.
-	 *
-	 * The dynamic portion of the hook name, `$option`, refers to the option name.
-	 *
-	 * Passing a truthy value to the filter will effectively short-circuit retrieval,
-	 * returning the passed value instead.
-	 *
-	 * @since 2.9.0 As 'pre_site_option_' . $key
-	 * @since 3.0.0
-	 * @since 4.4.0 The `$option` parameter was added
-	 *
-	 * @param mixed  $pre_option The default value to return if the option does not exist.
-	 * @param string $option     Option name.
-	 */
-	$pre = apply_filters( "pre_site_option_{$option}", false, $option );
-
-	if ( false !== $pre ) {
-		return $pre;
-	}
-
-	// prevent non-existent options from triggering multiple queries
-	$notoptions_key = "$network_id:notoptions";
-	$notoptions = wp_cache_get( $notoptions_key, 'site-options' );
-
-	if ( isset( $notoptions[ $option ] ) ) {
-
-		/**
-		 * Filters a specific default network option.
-		 *
-		 * The dynamic portion of the hook name, `$option`, refers to the option name.
-		 *
-		 * @since 3.4.0
-		 * @since 4.4.0 The `$option` parameter was added.
-		 *
-		 * @param mixed  $default The value to return if the site option does not exist
-		 *                        in the database.
-		 * @param string $option  Option name.
-		 */
-		return apply_filters( "default_site_option_{$option}", $default, $option );
-	}
-
-	if ( ! is_multisite() ) {
-		/** This filter is documented in wp-includes/option.php */
-		$default = apply_filters( 'default_site_option_' . $option, $default, $option );
-		$value = get_option( $option, $default );
-	} else {
-		$cache_key = "$network_id:$option";
-		$value = wp_cache_get( $cache_key, 'site-options' );
-
-		if ( ! isset( $value ) || false === $value ) {
-			$row = $wpdb->get_row( $wpdb->prepare( "SELECT meta_value FROM $wpdb->sitemeta WHERE meta_key = %s AND site_id = %d", $option, $network_id ) );
-
-			// Has to be get_row instead of get_var because of funkiness with 0, false, null values
-			if ( is_object( $row ) ) {
-				$value = $row->meta_value;
-				$value = maybe_unserialize( $value );
-				wp_cache_set( $cache_key, $value, 'site-options' );
-			} else {
-				if ( ! is_array( $notoptions ) ) {
-					$notoptions = array();
-				}
-				$notoptions[ $option ] = true;
-				wp_cache_set( $notoptions_key, $notoptions, 'site-options' );
-
-				/** This filter is documented in wp-includes/option.php */
-				$value = apply_filters( 'default_site_option_' . $option, $default, $option );
-			}
-		}
-	}
-
-	/**
-	 * Filters the value of an existing network option.
-	 *
-	 * The dynamic portion of the hook name, `$option`, refers to the option name.
-	 *
-	 * @since 2.9.0 As 'site_option_' . $key
-	 * @since 3.0.0
-	 * @since 4.4.0 The `$option` parameter was added
-	 *
-	 * @param mixed  $value  Value of network option.
-	 * @param string $option Option name.
-	 */
-	return apply_filters( "site_option_{$option}", $value, $option );
-}
-
-/**
- * Add a new network option.
- *
- * Existing options will not be updated.
- *
- * @since 4.4.0
- *
- * @see add_option()
- *
- * @global wpdb   $wpdb
- *
- * @param int    $network_id ID of the network. Can be null to default to the current network ID.
- * @param string $option     Name of option to add. Expected to not be SQL-escaped.
- * @param mixed  $value      Option value, can be anything. Expected to not be SQL-escaped.
- * @return bool False if option was not added and true if option was added.
- */
-function add_network_option( $network_id, $option, $value ) {
-	global $wpdb;
-
-	if ( $network_id && ! is_numeric( $network_id ) ) {
-		return false;
-	}
-
-	$network_id = (int) $network_id;
-
-	// Fallback to the current network if a network ID is not specified.
-	if ( ! $network_id && is_multisite() ) {
-		$network_id = get_current_site()->id;
-	}
-
-	wp_protect_special_option( $option );
-
-	/**
-	 * Filters the value of a specific network option before it is added.
-	 *
-	 * The dynamic portion of the hook name, `$option`, refers to the option name.
-	 *
-	 * @since 2.9.0 As 'pre_add_site_option_' . $key
-	 * @since 3.0.0
-	 * @since 4.4.0 The `$option` parameter was added
-	 *
-	 * @param mixed  $value  Value of network option.
-	 * @param string $option Option name.
-	 */
-	$value = apply_filters( "pre_add_site_option_{$option}", $value, $option );
-
-	$notoptions_key = "$network_id:notoptions";
-
-	if ( ! is_multisite() ) {
-		$result = add_option( $option, $value, '', 'no' );
-	} else {
-		$cache_key = "$network_id:$option";
-
-		// Make sure the option doesn't already exist. We can check the 'notoptions' cache before we ask for a db query
-		$notoptions = wp_cache_get( $notoptions_key, 'site-options' );
-		if ( ! is_array( $notoptions ) || ! isset( $notoptions[ $option ] ) ) {
-			if ( false !== get_network_option( $network_id, $option, false ) ) {
-				return false;
-			}
-		}
-
-		$value = sanitize_option( $option, $value );
-
-		$serialized_value = maybe_serialize( $value );
-		$result = $wpdb->insert( $wpdb->sitemeta, array( 'site_id'    => $network_id, 'meta_key'   => $option, 'meta_value' => $serialized_value ) );
-
-		if ( ! $result ) {
-			return false;
-		}
-
-		wp_cache_set( $cache_key, $value, 'site-options' );
-
-		// This option exists now
-		$notoptions = wp_cache_get( $notoptions_key, 'site-options' ); // yes, again... we need it to be fresh
-		if ( is_array( $notoptions ) && isset( $notoptions[ $option ] ) ) {
-			unset( $notoptions[ $option ] );
-			wp_cache_set( $notoptions_key, $notoptions, 'site-options' );
-		}
-	}
-
-	if ( $result ) {
-
-		/**
-		 * Fires after a specific network option has been successfully added.
-		 *
-		 * The dynamic portion of the hook name, `$option`, refers to the option name.
-		 *
-		 * @since 2.9.0 As "add_site_option_{$key}"
-		 * @since 3.0.0
-		 *
-		 * @param string $option Name of the network option.
-		 * @param mixed  $value  Value of the network option.
-		 */
-		do_action( "add_site_option_{$option}", $option, $value );
-
-		/**
-		 * Fires after a network option has been successfully added.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param string $option Name of the network option.
-		 * @param mixed  $value  Value of the network option.
-		 */
-		do_action( 'add_site_option', $option, $value );
-
-		return true;
-	}
-
-	return false;
-}
-
-/**
- * Removes a network option by name.
- *
- * @since 4.4.0
- *
- * @see delete_option()
- *
- * @global wpdb   $wpdb
- *
- * @param int    $network_id ID of the network. Can be null to default to the current network ID.
- * @param string $option     Name of option to remove. Expected to not be SQL-escaped.
- * @return bool True, if succeed. False, if failure.
- */
-function delete_network_option( $network_id, $option ) {
-	global $wpdb;
-
-	if ( $network_id && ! is_numeric( $network_id ) ) {
-		return false;
-	}
-
-	$network_id = (int) $network_id;
-
-	// Fallback to the current network if a network ID is not specified.
-	if ( ! $network_id && is_multisite() ) {
-		$network_id = get_current_site()->id;
-	}
-
-	/**
-	 * Fires immediately before a specific network option is deleted.
-	 *
-	 * The dynamic portion of the hook name, `$option`, refers to the option name.
-	 *
-	 * @since 3.0.0
-	 * @since 4.4.0 The `$option` parameter was added
-	 *
-	 * @param string $option Option name.
-	 */
-	do_action( "pre_delete_site_option_{$option}", $option );
-
-	if ( ! is_multisite() ) {
-		$result = delete_option( $option );
-	} else {
-		$row = $wpdb->get_row( $wpdb->prepare( "SELECT meta_id FROM {$wpdb->sitemeta} WHERE meta_key = %s AND site_id = %d", $option, $network_id ) );
-		if ( is_null( $row ) || ! $row->meta_id ) {
-			return false;
-		}
-		$cache_key = "$network_id:$option";
-		wp_cache_delete( $cache_key, 'site-options' );
-
-		$result = $wpdb->delete( $wpdb->sitemeta, array( 'meta_key' => $option, 'site_id' => $network_id ) );
-	}
-
-	if ( $result ) {
-
-		/**
-		 * Fires after a specific network option has been deleted.
-		 *
-		 * The dynamic portion of the hook name, `$option`, refers to the option name.
-		 *
-		 * @since 2.9.0 As "delete_site_option_{$key}"
-		 * @since 3.0.0
-		 *
-		 * @param string $option Name of the network option.
-		 */
-		do_action( "delete_site_option_{$option}", $option );
-
-		/**
-		 * Fires after a network option has been deleted.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param string $option Name of the network option.
-		 */
-		do_action( 'delete_site_option', $option );
-
-		return true;
-	}
-
-	return false;
-}
-
-/**
- * Update the value of a network option that was already added.
- *
- * @since 4.4.0
- *
- * @see update_option()
- *
- * @global wpdb   $wpdb
- *
- * @param int      $network_id ID of the network. Can be null to default to the current network ID.
- * @param string   $option     Name of option. Expected to not be SQL-escaped.
- * @param mixed    $value      Option value. Expected to not be SQL-escaped.
- * @return bool False if value was not updated and true if value was updated.
- */
-function update_network_option( $network_id, $option, $value ) {
-	global $wpdb;
-
-	if ( $network_id && ! is_numeric( $network_id ) ) {
-		return false;
-	}
-
-	$network_id = (int) $network_id;
-
-	// Fallback to the current network if a network ID is not specified.
-	if ( ! $network_id && is_multisite() ) {
-		$network_id = get_current_site()->id;
-	}
-
-	wp_protect_special_option( $option );
-
-	$old_value = get_network_option( $network_id, $option, false );
-
-	/**
-	 * Filters a specific network option before its value is updated.
-	 *
-	 * The dynamic portion of the hook name, `$option`, refers to the option name.
-	 *
-	 * @since 2.9.0 As 'pre_update_site_option_' . $key
-	 * @since 3.0.0
-	 * @since 4.4.0 The `$option` parameter was added
-	 *
-	 * @param mixed  $value     New value of the network option.
-	 * @param mixed  $old_value Old value of the network option.
-	 * @param string $option    Option name.
-	 */
-	$value = apply_filters( "pre_update_site_option_{$option}", $value, $old_value, $option );
-
-	if ( $value === $old_value ) {
-		return false;
-	}
-
-	if ( false === $old_value ) {
-		return add_network_option( $network_id, $option, $value );
-	}
-
-	$notoptions_key = "$network_id:notoptions";
-	$notoptions = wp_cache_get( $notoptions_key, 'site-options' );
-	if ( is_array( $notoptions ) && isset( $notoptions[ $option ] ) ) {
-		unset( $notoptions[ $option ] );
-		wp_cache_set( $notoptions_key, $notoptions, 'site-options' );
-	}
-
-	if ( ! is_multisite() ) {
-		$result = update_option( $option, $value, 'no' );
-	} else {
-		$value = sanitize_option( $option, $value );
-
-		$serialized_value = maybe_serialize( $value );
-		$result = $wpdb->update( $wpdb->sitemeta, array( 'meta_value' => $serialized_value ), array( 'site_id' => $network_id, 'meta_key' => $option ) );
-
-		if ( $result ) {
-			$cache_key = "$network_id:$option";
-			wp_cache_set( $cache_key, $value, 'site-options' );
-		}
-	}
-
-	if ( $result ) {
-
-		/**
-		 * Fires after the value of a specific network option has been successfully updated.
-		 *
-		 * The dynamic portion of the hook name, `$option`, refers to the option name.
-		 *
-		 * @since 2.9.0 As "update_site_option_{$key}"
-		 * @since 3.0.0
-		 *
-		 * @param string $option    Name of the network option.
-		 * @param mixed  $value     Current value of the network option.
-		 * @param mixed  $old_value Old value of the network option.
-		 */
-		do_action( "update_site_option_{$option}", $option, $value, $old_value );
-
-		/**
-		 * Fires after the value of a network option has been successfully updated.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param string $option    Name of the network option.
-		 * @param mixed  $value     Current value of the network option.
-		 * @param mixed  $old_value Old value of the network option.
-		 */
-		do_action( 'update_site_option', $option, $value, $old_value );
-
-		return true;
-	}
-
-	return false;
-}
-
-/**
- * Delete a site transient.
- *
- * @since 2.9.0
- *
- * @param string $transient Transient name. Expected to not be SQL-escaped.
- * @return bool True if successful, false otherwise
- */
-function delete_site_transient( $transient ) {
-
-	/**
-	 * Fires immediately before a specific site transient is deleted.
-	 *
-	 * The dynamic portion of the hook name, `$transient`, refers to the transient name.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $transient Transient name.
-	 */
-	do_action( "delete_site_transient_{$transient}", $transient );
-
-	if ( wp_using_ext_object_cache() ) {
-		$result = wp_cache_delete( $transient, 'site-transient' );
-	} else {
-		$option_timeout = '_site_transient_timeout_' . $transient;
-		$option = '_site_transient_' . $transient;
-		$result = delete_site_option( $option );
-		if ( $result )
-			delete_site_option( $option_timeout );
-	}
-	if ( $result ) {
-
-		/**
-		 * Fires after a transient is deleted.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param string $transient Deleted transient name.
-		 */
-		do_action( 'deleted_site_transient', $transient );
-	}
-
-	return $result;
-}
-
-/**
- * Get the value of a site transient.
- *
- * If the transient does not exist, does not have a value, or has expired,
- * then the return value will be false.
- *
- * @since 2.9.0
- *
- * @see get_transient()
- *
- * @param string $transient Transient name. Expected to not be SQL-escaped.
- * @return mixed Value of transient.
- */
-function get_site_transient( $transient ) {
-
-	/**
-	 * Filters the value of an existing site transient.
-	 *
-	 * The dynamic portion of the hook name, `$transient`, refers to the transient name.
-	 *
-	 * Passing a truthy value to the filter will effectively short-circuit retrieval,
-	 * returning the passed value instead.
-	 *
-	 * @since 2.9.0
-	 * @since 4.4.0 The `$transient` parameter was added.
-	 *
-	 * @param mixed  $pre_site_transient The default value to return if the site transient does not exist.
-	 *                                   Any value other than false will short-circuit the retrieval
-	 *                                   of the transient, and return the returned value.
-	 * @param string $transient          Transient name.
-	 */
-	$pre = apply_filters( "pre_site_transient_{$transient}", false, $transient );
-
-	if ( false !== $pre )
-		return $pre;
-
-	if ( wp_using_ext_object_cache() ) {
-		$value = wp_cache_get( $transient, 'site-transient' );
-	} else {
-		// Core transients that do not have a timeout. Listed here so querying timeouts can be avoided.
-		$no_timeout = array('update_core', 'update_plugins', 'update_themes');
-		$transient_option = '_site_transient_' . $transient;
-		if ( ! in_array( $transient, $no_timeout ) ) {
-			$transient_timeout = '_site_transient_timeout_' . $transient;
-			$timeout = get_site_option( $transient_timeout );
-			if ( false !== $timeout && $timeout < time() ) {
-				delete_site_option( $transient_option  );
-				delete_site_option( $transient_timeout );
-				$value = false;
-			}
-		}
-
-		if ( ! isset( $value ) )
-			$value = get_site_option( $transient_option );
-	}
-
-	/**
-	 * Filters the value of an existing site transient.
-	 *
-	 * The dynamic portion of the hook name, `$transient`, refers to the transient name.
-	 *
-	 * @since 2.9.0
-	 * @since 4.4.0 The `$transient` parameter was added.
-	 *
-	 * @param mixed  $value     Value of site transient.
-	 * @param string $transient Transient name.
-	 */
-	return apply_filters( "site_transient_{$transient}", $value, $transient );
-}
-
-/**
- * Set/update the value of a site transient.
- *
- * You do not need to serialize values, if the value needs to be serialize, then
- * it will be serialized before it is set.
- *
- * @since 2.9.0
- *
- * @see set_transient()
- *
- * @param string $transient  Transient name. Expected to not be SQL-escaped. Must be
- *                           40 characters or fewer in length.
- * @param mixed  $value      Transient value. Expected to not be SQL-escaped.
- * @param int    $expiration Optional. Time until expiration in seconds. Default 0 (no expiration).
- * @return bool False if value was not set and true if value was set.
- */
-function set_site_transient( $transient, $value, $expiration = 0 ) {
-
-	/**
-	 * Filters the value of a specific site transient before it is set.
-	 *
-	 * The dynamic portion of the hook name, `$transient`, refers to the transient name.
-	 *
-	 * @since 3.0.0
-	 * @since 4.4.0 The `$transient` parameter was added.
-	 *
-	 * @param mixed  $value     New value of site transient.
-	 * @param string $transient Transient name.
-	 */
-	$value = apply_filters( "pre_set_site_transient_{$transient}", $value, $transient );
-
-	$expiration = (int) $expiration;
-
-	/**
-	 * Filters the expiration for a site transient before its value is set.
-	 *
-	 * The dynamic portion of the hook name, `$transient`, refers to the transient name.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param int    $expiration Time until expiration in seconds. Use 0 for no expiration.
-	 * @param mixed  $value      New value of site transient.
-	 * @param string $transient  Transient name.
-	 */
-	$expiration = apply_filters( "expiration_of_site_transient_{$transient}", $expiration, $value, $transient );
-
-	if ( wp_using_ext_object_cache() ) {
-		$result = wp_cache_set( $transient, $value, 'site-transient', $expiration );
-	} else {
-		$transient_timeout = '_site_transient_timeout_' . $transient;
-		$option = '_site_transient_' . $transient;
-		if ( false === get_site_option( $option ) ) {
-			if ( $expiration )
-				add_site_option( $transient_timeout, time() + $expiration );
-			$result = add_site_option( $option, $value );
-		} else {
-			if ( $expiration )
-				update_site_option( $transient_timeout, time() + $expiration );
-			$result = update_site_option( $option, $value );
-		}
-	}
-	if ( $result ) {
-
-		/**
-		 * Fires after the value for a specific site transient has been set.
-		 *
-		 * The dynamic portion of the hook name, `$transient`, refers to the transient name.
-		 *
-		 * @since 3.0.0
-		 * @since 4.4.0 The `$transient` parameter was added
-		 *
-		 * @param mixed  $value      Site transient value.
-		 * @param int    $expiration Time until expiration in seconds.
-		 * @param string $transient  Transient name.
-		 */
-		do_action( "set_site_transient_{$transient}", $value, $expiration, $transient );
-
-		/**
-		 * Fires after the value for a site transient has been set.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param string $transient  The name of the site transient.
-		 * @param mixed  $value      Site transient value.
-		 * @param int    $expiration Time until expiration in seconds.
-		 */
-		do_action( 'setted_site_transient', $transient, $value, $expiration );
-	}
-	return $result;
-}
Index: www/wp-includes/autoload/id3/ID3/module.audio.flac.php
===================================================================
--- www/wp-includes/autoload/id3/ID3/module.audio.flac.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/id3/ID3/module.audio.flac.php	(revision UNDEFINED)
@@ -1,453 +0,0 @@
-<?php
-/////////////////////////////////////////////////////////////////
-/// getID3() by James Heinrich <info@getid3.org>               //
-//  available at http://getid3.sourceforge.net                 //
-//            or http://www.getid3.org                         //
-//          also https://github.com/JamesHeinrich/getID3       //
-/////////////////////////////////////////////////////////////////
-// See readme.txt for more details                             //
-/////////////////////////////////////////////////////////////////
-//                                                             //
-// module.audio.flac.php                                       //
-// module for analyzing FLAC and OggFLAC audio files           //
-// dependencies: module.audio.ogg.php                          //
-//                                                            ///
-/////////////////////////////////////////////////////////////////
-
-
-getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.ogg.php', __FILE__, true);
-
-/**
-* @tutorial http://flac.sourceforge.net/format.html
-*/
-class getid3_flac extends getid3_handler
-{
-	const syncword = 'fLaC';
-
-	public function Analyze() {
-		$info = &$this->getid3->info;
-
-		$this->fseek($info['avdataoffset']);
-		$StreamMarker = $this->fread(4);
-		if ($StreamMarker != self::syncword) {
-			return $this->error('Expecting "'.getid3_lib::PrintHexBytes(self::syncword).'" at offset '.$info['avdataoffset'].', found "'.getid3_lib::PrintHexBytes($StreamMarker).'"');
-		}
-		$info['fileformat']            = 'flac';
-		$info['audio']['dataformat']   = 'flac';
-		$info['audio']['bitrate_mode'] = 'vbr';
-		$info['audio']['lossless']     = true;
-
-		// parse flac container
-		return $this->parseMETAdata();
-	}
-
-	public function parseMETAdata() {
-		$info = &$this->getid3->info;
-		do {
-			$BlockOffset   = $this->ftell();
-			$BlockHeader   = $this->fread(4);
-			$LBFBT         = getid3_lib::BigEndian2Int(substr($BlockHeader, 0, 1));
-			$LastBlockFlag = (bool) ($LBFBT & 0x80);
-			$BlockType     =        ($LBFBT & 0x7F);
-			$BlockLength   = getid3_lib::BigEndian2Int(substr($BlockHeader, 1, 3));
-			$BlockTypeText = self::metaBlockTypeLookup($BlockType);
-
-			if (($BlockOffset + 4 + $BlockLength) > $info['avdataend']) {
-				$this->error('METADATA_BLOCK_HEADER.BLOCK_TYPE ('.$BlockTypeText.') at offset '.$BlockOffset.' extends beyond end of file');
-				break;
-			}
-			if ($BlockLength < 1) {
-				$this->error('METADATA_BLOCK_HEADER.BLOCK_LENGTH ('.$BlockLength.') at offset '.$BlockOffset.' is invalid');
-				break;
-			}
-
-			$info['flac'][$BlockTypeText]['raw'] = array();
-			$BlockTypeText_raw = &$info['flac'][$BlockTypeText]['raw'];
-
-			$BlockTypeText_raw['offset']          = $BlockOffset;
-			$BlockTypeText_raw['last_meta_block'] = $LastBlockFlag;
-			$BlockTypeText_raw['block_type']      = $BlockType;
-			$BlockTypeText_raw['block_type_text'] = $BlockTypeText;
-			$BlockTypeText_raw['block_length']    = $BlockLength;
-			if ($BlockTypeText_raw['block_type'] != 0x06) { // do not read attachment data automatically
-				$BlockTypeText_raw['block_data']  = $this->fread($BlockLength);
-			}
-
-			switch ($BlockTypeText) {
-				case 'STREAMINFO':     // 0x00
-					if (!$this->parseSTREAMINFO($BlockTypeText_raw['block_data'])) {
-						return false;
-					}
-					break;
-
-				case 'PADDING':        // 0x01
-					unset($info['flac']['PADDING']); // ignore
-					break;
-
-				case 'APPLICATION':    // 0x02
-					if (!$this->parseAPPLICATION($BlockTypeText_raw['block_data'])) {
-						return false;
-					}
-					break;
-
-				case 'SEEKTABLE':      // 0x03
-					if (!$this->parseSEEKTABLE($BlockTypeText_raw['block_data'])) {
-						return false;
-					}
-					break;
-
-				case 'VORBIS_COMMENT': // 0x04
-					if (!$this->parseVORBIS_COMMENT($BlockTypeText_raw['block_data'])) {
-						return false;
-					}
-					break;
-
-				case 'CUESHEET':       // 0x05
-					if (!$this->parseCUESHEET($BlockTypeText_raw['block_data'])) {
-						return false;
-					}
-					break;
-
-				case 'PICTURE':        // 0x06
-					if (!$this->parsePICTURE()) {
-						return false;
-					}
-					break;
-
-				default:
-					$this->warning('Unhandled METADATA_BLOCK_HEADER.BLOCK_TYPE ('.$BlockType.') at offset '.$BlockOffset);
-			}
-
-			unset($info['flac'][$BlockTypeText]['raw']);
-			$info['avdataoffset'] = $this->ftell();
-		}
-		while ($LastBlockFlag === false);
-
-		// handle tags
-		if (!empty($info['flac']['VORBIS_COMMENT']['comments'])) {
-			$info['flac']['comments'] = $info['flac']['VORBIS_COMMENT']['comments'];
-		}
-		if (!empty($info['flac']['VORBIS_COMMENT']['vendor'])) {
-			$info['audio']['encoder'] = str_replace('reference ', '', $info['flac']['VORBIS_COMMENT']['vendor']);
-		}
-
-		// copy attachments to 'comments' array if nesesary
-		if (isset($info['flac']['PICTURE']) && ($this->getid3->option_save_attachments !== getID3::ATTACHMENTS_NONE)) {
-			foreach ($info['flac']['PICTURE'] as $entry) {
-				if (!empty($entry['data'])) {
-					if (!isset($info['flac']['comments']['picture'])) {
-						$info['flac']['comments']['picture'] = array();
-					}
-					$comments_picture_data = array();
-					foreach (array('data', 'image_mime', 'image_width', 'image_height', 'imagetype', 'picturetype', 'description', 'datalength') as $picture_key) {
-						if (isset($entry[$picture_key])) {
-							$comments_picture_data[$picture_key] = $entry[$picture_key];
-						}
-					}
-					$info['flac']['comments']['picture'][] = $comments_picture_data;
-					unset($comments_picture_data);
-				}
-			}
-		}
-
-		if (isset($info['flac']['STREAMINFO'])) {
-			if (!$this->isDependencyFor('matroska')) {
-				$info['flac']['compressed_audio_bytes'] = $info['avdataend'] - $info['avdataoffset'];
-			}
-			$info['flac']['uncompressed_audio_bytes'] = $info['flac']['STREAMINFO']['samples_stream'] * $info['flac']['STREAMINFO']['channels'] * ($info['flac']['STREAMINFO']['bits_per_sample'] / 8);
-			if ($info['flac']['uncompressed_audio_bytes'] == 0) {
-				return $this->error('Corrupt FLAC file: uncompressed_audio_bytes == zero');
-			}
-			if (!empty($info['flac']['compressed_audio_bytes'])) {
-				$info['flac']['compression_ratio'] = $info['flac']['compressed_audio_bytes'] / $info['flac']['uncompressed_audio_bytes'];
-			}
-		}
-
-		// set md5_data_source - built into flac 0.5+
-		if (isset($info['flac']['STREAMINFO']['audio_signature'])) {
-
-			if ($info['flac']['STREAMINFO']['audio_signature'] === str_repeat("\x00", 16)) {
-                $this->warning('FLAC STREAMINFO.audio_signature is null (known issue with libOggFLAC)');
-			}
-			else {
-				$info['md5_data_source'] = '';
-				$md5 = $info['flac']['STREAMINFO']['audio_signature'];
-				for ($i = 0; $i < strlen($md5); $i++) {
-					$info['md5_data_source'] .= str_pad(dechex(ord($md5[$i])), 2, '00', STR_PAD_LEFT);
-				}
-				if (!preg_match('/^[0-9a-f]{32}$/', $info['md5_data_source'])) {
-					unset($info['md5_data_source']);
-				}
-			}
-		}
-
-		if (isset($info['flac']['STREAMINFO']['bits_per_sample'])) {
-			$info['audio']['bits_per_sample'] = $info['flac']['STREAMINFO']['bits_per_sample'];
-			if ($info['audio']['bits_per_sample'] == 8) {
-				// special case
-				// must invert sign bit on all data bytes before MD5'ing to match FLAC's calculated value
-				// MD5sum calculates on unsigned bytes, but FLAC calculated MD5 on 8-bit audio data as signed
-				$this->warning('FLAC calculates MD5 data strangely on 8-bit audio, so the stored md5_data_source value will not match the decoded WAV file');
-			}
-		}
-
-		return true;
-	}
-
-	private function parseSTREAMINFO($BlockData) {
-		$info = &$this->getid3->info;
-
-		$info['flac']['STREAMINFO'] = array();
-		$streaminfo = &$info['flac']['STREAMINFO'];
-
-		$streaminfo['min_block_size']  = getid3_lib::BigEndian2Int(substr($BlockData, 0, 2));
-		$streaminfo['max_block_size']  = getid3_lib::BigEndian2Int(substr($BlockData, 2, 2));
-		$streaminfo['min_frame_size']  = getid3_lib::BigEndian2Int(substr($BlockData, 4, 3));
-		$streaminfo['max_frame_size']  = getid3_lib::BigEndian2Int(substr($BlockData, 7, 3));
-
-		$SRCSBSS                       = getid3_lib::BigEndian2Bin(substr($BlockData, 10, 8));
-		$streaminfo['sample_rate']     = getid3_lib::Bin2Dec(substr($SRCSBSS,  0, 20));
-		$streaminfo['channels']        = getid3_lib::Bin2Dec(substr($SRCSBSS, 20,  3)) + 1;
-		$streaminfo['bits_per_sample'] = getid3_lib::Bin2Dec(substr($SRCSBSS, 23,  5)) + 1;
-		$streaminfo['samples_stream']  = getid3_lib::Bin2Dec(substr($SRCSBSS, 28, 36));
-
-		$streaminfo['audio_signature'] = substr($BlockData, 18, 16);
-
-		if (!empty($streaminfo['sample_rate'])) {
-
-			$info['audio']['bitrate_mode']    = 'vbr';
-			$info['audio']['sample_rate']     = $streaminfo['sample_rate'];
-			$info['audio']['channels']        = $streaminfo['channels'];
-			$info['audio']['bits_per_sample'] = $streaminfo['bits_per_sample'];
-			$info['playtime_seconds']         = $streaminfo['samples_stream'] / $streaminfo['sample_rate'];
-			if ($info['playtime_seconds'] > 0) {
-				if (!$this->isDependencyFor('matroska')) {
-					$info['audio']['bitrate'] = (($info['avdataend'] - $info['avdataoffset']) * 8) / $info['playtime_seconds'];
-				}
-				else {
-					$this->warning('Cannot determine audio bitrate because total stream size is unknown');
-				}
-			}
-
-		} else {
-			return $this->error('Corrupt METAdata block: STREAMINFO');
-		}
-
-		return true;
-	}
-
-	private function parseAPPLICATION($BlockData) {
-		$info = &$this->getid3->info;
-
-		$ApplicationID = getid3_lib::BigEndian2Int(substr($BlockData, 0, 4));
-		$info['flac']['APPLICATION'][$ApplicationID]['name'] = self::applicationIDLookup($ApplicationID);
-		$info['flac']['APPLICATION'][$ApplicationID]['data'] = substr($BlockData, 4);
-
-		return true;
-	}
-
-	private function parseSEEKTABLE($BlockData) {
-		$info = &$this->getid3->info;
-
-		$offset = 0;
-		$BlockLength = strlen($BlockData);
-		$placeholderpattern = str_repeat("\xFF", 8);
-		while ($offset < $BlockLength) {
-			$SampleNumberString = substr($BlockData, $offset, 8);
-			$offset += 8;
-			if ($SampleNumberString == $placeholderpattern) {
-
-				// placeholder point
-				getid3_lib::safe_inc($info['flac']['SEEKTABLE']['placeholders'], 1);
-				$offset += 10;
-
-			} else {
-
-				$SampleNumber                                        = getid3_lib::BigEndian2Int($SampleNumberString);
-				$info['flac']['SEEKTABLE'][$SampleNumber]['offset']  = getid3_lib::BigEndian2Int(substr($BlockData, $offset, 8));
-				$offset += 8;
-				$info['flac']['SEEKTABLE'][$SampleNumber]['samples'] = getid3_lib::BigEndian2Int(substr($BlockData, $offset, 2));
-				$offset += 2;
-
-			}
-		}
-
-		return true;
-	}
-
-	private function parseVORBIS_COMMENT($BlockData) {
-		$info = &$this->getid3->info;
-
-		$getid3_ogg = new getid3_ogg($this->getid3);
-		if ($this->isDependencyFor('matroska')) {
-			$getid3_ogg->setStringMode($this->data_string);
-		}
-		$getid3_ogg->ParseVorbisComments();
-		if (isset($info['ogg'])) {
-			unset($info['ogg']['comments_raw']);
-			$info['flac']['VORBIS_COMMENT'] = $info['ogg'];
-			unset($info['ogg']);
-		}
-
-		unset($getid3_ogg);
-
-		return true;
-	}
-
-	private function parseCUESHEET($BlockData) {
-		$info = &$this->getid3->info;
-		$offset = 0;
-		$info['flac']['CUESHEET']['media_catalog_number'] =                              trim(substr($BlockData, $offset, 128), "\0");
-		$offset += 128;
-		$info['flac']['CUESHEET']['lead_in_samples']      =         getid3_lib::BigEndian2Int(substr($BlockData, $offset, 8));
-		$offset += 8;
-		$info['flac']['CUESHEET']['flags']['is_cd']       = (bool) (getid3_lib::BigEndian2Int(substr($BlockData, $offset, 1)) & 0x80);
-		$offset += 1;
-
-		$offset += 258; // reserved
-
-		$info['flac']['CUESHEET']['number_tracks']        =         getid3_lib::BigEndian2Int(substr($BlockData, $offset, 1));
-		$offset += 1;
-
-		for ($track = 0; $track < $info['flac']['CUESHEET']['number_tracks']; $track++) {
-			$TrackSampleOffset = getid3_lib::BigEndian2Int(substr($BlockData, $offset, 8));
-			$offset += 8;
-			$TrackNumber       = getid3_lib::BigEndian2Int(substr($BlockData, $offset, 1));
-			$offset += 1;
-
-			$info['flac']['CUESHEET']['tracks'][$TrackNumber]['sample_offset']         = $TrackSampleOffset;
-
-			$info['flac']['CUESHEET']['tracks'][$TrackNumber]['isrc']                  =                           substr($BlockData, $offset, 12);
-			$offset += 12;
-
-			$TrackFlagsRaw                                                             = getid3_lib::BigEndian2Int(substr($BlockData, $offset, 1));
-			$offset += 1;
-			$info['flac']['CUESHEET']['tracks'][$TrackNumber]['flags']['is_audio']     = (bool) ($TrackFlagsRaw & 0x80);
-			$info['flac']['CUESHEET']['tracks'][$TrackNumber]['flags']['pre_emphasis'] = (bool) ($TrackFlagsRaw & 0x40);
-
-			$offset += 13; // reserved
-
-			$info['flac']['CUESHEET']['tracks'][$TrackNumber]['index_points']          = getid3_lib::BigEndian2Int(substr($BlockData, $offset, 1));
-			$offset += 1;
-
-			for ($index = 0; $index < $info['flac']['CUESHEET']['tracks'][$TrackNumber]['index_points']; $index++) {
-				$IndexSampleOffset = getid3_lib::BigEndian2Int(substr($BlockData, $offset, 8));
-				$offset += 8;
-				$IndexNumber       = getid3_lib::BigEndian2Int(substr($BlockData, $offset, 1));
-				$offset += 1;
-
-				$offset += 3; // reserved
-
-				$info['flac']['CUESHEET']['tracks'][$TrackNumber]['indexes'][$IndexNumber] = $IndexSampleOffset;
-			}
-		}
-
-		return true;
-	}
-
-	/**
-	* Parse METADATA_BLOCK_PICTURE flac structure and extract attachment
-	* External usage: audio.ogg
-	*/
-	public function parsePICTURE() {
-		$info = &$this->getid3->info;
-
-		$picture['typeid']         = getid3_lib::BigEndian2Int($this->fread(4));
-		$picture['picturetype']    = self::pictureTypeLookup($picture['typeid']);
-		$picture['image_mime']     = $this->fread(getid3_lib::BigEndian2Int($this->fread(4)));
-		$descr_length              = getid3_lib::BigEndian2Int($this->fread(4));
-		if ($descr_length) {
-			$picture['description'] = $this->fread($descr_length);
-		}
-		$picture['image_width']    = getid3_lib::BigEndian2Int($this->fread(4));
-		$picture['image_height']   = getid3_lib::BigEndian2Int($this->fread(4));
-		$picture['color_depth']    = getid3_lib::BigEndian2Int($this->fread(4));
-		$picture['colors_indexed'] = getid3_lib::BigEndian2Int($this->fread(4));
-		$picture['datalength']     = getid3_lib::BigEndian2Int($this->fread(4));
-
-		if ($picture['image_mime'] == '-->') {
-			$picture['data'] = $this->fread($picture['datalength']);
-		} else {
-			$picture['data'] = $this->saveAttachment(
-				str_replace('/', '_', $picture['picturetype']).'_'.$this->ftell(),
-				$this->ftell(),
-				$picture['datalength'],
-				$picture['image_mime']);
-		}
-
-		$info['flac']['PICTURE'][] = $picture;
-
-		return true;
-	}
-
-	public static function metaBlockTypeLookup($blocktype) {
-		static $lookup = array(
-			0 => 'STREAMINFO',
-			1 => 'PADDING',
-			2 => 'APPLICATION',
-			3 => 'SEEKTABLE',
-			4 => 'VORBIS_COMMENT',
-			5 => 'CUESHEET',
-			6 => 'PICTURE',
-		);
-		return (isset($lookup[$blocktype]) ? $lookup[$blocktype] : 'reserved');
-	}
-
-	public static function applicationIDLookup($applicationid) {
-		// http://flac.sourceforge.net/id.html
-		static $lookup = array(
-			0x41544348 => 'FlacFile',                                                                           // "ATCH"
-			0x42534F4C => 'beSolo',                                                                             // "BSOL"
-			0x42554753 => 'Bugs Player',                                                                        // "BUGS"
-			0x43756573 => 'GoldWave cue points (specification)',                                                // "Cues"
-			0x46696361 => 'CUE Splitter',                                                                       // "Fica"
-			0x46746F6C => 'flac-tools',                                                                         // "Ftol"
-			0x4D4F5442 => 'MOTB MetaCzar',                                                                      // "MOTB"
-			0x4D505345 => 'MP3 Stream Editor',                                                                  // "MPSE"
-			0x4D754D4C => 'MusicML: Music Metadata Language',                                                   // "MuML"
-			0x52494646 => 'Sound Devices RIFF chunk storage',                                                   // "RIFF"
-			0x5346464C => 'Sound Font FLAC',                                                                    // "SFFL"
-			0x534F4E59 => 'Sony Creative Software',                                                             // "SONY"
-			0x5351455A => 'flacsqueeze',                                                                        // "SQEZ"
-			0x54745776 => 'TwistedWave',                                                                        // "TtWv"
-			0x55495453 => 'UITS Embedding tools',                                                               // "UITS"
-			0x61696666 => 'FLAC AIFF chunk storage',                                                            // "aiff"
-			0x696D6167 => 'flac-image application for storing arbitrary files in APPLICATION metadata blocks',  // "imag"
-			0x7065656D => 'Parseable Embedded Extensible Metadata (specification)',                             // "peem"
-			0x71667374 => 'QFLAC Studio',                                                                       // "qfst"
-			0x72696666 => 'FLAC RIFF chunk storage',                                                            // "riff"
-			0x74756E65 => 'TagTuner',                                                                           // "tune"
-			0x78626174 => 'XBAT',                                                                               // "xbat"
-			0x786D6364 => 'xmcd',                                                                               // "xmcd"
-		);
-		return (isset($lookup[$applicationid]) ? $lookup[$applicationid] : 'reserved');
-	}
-
-	public static function pictureTypeLookup($type_id) {
-		static $lookup = array (
-			 0 => 'Other',
-			 1 => '32x32 pixels \'file icon\' (PNG only)',
-			 2 => 'Other file icon',
-			 3 => 'Cover (front)',
-			 4 => 'Cover (back)',
-			 5 => 'Leaflet page',
-			 6 => 'Media (e.g. label side of CD)',
-			 7 => 'Lead artist/lead performer/soloist',
-			 8 => 'Artist/performer',
-			 9 => 'Conductor',
-			10 => 'Band/Orchestra',
-			11 => 'Composer',
-			12 => 'Lyricist/text writer',
-			13 => 'Recording Location',
-			14 => 'During recording',
-			15 => 'During performance',
-			16 => 'Movie/video screen capture',
-			17 => 'A bright coloured fish',
-			18 => 'Illustration',
-			19 => 'Band/artist logotype',
-			20 => 'Publisher/Studio logotype',
-		);
-		return (isset($lookup[$type_id]) ? $lookup[$type_id] : 'reserved');
-	}
-
-}
Index: www/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php
===================================================================
--- www/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Utility_CaseInsensitiveDictionary.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/SimplePie/Cache.php
===================================================================
--- www/wp-includes/SimplePie/Cache.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_Cache.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/requests/Exception/HTTP/416.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/416.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/416.php	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-<?php
-/**
- * Exception for 416 Requested Range Not Satisfiable responses
- *
- * @package Requests
- */
-
-/**
- * Exception for 416 Requested Range Not Satisfiable responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_416 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 416;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Requested Range Not Satisfiable';
-}
\ No newline at end of file
Index: www/wp-admin/includes/class-wp-comments-list-table.php
===================================================================
--- www/wp-admin/includes/class-wp-comments-list-table.php	(revision 38565)
+++ www/wp-admin/autoload/list-table/WP_Comments_List_Table.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/customize/class-wp-customize-nav-menu-item-setting.php
===================================================================
--- www/wp-includes/autoload/customize/class-wp-customize-nav-menu-item-setting.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/customize/class-wp-customize-nav-menu-item-setting.php	(revision UNDEFINED)
@@ -1,862 +0,0 @@
-<?php
-/**
- * Customize API: WP_Customize_Nav_Menu_Item_Setting class
- *
- * @package WordPress
- * @subpackage Customize
- * @since 4.4.0
- */
-
-/**
- * Customize Setting to represent a nav_menu.
- *
- * Subclass of WP_Customize_Setting to represent a nav_menu taxonomy term, and
- * the IDs for the nav_menu_items associated with the nav menu.
- *
- * @since 4.3.0
- *
- * @see WP_Customize_Setting
- */
-class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting {
-
-	const ID_PATTERN = '/^nav_menu_item\[(?P<id>-?\d+)\]$/';
-
-	const POST_TYPE = 'nav_menu_item';
-
-	const TYPE = 'nav_menu_item';
-
-	/**
-	 * Setting type.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var string
-	 */
-	public $type = self::TYPE;
-
-	/**
-	 * Default setting value.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var array
-	 *
-	 * @see wp_setup_nav_menu_item()
-	 */
-	public $default = array(
-		// The $menu_item_data for wp_update_nav_menu_item().
-		'object_id'        => 0,
-		'object'           => '', // Taxonomy name.
-		'menu_item_parent' => 0, // A.K.A. menu-item-parent-id; note that post_parent is different, and not included.
-		'position'         => 0, // A.K.A. menu_order.
-		'type'             => 'custom', // Note that type_label is not included here.
-		'title'            => '',
-		'url'              => '',
-		'target'           => '',
-		'attr_title'       => '',
-		'description'      => '',
-		'classes'          => '',
-		'xfn'              => '',
-		'status'           => 'publish',
-		'original_title'   => '',
-		'nav_menu_term_id' => 0, // This will be supplied as the $menu_id arg for wp_update_nav_menu_item().
-		'_invalid'         => false,
-	);
-
-	/**
-	 * Default transport.
-	 *
-	 * @since 4.3.0
-	 * @since 4.5.0 Default changed to 'refresh'
-	 * @access public
-	 * @var string
-	 */
-	public $transport = 'refresh';
-
-	/**
-	 * The post ID represented by this setting instance. This is the db_id.
-	 *
-	 * A negative value represents a placeholder ID for a new menu not yet saved.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var int
-	 */
-	public $post_id;
-
-	/**
-	 * Storage of pre-setup menu item to prevent wasted calls to wp_setup_nav_menu_item().
-	 *
-	 * @since 4.3.0
-	 * @access protected
-	 * @var array
-	 */
-	protected $value;
-
-	/**
-	 * Previous (placeholder) post ID used before creating a new menu item.
-	 *
-	 * This value will be exported to JS via the customize_save_response filter
-	 * so that JavaScript can update the settings to refer to the newly-assigned
-	 * post ID. This value is always negative to indicate it does not refer to
-	 * a real post.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var int
-	 *
-	 * @see WP_Customize_Nav_Menu_Item_Setting::update()
-	 * @see WP_Customize_Nav_Menu_Item_Setting::amend_customize_save_response()
-	 */
-	public $previous_post_id;
-
-	/**
-	 * When previewing or updating a menu item, this stores the previous nav_menu_term_id
-	 * which ensures that we can apply the proper filters.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var int
-	 */
-	public $original_nav_menu_term_id;
-
-	/**
-	 * Whether or not update() was called.
-	 *
-	 * @since 4.3.0
-	 * @access protected
-	 * @var bool
-	 */
-	protected $is_updated = false;
-
-	/**
-	 * Status for calling the update method, used in customize_save_response filter.
-	 *
-	 * See {@see 'customize_save_response'}.
-	 *
-	 * When status is inserted, the placeholder post ID is stored in $previous_post_id.
-	 * When status is error, the error is stored in $update_error.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var string updated|inserted|deleted|error
-	 *
-	 * @see WP_Customize_Nav_Menu_Item_Setting::update()
-	 * @see WP_Customize_Nav_Menu_Item_Setting::amend_customize_save_response()
-	 */
-	public $update_status;
-
-	/**
-	 * Any error object returned by wp_update_nav_menu_item() when setting is updated.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var WP_Error
-	 *
-	 * @see WP_Customize_Nav_Menu_Item_Setting::update()
-	 * @see WP_Customize_Nav_Menu_Item_Setting::amend_customize_save_response()
-	 */
-	public $update_error;
-
-	/**
-	 * Constructor.
-	 *
-	 * Any supplied $args override class property defaults.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 *
-	 * @param WP_Customize_Manager $manager Bootstrap Customizer instance.
-	 * @param string               $id      An specific ID of the setting. Can be a
-	 *                                      theme mod or option name.
-	 * @param array                $args    Optional. Setting arguments.
-	 *
-	 * @throws Exception If $id is not valid for this setting type.
-	 */
-	public function __construct( WP_Customize_Manager $manager, $id, array $args = array() ) {
-		if ( empty( $manager->nav_menus ) ) {
-			throw new Exception( 'Expected WP_Customize_Manager::$nav_menus to be set.' );
-		}
-
-		if ( ! preg_match( self::ID_PATTERN, $id, $matches ) ) {
-			throw new Exception( "Illegal widget setting ID: $id" );
-		}
-
-		$this->post_id = intval( $matches['id'] );
-		add_action( 'wp_update_nav_menu_item', array( $this, 'flush_cached_value' ), 10, 2 );
-
-		parent::__construct( $manager, $id, $args );
-
-		// Ensure that an initially-supplied value is valid.
-		if ( isset( $this->value ) ) {
-			$this->populate_value();
-			foreach ( array_diff( array_keys( $this->default ), array_keys( $this->value ) ) as $missing ) {
-				throw new Exception( "Supplied nav_menu_item value missing property: $missing" );
-			}
-		}
-
-	}
-
-	/**
-	 * Clear the cached value when this nav menu item is updated.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 *
-	 * @param int $menu_id       The term ID for the menu.
-	 * @param int $menu_item_id  The post ID for the menu item.
-	 */
-	public function flush_cached_value( $menu_id, $menu_item_id ) {
-		unset( $menu_id );
-		if ( $menu_item_id === $this->post_id ) {
-			$this->value = null;
-		}
-	}
-
-	/**
-	 * Get the instance data for a given nav_menu_item setting.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 *
-	 * @see wp_setup_nav_menu_item()
-	 *
-	 * @return array|false Instance data array, or false if the item is marked for deletion.
-	 */
-	public function value() {
-		if ( $this->is_previewed && $this->_previewed_blog_id === get_current_blog_id() ) {
-			$undefined  = new stdClass(); // Symbol.
-			$post_value = $this->post_value( $undefined );
-
-			if ( $undefined === $post_value ) {
-				$value = $this->_original_value;
-			} else {
-				$value = $post_value;
-			}
-		} elseif ( isset( $this->value ) ) {
-			$value = $this->value;
-		} else {
-			$value = false;
-
-			// Note that a ID of less than one indicates a nav_menu not yet inserted.
-			if ( $this->post_id > 0 ) {
-				$post = get_post( $this->post_id );
-				if ( $post && self::POST_TYPE === $post->post_type ) {
-					$is_title_empty = empty( $post->post_title );
-					$value = (array) wp_setup_nav_menu_item( $post );
-					if ( $is_title_empty ) {
-						$value['title'] = '';
-					}
-				}
-			}
-
-			if ( ! is_array( $value ) ) {
-				$value = $this->default;
-			}
-
-			// Cache the value for future calls to avoid having to re-call wp_setup_nav_menu_item().
-			$this->value = $value;
-			$this->populate_value();
-			$value = $this->value;
-		}
-
-		return $value;
-	}
-
-	/**
-	 * Get original title.
-	 *
-	 * @since 4.7.0
-	 *
-	 * @param object $item Nav menu item.
-	 * @return string The original title.
-	 */
-	protected function get_original_title( $item ) {
-		if ( empty( $item->object_id ) ) {
-			return '';
-		}
-		$original_title = '';
-		if ( 'post_type' === $item->type ) {
-			$original_object = get_post( $item->object_id );
-			if ( $original_object ) {
-				/** This filter is documented in wp-includes/post-template.php */
-				$original_title = apply_filters( 'the_title', $original_object->post_title, $original_object->ID );
-
-				if ( '' === $original_title ) {
-					/* translators: %d: ID of a post */
-					$original_title = sprintf( __( '#%d (no title)' ), $original_object->ID );
-				}
-			}
-		} elseif ( 'taxonomy' === $item->type ) {
-			$original_term_title = get_term_field( 'name', $item->object_id, $item->object, 'raw' );
-			if ( ! is_wp_error( $original_term_title ) ) {
-				$original_title = $original_term_title;
-			}
-		}
-		$original_title = html_entity_decode( $original_title, ENT_QUOTES, get_bloginfo( 'charset' ) );
-		return $original_title;
-	}
-
-	/**
-	 * Ensure that the value is fully populated with the necessary properties.
-	 *
-	 * Translates some properties added by wp_setup_nav_menu_item() and removes others.
-	 *
-	 * @since 4.3.0
-	 * @access protected
-	 *
-	 * @see WP_Customize_Nav_Menu_Item_Setting::value()
-	 */
-	protected function populate_value() {
-		if ( ! is_array( $this->value ) ) {
-			return;
-		}
-
-		if ( isset( $this->value['menu_order'] ) ) {
-			$this->value['position'] = $this->value['menu_order'];
-			unset( $this->value['menu_order'] );
-		}
-		if ( isset( $this->value['post_status'] ) ) {
-			$this->value['status'] = $this->value['post_status'];
-			unset( $this->value['post_status'] );
-		}
-
-		if ( ! isset( $this->value['original_title'] ) ) {
-			$this->value['original_title'] = $this->get_original_title( (object) $this->value );
-		}
-
-		if ( ! isset( $this->value['nav_menu_term_id'] ) && $this->post_id > 0 ) {
-			$menus = wp_get_post_terms( $this->post_id, WP_Customize_Nav_Menu_Setting::TAXONOMY, array(
-				'fields' => 'ids',
-			) );
-			if ( ! empty( $menus ) ) {
-				$this->value['nav_menu_term_id'] = array_shift( $menus );
-			} else {
-				$this->value['nav_menu_term_id'] = 0;
-			}
-		}
-
-		foreach ( array( 'object_id', 'menu_item_parent', 'nav_menu_term_id' ) as $key ) {
-			if ( ! is_int( $this->value[ $key ] ) ) {
-				$this->value[ $key ] = intval( $this->value[ $key ] );
-			}
-		}
-		foreach ( array( 'classes', 'xfn' ) as $key ) {
-			if ( is_array( $this->value[ $key ] ) ) {
-				$this->value[ $key ] = implode( ' ', $this->value[ $key ] );
-			}
-		}
-
-		if ( ! isset( $this->value['title'] ) ) {
-			$this->value['title'] = '';
-		}
-
-		if ( ! isset( $this->value['_invalid'] ) ) {
-			$this->value['_invalid'] = false;
-			$is_known_invalid = (
-				( ( 'post_type' === $this->value['type'] || 'post_type_archive' === $this->value['type'] ) && ! post_type_exists( $this->value['object'] ) )
-				||
-				( 'taxonomy' === $this->value['type'] && ! taxonomy_exists( $this->value['object'] ) )
-			);
-			if ( $is_known_invalid ) {
-				$this->value['_invalid'] = true;
-			}
-		}
-
-		// Remove remaining properties available on a setup nav_menu_item post object which aren't relevant to the setting value.
-		$irrelevant_properties = array(
-			'ID',
-			'comment_count',
-			'comment_status',
-			'db_id',
-			'filter',
-			'guid',
-			'ping_status',
-			'pinged',
-			'post_author',
-			'post_content',
-			'post_content_filtered',
-			'post_date',
-			'post_date_gmt',
-			'post_excerpt',
-			'post_mime_type',
-			'post_modified',
-			'post_modified_gmt',
-			'post_name',
-			'post_parent',
-			'post_password',
-			'post_title',
-			'post_type',
-			'to_ping',
-		);
-		foreach ( $irrelevant_properties as $property ) {
-			unset( $this->value[ $property ] );
-		}
-	}
-
-	/**
-	 * Handle previewing the setting.
-	 *
-	 * @since 4.3.0
-	 * @since 4.4.0 Added boolean return value.
-	 * @access public
-	 *
-	 * @see WP_Customize_Manager::post_value()
-	 *
-	 * @return bool False if method short-circuited due to no-op.
-	 */
-	public function preview() {
-		if ( $this->is_previewed ) {
-			return false;
-		}
-
-		$undefined = new stdClass();
-		$is_placeholder = ( $this->post_id < 0 );
-		$is_dirty = ( $undefined !== $this->post_value( $undefined ) );
-		if ( ! $is_placeholder && ! $is_dirty ) {
-			return false;
-		}
-
-		$this->is_previewed              = true;
-		$this->_original_value           = $this->value();
-		$this->original_nav_menu_term_id = $this->_original_value['nav_menu_term_id'];
-		$this->_previewed_blog_id        = get_current_blog_id();
-
-		add_filter( 'wp_get_nav_menu_items', array( $this, 'filter_wp_get_nav_menu_items' ), 10, 3 );
-
-		$sort_callback = array( __CLASS__, 'sort_wp_get_nav_menu_items' );
-		if ( ! has_filter( 'wp_get_nav_menu_items', $sort_callback ) ) {
-			add_filter( 'wp_get_nav_menu_items', array( __CLASS__, 'sort_wp_get_nav_menu_items' ), 1000, 3 );
-		}
-
-		// @todo Add get_post_metadata filters for plugins to add their data.
-
-		return true;
-	}
-
-	/**
-	 * Filters the wp_get_nav_menu_items() result to supply the previewed menu items.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 *
-	 * @see wp_get_nav_menu_items()
-	 *
-	 * @param array  $items An array of menu item post objects.
-	 * @param object $menu  The menu object.
-	 * @param array  $args  An array of arguments used to retrieve menu item objects.
-	 * @return array Array of menu items,
-	 */
-	public function filter_wp_get_nav_menu_items( $items, $menu, $args ) {
-		$this_item = $this->value();
-		$current_nav_menu_term_id = $this_item['nav_menu_term_id'];
-		unset( $this_item['nav_menu_term_id'] );
-
-		$should_filter = (
-			$menu->term_id === $this->original_nav_menu_term_id
-			||
-			$menu->term_id === $current_nav_menu_term_id
-		);
-		if ( ! $should_filter ) {
-			return $items;
-		}
-
-		// Handle deleted menu item, or menu item moved to another menu.
-		$should_remove = (
-			false === $this_item
-			||
-			true === $this_item['_invalid']
-			||
-			(
-				$this->original_nav_menu_term_id === $menu->term_id
-				&&
-				$current_nav_menu_term_id !== $this->original_nav_menu_term_id
-			)
-		);
-		if ( $should_remove ) {
-			$filtered_items = array();
-			foreach ( $items as $item ) {
-				if ( $item->db_id !== $this->post_id ) {
-					$filtered_items[] = $item;
-				}
-			}
-			return $filtered_items;
-		}
-
-		$mutated = false;
-		$should_update = (
-			is_array( $this_item )
-			&&
-			$current_nav_menu_term_id === $menu->term_id
-		);
-		if ( $should_update ) {
-			foreach ( $items as $item ) {
-				if ( $item->db_id === $this->post_id ) {
-					foreach ( get_object_vars( $this->value_as_wp_post_nav_menu_item() ) as $key => $value ) {
-						$item->$key = $value;
-					}
-					$mutated = true;
-				}
-			}
-
-			// Not found so we have to append it..
-			if ( ! $mutated ) {
-				$items[] = $this->value_as_wp_post_nav_menu_item();
-			}
-		}
-
-		return $items;
-	}
-
-	/**
-	 * Re-apply the tail logic also applied on $items by wp_get_nav_menu_items().
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @static
-	 *
-	 * @see wp_get_nav_menu_items()
-	 *
-	 * @param array  $items An array of menu item post objects.
-	 * @param object $menu  The menu object.
-	 * @param array  $args  An array of arguments used to retrieve menu item objects.
-	 * @return array Array of menu items,
-	 */
-	public static function sort_wp_get_nav_menu_items( $items, $menu, $args ) {
-		// @todo We should probably re-apply some constraints imposed by $args.
-		unset( $args['include'] );
-
-		// Remove invalid items only in front end.
-		if ( ! is_admin() ) {
-			$items = array_filter( $items, '_is_valid_nav_menu_item' );
-		}
-
-		if ( ARRAY_A === $args['output'] ) {
-			$GLOBALS['_menu_item_sort_prop'] = $args['output_key'];
-			usort( $items, '_sort_nav_menu_items' );
-			$i = 1;
-
-			foreach ( $items as $k => $item ) {
-				$items[ $k ]->{$args['output_key']} = $i++;
-			}
-		}
-
-		return $items;
-	}
-
-	/**
-	 * Get the value emulated into a WP_Post and set up as a nav_menu_item.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 *
-	 * @return WP_Post With wp_setup_nav_menu_item() applied.
-	 */
-	public function value_as_wp_post_nav_menu_item() {
-		$item = (object) $this->value();
-		unset( $item->nav_menu_term_id );
-
-		$item->post_status = $item->status;
-		unset( $item->status );
-
-		$item->post_type = 'nav_menu_item';
-		$item->menu_order = $item->position;
-		unset( $item->position );
-
-		if ( empty( $item->original_title ) ) {
-			$item->original_title = $this->get_original_title( $item );
-		}
-		if ( empty( $item->title ) && ! empty( $item->original_title ) ) {
-			$item->title = $item->original_title;
-		}
-		if ( $item->title ) {
-			$item->post_title = $item->title;
-		}
-
-		$item->ID = $this->post_id;
-		$item->db_id = $this->post_id;
-		$post = new WP_Post( (object) $item );
-
-		if ( empty( $post->post_author ) ) {
-			$post->post_author = get_current_user_id();
-		}
-
-		if ( ! isset( $post->type_label ) ) {
-			if ( 'post_type' === $post->type ) {
-				$object = get_post_type_object( $post->object );
-				if ( $object ) {
-					$post->type_label = $object->labels->singular_name;
-				} else {
-					$post->type_label = $post->object;
-				}
-			} elseif ( 'taxonomy' === $post->type ) {
-				$object = get_taxonomy( $post->object );
-				if ( $object ) {
-					$post->type_label = $object->labels->singular_name;
-				} else {
-					$post->type_label = $post->object;
-				}
-			} else {
-				$post->type_label = __( 'Custom Link' );
-			}
-		}
-
-		/** This filter is documented in wp-includes/nav-menu.php */
-		$post->attr_title = apply_filters( 'nav_menu_attr_title', $post->attr_title );
-
-		/** This filter is documented in wp-includes/nav-menu.php */
-		$post->description = apply_filters( 'nav_menu_description', wp_trim_words( $post->description, 200 ) );
-
-		/** This filter is documented in wp-includes/nav-menu.php */
-		$post = apply_filters( 'wp_setup_nav_menu_item', $post );
-
-		return $post;
-	}
-
-	/**
-	 * Sanitize an input.
-	 *
-	 * Note that parent::sanitize() erroneously does wp_unslash() on $value, but
-	 * we remove that in this override.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 *
-	 * @param array $menu_item_value The value to sanitize.
-	 * @return array|false|null Null if an input isn't valid. False if it is marked for deletion.
-	 *                          Otherwise the sanitized value.
-	 */
-	public function sanitize( $menu_item_value ) {
-		// Menu is marked for deletion.
-		if ( false === $menu_item_value ) {
-			return $menu_item_value;
-		}
-
-		// Invalid.
-		if ( ! is_array( $menu_item_value ) ) {
-			return null;
-		}
-
-		$default = array(
-			'object_id'        => 0,
-			'object'           => '',
-			'menu_item_parent' => 0,
-			'position'         => 0,
-			'type'             => 'custom',
-			'title'            => '',
-			'url'              => '',
-			'target'           => '',
-			'attr_title'       => '',
-			'description'      => '',
-			'classes'          => '',
-			'xfn'              => '',
-			'status'           => 'publish',
-			'original_title'   => '',
-			'nav_menu_term_id' => 0,
-			'_invalid'         => false,
-		);
-		$menu_item_value = array_merge( $default, $menu_item_value );
-		$menu_item_value = wp_array_slice_assoc( $menu_item_value, array_keys( $default ) );
-		$menu_item_value['position'] = intval( $menu_item_value['position'] );
-
-		foreach ( array( 'object_id', 'menu_item_parent', 'nav_menu_term_id' ) as $key ) {
-			// Note we need to allow negative-integer IDs for previewed objects not inserted yet.
-			$menu_item_value[ $key ] = intval( $menu_item_value[ $key ] );
-		}
-
-		foreach ( array( 'type', 'object', 'target' ) as $key ) {
-			$menu_item_value[ $key ] = sanitize_key( $menu_item_value[ $key ] );
-		}
-
-		foreach ( array( 'xfn', 'classes' ) as $key ) {
-			$value = $menu_item_value[ $key ];
-			if ( ! is_array( $value ) ) {
-				$value = explode( ' ', $value );
-			}
-			$menu_item_value[ $key ] = implode( ' ', array_map( 'sanitize_html_class', $value ) );
-		}
-
-		$menu_item_value['original_title'] = sanitize_text_field( $menu_item_value['original_title'] );
-
-		// Apply the same filters as when calling wp_insert_post().
-		$menu_item_value['title'] = wp_unslash( apply_filters( 'title_save_pre', wp_slash( $menu_item_value['title'] ) ) );
-		$menu_item_value['attr_title'] = wp_unslash( apply_filters( 'excerpt_save_pre', wp_slash( $menu_item_value['attr_title'] ) ) );
-		$menu_item_value['description'] = wp_unslash( apply_filters( 'content_save_pre', wp_slash( $menu_item_value['description'] ) ) );
-
-		$menu_item_value['url'] = esc_url_raw( $menu_item_value['url'] );
-		if ( 'publish' !== $menu_item_value['status'] ) {
-			$menu_item_value['status'] = 'draft';
-		}
-
-		$menu_item_value['_invalid'] = (bool) $menu_item_value['_invalid'];
-
-		/** This filter is documented in wp-includes/class-wp-customize-setting.php */
-		return apply_filters( "customize_sanitize_{$this->id}", $menu_item_value, $this );
-	}
-
-	/**
-	 * Creates/updates the nav_menu_item post for this setting.
-	 *
-	 * Any created menu items will have their assigned post IDs exported to the client
-	 * via the {@see 'customize_save_response'} filter. Likewise, any errors will be
-	 * exported to the client via the customize_save_response() filter.
-	 *
-	 * To delete a menu, the client can send false as the value.
-	 *
-	 * @since 4.3.0
-	 * @access protected
-	 *
-	 * @see wp_update_nav_menu_item()
-	 *
-	 * @param array|false $value The menu item array to update. If false, then the menu item will be deleted
-	 *                           entirely. See WP_Customize_Nav_Menu_Item_Setting::$default for what the value
-	 *                           should consist of.
-	 * @return null|void
-	 */
-	protected function update( $value ) {
-		if ( $this->is_updated ) {
-			return;
-		}
-
-		$this->is_updated = true;
-		$is_placeholder   = ( $this->post_id < 0 );
-		$is_delete        = ( false === $value );
-
-		// Update the cached value.
-		$this->value = $value;
-
-		add_filter( 'customize_save_response', array( $this, 'amend_customize_save_response' ) );
-
-		if ( $is_delete ) {
-			// If the current setting post is a placeholder, a delete request is a no-op.
-			if ( $is_placeholder ) {
-				$this->update_status = 'deleted';
-			} else {
-				$r = wp_delete_post( $this->post_id, true );
-
-				if ( false === $r ) {
-					$this->update_error  = new WP_Error( 'delete_failure' );
-					$this->update_status = 'error';
-				} else {
-					$this->update_status = 'deleted';
-				}
-				// @todo send back the IDs for all associated nav menu items deleted, so these settings (and controls) can be removed from Customizer?
-			}
-		} else {
-
-			// Handle saving menu items for menus that are being newly-created.
-			if ( $value['nav_menu_term_id'] < 0 ) {
-				$nav_menu_setting_id = sprintf( 'nav_menu[%s]', $value['nav_menu_term_id'] );
-				$nav_menu_setting    = $this->manager->get_setting( $nav_menu_setting_id );
-
-				if ( ! $nav_menu_setting || ! ( $nav_menu_setting instanceof WP_Customize_Nav_Menu_Setting ) ) {
-					$this->update_status = 'error';
-					$this->update_error  = new WP_Error( 'unexpected_nav_menu_setting' );
-					return;
-				}
-
-				if ( false === $nav_menu_setting->save() ) {
-					$this->update_status = 'error';
-					$this->update_error  = new WP_Error( 'nav_menu_setting_failure' );
-					return;
-				}
-
-				if ( $nav_menu_setting->previous_term_id !== intval( $value['nav_menu_term_id'] ) ) {
-					$this->update_status = 'error';
-					$this->update_error  = new WP_Error( 'unexpected_previous_term_id' );
-					return;
-				}
-
-				$value['nav_menu_term_id'] = $nav_menu_setting->term_id;
-			}
-
-			// Handle saving a nav menu item that is a child of a nav menu item being newly-created.
-			if ( $value['menu_item_parent'] < 0 ) {
-				$parent_nav_menu_item_setting_id = sprintf( 'nav_menu_item[%s]', $value['menu_item_parent'] );
-				$parent_nav_menu_item_setting    = $this->manager->get_setting( $parent_nav_menu_item_setting_id );
-
-				if ( ! $parent_nav_menu_item_setting || ! ( $parent_nav_menu_item_setting instanceof WP_Customize_Nav_Menu_Item_Setting ) ) {
-					$this->update_status = 'error';
-					$this->update_error  = new WP_Error( 'unexpected_nav_menu_item_setting' );
-					return;
-				}
-
-				if ( false === $parent_nav_menu_item_setting->save() ) {
-					$this->update_status = 'error';
-					$this->update_error  = new WP_Error( 'nav_menu_item_setting_failure' );
-					return;
-				}
-
-				if ( $parent_nav_menu_item_setting->previous_post_id !== intval( $value['menu_item_parent'] ) ) {
-					$this->update_status = 'error';
-					$this->update_error  = new WP_Error( 'unexpected_previous_post_id' );
-					return;
-				}
-
-				$value['menu_item_parent'] = $parent_nav_menu_item_setting->post_id;
-			}
-
-			// Insert or update menu.
-			$menu_item_data = array(
-				'menu-item-object-id'   => $value['object_id'],
-				'menu-item-object'      => $value['object'],
-				'menu-item-parent-id'   => $value['menu_item_parent'],
-				'menu-item-position'    => $value['position'],
-				'menu-item-type'        => $value['type'],
-				'menu-item-title'       => $value['title'],
-				'menu-item-url'         => $value['url'],
-				'menu-item-description' => $value['description'],
-				'menu-item-attr-title'  => $value['attr_title'],
-				'menu-item-target'      => $value['target'],
-				'menu-item-classes'     => $value['classes'],
-				'menu-item-xfn'         => $value['xfn'],
-				'menu-item-status'      => $value['status'],
-			);
-
-			$r = wp_update_nav_menu_item(
-				$value['nav_menu_term_id'],
-				$is_placeholder ? 0 : $this->post_id,
-				wp_slash( $menu_item_data )
-			);
-
-			if ( is_wp_error( $r ) ) {
-				$this->update_status = 'error';
-				$this->update_error = $r;
-			} else {
-				if ( $is_placeholder ) {
-					$this->previous_post_id = $this->post_id;
-					$this->post_id = $r;
-					$this->update_status = 'inserted';
-				} else {
-					$this->update_status = 'updated';
-				}
-			}
-		}
-
-	}
-
-	/**
-	 * Export data for the JS client.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 *
-	 * @see WP_Customize_Nav_Menu_Item_Setting::update()
-	 *
-	 * @param array $data Additional information passed back to the 'saved' event on `wp.customize`.
-	 * @return array Save response data.
-	 */
-	public function amend_customize_save_response( $data ) {
-		if ( ! isset( $data['nav_menu_item_updates'] ) ) {
-			$data['nav_menu_item_updates'] = array();
-		}
-
-		$data['nav_menu_item_updates'][] = array(
-			'post_id'          => $this->post_id,
-			'previous_post_id' => $this->previous_post_id,
-			'error'            => $this->update_error ? $this->update_error->get_error_code() : null,
-			'status'           => $this->update_status,
-		);
-		return $data;
-	}
-}
Index: www/wp-admin/themes.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/themes.php	(revision 38565)
+++ www/wp-admin/themes.php	(revision 38565)
@@ -1,489 +0,0 @@
-<?php
-/**
- * Themes administration panel.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-if ( ! current_user_can( 'switch_themes' ) && ! current_user_can( 'edit_theme_options' ) ) {
-	wp_die(
-		'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-		'<p>' . __( 'Sorry, you are not allowed to edit theme options on this site.' ) . '</p>',
-		403
-	);
-}
-
-if ( current_user_can( 'switch_themes' ) && isset($_GET['action'] ) ) {
-	if ( 'activate' == $_GET['action'] ) {
-		check_admin_referer('switch-theme_' . $_GET['stylesheet']);
-		$theme = wp_get_theme( $_GET['stylesheet'] );
-
-		if ( ! $theme->exists() || ! $theme->is_allowed() ) {
-			wp_die(
-				'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-				'<p>' . __( 'The requested theme does not exist.' ) . '</p>',
-				403
-			);
-		}
-
-		switch_theme( $theme->get_stylesheet() );
-		wp_redirect( admin_url('themes.php?activated=true') );
-		exit;
-	} elseif ( 'delete' == $_GET['action'] ) {
-		check_admin_referer('delete-theme_' . $_GET['stylesheet']);
-		$theme = wp_get_theme( $_GET['stylesheet'] );
-
-		if ( ! current_user_can( 'delete_themes' ) ) {
-			wp_die(
-				'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-				'<p>' . __( 'Sorry, you are not allowed to delete this item.' ) . '</p>',
-				403
-			);
-		}
-
-		if ( ! $theme->exists() ) {
-			wp_die(
-				'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-				'<p>' . __( 'The requested theme does not exist.' ) . '</p>',
-				403
-			);
-		}
-
-		$active = wp_get_theme();
-		if ( $active->get( 'Template' ) == $_GET['stylesheet'] ) {
-			wp_redirect( admin_url( 'themes.php?delete-active-child=true' ) );
-		} else {
-			delete_theme( $_GET['stylesheet'] );
-			wp_redirect( admin_url( 'themes.php?deleted=true' ) );
-		}
-		exit;
-	}
-}
-
-$title = __('Manage Themes');
-$parent_file = 'themes.php';
-
-// Help tab: Overview
-if ( current_user_can( 'switch_themes' ) ) {
-	$help_overview  = '<p>' . __( 'This screen is used for managing your installed themes. Aside from the default theme(s) included with your WordPress installation, themes are designed and developed by third parties.' ) . '</p>' .
-		'<p>' . __( 'From this screen you can:' ) . '</p>' .
-		'<ul><li>' . __( 'Hover or tap to see Activate and Live Preview buttons' ) . '</li>' .
-		'<li>' . __( 'Click on the theme to see the theme name, version, author, description, tags, and the Delete link' ) . '</li>' .
-		'<li>' . __( 'Click Customize for the current theme or Live Preview for any other theme to see a live preview' ) . '</li></ul>' .
-		'<p>' . __( 'The current theme is displayed highlighted as the first theme.' ) . '</p>' .
-		'<p>' . __( 'The search for installed themes will search for terms in their name, description, author, or tag.' ) . ' <span id="live-search-desc">' . __( 'The search results will be updated as you type.' ) . '</span></p>';
-
-	get_current_screen()->add_help_tab( array(
-		'id'      => 'overview',
-		'title'   => __( 'Overview' ),
-		'content' => $help_overview
-	) );
-} // switch_themes
-
-// Help tab: Adding Themes
-if ( current_user_can( 'install_themes' ) ) {
-	if ( is_multisite() ) {
-		$help_install = '<p>' . __('Installing themes on Multisite can only be done from the Network Admin section.') . '</p>';
-	} else {
-		$help_install = '<p>' . sprintf( __('If you would like to see more themes to choose from, click on the &#8220;Add New&#8221; button and you will be able to browse or search for additional themes from the <a href="%s" target="_blank">WordPress Theme Directory</a>. Themes in the WordPress Theme Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they&#8217;re free!'), __( 'https://wordpress.org/themes/' ) ) . '</p>';
-	}
-
-	get_current_screen()->add_help_tab( array(
-		'id'      => 'adding-themes',
-		'title'   => __('Adding Themes'),
-		'content' => $help_install
-	) );
-} // install_themes
-
-// Help tab: Previewing and Customizing
-if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
-	$help_customize =
-		'<p>' . __( 'Tap or hover on any theme then click the Live Preview button to see a live preview of that theme and change theme options in a separate, full-screen view. You can also find a Live Preview button at the bottom of the theme details screen. Any installed theme can be previewed and customized in this way.' ) . '</p>'.
-		'<p>' . __( 'The theme being previewed is fully interactive &mdash; navigate to different pages to see how the theme handles posts, archives, and other page templates. The settings may differ depending on what theme features the theme being previewed supports. To accept the new settings and activate the theme all in one step, click the Save &amp; Activate button above the menu.' ) . '</p>' .
-		'<p>' . __( 'When previewing on smaller monitors, you can use the collapse icon at the bottom of the left-hand pane. This will hide the pane, giving you more room to preview your site in the new theme. To bring the pane back, click on the collapse icon again.' ) . '</p>';
-
-	get_current_screen()->add_help_tab( array(
-		'id'		=> 'customize-preview-themes',
-		'title'		=> __( 'Previewing and Customizing' ),
-		'content'	=> $help_customize
-	) );
-} // edit_theme_options && customize
-
-get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
-	'<p>' . __( '<a href="https://codex.wordpress.org/Using_Themes" target="_blank">Documentation on Using Themes</a>' ) . '</p>' .
-	'<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
-);
-
-if ( current_user_can( 'switch_themes' ) ) {
-	$themes = wp_prepare_themes_for_js();
-} else {
-	$themes = wp_prepare_themes_for_js( array( wp_get_theme() ) );
-}
-wp_reset_vars( array( 'theme', 'search' ) );
-
-wp_localize_script( 'theme', '_wpThemeSettings', array(
-	'themes'   => $themes,
-	'settings' => array(
-		'canInstall'    => ( ! is_multisite() && current_user_can( 'install_themes' ) ),
-		'installURI'    => ( ! is_multisite() && current_user_can( 'install_themes' ) ) ? admin_url( 'theme-install.php' ) : null,
-		'confirmDelete' => __( "Are you sure you want to delete this theme?\n\nClick 'Cancel' to go back, 'OK' to confirm the delete." ),
-		'adminUrl'      => parse_url( admin_url(), PHP_URL_PATH ),
-	),
- 	'l10n' => array(
- 		'addNew'            => __( 'Add New Theme' ),
- 		'search'            => __( 'Search Installed Themes' ),
- 		'searchPlaceholder' => __( 'Search installed themes...' ), // placeholder (no ellipsis)
-		'themesFound'       => __( 'Number of Themes found: %d' ),
-		'noThemesFound'     => __( 'No themes found. Try a different search.' ),
-  	),
-) );
-
-add_thickbox();
-wp_enqueue_script( 'theme' );
-wp_enqueue_script( 'updates' );
-wp_enqueue_script( 'customize-loader' );
-
-require_once( ABSPATH . 'wp-admin/admin-header.php' );
-?>
-
-<div class="wrap">
-	<h1><?php esc_html_e( 'Themes' ); ?>
-		<span class="title-count theme-count"><?php echo count( $themes ); ?></span>
-	<?php if ( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?>
-		<a href="<?php echo admin_url( 'theme-install.php' ); ?>" class="hide-if-no-js page-title-action"><?php echo esc_html_x( 'Add New', 'Add new theme' ); ?></a>
-	<?php endif; ?>
-	</h1>
-<?php
-if ( ! validate_current_theme() || isset( $_GET['broken'] ) ) : ?>
-<div id="message1" class="updated notice is-dismissible"><p><?php _e('The active theme is broken. Reverting to the default theme.'); ?></p></div>
-<?php elseif ( isset($_GET['activated']) ) :
-		if ( isset( $_GET['previewed'] ) ) { ?>
-		<div id="message2" class="updated notice is-dismissible"><p><?php _e( 'Settings saved and theme activated.' ); ?> <a href="<?php echo home_url( '/' ); ?>"><?php _e( 'Visit site' ); ?></a></p></div>
-		<?php } else { ?>
-<div id="message2" class="updated notice is-dismissible"><p><?php _e( 'New theme activated.' ); ?> <a href="<?php echo home_url( '/' ); ?>"><?php _e( 'Visit site' ); ?></a></p></div><?php
-		}
-	elseif ( isset($_GET['deleted']) ) : ?>
-<div id="message3" class="updated notice is-dismissible"><p><?php _e('Theme deleted.') ?></p></div>
-<?php elseif ( isset( $_GET['delete-active-child'] ) ) : ?>
-	<div id="message4" class="error"><p><?php _e( 'You cannot delete a theme while it has an active child theme.' ); ?></p></div>
-<?php
-endif;
-
-$ct = wp_get_theme();
-
-if ( $ct->errors() && ( ! is_multisite() || current_user_can( 'manage_network_themes' ) ) ) {
-	echo '<div class="error"><p>' . sprintf( __( 'ERROR: %s' ), $ct->errors()->get_error_message() ) . '</p></div>';
-}
-
-/*
-// Certain error codes are less fatal than others. We can still display theme information in most cases.
-if ( ! $ct->errors() || ( 1 == count( $ct->errors()->get_error_codes() )
-	&& in_array( $ct->errors()->get_error_code(), array( 'theme_no_parent', 'theme_parent_invalid', 'theme_no_index' ) ) ) ) : ?>
-*/
-
-	// Pretend you didn't see this.
-	$current_theme_actions = array();
-	if ( is_array( $submenu ) && isset( $submenu['themes.php'] ) ) {
-		foreach ( (array) $submenu['themes.php'] as $item) {
-			$class = '';
-			if ( 'themes.php' == $item[2] || 'theme-editor.php' == $item[2] || 0 === strpos( $item[2], 'customize.php' ) )
-				continue;
-			// 0 = name, 1 = capability, 2 = file
-			if ( ( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file)) )
-				$class = ' current';
-			if ( !empty($submenu[$item[2]]) ) {
-				$submenu[$item[2]] = array_values($submenu[$item[2]]); // Re-index.
-				$menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]);
-				if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook))
-					$current_theme_actions[] = "<a class='button button-secondary$class' href='admin.php?page={$submenu[$item[2]][0][2]}'>{$item[0]}</a>";
-				else
-					$current_theme_actions[] = "<a class='button button-secondary$class' href='{$submenu[$item[2]][0][2]}'>{$item[0]}</a>";
-			} elseif ( ! empty( $item[2] ) && current_user_can( $item[1] ) ) {
-				$menu_file = $item[2];
-
-				if ( current_user_can( 'customize' ) ) {
-					if ( 'custom-header' === $menu_file ) {
-						$current_theme_actions[] = "<a class='button button-secondary hide-if-no-customize$class' href='customize.php?autofocus[control]=header_image'>{$item[0]}</a>";
-					} elseif ( 'custom-background' === $menu_file ) {
-						$current_theme_actions[] = "<a class='button button-secondary hide-if-no-customize$class' href='customize.php?autofocus[control]=background_image'>{$item[0]}</a>";
-					}
-				}
-
-				if ( false !== ( $pos = strpos( $menu_file, '?' ) ) ) {
-					$menu_file = substr( $menu_file, 0, $pos );
-				}
-
-				if ( file_exists( ABSPATH . "wp-admin/$menu_file" ) ) {
-					$current_theme_actions[] = "<a class='button button-secondary$class' href='{$item[2]}'>{$item[0]}</a>";
-				} else {
-					$current_theme_actions[] = "<a class='button button-secondary$class' href='themes.php?page={$item[2]}'>{$item[0]}</a>";
-				}
-			}
-		}
-	}
-
-?>
-
-<div class="theme-browser">
-	<div class="themes wp-clearfix">
-
-<?php
-/*
- * This PHP is synchronized with the tmpl-theme template below!
- */
-
-foreach ( $themes as $theme ) :
-	$aria_action = esc_attr( $theme['id'] . '-action' );
-	$aria_name   = esc_attr( $theme['id'] . '-name' );
-	?>
-<div class="theme<?php if ( $theme['active'] ) echo ' active'; ?>" tabindex="0" aria-describedby="<?php echo $aria_action . ' ' . $aria_name; ?>">
-	<?php if ( ! empty( $theme['screenshot'][0] ) ) { ?>
-		<div class="theme-screenshot">
-			<img src="<?php echo $theme['screenshot'][0]; ?>" alt="" />
-		</div>
-	<?php } else { ?>
-		<div class="theme-screenshot blank"></div>
-	<?php } ?>
-
-	<?php if ( $theme['hasUpdate'] ) : ?>
-		<div class="update-message notice inline notice-warning notice-alt">
-			<p><?php _e( 'New version available. <button class="button-link" type="button">Update now</button>' ); ?></p>
-		</div>
-	<?php endif; ?>
-
-	<span class="more-details" id="<?php echo $aria_action; ?>"><?php _e( 'Theme Details' ); ?></span>
-	<div class="theme-author"><?php printf( __( 'By %s' ), $theme['author'] ); ?></div>
-
-	<?php if ( $theme['active'] ) { ?>
-		<h2 class="theme-name" id="<?php echo $aria_name; ?>">
-			<?php
-			/* translators: %s: theme name */
-			printf( __( '<span>Active:</span> %s' ), $theme['name'] );
-			?>
-		</h2>
-	<?php } else { ?>
-		<h2 class="theme-name" id="<?php echo $aria_name; ?>"><?php echo $theme['name']; ?></h2>
-	<?php } ?>
-
-	<div class="theme-actions">
-
-	<?php if ( $theme['active'] ) { ?>
-		<?php if ( $theme['actions']['customize'] && current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { ?>
-			<a class="button button-primary customize load-customize hide-if-no-customize" href="<?php echo $theme['actions']['customize']; ?>"><?php _e( 'Customize' ); ?></a>
-		<?php } ?>
-	<?php } else { ?>
-		<?php
-		/* translators: %s: Theme name */
-		$aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
-		?>
-		<a class="button button-secondary activate" href="<?php echo $theme['actions']['activate']; ?>" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
-		<?php if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { ?>
-			<a class="button button-primary load-customize hide-if-no-customize" href="<?php echo $theme['actions']['customize']; ?>"><?php _e( 'Live Preview' ); ?></a>
-		<?php } ?>
-	<?php } ?>
-
-	</div>
-</div>
-<?php endforeach; ?>
-	</div>
-</div>
-<div class="theme-overlay"></div>
-
-<p class="no-themes"><?php _e( 'No themes found. Try a different search.' ); ?></p>
-
-<?php
-// List broken themes, if any.
-if ( ! is_multisite() && current_user_can('edit_themes') && $broken_themes = wp_get_themes( array( 'errors' => true ) ) ) {
-?>
-
-<div class="broken-themes">
-<h3><?php _e('Broken Themes'); ?></h3>
-<p><?php _e( 'The following themes are installed but incomplete.' ); ?></p>
-
-<?php
-$can_delete = current_user_can( 'delete_themes' );
-$can_install = current_user_can( 'install_themes' );
-?>
-<table>
-	<tr>
-		<th><?php _ex('Name', 'theme name'); ?></th>
-		<th><?php _e('Description'); ?></th>
-		<?php if ( $can_delete ) { ?>
-			<td></td>
-		<?php } ?>
-		<?php if ( $can_install ) { ?>
-			<td></td>
-		<?php } ?>
-	</tr>
-	<?php foreach ( $broken_themes as $broken_theme ) : ?>
-		<tr>
-			<td><?php echo $broken_theme->get( 'Name' ) ? $broken_theme->display( 'Name' ) : $broken_theme->get_stylesheet(); ?></td>
-			<td><?php echo $broken_theme->errors()->get_error_message(); ?></td>
-			<?php
-			if ( $can_delete ) {
-				$stylesheet = $broken_theme->get_stylesheet();
-				$delete_url = add_query_arg( array(
-					'action'     => 'delete',
-					'stylesheet' => urlencode( $stylesheet ),
-				), admin_url( 'themes.php' ) );
-				$delete_url = wp_nonce_url( $delete_url, 'delete-theme_' . $stylesheet );
-				?>
-				<td><a href="<?php echo esc_url( $delete_url ); ?>" class="button button-secondary delete-theme"><?php _e( 'Delete' ); ?></a></td>
-				<?php
-			}
-
-			if ( $can_install && 'theme_no_parent' === $broken_theme->errors()->get_error_code() ) {
-				$parent_theme_name = $broken_theme->get( 'Template' );
-				$parent_theme = themes_api( 'theme_information', array( 'slug' => urlencode( $parent_theme_name ) ) );
-
-				if ( ! is_wp_error( $parent_theme ) ) {
-					$install_url = add_query_arg( array(
-						'action' => 'install-theme',
-						'theme'  => urlencode( $parent_theme_name ),
-					), admin_url( 'update.php' ) );
-					$install_url = wp_nonce_url( $install_url, 'install-theme_' . $parent_theme_name );
-					?>
-					<td><a href="<?php echo esc_url( $install_url ); ?>" class="button button-secondary install-theme"><?php _e( 'Install Parent Theme' ); ?></a></td>
-					<?php
-				}
-			}
-			?>
-		</tr>
-	<?php endforeach; ?>
-</table>
-</div>
-
-<?php
-}
-?>
-</div><!-- .wrap -->
-
-<?php
-/*
- * The tmpl-theme template is synchronized with PHP above!
- */
-?>
-<script id="tmpl-theme" type="text/template">
-	<# if ( data.screenshot[0] ) { #>
-		<div class="theme-screenshot">
-			<img src="{{ data.screenshot[0] }}" alt="" />
-		</div>
-	<# } else { #>
-		<div class="theme-screenshot blank"></div>
-	<# } #>
-
-	<# if ( data.hasUpdate ) { #>
-		<div class="update-message notice inline notice-warning notice-alt"><p><?php _e( 'New version available. <button class="button-link" type="button">Update now</button>' ); ?></p></div>
-	<# } #>
-
-	<span class="more-details" id="{{ data.id }}-action"><?php _e( 'Theme Details' ); ?></span>
-	<div class="theme-author">
-		<?php
-		/* translators: %s: Theme author name */
-		printf( __( 'By %s' ), '{{{ data.author }}}' );
-		?>
-	</div>
-
-	<# if ( data.active ) { #>
-		<h2 class="theme-name" id="{{ data.id }}-name">
-			<?php
-			/* translators: %s: Theme name */
-			printf( __( '<span>Active:</span> %s' ), '{{{ data.name }}}' );
-			?>
-		</h2>
-	<# } else { #>
-		<h2 class="theme-name" id="{{ data.id }}-name">{{{ data.name }}}</h2>
-	<# } #>
-
-	<div class="theme-actions">
-		<# if ( data.active ) { #>
-			<# if ( data.actions.customize ) { #>
-				<a class="button button-primary customize load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Customize' ); ?></a>
-			<# } #>
-		<# } else { #>
-			<?php
-			/* translators: %s: Theme name */
-			$aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
-			?>
-			<a class="button button-secondary activate" href="{{{ data.actions.activate }}}" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a>
-			<a class="button button-primary load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Live Preview' ); ?></a>
-		<# } #>
-	</div>
-</script>
-
-<script id="tmpl-theme-single" type="text/template">
-	<div class="theme-backdrop"></div>
-	<div class="theme-wrap wp-clearfix">
-		<div class="theme-header">
-			<button class="left dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show previous theme' ); ?></span></button>
-			<button class="right dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show next theme' ); ?></span></button>
-			<button class="close dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Close details dialog' ); ?></span></button>
-		</div>
-		<div class="theme-about wp-clearfix">
-			<div class="theme-screenshots">
-			<# if ( data.screenshot[0] ) { #>
-				<div class="screenshot"><img src="{{ data.screenshot[0] }}" alt="" /></div>
-			<# } else { #>
-				<div class="screenshot blank"></div>
-			<# } #>
-			</div>
-
-			<div class="theme-info">
-				<# if ( data.active ) { #>
-					<span class="current-label"><?php _e( 'Current Theme' ); ?></span>
-				<# } #>
-				<h2 class="theme-name">{{{ data.name }}}<span class="theme-version"><?php printf( __( 'Version: %s' ), '{{ data.version }}' ); ?></span></h2>
-				<p class="theme-author"><?php printf( __( 'By %s' ), '{{{ data.authorAndUri }}}' ); ?></p>
-
-				<# if ( data.hasUpdate ) { #>
-				<div class="notice notice-warning notice-alt notice-large">
-					<h3 class="notice-title"><?php _e( 'Update Available' ); ?></h3>
-					{{{ data.update }}}
-				</div>
-				<# } #>
-				<p class="theme-description">{{{ data.description }}}</p>
-
-				<# if ( data.parent ) { #>
-					<p class="parent-theme"><?php printf( __( 'This is a child theme of %s.' ), '<strong>{{{ data.parent }}}</strong>' ); ?></p>
-				<# } #>
-
-				<# if ( data.tags ) { #>
-					<p class="theme-tags"><span><?php _e( 'Tags:' ); ?></span> {{{ data.tags }}}</p>
-				<# } #>
-			</div>
-		</div>
-
-		<div class="theme-actions">
-			<div class="active-theme">
-				<a href="{{{ data.actions.customize }}}" class="button button-primary customize load-customize hide-if-no-customize"><?php _e( 'Customize' ); ?></a>
-				<?php echo implode( ' ', $current_theme_actions ); ?>
-			</div>
-			<div class="inactive-theme">
-				<?php
-				/* translators: %s: Theme name */
-				$aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
-				?>
-				<# if ( data.actions.activate ) { #>
-					<a href="{{{ data.actions.activate }}}" class="button button-secondary activate" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a>
-				<# } #>
-				<a href="{{{ data.actions.customize }}}" class="button button-primary load-customize hide-if-no-customize"><?php _e( 'Live Preview' ); ?></a>
-			</div>
-
-			<# if ( ! data.active && data.actions['delete'] ) { #>
-				<a href="{{{ data.actions['delete'] }}}" class="button button-secondary delete-theme"><?php _e( 'Delete' ); ?></a>
-			<# } #>
-		</div>
-	</div>
-</script>
-
-<?php
-wp_print_request_filesystem_credentials_modal();
-wp_print_admin_notice_templates();
-wp_print_update_row_templates();
-
-require( ABSPATH . 'wp-admin/admin-footer.php' );
Index: www/wp-includes/autoload/customize/class-wp-customize-site-icon-control.php
===================================================================
--- www/wp-includes/autoload/customize/class-wp-customize-site-icon-control.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/customize/class-wp-customize-site-icon-control.php	(revision UNDEFINED)
@@ -1,103 +0,0 @@
-<?php
-/**
- * Customize API: WP_Customize_Site_Icon_Control class
- *
- * @package WordPress
- * @subpackage Customize
- * @since 4.4.0
- */
-
-/**
- * Customize Site Icon control class.
- *
- * Used only for custom functionality in JavaScript.
- *
- * @since 4.3.0
- *
- * @see WP_Customize_Cropped_Image_Control
- */
-class WP_Customize_Site_Icon_Control extends WP_Customize_Cropped_Image_Control {
-
-	/**
-	 * Control type.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var string
-	 */
-	public $type = 'site_icon';
-
-	/**
-	 * Constructor.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 *
-	 * @param WP_Customize_Manager $manager Customizer bootstrap instance.
-	 * @param string               $id      Control ID.
-	 * @param array                $args    Optional. Arguments to override class property defaults.
-	 */
-	public function __construct( $manager, $id, $args = array() ) {
-		parent::__construct( $manager, $id, $args );
-		add_action( 'customize_controls_print_styles', 'wp_site_icon', 99 );
-	}
-
-	/**
-	 * Renders a JS template for the content of the site icon control.
-	 *
-	 * @since 4.5.0
-	 * @access public
-	 */
-	public function content_template() {
-		?>
-		<label for="{{ data.settings['default'] }}-button">
-			<# if ( data.label ) { #>
-				<span class="customize-control-title">{{ data.label }}</span>
-			<# } #>
-			<# if ( data.description ) { #>
-				<span class="description customize-control-description">{{{ data.description }}}</span>
-			<# } #>
-		</label>
-
-		<# if ( data.attachment && data.attachment.id ) { #>
-			<div class="attachment-media-view">
-				<# if ( data.attachment.sizes ) { #>
-					<div class="site-icon-preview">
-						<div class="favicon-preview">
-							<img src="<?php echo esc_url( admin_url( 'images/' . ( is_rtl() ? 'browser-rtl.png' : 'browser.png' ) ) ); ?>" class="browser-preview" width="182" alt="" />
-
-							<div class="favicon">
-								<img src="{{ data.attachment.sizes.full.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/>
-							</div>
-							<span class="browser-title" aria-hidden="true"><?php bloginfo( 'name' ); ?></span>
-						</div>
-						<img class="app-icon-preview" src="{{ data.attachment.sizes.full.url }}" alt="<?php esc_attr_e( 'Preview as an app icon' ); ?>"/>
-					</div>
-				<# } #>
-				<div class="actions">
-					<# if ( data.canUpload ) { #>
-						<button type="button" class="button remove-button"><?php echo $this->button_labels['remove']; ?></button>
-						<button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button"><?php echo $this->button_labels['change']; ?></button>
-						<div style="clear:both"></div>
-					<# } #>
-				</div>
-			</div>
-		<# } else { #>
-			<div class="attachment-media-view">
-				<div class="placeholder">
-					<?php echo $this->button_labels['placeholder']; ?>
-				</div>
-				<div class="actions">
-					<# if ( data.defaultAttachment ) { #>
-						<button type="button" class="button default-button"><?php echo $this->button_labels['default']; ?></button>
-					<# } #>
-					<# if ( data.canUpload ) { #>
-						<button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button"><?php echo $this->button_labels['select']; ?></button>
-					<# } #>
-					<div style="clear:both"></div>
-				</div>
-			</div>
-		<# } #>
-		<?php
-	}
-}
Index: www/wp-includes/functions.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/functions.php	(revision 38565)
+++ www/wp-includes/functions.php	(revision 38565)
@@ -1,5533 +0,0 @@
-<?php
-/**
- * Main WordPress API
- *
- * @package WordPress
- */
-
-require( ABSPATH . WPINC . '/option.php' );
-
-/**
- * Convert given date string into a different format.
- *
- * $format should be either a PHP date format string, e.g. 'U' for a Unix
- * timestamp, or 'G' for a Unix timestamp assuming that $date is GMT.
- *
- * If $translate is true then the given date and format string will
- * be passed to date_i18n() for translation.
- *
- * @since 0.71
- *
- * @param string $format    Format of the date to return.
- * @param string $date      Date string to convert.
- * @param bool   $translate Whether the return date should be translated. Default true.
- * @return string|int|bool Formatted date string or Unix timestamp. False if $date is empty.
- */
-function mysql2date( $format, $date, $translate = true ) {
-	if ( empty( $date ) )
-		return false;
-
-	if ( 'G' == $format )
-		return strtotime( $date . ' +0000' );
-
-	$i = strtotime( $date );
-
-	if ( 'U' == $format )
-		return $i;
-
-	if ( $translate )
-		return date_i18n( $format, $i );
-	else
-		return date( $format, $i );
-}
-
-/**
- * Retrieve the current time based on specified type.
- *
- * The 'mysql' type will return the time in the format for MySQL DATETIME field.
- * The 'timestamp' type will return the current timestamp.
- * Other strings will be interpreted as PHP date formats (e.g. 'Y-m-d').
- *
- * If $gmt is set to either '1' or 'true', then both types will use GMT time.
- * if $gmt is false, the output is adjusted with the GMT offset in the WordPress option.
- *
- * @since 1.0.0
- *
- * @param string   $type Type of time to retrieve. Accepts 'mysql', 'timestamp', or PHP date
- *                       format string (e.g. 'Y-m-d').
- * @param int|bool $gmt  Optional. Whether to use GMT timezone. Default false.
- * @return int|string Integer if $type is 'timestamp', string otherwise.
- */
-function current_time( $type, $gmt = 0 ) {
-	switch ( $type ) {
-		case 'mysql':
-			return ( $gmt ) ? gmdate( 'Y-m-d H:i:s' ) : gmdate( 'Y-m-d H:i:s', ( time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ) );
-		case 'timestamp':
-			return ( $gmt ) ? time() : time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );
-		default:
-			return ( $gmt ) ? date( $type ) : date( $type, time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) );
-	}
-}
-
-/**
- * Retrieve the date in localized format, based on timestamp.
- *
- * If the locale specifies the locale month and weekday, then the locale will
- * take over the format for the date. If it isn't, then the date format string
- * will be used instead.
- *
- * @since 0.71
- *
- * @global WP_Locale $wp_locale
- *
- * @param string   $dateformatstring Format to display the date.
- * @param bool|int $unixtimestamp    Optional. Unix timestamp. Default false.
- * @param bool     $gmt              Optional. Whether to use GMT timezone. Default false.
- *
- * @return string The date, translated if locale specifies it.
- */
-function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) {
-	global $wp_locale;
-	$i = $unixtimestamp;
-
-	if ( false === $i ) {
-		if ( ! $gmt )
-			$i = current_time( 'timestamp' );
-		else
-			$i = time();
-		// we should not let date() interfere with our
-		// specially computed timestamp
-		$gmt = true;
-	}
-
-	/*
-	 * Store original value for language with untypical grammars.
-	 * See https://core.trac.wordpress.org/ticket/9396
-	 */
-	$req_format = $dateformatstring;
-
-	$datefunc = $gmt? 'gmdate' : 'date';
-
-	if ( ( !empty( $wp_locale->month ) ) && ( !empty( $wp_locale->weekday ) ) ) {
-		$datemonth = $wp_locale->get_month( $datefunc( 'm', $i ) );
-		$datemonth_abbrev = $wp_locale->get_month_abbrev( $datemonth );
-		$dateweekday = $wp_locale->get_weekday( $datefunc( 'w', $i ) );
-		$dateweekday_abbrev = $wp_locale->get_weekday_abbrev( $dateweekday );
-		$datemeridiem = $wp_locale->get_meridiem( $datefunc( 'a', $i ) );
-		$datemeridiem_capital = $wp_locale->get_meridiem( $datefunc( 'A', $i ) );
-		$dateformatstring = ' '.$dateformatstring;
-		$dateformatstring = preg_replace( "/([^\\\])D/", "\\1" . backslashit( $dateweekday_abbrev ), $dateformatstring );
-		$dateformatstring = preg_replace( "/([^\\\])F/", "\\1" . backslashit( $datemonth ), $dateformatstring );
-		$dateformatstring = preg_replace( "/([^\\\])l/", "\\1" . backslashit( $dateweekday ), $dateformatstring );
-		$dateformatstring = preg_replace( "/([^\\\])M/", "\\1" . backslashit( $datemonth_abbrev ), $dateformatstring );
-		$dateformatstring = preg_replace( "/([^\\\])a/", "\\1" . backslashit( $datemeridiem ), $dateformatstring );
-		$dateformatstring = preg_replace( "/([^\\\])A/", "\\1" . backslashit( $datemeridiem_capital ), $dateformatstring );
-
-		$dateformatstring = substr( $dateformatstring, 1, strlen( $dateformatstring ) -1 );
-	}
-	$timezone_formats = array( 'P', 'I', 'O', 'T', 'Z', 'e' );
-	$timezone_formats_re = implode( '|', $timezone_formats );
-	if ( preg_match( "/$timezone_formats_re/", $dateformatstring ) ) {
-		$timezone_string = get_option( 'timezone_string' );
-		if ( $timezone_string ) {
-			$timezone_object = timezone_open( $timezone_string );
-			$date_object = date_create( null, $timezone_object );
-			foreach ( $timezone_formats as $timezone_format ) {
-				if ( false !== strpos( $dateformatstring, $timezone_format ) ) {
-					$formatted = date_format( $date_object, $timezone_format );
-					$dateformatstring = ' '.$dateformatstring;
-					$dateformatstring = preg_replace( "/([^\\\])$timezone_format/", "\\1" . backslashit( $formatted ), $dateformatstring );
-					$dateformatstring = substr( $dateformatstring, 1, strlen( $dateformatstring ) -1 );
-				}
-			}
-		}
-	}
-	$j = @$datefunc( $dateformatstring, $i );
-
-	/**
-	 * Filters the date formatted based on the locale.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param string $j          Formatted date string.
-	 * @param string $req_format Format to display the date.
-	 * @param int    $i          Unix timestamp.
-	 * @param bool   $gmt        Whether to convert to GMT for time. Default false.
-	 */
-	$j = apply_filters( 'date_i18n', $j, $req_format, $i, $gmt );
-	return $j;
-}
-
-/**
- * Determines if the date should be declined.
- *
- * If the locale specifies that month names require a genitive case in certain
- * formats (like 'j F Y'), the month name will be replaced with a correct form.
- *
- * @since 4.4.0
- *
- * @param string $date Formatted date string.
- * @return string The date, declined if locale specifies it.
- */
-function wp_maybe_decline_date( $date ) {
-	global $wp_locale;
-
-	// i18n functions are not available in SHORTINIT mode
-	if ( ! function_exists( '_x' ) ) {
-		return $date;
-	}
-
-	/* translators: If months in your language require a genitive case,
-	 * translate this to 'on'. Do not translate into your own language.
-	 */
-	if ( 'on' === _x( 'off', 'decline months names: on or off' ) ) {
-		// Match a format like 'j F Y' or 'j. F'
-		if ( @preg_match( '#^\d{1,2}\.? [^\d ]+#u', $date ) ) {
-			$months          = $wp_locale->month;
-			$months_genitive = $wp_locale->month_genitive;
-
-			foreach ( $months as $key => $month ) {
-				$months[ $key ] = '# ' . $month . '( |$)#u';
-			}
-
-			foreach ( $months_genitive as $key => $month ) {
-				$months_genitive[ $key ] = ' ' . $month . '$1';
-			}
-
-			$date = preg_replace( $months, $months_genitive, $date );
-		}
-	}
-
-	// Used for locale-specific rules
-	$locale = get_locale();
-
-	if ( 'ca' === $locale ) {
-		// " de abril| de agost| de octubre..." -> " d'abril| d'agost| d'octubre..."
-		$date = preg_replace( '# de ([ao])#i', " d'\\1", $date );
-	}
-
-	return $date;
-}
-
-/**
- * Convert float number to format based on the locale.
- *
- * @since 2.3.0
- *
- * @global WP_Locale $wp_locale
- *
- * @param float $number   The number to convert based on locale.
- * @param int   $decimals Optional. Precision of the number of decimal places. Default 0.
- * @return string Converted number in string format.
- */
-function number_format_i18n( $number, $decimals = 0 ) {
-	global $wp_locale;
-
-	if ( isset( $wp_locale ) ) {
-		$formatted = number_format( $number, absint( $decimals ), $wp_locale->number_format['decimal_point'], $wp_locale->number_format['thousands_sep'] );
-	} else {
-		$formatted = number_format( $number, absint( $decimals ) );
-	}
-
-	/**
-	 * Filters the number formatted based on the locale.
-	 *
-	 * @since  2.8.0
-	 *
-	 * @param string $formatted Converted number in string format.
-	 */
-	return apply_filters( 'number_format_i18n', $formatted );
-}
-
-/**
- * Convert number of bytes largest unit bytes will fit into.
- *
- * It is easier to read 1 KB than 1024 bytes and 1 MB than 1048576 bytes. Converts
- * number of bytes to human readable number by taking the number of that unit
- * that the bytes will go into it. Supports TB value.
- *
- * Please note that integers in PHP are limited to 32 bits, unless they are on
- * 64 bit architecture, then they have 64 bit size. If you need to place the
- * larger size then what PHP integer type will hold, then use a string. It will
- * be converted to a double, which should always have 64 bit length.
- *
- * Technically the correct unit names for powers of 1024 are KiB, MiB etc.
- *
- * @since 2.3.0
- *
- * @param int|string $bytes    Number of bytes. Note max integer size for integers.
- * @param int        $decimals Optional. Precision of number of decimal places. Default 0.
- * @return string|false False on failure. Number string on success.
- */
-function size_format( $bytes, $decimals = 0 ) {
-	$quant = array(
-		'TB' => TB_IN_BYTES,
-		'GB' => GB_IN_BYTES,
-		'MB' => MB_IN_BYTES,
-		'KB' => KB_IN_BYTES,
-		'B'  => 1,
-	);
-
-	if ( 0 === $bytes ) {
-		return number_format_i18n( 0, $decimals ) . ' B';
-	}
-
-	foreach ( $quant as $unit => $mag ) {
-		if ( doubleval( $bytes ) >= $mag ) {
-			return number_format_i18n( $bytes / $mag, $decimals ) . ' ' . $unit;
-		}
-	}
-
-	return false;
-}
-
-/**
- * Get the week start and end from the datetime or date string from MySQL.
- *
- * @since 0.71
- *
- * @param string     $mysqlstring   Date or datetime field type from MySQL.
- * @param int|string $start_of_week Optional. Start of the week as an integer. Default empty string.
- * @return array Keys are 'start' and 'end'.
- */
-function get_weekstartend( $mysqlstring, $start_of_week = '' ) {
-	// MySQL string year.
-	$my = substr( $mysqlstring, 0, 4 );
-
-	// MySQL string month.
-	$mm = substr( $mysqlstring, 8, 2 );
-
-	// MySQL string day.
-	$md = substr( $mysqlstring, 5, 2 );
-
-	// The timestamp for MySQL string day.
-	$day = mktime( 0, 0, 0, $md, $mm, $my );
-
-	// The day of the week from the timestamp.
-	$weekday = date( 'w', $day );
-
-	if ( !is_numeric($start_of_week) )
-		$start_of_week = get_option( 'start_of_week' );
-
-	if ( $weekday < $start_of_week )
-		$weekday += 7;
-
-	// The most recent week start day on or before $day.
-	$start = $day - DAY_IN_SECONDS * ( $weekday - $start_of_week );
-
-	// $start + 1 week - 1 second.
-	$end = $start + WEEK_IN_SECONDS - 1;
-	return compact( 'start', 'end' );
-}
-
-/**
- * Unserialize value only if it was serialized.
- *
- * @since 2.0.0
- *
- * @param string $original Maybe unserialized original, if is needed.
- * @return mixed Unserialized data can be any type.
- */
-function maybe_unserialize( $original ) {
-	if ( is_serialized( $original ) ) // don't attempt to unserialize data that wasn't serialized going in
-		return @unserialize( $original );
-	return $original;
-}
-
-/**
- * Check value to find if it was serialized.
- *
- * If $data is not an string, then returned value will always be false.
- * Serialized data is always a string.
- *
- * @since 2.0.5
- *
- * @param string $data   Value to check to see if was serialized.
- * @param bool   $strict Optional. Whether to be strict about the end of the string. Default true.
- * @return bool False if not serialized and true if it was.
- */
-function is_serialized( $data, $strict = true ) {
-	// if it isn't a string, it isn't serialized.
-	if ( ! is_string( $data ) ) {
-		return false;
-	}
-	$data = trim( $data );
- 	if ( 'N;' == $data ) {
-		return true;
-	}
-	if ( strlen( $data ) < 4 ) {
-		return false;
-	}
-	if ( ':' !== $data[1] ) {
-		return false;
-	}
-	if ( $strict ) {
-		$lastc = substr( $data, -1 );
-		if ( ';' !== $lastc && '}' !== $lastc ) {
-			return false;
-		}
-	} else {
-		$semicolon = strpos( $data, ';' );
-		$brace     = strpos( $data, '}' );
-		// Either ; or } must exist.
-		if ( false === $semicolon && false === $brace )
-			return false;
-		// But neither must be in the first X characters.
-		if ( false !== $semicolon && $semicolon < 3 )
-			return false;
-		if ( false !== $brace && $brace < 4 )
-			return false;
-	}
-	$token = $data[0];
-	switch ( $token ) {
-		case 's' :
-			if ( $strict ) {
-				if ( '"' !== substr( $data, -2, 1 ) ) {
-					return false;
-				}
-			} elseif ( false === strpos( $data, '"' ) ) {
-				return false;
-			}
-			// or else fall through
-		case 'a' :
-		case 'O' :
-			return (bool) preg_match( "/^{$token}:[0-9]+:/s", $data );
-		case 'b' :
-		case 'i' :
-		case 'd' :
-			$end = $strict ? '$' : '';
-			return (bool) preg_match( "/^{$token}:[0-9.E-]+;$end/", $data );
-	}
-	return false;
-}
-
-/**
- * Check whether serialized data is of string type.
- *
- * @since 2.0.5
- *
- * @param string $data Serialized data.
- * @return bool False if not a serialized string, true if it is.
- */
-function is_serialized_string( $data ) {
-	// if it isn't a string, it isn't a serialized string.
-	if ( ! is_string( $data ) ) {
-		return false;
-	}
-	$data = trim( $data );
-	if ( strlen( $data ) < 4 ) {
-		return false;
-	} elseif ( ':' !== $data[1] ) {
-		return false;
-	} elseif ( ';' !== substr( $data, -1 ) ) {
-		return false;
-	} elseif ( $data[0] !== 's' ) {
-		return false;
-	} elseif ( '"' !== substr( $data, -2, 1 ) ) {
-		return false;
-	} else {
-		return true;
-	}
-}
-
-/**
- * Serialize data, if needed.
- *
- * @since 2.0.5
- *
- * @param string|array|object $data Data that might be serialized.
- * @return mixed A scalar data
- */
-function maybe_serialize( $data ) {
-	if ( is_array( $data ) || is_object( $data ) )
-		return serialize( $data );
-
-	// Double serialization is required for backward compatibility.
-	// See https://core.trac.wordpress.org/ticket/12930
-	// Also the world will end. See WP 3.6.1.
-	if ( is_serialized( $data, false ) )
-		return serialize( $data );
-
-	return $data;
-}
-
-/**
- * Retrieve post title from XMLRPC XML.
- *
- * If the title element is not part of the XML, then the default post title from
- * the $post_default_title will be used instead.
- *
- * @since 0.71
- *
- * @global string $post_default_title Default XML-RPC post title.
- *
- * @param string $content XMLRPC XML Request content
- * @return string Post title
- */
-function xmlrpc_getposttitle( $content ) {
-	global $post_default_title;
-	if ( preg_match( '/<title>(.+?)<\/title>/is', $content, $matchtitle ) ) {
-		$post_title = $matchtitle[1];
-	} else {
-		$post_title = $post_default_title;
-	}
-	return $post_title;
-}
-
-/**
- * Retrieve the post category or categories from XMLRPC XML.
- *
- * If the category element is not found, then the default post category will be
- * used. The return type then would be what $post_default_category. If the
- * category is found, then it will always be an array.
- *
- * @since 0.71
- *
- * @global string $post_default_category Default XML-RPC post category.
- *
- * @param string $content XMLRPC XML Request content
- * @return string|array List of categories or category name.
- */
-function xmlrpc_getpostcategory( $content ) {
-	global $post_default_category;
-	if ( preg_match( '/<category>(.+?)<\/category>/is', $content, $matchcat ) ) {
-		$post_category = trim( $matchcat[1], ',' );
-		$post_category = explode( ',', $post_category );
-	} else {
-		$post_category = $post_default_category;
-	}
-	return $post_category;
-}
-
-/**
- * XMLRPC XML content without title and category elements.
- *
- * @since 0.71
- *
- * @param string $content XML-RPC XML Request content.
- * @return string XMLRPC XML Request content without title and category elements.
- */
-function xmlrpc_removepostdata( $content ) {
-	$content = preg_replace( '/<title>(.+?)<\/title>/si', '', $content );
-	$content = preg_replace( '/<category>(.+?)<\/category>/si', '', $content );
-	$content = trim( $content );
-	return $content;
-}
-
-/**
- * Use RegEx to extract URLs from arbitrary content.
- *
- * @since 3.7.0
- *
- * @param string $content Content to extract URLs from.
- * @return array URLs found in passed string.
- */
-function wp_extract_urls( $content ) {
-	preg_match_all(
-		"#([\"']?)("
-			. "(?:([\w-]+:)?//?)"
-			. "[^\s()<>]+"
-			. "[.]"
-			. "(?:"
-				. "\([\w\d]+\)|"
-				. "(?:"
-					. "[^`!()\[\]{};:'\".,<>«»“”‘’\s]|"
-					. "(?:[:]\d+)?/?"
-				. ")+"
-			. ")"
-		. ")\\1#",
-		$content,
-		$post_links
-	);
-
-	$post_links = array_unique( array_map( 'html_entity_decode', $post_links[2] ) );
-
-	return array_values( $post_links );
-}
-
-/**
- * Check content for video and audio links to add as enclosures.
- *
- * Will not add enclosures that have already been added and will
- * remove enclosures that are no longer in the post. This is called as
- * pingbacks and trackbacks.
- *
- * @since 1.5.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $content Post Content.
- * @param int    $post_ID Post ID.
- */
-function do_enclose( $content, $post_ID ) {
-	global $wpdb;
-
-	//TODO: Tidy this ghetto code up and make the debug code optional
-	include_once( ABSPATH . WPINC . '/class-IXR.php' ); 
-
-	$post_links = array();
-
-	$pung = get_enclosed( $post_ID );
-
-	$post_links_temp = wp_extract_urls( $content );
-
-	foreach ( $pung as $link_test ) {
-		if ( ! in_array( $link_test, $post_links_temp ) ) { // link no longer in post
-			$mids = $wpdb->get_col( $wpdb->prepare("SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = 'enclosure' AND meta_value LIKE %s", $post_ID, $wpdb->esc_like( $link_test ) . '%') );
-			foreach ( $mids as $mid )
-				delete_metadata_by_mid( 'post', $mid );
-		}
-	}
-
-	foreach ( (array) $post_links_temp as $link_test ) {
-		if ( !in_array( $link_test, $pung ) ) { // If we haven't pung it already
-			$test = @parse_url( $link_test );
-			if ( false === $test )
-				continue;
-			if ( isset( $test['query'] ) )
-				$post_links[] = $link_test;
-			elseif ( isset($test['path']) && ( $test['path'] != '/' ) &&  ($test['path'] != '' ) )
-				$post_links[] = $link_test;
-		}
-	}
-
-	/**
-	 * Filters the list of enclosure links before querying the database.
-	 *
-	 * Allows for the addition and/or removal of potential enclosures to save
-	 * to postmeta before checking the database for existing enclosures.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param array $post_links An array of enclosure links.
-	 * @param int   $post_ID    Post ID.
-	 */
-	$post_links = apply_filters( 'enclosure_links', $post_links, $post_ID );
-
-	foreach ( (array) $post_links as $url ) {
-		if ( $url != '' && !$wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = 'enclosure' AND meta_value LIKE %s", $post_ID, $wpdb->esc_like( $url ) . '%' ) ) ) {
-
-			if ( $headers = wp_get_http_headers( $url) ) {
-				$len = isset( $headers['content-length'] ) ? (int) $headers['content-length'] : 0;
-				$type = isset( $headers['content-type'] ) ? $headers['content-type'] : '';
-				$allowed_types = array( 'video', 'audio' );
-
-				// Check to see if we can figure out the mime type from
-				// the extension
-				$url_parts = @parse_url( $url );
-				if ( false !== $url_parts ) {
-					$extension = pathinfo( $url_parts['path'], PATHINFO_EXTENSION );
-					if ( !empty( $extension ) ) {
-						foreach ( wp_get_mime_types() as $exts => $mime ) {
-							if ( preg_match( '!^(' . $exts . ')$!i', $extension ) ) {
-								$type = $mime;
-								break;
-							}
-						}
-					}
-				}
-
-				if ( in_array( substr( $type, 0, strpos( $type, "/" ) ), $allowed_types ) ) {
-					add_post_meta( $post_ID, 'enclosure', "$url\n$len\n$mime\n" );
-				}
-			}
-		}
-	}
-}
-
-/**
- * Retrieve HTTP Headers from URL.
- *
- * @since 1.5.1
- *
- * @param string $url        URL to retrieve HTTP headers from.
- * @param bool   $deprecated Not Used.
- * @return bool|string False on failure, headers on success.
- */
-function wp_get_http_headers( $url, $deprecated = false ) {
-	if ( !empty( $deprecated ) )
-		_deprecated_argument( __FUNCTION__, '2.7.0' );
-
-	$response = wp_safe_remote_head( $url );
-
-	if ( is_wp_error( $response ) )
-		return false;
-
-	return wp_remote_retrieve_headers( $response );
-}
-
-/**
- * Whether the publish date of the current post in the loop is different from the
- * publish date of the previous post in the loop.
- *
- * @since 0.71
- *
- * @global string $currentday  The day of the current post in the loop.
- * @global string $previousday The day of the previous post in the loop.
- *
- * @return int 1 when new day, 0 if not a new day.
- */
-function is_new_day() {
-	global $currentday, $previousday;
-	if ( $currentday != $previousday )
-		return 1;
-	else
-		return 0;
-}
-
-/**
- * Build URL query based on an associative and, or indexed array.
- *
- * This is a convenient function for easily building url queries. It sets the
- * separator to '&' and uses _http_build_query() function.
- *
- * @since 2.3.0
- *
- * @see _http_build_query() Used to build the query
- * @link https://secure.php.net/manual/en/function.http-build-query.php for more on what
- *		 http_build_query() does.
- *
- * @param array $data URL-encode key/value pairs.
- * @return string URL-encoded string.
- */
-function build_query( $data ) {
-	return _http_build_query( $data, null, '&', '', false );
-}
-
-/**
- * From php.net (modified by Mark Jaquith to behave like the native PHP5 function).
- *
- * @since 3.2.0
- * @access private
- *
- * @see https://secure.php.net/manual/en/function.http-build-query.php
- *
- * @param array|object  $data       An array or object of data. Converted to array.
- * @param string        $prefix     Optional. Numeric index. If set, start parameter numbering with it.
- *                                  Default null.
- * @param string        $sep        Optional. Argument separator; defaults to 'arg_separator.output'.
- *                                  Default null.
- * @param string        $key        Optional. Used to prefix key name. Default empty.
- * @param bool          $urlencode  Optional. Whether to use urlencode() in the result. Default true.
- *
- * @return string The query string.
- */
-function _http_build_query( $data, $prefix = null, $sep = null, $key = '', $urlencode = true ) {
-	$ret = array();
-
-	foreach ( (array) $data as $k => $v ) {
-		if ( $urlencode)
-			$k = urlencode($k);
-		if ( is_int($k) && $prefix != null )
-			$k = $prefix.$k;
-		if ( !empty($key) )
-			$k = $key . '%5B' . $k . '%5D';
-		if ( $v === null )
-			continue;
-		elseif ( $v === false )
-			$v = '0';
-
-		if ( is_array($v) || is_object($v) )
-			array_push($ret,_http_build_query($v, '', $sep, $k, $urlencode));
-		elseif ( $urlencode )
-			array_push($ret, $k.'='.urlencode($v));
-		else
-			array_push($ret, $k.'='.$v);
-	}
-
-	if ( null === $sep )
-		$sep = ini_get('arg_separator.output');
-
-	return implode($sep, $ret);
-}
-
-/**
- * Retrieves a modified URL query string.
- *
- * You can rebuild the URL and append query variables to the URL query by using this function.
- * There are two ways to use this function; either a single key and value, or an associative array.
- *
- * Using a single key and value:
- *
- *     add_query_arg( 'key', 'value', 'http://example.com' );
- *
- * Using an associative array:
- *
- *     add_query_arg( array(
- *         'key1' => 'value1',
- *         'key2' => 'value2',
- *     ), 'http://example.com' );
- *
- * Omitting the URL from either use results in the current URL being used
- * (the value of `$_SERVER['REQUEST_URI']`).
- *
- * Values are expected to be encoded appropriately with urlencode() or rawurlencode().
- *
- * Setting any query variable's value to boolean false removes the key (see remove_query_arg()).
- *
- * Important: The return value of add_query_arg() is not escaped by default. Output should be
- * late-escaped with esc_url() or similar to help prevent vulnerability to cross-site scripting
- * (XSS) attacks.
- *
- * @since 1.5.0
- *
- * @param string|array $key   Either a query variable key, or an associative array of query variables.
- * @param string       $value Optional. Either a query variable value, or a URL to act upon.
- * @param string       $url   Optional. A URL to act upon.
- * @return string New URL query string (unescaped).
- */
-function add_query_arg() {
-	$args = func_get_args();
-	if ( is_array( $args[0] ) ) {
-		if ( count( $args ) < 2 || false === $args[1] )
-			$uri = $_SERVER['REQUEST_URI'];
-		else
-			$uri = $args[1];
-	} else {
-		if ( count( $args ) < 3 || false === $args[2] )
-			$uri = $_SERVER['REQUEST_URI'];
-		else
-			$uri = $args[2];
-	}
-
-	if ( $frag = strstr( $uri, '#' ) )
-		$uri = substr( $uri, 0, -strlen( $frag ) );
-	else
-		$frag = '';
-
-	if ( 0 === stripos( $uri, 'http://' ) ) {
-		$protocol = 'http://';
-		$uri = substr( $uri, 7 );
-	} elseif ( 0 === stripos( $uri, 'https://' ) ) {
-		$protocol = 'https://';
-		$uri = substr( $uri, 8 );
-	} else {
-		$protocol = '';
-	}
-
-	if ( strpos( $uri, '?' ) !== false ) {
-		list( $base, $query ) = explode( '?', $uri, 2 );
-		$base .= '?';
-	} elseif ( $protocol || strpos( $uri, '=' ) === false ) {
-		$base = $uri . '?';
-		$query = '';
-	} else {
-		$base = '';
-		$query = $uri;
-	}
-
-	wp_parse_str( $query, $qs );
-	$qs = urlencode_deep( $qs ); // this re-URL-encodes things that were already in the query string
-	if ( is_array( $args[0] ) ) {
-		foreach ( $args[0] as $k => $v ) {
-			$qs[ $k ] = $v;
-		}
-	} else {
-		$qs[ $args[0] ] = $args[1];
-	}
-
-	foreach ( $qs as $k => $v ) {
-		if ( $v === false )
-			unset( $qs[$k] );
-	}
-
-	$ret = build_query( $qs );
-	$ret = trim( $ret, '?' );
-	$ret = preg_replace( '#=(&|$)#', '$1', $ret );
-	$ret = $protocol . $base . $ret . $frag;
-	$ret = rtrim( $ret, '?' );
-	return $ret;
-}
-
-/**
- * Removes an item or items from a query string.
- *
- * @since 1.5.0
- *
- * @param string|array $key   Query key or keys to remove.
- * @param bool|string  $query Optional. When false uses the current URL. Default false.
- * @return string New URL query string.
- */
-function remove_query_arg( $key, $query = false ) {
-	if ( is_array( $key ) ) { // removing multiple keys
-		foreach ( $key as $k )
-			$query = add_query_arg( $k, false, $query );
-		return $query;
-	}
-	return add_query_arg( $key, false, $query );
-}
-
-/**
- * Returns an array of single-use query variable names that can be removed from a URL.
- *
- * @since 4.4.0
- *
- * @return array An array of parameters to remove from the URL.
- */
-function wp_removable_query_args() {
-	$removable_query_args = array(
-		'activate',
-		'activated',
-		'approved',
-		'deactivate',
-		'deleted',
-		'disabled',
-		'enabled',
-		'error',
-		'hotkeys_highlight_first',
-		'hotkeys_highlight_last',
-		'locked',
-		'message',
-		'same',
-		'saved',
-		'settings-updated',
-		'skipped',
-		'spammed',
-		'trashed',
-		'unspammed',
-		'untrashed',
-		'update',
-		'updated',
-		'wp-post-new-reload',
-	);
-
-	/**
-	 * Filters the list of query variables to remove.
-	 *
-	 * @since 4.2.0
-	 *
-	 * @param array $removable_query_args An array of query variables to remove from a URL.
-	 */
-	return apply_filters( 'removable_query_args', $removable_query_args );
-}
-
-/**
- * Walks the array while sanitizing the contents.
- *
- * @since 0.71
- *
- * @param array $array Array to walk while sanitizing contents.
- * @return array Sanitized $array.
- */
-function add_magic_quotes( $array ) {
-	foreach ( (array) $array as $k => $v ) {
-		if ( is_array( $v ) ) {
-			$array[$k] = add_magic_quotes( $v );
-		} else {
-			$array[$k] = addslashes( $v );
-		}
-	}
-	return $array;
-}
-
-/**
- * HTTP request for URI to retrieve content.
- *
- * @since 1.5.1
- *
- * @see wp_safe_remote_get()
- *
- * @param string $uri URI/URL of web page to retrieve.
- * @return false|string HTTP content. False on failure.
- */
-function wp_remote_fopen( $uri ) {
-	$parsed_url = @parse_url( $uri );
-
-	if ( !$parsed_url || !is_array( $parsed_url ) )
-		return false;
-
-	$options = array();
-	$options['timeout'] = 10;
-
-	$response = wp_safe_remote_get( $uri, $options );
-
-	if ( is_wp_error( $response ) )
-		return false;
-
-	return wp_remote_retrieve_body( $response );
-}
-
-/**
- * Set up the WordPress query.
- *
- * @since 2.0.0
- *
- * @global WP       $wp_locale
- * @global WP_Query $wp_query
- * @global WP_Query $wp_the_query
- *
- * @param string|array $query_vars Default WP_Query arguments.
- */
-function wp( $query_vars = '' ) {
-	global $wp, $wp_query, $wp_the_query;
-	$wp->main( $query_vars );
-
-	if ( !isset($wp_the_query) )
-		$wp_the_query = $wp_query;
-}
-
-/**
- * Retrieve the description for the HTTP status.
- *
- * @since 2.3.0
- *
- * @global array $wp_header_to_desc
- *
- * @param int $code HTTP status code.
- * @return string Empty string if not found, or description if found.
- */
-function get_status_header_desc( $code ) {
-	global $wp_header_to_desc;
-
-	$code = absint( $code );
-
-	if ( !isset( $wp_header_to_desc ) ) {
-		$wp_header_to_desc = array(
-			100 => 'Continue',
-			101 => 'Switching Protocols',
-			102 => 'Processing',
-
-			200 => 'OK',
-			201 => 'Created',
-			202 => 'Accepted',
-			203 => 'Non-Authoritative Information',
-			204 => 'No Content',
-			205 => 'Reset Content',
-			206 => 'Partial Content',
-			207 => 'Multi-Status',
-			226 => 'IM Used',
-
-			300 => 'Multiple Choices',
-			301 => 'Moved Permanently',
-			302 => 'Found',
-			303 => 'See Other',
-			304 => 'Not Modified',
-			305 => 'Use Proxy',
-			306 => 'Reserved',
-			307 => 'Temporary Redirect',
-			308 => 'Permanent Redirect',
-
-			400 => 'Bad Request',
-			401 => 'Unauthorized',
-			402 => 'Payment Required',
-			403 => 'Forbidden',
-			404 => 'Not Found',
-			405 => 'Method Not Allowed',
-			406 => 'Not Acceptable',
-			407 => 'Proxy Authentication Required',
-			408 => 'Request Timeout',
-			409 => 'Conflict',
-			410 => 'Gone',
-			411 => 'Length Required',
-			412 => 'Precondition Failed',
-			413 => 'Request Entity Too Large',
-			414 => 'Request-URI Too Long',
-			415 => 'Unsupported Media Type',
-			416 => 'Requested Range Not Satisfiable',
-			417 => 'Expectation Failed',
-			418 => 'I\'m a teapot',
-			421 => 'Misdirected Request',
-			422 => 'Unprocessable Entity',
-			423 => 'Locked',
-			424 => 'Failed Dependency',
-			426 => 'Upgrade Required',
-			428 => 'Precondition Required',
-			429 => 'Too Many Requests',
-			431 => 'Request Header Fields Too Large',
-			451 => 'Unavailable For Legal Reasons',
-
-			500 => 'Internal Server Error',
-			501 => 'Not Implemented',
-			502 => 'Bad Gateway',
-			503 => 'Service Unavailable',
-			504 => 'Gateway Timeout',
-			505 => 'HTTP Version Not Supported',
-			506 => 'Variant Also Negotiates',
-			507 => 'Insufficient Storage',
-			510 => 'Not Extended',
-			511 => 'Network Authentication Required',
-		);
-	}
-
-	if ( isset( $wp_header_to_desc[$code] ) )
-		return $wp_header_to_desc[$code];
-	else
-		return '';
-}
-
-/**
- * Set HTTP status header.
- *
- * @since 2.0.0
- * @since 4.4.0 Added the `$description` parameter.
- *
- * @see get_status_header_desc()
- *
- * @param int    $code        HTTP status code.
- * @param string $description Optional. A custom description for the HTTP status.
- */
-function status_header( $code, $description = '' ) {
-	if ( ! $description ) {
-		$description = get_status_header_desc( $code );
-	}
-
-	if ( empty( $description ) ) {
-		return;
-	}
-
-	$protocol = wp_get_server_protocol();
-	$status_header = "$protocol $code $description";
-	if ( function_exists( 'apply_filters' ) )
-
-		/**
-		 * Filters an HTTP status header.
-		 *
-		 * @since 2.2.0
-		 *
-		 * @param string $status_header HTTP status header.
-		 * @param int    $code          HTTP status code.
-		 * @param string $description   Description for the status code.
-		 * @param string $protocol      Server protocol.
-		 */
-		$status_header = apply_filters( 'status_header', $status_header, $code, $description, $protocol );
-
-	@header( $status_header, true, $code );
-}
-
-/**
- * Get the header information to prevent caching.
- *
- * The several different headers cover the different ways cache prevention
- * is handled by different browsers
- *
- * @since 2.8.0
- *
- * @return array The associative array of header names and field values.
- */
-function wp_get_nocache_headers() {
-	$headers = array(
-		'Expires' => 'Wed, 11 Jan 1984 05:00:00 GMT',
-		'Cache-Control' => 'no-cache, must-revalidate, max-age=0',
-	);
-
-	if ( function_exists('apply_filters') ) {
-		/**
-		 * Filters the cache-controlling headers.
-		 *
-		 * @since 2.8.0
-		 *
-		 * @see wp_get_nocache_headers()
-		 *
-		 * @param array $headers {
-		 *     Header names and field values.
-		 *
-		 *     @type string $Expires       Expires header.
-		 *     @type string $Cache-Control Cache-Control header.
-		 * }
-		 */
-		$headers = (array) apply_filters( 'nocache_headers', $headers );
-	}
-	$headers['Last-Modified'] = false;
-	return $headers;
-}
-
-/**
- * Set the headers to prevent caching for the different browsers.
- *
- * Different browsers support different nocache headers, so several
- * headers must be sent so that all of them get the point that no
- * caching should occur.
- *
- * @since 2.0.0
- *
- * @see wp_get_nocache_headers()
- */
-function nocache_headers() {
-	$headers = wp_get_nocache_headers();
-
-	unset( $headers['Last-Modified'] );
-
-	// In PHP 5.3+, make sure we are not sending a Last-Modified header.
-	if ( function_exists( 'header_remove' ) ) {
-		@header_remove( 'Last-Modified' );
-	} else {
-		// In PHP 5.2, send an empty Last-Modified header, but only as a
-		// last resort to override a header already sent. #WP23021
-		foreach ( headers_list() as $header ) {
-			if ( 0 === stripos( $header, 'Last-Modified' ) ) {
-				$headers['Last-Modified'] = '';
-				break;
-			}
-		}
-	}
-
-	foreach ( $headers as $name => $field_value )
-		@header("{$name}: {$field_value}");
-}
-
-/**
- * Set the headers for caching for 10 days with JavaScript content type.
- *
- * @since 2.1.0
- */
-function cache_javascript_headers() {
-	$expiresOffset = 10 * DAY_IN_SECONDS;
-
-	header( "Content-Type: text/javascript; charset=" . get_bloginfo( 'charset' ) );
-	header( "Vary: Accept-Encoding" ); // Handle proxies
-	header( "Expires: " . gmdate( "D, d M Y H:i:s", time() + $expiresOffset ) . " GMT" );
-}
-
-/**
- * Retrieve the number of database queries during the WordPress execution.
- *
- * @since 2.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @return int Number of database queries.
- */
-function get_num_queries() {
-	global $wpdb;
-	return $wpdb->num_queries;
-}
-
-/**
- * Whether input is yes or no.
- *
- * Must be 'y' to be true.
- *
- * @since 1.0.0
- *
- * @param string $yn Character string containing either 'y' (yes) or 'n' (no).
- * @return bool True if yes, false on anything else.
- */
-function bool_from_yn( $yn ) {
-	return ( strtolower( $yn ) == 'y' );
-}
-
-/**
- * Load the feed template from the use of an action hook.
- *
- * If the feed action does not have a hook, then the function will die with a
- * message telling the visitor that the feed is not valid.
- *
- * It is better to only have one hook for each feed.
- *
- * @since 2.1.0
- *
- * @global WP_Query $wp_query Used to tell if the use a comment feed.
- */
-function do_feed() {
-	global $wp_query;
-
-	$feed = get_query_var( 'feed' );
-
-	// Remove the pad, if present.
-	$feed = preg_replace( '/^_+/', '', $feed );
-
-	if ( $feed == '' || $feed == 'feed' )
-		$feed = get_default_feed();
-
-	if ( ! has_action( "do_feed_{$feed}" ) ) {
-		wp_die( __( 'ERROR: This is not a valid feed template.' ), '', array( 'response' => 404 ) );
-	}
-
-	/**
-	 * Fires once the given feed is loaded.
-	 *
-	 * The dynamic portion of the hook name, `$feed`, refers to the feed template name.
-	 * Possible values include: 'rdf', 'rss', 'rss2', and 'atom'.
-	 *
-	 * @since 2.1.0
-	 * @since 4.4.0 The `$feed` parameter was added.
-	 *
-	 * @param bool   $is_comment_feed Whether the feed is a comment feed.
-	 * @param string $feed            The feed name.
-	 */
-	do_action( "do_feed_{$feed}", $wp_query->is_comment_feed, $feed );
-}
-
-/**
- * Load the RDF RSS 0.91 Feed template.
- *
- * @since 2.1.0
- *
- * @see load_template()
- */
-function do_feed_rdf() {
-	load_template( ABSPATH . WPINC . '/feed-rdf.php' );
-}
-
-/**
- * Load the RSS 1.0 Feed Template.
- *
- * @since 2.1.0
- *
- * @see load_template()
- */
-function do_feed_rss() {
-	load_template( ABSPATH . WPINC . '/feed-rss.php' );
-}
-
-/**
- * Load either the RSS2 comment feed or the RSS2 posts feed.
- *
- * @since 2.1.0
- *
- * @see load_template()
- *
- * @param bool $for_comments True for the comment feed, false for normal feed.
- */
-function do_feed_rss2( $for_comments ) {
-	if ( $for_comments )
-		load_template( ABSPATH . WPINC . '/feed-rss2-comments.php' );
-	else
-		load_template( ABSPATH . WPINC . '/feed-rss2.php' );
-}
-
-/**
- * Load either Atom comment feed or Atom posts feed.
- *
- * @since 2.1.0
- *
- * @see load_template()
- *
- * @param bool $for_comments True for the comment feed, false for normal feed.
- */
-function do_feed_atom( $for_comments ) {
-	if ($for_comments)
-		load_template( ABSPATH . WPINC . '/feed-atom-comments.php');
-	else
-		load_template( ABSPATH . WPINC . '/feed-atom.php' );
-}
-
-/**
- * Display the robots.txt file content.
- *
- * The echo content should be with usage of the permalinks or for creating the
- * robots.txt file.
- *
- * @since 2.1.0
- */
-function do_robots() {
-	header( 'Content-Type: text/plain; charset=utf-8' );
-
-	/**
-	 * Fires when displaying the robots.txt file.
-	 *
-	 * @since 2.1.0
-	 */
-	do_action( 'do_robotstxt' );
-
-	$output = "User-agent: *\n";
-	$public = get_option( 'blog_public' );
-	if ( '0' == $public ) {
-		$output .= "Disallow: /\n";
-	} else {
-		$site_url = parse_url( site_url() );
-		$path = ( !empty( $site_url['path'] ) ) ? $site_url['path'] : '';
-		$output .= "Disallow: $path/wp-admin/\n";
-		$output .= "Allow: $path/wp-admin/admin-ajax.php\n";
-	}
-
-	/**
-	 * Filters the robots.txt output.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $output Robots.txt output.
-	 * @param bool   $public Whether the site is considered "public".
-	 */
-	echo apply_filters( 'robots_txt', $output, $public );
-}
-
-/**
- * Test whether WordPress is already installed.
- *
- * The cache will be checked first. If you have a cache plugin, which saves
- * the cache values, then this will work. If you use the default WordPress
- * cache, and the database goes away, then you might have problems.
- *
- * Checks for the 'siteurl' option for whether WordPress is installed.
- *
- * @since 2.1.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @return bool Whether the site is already installed.
- */
-function is_blog_installed() {
-	global $wpdb;
-
-	/*
-	 * Check cache first. If options table goes away and we have true
-	 * cached, oh well.
-	 */
-	if ( wp_cache_get( 'is_blog_installed' ) )
-		return true;
-
-	$suppress = $wpdb->suppress_errors();
-	if ( ! wp_installing() ) {
-		$alloptions = wp_load_alloptions();
-	}
-	// If siteurl is not set to autoload, check it specifically
-	if ( !isset( $alloptions['siteurl'] ) )
-		$installed = $wpdb->get_var( "SELECT option_value FROM $wpdb->options WHERE option_name = 'siteurl'" );
-	else
-		$installed = $alloptions['siteurl'];
-	$wpdb->suppress_errors( $suppress );
-
-	$installed = !empty( $installed );
-	wp_cache_set( 'is_blog_installed', $installed );
-
-	if ( $installed )
-		return true;
-
-	// If visiting repair.php, return true and let it take over.
-	if ( defined( 'WP_REPAIRING' ) )
-		return true;
-
-	$suppress = $wpdb->suppress_errors();
-
-	/*
-	 * Loop over the WP tables. If none exist, then scratch install is allowed.
-	 * If one or more exist, suggest table repair since we got here because the
-	 * options table could not be accessed.
-	 */
-	$wp_tables = $wpdb->tables();
-	foreach ( $wp_tables as $table ) {
-		// The existence of custom user tables shouldn't suggest an insane state or prevent a clean install.
-		if ( defined( 'CUSTOM_USER_TABLE' ) && CUSTOM_USER_TABLE == $table )
-			continue;
-		if ( defined( 'CUSTOM_USER_META_TABLE' ) && CUSTOM_USER_META_TABLE == $table )
-			continue;
-
-		if ( ! $wpdb->get_results( "DESCRIBE $table;" ) )
-			continue;
-
-		// One or more tables exist. We are insane.
-
-		wp_load_translations_early();
-
-		// Die with a DB error.
-		$wpdb->error = sprintf(
-			/* translators: %s: database repair URL */
-			__( 'One or more database tables are unavailable. The database may need to be <a href="%s">repaired</a>.' ),
-			'maint/repair.php?referrer=is_blog_installed'
-		);
-
-		dead_db();
-	}
-
-	$wpdb->suppress_errors( $suppress );
-
-	wp_cache_set( 'is_blog_installed', false );
-
-	return false;
-}
-
-/**
- * Retrieve URL with nonce added to URL query.
- *
- * @since 2.0.4
- *
- * @param string     $actionurl URL to add nonce action.
- * @param int|string $action    Optional. Nonce action name. Default -1.
- * @param string     $name      Optional. Nonce name. Default '_wpnonce'.
- * @return string Escaped URL with nonce action added.
- */
-function wp_nonce_url( $actionurl, $action = -1, $name = '_wpnonce' ) {
-	$actionurl = str_replace( '&amp;', '&', $actionurl );
-	return esc_html( add_query_arg( $name, wp_create_nonce( $action ), $actionurl ) );
-}
-
-/**
- * Retrieve or display nonce hidden field for forms.
- *
- * The nonce field is used to validate that the contents of the form came from
- * the location on the current site and not somewhere else. The nonce does not
- * offer absolute protection, but should protect against most cases. It is very
- * important to use nonce field in forms.
- *
- * The $action and $name are optional, but if you want to have better security,
- * it is strongly suggested to set those two parameters. It is easier to just
- * call the function without any parameters, because validation of the nonce
- * doesn't require any parameters, but since crackers know what the default is
- * it won't be difficult for them to find a way around your nonce and cause
- * damage.
- *
- * The input name will be whatever $name value you gave. The input value will be
- * the nonce creation value.
- *
- * @since 2.0.4
- *
- * @param int|string $action  Optional. Action name. Default -1.
- * @param string     $name    Optional. Nonce name. Default '_wpnonce'.
- * @param bool       $referer Optional. Whether to set the referer field for validation. Default true.
- * @param bool       $echo    Optional. Whether to display or return hidden form field. Default true.
- * @return string Nonce field HTML markup.
- */
-function wp_nonce_field( $action = -1, $name = "_wpnonce", $referer = true , $echo = true ) {
-	$name = esc_attr( $name );
-	$nonce_field = '<input type="hidden" id="' . $name . '" name="' . $name . '" value="' . wp_create_nonce( $action ) . '" />';
-
-	if ( $referer )
-		$nonce_field .= wp_referer_field( false );
-
-	if ( $echo )
-		echo $nonce_field;
-
-	return $nonce_field;
-}
-
-/**
- * Retrieve or display referer hidden field for forms.
- *
- * The referer link is the current Request URI from the server super global. The
- * input name is '_wp_http_referer', in case you wanted to check manually.
- *
- * @since 2.0.4
- *
- * @param bool $echo Optional. Whether to echo or return the referer field. Default true.
- * @return string Referer field HTML markup.
- */
-function wp_referer_field( $echo = true ) {
-	$referer_field = '<input type="hidden" name="_wp_http_referer" value="'. esc_attr( wp_unslash( $_SERVER['REQUEST_URI'] ) ) . '" />';
-
-	if ( $echo )
-		echo $referer_field;
-	return $referer_field;
-}
-
-/**
- * Retrieve or display original referer hidden field for forms.
- *
- * The input name is '_wp_original_http_referer' and will be either the same
- * value of wp_referer_field(), if that was posted already or it will be the
- * current page, if it doesn't exist.
- *
- * @since 2.0.4
- *
- * @param bool   $echo         Optional. Whether to echo the original http referer. Default true.
- * @param string $jump_back_to Optional. Can be 'previous' or page you want to jump back to.
- *                             Default 'current'.
- * @return string Original referer field.
- */
-function wp_original_referer_field( $echo = true, $jump_back_to = 'current' ) {
-	if ( ! $ref = wp_get_original_referer() ) {
-		$ref = 'previous' == $jump_back_to ? wp_get_referer() : wp_unslash( $_SERVER['REQUEST_URI'] );
-	}
-	$orig_referer_field = '<input type="hidden" name="_wp_original_http_referer" value="' . esc_attr( $ref ) . '" />';
-	if ( $echo )
-		echo $orig_referer_field;
-	return $orig_referer_field;
-}
-
-/**
- * Retrieve referer from '_wp_http_referer' or HTTP referer.
- *
- * If it's the same as the current request URL, will return false.
- *
- * @since 2.0.4
- *
- * @return false|string False on failure. Referer URL on success.
- */
-function wp_get_referer() {
-	if ( ! function_exists( 'wp_validate_redirect' ) ) {
-		return false;
-	}
-
-	$ref = wp_get_raw_referer();
-
-	if ( $ref && $ref !== wp_unslash( $_SERVER['REQUEST_URI'] ) && $ref !== home_url() . wp_unslash( $_SERVER['REQUEST_URI'] ) ) {
-		return wp_validate_redirect( $ref, false );
-	}
-
-	return false;
-}
-
-/**
- * Retrieves unvalidated referer from '_wp_http_referer' or HTTP referer.
- *
- * Do not use for redirects, use wp_get_referer() instead.
- *
- * @since 4.5.0
- *
- * @return string|false Referer URL on success, false on failure.
- */
-function wp_get_raw_referer() {
-	if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) {
-		return wp_unslash( $_REQUEST['_wp_http_referer'] );
-	} else if ( ! empty( $_SERVER['HTTP_REFERER'] ) ) {
-		return wp_unslash( $_SERVER['HTTP_REFERER'] );
-	}
-
-	return false;
-}
-
-/**
- * Retrieve original referer that was posted, if it exists.
- *
- * @since 2.0.4
- *
- * @return string|false False if no original referer or original referer if set.
- */
-function wp_get_original_referer() {
-	if ( ! empty( $_REQUEST['_wp_original_http_referer'] ) && function_exists( 'wp_validate_redirect' ) )
-		return wp_validate_redirect( wp_unslash( $_REQUEST['_wp_original_http_referer'] ), false );
-	return false;
-}
-
-/**
- * Recursive directory creation based on full path.
- *
- * Will attempt to set permissions on folders.
- *
- * @since 2.0.1
- *
- * @param string $target Full path to attempt to create.
- * @return bool Whether the path was created. True if path already exists.
- */
-function wp_mkdir_p( $target ) {
-	$wrapper = null;
-
-	// Strip the protocol.
-	if ( wp_is_stream( $target ) ) {
-		list( $wrapper, $target ) = explode( '://', $target, 2 );
-	}
-
-	// From php.net/mkdir user contributed notes.
-	$target = str_replace( '//', '/', $target );
-
-	// Put the wrapper back on the target.
-	if ( $wrapper !== null ) {
-		$target = $wrapper . '://' . $target;
-	}
-
-	/*
-	 * Safe mode fails with a trailing slash under certain PHP versions.
-	 * Use rtrim() instead of untrailingslashit to avoid formatting.php dependency.
-	 */
-	$target = rtrim($target, '/');
-	if ( empty($target) )
-		$target = '/';
-
-	if ( file_exists( $target ) )
-		return @is_dir( $target );
-
-	// We need to find the permissions of the parent folder that exists and inherit that.
-	$target_parent = dirname( $target );
-	while ( '.' != $target_parent && ! is_dir( $target_parent ) ) {
-		$target_parent = dirname( $target_parent );
-	}
-
-	// Get the permission bits.
-	if ( $stat = @stat( $target_parent ) ) {
-		$dir_perms = $stat['mode'] & 0007777;
-	} else {
-		$dir_perms = 0777;
-	}
-
-	if ( @mkdir( $target, $dir_perms, true ) ) {
-
-		/*
-		 * If a umask is set that modifies $dir_perms, we'll have to re-set
-		 * the $dir_perms correctly with chmod()
-		 */
-		if ( $dir_perms != ( $dir_perms & ~umask() ) ) {
-			$folder_parts = explode( '/', substr( $target, strlen( $target_parent ) + 1 ) );
-			for ( $i = 1, $c = count( $folder_parts ); $i <= $c; $i++ ) {
-				@chmod( $target_parent . '/' . implode( '/', array_slice( $folder_parts, 0, $i ) ), $dir_perms );
-			}
-		}
-
-		return true;
-	}
-
-	return false;
-}
-
-/**
- * Test if a give filesystem path is absolute.
- *
- * For example, '/foo/bar', or 'c:\windows'.
- *
- * @since 2.5.0
- *
- * @param string $path File path.
- * @return bool True if path is absolute, false is not absolute.
- */
-function path_is_absolute( $path ) {
-	/*
-	 * This is definitive if true but fails if $path does not exist or contains
-	 * a symbolic link.
-	 */
-	if ( realpath($path) == $path )
-		return true;
-
-	if ( strlen($path) == 0 || $path[0] == '.' )
-		return false;
-
-	// Windows allows absolute paths like this.
-	if ( preg_match('#^[a-zA-Z]:\\\\#', $path) )
-		return true;
-
-	// A path starting with / or \ is absolute; anything else is relative.
-	return ( $path[0] == '/' || $path[0] == '\\' );
-}
-
-/**
- * Join two filesystem paths together.
- *
- * For example, 'give me $path relative to $base'. If the $path is absolute,
- * then it the full path is returned.
- *
- * @since 2.5.0
- *
- * @param string $base Base path.
- * @param string $path Path relative to $base.
- * @return string The path with the base or absolute path.
- */
-function path_join( $base, $path ) {
-	if ( path_is_absolute($path) )
-		return $path;
-
-	return rtrim($base, '/') . '/' . ltrim($path, '/');
-}
-
-/**
- * Normalize a filesystem path.
- *
- * On windows systems, replaces backslashes with forward slashes
- * and forces upper-case drive letters.
- * Allows for two leading slashes for Windows network shares, but
- * ensures that all other duplicate slashes are reduced to a single.
- *
- * @since 3.9.0
- * @since 4.4.0 Ensures upper-case drive letters on Windows systems.
- * @since 4.5.0 Allows for Windows network shares.
- *
- * @param string $path Path to normalize.
- * @return string Normalized path.
- */
-function wp_normalize_path( $path ) {
-	$path = str_replace( '\\', '/', $path );
-	$path = preg_replace( '|(?<=.)/+|', '/', $path );
-	if ( ':' === substr( $path, 1, 1 ) ) {
-		$path = ucfirst( $path );
-	}
-	return $path;
-}
-
-/**
- * Determine a writable directory for temporary files.
- *
- * Function's preference is the return value of sys_get_temp_dir(),
- * followed by your PHP temporary upload directory, followed by WP_CONTENT_DIR,
- * before finally defaulting to /tmp/
- *
- * In the event that this function does not find a writable location,
- * It may be overridden by the WP_TEMP_DIR constant in your wp-config.php file.
- *
- * @since 2.5.0
- *
- * @staticvar string $temp
- *
- * @return string Writable temporary directory.
- */
-function get_temp_dir() {
-	static $temp = '';
-	if ( defined('WP_TEMP_DIR') )
-		return trailingslashit(WP_TEMP_DIR);
-
-	if ( $temp )
-		return trailingslashit( $temp );
-
-	if ( function_exists('sys_get_temp_dir') ) {
-		$temp = sys_get_temp_dir();
-		if ( @is_dir( $temp ) && wp_is_writable( $temp ) )
-			return trailingslashit( $temp );
-	}
-
-	$temp = ini_get('upload_tmp_dir');
-	if ( @is_dir( $temp ) && wp_is_writable( $temp ) )
-		return trailingslashit( $temp );
-
-	$temp = WP_CONTENT_DIR . '/';
-	if ( is_dir( $temp ) && wp_is_writable( $temp ) )
-		return $temp;
-
-	return '/tmp/';
-}
-
-/**
- * Determine if a directory is writable.
- *
- * This function is used to work around certain ACL issues in PHP primarily
- * affecting Windows Servers.
- *
- * @since 3.6.0
- *
- * @see win_is_writable()
- *
- * @param string $path Path to check for write-ability.
- * @return bool Whether the path is writable.
- */
-function wp_is_writable( $path ) {
-	if ( 'WIN' === strtoupper( substr( PHP_OS, 0, 3 ) ) )
-		return win_is_writable( $path );
-	else
-		return @is_writable( $path );
-}
-
-/**
- * Workaround for Windows bug in is_writable() function
- *
- * PHP has issues with Windows ACL's for determine if a
- * directory is writable or not, this works around them by
- * checking the ability to open files rather than relying
- * upon PHP to interprate the OS ACL.
- *
- * @since 2.8.0
- *
- * @see https://bugs.php.net/bug.php?id=27609
- * @see https://bugs.php.net/bug.php?id=30931
- *
- * @param string $path Windows path to check for write-ability.
- * @return bool Whether the path is writable.
- */
-function win_is_writable( $path ) {
-
-	if ( $path[strlen( $path ) - 1] == '/' ) { // if it looks like a directory, check a random file within the directory
-		return win_is_writable( $path . uniqid( mt_rand() ) . '.tmp');
-	} elseif ( is_dir( $path ) ) { // If it's a directory (and not a file) check a random file within the directory
-		return win_is_writable( $path . '/' . uniqid( mt_rand() ) . '.tmp' );
-	}
-	// check tmp file for read/write capabilities
-	$should_delete_tmp_file = !file_exists( $path );
-	$f = @fopen( $path, 'a' );
-	if ( $f === false )
-		return false;
-	fclose( $f );
-	if ( $should_delete_tmp_file )
-		unlink( $path );
-	return true;
-}
-
-/**
- * Retrieves uploads directory information.
- *
- * Same as wp_upload_dir() but "light weight" as it doesn't attempt to create the uploads directory.
- * Intended for use in themes, when only 'basedir' and 'baseurl' are needed, generally in all cases
- * when not uploading files.
- *
- * @since 4.5.0
- *
- * @see wp_upload_dir()
- *
- * @return array See wp_upload_dir() for description.
- */
-function wp_get_upload_dir() {
-	return wp_upload_dir( null, false );
-}
-
-/**
- * Get an array containing the current upload directory's path and url.
- *
- * Checks the 'upload_path' option, which should be from the web root folder,
- * and if it isn't empty it will be used. If it is empty, then the path will be
- * 'WP_CONTENT_DIR/uploads'. If the 'UPLOADS' constant is defined, then it will
- * override the 'upload_path' option and 'WP_CONTENT_DIR/uploads' path.
- *
- * The upload URL path is set either by the 'upload_url_path' option or by using
- * the 'WP_CONTENT_URL' constant and appending '/uploads' to the path.
- *
- * If the 'uploads_use_yearmonth_folders' is set to true (checkbox if checked in
- * the administration settings panel), then the time will be used. The format
- * will be year first and then month.
- *
- * If the path couldn't be created, then an error will be returned with the key
- * 'error' containing the error message. The error suggests that the parent
- * directory is not writable by the server.
- *
- * On success, the returned array will have many indices:
- * 'path' - base directory and sub directory or full path to upload directory.
- * 'url' - base url and sub directory or absolute URL to upload directory.
- * 'subdir' - sub directory if uploads use year/month folders option is on.
- * 'basedir' - path without subdir.
- * 'baseurl' - URL path without subdir.
- * 'error' - false or error message.
- *
- * @since 2.0.0
- * @uses _wp_upload_dir()
- *
- * @param string $time Optional. Time formatted in 'yyyy/mm'. Default null.
- * @param bool   $create_dir Optional. Whether to check and create the uploads directory.
- *                           Default true for backward compatibility.
- * @param bool   $refresh_cache Optional. Whether to refresh the cache. Default false.
- * @return array See above for description.
- */
-function wp_upload_dir( $time = null, $create_dir = true, $refresh_cache = false ) {
-	static $cache = array(), $tested_paths = array();
-
-	$key = sprintf( '%d-%s', get_current_blog_id(), (string) $time );
-
-	if ( $refresh_cache || empty( $cache[ $key ] ) ) {
-		$cache[ $key ] = _wp_upload_dir( $time );
-	}
-
-	/**
-	 * Filters the uploads directory data.
-	 *
-	 * @since 2.0.0
-	 *
-	 * @param array $uploads Array of upload directory data with keys of 'path',
-	 *                       'url', 'subdir, 'basedir', and 'error'.
-	 */
-	$uploads = apply_filters( 'upload_dir', $cache[ $key ] );
-
-	if ( $create_dir ) {
-		$path = $uploads['path'];
-
-		if ( array_key_exists( $path, $tested_paths ) ) {
-			$uploads['error'] = $tested_paths[ $path ];
-		} else {
-			if ( ! wp_mkdir_p( $path ) ) {
-				if ( 0 === strpos( $uploads['basedir'], ABSPATH ) ) {
-					$error_path = str_replace( ABSPATH, '', $uploads['basedir'] ) . $uploads['subdir'];
-				} else {
-					$error_path = basename( $uploads['basedir'] ) . $uploads['subdir'];
-				}
-
-				$uploads['error'] = sprintf(
-					/* translators: %s: directory path */
-					__( 'Unable to create directory %s. Is its parent directory writable by the server?' ),
-					esc_html( $error_path )
-				);
-			}
-
-			$tested_paths[ $path ] = $uploads['error'];
-		}
-	}
-
-	return $uploads;
-}
-
-/**
- * A non-filtered, non-cached version of wp_upload_dir() that doesn't check the path.
- *
- * @access private
- *
- * @param string $time Optional. Time formatted in 'yyyy/mm'. Default null.
- * @return array See wp_upload_dir()
- */
-function _wp_upload_dir( $time = null ) {
-	$siteurl = get_option( 'siteurl' );
-	$upload_path = trim( get_option( 'upload_path' ) );
-
-	if ( empty( $upload_path ) || 'wp-content/uploads' == $upload_path ) {
-		$dir = WP_CONTENT_DIR . '/uploads';
-	} elseif ( 0 !== strpos( $upload_path, ABSPATH ) ) {
-		// $dir is absolute, $upload_path is (maybe) relative to ABSPATH
-		$dir = path_join( ABSPATH, $upload_path );
-	} else {
-		$dir = $upload_path;
-	}
-
-	if ( !$url = get_option( 'upload_url_path' ) ) {
-		if ( empty($upload_path) || ( 'wp-content/uploads' == $upload_path ) || ( $upload_path == $dir ) )
-			$url = WP_CONTENT_URL . '/uploads';
-		else
-			$url = trailingslashit( $siteurl ) . $upload_path;
-	}
-
-	/*
-	 * Honor the value of UPLOADS. This happens as long as ms-files rewriting is disabled.
-	 * We also sometimes obey UPLOADS when rewriting is enabled -- see the next block.
-	 */
-	if ( defined( 'UPLOADS' ) && ! ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) ) {
-		$dir = ABSPATH . UPLOADS;
-		$url = trailingslashit( $siteurl ) . UPLOADS;
-	}
-
-	// If multisite (and if not the main site in a post-MU network)
-	if ( is_multisite() && ! ( is_main_network() && is_main_site() && defined( 'MULTISITE' ) ) ) {
-
-		if ( ! get_site_option( 'ms_files_rewriting' ) ) {
-			/*
-			 * If ms-files rewriting is disabled (networks created post-3.5), it is fairly
-			 * straightforward: Append sites/%d if we're not on the main site (for post-MU
-			 * networks). (The extra directory prevents a four-digit ID from conflicting with
-			 * a year-based directory for the main site. But if a MU-era network has disabled
-			 * ms-files rewriting manually, they don't need the extra directory, as they never
-			 * had wp-content/uploads for the main site.)
-			 */
-
-			if ( defined( 'MULTISITE' ) )
-				$ms_dir = '/sites/' . get_current_blog_id();
-			else
-				$ms_dir = '/' . get_current_blog_id();
-
-			$dir .= $ms_dir;
-			$url .= $ms_dir;
-
-		} elseif ( defined( 'UPLOADS' ) && ! ms_is_switched() ) {
-			/*
-			 * Handle the old-form ms-files.php rewriting if the network still has that enabled.
-			 * When ms-files rewriting is enabled, then we only listen to UPLOADS when:
-			 * 1) We are not on the main site in a post-MU network, as wp-content/uploads is used
-			 *    there, and
-			 * 2) We are not switched, as ms_upload_constants() hardcodes these constants to reflect
-			 *    the original blog ID.
-			 *
-			 * Rather than UPLOADS, we actually use BLOGUPLOADDIR if it is set, as it is absolute.
-			 * (And it will be set, see ms_upload_constants().) Otherwise, UPLOADS can be used, as
-			 * as it is relative to ABSPATH. For the final piece: when UPLOADS is used with ms-files
-			 * rewriting in multisite, the resulting URL is /files. (#WP22702 for background.)
-			 */
-
-			if ( defined( 'BLOGUPLOADDIR' ) )
-				$dir = untrailingslashit( BLOGUPLOADDIR );
-			else
-				$dir = ABSPATH . UPLOADS;
-			$url = trailingslashit( $siteurl ) . 'files';
-		}
-	}
-
-	$basedir = $dir;
-	$baseurl = $url;
-
-	$subdir = '';
-	if ( get_option( 'uploads_use_yearmonth_folders' ) ) {
-		// Generate the yearly and monthly dirs
-		if ( !$time )
-			$time = current_time( 'mysql' );
-		$y = substr( $time, 0, 4 );
-		$m = substr( $time, 5, 2 );
-		$subdir = "/$y/$m";
-	}
-
-	$dir .= $subdir;
-	$url .= $subdir;
-
-	return array(
-		'path'    => $dir,
-		'url'     => $url,
-		'subdir'  => $subdir,
-		'basedir' => $basedir,
-		'baseurl' => $baseurl,
-		'error'   => false,
-	);
-}
-
-/**
- * Get a filename that is sanitized and unique for the given directory.
- *
- * If the filename is not unique, then a number will be added to the filename
- * before the extension, and will continue adding numbers until the filename is
- * unique.
- *
- * The callback is passed three parameters, the first one is the directory, the
- * second is the filename, and the third is the extension.
- *
- * @since 2.5.0
- *
- * @param string   $dir                      Directory.
- * @param string   $filename                 File name.
- * @param callable $unique_filename_callback Callback. Default null.
- * @return string New filename, if given wasn't unique.
- */
-function wp_unique_filename( $dir, $filename, $unique_filename_callback = null ) {
-	// Sanitize the file name before we begin processing.
-	$filename = sanitize_file_name($filename);
-
-	// Separate the filename into a name and extension.
-	$ext = pathinfo( $filename, PATHINFO_EXTENSION );
-	$name = pathinfo( $filename, PATHINFO_BASENAME );
-	if ( $ext ) {
-		$ext = '.' . $ext;
-	}
-
-	// Edge case: if file is named '.ext', treat as an empty name.
-	if ( $name === $ext ) {
-		$name = '';
-	}
-
-	/*
-	 * Increment the file number until we have a unique file to save in $dir.
-	 * Use callback if supplied.
-	 */
-	if ( $unique_filename_callback && is_callable( $unique_filename_callback ) ) {
-		$filename = call_user_func( $unique_filename_callback, $dir, $name, $ext );
-	} else {
-		$number = '';
-
-		// Change '.ext' to lower case.
-		if ( $ext && strtolower($ext) != $ext ) {
-			$ext2 = strtolower($ext);
-			$filename2 = preg_replace( '|' . preg_quote($ext) . '$|', $ext2, $filename );
-
-			// Check for both lower and upper case extension or image sub-sizes may be overwritten.
-			while ( file_exists($dir . "/$filename") || file_exists($dir . "/$filename2") ) {
-				$new_number = $number + 1;
-				$filename = str_replace( array( "-$number$ext", "$number$ext" ), "-$new_number$ext", $filename );
-				$filename2 = str_replace( array( "-$number$ext2", "$number$ext2" ), "-$new_number$ext2", $filename2 );
-				$number = $new_number;
-			}
-
-			/**
-			 * Filters the result when generating a unique file name.
-			 *
-			 * @since 4.5.0
-			 *
-			 * @param string        $filename                 Unique file name.
-			 * @param string        $ext                      File extension, eg. ".png".
-			 * @param string        $dir                      Directory path.
-			 * @param callable|null $unique_filename_callback Callback function that generates the unique file name.
-			 */
-			return apply_filters( 'wp_unique_filename', $filename2, $ext, $dir, $unique_filename_callback );
-		}
-
-		while ( file_exists( $dir . "/$filename" ) ) {
-			if ( '' == "$number$ext" ) {
-				$filename = "$filename-" . ++$number;
-			} else {
-				$filename = str_replace( array( "-$number$ext", "$number$ext" ), "-" . ++$number . $ext, $filename );
-			}
-		}
-	}
-
-	/** This filter is documented in wp-includes/functions.php */
-	return apply_filters( 'wp_unique_filename', $filename, $ext, $dir, $unique_filename_callback );
-}
-
-/**
- * Create a file in the upload folder with given content.
- *
- * If there is an error, then the key 'error' will exist with the error message.
- * If success, then the key 'file' will have the unique file path, the 'url' key
- * will have the link to the new file. and the 'error' key will be set to false.
- *
- * This function will not move an uploaded file to the upload folder. It will
- * create a new file with the content in $bits parameter. If you move the upload
- * file, read the content of the uploaded file, and then you can give the
- * filename and content to this function, which will add it to the upload
- * folder.
- *
- * The permissions will be set on the new file automatically by this function.
- *
- * @since 2.0.0
- *
- * @param string       $name       Filename.
- * @param null|string  $deprecated Never used. Set to null.
- * @param mixed        $bits       File content
- * @param string       $time       Optional. Time formatted in 'yyyy/mm'. Default null.
- * @return array
- */
-function wp_upload_bits( $name, $deprecated, $bits, $time = null ) {
-	if ( !empty( $deprecated ) )
-		_deprecated_argument( __FUNCTION__, '2.0.0' );
-
-	if ( empty( $name ) )
-		return array( 'error' => __( 'Empty filename' ) );
-
-	$wp_filetype = wp_check_filetype( $name );
-	if ( ! $wp_filetype['ext'] && ! current_user_can( 'unfiltered_upload' ) )
-		return array( 'error' => __( 'Invalid file type' ) );
-
-	$upload = wp_upload_dir( $time );
-
-	if ( $upload['error'] !== false )
-		return $upload;
-
-	/**
-	 * Filters whether to treat the upload bits as an error.
-	 *
-	 * Passing a non-array to the filter will effectively short-circuit preparing
-	 * the upload bits, returning that value instead.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param mixed $upload_bits_error An array of upload bits data, or a non-array error to return.
-	 */
-	$upload_bits_error = apply_filters( 'wp_upload_bits', array( 'name' => $name, 'bits' => $bits, 'time' => $time ) );
-	if ( !is_array( $upload_bits_error ) ) {
-		$upload[ 'error' ] = $upload_bits_error;
-		return $upload;
-	}
-
-	$filename = wp_unique_filename( $upload['path'], $name );
-
-	$new_file = $upload['path'] . "/$filename";
-	if ( ! wp_mkdir_p( dirname( $new_file ) ) ) {
-		if ( 0 === strpos( $upload['basedir'], ABSPATH ) )
-			$error_path = str_replace( ABSPATH, '', $upload['basedir'] ) . $upload['subdir'];
-		else
-			$error_path = basename( $upload['basedir'] ) . $upload['subdir'];
-
-		$message = sprintf(
-			/* translators: %s: directory path */
-			__( 'Unable to create directory %s. Is its parent directory writable by the server?' ),
-			$error_path
-		);
-		return array( 'error' => $message );
-	}
-
-	$ifp = @ fopen( $new_file, 'wb' );
-	if ( ! $ifp )
-		return array( 'error' => sprintf( __( 'Could not write file %s' ), $new_file ) );
-
-	@fwrite( $ifp, $bits );
-	fclose( $ifp );
-	clearstatcache();
-
-	// Set correct file permissions
-	$stat = @ stat( dirname( $new_file ) );
-	$perms = $stat['mode'] & 0007777;
-	$perms = $perms & 0000666;
-	@ chmod( $new_file, $perms );
-	clearstatcache();
-
-	// Compute the URL
-	$url = $upload['url'] . "/$filename";
-
-	/** This filter is documented in wp-admin/includes/file.php */
-	return apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $wp_filetype['type'], 'error' => false ), 'sideload' );
-}
-
-/**
- * Retrieve the file type based on the extension name.
- *
- * @since 2.5.0
- *
- * @param string $ext The extension to search.
- * @return string|void The file type, example: audio, video, document, spreadsheet, etc.
- */
-function wp_ext2type( $ext ) {
-	$ext = strtolower( $ext );
-
-	$ext2type = wp_get_ext_types();
-	foreach ( $ext2type as $type => $exts )
-		if ( in_array( $ext, $exts ) )
-			return $type;
-}
-
-/**
- * Retrieve the file type from the file name.
- *
- * You can optionally define the mime array, if needed.
- *
- * @since 2.0.4
- *
- * @param string $filename File name or path.
- * @param array  $mimes    Optional. Key is the file extension with value as the mime type.
- * @return array Values with extension first and mime type.
- */
-function wp_check_filetype( $filename, $mimes = null ) {
-	if ( empty($mimes) )
-		$mimes = get_allowed_mime_types();
-	$type = false;
-	$ext = false;
-
-	foreach ( $mimes as $ext_preg => $mime_match ) {
-		$ext_preg = '!\.(' . $ext_preg . ')$!i';
-		if ( preg_match( $ext_preg, $filename, $ext_matches ) ) {
-			$type = $mime_match;
-			$ext = $ext_matches[1];
-			break;
-		}
-	}
-
-	return compact( 'ext', 'type' );
-}
-
-/**
- * Attempt to determine the real file type of a file.
- *
- * If unable to, the file name extension will be used to determine type.
- *
- * If it's determined that the extension does not match the file's real type,
- * then the "proper_filename" value will be set with a proper filename and extension.
- *
- * Currently this function only supports validating images known to getimagesize().
- *
- * @since 3.0.0
- *
- * @param string $file     Full path to the file.
- * @param string $filename The name of the file (may differ from $file due to $file being
- *                         in a tmp directory).
- * @param array   $mimes   Optional. Key is the file extension with value as the mime type.
- * @return array Values for the extension, MIME, and either a corrected filename or false
- *               if original $filename is valid.
- */
-function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) {
-	$proper_filename = false;
-
-	// Do basic extension validation and MIME mapping
-	$wp_filetype = wp_check_filetype( $filename, $mimes );
-	$ext = $wp_filetype['ext'];
-	$type = $wp_filetype['type'];
-
-	// We can't do any further validation without a file to work with
-	if ( ! file_exists( $file ) ) {
-		return compact( 'ext', 'type', 'proper_filename' );
-	}
-
-	// We're able to validate images using GD
-	if ( $type && 0 === strpos( $type, 'image/' ) && function_exists('getimagesize') ) {
-
-		// Attempt to figure out what type of image it actually is
-		$imgstats = @getimagesize( $file );
-
-		// If getimagesize() knows what kind of image it really is and if the real MIME doesn't match the claimed MIME
-		if ( !empty($imgstats['mime']) && $imgstats['mime'] != $type ) {
-			/**
-			 * Filters the list mapping image mime types to their respective extensions.
-			 *
-			 * @since 3.0.0
-			 *
-			 * @param  array $mime_to_ext Array of image mime types and their matching extensions.
-			 */
-			$mime_to_ext = apply_filters( 'getimagesize_mimes_to_exts', array(
-				'image/jpeg' => 'jpg',
-				'image/png'  => 'png',
-				'image/gif'  => 'gif',
-				'image/bmp'  => 'bmp',
-				'image/tiff' => 'tif',
-			) );
-
-			// Replace whatever is after the last period in the filename with the correct extension
-			if ( ! empty( $mime_to_ext[ $imgstats['mime'] ] ) ) {
-				$filename_parts = explode( '.', $filename );
-				array_pop( $filename_parts );
-				$filename_parts[] = $mime_to_ext[ $imgstats['mime'] ];
-				$new_filename = implode( '.', $filename_parts );
-
-				if ( $new_filename != $filename ) {
-					$proper_filename = $new_filename; // Mark that it changed
-				}
-				// Redefine the extension / MIME
-				$wp_filetype = wp_check_filetype( $new_filename, $mimes );
-				$ext = $wp_filetype['ext'];
-				$type = $wp_filetype['type'];
-			}
-		}
-	}
-
-	/**
-	 * Filters the "real" file type of the given file.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param array  $wp_check_filetype_and_ext File data array containing 'ext', 'type', and
-	 *                                          'proper_filename' keys.
-	 * @param string $file                      Full path to the file.
-	 * @param string $filename                  The name of the file (may differ from $file due to
-	 *                                          $file being in a tmp directory).
-	 * @param array  $mimes                     Key is the file extension with value as the mime type.
-	 */
-	return apply_filters( 'wp_check_filetype_and_ext', compact( 'ext', 'type', 'proper_filename' ), $file, $filename, $mimes );
-}
-
-/**
- * Retrieve list of mime types and file extensions.
- *
- * @since 3.5.0
- * @since 4.2.0 Support was added for GIMP (xcf) files.
- *
- * @return array Array of mime types keyed by the file extension regex corresponding to those types.
- */
-function wp_get_mime_types() {
-	/**
-	 * Filters the list of mime types and file extensions.
-	 *
-	 * This filter should be used to add, not remove, mime types. To remove
-	 * mime types, use the {@see 'upload_mimes'} filter.
-	 *
-	 * @since 3.5.0
-	 *
-	 * @param array $wp_get_mime_types Mime types keyed by the file extension regex
-	 *                                 corresponding to those types.
-	 */
-	return apply_filters( 'mime_types', array(
-	// Image formats.
-	'jpg|jpeg|jpe' => 'image/jpeg',
-	'gif' => 'image/gif',
-	'png' => 'image/png',
-	'bmp' => 'image/bmp',
-	'tiff|tif' => 'image/tiff',
-	'ico' => 'image/x-icon',
-	// Video formats.
-	'asf|asx' => 'video/x-ms-asf',
-	'wmv' => 'video/x-ms-wmv',
-	'wmx' => 'video/x-ms-wmx',
-	'wm' => 'video/x-ms-wm',
-	'avi' => 'video/avi',
-	'divx' => 'video/divx',
-	'flv' => 'video/x-flv',
-	'mov|qt' => 'video/quicktime',
-	'mpeg|mpg|mpe' => 'video/mpeg',
-	'mp4|m4v' => 'video/mp4',
-	'ogv' => 'video/ogg',
-	'webm' => 'video/webm',
-	'mkv' => 'video/x-matroska',
-	'3gp|3gpp' => 'video/3gpp', // Can also be audio
-	'3g2|3gp2' => 'video/3gpp2', // Can also be audio
-	// Text formats.
-	'txt|asc|c|cc|h|srt' => 'text/plain',
-	'csv' => 'text/csv',
-	'tsv' => 'text/tab-separated-values',
-	'ics' => 'text/calendar',
-	'rtx' => 'text/richtext',
-	'css' => 'text/css',
-	'htm|html' => 'text/html',
-	'vtt' => 'text/vtt',
-	'dfxp' => 'application/ttaf+xml',
-	// Audio formats.
-	'mp3|m4a|m4b' => 'audio/mpeg',
-	'ra|ram' => 'audio/x-realaudio',
-	'wav' => 'audio/wav',
-	'ogg|oga' => 'audio/ogg',
-	'mid|midi' => 'audio/midi',
-	'wma' => 'audio/x-ms-wma',
-	'wax' => 'audio/x-ms-wax',
-	'mka' => 'audio/x-matroska',
-	// Misc application formats.
-	'rtf' => 'application/rtf',
-	'js' => 'application/javascript',
-	'pdf' => 'application/pdf',
-	'swf' => 'application/x-shockwave-flash',
-	'class' => 'application/java',
-	'tar' => 'application/x-tar',
-	'zip' => 'application/zip',
-	'gz|gzip' => 'application/x-gzip',
-	'rar' => 'application/rar',
-	'7z' => 'application/x-7z-compressed',
-	'exe' => 'application/x-msdownload',
-	'psd' => 'application/octet-stream',
-	'xcf' => 'application/octet-stream',
-	// MS Office formats.
-	'doc' => 'application/msword',
-	'pot|pps|ppt' => 'application/vnd.ms-powerpoint',
-	'wri' => 'application/vnd.ms-write',
-	'xla|xls|xlt|xlw' => 'application/vnd.ms-excel',
-	'mdb' => 'application/vnd.ms-access',
-	'mpp' => 'application/vnd.ms-project',
-	'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
-	'docm' => 'application/vnd.ms-word.document.macroEnabled.12',
-	'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
-	'dotm' => 'application/vnd.ms-word.template.macroEnabled.12',
-	'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
-	'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
-	'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
-	'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
-	'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12',
-	'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12',
-	'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
-	'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
-	'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
-	'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12',
-	'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',
-	'potm' => 'application/vnd.ms-powerpoint.template.macroEnabled.12',
-	'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12',
-	'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide',
-	'sldm' => 'application/vnd.ms-powerpoint.slide.macroEnabled.12',
-	'onetoc|onetoc2|onetmp|onepkg' => 'application/onenote',
-	'oxps' => 'application/oxps',
-	'xps' => 'application/vnd.ms-xpsdocument',
-	// OpenOffice formats.
-	'odt' => 'application/vnd.oasis.opendocument.text',
-	'odp' => 'application/vnd.oasis.opendocument.presentation',
-	'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
-	'odg' => 'application/vnd.oasis.opendocument.graphics',
-	'odc' => 'application/vnd.oasis.opendocument.chart',
-	'odb' => 'application/vnd.oasis.opendocument.database',
-	'odf' => 'application/vnd.oasis.opendocument.formula',
-	// WordPerfect formats.
-	'wp|wpd' => 'application/wordperfect',
-	// iWork formats.
-	'key' => 'application/vnd.apple.keynote',
-	'numbers' => 'application/vnd.apple.numbers',
-	'pages' => 'application/vnd.apple.pages',
-	) );
-}
-
-/**
- * Retrieves the list of common file extensions and their types.
- *
- * @since 4.6.0
- *
- * @return array Array of file extensions types keyed by the type of file.
- */
-function wp_get_ext_types() {
-
-	/**
-	 * Filters file type based on the extension name.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @see wp_ext2type()
-	 *
-	 * @param array $ext2type Multi-dimensional array with extensions for a default set
-	 *                        of file types.
-	 */
-	return apply_filters( 'ext2type', array(
-		'image'       => array( 'jpg', 'jpeg', 'jpe',  'gif',  'png',  'bmp',   'tif',  'tiff', 'ico' ),
-		'audio'       => array( 'aac', 'ac3',  'aif',  'aiff', 'm3a',  'm4a',   'm4b',  'mka',  'mp1',  'mp2',  'mp3', 'ogg', 'oga', 'ram', 'wav', 'wma' ),
-		'video'       => array( '3g2',  '3gp', '3gpp', 'asf', 'avi',  'divx', 'dv',   'flv',  'm4v',   'mkv',  'mov',  'mp4',  'mpeg', 'mpg', 'mpv', 'ogm', 'ogv', 'qt',  'rm', 'vob', 'wmv' ),
-		'document'    => array( 'doc', 'docx', 'docm', 'dotm', 'odt',  'pages', 'pdf',  'xps',  'oxps', 'rtf',  'wp', 'wpd', 'psd', 'xcf' ),
-		'spreadsheet' => array( 'numbers',     'ods',  'xls',  'xlsx', 'xlsm',  'xlsb' ),
-		'interactive' => array( 'swf', 'key',  'ppt',  'pptx', 'pptm', 'pps',   'ppsx', 'ppsm', 'sldx', 'sldm', 'odp' ),
-		'text'        => array( 'asc', 'csv',  'tsv',  'txt' ),
-		'archive'     => array( 'bz2', 'cab',  'dmg',  'gz',   'rar',  'sea',   'sit',  'sqx',  'tar',  'tgz',  'zip', '7z' ),
-		'code'        => array( 'css', 'htm',  'html', 'php',  'js' ),
-	) );
-}
-
-/**
- * Retrieve list of allowed mime types and file extensions.
- *
- * @since 2.8.6
- *
- * @param int|WP_User $user Optional. User to check. Defaults to current user.
- * @return array Array of mime types keyed by the file extension regex corresponding
- *               to those types.
- */
-function get_allowed_mime_types( $user = null ) {
-	$t = wp_get_mime_types();
-
-	unset( $t['swf'], $t['exe'] );
-	if ( function_exists( 'current_user_can' ) )
-		$unfiltered = $user ? user_can( $user, 'unfiltered_html' ) : current_user_can( 'unfiltered_html' );
-
-	if ( empty( $unfiltered ) )
-		unset( $t['htm|html'] );
-
-	/**
-	 * Filters list of allowed mime types and file extensions.
-	 *
-	 * @since 2.0.0
-	 *
-	 * @param array            $t    Mime types keyed by the file extension regex corresponding to
-	 *                               those types. 'swf' and 'exe' removed from full list. 'htm|html' also
-	 *                               removed depending on '$user' capabilities.
-	 * @param int|WP_User|null $user User ID, User object or null if not provided (indicates current user).
-	 */
-	return apply_filters( 'upload_mimes', $t, $user );
-}
-
-/**
- * Display "Are You Sure" message to confirm the action being taken.
- *
- * If the action has the nonce explain message, then it will be displayed
- * along with the "Are you sure?" message.
- *
- * @since 2.0.4
- *
- * @param string $action The nonce action.
- */
-function wp_nonce_ays( $action ) {
-	if ( 'log-out' == $action ) {
-		$html = sprintf(
-			/* translators: %s: site name */
-			__( 'You are attempting to log out of %s' ),
-			get_bloginfo( 'name' )
-		);
-		$html .= '</p><p>';
-		$redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
-		$html .= sprintf(
-			/* translators: %s: logout URL */
-			__( 'Do you really want to <a href="%s">log out</a>?' ),
-			wp_logout_url( $redirect_to )
-		);
-	} else {
-		$html = __( 'Are you sure you want to do this?' );
-		if ( wp_get_referer() ) {
-			$html .= '</p><p>';
-			$html .= sprintf( '<a href="%s">%s</a>',
-				esc_url( remove_query_arg( 'updated', wp_get_referer() ) ),
-				__( 'Please try again.' )
-			);
-		}
-	}
-
-	wp_die( $html, __( 'WordPress Failure Notice' ), 403 );
-}
-
-/**
- * Kill WordPress execution and display HTML message with error message.
- *
- * This function complements the `die()` PHP function. The difference is that
- * HTML will be displayed to the user. It is recommended to use this function
- * only when the execution should not continue any further. It is not recommended
- * to call this function very often, and try to handle as many errors as possible
- * silently or more gracefully.
- *
- * As a shorthand, the desired HTTP response code may be passed as an integer to
- * the `$title` parameter (the default title would apply) or the `$args` parameter.
- *
- * @since 2.0.4
- * @since 4.1.0 The `$title` and `$args` parameters were changed to optionally accept
- *              an integer to be used as the response code.
- *
- * @param string|WP_Error  $message Optional. Error message. If this is a WP_Error object,
- *                                  and not an Ajax or XML-RPC request, the error's messages are used.
- *                                  Default empty.
- * @param string|int       $title   Optional. Error title. If `$message` is a `WP_Error` object,
- *                                  error data with the key 'title' may be used to specify the title.
- *                                  If `$title` is an integer, then it is treated as the response
- *                                  code. Default empty.
- * @param string|array|int $args {
- *     Optional. Arguments to control behavior. If `$args` is an integer, then it is treated
- *     as the response code. Default empty array.
- *
- *     @type int    $response       The HTTP response code. Default 500.
- *     @type bool   $back_link      Whether to include a link to go back. Default false.
- *     @type string $text_direction The text direction. This is only useful internally, when WordPress
- *                                  is still loading and the site's locale is not set up yet. Accepts 'rtl'.
- *                                  Default is the value of is_rtl().
- * }
- */
-function wp_die( $message = '', $title = '', $args = array() ) {
-
-	if ( is_int( $args ) ) {
-		$args = array( 'response' => $args );
-	} elseif ( is_int( $title ) ) {
-		$args  = array( 'response' => $title );
-		$title = '';
-	}
-
-	if ( wp_doing_ajax() ) {
-		/**
-		 * Filters the callback for killing WordPress execution for Ajax requests.
-		 *
-		 * @since 3.4.0
-		 *
-		 * @param callable $function Callback function name.
-		 */
-		$function = apply_filters( 'wp_die_ajax_handler', '_ajax_wp_die_handler' );
-	} elseif ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) {
-		/**
-		 * Filters the callback for killing WordPress execution for XML-RPC requests.
-		 *
-		 * @since 3.4.0
-		 *
-		 * @param callable $function Callback function name.
-		 */
-		$function = apply_filters( 'wp_die_xmlrpc_handler', '_xmlrpc_wp_die_handler' );
-	} else {
-		/**
-		 * Filters the callback for killing WordPress execution for all non-Ajax, non-XML-RPC requests.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param callable $function Callback function name.
-		 */
-		$function = apply_filters( 'wp_die_handler', '_default_wp_die_handler' );
-	}
-
-	call_user_func( $function, $message, $title, $args );
-}
-
-/**
- * Kills WordPress execution and display HTML message with error message.
- *
- * This is the default handler for wp_die if you want a custom one for your
- * site then you can overload using the {@see 'wp_die_handler'} filter in wp_die().
- *
- * @since 3.0.0
- * @access private
- *
- * @param string|WP_Error $message Error message or WP_Error object.
- * @param string          $title   Optional. Error title. Default empty.
- * @param string|array    $args    Optional. Arguments to control behavior. Default empty array.
- */
-function _default_wp_die_handler( $message, $title = '', $args = array() ) {
-	$defaults = array( 'response' => 500 );
-	$r = wp_parse_args($args, $defaults);
-
-	$have_gettext = function_exists('__');
-
-	if ( function_exists( 'is_wp_error' ) && is_wp_error( $message ) ) {
-		if ( empty( $title ) ) {
-			$error_data = $message->get_error_data();
-			if ( is_array( $error_data ) && isset( $error_data['title'] ) )
-				$title = $error_data['title'];
-		}
-		$errors = $message->get_error_messages();
-		switch ( count( $errors ) ) {
-		case 0 :
-			$message = '';
-			break;
-		case 1 :
-			$message = "<p>{$errors[0]}</p>";
-			break;
-		default :
-			$message = "<ul>\n\t\t<li>" . join( "</li>\n\t\t<li>", $errors ) . "</li>\n\t</ul>";
-			break;
-		}
-	} elseif ( is_string( $message ) ) {
-		$message = "<p>$message</p>";
-	}
-
-	if ( isset( $r['back_link'] ) && $r['back_link'] ) {
-		$back_text = $have_gettext? __('&laquo; Back') : '&laquo; Back';
-		$message .= "\n<p><a href='javascript:history.back()'>$back_text</a></p>";
-	}
-
-	if ( ! did_action( 'admin_head' ) ) :
-		if ( !headers_sent() ) {
-			status_header( $r['response'] );
-			nocache_headers();
-			header( 'Content-Type: text/html; charset=utf-8' );
-		}
-
-		if ( empty($title) )
-			$title = $have_gettext ? __('WordPress &rsaquo; Error') : 'WordPress &rsaquo; Error';
-
-		$text_direction = 'ltr';
-		if ( isset($r['text_direction']) && 'rtl' == $r['text_direction'] )
-			$text_direction = 'rtl';
-		elseif ( function_exists( 'is_rtl' ) && is_rtl() )
-			$text_direction = 'rtl';
-?>
-<!DOCTYPE html>
-<!-- Ticket #11289, IE bug fix: always pad the error page with enough characters such that it is greater than 512 bytes, even after gzip compression abcdefghijklmnopqrstuvwxyz1234567890aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz11223344556677889900abacbcbdcdcededfefegfgfhghgihihjijikjkjlklkmlmlnmnmononpopoqpqprqrqsrsrtstsubcbcdcdedefefgfabcadefbghicjkldmnoepqrfstugvwxhyz1i234j567k890laabmbccnddeoeffpgghqhiirjjksklltmmnunoovppqwqrrxsstytuuzvvw0wxx1yyz2z113223434455666777889890091abc2def3ghi4jkl5mno6pqr7stu8vwx9yz11aab2bcc3dd4ee5ff6gg7hh8ii9j0jk1kl2lmm3nnoo4p5pq6qrr7ss8tt9uuvv0wwx1x2yyzz13aba4cbcb5dcdc6dedfef8egf9gfh0ghg1ihi2hji3jik4jkj5lkl6kml7mln8mnm9ono
--->
-<html xmlns="http://www.w3.org/1999/xhtml" <?php if ( function_exists( 'language_attributes' ) && function_exists( 'is_rtl' ) ) language_attributes(); else echo "dir='$text_direction'"; ?>>
-<head>
-	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-	<meta name="viewport" content="width=device-width">
-	<?php
-	if ( function_exists( 'wp_no_robots' ) ) {
-		wp_no_robots();
-	}
-	?>
-	<title><?php echo $title ?></title>
-	<style type="text/css">
-		html {
-			background: #f1f1f1;
-		}
-		body {
-			background: #fff;
-			color: #444;
-			font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
-			margin: 2em auto;
-			padding: 1em 2em;
-			max-width: 700px;
-			-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.13);
-			box-shadow: 0 1px 3px rgba(0,0,0,0.13);
-		}
-		h1 {
-			border-bottom: 1px solid #dadada;
-			clear: both;
-			color: #666;
-			font-size: 24px;
-			margin: 30px 0 0 0;
-			padding: 0;
-			padding-bottom: 7px;
-		}
-		#error-page {
-			margin-top: 50px;
-		}
-		#error-page p {
-			font-size: 14px;
-			line-height: 1.5;
-			margin: 25px 0 20px;
-		}
-		#error-page code {
-			font-family: Consolas, Monaco, monospace;
-		}
-		ul li {
-			margin-bottom: 10px;
-			font-size: 14px ;
-		}
-		a {
-			color: #0073aa;
-		}
-		a:hover,
-		a:active {
-			color: #00a0d2;
-		}
-		a:focus {
-			color: #124964;
-		    -webkit-box-shadow:
-		    	0 0 0 1px #5b9dd9,
-				0 0 2px 1px rgba(30, 140, 190, .8);
-		    box-shadow:
-		    	0 0 0 1px #5b9dd9,
-				0 0 2px 1px rgba(30, 140, 190, .8);
-			outline: none;
-		}
-		.button {
-			background: #f7f7f7;
-			border: 1px solid #ccc;
-			color: #555;
-			display: inline-block;
-			text-decoration: none;
-			font-size: 13px;
-			line-height: 26px;
-			height: 28px;
-			margin: 0;
-			padding: 0 10px 1px;
-			cursor: pointer;
-			-webkit-border-radius: 3px;
-			-webkit-appearance: none;
-			border-radius: 3px;
-			white-space: nowrap;
-			-webkit-box-sizing: border-box;
-			-moz-box-sizing:    border-box;
-			box-sizing:         border-box;
-
-			-webkit-box-shadow: 0 1px 0 #ccc;
-			box-shadow: 0 1px 0 #ccc;
-		 	vertical-align: top;
-		}
-
-		.button.button-large {
-			height: 30px;
-			line-height: 28px;
-			padding: 0 12px 2px;
-		}
-
-		.button:hover,
-		.button:focus {
-			background: #fafafa;
-			border-color: #999;
-			color: #23282d;
-		}
-
-		.button:focus  {
-			border-color: #5b9dd9;
-			-webkit-box-shadow: 0 0 3px rgba( 0, 115, 170, .8 );
-			box-shadow: 0 0 3px rgba( 0, 115, 170, .8 );
-			outline: none;
-		}
-
-		.button:active {
-			background: #eee;
-			border-color: #999;
-		 	-webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
-		 	box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
-		 	-webkit-transform: translateY(1px);
-		 	-ms-transform: translateY(1px);
-		 	transform: translateY(1px);
-		}
-
-		<?php
-		if ( 'rtl' == $text_direction ) {
-			echo 'body { font-family: Tahoma, Arial; }';
-		}
-		?>
-	</style>
-</head>
-<body id="error-page">
-<?php endif; // ! did_action( 'admin_head' ) ?>
-	<?php echo $message; ?>
-</body>
-</html>
-<?php
-	die();
-}
-
-/**
- * Kill WordPress execution and display XML message with error message.
- *
- * This is the handler for wp_die when processing XMLRPC requests.
- *
- * @since 3.2.0
- * @access private
- *
- * @global wp_xmlrpc_server $wp_xmlrpc_server
- *
- * @param string       $message Error message.
- * @param string       $title   Optional. Error title. Default empty.
- * @param string|array $args    Optional. Arguments to control behavior. Default empty array.
- */
-function _xmlrpc_wp_die_handler( $message, $title = '', $args = array() ) {
-	global $wp_xmlrpc_server;
-	$defaults = array( 'response' => 500 );
-
-	$r = wp_parse_args($args, $defaults);
-
-	if ( $wp_xmlrpc_server ) {
-		$error = new IXR_Error( $r['response'] , $message);
-		$wp_xmlrpc_server->output( $error->getXml() );
-	}
-	die();
-}
-
-/**
- * Kill WordPress ajax execution.
- *
- * This is the handler for wp_die when processing Ajax requests.
- *
- * @since 3.4.0
- * @access private
- *
- * @param string       $message Error message.
- * @param string       $title   Optional. Error title (unused). Default empty.
- * @param string|array $args    Optional. Arguments to control behavior. Default empty array.
- */
-function _ajax_wp_die_handler( $message, $title = '', $args = array() ) {
-	$defaults = array(
-		'response' => 200,
-	);
-	$r = wp_parse_args( $args, $defaults );
-
-	if ( ! headers_sent() ) {
-		status_header( $r['response'] );
-	}
-	if ( is_scalar( $message ) )
-		die( (string) $message );
-	die( '0' );
-}
-
-/**
- * Kill WordPress execution.
- *
- * This is the handler for wp_die when processing APP requests.
- *
- * @since 3.4.0
- * @access private
- *
- * @param string $message Optional. Response to print. Default empty.
- */
-function _scalar_wp_die_handler( $message = '' ) {
-	if ( is_scalar( $message ) )
-		die( (string) $message );
-	die();
-}
-
-/**
- * Encode a variable into JSON, with some sanity checks.
- *
- * @since 4.1.0
- *
- * @param mixed $data    Variable (usually an array or object) to encode as JSON.
- * @param int   $options Optional. Options to be passed to json_encode(). Default 0.
- * @param int   $depth   Optional. Maximum depth to walk through $data. Must be
- *                       greater than 0. Default 512.
- * @return string|false The JSON encoded string, or false if it cannot be encoded.
- */
-function wp_json_encode( $data, $options = 0, $depth = 512 ) {
-	/*
-	 * json_encode() has had extra params added over the years.
-	 * $options was added in 5.3, and $depth in 5.5.
-	 * We need to make sure we call it with the correct arguments.
-	 */
-	if ( version_compare( PHP_VERSION, '5.5', '>=' ) ) {
-		$args = array( $data, $options, $depth );
-	} elseif ( version_compare( PHP_VERSION, '5.3', '>=' ) ) {
-		$args = array( $data, $options );
-	} else {
-		$args = array( $data );
-	}
-
-	// Prepare the data for JSON serialization.
-	$args[0] = _wp_json_prepare_data( $data );
-
-	$json = @call_user_func_array( 'json_encode', $args );
-
-	// If json_encode() was successful, no need to do more sanity checking.
-	// ... unless we're in an old version of PHP, and json_encode() returned
-	// a string containing 'null'. Then we need to do more sanity checking.
-	if ( false !== $json && ( version_compare( PHP_VERSION, '5.5', '>=' ) || false === strpos( $json, 'null' ) ) )  {
-		return $json;
-	}
-
-	try {
-		$args[0] = _wp_json_sanity_check( $data, $depth );
-	} catch ( Exception $e ) {
-		return false;
-	}
-
-	return call_user_func_array( 'json_encode', $args );
-}
-
-/**
- * Perform sanity checks on data that shall be encoded to JSON.
- *
- * @ignore
- * @since 4.1.0
- * @access private
- *
- * @see wp_json_encode()
- *
- * @param mixed $data  Variable (usually an array or object) to encode as JSON.
- * @param int   $depth Maximum depth to walk through $data. Must be greater than 0.
- * @return mixed The sanitized data that shall be encoded to JSON.
- */
-function _wp_json_sanity_check( $data, $depth ) {
-	if ( $depth < 0 ) {
-		throw new Exception( 'Reached depth limit' );
-	}
-
-	if ( is_array( $data ) ) {
-		$output = array();
-		foreach ( $data as $id => $el ) {
-			// Don't forget to sanitize the ID!
-			if ( is_string( $id ) ) {
-				$clean_id = _wp_json_convert_string( $id );
-			} else {
-				$clean_id = $id;
-			}
-
-			// Check the element type, so that we're only recursing if we really have to.
-			if ( is_array( $el ) || is_object( $el ) ) {
-				$output[ $clean_id ] = _wp_json_sanity_check( $el, $depth - 1 );
-			} elseif ( is_string( $el ) ) {
-				$output[ $clean_id ] = _wp_json_convert_string( $el );
-			} else {
-				$output[ $clean_id ] = $el;
-			}
-		}
-	} elseif ( is_object( $data ) ) {
-		$output = new stdClass;
-		foreach ( $data as $id => $el ) {
-			if ( is_string( $id ) ) {
-				$clean_id = _wp_json_convert_string( $id );
-			} else {
-				$clean_id = $id;
-			}
-
-			if ( is_array( $el ) || is_object( $el ) ) {
-				$output->$clean_id = _wp_json_sanity_check( $el, $depth - 1 );
-			} elseif ( is_string( $el ) ) {
-				$output->$clean_id = _wp_json_convert_string( $el );
-			} else {
-				$output->$clean_id = $el;
-			}
-		}
-	} elseif ( is_string( $data ) ) {
-		return _wp_json_convert_string( $data );
-	} else {
-		return $data;
-	}
-
-	return $output;
-}
-
-/**
- * Convert a string to UTF-8, so that it can be safely encoded to JSON.
- *
- * @ignore
- * @since 4.1.0
- * @access private
- *
- * @see _wp_json_sanity_check()
- *
- * @staticvar bool $use_mb
- *
- * @param string $string The string which is to be converted.
- * @return string The checked string.
- */
-function _wp_json_convert_string( $string ) {
-	static $use_mb = null;
-	if ( is_null( $use_mb ) ) {
-		$use_mb = function_exists( 'mb_convert_encoding' );
-	}
-
-	if ( $use_mb ) {
-		$encoding = mb_detect_encoding( $string, mb_detect_order(), true );
-		if ( $encoding ) {
-			return mb_convert_encoding( $string, 'UTF-8', $encoding );
-		} else {
-			return mb_convert_encoding( $string, 'UTF-8', 'UTF-8' );
-		}
-	} else {
-		return wp_check_invalid_utf8( $string, true );
-	}
-}
-
-/**
- * Prepares response data to be serialized to JSON.
- *
- * This supports the JsonSerializable interface for PHP 5.2-5.3 as well.
- *
- * @ignore
- * @since 4.4.0
- * @access private
- *
- * @param mixed $data Native representation.
- * @return bool|int|float|null|string|array Data ready for `json_encode()`.
- */
-function _wp_json_prepare_data( $data ) {
-	if ( ! defined( 'WP_JSON_SERIALIZE_COMPATIBLE' ) || WP_JSON_SERIALIZE_COMPATIBLE === false ) {
-		return $data;
-	}
-
-	switch ( gettype( $data ) ) {
-		case 'boolean':
-		case 'integer':
-		case 'double':
-		case 'string':
-		case 'NULL':
-			// These values can be passed through.
-			return $data;
-
-		case 'array':
-			// Arrays must be mapped in case they also return objects.
-			return array_map( '_wp_json_prepare_data', $data );
-
-		case 'object':
-			// If this is an incomplete object (__PHP_Incomplete_Class), bail.
-			if ( ! is_object( $data ) ) {
-				return null;
-			}
-
-			if ( $data instanceof JsonSerializable ) {
-				$data = $data->jsonSerialize();
-			} else {
-				$data = get_object_vars( $data );
-			}
-
-			// Now, pass the array (or whatever was returned from jsonSerialize through).
-			return _wp_json_prepare_data( $data );
-
-		default:
-			return null;
-	}
-}
-
-/**
- * Send a JSON response back to an Ajax request.
- *
- * @since 3.5.0
- * @since 4.7.0 The `$status_code` parameter was added.
- *
- * @param mixed $response    Variable (usually an array or object) to encode as JSON,
- *                           then print and die.
- * @param int   $status_code The HTTP status code to output.
- */
-function wp_send_json( $response, $status_code = null ) {
-	@header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
-	if ( null !== $status_code ) {
-		status_header( $status_code );
-	}
-	echo wp_json_encode( $response );
-	if ( wp_doing_ajax() )
-		wp_die();
-	else
-		die;
-}
-
-/**
- * Send a JSON response back to an Ajax request, indicating success.
- *
- * @since 3.5.0
- * @since 4.7.0 The `$status_code` parameter was added.
- *
- * @param mixed $data        Data to encode as JSON, then print and die.
- * @param int   $status_code The HTTP status code to output.
- */
-function wp_send_json_success( $data = null, $status_code = null ) {
-	$response = array( 'success' => true );
-
-	if ( isset( $data ) )
-		$response['data'] = $data;
-
-	wp_send_json( $response, $status_code );
-}
-
-/**
- * Send a JSON response back to an Ajax request, indicating failure.
- *
- * If the `$data` parameter is a WP_Error object, the errors
- * within the object are processed and output as an array of error
- * codes and corresponding messages. All other types are output
- * without further processing.
- *
- * @since 3.5.0
- * @since 4.1.0 The `$data` parameter is now processed if a WP_Error object is passed in.
- * @since 4.7.0 The `$status_code` parameter was added.
- *
- * @param mixed $data        Data to encode as JSON, then print and die.
- * @param int   $status_code The HTTP status code to output.
- */
-function wp_send_json_error( $data = null, $status_code = null ) {
-	$response = array( 'success' => false );
-
-	if ( isset( $data ) ) {
-		if ( is_wp_error( $data ) ) {
-			$result = array();
-			foreach ( $data->errors as $code => $messages ) {
-				foreach ( $messages as $message ) {
-					$result[] = array( 'code' => $code, 'message' => $message );
-				}
-			}
-
-			$response['data'] = $result;
-		} else {
-			$response['data'] = $data;
-		}
-	}
-
-	wp_send_json( $response, $status_code );
-}
-
-/**
- * Checks that a JSONP callback is a valid JavaScript callback.
- *
- * Only allows alphanumeric characters and the dot character in callback
- * function names. This helps to mitigate XSS attacks caused by directly
- * outputting user input.
- *
- * @since 4.6.0
- *
- * @param string $callback Supplied JSONP callback function.
- * @return bool True if valid callback, otherwise false.
- */
-function wp_check_jsonp_callback( $callback ) {
-	if ( ! is_string( $callback ) ) {
-		return false;
-	}
-
-	preg_replace( '/[^\w\.]/', '', $callback, -1, $illegal_char_count );
-
-	return 0 === $illegal_char_count;
-}
-
-/**
- * Retrieve the WordPress home page URL.
- *
- * If the constant named 'WP_HOME' exists, then it will be used and returned
- * by the function. This can be used to counter the redirection on your local
- * development environment.
- *
- * @since 2.2.0
- * @access private
- *
- * @see WP_HOME
- *
- * @param string $url URL for the home location.
- * @return string Homepage location.
- */
-function _config_wp_home( $url = '' ) {
-	if ( defined( 'WP_HOME' ) )
-		return untrailingslashit( WP_HOME );
-	return $url;
-}
-
-/**
- * Retrieve the WordPress site URL.
- *
- * If the constant named 'WP_SITEURL' is defined, then the value in that
- * constant will always be returned. This can be used for debugging a site
- * on your localhost while not having to change the database to your URL.
- *
- * @since 2.2.0
- * @access private
- *
- * @see WP_SITEURL
- *
- * @param string $url URL to set the WordPress site location.
- * @return string The WordPress Site URL.
- */
-function _config_wp_siteurl( $url = '' ) {
-	if ( defined( 'WP_SITEURL' ) )
-		return untrailingslashit( WP_SITEURL );
-	return $url;
-}
-
-/**
- * Set the localized direction for MCE plugin.
- *
- * Will only set the direction to 'rtl', if the WordPress locale has
- * the text direction set to 'rtl'.
- *
- * Fills in the 'directionality' setting, enables the 'directionality'
- * plugin, and adds the 'ltr' button to 'toolbar1', formerly
- * 'theme_advanced_buttons1' array keys. These keys are then returned
- * in the $mce_init (TinyMCE settings) array.
- *
- * @since 2.1.0
- * @access private
- *
- * @param array $mce_init MCE settings array.
- * @return array Direction set for 'rtl', if needed by locale.
- */
-function _mce_set_direction( $mce_init ) {
-	if ( is_rtl() ) {
-		$mce_init['directionality'] = 'rtl';
-		$mce_init['rtl_ui'] = true;
-
-		if ( ! empty( $mce_init['plugins'] ) && strpos( $mce_init['plugins'], 'directionality' ) === false ) {
-			$mce_init['plugins'] .= ',directionality';
-		}
-
-		if ( ! empty( $mce_init['toolbar1'] ) && ! preg_match( '/\bltr\b/', $mce_init['toolbar1'] ) ) {
-			$mce_init['toolbar1'] .= ',ltr';
-		}
-	}
-
-	return $mce_init;
-}
-
-
-/**
- * Convert smiley code to the icon graphic file equivalent.
- *
- * You can turn off smilies, by going to the write setting screen and unchecking
- * the box, or by setting 'use_smilies' option to false or removing the option.
- *
- * Plugins may override the default smiley list by setting the $wpsmiliestrans
- * to an array, with the key the code the blogger types in and the value the
- * image file.
- *
- * The $wp_smiliessearch global is for the regular expression and is set each
- * time the function is called.
- *
- * The full list of smilies can be found in the function and won't be listed in
- * the description. Probably should create a Codex page for it, so that it is
- * available.
- *
- * @global array $wpsmiliestrans
- * @global array $wp_smiliessearch
- *
- * @since 2.2.0
- */
-function smilies_init() {
-	global $wpsmiliestrans, $wp_smiliessearch;
-
-	// don't bother setting up smilies if they are disabled
-	if ( !get_option( 'use_smilies' ) )
-		return;
-
-	if ( !isset( $wpsmiliestrans ) ) {
-		$wpsmiliestrans = array(
-		':mrgreen:' => 'mrgreen.png',
-		':neutral:' => "\xf0\x9f\x98\x90",
-		':twisted:' => "\xf0\x9f\x98\x88",
-		  ':arrow:' => "\xe2\x9e\xa1",
-		  ':shock:' => "\xf0\x9f\x98\xaf",
-		  ':smile:' => "\xf0\x9f\x99\x82",
-		    ':???:' => "\xf0\x9f\x98\x95",
-		   ':cool:' => "\xf0\x9f\x98\x8e",
-		   ':evil:' => "\xf0\x9f\x91\xbf",
-		   ':grin:' => "\xf0\x9f\x98\x80",
-		   ':idea:' => "\xf0\x9f\x92\xa1",
-		   ':oops:' => "\xf0\x9f\x98\xb3",
-		   ':razz:' => "\xf0\x9f\x98\x9b",
-		   ':roll:' => "\xf0\x9f\x99\x84",
-		   ':wink:' => "\xf0\x9f\x98\x89",
-		    ':cry:' => "\xf0\x9f\x98\xa5",
-		    ':eek:' => "\xf0\x9f\x98\xae",
-		    ':lol:' => "\xf0\x9f\x98\x86",
-		    ':mad:' => "\xf0\x9f\x98\xa1",
-		    ':sad:' => "\xf0\x9f\x99\x81",
-		      '8-)' => "\xf0\x9f\x98\x8e",
-		      '8-O' => "\xf0\x9f\x98\xaf",
-		      ':-(' => "\xf0\x9f\x99\x81",
-		      ':-)' => "\xf0\x9f\x99\x82",
-		      ':-?' => "\xf0\x9f\x98\x95",
-		      ':-D' => "\xf0\x9f\x98\x80",
-		      ':-P' => "\xf0\x9f\x98\x9b",
-		      ':-o' => "\xf0\x9f\x98\xae",
-		      ':-x' => "\xf0\x9f\x98\xa1",
-		      ':-|' => "\xf0\x9f\x98\x90",
-		      ';-)' => "\xf0\x9f\x98\x89",
-		// This one transformation breaks regular text with frequency.
-		//     '8)' => "\xf0\x9f\x98\x8e",
-		       '8O' => "\xf0\x9f\x98\xaf",
-		       ':(' => "\xf0\x9f\x99\x81",
-		       ':)' => "\xf0\x9f\x99\x82",
-		       ':?' => "\xf0\x9f\x98\x95",
-		       ':D' => "\xf0\x9f\x98\x80",
-		       ':P' => "\xf0\x9f\x98\x9b",
-		       ':o' => "\xf0\x9f\x98\xae",
-		       ':x' => "\xf0\x9f\x98\xa1",
-		       ':|' => "\xf0\x9f\x98\x90",
-		       ';)' => "\xf0\x9f\x98\x89",
-		      ':!:' => "\xe2\x9d\x97",
-		      ':?:' => "\xe2\x9d\x93",
-		);
-	}
-
-	/**
-	 * Filters all the smilies.
-	 *
-	 * This filter must be added before `smilies_init` is run, as
-	 * it is normally only run once to setup the smilies regex.
-	 *
-	 * @since 4.7.0
-	 *
-	 * @param array $wpsmiliestrans List of the smilies.
-	 */
-	$wpsmiliestrans = apply_filters('smilies', $wpsmiliestrans);
-
-	if (count($wpsmiliestrans) == 0) {
-		return;
-	}
-
-	/*
-	 * NOTE: we sort the smilies in reverse key order. This is to make sure
-	 * we match the longest possible smilie (:???: vs :?) as the regular
-	 * expression used below is first-match
-	 */
-	krsort($wpsmiliestrans);
-
-	$spaces = wp_spaces_regexp();
-
-	// Begin first "subpattern"
-	$wp_smiliessearch = '/(?<=' . $spaces . '|^)';
-
-	$subchar = '';
-	foreach ( (array) $wpsmiliestrans as $smiley => $img ) {
-		$firstchar = substr($smiley, 0, 1);
-		$rest = substr($smiley, 1);
-
-		// new subpattern?
-		if ($firstchar != $subchar) {
-			if ($subchar != '') {
-				$wp_smiliessearch .= ')(?=' . $spaces . '|$)';  // End previous "subpattern"
-				$wp_smiliessearch .= '|(?<=' . $spaces . '|^)'; // Begin another "subpattern"
-			}
-			$subchar = $firstchar;
-			$wp_smiliessearch .= preg_quote($firstchar, '/') . '(?:';
-		} else {
-			$wp_smiliessearch .= '|';
-		}
-		$wp_smiliessearch .= preg_quote($rest, '/');
-	}
-
-	$wp_smiliessearch .= ')(?=' . $spaces . '|$)/m';
-
-}
-
-/**
- * Merge user defined arguments into defaults array.
- *
- * This function is used throughout WordPress to allow for both string or array
- * to be merged into another array.
- *
- * @since 2.2.0
- *
- * @param string|array $args     Value to merge with $defaults
- * @param array        $defaults Optional. Array that serves as the defaults. Default empty.
- * @return array Merged user defined values with defaults.
- */
-function wp_parse_args( $args, $defaults = '' ) {
-	if ( is_object( $args ) )
-		$r = get_object_vars( $args );
-	elseif ( is_array( $args ) )
-		$r =& $args;
-	else
-		wp_parse_str( $args, $r );
-
-	if ( is_array( $defaults ) )
-		return array_merge( $defaults, $r );
-	return $r;
-}
-
-/**
- * Clean up an array, comma- or space-separated list of IDs.
- *
- * @since 3.0.0
- *
- * @param array|string $list List of ids.
- * @return array Sanitized array of IDs.
- */
-function wp_parse_id_list( $list ) {
-	if ( !is_array($list) )
-		$list = preg_split('/[\s,]+/', $list);
-
-	return array_unique(array_map('absint', $list));
-}
-
-/**
- * Extract a slice of an array, given a list of keys.
- *
- * @since 3.1.0
- *
- * @param array $array The original array.
- * @param array $keys  The list of keys.
- * @return array The array slice.
- */
-function wp_array_slice_assoc( $array, $keys ) {
-	$slice = array();
-	foreach ( $keys as $key )
-		if ( isset( $array[ $key ] ) )
-			$slice[ $key ] = $array[ $key ];
-
-	return $slice;
-}
-
-/**
- * Determines if the variable is a numeric-indexed array.
- *
- * @since 4.4.0
- *
- * @param mixed $data Variable to check.
- * @return bool Whether the variable is a list.
- */
-function wp_is_numeric_array( $data ) {
-	if ( ! is_array( $data ) ) {
-		return false;
-	}
-
-	$keys = array_keys( $data );
-	$string_keys = array_filter( $keys, 'is_string' );
-	return count( $string_keys ) === 0;
-}
-
-/**
- * Filters a list of objects, based on a set of key => value arguments.
- *
- * @since 3.0.0
- *
- * @param array       $list     An array of objects to filter
- * @param array       $args     Optional. An array of key => value arguments to match
- *                              against each object. Default empty array.
- * @param string      $operator Optional. The logical operation to perform. 'or' means
- *                              only one element from the array needs to match; 'and'
- *                              means all elements must match; 'not' means no elements may
- *                              match. Default 'and'.
- * @param bool|string $field    A field from the object to place instead of the entire object.
- *                              Default false.
- * @return array A list of objects or object fields.
- */
-function wp_filter_object_list( $list, $args = array(), $operator = 'and', $field = false ) {
-	if ( ! is_array( $list ) )
-		return array();
-
-	$list = wp_list_filter( $list, $args, $operator );
-
-	if ( $field )
-		$list = wp_list_pluck( $list, $field );
-
-	return $list;
-}
-
-/**
- * Filters a list of objects, based on a set of key => value arguments.
- *
- * @since 3.1.0
- *
- * @param array  $list     An array of objects to filter.
- * @param array  $args     Optional. An array of key => value arguments to match
- *                         against each object. Default empty array.
- * @param string $operator Optional. The logical operation to perform. 'AND' means
- *                         all elements from the array must match. 'OR' means only
- *                         one element needs to match. 'NOT' means no elements may
- *                         match. Default 'AND'.
- * @return array Array of found values.
- */
-function wp_list_filter( $list, $args = array(), $operator = 'AND' ) {
-	if ( ! is_array( $list ) )
-		return array();
-
-	if ( empty( $args ) )
-		return $list;
-
-	$operator = strtoupper( $operator );
-	$count = count( $args );
-	$filtered = array();
-
-	foreach ( $list as $key => $obj ) {
-		$to_match = (array) $obj;
-
-		$matched = 0;
-		foreach ( $args as $m_key => $m_value ) {
-			if ( array_key_exists( $m_key, $to_match ) && $m_value == $to_match[ $m_key ] )
-				$matched++;
-		}
-
-		if ( ( 'AND' == $operator && $matched == $count )
-		  || ( 'OR' == $operator && $matched > 0 )
-		  || ( 'NOT' == $operator && 0 == $matched ) ) {
-			$filtered[$key] = $obj;
-		}
-	}
-
-	return $filtered;
-}
-
-/**
- * Pluck a certain field out of each object in a list.
- *
- * This has the same functionality and prototype of
- * array_column() (PHP 5.5) but also supports objects.
- *
- * @since 3.1.0
- * @since 4.0.0 $index_key parameter added.
- *
- * @param array      $list      List of objects or arrays
- * @param int|string $field     Field from the object to place instead of the entire object
- * @param int|string $index_key Optional. Field from the object to use as keys for the new array.
- *                              Default null.
- * @return array Array of found values. If `$index_key` is set, an array of found values with keys
- *               corresponding to `$index_key`. If `$index_key` is null, array keys from the original
- *               `$list` will be preserved in the results.
- */
-function wp_list_pluck( $list, $field, $index_key = null ) {
-	if ( ! $index_key ) {
-		/*
-		 * This is simple. Could at some point wrap array_column()
-		 * if we knew we had an array of arrays.
-		 */
-		foreach ( $list as $key => $value ) {
-			if ( is_object( $value ) ) {
-				$list[ $key ] = $value->$field;
-			} else {
-				$list[ $key ] = $value[ $field ];
-			}
-		}
-		return $list;
-	}
-
-	/*
-	 * When index_key is not set for a particular item, push the value
-	 * to the end of the stack. This is how array_column() behaves.
-	 */
-	$newlist = array();
-	foreach ( $list as $value ) {
-		if ( is_object( $value ) ) {
-			if ( isset( $value->$index_key ) ) {
-				$newlist[ $value->$index_key ] = $value->$field;
-			} else {
-				$newlist[] = $value->$field;
-			}
-		} else {
-			if ( isset( $value[ $index_key ] ) ) {
-				$newlist[ $value[ $index_key ] ] = $value[ $field ];
-			} else {
-				$newlist[] = $value[ $field ];
-			}
-		}
-	}
-
-	return $newlist;
-}
-
-/**
- * Determines if Widgets library should be loaded.
- *
- * Checks to make sure that the widgets library hasn't already been loaded.
- * If it hasn't, then it will load the widgets library and run an action hook.
- *
- * @since 2.2.0
- */
-function wp_maybe_load_widgets() {
-	/**
-	 * Filters whether to load the Widgets library.
-	 *
-	 * Passing a falsey value to the filter will effectively short-circuit
-	 * the Widgets library from loading.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param bool $wp_maybe_load_widgets Whether to load the Widgets library.
-	 *                                    Default true.
-	 */
-	if ( ! apply_filters( 'load_default_widgets', true ) ) {
-		return;
-	}
-
-	require_once( ABSPATH . WPINC . '/default-widgets.php' );
-
-	add_action( '_admin_menu', 'wp_widgets_add_menu' );
-}
-
-/**
- * Append the Widgets menu to the themes main menu.
- *
- * @since 2.2.0
- *
- * @global array $submenu
- */
-function wp_widgets_add_menu() {
-	global $submenu;
-
-	if ( ! current_theme_supports( 'widgets' ) )
-		return;
-
-	$submenu['themes.php'][7] = array( __( 'Widgets' ), 'edit_theme_options', 'widgets.php' );
-	ksort( $submenu['themes.php'], SORT_NUMERIC );
-}
-
-/**
- * Flush all output buffers for PHP 5.2.
- *
- * Make sure all output buffers are flushed before our singletons are destroyed.
- *
- * @since 2.2.0
- */
-function wp_ob_end_flush_all() {
-	$levels = ob_get_level();
-	for ($i=0; $i<$levels; $i++)
-		ob_end_flush();
-}
-
-/**
- * Load custom DB error or display WordPress DB error.
- *
- * If a file exists in the wp-content directory named db-error.php, then it will
- * be loaded instead of displaying the WordPress DB error. If it is not found,
- * then the WordPress DB error will be displayed instead.
- *
- * The WordPress DB error sets the HTTP status header to 500 to try to prevent
- * search engines from caching the message. Custom DB messages should do the
- * same.
- *
- * This function was backported to WordPress 2.3.2, but originally was added
- * in WordPress 2.5.0.
- *
- * @since 2.3.2
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- */
-function dead_db() {
-	global $wpdb;
-
-	wp_load_translations_early();
-
-	// Load custom DB error template, if present.
-	if ( file_exists( WP_CONTENT_DIR . '/db-error.php' ) ) {
-		require_once( WP_CONTENT_DIR . '/db-error.php' );
-		die();
-	}
-
-	// If installing or in the admin, provide the verbose message.
-	if ( wp_installing() || defined( 'WP_ADMIN' ) )
-		wp_die($wpdb->error);
-
-	// Otherwise, be terse.
-	status_header( 500 );
-	nocache_headers();
-	header( 'Content-Type: text/html; charset=utf-8' );
-?>
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml"<?php if ( is_rtl() ) echo ' dir="rtl"'; ?>>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-	<title><?php _e( 'Database Error' ); ?></title>
-
-</head>
-<body>
-	<h1><?php _e( 'Error establishing a database connection' ); ?></h1>
-</body>
-</html>
-<?php
-	die();
-}
-
-/**
- * Convert a value to non-negative integer.
- *
- * @since 2.5.0
- *
- * @param mixed $maybeint Data you wish to have converted to a non-negative integer.
- * @return int A non-negative integer.
- */
-function absint( $maybeint ) {
-	return abs( intval( $maybeint ) );
-}
-
-/**
- * Mark a function as deprecated and inform when it has been used.
- *
- * There is a {@see 'hook deprecated_function_run'} that will be called that can be used
- * to get the backtrace up to what file and function called the deprecated
- * function.
- *
- * The current behavior is to trigger a user error if `WP_DEBUG` is true.
- *
- * This function is to be used in every function that is deprecated.
- *
- * @since 2.5.0
- * @access private
- *
- * @param string $function    The function that was called.
- * @param string $version     The version of WordPress that deprecated the function.
- * @param string $replacement Optional. The function that should have been called. Default null.
- */
-function _deprecated_function( $function, $version, $replacement = null ) {
-
-	/**
-	 * Fires when a deprecated function is called.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param string $function    The function that was called.
-	 * @param string $replacement The function that should have been called.
-	 * @param string $version     The version of WordPress that deprecated the function.
-	 */
-	do_action( 'deprecated_function_run', $function, $replacement, $version );
-
-	/**
-	 * Filters whether to trigger an error for deprecated functions.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param bool $trigger Whether to trigger the error for deprecated functions. Default true.
-	 */
-	if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) {
-		if ( function_exists( '__' ) ) {
-			if ( ! is_null( $replacement ) )
-				trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $function, $version, $replacement ) );
-			else
-				trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version ) );
-		} else {
-			if ( ! is_null( $replacement ) )
-				trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', $function, $version, $replacement ) );
-			else
-				trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version ) );
-		}
-	}
-}
-
-/**
- * Marks a constructor as deprecated and informs when it has been used.
- *
- * Similar to _deprecated_function(), but with different strings. Used to
- * remove PHP4 style constructors.
- *
- * The current behavior is to trigger a user error if `WP_DEBUG` is true.
- *
- * This function is to be used in every PHP4 style constructor method that is deprecated.
- *
- * @since 4.3.0
- * @since 4.5.0 Added the `$parent_class` parameter.
- *
- * @access private
- *
- * @param string $class        The class containing the deprecated constructor.
- * @param string $version      The version of WordPress that deprecated the function.
- * @param string $parent_class Optional. The parent class calling the deprecated constructor.
- *                             Default empty string.
- */
-function _deprecated_constructor( $class, $version, $parent_class = '' ) {
-
-	/**
-	 * Fires when a deprecated constructor is called.
-	 *
-	 * @since 4.3.0
-	 * @since 4.5.0 Added the `$parent_class` parameter.
-	 *
-	 * @param string $class        The class containing the deprecated constructor.
-	 * @param string $version      The version of WordPress that deprecated the function.
-	 * @param string $parent_class The parent class calling the deprecated constructor.
-	 */
-	do_action( 'deprecated_constructor_run', $class, $version, $parent_class );
-
-	/**
-	 * Filters whether to trigger an error for deprecated functions.
-	 *
-	 * `WP_DEBUG` must be true in addition to the filter evaluating to true.
-	 *
-	 * @since 4.3.0
-	 *
-	 * @param bool $trigger Whether to trigger the error for deprecated functions. Default true.
-	 */
-	if ( WP_DEBUG && apply_filters( 'deprecated_constructor_trigger_error', true ) ) {
-		if ( function_exists( '__' ) ) {
-			if ( ! empty( $parent_class ) ) {
-				/* translators: 1: PHP class name, 2: PHP parent class name, 3: version number, 4: __construct() method */
-				trigger_error( sprintf( __( 'The called constructor method for %1$s in %2$s is <strong>deprecated</strong> since version %3$s! Use %4$s instead.' ),
-					$class, $parent_class, $version, '<pre>__construct()</pre>' ) );
-			} else {
-				/* translators: 1: PHP class name, 2: version number, 3: __construct() method */
-				trigger_error( sprintf( __( 'The called constructor method for %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ),
-					$class, $version, '<pre>__construct()</pre>' ) );
-			}
-		} else {
-			if ( ! empty( $parent_class ) ) {
-				trigger_error( sprintf( 'The called constructor method for %1$s in %2$s is <strong>deprecated</strong> since version %3$s! Use %4$s instead.',
-					$class, $parent_class, $version, '<pre>__construct()</pre>' ) );
-			} else {
-				trigger_error( sprintf( 'The called constructor method for %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.',
-					$class, $version, '<pre>__construct()</pre>' ) );
-			}
-		}
-	}
-
-}
-
-/**
- * Mark a file as deprecated and inform when it has been used.
- *
- * There is a hook {@see 'deprecated_file_included'} that will be called that can be used
- * to get the backtrace up to what file and function included the deprecated
- * file.
- *
- * The current behavior is to trigger a user error if `WP_DEBUG` is true.
- *
- * This function is to be used in every file that is deprecated.
- *
- * @since 2.5.0
- * @access private
- *
- * @param string $file        The file that was included.
- * @param string $version     The version of WordPress that deprecated the file.
- * @param string $replacement Optional. The file that should have been included based on ABSPATH.
- *                            Default null.
- * @param string $message     Optional. A message regarding the change. Default empty.
- */
-function _deprecated_file( $file, $version, $replacement = null, $message = '' ) {
-
-	/**
-	 * Fires when a deprecated file is called.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param string $file        The file that was called.
-	 * @param string $replacement The file that should have been included based on ABSPATH.
-	 * @param string $version     The version of WordPress that deprecated the file.
-	 * @param string $message     A message regarding the change.
-	 */
-	do_action( 'deprecated_file_included', $file, $replacement, $version, $message );
-
-	/**
-	 * Filters whether to trigger an error for deprecated files.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param bool $trigger Whether to trigger the error for deprecated files. Default true.
-	 */
-	if ( WP_DEBUG && apply_filters( 'deprecated_file_trigger_error', true ) ) {
-		$message = empty( $message ) ? '' : ' ' . $message;
-		if ( function_exists( '__' ) ) {
-			if ( ! is_null( $replacement ) )
-				trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $file, $version, $replacement ) . $message );
-			else
-				trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $file, $version ) . $message );
-		} else {
-			if ( ! is_null( $replacement ) )
-				trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', $file, $version, $replacement ) . $message );
-			else
-				trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', $file, $version ) . $message );
-		}
-	}
-}
-/**
- * Mark a function argument as deprecated and inform when it has been used.
- *
- * This function is to be used whenever a deprecated function argument is used.
- * Before this function is called, the argument must be checked for whether it was
- * used by comparing it to its default value or evaluating whether it is empty.
- * For example:
- *
- *     if ( ! empty( $deprecated ) ) {
- *         _deprecated_argument( __FUNCTION__, '3.0.0' );
- *     }
- *
- *
- * There is a hook deprecated_argument_run that will be called that can be used
- * to get the backtrace up to what file and function used the deprecated
- * argument.
- *
- * The current behavior is to trigger a user error if WP_DEBUG is true.
- *
- * @since 3.0.0
- * @access private
- *
- * @param string $function The function that was called.
- * @param string $version  The version of WordPress that deprecated the argument used.
- * @param string $message  Optional. A message regarding the change. Default null.
- */
-function _deprecated_argument( $function, $version, $message = null ) {
-
-	/**
-	 * Fires when a deprecated argument is called.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $function The function that was called.
-	 * @param string $message  A message regarding the change.
-	 * @param string $version  The version of WordPress that deprecated the argument used.
-	 */
-	do_action( 'deprecated_argument_run', $function, $message, $version );
-
-	/**
-	 * Filters whether to trigger an error for deprecated arguments.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param bool $trigger Whether to trigger the error for deprecated arguments. Default true.
-	 */
-	if ( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) {
-		if ( function_exists( '__' ) ) {
-			if ( ! is_null( $message ) )
-				trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'), $function, $version, $message ) );
-			else
-				trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version ) );
-		} else {
-			if ( ! is_null( $message ) )
-				trigger_error( sprintf( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', $function, $version, $message ) );
-			else
-				trigger_error( sprintf( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version ) );
-		}
-	}
-}
-
-/**
- * Marks a deprecated action or filter hook as deprecated and throws a notice.
- *
- * Use the {@see 'deprecated_hook_run'} action to get the backtrace describing where
- * the deprecated hook was called.
- *
- * Default behavior is to trigger a user error if `WP_DEBUG` is true.
- *
- * This function is called by the do_action_deprecated() and apply_filters_deprecated()
- * functions, and so generally does not need to be called directly.
- *
- * @since 4.6.0
- * @access private
- *
- * @param string $hook        The hook that was used.
- * @param string $version     The version of WordPress that deprecated the hook.
- * @param string $replacement Optional. The hook that should have been used.
- * @param string $message     Optional. A message regarding the change.
- */
-function _deprecated_hook( $hook, $version, $replacement = null, $message = null ) {
-	/**
-	 * Fires when a deprecated hook is called.
-	 *
-	 * @since 4.6.0
-	 *
-	 * @param string $hook        The hook that was called.
-	 * @param string $replacement The hook that should be used as a replacement.
-	 * @param string $version     The version of WordPress that deprecated the argument used.
-	 * @param string $message     A message regarding the change.
-	 */
-	do_action( 'deprecated_hook_run', $hook, $replacement, $version, $message );
-
-	/**
-	 * Filters whether to trigger deprecated hook errors.
-	 *
-	 * @since 4.6.0
-	 *
-	 * @param bool $trigger Whether to trigger deprecated hook errors. Requires
-	 *                      `WP_DEBUG` to be defined true.
-	 */
-	if ( WP_DEBUG && apply_filters( 'deprecated_hook_trigger_error', true ) ) {
-		$message = empty( $message ) ? '' : ' ' . $message;
-		if ( ! is_null( $replacement ) ) {
-			trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), $hook, $version, $replacement ) . $message );
-		} else {
-			trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), $hook, $version ) . $message );
-		}
-	}
-}
-
-/**
- * Mark something as being incorrectly called.
- *
- * There is a hook {@see 'doing_it_wrong_run'} that will be called that can be used
- * to get the backtrace up to what file and function called the deprecated
- * function.
- *
- * The current behavior is to trigger a user error if `WP_DEBUG` is true.
- *
- * @since 3.1.0
- * @access private
- *
- * @param string $function The function that was called.
- * @param string $message  A message explaining what has been done incorrectly.
- * @param string $version  The version of WordPress where the message was added.
- */
-function _doing_it_wrong( $function, $message, $version ) {
-
-	/**
-	 * Fires when the given function is being used incorrectly.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param string $function The function that was called.
-	 * @param string $message  A message explaining what has been done incorrectly.
-	 * @param string $version  The version of WordPress where the message was added.
-	 */
-	do_action( 'doing_it_wrong_run', $function, $message, $version );
-
-	/**
-	 * Filters whether to trigger an error for _doing_it_wrong() calls.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param bool $trigger Whether to trigger the error for _doing_it_wrong() calls. Default true.
-	 */
-	if ( WP_DEBUG && apply_filters( 'doing_it_wrong_trigger_error', true ) ) {
-		if ( function_exists( '__' ) ) {
-			if ( is_null( $version ) ) {
-				$version = '';
-			} else {
-				/* translators: %s: version number */
-				$version = sprintf( __( '(This message was added in version %s.)' ), $version );
-			}
-			/* translators: %s: Codex URL */
-			$message .= ' ' . sprintf( __( 'Please see <a href="%s">Debugging in WordPress</a> for more information.' ),
-				__( 'https://codex.wordpress.org/Debugging_in_WordPress' )
-			);
-			trigger_error( sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $message, $version ) );
-		} else {
-			if ( is_null( $version ) ) {
-				$version = '';
-			} else {
-				$version = sprintf( '(This message was added in version %s.)', $version );
-			}
-			$message .= sprintf( ' Please see <a href="%s">Debugging in WordPress</a> for more information.',
-				'https://codex.wordpress.org/Debugging_in_WordPress'
-			);
-			trigger_error( sprintf( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s', $function, $message, $version ) );
-		}
-	}
-}
-
-/**
- * Is the server running earlier than 1.5.0 version of lighttpd?
- *
- * @since 2.5.0
- *
- * @return bool Whether the server is running lighttpd < 1.5.0.
- */
-function is_lighttpd_before_150() {
-	$server_parts = explode( '/', isset( $_SERVER['SERVER_SOFTWARE'] )? $_SERVER['SERVER_SOFTWARE'] : '' );
-	$server_parts[1] = isset( $server_parts[1] )? $server_parts[1] : '';
-	return  'lighttpd' == $server_parts[0] && -1 == version_compare( $server_parts[1], '1.5.0' );
-}
-
-/**
- * Does the specified module exist in the Apache config?
- *
- * @since 2.5.0
- *
- * @global bool $is_apache
- *
- * @param string $mod     The module, e.g. mod_rewrite.
- * @param bool   $default Optional. The default return value if the module is not found. Default false.
- * @return bool Whether the specified module is loaded.
- */
-function apache_mod_loaded($mod, $default = false) {
-	global $is_apache;
-
-	if ( !$is_apache )
-		return false;
-
-	if ( function_exists( 'apache_get_modules' ) ) {
-		$mods = apache_get_modules();
-		if ( in_array($mod, $mods) )
-			return true;
-	} elseif ( function_exists( 'phpinfo' ) && false === strpos( ini_get( 'disable_functions' ), 'phpinfo' ) ) {
-			ob_start();
-			phpinfo(8);
-			$phpinfo = ob_get_clean();
-			if ( false !== strpos($phpinfo, $mod) )
-				return true;
-	}
-	return $default;
-}
-
-/**
- * Check if IIS 7+ supports pretty permalinks.
- *
- * @since 2.8.0
- *
- * @global bool $is_iis7
- *
- * @return bool Whether IIS7 supports permalinks.
- */
-function iis7_supports_permalinks() {
-	global $is_iis7;
-
-	$supports_permalinks = false;
-	if ( $is_iis7 ) {
-		/* First we check if the DOMDocument class exists. If it does not exist, then we cannot
-		 * easily update the xml configuration file, hence we just bail out and tell user that
-		 * pretty permalinks cannot be used.
-		 *
-		 * Next we check if the URL Rewrite Module 1.1 is loaded and enabled for the web site. When
-		 * URL Rewrite 1.1 is loaded it always sets a server variable called 'IIS_UrlRewriteModule'.
-		 * Lastly we make sure that PHP is running via FastCGI. This is important because if it runs
-		 * via ISAPI then pretty permalinks will not work.
-		 */
-		$supports_permalinks = class_exists( 'DOMDocument', false ) && isset($_SERVER['IIS_UrlRewriteModule']) && ( PHP_SAPI == 'cgi-fcgi' );
-	}
-
-	/**
-	 * Filters whether IIS 7+ supports pretty permalinks.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param bool $supports_permalinks Whether IIS7 supports permalinks. Default false.
-	 */
-	return apply_filters( 'iis7_supports_permalinks', $supports_permalinks );
-}
-
-/**
- * File validates against allowed set of defined rules.
- *
- * A return value of '1' means that the $file contains either '..' or './'. A
- * return value of '2' means that the $file contains ':' after the first
- * character. A return value of '3' means that the file is not in the allowed
- * files list.
- *
- * @since 1.2.0
- *
- * @param string $file File path.
- * @param array  $allowed_files List of allowed files.
- * @return int 0 means nothing is wrong, greater than 0 means something was wrong.
- */
-function validate_file( $file, $allowed_files = '' ) {
-	if ( false !== strpos( $file, '..' ) )
-		return 1;
-
-	if ( false !== strpos( $file, './' ) )
-		return 1;
-
-	if ( ! empty( $allowed_files ) && ! in_array( $file, $allowed_files ) )
-		return 3;
-
-	if (':' == substr( $file, 1, 1 ) )
-		return 2;
-
-	return 0;
-}
-
-/**
- * Whether to force SSL used for the Administration Screens.
- *
- * @since 2.6.0
- *
- * @staticvar bool $forced
- *
- * @param string|bool $force Optional. Whether to force SSL in admin screens. Default null.
- * @return bool True if forced, false if not forced.
- */
-function force_ssl_admin( $force = null ) {
-	static $forced = false;
-
-	if ( !is_null( $force ) ) {
-		$old_forced = $forced;
-		$forced = $force;
-		return $old_forced;
-	}
-
-	return $forced;
-}
-
-/**
- * Guess the URL for the site.
- *
- * Will remove wp-admin links to retrieve only return URLs not in the wp-admin
- * directory.
- *
- * @since 2.6.0
- *
- * @return string The guessed URL.
- */
-function wp_guess_url() {
-	if ( defined('WP_SITEURL') && '' != WP_SITEURL ) {
-		$url = WP_SITEURL;
-	} else {
-		$abspath_fix = str_replace( '\\', '/', ABSPATH );
-		$script_filename_dir = dirname( $_SERVER['SCRIPT_FILENAME'] );
-
-		// The request is for the admin
-		if ( strpos( $_SERVER['REQUEST_URI'], 'wp-admin' ) !== false || strpos( $_SERVER['REQUEST_URI'], 'wp-login.php' ) !== false ) {
-			$path = preg_replace( '#/(wp-admin/.*|wp-login.php)#i', '', $_SERVER['REQUEST_URI'] );
-
-		// The request is for a file in ABSPATH
-		} elseif ( $script_filename_dir . '/' == $abspath_fix ) {
-			// Strip off any file/query params in the path
-			$path = preg_replace( '#/[^/]*$#i', '', $_SERVER['PHP_SELF'] );
-
-		} else {
-			if ( false !== strpos( $_SERVER['SCRIPT_FILENAME'], $abspath_fix ) ) {
-				// Request is hitting a file inside ABSPATH
-				$directory = str_replace( ABSPATH, '', $script_filename_dir );
-				// Strip off the sub directory, and any file/query params
-				$path = preg_replace( '#/' . preg_quote( $directory, '#' ) . '/[^/]*$#i', '' , $_SERVER['REQUEST_URI'] );
-			} elseif ( false !== strpos( $abspath_fix, $script_filename_dir ) ) {
-				// Request is hitting a file above ABSPATH
-				$subdirectory = substr( $abspath_fix, strpos( $abspath_fix, $script_filename_dir ) + strlen( $script_filename_dir ) );
-				// Strip off any file/query params from the path, appending the sub directory to the install
-				$path = preg_replace( '#/[^/]*$#i', '' , $_SERVER['REQUEST_URI'] ) . $subdirectory;
-			} else {
-				$path = $_SERVER['REQUEST_URI'];
-			}
-		}
-
-		$schema = is_ssl() ? 'https://' : 'http://'; // set_url_scheme() is not defined yet
-		$url = $schema . $_SERVER['HTTP_HOST'] . $path;
-	}
-
-	return rtrim($url, '/');
-}
-
-/**
- * Temporarily suspend cache additions.
- *
- * Stops more data being added to the cache, but still allows cache retrieval.
- * This is useful for actions, such as imports, when a lot of data would otherwise
- * be almost uselessly added to the cache.
- *
- * Suspension lasts for a single page load at most. Remember to call this
- * function again if you wish to re-enable cache adds earlier.
- *
- * @since 3.3.0
- *
- * @staticvar bool $_suspend
- *
- * @param bool $suspend Optional. Suspends additions if true, re-enables them if false.
- * @return bool The current suspend setting
- */
-function wp_suspend_cache_addition( $suspend = null ) {
-	static $_suspend = false;
-
-	if ( is_bool( $suspend ) )
-		$_suspend = $suspend;
-
-	return $_suspend;
-}
-
-/**
- * Suspend cache invalidation.
- *
- * Turns cache invalidation on and off. Useful during imports where you don't wont to do
- * invalidations every time a post is inserted. Callers must be sure that what they are
- * doing won't lead to an inconsistent cache when invalidation is suspended.
- *
- * @since 2.7.0
- *
- * @global bool $_wp_suspend_cache_invalidation
- *
- * @param bool $suspend Optional. Whether to suspend or enable cache invalidation. Default true.
- * @return bool The current suspend setting.
- */
-function wp_suspend_cache_invalidation( $suspend = true ) {
-	global $_wp_suspend_cache_invalidation;
-
-	$current_suspend = $_wp_suspend_cache_invalidation;
-	$_wp_suspend_cache_invalidation = $suspend;
-	return $current_suspend;
-}
-
-/**
- * Determine whether a site is the main site of the current network.
- *
- * @since 3.0.0
- *
- * @param int $site_id Optional. Site ID to test. Defaults to current site.
- * @return bool True if $site_id is the main site of the network, or if not
- *              running Multisite.
- */
-function is_main_site( $site_id = null ) {
-	if ( ! is_multisite() ) {
-		return true;
-	}
-
-	if ( ! $site_id ) {
-		$site_id = get_current_blog_id();
-	}
-	return (int) $site_id === (int) get_current_site()->blog_id;
-}
-
-/**
- * Determine whether a network is the main network of the Multisite install.
- *
- * @since 3.7.0
- *
- * @param int $network_id Optional. Network ID to test. Defaults to current network.
- * @return bool True if $network_id is the main network, or if not running Multisite.
- */
-function is_main_network( $network_id = null ) {
-	if ( ! is_multisite() ) {
-		return true;
-	}
-
-	$current_network_id = (int) get_current_site()->id;
-
-	if ( null === $network_id ) {
-		$network_id = $current_network_id;
-	}
-
-	$network_id = (int) $network_id;
-
-	return ( $network_id === get_main_network_id() );
-}
-
-/**
- * Get the main network ID.
- *
- * @since 4.3.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @return int The ID of the main network.
- */
-function get_main_network_id() {
-	global $wpdb;
-
-	if ( ! is_multisite() ) {
-		return 1;
-	}
-
-	$current_site = get_current_site();
-
-	if ( defined( 'PRIMARY_NETWORK_ID' ) ) {
-		$main_network_id = PRIMARY_NETWORK_ID;
-	} elseif ( isset( $current_site->id ) && 1 === (int) $current_site->id ) {
-		// If the current network has an ID of 1, assume it is the main network.
-		$main_network_id = 1;
-	} else {
-		$main_network_id = wp_cache_get( 'primary_network_id', 'site-options' );
-
-		if ( false === $main_network_id ) {
-			$main_network_id = (int) $wpdb->get_var( "SELECT id FROM {$wpdb->site} ORDER BY id LIMIT 1" );
-			wp_cache_add( 'primary_network_id', $main_network_id, 'site-options' );
-		}
-	}
-
-	/**
-	 * Filters the main network ID.
-	 *
-	 * @since 4.3.0
-	 *
-	 * @param int $main_network_id The ID of the main network.
-	 */
-	return (int) apply_filters( 'get_main_network_id', $main_network_id );
-}
-
-/**
- * Determine whether global terms are enabled.
- *
- * @since 3.0.0
- *
- * @staticvar bool $global_terms
- *
- * @return bool True if multisite and global terms enabled.
- */
-function global_terms_enabled() {
-	if ( ! is_multisite() )
-		return false;
-
-	static $global_terms = null;
-	if ( is_null( $global_terms ) ) {
-
-		/**
-		 * Filters whether global terms are enabled.
-		 *
-		 * Passing a non-null value to the filter will effectively short-circuit the function,
-		 * returning the value of the 'global_terms_enabled' site option instead.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param null $enabled Whether global terms are enabled.
-		 */
-		$filter = apply_filters( 'global_terms_enabled', null );
-		if ( ! is_null( $filter ) )
-			$global_terms = (bool) $filter;
-		else
-			$global_terms = (bool) get_site_option( 'global_terms_enabled', false );
-	}
-	return $global_terms;
-}
-
-/**
- * gmt_offset modification for smart timezone handling.
- *
- * Overrides the gmt_offset option if we have a timezone_string available.
- *
- * @since 2.8.0
- *
- * @return float|false Timezone GMT offset, false otherwise.
- */
-function wp_timezone_override_offset() {
-	if ( !$timezone_string = get_option( 'timezone_string' ) ) {
-		return false;
-	}
-
-	$timezone_object = timezone_open( $timezone_string );
-	$datetime_object = date_create();
-	if ( false === $timezone_object || false === $datetime_object ) {
-		return false;
-	}
-	return round( timezone_offset_get( $timezone_object, $datetime_object ) / HOUR_IN_SECONDS, 2 );
-}
-
-/**
- * Sort-helper for timezones.
- *
- * @since 2.9.0
- * @access private
- *
- * @param array $a
- * @param array $b
- * @return int
- */
-function _wp_timezone_choice_usort_callback( $a, $b ) {
-	// Don't use translated versions of Etc
-	if ( 'Etc' === $a['continent'] && 'Etc' === $b['continent'] ) {
-		// Make the order of these more like the old dropdown
-		if ( 'GMT+' === substr( $a['city'], 0, 4 ) && 'GMT+' === substr( $b['city'], 0, 4 ) ) {
-			return -1 * ( strnatcasecmp( $a['city'], $b['city'] ) );
-		}
-		if ( 'UTC' === $a['city'] ) {
-			if ( 'GMT+' === substr( $b['city'], 0, 4 ) ) {
-				return 1;
-			}
-			return -1;
-		}
-		if ( 'UTC' === $b['city'] ) {
-			if ( 'GMT+' === substr( $a['city'], 0, 4 ) ) {
-				return -1;
-			}
-			return 1;
-		}
-		return strnatcasecmp( $a['city'], $b['city'] );
-	}
-	if ( $a['t_continent'] == $b['t_continent'] ) {
-		if ( $a['t_city'] == $b['t_city'] ) {
-			return strnatcasecmp( $a['t_subcity'], $b['t_subcity'] );
-		}
-		return strnatcasecmp( $a['t_city'], $b['t_city'] );
-	} else {
-		// Force Etc to the bottom of the list
-		if ( 'Etc' === $a['continent'] ) {
-			return 1;
-		}
-		if ( 'Etc' === $b['continent'] ) {
-			return -1;
-		}
-		return strnatcasecmp( $a['t_continent'], $b['t_continent'] );
-	}
-}
-
-/**
- * Gives a nicely-formatted list of timezone strings.
- *
- * @since 2.9.0
- *
- * @staticvar bool $mo_loaded
- *
- * @param string $selected_zone Selected timezone.
- * @return string
- */
-function wp_timezone_choice( $selected_zone ) {
-	static $mo_loaded = false;
-
-	$continents = array( 'Africa', 'America', 'Antarctica', 'Arctic', 'Asia', 'Atlantic', 'Australia', 'Europe', 'Indian', 'Pacific');
-
-	// Load translations for continents and cities
-	if ( !$mo_loaded ) {
-		$locale = get_locale();
-		$mofile = WP_LANG_DIR . '/continents-cities-' . $locale . '.mo';
-		load_textdomain( 'continents-cities', $mofile );
-		$mo_loaded = true;
-	}
-
-	$zonen = array();
-	foreach ( timezone_identifiers_list() as $zone ) {
-		$zone = explode( '/', $zone );
-		if ( !in_array( $zone[0], $continents ) ) {
-			continue;
-		}
-
-		// This determines what gets set and translated - we don't translate Etc/* strings here, they are done later
-		$exists = array(
-			0 => ( isset( $zone[0] ) && $zone[0] ),
-			1 => ( isset( $zone[1] ) && $zone[1] ),
-			2 => ( isset( $zone[2] ) && $zone[2] ),
-		);
-		$exists[3] = ( $exists[0] && 'Etc' !== $zone[0] );
-		$exists[4] = ( $exists[1] && $exists[3] );
-		$exists[5] = ( $exists[2] && $exists[3] );
-
-		$zonen[] = array(
-			'continent'   => ( $exists[0] ? $zone[0] : '' ),
-			'city'        => ( $exists[1] ? $zone[1] : '' ),
-			'subcity'     => ( $exists[2] ? $zone[2] : '' ),
-			't_continent' => ( $exists[3] ? translate( str_replace( '_', ' ', $zone[0] ), 'continents-cities' ) : '' ),
-			't_city'      => ( $exists[4] ? translate( str_replace( '_', ' ', $zone[1] ), 'continents-cities' ) : '' ),
-			't_subcity'   => ( $exists[5] ? translate( str_replace( '_', ' ', $zone[2] ), 'continents-cities' ) : '' )
-		);
-	}
-	usort( $zonen, '_wp_timezone_choice_usort_callback' );
-
-	$structure = array();
-
-	if ( empty( $selected_zone ) ) {
-		$structure[] = '<option selected="selected" value="">' . __( 'Select a city' ) . '</option>';
-	}
-
-	foreach ( $zonen as $key => $zone ) {
-		// Build value in an array to join later
-		$value = array( $zone['continent'] );
-
-		if ( empty( $zone['city'] ) ) {
-			// It's at the continent level (generally won't happen)
-			$display = $zone['t_continent'];
-		} else {
-			// It's inside a continent group
-
-			// Continent optgroup
-			if ( !isset( $zonen[$key - 1] ) || $zonen[$key - 1]['continent'] !== $zone['continent'] ) {
-				$label = $zone['t_continent'];
-				$structure[] = '<optgroup label="'. esc_attr( $label ) .'">';
-			}
-
-			// Add the city to the value
-			$value[] = $zone['city'];
-
-			$display = $zone['t_city'];
-			if ( !empty( $zone['subcity'] ) ) {
-				// Add the subcity to the value
-				$value[] = $zone['subcity'];
-				$display .= ' - ' . $zone['t_subcity'];
-			}
-		}
-
-		// Build the value
-		$value = join( '/', $value );
-		$selected = '';
-		if ( $value === $selected_zone ) {
-			$selected = 'selected="selected" ';
-		}
-		$structure[] = '<option ' . $selected . 'value="' . esc_attr( $value ) . '">' . esc_html( $display ) . "</option>";
-
-		// Close continent optgroup
-		if ( !empty( $zone['city'] ) && ( !isset($zonen[$key + 1]) || (isset( $zonen[$key + 1] ) && $zonen[$key + 1]['continent'] !== $zone['continent']) ) ) {
-			$structure[] = '</optgroup>';
-		}
-	}
-
-	// Do UTC
-	$structure[] = '<optgroup label="'. esc_attr__( 'UTC' ) .'">';
-	$selected = '';
-	if ( 'UTC' === $selected_zone )
-		$selected = 'selected="selected" ';
-	$structure[] = '<option ' . $selected . 'value="' . esc_attr( 'UTC' ) . '">' . __('UTC') . '</option>';
-	$structure[] = '</optgroup>';
-
-	// Do manual UTC offsets
-	$structure[] = '<optgroup label="'. esc_attr__( 'Manual Offsets' ) .'">';
-	$offset_range = array (-12, -11.5, -11, -10.5, -10, -9.5, -9, -8.5, -8, -7.5, -7, -6.5, -6, -5.5, -5, -4.5, -4, -3.5, -3, -2.5, -2, -1.5, -1, -0.5,
-		0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 5.75, 6, 6.5, 7, 7.5, 8, 8.5, 8.75, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.75, 13, 13.75, 14);
-	foreach ( $offset_range as $offset ) {
-		if ( 0 <= $offset )
-			$offset_name = '+' . $offset;
-		else
-			$offset_name = (string) $offset;
-
-		$offset_value = $offset_name;
-		$offset_name = str_replace(array('.25','.5','.75'), array(':15',':30',':45'), $offset_name);
-		$offset_name = 'UTC' . $offset_name;
-		$offset_value = 'UTC' . $offset_value;
-		$selected = '';
-		if ( $offset_value === $selected_zone )
-			$selected = 'selected="selected" ';
-		$structure[] = '<option ' . $selected . 'value="' . esc_attr( $offset_value ) . '">' . esc_html( $offset_name ) . "</option>";
-
-	}
-	$structure[] = '</optgroup>';
-
-	return join( "\n", $structure );
-}
-
-/**
- * Strip close comment and close php tags from file headers used by WP.
- *
- * @since 2.8.0
- * @access private
- *
- * @see https://core.trac.wordpress.org/ticket/8497
- *
- * @param string $str Header comment to clean up.
- * @return string
- */
-function _cleanup_header_comment( $str ) {
-	return trim(preg_replace("/\s*(?:\*\/|\?>).*/", '', $str));
-}
-
-/**
- * Permanently delete comments or posts of any type that have held a status
- * of 'trash' for the number of days defined in EMPTY_TRASH_DAYS.
- *
- * The default value of `EMPTY_TRASH_DAYS` is 30 (days).
- *
- * @since 2.9.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- */
-function wp_scheduled_delete() {
-	global $wpdb;
-
-	$delete_timestamp = time() - ( DAY_IN_SECONDS * EMPTY_TRASH_DAYS );
-
-	$posts_to_delete = $wpdb->get_results($wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_wp_trash_meta_time' AND meta_value < '%d'", $delete_timestamp), ARRAY_A);
-
-	foreach ( (array) $posts_to_delete as $post ) {
-		$post_id = (int) $post['post_id'];
-		if ( !$post_id )
-			continue;
-
-		$del_post = get_post($post_id);
-
-		if ( !$del_post || 'trash' != $del_post->post_status ) {
-			delete_post_meta($post_id, '_wp_trash_meta_status');
-			delete_post_meta($post_id, '_wp_trash_meta_time');
-		} else {
-			wp_delete_post($post_id);
-		}
-	}
-
-	$comments_to_delete = $wpdb->get_results($wpdb->prepare("SELECT comment_id FROM $wpdb->commentmeta WHERE meta_key = '_wp_trash_meta_time' AND meta_value < '%d'", $delete_timestamp), ARRAY_A);
-
-	foreach ( (array) $comments_to_delete as $comment ) {
-		$comment_id = (int) $comment['comment_id'];
-		if ( !$comment_id )
-			continue;
-
-		$del_comment = get_comment($comment_id);
-
-		if ( !$del_comment || 'trash' != $del_comment->comment_approved ) {
-			delete_comment_meta($comment_id, '_wp_trash_meta_time');
-			delete_comment_meta($comment_id, '_wp_trash_meta_status');
-		} else {
-			wp_delete_comment( $del_comment );
-		}
-	}
-}
-
-/**
- * Retrieve metadata from a file.
- *
- * Searches for metadata in the first 8kiB of a file, such as a plugin or theme.
- * Each piece of metadata must be on its own line. Fields can not span multiple
- * lines, the value will get cut at the end of the first line.
- *
- * If the file data is not within that first 8kiB, then the author should correct
- * their plugin file and move the data headers to the top.
- *
- * @link https://codex.wordpress.org/File_Header
- *
- * @since 2.9.0
- *
- * @param string $file            Path to the file.
- * @param array  $default_headers List of headers, in the format array('HeaderKey' => 'Header Name').
- * @param string $context         Optional. If specified adds filter hook {@see 'extra_$context_headers'}.
- *                                Default empty.
- * @return array Array of file headers in `HeaderKey => Header Value` format.
- */
-function get_file_data( $file, $default_headers, $context = '' ) {
-	// We don't need to write to the file, so just open for reading.
-	$fp = fopen( $file, 'r' );
-
-	// Pull only the first 8kiB of the file in.
-	$file_data = fread( $fp, 8192 );
-
-	// PHP will close file handle, but we are good citizens.
-	fclose( $fp );
-
-	// Make sure we catch CR-only line endings.
-	$file_data = str_replace( "\r", "\n", $file_data );
-
-	/**
-	 * Filters extra file headers by context.
-	 *
-	 * The dynamic portion of the hook name, `$context`, refers to
-	 * the context where extra headers might be loaded.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param array $extra_context_headers Empty array by default.
-	 */
-	if ( $context && $extra_headers = apply_filters( "extra_{$context}_headers", array() ) ) {
-		$extra_headers = array_combine( $extra_headers, $extra_headers ); // keys equal values
-		$all_headers = array_merge( $extra_headers, (array) $default_headers );
-	} else {
-		$all_headers = $default_headers;
-	}
-
-	foreach ( $all_headers as $field => $regex ) {
-		if ( preg_match( '/^[ \t\/*#@]*' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $file_data, $match ) && $match[1] )
-			$all_headers[ $field ] = _cleanup_header_comment( $match[1] );
-		else
-			$all_headers[ $field ] = '';
-	}
-
-	return $all_headers;
-}
-
-/**
- * Returns true.
- *
- * Useful for returning true to filters easily.
- *
- * @since 3.0.0
- *
- * @see __return_false()
- *
- * @return true True.
- */
-function __return_true() {
-	return true;
-}
-
-/**
- * Returns false.
- *
- * Useful for returning false to filters easily.
- *
- * @since 3.0.0
- *
- * @see __return_true()
- *
- * @return false False.
- */
-function __return_false() {
-	return false;
-}
-
-/**
- * Returns 0.
- *
- * Useful for returning 0 to filters easily.
- *
- * @since 3.0.0
- *
- * @return int 0.
- */
-function __return_zero() {
-	return 0;
-}
-
-/**
- * Returns an empty array.
- *
- * Useful for returning an empty array to filters easily.
- *
- * @since 3.0.0
- *
- * @return array Empty array.
- */
-function __return_empty_array() {
-	return array();
-}
-
-/**
- * Returns null.
- *
- * Useful for returning null to filters easily.
- *
- * @since 3.4.0
- *
- * @return null Null value.
- */
-function __return_null() {
-	return null;
-}
-
-/**
- * Returns an empty string.
- *
- * Useful for returning an empty string to filters easily.
- *
- * @since 3.7.0
- *
- * @see __return_null()
- *
- * @return string Empty string.
- */
-function __return_empty_string() {
-	return '';
-}
-
-/**
- * Send a HTTP header to disable content type sniffing in browsers which support it.
- *
- * @since 3.0.0
- *
- * @see https://blogs.msdn.com/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx
- * @see https://src.chromium.org/viewvc/chrome?view=rev&revision=6985
- */
-function send_nosniff_header() {
-	@header( 'X-Content-Type-Options: nosniff' );
-}
-
-/**
- * Return a MySQL expression for selecting the week number based on the start_of_week option.
- *
- * @ignore
- * @since 3.0.0
- *
- * @param string $column Database column.
- * @return string SQL clause.
- */
-function _wp_mysql_week( $column ) {
-	switch ( $start_of_week = (int) get_option( 'start_of_week' ) ) {
-	case 1 :
-		return "WEEK( $column, 1 )";
-	case 2 :
-	case 3 :
-	case 4 :
-	case 5 :
-	case 6 :
-		return "WEEK( DATE_SUB( $column, INTERVAL $start_of_week DAY ), 0 )";
-	case 0 :
-	default :
-		return "WEEK( $column, 0 )";
-	}
-}
-
-/**
- * Find hierarchy loops using a callback function that maps object IDs to parent IDs.
- *
- * @since 3.1.0
- * @access private
- *
- * @param callable $callback      Function that accepts ( ID, $callback_args ) and outputs parent_ID.
- * @param int      $start         The ID to start the loop check at.
- * @param int      $start_parent  The parent_ID of $start to use instead of calling $callback( $start ).
- *                                Use null to always use $callback
- * @param array    $callback_args Optional. Additional arguments to send to $callback.
- * @return array IDs of all members of loop.
- */
-function wp_find_hierarchy_loop( $callback, $start, $start_parent, $callback_args = array() ) {
-	$override = is_null( $start_parent ) ? array() : array( $start => $start_parent );
-
-	if ( !$arbitrary_loop_member = wp_find_hierarchy_loop_tortoise_hare( $callback, $start, $override, $callback_args ) )
-		return array();
-
-	return wp_find_hierarchy_loop_tortoise_hare( $callback, $arbitrary_loop_member, $override, $callback_args, true );
-}
-
-/**
- * Use the "The Tortoise and the Hare" algorithm to detect loops.
- *
- * For every step of the algorithm, the hare takes two steps and the tortoise one.
- * If the hare ever laps the tortoise, there must be a loop.
- *
- * @since 3.1.0
- * @access private
- *
- * @param callable $callback      Function that accepts ( ID, callback_arg, ... ) and outputs parent_ID.
- * @param int      $start         The ID to start the loop check at.
- * @param array    $override      Optional. An array of ( ID => parent_ID, ... ) to use instead of $callback.
- *                                Default empty array.
- * @param array    $callback_args Optional. Additional arguments to send to $callback. Default empty array.
- * @param bool     $_return_loop  Optional. Return loop members or just detect presence of loop? Only set
- *                                to true if you already know the given $start is part of a loop (otherwise
- *                                the returned array might include branches). Default false.
- * @return mixed Scalar ID of some arbitrary member of the loop, or array of IDs of all members of loop if
- *               $_return_loop
- */
-function wp_find_hierarchy_loop_tortoise_hare( $callback, $start, $override = array(), $callback_args = array(), $_return_loop = false ) {
-	$tortoise = $hare = $evanescent_hare = $start;
-	$return = array();
-
-	// Set evanescent_hare to one past hare
-	// Increment hare two steps
-	while (
-		$tortoise
-	&&
-		( $evanescent_hare = isset( $override[$hare] ) ? $override[$hare] : call_user_func_array( $callback, array_merge( array( $hare ), $callback_args ) ) )
-	&&
-		( $hare = isset( $override[$evanescent_hare] ) ? $override[$evanescent_hare] : call_user_func_array( $callback, array_merge( array( $evanescent_hare ), $callback_args ) ) )
-	) {
-		if ( $_return_loop )
-			$return[$tortoise] = $return[$evanescent_hare] = $return[$hare] = true;
-
-		// tortoise got lapped - must be a loop
-		if ( $tortoise == $evanescent_hare || $tortoise == $hare )
-			return $_return_loop ? $return : $tortoise;
-
-		// Increment tortoise by one step
-		$tortoise = isset( $override[$tortoise] ) ? $override[$tortoise] : call_user_func_array( $callback, array_merge( array( $tortoise ), $callback_args ) );
-	}
-
-	return false;
-}
-
-/**
- * Send a HTTP header to limit rendering of pages to same origin iframes.
- *
- * @since 3.1.3
- *
- * @see https://developer.mozilla.org/en/the_x-frame-options_response_header
- */
-function send_frame_options_header() {
-	@header( 'X-Frame-Options: SAMEORIGIN' );
-}
-
-/**
- * Retrieve a list of protocols to allow in HTML attributes.
- *
- * @since 3.3.0
- * @since 4.3.0 Added 'webcal' to the protocols array.
- *
- * @see wp_kses()
- * @see esc_url()
- *
- * @staticvar array $protocols
- *
- * @return array Array of allowed protocols. Defaults to an array containing 'http', 'https',
- *               'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet',
- *               'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', and 'webcal'.
- */
-function wp_allowed_protocols() {
-	static $protocols = array();
-
-	if ( empty( $protocols ) ) {
-		$protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', 'webcal' );
-
-		/**
-		 * Filters the list of protocols allowed in HTML attributes.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param array $protocols Array of allowed protocols e.g. 'http', 'ftp', 'tel', and more.
-		 */
-		$protocols = apply_filters( 'kses_allowed_protocols', $protocols );
-	}
-
-	return $protocols;
-}
-
-/**
- * Return a comma-separated string of functions that have been called to get
- * to the current point in code.
- *
- * @since 3.4.0
- *
- * @see https://core.trac.wordpress.org/ticket/19589
- *
- * @param string $ignore_class Optional. A class to ignore all function calls within - useful
- *                             when you want to just give info about the callee. Default null.
- * @param int    $skip_frames  Optional. A number of stack frames to skip - useful for unwinding
- *                             back to the source of the issue. Default 0.
- * @param bool   $pretty       Optional. Whether or not you want a comma separated string or raw
- *                             array returned. Default true.
- * @return string|array Either a string containing a reversed comma separated trace or an array
- *                      of individual calls.
- */
-function wp_debug_backtrace_summary( $ignore_class = null, $skip_frames = 0, $pretty = true ) {
-	if ( version_compare( PHP_VERSION, '5.2.5', '>=' ) )
-		$trace = debug_backtrace( false );
-	else
-		$trace = debug_backtrace();
-
-	$caller = array();
-	$check_class = ! is_null( $ignore_class );
-	$skip_frames++; // skip this function
-
-	foreach ( $trace as $call ) {
-		if ( $skip_frames > 0 ) {
-			$skip_frames--;
-		} elseif ( isset( $call['class'] ) ) {
-			if ( $check_class && $ignore_class == $call['class'] )
-				continue; // Filter out calls
-
-			$caller[] = "{$call['class']}{$call['type']}{$call['function']}";
-		} else {
-			if ( in_array( $call['function'], array( 'do_action', 'apply_filters' ) ) ) {
-				$caller[] = "{$call['function']}('{$call['args'][0]}')";
-			} elseif ( in_array( $call['function'], array( 'include', 'include_once', 'require', 'require_once' ) ) ) {
-				$caller[] = $call['function'] . "('" . str_replace( array( WP_CONTENT_DIR, ABSPATH ) , '', $call['args'][0] ) . "')";
-			} else {
-				$caller[] = $call['function'];
-			}
-		}
-	}
-	if ( $pretty )
-		return join( ', ', array_reverse( $caller ) );
-	else
-		return $caller;
-}
-
-/**
- * Retrieve ids that are not already present in the cache.
- *
- * @since 3.4.0
- * @access private
- *
- * @param array  $object_ids ID list.
- * @param string $cache_key  The cache bucket to check against.
- *
- * @return array List of ids not present in the cache.
- */
-function _get_non_cached_ids( $object_ids, $cache_key ) {
-	$clean = array();
-	foreach ( $object_ids as $id ) {
-		$id = (int) $id;
-		if ( !wp_cache_get( $id, $cache_key ) ) {
-			$clean[] = $id;
-		}
-	}
-
-	return $clean;
-}
-
-/**
- * Test if the current device has the capability to upload files.
- *
- * @since 3.4.0
- * @access private
- *
- * @return bool Whether the device is able to upload files.
- */
-function _device_can_upload() {
-	if ( ! wp_is_mobile() )
-		return true;
-
-	$ua = $_SERVER['HTTP_USER_AGENT'];
-
-	if ( strpos($ua, 'iPhone') !== false
-		|| strpos($ua, 'iPad') !== false
-		|| strpos($ua, 'iPod') !== false ) {
-			return preg_match( '#OS ([\d_]+) like Mac OS X#', $ua, $version ) && version_compare( $version[1], '6', '>=' );
-	}
-
-	return true;
-}
-
-/**
- * Test if a given path is a stream URL
- *
- * @param string $path The resource path or URL.
- * @return bool True if the path is a stream URL.
- */
-function wp_is_stream( $path ) {
-	$wrappers = stream_get_wrappers();
-	$wrappers_re = '(' . join('|', $wrappers) . ')';
-
-	return preg_match( "!^$wrappers_re://!", $path ) === 1;
-}
-
-/**
- * Test if the supplied date is valid for the Gregorian calendar.
- *
- * @since 3.5.0
- *
- * @see checkdate()
- *
- * @param  int    $month       Month number.
- * @param  int    $day         Day number.
- * @param  int    $year        Year number.
- * @param  string $source_date The date to filter.
- * @return bool True if valid date, false if not valid date.
- */
-function wp_checkdate( $month, $day, $year, $source_date ) {
-	/**
-	 * Filters whether the given date is valid for the Gregorian calendar.
-	 *
-	 * @since 3.5.0
-	 *
-	 * @param bool   $checkdate   Whether the given date is valid.
-	 * @param string $source_date Date to check.
-	 */
-	return apply_filters( 'wp_checkdate', checkdate( $month, $day, $year ), $source_date );
-}
-
-/**
- * Load the auth check for monitoring whether the user is still logged in.
- *
- * Can be disabled with remove_action( 'admin_enqueue_scripts', 'wp_auth_check_load' );
- *
- * This is disabled for certain screens where a login screen could cause an
- * inconvenient interruption. A filter called {@see 'wp_auth_check_load'} can be used
- * for fine-grained control.
- *
- * @since 3.6.0
- */
-function wp_auth_check_load() {
-	if ( ! is_admin() && ! is_user_logged_in() )
-		return;
-
-	if ( defined( 'IFRAME_REQUEST' ) )
-		return;
-
-	$screen = get_current_screen();
-	$hidden = array( 'update', 'update-network', 'update-core', 'update-core-network', 'upgrade', 'upgrade-network', 'network' );
-	$show = ! in_array( $screen->id, $hidden );
-
-	/**
-	 * Filters whether to load the authentication check.
-	 *
-	 * Passing a falsey value to the filter will effectively short-circuit
-	 * loading the authentication check.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param bool      $show   Whether to load the authentication check.
-	 * @param WP_Screen $screen The current screen object.
-	 */
-	if ( apply_filters( 'wp_auth_check_load', $show, $screen ) ) {
-		wp_enqueue_style( 'wp-auth-check' );
-		wp_enqueue_script( 'wp-auth-check' );
-
-		add_action( 'admin_print_footer_scripts', 'wp_auth_check_html', 5 );
-		add_action( 'wp_print_footer_scripts', 'wp_auth_check_html', 5 );
-	}
-}
-
-/**
- * Output the HTML that shows the wp-login dialog when the user is no longer logged in.
- *
- * @since 3.6.0
- */
-function wp_auth_check_html() {
-	$login_url = wp_login_url();
-	$current_domain = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'];
-	$same_domain = ( strpos( $login_url, $current_domain ) === 0 );
-
-	/**
-	 * Filters whether the authentication check originated at the same domain.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param bool $same_domain Whether the authentication check originated at the same domain.
-	 */
-	$same_domain = apply_filters( 'wp_auth_check_same_domain', $same_domain );
-	$wrap_class = $same_domain ? 'hidden' : 'hidden fallback';
-
-	?>
-	<div id="wp-auth-check-wrap" class="<?php echo $wrap_class; ?>">
-	<div id="wp-auth-check-bg"></div>
-	<div id="wp-auth-check">
-	<button type="button" class="wp-auth-check-close button-link"><span class="screen-reader-text"><?php _e( 'Close dialog' ); ?></span></button>
-	<?php
-
-	if ( $same_domain ) {
-		?>
-		<div id="wp-auth-check-form" class="loading" data-src="<?php echo esc_url( add_query_arg( array( 'interim-login' => 1 ), $login_url ) ); ?>"></div>
-		<?php
-	}
-
-	?>
-	<div class="wp-auth-fallback">
-		<p><b class="wp-auth-fallback-expired" tabindex="0"><?php _e('Session expired'); ?></b></p>
-		<p><a href="<?php echo esc_url( $login_url ); ?>" target="_blank"><?php _e('Please log in again.'); ?></a>
-		<?php _e('The login page will open in a new window. After logging in you can close it and return to this page.'); ?></p>
-	</div>
-	</div>
-	</div>
-	<?php
-}
-
-/**
- * Check whether a user is still logged in, for the heartbeat.
- *
- * Send a result that shows a log-in box if the user is no longer logged in,
- * or if their cookie is within the grace period.
- *
- * @since 3.6.0
- *
- * @global int $login_grace_period
- *
- * @param array $response  The Heartbeat response.
- * @return array $response The Heartbeat response with 'wp-auth-check' value set.
- */
-function wp_auth_check( $response ) {
-	$response['wp-auth-check'] = is_user_logged_in() && empty( $GLOBALS['login_grace_period'] );
-	return $response;
-}
-
-/**
- * Return RegEx body to liberally match an opening HTML tag.
- *
- * Matches an opening HTML tag that:
- * 1. Is self-closing or
- * 2. Has no body but has a closing tag of the same name or
- * 3. Contains a body and a closing tag of the same name
- *
- * Note: this RegEx does not balance inner tags and does not attempt
- * to produce valid HTML
- *
- * @since 3.6.0
- *
- * @param string $tag An HTML tag name. Example: 'video'.
- * @return string Tag RegEx.
- */
-function get_tag_regex( $tag ) {
-	if ( empty( $tag ) )
-		return;
-	return sprintf( '<%1$s[^<]*(?:>[\s\S]*<\/%1$s>|\s*\/>)', tag_escape( $tag ) );
-}
-
-/**
- * Retrieve a canonical form of the provided charset appropriate for passing to PHP
- * functions such as htmlspecialchars() and charset html attributes.
- *
- * @since 3.6.0
- * @access private
- *
- * @see https://core.trac.wordpress.org/ticket/23688
- *
- * @param string $charset A charset name.
- * @return string The canonical form of the charset.
- */
-function _canonical_charset( $charset ) {
-	if ( 'UTF-8' === $charset || 'utf-8' === $charset || 'utf8' === $charset ||
-		'UTF8' === $charset )
-		return 'UTF-8';
-
-	if ( 'ISO-8859-1' === $charset || 'iso-8859-1' === $charset ||
-		'iso8859-1' === $charset || 'ISO8859-1' === $charset )
-		return 'ISO-8859-1';
-
-	return $charset;
-}
-
-/**
- * Set the mbstring internal encoding to a binary safe encoding when func_overload
- * is enabled.
- *
- * When mbstring.func_overload is in use for multi-byte encodings, the results from
- * strlen() and similar functions respect the utf8 characters, causing binary data
- * to return incorrect lengths.
- *
- * This function overrides the mbstring encoding to a binary-safe encoding, and
- * resets it to the users expected encoding afterwards through the
- * `reset_mbstring_encoding` function.
- *
- * It is safe to recursively call this function, however each
- * `mbstring_binary_safe_encoding()` call must be followed up with an equal number
- * of `reset_mbstring_encoding()` calls.
- *
- * @since 3.7.0
- *
- * @see reset_mbstring_encoding()
- *
- * @staticvar array $encodings
- * @staticvar bool  $overloaded
- *
- * @param bool $reset Optional. Whether to reset the encoding back to a previously-set encoding.
- *                    Default false.
- */
-function mbstring_binary_safe_encoding( $reset = false ) {
-	static $encodings = array();
-	static $overloaded = null;
-
-	if ( is_null( $overloaded ) )
-		$overloaded = function_exists( 'mb_internal_encoding' ) && ( ini_get( 'mbstring.func_overload' ) & 2 );
-
-	if ( false === $overloaded )
-		return;
-
-	if ( ! $reset ) {
-		$encoding = mb_internal_encoding();
-		array_push( $encodings, $encoding );
-		mb_internal_encoding( 'ISO-8859-1' );
-	}
-
-	if ( $reset && $encodings ) {
-		$encoding = array_pop( $encodings );
-		mb_internal_encoding( $encoding );
-	}
-}
-
-/**
- * Reset the mbstring internal encoding to a users previously set encoding.
- *
- * @see mbstring_binary_safe_encoding()
- *
- * @since 3.7.0
- */
-function reset_mbstring_encoding() {
-	mbstring_binary_safe_encoding( true );
-}
-
-/**
- * Filter/validate a variable as a boolean.
- *
- * Alternative to `filter_var( $var, FILTER_VALIDATE_BOOLEAN )`.
- *
- * @since 4.0.0
- *
- * @param mixed $var Boolean value to validate.
- * @return bool Whether the value is validated.
- */
-function wp_validate_boolean( $var ) {
-	if ( is_bool( $var ) ) {
-		return $var;
-	}
-
-	if ( is_string( $var ) && 'false' === strtolower( $var ) ) {
-		return false;
-	}
-
-	return (bool) $var;
-}
-
-/**
- * Delete a file
- *
- * @since 4.2.0
- *
- * @param string $file The path to the file to delete.
- */
-function wp_delete_file( $file ) {
-	/**
-	 * Filters the path of the file to delete.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param string $medium Path to the file to delete.
-	 */
-	$delete = apply_filters( 'wp_delete_file', $file );
-	if ( ! empty( $delete ) ) {
-		@unlink( $delete );
-	}
-}
-
-/**
- * Outputs a small JS snippet on preview tabs/windows to remove `window.name` on unload.
- *
- * This prevents reusing the same tab for a preview when the user has navigated away.
- *
- * @since 4.3.0
- */
-function wp_post_preview_js() {
-	global $post;
-
-	if ( ! is_preview() || empty( $post ) ) {
-		return;
-	}
-
-	// Has to match the window name used in post_submit_meta_box()
-	$name = 'wp-preview-' . (int) $post->ID;
-
-	?>
-	<script>
-	( function() {
-		var query = document.location.search;
-
-		if ( query && query.indexOf( 'preview=true' ) !== -1 ) {
-			window.name = '<?php echo $name; ?>';
-		}
-
-		if ( window.addEventListener ) {
-			window.addEventListener( 'unload', function() { window.name = ''; }, false );
-		}
-	}());
-	</script>
-	<?php
-}
-
-/**
- * Parses and formats a MySQL datetime (Y-m-d H:i:s) for ISO8601/RFC3339.
- *
- * Explicitly strips timezones, as datetimes are not saved with any timezone
- * information. Including any information on the offset could be misleading.
- *
- * @since 4.4.0
- *
- * @param string $date_string Date string to parse and format.
- * @return string Date formatted for ISO8601/RFC3339.
- */
-function mysql_to_rfc3339( $date_string ) {
-	$formatted = mysql2date( 'c', $date_string, false );
-
-	// Strip timezone information
-	return preg_replace( '/(?:Z|[+-]\d{2}(?::\d{2})?)$/', '', $formatted );
-}
-
-/**
- * Attempts to raise the PHP memory limit for memory intensive processes.
- *
- * Only allows raising the existing limit and prevents lowering it.
- *
- * @since 4.6.0
- *
- * @param string $context Optional. Context in which the function is called. Accepts either 'admin',
- *                        'image', or an arbitrary other context. If an arbitrary context is passed,
- *                        the similarly arbitrary {@see '{$context}_memory_limit'} filter will be
- *                        invoked. Default 'admin'.
- * @return bool|int|string The limit that was set or false on failure.
- */
-function wp_raise_memory_limit( $context = 'admin' ) {
-	// Exit early if the limit cannot be changed.
-	if ( false === wp_is_ini_value_changeable( 'memory_limit' ) ) {
-		return false;
-	}
-
-	$current_limit     = @ini_get( 'memory_limit' );
-	$current_limit_int = wp_convert_hr_to_bytes( $current_limit );
-
-	if ( -1 === $current_limit_int ) {
-		return false;
-	}
-
-	$wp_max_limit     = WP_MAX_MEMORY_LIMIT;
-	$wp_max_limit_int = wp_convert_hr_to_bytes( $wp_max_limit );
-	$filtered_limit   = $wp_max_limit;
-
-	switch ( $context ) {
-		case 'admin':
-			/**
-			 * Filters the maximum memory limit available for administration screens.
-			 *
-			 * This only applies to administrators, who may require more memory for tasks
-			 * like updates. Memory limits when processing images (uploaded or edited by
-			 * users of any role) are handled separately.
-			 *
-			 * The `WP_MAX_MEMORY_LIMIT` constant specifically defines the maximum memory
-			 * limit available when in the administration back end. The default is 256M
-			 * (256 megabytes of memory) or the original `memory_limit` php.ini value if
-			 * this is higher.
-			 *
-			 * @since 3.0.0
-			 * @since 4.6.0 The default now takes the original `memory_limit` into account.
-			 *
-			 * @param int|string $filtered_limit The maximum WordPress memory limit. Accepts an integer
-			 *                                   (bytes), or a shorthand string notation, such as '256M'.
-			 */
-			$filtered_limit = apply_filters( 'admin_memory_limit', $filtered_limit );
-			break;
-
-		case 'image':
-			/**
-			 * Filters the memory limit allocated for image manipulation.
-			 *
-			 * @since 3.5.0
-			 * @since 4.6.0 The default now takes the original `memory_limit` into account.
-			 *
-			 * @param int|string $filtered_limit Maximum memory limit to allocate for images.
-			 *                                   Default `WP_MAX_MEMORY_LIMIT` or the original
-			 *                                   php.ini `memory_limit`, whichever is higher.
-			 *                                   Accepts an integer (bytes), or a shorthand string
-			 *                                   notation, such as '256M'.
-			 */
-			$filtered_limit = apply_filters( 'image_memory_limit', $filtered_limit );
-			break;
-
-		default:
-			/**
-			 * Filters the memory limit allocated for arbitrary contexts.
-			 *
-			 * The dynamic portion of the hook name, `$context`, refers to an arbitrary
-			 * context passed on calling the function. This allows for plugins to define
-			 * their own contexts for raising the memory limit.
-			 *
-			 * @since 4.6.0
-			 *
-			 * @param int|string $filtered_limit Maximum memory limit to allocate for images.
-			 *                                   Default '256M' or the original php.ini `memory_limit`,
-			 *                                   whichever is higher. Accepts an integer (bytes), or a
-			 *                                   shorthand string notation, such as '256M'.
-			 */
-			$filtered_limit = apply_filters( "{$context}_memory_limit", $filtered_limit );
-			break;
-	}
-
-	$filtered_limit_int = wp_convert_hr_to_bytes( $filtered_limit );
-
-	if ( -1 === $filtered_limit_int || ( $filtered_limit_int > $wp_max_limit_int && $filtered_limit_int > $current_limit_int ) ) {
-		if ( false !== @ini_set( 'memory_limit', $filtered_limit ) ) {
-			return $filtered_limit;
-		} else {
-			return false;
-		}
-	} elseif ( -1 === $wp_max_limit_int || $wp_max_limit_int > $current_limit_int ) {
-		if ( false !== @ini_set( 'memory_limit', $wp_max_limit ) ) {
-			return $wp_max_limit;
-		} else {
-			return false;
-		}
-	}
-
-	return false;
-}
Index: www/wp-includes/media.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/media.php	(revision 38565)
+++ www/wp-includes/media.php	(revision 38565)
@@ -1,3824 +0,0 @@
-<?php
-/**
- * WordPress API for media display.
- *
- * @package WordPress
- * @subpackage Media
- */
-
-/**
- * Retrieve additional image sizes.
- *
- * @since 4.7.0
- *
- * @global array $_wp_additional_image_sizes
- *
- * @return array Additional images size data.
- */
-function wp_get_additional_image_sizes() {
-	global $_wp_additional_image_sizes;
-	if ( ! $_wp_additional_image_sizes ) {
-		$_wp_additional_image_sizes = array();
-	}
-	return $_wp_additional_image_sizes;
-}
-
-/**
- * Scale down the default size of an image.
- *
- * This is so that the image is a better fit for the editor and theme.
- *
- * The `$size` parameter accepts either an array or a string. The supported string
- * values are 'thumb' or 'thumbnail' for the given thumbnail size or defaults at
- * 128 width and 96 height in pixels. Also supported for the string value is
- * 'medium', 'medium_large' and 'full'. The 'full' isn't actually supported, but any value other
- * than the supported will result in the content_width size or 500 if that is
- * not set.
- *
- * Finally, there is a filter named {@see 'editor_max_image_size'}, that will be
- * called on the calculated array for width and height, respectively. The second
- * parameter will be the value that was in the $size parameter. The returned
- * type for the hook is an array with the width as the first element and the
- * height as the second element.
- *
- * @since 2.5.0
- *
- * @global int   $content_width
- *
- * @param int          $width   Width of the image in pixels.
- * @param int          $height  Height of the image in pixels.
- * @param string|array $size    Optional. Image size. Accepts any valid image size, or an array
- *                              of width and height values in pixels (in that order).
- *                              Default 'medium'.
- * @param string       $context Optional. Could be 'display' (like in a theme) or 'edit'
- *                              (like inserting into an editor). Default null.
- * @return array Width and height of what the result image should resize to.
- */
-function image_constrain_size_for_editor( $width, $height, $size = 'medium', $context = null ) {
-	global $content_width;
-
-	$_wp_additional_image_sizes = wp_get_additional_image_sizes();
-
-	if ( ! $context )
-		$context = is_admin() ? 'edit' : 'display';
-
-	if ( is_array($size) ) {
-		$max_width = $size[0];
-		$max_height = $size[1];
-	}
-	elseif ( $size == 'thumb' || $size == 'thumbnail' ) {
-		$max_width = intval(get_option('thumbnail_size_w'));
-		$max_height = intval(get_option('thumbnail_size_h'));
-		// last chance thumbnail size defaults
-		if ( !$max_width && !$max_height ) {
-			$max_width = 128;
-			$max_height = 96;
-		}
-	}
-	elseif ( $size == 'medium' ) {
-		$max_width = intval(get_option('medium_size_w'));
-		$max_height = intval(get_option('medium_size_h'));
-
-	}
-	elseif ( $size == 'medium_large' ) {
-		$max_width = intval( get_option( 'medium_large_size_w' ) );
-		$max_height = intval( get_option( 'medium_large_size_h' ) );
-
-		if ( intval( $content_width ) > 0 ) {
-			$max_width = min( intval( $content_width ), $max_width );
-		}
-	}
-	elseif ( $size == 'large' ) {
-		/*
-		 * We're inserting a large size image into the editor. If it's a really
-		 * big image we'll scale it down to fit reasonably within the editor
-		 * itself, and within the theme's content width if it's known. The user
-		 * can resize it in the editor if they wish.
-		 */
-		$max_width = intval(get_option('large_size_w'));
-		$max_height = intval(get_option('large_size_h'));
-		if ( intval($content_width) > 0 ) {
-			$max_width = min( intval($content_width), $max_width );
-		}
-	} elseif ( ! empty( $_wp_additional_image_sizes ) && in_array( $size, array_keys( $_wp_additional_image_sizes ) ) ) {
-		$max_width = intval( $_wp_additional_image_sizes[$size]['width'] );
-		$max_height = intval( $_wp_additional_image_sizes[$size]['height'] );
-		// Only in admin. Assume that theme authors know what they're doing.
-		if ( intval( $content_width ) > 0 && 'edit' === $context ) {
-			$max_width = min( intval( $content_width ), $max_width );
-		}
-	}
-	// $size == 'full' has no constraint
-	else {
-		$max_width = $width;
-		$max_height = $height;
-	}
-
-	/**
-	 * Filters the maximum image size dimensions for the editor.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param array        $max_image_size An array with the width as the first element,
-	 *                                     and the height as the second element.
-	 * @param string|array $size           Size of what the result image should be.
-	 * @param string       $context        The context the image is being resized for.
-	 *                                     Possible values are 'display' (like in a theme)
-	 *                                     or 'edit' (like inserting into an editor).
-	 */
-	list( $max_width, $max_height ) = apply_filters( 'editor_max_image_size', array( $max_width, $max_height ), $size, $context );
-
-	return wp_constrain_dimensions( $width, $height, $max_width, $max_height );
-}
-
-/**
- * Retrieve width and height attributes using given width and height values.
- *
- * Both attributes are required in the sense that both parameters must have a
- * value, but are optional in that if you set them to false or null, then they
- * will not be added to the returned string.
- *
- * You can set the value using a string, but it will only take numeric values.
- * If you wish to put 'px' after the numbers, then it will be stripped out of
- * the return.
- *
- * @since 2.5.0
- *
- * @param int|string $width  Image width in pixels.
- * @param int|string $height Image height in pixels.
- * @return string HTML attributes for width and, or height.
- */
-function image_hwstring( $width, $height ) {
-	$out = '';
-	if ($width)
-		$out .= 'width="'.intval($width).'" ';
-	if ($height)
-		$out .= 'height="'.intval($height).'" ';
-	return $out;
-}
-
-/**
- * Scale an image to fit a particular size (such as 'thumb' or 'medium').
- *
- * Array with image url, width, height, and whether is intermediate size, in
- * that order is returned on success is returned. $is_intermediate is true if
- * $url is a resized image, false if it is the original.
- *
- * The URL might be the original image, or it might be a resized version. This
- * function won't create a new resized copy, it will just return an already
- * resized one if it exists.
- *
- * A plugin may use the {@see 'image_downsize'} filter to hook into and offer image
- * resizing services for images. The hook must return an array with the same
- * elements that are returned in the function. The first element being the URL
- * to the new image that was resized.
- *
- * @since 2.5.0
- *
- * @param int          $id   Attachment ID for image.
- * @param array|string $size Optional. Image size to scale to. Accepts any valid image size,
- *                           or an array of width and height values in pixels (in that order).
- *                           Default 'medium'.
- * @return false|array Array containing the image URL, width, height, and boolean for whether
- *                     the image is an intermediate size. False on failure.
- */
-function image_downsize( $id, $size = 'medium' ) {
-
-	if ( !wp_attachment_is_image($id) )
-		return false;
-
-	/**
-	 * Filters whether to preempt the output of image_downsize().
-	 *
-	 * Passing a truthy value to the filter will effectively short-circuit
-	 * down-sizing the image, returning that value as output instead.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param bool         $downsize Whether to short-circuit the image downsize. Default false.
-	 * @param int          $id       Attachment ID for image.
-	 * @param array|string $size     Size of image. Image size or array of width and height values (in that order).
-	 *                               Default 'medium'.
-	 */
-	if ( $out = apply_filters( 'image_downsize', false, $id, $size ) ) {
-		return $out;
-	}
-
-	$img_url = wp_get_attachment_url($id);
-	$meta = wp_get_attachment_metadata($id);
-	$width = $height = 0;
-	$is_intermediate = false;
-	$img_url_basename = wp_basename($img_url);
-
-	// try for a new style intermediate size
-	if ( $intermediate = image_get_intermediate_size($id, $size) ) {
-		$img_url = str_replace($img_url_basename, $intermediate['file'], $img_url);
-		$width = $intermediate['width'];
-		$height = $intermediate['height'];
-		$is_intermediate = true;
-	}
-	elseif ( $size == 'thumbnail' ) {
-		// fall back to the old thumbnail
-		if ( ($thumb_file = wp_get_attachment_thumb_file($id)) && $info = getimagesize($thumb_file) ) {
-			$img_url = str_replace($img_url_basename, wp_basename($thumb_file), $img_url);
-			$width = $info[0];
-			$height = $info[1];
-			$is_intermediate = true;
-		}
-	}
-	if ( !$width && !$height && isset( $meta['width'], $meta['height'] ) ) {
-		// any other type: use the real image
-		$width = $meta['width'];
-		$height = $meta['height'];
-	}
-
-	if ( $img_url) {
-		// we have the actual image size, but might need to further constrain it if content_width is narrower
-		list( $width, $height ) = image_constrain_size_for_editor( $width, $height, $size );
-
-		return array( $img_url, $width, $height, $is_intermediate );
-	}
-	return false;
-
-}
-
-/**
- * Register a new image size.
- *
- * Cropping behavior for the image size is dependent on the value of $crop:
- * 1. If false (default), images will be scaled, not cropped.
- * 2. If an array in the form of array( x_crop_position, y_crop_position ):
- *    - x_crop_position accepts 'left' 'center', or 'right'.
- *    - y_crop_position accepts 'top', 'center', or 'bottom'.
- *    Images will be cropped to the specified dimensions within the defined crop area.
- * 3. If true, images will be cropped to the specified dimensions using center positions.
- *
- * @since 2.9.0
- *
- * @global array $_wp_additional_image_sizes Associative array of additional image sizes.
- *
- * @param string     $name   Image size identifier.
- * @param int        $width  Image width in pixels.
- * @param int        $height Image height in pixels.
- * @param bool|array $crop   Optional. Whether to crop images to specified width and height or resize.
- *                           An array can specify positioning of the crop area. Default false.
- */
-function add_image_size( $name, $width = 0, $height = 0, $crop = false ) {
-	global $_wp_additional_image_sizes;
-
-	$_wp_additional_image_sizes[ $name ] = array(
-		'width'  => absint( $width ),
-		'height' => absint( $height ),
-		'crop'   => $crop,
-	);
-}
-
-/**
- * Check if an image size exists.
- *
- * @since 3.9.0
- *
- * @param string $name The image size to check.
- * @return bool True if the image size exists, false if not.
- */
-function has_image_size( $name ) {
-	$sizes = wp_get_additional_image_sizes();
-	return isset( $sizes[ $name ] );
-}
-
-/**
- * Remove a new image size.
- *
- * @since 3.9.0
- *
- * @global array $_wp_additional_image_sizes
- *
- * @param string $name The image size to remove.
- * @return bool True if the image size was successfully removed, false on failure.
- */
-function remove_image_size( $name ) {
-	global $_wp_additional_image_sizes;
-
-	if ( isset( $_wp_additional_image_sizes[ $name ] ) ) {
-		unset( $_wp_additional_image_sizes[ $name ] );
-		return true;
-	}
-
-	return false;
-}
-
-/**
- * Registers an image size for the post thumbnail.
- *
- * @since 2.9.0
- *
- * @see add_image_size() for details on cropping behavior.
- *
- * @param int        $width  Image width in pixels.
- * @param int        $height Image height in pixels.
- * @param bool|array $crop   Optional. Whether to crop images to specified width and height or resize.
- *                           An array can specify positioning of the crop area. Default false.
- */
-function set_post_thumbnail_size( $width = 0, $height = 0, $crop = false ) {
-	add_image_size( 'post-thumbnail', $width, $height, $crop );
-}
-
-/**
- * Gets an img tag for an image attachment, scaling it down if requested.
- *
- * The {@see 'get_image_tag_class'} filter allows for changing the class name for the
- * image without having to use regular expressions on the HTML content. The
- * parameters are: what WordPress will use for the class, the Attachment ID,
- * image align value, and the size the image should be.
- *
- * The second filter, {@see 'get_image_tag'}, has the HTML content, which can then be
- * further manipulated by a plugin to change all attribute values and even HTML
- * content.
- *
- * @since 2.5.0
- *
- * @param int          $id    Attachment ID.
- * @param string       $alt   Image Description for the alt attribute.
- * @param string       $title Image Description for the title attribute.
- * @param string       $align Part of the class name for aligning the image.
- * @param string|array $size  Optional. Registered image size to retrieve a tag for. Accepts any
- *                            valid image size, or an array of width and height values in pixels
- *                            (in that order). Default 'medium'.
- * @return string HTML IMG element for given image attachment
- */
-function get_image_tag( $id, $alt, $title, $align, $size = 'medium' ) {
-
-	list( $img_src, $width, $height ) = image_downsize($id, $size);
-	$hwstring = image_hwstring($width, $height);
-
-	$title = $title ? 'title="' . esc_attr( $title ) . '" ' : '';
-
-	$class = 'align' . esc_attr($align) .' size-' . esc_attr($size) . ' wp-image-' . $id;
-
-	/**
-	 * Filters the value of the attachment's image tag class attribute.
-	 *
-	 * @since 2.6.0
-	 *
-	 * @param string       $class CSS class name or space-separated list of classes.
-	 * @param int          $id    Attachment ID.
-	 * @param string       $align Part of the class name for aligning the image.
-	 * @param string|array $size  Size of image. Image size or array of width and height values (in that order).
-	 *                            Default 'medium'.
-	 */
-	$class = apply_filters( 'get_image_tag_class', $class, $id, $align, $size );
-
-	$html = '<img src="' . esc_attr($img_src) . '" alt="' . esc_attr($alt) . '" ' . $title . $hwstring . 'class="' . $class . '" />';
-
-	/**
-	 * Filters the HTML content for the image tag.
-	 *
-	 * @since 2.6.0
-	 *
-	 * @param string       $html  HTML content for the image.
-	 * @param int          $id    Attachment ID.
-	 * @param string       $alt   Alternate text.
-	 * @param string       $title Attachment title.
-	 * @param string       $align Part of the class name for aligning the image.
-	 * @param string|array $size  Size of image. Image size or array of width and height values (in that order).
-	 *                            Default 'medium'.
-	 */
-	return apply_filters( 'get_image_tag', $html, $id, $alt, $title, $align, $size );
-}
-
-/**
- * Calculates the new dimensions for a down-sampled image.
- *
- * If either width or height are empty, no constraint is applied on
- * that dimension.
- *
- * @since 2.5.0
- *
- * @param int $current_width  Current width of the image.
- * @param int $current_height Current height of the image.
- * @param int $max_width      Optional. Max width in pixels to constrain to. Default 0.
- * @param int $max_height     Optional. Max height in pixels to constrain to. Default 0.
- * @return array First item is the width, the second item is the height.
- */
-function wp_constrain_dimensions( $current_width, $current_height, $max_width = 0, $max_height = 0 ) {
-	if ( !$max_width && !$max_height )
-		return array( $current_width, $current_height );
-
-	$width_ratio = $height_ratio = 1.0;
-	$did_width = $did_height = false;
-
-	if ( $max_width > 0 && $current_width > 0 && $current_width > $max_width ) {
-		$width_ratio = $max_width / $current_width;
-		$did_width = true;
-	}
-
-	if ( $max_height > 0 && $current_height > 0 && $current_height > $max_height ) {
-		$height_ratio = $max_height / $current_height;
-		$did_height = true;
-	}
-
-	// Calculate the larger/smaller ratios
-	$smaller_ratio = min( $width_ratio, $height_ratio );
-	$larger_ratio  = max( $width_ratio, $height_ratio );
-
-	if ( (int) round( $current_width * $larger_ratio ) > $max_width || (int) round( $current_height * $larger_ratio ) > $max_height ) {
- 		// The larger ratio is too big. It would result in an overflow.
-		$ratio = $smaller_ratio;
-	} else {
-		// The larger ratio fits, and is likely to be a more "snug" fit.
-		$ratio = $larger_ratio;
-	}
-
-	// Very small dimensions may result in 0, 1 should be the minimum.
-	$w = max ( 1, (int) round( $current_width  * $ratio ) );
-	$h = max ( 1, (int) round( $current_height * $ratio ) );
-
-	// Sometimes, due to rounding, we'll end up with a result like this: 465x700 in a 177x177 box is 117x176... a pixel short
-	// We also have issues with recursive calls resulting in an ever-changing result. Constraining to the result of a constraint should yield the original result.
-	// Thus we look for dimensions that are one pixel shy of the max value and bump them up
-
-	// Note: $did_width means it is possible $smaller_ratio == $width_ratio.
-	if ( $did_width && $w == $max_width - 1 ) {
-		$w = $max_width; // Round it up
-	}
-
-	// Note: $did_height means it is possible $smaller_ratio == $height_ratio.
-	if ( $did_height && $h == $max_height - 1 ) {
-		$h = $max_height; // Round it up
-	}
-
-	/**
-	 * Filters dimensions to constrain down-sampled images to.
-	 *
-	 * @since 4.1.0
-	 *
-	 * @param array $dimensions     The image width and height.
-	 * @param int 	$current_width  The current width of the image.
-	 * @param int 	$current_height The current height of the image.
-	 * @param int 	$max_width      The maximum width permitted.
-	 * @param int 	$max_height     The maximum height permitted.
-	 */
-	return apply_filters( 'wp_constrain_dimensions', array( $w, $h ), $current_width, $current_height, $max_width, $max_height );
-}
-
-/**
- * Retrieves calculated resize dimensions for use in WP_Image_Editor.
- *
- * Calculates dimensions and coordinates for a resized image that fits
- * within a specified width and height.
- *
- * Cropping behavior is dependent on the value of $crop:
- * 1. If false (default), images will not be cropped.
- * 2. If an array in the form of array( x_crop_position, y_crop_position ):
- *    - x_crop_position accepts 'left' 'center', or 'right'.
- *    - y_crop_position accepts 'top', 'center', or 'bottom'.
- *    Images will be cropped to the specified dimensions within the defined crop area.
- * 3. If true, images will be cropped to the specified dimensions using center positions.
- *
- * @since 2.5.0
- *
- * @param int        $orig_w Original width in pixels.
- * @param int        $orig_h Original height in pixels.
- * @param int        $dest_w New width in pixels.
- * @param int        $dest_h New height in pixels.
- * @param bool|array $crop   Optional. Whether to crop image to specified width and height or resize.
- *                           An array can specify positioning of the crop area. Default false.
- * @return false|array False on failure. Returned array matches parameters for `imagecopyresampled()`.
- */
-function image_resize_dimensions( $orig_w, $orig_h, $dest_w, $dest_h, $crop = false ) {
-
-	if ($orig_w <= 0 || $orig_h <= 0)
-		return false;
-	// at least one of dest_w or dest_h must be specific
-	if ($dest_w <= 0 && $dest_h <= 0)
-		return false;
-
-	/**
-	 * Filters whether to preempt calculating the image resize dimensions.
-	 *
-	 * Passing a non-null value to the filter will effectively short-circuit
-	 * image_resize_dimensions(), returning that value instead.
-	 *
-	 * @since 3.4.0
-	 *
-	 * @param null|mixed $null   Whether to preempt output of the resize dimensions.
-	 * @param int        $orig_w Original width in pixels.
-	 * @param int        $orig_h Original height in pixels.
-	 * @param int        $dest_w New width in pixels.
-	 * @param int        $dest_h New height in pixels.
-	 * @param bool|array $crop   Whether to crop image to specified width and height or resize.
-	 *                           An array can specify positioning of the crop area. Default false.
-	 */
-	$output = apply_filters( 'image_resize_dimensions', null, $orig_w, $orig_h, $dest_w, $dest_h, $crop );
-	if ( null !== $output )
-		return $output;
-
-	if ( $crop ) {
-		// crop the largest possible portion of the original image that we can size to $dest_w x $dest_h
-		$aspect_ratio = $orig_w / $orig_h;
-		$new_w = min($dest_w, $orig_w);
-		$new_h = min($dest_h, $orig_h);
-
-		if ( ! $new_w ) {
-			$new_w = (int) round( $new_h * $aspect_ratio );
-		}
-
-		if ( ! $new_h ) {
-			$new_h = (int) round( $new_w / $aspect_ratio );
-		}
-
-		$size_ratio = max($new_w / $orig_w, $new_h / $orig_h);
-
-		$crop_w = round($new_w / $size_ratio);
-		$crop_h = round($new_h / $size_ratio);
-
-		if ( ! is_array( $crop ) || count( $crop ) !== 2 ) {
-			$crop = array( 'center', 'center' );
-		}
-
-		list( $x, $y ) = $crop;
-
-		if ( 'left' === $x ) {
-			$s_x = 0;
-		} elseif ( 'right' === $x ) {
-			$s_x = $orig_w - $crop_w;
-		} else {
-			$s_x = floor( ( $orig_w - $crop_w ) / 2 );
-		}
-
-		if ( 'top' === $y ) {
-			$s_y = 0;
-		} elseif ( 'bottom' === $y ) {
-			$s_y = $orig_h - $crop_h;
-		} else {
-			$s_y = floor( ( $orig_h - $crop_h ) / 2 );
-		}
-	} else {
-		// don't crop, just resize using $dest_w x $dest_h as a maximum bounding box
-		$crop_w = $orig_w;
-		$crop_h = $orig_h;
-
-		$s_x = 0;
-		$s_y = 0;
-
-		list( $new_w, $new_h ) = wp_constrain_dimensions( $orig_w, $orig_h, $dest_w, $dest_h );
-	}
-
-	// if the resulting image would be the same size or larger we don't want to resize it
-	if ( $new_w >= $orig_w && $new_h >= $orig_h && $dest_w != $orig_w && $dest_h != $orig_h ) {
-		return false;
-	}
-
-	// the return array matches the parameters to imagecopyresampled()
-	// int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h
-	return array( 0, 0, (int) $s_x, (int) $s_y, (int) $new_w, (int) $new_h, (int) $crop_w, (int) $crop_h );
-
-}
-
-/**
- * Resizes an image to make a thumbnail or intermediate size.
- *
- * The returned array has the file size, the image width, and image height. The
- * {@see 'image_make_intermediate_size'} filter can be used to hook in and change the
- * values of the returned array. The only parameter is the resized file path.
- *
- * @since 2.5.0
- *
- * @param string $file   File path.
- * @param int    $width  Image width.
- * @param int    $height Image height.
- * @param bool   $crop   Optional. Whether to crop image to specified width and height or resize.
- *                       Default false.
- * @return false|array False, if no image was created. Metadata array on success.
- */
-function image_make_intermediate_size( $file, $width, $height, $crop = false ) {
-	if ( $width || $height ) {
-		$editor = wp_get_image_editor( $file );
-
-		if ( is_wp_error( $editor ) || is_wp_error( $editor->resize( $width, $height, $crop ) ) )
-			return false;
-
-		$resized_file = $editor->save();
-
-		if ( ! is_wp_error( $resized_file ) && $resized_file ) {
-			unset( $resized_file['path'] );
-			return $resized_file;
-		}
-	}
-	return false;
-}
-
-/**
- * Helper function to test if aspect ratios for two images match.
- *
- * @since 4.6.0
- *
- * @param int $source_width  Width of the first image in pixels.
- * @param int $source_height Height of the first image in pixels.
- * @param int $target_width  Width of the second image in pixels.
- * @param int $target_height Height of the second image in pixels.
- * @return bool True if aspect ratios match within 1px. False if not.
- */
-function wp_image_matches_ratio( $source_width, $source_height, $target_width, $target_height ) {
-	/*
-	 * To test for varying crops, we constrain the dimensions of the larger image
-	 * to the dimensions of the smaller image and see if they match.
-	 */
-	if ( $source_width > $target_width ) {
-		$constrained_size = wp_constrain_dimensions( $source_width, $source_height, $target_width );
-		$expected_size = array( $target_width, $target_height );
-	} else {
-		$constrained_size = wp_constrain_dimensions( $target_width, $target_height, $source_width );
-		$expected_size = array( $source_width, $source_height );
-	}
-
-	// If the image dimensions are within 1px of the expected size, we consider it a match.
-	$matched = ( abs( $constrained_size[0] - $expected_size[0] ) <= 1 && abs( $constrained_size[1] - $expected_size[1] ) <= 1 );
-
-	return $matched;
-}
-
-/**
- * Retrieves the image's intermediate size (resized) path, width, and height.
- *
- * The $size parameter can be an array with the width and height respectively.
- * If the size matches the 'sizes' metadata array for width and height, then it
- * will be used. If there is no direct match, then the nearest image size larger
- * than the specified size will be used. If nothing is found, then the function
- * will break out and return false.
- *
- * The metadata 'sizes' is used for compatible sizes that can be used for the
- * parameter $size value.
- *
- * The url path will be given, when the $size parameter is a string.
- *
- * If you are passing an array for the $size, you should consider using
- * add_image_size() so that a cropped version is generated. It's much more
- * efficient than having to find the closest-sized image and then having the
- * browser scale down the image.
- *
- * @since 2.5.0
- *
- * @param int          $post_id Attachment ID.
- * @param array|string $size    Optional. Image size. Accepts any valid image size, or an array
- *                              of width and height values in pixels (in that order).
- *                              Default 'thumbnail'.
- * @return false|array $data {
- *     Array of file relative path, width, and height on success. Additionally includes absolute
- *     path and URL if registered size is passed to $size parameter. False on failure.
- *
- *     @type string $file   Image's path relative to uploads directory
- *     @type int    $width  Width of image
- *     @type int    $height Height of image
- *     @type string $path   Image's absolute filesystem path.
- *     @type string $url    Image's URL.
- * }
- */
-function image_get_intermediate_size( $post_id, $size = 'thumbnail' ) {
-	if ( ! $size || ! is_array( $imagedata = wp_get_attachment_metadata( $post_id ) ) || empty( $imagedata['sizes'] )  ) {
-		return false;
-	}
-
-	$data = array();
-
-	// Find the best match when '$size' is an array.
-	if ( is_array( $size ) ) {
-		$candidates = array();
-
-		foreach ( $imagedata['sizes'] as $_size => $data ) {
-			// If there's an exact match to an existing image size, short circuit.
-			if ( $data['width'] == $size[0] && $data['height'] == $size[1] ) {
-				$candidates[ $data['width'] * $data['height'] ] = $data;
-				break;
-			}
-
-			// If it's not an exact match, consider larger sizes with the same aspect ratio.
-			if ( $data['width'] >= $size[0] && $data['height'] >= $size[1] ) {
-				// If '0' is passed to either size, we test ratios against the original file.
-				if ( 0 === $size[0] || 0 === $size[1] ) {
-					$same_ratio = wp_image_matches_ratio( $data['width'], $data['height'], $imagedata['width'], $imagedata['height'] );
-				} else {
-					$same_ratio = wp_image_matches_ratio( $data['width'], $data['height'], $size[0], $size[1] );
-				}
-
-				if ( $same_ratio ) {
-					$candidates[ $data['width'] * $data['height'] ] = $data;
-				}
-			}
-		}
-
-		if ( ! empty( $candidates ) ) {
-			// Sort the array by size if we have more than one candidate.
-			if ( 1 < count( $candidates ) ) {
-				ksort( $candidates );
-			}
-
-			$data = array_shift( $candidates );
-		/*
-		 * When the size requested is smaller than the thumbnail dimensions, we
-		 * fall back to the thumbnail size to maintain backwards compatibility with
-		 * pre 4.6 versions of WordPress.
-		 */
-		} elseif ( ! empty( $imagedata['sizes']['thumbnail'] ) && $imagedata['sizes']['thumbnail']['width'] >= $size[0] && $imagedata['sizes']['thumbnail']['width'] >= $size[1] ) {
-			$data = $imagedata['sizes']['thumbnail'];
-		} else {
-			return false;
-		}
-
-		// Constrain the width and height attributes to the requested values.
-		list( $data['width'], $data['height'] ) = image_constrain_size_for_editor( $data['width'], $data['height'], $size );
-
-	} elseif ( ! empty( $imagedata['sizes'][ $size ] ) ) {
-		$data = $imagedata['sizes'][ $size ];
-	}
-
-	// If we still don't have a match at this point, return false.
-	if ( empty( $data ) ) {
-		return false;
-	}
-
-	// include the full filesystem path of the intermediate file
-	if ( empty($data['path']) && !empty($data['file']) ) {
-		$file_url = wp_get_attachment_url($post_id);
-		$data['path'] = path_join( dirname($imagedata['file']), $data['file'] );
-		$data['url'] = path_join( dirname($file_url), $data['file'] );
-	}
-
-	/**
-	 * Filters the output of image_get_intermediate_size()
-	 *
-	 * @since 4.4.0
-	 *
-	 * @see image_get_intermediate_size()
-	 *
-	 * @param array        $data    Array of file relative path, width, and height on success. May also include
-	 *                              file absolute path and URL.
-	 * @param int          $post_id The post_id of the image attachment
-	 * @param string|array $size    Registered image size or flat array of initially-requested height and width
-	 *                              dimensions (in that order).
-	 */
-	return apply_filters( 'image_get_intermediate_size', $data, $post_id, $size );
-}
-
-/**
- * Gets the available intermediate image sizes.
- *
- * @since 3.0.0
- *
- * @return array Returns a filtered array of image size strings.
- */
-function get_intermediate_image_sizes() {
-	$_wp_additional_image_sizes = wp_get_additional_image_sizes();
-	$image_sizes = array('thumbnail', 'medium', 'medium_large', 'large'); // Standard sizes
-	if ( ! empty( $_wp_additional_image_sizes ) ) {
-		$image_sizes = array_merge( $image_sizes, array_keys( $_wp_additional_image_sizes ) );
-	}
-
-	/**
-	 * Filters the list of intermediate image sizes.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param array $image_sizes An array of intermediate image sizes. Defaults
-	 *                           are 'thumbnail', 'medium', 'medium_large', 'large'.
-	 */
-	return apply_filters( 'intermediate_image_sizes', $image_sizes );
-}
-
-/**
- * Retrieve an image to represent an attachment.
- *
- * A mime icon for files, thumbnail or intermediate size for images.
- *
- * The returned array contains four values: the URL of the attachment image src,
- * the width of the image file, the height of the image file, and a boolean
- * representing whether the returned array describes an intermediate (generated)
- * image size or the original, full-sized upload.
- *
- * @since 2.5.0
- *
- * @param int          $attachment_id Image attachment ID.
- * @param string|array $size          Optional. Image size. Accepts any valid image size, or an array of width
- *                                    and height values in pixels (in that order). Default 'thumbnail'.
- * @param bool         $icon          Optional. Whether the image should be treated as an icon. Default false.
- * @return false|array Returns an array (url, width, height, is_intermediate), or false, if no image is available.
- */
-function wp_get_attachment_image_src( $attachment_id, $size = 'thumbnail', $icon = false ) {
-	// get a thumbnail or intermediate image if there is one
-	$image = image_downsize( $attachment_id, $size );
-	if ( ! $image ) {
-		$src = false;
-
-		if ( $icon && $src = wp_mime_type_icon( $attachment_id ) ) {
-			/** This filter is documented in wp-includes/post.php */
-			$icon_dir = apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/media' );
-
-			$src_file = $icon_dir . '/' . wp_basename( $src );
-			@list( $width, $height ) = getimagesize( $src_file );
-		}
-
-		if ( $src && $width && $height ) {
-			$image = array( $src, $width, $height );
-		}
-	}
-	/**
-	 * Filters the image src result.
-	 *
-	 * @since 4.3.0
-	 *
-	 * @param array|false  $image         Either array with src, width & height, icon src, or false.
-	 * @param int          $attachment_id Image attachment ID.
-	 * @param string|array $size          Size of image. Image size or array of width and height values
-	 *                                    (in that order). Default 'thumbnail'.
-	 * @param bool         $icon          Whether the image should be treated as an icon. Default false.
-	 */
-	return apply_filters( 'wp_get_attachment_image_src', $image, $attachment_id, $size, $icon );
-}
-
-/**
- * Get an HTML img element representing an image attachment
- *
- * While `$size` will accept an array, it is better to register a size with
- * add_image_size() so that a cropped version is generated. It's much more
- * efficient than having to find the closest-sized image and then having the
- * browser scale down the image.
- *
- * @since 2.5.0
- *
- * @param int          $attachment_id Image attachment ID.
- * @param string|array $size          Optional. Image size. Accepts any valid image size, or an array of width
- *                                    and height values in pixels (in that order). Default 'thumbnail'.
- * @param bool         $icon          Optional. Whether the image should be treated as an icon. Default false.
- * @param string|array $attr          Optional. Attributes for the image markup. Default empty.
- * @return string HTML img element or empty string on failure.
- */
-function wp_get_attachment_image($attachment_id, $size = 'thumbnail', $icon = false, $attr = '') {
-	$html = '';
-	$image = wp_get_attachment_image_src($attachment_id, $size, $icon);
-	if ( $image ) {
-		list($src, $width, $height) = $image;
-		$hwstring = image_hwstring($width, $height);
-		$size_class = $size;
-		if ( is_array( $size_class ) ) {
-			$size_class = join( 'x', $size_class );
-		}
-		$attachment = get_post($attachment_id);
-		$default_attr = array(
-			'src'	=> $src,
-			'class'	=> "attachment-$size_class size-$size_class",
-			'alt'	=> trim(strip_tags( get_post_meta($attachment_id, '_wp_attachment_image_alt', true) )), // Use Alt field first
-		);
-		if ( empty($default_attr['alt']) )
-			$default_attr['alt'] = trim(strip_tags( $attachment->post_excerpt )); // If not, Use the Caption
-		if ( empty($default_attr['alt']) )
-			$default_attr['alt'] = trim(strip_tags( $attachment->post_title )); // Finally, use the title
-
-		$attr = wp_parse_args( $attr, $default_attr );
-
-		// Generate 'srcset' and 'sizes' if not already present.
-		if ( empty( $attr['srcset'] ) ) {
-			$image_meta = wp_get_attachment_metadata( $attachment_id );
-
-			if ( is_array( $image_meta ) ) {
-				$size_array = array( absint( $width ), absint( $height ) );
-				$srcset = wp_calculate_image_srcset( $size_array, $src, $image_meta, $attachment_id );
-				$sizes = wp_calculate_image_sizes( $size_array, $src, $image_meta, $attachment_id );
-
-				if ( $srcset && ( $sizes || ! empty( $attr['sizes'] ) ) ) {
-					$attr['srcset'] = $srcset;
-
-					if ( empty( $attr['sizes'] ) ) {
-						$attr['sizes'] = $sizes;
-					}
-				}
-			}
-		}
-
-		/**
-		 * Filters the list of attachment image attributes.
-		 *
-		 * @since 2.8.0
-		 *
-		 * @param array        $attr       Attributes for the image markup.
-		 * @param WP_Post      $attachment Image attachment post.
-		 * @param string|array $size       Requested size. Image size or array of width and height values
-		 *                                 (in that order). Default 'thumbnail'.
-		 */
-		$attr = apply_filters( 'wp_get_attachment_image_attributes', $attr, $attachment, $size );
-		$attr = array_map( 'esc_attr', $attr );
-		$html = rtrim("<img $hwstring");
-		foreach ( $attr as $name => $value ) {
-			$html .= " $name=" . '"' . $value . '"';
-		}
-		$html .= ' />';
-	}
-
-	return $html;
-}
-
-/**
- * Get the URL of an image attachment.
- *
- * @since 4.4.0
- *
- * @param int          $attachment_id Image attachment ID.
- * @param string|array $size          Optional. Image size to retrieve. Accepts any valid image size, or an array
- *                                    of width and height values in pixels (in that order). Default 'thumbnail'.
- * @param bool         $icon          Optional. Whether the image should be treated as an icon. Default false.
- * @return string|false Attachment URL or false if no image is available.
- */
-function wp_get_attachment_image_url( $attachment_id, $size = 'thumbnail', $icon = false ) {
-	$image = wp_get_attachment_image_src( $attachment_id, $size, $icon );
-	return isset( $image['0'] ) ? $image['0'] : false;
-}
-
-/**
- * Get the attachment path relative to the upload directory.
- *
- * @since 4.4.1
- * @access private
- *
- * @param string $file Attachment file name.
- * @return string Attachment path relative to the upload directory.
- */
-function _wp_get_attachment_relative_path( $file ) {
-	$dirname = dirname( $file );
-
-	if ( '.' === $dirname ) {
-		return '';
-	}
-
-	if ( false !== strpos( $dirname, 'wp-content/uploads' ) ) {
-		// Get the directory name relative to the upload directory (back compat for pre-2.7 uploads)
-		$dirname = substr( $dirname, strpos( $dirname, 'wp-content/uploads' ) + 18 );
-		$dirname = ltrim( $dirname, '/' );
-	}
-
-	return $dirname;
-}
-
-/**
- * Get the image size as array from its meta data.
- *
- * Used for responsive images.
- *
- * @since 4.4.0
- * @access private
- *
- * @param string $size_name  Image size. Accepts any valid image size name ('thumbnail', 'medium', etc.).
- * @param array  $image_meta The image meta data.
- * @return array|bool Array of width and height values in pixels (in that order)
- *                    or false if the size doesn't exist.
- */
-function _wp_get_image_size_from_meta( $size_name, $image_meta ) {
-	if ( $size_name === 'full' ) {
-		return array(
-			absint( $image_meta['width'] ),
-			absint( $image_meta['height'] ),
-		);
-	} elseif ( ! empty( $image_meta['sizes'][$size_name] ) ) {
-		return array(
-			absint( $image_meta['sizes'][$size_name]['width'] ),
-			absint( $image_meta['sizes'][$size_name]['height'] ),
-		);
-	}
-
-	return false;
-}
-
-/**
- * Retrieves the value for an image attachment's 'srcset' attribute.
- *
- * @since 4.4.0
- *
- * @see wp_calculate_image_srcset()
- *
- * @param int          $attachment_id Image attachment ID.
- * @param array|string $size          Optional. Image size. Accepts any valid image size, or an array of
- *                                    width and height values in pixels (in that order). Default 'medium'.
- * @param array        $image_meta    Optional. The image meta data as returned by 'wp_get_attachment_metadata()'.
- *                                    Default null.
- * @return string|bool A 'srcset' value string or false.
- */
-function wp_get_attachment_image_srcset( $attachment_id, $size = 'medium', $image_meta = null ) {
-	if ( ! $image = wp_get_attachment_image_src( $attachment_id, $size ) ) {
-		return false;
-	}
-
-	if ( ! is_array( $image_meta ) ) {
-		$image_meta = wp_get_attachment_metadata( $attachment_id );
-	}
-
-	$image_src = $image[0];
-	$size_array = array(
-		absint( $image[1] ),
-		absint( $image[2] )
-	);
-
-	return wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attachment_id );
-}
-
-/**
- * A helper function to calculate the image sources to include in a 'srcset' attribute.
- *
- * @since 4.4.0
- *
- * @param array  $size_array    Array of width and height values in pixels (in that order).
- * @param string $image_src     The 'src' of the image.
- * @param array  $image_meta    The image meta data as returned by 'wp_get_attachment_metadata()'.
- * @param int    $attachment_id Optional. The image attachment ID to pass to the filter. Default 0.
- * @return string|bool          The 'srcset' attribute value. False on error or when only one source exists.
- */
-function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attachment_id = 0 ) {
-	/**
-	 * Let plugins pre-filter the image meta to be able to fix inconsistencies in the stored data.
-	 *
-	 * @param array  $image_meta    The image meta data as returned by 'wp_get_attachment_metadata()'.
-	 * @param array  $size_array    Array of width and height values in pixels (in that order).
-	 * @param string $image_src     The 'src' of the image.
-	 * @param int    $attachment_id The image attachment ID or 0 if not supplied.
-	 */
-	$image_meta = apply_filters( 'wp_calculate_image_srcset_meta', $image_meta, $size_array, $image_src, $attachment_id );
-
-	if ( empty( $image_meta['sizes'] ) || ! isset( $image_meta['file'] ) || strlen( $image_meta['file'] ) < 4 ) {
-		return false;
-	}
-
-	$image_sizes = $image_meta['sizes'];
-
-	// Get the width and height of the image.
-	$image_width = (int) $size_array[0];
-	$image_height = (int) $size_array[1];
-
-	// Bail early if error/no width.
-	if ( $image_width < 1 ) {
-		return false;
-	}
-
-	$image_basename = wp_basename( $image_meta['file'] );
-
-	/*
-	 * WordPress flattens animated GIFs into one frame when generating intermediate sizes.
-	 * To avoid hiding animation in user content, if src is a full size GIF, a srcset attribute is not generated.
-	 * If src is an intermediate size GIF, the full size is excluded from srcset to keep a flattened GIF from becoming animated.
-	 */
-	if ( ! isset( $image_sizes['thumbnail']['mime-type'] ) || 'image/gif' !== $image_sizes['thumbnail']['mime-type'] ) {
-		$image_sizes[] = array(
-			'width'  => $image_meta['width'],
-			'height' => $image_meta['height'],
-			'file'   => $image_basename,
-		);
-	} elseif ( strpos( $image_src, $image_meta['file'] ) ) {
-		return false;
-	}
-
-	// Retrieve the uploads sub-directory from the full size image.
-	$dirname = _wp_get_attachment_relative_path( $image_meta['file'] );
-
-	if ( $dirname ) {
-		$dirname = trailingslashit( $dirname );
-	}
-
-	$upload_dir = wp_get_upload_dir();
-	$image_baseurl = trailingslashit( $upload_dir['baseurl'] ) . $dirname;
-
-	/*
-	 * If currently on HTTPS, prefer HTTPS URLs when we know they're supported by the domain
-	 * (which is to say, when they share the domain name of the current request).
-	 */
-	if ( is_ssl() && 'https' !== substr( $image_baseurl, 0, 5 ) && parse_url( $image_baseurl, PHP_URL_HOST ) === $_SERVER['HTTP_HOST'] ) {
-		$image_baseurl = set_url_scheme( $image_baseurl, 'https' );
-	}
-
-	/*
-	 * Images that have been edited in WordPress after being uploaded will
-	 * contain a unique hash. Look for that hash and use it later to filter
-	 * out images that are leftovers from previous versions.
-	 */
-	$image_edited = preg_match( '/-e[0-9]{13}/', wp_basename( $image_src ), $image_edit_hash );
-
-	/**
-	 * Filters the maximum image width to be included in a 'srcset' attribute.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param int   $max_width  The maximum image width to be included in the 'srcset'. Default '1600'.
-	 * @param array $size_array Array of width and height values in pixels (in that order).
-	 */
-	$max_srcset_image_width = apply_filters( 'max_srcset_image_width', 1600, $size_array );
-
-	// Array to hold URL candidates.
-	$sources = array();
-
-	/**
-	 * To make sure the ID matches our image src, we will check to see if any sizes in our attachment
-	 * meta match our $image_src. If no matches are found we don't return a srcset to avoid serving
-	 * an incorrect image. See #35045.
-	 */
-	$src_matched = false;
-
-	/*
-	 * Loop through available images. Only use images that are resized
-	 * versions of the same edit.
-	 */
-	foreach ( $image_sizes as $image ) {
-		$is_src = false;
-
-		// Check if image meta isn't corrupted.
-		if ( ! is_array( $image ) ) {
-			continue;
-		}
-
-		// If the file name is part of the `src`, we've confirmed a match.
-		if ( ! $src_matched && false !== strpos( $image_src, $dirname . $image['file'] ) ) {
-			$src_matched = $is_src = true;
-		}
-
-		// Filter out images that are from previous edits.
-		if ( $image_edited && ! strpos( $image['file'], $image_edit_hash[0] ) ) {
-			continue;
-		}
-
-		/*
-		 * Filters out images that are wider than '$max_srcset_image_width' unless
-		 * that file is in the 'src' attribute.
-		 */
-		if ( $max_srcset_image_width && $image['width'] > $max_srcset_image_width && ! $is_src ) {
-			continue;
-		}
-
-		// If the image dimensions are within 1px of the expected size, use it.
-		if ( wp_image_matches_ratio( $image_width, $image_height, $image['width'], $image['height'] ) ) {
-			// Add the URL, descriptor, and value to the sources array to be returned.
-			$source = array(
-				'url'        => $image_baseurl . $image['file'],
-				'descriptor' => 'w',
-				'value'      => $image['width'],
-			);
-
-			// The 'src' image has to be the first in the 'srcset', because of a bug in iOS8. See #35030.
-			if ( $is_src ) {
-				$sources = array( $image['width'] => $source ) + $sources;
-			} else {
-				$sources[ $image['width'] ] = $source;
-			}
-		}
-	}
-
-	/**
-	 * Filters an image's 'srcset' sources.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param array  $sources {
-	 *     One or more arrays of source data to include in the 'srcset'.
-	 *
-	 *     @type array $width {
-	 *         @type string $url        The URL of an image source.
-	 *         @type string $descriptor The descriptor type used in the image candidate string,
-	 *                                  either 'w' or 'x'.
-	 *         @type int    $value      The source width if paired with a 'w' descriptor, or a
-	 *                                  pixel density value if paired with an 'x' descriptor.
-	 *     }
-	 * }
-	 * @param array  $size_array    Array of width and height values in pixels (in that order).
-	 * @param string $image_src     The 'src' of the image.
-	 * @param array  $image_meta    The image meta data as returned by 'wp_get_attachment_metadata()'.
-	 * @param int    $attachment_id Image attachment ID or 0.
-	 */
-	$sources = apply_filters( 'wp_calculate_image_srcset', $sources, $size_array, $image_src, $image_meta, $attachment_id );
-
-	// Only return a 'srcset' value if there is more than one source.
-	if ( ! $src_matched || count( $sources ) < 2 ) {
-		return false;
-	}
-
-	$srcset = '';
-
-	foreach ( $sources as $source ) {
-		$srcset .= str_replace( ' ', '%20', $source['url'] ) . ' ' . $source['value'] . $source['descriptor'] . ', ';
-	}
-
-	return rtrim( $srcset, ', ' );
-}
-
-/**
- * Retrieves the value for an image attachment's 'sizes' attribute.
- *
- * @since 4.4.0
- *
- * @see wp_calculate_image_sizes()
- *
- * @param int          $attachment_id Image attachment ID.
- * @param array|string $size          Optional. Image size. Accepts any valid image size, or an array of width
- *                                    and height values in pixels (in that order). Default 'medium'.
- * @param array        $image_meta    Optional. The image meta data as returned by 'wp_get_attachment_metadata()'.
- *                                    Default null.
- * @return string|bool A valid source size value for use in a 'sizes' attribute or false.
- */
-function wp_get_attachment_image_sizes( $attachment_id, $size = 'medium', $image_meta = null ) {
-	if ( ! $image = wp_get_attachment_image_src( $attachment_id, $size ) ) {
-		return false;
-	}
-
-	if ( ! is_array( $image_meta ) ) {
-		$image_meta = wp_get_attachment_metadata( $attachment_id );
-	}
-
-	$image_src = $image[0];
-	$size_array = array(
-		absint( $image[1] ),
-		absint( $image[2] )
-	);
-
-	return wp_calculate_image_sizes( $size_array, $image_src, $image_meta, $attachment_id );
-}
-
-/**
- * Creates a 'sizes' attribute value for an image.
- *
- * @since 4.4.0
- *
- * @param array|string $size          Image size to retrieve. Accepts any valid image size, or an array
- *                                    of width and height values in pixels (in that order). Default 'medium'.
- * @param string       $image_src     Optional. The URL to the image file. Default null.
- * @param array        $image_meta    Optional. The image meta data as returned by 'wp_get_attachment_metadata()'.
- *                                    Default null.
- * @param int          $attachment_id Optional. Image attachment ID. Either `$image_meta` or `$attachment_id`
- *                                    is needed when using the image size name as argument for `$size`. Default 0.
- * @return string|bool A valid source size value for use in a 'sizes' attribute or false.
- */
-function wp_calculate_image_sizes( $size, $image_src = null, $image_meta = null, $attachment_id = 0 ) {
-	$width = 0;
-
-	if ( is_array( $size ) ) {
-		$width = absint( $size[0] );
-	} elseif ( is_string( $size ) ) {
-		if ( ! $image_meta && $attachment_id ) {
-			$image_meta = wp_get_attachment_metadata( $attachment_id );
-		}
-
-		if ( is_array( $image_meta ) ) {
-			$size_array = _wp_get_image_size_from_meta( $size, $image_meta );
-			if ( $size_array ) {
-				$width = absint( $size_array[0] );
-			}
-		}
-	}
-
-	if ( ! $width ) {
-		return false;
-	}
-
-	// Setup the default 'sizes' attribute.
-	$sizes = sprintf( '(max-width: %1$dpx) 100vw, %1$dpx', $width );
-
-	/**
-	 * Filters the output of 'wp_calculate_image_sizes()'.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param string       $sizes         A source size value for use in a 'sizes' attribute.
-	 * @param array|string $size          Requested size. Image size or array of width and height values
-	 *                                    in pixels (in that order).
-	 * @param string|null  $image_src     The URL to the image file or null.
-	 * @param array|null   $image_meta    The image meta data as returned by wp_get_attachment_metadata() or null.
-	 * @param int          $attachment_id Image attachment ID of the original image or 0.
-	 */
-	return apply_filters( 'wp_calculate_image_sizes', $sizes, $size, $image_src, $image_meta, $attachment_id );
-}
-
-/**
- * Filters 'img' elements in post content to add 'srcset' and 'sizes' attributes.
- *
- * @since 4.4.0
- *
- * @see wp_image_add_srcset_and_sizes()
- *
- * @param string $content The raw post content to be filtered.
- * @return string Converted content with 'srcset' and 'sizes' attributes added to images.
- */
-function wp_make_content_images_responsive( $content ) {
-	if ( ! preg_match_all( '/<img [^>]+>/', $content, $matches ) ) {
-		return $content;
-	}
-
-	$selected_images = $attachment_ids = array();
-
-	foreach( $matches[0] as $image ) {
-		if ( false === strpos( $image, ' srcset=' ) && preg_match( '/wp-image-([0-9]+)/i', $image, $class_id ) &&
-			( $attachment_id = absint( $class_id[1] ) ) ) {
-
-			/*
-			 * If exactly the same image tag is used more than once, overwrite it.
-			 * All identical tags will be replaced later with 'str_replace()'.
-			 */
-			$selected_images[ $image ] = $attachment_id;
-			// Overwrite the ID when the same image is included more than once.
-			$attachment_ids[ $attachment_id ] = true;
-		}
-	}
-
-	if ( count( $attachment_ids ) > 1 ) {
-		/*
-		 * Warm object cache for use with 'get_post_meta()'.
-		 *
-		 * To avoid making a database call for each image, a single query
-		 * warms the object cache with the meta information for all images.
-		 */
-		update_meta_cache( 'post', array_keys( $attachment_ids ) );
-	}
-
-	foreach ( $selected_images as $image => $attachment_id ) {
-		$image_meta = wp_get_attachment_metadata( $attachment_id );
-		$content = str_replace( $image, wp_image_add_srcset_and_sizes( $image, $image_meta, $attachment_id ), $content );
-	}
-
-	return $content;
-}
-
-/**
- * Adds 'srcset' and 'sizes' attributes to an existing 'img' element.
- *
- * @since 4.4.0
- *
- * @see wp_calculate_image_srcset()
- * @see wp_calculate_image_sizes()
- *
- * @param string $image         An HTML 'img' element to be filtered.
- * @param array  $image_meta    The image meta data as returned by 'wp_get_attachment_metadata()'.
- * @param int    $attachment_id Image attachment ID.
- * @return string Converted 'img' element with 'srcset' and 'sizes' attributes added.
- */
-function wp_image_add_srcset_and_sizes( $image, $image_meta, $attachment_id ) {
-	// Ensure the image meta exists.
-	if ( empty( $image_meta['sizes'] ) ) {
-		return $image;
-	}
-
-	$image_src = preg_match( '/src="([^"]+)"/', $image, $match_src ) ? $match_src[1] : '';
-	list( $image_src ) = explode( '?', $image_src );
-
-	// Return early if we couldn't get the image source.
-	if ( ! $image_src ) {
-		return $image;
-	}
-
-	// Bail early if an image has been inserted and later edited.
-	if ( preg_match( '/-e[0-9]{13}/', $image_meta['file'], $img_edit_hash ) &&
-		strpos( wp_basename( $image_src ), $img_edit_hash[0] ) === false ) {
-
-		return $image;
-	}
-
-	$width  = preg_match( '/ width="([0-9]+)"/',  $image, $match_width  ) ? (int) $match_width[1]  : 0;
-	$height = preg_match( '/ height="([0-9]+)"/', $image, $match_height ) ? (int) $match_height[1] : 0;
-
-	if ( ! $width || ! $height ) {
-		/*
-		 * If attempts to parse the size value failed, attempt to use the image meta data to match
-		 * the image file name from 'src' against the available sizes for an attachment.
-		 */
-		$image_filename = wp_basename( $image_src );
-
-		if ( $image_filename === wp_basename( $image_meta['file'] ) ) {
-			$width = (int) $image_meta['width'];
-			$height = (int) $image_meta['height'];
-		} else {
-			foreach( $image_meta['sizes'] as $image_size_data ) {
-				if ( $image_filename === $image_size_data['file'] ) {
-					$width = (int) $image_size_data['width'];
-					$height = (int) $image_size_data['height'];
-					break;
-				}
-			}
-		}
-	}
-
-	if ( ! $width || ! $height ) {
-		return $image;
-	}
-
-	$size_array = array( $width, $height );
-	$srcset = wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attachment_id );
-
-	if ( $srcset ) {
-		// Check if there is already a 'sizes' attribute.
-		$sizes = strpos( $image, ' sizes=' );
-
-		if ( ! $sizes ) {
-			$sizes = wp_calculate_image_sizes( $size_array, $image_src, $image_meta, $attachment_id );
-		}
-	}
-
-	if ( $srcset && $sizes ) {
-		// Format the 'srcset' and 'sizes' string and escape attributes.
-		$attr = sprintf( ' srcset="%s"', esc_attr( $srcset ) );
-
-		if ( is_string( $sizes ) ) {
-			$attr .= sprintf( ' sizes="%s"', esc_attr( $sizes ) );
-		}
-
-		// Add 'srcset' and 'sizes' attributes to the image markup.
-		$image = preg_replace( '/<img ([^>]+?)[\/ ]*>/', '<img $1' . $attr . ' />', $image );
-	}
-
-	return $image;
-}
-
-/**
- * Adds a 'wp-post-image' class to post thumbnails. Internal use only.
- *
- * Uses the {@see 'begin_fetch_post_thumbnail_html'} and {@see 'end_fetch_post_thumbnail_html'}
- * action hooks to dynamically add/remove itself so as to only filter post thumbnails.
- *
- * @ignore
- * @since 2.9.0
- *
- * @param array $attr Thumbnail attributes including src, class, alt, title.
- * @return array Modified array of attributes including the new 'wp-post-image' class.
- */
-function _wp_post_thumbnail_class_filter( $attr ) {
-	$attr['class'] .= ' wp-post-image';
-	return $attr;
-}
-
-/**
- * Adds '_wp_post_thumbnail_class_filter' callback to the 'wp_get_attachment_image_attributes'
- * filter hook. Internal use only.
- *
- * @ignore
- * @since 2.9.0
- *
- * @param array $attr Thumbnail attributes including src, class, alt, title.
- */
-function _wp_post_thumbnail_class_filter_add( $attr ) {
-	add_filter( 'wp_get_attachment_image_attributes', '_wp_post_thumbnail_class_filter' );
-}
-
-/**
- * Removes the '_wp_post_thumbnail_class_filter' callback from the 'wp_get_attachment_image_attributes'
- * filter hook. Internal use only.
- *
- * @ignore
- * @since 2.9.0
- *
- * @param array $attr Thumbnail attributes including src, class, alt, title.
- */
-function _wp_post_thumbnail_class_filter_remove( $attr ) {
-	remove_filter( 'wp_get_attachment_image_attributes', '_wp_post_thumbnail_class_filter' );
-}
-
-add_shortcode('wp_caption', 'img_caption_shortcode');
-add_shortcode('caption', 'img_caption_shortcode');
-
-/**
- * Builds the Caption shortcode output.
- *
- * Allows a plugin to replace the content that would otherwise be returned. The
- * filter is {@see 'img_caption_shortcode'} and passes an empty string, the attr
- * parameter and the content parameter values.
- *
- * The supported attributes for the shortcode are 'id', 'align', 'width', and
- * 'caption'.
- *
- * @since 2.6.0
- *
- * @param array  $attr {
- *     Attributes of the caption shortcode.
- *
- *     @type string $id      ID of the div element for the caption.
- *     @type string $align   Class name that aligns the caption. Default 'alignnone'. Accepts 'alignleft',
- *                           'aligncenter', alignright', 'alignnone'.
- *     @type int    $width   The width of the caption, in pixels.
- *     @type string $caption The caption text.
- *     @type string $class   Additional class name(s) added to the caption container.
- * }
- * @param string $content Shortcode content.
- * @return string HTML content to display the caption.
- */
-function img_caption_shortcode( $attr, $content = null ) {
-	// New-style shortcode with the caption inside the shortcode with the link and image tags.
-	if ( ! isset( $attr['caption'] ) ) {
-		if ( preg_match( '#((?:<a [^>]+>\s*)?<img [^>]+>(?:\s*</a>)?)(.*)#is', $content, $matches ) ) {
-			$content = $matches[1];
-			$attr['caption'] = trim( $matches[2] );
-		}
-	} elseif ( strpos( $attr['caption'], '<' ) !== false ) {
-		$attr['caption'] = wp_kses( $attr['caption'], 'post' );
-	}
-
-	/**
-	 * Filters the default caption shortcode output.
-	 *
-	 * If the filtered output isn't empty, it will be used instead of generating
-	 * the default caption template.
-	 *
-	 * @since 2.6.0
-	 *
-	 * @see img_caption_shortcode()
-	 *
-	 * @param string $output  The caption output. Default empty.
-	 * @param array  $attr    Attributes of the caption shortcode.
-	 * @param string $content The image element, possibly wrapped in a hyperlink.
-	 */
-	$output = apply_filters( 'img_caption_shortcode', '', $attr, $content );
-	if ( $output != '' )
-		return $output;
-
-	$atts = shortcode_atts( array(
-		'id'	  => '',
-		'align'	  => 'alignnone',
-		'width'	  => '',
-		'caption' => '',
-		'class'   => '',
-	), $attr, 'caption' );
-
-	$atts['width'] = (int) $atts['width'];
-	if ( $atts['width'] < 1 || empty( $atts['caption'] ) )
-		return $content;
-
-	if ( ! empty( $atts['id'] ) )
-		$atts['id'] = 'id="' . esc_attr( sanitize_html_class( $atts['id'] ) ) . '" ';
-
-	$class = trim( 'wp-caption ' . $atts['align'] . ' ' . $atts['class'] );
-
-	$html5 = current_theme_supports( 'html5', 'caption' );
-	// HTML5 captions never added the extra 10px to the image width
-	$width = $html5 ? $atts['width'] : ( 10 + $atts['width'] );
-
-	/**
-	 * Filters the width of an image's caption.
-	 *
-	 * By default, the caption is 10 pixels greater than the width of the image,
-	 * to prevent post content from running up against a floated image.
-	 *
-	 * @since 3.7.0
-	 *
-	 * @see img_caption_shortcode()
-	 *
-	 * @param int    $width    Width of the caption in pixels. To remove this inline style,
-	 *                         return zero.
-	 * @param array  $atts     Attributes of the caption shortcode.
-	 * @param string $content  The image element, possibly wrapped in a hyperlink.
-	 */
-	$caption_width = apply_filters( 'img_caption_shortcode_width', $width, $atts, $content );
-
-	$style = '';
-	if ( $caption_width ) {
-		$style = 'style="width: ' . (int) $caption_width . 'px" ';
-	}
-
-	if ( $html5 ) {
-		$html = '<figure ' . $atts['id'] . $style . 'class="' . esc_attr( $class ) . '">'
-		. do_shortcode( $content ) . '<figcaption class="wp-caption-text">' . $atts['caption'] . '</figcaption></figure>';
-	} else {
-		$html = '<div ' . $atts['id'] . $style . 'class="' . esc_attr( $class ) . '">'
-		. do_shortcode( $content ) . '<p class="wp-caption-text">' . $atts['caption'] . '</p></div>';
-	}
-
-	return $html;
-}
-
-add_shortcode('gallery', 'gallery_shortcode');
-
-/**
- * Builds the Gallery shortcode output.
- *
- * This implements the functionality of the Gallery Shortcode for displaying
- * WordPress images on a post.
- *
- * @since 2.5.0
- *
- * @staticvar int $instance
- *
- * @param array $attr {
- *     Attributes of the gallery shortcode.
- *
- *     @type string       $order      Order of the images in the gallery. Default 'ASC'. Accepts 'ASC', 'DESC'.
- *     @type string       $orderby    The field to use when ordering the images. Default 'menu_order ID'.
- *                                    Accepts any valid SQL ORDERBY statement.
- *     @type int          $id         Post ID.
- *     @type string       $itemtag    HTML tag to use for each image in the gallery.
- *                                    Default 'dl', or 'figure' when the theme registers HTML5 gallery support.
- *     @type string       $icontag    HTML tag to use for each image's icon.
- *                                    Default 'dt', or 'div' when the theme registers HTML5 gallery support.
- *     @type string       $captiontag HTML tag to use for each image's caption.
- *                                    Default 'dd', or 'figcaption' when the theme registers HTML5 gallery support.
- *     @type int          $columns    Number of columns of images to display. Default 3.
- *     @type string|array $size       Size of the images to display. Accepts any valid image size, or an array of width
- *                                    and height values in pixels (in that order). Default 'thumbnail'.
- *     @type string       $ids        A comma-separated list of IDs of attachments to display. Default empty.
- *     @type string       $include    A comma-separated list of IDs of attachments to include. Default empty.
- *     @type string       $exclude    A comma-separated list of IDs of attachments to exclude. Default empty.
- *     @type string       $link       What to link each image to. Default empty (links to the attachment page).
- *                                    Accepts 'file', 'none'.
- * }
- * @return string HTML content to display gallery.
- */
-function gallery_shortcode( $attr ) {
-	$post = get_post();
-
-	static $instance = 0;
-	$instance++;
-
-	if ( ! empty( $attr['ids'] ) ) {
-		// 'ids' is explicitly ordered, unless you specify otherwise.
-		if ( empty( $attr['orderby'] ) ) {
-			$attr['orderby'] = 'post__in';
-		}
-		$attr['include'] = $attr['ids'];
-	}
-
-	/**
-	 * Filters the default gallery shortcode output.
-	 *
-	 * If the filtered output isn't empty, it will be used instead of generating
-	 * the default gallery template.
-	 *
-	 * @since 2.5.0
-	 * @since 4.2.0 The `$instance` parameter was added.
-	 *
-	 * @see gallery_shortcode()
-	 *
-	 * @param string $output   The gallery output. Default empty.
-	 * @param array  $attr     Attributes of the gallery shortcode.
-	 * @param int    $instance Unique numeric ID of this gallery shortcode instance.
-	 */
-	$output = apply_filters( 'post_gallery', '', $attr, $instance );
-	if ( $output != '' ) {
-		return $output;
-	}
-
-	$html5 = current_theme_supports( 'html5', 'gallery' );
-	$atts = shortcode_atts( array(
-		'order'      => 'ASC',
-		'orderby'    => 'menu_order ID',
-		'id'         => $post ? $post->ID : 0,
-		'itemtag'    => $html5 ? 'figure'     : 'dl',
-		'icontag'    => $html5 ? 'div'        : 'dt',
-		'captiontag' => $html5 ? 'figcaption' : 'dd',
-		'columns'    => 3,
-		'size'       => 'thumbnail',
-		'include'    => '',
-		'exclude'    => '',
-		'link'       => ''
-	), $attr, 'gallery' );
-
-	$id = intval( $atts['id'] );
-
-	if ( ! empty( $atts['include'] ) ) {
-		$_attachments = get_posts( array( 'include' => $atts['include'], 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $atts['order'], 'orderby' => $atts['orderby'] ) );
-
-		$attachments = array();
-		foreach ( $_attachments as $key => $val ) {
-			$attachments[$val->ID] = $_attachments[$key];
-		}
-	} elseif ( ! empty( $atts['exclude'] ) ) {
-		$attachments = get_children( array( 'post_parent' => $id, 'exclude' => $atts['exclude'], 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $atts['order'], 'orderby' => $atts['orderby'] ) );
-	} else {
-		$attachments = get_children( array( 'post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $atts['order'], 'orderby' => $atts['orderby'] ) );
-	}
-
-	if ( empty( $attachments ) ) {
-		return '';
-	}
-
-	if ( is_feed() ) {
-		$output = "\n";
-		foreach ( $attachments as $att_id => $attachment ) {
-			$output .= wp_get_attachment_link( $att_id, $atts['size'], true ) . "\n";
-		}
-		return $output;
-	}
-
-	$itemtag = tag_escape( $atts['itemtag'] );
-	$captiontag = tag_escape( $atts['captiontag'] );
-	$icontag = tag_escape( $atts['icontag'] );
-	$valid_tags = wp_kses_allowed_html( 'post' );
-	if ( ! isset( $valid_tags[ $itemtag ] ) ) {
-		$itemtag = 'dl';
-	}
-	if ( ! isset( $valid_tags[ $captiontag ] ) ) {
-		$captiontag = 'dd';
-	}
-	if ( ! isset( $valid_tags[ $icontag ] ) ) {
-		$icontag = 'dt';
-	}
-
-	$columns = intval( $atts['columns'] );
-	$itemwidth = $columns > 0 ? floor(100/$columns) : 100;
-	$float = is_rtl() ? 'right' : 'left';
-
-	$selector = "gallery-{$instance}";
-
-	$gallery_style = '';
-
-	/**
-	 * Filters whether to print default gallery styles.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param bool $print Whether to print default gallery styles.
-	 *                    Defaults to false if the theme supports HTML5 galleries.
-	 *                    Otherwise, defaults to true.
-	 */
-	if ( apply_filters( 'use_default_gallery_style', ! $html5 ) ) {
-		$gallery_style = "
-		<style type='text/css'>
-			#{$selector} {
-				margin: auto;
-			}
-			#{$selector} .gallery-item {
-				float: {$float};
-				margin-top: 10px;
-				text-align: center;
-				width: {$itemwidth}%;
-			}
-			#{$selector} img {
-				border: 2px solid #cfcfcf;
-			}
-			#{$selector} .gallery-caption {
-				margin-left: 0;
-			}
-			/* see gallery_shortcode() in wp-includes/media.php */
-		</style>\n\t\t";
-	}
-
-	$size_class = sanitize_html_class( $atts['size'] );
-	$gallery_div = "<div id='$selector' class='gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class}'>";
-
-	/**
-	 * Filters the default gallery shortcode CSS styles.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param string $gallery_style Default CSS styles and opening HTML div container
-	 *                              for the gallery shortcode output.
-	 */
-	$output = apply_filters( 'gallery_style', $gallery_style . $gallery_div );
-
-	$i = 0;
-	foreach ( $attachments as $id => $attachment ) {
-
-		$attr = ( trim( $attachment->post_excerpt ) ) ? array( 'aria-describedby' => "$selector-$id" ) : '';
-		if ( ! empty( $atts['link'] ) && 'file' === $atts['link'] ) {
-			$image_output = wp_get_attachment_link( $id, $atts['size'], false, false, false, $attr );
-		} elseif ( ! empty( $atts['link'] ) && 'none' === $atts['link'] ) {
-			$image_output = wp_get_attachment_image( $id, $atts['size'], false, $attr );
-		} else {
-			$image_output = wp_get_attachment_link( $id, $atts['size'], true, false, false, $attr );
-		}
-		$image_meta  = wp_get_attachment_metadata( $id );
-
-		$orientation = '';
-		if ( isset( $image_meta['height'], $image_meta['width'] ) ) {
-			$orientation = ( $image_meta['height'] > $image_meta['width'] ) ? 'portrait' : 'landscape';
-		}
-		$output .= "<{$itemtag} class='gallery-item'>";
-		$output .= "
-			<{$icontag} class='gallery-icon {$orientation}'>
-				$image_output
-			</{$icontag}>";
-		if ( $captiontag && trim($attachment->post_excerpt) ) {
-			$output .= "
-				<{$captiontag} class='wp-caption-text gallery-caption' id='$selector-$id'>
-				" . wptexturize($attachment->post_excerpt) . "
-				</{$captiontag}>";
-		}
-		$output .= "</{$itemtag}>";
-		if ( ! $html5 && $columns > 0 && ++$i % $columns == 0 ) {
-			$output .= '<br style="clear: both" />';
-		}
-	}
-
-	if ( ! $html5 && $columns > 0 && $i % $columns !== 0 ) {
-		$output .= "
-			<br style='clear: both' />";
-	}
-
-	$output .= "
-		</div>\n";
-
-	return $output;
-}
-
-/**
- * Outputs the templates used by playlists.
- *
- * @since 3.9.0
- */
-function wp_underscore_playlist_templates() {
-?>
-<script type="text/html" id="tmpl-wp-playlist-current-item">
-	<# if ( data.image ) { #>
-	<img src="{{ data.thumb.src }}" alt="" />
-	<# } #>
-	<div class="wp-playlist-caption">
-		<span class="wp-playlist-item-meta wp-playlist-item-title"><?php
-			/* translators: playlist item title */
-			printf( _x( '&#8220;%s&#8221;', 'playlist item title' ), '{{ data.title }}' );
-		?></span>
-		<# if ( data.meta.album ) { #><span class="wp-playlist-item-meta wp-playlist-item-album">{{ data.meta.album }}</span><# } #>
-		<# if ( data.meta.artist ) { #><span class="wp-playlist-item-meta wp-playlist-item-artist">{{ data.meta.artist }}</span><# } #>
-	</div>
-</script>
-<script type="text/html" id="tmpl-wp-playlist-item">
-	<div class="wp-playlist-item">
-		<a class="wp-playlist-caption" href="{{ data.src }}">
-			{{ data.index ? ( data.index + '. ' ) : '' }}
-			<# if ( data.caption ) { #>
-				{{ data.caption }}
-			<# } else { #>
-				<span class="wp-playlist-item-title"><?php
-					/* translators: playlist item title */
-					printf( _x( '&#8220;%s&#8221;', 'playlist item title' ), '{{{ data.title }}}' );
-				?></span>
-				<# if ( data.artists && data.meta.artist ) { #>
-				<span class="wp-playlist-item-artist"> &mdash; {{ data.meta.artist }}</span>
-				<# } #>
-			<# } #>
-		</a>
-		<# if ( data.meta.length_formatted ) { #>
-		<div class="wp-playlist-item-length">{{ data.meta.length_formatted }}</div>
-		<# } #>
-	</div>
-</script>
-<?php
-}
-
-/**
- * Outputs and enqueue default scripts and styles for playlists.
- *
- * @since 3.9.0
- *
- * @param string $type Type of playlist. Accepts 'audio' or 'video'.
- */
-function wp_playlist_scripts( $type ) {
-	wp_enqueue_style( 'wp-mediaelement' );
-	wp_enqueue_script( 'wp-playlist' );
-?>
-<!--[if lt IE 9]><script>document.createElement('<?php echo esc_js( $type ) ?>');</script><![endif]-->
-<?php
-	add_action( 'wp_footer', 'wp_underscore_playlist_templates', 0 );
-	add_action( 'admin_footer', 'wp_underscore_playlist_templates', 0 );
-}
-
-/**
- * Builds the Playlist shortcode output.
- *
- * This implements the functionality of the playlist shortcode for displaying
- * a collection of WordPress audio or video files in a post.
- *
- * @since 3.9.0
- *
- * @global int $content_width
- * @staticvar int $instance
- *
- * @param array $attr {
- *     Array of default playlist attributes.
- *
- *     @type string  $type         Type of playlist to display. Accepts 'audio' or 'video'. Default 'audio'.
- *     @type string  $order        Designates ascending or descending order of items in the playlist.
- *                                 Accepts 'ASC', 'DESC'. Default 'ASC'.
- *     @type string  $orderby      Any column, or columns, to sort the playlist. If $ids are
- *                                 passed, this defaults to the order of the $ids array ('post__in').
- *                                 Otherwise default is 'menu_order ID'.
- *     @type int     $id           If an explicit $ids array is not present, this parameter
- *                                 will determine which attachments are used for the playlist.
- *                                 Default is the current post ID.
- *     @type array   $ids          Create a playlist out of these explicit attachment IDs. If empty,
- *                                 a playlist will be created from all $type attachments of $id.
- *                                 Default empty.
- *     @type array   $exclude      List of specific attachment IDs to exclude from the playlist. Default empty.
- *     @type string  $style        Playlist style to use. Accepts 'light' or 'dark'. Default 'light'.
- *     @type bool    $tracklist    Whether to show or hide the playlist. Default true.
- *     @type bool    $tracknumbers Whether to show or hide the numbers next to entries in the playlist. Default true.
- *     @type bool    $images       Show or hide the video or audio thumbnail (Featured Image/post
- *                                 thumbnail). Default true.
- *     @type bool    $artists      Whether to show or hide artist name in the playlist. Default true.
- * }
- *
- * @return string Playlist output. Empty string if the passed type is unsupported.
- */
-function wp_playlist_shortcode( $attr ) {
-	global $content_width;
-	$post = get_post();
-
-	static $instance = 0;
-	$instance++;
-
-	if ( ! empty( $attr['ids'] ) ) {
-		// 'ids' is explicitly ordered, unless you specify otherwise.
-		if ( empty( $attr['orderby'] ) ) {
-			$attr['orderby'] = 'post__in';
-		}
-		$attr['include'] = $attr['ids'];
-	}
-
-	/**
-	 * Filters the playlist output.
-	 *
-	 * Passing a non-empty value to the filter will short-circuit generation
-	 * of the default playlist output, returning the passed value instead.
-	 *
-	 * @since 3.9.0
-	 * @since 4.2.0 The `$instance` parameter was added.
-	 *
-	 * @param string $output   Playlist output. Default empty.
-	 * @param array  $attr     An array of shortcode attributes.
-	 * @param int    $instance Unique numeric ID of this playlist shortcode instance.
-	 */
-	$output = apply_filters( 'post_playlist', '', $attr, $instance );
-	if ( $output != '' ) {
-		return $output;
-	}
-
-	$atts = shortcode_atts( array(
-		'type'		=> 'audio',
-		'order'		=> 'ASC',
-		'orderby'	=> 'menu_order ID',
-		'id'		=> $post ? $post->ID : 0,
-		'include'	=> '',
-		'exclude'   => '',
-		'style'		=> 'light',
-		'tracklist' => true,
-		'tracknumbers' => true,
-		'images'	=> true,
-		'artists'	=> true
-	), $attr, 'playlist' );
-
-	$id = intval( $atts['id'] );
-
-	if ( $atts['type'] !== 'audio' ) {
-		$atts['type'] = 'video';
-	}
-
-	$args = array(
-		'post_status' => 'inherit',
-		'post_type' => 'attachment',
-		'post_mime_type' => $atts['type'],
-		'order' => $atts['order'],
-		'orderby' => $atts['orderby']
-	);
-
-	if ( ! empty( $atts['include'] ) ) {
-		$args['include'] = $atts['include'];
-		$_attachments = get_posts( $args );
-
-		$attachments = array();
-		foreach ( $_attachments as $key => $val ) {
-			$attachments[$val->ID] = $_attachments[$key];
-		}
-	} elseif ( ! empty( $atts['exclude'] ) ) {
-		$args['post_parent'] = $id;
-		$args['exclude'] = $atts['exclude'];
-		$attachments = get_children( $args );
-	} else {
-		$args['post_parent'] = $id;
-		$attachments = get_children( $args );
-	}
-
-	if ( empty( $attachments ) ) {
-		return '';
-	}
-
-	if ( is_feed() ) {
-		$output = "\n";
-		foreach ( $attachments as $att_id => $attachment ) {
-			$output .= wp_get_attachment_link( $att_id ) . "\n";
-		}
-		return $output;
-	}
-
-	$outer = 22; // default padding and border of wrapper
-
-	$default_width = 640;
-	$default_height = 360;
-
-	$theme_width = empty( $content_width ) ? $default_width : ( $content_width - $outer );
-	$theme_height = empty( $content_width ) ? $default_height : round( ( $default_height * $theme_width ) / $default_width );
-
-	$data = array(
-		'type' => $atts['type'],
-		// don't pass strings to JSON, will be truthy in JS
-		'tracklist' => wp_validate_boolean( $atts['tracklist'] ),
-		'tracknumbers' => wp_validate_boolean( $atts['tracknumbers'] ),
-		'images' => wp_validate_boolean( $atts['images'] ),
-		'artists' => wp_validate_boolean( $atts['artists'] ),
-	);
-
-	$tracks = array();
-	foreach ( $attachments as $attachment ) {
-		$url = wp_get_attachment_url( $attachment->ID );
-		$ftype = wp_check_filetype( $url, wp_get_mime_types() );
-		$track = array(
-			'src' => $url,
-			'type' => $ftype['type'],
-			'title' => $attachment->post_title,
-			'caption' => $attachment->post_excerpt,
-			'description' => $attachment->post_content
-		);
-
-		$track['meta'] = array();
-		$meta = wp_get_attachment_metadata( $attachment->ID );
-		if ( ! empty( $meta ) ) {
-
-			foreach ( wp_get_attachment_id3_keys( $attachment ) as $key => $label ) {
-				if ( ! empty( $meta[ $key ] ) ) {
-					$track['meta'][ $key ] = $meta[ $key ];
-				}
-			}
-
-			if ( 'video' === $atts['type'] ) {
-				if ( ! empty( $meta['width'] ) && ! empty( $meta['height'] ) ) {
-					$width = $meta['width'];
-					$height = $meta['height'];
-					$theme_height = round( ( $height * $theme_width ) / $width );
-				} else {
-					$width = $default_width;
-					$height = $default_height;
-				}
-
-				$track['dimensions'] = array(
-					'original' => compact( 'width', 'height' ),
-					'resized' => array(
-						'width' => $theme_width,
-						'height' => $theme_height
-					)
-				);
-			}
-		}
-
-		if ( $atts['images'] ) {
-			$thumb_id = get_post_thumbnail_id( $attachment->ID );
-			if ( ! empty( $thumb_id ) ) {
-				list( $src, $width, $height ) = wp_get_attachment_image_src( $thumb_id, 'full' );
-				$track['image'] = compact( 'src', 'width', 'height' );
-				list( $src, $width, $height ) = wp_get_attachment_image_src( $thumb_id, 'thumbnail' );
-				$track['thumb'] = compact( 'src', 'width', 'height' );
-			} else {
-				$src = wp_mime_type_icon( $attachment->ID );
-				$width = 48;
-				$height = 64;
-				$track['image'] = compact( 'src', 'width', 'height' );
-				$track['thumb'] = compact( 'src', 'width', 'height' );
-			}
-		}
-
-		$tracks[] = $track;
-	}
-	$data['tracks'] = $tracks;
-
-	$safe_type = esc_attr( $atts['type'] );
-	$safe_style = esc_attr( $atts['style'] );
-
-	ob_start();
-
-	if ( 1 === $instance ) {
-		/**
-		 * Prints and enqueues playlist scripts, styles, and JavaScript templates.
-		 *
-		 * @since 3.9.0
-		 *
-		 * @param string $type  Type of playlist. Possible values are 'audio' or 'video'.
-		 * @param string $style The 'theme' for the playlist. Core provides 'light' and 'dark'.
-		 */
-		do_action( 'wp_playlist_scripts', $atts['type'], $atts['style'] );
-	} ?>
-<div class="wp-playlist wp-<?php echo $safe_type ?>-playlist wp-playlist-<?php echo $safe_style ?>">
-	<?php if ( 'audio' === $atts['type'] ): ?>
-	<div class="wp-playlist-current-item"></div>
-	<?php endif ?>
-	<<?php echo $safe_type ?> controls="controls" preload="none" width="<?php
-		echo (int) $theme_width;
-	?>"<?php if ( 'video' === $safe_type ):
-		echo ' height="', (int) $theme_height, '"';
-	endif; ?>></<?php echo $safe_type ?>>
-	<div class="wp-playlist-next"></div>
-	<div class="wp-playlist-prev"></div>
-	<noscript>
-	<ol><?php
-	foreach ( $attachments as $att_id => $attachment ) {
-		printf( '<li>%s</li>', wp_get_attachment_link( $att_id ) );
-	}
-	?></ol>
-	</noscript>
-	<script type="application/json" class="wp-playlist-script"><?php echo wp_json_encode( $data ) ?></script>
-</div>
-	<?php
-	return ob_get_clean();
-}
-add_shortcode( 'playlist', 'wp_playlist_shortcode' );
-
-/**
- * Provides a No-JS Flash fallback as a last resort for audio / video.
- *
- * @since 3.6.0
- *
- * @param string $url The media element URL.
- * @return string Fallback HTML.
- */
-function wp_mediaelement_fallback( $url ) {
-	/**
-	 * Filters the Mediaelement fallback output for no-JS.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param string $output Fallback output for no-JS.
-	 * @param string $url    Media file URL.
-	 */
-	return apply_filters( 'wp_mediaelement_fallback', sprintf( '<a href="%1$s">%1$s</a>', esc_url( $url ) ), $url );
-}
-
-/**
- * Returns a filtered list of WP-supported audio formats.
- *
- * @since 3.6.0
- *
- * @return array Supported audio formats.
- */
-function wp_get_audio_extensions() {
-	/**
-	 * Filters the list of supported audio formats.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param array $extensions An array of support audio formats. Defaults are
-	 *                          'mp3', 'ogg', 'wma', 'm4a', 'wav'.
-	 */
-	return apply_filters( 'wp_audio_extensions', array( 'mp3', 'ogg', 'wma', 'm4a', 'wav' ) );
-}
-
-/**
- * Returns useful keys to use to lookup data from an attachment's stored metadata.
- *
- * @since 3.9.0
- *
- * @param WP_Post $attachment The current attachment, provided for context.
- * @param string  $context    Optional. The context. Accepts 'edit', 'display'. Default 'display'.
- * @return array Key/value pairs of field keys to labels.
- */
-function wp_get_attachment_id3_keys( $attachment, $context = 'display' ) {
-	$fields = array(
-		'artist' => __( 'Artist' ),
-		'album' => __( 'Album' ),
-	);
-
-	if ( 'display' === $context ) {
-		$fields['genre']            = __( 'Genre' );
-		$fields['year']             = __( 'Year' );
-		$fields['length_formatted'] = _x( 'Length', 'video or audio' );
-	} elseif ( 'js' === $context ) {
-		$fields['bitrate']          = __( 'Bitrate' );
-		$fields['bitrate_mode']     = __( 'Bitrate Mode' );
-	}
-
-	/**
-	 * Filters the editable list of keys to look up data from an attachment's metadata.
-	 *
-	 * @since 3.9.0
-	 *
-	 * @param array   $fields     Key/value pairs of field keys to labels.
-	 * @param WP_Post $attachment Attachment object.
-	 * @param string  $context    The context. Accepts 'edit', 'display'. Default 'display'.
-	 */
-	return apply_filters( 'wp_get_attachment_id3_keys', $fields, $attachment, $context );
-}
-/**
- * Builds the Audio shortcode output.
- *
- * This implements the functionality of the Audio Shortcode for displaying
- * WordPress mp3s in a post.
- *
- * @since 3.6.0
- *
- * @staticvar int $instance
- *
- * @param array  $attr {
- *     Attributes of the audio shortcode.
- *
- *     @type string $src      URL to the source of the audio file. Default empty.
- *     @type string $loop     The 'loop' attribute for the `<audio>` element. Default empty.
- *     @type string $autoplay The 'autoplay' attribute for the `<audio>` element. Default empty.
- *     @type string $preload  The 'preload' attribute for the `<audio>` element. Default 'none'.
- *     @type string $class    The 'class' attribute for the `<audio>` element. Default 'wp-audio-shortcode'.
- *     @type string $style    The 'style' attribute for the `<audio>` element. Default 'width: 100%;'.
- * }
- * @param string $content Shortcode content.
- * @return string|void HTML content to display audio.
- */
-function wp_audio_shortcode( $attr, $content = '' ) {
-	$post_id = get_post() ? get_the_ID() : 0;
-
-	static $instance = 0;
-	$instance++;
-
-	/**
-	 * Filters the default audio shortcode output.
-	 *
-	 * If the filtered output isn't empty, it will be used instead of generating the default audio template.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param string $html     Empty variable to be replaced with shortcode markup.
-	 * @param array  $attr     Attributes of the shortcode. @see wp_audio_shortcode()
-	 * @param string $content  Shortcode content.
-	 * @param int    $instance Unique numeric ID of this audio shortcode instance.
-	 */
-	$override = apply_filters( 'wp_audio_shortcode_override', '', $attr, $content, $instance );
-	if ( '' !== $override ) {
-		return $override;
-	}
-
-	$audio = null;
-
-	$default_types = wp_get_audio_extensions();
-	$defaults_atts = array(
-		'src'      => '',
-		'loop'     => '',
-		'autoplay' => '',
-		'preload'  => 'none',
-		'class'    => 'wp-audio-shortcode',
-		'style'    => 'width: 100%;'
-	);
-	foreach ( $default_types as $type ) {
-		$defaults_atts[$type] = '';
-	}
-
-	$atts = shortcode_atts( $defaults_atts, $attr, 'audio' );
-
-	$primary = false;
-	if ( ! empty( $atts['src'] ) ) {
-		$type = wp_check_filetype( $atts['src'], wp_get_mime_types() );
-		if ( ! in_array( strtolower( $type['ext'] ), $default_types ) ) {
-			return sprintf( '<a class="wp-embedded-audio" href="%s">%s</a>', esc_url( $atts['src'] ), esc_html( $atts['src'] ) );
-		}
-		$primary = true;
-		array_unshift( $default_types, 'src' );
-	} else {
-		foreach ( $default_types as $ext ) {
-			if ( ! empty( $atts[ $ext ] ) ) {
-				$type = wp_check_filetype( $atts[ $ext ], wp_get_mime_types() );
-				if ( strtolower( $type['ext'] ) === $ext ) {
-					$primary = true;
-				}
-			}
-		}
-	}
-
-	if ( ! $primary ) {
-		$audios = get_attached_media( 'audio', $post_id );
-		if ( empty( $audios ) ) {
-			return;
-		}
-
-		$audio = reset( $audios );
-		$atts['src'] = wp_get_attachment_url( $audio->ID );
-		if ( empty( $atts['src'] ) ) {
-			return;
-		}
-
-		array_unshift( $default_types, 'src' );
-	}
-
-	/**
-	 * Filters the media library used for the audio shortcode.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param string $library Media library used for the audio shortcode.
-	 */
-	$library = apply_filters( 'wp_audio_shortcode_library', 'mediaelement' );
-	if ( 'mediaelement' === $library && did_action( 'init' ) ) {
-		wp_enqueue_style( 'wp-mediaelement' );
-		wp_enqueue_script( 'wp-mediaelement' );
-	}
-
-	/**
-	 * Filters the class attribute for the audio shortcode output container.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param string $class CSS class or list of space-separated classes.
-	 */
-	$atts['class'] = apply_filters( 'wp_audio_shortcode_class', $atts['class'] );
-
-	$html_atts = array(
-		'class'    => $atts['class'],
-		'id'       => sprintf( 'audio-%d-%d', $post_id, $instance ),
-		'loop'     => wp_validate_boolean( $atts['loop'] ),
-		'autoplay' => wp_validate_boolean( $atts['autoplay'] ),
-		'preload'  => $atts['preload'],
-		'style'    => $atts['style'],
-	);
-
-	// These ones should just be omitted altogether if they are blank
-	foreach ( array( 'loop', 'autoplay', 'preload' ) as $a ) {
-		if ( empty( $html_atts[$a] ) ) {
-			unset( $html_atts[$a] );
-		}
-	}
-
-	$attr_strings = array();
-	foreach ( $html_atts as $k => $v ) {
-		$attr_strings[] = $k . '="' . esc_attr( $v ) . '"';
-	}
-
-	$html = '';
-	if ( 'mediaelement' === $library && 1 === $instance ) {
-		$html .= "<!--[if lt IE 9]><script>document.createElement('audio');</script><![endif]-->\n";
-	}
-	$html .= sprintf( '<audio %s controls="controls">', join( ' ', $attr_strings ) );
-
-	$fileurl = '';
-	$source = '<source type="%s" src="%s" />';
-	foreach ( $default_types as $fallback ) {
-		if ( ! empty( $atts[ $fallback ] ) ) {
-			if ( empty( $fileurl ) ) {
-				$fileurl = $atts[ $fallback ];
-			}
-			$type = wp_check_filetype( $atts[ $fallback ], wp_get_mime_types() );
-			$url = add_query_arg( '_', $instance, $atts[ $fallback ] );
-			$html .= sprintf( $source, $type['type'], esc_url( $url ) );
-		}
-	}
-
-	if ( 'mediaelement' === $library ) {
-		$html .= wp_mediaelement_fallback( $fileurl );
-	}
-	$html .= '</audio>';
-
-	/**
-	 * Filters the audio shortcode output.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param string $html    Audio shortcode HTML output.
-	 * @param array  $atts    Array of audio shortcode attributes.
-	 * @param string $audio   Audio file.
-	 * @param int    $post_id Post ID.
-	 * @param string $library Media library used for the audio shortcode.
-	 */
-	return apply_filters( 'wp_audio_shortcode', $html, $atts, $audio, $post_id, $library );
-}
-add_shortcode( 'audio', 'wp_audio_shortcode' );
-
-/**
- * Returns a filtered list of WP-supported video formats.
- *
- * @since 3.6.0
- *
- * @return array List of supported video formats.
- */
-function wp_get_video_extensions() {
-	/**
-	 * Filters the list of supported video formats.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param array $extensions An array of support video formats. Defaults are
-	 *                          'mp4', 'm4v', 'webm', 'ogv', 'wmv', 'flv'.
-	 */
-	return apply_filters( 'wp_video_extensions', array( 'mp4', 'm4v', 'webm', 'ogv', 'wmv', 'flv' ) );
-}
-
-/**
- * Builds the Video shortcode output.
- *
- * This implements the functionality of the Video Shortcode for displaying
- * WordPress mp4s in a post.
- *
- * @since 3.6.0
- *
- * @global int $content_width
- * @staticvar int $instance
- *
- * @param array  $attr {
- *     Attributes of the shortcode.
- *
- *     @type string $src      URL to the source of the video file. Default empty.
- *     @type int    $height   Height of the video embed in pixels. Default 360.
- *     @type int    $width    Width of the video embed in pixels. Default $content_width or 640.
- *     @type string $poster   The 'poster' attribute for the `<video>` element. Default empty.
- *     @type string $loop     The 'loop' attribute for the `<video>` element. Default empty.
- *     @type string $autoplay The 'autoplay' attribute for the `<video>` element. Default empty.
- *     @type string $preload  The 'preload' attribute for the `<video>` element.
- *                            Default 'metadata'.
- *     @type string $class    The 'class' attribute for the `<video>` element.
- *                            Default 'wp-video-shortcode'.
- * }
- * @param string $content Shortcode content.
- * @return string|void HTML content to display video.
- */
-function wp_video_shortcode( $attr, $content = '' ) {
-	global $content_width;
-	$post_id = get_post() ? get_the_ID() : 0;
-
-	static $instance = 0;
-	$instance++;
-
-	/**
-	 * Filters the default video shortcode output.
-	 *
-	 * If the filtered output isn't empty, it will be used instead of generating
-	 * the default video template.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @see wp_video_shortcode()
-	 *
-	 * @param string $html     Empty variable to be replaced with shortcode markup.
-	 * @param array  $attr     Attributes of the video shortcode.
-	 * @param string $content  Video shortcode content.
-	 * @param int    $instance Unique numeric ID of this video shortcode instance.
-	 */
-	$override = apply_filters( 'wp_video_shortcode_override', '', $attr, $content, $instance );
-	if ( '' !== $override ) {
-		return $override;
-	}
-
-	$video = null;
-
-	$default_types = wp_get_video_extensions();
-	$defaults_atts = array(
-		'src'      => '',
-		'poster'   => '',
-		'loop'     => '',
-		'autoplay' => '',
-		'preload'  => 'metadata',
-		'width'    => 640,
-		'height'   => 360,
-		'class'    => 'wp-video-shortcode',
-	);
-
-	foreach ( $default_types as $type ) {
-		$defaults_atts[$type] = '';
-	}
-
-	$atts = shortcode_atts( $defaults_atts, $attr, 'video' );
-
-	if ( is_admin() ) {
-		// shrink the video so it isn't huge in the admin
-		if ( $atts['width'] > $defaults_atts['width'] ) {
-			$atts['height'] = round( ( $atts['height'] * $defaults_atts['width'] ) / $atts['width'] );
-			$atts['width'] = $defaults_atts['width'];
-		}
-	} else {
-		// if the video is bigger than the theme
-		if ( ! empty( $content_width ) && $atts['width'] > $content_width ) {
-			$atts['height'] = round( ( $atts['height'] * $content_width ) / $atts['width'] );
-			$atts['width'] = $content_width;
-		}
-	}
-
-	$is_vimeo = $is_youtube = false;
-	$yt_pattern = '#^https?://(?:www\.)?(?:youtube\.com/watch|youtu\.be/)#';
-	$vimeo_pattern = '#^https?://(.+\.)?vimeo\.com/.*#';
-
-	$primary = false;
-	if ( ! empty( $atts['src'] ) ) {
-		$is_vimeo = ( preg_match( $vimeo_pattern, $atts['src'] ) );
-		$is_youtube = (  preg_match( $yt_pattern, $atts['src'] ) );
-		if ( ! $is_youtube && ! $is_vimeo ) {
-			$type = wp_check_filetype( $atts['src'], wp_get_mime_types() );
-			if ( ! in_array( strtolower( $type['ext'] ), $default_types ) ) {
-				return sprintf( '<a class="wp-embedded-video" href="%s">%s</a>', esc_url( $atts['src'] ), esc_html( $atts['src'] ) );
-			}
-		}
-
-		if ( $is_vimeo ) {
-			wp_enqueue_script( 'froogaloop' );
-		}
-
-		$primary = true;
-		array_unshift( $default_types, 'src' );
-	} else {
-		foreach ( $default_types as $ext ) {
-			if ( ! empty( $atts[ $ext ] ) ) {
-				$type = wp_check_filetype( $atts[ $ext ], wp_get_mime_types() );
-				if ( strtolower( $type['ext'] ) === $ext ) {
-					$primary = true;
-				}
-			}
-		}
-	}
-
-	if ( ! $primary ) {
-		$videos = get_attached_media( 'video', $post_id );
-		if ( empty( $videos ) ) {
-			return;
-		}
-
-		$video = reset( $videos );
-		$atts['src'] = wp_get_attachment_url( $video->ID );
-		if ( empty( $atts['src'] ) ) {
-			return;
-		}
-
-		array_unshift( $default_types, 'src' );
-	}
-
-	/**
-	 * Filters the media library used for the video shortcode.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param string $library Media library used for the video shortcode.
-	 */
-	$library = apply_filters( 'wp_video_shortcode_library', 'mediaelement' );
-	if ( 'mediaelement' === $library && did_action( 'init' ) ) {
-		wp_enqueue_style( 'wp-mediaelement' );
-		wp_enqueue_script( 'wp-mediaelement' );
-	}
-
-	/**
-	 * Filters the class attribute for the video shortcode output container.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param string $class CSS class or list of space-separated classes.
-	 */
-	$atts['class'] = apply_filters( 'wp_video_shortcode_class', $atts['class'] );
-
-	$html_atts = array(
-		'class'    => $atts['class'],
-		'id'       => sprintf( 'video-%d-%d', $post_id, $instance ),
-		'width'    => absint( $atts['width'] ),
-		'height'   => absint( $atts['height'] ),
-		'poster'   => esc_url( $atts['poster'] ),
-		'loop'     => wp_validate_boolean( $atts['loop'] ),
-		'autoplay' => wp_validate_boolean( $atts['autoplay'] ),
-		'preload'  => $atts['preload'],
-	);
-
-	// These ones should just be omitted altogether if they are blank
-	foreach ( array( 'poster', 'loop', 'autoplay', 'preload' ) as $a ) {
-		if ( empty( $html_atts[$a] ) ) {
-			unset( $html_atts[$a] );
-		}
-	}
-
-	$attr_strings = array();
-	foreach ( $html_atts as $k => $v ) {
-		$attr_strings[] = $k . '="' . esc_attr( $v ) . '"';
-	}
-
-	$html = '';
-	if ( 'mediaelement' === $library && 1 === $instance ) {
-		$html .= "<!--[if lt IE 9]><script>document.createElement('video');</script><![endif]-->\n";
-	}
-	$html .= sprintf( '<video %s controls="controls">', join( ' ', $attr_strings ) );
-
-	$fileurl = '';
-	$source = '<source type="%s" src="%s" />';
-	foreach ( $default_types as $fallback ) {
-		if ( ! empty( $atts[ $fallback ] ) ) {
-			if ( empty( $fileurl ) ) {
-				$fileurl = $atts[ $fallback ];
-			}
-			if ( 'src' === $fallback && $is_youtube ) {
-				$type = array( 'type' => 'video/youtube' );
-			} elseif ( 'src' === $fallback && $is_vimeo ) {
-				$type = array( 'type' => 'video/vimeo' );
-			} else {
-				$type = wp_check_filetype( $atts[ $fallback ], wp_get_mime_types() );
-			}
-			$url = add_query_arg( '_', $instance, $atts[ $fallback ] );
-			$html .= sprintf( $source, $type['type'], esc_url( $url ) );
-		}
-	}
-
-	if ( ! empty( $content ) ) {
-		if ( false !== strpos( $content, "\n" ) ) {
-			$content = str_replace( array( "\r\n", "\n", "\t" ), '', $content );
-		}
-		$html .= trim( $content );
-	}
-
-	if ( 'mediaelement' === $library ) {
-		$html .= wp_mediaelement_fallback( $fileurl );
-	}
-	$html .= '</video>';
-
-	$width_rule = '';
-	if ( ! empty( $atts['width'] ) ) {
-		$width_rule = sprintf( 'width: %dpx;', $atts['width'] );
-	}
-	$output = sprintf( '<div style="%s" class="wp-video">%s</div>', $width_rule, $html );
-
-	/**
-	 * Filters the output of the video shortcode.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param string $output  Video shortcode HTML output.
-	 * @param array  $atts    Array of video shortcode attributes.
-	 * @param string $video   Video file.
-	 * @param int    $post_id Post ID.
-	 * @param string $library Media library used for the video shortcode.
-	 */
-	return apply_filters( 'wp_video_shortcode', $output, $atts, $video, $post_id, $library );
-}
-add_shortcode( 'video', 'wp_video_shortcode' );
-
-/**
- * Displays previous image link that has the same post parent.
- *
- * @since 2.5.0
- *
- * @see adjacent_image_link()
- *
- * @param string|array $size Optional. Image size. Accepts any valid image size, an array of width and
- *                           height values in pixels (in that order), 0, or 'none'. 0 or 'none' will
- *                           default to 'post_title' or `$text`. Default 'thumbnail'.
- * @param string       $text Optional. Link text. Default false.
- */
-function previous_image_link( $size = 'thumbnail', $text = false ) {
-	adjacent_image_link(true, $size, $text);
-}
-
-/**
- * Displays next image link that has the same post parent.
- *
- * @since 2.5.0
- *
- * @see adjacent_image_link()
- *
- * @param string|array $size Optional. Image size. Accepts any valid image size, an array of width and
- *                           height values in pixels (in that order), 0, or 'none'. 0 or 'none' will
- *                           default to 'post_title' or `$text`. Default 'thumbnail'.
- * @param string       $text Optional. Link text. Default false.
- */
-function next_image_link( $size = 'thumbnail', $text = false ) {
-	adjacent_image_link(false, $size, $text);
-}
-
-/**
- * Displays next or previous image link that has the same post parent.
- *
- * Retrieves the current attachment object from the $post global.
- *
- * @since 2.5.0
- *
- * @param bool         $prev Optional. Whether to display the next (false) or previous (true) link. Default true.
- * @param string|array $size Optional. Image size. Accepts any valid image size, or an array of width and height
- *                           values in pixels (in that order). Default 'thumbnail'.
- * @param bool         $text Optional. Link text. Default false.
- */
-function adjacent_image_link( $prev = true, $size = 'thumbnail', $text = false ) {
-	$post = get_post();
-	$attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
-
-	foreach ( $attachments as $k => $attachment ) {
-		if ( $attachment->ID == $post->ID ) {
-			break;
-		}
-	}
-
-	$output = '';
-	$attachment_id = 0;
-
-	if ( $attachments ) {
-		$k = $prev ? $k - 1 : $k + 1;
-
-		if ( isset( $attachments[ $k ] ) ) {
-			$attachment_id = $attachments[ $k ]->ID;
-			$output = wp_get_attachment_link( $attachment_id, $size, true, false, $text );
-		}
-	}
-
-	$adjacent = $prev ? 'previous' : 'next';
-
-	/**
-	 * Filters the adjacent image link.
-	 *
-	 * The dynamic portion of the hook name, `$adjacent`, refers to the type of adjacency,
-	 * either 'next', or 'previous'.
-	 *
-	 * @since 3.5.0
-	 *
-	 * @param string $output        Adjacent image HTML markup.
-	 * @param int    $attachment_id Attachment ID
-	 * @param string $size          Image size.
-	 * @param string $text          Link text.
-	 */
-	echo apply_filters( "{$adjacent}_image_link", $output, $attachment_id, $size, $text );
-}
-
-/**
- * Retrieves taxonomies attached to given the attachment.
- *
- * @since 2.5.0
- * @since 4.7.0 Introduced the `$output` parameter.
- *
- * @param int|array|object $attachment Attachment ID, data array, or data object.
- * @param string           $output     Output type. 'names' to return an array of taxonomy names,
- *                                     or 'objects' to return an array of taxonomy objects.
- *                                     Default is 'names'.
- * @return array Empty array on failure. List of taxonomies on success.
- */
-function get_attachment_taxonomies( $attachment, $output = 'names' ) {
-	if ( is_int( $attachment ) ) {
-		$attachment = get_post( $attachment );
-	} elseif ( is_array( $attachment ) ) {
-		$attachment = (object) $attachment;
-	}
-	if ( ! is_object($attachment) )
-		return array();
-
-	$file = get_attached_file( $attachment->ID );
-	$filename = basename( $file );
-
-	$objects = array('attachment');
-
-	if ( false !== strpos($filename, '.') )
-		$objects[] = 'attachment:' . substr($filename, strrpos($filename, '.') + 1);
-	if ( !empty($attachment->post_mime_type) ) {
-		$objects[] = 'attachment:' . $attachment->post_mime_type;
-		if ( false !== strpos($attachment->post_mime_type, '/') )
-			foreach ( explode('/', $attachment->post_mime_type) as $token )
-				if ( !empty($token) )
-					$objects[] = "attachment:$token";
-	}
-
-	$taxonomies = array();
-	foreach ( $objects as $object ) {
-		if ( $taxes = get_object_taxonomies( $object, $output ) ) {
-			$taxonomies = array_merge( $taxonomies, $taxes );
-		}
-	}
-
-	if ( 'names' === $output ) {
-		$taxonomies = array_unique( $taxonomies );
-	}
-
-	return $taxonomies;
-}
-
-/**
- * Retrieves all of the taxonomy names that are registered for attachments.
- *
- * Handles mime-type-specific taxonomies such as attachment:image and attachment:video.
- *
- * @since 3.5.0
- *
- * @see get_taxonomies()
- *
- * @param string $output Optional. The type of taxonomy output to return. Accepts 'names' or 'objects'.
- *                       Default 'names'.
- * @return array The names of all taxonomy of $object_type.
- */
-function get_taxonomies_for_attachments( $output = 'names' ) {
-	$taxonomies = array();
-	foreach ( get_taxonomies( array(), 'objects' ) as $taxonomy ) {
-		foreach ( $taxonomy->object_type as $object_type ) {
-			if ( 'attachment' == $object_type || 0 === strpos( $object_type, 'attachment:' ) ) {
-				if ( 'names' == $output )
-					$taxonomies[] = $taxonomy->name;
-				else
-					$taxonomies[ $taxonomy->name ] = $taxonomy;
-				break;
-			}
-		}
-	}
-
-	return $taxonomies;
-}
-
-/**
- * Create new GD image resource with transparency support
- *
- * @todo: Deprecate if possible.
- *
- * @since 2.9.0
- *
- * @param int $width  Image width in pixels.
- * @param int $height Image height in pixels..
- * @return resource The GD image resource.
- */
-function wp_imagecreatetruecolor($width, $height) {
-	$img = imagecreatetruecolor($width, $height);
-	if ( is_resource($img) && function_exists('imagealphablending') && function_exists('imagesavealpha') ) {
-		imagealphablending($img, false);
-		imagesavealpha($img, true);
-	}
-	return $img;
-}
-
-/**
- * Based on a supplied width/height example, return the biggest possible dimensions based on the max width/height.
- *
- * @since 2.9.0
- *
- * @see wp_constrain_dimensions()
- *
- * @param int $example_width  The width of an example embed.
- * @param int $example_height The height of an example embed.
- * @param int $max_width      The maximum allowed width.
- * @param int $max_height     The maximum allowed height.
- * @return array The maximum possible width and height based on the example ratio.
- */
-function wp_expand_dimensions( $example_width, $example_height, $max_width, $max_height ) {
-	$example_width  = (int) $example_width;
-	$example_height = (int) $example_height;
-	$max_width      = (int) $max_width;
-	$max_height     = (int) $max_height;
-
-	return wp_constrain_dimensions( $example_width * 1000000, $example_height * 1000000, $max_width, $max_height );
-}
-
-/**
- * Determines the maximum upload size allowed in php.ini.
- *
- * @since 2.5.0
- *
- * @return int Allowed upload size.
- */
-function wp_max_upload_size() {
-	$u_bytes = wp_convert_hr_to_bytes( ini_get( 'upload_max_filesize' ) );
-	$p_bytes = wp_convert_hr_to_bytes( ini_get( 'post_max_size' ) );
-
-	/**
-	 * Filters the maximum upload size allowed in php.ini.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param int $size    Max upload size limit in bytes.
-	 * @param int $u_bytes Maximum upload filesize in bytes.
-	 * @param int $p_bytes Maximum size of POST data in bytes.
-	 */
-	return apply_filters( 'upload_size_limit', min( $u_bytes, $p_bytes ), $u_bytes, $p_bytes );
-}
-
-/**
- * Returns a WP_Image_Editor instance and loads file into it.
- *
- * @since 3.5.0
- *
- * @param string $path Path to the file to load.
- * @param array  $args Optional. Additional arguments for retrieving the image editor.
- *                     Default empty array.
- * @return WP_Image_Editor|WP_Error The WP_Image_Editor object if successful, an WP_Error
- *                                  object otherwise.
- */
-function wp_get_image_editor( $path, $args = array() ) {
-	$args['path'] = $path;
-
-	if ( ! isset( $args['mime_type'] ) ) {
-		$file_info = wp_check_filetype( $args['path'] );
-
-		// If $file_info['type'] is false, then we let the editor attempt to
-		// figure out the file type, rather than forcing a failure based on extension.
-		if ( isset( $file_info ) && $file_info['type'] )
-			$args['mime_type'] = $file_info['type'];
-	}
-
-	$implementation = _wp_image_editor_choose( $args );
-
-	if ( $implementation ) {
-		$editor = new $implementation( $path );
-		$loaded = $editor->load();
-
-		if ( is_wp_error( $loaded ) )
-			return $loaded;
-
-		return $editor;
-	}
-
-	return new WP_Error( 'image_no_editor', __('No editor could be selected.') );
-}
-
-/**
- * Tests whether there is an editor that supports a given mime type or methods.
- *
- * @since 3.5.0
- *
- * @param string|array $args Optional. Array of arguments to retrieve the image editor supports.
- *                           Default empty array.
- * @return bool True if an eligible editor is found; false otherwise.
- */
-function wp_image_editor_supports( $args = array() ) {
-	return (bool) _wp_image_editor_choose( $args );
-}
-
-/**
- * Tests which editors are capable of supporting the request.
- *
- * @ignore
- * @since 3.5.0
- *
- * @param array $args Optional. Array of arguments for choosing a capable editor. Default empty array.
- * @return string|false Class name for the first editor that claims to support the request. False if no
- *                     editor claims to support the request.
- */
-function _wp_image_editor_choose( $args = array() ) {
-	require_once ABSPATH . WPINC . '/class-wp-image-editor.php';
-	require_once ABSPATH . WPINC . '/class-wp-image-editor-gd.php';
-	require_once ABSPATH . WPINC . '/class-wp-image-editor-imagick.php';
-	/**
-	 * Filters the list of image editing library classes.
-	 *
-	 * @since 3.5.0
-	 *
-	 * @param array $image_editors List of available image editors. Defaults are
-	 *                             'WP_Image_Editor_Imagick', 'WP_Image_Editor_GD'.
-	 */
-	$implementations = apply_filters( 'wp_image_editors', array( 'WP_Image_Editor_Imagick', 'WP_Image_Editor_GD' ) );
-
-	foreach ( $implementations as $implementation ) {
-		if ( ! call_user_func( array( $implementation, 'test' ), $args ) )
-			continue;
-
-		if ( isset( $args['mime_type'] ) &&
-			! call_user_func(
-				array( $implementation, 'supports_mime_type' ),
-				$args['mime_type'] ) ) {
-			continue;
-		}
-
-		if ( isset( $args['methods'] ) &&
-			 array_diff( $args['methods'], get_class_methods( $implementation ) ) ) {
-			continue;
-		}
-
-		return $implementation;
-	}
-
-	return false;
-}
-
-/**
- * Prints default Plupload arguments.
- *
- * @since 3.4.0
- */
-function wp_plupload_default_settings() {
-	$wp_scripts = wp_scripts();
-
-	$data = $wp_scripts->get_data( 'wp-plupload', 'data' );
-	if ( $data && false !== strpos( $data, '_wpPluploadSettings' ) )
-		return;
-
-	$max_upload_size = wp_max_upload_size();
-	$allowed_extensions = array_keys( get_allowed_mime_types() );
-	$extensions = array();
-	foreach ( $allowed_extensions as $extension ) {
-		$extensions = array_merge( $extensions, explode( '|', $extension ) );
-	}
-
-	$defaults = array(
-		'runtimes'            => 'html5,flash,silverlight,html4',
-		'file_data_name'      => 'async-upload', // key passed to $_FILE.
-		'url'                 => admin_url( 'async-upload.php', 'relative' ),
-		'flash_swf_url'       => includes_url( 'js/plupload/plupload.flash.swf' ),
-		'silverlight_xap_url' => includes_url( 'js/plupload/plupload.silverlight.xap' ),
-		'filters' => array(
-			'max_file_size'   => $max_upload_size . 'b',
-			'mime_types'      => array( array( 'extensions' => implode( ',', $extensions ) ) ),
-		),
-	);
-
-	// Currently only iOS Safari supports multiple files uploading but iOS 7.x has a bug that prevents uploading of videos
-	// when enabled. See #29602.
-	if ( wp_is_mobile() && strpos( $_SERVER['HTTP_USER_AGENT'], 'OS 7_' ) !== false &&
-		strpos( $_SERVER['HTTP_USER_AGENT'], 'like Mac OS X' ) !== false ) {
-
-		$defaults['multi_selection'] = false;
-	}
-
-	/**
-	 * Filters the Plupload default settings.
-	 *
-	 * @since 3.4.0
-	 *
-	 * @param array $defaults Default Plupload settings array.
-	 */
-	$defaults = apply_filters( 'plupload_default_settings', $defaults );
-
-	$params = array(
-		'action' => 'upload-attachment',
-	);
-
-	/**
-	 * Filters the Plupload default parameters.
-	 *
-	 * @since 3.4.0
-	 *
-	 * @param array $params Default Plupload parameters array.
-	 */
-	$params = apply_filters( 'plupload_default_params', $params );
-	$params['_wpnonce'] = wp_create_nonce( 'media-form' );
-	$defaults['multipart_params'] = $params;
-
-	$settings = array(
-		'defaults' => $defaults,
-		'browser'  => array(
-			'mobile'    => wp_is_mobile(),
-			'supported' => _device_can_upload(),
-		),
-		'limitExceeded' => is_multisite() && ! is_upload_space_available()
-	);
-
-	$script = 'var _wpPluploadSettings = ' . wp_json_encode( $settings ) . ';';
-
-	if ( $data )
-		$script = "$data\n$script";
-
-	$wp_scripts->add_data( 'wp-plupload', 'data', $script );
-}
-
-/**
- * Prepares an attachment post object for JS, where it is expected
- * to be JSON-encoded and fit into an Attachment model.
- *
- * @since 3.5.0
- *
- * @param mixed $attachment Attachment ID or object.
- * @return array|void Array of attachment details.
- */
-function wp_prepare_attachment_for_js( $attachment ) {
-	if ( ! $attachment = get_post( $attachment ) )
-		return;
-
-	if ( 'attachment' != $attachment->post_type )
-		return;
-
-	$meta = wp_get_attachment_metadata( $attachment->ID );
-	if ( false !== strpos( $attachment->post_mime_type, '/' ) )
-		list( $type, $subtype ) = explode( '/', $attachment->post_mime_type );
-	else
-		list( $type, $subtype ) = array( $attachment->post_mime_type, '' );
-
-	$attachment_url = wp_get_attachment_url( $attachment->ID );
-
-	$response = array(
-		'id'          => $attachment->ID,
-		'title'       => $attachment->post_title,
-		'filename'    => wp_basename( get_attached_file( $attachment->ID ) ),
-		'url'         => $attachment_url,
-		'link'        => get_attachment_link( $attachment->ID ),
-		'alt'         => get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ),
-		'author'      => $attachment->post_author,
-		'description' => $attachment->post_content,
-		'caption'     => $attachment->post_excerpt,
-		'name'        => $attachment->post_name,
-		'status'      => $attachment->post_status,
-		'uploadedTo'  => $attachment->post_parent,
-		'date'        => strtotime( $attachment->post_date_gmt ) * 1000,
-		'modified'    => strtotime( $attachment->post_modified_gmt ) * 1000,
-		'menuOrder'   => $attachment->menu_order,
-		'mime'        => $attachment->post_mime_type,
-		'type'        => $type,
-		'subtype'     => $subtype,
-		'icon'        => wp_mime_type_icon( $attachment->ID ),
-		'dateFormatted' => mysql2date( __( 'F j, Y' ), $attachment->post_date ),
-		'nonces'      => array(
-			'update' => false,
-			'delete' => false,
-			'edit'   => false
-		),
-		'editLink'   => false,
-		'meta'       => false,
-	);
-
-	$author = new WP_User( $attachment->post_author );
-	$response['authorName'] = $author->display_name;
-
-	if ( $attachment->post_parent ) {
-		$post_parent = get_post( $attachment->post_parent );
-	} else {
-		$post_parent = false;
-	}
-
-	if ( $post_parent ) {
-		$parent_type = get_post_type_object( $post_parent->post_type );
-
-		if ( $parent_type && $parent_type->show_ui && current_user_can( 'edit_post', $attachment->post_parent ) ) {
-			$response['uploadedToLink'] = get_edit_post_link( $attachment->post_parent, 'raw' );
-		}
-
-		if ( $parent_type && current_user_can( 'read_post', $attachment->post_parent ) ) {
-			$response['uploadedToTitle'] = $post_parent->post_title ? $post_parent->post_title : __( '(no title)' );
-		}
-	}
-
-	$attached_file = get_attached_file( $attachment->ID );
-
-	if ( isset( $meta['filesize'] ) ) {
-		$bytes = $meta['filesize'];
-	} elseif ( file_exists( $attached_file ) ) {
-		$bytes = filesize( $attached_file );
-	} else {
-		$bytes = '';
-	}
-
-	if ( $bytes ) {
-		$response['filesizeInBytes'] = $bytes;
-		$response['filesizeHumanReadable'] = size_format( $bytes );
-	}
-
-	if ( current_user_can( 'edit_post', $attachment->ID ) ) {
-		$response['nonces']['update'] = wp_create_nonce( 'update-post_' . $attachment->ID );
-		$response['nonces']['edit'] = wp_create_nonce( 'image_editor-' . $attachment->ID );
-		$response['editLink'] = get_edit_post_link( $attachment->ID, 'raw' );
-	}
-
-	if ( current_user_can( 'delete_post', $attachment->ID ) )
-		$response['nonces']['delete'] = wp_create_nonce( 'delete-post_' . $attachment->ID );
-
-	if ( $meta && 'image' === $type ) {
-		$sizes = array();
-
-		/** This filter is documented in wp-admin/includes/media.php */
-		$possible_sizes = apply_filters( 'image_size_names_choose', array(
-			'thumbnail' => __('Thumbnail'),
-			'medium'    => __('Medium'),
-			'large'     => __('Large'),
-			'full'      => __('Full Size'),
-		) );
-		unset( $possible_sizes['full'] );
-
-		// Loop through all potential sizes that may be chosen. Try to do this with some efficiency.
-		// First: run the image_downsize filter. If it returns something, we can use its data.
-		// If the filter does not return something, then image_downsize() is just an expensive
-		// way to check the image metadata, which we do second.
-		foreach ( $possible_sizes as $size => $label ) {
-
-			/** This filter is documented in wp-includes/media.php */
-			if ( $downsize = apply_filters( 'image_downsize', false, $attachment->ID, $size ) ) {
-				if ( ! $downsize[3] )
-					continue;
-				$sizes[ $size ] = array(
-					'height'      => $downsize[2],
-					'width'       => $downsize[1],
-					'url'         => $downsize[0],
-					'orientation' => $downsize[2] > $downsize[1] ? 'portrait' : 'landscape',
-				);
-			} elseif ( isset( $meta['sizes'][ $size ] ) ) {
-				if ( ! isset( $base_url ) )
-					$base_url = str_replace( wp_basename( $attachment_url ), '', $attachment_url );
-
-				// Nothing from the filter, so consult image metadata if we have it.
-				$size_meta = $meta['sizes'][ $size ];
-
-				// We have the actual image size, but might need to further constrain it if content_width is narrower.
-				// Thumbnail, medium, and full sizes are also checked against the site's height/width options.
-				list( $width, $height ) = image_constrain_size_for_editor( $size_meta['width'], $size_meta['height'], $size, 'edit' );
-
-				$sizes[ $size ] = array(
-					'height'      => $height,
-					'width'       => $width,
-					'url'         => $base_url . $size_meta['file'],
-					'orientation' => $height > $width ? 'portrait' : 'landscape',
-				);
-			}
-		}
-
-		$sizes['full'] = array( 'url' => $attachment_url );
-
-		if ( isset( $meta['height'], $meta['width'] ) ) {
-			$sizes['full']['height'] = $meta['height'];
-			$sizes['full']['width'] = $meta['width'];
-			$sizes['full']['orientation'] = $meta['height'] > $meta['width'] ? 'portrait' : 'landscape';
-		}
-
-		$response = array_merge( $response, array( 'sizes' => $sizes ), $sizes['full'] );
-	} elseif ( $meta && 'video' === $type ) {
-		if ( isset( $meta['width'] ) )
-			$response['width'] = (int) $meta['width'];
-		if ( isset( $meta['height'] ) )
-			$response['height'] = (int) $meta['height'];
-	}
-
-	if ( $meta && ( 'audio' === $type || 'video' === $type ) ) {
-		if ( isset( $meta['length_formatted'] ) )
-			$response['fileLength'] = $meta['length_formatted'];
-
-		$response['meta'] = array();
-		foreach ( wp_get_attachment_id3_keys( $attachment, 'js' ) as $key => $label ) {
-			$response['meta'][ $key ] = false;
-
-			if ( ! empty( $meta[ $key ] ) ) {
-				$response['meta'][ $key ] = $meta[ $key ];
-			}
-		}
-
-		$id = get_post_thumbnail_id( $attachment->ID );
-		if ( ! empty( $id ) ) {
-			list( $src, $width, $height ) = wp_get_attachment_image_src( $id, 'full' );
-			$response['image'] = compact( 'src', 'width', 'height' );
-			list( $src, $width, $height ) = wp_get_attachment_image_src( $id, 'thumbnail' );
-			$response['thumb'] = compact( 'src', 'width', 'height' );
-		} else {
-			$src = wp_mime_type_icon( $attachment->ID );
-			$width = 48;
-			$height = 64;
-			$response['image'] = compact( 'src', 'width', 'height' );
-			$response['thumb'] = compact( 'src', 'width', 'height' );
-		}
-	}
-
-	if ( function_exists('get_compat_media_markup') )
-		$response['compat'] = get_compat_media_markup( $attachment->ID, array( 'in_modal' => true ) );
-
-	/**
-	 * Filters the attachment data prepared for JavaScript.
-	 *
-	 * @since 3.5.0
-	 *
-	 * @param array      $response   Array of prepared attachment data.
-	 * @param int|object $attachment Attachment ID or object.
-	 * @param array      $meta       Array of attachment meta data.
-	 */
-	return apply_filters( 'wp_prepare_attachment_for_js', $response, $attachment, $meta );
-}
-
-/**
- * Enqueues all scripts, styles, settings, and templates necessary to use
- * all media JS APIs.
- *
- * @since 3.5.0
- *
- * @global int       $content_width
- * @global wpdb      $wpdb
- * @global WP_Locale $wp_locale
- *
- * @param array $args {
- *     Arguments for enqueuing media scripts.
- *
- *     @type int|WP_Post A post object or ID.
- * }
- */
-function wp_enqueue_media( $args = array() ) {
-	// Enqueue me just once per page, please.
-	if ( did_action( 'wp_enqueue_media' ) )
-		return;
-
-	global $content_width, $wpdb, $wp_locale;
-
-	$defaults = array(
-		'post' => null,
-	);
-	$args = wp_parse_args( $args, $defaults );
-
-	// We're going to pass the old thickbox media tabs to `media_upload_tabs`
-	// to ensure plugins will work. We will then unset those tabs.
-	$tabs = array(
-		// handler action suffix => tab label
-		'type'     => '',
-		'type_url' => '',
-		'gallery'  => '',
-		'library'  => '',
-	);
-
-	/** This filter is documented in wp-admin/includes/media.php */
-	$tabs = apply_filters( 'media_upload_tabs', $tabs );
-	unset( $tabs['type'], $tabs['type_url'], $tabs['gallery'], $tabs['library'] );
-
-	$props = array(
-		'link'  => get_option( 'image_default_link_type' ), // db default is 'file'
-		'align' => get_option( 'image_default_align' ), // empty default
-		'size'  => get_option( 'image_default_size' ),  // empty default
-	);
-
-	$exts = array_merge( wp_get_audio_extensions(), wp_get_video_extensions() );
-	$mimes = get_allowed_mime_types();
-	$ext_mimes = array();
-	foreach ( $exts as $ext ) {
-		foreach ( $mimes as $ext_preg => $mime_match ) {
-			if ( preg_match( '#' . $ext . '#i', $ext_preg ) ) {
-				$ext_mimes[ $ext ] = $mime_match;
-				break;
-			}
-		}
-	}
-
-	$has_audio = $wpdb->get_var( "
-		SELECT ID
-		FROM $wpdb->posts
-		WHERE post_type = 'attachment'
-		AND post_mime_type LIKE 'audio%'
-		LIMIT 1
-	" );
-	$has_video = $wpdb->get_var( "
-		SELECT ID
-		FROM $wpdb->posts
-		WHERE post_type = 'attachment'
-		AND post_mime_type LIKE 'video%'
-		LIMIT 1
-	" );
-	$months = $wpdb->get_results( $wpdb->prepare( "
-		SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
-		FROM $wpdb->posts
-		WHERE post_type = %s
-		ORDER BY post_date DESC
-	", 'attachment' ) );
-	foreach ( $months as $month_year ) {
-		$month_year->text = sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month_year->month ), $month_year->year );
-	}
-
-	$settings = array(
-		'tabs'      => $tabs,
-		'tabUrl'    => add_query_arg( array( 'chromeless' => true ), admin_url('media-upload.php') ),
-		'mimeTypes' => wp_list_pluck( get_post_mime_types(), 0 ),
-		/** This filter is documented in wp-admin/includes/media.php */
-		'captions'  => ! apply_filters( 'disable_captions', '' ),
-		'nonce'     => array(
-			'sendToEditor' => wp_create_nonce( 'media-send-to-editor' ),
-		),
-		'post'    => array(
-			'id' => 0,
-		),
-		'defaultProps' => $props,
-		'attachmentCounts' => array(
-			'audio' => ( $has_audio ) ? 1 : 0,
-			'video' => ( $has_video ) ? 1 : 0
-		),
-		'embedExts'    => $exts,
-		'embedMimes'   => $ext_mimes,
-		'contentWidth' => $content_width,
-		'months'       => $months,
-		'mediaTrash'   => MEDIA_TRASH ? 1 : 0
-	);
-
-	$post = null;
-	if ( isset( $args['post'] ) ) {
-		$post = get_post( $args['post'] );
-		$settings['post'] = array(
-			'id' => $post->ID,
-			'nonce' => wp_create_nonce( 'update-post_' . $post->ID ),
-		);
-
-		$thumbnail_support = current_theme_supports( 'post-thumbnails', $post->post_type ) && post_type_supports( $post->post_type, 'thumbnail' );
-		if ( ! $thumbnail_support && 'attachment' === $post->post_type && $post->post_mime_type ) {
-			if ( wp_attachment_is( 'audio', $post ) ) {
-				$thumbnail_support = post_type_supports( 'attachment:audio', 'thumbnail' ) || current_theme_supports( 'post-thumbnails', 'attachment:audio' );
-			} elseif ( wp_attachment_is( 'video', $post ) ) {
-				$thumbnail_support = post_type_supports( 'attachment:video', 'thumbnail' ) || current_theme_supports( 'post-thumbnails', 'attachment:video' );
-			}
-		}
-
-		if ( $thumbnail_support ) {
-			$featured_image_id = get_post_meta( $post->ID, '_thumbnail_id', true );
-			$settings['post']['featuredImageId'] = $featured_image_id ? $featured_image_id : -1;
-		}
-	}
-
-	if ( $post ) {
-		$post_type_object = get_post_type_object( $post->post_type );
-	} else {
-		$post_type_object = get_post_type_object( 'post' );
-	}
-
-	$strings = array(
-		// Generic
-		'url'         => __( 'URL' ),
-		'addMedia'    => __( 'Add Media' ),
-		'search'      => __( 'Search' ),
-		'select'      => __( 'Select' ),
-		'cancel'      => __( 'Cancel' ),
-		'update'      => __( 'Update' ),
-		'replace'     => __( 'Replace' ),
-		'remove'      => __( 'Remove' ),
-		'back'        => __( 'Back' ),
-		/* translators: This is a would-be plural string used in the media manager.
-		   If there is not a word you can use in your language to avoid issues with the
-		   lack of plural support here, turn it into "selected: %d" then translate it.
-		 */
-		'selected'    => __( '%d selected' ),
-		'dragInfo'    => __( 'Drag and drop to reorder media files.' ),
-
-		// Upload
-		'uploadFilesTitle'  => __( 'Upload Files' ),
-		'uploadImagesTitle' => __( 'Upload Images' ),
-
-		// Library
-		'mediaLibraryTitle'      => __( 'Media Library' ),
-		'insertMediaTitle'       => __( 'Insert Media' ),
-		'createNewGallery'       => __( 'Create a new gallery' ),
-		'createNewPlaylist'      => __( 'Create a new playlist' ),
-		'createNewVideoPlaylist' => __( 'Create a new video playlist' ),
-		'returnToLibrary'        => __( '&#8592; Return to library' ),
-		'allMediaItems'          => __( 'All media items' ),
-		'allDates'               => __( 'All dates' ),
-		'noItemsFound'           => __( 'No items found.' ),
-		'insertIntoPost'         => $post_type_object->labels->insert_into_item,
-		'unattached'             => __( 'Unattached' ),
-		'trash'                  => _x( 'Trash', 'noun' ),
-		'uploadedToThisPost'     => $post_type_object->labels->uploaded_to_this_item,
-		'warnDelete'             => __( "You are about to permanently delete this item.\n  'Cancel' to stop, 'OK' to delete." ),
-		'warnBulkDelete'         => __( "You are about to permanently delete these items.\n  'Cancel' to stop, 'OK' to delete." ),
-		'warnBulkTrash'          => __( "You are about to trash these items.\n  'Cancel' to stop, 'OK' to delete." ),
-		'bulkSelect'             => __( 'Bulk Select' ),
-		'cancelSelection'        => __( 'Cancel Selection' ),
-		'trashSelected'          => __( 'Trash Selected' ),
-		'untrashSelected'        => __( 'Untrash Selected' ),
-		'deleteSelected'         => __( 'Delete Selected' ),
-		'deletePermanently'      => __( 'Delete Permanently' ),
-		'apply'                  => __( 'Apply' ),
-		'filterByDate'           => __( 'Filter by date' ),
-		'filterByType'           => __( 'Filter by type' ),
-		'searchMediaLabel'       => __( 'Search Media' ),
-		'noMedia'                => __( 'No media files found.' ),
-
-		// Library Details
-		'attachmentDetails'  => __( 'Attachment Details' ),
-
-		// From URL
-		'insertFromUrlTitle' => __( 'Insert from URL' ),
-
-		// Featured Images
-		'setFeaturedImageTitle' => $post_type_object->labels->featured_image,
-		'setFeaturedImage'      => $post_type_object->labels->set_featured_image,
-
-		// Gallery
-		'createGalleryTitle' => __( 'Create Gallery' ),
-		'editGalleryTitle'   => __( 'Edit Gallery' ),
-		'cancelGalleryTitle' => __( '&#8592; Cancel Gallery' ),
-		'insertGallery'      => __( 'Insert gallery' ),
-		'updateGallery'      => __( 'Update gallery' ),
-		'addToGallery'       => __( 'Add to gallery' ),
-		'addToGalleryTitle'  => __( 'Add to Gallery' ),
-		'reverseOrder'       => __( 'Reverse order' ),
-
-		// Edit Image
-		'imageDetailsTitle'     => __( 'Image Details' ),
-		'imageReplaceTitle'     => __( 'Replace Image' ),
-		'imageDetailsCancel'    => __( 'Cancel Edit' ),
-		'editImage'             => __( 'Edit Image' ),
-
-		// Crop Image
-		'chooseImage' => __( 'Choose Image' ),
-		'selectAndCrop' => __( 'Select and Crop' ),
-		'skipCropping' => __( 'Skip Cropping' ),
-		'cropImage' => __( 'Crop Image' ),
-		'cropYourImage' => __( 'Crop your image' ),
-		'cropping' => __( 'Cropping&hellip;' ),
-		'suggestedDimensions' => __( 'Suggested image dimensions:' ),
-		'cropError' => __( 'There has been an error cropping your image.' ),
-
-		// Edit Audio
-		'audioDetailsTitle'     => __( 'Audio Details' ),
-		'audioReplaceTitle'     => __( 'Replace Audio' ),
-		'audioAddSourceTitle'   => __( 'Add Audio Source' ),
-		'audioDetailsCancel'    => __( 'Cancel Edit' ),
-
-		// Edit Video
-		'videoDetailsTitle'     => __( 'Video Details' ),
-		'videoReplaceTitle'     => __( 'Replace Video' ),
-		'videoAddSourceTitle'   => __( 'Add Video Source' ),
-		'videoDetailsCancel'    => __( 'Cancel Edit' ),
-		'videoSelectPosterImageTitle' => __( 'Select Poster Image' ),
-		'videoAddTrackTitle'	=> __( 'Add Subtitles' ),
-
- 		// Playlist
- 		'playlistDragInfo'    => __( 'Drag and drop to reorder tracks.' ),
- 		'createPlaylistTitle' => __( 'Create Audio Playlist' ),
- 		'editPlaylistTitle'   => __( 'Edit Audio Playlist' ),
- 		'cancelPlaylistTitle' => __( '&#8592; Cancel Audio Playlist' ),
- 		'insertPlaylist'      => __( 'Insert audio playlist' ),
- 		'updatePlaylist'      => __( 'Update audio playlist' ),
- 		'addToPlaylist'       => __( 'Add to audio playlist' ),
- 		'addToPlaylistTitle'  => __( 'Add to Audio Playlist' ),
-
- 		// Video Playlist
- 		'videoPlaylistDragInfo'    => __( 'Drag and drop to reorder videos.' ),
- 		'createVideoPlaylistTitle' => __( 'Create Video Playlist' ),
- 		'editVideoPlaylistTitle'   => __( 'Edit Video Playlist' ),
- 		'cancelVideoPlaylistTitle' => __( '&#8592; Cancel Video Playlist' ),
- 		'insertVideoPlaylist'      => __( 'Insert video playlist' ),
- 		'updateVideoPlaylist'      => __( 'Update video playlist' ),
- 		'addToVideoPlaylist'       => __( 'Add to video playlist' ),
- 		'addToVideoPlaylistTitle'  => __( 'Add to Video Playlist' ),
-	);
-
-	/**
-	 * Filters the media view settings.
-	 *
-	 * @since 3.5.0
-	 *
-	 * @param array   $settings List of media view settings.
-	 * @param WP_Post $post     Post object.
-	 */
-	$settings = apply_filters( 'media_view_settings', $settings, $post );
-
-	/**
-	 * Filters the media view strings.
-	 *
-	 * @since 3.5.0
-	 *
-	 * @param array   $strings List of media view strings.
-	 * @param WP_Post $post    Post object.
-	 */
-	$strings = apply_filters( 'media_view_strings', $strings,  $post );
-
-	$strings['settings'] = $settings;
-
-	// Ensure we enqueue media-editor first, that way media-views is
-	// registered internally before we try to localize it. see #24724.
-	wp_enqueue_script( 'media-editor' );
-	wp_localize_script( 'media-views', '_wpMediaViewsL10n', $strings );
-
-	wp_enqueue_script( 'media-audiovideo' );
-	wp_enqueue_style( 'media-views' );
-	if ( is_admin() ) {
-		wp_enqueue_script( 'mce-view' );
-		wp_enqueue_script( 'image-edit' );
-	}
-	wp_enqueue_style( 'imgareaselect' );
-	wp_plupload_default_settings();
-
-	require_once ABSPATH . WPINC . '/media-template.php';
-	add_action( 'admin_footer', 'wp_print_media_templates' );
-	add_action( 'wp_footer', 'wp_print_media_templates' );
-	add_action( 'customize_controls_print_footer_scripts', 'wp_print_media_templates' );
-
-	/**
-	 * Fires at the conclusion of wp_enqueue_media().
-	 *
-	 * @since 3.5.0
-	 */
-	do_action( 'wp_enqueue_media' );
-}
-
-/**
- * Retrieves media attached to the passed post.
- *
- * @since 3.6.0
- *
- * @param string      $type Mime type.
- * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
- * @return array Found attachments.
- */
-function get_attached_media( $type, $post = 0 ) {
-	if ( ! $post = get_post( $post ) )
-		return array();
-
-	$args = array(
-		'post_parent' => $post->ID,
-		'post_type' => 'attachment',
-		'post_mime_type' => $type,
-		'posts_per_page' => -1,
-		'orderby' => 'menu_order',
-		'order' => 'ASC',
-	);
-
-	/**
-	 * Filters arguments used to retrieve media attached to the given post.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param array  $args Post query arguments.
-	 * @param string $type Mime type of the desired media.
-	 * @param mixed  $post Post ID or object.
-	 */
-	$args = apply_filters( 'get_attached_media_args', $args, $type, $post );
-
-	$children = get_children( $args );
-
-	/**
-	 * Filters the list of media attached to the given post.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param array  $children Associative array of media attached to the given post.
-	 * @param string $type     Mime type of the media desired.
-	 * @param mixed  $post     Post ID or object.
-	 */
-	return (array) apply_filters( 'get_attached_media', $children, $type, $post );
-}
-
-/**
- * Check the content blob for an audio, video, object, embed, or iframe tags.
- *
- * @since 3.6.0
- *
- * @param string $content A string which might contain media data.
- * @param array  $types   An array of media types: 'audio', 'video', 'object', 'embed', or 'iframe'.
- * @return array A list of found HTML media embeds.
- */
-function get_media_embedded_in_content( $content, $types = null ) {
-	$html = array();
-
-	/**
-	 * Filters the embedded media types that are allowed to be returned from the content blob.
-	 *
-	 * @since 4.2.0
-	 *
-	 * @param array $allowed_media_types An array of allowed media types. Default media types are
-	 *                                   'audio', 'video', 'object', 'embed', and 'iframe'.
-	 */
-	$allowed_media_types = apply_filters( 'media_embedded_in_content_allowed_types', array( 'audio', 'video', 'object', 'embed', 'iframe' ) );
-
-	if ( ! empty( $types ) ) {
-		if ( ! is_array( $types ) ) {
-			$types = array( $types );
-		}
-
-		$allowed_media_types = array_intersect( $allowed_media_types, $types );
-	}
-
-	$tags = implode( '|', $allowed_media_types );
-
-	if ( preg_match_all( '#<(?P<tag>' . $tags . ')[^<]*?(?:>[\s\S]*?<\/(?P=tag)>|\s*\/>)#', $content, $matches ) ) {
-		foreach ( $matches[0] as $match ) {
-			$html[] = $match;
-		}
-	}
-
-	return $html;
-}
-
-/**
- * Retrieves galleries from the passed post's content.
- *
- * @since 3.6.0
- *
- * @param int|WP_Post $post Post ID or object.
- * @param bool        $html Optional. Whether to return HTML or data in the array. Default true.
- * @return array A list of arrays, each containing gallery data and srcs parsed
- *               from the expanded shortcode.
- */
-function get_post_galleries( $post, $html = true ) {
-	if ( ! $post = get_post( $post ) )
-		return array();
-
-	if ( ! has_shortcode( $post->post_content, 'gallery' ) )
-		return array();
-
-	$galleries = array();
-	if ( preg_match_all( '/' . get_shortcode_regex() . '/s', $post->post_content, $matches, PREG_SET_ORDER ) ) {
-		foreach ( $matches as $shortcode ) {
-			if ( 'gallery' === $shortcode[2] ) {
-				$srcs = array();
-
-				$gallery = do_shortcode_tag( $shortcode );
-				if ( $html ) {
-					$galleries[] = $gallery;
-				} else {
-					preg_match_all( '#src=([\'"])(.+?)\1#is', $gallery, $src, PREG_SET_ORDER );
-					if ( ! empty( $src ) ) {
-						foreach ( $src as $s )
-							$srcs[] = $s[2];
-					}
-
-					$data = shortcode_parse_atts( $shortcode[3] );
-					$data['src'] = array_values( array_unique( $srcs ) );
-					$galleries[] = $data;
-				}
-			}
-		}
-	}
-
-	/**
-	 * Filters the list of all found galleries in the given post.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param array   $galleries Associative array of all found post galleries.
-	 * @param WP_Post $post      Post object.
-	 */
-	return apply_filters( 'get_post_galleries', $galleries, $post );
-}
-
-/**
- * Check a specified post's content for gallery and, if present, return the first
- *
- * @since 3.6.0
- *
- * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
- * @param bool        $html Optional. Whether to return HTML or data. Default is true.
- * @return string|array Gallery data and srcs parsed from the expanded shortcode.
- */
-function get_post_gallery( $post = 0, $html = true ) {
-	$galleries = get_post_galleries( $post, $html );
-	$gallery = reset( $galleries );
-
-	/**
-	 * Filters the first-found post gallery.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param array       $gallery   The first-found post gallery.
-	 * @param int|WP_Post $post      Post ID or object.
-	 * @param array       $galleries Associative array of all found post galleries.
-	 */
-	return apply_filters( 'get_post_gallery', $gallery, $post, $galleries );
-}
-
-/**
- * Retrieve the image srcs from galleries from a post's content, if present
- *
- * @since 3.6.0
- *
- * @see get_post_galleries()
- *
- * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`.
- * @return array A list of lists, each containing image srcs parsed.
- *               from an expanded shortcode
- */
-function get_post_galleries_images( $post = 0 ) {
-	$galleries = get_post_galleries( $post, false );
-	return wp_list_pluck( $galleries, 'src' );
-}
-
-/**
- * Checks a post's content for galleries and return the image srcs for the first found gallery
- *
- * @since 3.6.0
- *
- * @see get_post_gallery()
- *
- * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`.
- * @return array A list of a gallery's image srcs in order.
- */
-function get_post_gallery_images( $post = 0 ) {
-	$gallery = get_post_gallery( $post, false );
-	return empty( $gallery['src'] ) ? array() : $gallery['src'];
-}
-
-/**
- * Maybe attempts to generate attachment metadata, if missing.
- *
- * @since 3.9.0
- *
- * @param WP_Post $attachment Attachment object.
- */
-function wp_maybe_generate_attachment_metadata( $attachment ) {
-	if ( empty( $attachment ) || ( empty( $attachment->ID ) || ! $attachment_id = (int) $attachment->ID ) ) {
-		return;
-	}
-
-	$file = get_attached_file( $attachment_id );
-	$meta = wp_get_attachment_metadata( $attachment_id );
-	if ( empty( $meta ) && file_exists( $file ) ) {
-		$_meta = get_post_meta( $attachment_id );
-		$regeneration_lock = 'wp_generating_att_' . $attachment_id;
-		if ( ! array_key_exists( '_wp_attachment_metadata', $_meta ) && ! get_transient( $regeneration_lock ) ) {
-			set_transient( $regeneration_lock, $file );
-			wp_update_attachment_metadata( $attachment_id, wp_generate_attachment_metadata( $attachment_id, $file ) );
-			delete_transient( $regeneration_lock );
-		}
-	}
-}
-
-/**
- * Tries to convert an attachment URL into a post ID.
- *
- * @since 4.0.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param string $url The URL to resolve.
- * @return int The found post ID, or 0 on failure.
- */
-function attachment_url_to_postid( $url ) {
-	global $wpdb;
-
-	$dir = wp_get_upload_dir();
-	$path = $url;
-
-	$site_url = parse_url( $dir['url'] );
-	$image_path = parse_url( $path );
-
-	//force the protocols to match if needed
-	if ( isset( $image_path['scheme'] ) && ( $image_path['scheme'] !== $site_url['scheme'] ) ) {
-		$path = str_replace( $image_path['scheme'], $site_url['scheme'], $path );
-	}
-
-	if ( 0 === strpos( $path, $dir['baseurl'] . '/' ) ) {
-		$path = substr( $path, strlen( $dir['baseurl'] . '/' ) );
-	}
-
-	$sql = $wpdb->prepare(
-		"SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = %s",
-		$path
-	);
-	$post_id = $wpdb->get_var( $sql );
-
-	/**
-	 * Filters an attachment id found by URL.
-	 *
-	 * @since 4.2.0
-	 *
-	 * @param int|null $post_id The post_id (if any) found by the function.
-	 * @param string   $url     The URL being looked up.
-	 */
-	return (int) apply_filters( 'attachment_url_to_postid', $post_id, $url );
-}
-
-/**
- * Returns the URLs for CSS files used in an iframe-sandbox'd TinyMCE media view.
- *
- * @since 4.0.0
- *
- * @return array The relevant CSS file URLs.
- */
-function wpview_media_sandbox_styles() {
- 	$version = 'ver=' . get_bloginfo( 'version' );
- 	$mediaelement = includes_url( "js/mediaelement/mediaelementplayer.min.css?$version" );
- 	$wpmediaelement = includes_url( "js/mediaelement/wp-mediaelement.css?$version" );
-
-	return array( $mediaelement, $wpmediaelement );
-}
Index: www/wp-admin/includes/ajax-actions.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/includes/ajax-actions.php	(revision 38565)
+++ www/wp-admin/includes/ajax-actions.php	(revision )
@@ -1495,7 +1495,6 @@
 
 	$args['pagenum'] = ! empty( $_POST['page'] ) ? absint( $_POST['page'] ) : 1;
 
-	require(ABSPATH . WPINC . '/class-wp-editor.php');
 	$results = _WP_Editors::wp_link_query( $args );
 
 	if ( ! isset( $results ) )
Index: www/wp-includes/class-wp-customize-section.php
===================================================================
--- www/wp-includes/class-wp-customize-section.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Section.php	(revision )
@@ -374,14 +374,3 @@
 	}
 }
 
-/** WP_Customize_Themes_Section class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-themes-section.php' );
-
-/** WP_Customize_Sidebar_Section class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-sidebar-section.php' );
-
-/** WP_Customize_Nav_Menu_Section class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-section.php' );
-
-/** WP_Customize_New_Menu_Section class */
-require_once( ABSPATH . WPINC . '/customize/class-wp-customize-new-menu-section.php' );
Index: www/wp-includes/class-wp-http-proxy.php
===================================================================
--- www/wp-includes/class-wp-http-proxy.php	(revision 38565)
+++ www/wp-includes/autoload/http/WP_HTTP_Proxy.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/Requests/Proxy/HTTP.php
===================================================================
--- www/wp-includes/Requests/Proxy/HTTP.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Proxy_HTTP.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/customize/class-wp-customize-nav-menu-name-control.php
===================================================================
--- www/wp-includes/customize/class-wp-customize-nav-menu-name-control.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Nav_Menu_Name_Control.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/customize/class-wp-widget-form-customize-control.php
===================================================================
--- www/wp-includes/customize/class-wp-widget-form-customize-control.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Widget_Form_Customize_Control.php	(revision )
@@ -39,7 +39,7 @@
 		}
 
 		// Get the widget_control and widget_content.
-		require_once ABSPATH . '/wp-admin/includes/widgets.php';
+		require_once ABSPATH . 'wp-admin/includes/widgets.php';
 
 		$widget = $wp_registered_widgets[ $this->widget_id ];
 		if ( ! isset( $widget['params'][0] ) ) {
Index: www/wp-includes/class-pop3.php
===================================================================
--- www/wp-includes/class-pop3.php	(revision 38565)
+++ www/wp-includes/autoload/external/POP3.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/wlwmanifest.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/wlwmanifest.xml	(revision 38565)
+++ www/wp-includes/wlwmanifest.xml	(revision 38565)
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-
-<manifest xmlns="http://schemas.microsoft.com/wlw/manifest/weblog">
-
-  <options>
-    <clientType>WordPress</clientType>
-	<supportsKeywords>Yes</supportsKeywords>
-	<supportsGetTags>Yes</supportsGetTags>
-  </options>
-
-  <weblog>
-    <serviceName>WordPress</serviceName>
-    <imageUrl>images/wlw/wp-icon.png</imageUrl>
-    <watermarkImageUrl>images/wlw/wp-watermark.png</watermarkImageUrl>
-    <homepageLinkText>View site</homepageLinkText>
-    <adminLinkText>Dashboard</adminLinkText>
-    <adminUrl>
-      <![CDATA[
-			{blog-postapi-url}/../wp-admin/
-		]]>
-    </adminUrl>
-    <postEditingUrl>
-      <![CDATA[
-			{blog-postapi-url}/../wp-admin/post.php?action=edit&post={post-id}
-		]]>
-    </postEditingUrl>
-  </weblog>
-
-  <buttons>
-    <button>
-      <id>0</id>
-      <text>Manage Comments</text>
-      <imageUrl>images/wlw/wp-comments.png</imageUrl>
-      <clickUrl>
-        <![CDATA[
-				{blog-postapi-url}/../wp-admin/edit-comments.php
-			]]>
-      </clickUrl>
-    </button>
-
-  </buttons>
-
-</manifest>
Index: www/wp-includes/autoload/requests/Exception/HTTP/304.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/304.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/304.php	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-<?php
-/**
- * Exception for 304 Not Modified responses
- *
- * @package Requests
- */
-
-/**
- * Exception for 304 Not Modified responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_304 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 304;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Not Modified';
-}
\ No newline at end of file
Index: www/wp-includes/autoload/customize/class-wp-customize-nav-menu-control.php
===================================================================
--- www/wp-includes/autoload/customize/class-wp-customize-nav-menu-control.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/customize/class-wp-customize-nav-menu-control.php	(revision UNDEFINED)
@@ -1,102 +0,0 @@
-<?php
-/**
- * Customize API: WP_Customize_Nav_Menu_Control class
- *
- * @package WordPress
- * @subpackage Customize
- * @since 4.4.0
- */
-
-/**
- * Customize Nav Menu Control Class.
- *
- * @since 4.3.0
- */
-class WP_Customize_Nav_Menu_Control extends WP_Customize_Control {
-
-	/**
-	 * Control type.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var string
-	 */
-	public $type = 'nav_menu';
-
-	/**
-	 * The nav menu setting.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var WP_Customize_Nav_Menu_Setting
-	 */
-	public $setting;
-
-	/**
-	 * Don't render the control's content - it uses a JS template instead.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 */
-	public function render_content() {}
-
-	/**
-	 * JS/Underscore template for the control UI.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 */
-	public function content_template() {
-		?>
-		<button type="button" class="button-secondary add-new-menu-item" aria-label="<?php esc_attr_e( 'Add or remove menu items' ); ?>" aria-expanded="false" aria-controls="available-menu-items">
-			<?php _e( 'Add Items' ); ?>
-		</button>
-		<button type="button" class="button-link reorder-toggle" aria-label="<?php esc_attr_e( 'Reorder menu items' ); ?>" aria-describedby="reorder-items-desc-{{ data.menu_id }}">
-			<span class="reorder"><?php _ex( 'Reorder', 'Reorder menu items in Customizer' ); ?></span>
-			<span class="reorder-done"><?php _ex( 'Done', 'Cancel reordering menu items in Customizer' ); ?></span>
-		</button>
-		<p class="screen-reader-text" id="reorder-items-desc-{{ data.menu_id }}"><?php _e( 'When in reorder mode, additional controls to reorder menu items will be available in the items list above.' ); ?></p>
-		<span class="menu-delete-item">
-			<button type="button" class="button-link menu-delete">
-				<?php _e( 'Delete Menu' ); ?>
-			</button>
-		</span>
-		<?php if ( current_theme_supports( 'menus' ) ) : ?>
-		<ul class="menu-settings">
-			<li class="customize-control">
-				<span class="customize-control-title"><?php _e( 'Menu Locations' ); ?></span>
-			</li>
-
-			<?php foreach ( get_registered_nav_menus() as $location => $description ) : ?>
-			<li class="customize-control customize-control-checkbox assigned-menu-location">
-				<label>
-					<input type="checkbox" data-menu-id="{{ data.menu_id }}" data-location-id="<?php echo esc_attr( $location ); ?>" class="menu-location" /> <?php echo $description; ?>
-					<span class="theme-location-set"><?php
-						/* translators: %s: menu name */
-						printf( _x( '(Current: %s)', 'menu location' ),
-							'<span class="current-menu-location-name-' . esc_attr( $location ) . '"></span>'
-						);
-					?></span>
-				</label>
-			</li>
-			<?php endforeach; ?>
-
-		</ul>
-		<?php endif;
-	}
-
-	/**
-	 * Return parameters for this control.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 *
-	 * @return array Exported parameters.
-	 */
-	public function json() {
-		$exported            = parent::json();
-		$exported['menu_id'] = $this->setting->term_id;
-
-		return $exported;
-	}
-}
Index: www/wp-includes/customize/class-wp-customize-background-image-setting.php
===================================================================
--- www/wp-includes/customize/class-wp-customize-background-image-setting.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Background_Image_Setting.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/includes/class-wp-ms-sites-list-table.php
===================================================================
--- www/wp-admin/includes/class-wp-ms-sites-list-table.php	(revision 38565)
+++ www/wp-admin/autoload/list-table/WP_MS_Sites_List_Table.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/requests/Exception/HTTP/403.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/403.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/403.php	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-<?php
-/**
- * Exception for 403 Forbidden responses
- *
- * @package Requests
- */
-
-/**
- * Exception for 403 Forbidden responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_403 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 403;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Forbidden';
-}
\ No newline at end of file
Index: www/wp-admin/options-discussion.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/options-discussion.php	(revision 38565)
+++ www/wp-admin/options-discussion.php	(revision 38565)
@@ -1,279 +0,0 @@
-<?php
-/**
- * Discussion settings administration panel.
- *
- * @package WordPress
- * @subpackage Administration
- */
-/** WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-if ( ! current_user_can( 'manage_options' ) )
-	wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
-
-$title = __('Discussion Settings');
-$parent_file = 'options-general.php';
-
-add_action( 'admin_print_footer_scripts', 'options_discussion_add_js' );
-
-get_current_screen()->add_help_tab( array(
-	'id'      => 'overview',
-	'title'   => __('Overview'),
-	'content' => '<p>' . __('This screen provides many options for controlling the management and display of comments and links to your posts/pages. So many, in fact, they won&#8217;t all fit here! :) Use the documentation links to get information on what each discussion setting does.') . '</p>' .
-		'<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>',
-) );
-
-get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Settings_Discussion_Screen" target="_blank">Documentation on Discussion Settings</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
-);
-
-include( ABSPATH . 'wp-admin/admin-header.php' );
-?>
-
-<div class="wrap">
-<h1><?php echo esc_html( $title ); ?></h1>
-
-<form method="post" action="options.php">
-<?php settings_fields('discussion'); ?>
-
-<table class="form-table">
-<tr>
-<th scope="row"><?php _e('Default article settings'); ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Default article settings'); ?></span></legend>
-<label for="default_pingback_flag">
-<input name="default_pingback_flag" type="checkbox" id="default_pingback_flag" value="1" <?php checked('1', get_option('default_pingback_flag')); ?> />
-<?php _e('Attempt to notify any blogs linked to from the article'); ?></label>
-<br />
-<label for="default_ping_status">
-<input name="default_ping_status" type="checkbox" id="default_ping_status" value="open" <?php checked('open', get_option('default_ping_status')); ?> />
-<?php _e('Allow link notifications from other blogs (pingbacks and trackbacks) on new articles'); ?></label>
-<br />
-<label for="default_comment_status">
-<input name="default_comment_status" type="checkbox" id="default_comment_status" value="open" <?php checked('open', get_option('default_comment_status')); ?> />
-<?php _e('Allow people to post comments on new articles'); ?></label>
-<br />
-<p class="description"><?php echo '(' . __( 'These settings may be overridden for individual articles.' ) . ')'; ?></p>
-</fieldset></td>
-</tr>
-<tr>
-<th scope="row"><?php _e('Other comment settings'); ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Other comment settings'); ?></span></legend>
-<label for="require_name_email"><input type="checkbox" name="require_name_email" id="require_name_email" value="1" <?php checked('1', get_option('require_name_email')); ?> /> <?php _e('Comment author must fill out name and email'); ?></label>
-<br />
-<label for="comment_registration">
-<input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked('1', get_option('comment_registration')); ?> />
-<?php _e('Users must be registered and logged in to comment'); ?>
-<?php if ( !get_option( 'users_can_register' ) && is_multisite() ) echo ' ' . __( '(Signup has been disabled. Only members of this site can comment.)' ); ?>
-</label>
-<br />
-
-<label for="close_comments_for_old_posts">
-<input name="close_comments_for_old_posts" type="checkbox" id="close_comments_for_old_posts" value="1" <?php checked('1', get_option('close_comments_for_old_posts')); ?> />
-<?php printf( __('Automatically close comments on articles older than %s days'), '</label><label for="close_comments_days_old"><input name="close_comments_days_old" type="number" min="0" step="1" id="close_comments_days_old" value="' . esc_attr(get_option('close_comments_days_old')) . '" class="small-text" />'); ?>
-</label>
-<br />
-<label for="thread_comments">
-<input name="thread_comments" type="checkbox" id="thread_comments" value="1" <?php checked('1', get_option('thread_comments')); ?> />
-<?php
-/**
- * Filters the maximum depth of threaded/nested comments.
- *
- * @since 2.7.0.
- *
- * @param int $max_depth The maximum depth of threaded comments. Default 10.
- */
-$maxdeep = (int) apply_filters( 'thread_comments_depth_max', 10 );
-
-$thread_comments_depth = '</label><label for="thread_comments_depth"><select name="thread_comments_depth" id="thread_comments_depth">';
-for ( $i = 2; $i <= $maxdeep; $i++ ) {
-	$thread_comments_depth .= "<option value='" . esc_attr($i) . "'";
-	if ( get_option('thread_comments_depth') == $i ) $thread_comments_depth .= " selected='selected'";
-	$thread_comments_depth .= ">$i</option>";
-}
-$thread_comments_depth .= '</select>';
-
-printf( __('Enable threaded (nested) comments %s levels deep'), $thread_comments_depth );
-
-?></label>
-<br />
-<label for="page_comments">
-<input name="page_comments" type="checkbox" id="page_comments" value="1" <?php checked( '1', get_option( 'page_comments' ) ); ?> />
-<?php
-$default_comments_page = '</label><label for="default_comments_page"><select name="default_comments_page" id="default_comments_page"><option value="newest"';
-if ( 'newest' == get_option('default_comments_page') ) $default_comments_page .= ' selected="selected"';
-$default_comments_page .= '>' . __('last') . '</option><option value="oldest"';
-if ( 'oldest' == get_option('default_comments_page') ) $default_comments_page .= ' selected="selected"';
-$default_comments_page .= '>' . __('first') . '</option></select>';
-
-printf( __('Break comments into pages with %1$s top level comments per page and the %2$s page displayed by default'), '</label><label for="comments_per_page"><input name="comments_per_page" type="number" step="1" min="0" id="comments_per_page" value="' . esc_attr(get_option('comments_per_page')) . '" class="small-text" />', $default_comments_page );
-
-?></label>
-<br />
-<label for="comment_order"><?php
-
-$comment_order = '<select name="comment_order" id="comment_order"><option value="asc"';
-if ( 'asc' == get_option('comment_order') ) $comment_order .= ' selected="selected"';
-$comment_order .= '>' . __('older') . '</option><option value="desc"';
-if ( 'desc' == get_option('comment_order') ) $comment_order .= ' selected="selected"';
-$comment_order .= '>' . __('newer') . '</option></select>';
-
-printf( __('Comments should be displayed with the %s comments at the top of each page'), $comment_order );
-
-?></label>
-</fieldset></td>
-</tr>
-<tr>
-<th scope="row"><?php _e('Email me whenever'); ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Email me whenever'); ?></span></legend>
-<label for="comments_notify">
-<input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked('1', get_option('comments_notify')); ?> />
-<?php _e('Anyone posts a comment'); ?> </label>
-<br />
-<label for="moderation_notify">
-<input name="moderation_notify" type="checkbox" id="moderation_notify" value="1" <?php checked('1', get_option('moderation_notify')); ?> />
-<?php _e('A comment is held for moderation'); ?> </label>
-</fieldset></td>
-</tr>
-<tr>
-<th scope="row"><?php _e('Before a comment appears'); ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Before a comment appears'); ?></span></legend>
-<label for="comment_moderation">
-<input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked('1', get_option('comment_moderation')); ?> />
-<?php _e('Comment must be manually approved'); ?> </label>
-<br />
-<label for="comment_whitelist"><input type="checkbox" name="comment_whitelist" id="comment_whitelist" value="1" <?php checked('1', get_option('comment_whitelist')); ?> /> <?php _e('Comment author must have a previously approved comment'); ?></label>
-</fieldset></td>
-</tr>
-<tr>
-<th scope="row"><?php _e('Comment Moderation'); ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Comment Moderation'); ?></span></legend>
-<p><label for="comment_max_links"><?php printf(__('Hold a comment in the queue if it contains %s or more links. (A common characteristic of comment spam is a large number of hyperlinks.)'), '<input name="comment_max_links" type="number" step="1" min="0" id="comment_max_links" value="' . esc_attr(get_option('comment_max_links')) . '" class="small-text" />' ); ?></label></p>
-
-<p><label for="moderation_keys"><?php _e('When a comment contains any of these words in its content, name, URL, email, or IP, it will be held in the <a href="edit-comments.php?comment_status=moderated">moderation queue</a>. One word or IP per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.'); ?></label></p>
-<p>
-<textarea name="moderation_keys" rows="10" cols="50" id="moderation_keys" class="large-text code"><?php echo esc_textarea( get_option( 'moderation_keys' ) ); ?></textarea>
-</p>
-</fieldset></td>
-</tr>
-<tr>
-<th scope="row"><?php _e('Comment Blacklist'); ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Comment Blacklist'); ?></span></legend>
-<p><label for="blacklist_keys"><?php _e('When a comment contains any of these words in its content, name, URL, email, or IP, it will be put in the trash. One word or IP per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.'); ?></label></p>
-<p>
-<textarea name="blacklist_keys" rows="10" cols="50" id="blacklist_keys" class="large-text code"><?php echo esc_textarea( get_option( 'blacklist_keys' ) ); ?></textarea>
-</p>
-</fieldset></td>
-</tr>
-<?php do_settings_fields('discussion', 'default'); ?>
-</table>
-
-<h2 class="title"><?php _e('Avatars'); ?></h2>
-
-<p><?php _e('An avatar is an image that follows you from weblog to weblog appearing beside your name when you comment on avatar enabled sites. Here you can enable the display of avatars for people who comment on your site.'); ?></p>
-
-<?php
-// the above would be a good place to link to codex documentation on the gravatar functions, for putting it in themes. anything like that?
-
-$show_avatars = get_option( 'show_avatars' );
-?>
-
-<table class="form-table">
-<tr>
-<th scope="row"><?php _e('Avatar Display'); ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Avatar Display'); ?></span></legend>
-	<label for="show_avatars">
-		<input type="checkbox" id="show_avatars" name="show_avatars" value="1" <?php checked( $show_avatars, 1 ); ?> />
-		<?php _e( 'Show Avatars' ); ?>
-	</label>
-</fieldset></td>
-</tr>
-<tr class="avatar-settings<?php if ( ! $show_avatars ) echo ' hide-if-js'; ?>">
-<th scope="row"><?php _e('Maximum Rating'); ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Maximum Rating'); ?></span></legend>
-
-<?php
-$ratings = array(
-	/* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */
-	'G' => __('G &#8212; Suitable for all audiences'),
-	/* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */
-	'PG' => __('PG &#8212; Possibly offensive, usually for audiences 13 and above'),
-	/* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */
-	'R' => __('R &#8212; Intended for adult audiences above 17'),
-	/* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */
-	'X' => __('X &#8212; Even more mature than above')
-);
-foreach ($ratings as $key => $rating) :
-	$selected = (get_option('avatar_rating') == $key) ? 'checked="checked"' : '';
-	echo "\n\t<label><input type='radio' name='avatar_rating' value='" . esc_attr($key) . "' $selected/> $rating</label><br />";
-endforeach;
-?>
-
-</fieldset></td>
-</tr>
-<tr class="avatar-settings<?php if ( ! $show_avatars ) echo ' hide-if-js'; ?>">
-<th scope="row"><?php _e('Default Avatar'); ?></th>
-<td class="defaultavatarpicker"><fieldset><legend class="screen-reader-text"><span><?php _e('Default Avatar'); ?></span></legend>
-
-<?php _e('For users without a custom avatar of their own, you can either display a generic logo or a generated one based on their email address.'); ?><br />
-
-<?php
-$avatar_defaults = array(
-	'mystery' => __('Mystery Person'),
-	'blank' => __('Blank'),
-	'gravatar_default' => __('Gravatar Logo'),
-	'identicon' => __('Identicon (Generated)'),
-	'wavatar' => __('Wavatar (Generated)'),
-	'monsterid' => __('MonsterID (Generated)'),
-	'retro' => __('Retro (Generated)')
-);
-/**
- * Filters the default avatars.
- *
- * Avatars are stored in key/value pairs, where the key is option value,
- * and the name is the displayed avatar name.
- *
- * @since 2.6.0
- *
- * @param array $avatar_defaults Array of default avatars.
- */
-$avatar_defaults = apply_filters( 'avatar_defaults', $avatar_defaults );
-$default = get_option( 'avatar_default', 'mystery' );
-$avatar_list = '';
-
-// Force avatars on to display these choices
-add_filter( 'pre_option_show_avatars', '__return_true', 100 );
-
-foreach ( $avatar_defaults as $default_key => $default_name ) {
-	$selected = ($default == $default_key) ? 'checked="checked" ' : '';
-	$avatar_list .= "\n\t<label><input type='radio' name='avatar_default' id='avatar_{$default_key}' value='" . esc_attr($default_key) . "' {$selected}/> ";
-	$avatar_list .= get_avatar( $user_email, 32, $default_key, '', array( 'force_default' => true ) );
-	$avatar_list .= ' ' . $default_name . '</label>';
-	$avatar_list .= '<br />';
-}
-
-remove_filter( 'pre_option_show_avatars', '__return_true', 100 );
-
-/**
- * Filters the HTML output of the default avatar list.
- *
- * @since 2.6.0
- *
- * @param string $avatar_list HTML markup of the avatar list.
- */
-echo apply_filters( 'default_avatar_select', $avatar_list );
-?>
-
-</fieldset></td>
-</tr>
-<?php do_settings_fields('discussion', 'avatars'); ?>
-</table>
-
-<?php do_settings_sections('discussion'); ?>
-
-<?php submit_button(); ?>
-</form>
-</div>
-
-<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>
Index: www/wp-includes/default-filters.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/default-filters.php	(revision 38565)
+++ www/wp-includes/default-filters.php	(revision 38565)
@@ -1,493 +0,0 @@
-<?php
-/**
- * Sets up the default filters and actions for most
- * of the WordPress hooks.
- *
- * If you need to remove a default hook, this file will
- * give you the priority for which to use to remove the
- * hook.
- *
- * Not all of the default hooks are found in default-filters.php
- *
- * @package WordPress
- */
-
-// Strip, trim, kses, special chars for string saves
-foreach ( array( 'pre_term_name', 'pre_comment_author_name', 'pre_link_name', 'pre_link_target', 'pre_link_rel', 'pre_user_display_name', 'pre_user_first_name', 'pre_user_last_name', 'pre_user_nickname' ) as $filter ) {
-	add_filter( $filter, 'sanitize_text_field'  );
-	add_filter( $filter, 'wp_filter_kses'       );
-	add_filter( $filter, '_wp_specialchars', 30 );
-}
-
-// Strip, kses, special chars for string display
-foreach ( array( 'term_name', 'comment_author_name', 'link_name', 'link_target', 'link_rel', 'user_display_name', 'user_first_name', 'user_last_name', 'user_nickname' ) as $filter ) {
-	if ( is_admin() ) {
-		// These are expensive. Run only on admin pages for defense in depth.
-		add_filter( $filter, 'sanitize_text_field'  );
-		add_filter( $filter, 'wp_kses_data'       );
-	}
-	add_filter( $filter, '_wp_specialchars', 30 );
-}
-
-// Kses only for textarea saves
-foreach ( array( 'pre_term_description', 'pre_link_description', 'pre_link_notes', 'pre_user_description' ) as $filter ) {
-	add_filter( $filter, 'wp_filter_kses' );
-}
-
-// Kses only for textarea admin displays
-if ( is_admin() ) {
-	foreach ( array( 'term_description', 'link_description', 'link_notes', 'user_description' ) as $filter ) {
-		add_filter( $filter, 'wp_kses_data' );
-	}
-	add_filter( 'comment_text', 'wp_kses_post' );
-}
-
-// Email saves
-foreach ( array( 'pre_comment_author_email', 'pre_user_email' ) as $filter ) {
-	add_filter( $filter, 'trim'           );
-	add_filter( $filter, 'sanitize_email' );
-	add_filter( $filter, 'wp_filter_kses' );
-}
-
-// Email admin display
-foreach ( array( 'comment_author_email', 'user_email' ) as $filter ) {
-	add_filter( $filter, 'sanitize_email' );
-	if ( is_admin() )
-		add_filter( $filter, 'wp_kses_data' );
-}
-
-// Save URL
-foreach ( array( 'pre_comment_author_url', 'pre_user_url', 'pre_link_url', 'pre_link_image',
-	'pre_link_rss', 'pre_post_guid' ) as $filter ) {
-	add_filter( $filter, 'wp_strip_all_tags' );
-	add_filter( $filter, 'esc_url_raw'       );
-	add_filter( $filter, 'wp_filter_kses'    );
-}
-
-// Display URL
-foreach ( array( 'user_url', 'link_url', 'link_image', 'link_rss', 'comment_url', 'post_guid' ) as $filter ) {
-	if ( is_admin() )
-		add_filter( $filter, 'wp_strip_all_tags' );
-	add_filter( $filter, 'esc_url'           );
-	if ( is_admin() )
-		add_filter( $filter, 'wp_kses_data'    );
-}
-
-// Slugs
-add_filter( 'pre_term_slug', 'sanitize_title' );
-
-// Keys
-foreach ( array( 'pre_post_type', 'pre_post_status', 'pre_post_comment_status', 'pre_post_ping_status' ) as $filter ) {
-	add_filter( $filter, 'sanitize_key' );
-}
-
-// Mime types
-add_filter( 'pre_post_mime_type', 'sanitize_mime_type' );
-add_filter( 'post_mime_type', 'sanitize_mime_type' );
-
-// Meta
-add_filter( 'register_meta_args', '_wp_register_meta_args_whitelist', 10, 2 );
-
-// Places to balance tags on input
-foreach ( array( 'content_save_pre', 'excerpt_save_pre', 'comment_save_pre', 'pre_comment_content' ) as $filter ) {
-	add_filter( $filter, 'convert_invalid_entities' );
-	add_filter( $filter, 'balanceTags', 50 );
-}
-
-// Format strings for display.
-foreach ( array( 'comment_author', 'term_name', 'link_name', 'link_description', 'link_notes', 'bloginfo', 'wp_title', 'widget_title' ) as $filter ) {
-	add_filter( $filter, 'wptexturize'   );
-	add_filter( $filter, 'convert_chars' );
-	add_filter( $filter, 'esc_html'      );
-}
-
-// Format WordPress
-foreach ( array( 'the_content', 'the_title', 'wp_title' ) as $filter )
-	add_filter( $filter, 'capital_P_dangit', 11 );
-add_filter( 'comment_text', 'capital_P_dangit', 31 );
-
-// Format titles
-foreach ( array( 'single_post_title', 'single_cat_title', 'single_tag_title', 'single_month_title', 'nav_menu_attr_title', 'nav_menu_description' ) as $filter ) {
-	add_filter( $filter, 'wptexturize' );
-	add_filter( $filter, 'strip_tags'  );
-}
-
-// Format text area for display.
-foreach ( array( 'term_description' ) as $filter ) {
-	add_filter( $filter, 'wptexturize'      );
-	add_filter( $filter, 'convert_chars'    );
-	add_filter( $filter, 'wpautop'          );
-	add_filter( $filter, 'shortcode_unautop');
-}
-
-// Format for RSS
-add_filter( 'term_name_rss', 'convert_chars' );
-
-// Pre save hierarchy
-add_filter( 'wp_insert_post_parent', 'wp_check_post_hierarchy_for_loops', 10, 2 );
-add_filter( 'wp_update_term_parent', 'wp_check_term_hierarchy_for_loops', 10, 3 );
-
-// Display filters
-add_filter( 'the_title', 'wptexturize'   );
-add_filter( 'the_title', 'convert_chars' );
-add_filter( 'the_title', 'trim'          );
-
-add_filter( 'the_content', 'wptexturize'                       );
-add_filter( 'the_content', 'convert_smilies',               20 );
-add_filter( 'the_content', 'wpautop'                           );
-add_filter( 'the_content', 'shortcode_unautop'                 );
-add_filter( 'the_content', 'prepend_attachment'                );
-add_filter( 'the_content', 'wp_make_content_images_responsive' );
-
-add_filter( 'the_excerpt',     'wptexturize'      );
-add_filter( 'the_excerpt',     'convert_smilies'  );
-add_filter( 'the_excerpt',     'convert_chars'    );
-add_filter( 'the_excerpt',     'wpautop'          );
-add_filter( 'the_excerpt',     'shortcode_unautop');
-add_filter( 'get_the_excerpt', 'wp_trim_excerpt'  );
-
-add_filter( 'the_post_thumbnail_caption', 'wptexturize'     );
-add_filter( 'the_post_thumbnail_caption', 'convert_smilies' );
-add_filter( 'the_post_thumbnail_caption', 'convert_chars'   );
-
-add_filter( 'comment_text', 'wptexturize'            );
-add_filter( 'comment_text', 'convert_chars'          );
-add_filter( 'comment_text', 'make_clickable',      9 );
-add_filter( 'comment_text', 'force_balance_tags', 25 );
-add_filter( 'comment_text', 'convert_smilies',    20 );
-add_filter( 'comment_text', 'wpautop',            30 );
-
-add_filter( 'comment_excerpt', 'convert_chars' );
-
-add_filter( 'list_cats',         'wptexturize' );
-
-add_filter( 'wp_sprintf', 'wp_sprintf_l', 10, 2 );
-
-add_filter( 'widget_text', 'balanceTags' );
-
-add_filter( 'date_i18n', 'wp_maybe_decline_date' );
-
-// RSS filters
-add_filter( 'the_title_rss',      'strip_tags'                    );
-add_filter( 'the_title_rss',      'ent2ncr',                    8 );
-add_filter( 'the_title_rss',      'esc_html'                      );
-add_filter( 'the_content_rss',    'ent2ncr',                    8 );
-add_filter( 'the_content_feed',   'wp_staticize_emoji'            );
-add_filter( 'the_content_feed',   '_oembed_filter_feed_content'   );
-add_filter( 'the_excerpt_rss',    'convert_chars'                 );
-add_filter( 'the_excerpt_rss',    'ent2ncr',                    8 );
-add_filter( 'comment_author_rss', 'ent2ncr',                    8 );
-add_filter( 'comment_text_rss',   'ent2ncr',                    8 );
-add_filter( 'comment_text_rss',   'esc_html'                      );
-add_filter( 'comment_text_rss',   'wp_staticize_emoji'            );
-add_filter( 'bloginfo_rss',       'ent2ncr',                    8 );
-add_filter( 'the_author',         'ent2ncr',                    8 );
-add_filter( 'the_guid',           'esc_url'                       );
-
-// Email filters
-add_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
-
-// Misc filters
-add_filter( 'option_ping_sites',        'privacy_ping_filter'                 );
-add_filter( 'option_blog_charset',      '_wp_specialchars'                    ); // IMPORTANT: This must not be wp_specialchars() or esc_html() or it'll cause an infinite loop
-add_filter( 'option_blog_charset',      '_canonical_charset'                  );
-add_filter( 'option_home',              '_config_wp_home'                     );
-add_filter( 'option_siteurl',           '_config_wp_siteurl'                  );
-add_filter( 'tiny_mce_before_init',     '_mce_set_direction'                  );
-add_filter( 'teeny_mce_before_init',    '_mce_set_direction'                  );
-add_filter( 'pre_kses',                 'wp_pre_kses_less_than'               );
-add_filter( 'sanitize_title',           'sanitize_title_with_dashes',   10, 3 );
-add_action( 'check_comment_flood',      'check_comment_flood_db',       10, 3 );
-add_filter( 'comment_flood_filter',     'wp_throttle_comment_flood',    10, 3 );
-add_filter( 'pre_comment_content',      'wp_rel_nofollow',              15    );
-add_filter( 'comment_email',            'antispambot'                         );
-add_filter( 'option_tag_base',          '_wp_filter_taxonomy_base'            );
-add_filter( 'option_category_base',     '_wp_filter_taxonomy_base'            );
-add_filter( 'the_posts',                '_close_comments_for_old_posts', 10, 2);
-add_filter( 'comments_open',            '_close_comments_for_old_post', 10, 2 );
-add_filter( 'pings_open',               '_close_comments_for_old_post', 10, 2 );
-add_filter( 'editable_slug',            'urldecode'                           );
-add_filter( 'editable_slug',            'esc_textarea'                        );
-add_filter( 'nav_menu_meta_box_object', '_wp_nav_menu_meta_box_object'        );
-add_filter( 'pingback_ping_source_uri', 'pingback_ping_source_uri'            );
-add_filter( 'xmlrpc_pingback_error',    'xmlrpc_pingback_error'               );
-add_filter( 'title_save_pre',           'trim'                                );
-
-add_filter( 'http_request_host_is_external',    'allowed_http_request_hosts', 10, 2 );
-
-// REST API filters.
-add_action( 'xmlrpc_rsd_apis',            'rest_output_rsd' );
-add_action( 'wp_head',                    'rest_output_link_wp_head', 10, 0 );
-add_action( 'template_redirect',          'rest_output_link_header', 11, 0 );
-add_action( 'auth_cookie_malformed',      'rest_cookie_collect_status' );
-add_action( 'auth_cookie_expired',        'rest_cookie_collect_status' );
-add_action( 'auth_cookie_bad_username',   'rest_cookie_collect_status' );
-add_action( 'auth_cookie_bad_hash',       'rest_cookie_collect_status' );
-add_action( 'auth_cookie_valid',          'rest_cookie_collect_status' );
-add_filter( 'rest_authentication_errors', 'rest_cookie_check_errors', 100 );
-
-// Actions
-add_action( 'wp_head',             '_wp_render_title_tag',            1     );
-add_action( 'wp_head',             'wp_enqueue_scripts',              1     );
-add_action( 'wp_head',             'wp_resource_hints',               2     );
-add_action( 'wp_head',             'feed_links',                      2     );
-add_action( 'wp_head',             'feed_links_extra',                3     );
-add_action( 'wp_head',             'rsd_link'                               );
-add_action( 'wp_head',             'wlwmanifest_link'                       );
-add_action( 'wp_head',             'adjacent_posts_rel_link_wp_head', 10, 0 );
-add_action( 'wp_head',             'locale_stylesheet'                      );
-add_action( 'publish_future_post', 'check_and_publish_future_post',   10, 1 );
-add_action( 'wp_head',             'noindex',                          1    );
-add_action( 'wp_head',             'print_emoji_detection_script',     7    );
-add_action( 'wp_head',             'wp_print_styles',                  8    );
-add_action( 'wp_head',             'wp_print_head_scripts',            9    );
-add_action( 'wp_head',             'wp_generator'                           );
-add_action( 'wp_head',             'rel_canonical'                          );
-add_action( 'wp_head',             'wp_shortlink_wp_head',            10, 0 );
-add_action( 'wp_head',             'wp_site_icon',                    99    );
-add_action( 'wp_footer',           'wp_print_footer_scripts',         20    );
-add_action( 'template_redirect',   'wp_shortlink_header',             11, 0 );
-add_action( 'wp_print_footer_scripts', '_wp_footer_scripts'                 );
-add_action( 'init',                'check_theme_switched',            99    );
-add_action( 'after_switch_theme',  '_wp_sidebars_changed'                   );
-add_action( 'wp_print_styles',     'print_emoji_styles'                     );
-
-if ( isset( $_GET['replytocom'] ) )
-    add_action( 'wp_head', 'wp_no_robots' );
-
-// Login actions
-add_filter( 'login_head',          'wp_resource_hints',             8     );
-add_action( 'login_head',          'wp_print_head_scripts',         9     );
-add_action( 'login_head',          'print_admin_styles',            9     );
-add_action( 'login_head',          'wp_site_icon',                  99    );
-add_action( 'login_footer',        'wp_print_footer_scripts',       20    );
-add_action( 'login_init',          'send_frame_options_header',     10, 0 );
-
-// Feed Generator Tags
-foreach ( array( 'rss2_head', 'commentsrss2_head', 'rss_head', 'rdf_header', 'atom_head', 'comments_atom_head', 'opml_head', 'app_head' ) as $action ) {
-	add_action( $action, 'the_generator' );
-}
-
-// Feed Site Icon
-add_action( 'atom_head', 'atom_site_icon' );
-add_action( 'rss2_head', 'rss2_site_icon' );
-
-
-// WP Cron
-if ( !defined( 'DOING_CRON' ) )
-	add_action( 'init', 'wp_cron' );
-
-// 2 Actions 2 Furious
-add_action( 'do_feed_rdf',                'do_feed_rdf',                             10, 1 );
-add_action( 'do_feed_rss',                'do_feed_rss',                             10, 1 );
-add_action( 'do_feed_rss2',               'do_feed_rss2',                            10, 1 );
-add_action( 'do_feed_atom',               'do_feed_atom',                            10, 1 );
-add_action( 'do_pings',                   'do_all_pings',                            10, 1 );
-add_action( 'do_robots',                  'do_robots'                                      );
-add_action( 'set_comment_cookies',        'wp_set_comment_cookies',                  10, 2 );
-add_action( 'sanitize_comment_cookies',   'sanitize_comment_cookies'                       );
-add_action( 'admin_print_scripts',        'print_emoji_detection_script'                   );
-add_action( 'admin_print_scripts',        'print_head_scripts',                      20    );
-add_action( 'admin_print_footer_scripts', '_wp_footer_scripts'                             );
-add_action( 'admin_print_styles',         'print_emoji_styles'                             );
-add_action( 'admin_print_styles',         'print_admin_styles',                      20    );
-add_action( 'init',                       'smilies_init',                             5    );
-add_action( 'plugins_loaded',             'wp_maybe_load_widgets',                    0    );
-add_action( 'plugins_loaded',             'wp_maybe_load_embeds',                     0    );
-add_action( 'shutdown',                   'wp_ob_end_flush_all',                      1    );
-// Create a revision whenever a post is updated.
-add_action( 'post_updated',               'wp_save_post_revision',                   10, 1 );
-add_action( 'publish_post',               '_publish_post_hook',                       5, 1 );
-add_action( 'transition_post_status',     '_transition_post_status',                  5, 3 );
-add_action( 'transition_post_status',     '_update_term_count_on_transition_post_status', 10, 3 );
-add_action( 'comment_form',               'wp_comment_form_unfiltered_html_nonce'          );
-add_action( 'wp_scheduled_delete',        'wp_scheduled_delete'                            );
-add_action( 'wp_scheduled_auto_draft_delete', 'wp_delete_auto_drafts'                      );
-add_action( 'admin_init',                 'send_frame_options_header',               10, 0 );
-add_action( 'importer_scheduled_cleanup', 'wp_delete_attachment'                           );
-add_action( 'upgrader_scheduled_cleanup', 'wp_delete_attachment'                           );
-add_action( 'welcome_panel',              'wp_welcome_panel'                               );
-
-// Navigation menu actions
-add_action( 'delete_post',                '_wp_delete_post_menu_item'         );
-add_action( 'delete_term',                '_wp_delete_tax_menu_item',   10, 3 );
-add_action( 'transition_post_status',     '_wp_auto_add_pages_to_menu', 10, 3 );
-
-// Post Thumbnail CSS class filtering
-add_action( 'begin_fetch_post_thumbnail_html', '_wp_post_thumbnail_class_filter_add'    );
-add_action( 'end_fetch_post_thumbnail_html',   '_wp_post_thumbnail_class_filter_remove' );
-
-// Redirect Old Slugs
-add_action( 'template_redirect',  'wp_old_slug_redirect'              );
-add_action( 'post_updated',       'wp_check_for_changed_slugs', 12, 3 );
-add_action( 'attachment_updated', 'wp_check_for_changed_slugs', 12, 3 );
-
-// Nonce check for Post Previews
-add_action( 'init', '_show_post_preview' );
-
-// Output JS to reset window.name for previews
-add_action( 'wp_head', 'wp_post_preview_js', 1 );
-
-// Timezone
-add_filter( 'pre_option_gmt_offset','wp_timezone_override_offset' );
-
-// Admin Color Schemes
-add_action( 'admin_init', 'register_admin_color_schemes', 1);
-add_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );
-
-// If the upgrade hasn't run yet, assume link manager is used.
-add_filter( 'default_option_link_manager_enabled', '__return_true' );
-
-// This option no longer exists; tell plugins we always support auto-embedding.
-add_filter( 'default_option_embed_autourls', '__return_true' );
-
-// Default settings for heartbeat
-add_filter( 'heartbeat_settings', 'wp_heartbeat_settings' );
-
-// Check if the user is logged out
-add_action( 'admin_enqueue_scripts', 'wp_auth_check_load' );
-add_filter( 'heartbeat_send',        'wp_auth_check' );
-add_filter( 'heartbeat_nopriv_send', 'wp_auth_check' );
-
-// Default authentication filters
-add_filter( 'authenticate', 'wp_authenticate_username_password',  20, 3 );
-add_filter( 'authenticate', 'wp_authenticate_email_password',     20, 3 );
-add_filter( 'authenticate', 'wp_authenticate_spam_check',         99    );
-add_filter( 'determine_current_user', 'wp_validate_auth_cookie'          );
-add_filter( 'determine_current_user', 'wp_validate_logged_in_cookie', 20 );
-
-// Split term updates.
-add_action( 'admin_init',        '_wp_check_for_scheduled_split_terms' );
-add_action( 'split_shared_term', '_wp_check_split_default_terms',  10, 4 );
-add_action( 'split_shared_term', '_wp_check_split_terms_in_menus', 10, 4 );
-add_action( 'split_shared_term', '_wp_check_split_nav_menu_terms', 10, 4 );
-add_action( 'wp_split_shared_term_batch', '_wp_batch_split_terms' );
-
-// Email notifications.
-add_action( 'comment_post', 'wp_new_comment_notify_moderator' );
-add_action( 'comment_post', 'wp_new_comment_notify_postauthor' );
-add_action( 'after_password_reset', 'wp_password_change_notification' );
-add_action( 'register_new_user',      'wp_send_new_user_notifications' );
-add_action( 'edit_user_created_user', 'wp_send_new_user_notifications', 10, 2 );
-
-// REST API actions.
-add_action( 'init',          'rest_api_init' );
-add_action( 'rest_api_init', 'rest_api_default_filters', 10, 1 );
-add_action( 'parse_request', 'rest_api_loaded' );
-
-/**
- * Filters formerly mixed into wp-includes
- */
-// Theme
-add_action( 'wp_loaded', '_custom_header_background_just_in_time' );
-add_action( 'wp_head', '_custom_logo_header_styles' );
-add_action( 'plugins_loaded', '_wp_customize_include' );
-add_action( 'admin_enqueue_scripts', '_wp_customize_loader_settings' );
-add_action( 'delete_attachment', '_delete_attachment_theme_mod' );
-
-// Calendar widget cache
-add_action( 'save_post', 'delete_get_calendar_cache' );
-add_action( 'delete_post', 'delete_get_calendar_cache' );
-add_action( 'update_option_start_of_week', 'delete_get_calendar_cache' );
-add_action( 'update_option_gmt_offset', 'delete_get_calendar_cache' );
-
-// Author
-add_action( 'transition_post_status', '__clear_multi_author_cache' );
-
-// Post
-add_action( 'init', 'create_initial_post_types', 0 ); // highest priority
-add_action( 'admin_menu', '_add_post_type_submenus' );
-add_action( 'before_delete_post', '_reset_front_page_settings_for_post' );
-add_action( 'wp_trash_post',      '_reset_front_page_settings_for_post' );
-
-// Post Formats
-add_filter( 'request', '_post_format_request' );
-add_filter( 'term_link', '_post_format_link', 10, 3 );
-add_filter( 'get_post_format', '_post_format_get_term' );
-add_filter( 'get_terms', '_post_format_get_terms', 10, 3 );
-add_filter( 'wp_get_object_terms', '_post_format_wp_get_object_terms' );
-
-// KSES
-add_action( 'init', 'kses_init' );
-add_action( 'set_current_user', 'kses_init' );
-
-// Script Loader
-add_action( 'wp_default_scripts', 'wp_default_scripts' );
-add_action( 'wp_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 );
-add_action( 'admin_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 );
-add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' );
-add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' );
-add_filter( 'customize_controls_print_styles', 'wp_resource_hints', 1 );
-
-add_action( 'wp_default_styles', 'wp_default_styles' );
-add_filter( 'style_loader_src', 'wp_style_loader_src', 10, 2 );
-
-// Taxonomy
-add_action( 'init', 'create_initial_taxonomies', 0 ); // highest priority
-
-// Canonical
-add_action( 'template_redirect', 'redirect_canonical' );
-add_action( 'template_redirect', 'wp_redirect_admin_locations', 1000 );
-
-// Shortcodes
-add_filter( 'the_content', 'do_shortcode', 11 ); // AFTER wpautop()
-
-// Media
-add_action( 'wp_playlist_scripts', 'wp_playlist_scripts' );
-add_action( 'customize_controls_enqueue_scripts', 'wp_plupload_default_settings' );
-
-// Nav menu
-add_filter( 'nav_menu_item_id', '_nav_menu_item_id_use_once', 10, 2 );
-
-// Widgets
-add_action( 'init', 'wp_widgets_init', 1 );
-
-// Admin Bar
-// Don't remove. Wrong way to disable.
-add_action( 'template_redirect', '_wp_admin_bar_init', 0 );
-add_action( 'admin_init', '_wp_admin_bar_init' );
-add_action( 'before_signup_header', '_wp_admin_bar_init' );
-add_action( 'activate_header', '_wp_admin_bar_init' );
-add_action( 'wp_footer', 'wp_admin_bar_render', 1000 );
-add_action( 'in_admin_header', 'wp_admin_bar_render', 0 );
-
-// Former admin filters that can also be hooked on the front end
-add_action( 'media_buttons', 'media_buttons' );
-add_filter( 'image_send_to_editor', 'image_add_caption', 20, 8 );
-add_filter( 'media_send_to_editor', 'image_media_send_to_editor', 10, 3 );
-
-// Embeds
-add_action( 'rest_api_init',          'wp_oembed_register_route'              );
-add_filter( 'rest_pre_serve_request', '_oembed_rest_pre_serve_request', 10, 4 );
-
-add_action( 'wp_head',                'wp_oembed_add_discovery_links'         );
-add_action( 'wp_head',                'wp_oembed_add_host_js'                 );
-
-add_action( 'embed_head',             'enqueue_embed_scripts',           1    );
-add_action( 'embed_head',             'print_emoji_detection_script'          );
-add_action( 'embed_head',             'print_embed_styles'                    );
-add_action( 'embed_head',             'wp_print_head_scripts',          20    );
-add_action( 'embed_head',             'wp_print_styles',                20    );
-add_action( 'embed_head',             'wp_no_robots'                          );
-add_action( 'embed_head',             'rel_canonical'                         );
-add_action( 'embed_head',             'locale_stylesheet',              30    );
-
-add_action( 'embed_content_meta',     'print_embed_comments_button'           );
-add_action( 'embed_content_meta',     'print_embed_sharing_button'            );
-
-add_action( 'embed_footer',           'print_embed_sharing_dialog'            );
-add_action( 'embed_footer',           'print_embed_scripts'                   );
-add_action( 'embed_footer',           'wp_print_footer_scripts',        20    );
-
-add_filter( 'excerpt_more',           'wp_embed_excerpt_more',          20    );
-add_filter( 'the_excerpt_embed',      'wptexturize'                           );
-add_filter( 'the_excerpt_embed',      'convert_chars'                         );
-add_filter( 'the_excerpt_embed',      'wpautop'                               );
-add_filter( 'the_excerpt_embed',      'shortcode_unautop'                     );
-add_filter( 'the_excerpt_embed',      'wp_embed_excerpt_attachment'           );
-
-add_filter( 'oembed_dataparse',       'wp_filter_oembed_result',        10, 3 );
-add_filter( 'oembed_response_data',   'get_oembed_response_data_rich',  10, 4 );
-add_filter( 'pre_oembed_result',      'wp_filter_pre_oembed_result',    10, 3 );
-
-unset( $filter, $action );
Index: www/wp-includes/general-template.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/general-template.php	(revision 38565)
+++ www/wp-includes/general-template.php	(revision 38565)
@@ -1,3723 +0,0 @@
-<?php
-/**
- * General template tags that can go anywhere in a template.
- *
- * @package WordPress
- * @subpackage Template
- */
-
-/**
- * Load header template.
- *
- * Includes the header template for a theme or if a name is specified then a
- * specialised header will be included.
- *
- * For the parameter, if the file is called "header-special.php" then specify
- * "special".
- *
- * @since 1.5.0
- *
- * @param string $name The name of the specialised header.
- */
-function get_header( $name = null ) {
-	/**
-	 * Fires before the header template file is loaded.
-	 *
-	 * The hook allows a specific header template file to be used in place of the
-	 * default header template file. If your file is called header-new.php,
-	 * you would specify the filename in the hook as get_header( 'new' ).
-	 *
-	 * @since 2.1.0
-	 * @since 2.8.0 $name parameter added.
-	 *
-	 * @param string|null $name Name of the specific header file to use. null for the default header.
-	 */
-	do_action( 'get_header', $name );
-
-	$templates = array();
-	$name = (string) $name;
-	if ( '' !== $name ) {
-		$templates[] = "header-{$name}.php";
-	}
-
-	$templates[] = 'header.php';
-
-	locate_template( $templates, true );
-}
-
-/**
- * Load footer template.
- *
- * Includes the footer template for a theme or if a name is specified then a
- * specialised footer will be included.
- *
- * For the parameter, if the file is called "footer-special.php" then specify
- * "special".
- *
- * @since 1.5.0
- *
- * @param string $name The name of the specialised footer.
- */
-function get_footer( $name = null ) {
-	/**
-	 * Fires before the footer template file is loaded.
-	 *
-	 * The hook allows a specific footer template file to be used in place of the
-	 * default footer template file. If your file is called footer-new.php,
-	 * you would specify the filename in the hook as get_footer( 'new' ).
-	 *
-	 * @since 2.1.0
-	 * @since 2.8.0 $name parameter added.
-	 *
-	 * @param string|null $name Name of the specific footer file to use. null for the default footer.
-	 */
-	do_action( 'get_footer', $name );
-
-	$templates = array();
-	$name = (string) $name;
-	if ( '' !== $name ) {
-		$templates[] = "footer-{$name}.php";
-	}
-
-	$templates[]    = 'footer.php';
-
-	locate_template( $templates, true );
-}
-
-/**
- * Load sidebar template.
- *
- * Includes the sidebar template for a theme or if a name is specified then a
- * specialised sidebar will be included.
- *
- * For the parameter, if the file is called "sidebar-special.php" then specify
- * "special".
- *
- * @since 1.5.0
- *
- * @param string $name The name of the specialised sidebar.
- */
-function get_sidebar( $name = null ) {
-	/**
-	 * Fires before the sidebar template file is loaded.
-	 *
-	 * The hook allows a specific sidebar template file to be used in place of the
-	 * default sidebar template file. If your file is called sidebar-new.php,
-	 * you would specify the filename in the hook as get_sidebar( 'new' ).
-	 *
-	 * @since 2.2.0
-	 * @since 2.8.0 $name parameter added.
-	 *
-	 * @param string|null $name Name of the specific sidebar file to use. null for the default sidebar.
-	 */
-	do_action( 'get_sidebar', $name );
-
-	$templates = array();
-	$name = (string) $name;
-	if ( '' !== $name )
-		$templates[] = "sidebar-{$name}.php";
-
-	$templates[] = 'sidebar.php';
-
-	locate_template( $templates, true );
-}
-
-/**
- * Load a template part into a template
- *
- * Makes it easy for a theme to reuse sections of code in a easy to overload way
- * for child themes.
- *
- * Includes the named template part for a theme or if a name is specified then a
- * specialised part will be included. If the theme contains no {slug}.php file
- * then no template will be included.
- *
- * The template is included using require, not require_once, so you may include the
- * same template part multiple times.
- *
- * For the $name parameter, if the file is called "{slug}-special.php" then specify
- * "special".
- *
- * @since 3.0.0
- *
- * @param string $slug The slug name for the generic template.
- * @param string $name The name of the specialised template.
- */
-function get_template_part( $slug, $name = null ) {
-	/**
-	 * Fires before the specified template part file is loaded.
-	 *
-	 * The dynamic portion of the hook name, `$slug`, refers to the slug name
-	 * for the generic template part.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string      $slug The slug name for the generic template.
-	 * @param string|null $name The name of the specialized template.
-	 */
-	do_action( "get_template_part_{$slug}", $slug, $name );
-
-	$templates = array();
-	$name = (string) $name;
-	if ( '' !== $name )
-		$templates[] = "{$slug}-{$name}.php";
-
-	$templates[] = "{$slug}.php";
-
-	locate_template($templates, true, false);
-}
-
-/**
- * Display search form.
- *
- * Will first attempt to locate the searchform.php file in either the child or
- * the parent, then load it. If it doesn't exist, then the default search form
- * will be displayed. The default search form is HTML, which will be displayed.
- * There is a filter applied to the search form HTML in order to edit or replace
- * it. The filter is {@see 'get_search_form'}.
- *
- * This function is primarily used by themes which want to hardcode the search
- * form into the sidebar and also by the search widget in WordPress.
- *
- * There is also an action that is called whenever the function is run called,
- * {@see 'pre_get_search_form'}. This can be useful for outputting JavaScript that the
- * search relies on or various formatting that applies to the beginning of the
- * search. To give a few examples of what it can be used for.
- *
- * @since 2.7.0
- *
- * @param bool $echo Default to echo and not return the form.
- * @return string|void String when $echo is false.
- */
-function get_search_form( $echo = true ) {
-	/**
-	 * Fires before the search form is retrieved, at the start of get_search_form().
-	 *
-	 * @since 2.7.0 as 'get_search_form' action.
-	 * @since 3.6.0
-	 *
-	 * @link https://core.trac.wordpress.org/ticket/19321
-	 */
-	do_action( 'pre_get_search_form' );
-
-	$format = current_theme_supports( 'html5', 'search-form' ) ? 'html5' : 'xhtml';
-
-	/**
-	 * Filters the HTML format of the search form.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param string $format The type of markup to use in the search form.
-	 *                       Accepts 'html5', 'xhtml'.
-	 */
-	$format = apply_filters( 'search_form_format', $format );
-
-	$search_form_template = locate_template( 'searchform.php' );
-	if ( '' != $search_form_template ) {
-		ob_start();
-		require( $search_form_template );
-		$form = ob_get_clean();
-	} else {
-		if ( 'html5' == $format ) {
-			$form = '<form role="search" method="get" class="search-form" action="' . esc_url( home_url( '/' ) ) . '">
-				<label>
-					<span class="screen-reader-text">' . _x( 'Search for:', 'label' ) . '</span>
-					<input type="search" class="search-field" placeholder="' . esc_attr_x( 'Search &hellip;', 'placeholder' ) . '" value="' . get_search_query() . '" name="s" />
-				</label>
-				<input type="submit" class="search-submit" value="'. esc_attr_x( 'Search', 'submit button' ) .'" />
-			</form>';
-		} else {
-			$form = '<form role="search" method="get" id="searchform" class="searchform" action="' . esc_url( home_url( '/' ) ) . '">
-				<div>
-					<label class="screen-reader-text" for="s">' . _x( 'Search for:', 'label' ) . '</label>
-					<input type="text" value="' . get_search_query() . '" name="s" id="s" />
-					<input type="submit" id="searchsubmit" value="'. esc_attr_x( 'Search', 'submit button' ) .'" />
-				</div>
-			</form>';
-		}
-	}
-
-	/**
-	 * Filters the HTML output of the search form.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param string $form The search form HTML output.
-	 */
-	$result = apply_filters( 'get_search_form', $form );
-
-	if ( null === $result )
-		$result = $form;
-
-	if ( $echo )
-		echo $result;
-	else
-		return $result;
-}
-
-/**
- * Display the Log In/Out link.
- *
- * Displays a link, which allows users to navigate to the Log In page to log in
- * or log out depending on whether they are currently logged in.
- *
- * @since 1.5.0
- *
- * @param string $redirect Optional path to redirect to on login/logout.
- * @param bool   $echo     Default to echo and not return the link.
- * @return string|void String when retrieving.
- */
-function wp_loginout($redirect = '', $echo = true) {
-	if ( ! is_user_logged_in() )
-		$link = '<a href="' . esc_url( wp_login_url($redirect) ) . '">' . __('Log in') . '</a>';
-	else
-		$link = '<a href="' . esc_url( wp_logout_url($redirect) ) . '">' . __('Log out') . '</a>';
-
-	if ( $echo ) {
-		/**
-		 * Filters the HTML output for the Log In/Log Out link.
-		 *
-		 * @since 1.5.0
-		 *
-		 * @param string $link The HTML link content.
-		 */
-		echo apply_filters( 'loginout', $link );
-	} else {
-		/** This filter is documented in wp-includes/general-template.php */
-		return apply_filters( 'loginout', $link );
-	}
-}
-
-/**
- * Retrieves the logout URL.
- *
- * Returns the URL that allows the user to log out of the site.
- *
- * @since 2.7.0
- *
- * @param string $redirect Path to redirect to on logout.
- * @return string The logout URL. Note: HTML-encoded via esc_html() in wp_nonce_url().
- */
-function wp_logout_url($redirect = '') {
-	$args = array( 'action' => 'logout' );
-	if ( !empty($redirect) ) {
-		$args['redirect_to'] = urlencode( $redirect );
-	}
-
-	$logout_url = add_query_arg($args, site_url('wp-login.php', 'login'));
-	$logout_url = wp_nonce_url( $logout_url, 'log-out' );
-
-	/**
-	 * Filters the logout URL.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param string $logout_url The HTML-encoded logout URL.
-	 * @param string $redirect   Path to redirect to on logout.
-	 */
-	return apply_filters( 'logout_url', $logout_url, $redirect );
-}
-
-/**
- * Retrieves the login URL.
- *
- * @since 2.7.0
- *
- * @param string $redirect     Path to redirect to on log in.
- * @param bool   $force_reauth Whether to force reauthorization, even if a cookie is present.
- *                             Default false.
- * @return string The login URL. Not HTML-encoded.
- */
-function wp_login_url($redirect = '', $force_reauth = false) {
-	$login_url = site_url('wp-login.php', 'login');
-
-	if ( !empty($redirect) )
-		$login_url = add_query_arg('redirect_to', urlencode($redirect), $login_url);
-
-	if ( $force_reauth )
-		$login_url = add_query_arg('reauth', '1', $login_url);
-
-	/**
-	 * Filters the login URL.
-	 *
-	 * @since 2.8.0
-	 * @since 4.2.0 The `$force_reauth` parameter was added.
-	 *
-	 * @param string $login_url    The login URL. Not HTML-encoded.
-	 * @param string $redirect     The path to redirect to on login, if supplied.
-	 * @param bool   $force_reauth Whether to force reauthorization, even if a cookie is present.
-	 */
-	return apply_filters( 'login_url', $login_url, $redirect, $force_reauth );
-}
-
-/**
- * Returns the URL that allows the user to register on the site.
- *
- * @since 3.6.0
- *
- * @return string User registration URL.
- */
-function wp_registration_url() {
-	/**
-	 * Filters the user registration URL.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param string $register The user registration URL.
-	 */
-	return apply_filters( 'register_url', site_url( 'wp-login.php?action=register', 'login' ) );
-}
-
-/**
- * Provides a simple login form for use anywhere within WordPress.
- *
- * The login format HTML is echoed by default. Pass a false value for `$echo` to return it instead.
- *
- * @since 3.0.0
- *
- * @param array $args {
- *     Optional. Array of options to control the form output. Default empty array.
- *
- *     @type bool   $echo           Whether to display the login form or return the form HTML code.
- *                                  Default true (echo).
- *     @type string $redirect       URL to redirect to. Must be absolute, as in "https://example.com/mypage/".
- *                                  Default is to redirect back to the request URI.
- *     @type string $form_id        ID attribute value for the form. Default 'loginform'.
- *     @type string $label_username Label for the username or email address field. Default 'Username or Email Address'.
- *     @type string $label_password Label for the password field. Default 'Password'.
- *     @type string $label_remember Label for the remember field. Default 'Remember Me'.
- *     @type string $label_log_in   Label for the submit button. Default 'Log In'.
- *     @type string $id_username    ID attribute value for the username field. Default 'user_login'.
- *     @type string $id_password    ID attribute value for the password field. Default 'user_pass'.
- *     @type string $id_remember    ID attribute value for the remember field. Default 'rememberme'.
- *     @type string $id_submit      ID attribute value for the submit button. Default 'wp-submit'.
- *     @type bool   $remember       Whether to display the "rememberme" checkbox in the form.
- *     @type string $value_username Default value for the username field. Default empty.
- *     @type bool   $value_remember Whether the "Remember Me" checkbox should be checked by default.
- *                                  Default false (unchecked).
- *
- * }
- * @return string|void String when retrieving.
- */
-function wp_login_form( $args = array() ) {
-	$defaults = array(
-		'echo' => true,
-		// Default 'redirect' value takes the user back to the request URI.
-		'redirect' => ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'],
-		'form_id' => 'loginform',
-		'label_username' => __( 'Username or Email Address' ),
-		'label_password' => __( 'Password' ),
-		'label_remember' => __( 'Remember Me' ),
-		'label_log_in' => __( 'Log In' ),
-		'id_username' => 'user_login',
-		'id_password' => 'user_pass',
-		'id_remember' => 'rememberme',
-		'id_submit' => 'wp-submit',
-		'remember' => true,
-		'value_username' => '',
-		// Set 'value_remember' to true to default the "Remember me" checkbox to checked.
-		'value_remember' => false,
-	);
-
-	/**
-	 * Filters the default login form output arguments.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @see wp_login_form()
-	 *
-	 * @param array $defaults An array of default login form arguments.
-	 */
-	$args = wp_parse_args( $args, apply_filters( 'login_form_defaults', $defaults ) );
-
-	/**
-	 * Filters content to display at the top of the login form.
-	 *
-	 * The filter evaluates just following the opening form tag element.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $content Content to display. Default empty.
-	 * @param array  $args    Array of login form arguments.
-	 */
-	$login_form_top = apply_filters( 'login_form_top', '', $args );
-
-	/**
-	 * Filters content to display in the middle of the login form.
-	 *
-	 * The filter evaluates just following the location where the 'login-password'
-	 * field is displayed.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $content Content to display. Default empty.
-	 * @param array  $args    Array of login form arguments.
-	 */
-	$login_form_middle = apply_filters( 'login_form_middle', '', $args );
-
-	/**
-	 * Filters content to display at the bottom of the login form.
-	 *
-	 * The filter evaluates just preceding the closing form tag element.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $content Content to display. Default empty.
-	 * @param array  $args    Array of login form arguments.
-	 */
-	$login_form_bottom = apply_filters( 'login_form_bottom', '', $args );
-
-	$form = '
-		<form name="' . $args['form_id'] . '" id="' . $args['form_id'] . '" action="' . esc_url( site_url( 'wp-login.php', 'login_post' ) ) . '" method="post">
-			' . $login_form_top . '
-			<p class="login-username">
-				<label for="' . esc_attr( $args['id_username'] ) . '">' . esc_html( $args['label_username'] ) . '</label>
-				<input type="text" name="log" id="' . esc_attr( $args['id_username'] ) . '" class="input" value="' . esc_attr( $args['value_username'] ) . '" size="20" />
-			</p>
-			<p class="login-password">
-				<label for="' . esc_attr( $args['id_password'] ) . '">' . esc_html( $args['label_password'] ) . '</label>
-				<input type="password" name="pwd" id="' . esc_attr( $args['id_password'] ) . '" class="input" value="" size="20" />
-			</p>
-			' . $login_form_middle . '
-			' . ( $args['remember'] ? '<p class="login-remember"><label><input name="rememberme" type="checkbox" id="' . esc_attr( $args['id_remember'] ) . '" value="forever"' . ( $args['value_remember'] ? ' checked="checked"' : '' ) . ' /> ' . esc_html( $args['label_remember'] ) . '</label></p>' : '' ) . '
-			<p class="login-submit">
-				<input type="submit" name="wp-submit" id="' . esc_attr( $args['id_submit'] ) . '" class="button-primary" value="' . esc_attr( $args['label_log_in'] ) . '" />
-				<input type="hidden" name="redirect_to" value="' . esc_url( $args['redirect'] ) . '" />
-			</p>
-			' . $login_form_bottom . '
-		</form>';
-
-	if ( $args['echo'] )
-		echo $form;
-	else
-		return $form;
-}
-
-/**
- * Returns the URL that allows the user to retrieve the lost password
- *
- * @since 2.8.0
- *
- * @param string $redirect Path to redirect to on login.
- * @return string Lost password URL.
- */
-function wp_lostpassword_url( $redirect = '' ) {
-	$args = array( 'action' => 'lostpassword' );
-	if ( !empty($redirect) ) {
-		$args['redirect_to'] = $redirect;
-	}
-
-	$lostpassword_url = add_query_arg( $args, network_site_url('wp-login.php', 'login') );
-
-	/**
-	 * Filters the Lost Password URL.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param string $lostpassword_url The lost password page URL.
-	 * @param string $redirect         The path to redirect to on login.
-	 */
-	return apply_filters( 'lostpassword_url', $lostpassword_url, $redirect );
-}
-
-/**
- * Display the Registration or Admin link.
- *
- * Display a link which allows the user to navigate to the registration page if
- * not logged in and registration is enabled or to the dashboard if logged in.
- *
- * @since 1.5.0
- *
- * @param string $before Text to output before the link. Default `<li>`.
- * @param string $after  Text to output after the link. Default `</li>`.
- * @param bool   $echo   Default to echo and not return the link.
- * @return string|void String when retrieving.
- */
-function wp_register( $before = '<li>', $after = '</li>', $echo = true ) {
-	if ( ! is_user_logged_in() ) {
-		if ( get_option('users_can_register') )
-			$link = $before . '<a href="' . esc_url( wp_registration_url() ) . '">' . __('Register') . '</a>' . $after;
-		else
-			$link = '';
-	} elseif ( current_user_can( 'read' ) ) {
-		$link = $before . '<a href="' . admin_url() . '">' . __('Site Admin') . '</a>' . $after;
-	} else {
-		$link = '';
-	}
-
-	/**
-	 * Filters the HTML link to the Registration or Admin page.
-	 *
-	 * Users are sent to the admin page if logged-in, or the registration page
-	 * if enabled and logged-out.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $link The HTML code for the link to the Registration or Admin page.
-	 */
-	$link = apply_filters( 'register', $link );
-
-	if ( $echo ) {
-		echo $link;
-	} else {
-		return $link;
-	}
-}
-
-/**
- * Theme container function for the 'wp_meta' action.
- *
- * The {@see 'wp_meta'} action can have several purposes, depending on how you use it,
- * but one purpose might have been to allow for theme switching.
- *
- * @since 1.5.0
- *
- * @link https://core.trac.wordpress.org/ticket/1458 Explanation of 'wp_meta' action.
- */
-function wp_meta() {
-	/**
-	 * Fires before displaying echoed content in the sidebar.
-	 *
-	 * @since 1.5.0
-	 */
-	do_action( 'wp_meta' );
-}
-
-/**
- * Displays information about the current site.
- *
- * @since 0.71
- *
- * @see get_bloginfo() For possible `$show` values
- *
- * @param string $show Optional. Site information to display. Default empty.
- */
-function bloginfo( $show = '' ) {
-	echo get_bloginfo( $show, 'display' );
-}
-
-/**
- * Retrieves information about the current site.
- *
- * Possible values for `$show` include:
- *
- * - 'name' - Site title (set in Settings > General)
- * - 'description' - Site tagline (set in Settings > General)
- * - 'wpurl' - The WordPress address (URL) (set in Settings > General)
- * - 'url' - The Site address (URL) (set in Settings > General)
- * - 'admin_email' - Admin email (set in Settings > General)
- * - 'charset' - The "Encoding for pages and feeds"  (set in Settings > Reading)
- * - 'version' - The current WordPress version
- * - 'html_type' - The content-type (default: "text/html"). Themes and plugins
- *   can override the default value using the {@see 'pre_option_html_type'} filter
- * - 'text_direction' - The text direction determined by the site's language. is_rtl()
- *   should be used instead
- * - 'language' - Language code for the current site
- * - 'stylesheet_url' - URL to the stylesheet for the active theme. An active child theme
- *   will take precedence over this value
- * - 'stylesheet_directory' - Directory path for the active theme.  An active child theme
- *   will take precedence over this value
- * - 'template_url' / 'template_directory' - URL of the active theme's directory. An active
- *   child theme will NOT take precedence over this value
- * - 'pingback_url' - The pingback XML-RPC file URL (xmlrpc.php)
- * - 'atom_url' - The Atom feed URL (/feed/atom)
- * - 'rdf_url' - The RDF/RSS 1.0 feed URL (/feed/rfd)
- * - 'rss_url' - The RSS 0.92 feed URL (/feed/rss)
- * - 'rss2_url' - The RSS 2.0 feed URL (/feed)
- * - 'comments_atom_url' - The comments Atom feed URL (/comments/feed)
- * - 'comments_rss2_url' - The comments RSS 2.0 feed URL (/comments/feed)
- *
- * Some `$show` values are deprecated and will be removed in future versions.
- * These options will trigger the _deprecated_argument() function.
- *
- * Deprecated arguments include:
- *
- * - 'siteurl' - Use 'url' instead
- * - 'home' - Use 'url' instead
- *
- * @since 0.71
- *
- * @global string $wp_version
- *
- * @param string $show   Optional. Site info to retrieve. Default empty (site name).
- * @param string $filter Optional. How to filter what is retrieved. Default 'raw'.
- * @return string Mostly string values, might be empty.
- */
-function get_bloginfo( $show = '', $filter = 'raw' ) {
-	switch( $show ) {
-		case 'home' : // DEPRECATED
-		case 'siteurl' : // DEPRECATED
-			_deprecated_argument( __FUNCTION__, '2.2.0', sprintf(
-				/* translators: 1: 'siteurl'/'home' argument, 2: bloginfo() function name, 3: 'url' argument */
-				__( 'The %1$s option is deprecated for the family of %2$s functions. Use the %3$s option instead.' ),
-				'<code>' . $show . '</code>',
-				'<code>bloginfo()</code>',
-				'<code>url</code>'
-			) );
-		case 'url' :
-			$output = home_url();
-			break;
-		case 'wpurl' :
-			$output = site_url();
-			break;
-		case 'description':
-			$output = get_option('blogdescription');
-			break;
-		case 'rdf_url':
-			$output = get_feed_link('rdf');
-			break;
-		case 'rss_url':
-			$output = get_feed_link('rss');
-			break;
-		case 'rss2_url':
-			$output = get_feed_link('rss2');
-			break;
-		case 'atom_url':
-			$output = get_feed_link('atom');
-			break;
-		case 'comments_atom_url':
-			$output = get_feed_link('comments_atom');
-			break;
-		case 'comments_rss2_url':
-			$output = get_feed_link('comments_rss2');
-			break;
-		case 'pingback_url':
-			$output = site_url( 'xmlrpc.php' );
-			break;
-		case 'stylesheet_url':
-			$output = get_stylesheet_uri();
-			break;
-		case 'stylesheet_directory':
-			$output = get_stylesheet_directory_uri();
-			break;
-		case 'template_directory':
-		case 'template_url':
-			$output = get_template_directory_uri();
-			break;
-		case 'admin_email':
-			$output = get_option('admin_email');
-			break;
-		case 'charset':
-			$output = get_option('blog_charset');
-			if ('' == $output) $output = 'UTF-8';
-			break;
-		case 'html_type' :
-			$output = get_option('html_type');
-			break;
-		case 'version':
-			global $wp_version;
-			$output = $wp_version;
-			break;
-		case 'language':
-			/* translators: Translate this to the correct language tag for your locale,
-			 * see https://www.w3.org/International/articles/language-tags/ for reference.
-			 * Do not translate into your own language.
-			 */
-			$output = __( 'html_lang_attribute' );
-			if ( 'html_lang_attribute' === $output || preg_match( '/[^a-zA-Z0-9-]/', $output ) ) {
-				$output = get_locale();
-				$output = str_replace( '_', '-', $output );
-			}
-			break;
-		case 'text_direction':
-			_deprecated_argument( __FUNCTION__, '2.2.0', sprintf(
-				/* translators: 1: 'text_direction' argument, 2: bloginfo() function name, 3: is_rtl() function name */
-				__( 'The %1$s option is deprecated for the family of %2$s functions. Use the %3$s function instead.' ),
-				'<code>' . $show . '</code>',
-				'<code>bloginfo()</code>',
-				'<code>is_rtl()</code>'
-			) );
-			if ( function_exists( 'is_rtl' ) ) {
-				$output = is_rtl() ? 'rtl' : 'ltr';
-			} else {
-				$output = 'ltr';
-			}
-			break;
-		case 'name':
-		default:
-			$output = get_option('blogname');
-			break;
-	}
-
-	$url = true;
-	if (strpos($show, 'url') === false &&
-		strpos($show, 'directory') === false &&
-		strpos($show, 'home') === false)
-		$url = false;
-
-	if ( 'display' == $filter ) {
-		if ( $url ) {
-			/**
-			 * Filters the URL returned by get_bloginfo().
-			 *
-			 * @since 2.0.5
-			 *
-			 * @param mixed $output The URL returned by bloginfo().
-			 * @param mixed $show   Type of information requested.
-			 */
-			$output = apply_filters( 'bloginfo_url', $output, $show );
-		} else {
-			/**
-			 * Filters the site information returned by get_bloginfo().
-			 *
-			 * @since 0.71
-			 *
-			 * @param mixed $output The requested non-URL site information.
-			 * @param mixed $show   Type of information requested.
-			 */
-			$output = apply_filters( 'bloginfo', $output, $show );
-		}
-	}
-
-	return $output;
-}
-
-/**
- * Returns the Site Icon URL.
- *
- * @since 4.3.0
- *
- * @param int    $size    Optional. Size of the site icon. Default 512 (pixels).
- * @param string $url     Optional. Fallback url if no site icon is found. Default empty.
- * @param int    $blog_id Optional. ID of the blog to get the site icon for. Default current blog.
- * @return string Site Icon URL.
- */
-function get_site_icon_url( $size = 512, $url = '', $blog_id = 0 ) {
-	if ( is_multisite() && (int) $blog_id !== get_current_blog_id() ) {
-		switch_to_blog( $blog_id );
-	}
-
-	$site_icon_id = get_option( 'site_icon' );
-
-	if ( $site_icon_id ) {
-		if ( $size >= 512 ) {
-			$size_data = 'full';
-		} else {
-			$size_data = array( $size, $size );
-		}
-		$url = wp_get_attachment_image_url( $site_icon_id, $size_data );
-	}
-
-	if ( is_multisite() && ms_is_switched() ) {
-		restore_current_blog();
-	}
-
-	/**
-	 * Filters the site icon URL.
-	 *
-	 * @site 4.4.0
-	 *
-	 * @param string $url     Site icon URL.
-	 * @param int    $size    Size of the site icon.
-	 * @param int    $blog_id ID of the blog to get the site icon for.
-	 */
-	return apply_filters( 'get_site_icon_url', $url, $size, $blog_id );
-}
-
-/**
- * Displays the Site Icon URL.
- *
- * @since 4.3.0
- *
- * @param int    $size    Optional. Size of the site icon. Default 512 (pixels).
- * @param string $url     Optional. Fallback url if no site icon is found. Default empty.
- * @param int    $blog_id Optional. ID of the blog to get the site icon for. Default current blog.
- */
-function site_icon_url( $size = 512, $url = '', $blog_id = 0 ) {
-	echo esc_url( get_site_icon_url( $size, $url, $blog_id ) );
-}
-
-/**
- * Whether the site has a Site Icon.
- *
- * @since 4.3.0
- *
- * @param int $blog_id Optional. ID of the blog in question. Default current blog.
- * @return bool Whether the site has a site icon or not.
- */
-function has_site_icon( $blog_id = 0 ) {
-	return (bool) get_site_icon_url( 512, '', $blog_id );
-}
-
-/**
- * Determines whether the site has a custom logo.
- *
- * @since 4.5.0
- *
- * @param int $blog_id Optional. ID of the blog in question. Default is the ID of the current blog.
- * @return bool Whether the site has a custom logo or not.
- */
-function has_custom_logo( $blog_id = 0 ) {
-	if ( is_multisite() && (int) $blog_id !== get_current_blog_id() ) {
-		switch_to_blog( $blog_id );
-	}
-
-	$custom_logo_id = get_theme_mod( 'custom_logo' );
-
-	if ( is_multisite() && ms_is_switched() ) {
-		restore_current_blog();
-	}
-
-	return (bool) $custom_logo_id;
-}
-
-/**
- * Returns a custom logo, linked to home.
- *
- * @since 4.5.0
- *
- * @param int $blog_id Optional. ID of the blog in question. Default is the ID of the current blog.
- * @return string Custom logo markup.
- */
-function get_custom_logo( $blog_id = 0 ) {
-	$html = '';
-
-	if ( is_multisite() && (int) $blog_id !== get_current_blog_id() ) {
-		switch_to_blog( $blog_id );
-	}
-
-	$custom_logo_id = get_theme_mod( 'custom_logo' );
-
-	// We have a logo. Logo is go.
-	if ( $custom_logo_id ) {
-		$html = sprintf( '<a href="%1$s" class="custom-logo-link" rel="home" itemprop="url">%2$s</a>',
-			esc_url( home_url( '/' ) ),
-			wp_get_attachment_image( $custom_logo_id, 'full', false, array(
-				'class'    => 'custom-logo',
-				'itemprop' => 'logo',
-			) )
-		);
-	}
-
-	// If no logo is set but we're in the Customizer, leave a placeholder (needed for the live preview).
-	elseif ( is_customize_preview() ) {
-		$html = sprintf( '<a href="%1$s" class="custom-logo-link" style="display:none;"><img class="custom-logo"/></a>',
-			esc_url( home_url( '/' ) )
-		);
-	}
-
-	if ( is_multisite() && ms_is_switched() ) {
-		restore_current_blog();
-	}
-
-	/**
-	 * Filters the custom logo output.
-	 *
-	 * @since 4.5.0
-	 * @since 4.6.0 Added the `$blog_id` parameter.
-	 *
-	 * @param string $html    Custom logo HTML output.
-	 * @param int    $blog_id ID of the blog to get the custom logo for.
-	 */
-	return apply_filters( 'get_custom_logo', $html, $blog_id );
-}
-
-/**
- * Displays a custom logo, linked to home.
- *
- * @since 4.5.0
- *
- * @param int $blog_id Optional. ID of the blog in question. Default is the ID of the current blog.
- */
-function the_custom_logo( $blog_id = 0 ) {
-	echo get_custom_logo( $blog_id );
-}
-
-/**
- * Returns document title for the current page.
- *
- * @since 4.4.0
- *
- * @global int $page  Page number of a single post.
- * @global int $paged Page number of a list of posts.
- *
- * @return string Tag with the document title.
- */
-function wp_get_document_title() {
-
-	/**
-	 * Filters the document title before it is generated.
-	 *
-	 * Passing a non-empty value will short-circuit wp_get_document_title(),
-	 * returning that value instead.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param string $title The document title. Default empty string.
-	 */
-	$title = apply_filters( 'pre_get_document_title', '' );
-	if ( ! empty( $title ) ) {
-		return $title;
-	}
-
-	global $page, $paged;
-
-	$title = array(
-		'title' => '',
-	);
-
-	// If it's a 404 page, use a "Page not found" title.
-	if ( is_404() ) {
-		$title['title'] = __( 'Page not found' );
-
-	// If it's a search, use a dynamic search results title.
-	} elseif ( is_search() ) {
-		/* translators: %s: search phrase */
-		$title['title'] = sprintf( __( 'Search Results for &#8220;%s&#8221;' ), get_search_query() );
-
-	// If on the front page, use the site title.
-	} elseif ( is_front_page() ) {
-		$title['title'] = get_bloginfo( 'name', 'display' );
-
-	// If on a post type archive, use the post type archive title.
-	} elseif ( is_post_type_archive() ) {
-		$title['title'] = post_type_archive_title( '', false );
-
-	// If on a taxonomy archive, use the term title.
-	} elseif ( is_tax() ) {
-		$title['title'] = single_term_title( '', false );
-
-	/*
-	 * If we're on the blog page that is not the homepage or
-	 * a single post of any post type, use the post title.
-	 */
-	} elseif ( is_home() || is_singular() ) {
-		$title['title'] = single_post_title( '', false );
-
-	// If on a category or tag archive, use the term title.
-	} elseif ( is_category() || is_tag() ) {
-		$title['title'] = single_term_title( '', false );
-
-	// If on an author archive, use the author's display name.
-	} elseif ( is_author() && $author = get_queried_object() ) {
-		$title['title'] = $author->display_name;
-
-	// If it's a date archive, use the date as the title.
-	} elseif ( is_year() ) {
-		$title['title'] = get_the_date( _x( 'Y', 'yearly archives date format' ) );
-
-	} elseif ( is_month() ) {
-		$title['title'] = get_the_date( _x( 'F Y', 'monthly archives date format' ) );
-
-	} elseif ( is_day() ) {
-		$title['title'] = get_the_date();
-	}
-
-	// Add a page number if necessary.
-	if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
-		$title['page'] = sprintf( __( 'Page %s' ), max( $paged, $page ) );
-	}
-
-	// Append the description or site title to give context.
-	if ( is_front_page() ) {
-		$title['tagline'] = get_bloginfo( 'description', 'display' );
-	} else {
-		$title['site'] = get_bloginfo( 'name', 'display' );
-	}
-
-	/**
-	 * Filters the separator for the document title.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param string $sep Document title separator. Default '-'.
-	 */
-	$sep = apply_filters( 'document_title_separator', '-' );
-
-	/**
-	 * Filters the parts of the document title.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param array $title {
-	 *     The document title parts.
-	 *
-	 *     @type string $title   Title of the viewed page.
-	 *     @type string $page    Optional. Page number if paginated.
-	 *     @type string $tagline Optional. Site description when on home page.
-	 *     @type string $site    Optional. Site title when not on home page.
-	 * }
-	 */
-	$title = apply_filters( 'document_title_parts', $title );
-
-	$title = implode( " $sep ", array_filter( $title ) );
-	$title = wptexturize( $title );
-	$title = convert_chars( $title );
-	$title = esc_html( $title );
-	$title = capital_P_dangit( $title );
-
-	return $title;
-}
-
-/**
- * Displays title tag with content.
- *
- * @ignore
- * @since 4.1.0
- * @since 4.4.0 Improved title output replaced `wp_title()`.
- * @access private
- */
-function _wp_render_title_tag() {
-	if ( ! current_theme_supports( 'title-tag' ) ) {
-		return;
-	}
-
-	echo '<title>' . wp_get_document_title() . '</title>' . "\n";
-}
-
-/**
- * Display or retrieve page title for all areas of blog.
- *
- * By default, the page title will display the separator before the page title,
- * so that the blog title will be before the page title. This is not good for
- * title display, since the blog title shows up on most tabs and not what is
- * important, which is the page that the user is looking at.
- *
- * There are also SEO benefits to having the blog title after or to the 'right'
- * of the page title. However, it is mostly common sense to have the blog title
- * to the right with most browsers supporting tabs. You can achieve this by
- * using the seplocation parameter and setting the value to 'right'. This change
- * was introduced around 2.5.0, in case backward compatibility of themes is
- * important.
- *
- * @since 1.0.0
- *
- * @global WP_Locale $wp_locale
- *
- * @param string $sep         Optional, default is '&raquo;'. How to separate the various items
- *                            within the page title.
- * @param bool   $display     Optional, default is true. Whether to display or retrieve title.
- * @param string $seplocation Optional. Direction to display title, 'right'.
- * @return string|null String on retrieve, null when displaying.
- */
-function wp_title( $sep = '&raquo;', $display = true, $seplocation = '' ) {
-	global $wp_locale;
-
-	$m        = get_query_var( 'm' );
-	$year     = get_query_var( 'year' );
-	$monthnum = get_query_var( 'monthnum' );
-	$day      = get_query_var( 'day' );
-	$search   = get_query_var( 's' );
-	$title    = '';
-
-	$t_sep = '%WP_TITLE_SEP%'; // Temporary separator, for accurate flipping, if necessary
-
-	// If there is a post
-	if ( is_single() || ( is_home() && ! is_front_page() ) || ( is_page() && ! is_front_page() ) ) {
-		$title = single_post_title( '', false );
-	}
-
-	// If there's a post type archive
-	if ( is_post_type_archive() ) {
-		$post_type = get_query_var( 'post_type' );
-		if ( is_array( $post_type ) ) {
-			$post_type = reset( $post_type );
-		}
-		$post_type_object = get_post_type_object( $post_type );
-		if ( ! $post_type_object->has_archive ) {
-			$title = post_type_archive_title( '', false );
-		}
-	}
-
-	// If there's a category or tag
-	if ( is_category() || is_tag() ) {
-		$title = single_term_title( '', false );
-	}
-
-	// If there's a taxonomy
-	if ( is_tax() ) {
-		$term = get_queried_object();
-		if ( $term ) {
-			$tax   = get_taxonomy( $term->taxonomy );
-			$title = single_term_title( $tax->labels->name . $t_sep, false );
-		}
-	}
-
-	// If there's an author
-	if ( is_author() && ! is_post_type_archive() ) {
-		$author = get_queried_object();
-		if ( $author ) {
-			$title = $author->display_name;
-		}
-	}
-
-	// Post type archives with has_archive should override terms.
-	if ( is_post_type_archive() && $post_type_object->has_archive ) {
-		$title = post_type_archive_title( '', false );
-	}
-
-	// If there's a month
-	if ( is_archive() && ! empty( $m ) ) {
-		$my_year  = substr( $m, 0, 4 );
-		$my_month = $wp_locale->get_month( substr( $m, 4, 2 ) );
-		$my_day   = intval( substr( $m, 6, 2 ) );
-		$title    = $my_year . ( $my_month ? $t_sep . $my_month : '' ) . ( $my_day ? $t_sep . $my_day : '' );
-	}
-
-	// If there's a year
-	if ( is_archive() && ! empty( $year ) ) {
-		$title = $year;
-		if ( ! empty( $monthnum ) ) {
-			$title .= $t_sep . $wp_locale->get_month( $monthnum );
-		}
-		if ( ! empty( $day ) ) {
-			$title .= $t_sep . zeroise( $day, 2 );
-		}
-	}
-
-	// If it's a search
-	if ( is_search() ) {
-		/* translators: 1: separator, 2: search phrase */
-		$title = sprintf( __( 'Search Results %1$s %2$s' ), $t_sep, strip_tags( $search ) );
-	}
-
-	// If it's a 404 page
-	if ( is_404() ) {
-		$title = __( 'Page not found' );
-	}
-
-	$prefix = '';
-	if ( ! empty( $title ) ) {
-		$prefix = " $sep ";
-	}
-
-	/**
-	 * Filters the parts of the page title.
-	 *
-	 * @since 4.0.0
-	 *
-	 * @param array $title_array Parts of the page title.
-	 */
-	$title_array = apply_filters( 'wp_title_parts', explode( $t_sep, $title ) );
-
-	// Determines position of the separator and direction of the breadcrumb
-	if ( 'right' == $seplocation ) { // sep on right, so reverse the order
-		$title_array = array_reverse( $title_array );
-		$title       = implode( " $sep ", $title_array ) . $prefix;
-	} else {
-		$title = $prefix . implode( " $sep ", $title_array );
-	}
-
-	/**
-	 * Filters the text of the page title.
-	 *
-	 * @since 2.0.0
-	 *
-	 * @param string $title Page title.
-	 * @param string $sep Title separator.
-	 * @param string $seplocation Location of the separator (left or right).
-	 */
-	$title = apply_filters( 'wp_title', $title, $sep, $seplocation );
-
-	// Send it out
-	if ( $display ) {
-		echo $title;
-	} else {
-		return $title;
-	}
-}
-
-/**
- * Display or retrieve page title for post.
- *
- * This is optimized for single.php template file for displaying the post title.
- *
- * It does not support placing the separator after the title, but by leaving the
- * prefix parameter empty, you can set the title separator manually. The prefix
- * does not automatically place a space between the prefix, so if there should
- * be a space, the parameter value will need to have it at the end.
- *
- * @since 0.71
- *
- * @param string $prefix  Optional. What to display before the title.
- * @param bool   $display Optional, default is true. Whether to display or retrieve title.
- * @return string|void Title when retrieving.
- */
-function single_post_title( $prefix = '', $display = true ) {
-	$_post = get_queried_object();
-
-	if ( !isset($_post->post_title) )
-		return;
-
-	/**
-	 * Filters the page title for a single post.
-	 *
-	 * @since 0.71
-	 *
-	 * @param string $_post_title The single post page title.
-	 * @param object $_post       The current queried object as returned by get_queried_object().
-	 */
-	$title = apply_filters( 'single_post_title', $_post->post_title, $_post );
-	if ( $display )
-		echo $prefix . $title;
-	else
-		return $prefix . $title;
-}
-
-/**
- * Display or retrieve title for a post type archive.
- *
- * This is optimized for archive.php and archive-{$post_type}.php template files
- * for displaying the title of the post type.
- *
- * @since 3.1.0
- *
- * @param string $prefix  Optional. What to display before the title.
- * @param bool   $display Optional, default is true. Whether to display or retrieve title.
- * @return string|void Title when retrieving, null when displaying or failure.
- */
-function post_type_archive_title( $prefix = '', $display = true ) {
-	if ( ! is_post_type_archive() )
-		return;
-
-	$post_type = get_query_var( 'post_type' );
-	if ( is_array( $post_type ) )
-		$post_type = reset( $post_type );
-
-	$post_type_obj = get_post_type_object( $post_type );
-
-	/**
-	 * Filters the post type archive title.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param string $post_type_name Post type 'name' label.
-	 * @param string $post_type      Post type.
-	 */
-	$title = apply_filters( 'post_type_archive_title', $post_type_obj->labels->name, $post_type );
-
-	if ( $display )
-		echo $prefix . $title;
-	else
-		return $prefix . $title;
-}
-
-/**
- * Display or retrieve page title for category archive.
- *
- * Useful for category template files for displaying the category page title.
- * The prefix does not automatically place a space between the prefix, so if
- * there should be a space, the parameter value will need to have it at the end.
- *
- * @since 0.71
- *
- * @param string $prefix  Optional. What to display before the title.
- * @param bool   $display Optional, default is true. Whether to display or retrieve title.
- * @return string|void Title when retrieving.
- */
-function single_cat_title( $prefix = '', $display = true ) {
-	return single_term_title( $prefix, $display );
-}
-
-/**
- * Display or retrieve page title for tag post archive.
- *
- * Useful for tag template files for displaying the tag page title. The prefix
- * does not automatically place a space between the prefix, so if there should
- * be a space, the parameter value will need to have it at the end.
- *
- * @since 2.3.0
- *
- * @param string $prefix  Optional. What to display before the title.
- * @param bool   $display Optional, default is true. Whether to display or retrieve title.
- * @return string|void Title when retrieving.
- */
-function single_tag_title( $prefix = '', $display = true ) {
-	return single_term_title( $prefix, $display );
-}
-
-/**
- * Display or retrieve page title for taxonomy term archive.
- *
- * Useful for taxonomy term template files for displaying the taxonomy term page title.
- * The prefix does not automatically place a space between the prefix, so if there should
- * be a space, the parameter value will need to have it at the end.
- *
- * @since 3.1.0
- *
- * @param string $prefix  Optional. What to display before the title.
- * @param bool   $display Optional, default is true. Whether to display or retrieve title.
- * @return string|void Title when retrieving.
- */
-function single_term_title( $prefix = '', $display = true ) {
-	$term = get_queried_object();
-
-	if ( !$term )
-		return;
-
-	if ( is_category() ) {
-		/**
-		 * Filters the category archive page title.
-		 *
-		 * @since 2.0.10
-		 *
-		 * @param string $term_name Category name for archive being displayed.
-		 */
-		$term_name = apply_filters( 'single_cat_title', $term->name );
-	} elseif ( is_tag() ) {
-		/**
-		 * Filters the tag archive page title.
-		 *
-		 * @since 2.3.0
-		 *
-		 * @param string $term_name Tag name for archive being displayed.
-		 */
-		$term_name = apply_filters( 'single_tag_title', $term->name );
-	} elseif ( is_tax() ) {
-		/**
-		 * Filters the custom taxonomy archive page title.
-		 *
-		 * @since 3.1.0
-		 *
-		 * @param string $term_name Term name for archive being displayed.
-		 */
-		$term_name = apply_filters( 'single_term_title', $term->name );
-	} else {
-		return;
-	}
-
-	if ( empty( $term_name ) )
-		return;
-
-	if ( $display )
-		echo $prefix . $term_name;
-	else
-		return $prefix . $term_name;
-}
-
-/**
- * Display or retrieve page title for post archive based on date.
- *
- * Useful for when the template only needs to display the month and year,
- * if either are available. The prefix does not automatically place a space
- * between the prefix, so if there should be a space, the parameter value
- * will need to have it at the end.
- *
- * @since 0.71
- *
- * @global WP_Locale $wp_locale
- *
- * @param string $prefix  Optional. What to display before the title.
- * @param bool   $display Optional, default is true. Whether to display or retrieve title.
- * @return string|void Title when retrieving.
- */
-function single_month_title($prefix = '', $display = true ) {
-	global $wp_locale;
-
-	$m = get_query_var('m');
-	$year = get_query_var('year');
-	$monthnum = get_query_var('monthnum');
-
-	if ( !empty($monthnum) && !empty($year) ) {
-		$my_year = $year;
-		$my_month = $wp_locale->get_month($monthnum);
-	} elseif ( !empty($m) ) {
-		$my_year = substr($m, 0, 4);
-		$my_month = $wp_locale->get_month(substr($m, 4, 2));
-	}
-
-	if ( empty($my_month) )
-		return false;
-
-	$result = $prefix . $my_month . $prefix . $my_year;
-
-	if ( !$display )
-		return $result;
-	echo $result;
-}
-
-/**
- * Display the archive title based on the queried object.
- *
- * @since 4.1.0
- *
- * @see get_the_archive_title()
- *
- * @param string $before Optional. Content to prepend to the title. Default empty.
- * @param string $after  Optional. Content to append to the title. Default empty.
- */
-function the_archive_title( $before = '', $after = '' ) {
-	$title = get_the_archive_title();
-
-	if ( ! empty( $title ) ) {
-		echo $before . $title . $after;
-	}
-}
-
-/**
- * Retrieve the archive title based on the queried object.
- *
- * @since 4.1.0
- *
- * @return string Archive title.
- */
-function get_the_archive_title() {
-	if ( is_category() ) {
-		$title = sprintf( __( 'Category: %s' ), single_cat_title( '', false ) );
-	} elseif ( is_tag() ) {
-		$title = sprintf( __( 'Tag: %s' ), single_tag_title( '', false ) );
-	} elseif ( is_author() ) {
-		$title = sprintf( __( 'Author: %s' ), '<span class="vcard">' . get_the_author() . '</span>' );
-	} elseif ( is_year() ) {
-		$title = sprintf( __( 'Year: %s' ), get_the_date( _x( 'Y', 'yearly archives date format' ) ) );
-	} elseif ( is_month() ) {
-		$title = sprintf( __( 'Month: %s' ), get_the_date( _x( 'F Y', 'monthly archives date format' ) ) );
-	} elseif ( is_day() ) {
-		$title = sprintf( __( 'Day: %s' ), get_the_date( _x( 'F j, Y', 'daily archives date format' ) ) );
-	} elseif ( is_tax( 'post_format' ) ) {
-		if ( is_tax( 'post_format', 'post-format-aside' ) ) {
-			$title = _x( 'Asides', 'post format archive title' );
-		} elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) {
-			$title = _x( 'Galleries', 'post format archive title' );
-		} elseif ( is_tax( 'post_format', 'post-format-image' ) ) {
-			$title = _x( 'Images', 'post format archive title' );
-		} elseif ( is_tax( 'post_format', 'post-format-video' ) ) {
-			$title = _x( 'Videos', 'post format archive title' );
-		} elseif ( is_tax( 'post_format', 'post-format-quote' ) ) {
-			$title = _x( 'Quotes', 'post format archive title' );
-		} elseif ( is_tax( 'post_format', 'post-format-link' ) ) {
-			$title = _x( 'Links', 'post format archive title' );
-		} elseif ( is_tax( 'post_format', 'post-format-status' ) ) {
-			$title = _x( 'Statuses', 'post format archive title' );
-		} elseif ( is_tax( 'post_format', 'post-format-audio' ) ) {
-			$title = _x( 'Audio', 'post format archive title' );
-		} elseif ( is_tax( 'post_format', 'post-format-chat' ) ) {
-			$title = _x( 'Chats', 'post format archive title' );
-		}
-	} elseif ( is_post_type_archive() ) {
-		$title = sprintf( __( 'Archives: %s' ), post_type_archive_title( '', false ) );
-	} elseif ( is_tax() ) {
-		$tax = get_taxonomy( get_queried_object()->taxonomy );
-		/* translators: 1: Taxonomy singular name, 2: Current taxonomy term */
-		$title = sprintf( __( '%1$s: %2$s' ), $tax->labels->singular_name, single_term_title( '', false ) );
-	} else {
-		$title = __( 'Archives' );
-	}
-
-	/**
-	 * Filters the archive title.
-	 *
-	 * @since 4.1.0
-	 *
-	 * @param string $title Archive title to be displayed.
-	 */
-	return apply_filters( 'get_the_archive_title', $title );
-}
-
-/**
- * Display category, tag, term, or author description.
- *
- * @since 4.1.0
- *
- * @see get_the_archive_description()
- *
- * @param string $before Optional. Content to prepend to the description. Default empty.
- * @param string $after  Optional. Content to append to the description. Default empty.
- */
-function the_archive_description( $before = '', $after = '' ) {
-	$description = get_the_archive_description();
-	if ( $description ) {
-		echo $before . $description . $after;
-	}
-}
-
-/**
- * Retrieve category, tag, term, or author description.
- *
- * @since 4.1.0
- * @since 4.7.0 Added support for author archives.
- *
- * @see term_description()
- *
- * @return string Archive description.
- */
-function get_the_archive_description() {
-	if ( is_author() ) {
-		$description = get_the_author_meta( 'description' );
-	} else {
-		$description = term_description();
-	}
-
-	/**
-	 * Filters the archive description.
-	 *
-	 * @since 4.1.0
-	 *
-	 * @param string $description Archive description to be displayed.
-	 */
-	return apply_filters( 'get_the_archive_description', $description );
-}
-
-/**
- * Retrieve archive link content based on predefined or custom code.
- *
- * The format can be one of four styles. The 'link' for head element, 'option'
- * for use in the select element, 'html' for use in list (either ol or ul HTML
- * elements). Custom content is also supported using the before and after
- * parameters.
- *
- * The 'link' format uses the `<link>` HTML element with the **archives**
- * relationship. The before and after parameters are not used. The text
- * parameter is used to describe the link.
- *
- * The 'option' format uses the option HTML element for use in select element.
- * The value is the url parameter and the before and after parameters are used
- * between the text description.
- *
- * The 'html' format, which is the default, uses the li HTML element for use in
- * the list HTML elements. The before parameter is before the link and the after
- * parameter is after the closing link.
- *
- * The custom format uses the before parameter before the link ('a' HTML
- * element) and the after parameter after the closing link tag. If the above
- * three values for the format are not used, then custom format is assumed.
- *
- * @since 1.0.0
- *
- * @param string $url    URL to archive.
- * @param string $text   Archive text description.
- * @param string $format Optional, default is 'html'. Can be 'link', 'option', 'html', or custom.
- * @param string $before Optional. Content to prepend to the description. Default empty.
- * @param string $after  Optional. Content to append to the description. Default empty.
- * @return string HTML link content for archive.
- */
-function get_archives_link($url, $text, $format = 'html', $before = '', $after = '') {
-	$text = wptexturize($text);
-	$url = esc_url($url);
-
-	if ('link' == $format)
-		$link_html = "\t<link rel='archives' title='" . esc_attr( $text ) . "' href='$url' />\n";
-	elseif ('option' == $format)
-		$link_html = "\t<option value='$url'>$before $text $after</option>\n";
-	elseif ('html' == $format)
-		$link_html = "\t<li>$before<a href='$url'>$text</a>$after</li>\n";
-	else // custom
-		$link_html = "\t$before<a href='$url'>$text</a>$after\n";
-
-	/**
-	 * Filters the archive link content.
-	 *
-	 * @since 2.6.0
-	 * @since 4.5.0 Added the `$url`, `$text`, `$format`, `$before`, and `$after` parameters.
-	 *
-	 * @param string $link_html The archive HTML link content.
-	 * @param string $url       URL to archive.
-	 * @param string $text      Archive text description.
-	 * @param string $format    Link format. Can be 'link', 'option', 'html', or custom.
-	 * @param string $before    Content to prepend to the description.
-	 * @param string $after     Content to append to the description.
-	 */
-	return apply_filters( 'get_archives_link', $link_html, $url, $text, $format, $before, $after );
-}
-
-/**
- * Display archive links based on type and format.
- *
- * @since 1.2.0
- * @since 4.4.0 $post_type arg was added.
- *
- * @see get_archives_link()
- *
- * @global wpdb      $wpdb
- * @global WP_Locale $wp_locale
- *
- * @param string|array $args {
- *     Default archive links arguments. Optional.
- *
- *     @type string     $type            Type of archive to retrieve. Accepts 'daily', 'weekly', 'monthly',
- *                                       'yearly', 'postbypost', or 'alpha'. Both 'postbypost' and 'alpha'
- *                                       display the same archive link list as well as post titles instead
- *                                       of displaying dates. The difference between the two is that 'alpha'
- *                                       will order by post title and 'postbypost' will order by post date.
- *                                       Default 'monthly'.
- *     @type string|int $limit           Number of links to limit the query to. Default empty (no limit).
- *     @type string     $format          Format each link should take using the $before and $after args.
- *                                       Accepts 'link' (`<link>` tag), 'option' (`<option>` tag), 'html'
- *                                       (`<li>` tag), or a custom format, which generates a link anchor
- *                                       with $before preceding and $after succeeding. Default 'html'.
- *     @type string     $before          Markup to prepend to the beginning of each link. Default empty.
- *     @type string     $after           Markup to append to the end of each link. Default empty.
- *     @type bool       $show_post_count Whether to display the post count alongside the link. Default false.
- *     @type bool|int   $echo            Whether to echo or return the links list. Default 1|true to echo.
- *     @type string     $order           Whether to use ascending or descending order. Accepts 'ASC', or 'DESC'.
- *                                       Default 'DESC'.
- *     @type string     $post_type       Post type. Default 'post'.
- * }
- * @return string|void String when retrieving.
- */
-function wp_get_archives( $args = '' ) {
-	global $wpdb, $wp_locale;
-
-	$defaults = array(
-		'type' => 'monthly', 'limit' => '',
-		'format' => 'html', 'before' => '',
-		'after' => '', 'show_post_count' => false,
-		'echo' => 1, 'order' => 'DESC',
-		'post_type' => 'post'
-	);
-
-	$r = wp_parse_args( $args, $defaults );
-
-	$post_type_object = get_post_type_object( $r['post_type'] );
-	if ( ! is_post_type_viewable( $post_type_object ) ) {
-		return;
-	}
-	$r['post_type'] = $post_type_object->name;
-
-	if ( '' == $r['type'] ) {
-		$r['type'] = 'monthly';
-	}
-
-	if ( ! empty( $r['limit'] ) ) {
-		$r['limit'] = absint( $r['limit'] );
-		$r['limit'] = ' LIMIT ' . $r['limit'];
-	}
-
-	$order = strtoupper( $r['order'] );
-	if ( $order !== 'ASC' ) {
-		$order = 'DESC';
-	}
-
-	// this is what will separate dates on weekly archive links
-	$archive_week_separator = '&#8211;';
-
-	$sql_where = $wpdb->prepare( "WHERE post_type = %s AND post_status = 'publish'", $r['post_type'] );
-
-	/**
-	 * Filters the SQL WHERE clause for retrieving archives.
-	 *
-	 * @since 2.2.0
-	 *
-	 * @param string $sql_where Portion of SQL query containing the WHERE clause.
-	 * @param array  $r         An array of default arguments.
-	 */
-	$where = apply_filters( 'getarchives_where', $sql_where, $r );
-
-	/**
-	 * Filters the SQL JOIN clause for retrieving archives.
-	 *
-	 * @since 2.2.0
-	 *
-	 * @param string $sql_join Portion of SQL query containing JOIN clause.
-	 * @param array  $r        An array of default arguments.
-	 */
-	$join = apply_filters( 'getarchives_join', '', $r );
-
-	$output = '';
-
-	$last_changed = wp_cache_get( 'last_changed', 'posts' );
-	if ( ! $last_changed ) {
-		$last_changed = microtime();
-		wp_cache_set( 'last_changed', $last_changed, 'posts' );
-	}
-
-	$limit = $r['limit'];
-
-	if ( 'monthly' == $r['type'] ) {
-		$query = "SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date $order $limit";
-		$key = md5( $query );
-		$key = "wp_get_archives:$key:$last_changed";
-		if ( ! $results = wp_cache_get( $key, 'posts' ) ) {
-			$results = $wpdb->get_results( $query );
-			wp_cache_set( $key, $results, 'posts' );
-		}
-		if ( $results ) {
-			$after = $r['after'];
-			foreach ( (array) $results as $result ) {
-				$url = get_month_link( $result->year, $result->month );
-				if ( 'post' !== $r['post_type'] ) {
-					$url = add_query_arg( 'post_type', $r['post_type'], $url );
-				}
-				/* translators: 1: month name, 2: 4-digit year */
-				$text = sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $result->month ), $result->year );
-				if ( $r['show_post_count'] ) {
-					$r['after'] = '&nbsp;(' . $result->posts . ')' . $after;
-				}
-				$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
-			}
-		}
-	} elseif ( 'yearly' == $r['type'] ) {
-		$query = "SELECT YEAR(post_date) AS `year`, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date) ORDER BY post_date $order $limit";
-		$key = md5( $query );
-		$key = "wp_get_archives:$key:$last_changed";
-		if ( ! $results = wp_cache_get( $key, 'posts' ) ) {
-			$results = $wpdb->get_results( $query );
-			wp_cache_set( $key, $results, 'posts' );
-		}
-		if ( $results ) {
-			$after = $r['after'];
-			foreach ( (array) $results as $result) {
-				$url = get_year_link( $result->year );
-				if ( 'post' !== $r['post_type'] ) {
-					$url = add_query_arg( 'post_type', $r['post_type'], $url );
-				}
-				$text = sprintf( '%d', $result->year );
-				if ( $r['show_post_count'] ) {
-					$r['after'] = '&nbsp;(' . $result->posts . ')' . $after;
-				}
-				$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
-			}
-		}
-	} elseif ( 'daily' == $r['type'] ) {
-		$query = "SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, DAYOFMONTH(post_date) AS `dayofmonth`, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date), MONTH(post_date), DAYOFMONTH(post_date) ORDER BY post_date $order $limit";
-		$key = md5( $query );
-		$key = "wp_get_archives:$key:$last_changed";
-		if ( ! $results = wp_cache_get( $key, 'posts' ) ) {
-			$results = $wpdb->get_results( $query );
-			wp_cache_set( $key, $results, 'posts' );
-		}
-		if ( $results ) {
-			$after = $r['after'];
-			foreach ( (array) $results as $result ) {
-				$url  = get_day_link( $result->year, $result->month, $result->dayofmonth );
-				if ( 'post' !== $r['post_type'] ) {
-					$url = add_query_arg( 'post_type', $r['post_type'], $url );
-				}
-				$date = sprintf( '%1$d-%2$02d-%3$02d 00:00:00', $result->year, $result->month, $result->dayofmonth );
-				$text = mysql2date( get_option( 'date_format' ), $date );
-				if ( $r['show_post_count'] ) {
-					$r['after'] = '&nbsp;(' . $result->posts . ')' . $after;
-				}
-				$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
-			}
-		}
-	} elseif ( 'weekly' == $r['type'] ) {
-		$week = _wp_mysql_week( '`post_date`' );
-		$query = "SELECT DISTINCT $week AS `week`, YEAR( `post_date` ) AS `yr`, DATE_FORMAT( `post_date`, '%Y-%m-%d' ) AS `yyyymmdd`, count( `ID` ) AS `posts` FROM `$wpdb->posts` $join $where GROUP BY $week, YEAR( `post_date` ) ORDER BY `post_date` $order $limit";
-		$key = md5( $query );
-		$key = "wp_get_archives:$key:$last_changed";
-		if ( ! $results = wp_cache_get( $key, 'posts' ) ) {
-			$results = $wpdb->get_results( $query );
-			wp_cache_set( $key, $results, 'posts' );
-		}
-		$arc_w_last = '';
-		if ( $results ) {
-			$after = $r['after'];
-			foreach ( (array) $results as $result ) {
-				if ( $result->week != $arc_w_last ) {
-					$arc_year       = $result->yr;
-					$arc_w_last     = $result->week;
-					$arc_week       = get_weekstartend( $result->yyyymmdd, get_option( 'start_of_week' ) );
-					$arc_week_start = date_i18n( get_option( 'date_format' ), $arc_week['start'] );
-					$arc_week_end   = date_i18n( get_option( 'date_format' ), $arc_week['end'] );
-					$url            = add_query_arg( array( 'm' => $arc_year, 'w' => $result->week, ), home_url( '/' ) );
-					if ( 'post' !== $r['post_type'] ) {
-						$url = add_query_arg( 'post_type', $r['post_type'], $url );
-					}
-					$text           = $arc_week_start . $archive_week_separator . $arc_week_end;
-					if ( $r['show_post_count'] ) {
-						$r['after'] = '&nbsp;(' . $result->posts . ')' . $after;
-					}
-					$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
-				}
-			}
-		}
-	} elseif ( ( 'postbypost' == $r['type'] ) || ('alpha' == $r['type'] ) ) {
-		$orderby = ( 'alpha' == $r['type'] ) ? 'post_title ASC ' : 'post_date DESC, ID DESC ';
-		$query = "SELECT * FROM $wpdb->posts $join $where ORDER BY $orderby $limit";
-		$key = md5( $query );
-		$key = "wp_get_archives:$key:$last_changed";
-		if ( ! $results = wp_cache_get( $key, 'posts' ) ) {
-			$results = $wpdb->get_results( $query );
-			wp_cache_set( $key, $results, 'posts' );
-		}
-		if ( $results ) {
-			foreach ( (array) $results as $result ) {
-				if ( $result->post_date != '0000-00-00 00:00:00' ) {
-					$url = get_permalink( $result );
-					if ( $result->post_title ) {
-						/** This filter is documented in wp-includes/post-template.php */
-						$text = strip_tags( apply_filters( 'the_title', $result->post_title, $result->ID ) );
-					} else {
-						$text = $result->ID;
-					}
-					$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
-				}
-			}
-		}
-	}
-	if ( $r['echo'] ) {
-		echo $output;
-	} else {
-		return $output;
-	}
-}
-
-/**
- * Get number of days since the start of the week.
- *
- * @since 1.5.0
- *
- * @param int $num Number of day.
- * @return int Days since the start of the week.
- */
-function calendar_week_mod($num) {
-	$base = 7;
-	return ($num - $base*floor($num/$base));
-}
-
-/**
- * Display calendar with days that have posts as links.
- *
- * The calendar is cached, which will be retrieved, if it exists. If there are
- * no posts for the month, then it will not be displayed.
- *
- * @since 1.0.0
- *
- * @global wpdb      $wpdb
- * @global int       $m
- * @global int       $monthnum
- * @global int       $year
- * @global WP_Locale $wp_locale
- * @global array     $posts
- *
- * @param bool $initial Optional, default is true. Use initial calendar names.
- * @param bool $echo    Optional, default is true. Set to false for return.
- * @return string|void String when retrieving.
- */
-function get_calendar( $initial = true, $echo = true ) {
-	global $wpdb, $m, $monthnum, $year, $wp_locale, $posts;
-
-	$key = md5( $m . $monthnum . $year );
-	$cache = wp_cache_get( 'get_calendar', 'calendar' );
-
-	if ( $cache && is_array( $cache ) && isset( $cache[ $key ] ) ) {
-		/** This filter is documented in wp-includes/general-template.php */
-		$output = apply_filters( 'get_calendar', $cache[ $key ] );
-
-		if ( $echo ) {
-			echo $output;
-			return;
-		}
-
-		return $output;
-	}
-
-	if ( ! is_array( $cache ) ) {
-		$cache = array();
-	}
-
-	// Quick check. If we have no posts at all, abort!
-	if ( ! $posts ) {
-		$gotsome = $wpdb->get_var("SELECT 1 as test FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1");
-		if ( ! $gotsome ) {
-			$cache[ $key ] = '';
-			wp_cache_set( 'get_calendar', $cache, 'calendar' );
-			return;
-		}
-	}
-
-	if ( isset( $_GET['w'] ) ) {
-		$w = (int) $_GET['w'];
-	}
-	// week_begins = 0 stands for Sunday
-	$week_begins = (int) get_option( 'start_of_week' );
-	$ts = current_time( 'timestamp' );
-
-	// Let's figure out when we are
-	if ( ! empty( $monthnum ) && ! empty( $year ) ) {
-		$thismonth = zeroise( intval( $monthnum ), 2 );
-		$thisyear = (int) $year;
-	} elseif ( ! empty( $w ) ) {
-		// We need to get the month from MySQL
-		$thisyear = (int) substr( $m, 0, 4 );
-		//it seems MySQL's weeks disagree with PHP's
-		$d = ( ( $w - 1 ) * 7 ) + 6;
-		$thismonth = $wpdb->get_var("SELECT DATE_FORMAT((DATE_ADD('{$thisyear}0101', INTERVAL $d DAY) ), '%m')");
-	} elseif ( ! empty( $m ) ) {
-		$thisyear = (int) substr( $m, 0, 4 );
-		if ( strlen( $m ) < 6 ) {
-			$thismonth = '01';
-		} else {
-			$thismonth = zeroise( (int) substr( $m, 4, 2 ), 2 );
-		}
-	} else {
-		$thisyear = gmdate( 'Y', $ts );
-		$thismonth = gmdate( 'm', $ts );
-	}
-
-	$unixmonth = mktime( 0, 0 , 0, $thismonth, 1, $thisyear );
-	$last_day = date( 't', $unixmonth );
-
-	// Get the next and previous month and year with at least one post
-	$previous = $wpdb->get_row("SELECT MONTH(post_date) AS month, YEAR(post_date) AS year
-		FROM $wpdb->posts
-		WHERE post_date < '$thisyear-$thismonth-01'
-		AND post_type = 'post' AND post_status = 'publish'
-			ORDER BY post_date DESC
-			LIMIT 1");
-	$next = $wpdb->get_row("SELECT MONTH(post_date) AS month, YEAR(post_date) AS year
-		FROM $wpdb->posts
-		WHERE post_date > '$thisyear-$thismonth-{$last_day} 23:59:59'
-		AND post_type = 'post' AND post_status = 'publish'
-			ORDER BY post_date ASC
-			LIMIT 1");
-
-	/* translators: Calendar caption: 1: month name, 2: 4-digit year */
-	$calendar_caption = _x('%1$s %2$s', 'calendar caption');
-	$calendar_output = '<table id="wp-calendar">
-	<caption>' . sprintf(
-		$calendar_caption,
-		$wp_locale->get_month( $thismonth ),
-		date( 'Y', $unixmonth )
-	) . '</caption>
-	<thead>
-	<tr>';
-
-	$myweek = array();
-
-	for ( $wdcount = 0; $wdcount <= 6; $wdcount++ ) {
-		$myweek[] = $wp_locale->get_weekday( ( $wdcount + $week_begins ) % 7 );
-	}
-
-	foreach ( $myweek as $wd ) {
-		$day_name = $initial ? $wp_locale->get_weekday_initial( $wd ) : $wp_locale->get_weekday_abbrev( $wd );
-		$wd = esc_attr( $wd );
-		$calendar_output .= "\n\t\t<th scope=\"col\" title=\"$wd\">$day_name</th>";
-	}
-
-	$calendar_output .= '
-	</tr>
-	</thead>
-
-	<tfoot>
-	<tr>';
-
-	if ( $previous ) {
-		$calendar_output .= "\n\t\t".'<td colspan="3" id="prev"><a href="' . get_month_link( $previous->year, $previous->month ) . '">&laquo; ' .
-			$wp_locale->get_month_abbrev( $wp_locale->get_month( $previous->month ) ) .
-		'</a></td>';
-	} else {
-		$calendar_output .= "\n\t\t".'<td colspan="3" id="prev" class="pad">&nbsp;</td>';
-	}
-
-	$calendar_output .= "\n\t\t".'<td class="pad">&nbsp;</td>';
-
-	if ( $next ) {
-		$calendar_output .= "\n\t\t".'<td colspan="3" id="next"><a href="' . get_month_link( $next->year, $next->month ) . '">' .
-			$wp_locale->get_month_abbrev( $wp_locale->get_month( $next->month ) ) .
-		' &raquo;</a></td>';
-	} else {
-		$calendar_output .= "\n\t\t".'<td colspan="3" id="next" class="pad">&nbsp;</td>';
-	}
-
-	$calendar_output .= '
-	</tr>
-	</tfoot>
-
-	<tbody>
-	<tr>';
-
-	$daywithpost = array();
-
-	// Get days with posts
-	$dayswithposts = $wpdb->get_results("SELECT DISTINCT DAYOFMONTH(post_date)
-		FROM $wpdb->posts WHERE post_date >= '{$thisyear}-{$thismonth}-01 00:00:00'
-		AND post_type = 'post' AND post_status = 'publish'
-		AND post_date <= '{$thisyear}-{$thismonth}-{$last_day} 23:59:59'", ARRAY_N);
-	if ( $dayswithposts ) {
-		foreach ( (array) $dayswithposts as $daywith ) {
-			$daywithpost[] = $daywith[0];
-		}
-	}
-
-	// See how much we should pad in the beginning
-	$pad = calendar_week_mod( date( 'w', $unixmonth ) - $week_begins );
-	if ( 0 != $pad ) {
-		$calendar_output .= "\n\t\t".'<td colspan="'. esc_attr( $pad ) .'" class="pad">&nbsp;</td>';
-	}
-
-	$newrow = false;
-	$daysinmonth = (int) date( 't', $unixmonth );
-
-	for ( $day = 1; $day <= $daysinmonth; ++$day ) {
-		if ( isset($newrow) && $newrow ) {
-			$calendar_output .= "\n\t</tr>\n\t<tr>\n\t\t";
-		}
-		$newrow = false;
-
-		if ( $day == gmdate( 'j', $ts ) &&
-			$thismonth == gmdate( 'm', $ts ) &&
-			$thisyear == gmdate( 'Y', $ts ) ) {
-			$calendar_output .= '<td id="today">';
-		} else {
-			$calendar_output .= '<td>';
-		}
-
-		if ( in_array( $day, $daywithpost ) ) {
-			// any posts today?
-			$date_format = date( _x( 'F j, Y', 'daily archives date format' ), strtotime( "{$thisyear}-{$thismonth}-{$day}" ) );
-			$label = sprintf( __( 'Posts published on %s' ), $date_format );
-			$calendar_output .= sprintf(
-				'<a href="%s" aria-label="%s">%s</a>',
-				get_day_link( $thisyear, $thismonth, $day ),
-				esc_attr( $label ),
-				$day
-			);
-		} else {
-			$calendar_output .= $day;
-		}
-		$calendar_output .= '</td>';
-
-		if ( 6 == calendar_week_mod( date( 'w', mktime(0, 0 , 0, $thismonth, $day, $thisyear ) ) - $week_begins ) ) {
-			$newrow = true;
-		}
-	}
-
-	$pad = 7 - calendar_week_mod( date( 'w', mktime( 0, 0 , 0, $thismonth, $day, $thisyear ) ) - $week_begins );
-	if ( $pad != 0 && $pad != 7 ) {
-		$calendar_output .= "\n\t\t".'<td class="pad" colspan="'. esc_attr( $pad ) .'">&nbsp;</td>';
-	}
-	$calendar_output .= "\n\t</tr>\n\t</tbody>\n\t</table>";
-
-	$cache[ $key ] = $calendar_output;
-	wp_cache_set( 'get_calendar', $cache, 'calendar' );
-
-	if ( $echo ) {
-		/**
-		 * Filters the HTML calendar output.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param string $calendar_output HTML output of the calendar.
-		 */
-		echo apply_filters( 'get_calendar', $calendar_output );
-		return;
-	}
-	/** This filter is documented in wp-includes/general-template.php */
-	return apply_filters( 'get_calendar', $calendar_output );
-}
-
-/**
- * Purge the cached results of get_calendar.
- *
- * @see get_calendar
- * @since 2.1.0
- */
-function delete_get_calendar_cache() {
-	wp_cache_delete( 'get_calendar', 'calendar' );
-}
-
-/**
- * Display all of the allowed tags in HTML format with attributes.
- *
- * This is useful for displaying in the comment area, which elements and
- * attributes are supported. As well as any plugins which want to display it.
- *
- * @since 1.0.1
- *
- * @global array $allowedtags
- *
- * @return string HTML allowed tags entity encoded.
- */
-function allowed_tags() {
-	global $allowedtags;
-	$allowed = '';
-	foreach ( (array) $allowedtags as $tag => $attributes ) {
-		$allowed .= '<'.$tag;
-		if ( 0 < count($attributes) ) {
-			foreach ( $attributes as $attribute => $limits ) {
-				$allowed .= ' '.$attribute.'=""';
-			}
-		}
-		$allowed .= '> ';
-	}
-	return htmlentities( $allowed );
-}
-
-/***** Date/Time tags *****/
-
-/**
- * Outputs the date in iso8601 format for xml files.
- *
- * @since 1.0.0
- */
-function the_date_xml() {
-	echo mysql2date( 'Y-m-d', get_post()->post_date, false );
-}
-
-/**
- * Display or Retrieve the date the current post was written (once per date)
- *
- * Will only output the date if the current post's date is different from the
- * previous one output.
- *
- * i.e. Only one date listing will show per day worth of posts shown in the loop, even if the
- * function is called several times for each post.
- *
- * HTML output can be filtered with 'the_date'.
- * Date string output can be filtered with 'get_the_date'.
- *
- * @since 0.71
- *
- * @global string|int|bool $currentday
- * @global string|int|bool $previousday
- *
- * @param string $d      Optional. PHP date format defaults to the date_format option if not specified.
- * @param string $before Optional. Output before the date.
- * @param string $after  Optional. Output after the date.
- * @param bool   $echo   Optional, default is display. Whether to echo the date or return it.
- * @return string|void String if retrieving.
- */
-function the_date( $d = '', $before = '', $after = '', $echo = true ) {
-	global $currentday, $previousday;
-
-	if ( is_new_day() ) {
-		$the_date = $before . get_the_date( $d ) . $after;
-		$previousday = $currentday;
-
-		/**
-		 * Filters the date a post was published for display.
-		 *
-		 * @since 0.71
-		 *
-		 * @param string $the_date The formatted date string.
-		 * @param string $d        PHP date format. Defaults to 'date_format' option
-		 *                         if not specified.
-		 * @param string $before   HTML output before the date.
-		 * @param string $after    HTML output after the date.
-		 */
-		$the_date = apply_filters( 'the_date', $the_date, $d, $before, $after );
-
-		if ( $echo )
-			echo $the_date;
-		else
-			return $the_date;
-	}
-}
-
-/**
- * Retrieve the date on which the post was written.
- *
- * Unlike the_date() this function will always return the date.
- * Modify output with the {@see 'get_the_date'} filter.
- *
- * @since 3.0.0
- *
- * @param  string      $d    Optional. PHP date format defaults to the date_format option if not specified.
- * @param  int|WP_Post $post Optional. Post ID or WP_Post object. Default current post.
- * @return false|string Date the current post was written. False on failure.
- */
-function get_the_date( $d = '', $post = null ) {
-	$post = get_post( $post );
-
-	if ( ! $post ) {
-		return false;
-	}
-
-	if ( '' == $d ) {
-		$the_date = mysql2date( get_option( 'date_format' ), $post->post_date );
-	} else {
-		$the_date = mysql2date( $d, $post->post_date );
-	}
-
-	/**
-	 * Filters the date a post was published.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string      $the_date The formatted date.
-	 * @param string      $d        PHP date format. Defaults to 'date_format' option
-	 *                              if not specified.
-	 * @param int|WP_Post $post     The post object or ID.
-	 */
-	return apply_filters( 'get_the_date', $the_date, $d, $post );
-}
-
-/**
- * Display the date on which the post was last modified.
- *
- * @since 2.1.0
- *
- * @param string $d      Optional. PHP date format defaults to the date_format option if not specified.
- * @param string $before Optional. Output before the date.
- * @param string $after  Optional. Output after the date.
- * @param bool   $echo   Optional, default is display. Whether to echo the date or return it.
- * @return string|void String if retrieving.
- */
-function the_modified_date( $d = '', $before = '', $after = '', $echo = true ) {
-	$the_modified_date = $before . get_the_modified_date($d) . $after;
-
-	/**
-	 * Filters the date a post was last modified for display.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param string $the_modified_date The last modified date.
-	 * @param string $d                 PHP date format. Defaults to 'date_format' option
-	 *                                  if not specified.
-	 * @param string $before            HTML output before the date.
-	 * @param string $after             HTML output after the date.
-	 */
-	$the_modified_date = apply_filters( 'the_modified_date', $the_modified_date, $d, $before, $after );
-
-	if ( $echo )
-		echo $the_modified_date;
-	else
-		return $the_modified_date;
-
-}
-
-/**
- * Retrieve the date on which the post was last modified.
- *
- * @since 2.1.0
- * @since 4.6.0 Added the `$post` parameter.
- *
- * @param string      $d    Optional. PHP date format defaults to the date_format option if not specified.
- * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default current post.
- * @return false|string Date the current post was modified. False on failure.
- */
-function get_the_modified_date( $d = '', $post = null ) {
-	$post = get_post( $post );
-
-	if ( ! $post ) {
-		// For backward compatibility, failures go through the filter below.
-		$the_time = false;
-	} elseif ( empty( $d ) ) {
-		$the_time = get_post_modified_time( get_option( 'date_format' ), false, $post, true );
-	} else {
-		$the_time = get_post_modified_time( $d, false, $post, true );
-	}
-
-	/**
-	 * Filters the date a post was last modified.
-	 *
-	 * @since 2.1.0
-	 * @since 4.6.0 Added the `$post` parameter.
-	 *
-	 * @param string  $the_time The formatted date.
-	 * @param string  $d        PHP date format. Defaults to value specified in
-	 *                          'date_format' option.
-	 * @param WP_Post $post     WP_Post object.
-	 */
-	return apply_filters( 'get_the_modified_date', $the_time, $d, $post );
-}
-
-/**
- * Display the time at which the post was written.
- *
- * @since 0.71
- *
- * @param string $d Either 'G', 'U', or php date format.
- */
-function the_time( $d = '' ) {
-	/**
-	 * Filters the time a post was written for display.
-	 *
-	 * @since 0.71
-	 *
-	 * @param string $get_the_time The formatted time.
-	 * @param string $d            The time format. Accepts 'G', 'U',
-	 *                             or php date format.
-	 */
-	echo apply_filters( 'the_time', get_the_time( $d ), $d );
-}
-
-/**
- * Retrieve the time at which the post was written.
- *
- * @since 1.5.0
- *
- * @param string      $d    Optional. Format to use for retrieving the time the post
- *                          was written. Either 'G', 'U', or php date format defaults
- *                          to the value specified in the time_format option. Default empty.
- * @param int|WP_Post $post WP_Post object or ID. Default is global $post object.
- * @return string|int|false Formatted date string or Unix timestamp if `$id` is 'U' or 'G'. False on failure.
- */
-function get_the_time( $d = '', $post = null ) {
-	$post = get_post($post);
-
-	if ( ! $post ) {
-		return false;
-	}
-
-	if ( '' == $d )
-		$the_time = get_post_time(get_option('time_format'), false, $post, true);
-	else
-		$the_time = get_post_time($d, false, $post, true);
-
-	/**
-	 * Filters the time a post was written.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string      $the_time The formatted time.
-	 * @param string      $d        Format to use for retrieving the time the post was written.
-	 *                              Accepts 'G', 'U', or php date format value specified
-	 *                              in 'time_format' option. Default empty.
-	 * @param int|WP_Post $post     WP_Post object or ID.
-	 */
-	return apply_filters( 'get_the_time', $the_time, $d, $post );
-}
-
-/**
- * Retrieve the time at which the post was written.
- *
- * @since 2.0.0
- *
- * @param string      $d         Optional. Format to use for retrieving the time the post
- *                               was written. Either 'G', 'U', or php date format. Default 'U'.
- * @param bool        $gmt       Optional. Whether to retrieve the GMT time. Default false.
- * @param int|WP_Post $post      WP_Post object or ID. Default is global $post object.
- * @param bool        $translate Whether to translate the time string. Default false.
- * @return string|int|false Formatted date string or Unix timestamp if `$id` is 'U' or 'G'. False on failure.
- */
-function get_post_time( $d = 'U', $gmt = false, $post = null, $translate = false ) {
-	$post = get_post($post);
-
-	if ( ! $post ) {
-		return false;
-	}
-
-	if ( $gmt )
-		$time = $post->post_date_gmt;
-	else
-		$time = $post->post_date;
-
-	$time = mysql2date($d, $time, $translate);
-
-	/**
-	 * Filters the localized time a post was written.
-	 *
-	 * @since 2.6.0
-	 *
-	 * @param string $time The formatted time.
-	 * @param string $d    Format to use for retrieving the time the post was written.
-	 *                     Accepts 'G', 'U', or php date format. Default 'U'.
-	 * @param bool   $gmt  Whether to retrieve the GMT time. Default false.
-	 */
-	return apply_filters( 'get_post_time', $time, $d, $gmt );
-}
-
-/**
- * Display the time at which the post was last modified.
- *
- * @since 2.0.0
- *
- * @param string $d Optional Either 'G', 'U', or php date format defaults to the value specified in the time_format option.
- */
-function the_modified_time($d = '') {
-	/**
-	 * Filters the localized time a post was last modified, for display.
-	 *
-	 * @since 2.0.0
-	 *
-	 * @param string $get_the_modified_time The formatted time.
-	 * @param string $d                     The time format. Accepts 'G', 'U',
-	 *                                      or php date format. Defaults to value
-	 *                                      specified in 'time_format' option.
-	 */
-	echo apply_filters( 'the_modified_time', get_the_modified_time($d), $d );
-}
-
-/**
- * Retrieve the time at which the post was last modified.
- *
- * @since 2.0.0
- * @since 4.6.0 Added the `$post` parameter.
- *
- * @param string      $d     Optional. Format to use for retrieving the time the post
- *                           was modified. Either 'G', 'U', or php date format defaults
- *                           to the value specified in the time_format option. Default empty.
- * @param int|WP_Post $post  Optional. Post ID or WP_Post object. Default current post.
- * @return false|string Formatted date string or Unix timestamp. False on failure.
- */
-function get_the_modified_time( $d = '', $post = null ) {
-	$post = get_post( $post );
-
-	if ( ! $post ) {
-		// For backward compatibility, failures go through the filter below.
-		$the_time = false;
-	} elseif ( empty( $d ) ) {
-		$the_time = get_post_modified_time( get_option( 'time_format' ), false, $post, true );
-	} else {
-		$the_time = get_post_modified_time( $d, false, $post, true );
-	}
-
-	/**
-	 * Filters the localized time a post was last modified.
-	 *
-	 * @since 2.0.0
-	 * @since 4.6.0 Added the `$post` parameter.
-	 *
-	 * @param string $the_time The formatted time.
-	 * @param string $d        Format to use for retrieving the time the post was
-	 *                         written. Accepts 'G', 'U', or php date format. Defaults
-	 *                         to value specified in 'time_format' option.
-	 * @param WP_Post $post    WP_Post object.
-	 */
-	return apply_filters( 'get_the_modified_time', $the_time, $d, $post );
-}
-
-/**
- * Retrieve the time at which the post was last modified.
- *
- * @since 2.0.0
- *
- * @param string      $d         Optional. Format to use for retrieving the time the post
- *                               was modified. Either 'G', 'U', or php date format. Default 'U'.
- * @param bool        $gmt       Optional. Whether to retrieve the GMT time. Default false.
- * @param int|WP_Post $post      WP_Post object or ID. Default is global $post object.
- * @param bool        $translate Whether to translate the time string. Default false.
- * @return string|int|false Formatted date string or Unix timestamp if `$id` is 'U' or 'G'. False on failure.
- */
-function get_post_modified_time( $d = 'U', $gmt = false, $post = null, $translate = false ) {
-	$post = get_post($post);
-
-	if ( ! $post ) {
-		return false;
-	}
-
-	if ( $gmt )
-		$time = $post->post_modified_gmt;
-	else
-		$time = $post->post_modified;
-	$time = mysql2date($d, $time, $translate);
-
-	/**
-	 * Filters the localized time a post was last modified.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param string $time The formatted time.
-	 * @param string $d    The date format. Accepts 'G', 'U', or php date format. Default 'U'.
-	 * @param bool   $gmt  Whether to return the GMT time. Default false.
-	 */
-	return apply_filters( 'get_post_modified_time', $time, $d, $gmt );
-}
-
-/**
- * Display the weekday on which the post was written.
- *
- * @since 0.71
- *
- * @global WP_Locale $wp_locale
- */
-function the_weekday() {
-	global $wp_locale;
-	$the_weekday = $wp_locale->get_weekday( mysql2date( 'w', get_post()->post_date, false ) );
-
-	/**
-	 * Filters the weekday on which the post was written, for display.
-	 *
-	 * @since 0.71
-	 *
-	 * @param string $the_weekday
-	 */
-	echo apply_filters( 'the_weekday', $the_weekday );
-}
-
-/**
- * Display the weekday on which the post was written.
- *
- * Will only output the weekday if the current post's weekday is different from
- * the previous one output.
- *
- * @since 0.71
- *
- * @global WP_Locale       $wp_locale
- * @global string|int|bool $currentday
- * @global string|int|bool $previousweekday
- *
- * @param string $before Optional Output before the date.
- * @param string $after Optional Output after the date.
- */
-function the_weekday_date($before='',$after='') {
-	global $wp_locale, $currentday, $previousweekday;
-	$the_weekday_date = '';
-	if ( $currentday != $previousweekday ) {
-		$the_weekday_date .= $before;
-		$the_weekday_date .= $wp_locale->get_weekday( mysql2date( 'w', get_post()->post_date, false ) );
-		$the_weekday_date .= $after;
-		$previousweekday = $currentday;
-	}
-
-	/**
-	 * Filters the localized date on which the post was written, for display.
-	 *
-	 * @since 0.71
-	 *
-	 * @param string $the_weekday_date
-	 * @param string $before           The HTML to output before the date.
-	 * @param string $after            The HTML to output after the date.
-	 */
-	$the_weekday_date = apply_filters( 'the_weekday_date', $the_weekday_date, $before, $after );
-	echo $the_weekday_date;
-}
-
-/**
- * Fire the wp_head action.
- *
- * See {@see 'wp_head'}.
- *
- * @since 1.2.0
- */
-function wp_head() {
-	/**
-	 * Prints scripts or data in the head tag on the front end.
-	 *
-	 * @since 1.5.0
-	 */
-	do_action( 'wp_head' );
-}
-
-/**
- * Fire the wp_footer action.
- *
- * See {@see 'wp_footer'}.
- *
- * @since 1.5.1
- */
-function wp_footer() {
-	/**
-	 * Prints scripts or data before the closing body tag on the front end.
-	 *
-	 * @since 1.5.1
-	 */
-	do_action( 'wp_footer' );
-}
-
-/**
- * Display the links to the general feeds.
- *
- * @since 2.8.0
- *
- * @param array $args Optional arguments.
- */
-function feed_links( $args = array() ) {
-	if ( !current_theme_supports('automatic-feed-links') )
-		return;
-
-	$defaults = array(
-		/* translators: Separator between blog name and feed type in feed links */
-		'separator'	=> _x('&raquo;', 'feed link'),
-		/* translators: 1: blog title, 2: separator (raquo) */
-		'feedtitle'	=> __('%1$s %2$s Feed'),
-		/* translators: 1: blog title, 2: separator (raquo) */
-		'comstitle'	=> __('%1$s %2$s Comments Feed'),
-	);
-
-	$args = wp_parse_args( $args, $defaults );
-
-	/**
-	 * Filters whether to display the posts feed link.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param bool $show Whether to display the posts feed link. Default true.
-	 */
-	if ( apply_filters( 'feed_links_show_posts_feed', true ) ) {
-		echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( sprintf( $args['feedtitle'], get_bloginfo( 'name' ), $args['separator'] ) ) . '" href="' . esc_url( get_feed_link() ) . "\" />\n";
-	}
-
-	/**
-	 * Filters whether to display the comments feed link.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param bool $show Whether to display the comments feed link. Default true.
-	 */
-	if ( apply_filters( 'feed_links_show_comments_feed', true ) ) {
-		echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( sprintf( $args['comstitle'], get_bloginfo( 'name' ), $args['separator'] ) ) . '" href="' . esc_url( get_feed_link( 'comments_' . get_default_feed() ) ) . "\" />\n";
-	}
-}
-
-/**
- * Display the links to the extra feeds such as category feeds.
- *
- * @since 2.8.0
- *
- * @param array $args Optional arguments.
- */
-function feed_links_extra( $args = array() ) {
-	$defaults = array(
-		/* translators: Separator between blog name and feed type in feed links */
-		'separator'   => _x('&raquo;', 'feed link'),
-		/* translators: 1: blog name, 2: separator(raquo), 3: post title */
-		'singletitle' => __('%1$s %2$s %3$s Comments Feed'),
-		/* translators: 1: blog name, 2: separator(raquo), 3: category name */
-		'cattitle'    => __('%1$s %2$s %3$s Category Feed'),
-		/* translators: 1: blog name, 2: separator(raquo), 3: tag name */
-		'tagtitle'    => __('%1$s %2$s %3$s Tag Feed'),
-		/* translators: 1: blog name, 2: separator(raquo), 3: term name, 4: taxonomy singular name */
-		'taxtitle'    => __('%1$s %2$s %3$s %4$s Feed'),
-		/* translators: 1: blog name, 2: separator(raquo), 3: author name  */
-		'authortitle' => __('%1$s %2$s Posts by %3$s Feed'),
-		/* translators: 1: blog name, 2: separator(raquo), 3: search phrase */
-		'searchtitle' => __('%1$s %2$s Search Results for &#8220;%3$s&#8221; Feed'),
-		/* translators: 1: blog name, 2: separator(raquo), 3: post type name */
-		'posttypetitle' => __('%1$s %2$s %3$s Feed'),
-	);
-
-	$args = wp_parse_args( $args, $defaults );
-
-	if ( is_singular() ) {
-		$id = 0;
-		$post = get_post( $id );
-
-		if ( comments_open() || pings_open() || $post->comment_count > 0 ) {
-			$title = sprintf( $args['singletitle'], get_bloginfo('name'), $args['separator'], the_title_attribute( array( 'echo' => false ) ) );
-			$href = get_post_comments_feed_link( $post->ID );
-		}
-	} elseif ( is_post_type_archive() ) {
-		$post_type = get_query_var( 'post_type' );
-		if ( is_array( $post_type ) )
-			$post_type = reset( $post_type );
-
-		$post_type_obj = get_post_type_object( $post_type );
-		$title = sprintf( $args['posttypetitle'], get_bloginfo( 'name' ), $args['separator'], $post_type_obj->labels->name );
-		$href = get_post_type_archive_feed_link( $post_type_obj->name );
-	} elseif ( is_category() ) {
-		$term = get_queried_object();
-
-		if ( $term ) {
-			$title = sprintf( $args['cattitle'], get_bloginfo('name'), $args['separator'], $term->name );
-			$href = get_category_feed_link( $term->term_id );
-		}
-	} elseif ( is_tag() ) {
-		$term = get_queried_object();
-
-		if ( $term ) {
-			$title = sprintf( $args['tagtitle'], get_bloginfo('name'), $args['separator'], $term->name );
-			$href = get_tag_feed_link( $term->term_id );
-		}
-	} elseif ( is_tax() ) {
- 		$term = get_queried_object();
- 		$tax = get_taxonomy( $term->taxonomy );
- 		$title = sprintf( $args['taxtitle'], get_bloginfo('name'), $args['separator'], $term->name, $tax->labels->singular_name );
- 		$href = get_term_feed_link( $term->term_id, $term->taxonomy );
-	} elseif ( is_author() ) {
-		$author_id = intval( get_query_var('author') );
-
-		$title = sprintf( $args['authortitle'], get_bloginfo('name'), $args['separator'], get_the_author_meta( 'display_name', $author_id ) );
-		$href = get_author_feed_link( $author_id );
-	} elseif ( is_search() ) {
-		$title = sprintf( $args['searchtitle'], get_bloginfo('name'), $args['separator'], get_search_query( false ) );
-		$href = get_search_feed_link();
-	} elseif ( is_post_type_archive() ) {
-		$title = sprintf( $args['posttypetitle'], get_bloginfo('name'), $args['separator'], post_type_archive_title( '', false ) );
-		$post_type_obj = get_queried_object();
-		if ( $post_type_obj )
-			$href = get_post_type_archive_feed_link( $post_type_obj->name );
-	}
-
-	if ( isset($title) && isset($href) )
-		echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( $title ) . '" href="' . esc_url( $href ) . '" />' . "\n";
-}
-
-/**
- * Display the link to the Really Simple Discovery service endpoint.
- *
- * @link http://archipelago.phrasewise.com/rsd
- * @since 2.0.0
- */
-function rsd_link() {
-	echo '<link rel="EditURI" type="application/rsd+xml" title="RSD" href="' . esc_url( site_url( 'xmlrpc.php?rsd', 'rpc' ) ) . '" />' . "\n";
-}
-
-/**
- * Display the link to the Windows Live Writer manifest file.
- *
- * @link https://msdn.microsoft.com/en-us/library/bb463265.aspx
- * @since 2.3.1
- */
-function wlwmanifest_link() {
-	echo '<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="',
-		includes_url( 'wlwmanifest.xml' ), '" /> ', "\n";
-}
-
-/**
- * Displays a noindex meta tag if required by the blog configuration.
- *
- * If a blog is marked as not being public then the noindex meta tag will be
- * output to tell web robots not to index the page content. Add this to the
- * {@see 'wp_head'} action.
- *
- * Typical usage is as a {@see 'wp_head'} callback:
- *
- *     add_action( 'wp_head', 'noindex' );
- *
- * @see wp_no_robots
- *
- * @since 2.1.0
- */
-function noindex() {
-	// If the blog is not public, tell robots to go away.
-	if ( '0' == get_option('blog_public') )
-		wp_no_robots();
-}
-
-/**
- * Display a noindex meta tag.
- *
- * Outputs a noindex meta tag that tells web robots not to index the page content.
- * Typical usage is as a wp_head callback. add_action( 'wp_head', 'wp_no_robots' );
- *
- * @since 3.3.0
- */
-function wp_no_robots() {
-	echo "<meta name='robots' content='noindex,follow' />\n";
-}
-
-/**
- * Display site icon meta tags.
- *
- * @since 4.3.0
- *
- * @link https://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#rel-icon HTML5 specification link icon.
- */
-function wp_site_icon() {
-	if ( ! has_site_icon() && ! is_customize_preview() ) {
-		return;
-	}
-
-	$meta_tags = array(
-		sprintf( '<link rel="icon" href="%s" sizes="32x32" />', esc_url( get_site_icon_url( 32 ) ) ),
-		sprintf( '<link rel="icon" href="%s" sizes="192x192" />', esc_url( get_site_icon_url( 192 ) ) ),
-		sprintf( '<link rel="apple-touch-icon-precomposed" href="%s" />', esc_url( get_site_icon_url( 180 ) ) ),
-		sprintf( '<meta name="msapplication-TileImage" content="%s" />', esc_url( get_site_icon_url( 270 ) ) ),
-	);
-
-	/**
-	 * Filters the site icon meta tags, so Plugins can add their own.
-	 *
-	 * @since 4.3.0
-	 *
-	 * @param array $meta_tags Site Icon meta elements.
-	 */
-	$meta_tags = apply_filters( 'site_icon_meta_tags', $meta_tags );
-	$meta_tags = array_filter( $meta_tags );
-
-	foreach ( $meta_tags as $meta_tag ) {
-		echo "$meta_tag\n";
-	}
-}
-
-/**
- * Prints resource hints to browsers for pre-fetching, pre-rendering
- * and pre-connecting to web sites.
- *
- * Gives hints to browsers to prefetch specific pages or render them
- * in the background, to perform DNS lookups or to begin the connection
- * handshake (DNS, TCP, TLS) in the background.
- *
- * These performance improving indicators work by using `<link rel"…">`.
- *
- * @since 4.6.0
- */
-function wp_resource_hints() {
-	$hints = array(
-		'dns-prefetch' => wp_dependencies_unique_hosts(),
-		'preconnect'   => array(),
-		'prefetch'     => array(),
-		'prerender'    => array(),
-	);
-
-	/*
-	 * Add DNS prefetch for the Emoji CDN.
-	 * The path is removed in the foreach loop below.
-	 */
-	/** This filter is documented in wp-includes/formatting.php */
-	$hints['dns-prefetch'][] = apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/2/svg/' );
-
-	foreach ( $hints as $relation_type => $urls ) {
-		/**
-		 * Filters domains and URLs for resource hints of relation type.
-		 *
-		 * @since 4.6.0
-		 *
-		 * @param array  $urls          URLs to print for resource hints.
-		 * @param string $relation_type The relation type the URLs are printed for, e.g. 'preconnect' or 'prerender'.
-		 */
-		$urls = apply_filters( 'wp_resource_hints', $urls, $relation_type );
-
-		foreach ( $urls as $key => $url ) {
-			$url = esc_url( $url, array( 'http', 'https' ) );
-			if ( ! $url ) {
-				unset( $urls[ $key ] );
-				continue;
-			}
-
-			if ( in_array( $relation_type, array( 'preconnect', 'dns-prefetch' ) ) ) {
-				$parsed = wp_parse_url( $url );
-				if ( empty( $parsed['host'] ) ) {
-					unset( $urls[ $key ] );
-					continue;
-				}
-
-				if ( 'preconnect' === $relation_type && ! empty( $parsed['scheme'] ) ) {
-					$url = $parsed['scheme'] . '://' . $parsed['host'];
-				} else {
-					// Use protocol-relative URLs for dns-prefetch or if scheme is missing.
-					$url = '//' . $parsed['host'];
-				}
-			}
-
-			$urls[ $key ] = $url;
-		}
-
-		$urls = array_unique( $urls );
-
-		foreach ( $urls as $url ) {
-			printf( "<link rel='%s' href='%s' />\n", $relation_type, $url );
-		}
-	}
-}
-
-/**
- * Retrieves a list of unique hosts of all enqueued scripts and styles.
- *
- * @since 4.6.0
- *
- * @return array A list of unique hosts of enqueued scripts and styles.
- */
-function wp_dependencies_unique_hosts() {
-	global $wp_scripts, $wp_styles;
-
-	$unique_hosts = array();
-
-	foreach ( array( $wp_scripts, $wp_styles ) as $dependencies ) {
-		if ( $dependencies instanceof WP_Dependencies && ! empty( $dependencies->queue ) ) {
-			foreach ( $dependencies->queue as $handle ) {
-				if ( ! isset( $dependencies->registered[ $handle ] ) ) {
-					continue;
-				}
-
-				/* @var _WP_Dependency $dependency */
-				$dependency = $dependencies->registered[ $handle ];
-				$parsed     = wp_parse_url( $dependency->src );
-
-				if ( ! empty( $parsed['host'] ) && ! in_array( $parsed['host'], $unique_hosts ) && $parsed['host'] !== $_SERVER['SERVER_NAME'] ) {
-					$unique_hosts[] = $parsed['host'];
-				}
-			}
-		}
-	}
-
-	return $unique_hosts;
-}
-
-/**
- * Whether the user should have a WYSIWIG editor.
- *
- * Checks that the user requires a WYSIWIG editor and that the editor is
- * supported in the users browser.
- *
- * @since 2.0.0
- *
- * @global bool $wp_rich_edit
- * @global bool $is_gecko
- * @global bool $is_opera
- * @global bool $is_safari
- * @global bool $is_chrome
- * @global bool $is_IE
- *
- * @return bool
- */
-function user_can_richedit() {
-	global $wp_rich_edit, $is_gecko, $is_opera, $is_safari, $is_chrome, $is_IE, $is_edge;
-
-	if ( !isset($wp_rich_edit) ) {
-		$wp_rich_edit = false;
-
-		if ( get_user_option( 'rich_editing' ) == 'true' || ! is_user_logged_in() ) { // default to 'true' for logged out users
-			if ( $is_safari ) {
-				$wp_rich_edit = ! wp_is_mobile() || ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval( $match[1] ) >= 534 );
-			} elseif ( $is_gecko || $is_chrome || $is_IE || $is_edge || ( $is_opera && !wp_is_mobile() ) ) {
-				$wp_rich_edit = true;
-			}
-		}
-	}
-
-	/**
-	 * Filters whether the user can access the rich (Visual) editor.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param bool $wp_rich_edit Whether the user can access to the rich (Visual) editor.
-	 */
-	return apply_filters( 'user_can_richedit', $wp_rich_edit );
-}
-
-/**
- * Find out which editor should be displayed by default.
- *
- * Works out which of the two editors to display as the current editor for a
- * user. The 'html' setting is for the "Text" editor tab.
- *
- * @since 2.5.0
- *
- * @return string Either 'tinymce', or 'html', or 'test'
- */
-function wp_default_editor() {
-	$r = user_can_richedit() ? 'tinymce' : 'html'; // defaults
-	if ( wp_get_current_user() ) { // look for cookie
-		$ed = get_user_setting('editor', 'tinymce');
-		$r = ( in_array($ed, array('tinymce', 'html', 'test') ) ) ? $ed : $r;
-	}
-
-	/**
-	 * Filters which editor should be displayed by default.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param array $r An array of editors. Accepts 'tinymce', 'html', 'test'.
-	 */
-	return apply_filters( 'wp_default_editor', $r );
-}
-
-/**
- * Renders an editor.
- *
- * Using this function is the proper way to output all needed components for both TinyMCE and Quicktags.
- * _WP_Editors should not be used directly. See https://core.trac.wordpress.org/ticket/17144.
- *
- * NOTE: Once initialized the TinyMCE editor cannot be safely moved in the DOM. For that reason
- * running wp_editor() inside of a meta box is not a good idea unless only Quicktags is used.
- * On the post edit screen several actions can be used to include additional editors
- * containing TinyMCE: 'edit_page_form', 'edit_form_advanced' and 'dbx_post_sidebar'.
- * See https://core.trac.wordpress.org/ticket/19173 for more information.
- *
- * @see _WP_Editors::editor()
- * @since 3.3.0
- *
- * @param string $content   Initial content for the editor.
- * @param string $editor_id HTML ID attribute value for the textarea and TinyMCE. Can only be /[a-z]+/.
- * @param array  $settings  See _WP_Editors::editor().
- */
-function wp_editor( $content, $editor_id, $settings = array() ) {
-	if ( ! class_exists( '_WP_Editors', false ) )
-		require( ABSPATH . WPINC . '/class-wp-editor.php' );
-	_WP_Editors::editor($content, $editor_id, $settings);
-}
-
-/**
- * Retrieves the contents of the search WordPress query variable.
- *
- * The search query string is passed through esc_attr() to ensure that it is safe
- * for placing in an html attribute.
- *
- * @since 2.3.0
- *
- * @param bool $escaped Whether the result is escaped. Default true.
- * 	                    Only use when you are later escaping it. Do not use unescaped.
- * @return string
- */
-function get_search_query( $escaped = true ) {
-	/**
-	 * Filters the contents of the search query variable.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param mixed $search Contents of the search query variable.
-	 */
-	$query = apply_filters( 'get_search_query', get_query_var( 's' ) );
-
-	if ( $escaped )
-		$query = esc_attr( $query );
-	return $query;
-}
-
-/**
- * Displays the contents of the search query variable.
- *
- * The search query string is passed through esc_attr() to ensure that it is safe
- * for placing in an html attribute.
- *
- * @since 2.1.0
- */
-function the_search_query() {
-	/**
-	 * Filters the contents of the search query variable for display.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param mixed $search Contents of the search query variable.
-	 */
-	echo esc_attr( apply_filters( 'the_search_query', get_search_query( false ) ) );
-}
-
-/**
- * Gets the language attributes for the html tag.
- *
- * Builds up a set of html attributes containing the text direction and language
- * information for the page.
- *
- * @since 4.3.0
- *
- * @param string $doctype Optional. The type of html document. Accepts 'xhtml' or 'html'. Default 'html'.
- */
-function get_language_attributes( $doctype = 'html' ) {
-	$attributes = array();
-
-	if ( function_exists( 'is_rtl' ) && is_rtl() )
-		$attributes[] = 'dir="rtl"';
-
-	if ( $lang = get_bloginfo('language') ) {
-		if ( get_option('html_type') == 'text/html' || $doctype == 'html' )
-			$attributes[] = "lang=\"$lang\"";
-
-		if ( get_option('html_type') != 'text/html' || $doctype == 'xhtml' )
-			$attributes[] = "xml:lang=\"$lang\"";
-	}
-
-	$output = implode(' ', $attributes);
-
-	/**
-	 * Filters the language attributes for display in the html tag.
-	 *
-	 * @since 2.5.0
-	 * @since 4.3.0 Added the `$doctype` parameter.
-	 *
-	 * @param string $output A space-separated list of language attributes.
-	 * @param string $doctype The type of html document (xhtml|html).
-	 */
-	return apply_filters( 'language_attributes', $output, $doctype );
-}
-
-/**
- * Displays the language attributes for the html tag.
- *
- * Builds up a set of html attributes containing the text direction and language
- * information for the page.
- *
- * @since 2.1.0
- * @since 4.3.0 Converted into a wrapper for get_language_attributes().
- *
- * @param string $doctype Optional. The type of html document. Accepts 'xhtml' or 'html'. Default 'html'.
- */
-function language_attributes( $doctype = 'html' ) {
-	echo get_language_attributes( $doctype );
-}
-
-/**
- * Retrieve paginated link for archive post pages.
- *
- * Technically, the function can be used to create paginated link list for any
- * area. The 'base' argument is used to reference the url, which will be used to
- * create the paginated links. The 'format' argument is then used for replacing
- * the page number. It is however, most likely and by default, to be used on the
- * archive post pages.
- *
- * The 'type' argument controls format of the returned value. The default is
- * 'plain', which is just a string with the links separated by a newline
- * character. The other possible values are either 'array' or 'list'. The
- * 'array' value will return an array of the paginated link list to offer full
- * control of display. The 'list' value will place all of the paginated links in
- * an unordered HTML list.
- *
- * The 'total' argument is the total amount of pages and is an integer. The
- * 'current' argument is the current page number and is also an integer.
- *
- * An example of the 'base' argument is "http://example.com/all_posts.php%_%"
- * and the '%_%' is required. The '%_%' will be replaced by the contents of in
- * the 'format' argument. An example for the 'format' argument is "?page=%#%"
- * and the '%#%' is also required. The '%#%' will be replaced with the page
- * number.
- *
- * You can include the previous and next links in the list by setting the
- * 'prev_next' argument to true, which it is by default. You can set the
- * previous text, by using the 'prev_text' argument. You can set the next text
- * by setting the 'next_text' argument.
- *
- * If the 'show_all' argument is set to true, then it will show all of the pages
- * instead of a short list of the pages near the current page. By default, the
- * 'show_all' is set to false and controlled by the 'end_size' and 'mid_size'
- * arguments. The 'end_size' argument is how many numbers on either the start
- * and the end list edges, by default is 1. The 'mid_size' argument is how many
- * numbers to either side of current page, but not including current page.
- *
- * It is possible to add query vars to the link by using the 'add_args' argument
- * and see add_query_arg() for more information.
- *
- * The 'before_page_number' and 'after_page_number' arguments allow users to
- * augment the links themselves. Typically this might be to add context to the
- * numbered links so that screen reader users understand what the links are for.
- * The text strings are added before and after the page number - within the
- * anchor tag.
- *
- * @since 2.1.0
- *
- * @global WP_Query   $wp_query
- * @global WP_Rewrite $wp_rewrite
- *
- * @param string|array $args {
- *     Optional. Array or string of arguments for generating paginated links for archives.
- *
- *     @type string $base               Base of the paginated url. Default empty.
- *     @type string $format             Format for the pagination structure. Default empty.
- *     @type int    $total              The total amount of pages. Default is the value WP_Query's
- *                                      `max_num_pages` or 1.
- *     @type int    $current            The current page number. Default is 'paged' query var or 1.
- *     @type bool   $show_all           Whether to show all pages. Default false.
- *     @type int    $end_size           How many numbers on either the start and the end list edges.
- *                                      Default 1.
- *     @type int    $mid_size           How many numbers to either side of the current pages. Default 2.
- *     @type bool   $prev_next          Whether to include the previous and next links in the list. Default true.
- *     @type bool   $prev_text          The previous page text. Default '« Previous'.
- *     @type bool   $next_text          The next page text. Default '« Previous'.
- *     @type string $type               Controls format of the returned value. Possible values are 'plain',
- *                                      'array' and 'list'. Default is 'plain'.
- *     @type array  $add_args           An array of query args to add. Default false.
- *     @type string $add_fragment       A string to append to each link. Default empty.
- *     @type string $before_page_number A string to appear before the page number. Default empty.
- *     @type string $after_page_number  A string to append after the page number. Default empty.
- * }
- * @return array|string|void String of page links or array of page links.
- */
-function paginate_links( $args = '' ) {
-	global $wp_query, $wp_rewrite;
-
-	// Setting up default values based on the current URL.
-	$pagenum_link = html_entity_decode( get_pagenum_link() );
-	$url_parts    = explode( '?', $pagenum_link );
-
-	// Get max pages and current page out of the current query, if available.
-	$total   = isset( $wp_query->max_num_pages ) ? $wp_query->max_num_pages : 1;
-	$current = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1;
-
-	// Append the format placeholder to the base URL.
-	$pagenum_link = trailingslashit( $url_parts[0] ) . '%_%';
-
-	// URL base depends on permalink settings.
-	$format  = $wp_rewrite->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : '';
-	$format .= $wp_rewrite->using_permalinks() ? user_trailingslashit( $wp_rewrite->pagination_base . '/%#%', 'paged' ) : '?paged=%#%';
-
-	$defaults = array(
-		'base' => $pagenum_link, // http://example.com/all_posts.php%_% : %_% is replaced by format (below)
-		'format' => $format, // ?page=%#% : %#% is replaced by the page number
-		'total' => $total,
-		'current' => $current,
-		'show_all' => false,
-		'prev_next' => true,
-		'prev_text' => __('&laquo; Previous'),
-		'next_text' => __('Next &raquo;'),
-		'end_size' => 1,
-		'mid_size' => 2,
-		'type' => 'plain',
-		'add_args' => array(), // array of query args to add
-		'add_fragment' => '',
-		'before_page_number' => '',
-		'after_page_number' => ''
-	);
-
-	$args = wp_parse_args( $args, $defaults );
-
-	if ( ! is_array( $args['add_args'] ) ) {
-		$args['add_args'] = array();
-	}
-
-	// Merge additional query vars found in the original URL into 'add_args' array.
-	if ( isset( $url_parts[1] ) ) {
-		// Find the format argument.
-		$format = explode( '?', str_replace( '%_%', $args['format'], $args['base'] ) );
-		$format_query = isset( $format[1] ) ? $format[1] : '';
-		wp_parse_str( $format_query, $format_args );
-
-		// Find the query args of the requested URL.
-		wp_parse_str( $url_parts[1], $url_query_args );
-
-		// Remove the format argument from the array of query arguments, to avoid overwriting custom format.
-		foreach ( $format_args as $format_arg => $format_arg_value ) {
-			unset( $url_query_args[ $format_arg ] );
-		}
-
-		$args['add_args'] = array_merge( $args['add_args'], urlencode_deep( $url_query_args ) );
-	}
-
-	// Who knows what else people pass in $args
-	$total = (int) $args['total'];
-	if ( $total < 2 ) {
-		return;
-	}
-	$current  = (int) $args['current'];
-	$end_size = (int) $args['end_size']; // Out of bounds?  Make it the default.
-	if ( $end_size < 1 ) {
-		$end_size = 1;
-	}
-	$mid_size = (int) $args['mid_size'];
-	if ( $mid_size < 0 ) {
-		$mid_size = 2;
-	}
-	$add_args = $args['add_args'];
-	$r = '';
-	$page_links = array();
-	$dots = false;
-
-	if ( $args['prev_next'] && $current && 1 < $current ) :
-		$link = str_replace( '%_%', 2 == $current ? '' : $args['format'], $args['base'] );
-		$link = str_replace( '%#%', $current - 1, $link );
-		if ( $add_args )
-			$link = add_query_arg( $add_args, $link );
-		$link .= $args['add_fragment'];
-
-		/**
-		 * Filters the paginated links for the given archive pages.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param string $link The paginated link URL.
-		 */
-		$page_links[] = '<a class="prev page-numbers" href="' . esc_url( apply_filters( 'paginate_links', $link ) ) . '">' . $args['prev_text'] . '</a>';
-	endif;
-	for ( $n = 1; $n <= $total; $n++ ) :
-		if ( $n == $current ) :
-			$page_links[] = "<span class='page-numbers current'>" . $args['before_page_number'] . number_format_i18n( $n ) . $args['after_page_number'] . "</span>";
-			$dots = true;
-		else :
-			if ( $args['show_all'] || ( $n <= $end_size || ( $current && $n >= $current - $mid_size && $n <= $current + $mid_size ) || $n > $total - $end_size ) ) :
-				$link = str_replace( '%_%', 1 == $n ? '' : $args['format'], $args['base'] );
-				$link = str_replace( '%#%', $n, $link );
-				if ( $add_args )
-					$link = add_query_arg( $add_args, $link );
-				$link .= $args['add_fragment'];
-
-				/** This filter is documented in wp-includes/general-template.php */
-				$page_links[] = "<a class='page-numbers' href='" . esc_url( apply_filters( 'paginate_links', $link ) ) . "'>" . $args['before_page_number'] . number_format_i18n( $n ) . $args['after_page_number'] . "</a>";
-				$dots = true;
-			elseif ( $dots && ! $args['show_all'] ) :
-				$page_links[] = '<span class="page-numbers dots">' . __( '&hellip;' ) . '</span>';
-				$dots = false;
-			endif;
-		endif;
-	endfor;
-	if ( $args['prev_next'] && $current && ( $current < $total || -1 == $total ) ) :
-		$link = str_replace( '%_%', $args['format'], $args['base'] );
-		$link = str_replace( '%#%', $current + 1, $link );
-		if ( $add_args )
-			$link = add_query_arg( $add_args, $link );
-		$link .= $args['add_fragment'];
-
-		/** This filter is documented in wp-includes/general-template.php */
-		$page_links[] = '<a class="next page-numbers" href="' . esc_url( apply_filters( 'paginate_links', $link ) ) . '">' . $args['next_text'] . '</a>';
-	endif;
-	switch ( $args['type'] ) {
-		case 'array' :
-			return $page_links;
-
-		case 'list' :
-			$r .= "<ul class='page-numbers'>\n\t<li>";
-			$r .= join("</li>\n\t<li>", $page_links);
-			$r .= "</li>\n</ul>\n";
-			break;
-
-		default :
-			$r = join("\n", $page_links);
-			break;
-	}
-	return $r;
-}
-
-/**
- * Registers an admin colour scheme css file.
- *
- * Allows a plugin to register a new admin colour scheme. For example:
- *
- *     wp_admin_css_color( 'classic', __( 'Classic' ), admin_url( "css/colors-classic.css" ), array(
- *         '#07273E', '#14568A', '#D54E21', '#2683AE'
- *     ) );
- *
- * @since 2.5.0
- *
- * @global array $_wp_admin_css_colors
- *
- * @param string $key    The unique key for this theme.
- * @param string $name   The name of the theme.
- * @param string $url    The URL of the CSS file containing the color scheme.
- * @param array  $colors Optional. An array of CSS color definition strings which are used
- *                       to give the user a feel for the theme.
- * @param array  $icons {
- *     Optional. CSS color definitions used to color any SVG icons.
- *
- *     @type string $base    SVG icon base color.
- *     @type string $focus   SVG icon color on focus.
- *     @type string $current SVG icon color of current admin menu link.
- * }
- */
-function wp_admin_css_color( $key, $name, $url, $colors = array(), $icons = array() ) {
-	global $_wp_admin_css_colors;
-
-	if ( !isset($_wp_admin_css_colors) )
-		$_wp_admin_css_colors = array();
-
-	$_wp_admin_css_colors[$key] = (object) array(
-		'name' => $name,
-		'url' => $url,
-		'colors' => $colors,
-		'icon_colors' => $icons,
-	);
-}
-
-/**
- * Registers the default Admin color schemes
- *
- * @since 3.0.0
- */
-function register_admin_color_schemes() {
-	$suffix = is_rtl() ? '-rtl' : '';
-	$suffix .= SCRIPT_DEBUG ? '' : '.min';
-
-	wp_admin_css_color( 'fresh', _x( 'Default', 'admin color scheme' ),
-		false,
-		array( '#222', '#333', '#0073aa', '#00a0d2' ),
-		array( 'base' => '#82878c', 'focus' => '#00a0d2', 'current' => '#fff' )
-	);
-
-	// Other color schemes are not available when running out of src
-	if ( false !== strpos( get_bloginfo( 'version' ), '-src' ) ) {
-		return;
-	}
-
-	wp_admin_css_color( 'light', _x( 'Light', 'admin color scheme' ),
-		admin_url( "css/colors/light/colors$suffix.css" ),
-		array( '#e5e5e5', '#999', '#d64e07', '#04a4cc' ),
-		array( 'base' => '#999', 'focus' => '#ccc', 'current' => '#ccc' )
-	);
-
-	wp_admin_css_color( 'blue', _x( 'Blue', 'admin color scheme' ),
-		admin_url( "css/colors/blue/colors$suffix.css" ),
-		array( '#096484', '#4796b3', '#52accc', '#74B6CE' ),
-		array( 'base' => '#e5f8ff', 'focus' => '#fff', 'current' => '#fff' )
-	);
-
-	wp_admin_css_color( 'midnight', _x( 'Midnight', 'admin color scheme' ),
-		admin_url( "css/colors/midnight/colors$suffix.css" ),
-		array( '#25282b', '#363b3f', '#69a8bb', '#e14d43' ),
-		array( 'base' => '#f1f2f3', 'focus' => '#fff', 'current' => '#fff' )
-	);
-
-	wp_admin_css_color( 'sunrise', _x( 'Sunrise', 'admin color scheme' ),
-		admin_url( "css/colors/sunrise/colors$suffix.css" ),
-		array( '#b43c38', '#cf4944', '#dd823b', '#ccaf0b' ),
-		array( 'base' => '#f3f1f1', 'focus' => '#fff', 'current' => '#fff' )
-	);
-
-	wp_admin_css_color( 'ectoplasm', _x( 'Ectoplasm', 'admin color scheme' ),
-		admin_url( "css/colors/ectoplasm/colors$suffix.css" ),
-		array( '#413256', '#523f6d', '#a3b745', '#d46f15' ),
-		array( 'base' => '#ece6f6', 'focus' => '#fff', 'current' => '#fff' )
-	);
-
-	wp_admin_css_color( 'ocean', _x( 'Ocean', 'admin color scheme' ),
-		admin_url( "css/colors/ocean/colors$suffix.css" ),
-		array( '#627c83', '#738e96', '#9ebaa0', '#aa9d88' ),
-		array( 'base' => '#f2fcff', 'focus' => '#fff', 'current' => '#fff' )
-	);
-
-	wp_admin_css_color( 'coffee', _x( 'Coffee', 'admin color scheme' ),
-		admin_url( "css/colors/coffee/colors$suffix.css" ),
-		array( '#46403c', '#59524c', '#c7a589', '#9ea476' ),
-		array( 'base' => '#f3f2f1', 'focus' => '#fff', 'current' => '#fff' )
-	);
-
-}
-
-/**
- * Displays the URL of a WordPress admin CSS file.
- *
- * @see WP_Styles::_css_href and its {@see 'style_loader_src'} filter.
- *
- * @since 2.3.0
- *
- * @param string $file file relative to wp-admin/ without its ".css" extension.
- * @return string
- */
-function wp_admin_css_uri( $file = 'wp-admin' ) {
-	if ( defined('WP_INSTALLING') ) {
-		$_file = "./$file.css";
-	} else {
-		$_file = admin_url("$file.css");
-	}
-	$_file = add_query_arg( 'version', get_bloginfo( 'version' ),  $_file );
-
-	/**
-	 * Filters the URI of a WordPress admin CSS file.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param string $_file Relative path to the file with query arguments attached.
-	 * @param string $file  Relative path to the file, minus its ".css" extension.
-	 */
-	return apply_filters( 'wp_admin_css_uri', $_file, $file );
-}
-
-/**
- * Enqueues or directly prints a stylesheet link to the specified CSS file.
- *
- * "Intelligently" decides to enqueue or to print the CSS file. If the
- * {@see 'wp_print_styles'} action has *not* yet been called, the CSS file will be
- * enqueued. If the {@see 'wp_print_styles'} action has been called, the CSS link will
- * be printed. Printing may be forced by passing true as the $force_echo
- * (second) parameter.
- *
- * For backward compatibility with WordPress 2.3 calling method: If the $file
- * (first) parameter does not correspond to a registered CSS file, we assume
- * $file is a file relative to wp-admin/ without its ".css" extension. A
- * stylesheet link to that generated URL is printed.
- *
- * @since 2.3.0
- *
- * @param string $file       Optional. Style handle name or file name (without ".css" extension) relative
- * 	                         to wp-admin/. Defaults to 'wp-admin'.
- * @param bool   $force_echo Optional. Force the stylesheet link to be printed rather than enqueued.
- */
-function wp_admin_css( $file = 'wp-admin', $force_echo = false ) {
-	// For backward compatibility
-	$handle = 0 === strpos( $file, 'css/' ) ? substr( $file, 4 ) : $file;
-
-	if ( wp_styles()->query( $handle ) ) {
-		if ( $force_echo || did_action( 'wp_print_styles' ) ) // we already printed the style queue. Print this one immediately
-			wp_print_styles( $handle );
-		else // Add to style queue
-			wp_enqueue_style( $handle );
-		return;
-	}
-
-	/**
-	 * Filters the stylesheet link to the specified CSS file.
-	 *
-	 * If the site is set to display right-to-left, the RTL stylesheet link
-	 * will be used instead.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param string $file Style handle name or filename (without ".css" extension)
-	 *                     relative to wp-admin/. Defaults to 'wp-admin'.
-	 */
-	echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . esc_url( wp_admin_css_uri( $file ) ) . "' type='text/css' />\n", $file );
-
-	if ( function_exists( 'is_rtl' ) && is_rtl() ) {
-		/** This filter is documented in wp-includes/general-template.php */
-		echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . esc_url( wp_admin_css_uri( "$file-rtl" ) ) . "' type='text/css' />\n", "$file-rtl" );
-	}
-}
-
-/**
- * Enqueues the default ThickBox js and css.
- *
- * If any of the settings need to be changed, this can be done with another js
- * file similar to media-upload.js. That file should
- * require array('thickbox') to ensure it is loaded after.
- *
- * @since 2.5.0
- */
-function add_thickbox() {
-	wp_enqueue_script( 'thickbox' );
-	wp_enqueue_style( 'thickbox' );
-
-	if ( is_network_admin() )
-		add_action( 'admin_head', '_thickbox_path_admin_subfolder' );
-}
-
-/**
- * Displays the XHTML generator that is generated on the wp_head hook.
- *
- * See {@see 'wp_head'}.
- *
- * @since 2.5.0
- */
-function wp_generator() {
-	/**
-	 * Filters the output of the XHTML generator tag.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param string $generator_type The XHTML generator.
-	 */
-	the_generator( apply_filters( 'wp_generator_type', 'xhtml' ) );
-}
-
-/**
- * Display the generator XML or Comment for RSS, ATOM, etc.
- *
- * Returns the correct generator type for the requested output format. Allows
- * for a plugin to filter generators overall the {@see 'the_generator'} filter.
- *
- * @since 2.5.0
- *
- * @param string $type The type of generator to output - (html|xhtml|atom|rss2|rdf|comment|export).
- */
-function the_generator( $type ) {
-	/**
-	 * Filters the output of the XHTML generator tag for display.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param string $generator_type The generator output.
-	 * @param string $type           The type of generator to output. Accepts 'html',
-	 *                               'xhtml', 'atom', 'rss2', 'rdf', 'comment', 'export'.
-	 */
-	echo apply_filters( 'the_generator', get_the_generator($type), $type ) . "\n";
-}
-
-/**
- * Creates the generator XML or Comment for RSS, ATOM, etc.
- *
- * Returns the correct generator type for the requested output format. Allows
- * for a plugin to filter generators on an individual basis using the
- * {@see 'get_the_generator_$type'} filter.
- *
- * @since 2.5.0
- *
- * @param string $type The type of generator to return - (html|xhtml|atom|rss2|rdf|comment|export).
- * @return string|void The HTML content for the generator.
- */
-function get_the_generator( $type = '' ) {
-	if ( empty( $type ) ) {
-
-		$current_filter = current_filter();
-		if ( empty( $current_filter ) )
-			return;
-
-		switch ( $current_filter ) {
-			case 'rss2_head' :
-			case 'commentsrss2_head' :
-				$type = 'rss2';
-				break;
-			case 'rss_head' :
-			case 'opml_head' :
-				$type = 'comment';
-				break;
-			case 'rdf_header' :
-				$type = 'rdf';
-				break;
-			case 'atom_head' :
-			case 'comments_atom_head' :
-			case 'app_head' :
-				$type = 'atom';
-				break;
-		}
-	}
-
-	switch ( $type ) {
-		case 'html':
-			$gen = '<meta name="generator" content="WordPress ' . get_bloginfo( 'version' ) . '">';
-			break;
-		case 'xhtml':
-			$gen = '<meta name="generator" content="WordPress ' . get_bloginfo( 'version' ) . '" />';
-			break;
-		case 'atom':
-			$gen = '<generator uri="https://wordpress.org/" version="' . get_bloginfo_rss( 'version' ) . '">WordPress</generator>';
-			break;
-		case 'rss2':
-			$gen = '<generator>https://wordpress.org/?v=' . get_bloginfo_rss( 'version' ) . '</generator>';
-			break;
-		case 'rdf':
-			$gen = '<admin:generatorAgent rdf:resource="https://wordpress.org/?v=' . get_bloginfo_rss( 'version' ) . '" />';
-			break;
-		case 'comment':
-			$gen = '<!-- generator="WordPress/' . get_bloginfo( 'version' ) . '" -->';
-			break;
-		case 'export':
-			$gen = '<!-- generator="WordPress/' . get_bloginfo_rss('version') . '" created="'. date('Y-m-d H:i') . '" -->';
-			break;
-	}
-
-	/**
-	 * Filters the HTML for the retrieved generator type.
-	 *
-	 * The dynamic portion of the hook name, `$type`, refers to the generator type.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param string $gen  The HTML markup output to wp_head().
-	 * @param string $type The type of generator. Accepts 'html', 'xhtml', 'atom',
-	 *                     'rss2', 'rdf', 'comment', 'export'.
-	 */
-	return apply_filters( "get_the_generator_{$type}", $gen, $type );
-}
-
-/**
- * Outputs the html checked attribute.
- *
- * Compares the first two arguments and if identical marks as checked
- *
- * @since 1.0.0
- *
- * @param mixed $checked One of the values to compare
- * @param mixed $current (true) The other value to compare if not just true
- * @param bool  $echo    Whether to echo or just return the string
- * @return string html attribute or empty string
- */
-function checked( $checked, $current = true, $echo = true ) {
-	return __checked_selected_helper( $checked, $current, $echo, 'checked' );
-}
-
-/**
- * Outputs the html selected attribute.
- *
- * Compares the first two arguments and if identical marks as selected
- *
- * @since 1.0.0
- *
- * @param mixed $selected One of the values to compare
- * @param mixed $current  (true) The other value to compare if not just true
- * @param bool  $echo     Whether to echo or just return the string
- * @return string html attribute or empty string
- */
-function selected( $selected, $current = true, $echo = true ) {
-	return __checked_selected_helper( $selected, $current, $echo, 'selected' );
-}
-
-/**
- * Outputs the html disabled attribute.
- *
- * Compares the first two arguments and if identical marks as disabled
- *
- * @since 3.0.0
- *
- * @param mixed $disabled One of the values to compare
- * @param mixed $current  (true) The other value to compare if not just true
- * @param bool  $echo     Whether to echo or just return the string
- * @return string html attribute or empty string
- */
-function disabled( $disabled, $current = true, $echo = true ) {
-	return __checked_selected_helper( $disabled, $current, $echo, 'disabled' );
-}
-
-/**
- * Private helper function for checked, selected, and disabled.
- *
- * Compares the first two arguments and if identical marks as $type
- *
- * @since 2.8.0
- * @access private
- *
- * @param mixed  $helper  One of the values to compare
- * @param mixed  $current (true) The other value to compare if not just true
- * @param bool   $echo    Whether to echo or just return the string
- * @param string $type    The type of checked|selected|disabled we are doing
- * @return string html attribute or empty string
- */
-function __checked_selected_helper( $helper, $current, $echo, $type ) {
-	if ( (string) $helper === (string) $current )
-		$result = " $type='$type'";
-	else
-		$result = '';
-
-	if ( $echo )
-		echo $result;
-
-	return $result;
-}
-
-/**
- * Default settings for heartbeat
- *
- * Outputs the nonce used in the heartbeat XHR
- *
- * @since 3.6.0
- *
- * @param array $settings
- * @return array $settings
- */
-function wp_heartbeat_settings( $settings ) {
-	if ( ! is_admin() )
-		$settings['ajaxurl'] = admin_url( 'admin-ajax.php', 'relative' );
-
-	if ( is_user_logged_in() )
-		$settings['nonce'] = wp_create_nonce( 'heartbeat-nonce' );
-
-	return $settings;
-}
Index: www/wp-includes/kses.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/kses.php	(revision 38565)
+++ www/wp-includes/kses.php	(revision 38565)
@@ -1,1838 +0,0 @@
-<?php
-/**
- * kses 0.2.2 - HTML/XHTML filter that only allows some elements and attributes
- * Copyright (C) 2002, 2003, 2005  Ulf Harnhammar
- *
- * This program is free software and open source software; you can redistribute
- * it and/or modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the License,
- * or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- * http://www.gnu.org/licenses/gpl.html
- *
- * [kses strips evil scripts!]
- *
- * Added wp_ prefix to avoid conflicts with existing kses users
- *
- * @version 0.2.2
- * @copyright (C) 2002, 2003, 2005
- * @author Ulf Harnhammar <http://advogato.org/person/metaur/>
- *
- * @package External
- * @subpackage KSES
- *
- */
-
-/**
- * You can override this in a plugin.
- *
- * The {@see 'wp_kses_allowed_html'} filter is more powerful and supplies context.
- *
- * `CUSTOM_TAGS` is not recommended and should be considered deprecated.
- *
- * @see wp_kses_allowed_html()
- *
- * @since 1.2.0
- */
-if ( ! defined( 'CUSTOM_TAGS' ) )
-	define( 'CUSTOM_TAGS', false );
-
-// Ensure that these variables are added to the global namespace
-// (e.g. if using namespaces / autoload in the current PHP environment).
-global $allowedposttags, $allowedtags, $allowedentitynames;
-
-if ( ! CUSTOM_TAGS ) {
-	/**
-	 * Kses global for default allowable HTML tags.
-	 *
-	 * Can be override by using CUSTOM_TAGS constant.
-	 *
-	 * @global array $allowedposttags
-	 * @since 2.0.0
-	 */
-	$allowedposttags = array(
-		'address' => array(),
-		'a' => array(
-			'href' => true,
-			'rel' => true,
-			'rev' => true,
-			'name' => true,
-			'target' => true,
-		),
-		'abbr' => array(),
-		'acronym' => array(),
-		'area' => array(
-			'alt' => true,
-			'coords' => true,
-			'href' => true,
-			'nohref' => true,
-			'shape' => true,
-			'target' => true,
-		),
-		'article' => array(
-			'align' => true,
-			'dir' => true,
-			'lang' => true,
-			'xml:lang' => true,
-		),
-		'aside' => array(
-			'align' => true,
-			'dir' => true,
-			'lang' => true,
-			'xml:lang' => true,
-		),
-		'audio' => array(
-			'autoplay' => true,
-			'controls' => true,
-			'loop' => true,
-			'muted' => true,
-			'preload' => true,
-			'src' => true,
-		),
-		'b' => array(),
-		'bdo' => array(
-			'dir' => true,
-		),
-		'big' => array(),
-		'blockquote' => array(
-			'cite' => true,
-			'lang' => true,
-			'xml:lang' => true,
-		),
-		'br' => array(),
-		'button' => array(
-			'disabled' => true,
-			'name' => true,
-			'type' => true,
-			'value' => true,
-		),
-		'caption' => array(
-			'align' => true,
-		),
-		'cite' => array(
-			'dir' => true,
-			'lang' => true,
-		),
-		'code' => array(),
-		'col' => array(
-			'align' => true,
-			'char' => true,
-			'charoff' => true,
-			'span' => true,
-			'dir' => true,
-			'valign' => true,
-			'width' => true,
-		),
-		'colgroup' => array(
-			'align' => true,
-			'char' => true,
-			'charoff' => true,
-			'span' => true,
-			'valign' => true,
-			'width' => true,
-		),
-		'del' => array(
-			'datetime' => true,
-		),
-		'dd' => array(),
-		'dfn' => array(),
-		'details' => array(
-			'align' => true,
-			'dir' => true,
-			'lang' => true,
-			'open' => true,
-			'xml:lang' => true,
-		),
-		'div' => array(
-			'align' => true,
-			'dir' => true,
-			'lang' => true,
-			'xml:lang' => true,
-		),
-		'dl' => array(),
-		'dt' => array(),
-		'em' => array(),
-		'fieldset' => array(),
-		'figure' => array(
-			'align' => true,
-			'dir' => true,
-			'lang' => true,
-			'xml:lang' => true,
-		),
-		'figcaption' => array(
-			'align' => true,
-			'dir' => true,
-			'lang' => true,
-			'xml:lang' => true,
-		),
-		'font' => array(
-			'color' => true,
-			'face' => true,
-			'size' => true,
-		),
-		'footer' => array(
-			'align' => true,
-			'dir' => true,
-			'lang' => true,
-			'xml:lang' => true,
-		),
-		'form' => array(
-			'action' => true,
-			'accept' => true,
-			'accept-charset' => true,
-			'enctype' => true,
-			'method' => true,
-			'name' => true,
-			'target' => true,
-		),
-		'h1' => array(
-			'align' => true,
-		),
-		'h2' => array(
-			'align' => true,
-		),
-		'h3' => array(
-			'align' => true,
-		),
-		'h4' => array(
-			'align' => true,
-		),
-		'h5' => array(
-			'align' => true,
-		),
-		'h6' => array(
-			'align' => true,
-		),
-		'header' => array(
-			'align' => true,
-			'dir' => true,
-			'lang' => true,
-			'xml:lang' => true,
-		),
-		'hgroup' => array(
-			'align' => true,
-			'dir' => true,
-			'lang' => true,
-			'xml:lang' => true,
-		),
-		'hr' => array(
-			'align' => true,
-			'noshade' => true,
-			'size' => true,
-			'width' => true,
-		),
-		'i' => array(),
-		'img' => array(
-			'alt' => true,
-			'align' => true,
-			'border' => true,
-			'height' => true,
-			'hspace' => true,
-			'longdesc' => true,
-			'vspace' => true,
-			'src' => true,
-			'usemap' => true,
-			'width' => true,
-		),
-		'ins' => array(
-			'datetime' => true,
-			'cite' => true,
-		),
-		'kbd' => array(),
-		'label' => array(
-			'for' => true,
-		),
-		'legend' => array(
-			'align' => true,
-		),
-		'li' => array(
-			'align' => true,
-			'value' => true,
-		),
-		'map' => array(
-			'name' => true,
-		),
-		'mark' => array(),
-		'menu' => array(
-			'type' => true,
-		),
-		'nav' => array(
-			'align' => true,
-			'dir' => true,
-			'lang' => true,
-			'xml:lang' => true,
-		),
-		'p' => array(
-			'align' => true,
-			'dir' => true,
-			'lang' => true,
-			'xml:lang' => true,
-		),
-		'pre' => array(
-			'width' => true,
-		),
-		'q' => array(
-			'cite' => true,
-		),
-		's' => array(),
-		'samp' => array(),
-		'span' => array(
-			'dir' => true,
-			'align' => true,
-			'lang' => true,
-			'xml:lang' => true,
-		),
-		'section' => array(
-			'align' => true,
-			'dir' => true,
-			'lang' => true,
-			'xml:lang' => true,
-		),
-		'small' => array(),
-		'strike' => array(),
-		'strong' => array(),
-		'sub' => array(),
-		'summary' => array(
-			'align' => true,
-			'dir' => true,
-			'lang' => true,
-			'xml:lang' => true,
-		),
-		'sup' => array(),
-		'table' => array(
-			'align' => true,
-			'bgcolor' => true,
-			'border' => true,
-			'cellpadding' => true,
-			'cellspacing' => true,
-			'dir' => true,
-			'rules' => true,
-			'summary' => true,
-			'width' => true,
-		),
-		'tbody' => array(
-			'align' => true,
-			'char' => true,
-			'charoff' => true,
-			'valign' => true,
-		),
-		'td' => array(
-			'abbr' => true,
-			'align' => true,
-			'axis' => true,
-			'bgcolor' => true,
-			'char' => true,
-			'charoff' => true,
-			'colspan' => true,
-			'dir' => true,
-			'headers' => true,
-			'height' => true,
-			'nowrap' => true,
-			'rowspan' => true,
-			'scope' => true,
-			'valign' => true,
-			'width' => true,
-		),
-		'textarea' => array(
-			'cols' => true,
-			'rows' => true,
-			'disabled' => true,
-			'name' => true,
-			'readonly' => true,
-		),
-		'tfoot' => array(
-			'align' => true,
-			'char' => true,
-			'charoff' => true,
-			'valign' => true,
-		),
-		'th' => array(
-			'abbr' => true,
-			'align' => true,
-			'axis' => true,
-			'bgcolor' => true,
-			'char' => true,
-			'charoff' => true,
-			'colspan' => true,
-			'headers' => true,
-			'height' => true,
-			'nowrap' => true,
-			'rowspan' => true,
-			'scope' => true,
-			'valign' => true,
-			'width' => true,
-		),
-		'thead' => array(
-			'align' => true,
-			'char' => true,
-			'charoff' => true,
-			'valign' => true,
-		),
-		'title' => array(),
-		'tr' => array(
-			'align' => true,
-			'bgcolor' => true,
-			'char' => true,
-			'charoff' => true,
-			'valign' => true,
-		),
-		'track' => array(
-			'default' => true,
-			'kind' => true,
-			'label' => true,
-			'src' => true,
-			'srclang' => true,
-		),
-		'tt' => array(),
-		'u' => array(),
-		'ul' => array(
-			'type' => true,
-		),
-		'ol' => array(
-			'start' => true,
-			'type' => true,
-			'reversed' => true,
-		),
-		'var' => array(),
-		'video' => array(
-			'autoplay' => true,
-			'controls' => true,
-			'height' => true,
-			'loop' => true,
-			'muted' => true,
-			'poster' => true,
-			'preload' => true,
-			'src' => true,
-			'width' => true,
-		),
-	);
-
-	/**
-	 * Kses allowed HTML elements.
-	 *
-	 * @global array $allowedtags
-	 * @since 1.0.0
-	 */
-	$allowedtags = array(
-		'a' => array(
-			'href' => true,
-			'title' => true,
-		),
-		'abbr' => array(
-			'title' => true,
-		),
-		'acronym' => array(
-			'title' => true,
-		),
-		'b' => array(),
-		'blockquote' => array(
-			'cite' => true,
-		),
-		'cite' => array(),
-		'code' => array(),
-		'del' => array(
-			'datetime' => true,
-		),
-		'em' => array(),
-		'i' => array(),
-		'q' => array(
-			'cite' => true,
-		),
-		's' => array(),
-		'strike' => array(),
-		'strong' => array(),
-	);
-
-	$allowedentitynames = array(
-		'nbsp',    'iexcl',  'cent',    'pound',  'curren', 'yen',
-		'brvbar',  'sect',   'uml',     'copy',   'ordf',   'laquo',
-		'not',     'shy',    'reg',     'macr',   'deg',    'plusmn',
-		'acute',   'micro',  'para',    'middot', 'cedil',  'ordm',
-		'raquo',   'iquest', 'Agrave',  'Aacute', 'Acirc',  'Atilde',
-		'Auml',    'Aring',  'AElig',   'Ccedil', 'Egrave', 'Eacute',
-		'Ecirc',   'Euml',   'Igrave',  'Iacute', 'Icirc',  'Iuml',
-		'ETH',     'Ntilde', 'Ograve',  'Oacute', 'Ocirc',  'Otilde',
-		'Ouml',    'times',  'Oslash',  'Ugrave', 'Uacute', 'Ucirc',
-		'Uuml',    'Yacute', 'THORN',   'szlig',  'agrave', 'aacute',
-		'acirc',   'atilde', 'auml',    'aring',  'aelig',  'ccedil',
-		'egrave',  'eacute', 'ecirc',   'euml',   'igrave', 'iacute',
-		'icirc',   'iuml',   'eth',     'ntilde', 'ograve', 'oacute',
-		'ocirc',   'otilde', 'ouml',    'divide', 'oslash', 'ugrave',
-		'uacute',  'ucirc',  'uuml',    'yacute', 'thorn',  'yuml',
-		'quot',    'amp',    'lt',      'gt',     'apos',   'OElig',
-		'oelig',   'Scaron', 'scaron',  'Yuml',   'circ',   'tilde',
-		'ensp',    'emsp',   'thinsp',  'zwnj',   'zwj',    'lrm',
-		'rlm',     'ndash',  'mdash',   'lsquo',  'rsquo',  'sbquo',
-		'ldquo',   'rdquo',  'bdquo',   'dagger', 'Dagger', 'permil',
-		'lsaquo',  'rsaquo', 'euro',    'fnof',   'Alpha',  'Beta',
-		'Gamma',   'Delta',  'Epsilon', 'Zeta',   'Eta',    'Theta',
-		'Iota',    'Kappa',  'Lambda',  'Mu',     'Nu',     'Xi',
-		'Omicron', 'Pi',     'Rho',     'Sigma',  'Tau',    'Upsilon',
-		'Phi',     'Chi',    'Psi',     'Omega',  'alpha',  'beta',
-		'gamma',   'delta',  'epsilon', 'zeta',   'eta',    'theta',
-		'iota',    'kappa',  'lambda',  'mu',     'nu',     'xi',
-		'omicron', 'pi',     'rho',     'sigmaf', 'sigma',  'tau',
-		'upsilon', 'phi',    'chi',     'psi',    'omega',  'thetasym',
-		'upsih',   'piv',    'bull',    'hellip', 'prime',  'Prime',
-		'oline',   'frasl',  'weierp',  'image',  'real',   'trade',
-		'alefsym', 'larr',   'uarr',    'rarr',   'darr',   'harr',
-		'crarr',   'lArr',   'uArr',    'rArr',   'dArr',   'hArr',
-		'forall',  'part',   'exist',   'empty',  'nabla',  'isin',
-		'notin',   'ni',     'prod',    'sum',    'minus',  'lowast',
-		'radic',   'prop',   'infin',   'ang',    'and',    'or',
-		'cap',     'cup',    'int',     'sim',    'cong',   'asymp',
-		'ne',      'equiv',  'le',      'ge',     'sub',    'sup',
-		'nsub',    'sube',   'supe',    'oplus',  'otimes', 'perp',
-		'sdot',    'lceil',  'rceil',   'lfloor', 'rfloor', 'lang',
-		'rang',    'loz',    'spades',  'clubs',  'hearts', 'diams',
-		'sup1',    'sup2',   'sup3',    'frac14', 'frac12', 'frac34',
-		'there4',
-	);
-
-	$allowedposttags = array_map( '_wp_add_global_attributes', $allowedposttags );
-} else {
-	$allowedtags = wp_kses_array_lc( $allowedtags );
-	$allowedposttags = wp_kses_array_lc( $allowedposttags );
-}
-
-/**
- * Filters content and keeps only allowable HTML elements.
- *
- * This function makes sure that only the allowed HTML element names, attribute
- * names and attribute values plus only sane HTML entities will occur in
- * $string. You have to remove any slashes from PHP's magic quotes before you
- * call this function.
- *
- * The default allowed protocols are 'http', 'https', 'ftp', 'mailto', 'news',
- * 'irc', 'gopher', 'nntp', 'feed', 'telnet, 'mms', 'rtsp' and 'svn'. This
- * covers all common link protocols, except for 'javascript' which should not
- * be allowed for untrusted users.
- *
- * @since 1.0.0
- *
- * @param string $string            Content to filter through kses
- * @param array  $allowed_html      List of allowed HTML elements
- * @param array  $allowed_protocols Optional. Allowed protocol in links.
- * @return string Filtered content with only allowed HTML elements
- */
-function wp_kses( $string, $allowed_html, $allowed_protocols = array() ) {
-	if ( empty( $allowed_protocols ) )
-		$allowed_protocols = wp_allowed_protocols();
-	$string = wp_kses_no_null( $string, array( 'slash_zero' => 'keep' ) );
-	$string = wp_kses_js_entities($string);
-	$string = wp_kses_normalize_entities($string);
-	$string = wp_kses_hook($string, $allowed_html, $allowed_protocols); // WP changed the order of these funcs and added args to wp_kses_hook
-	return wp_kses_split($string, $allowed_html, $allowed_protocols);
-}
-
-/**
- * Filters one attribute only and ensures its value is allowed.
- *
- * This function has the advantage of being more secure than esc_attr() and can
- * escape data in some situations where wp_kses() must strip the whole attribute.
- *
- * @since 4.2.3
- *
- * @param string $string The 'whole' attribute, including name and value.
- * @param string $element The element name to which the attribute belongs.
- * @return string Filtered attribute.
- */
-function wp_kses_one_attr( $string, $element ) {
-	$uris = array('xmlns', 'profile', 'href', 'src', 'cite', 'classid', 'codebase', 'data', 'usemap', 'longdesc', 'action');
-	$allowed_html = wp_kses_allowed_html( 'post' );
-	$allowed_protocols = wp_allowed_protocols();
-	$string = wp_kses_no_null( $string, array( 'slash_zero' => 'keep' ) );
-	$string = wp_kses_js_entities( $string );
-	
-	// Preserve leading and trailing whitespace.
-	$matches = array();
-	preg_match('/^\s*/', $string, $matches);
-	$lead = $matches[0];
-	preg_match('/\s*$/', $string, $matches);
-	$trail = $matches[0];
-	if ( empty( $trail ) ) {
-		$string = substr( $string, strlen( $lead ) );
-	} else {
-		$string = substr( $string, strlen( $lead ), -strlen( $trail ) );
-	}
-	
-	// Parse attribute name and value from input.
-	$split = preg_split( '/\s*=\s*/', $string, 2 );
-	$name = $split[0];
-	if ( count( $split ) == 2 ) {
-		$value = $split[1];
-
-		// Remove quotes surrounding $value.
-		// Also guarantee correct quoting in $string for this one attribute.
-		if ( '' == $value ) {
-			$quote = '';
-		} else {
-			$quote = $value[0];
-		}
-		if ( '"' == $quote || "'" == $quote ) {
-			if ( substr( $value, -1 ) != $quote ) {
-				return '';
-			}
-			$value = substr( $value, 1, -1 );
-		} else {
-			$quote = '"';
-		}
-
-		// Sanitize quotes, angle braces, and entities.
-		$value = esc_attr( $value );
-
-		// Sanitize URI values.
-		if ( in_array( strtolower( $name ), $uris ) ) {
-			$value = wp_kses_bad_protocol( $value, $allowed_protocols );
-		}
-
-		$string = "$name=$quote$value$quote";
-		$vless = 'n';
-	} else {
-		$value = '';
-		$vless = 'y';
-	}
-	
-	// Sanitize attribute by name.
-	wp_kses_attr_check( $name, $value, $string, $vless, $element, $allowed_html );
-
-	// Restore whitespace.
-	return $lead . $string . $trail;
-}
-
-/**
- * Return a list of allowed tags and attributes for a given context.
- *
- * @since 3.5.0
- *
- * @global array $allowedposttags
- * @global array $allowedtags
- * @global array $allowedentitynames
- *
- * @param string $context The context for which to retrieve tags.
- *                        Allowed values are post, strip, data,entities, or
- *                        the name of a field filter such as pre_user_description.
- * @return array List of allowed tags and their allowed attributes.
- */
-function wp_kses_allowed_html( $context = '' ) {
-	global $allowedposttags, $allowedtags, $allowedentitynames;
-
-	if ( is_array( $context ) ) {
-		/**
-		 * Filters HTML elements allowed for a given context.
-		 *
-		 * @since 3.5.0
-		 *
-		 * @param string $tags    Allowed tags, attributes, and/or entities.
-		 * @param string $context Context to judge allowed tags by. Allowed values are 'post',
-		 *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
-		 */
-		return apply_filters( 'wp_kses_allowed_html', $context, 'explicit' );
-	}
-
-	switch ( $context ) {
-		case 'post':
-			/** This filter is documented in wp-includes/kses.php */
-			return apply_filters( 'wp_kses_allowed_html', $allowedposttags, $context );
-
-		case 'user_description':
-		case 'pre_user_description':
-			$tags = $allowedtags;
-			$tags['a']['rel'] = true;
-			/** This filter is documented in wp-includes/kses.php */
-			return apply_filters( 'wp_kses_allowed_html', $tags, $context );
-
-		case 'strip':
-			/** This filter is documented in wp-includes/kses.php */
-			return apply_filters( 'wp_kses_allowed_html', array(), $context );
-
-		case 'entities':
-			/** This filter is documented in wp-includes/kses.php */
-			return apply_filters( 'wp_kses_allowed_html', $allowedentitynames, $context);
-
-		case 'data':
-		default:
-			/** This filter is documented in wp-includes/kses.php */
-			return apply_filters( 'wp_kses_allowed_html', $allowedtags, $context );
-	}
-}
-
-/**
- * You add any kses hooks here.
- *
- * There is currently only one kses WordPress hook, {@see 'pre_kses'}, and it is called here.
- * All parameters are passed to the hooks and expected to receive a string.
- *
- * @since 1.0.0
- *
- * @param string $string            Content to filter through kses
- * @param array  $allowed_html      List of allowed HTML elements
- * @param array  $allowed_protocols Allowed protocol in links
- * @return string Filtered content through {@see 'pre_kses'} hook.
- */
-function wp_kses_hook( $string, $allowed_html, $allowed_protocols ) {
-	/**
-	 * Filters content to be run through kses.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param string $string            Content to run through kses.
-	 * @param array  $allowed_html      Allowed HTML elements.
-	 * @param array  $allowed_protocols Allowed protocol in links.
-	 */
-	return apply_filters( 'pre_kses', $string, $allowed_html, $allowed_protocols );
-}
-
-/**
- * This function returns kses' version number.
- *
- * @since 1.0.0
- *
- * @return string KSES Version Number
- */
-function wp_kses_version() {
-	return '0.2.2';
-}
-
-/**
- * Searches for HTML tags, no matter how malformed.
- *
- * It also matches stray ">" characters.
- *
- * @since 1.0.0
- *
- * @global array $pass_allowed_html
- * @global array $pass_allowed_protocols
- *
- * @param string $string            Content to filter
- * @param array  $allowed_html      Allowed HTML elements
- * @param array  $allowed_protocols Allowed protocols to keep
- * @return string Content with fixed HTML tags
- */
-function wp_kses_split( $string, $allowed_html, $allowed_protocols ) {
-	global $pass_allowed_html, $pass_allowed_protocols;
-	$pass_allowed_html = $allowed_html;
-	$pass_allowed_protocols = $allowed_protocols;
-	return preg_replace_callback( '%(<!--.*?(-->|$))|(<[^>]*(>|$)|>)%', '_wp_kses_split_callback', $string );
-}
-
-/**
- * Callback for wp_kses_split.
- *
- * @since 3.1.0
- * @access private
- *
- * @global array $pass_allowed_html
- * @global array $pass_allowed_protocols
- *
- * @return string
- */
-function _wp_kses_split_callback( $match ) {
-	global $pass_allowed_html, $pass_allowed_protocols;
-	return wp_kses_split2( $match[0], $pass_allowed_html, $pass_allowed_protocols );
-}
-
-/**
- * Callback for wp_kses_split for fixing malformed HTML tags.
- *
- * This function does a lot of work. It rejects some very malformed things like
- * <:::>. It returns an empty string, if the element isn't allowed (look ma, no
- * strip_tags()!). Otherwise it splits the tag into an element and an attribute
- * list.
- *
- * After the tag is split into an element and an attribute list, it is run
- * through another filter which will remove illegal attributes and once that is
- * completed, will be returned.
- *
- * @access private
- * @since 1.0.0
- *
- * @param string $string            Content to filter
- * @param array  $allowed_html      Allowed HTML elements
- * @param array  $allowed_protocols Allowed protocols to keep
- * @return string Fixed HTML element
- */
-function wp_kses_split2($string, $allowed_html, $allowed_protocols) {
-	$string = wp_kses_stripslashes($string);
-
-	if (substr($string, 0, 1) != '<')
-		return '&gt;';
-	// It matched a ">" character
-
-	if ( '<!--' == substr( $string, 0, 4 ) ) {
-		$string = str_replace( array('<!--', '-->'), '', $string );
-		while ( $string != ($newstring = wp_kses($string, $allowed_html, $allowed_protocols)) )
-			$string = $newstring;
-		if ( $string == '' )
-			return '';
-		// prevent multiple dashes in comments
-		$string = preg_replace('/--+/', '-', $string);
-		// prevent three dashes closing a comment
-		$string = preg_replace('/-$/', '', $string);
-		return "<!--{$string}-->";
-	}
-	// Allow HTML comments
-
-	if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9-]+)([^>]*)>?$%', $string, $matches))
-		return '';
-	// It's seriously malformed
-
-	$slash = trim($matches[1]);
-	$elem = $matches[2];
-	$attrlist = $matches[3];
-
-	if ( ! is_array( $allowed_html ) )
-		$allowed_html = wp_kses_allowed_html( $allowed_html );
-
-	if ( ! isset($allowed_html[strtolower($elem)]) )
-		return '';
-	// They are using a not allowed HTML element
-
-	if ($slash != '')
-		return "</$elem>";
-	// No attributes are allowed for closing elements
-
-	return wp_kses_attr( $elem, $attrlist, $allowed_html, $allowed_protocols );
-}
-
-/**
- * Removes all attributes, if none are allowed for this element.
- *
- * If some are allowed it calls wp_kses_hair() to split them further, and then
- * it builds up new HTML code from the data that kses_hair() returns. It also
- * removes "<" and ">" characters, if there are any left. One more thing it does
- * is to check if the tag has a closing XHTML slash, and if it does, it puts one
- * in the returned code as well.
- *
- * @since 1.0.0
- *
- * @param string $element           HTML element/tag
- * @param string $attr              HTML attributes from HTML element to closing HTML element tag
- * @param array  $allowed_html      Allowed HTML elements
- * @param array  $allowed_protocols Allowed protocols to keep
- * @return string Sanitized HTML element
- */
-function wp_kses_attr($element, $attr, $allowed_html, $allowed_protocols) {
-	if ( ! is_array( $allowed_html ) )
-		$allowed_html = wp_kses_allowed_html( $allowed_html );
-
-	// Is there a closing XHTML slash at the end of the attributes?
-	$xhtml_slash = '';
-	if (preg_match('%\s*/\s*$%', $attr))
-		$xhtml_slash = ' /';
-
-	// Are any attributes allowed at all for this element?
-	if ( ! isset($allowed_html[strtolower($element)]) || count($allowed_html[strtolower($element)]) == 0 )
-		return "<$element$xhtml_slash>";
-
-	// Split it
-	$attrarr = wp_kses_hair($attr, $allowed_protocols);
-
-	// Go through $attrarr, and save the allowed attributes for this element
-	// in $attr2
-	$attr2 = '';
-	foreach ( $attrarr as $arreach ) {
-		if ( wp_kses_attr_check( $arreach['name'], $arreach['value'], $arreach['whole'], $arreach['vless'], $element, $allowed_html ) ) {
-			$attr2 .= ' '.$arreach['whole'];
-		}
-	}
-
-	// Remove any "<" or ">" characters
-	$attr2 = preg_replace('/[<>]/', '', $attr2);
-
-	return "<$element$attr2$xhtml_slash>";
-}
-
-/**
- * Determine whether an attribute is allowed.
- *
- * @since 4.2.3
- *
- * @param string $name The attribute name. Returns empty string when not allowed.
- * @param string $value The attribute value. Returns a filtered value.
- * @param string $whole The name=value input. Returns filtered input.
- * @param string $vless 'y' when attribute like "enabled", otherwise 'n'.
- * @param string $element The name of the element to which this attribute belongs.
- * @param array $allowed_html The full list of allowed elements and attributes.
- * @return bool Is the attribute allowed?
- */
-function wp_kses_attr_check( &$name, &$value, &$whole, $vless, $element, $allowed_html ) {
-	$allowed_attr = $allowed_html[strtolower( $element )];
-
-	$name_low = strtolower( $name );
-	if ( ! isset( $allowed_attr[$name_low] ) || '' == $allowed_attr[$name_low] ) {
-		$name = $value = $whole = '';
-		return false;
-	}
-
-	if ( 'style' == $name_low ) {
-		$new_value = safecss_filter_attr( $value );
-
-		if ( empty( $new_value ) ) {
-			$name = $value = $whole = '';
-			return false;
-		}
-
-		$whole = str_replace( $value, $new_value, $whole );
-		$value = $new_value;
-	}
-
-	if ( is_array( $allowed_attr[$name_low] ) ) {
-		// there are some checks
-		foreach ( $allowed_attr[$name_low] as $currkey => $currval ) {
-			if ( ! wp_kses_check_attr_val( $value, $vless, $currkey, $currval ) ) {
-				$name = $value = $whole = '';
-				return false;
-			}
-		}
-	}
-
-	return true;
-}
-
-/**
- * Builds an attribute list from string containing attributes.
- *
- * This function does a lot of work. It parses an attribute list into an array
- * with attribute data, and tries to do the right thing even if it gets weird
- * input. It will add quotes around attribute values that don't have any quotes
- * or apostrophes around them, to make it easier to produce HTML code that will
- * conform to W3C's HTML specification. It will also remove bad URL protocols
- * from attribute values. It also reduces duplicate attributes by using the
- * attribute defined first (foo='bar' foo='baz' will result in foo='bar').
- *
- * @since 1.0.0
- *
- * @param string $attr              Attribute list from HTML element to closing HTML element tag
- * @param array  $allowed_protocols Allowed protocols to keep
- * @return array List of attributes after parsing
- */
-function wp_kses_hair($attr, $allowed_protocols) {
-	$attrarr = array();
-	$mode = 0;
-	$attrname = '';
-	$uris = array('xmlns', 'profile', 'href', 'src', 'cite', 'classid', 'codebase', 'data', 'usemap', 'longdesc', 'action');
-
-	// Loop through the whole attribute list
-
-	while (strlen($attr) != 0) {
-		$working = 0; // Was the last operation successful?
-
-		switch ($mode) {
-			case 0 : // attribute name, href for instance
-
-				if ( preg_match('/^([-a-zA-Z:]+)/', $attr, $match ) ) {
-					$attrname = $match[1];
-					$working = $mode = 1;
-					$attr = preg_replace( '/^[-a-zA-Z:]+/', '', $attr );
-				}
-
-				break;
-
-			case 1 : // equals sign or valueless ("selected")
-
-				if (preg_match('/^\s*=\s*/', $attr)) // equals sign
-					{
-					$working = 1;
-					$mode = 2;
-					$attr = preg_replace('/^\s*=\s*/', '', $attr);
-					break;
-				}
-
-				if (preg_match('/^\s+/', $attr)) // valueless
-					{
-					$working = 1;
-					$mode = 0;
-					if(false === array_key_exists($attrname, $attrarr)) {
-						$attrarr[$attrname] = array ('name' => $attrname, 'value' => '', 'whole' => $attrname, 'vless' => 'y');
-					}
-					$attr = preg_replace('/^\s+/', '', $attr);
-				}
-
-				break;
-
-			case 2 : // attribute value, a URL after href= for instance
-
-				if (preg_match('%^"([^"]*)"(\s+|/?$)%', $attr, $match))
-					// "value"
-					{
-					$thisval = $match[1];
-					if ( in_array(strtolower($attrname), $uris) )
-						$thisval = wp_kses_bad_protocol($thisval, $allowed_protocols);
-
-					if(false === array_key_exists($attrname, $attrarr)) {
-						$attrarr[$attrname] = array ('name' => $attrname, 'value' => $thisval, 'whole' => "$attrname=\"$thisval\"", 'vless' => 'n');
-					}
-					$working = 1;
-					$mode = 0;
-					$attr = preg_replace('/^"[^"]*"(\s+|$)/', '', $attr);
-					break;
-				}
-
-				if (preg_match("%^'([^']*)'(\s+|/?$)%", $attr, $match))
-					// 'value'
-					{
-					$thisval = $match[1];
-					if ( in_array(strtolower($attrname), $uris) )
-						$thisval = wp_kses_bad_protocol($thisval, $allowed_protocols);
-
-					if(false === array_key_exists($attrname, $attrarr)) {
-						$attrarr[$attrname] = array ('name' => $attrname, 'value' => $thisval, 'whole' => "$attrname='$thisval'", 'vless' => 'n');
-					}
-					$working = 1;
-					$mode = 0;
-					$attr = preg_replace("/^'[^']*'(\s+|$)/", '', $attr);
-					break;
-				}
-
-				if (preg_match("%^([^\s\"']+)(\s+|/?$)%", $attr, $match))
-					// value
-					{
-					$thisval = $match[1];
-					if ( in_array(strtolower($attrname), $uris) )
-						$thisval = wp_kses_bad_protocol($thisval, $allowed_protocols);
-
-					if(false === array_key_exists($attrname, $attrarr)) {
-						$attrarr[$attrname] = array ('name' => $attrname, 'value' => $thisval, 'whole' => "$attrname=\"$thisval\"", 'vless' => 'n');
-					}
-					// We add quotes to conform to W3C's HTML spec.
-					$working = 1;
-					$mode = 0;
-					$attr = preg_replace("%^[^\s\"']+(\s+|$)%", '', $attr);
-				}
-
-				break;
-		} // switch
-
-		if ($working == 0) // not well formed, remove and try again
-		{
-			$attr = wp_kses_html_error($attr);
-			$mode = 0;
-		}
-	} // while
-
-	if ($mode == 1 && false === array_key_exists($attrname, $attrarr))
-		// special case, for when the attribute list ends with a valueless
-		// attribute like "selected"
-		$attrarr[$attrname] = array ('name' => $attrname, 'value' => '', 'whole' => $attrname, 'vless' => 'y');
-
-	return $attrarr;
-}
-
-/**
- * Finds all attributes of an HTML element.
- *
- * Does not modify input.  May return "evil" output.
- *
- * Based on wp_kses_split2() and wp_kses_attr()
- *
- * @since 4.2.3
- *
- * @param string $element HTML element/tag
- * @return array|bool List of attributes found in $element. Returns false on failure.
- */
-function wp_kses_attr_parse( $element ) {
-	$valid = preg_match('%^(<\s*)(/\s*)?([a-zA-Z0-9]+\s*)([^>]*)(>?)$%', $element, $matches);
-	if ( 1 !== $valid ) {
-		return false;
-	}
-
-	$begin =  $matches[1];
-	$slash =  $matches[2];
-	$elname = $matches[3];
-	$attr =   $matches[4];
-	$end =    $matches[5];
-
-	if ( '' !== $slash ) {
-		// Closing elements do not get parsed.
-		return false;
-	}
-
-	// Is there a closing XHTML slash at the end of the attributes?
-	if ( 1 === preg_match( '%\s*/\s*$%', $attr, $matches ) ) {
-		$xhtml_slash = $matches[0];
-		$attr = substr( $attr, 0, -strlen( $xhtml_slash ) );
-	} else {
-		$xhtml_slash = '';
-	}
-	
-	// Split it
-	$attrarr = wp_kses_hair_parse( $attr );
-	if ( false === $attrarr ) {
-		return false;
-	}
-
-	// Make sure all input is returned by adding front and back matter.
-	array_unshift( $attrarr, $begin . $slash . $elname );
-	array_push( $attrarr, $xhtml_slash . $end );
-	
-	return $attrarr;
-}
-
-/**
- * Builds an attribute list from string containing attributes.
- *
- * Does not modify input.  May return "evil" output.
- * In case of unexpected input, returns false instead of stripping things.
- *
- * Based on wp_kses_hair() but does not return a multi-dimensional array.
- *
- * @since 4.2.3
- *
- * @param string $attr Attribute list from HTML element to closing HTML element tag
- * @return array|bool List of attributes found in $attr. Returns false on failure.
- */
-function wp_kses_hair_parse( $attr ) {
-	if ( '' === $attr ) {
-		return array();
-	}
-
-	$regex =
-	  '(?:'
-	.     '[-a-zA-Z:]+'   // Attribute name.
-	. '|'
-	.     '\[\[?[^\[\]]+\]\]?' // Shortcode in the name position implies unfiltered_html.
-	. ')'
-	. '(?:'               // Attribute value.
-	.     '\s*=\s*'       // All values begin with '='
-	.     '(?:'
-	.         '"[^"]*"'   // Double-quoted
-	.     '|'
-	.         "'[^']*'"   // Single-quoted
-	.     '|'
-	.         '[^\s"\']+' // Non-quoted
-	.         '(?:\s|$)'  // Must have a space
-	.     ')'
-	. '|'
-	.     '(?:\s|$)'      // If attribute has no value, space is required.
-	. ')'
-	. '\s*';              // Trailing space is optional except as mentioned above.
-
-	// Although it is possible to reduce this procedure to a single regexp,
-	// we must run that regexp twice to get exactly the expected result.
-
-	$validation = "%^($regex)+$%";
-	$extraction = "%$regex%";
-
-	if ( 1 === preg_match( $validation, $attr ) ) {
-		preg_match_all( $extraction, $attr, $attrarr );
-		return $attrarr[0];
-	} else {
-		return false;
-	}
-}
-
-/**
- * Performs different checks for attribute values.
- *
- * The currently implemented checks are "maxlen", "minlen", "maxval", "minval"
- * and "valueless".
- *
- * @since 1.0.0
- *
- * @param string $value      Attribute value
- * @param string $vless      Whether the value is valueless. Use 'y' or 'n'
- * @param string $checkname  What $checkvalue is checking for.
- * @param mixed  $checkvalue What constraint the value should pass
- * @return bool Whether check passes
- */
-function wp_kses_check_attr_val($value, $vless, $checkname, $checkvalue) {
-	$ok = true;
-
-	switch (strtolower($checkname)) {
-		case 'maxlen' :
-			// The maxlen check makes sure that the attribute value has a length not
-			// greater than the given value. This can be used to avoid Buffer Overflows
-			// in WWW clients and various Internet servers.
-
-			if (strlen($value) > $checkvalue)
-				$ok = false;
-			break;
-
-		case 'minlen' :
-			// The minlen check makes sure that the attribute value has a length not
-			// smaller than the given value.
-
-			if (strlen($value) < $checkvalue)
-				$ok = false;
-			break;
-
-		case 'maxval' :
-			// The maxval check does two things: it checks that the attribute value is
-			// an integer from 0 and up, without an excessive amount of zeroes or
-			// whitespace (to avoid Buffer Overflows). It also checks that the attribute
-			// value is not greater than the given value.
-			// This check can be used to avoid Denial of Service attacks.
-
-			if (!preg_match('/^\s{0,6}[0-9]{1,6}\s{0,6}$/', $value))
-				$ok = false;
-			if ($value > $checkvalue)
-				$ok = false;
-			break;
-
-		case 'minval' :
-			// The minval check makes sure that the attribute value is a positive integer,
-			// and that it is not smaller than the given value.
-
-			if (!preg_match('/^\s{0,6}[0-9]{1,6}\s{0,6}$/', $value))
-				$ok = false;
-			if ($value < $checkvalue)
-				$ok = false;
-			break;
-
-		case 'valueless' :
-			// The valueless check makes sure if the attribute has a value
-			// (like <a href="blah">) or not (<option selected>). If the given value
-			// is a "y" or a "Y", the attribute must not have a value.
-			// If the given value is an "n" or an "N", the attribute must have one.
-
-			if (strtolower($checkvalue) != $vless)
-				$ok = false;
-			break;
-	} // switch
-
-	return $ok;
-}
-
-/**
- * Sanitize string from bad protocols.
- *
- * This function removes all non-allowed protocols from the beginning of
- * $string. It ignores whitespace and the case of the letters, and it does
- * understand HTML entities. It does its work in a while loop, so it won't be
- * fooled by a string like "javascript:javascript:alert(57)".
- *
- * @since 1.0.0
- *
- * @param string $string            Content to filter bad protocols from
- * @param array  $allowed_protocols Allowed protocols to keep
- * @return string Filtered content
- */
-function wp_kses_bad_protocol($string, $allowed_protocols) {
-	$string = wp_kses_no_null($string);
-	$iterations = 0;
-
-	do {
-		$original_string = $string;
-		$string = wp_kses_bad_protocol_once($string, $allowed_protocols);
-	} while ( $original_string != $string && ++$iterations < 6 );
-
-	if ( $original_string != $string )
-		return '';
-
-	return $string;
-}
-
-/**
- * Removes any invalid control characters in $string.
- *
- * Also removes any instance of the '\0' string.
- *
- * @since 1.0.0
- *
- * @param string $string
- * @param array $options Set 'slash_zero' => 'keep' when '\0' is allowed. Default is 'remove'.
- * @return string
- */
-function wp_kses_no_null( $string, $options = null ) {
-	if ( ! isset( $options['slash_zero'] ) ) {
-		$options = array( 'slash_zero' => 'remove' );
-	}
-
-	$string = preg_replace( '/[\x00-\x08\x0B\x0C\x0E-\x1F]/', '', $string );
-	if ( 'remove' == $options['slash_zero'] ) {
-		$string = preg_replace( '/\\\\+0+/', '', $string );
-	}
-
-	return $string;
-}
-
-/**
- * Strips slashes from in front of quotes.
- *
- * This function changes the character sequence \" to just ". It leaves all
- * other slashes alone. It's really weird, but the quoting from
- * preg_replace(//e) seems to require this.
- *
- * @since 1.0.0
- *
- * @param string $string String to strip slashes
- * @return string Fixed string with quoted slashes
- */
-function wp_kses_stripslashes($string) {
-	return preg_replace('%\\\\"%', '"', $string);
-}
-
-/**
- * Goes through an array and changes the keys to all lower case.
- *
- * @since 1.0.0
- *
- * @param array $inarray Unfiltered array
- * @return array Fixed array with all lowercase keys
- */
-function wp_kses_array_lc($inarray) {
-	$outarray = array ();
-
-	foreach ( (array) $inarray as $inkey => $inval) {
-		$outkey = strtolower($inkey);
-		$outarray[$outkey] = array ();
-
-		foreach ( (array) $inval as $inkey2 => $inval2) {
-			$outkey2 = strtolower($inkey2);
-			$outarray[$outkey][$outkey2] = $inval2;
-		} // foreach $inval
-	} // foreach $inarray
-
-	return $outarray;
-}
-
-/**
- * Removes the HTML JavaScript entities found in early versions of Netscape 4.
- *
- * @since 1.0.0
- *
- * @param string $string
- * @return string
- */
-function wp_kses_js_entities($string) {
-	return preg_replace('%&\s*\{[^}]*(\}\s*;?|$)%', '', $string);
-}
-
-/**
- * Handles parsing errors in wp_kses_hair().
- *
- * The general plan is to remove everything to and including some whitespace,
- * but it deals with quotes and apostrophes as well.
- *
- * @since 1.0.0
- *
- * @param string $string
- * @return string
- */
-function wp_kses_html_error($string) {
-	return preg_replace('/^("[^"]*("|$)|\'[^\']*(\'|$)|\S)*\s*/', '', $string);
-}
-
-/**
- * Sanitizes content from bad protocols and other characters.
- *
- * This function searches for URL protocols at the beginning of $string, while
- * handling whitespace and HTML entities.
- *
- * @since 1.0.0
- *
- * @param string $string            Content to check for bad protocols
- * @param string $allowed_protocols Allowed protocols
- * @return string Sanitized content
- */
-function wp_kses_bad_protocol_once($string, $allowed_protocols, $count = 1 ) {
-	$string2 = preg_split( '/:|&#0*58;|&#x0*3a;/i', $string, 2 );
-	if ( isset($string2[1]) && ! preg_match('%/\?%', $string2[0]) ) {
-		$string = trim( $string2[1] );
-		$protocol = wp_kses_bad_protocol_once2( $string2[0], $allowed_protocols );
-		if ( 'feed:' == $protocol ) {
-			if ( $count > 2 )
-				return '';
-			$string = wp_kses_bad_protocol_once( $string, $allowed_protocols, ++$count );
-			if ( empty( $string ) )
-				return $string;
-		}
-		$string = $protocol . $string;
-	}
-
-	return $string;
-}
-
-/**
- * Callback for wp_kses_bad_protocol_once() regular expression.
- *
- * This function processes URL protocols, checks to see if they're in the
- * whitelist or not, and returns different data depending on the answer.
- *
- * @access private
- * @since 1.0.0
- *
- * @param string $string            URI scheme to check against the whitelist
- * @param string $allowed_protocols Allowed protocols
- * @return string Sanitized content
- */
-function wp_kses_bad_protocol_once2( $string, $allowed_protocols ) {
-	$string2 = wp_kses_decode_entities($string);
-	$string2 = preg_replace('/\s/', '', $string2);
-	$string2 = wp_kses_no_null($string2);
-	$string2 = strtolower($string2);
-
-	$allowed = false;
-	foreach ( (array) $allowed_protocols as $one_protocol )
-		if ( strtolower($one_protocol) == $string2 ) {
-			$allowed = true;
-			break;
-		}
-
-	if ($allowed)
-		return "$string2:";
-	else
-		return '';
-}
-
-/**
- * Converts and fixes HTML entities.
- *
- * This function normalizes HTML entities. It will convert `AT&T` to the correct
- * `AT&amp;T`, `&#00058;` to `&#58;`, `&#XYZZY;` to `&amp;#XYZZY;` and so on.
- *
- * @since 1.0.0
- *
- * @param string $string Content to normalize entities
- * @return string Content with normalized entities
- */
-function wp_kses_normalize_entities($string) {
-	// Disarm all entities by converting & to &amp;
-	$string = str_replace('&', '&amp;', $string);
-
-	// Change back the allowed entities in our entity whitelist
-	$string = preg_replace_callback('/&amp;([A-Za-z]{2,8}[0-9]{0,2});/', 'wp_kses_named_entities', $string);
-	$string = preg_replace_callback('/&amp;#(0*[0-9]{1,7});/', 'wp_kses_normalize_entities2', $string);
-	$string = preg_replace_callback('/&amp;#[Xx](0*[0-9A-Fa-f]{1,6});/', 'wp_kses_normalize_entities3', $string);
-
-	return $string;
-}
-
-/**
- * Callback for wp_kses_normalize_entities() regular expression.
- *
- * This function only accepts valid named entity references, which are finite,
- * case-sensitive, and highly scrutinized by HTML and XML validators.
- *
- * @since 3.0.0
- *
- * @global array $allowedentitynames
- *
- * @param array $matches preg_replace_callback() matches array
- * @return string Correctly encoded entity
- */
-function wp_kses_named_entities($matches) {
-	global $allowedentitynames;
-
-	if ( empty($matches[1]) )
-		return '';
-
-	$i = $matches[1];
-	return ( ! in_array( $i, $allowedentitynames ) ) ? "&amp;$i;" : "&$i;";
-}
-
-/**
- * Callback for wp_kses_normalize_entities() regular expression.
- *
- * This function helps wp_kses_normalize_entities() to only accept 16-bit
- * values and nothing more for `&#number;` entities.
- *
- * @access private
- * @since 1.0.0
- *
- * @param array $matches preg_replace_callback() matches array
- * @return string Correctly encoded entity
- */
-function wp_kses_normalize_entities2($matches) {
-	if ( empty($matches[1]) )
-		return '';
-
-	$i = $matches[1];
-	if (valid_unicode($i)) {
-		$i = str_pad(ltrim($i,'0'), 3, '0', STR_PAD_LEFT);
-		$i = "&#$i;";
-	} else {
-		$i = "&amp;#$i;";
-	}
-
-	return $i;
-}
-
-/**
- * Callback for wp_kses_normalize_entities() for regular expression.
- *
- * This function helps wp_kses_normalize_entities() to only accept valid Unicode
- * numeric entities in hex form.
- *
- * @access private
- *
- * @param array $matches preg_replace_callback() matches array
- * @return string Correctly encoded entity
- */
-function wp_kses_normalize_entities3($matches) {
-	if ( empty($matches[1]) )
-		return '';
-
-	$hexchars = $matches[1];
-	return ( ! valid_unicode( hexdec( $hexchars ) ) ) ? "&amp;#x$hexchars;" : '&#x'.ltrim($hexchars,'0').';';
-}
-
-/**
- * Helper function to determine if a Unicode value is valid.
- *
- * @param int $i Unicode value
- * @return bool True if the value was a valid Unicode number
- */
-function valid_unicode($i) {
-	return ( $i == 0x9 || $i == 0xa || $i == 0xd ||
-			($i >= 0x20 && $i <= 0xd7ff) ||
-			($i >= 0xe000 && $i <= 0xfffd) ||
-			($i >= 0x10000 && $i <= 0x10ffff) );
-}
-
-/**
- * Convert all entities to their character counterparts.
- *
- * This function decodes numeric HTML entities (`&#65;` and `&#x41;`).
- * It doesn't do anything with other entities like &auml;, but we don't
- * need them in the URL protocol whitelisting system anyway.
- *
- * @since 1.0.0
- *
- * @param string $string Content to change entities
- * @return string Content after decoded entities
- */
-function wp_kses_decode_entities($string) {
-	$string = preg_replace_callback('/&#([0-9]+);/', '_wp_kses_decode_entities_chr', $string);
-	$string = preg_replace_callback('/&#[Xx]([0-9A-Fa-f]+);/', '_wp_kses_decode_entities_chr_hexdec', $string);
-
-	return $string;
-}
-
-/**
- * Regex callback for wp_kses_decode_entities()
- *
- * @param array $match preg match
- * @return string
- */
-function _wp_kses_decode_entities_chr( $match ) {
-	return chr( $match[1] );
-}
-
-/**
- * Regex callback for wp_kses_decode_entities()
- *
- * @param array $match preg match
- * @return string
- */
-function _wp_kses_decode_entities_chr_hexdec( $match ) {
-	return chr( hexdec( $match[1] ) );
-}
-
-/**
- * Sanitize content with allowed HTML Kses rules.
- *
- * @since 1.0.0
- *
- * @param string $data Content to filter, expected to be escaped with slashes
- * @return string Filtered content
- */
-function wp_filter_kses( $data ) {
-	return addslashes( wp_kses( stripslashes( $data ), current_filter() ) );
-}
-
-/**
- * Sanitize content with allowed HTML Kses rules.
- *
- * @since 2.9.0
- *
- * @param string $data Content to filter, expected to not be escaped
- * @return string Filtered content
- */
-function wp_kses_data( $data ) {
-	return wp_kses( $data, current_filter() );
-}
-
-/**
- * Sanitize content for allowed HTML tags for post content.
- *
- * Post content refers to the page contents of the 'post' type and not $_POST
- * data from forms.
- *
- * @since 2.0.0
- *
- * @param string $data Post content to filter, expected to be escaped with slashes
- * @return string Filtered post content with allowed HTML tags and attributes intact.
- */
-function wp_filter_post_kses( $data ) {
-	return addslashes( wp_kses( stripslashes( $data ), 'post' ) );
-}
-
-/**
- * Sanitize content for allowed HTML tags for post content.
- *
- * Post content refers to the page contents of the 'post' type and not $_POST
- * data from forms.
- *
- * @since 2.9.0
- *
- * @param string $data Post content to filter
- * @return string Filtered post content with allowed HTML tags and attributes intact.
- */
-function wp_kses_post( $data ) {
-	return wp_kses( $data, 'post' );
-}
-
-/**
- * Navigates through an array, object, or scalar, and sanitizes content for
- * allowed HTML tags for post content.
- *
- * @since 4.4.2
- *
- * @see map_deep()
- *
- * @param mixed $data The array, object, or scalar value to inspect.
- * @return mixed The filtered content.
- */
-function wp_kses_post_deep( $data ) {
-	return map_deep( $data, 'wp_kses_post' );
-}
-
-/**
- * Strips all of the HTML in the content.
- *
- * @since 2.1.0
- *
- * @param string $data Content to strip all HTML from
- * @return string Filtered content without any HTML
- */
-function wp_filter_nohtml_kses( $data ) {
-	return addslashes( wp_kses( stripslashes( $data ), 'strip' ) );
-}
-
-/**
- * Adds all Kses input form content filters.
- *
- * All hooks have default priority. The wp_filter_kses() function is added to
- * the 'pre_comment_content' and 'title_save_pre' hooks.
- *
- * The wp_filter_post_kses() function is added to the 'content_save_pre',
- * 'excerpt_save_pre', and 'content_filtered_save_pre' hooks.
- *
- * @since 2.0.0
- */
-function kses_init_filters() {
-	// Normal filtering
-	add_filter('title_save_pre', 'wp_filter_kses');
-
-	// Comment filtering
-	if ( current_user_can( 'unfiltered_html' ) )
-		add_filter( 'pre_comment_content', 'wp_filter_post_kses' );
-	else
-		add_filter( 'pre_comment_content', 'wp_filter_kses' );
-
-	// Post filtering
-	add_filter('content_save_pre', 'wp_filter_post_kses');
-	add_filter('excerpt_save_pre', 'wp_filter_post_kses');
-	add_filter('content_filtered_save_pre', 'wp_filter_post_kses');
-}
-
-/**
- * Removes all Kses input form content filters.
- *
- * A quick procedural method to removing all of the filters that kses uses for
- * content in WordPress Loop.
- *
- * Does not remove the kses_init() function from {@see 'init'} hook (priority is
- * default). Also does not remove kses_init() function from {@see 'set_current_user'}
- * hook (priority is also default).
- *
- * @since 2.0.6
- */
-function kses_remove_filters() {
-	// Normal filtering
-	remove_filter('title_save_pre', 'wp_filter_kses');
-
-	// Comment filtering
-	remove_filter( 'pre_comment_content', 'wp_filter_post_kses' );
-	remove_filter( 'pre_comment_content', 'wp_filter_kses' );
-
-	// Post filtering
-	remove_filter('content_save_pre', 'wp_filter_post_kses');
-	remove_filter('excerpt_save_pre', 'wp_filter_post_kses');
-	remove_filter('content_filtered_save_pre', 'wp_filter_post_kses');
-}
-
-/**
- * Sets up most of the Kses filters for input form content.
- *
- * If you remove the kses_init() function from {@see 'init'} hook and
- * {@see 'set_current_user'} (priority is default), then none of the Kses filter hooks
- * will be added.
- *
- * First removes all of the Kses filters in case the current user does not need
- * to have Kses filter the content. If the user does not have unfiltered_html
- * capability, then Kses filters are added.
- *
- * @since 2.0.0
- */
-function kses_init() {
-	kses_remove_filters();
-
-	if ( ! current_user_can( 'unfiltered_html' ) ) {
-		kses_init_filters();
-	}
-}
-
-/**
- * Inline CSS filter
- *
- * @since 2.8.1
- *
- * @param string $css        A string of CSS rules.
- * @param string $deprecated Not used.
- * @return string            Filtered string of CSS rules.
- */
-function safecss_filter_attr( $css, $deprecated = '' ) {
-	if ( !empty( $deprecated ) )
-		_deprecated_argument( __FUNCTION__, '2.8.1' ); // Never implemented
-
-	$css = wp_kses_no_null($css);
-	$css = str_replace(array("\n","\r","\t"), '', $css);
-
-	if ( preg_match( '%[\\\\(&=}]|/\*%', $css ) ) // remove any inline css containing \ ( & } = or comments
-		return '';
-
-	$css_array = explode( ';', trim( $css ) );
-
-	/**
-	 * Filters list of allowed CSS attributes.
-	 *
-	 * @since 2.8.1
-	 * @since 4.4.0 Added support for `min-height`, `max-height`, `min-width`, and `max-width`.
-	 * @since 4.6.0 Added support for `list-style-type`.
-	 *
-	 * @param array $attr List of allowed CSS attributes.
-	 */
-	$allowed_attr = apply_filters( 'safe_style_css', array(
-		'background',
-		'background-color',
-
-		'border',
-		'border-width',
-		'border-color',
-		'border-style',
-		'border-right',
-		'border-right-color',
-		'border-right-style',
-		'border-right-width',
-		'border-bottom',
-		'border-bottom-color',
-		'border-bottom-style',
-		'border-bottom-width',
-		'border-left',
-		'border-left-color',
-		'border-left-style',
-		'border-left-width',
-		'border-top',
-		'border-top-color',
-		'border-top-style',
-		'border-top-width',
-
-		'border-spacing',
-		'border-collapse',
-		'caption-side',
-
-		'color',
-		'font',
-		'font-family',
-		'font-size',
-		'font-style',
-		'font-variant',
-		'font-weight',
-		'letter-spacing',
-		'line-height',
-		'text-decoration',
-		'text-indent',
-		'text-align',
-
-		'height',
-		'min-height',
-		'max-height',
-
-		'width',
-		'min-width',
-		'max-width',
-
-		'margin',
-		'margin-right',
-		'margin-bottom',
-		'margin-left',
-		'margin-top',
-
-		'padding',
-		'padding-right',
-		'padding-bottom',
-		'padding-left',
-		'padding-top',
-
-		'clear',
-		'cursor',
-		'direction',
-		'float',
-		'overflow',
-		'vertical-align',
-		'list-style-type',
-	) );
-
-	if ( empty($allowed_attr) )
-		return $css;
-
-	$css = '';
-	foreach ( $css_array as $css_item ) {
-		if ( $css_item == '' )
-			continue;
-		$css_item = trim( $css_item );
-		$found = false;
-		if ( strpos( $css_item, ':' ) === false ) {
-			$found = true;
-		} else {
-			$parts = explode( ':', $css_item );
-			if ( in_array( trim( $parts[0] ), $allowed_attr ) )
-				$found = true;
-		}
-		if ( $found ) {
-			if( $css != '' )
-				$css .= ';';
-			$css .= $css_item;
-		}
-	}
-
-	return $css;
-}
-
-/**
- * Helper function to add global attributes to a tag in the allowed html list.
- *
- * @since 3.5.0
- * @access private
- *
- * @param array $value An array of attributes.
- * @return array The array of attributes with global attributes added.
- */
-function _wp_add_global_attributes( $value ) {
-	$global_attributes = array(
-		'class' => true,
-		'id' => true,
-		'style' => true,
-		'title' => true,
-		'role' => true,
-	);
-
-	if ( true === $value )
-		$value = array();
-
-	if ( is_array( $value ) )
-		return array_merge( $value, $global_attributes );
-
-	return $value;
-}
Index: www/wp-admin/ms-users.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/ms-users.php	(revision 38565)
+++ www/wp-admin/ms-users.php	(revision 38565)
@@ -1,13 +0,0 @@
-<?php
-/**
- * Multisite users administration panel.
- *
- * @package WordPress
- * @subpackage Multisite
- * @since 3.0.0
- */
-
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-wp_redirect( network_admin_url('users.php') );
-exit;
Index: www/wp-admin/link.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/link.php	(revision 38565)
+++ www/wp-admin/link.php	(revision 38565)
@@ -1,117 +0,0 @@
-<?php
-/**
- * Manage link administration actions.
- *
- * This page is accessed by the link management pages and handles the forms and
- * Ajax processes for link actions.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** Load WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-wp_reset_vars( array( 'action', 'cat_id', 'link_id' ) );
-
-if ( ! current_user_can('manage_links') )
-	wp_link_manager_disabled_message();
-
-if ( !empty($_POST['deletebookmarks']) )
-	$action = 'deletebookmarks';
-if ( !empty($_POST['move']) )
-	$action = 'move';
-if ( !empty($_POST['linkcheck']) )
-	$linkcheck = $_POST['linkcheck'];
-
-$this_file = admin_url('link-manager.php');
-
-switch ($action) {
-	case 'deletebookmarks' :
-		check_admin_referer('bulk-bookmarks');
-
-		// For each link id (in $linkcheck[]) change category to selected value.
-		if (count($linkcheck) == 0) {
-			wp_redirect($this_file);
-			exit;
-		}
-
-		$deleted = 0;
-		foreach ($linkcheck as $link_id) {
-			$link_id = (int) $link_id;
-
-			if ( wp_delete_link($link_id) )
-				$deleted++;
-		}
-
-		wp_redirect("$this_file?deleted=$deleted");
-		exit;
-
-	case 'move' :
-		check_admin_referer('bulk-bookmarks');
-
-		// For each link id (in $linkcheck[]) change category to selected value.
-		if (count($linkcheck) == 0) {
-			wp_redirect($this_file);
-			exit;
-		}
-		$all_links = join(',', $linkcheck);
-		/*
-		 * Should now have an array of links we can change:
-		 *     $q = $wpdb->query("update $wpdb->links SET link_category='$category' WHERE link_id IN ($all_links)");
-		 */
-
-		wp_redirect($this_file);
-		exit;
-
-	case 'add' :
-		check_admin_referer('add-bookmark');
-
-		$redir = wp_get_referer();
-		if ( add_link() )
-			$redir = add_query_arg( 'added', 'true', $redir );
-
-		wp_redirect( $redir );
-		exit;
-
-	case 'save' :
-		$link_id = (int) $_POST['link_id'];
-		check_admin_referer('update-bookmark_' . $link_id);
-
-		edit_link($link_id);
-
-		wp_redirect($this_file);
-		exit;
-
-	case 'delete' :
-		$link_id = (int) $_GET['link_id'];
-		check_admin_referer('delete-bookmark_' . $link_id);
-
-		wp_delete_link($link_id);
-
-		wp_redirect($this_file);
-		exit;
-
-	case 'edit' :
-		wp_enqueue_script('link');
-		wp_enqueue_script('xfn');
-
-		if ( wp_is_mobile() )
-			wp_enqueue_script( 'jquery-touch-punch' );
-
-		$parent_file = 'link-manager.php';
-		$submenu_file = 'link-manager.php';
-		$title = __('Edit Link');
-
-		$link_id = (int) $_GET['link_id'];
-
-		if (!$link = get_link_to_edit($link_id))
-			wp_die(__('Link not found.'));
-
-		include( ABSPATH . 'wp-admin/edit-link-form.php' );
-		include( ABSPATH . 'wp-admin/admin-footer.php' );
-		break;
-
-	default :
-		break;
-}
Index: www/wp-includes/Text/Diff/Engine/xdiff.php
===================================================================
--- www/wp-includes/Text/Diff/Engine/xdiff.php	(revision 38565)
+++ www/wp-includes/autoload/text-diff/Text_Diff_Engine_xdiff.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-simplepie.php
===================================================================
--- www/wp-includes/class-simplepie.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie.php	(revision )
@@ -1,40 +1,6 @@
 <?php
-if ( ! class_exists( 'SimplePie', false ) ) :
 
-// Load classes we will need.
-require ABSPATH . WPINC . '/SimplePie/Misc.php';
-require ABSPATH . WPINC . '/SimplePie/Cache.php';
-require ABSPATH . WPINC . '/SimplePie/File.php';
-require ABSPATH . WPINC . '/SimplePie/Sanitize.php';
-require ABSPATH . WPINC . '/SimplePie/Registry.php';
-require ABSPATH . WPINC . '/SimplePie/IRI.php';
-require ABSPATH . WPINC . '/SimplePie/Locator.php';
-require ABSPATH . WPINC . '/SimplePie/Content/Type/Sniffer.php';
-require ABSPATH . WPINC . '/SimplePie/XML/Declaration/Parser.php';
-require ABSPATH . WPINC . '/SimplePie/Parser.php';
-require ABSPATH . WPINC . '/SimplePie/Item.php';
-require ABSPATH . WPINC . '/SimplePie/Parse/Date.php';
-require ABSPATH . WPINC . '/SimplePie/Author.php';
-
 /**
- * WordPress autoloader for SimplePie.
- *
- * @since 3.5.0
- */
-function wp_simplepie_autoload( $class ) {
-	if ( 0 !== strpos( $class, 'SimplePie_' ) )
-		return;
-
-	$file = ABSPATH . WPINC . '/' . str_replace( '_', '/', $class ) . '.php';
-	include( $file );
-}
-
-/**
- * We autoload classes we may not need.
- */
-spl_autoload_register( 'wp_simplepie_autoload' );
-
-/**
  * SimplePie
  *
  * A PHP-Based RSS and Atom Feed Framework.
@@ -78,375 +44,12 @@
  */
 
 /**
- * SimplePie Name
- */
-define('SIMPLEPIE_NAME', 'SimplePie');
-
-/**
- * SimplePie Version
- */
-define('SIMPLEPIE_VERSION', '1.3.1');
-
-/**
- * SimplePie Build
- * @todo Hardcode for release (there's no need to have to call SimplePie_Misc::get_build() only every load of simplepie.inc)
- */
-define('SIMPLEPIE_BUILD', gmdate('YmdHis', SimplePie_Misc::get_build()));
-
-/**
- * SimplePie Website URL
- */
-define('SIMPLEPIE_URL', 'http://simplepie.org');
-
-/**
- * SimplePie Useragent
- * @see SimplePie::set_useragent()
- */
-define('SIMPLEPIE_USERAGENT', SIMPLEPIE_NAME . '/' . SIMPLEPIE_VERSION . ' (Feed Parser; ' . SIMPLEPIE_URL . '; Allow like Gecko) Build/' . SIMPLEPIE_BUILD);
-
-/**
- * SimplePie Linkback
- */
-define('SIMPLEPIE_LINKBACK', '<a href="' . SIMPLEPIE_URL . '" title="' . SIMPLEPIE_NAME . ' ' . SIMPLEPIE_VERSION . '">' . SIMPLEPIE_NAME . '</a>');
-
-/**
- * No Autodiscovery
- * @see SimplePie::set_autodiscovery_level()
- */
-define('SIMPLEPIE_LOCATOR_NONE', 0);
-
-/**
- * Feed Link Element Autodiscovery
- * @see SimplePie::set_autodiscovery_level()
- */
-define('SIMPLEPIE_LOCATOR_AUTODISCOVERY', 1);
-
-/**
- * Local Feed Extension Autodiscovery
- * @see SimplePie::set_autodiscovery_level()
- */
-define('SIMPLEPIE_LOCATOR_LOCAL_EXTENSION', 2);
-
-/**
- * Local Feed Body Autodiscovery
- * @see SimplePie::set_autodiscovery_level()
- */
-define('SIMPLEPIE_LOCATOR_LOCAL_BODY', 4);
-
-/**
- * Remote Feed Extension Autodiscovery
- * @see SimplePie::set_autodiscovery_level()
- */
-define('SIMPLEPIE_LOCATOR_REMOTE_EXTENSION', 8);
-
-/**
- * Remote Feed Body Autodiscovery
- * @see SimplePie::set_autodiscovery_level()
- */
-define('SIMPLEPIE_LOCATOR_REMOTE_BODY', 16);
-
-/**
- * All Feed Autodiscovery
- * @see SimplePie::set_autodiscovery_level()
- */
-define('SIMPLEPIE_LOCATOR_ALL', 31);
-
-/**
- * No known feed type
- */
-define('SIMPLEPIE_TYPE_NONE', 0);
-
-/**
- * RSS 0.90
- */
-define('SIMPLEPIE_TYPE_RSS_090', 1);
-
-/**
- * RSS 0.91 (Netscape)
- */
-define('SIMPLEPIE_TYPE_RSS_091_NETSCAPE', 2);
-
-/**
- * RSS 0.91 (Userland)
- */
-define('SIMPLEPIE_TYPE_RSS_091_USERLAND', 4);
-
-/**
- * RSS 0.91 (both Netscape and Userland)
- */
-define('SIMPLEPIE_TYPE_RSS_091', 6);
-
-/**
- * RSS 0.92
- */
-define('SIMPLEPIE_TYPE_RSS_092', 8);
-
-/**
- * RSS 0.93
- */
-define('SIMPLEPIE_TYPE_RSS_093', 16);
-
-/**
- * RSS 0.94
- */
-define('SIMPLEPIE_TYPE_RSS_094', 32);
-
-/**
- * RSS 1.0
- */
-define('SIMPLEPIE_TYPE_RSS_10', 64);
-
-/**
- * RSS 2.0
- */
-define('SIMPLEPIE_TYPE_RSS_20', 128);
-
-/**
- * RDF-based RSS
- */
-define('SIMPLEPIE_TYPE_RSS_RDF', 65);
-
-/**
- * Non-RDF-based RSS (truly intended as syndication format)
- */
-define('SIMPLEPIE_TYPE_RSS_SYNDICATION', 190);
-
-/**
- * All RSS
- */
-define('SIMPLEPIE_TYPE_RSS_ALL', 255);
-
-/**
- * Atom 0.3
- */
-define('SIMPLEPIE_TYPE_ATOM_03', 256);
-
-/**
- * Atom 1.0
- */
-define('SIMPLEPIE_TYPE_ATOM_10', 512);
-
-/**
- * All Atom
- */
-define('SIMPLEPIE_TYPE_ATOM_ALL', 768);
-
-/**
- * All feed types
- */
-define('SIMPLEPIE_TYPE_ALL', 1023);
-
-/**
- * No construct
- */
-define('SIMPLEPIE_CONSTRUCT_NONE', 0);
-
-/**
- * Text construct
- */
-define('SIMPLEPIE_CONSTRUCT_TEXT', 1);
-
-/**
- * HTML construct
- */
-define('SIMPLEPIE_CONSTRUCT_HTML', 2);
-
-/**
- * XHTML construct
- */
-define('SIMPLEPIE_CONSTRUCT_XHTML', 4);
-
-/**
- * base64-encoded construct
- */
-define('SIMPLEPIE_CONSTRUCT_BASE64', 8);
-
-/**
- * IRI construct
- */
-define('SIMPLEPIE_CONSTRUCT_IRI', 16);
-
-/**
- * A construct that might be HTML
- */
-define('SIMPLEPIE_CONSTRUCT_MAYBE_HTML', 32);
-
-/**
- * All constructs
- */
-define('SIMPLEPIE_CONSTRUCT_ALL', 63);
-
-/**
- * Don't change case
- */
-define('SIMPLEPIE_SAME_CASE', 1);
-
-/**
- * Change to lowercase
- */
-define('SIMPLEPIE_LOWERCASE', 2);
-
-/**
- * Change to uppercase
- */
-define('SIMPLEPIE_UPPERCASE', 4);
-
-/**
- * PCRE for HTML attributes
- */
-define('SIMPLEPIE_PCRE_HTML_ATTRIBUTE', '((?:[\x09\x0A\x0B\x0C\x0D\x20]+[^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3D\x3E]*(?:[\x09\x0A\x0B\x0C\x0D\x20]*=[\x09\x0A\x0B\x0C\x0D\x20]*(?:"(?:[^"]*)"|\'(?:[^\']*)\'|(?:[^\x09\x0A\x0B\x0C\x0D\x20\x22\x27\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x3E]*)?))?)*)[\x09\x0A\x0B\x0C\x0D\x20]*');
-
-/**
- * PCRE for XML attributes
- */
-define('SIMPLEPIE_PCRE_XML_ATTRIBUTE', '((?:\s+(?:(?:[^\s:]+:)?[^\s:]+)\s*=\s*(?:"(?:[^"]*)"|\'(?:[^\']*)\'))*)\s*');
-
-/**
- * XML Namespace
- */
-define('SIMPLEPIE_NAMESPACE_XML', 'http://www.w3.org/XML/1998/namespace');
-
-/**
- * Atom 1.0 Namespace
- */
-define('SIMPLEPIE_NAMESPACE_ATOM_10', 'http://www.w3.org/2005/Atom');
-
-/**
- * Atom 0.3 Namespace
- */
-define('SIMPLEPIE_NAMESPACE_ATOM_03', 'http://purl.org/atom/ns#');
-
-/**
- * RDF Namespace
- */
-define('SIMPLEPIE_NAMESPACE_RDF', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#');
-
-/**
- * RSS 0.90 Namespace
- */
-define('SIMPLEPIE_NAMESPACE_RSS_090', 'http://my.netscape.com/rdf/simple/0.9/');
-
-/**
- * RSS 1.0 Namespace
- */
-define('SIMPLEPIE_NAMESPACE_RSS_10', 'http://purl.org/rss/1.0/');
-
-/**
- * RSS 1.0 Content Module Namespace
- */
-define('SIMPLEPIE_NAMESPACE_RSS_10_MODULES_CONTENT', 'http://purl.org/rss/1.0/modules/content/');
-
-/**
- * RSS 2.0 Namespace
- * (Stupid, I know, but I'm certain it will confuse people less with support.)
- */
-define('SIMPLEPIE_NAMESPACE_RSS_20', '');
-
-/**
- * DC 1.0 Namespace
- */
-define('SIMPLEPIE_NAMESPACE_DC_10', 'http://purl.org/dc/elements/1.0/');
-
-/**
- * DC 1.1 Namespace
- */
-define('SIMPLEPIE_NAMESPACE_DC_11', 'http://purl.org/dc/elements/1.1/');
-
-/**
- * W3C Basic Geo (WGS84 lat/long) Vocabulary Namespace
- */
-define('SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO', 'http://www.w3.org/2003/01/geo/wgs84_pos#');
-
-/**
- * GeoRSS Namespace
- */
-define('SIMPLEPIE_NAMESPACE_GEORSS', 'http://www.georss.org/georss');
-
-/**
- * Media RSS Namespace
- */
-define('SIMPLEPIE_NAMESPACE_MEDIARSS', 'http://search.yahoo.com/mrss/');
-
-/**
- * Wrong Media RSS Namespace. Caused by a long-standing typo in the spec.
- */
-define('SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG', 'http://search.yahoo.com/mrss');
-
-/**
- * Wrong Media RSS Namespace #2. New namespace introduced in Media RSS 1.5.
- */
-define('SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG2', 'http://video.search.yahoo.com/mrss');
-
-/**
- * Wrong Media RSS Namespace #3. A possible typo of the Media RSS 1.5 namespace.
- */
-define('SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG3', 'http://video.search.yahoo.com/mrss/');
-
-/**
- * Wrong Media RSS Namespace #4. New spec location after the RSS Advisory Board takes it over, but not a valid namespace.
- */
-define('SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG4', 'http://www.rssboard.org/media-rss');
-
-/**
- * Wrong Media RSS Namespace #5. A possible typo of the RSS Advisory Board URL.
- */
-define('SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG5', 'http://www.rssboard.org/media-rss/');
-
-/**
- * iTunes RSS Namespace
- */
-define('SIMPLEPIE_NAMESPACE_ITUNES', 'http://www.itunes.com/dtds/podcast-1.0.dtd');
-
-/**
- * XHTML Namespace
- */
-define('SIMPLEPIE_NAMESPACE_XHTML', 'http://www.w3.org/1999/xhtml');
-
-/**
- * IANA Link Relations Registry
- */
-define('SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY', 'http://www.iana.org/assignments/relation/');
-
-/**
- * No file source
- */
-define('SIMPLEPIE_FILE_SOURCE_NONE', 0);
-
-/**
- * Remote file source
- */
-define('SIMPLEPIE_FILE_SOURCE_REMOTE', 1);
-
-/**
- * Local file source
- */
-define('SIMPLEPIE_FILE_SOURCE_LOCAL', 2);
-
-/**
- * fsockopen() file source
- */
-define('SIMPLEPIE_FILE_SOURCE_FSOCKOPEN', 4);
-
-/**
- * cURL file source
- */
-define('SIMPLEPIE_FILE_SOURCE_CURL', 8);
-
-/**
- * file_get_contents() file source
- */
-define('SIMPLEPIE_FILE_SOURCE_FILE_GET_CONTENTS', 16);
-
-
-
-/**
  * SimplePie
  *
  * @package SimplePie
  * @subpackage API
  */
-class SimplePie
-{
+class SimplePie {
 	/**
 	 * @var array Raw data
 	 * @access private
@@ -634,14 +237,49 @@
 	 * @see SimplePie::strip_attributes()
 	 * @access private
 	 */
-	public $strip_attributes = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc');
+	public $strip_attributes = array(
+		'bgsound',
+		'class',
+		'expr',
+		'id',
+		'style',
+		'onclick',
+		'onerror',
+		'onfinish',
+		'onmouseover',
+		'onmouseout',
+		'onfocus',
+		'onblur',
+		'lowsrc',
+		'dynsrc'
+	);
 
 	/**
 	 * @var array Stores the default tags to be stripped by strip_htmltags().
 	 * @see SimplePie::strip_htmltags()
 	 * @access private
 	 */
-	public $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style');
+	public $strip_htmltags = array(
+		'base',
+		'blink',
+		'body',
+		'doctype',
+		'embed',
+		'font',
+		'form',
+		'frame',
+		'frameset',
+		'html',
+		'iframe',
+		'input',
+		'marquee',
+		'meta',
+		'noscript',
+		'object',
+		'param',
+		'script',
+		'style'
+	);
 
 	/**
 	 * The SimplePie class contains feed level data and options
@@ -657,11 +295,9 @@
 	 *
 	 * @since 1.0 Preview Release
 	 */
-	public function __construct()
-	{
-		if (version_compare(PHP_VERSION, '5.2', '<'))
-		{
+	public function __construct() {
+		if ( version_compare( PHP_VERSION, '5.2', '<' ) ) {
-			trigger_error('PHP 4.x, 5.0 and 5.1 are no longer supported. Please upgrade to PHP 5.2 or newer.');
+			trigger_error( 'PHP 4.x, 5.0 and 5.1 are no longer supported. Please upgrade to PHP 5.2 or newer.' );
 			die();
 		}
 
@@ -669,19 +305,18 @@
 		$this->sanitize = new SimplePie_Sanitize();
 		$this->registry = new SimplePie_Registry();
 
-		if (func_num_args() > 0)
-		{
+		if ( func_num_args() > 0 ) {
-			$level = defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_WARNING;
+			$level = defined( 'E_USER_DEPRECATED' ) ? E_USER_DEPRECATED : E_USER_WARNING;
-			trigger_error('Passing parameters to the constructor is no longer supported. Please use set_feed_url(), set_cache_location(), and set_cache_location() directly.', $level);
+			trigger_error( 'Passing parameters to the constructor is no longer supported. Please use set_feed_url(), set_cache_location(), and set_cache_location() directly.', $level );
 
 			$args = func_get_args();
-			switch (count($args)) {
+			switch ( count( $args ) ) {
 				case 3:
-					$this->set_cache_duration($args[2]);
+					$this->set_cache_duration( $args[2] );
 				case 2:
-					$this->set_cache_location($args[1]);
+					$this->set_cache_location( $args[1] );
 				case 1:
-					$this->set_feed_url($args[0]);
+					$this->set_feed_url( $args[0] );
 					$this->init();
 			}
 		}
@@ -690,33 +325,26 @@
 	/**
 	 * Used for converting object to a string
 	 */
-	public function __toString()
-	{
+	public function __toString() {
-		return md5(serialize($this->data));
+		return md5( serialize( $this->data ) );
 	}
 
 	/**
 	 * Remove items that link back to this before destroying this object
 	 */
-	public function __destruct()
-	{
-		if ((version_compare(PHP_VERSION, '5.3', '<') || !gc_enabled()) && !ini_get('zend.ze1_compatibility_mode'))
-		{
-			if (!empty($this->data['items']))
-			{
-				foreach ($this->data['items'] as $item)
-				{
+	public function __destruct() {
+		if ( ( version_compare( PHP_VERSION, '5.3', '<' ) || ! gc_enabled() ) && ! ini_get( 'zend.ze1_compatibility_mode' ) ) {
+			if ( ! empty( $this->data['items'] ) ) {
+				foreach ( $this->data['items'] as $item ) {
 					$item->__destruct();
 				}
-				unset($item, $this->data['items']);
+				unset( $item, $this->data['items'] );
 			}
-			if (!empty($this->data['ordered_items']))
-			{
-				foreach ($this->data['ordered_items'] as $item)
-				{
+			if ( ! empty( $this->data['ordered_items'] ) ) {
+				foreach ( $this->data['ordered_items'] as $item ) {
 					$item->__destruct();
 				}
-				unset($item, $this->data['ordered_items']);
+				unset( $item, $this->data['ordered_items'] );
 			}
 		}
 	}
@@ -728,10 +356,10 @@
 	 * Be careful when using this option, as it will also disable autodiscovery.
 	 *
 	 * @since 1.1
+	 *
 	 * @param bool $enable Force the given data/URL to be treated as a feed
 	 */
-	public function force_feed($enable = false)
-	{
+	public function force_feed( $enable = false ) {
 		$this->force_feed = (bool) $enable;
 	}
 
@@ -748,21 +376,17 @@
 	 *
 	 * @since 1.0 Preview Release
 	 * @see set_raw_data()
+	 *
 	 * @param string|array $url This is the URL (or array of URLs) that you want to parse.
 	 */
-	public function set_feed_url($url)
-	{
+	public function set_feed_url( $url ) {
 		$this->multifeed_url = array();
-		if (is_array($url))
-		{
-			foreach ($url as $value)
-			{
+		if ( is_array( $url ) ) {
+			foreach ( $url as $value ) {
-				$this->multifeed_url[] = $this->registry->call('Misc', 'fix_protocol', array($value, 1));
+				$this->multifeed_url[] = $this->registry->call( 'Misc', 'fix_protocol', array( $value, 1 ) );
 			}
-		}
-		else
-		{
+		} else {
-			$this->feed_url = $this->registry->call('Misc', 'fix_protocol', array($url, 1));
+			$this->feed_url = $this->registry->call( 'Misc', 'fix_protocol', array( $url, 1 ) );
 		}
 	}
 
@@ -770,16 +394,17 @@
 	 * Set an instance of {@see SimplePie_File} to use as a feed
 	 *
 	 * @param SimplePie_File &$file
+	 *
 	 * @return bool True on success, false on failure
 	 */
-	public function set_file(&$file)
-	{
-		if ($file instanceof SimplePie_File)
-		{
+	public function set_file( &$file ) {
+		if ( $file instanceof SimplePie_File ) {
 			$this->feed_url = $file->url;
-			$this->file =& $file;
+			$this->file     =& $file;
+
 			return true;
 		}
+
 		return false;
 	}
 
@@ -793,11 +418,12 @@
 	 * takes precedence.
 	 *
 	 * @since 1.0 Beta 3
+	 *
 	 * @param string $data RSS or Atom data as a string.
+	 *
 	 * @see set_feed_url()
 	 */
-	public function set_raw_data($data)
-	{
+	public function set_raw_data( $data ) {
 		$this->raw_data = $data;
 	}
 
@@ -808,10 +434,10 @@
 	 * and send the feed back.
 	 *
 	 * @since 1.0 Beta 3
+	 *
 	 * @param int $timeout The maximum number of seconds to spend waiting to retrieve a feed.
 	 */
-	public function set_timeout($timeout = 10)
-	{
+	public function set_timeout( $timeout = 10 ) {
 		$this->timeout = (int) $timeout;
 	}
 
@@ -819,10 +445,10 @@
 	 * Force SimplePie to use fsockopen() instead of cURL
 	 *
 	 * @since 1.0 Beta 3
+	 *
 	 * @param bool $enable Force fsockopen() to be used
 	 */
-	public function force_fsockopen($enable = false)
-	{
+	public function force_fsockopen( $enable = false ) {
 		$this->force_fsockopen = (bool) $enable;
 	}
 
@@ -833,10 +459,10 @@
 	 * However, disabling the cache can lead to longer load times.
 	 *
 	 * @since 1.0 Preview Release
+	 *
 	 * @param bool $enable Enable caching
 	 */
-	public function enable_cache($enable = true)
-	{
+	public function enable_cache( $enable = true ) {
 		$this->cache = (bool) $enable;
 	}
 
@@ -846,8 +472,7 @@
 	 *
 	 * @param int $seconds The feed content cache duration
 	 */
-	public function set_cache_duration($seconds = 3600)
-	{
+	public function set_cache_duration( $seconds = 3600 ) {
 		$this->cache_duration = (int) $seconds;
 	}
 
@@ -857,8 +482,7 @@
 	 *
 	 * @param int $seconds The autodiscovered feed URL cache duration.
 	 */
-	public function set_autodiscovery_cache_duration($seconds = 604800)
-	{
+	public function set_autodiscovery_cache_duration( $seconds = 604800 ) {
 		$this->autodiscovery_cache_duration = (int) $seconds;
 	}
 
@@ -867,8 +491,7 @@
 	 *
 	 * @param string $location The file system location.
 	 */
-	public function set_cache_location($location = './cache')
-	{
+	public function set_cache_location( $location = './cache' ) {
 		$this->cache_location = (string) $location;
 	}
 
@@ -877,8 +500,7 @@
 	 *
 	 * @param bool $enable Sort as reverse chronological order.
 	 */
-	public function enable_order_by_date($enable = true)
-	{
+	public function enable_order_by_date( $enable = true ) {
 		$this->order_by_date = (bool) $enable;
 	}
 
@@ -890,14 +512,10 @@
 	 *
 	 * @param string $encoding Character encoding
 	 */
-	public function set_input_encoding($encoding = false)
-	{
-		if ($encoding)
-		{
+	public function set_input_encoding( $encoding = false ) {
+		if ( $encoding ) {
 			$this->input_encoding = (string) $encoding;
-		}
-		else
-		{
+		} else {
 			$this->input_encoding = false;
 		}
 	}
@@ -912,10 +530,10 @@
 	 * @see SIMPLEPIE_LOCATOR_REMOTE_EXTENSION
 	 * @see SIMPLEPIE_LOCATOR_REMOTE_BODY
 	 * @see SIMPLEPIE_LOCATOR_ALL
+	 *
 	 * @param int $level Feed Autodiscovery Level (level can be a combination of the above constants, see bitwise OR operator)
 	 */
-	public function set_autodiscovery_level($level = SIMPLEPIE_LOCATOR_ALL)
-	{
+	public function set_autodiscovery_level( $level = SIMPLEPIE_LOCATOR_ALL ) {
 		$this->autodiscovery = (int) $level;
 	}
 
@@ -926,8 +544,7 @@
 	 * @see SimplePie_Registry
 	 * @return SimplePie_Registry
 	 */
-	public function &get_registry()
-	{
+	public function &get_registry() {
 		return $this->registry;
 	}
 
@@ -936,135 +553,121 @@
 	 *
 	 * @deprecated Use {@see get_registry()} instead
 	 * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation
+	 *
 	 * @param string $class Name of custom class
+	 *
 	 * @return boolean True on success, false otherwise
 	 */
 	/**
 	 * Set which class SimplePie uses for caching
 	 */
-	public function set_cache_class($class = 'SimplePie_Cache')
-	{
+	public function set_cache_class( $class = 'SimplePie_Cache' ) {
-		return $this->registry->register('Cache', $class, true);
+		return $this->registry->register( 'Cache', $class, true );
 	}
 
 	/**
 	 * Set which class SimplePie uses for auto-discovery
 	 */
-	public function set_locator_class($class = 'SimplePie_Locator')
-	{
+	public function set_locator_class( $class = 'SimplePie_Locator' ) {
-		return $this->registry->register('Locator', $class, true);
+		return $this->registry->register( 'Locator', $class, true );
 	}
 
 	/**
 	 * Set which class SimplePie uses for XML parsing
 	 */
-	public function set_parser_class($class = 'SimplePie_Parser')
-	{
+	public function set_parser_class( $class = 'SimplePie_Parser' ) {
-		return $this->registry->register('Parser', $class, true);
+		return $this->registry->register( 'Parser', $class, true );
 	}
 
 	/**
 	 * Set which class SimplePie uses for remote file fetching
 	 */
-	public function set_file_class($class = 'SimplePie_File')
-	{
+	public function set_file_class( $class = 'SimplePie_File' ) {
-		return $this->registry->register('File', $class, true);
+		return $this->registry->register( 'File', $class, true );
 	}
 
 	/**
 	 * Set which class SimplePie uses for data sanitization
 	 */
-	public function set_sanitize_class($class = 'SimplePie_Sanitize')
-	{
+	public function set_sanitize_class( $class = 'SimplePie_Sanitize' ) {
-		return $this->registry->register('Sanitize', $class, true);
+		return $this->registry->register( 'Sanitize', $class, true );
 	}
 
 	/**
 	 * Set which class SimplePie uses for handling feed items
 	 */
-	public function set_item_class($class = 'SimplePie_Item')
-	{
+	public function set_item_class( $class = 'SimplePie_Item' ) {
-		return $this->registry->register('Item', $class, true);
+		return $this->registry->register( 'Item', $class, true );
 	}
 
 	/**
 	 * Set which class SimplePie uses for handling author data
 	 */
-	public function set_author_class($class = 'SimplePie_Author')
-	{
+	public function set_author_class( $class = 'SimplePie_Author' ) {
-		return $this->registry->register('Author', $class, true);
+		return $this->registry->register( 'Author', $class, true );
 	}
 
 	/**
 	 * Set which class SimplePie uses for handling category data
 	 */
-	public function set_category_class($class = 'SimplePie_Category')
-	{
+	public function set_category_class( $class = 'SimplePie_Category' ) {
-		return $this->registry->register('Category', $class, true);
+		return $this->registry->register( 'Category', $class, true );
 	}
 
 	/**
 	 * Set which class SimplePie uses for feed enclosures
 	 */
-	public function set_enclosure_class($class = 'SimplePie_Enclosure')
-	{
+	public function set_enclosure_class( $class = 'SimplePie_Enclosure' ) {
-		return $this->registry->register('Enclosure', $class, true);
+		return $this->registry->register( 'Enclosure', $class, true );
 	}
 
 	/**
 	 * Set which class SimplePie uses for `<media:text>` captions
 	 */
-	public function set_caption_class($class = 'SimplePie_Caption')
-	{
+	public function set_caption_class( $class = 'SimplePie_Caption' ) {
-		return $this->registry->register('Caption', $class, true);
+		return $this->registry->register( 'Caption', $class, true );
 	}
 
 	/**
 	 * Set which class SimplePie uses for `<media:copyright>`
 	 */
-	public function set_copyright_class($class = 'SimplePie_Copyright')
-	{
+	public function set_copyright_class( $class = 'SimplePie_Copyright' ) {
-		return $this->registry->register('Copyright', $class, true);
+		return $this->registry->register( 'Copyright', $class, true );
 	}
 
 	/**
 	 * Set which class SimplePie uses for `<media:credit>`
 	 */
-	public function set_credit_class($class = 'SimplePie_Credit')
-	{
+	public function set_credit_class( $class = 'SimplePie_Credit' ) {
-		return $this->registry->register('Credit', $class, true);
+		return $this->registry->register( 'Credit', $class, true );
 	}
 
 	/**
 	 * Set which class SimplePie uses for `<media:rating>`
 	 */
-	public function set_rating_class($class = 'SimplePie_Rating')
-	{
+	public function set_rating_class( $class = 'SimplePie_Rating' ) {
-		return $this->registry->register('Rating', $class, true);
+		return $this->registry->register( 'Rating', $class, true );
 	}
 
 	/**
 	 * Set which class SimplePie uses for `<media:restriction>`
 	 */
-	public function set_restriction_class($class = 'SimplePie_Restriction')
-	{
+	public function set_restriction_class( $class = 'SimplePie_Restriction' ) {
-		return $this->registry->register('Restriction', $class, true);
+		return $this->registry->register( 'Restriction', $class, true );
 	}
 
 	/**
 	 * Set which class SimplePie uses for content-type sniffing
 	 */
-	public function set_content_type_sniffer_class($class = 'SimplePie_Content_Type_Sniffer')
-	{
+	public function set_content_type_sniffer_class( $class = 'SimplePie_Content_Type_Sniffer' ) {
-		return $this->registry->register('Content_Type_Sniffer', $class, true);
+		return $this->registry->register( 'Content_Type_Sniffer', $class, true );
 	}
 
 	/**
 	 * Set which class SimplePie uses item sources
 	 */
-	public function set_source_class($class = 'SimplePie_Source')
-	{
+	public function set_source_class( $class = 'SimplePie_Source' ) {
-		return $this->registry->register('Source', $class, true);
+		return $this->registry->register( 'Source', $class, true );
 	}
 	/**#@-*/
 
@@ -1073,8 +676,7 @@
 	 *
 	 * @param string $ua New user agent string.
 	 */
-	public function set_useragent($ua = SIMPLEPIE_USERAGENT)
-	{
+	public function set_useragent( $ua = SIMPLEPIE_USERAGENT ) {
 		$this->useragent = (string) $ua;
 	}
 
@@ -1083,10 +685,8 @@
 	 *
 	 * @param mixed $function Callback function
 	 */
-	public function set_cache_name_function($function = 'md5')
-	{
-		if (is_callable($function))
-		{
+	public function set_cache_name_function( $function = 'md5' ) {
+		if ( is_callable( $function ) ) {
 			$this->cache_name_function = $function;
 		}
 	}
@@ -1099,16 +699,14 @@
 	 *
 	 * @param bool $set Whether to set them or not
 	 */
-	public function set_stupidly_fast($set = false)
-	{
-		if ($set)
-		{
+	public function set_stupidly_fast( $set = false ) {
+		if ( $set ) {
-			$this->enable_order_by_date(false);
+			$this->enable_order_by_date( false );
-			$this->remove_div(false);
+			$this->remove_div( false );
-			$this->strip_comments(false);
+			$this->strip_comments( false );
-			$this->strip_htmltags(false);
+			$this->strip_htmltags( false );
-			$this->strip_attributes(false);
+			$this->strip_attributes( false );
-			$this->set_image_handler(false);
+			$this->set_image_handler( false );
 		}
 	}
 
@@ -1117,41 +715,33 @@
 	 *
 	 * @param int $max Maximum number of feeds to check
 	 */
-	public function set_max_checked_feeds($max = 10)
-	{
+	public function set_max_checked_feeds( $max = 10 ) {
 		$this->max_checked_feeds = (int) $max;
 	}
 
-	public function remove_div($enable = true)
-	{
+	public function remove_div( $enable = true ) {
-		$this->sanitize->remove_div($enable);
+		$this->sanitize->remove_div( $enable );
 	}
 
-	public function strip_htmltags($tags = '', $encode = null)
-	{
-		if ($tags === '')
-		{
+	public function strip_htmltags( $tags = '', $encode = null ) {
+		if ( $tags === '' ) {
 			$tags = $this->strip_htmltags;
 		}
-		$this->sanitize->strip_htmltags($tags);
+		$this->sanitize->strip_htmltags( $tags );
-		if ($encode !== null)
-		{
+		if ( $encode !== null ) {
-			$this->sanitize->encode_instead_of_strip($tags);
+			$this->sanitize->encode_instead_of_strip( $tags );
 		}
 	}
 
-	public function encode_instead_of_strip($enable = true)
-	{
+	public function encode_instead_of_strip( $enable = true ) {
-		$this->sanitize->encode_instead_of_strip($enable);
+		$this->sanitize->encode_instead_of_strip( $enable );
 	}
 
-	public function strip_attributes($attribs = '')
-	{
-		if ($attribs === '')
-		{
+	public function strip_attributes( $attribs = '' ) {
+		if ( $attribs === '' ) {
 			$attribs = $this->strip_attributes;
 		}
-		$this->sanitize->strip_attributes($attribs);
+		$this->sanitize->strip_attributes( $attribs );
 	}
 
 	/**
@@ -1176,14 +766,12 @@
 	 *
 	 * @param string $encoding
 	 */
-	public function set_output_encoding($encoding = 'UTF-8')
-	{
+	public function set_output_encoding( $encoding = 'UTF-8' ) {
-		$this->sanitize->set_output_encoding($encoding);
+		$this->sanitize->set_output_encoding( $encoding );
 	}
 
-	public function strip_comments($strip = false)
-	{
+	public function strip_comments( $strip = false ) {
-		$this->sanitize->strip_comments($strip);
+		$this->sanitize->strip_comments( $strip );
 	}
 
 	/**
@@ -1195,11 +783,11 @@
 	 * |q|@cite
 	 *
 	 * @since 1.0
+	 *
 	 * @param array|null $element_attribute Element/attribute key/value pairs, null for default
 	 */
-	public function set_url_replacements($element_attribute = null)
-	{
+	public function set_url_replacements( $element_attribute = null ) {
-		$this->sanitize->set_url_replacements($element_attribute);
+		$this->sanitize->set_url_replacements( $element_attribute );
 	}
 
 	/**
@@ -1208,14 +796,10 @@
 	 * @param str $page Web-accessible path to the handler_image.php file.
 	 * @param str $qs The query string that the value should be passed to.
 	 */
-	public function set_image_handler($page = false, $qs = 'i')
-	{
-		if ($page !== false)
-		{
+	public function set_image_handler( $page = false, $qs = 'i' ) {
+		if ( $page !== false ) {
-			$this->sanitize->set_image_handler($page . '?' . $qs . '=');
+			$this->sanitize->set_image_handler( $page . '?' . $qs . '=' );
-		}
-		else
-		{
+		} else {
 			$this->image_handler = '';
 		}
 	}
@@ -1225,8 +809,7 @@
 	 *
 	 * @param integer $limit The maximum number of items to return.
 	 */
-	public function set_item_limit($limit = 0)
-	{
+	public function set_item_limit( $limit = 0 ) {
 		$this->item_limit = (int) $limit;
 	}
 
@@ -1239,186 +822,179 @@
 	 *
 	 * @return boolean True if successful, false otherwise
 	 */
-	public function init()
-	{
+	public function init() {
 		// Check absolute bare minimum requirements.
-		if (!extension_loaded('xml') || !extension_loaded('pcre'))
-		{
+		if ( ! extension_loaded( 'xml' ) || ! extension_loaded( 'pcre' ) ) {
 			return false;
-		}
-		// Then check the xml extension is sane (i.e., libxml 2.7.x issue on PHP < 5.2.9 and libxml 2.7.0 to 2.7.2 on any version) if we don't have xmlreader.
-		elseif (!extension_loaded('xmlreader'))
-		{
+		} // Then check the xml extension is sane (i.e., libxml 2.7.x issue on PHP < 5.2.9 and libxml 2.7.0 to 2.7.2 on any version) if we don't have xmlreader.
+		elseif ( ! extension_loaded( 'xmlreader' ) ) {
 			static $xml_is_sane = null;
-			if ($xml_is_sane === null)
-			{
+			if ( $xml_is_sane === null ) {
 				$parser_check = xml_parser_create();
-				xml_parse_into_struct($parser_check, '<foo>&amp;</foo>', $values);
+				xml_parse_into_struct( $parser_check, '<foo>&amp;</foo>', $values );
-				xml_parser_free($parser_check);
+				xml_parser_free( $parser_check );
-				$xml_is_sane = isset($values[0]['value']);
+				$xml_is_sane = isset( $values[0]['value'] );
 			}
-			if (!$xml_is_sane)
-			{
+			if ( ! $xml_is_sane ) {
 				return false;
 			}
 		}
 
-		if (method_exists($this->sanitize, 'set_registry'))
-		{
+		if ( method_exists( $this->sanitize, 'set_registry' ) ) {
-			$this->sanitize->set_registry($this->registry);
+			$this->sanitize->set_registry( $this->registry );
 		}
 
 		// Pass whatever was set with config options over to the sanitizer.
 		// Pass the classes in for legacy support; new classes should use the registry instead
-		$this->sanitize->pass_cache_data($this->cache, $this->cache_location, $this->cache_name_function, $this->registry->get_class('Cache'));
+		$this->sanitize->pass_cache_data( $this->cache, $this->cache_location, $this->cache_name_function, $this->registry->get_class( 'Cache' ) );
-		$this->sanitize->pass_file_data($this->registry->get_class('File'), $this->timeout, $this->useragent, $this->force_fsockopen);
+		$this->sanitize->pass_file_data( $this->registry->get_class( 'File' ), $this->timeout, $this->useragent, $this->force_fsockopen );
 
-		if (!empty($this->multifeed_url))
-		{
+		if ( ! empty( $this->multifeed_url ) ) {
-			$i = 0;
+			$i                       = 0;
-			$success = 0;
+			$success                 = 0;
 			$this->multifeed_objects = array();
-			$this->error = array();
+			$this->error             = array();
-			foreach ($this->multifeed_url as $url)
-			{
+			foreach ( $this->multifeed_url as $url ) {
-				$this->multifeed_objects[$i] = clone $this;
+				$this->multifeed_objects[ $i ] = clone $this;
-				$this->multifeed_objects[$i]->set_feed_url($url);
+				$this->multifeed_objects[ $i ]->set_feed_url( $url );
-				$single_success = $this->multifeed_objects[$i]->init();
+				$single_success = $this->multifeed_objects[ $i ]->init();
 				$success |= $single_success;
-				if (!$single_success)
-				{
+				if ( ! $single_success ) {
-					$this->error[$i] = $this->multifeed_objects[$i]->error();
+					$this->error[ $i ] = $this->multifeed_objects[ $i ]->error();
 				}
-				$i++;
+				$i ++;
 			}
+
 			return (bool) $success;
-		}
-		elseif ($this->feed_url === null && $this->raw_data === null)
-		{
+		} elseif ( $this->feed_url === null && $this->raw_data === null ) {
 			return false;
 		}
 
-		$this->error = null;
+		$this->error             = null;
-		$this->data = array();
+		$this->data              = array();
 		$this->multifeed_objects = array();
-		$cache = false;
+		$cache                   = false;
 
-		if ($this->feed_url !== null)
-		{
+		if ( $this->feed_url !== null ) {
-			$parsed_feed_url = $this->registry->call('Misc', 'parse_url', array($this->feed_url));
+			$parsed_feed_url = $this->registry->call( 'Misc', 'parse_url', array( $this->feed_url ) );
 
 			// Decide whether to enable caching
-			if ($this->cache && $parsed_feed_url['scheme'] !== '')
-			{
-				$cache = $this->registry->call('Cache', 'get_handler', array($this->cache_location, call_user_func($this->cache_name_function, $this->feed_url), 'spc'));
+			if ( $this->cache && $parsed_feed_url['scheme'] !== '' ) {
+				$cache = $this->registry->call( 'Cache', 'get_handler', array(
+					$this->cache_location,
+					call_user_func( $this->cache_name_function, $this->feed_url ),
+					'spc'
+				) );
 			}
 
 			// Fetch the data via SimplePie_File into $this->raw_data
-			if (($fetched = $this->fetch_data($cache)) === true)
-			{
+			if ( ( $fetched = $this->fetch_data( $cache ) ) === true ) {
 				return true;
-			}
-			elseif ($fetched === false) {
+			} elseif ( $fetched === false ) {
 				return false;
 			}
 
-			list($headers, $sniffed) = $fetched;
+			list( $headers, $sniffed ) = $fetched;
 		}
 
 		// Set up array of possible encodings
 		$encodings = array();
 
 		// First check to see if input has been overridden.
-		if ($this->input_encoding !== false)
-		{
+		if ( $this->input_encoding !== false ) {
 			$encodings[] = $this->input_encoding;
 		}
 
-		$application_types = array('application/xml', 'application/xml-dtd', 'application/xml-external-parsed-entity');
+		$application_types = array(
+			'application/xml',
+			'application/xml-dtd',
+			'application/xml-external-parsed-entity'
+		);
-		$text_types = array('text/xml', 'text/xml-external-parsed-entity');
+		$text_types        = array( 'text/xml', 'text/xml-external-parsed-entity' );
 
 		// RFC 3023 (only applies to sniffed content)
-		if (isset($sniffed))
-		{
-			if (in_array($sniffed, $application_types) || substr($sniffed, 0, 12) === 'application/' && substr($sniffed, -4) === '+xml')
-			{
-				if (isset($headers['content-type']) && preg_match('/;\x20?charset=([^;]*)/i', $headers['content-type'], $charset))
-				{
+		if ( isset( $sniffed ) ) {
+			if ( in_array( $sniffed, $application_types ) || substr( $sniffed, 0, 12 ) === 'application/' && substr( $sniffed, - 4 ) === '+xml' ) {
+				if ( isset( $headers['content-type'] ) && preg_match( '/;\x20?charset=([^;]*)/i', $headers['content-type'], $charset ) ) {
-					$encodings[] = strtoupper($charset[1]);
+					$encodings[] = strtoupper( $charset[1] );
 				}
-				$encodings = array_merge($encodings, $this->registry->call('Misc', 'xml_encoding', array($this->raw_data, &$this->registry)));
+				$encodings   = array_merge( $encodings, $this->registry->call( 'Misc', 'xml_encoding', array(
+					$this->raw_data,
+					&$this->registry
+				) ) );
 				$encodings[] = 'UTF-8';
-			}
-			elseif (in_array($sniffed, $text_types) || substr($sniffed, 0, 5) === 'text/' && substr($sniffed, -4) === '+xml')
-			{
-				if (isset($headers['content-type']) && preg_match('/;\x20?charset=([^;]*)/i', $headers['content-type'], $charset))
-				{
+			} elseif ( in_array( $sniffed, $text_types ) || substr( $sniffed, 0, 5 ) === 'text/' && substr( $sniffed, - 4 ) === '+xml' ) {
+				if ( isset( $headers['content-type'] ) && preg_match( '/;\x20?charset=([^;]*)/i', $headers['content-type'], $charset ) ) {
 					$encodings[] = $charset[1];
 				}
 				$encodings[] = 'US-ASCII';
-			}
-			// Text MIME-type default
-			elseif (substr($sniffed, 0, 5) === 'text/')
-			{
+			} // Text MIME-type default
+			elseif ( substr( $sniffed, 0, 5 ) === 'text/' ) {
 				$encodings[] = 'US-ASCII';
 			}
 		}
 
 		// Fallback to XML 1.0 Appendix F.1/UTF-8/ISO-8859-1
-		$encodings = array_merge($encodings, $this->registry->call('Misc', 'xml_encoding', array($this->raw_data, &$this->registry)));
+		$encodings   = array_merge( $encodings, $this->registry->call( 'Misc', 'xml_encoding', array(
+			$this->raw_data,
+			&$this->registry
+		) ) );
 		$encodings[] = 'UTF-8';
 		$encodings[] = 'ISO-8859-1';
 
 		// There's no point in trying an encoding twice
-		$encodings = array_unique($encodings);
+		$encodings = array_unique( $encodings );
 
 		// Loop through each possible encoding, till we return something, or run out of possibilities
-		foreach ($encodings as $encoding)
-		{
+		foreach ( $encodings as $encoding ) {
 			// Change the encoding to UTF-8 (as we always use UTF-8 internally)
-			if ($utf8_data = $this->registry->call('Misc', 'change_encoding', array($this->raw_data, $encoding, 'UTF-8')))
-			{
+			if ( $utf8_data = $this->registry->call( 'Misc', 'change_encoding', array(
+				$this->raw_data,
+				$encoding,
+				'UTF-8'
+			) )
+			) {
 				// Create new parser
-				$parser = $this->registry->create('Parser');
+				$parser = $this->registry->create( 'Parser' );
 
 				// If it's parsed fine
-				if ($parser->parse($utf8_data, 'UTF-8'))
-				{
+				if ( $parser->parse( $utf8_data, 'UTF-8' ) ) {
 					$this->data = $parser->get_data();
-					if (!($this->get_type() & ~SIMPLEPIE_TYPE_NONE))
-					{
+					if ( ! ( $this->get_type() & ~SIMPLEPIE_TYPE_NONE ) ) {
 						$this->error = "A feed could not be found at $this->feed_url. This does not appear to be a valid RSS or Atom feed.";
-						$this->registry->call('Misc', 'error', array($this->error, E_USER_NOTICE, __FILE__, __LINE__));
+						$this->registry->call( 'Misc', 'error', array(
+							$this->error,
+							E_USER_NOTICE,
+							__FILE__,
+							__LINE__
+						) );
+
 						return false;
 					}
 
-					if (isset($headers))
-					{
+					if ( isset( $headers ) ) {
 						$this->data['headers'] = $headers;
 					}
 					$this->data['build'] = SIMPLEPIE_BUILD;
 
 					// Cache the file if caching is enabled
-					if ($cache && !$cache->save($this))
-					{
+					if ( $cache && ! $cache->save( $this ) ) {
-						trigger_error("$this->cache_location is not writeable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.", E_USER_WARNING);
+						trigger_error( "$this->cache_location is not writeable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.", E_USER_WARNING );
 					}
+
 					return true;
 				}
 			}
 		}
 
-		if (isset($parser))
-		{
+		if ( isset( $parser ) ) {
 			// We have an error, just set SimplePie_Misc::error to it and quit
-			$this->error = sprintf('This XML document is invalid, likely due to invalid characters. XML error: %s at line %d, column %d', $parser->get_error_string(), $parser->get_current_line(), $parser->get_current_column());
+			$this->error = sprintf( 'This XML document is invalid, likely due to invalid characters. XML error: %s at line %d, column %d', $parser->get_error_string(), $parser->get_current_line(), $parser->get_current_column() );
-		}
-		else
-		{
+		} else {
 			$this->error = 'The data could not be converted to UTF-8. You MUST have either the iconv or mbstring extension installed. Upgrading to PHP 5.x (which includes iconv) is highly recommended.';
 		}
 
-		$this->registry->call('Misc', 'error', array($this->error, E_USER_NOTICE, __FILE__, __LINE__));
+		$this->registry->call( 'Misc', 'error', array( $this->error, E_USER_NOTICE, __FILE__, __LINE__ ) );
 
 		return false;
 	}
@@ -1427,150 +1003,159 @@
 	 * Fetch the data via SimplePie_File
 	 *
 	 * If the data is already cached, attempt to fetch it from there instead
+	 *
 	 * @param SimplePie_Cache|false $cache Cache handler, or false to not load from the cache
+	 *
 	 * @return array|true Returns true if the data was loaded from the cache, or an array of HTTP headers and sniffed type
 	 */
-	protected function fetch_data(&$cache)
-	{
+	protected function fetch_data( &$cache ) {
 		// If it's enabled, use the cache
-		if ($cache)
-		{
+		if ( $cache ) {
 			// Load the Cache
 			$this->data = $cache->load();
-			if (!empty($this->data))
-			{
+			if ( ! empty( $this->data ) ) {
 				// If the cache is for an outdated build of SimplePie
-				if (!isset($this->data['build']) || $this->data['build'] !== SIMPLEPIE_BUILD)
-				{
+				if ( ! isset( $this->data['build'] ) || $this->data['build'] !== SIMPLEPIE_BUILD ) {
 					$cache->unlink();
 					$this->data = array();
-				}
-				// If we've hit a collision just rerun it with caching disabled
-				elseif (isset($this->data['url']) && $this->data['url'] !== $this->feed_url)
-				{
+				} // If we've hit a collision just rerun it with caching disabled
+				elseif ( isset( $this->data['url'] ) && $this->data['url'] !== $this->feed_url ) {
-					$cache = false;
+					$cache      = false;
 					$this->data = array();
-				}
-				// If we've got a non feed_url stored (if the page isn't actually a feed, or is a redirect) use that URL.
-				elseif (isset($this->data['feed_url']))
-				{
+				} // If we've got a non feed_url stored (if the page isn't actually a feed, or is a redirect) use that URL.
+				elseif ( isset( $this->data['feed_url'] ) ) {
 					// If the autodiscovery cache is still valid use it.
-					if ($cache->mtime() + $this->autodiscovery_cache_duration > time())
-					{
+					if ( $cache->mtime() + $this->autodiscovery_cache_duration > time() ) {
 						// Do not need to do feed autodiscovery yet.
-						if ($this->data['feed_url'] !== $this->data['url'])
-						{
+						if ( $this->data['feed_url'] !== $this->data['url'] ) {
-							$this->set_feed_url($this->data['feed_url']);
+							$this->set_feed_url( $this->data['feed_url'] );
+
 							return $this->init();
 						}
 
 						$cache->unlink();
 						$this->data = array();
 					}
-				}
-				// Check if the cache has been updated
-				elseif ($cache->mtime() + $this->cache_duration < time())
-				{
+				} // Check if the cache has been updated
+				elseif ( $cache->mtime() + $this->cache_duration < time() ) {
 					// If we have last-modified and/or etag set
-					if (isset($this->data['headers']['last-modified']) || isset($this->data['headers']['etag']))
-					{
+					if ( isset( $this->data['headers']['last-modified'] ) || isset( $this->data['headers']['etag'] ) ) {
 						$headers = array(
 							'Accept' => 'application/atom+xml, application/rss+xml, application/rdf+xml;q=0.9, application/xml;q=0.8, text/xml;q=0.8, text/html;q=0.7, unknown/unknown;q=0.1, application/unknown;q=0.1, */*;q=0.1',
 						);
-						if (isset($this->data['headers']['last-modified']))
-						{
+						if ( isset( $this->data['headers']['last-modified'] ) ) {
 							$headers['if-modified-since'] = $this->data['headers']['last-modified'];
 						}
-						if (isset($this->data['headers']['etag']))
-						{
+						if ( isset( $this->data['headers']['etag'] ) ) {
 							$headers['if-none-match'] = $this->data['headers']['etag'];
 						}
 
-						$file = $this->registry->create('File', array($this->feed_url, $this->timeout/10, 5, $headers, $this->useragent, $this->force_fsockopen));
+						$file = $this->registry->create( 'File', array(
+							$this->feed_url,
+							$this->timeout / 10,
+							5,
+							$headers,
+							$this->useragent,
+							$this->force_fsockopen
+						) );
 
-						if ($file->success)
-						{
-							if ($file->status_code === 304)
-							{
+						if ( $file->success ) {
+							if ( $file->status_code === 304 ) {
 								$cache->touch();
+
 								return true;
 							}
-						}
-						else
-						{
+						} else {
-							unset($file);
+							unset( $file );
 						}
 					}
-				}
-				// If the cache is still valid, just return true
-				else
-				{
+				} // If the cache is still valid, just return true
+				else {
 					$this->raw_data = false;
+
 					return true;
 				}
-			}
-			// If the cache is empty, delete it
-			else
-			{
+			} // If the cache is empty, delete it
+			else {
 				$cache->unlink();
 				$this->data = array();
 			}
 		}
 		// If we don't already have the file (it'll only exist if we've opened it to check if the cache has been modified), open it.
-		if (!isset($file))
-		{
-			if ($this->file instanceof SimplePie_File && $this->file->url === $this->feed_url)
-			{
+		if ( ! isset( $file ) ) {
+			if ( $this->file instanceof SimplePie_File && $this->file->url === $this->feed_url ) {
 				$file =& $this->file;
-			}
-			else
-			{
+			} else {
 				$headers = array(
 					'Accept' => 'application/atom+xml, application/rss+xml, application/rdf+xml;q=0.9, application/xml;q=0.8, text/xml;q=0.8, text/html;q=0.7, unknown/unknown;q=0.1, application/unknown;q=0.1, */*;q=0.1',
 				);
-				$file = $this->registry->create('File', array($this->feed_url, $this->timeout, 5, $headers, $this->useragent, $this->force_fsockopen));
+				$file    = $this->registry->create( 'File', array(
+					$this->feed_url,
+					$this->timeout,
+					5,
+					$headers,
+					$this->useragent,
+					$this->force_fsockopen
+				) );
 			}
 		}
 		// If the file connection has an error, set SimplePie::error to that and quit
-		if (!$file->success && !($file->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($file->status_code === 200 || $file->status_code > 206 && $file->status_code < 300)))
-		{
+		if ( ! $file->success && ! ( $file->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ( $file->status_code === 200 || $file->status_code > 206 && $file->status_code < 300 ) ) ) {
 			$this->error = $file->error;
+
-			return !empty($this->data);
+			return ! empty( $this->data );
 		}
 
-		if (!$this->force_feed)
-		{
+		if ( ! $this->force_feed ) {
 			// Check if the supplied URL is a feed, if it isn't, look for it.
-			$locate = $this->registry->create('Locator', array(&$file, $this->timeout, $this->useragent, $this->max_checked_feeds));
+			$locate = $this->registry->create( 'Locator', array(
+				&$file,
+				$this->timeout,
+				$this->useragent,
+				$this->max_checked_feeds
+			) );
 
-			if (!$locate->is_feed($file))
-			{
+			if ( ! $locate->is_feed( $file ) ) {
 				// We need to unset this so that if SimplePie::set_file() has been called that object is untouched
-				unset($file);
+				unset( $file );
-				try
-				{
-					if (!($file = $locate->find($this->autodiscovery, $this->all_discovered_feeds)))
-					{
+				try {
+					if ( ! ( $file = $locate->find( $this->autodiscovery, $this->all_discovered_feeds ) ) ) {
 						$this->error = "A feed could not be found at $this->feed_url. A feed with an invalid mime type may fall victim to this error, or " . SIMPLEPIE_NAME . " was unable to auto-discover it.. Use force_feed() if you are certain this URL is a real feed.";
-						$this->registry->call('Misc', 'error', array($this->error, E_USER_NOTICE, __FILE__, __LINE__));
+						$this->registry->call( 'Misc', 'error', array(
+							$this->error,
+							E_USER_NOTICE,
+							__FILE__,
+							__LINE__
+						) );
+
 						return false;
 					}
-				}
-				catch (SimplePie_Exception $e)
-				{
+				} catch ( SimplePie_Exception $e ) {
 					// This is usually because DOMDocument doesn't exist
 					$this->error = $e->getMessage();
-					$this->registry->call('Misc', 'error', array($this->error, E_USER_NOTICE, $e->getFile(), $e->getLine()));
+					$this->registry->call( 'Misc', 'error', array(
+						$this->error,
+						E_USER_NOTICE,
+						$e->getFile(),
+						$e->getLine()
+					) );
+
 					return false;
 				}
-				if ($cache)
-				{
-					$this->data = array('url' => $this->feed_url, 'feed_url' => $file->url, 'build' => SIMPLEPIE_BUILD);
-					if (!$cache->save($this))
-					{
+				if ( $cache ) {
+					$this->data = array(
+						'url'      => $this->feed_url,
+						'feed_url' => $file->url,
+						'build'    => SIMPLEPIE_BUILD
+					);
+					if ( ! $cache->save( $this ) ) {
-						trigger_error("$this->cache_location is not writeable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.", E_USER_WARNING);
+						trigger_error( "$this->cache_location is not writeable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.", E_USER_WARNING );
 					}
-					$cache = $this->registry->call('Cache', 'get_handler', array($this->cache_location, call_user_func($this->cache_name_function, $file->url), 'spc'));
+					$cache = $this->registry->call( 'Cache', 'get_handler', array(
+						$this->cache_location,
+						call_user_func( $this->cache_name_function, $file->url ),
+						'spc'
+					) );
 				}
 				$this->feed_url = $file->url;
 			}
@@ -1580,10 +1165,10 @@
 		$this->raw_data = $file->body;
 
 		$headers = $file->headers;
-		$sniffer = $this->registry->create('Content_Type_Sniffer', array(&$file));
+		$sniffer = $this->registry->create( 'Content_Type_Sniffer', array( &$file ) );
 		$sniffed = $sniffer->get_type();
 
-		return array($headers, $sniffed);
+		return array( $headers, $sniffed );
 	}
 
 	/**
@@ -1591,8 +1176,7 @@
 	 *
 	 * @return string|array Error message, or array of messages for multifeeds
 	 */
-	public function error()
-	{
+	public function error() {
 		return $this->error;
 	}
 
@@ -1604,8 +1188,7 @@
 	 *
 	 * @return string|boolean Raw XML data, false if the cache is used
 	 */
-	public function get_raw_data()
-	{
+	public function get_raw_data() {
 		return $this->raw_data;
 	}
 
@@ -1615,8 +1198,7 @@
 	 * @since Preview Release
 	 * @return string
 	 */
-	public function get_encoding()
-	{
+	public function get_encoding() {
 		return $this->sanitize->output_encoding;
 	}
 
@@ -1639,20 +1221,15 @@
 	 *
 	 * @param string $mime MIME type to serve the page as
 	 */
-	public function handle_content_type($mime = 'text/html')
-	{
-		if (!headers_sent())
-		{
+	public function handle_content_type( $mime = 'text/html' ) {
+		if ( ! headers_sent() ) {
 			$header = "Content-type: $mime;";
-			if ($this->get_encoding())
-			{
+			if ( $this->get_encoding() ) {
 				$header .= ' charset=' . $this->get_encoding();
-			}
-			else
-			{
+			} else {
 				$header .= ' charset=UTF-8';
 			}
-			header($header);
+			header( $header );
 		}
 	}
 
@@ -1682,49 +1259,36 @@
 	 * @see SIMPLEPIE_TYPE_ALL Any known/supported feed type.
 	 * @return int SIMPLEPIE_TYPE_* constant
 	 */
-	public function get_type()
-	{
-		if (!isset($this->data['type']))
-		{
+	public function get_type() {
+		if ( ! isset( $this->data['type'] ) ) {
 			$this->data['type'] = SIMPLEPIE_TYPE_ALL;
-			if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed']))
-			{
+			if ( isset( $this->data['child'][ SIMPLEPIE_NAMESPACE_ATOM_10 ]['feed'] ) ) {
 				$this->data['type'] &= SIMPLEPIE_TYPE_ATOM_10;
-			}
-			elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed']))
-			{
+			} elseif ( isset( $this->data['child'][ SIMPLEPIE_NAMESPACE_ATOM_03 ]['feed'] ) ) {
 				$this->data['type'] &= SIMPLEPIE_TYPE_ATOM_03;
-			}
-			elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF']))
-			{
+			} elseif ( isset( $this->data['child'][ SIMPLEPIE_NAMESPACE_RDF ]['RDF'] ) ) {
-				if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_10]['channel'])
+				if ( isset( $this->data['child'][ SIMPLEPIE_NAMESPACE_RDF ]['RDF'][0]['child'][ SIMPLEPIE_NAMESPACE_RSS_10 ]['channel'] )
-				|| isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_10]['image'])
+				     || isset( $this->data['child'][ SIMPLEPIE_NAMESPACE_RDF ]['RDF'][0]['child'][ SIMPLEPIE_NAMESPACE_RSS_10 ]['image'] )
-				|| isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_10]['item'])
+				     || isset( $this->data['child'][ SIMPLEPIE_NAMESPACE_RDF ]['RDF'][0]['child'][ SIMPLEPIE_NAMESPACE_RSS_10 ]['item'] )
-				|| isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_10]['textinput']))
-				{
+				     || isset( $this->data['child'][ SIMPLEPIE_NAMESPACE_RDF ]['RDF'][0]['child'][ SIMPLEPIE_NAMESPACE_RSS_10 ]['textinput'] )
+				) {
 					$this->data['type'] &= SIMPLEPIE_TYPE_RSS_10;
 				}
-				if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_090]['channel'])
+				if ( isset( $this->data['child'][ SIMPLEPIE_NAMESPACE_RDF ]['RDF'][0]['child'][ SIMPLEPIE_NAMESPACE_RSS_090 ]['channel'] )
-				|| isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_090]['image'])
+				     || isset( $this->data['child'][ SIMPLEPIE_NAMESPACE_RDF ]['RDF'][0]['child'][ SIMPLEPIE_NAMESPACE_RSS_090 ]['image'] )
-				|| isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_090]['item'])
+				     || isset( $this->data['child'][ SIMPLEPIE_NAMESPACE_RDF ]['RDF'][0]['child'][ SIMPLEPIE_NAMESPACE_RSS_090 ]['item'] )
-				|| isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_090]['textinput']))
-				{
+				     || isset( $this->data['child'][ SIMPLEPIE_NAMESPACE_RDF ]['RDF'][0]['child'][ SIMPLEPIE_NAMESPACE_RSS_090 ]['textinput'] )
+				) {
 					$this->data['type'] &= SIMPLEPIE_TYPE_RSS_090;
 				}
-			}
-			elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss']))
-			{
+			} elseif ( isset( $this->data['child'][ SIMPLEPIE_NAMESPACE_RSS_20 ]['rss'] ) ) {
 				$this->data['type'] &= SIMPLEPIE_TYPE_RSS_ALL;
-				if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['attribs']['']['version']))
-				{
-					switch (trim($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['attribs']['']['version']))
-					{
+				if ( isset( $this->data['child'][ SIMPLEPIE_NAMESPACE_RSS_20 ]['rss'][0]['attribs']['']['version'] ) ) {
+					switch ( trim( $this->data['child'][ SIMPLEPIE_NAMESPACE_RSS_20 ]['rss'][0]['attribs']['']['version'] ) ) {
 						case '0.91':
 							$this->data['type'] &= SIMPLEPIE_TYPE_RSS_091;
-							if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_20]['skiphours']['hour'][0]['data']))
-							{
-								switch (trim($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_20]['skiphours']['hour'][0]['data']))
-								{
+							if ( isset( $this->data['child'][ SIMPLEPIE_NAMESPACE_RSS_20 ]['rss'][0]['child'][ SIMPLEPIE_NAMESPACE_RSS_20 ]['skiphours']['hour'][0]['data'] ) ) {
+								switch ( trim( $this->data['child'][ SIMPLEPIE_NAMESPACE_RSS_20 ]['rss'][0]['child'][ SIMPLEPIE_NAMESPACE_RSS_20 ]['skiphours']['hour'][0]['data'] ) ) {
 									case '0':
 										$this->data['type'] &= SIMPLEPIE_TYPE_RSS_091_NETSCAPE;
 										break;
@@ -1753,12 +1317,11 @@
 							break;
 					}
 				}
-			}
-			else
-			{
+			} else {
 				$this->data['type'] = SIMPLEPIE_TYPE_NONE;
 			}
 		}
+
 		return $this->data['type'];
 	}
 
@@ -1774,14 +1337,10 @@
 	 * @todo Also, |atom:link|@rel=self
 	 * @return string|null
 	 */
-	public function subscribe_url()
-	{
-		if ($this->feed_url !== null)
-		{
+	public function subscribe_url() {
+		if ( $this->feed_url !== null ) {
-			return $this->sanitize($this->feed_url, SIMPLEPIE_CONSTRUCT_IRI);
+			return $this->sanitize( $this->feed_url, SIMPLEPIE_CONSTRUCT_IRI );
-		}
-		else
-		{
+		} else {
 			return null;
 		}
 	}
@@ -1813,41 +1372,35 @@
 	 *
 	 * @since 1.0
 	 * @see http://simplepie.org/wiki/faq/supported_xml_namespaces
+	 *
 	 * @param string $namespace The URL of the XML namespace of the elements you're trying to access
 	 * @param string $tag Tag name
+	 *
 	 * @return array
 	 */
-	public function get_feed_tags($namespace, $tag)
-	{
+	public function get_feed_tags( $namespace, $tag ) {
 		$type = $this->get_type();
-		if ($type & SIMPLEPIE_TYPE_ATOM_10)
-		{
-			if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]['child'][$namespace][$tag]))
-			{
+		if ( $type & SIMPLEPIE_TYPE_ATOM_10 ) {
+			if ( isset( $this->data['child'][ SIMPLEPIE_NAMESPACE_ATOM_10 ]['feed'][0]['child'][ $namespace ][ $tag ] ) ) {
-				return $this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]['child'][$namespace][$tag];
+				return $this->data['child'][ SIMPLEPIE_NAMESPACE_ATOM_10 ]['feed'][0]['child'][ $namespace ][ $tag ];
 			}
 		}
-		if ($type & SIMPLEPIE_TYPE_ATOM_03)
-		{
-			if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]['child'][$namespace][$tag]))
-			{
+		if ( $type & SIMPLEPIE_TYPE_ATOM_03 ) {
+			if ( isset( $this->data['child'][ SIMPLEPIE_NAMESPACE_ATOM_03 ]['feed'][0]['child'][ $namespace ][ $tag ] ) ) {
-				return $this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]['child'][$namespace][$tag];
+				return $this->data['child'][ SIMPLEPIE_NAMESPACE_ATOM_03 ]['feed'][0]['child'][ $namespace ][ $tag ];
 			}
 		}
-		if ($type & SIMPLEPIE_TYPE_RSS_RDF)
-		{
-			if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['child'][$namespace][$tag]))
-			{
+		if ( $type & SIMPLEPIE_TYPE_RSS_RDF ) {
+			if ( isset( $this->data['child'][ SIMPLEPIE_NAMESPACE_RDF ]['RDF'][0]['child'][ $namespace ][ $tag ] ) ) {
-				return $this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['child'][$namespace][$tag];
+				return $this->data['child'][ SIMPLEPIE_NAMESPACE_RDF ]['RDF'][0]['child'][ $namespace ][ $tag ];
 			}
 		}
-		if ($type & SIMPLEPIE_TYPE_RSS_SYNDICATION)
-		{
-			if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][$namespace][$tag]))
-			{
+		if ( $type & SIMPLEPIE_TYPE_RSS_SYNDICATION ) {
+			if ( isset( $this->data['child'][ SIMPLEPIE_NAMESPACE_RSS_20 ]['rss'][0]['child'][ $namespace ][ $tag ] ) ) {
-				return $this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][$namespace][$tag];
+				return $this->data['child'][ SIMPLEPIE_NAMESPACE_RSS_20 ]['rss'][0]['child'][ $namespace ][ $tag ];
 			}
 		}
+
 		return null;
 	}
 
@@ -1861,50 +1414,41 @@
 	 *
 	 * @since 1.0
 	 * @see http://simplepie.org/wiki/faq/supported_xml_namespaces
+	 *
 	 * @param string $namespace The URL of the XML namespace of the elements you're trying to access
 	 * @param string $tag Tag name
+	 *
 	 * @return array
 	 */
-	public function get_channel_tags($namespace, $tag)
-	{
+	public function get_channel_tags( $namespace, $tag ) {
 		$type = $this->get_type();
-		if ($type & SIMPLEPIE_TYPE_ATOM_ALL)
-		{
-			if ($return = $this->get_feed_tags($namespace, $tag))
-			{
+		if ( $type & SIMPLEPIE_TYPE_ATOM_ALL ) {
+			if ( $return = $this->get_feed_tags( $namespace, $tag ) ) {
 				return $return;
 			}
 		}
-		if ($type & SIMPLEPIE_TYPE_RSS_10)
-		{
-			if ($channel = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'channel'))
-			{
-				if (isset($channel[0]['child'][$namespace][$tag]))
-				{
+		if ( $type & SIMPLEPIE_TYPE_RSS_10 ) {
+			if ( $channel = $this->get_feed_tags( SIMPLEPIE_NAMESPACE_RSS_10, 'channel' ) ) {
+				if ( isset( $channel[0]['child'][ $namespace ][ $tag ] ) ) {
-					return $channel[0]['child'][$namespace][$tag];
+					return $channel[0]['child'][ $namespace ][ $tag ];
 				}
 			}
 		}
-		if ($type & SIMPLEPIE_TYPE_RSS_090)
-		{
-			if ($channel = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'channel'))
-			{
-				if (isset($channel[0]['child'][$namespace][$tag]))
-				{
+		if ( $type & SIMPLEPIE_TYPE_RSS_090 ) {
+			if ( $channel = $this->get_feed_tags( SIMPLEPIE_NAMESPACE_RSS_090, 'channel' ) ) {
+				if ( isset( $channel[0]['child'][ $namespace ][ $tag ] ) ) {
-					return $channel[0]['child'][$namespace][$tag];
+					return $channel[0]['child'][ $namespace ][ $tag ];
 				}
 			}
 		}
-		if ($type & SIMPLEPIE_TYPE_RSS_SYNDICATION)
-		{
-			if ($channel = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'channel'))
-			{
-				if (isset($channel[0]['child'][$namespace][$tag]))
-				{
+		if ( $type & SIMPLEPIE_TYPE_RSS_SYNDICATION ) {
+			if ( $channel = $this->get_feed_tags( SIMPLEPIE_NAMESPACE_RSS_20, 'channel' ) ) {
+				if ( isset( $channel[0]['child'][ $namespace ][ $tag ] ) ) {
-					return $channel[0]['child'][$namespace][$tag];
+					return $channel[0]['child'][ $namespace ][ $tag ];
 				}
 			}
 		}
+
 		return null;
 	}
 
@@ -1918,43 +1462,36 @@
 	 *
 	 * @since 1.0
 	 * @see http://simplepie.org/wiki/faq/supported_xml_namespaces
+	 *
 	 * @param string $namespace The URL of the XML namespace of the elements you're trying to access
 	 * @param string $tag Tag name
+	 *
 	 * @return array
 	 */
-	public function get_image_tags($namespace, $tag)
-	{
+	public function get_image_tags( $namespace, $tag ) {
 		$type = $this->get_type();
-		if ($type & SIMPLEPIE_TYPE_RSS_10)
-		{
-			if ($image = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'image'))
-			{
-				if (isset($image[0]['child'][$namespace][$tag]))
-				{
+		if ( $type & SIMPLEPIE_TYPE_RSS_10 ) {
+			if ( $image = $this->get_feed_tags( SIMPLEPIE_NAMESPACE_RSS_10, 'image' ) ) {
+				if ( isset( $image[0]['child'][ $namespace ][ $tag ] ) ) {
-					return $image[0]['child'][$namespace][$tag];
+					return $image[0]['child'][ $namespace ][ $tag ];
 				}
 			}
 		}
-		if ($type & SIMPLEPIE_TYPE_RSS_090)
-		{
-			if ($image = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'image'))
-			{
-				if (isset($image[0]['child'][$namespace][$tag]))
-				{
+		if ( $type & SIMPLEPIE_TYPE_RSS_090 ) {
+			if ( $image = $this->get_feed_tags( SIMPLEPIE_NAMESPACE_RSS_090, 'image' ) ) {
+				if ( isset( $image[0]['child'][ $namespace ][ $tag ] ) ) {
-					return $image[0]['child'][$namespace][$tag];
+					return $image[0]['child'][ $namespace ][ $tag ];
 				}
 			}
 		}
-		if ($type & SIMPLEPIE_TYPE_RSS_SYNDICATION)
-		{
-			if ($image = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'image'))
-			{
-				if (isset($image[0]['child'][$namespace][$tag]))
-				{
+		if ( $type & SIMPLEPIE_TYPE_RSS_SYNDICATION ) {
+			if ( $image = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_RSS_20, 'image' ) ) {
+				if ( isset( $image[0]['child'][ $namespace ][ $tag ] ) ) {
-					return $image[0]['child'][$namespace][$tag];
+					return $image[0]['child'][ $namespace ][ $tag ];
 				}
 			}
 		}
+
 		return null;
 	}
 
@@ -1968,20 +1505,15 @@
 	 * @see subscribe_url
 	 *
 	 * @param array $element
+	 *
 	 * @return string
 	 */
-	public function get_base($element = array())
-	{
-		if (!($this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION) && !empty($element['xml_base_explicit']) && isset($element['xml_base']))
-		{
+	public function get_base( $element = array() ) {
+		if ( ! ( $this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION ) && ! empty( $element['xml_base_explicit'] ) && isset( $element['xml_base'] ) ) {
 			return $element['xml_base'];
-		}
-		elseif ($this->get_link() !== null)
-		{
+		} elseif ( $this->get_link() !== null ) {
 			return $this->get_link();
-		}
-		else
-		{
+		} else {
 			return $this->subscribe_url();
 		}
 	}
@@ -1991,14 +1523,15 @@
 	 *
 	 * @access private
 	 * @see SimplePie_Sanitize::sanitize()
+	 *
 	 * @param string $data Data to sanitize
 	 * @param int $type One of the SIMPLEPIE_CONSTRUCT_* constants
 	 * @param string $base Base URL to resolve URLs against
+	 *
 	 * @return string Sanitized data
 	 */
-	public function sanitize($data, $type, $base = '')
-	{
+	public function sanitize( $data, $type, $base = '' ) {
-		return $this->sanitize->sanitize($data, $type, $base);
+		return $this->sanitize->sanitize( $data, $type, $base );
 	}
 
 	/**
@@ -2009,38 +1542,22 @@
 	 * @since 1.0 (previously called `get_feed_title` since 0.8)
 	 * @return string|null
 	 */
-	public function get_title()
-	{
-		if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'title'))
-		{
+	public function get_title() {
+		if ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_ATOM_10, 'title' ) ) {
-			return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
+			return $this->sanitize( $return[0]['data'], $this->registry->call( 'Misc', 'atom_10_construct_type', array( $return[0]['attribs'] ) ), $this->get_base( $return[0] ) );
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'title'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_ATOM_03, 'title' ) ) {
-			return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
+			return $this->sanitize( $return[0]['data'], $this->registry->call( 'Misc', 'atom_03_construct_type', array( $return[0]['attribs'] ) ), $this->get_base( $return[0] ) );
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_RSS_10, 'title' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base( $return[0] ) );
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_RSS_090, 'title' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base( $return[0] ) );
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_RSS_20, 'title' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base( $return[0] ) );
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_DC_11, 'title' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_DC_10, 'title' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
-		}
-		else
-		{
+		} else {
 			return null;
 		}
 	}
@@ -2049,18 +1566,16 @@
 	 * Get a category for the feed
 	 *
 	 * @since Unknown
+	 *
 	 * @param int $key The category that you want to return.  Remember that arrays begin with 0, not 1
+	 *
 	 * @return SimplePie_Category|null
 	 */
-	public function get_category($key = 0)
-	{
+	public function get_category( $key = 0 ) {
 		$categories = $this->get_categories();
-		if (isset($categories[$key]))
-		{
+		if ( isset( $categories[ $key ] ) ) {
-			return $categories[$key];
+			return $categories[ $key ];
-		}
-		else
-		{
+		} else {
 			return null;
 		}
 	}
@@ -2073,59 +1588,53 @@
 	 * @since Unknown
 	 * @return array|null List of {@see SimplePie_Category} objects
 	 */
-	public function get_categories()
-	{
+	public function get_categories() {
 		$categories = array();
 
-		foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'category') as $category)
-		{
+		foreach ( (array) $this->get_channel_tags( SIMPLEPIE_NAMESPACE_ATOM_10, 'category' ) as $category ) {
-			$term = null;
+			$term   = null;
 			$scheme = null;
-			$label = null;
+			$label  = null;
-			if (isset($category['attribs']['']['term']))
-			{
+			if ( isset( $category['attribs']['']['term'] ) ) {
-				$term = $this->sanitize($category['attribs']['']['term'], SIMPLEPIE_CONSTRUCT_TEXT);
+				$term = $this->sanitize( $category['attribs']['']['term'], SIMPLEPIE_CONSTRUCT_TEXT );
 			}
-			if (isset($category['attribs']['']['scheme']))
-			{
+			if ( isset( $category['attribs']['']['scheme'] ) ) {
-				$scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
+				$scheme = $this->sanitize( $category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT );
 			}
-			if (isset($category['attribs']['']['label']))
-			{
+			if ( isset( $category['attribs']['']['label'] ) ) {
-				$label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT);
+				$label = $this->sanitize( $category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT );
 			}
-			$categories[] = $this->registry->create('Category', array($term, $scheme, $label));
+			$categories[] = $this->registry->create( 'Category', array( $term, $scheme, $label ) );
 		}
-		foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'category') as $category)
-		{
+		foreach ( (array) $this->get_channel_tags( SIMPLEPIE_NAMESPACE_RSS_20, 'category' ) as $category ) {
 			// This is really the label, but keep this as the term also for BC.
 			// Label will also work on retrieving because that falls back to term.
-			$term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+			$term = $this->sanitize( $category['data'], SIMPLEPIE_CONSTRUCT_TEXT );
-			if (isset($category['attribs']['']['domain']))
-			{
+			if ( isset( $category['attribs']['']['domain'] ) ) {
-				$scheme = $this->sanitize($category['attribs']['']['domain'], SIMPLEPIE_CONSTRUCT_TEXT);
+				$scheme = $this->sanitize( $category['attribs']['']['domain'], SIMPLEPIE_CONSTRUCT_TEXT );
-			}
-			else
-			{
+			} else {
 				$scheme = null;
 			}
-			$categories[] = $this->registry->create('Category', array($term, $scheme, null));
+			$categories[] = $this->registry->create( 'Category', array( $term, $scheme, null ) );
 		}
-		foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'subject') as $category)
-		{
-			$categories[] = $this->registry->create('Category', array($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null));
+		foreach ( (array) $this->get_channel_tags( SIMPLEPIE_NAMESPACE_DC_11, 'subject' ) as $category ) {
+			$categories[] = $this->registry->create( 'Category', array(
+				$this->sanitize( $category['data'], SIMPLEPIE_CONSTRUCT_TEXT ),
+				null,
+				null
+			) );
 		}
-		foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'subject') as $category)
-		{
-			$categories[] = $this->registry->create('Category', array($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null));
+		foreach ( (array) $this->get_channel_tags( SIMPLEPIE_NAMESPACE_DC_10, 'subject' ) as $category ) {
+			$categories[] = $this->registry->create( 'Category', array(
+				$this->sanitize( $category['data'], SIMPLEPIE_CONSTRUCT_TEXT ),
+				null,
+				null
+			) );
 		}
 
-		if (!empty($categories))
-		{
+		if ( ! empty( $categories ) ) {
-			return array_unique($categories);
+			return array_unique( $categories );
-		}
-		else
-		{
+		} else {
 			return null;
 		}
 	}
@@ -2134,18 +1643,16 @@
 	 * Get an author for the feed
 	 *
 	 * @since 1.1
+	 *
 	 * @param int $key The author that you want to return.  Remember that arrays begin with 0, not 1
+	 *
 	 * @return SimplePie_Author|null
 	 */
-	public function get_author($key = 0)
-	{
+	public function get_author( $key = 0 ) {
 		$authors = $this->get_authors();
-		if (isset($authors[$key]))
-		{
+		if ( isset( $authors[ $key ] ) ) {
-			return $authors[$key];
+			return $authors[ $key ];
-		}
-		else
-		{
+		} else {
 			return null;
 		}
 	}
@@ -2158,72 +1665,67 @@
 	 * @since 1.1
 	 * @return array|null List of {@see SimplePie_Author} objects
 	 */
-	public function get_authors()
-	{
+	public function get_authors() {
 		$authors = array();
-		foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'author') as $author)
-		{
+		foreach ( (array) $this->get_channel_tags( SIMPLEPIE_NAMESPACE_ATOM_10, 'author' ) as $author ) {
-			$name = null;
+			$name  = null;
-			$uri = null;
+			$uri   = null;
 			$email = null;
-			if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data']))
-			{
+			if ( isset( $author['child'][ SIMPLEPIE_NAMESPACE_ATOM_10 ]['name'][0]['data'] ) ) {
-				$name = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+				$name = $this->sanitize( $author['child'][ SIMPLEPIE_NAMESPACE_ATOM_10 ]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
 			}
-			if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data']))
-			{
+			if ( isset( $author['child'][ SIMPLEPIE_NAMESPACE_ATOM_10 ]['uri'][0]['data'] ) ) {
-				$uri = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]));
+				$uri = $this->sanitize( $author['child'][ SIMPLEPIE_NAMESPACE_ATOM_10 ]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base( $author['child'][ SIMPLEPIE_NAMESPACE_ATOM_10 ]['uri'][0] ) );
 			}
-			if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data']))
-			{
+			if ( isset( $author['child'][ SIMPLEPIE_NAMESPACE_ATOM_10 ]['email'][0]['data'] ) ) {
-				$email = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+				$email = $this->sanitize( $author['child'][ SIMPLEPIE_NAMESPACE_ATOM_10 ]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
 			}
-			if ($name !== null || $email !== null || $uri !== null)
-			{
+			if ( $name !== null || $email !== null || $uri !== null ) {
-				$authors[] = $this->registry->create('Author', array($name, $uri, $email));
+				$authors[] = $this->registry->create( 'Author', array( $name, $uri, $email ) );
 			}
 		}
-		if ($author = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'author'))
-		{
+		if ( $author = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_ATOM_03, 'author' ) ) {
-			$name = null;
+			$name  = null;
-			$url = null;
+			$url   = null;
 			$email = null;
-			if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data']))
-			{
+			if ( isset( $author[0]['child'][ SIMPLEPIE_NAMESPACE_ATOM_03 ]['name'][0]['data'] ) ) {
-				$name = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+				$name = $this->sanitize( $author[0]['child'][ SIMPLEPIE_NAMESPACE_ATOM_03 ]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
 			}
-			if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data']))
-			{
+			if ( isset( $author[0]['child'][ SIMPLEPIE_NAMESPACE_ATOM_03 ]['url'][0]['data'] ) ) {
-				$url = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]));
+				$url = $this->sanitize( $author[0]['child'][ SIMPLEPIE_NAMESPACE_ATOM_03 ]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base( $author[0]['child'][ SIMPLEPIE_NAMESPACE_ATOM_03 ]['url'][0] ) );
 			}
-			if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data']))
-			{
+			if ( isset( $author[0]['child'][ SIMPLEPIE_NAMESPACE_ATOM_03 ]['email'][0]['data'] ) ) {
-				$email = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+				$email = $this->sanitize( $author[0]['child'][ SIMPLEPIE_NAMESPACE_ATOM_03 ]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
 			}
-			if ($name !== null || $email !== null || $url !== null)
-			{
+			if ( $name !== null || $email !== null || $url !== null ) {
-				$authors[] = $this->registry->create('Author', array($name, $url, $email));
+				$authors[] = $this->registry->create( 'Author', array( $name, $url, $email ) );
 			}
 		}
-		foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'creator') as $author)
-		{
-			$authors[] = $this->registry->create('Author', array($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null));
+		foreach ( (array) $this->get_channel_tags( SIMPLEPIE_NAMESPACE_DC_11, 'creator' ) as $author ) {
+			$authors[] = $this->registry->create( 'Author', array(
+				$this->sanitize( $author['data'], SIMPLEPIE_CONSTRUCT_TEXT ),
+				null,
+				null
+			) );
 		}
-		foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'creator') as $author)
-		{
-			$authors[] = $this->registry->create('Author', array($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null));
+		foreach ( (array) $this->get_channel_tags( SIMPLEPIE_NAMESPACE_DC_10, 'creator' ) as $author ) {
+			$authors[] = $this->registry->create( 'Author', array(
+				$this->sanitize( $author['data'], SIMPLEPIE_CONSTRUCT_TEXT ),
+				null,
+				null
+			) );
 		}
-		foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'author') as $author)
-		{
-			$authors[] = $this->registry->create('Author', array($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null));
+		foreach ( (array) $this->get_channel_tags( SIMPLEPIE_NAMESPACE_ITUNES, 'author' ) as $author ) {
+			$authors[] = $this->registry->create( 'Author', array(
+				$this->sanitize( $author['data'], SIMPLEPIE_CONSTRUCT_TEXT ),
+				null,
+				null
+			) );
 		}
 
-		if (!empty($authors))
-		{
+		if ( ! empty( $authors ) ) {
-			return array_unique($authors);
+			return array_unique( $authors );
-		}
-		else
-		{
+		} else {
 			return null;
 		}
 	}
@@ -2232,18 +1734,16 @@
 	 * Get a contributor for the feed
 	 *
 	 * @since 1.1
+	 *
 	 * @param int $key The contrbutor that you want to return.  Remember that arrays begin with 0, not 1
+	 *
 	 * @return SimplePie_Author|null
 	 */
-	public function get_contributor($key = 0)
-	{
+	public function get_contributor( $key = 0 ) {
 		$contributors = $this->get_contributors();
-		if (isset($contributors[$key]))
-		{
+		if ( isset( $contributors[ $key ] ) ) {
-			return $contributors[$key];
+			return $contributors[ $key ];
-		}
-		else
-		{
+		} else {
 			return null;
 		}
 	}
@@ -2256,60 +1756,46 @@
 	 * @since 1.1
 	 * @return array|null List of {@see SimplePie_Author} objects
 	 */
-	public function get_contributors()
-	{
+	public function get_contributors() {
 		$contributors = array();
-		foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'contributor') as $contributor)
-		{
+		foreach ( (array) $this->get_channel_tags( SIMPLEPIE_NAMESPACE_ATOM_10, 'contributor' ) as $contributor ) {
-			$name = null;
+			$name  = null;
-			$uri = null;
+			$uri   = null;
 			$email = null;
-			if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data']))
-			{
+			if ( isset( $contributor['child'][ SIMPLEPIE_NAMESPACE_ATOM_10 ]['name'][0]['data'] ) ) {
-				$name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+				$name = $this->sanitize( $contributor['child'][ SIMPLEPIE_NAMESPACE_ATOM_10 ]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
 			}
-			if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data']))
-			{
+			if ( isset( $contributor['child'][ SIMPLEPIE_NAMESPACE_ATOM_10 ]['uri'][0]['data'] ) ) {
-				$uri = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]));
+				$uri = $this->sanitize( $contributor['child'][ SIMPLEPIE_NAMESPACE_ATOM_10 ]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base( $contributor['child'][ SIMPLEPIE_NAMESPACE_ATOM_10 ]['uri'][0] ) );
 			}
-			if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data']))
-			{
+			if ( isset( $contributor['child'][ SIMPLEPIE_NAMESPACE_ATOM_10 ]['email'][0]['data'] ) ) {
-				$email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+				$email = $this->sanitize( $contributor['child'][ SIMPLEPIE_NAMESPACE_ATOM_10 ]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
 			}
-			if ($name !== null || $email !== null || $uri !== null)
-			{
+			if ( $name !== null || $email !== null || $uri !== null ) {
-				$contributors[] = $this->registry->create('Author', array($name, $uri, $email));
+				$contributors[] = $this->registry->create( 'Author', array( $name, $uri, $email ) );
 			}
 		}
-		foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'contributor') as $contributor)
-		{
+		foreach ( (array) $this->get_channel_tags( SIMPLEPIE_NAMESPACE_ATOM_03, 'contributor' ) as $contributor ) {
-			$name = null;
+			$name  = null;
-			$url = null;
+			$url   = null;
 			$email = null;
-			if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data']))
-			{
+			if ( isset( $contributor['child'][ SIMPLEPIE_NAMESPACE_ATOM_03 ]['name'][0]['data'] ) ) {
-				$name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+				$name = $this->sanitize( $contributor['child'][ SIMPLEPIE_NAMESPACE_ATOM_03 ]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
 			}
-			if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data']))
-			{
+			if ( isset( $contributor['child'][ SIMPLEPIE_NAMESPACE_ATOM_03 ]['url'][0]['data'] ) ) {
-				$url = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]));
+				$url = $this->sanitize( $contributor['child'][ SIMPLEPIE_NAMESPACE_ATOM_03 ]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base( $contributor['child'][ SIMPLEPIE_NAMESPACE_ATOM_03 ]['url'][0] ) );
 			}
-			if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data']))
-			{
+			if ( isset( $contributor['child'][ SIMPLEPIE_NAMESPACE_ATOM_03 ]['email'][0]['data'] ) ) {
-				$email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+				$email = $this->sanitize( $contributor['child'][ SIMPLEPIE_NAMESPACE_ATOM_03 ]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
 			}
-			if ($name !== null || $email !== null || $url !== null)
-			{
+			if ( $name !== null || $email !== null || $url !== null ) {
-				$contributors[] = $this->registry->create('Author', array($name, $url, $email));
+				$contributors[] = $this->registry->create( 'Author', array( $name, $url, $email ) );
 			}
 		}
 
-		if (!empty($contributors))
-		{
+		if ( ! empty( $contributors ) ) {
-			return array_unique($contributors);
+			return array_unique( $contributors );
-		}
-		else
-		{
+		} else {
 			return null;
 		}
 	}
@@ -2318,19 +1804,17 @@
 	 * Get a single link for the feed
 	 *
 	 * @since 1.0 (previously called `get_feed_link` since Preview Release, `get_feed_permalink()` since 0.8)
+	 *
 	 * @param int $key The link that you want to return.  Remember that arrays begin with 0, not 1
 	 * @param string $rel The relationship of the link to return
+	 *
 	 * @return string|null Link URL
 	 */
-	public function get_link($key = 0, $rel = 'alternate')
-	{
+	public function get_link( $key = 0, $rel = 'alternate' ) {
-		$links = $this->get_links($rel);
+		$links = $this->get_links( $rel );
-		if (isset($links[$key]))
-		{
+		if ( isset( $links[ $key ] ) ) {
-			return $links[$key];
+			return $links[ $key ];
-		}
-		else
-		{
+		} else {
 			return null;
 		}
 	}
@@ -2346,9 +1830,8 @@
 	 * @internal Added for parity between the parent-level and the item/entry-level.
 	 * @return string|null Link URL
 	 */
-	public function get_permalink()
-	{
+	public function get_permalink() {
-		return $this->get_link(0);
+		return $this->get_link( 0 );
 	}
 
 	/**
@@ -2357,85 +1840,65 @@
 	 * Uses `<atom:link>` or `<link>`
 	 *
 	 * @since Beta 2
+	 *
 	 * @param string $rel The relationship of links to return
+	 *
 	 * @return array|null Links found for the feed (strings)
 	 */
-	public function get_links($rel = 'alternate')
-	{
-		if (!isset($this->data['links']))
-		{
+	public function get_links( $rel = 'alternate' ) {
+		if ( ! isset( $this->data['links'] ) ) {
 			$this->data['links'] = array();
-			if ($links = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'link'))
-			{
-				foreach ($links as $link)
-				{
-					if (isset($link['attribs']['']['href']))
-					{
+			if ( $links = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_ATOM_10, 'link' ) ) {
+				foreach ( $links as $link ) {
+					if ( isset( $link['attribs']['']['href'] ) ) {
-						$link_rel = (isset($link['attribs']['']['rel'])) ? $link['attribs']['']['rel'] : 'alternate';
+						$link_rel                           = ( isset( $link['attribs']['']['rel'] ) ) ? $link['attribs']['']['rel'] : 'alternate';
-						$this->data['links'][$link_rel][] = $this->sanitize($link['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($link));
+						$this->data['links'][ $link_rel ][] = $this->sanitize( $link['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base( $link ) );
 					}
 				}
 			}
-			if ($links = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'link'))
-			{
-				foreach ($links as $link)
-				{
-					if (isset($link['attribs']['']['href']))
-					{
+			if ( $links = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_ATOM_03, 'link' ) ) {
+				foreach ( $links as $link ) {
+					if ( isset( $link['attribs']['']['href'] ) ) {
-						$link_rel = (isset($link['attribs']['']['rel'])) ? $link['attribs']['']['rel'] : 'alternate';
+						$link_rel                           = ( isset( $link['attribs']['']['rel'] ) ) ? $link['attribs']['']['rel'] : 'alternate';
-						$this->data['links'][$link_rel][] = $this->sanitize($link['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($link));
+						$this->data['links'][ $link_rel ][] = $this->sanitize( $link['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base( $link ) );
 
 					}
 				}
 			}
-			if ($links = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'link'))
-			{
+			if ( $links = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_RSS_10, 'link' ) ) {
-				$this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0]));
+				$this->data['links']['alternate'][] = $this->sanitize( $links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base( $links[0] ) );
 			}
-			if ($links = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'link'))
-			{
+			if ( $links = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_RSS_090, 'link' ) ) {
-				$this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0]));
+				$this->data['links']['alternate'][] = $this->sanitize( $links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base( $links[0] ) );
 			}
-			if ($links = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'link'))
-			{
+			if ( $links = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_RSS_20, 'link' ) ) {
-				$this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0]));
+				$this->data['links']['alternate'][] = $this->sanitize( $links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base( $links[0] ) );
 			}
 
-			$keys = array_keys($this->data['links']);
+			$keys = array_keys( $this->data['links'] );
-			foreach ($keys as $key)
-			{
-				if ($this->registry->call('Misc', 'is_isegment_nz_nc', array($key)))
-				{
-					if (isset($this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]))
-					{
+			foreach ( $keys as $key ) {
+				if ( $this->registry->call( 'Misc', 'is_isegment_nz_nc', array( $key ) ) ) {
+					if ( isset( $this->data['links'][ SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key ] ) ) {
-						$this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] = array_merge($this->data['links'][$key], $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]);
+						$this->data['links'][ SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key ] = array_merge( $this->data['links'][ $key ], $this->data['links'][ SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key ] );
-						$this->data['links'][$key] =& $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key];
+						$this->data['links'][ $key ]                                          =& $this->data['links'][ SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key ];
-					}
-					else
-					{
+					} else {
-						$this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] =& $this->data['links'][$key];
+						$this->data['links'][ SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key ] =& $this->data['links'][ $key ];
 					}
-				}
-				elseif (substr($key, 0, 41) === SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY)
-				{
+				} elseif ( substr( $key, 0, 41 ) === SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY ) {
-					$this->data['links'][substr($key, 41)] =& $this->data['links'][$key];
+					$this->data['links'][ substr( $key, 41 ) ] =& $this->data['links'][ $key ];
 				}
-				$this->data['links'][$key] = array_unique($this->data['links'][$key]);
+				$this->data['links'][ $key ] = array_unique( $this->data['links'][ $key ] );
 			}
 		}
 
-		if (isset($this->data['links'][$rel]))
-		{
+		if ( isset( $this->data['links'][ $rel ] ) ) {
-			return $this->data['links'][$rel];
+			return $this->data['links'][ $rel ];
-		}
-		else
-		{
+		} else {
 			return null;
 		}
 	}
 
-	public function get_all_discovered_feeds()
-	{
+	public function get_all_discovered_feeds() {
 		return $this->all_discovered_feeds;
 	}
 
@@ -2448,46 +1911,26 @@
 	 * @since 1.0 (previously called `get_feed_description()` since 0.8)
 	 * @return string|null
 	 */
-	public function get_description()
-	{
-		if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'subtitle'))
-		{
+	public function get_description() {
+		if ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_ATOM_10, 'subtitle' ) ) {
-			return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
+			return $this->sanitize( $return[0]['data'], $this->registry->call( 'Misc', 'atom_10_construct_type', array( $return[0]['attribs'] ) ), $this->get_base( $return[0] ) );
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'tagline'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_ATOM_03, 'tagline' ) ) {
-			return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
+			return $this->sanitize( $return[0]['data'], $this->registry->call( 'Misc', 'atom_03_construct_type', array( $return[0]['attribs'] ) ), $this->get_base( $return[0] ) );
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'description'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_RSS_10, 'description' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base( $return[0] ) );
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'description'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_RSS_090, 'description' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0]));
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base( $return[0] ) );
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'description'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_RSS_20, 'description' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0]));
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base( $return[0] ) );
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'description'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_DC_11, 'description' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'description'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_DC_10, 'description' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'summary'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_ITUNES, 'summary' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0]));
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base( $return[0] ) );
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'subtitle'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_ITUNES, 'subtitle' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0]));
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base( $return[0] ) );
-		}
-		else
-		{
+		} else {
 			return null;
 		}
 	}
@@ -2500,30 +1943,18 @@
 	 * @since 1.0 (previously called `get_feed_copyright()` since 0.8)
 	 * @return string|null
 	 */
-	public function get_copyright()
-	{
-		if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'rights'))
-		{
+	public function get_copyright() {
+		if ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_ATOM_10, 'rights' ) ) {
-			return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
+			return $this->sanitize( $return[0]['data'], $this->registry->call( 'Misc', 'atom_10_construct_type', array( $return[0]['attribs'] ) ), $this->get_base( $return[0] ) );
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'copyright'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_ATOM_03, 'copyright' ) ) {
-			return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
+			return $this->sanitize( $return[0]['data'], $this->registry->call( 'Misc', 'atom_03_construct_type', array( $return[0]['attribs'] ) ), $this->get_base( $return[0] ) );
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'copyright'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_RSS_20, 'copyright' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'rights'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_DC_11, 'rights' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'rights'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_DC_10, 'rights' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
-		}
-		else
-		{
+		} else {
 			return null;
 		}
 	}
@@ -2536,38 +1967,22 @@
 	 * @since 1.0 (previously called `get_feed_language()` since 0.8)
 	 * @return string|null
 	 */
-	public function get_language()
-	{
-		if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'language'))
-		{
+	public function get_language() {
+		if ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_RSS_20, 'language' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'language'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_DC_11, 'language' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'language'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_DC_10, 'language' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
-		}
-		elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]['xml_lang']))
-		{
+		} elseif ( isset( $this->data['child'][ SIMPLEPIE_NAMESPACE_ATOM_10 ]['feed'][0]['xml_lang'] ) ) {
-			return $this->sanitize($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT);
+			return $this->sanitize( $this->data['child'][ SIMPLEPIE_NAMESPACE_ATOM_10 ]['feed'][0]['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT );
-		}
-		elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]['xml_lang']))
-		{
+		} elseif ( isset( $this->data['child'][ SIMPLEPIE_NAMESPACE_ATOM_03 ]['feed'][0]['xml_lang'] ) ) {
-			return $this->sanitize($this->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT);
+			return $this->sanitize( $this->data['child'][ SIMPLEPIE_NAMESPACE_ATOM_03 ]['feed'][0]['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT );
-		}
-		elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['xml_lang']))
-		{
+		} elseif ( isset( $this->data['child'][ SIMPLEPIE_NAMESPACE_RDF ]['RDF'][0]['xml_lang'] ) ) {
-			return $this->sanitize($this->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT);
+			return $this->sanitize( $this->data['child'][ SIMPLEPIE_NAMESPACE_RDF ]['RDF'][0]['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT );
-		}
-		elseif (isset($this->data['headers']['content-language']))
-		{
+		} elseif ( isset( $this->data['headers']['content-language'] ) ) {
-			return $this->sanitize($this->data['headers']['content-language'], SIMPLEPIE_CONSTRUCT_TEXT);
+			return $this->sanitize( $this->data['headers']['content-language'], SIMPLEPIE_CONSTRUCT_TEXT );
-		}
-		else
-		{
+		} else {
 			return null;
 		}
 	}
@@ -2584,19 +1999,13 @@
 	 * @link http://www.georss.org/ GeoRSS
 	 * @return string|null
 	 */
-	public function get_latitude()
-	{
+	public function get_latitude() {
 
-		if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lat'))
-		{
+		if ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lat' ) ) {
 			return (float) $return[0]['data'];
-		}
-		elseif (($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match))
-		{
+		} elseif ( ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_GEORSS, 'point' ) ) && preg_match( '/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim( $return[0]['data'] ), $match ) ) {
 			return (float) $match[1];
-		}
-		else
-		{
+		} else {
 			return null;
 		}
 	}
@@ -2613,22 +2022,14 @@
 	 * @link http://www.georss.org/ GeoRSS
 	 * @return string|null
 	 */
-	public function get_longitude()
-	{
-		if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'long'))
-		{
+	public function get_longitude() {
+		if ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'long' ) ) {
 			return (float) $return[0]['data'];
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lon'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lon' ) ) {
 			return (float) $return[0]['data'];
-		}
-		elseif (($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match))
-		{
+		} elseif ( ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_GEORSS, 'point' ) ) && preg_match( '/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim( $return[0]['data'] ), $match ) ) {
 			return (float) $match[2];
-		}
-		else
-		{
+		} else {
 			return null;
 		}
 	}
@@ -2642,30 +2043,18 @@
 	 *
 	 * @return string|null
 	 */
-	public function get_image_title()
-	{
-		if ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title'))
-		{
+	public function get_image_title() {
+		if ( $return = $this->get_image_tags( SIMPLEPIE_NAMESPACE_RSS_10, 'title' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
-		}
-		elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title'))
-		{
+		} elseif ( $return = $this->get_image_tags( SIMPLEPIE_NAMESPACE_RSS_090, 'title' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
-		}
-		elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title'))
-		{
+		} elseif ( $return = $this->get_image_tags( SIMPLEPIE_NAMESPACE_RSS_20, 'title' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
-		}
-		elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title'))
-		{
+		} elseif ( $return = $this->get_image_tags( SIMPLEPIE_NAMESPACE_DC_11, 'title' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
-		}
-		elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title'))
-		{
+		} elseif ( $return = $this->get_image_tags( SIMPLEPIE_NAMESPACE_DC_10, 'title' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT );
-		}
-		else
-		{
+		} else {
 			return null;
 		}
 	}
@@ -2681,34 +2070,20 @@
 	 *
 	 * @return string|null
 	 */
-	public function get_image_url()
-	{
-		if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'image'))
-		{
+	public function get_image_url() {
+		if ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_ITUNES, 'image' ) ) {
-			return $this->sanitize($return[0]['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI);
+			return $this->sanitize( $return[0]['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI );
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'logo'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_ATOM_10, 'logo' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0]));
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base( $return[0] ) );
-		}
-		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'icon'))
-		{
+		} elseif ( $return = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_ATOM_10, 'icon' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0]));
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base( $return[0] ) );
-		}
-		elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'url'))
-		{
+		} elseif ( $return = $this->get_image_tags( SIMPLEPIE_NAMESPACE_RSS_10, 'url' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0]));
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base( $return[0] ) );
-		}
-		elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'url'))
-		{
+		} elseif ( $return = $this->get_image_tags( SIMPLEPIE_NAMESPACE_RSS_090, 'url' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0]));
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base( $return[0] ) );
-		}
-		elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'url'))
-		{
+		} elseif ( $return = $this->get_image_tags( SIMPLEPIE_NAMESPACE_RSS_20, 'url' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0]));
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base( $return[0] ) );
-		}
-		else
-		{
+		} else {
 			return null;
 		}
 	}
@@ -2725,22 +2100,14 @@
 	 *
 	 * @return string|null
 	 */
-	public function get_image_link()
-	{
-		if ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'link'))
-		{
+	public function get_image_link() {
+		if ( $return = $this->get_image_tags( SIMPLEPIE_NAMESPACE_RSS_10, 'link' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0]));
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base( $return[0] ) );
-		}
-		elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'link'))
-		{
+		} elseif ( $return = $this->get_image_tags( SIMPLEPIE_NAMESPACE_RSS_090, 'link' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0]));
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base( $return[0] ) );
-		}
-		elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'link'))
-		{
+		} elseif ( $return = $this->get_image_tags( SIMPLEPIE_NAMESPACE_RSS_20, 'link' ) ) {
-			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0]));
+			return $this->sanitize( $return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base( $return[0] ) );
-		}
-		else
-		{
+		} else {
 			return null;
 		}
 	}
@@ -2755,18 +2122,12 @@
 	 *
 	 * @return int|float|null
 	 */
-	public function get_image_width()
-	{
-		if ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'width'))
-		{
+	public function get_image_width() {
+		if ( $return = $this->get_image_tags( SIMPLEPIE_NAMESPACE_RSS_20, 'width' ) ) {
-			return round($return[0]['data']);
+			return round( $return[0]['data'] );
-		}
-		elseif ($this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION && $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'url'))
-		{
+		} elseif ( $this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION && $this->get_image_tags( SIMPLEPIE_NAMESPACE_RSS_20, 'url' ) ) {
 			return 88.0;
-		}
-		else
-		{
+		} else {
 			return null;
 		}
 	}
@@ -2781,18 +2142,12 @@
 	 *
 	 * @return int|float|null
 	 */
-	public function get_image_height()
-	{
-		if ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'height'))
-		{
+	public function get_image_height() {
+		if ( $return = $this->get_image_tags( SIMPLEPIE_NAMESPACE_RSS_20, 'height' ) ) {
-			return round($return[0]['data']);
+			return round( $return[0]['data'] );
-		}
-		elseif ($this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION && $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'url'))
-		{
+		} elseif ( $this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION && $this->get_image_tags( SIMPLEPIE_NAMESPACE_RSS_20, 'url' ) ) {
 			return 31.0;
-		}
-		else
-		{
+		} else {
 			return null;
 		}
 	}
@@ -2804,19 +2159,16 @@
 	 * {@see get_item()}
 	 *
 	 * @param int $max Maximum value to return. 0 for no limit
+	 *
 	 * @return int Number of items in the feed
 	 */
-	public function get_item_quantity($max = 0)
-	{
+	public function get_item_quantity( $max = 0 ) {
 		$max = (int) $max;
-		$qty = count($this->get_items());
+		$qty = count( $this->get_items() );
-		if ($max === 0)
-		{
+		if ( $max === 0 ) {
 			return $qty;
-		}
-		else
-		{
+		} else {
-			return ($qty > $max) ? $max : $qty;
+			return ( $qty > $max ) ? $max : $qty;
 		}
 	}
 
@@ -2829,18 +2181,16 @@
 	 *
 	 * @see get_item_quantity()
 	 * @since Beta 2
+	 *
 	 * @param int $key The item that you want to return.  Remember that arrays begin with 0, not 1
+	 *
 	 * @return SimplePie_Item|null
 	 */
-	public function get_item($key = 0)
-	{
+	public function get_item( $key = 0 ) {
 		$items = $this->get_items();
-		if (isset($items[$key]))
-		{
+		if ( isset( $items[ $key ] ) ) {
-			return $items[$key];
+			return $items[ $key ];
-		}
-		else
-		{
+		} else {
 			return null;
 		}
 	}
@@ -2854,106 +2204,80 @@
 	 *
 	 * @see get_item_quantity
 	 * @since Beta 2
+	 *
 	 * @param int $start Index to start at
 	 * @param int $end Number of items to return. 0 for all items after `$start`
+	 *
 	 * @return array|null List of {@see SimplePie_Item} objects
 	 */
-	public function get_items($start = 0, $end = 0)
-	{
-		if (!isset($this->data['items']))
-		{
-			if (!empty($this->multifeed_objects))
-			{
+	public function get_items( $start = 0, $end = 0 ) {
+		if ( ! isset( $this->data['items'] ) ) {
+			if ( ! empty( $this->multifeed_objects ) ) {
-				$this->data['items'] = SimplePie::merge_items($this->multifeed_objects, $start, $end, $this->item_limit);
+				$this->data['items'] = SimplePie::merge_items( $this->multifeed_objects, $start, $end, $this->item_limit );
-			}
-			else
-			{
+			} else {
 				$this->data['items'] = array();
-				if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'entry'))
-				{
+				if ( $items = $this->get_feed_tags( SIMPLEPIE_NAMESPACE_ATOM_10, 'entry' ) ) {
-					$keys = array_keys($items);
+					$keys = array_keys( $items );
-					foreach ($keys as $key)
-					{
+					foreach ( $keys as $key ) {
-						$this->data['items'][] = $this->registry->create('Item', array($this, $items[$key]));
+						$this->data['items'][] = $this->registry->create( 'Item', array( $this, $items[ $key ] ) );
 					}
 				}
-				if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'entry'))
-				{
+				if ( $items = $this->get_feed_tags( SIMPLEPIE_NAMESPACE_ATOM_03, 'entry' ) ) {
-					$keys = array_keys($items);
+					$keys = array_keys( $items );
-					foreach ($keys as $key)
-					{
+					foreach ( $keys as $key ) {
-						$this->data['items'][] = $this->registry->create('Item', array($this, $items[$key]));
+						$this->data['items'][] = $this->registry->create( 'Item', array( $this, $items[ $key ] ) );
 					}
 				}
-				if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'item'))
-				{
+				if ( $items = $this->get_feed_tags( SIMPLEPIE_NAMESPACE_RSS_10, 'item' ) ) {
-					$keys = array_keys($items);
+					$keys = array_keys( $items );
-					foreach ($keys as $key)
-					{
+					foreach ( $keys as $key ) {
-						$this->data['items'][] = $this->registry->create('Item', array($this, $items[$key]));
+						$this->data['items'][] = $this->registry->create( 'Item', array( $this, $items[ $key ] ) );
 					}
 				}
-				if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'item'))
-				{
+				if ( $items = $this->get_feed_tags( SIMPLEPIE_NAMESPACE_RSS_090, 'item' ) ) {
-					$keys = array_keys($items);
+					$keys = array_keys( $items );
-					foreach ($keys as $key)
-					{
+					foreach ( $keys as $key ) {
-						$this->data['items'][] = $this->registry->create('Item', array($this, $items[$key]));
+						$this->data['items'][] = $this->registry->create( 'Item', array( $this, $items[ $key ] ) );
 					}
 				}
-				if ($items = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'item'))
-				{
+				if ( $items = $this->get_channel_tags( SIMPLEPIE_NAMESPACE_RSS_20, 'item' ) ) {
-					$keys = array_keys($items);
+					$keys = array_keys( $items );
-					foreach ($keys as $key)
-					{
+					foreach ( $keys as $key ) {
-						$this->data['items'][] = $this->registry->create('Item', array($this, $items[$key]));
+						$this->data['items'][] = $this->registry->create( 'Item', array( $this, $items[ $key ] ) );
 					}
 				}
 			}
 		}
 
-		if (!empty($this->data['items']))
-		{
+		if ( ! empty( $this->data['items'] ) ) {
 			// If we want to order it by date, check if all items have a date, and then sort it
-			if ($this->order_by_date && empty($this->multifeed_objects))
-			{
-				if (!isset($this->data['ordered_items']))
-				{
+			if ( $this->order_by_date && empty( $this->multifeed_objects ) ) {
+				if ( ! isset( $this->data['ordered_items'] ) ) {
 					$do_sort = true;
-					foreach ($this->data['items'] as $item)
-					{
-						if (!$item->get_date('U'))
-						{
+					foreach ( $this->data['items'] as $item ) {
+						if ( ! $item->get_date( 'U' ) ) {
 							$do_sort = false;
 							break;
 						}
 					}
-					$item = null;
+					$item                        = null;
 					$this->data['ordered_items'] = $this->data['items'];
-					if ($do_sort)
-					{
+					if ( $do_sort ) {
-						usort($this->data['ordered_items'], array(get_class($this), 'sort_items'));
+						usort( $this->data['ordered_items'], array( get_class( $this ), 'sort_items' ) );
 					}
 				}
 				$items = $this->data['ordered_items'];
-			}
-			else
-			{
+			} else {
 				$items = $this->data['items'];
 			}
 
 			// Slice the data as desired
-			if ($end === 0)
-			{
+			if ( $end === 0 ) {
-				return array_slice($items, $start);
+				return array_slice( $items, $start );
-			}
-			else
-			{
+			} else {
-				return array_slice($items, $start, $end);
+				return array_slice( $items, $start, $end );
 			}
-		}
-		else
-		{
+		} else {
 			return array();
 		}
 	}
@@ -2963,10 +2287,10 @@
 	 *
 	 * @deprecated Use your own favicon handling instead
 	 */
-	public function set_favicon_handler($page = false, $qs = 'i')
-	{
+	public function set_favicon_handler( $page = false, $qs = 'i' ) {
-		$level = defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_WARNING;
+		$level = defined( 'E_USER_DEPRECATED' ) ? E_USER_DEPRECATED : E_USER_WARNING;
-		trigger_error('Favicon handling has been removed, please use your own handling', $level);
+		trigger_error( 'Favicon handling has been removed, please use your own handling', $level );
+
 		return false;
 	}
 
@@ -2975,14 +2299,12 @@
 	 *
 	 * @deprecated Use your own favicon handling instead
 	 */
-	public function get_favicon()
-	{
+	public function get_favicon() {
-		$level = defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_WARNING;
+		$level = defined( 'E_USER_DEPRECATED' ) ? E_USER_DEPRECATED : E_USER_WARNING;
-		trigger_error('Favicon handling has been removed, please use your own handling', $level);
+		trigger_error( 'Favicon handling has been removed, please use your own handling', $level );
 
-		if (($url = $this->get_link()) !== null)
-		{
+		if ( ( $url = $this->get_link() ) !== null ) {
-			return 'http://g.etfv.co/' . urlencode($url);
+			return 'http://g.etfv.co/' . urlencode( $url );
 		}
 
 		return false;
@@ -2993,41 +2315,42 @@
 	 *
 	 * @param string $method Method name
 	 * @param array $args Arguments to the method
+	 *
 	 * @return mixed
 	 */
-	public function __call($method, $args)
-	{
-		if (strpos($method, 'subscribe_') === 0)
-		{
+	public function __call( $method, $args ) {
+		if ( strpos( $method, 'subscribe_' ) === 0 ) {
-			$level = defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_WARNING;
+			$level = defined( 'E_USER_DEPRECATED' ) ? E_USER_DEPRECATED : E_USER_WARNING;
-			trigger_error('subscribe_*() has been deprecated, implement the callback yourself', $level);
+			trigger_error( 'subscribe_*() has been deprecated, implement the callback yourself', $level );
+
 			return '';
 		}
-		if ($method === 'enable_xml_dump')
-		{
+		if ( $method === 'enable_xml_dump' ) {
-			$level = defined('E_USER_DEPRECATED') ? E_USER_DEPRECATED : E_USER_WARNING;
+			$level = defined( 'E_USER_DEPRECATED' ) ? E_USER_DEPRECATED : E_USER_WARNING;
-			trigger_error('enable_xml_dump() has been deprecated, use get_raw_data() instead', $level);
+			trigger_error( 'enable_xml_dump() has been deprecated, use get_raw_data() instead', $level );
+
 			return false;
 		}
 
-		$class = get_class($this);
+		$class = get_class( $this );
 		$trace = debug_backtrace();
-		$file = $trace[0]['file'];
+		$file  = $trace[0]['file'];
-		$line = $trace[0]['line'];
+		$line  = $trace[0]['line'];
-		trigger_error("Call to undefined method $class::$method() in $file on line $line", E_USER_ERROR);
+		trigger_error( "Call to undefined method $class::$method() in $file on line $line", E_USER_ERROR );
 	}
 
 	/**
 	 * Sorting callback for items
 	 *
 	 * @access private
+	 *
 	 * @param SimplePie $a
 	 * @param SimplePie $b
+	 *
 	 * @return boolean
 	 */
-	public static function sort_items($a, $b)
-	{
+	public static function sort_items( $a, $b ) {
-		return $a->get_date('U') <= $b->get_date('U');
+		return $a->get_date( 'U' ) <= $b->get_date( 'U' );
 	}
 
 	/**
@@ -3037,58 +2360,46 @@
 	 * for the items or else SimplePie will refuse to sort them.
 	 *
 	 * @link http://simplepie.org/wiki/tutorial/sort_multiple_feeds_by_time_and_date#if_feeds_require_separate_per-feed_settings
+	 *
 	 * @param array $urls List of SimplePie feed objects to merge
 	 * @param int $start Starting item
 	 * @param int $end Number of items to return
 	 * @param int $limit Maximum number of items per feed
+	 *
 	 * @return array
 	 */
-	public static function merge_items($urls, $start = 0, $end = 0, $limit = 0)
-	{
-		if (is_array($urls) && sizeof($urls) > 0)
-		{
+	public static function merge_items( $urls, $start = 0, $end = 0, $limit = 0 ) {
+		if ( is_array( $urls ) && sizeof( $urls ) > 0 ) {
 			$items = array();
-			foreach ($urls as $arg)
-			{
-				if ($arg instanceof SimplePie)
-				{
+			foreach ( $urls as $arg ) {
+				if ( $arg instanceof SimplePie ) {
-					$items = array_merge($items, $arg->get_items(0, $limit));
+					$items = array_merge( $items, $arg->get_items( 0, $limit ) );
-				}
-				else
-				{
+				} else {
-					trigger_error('Arguments must be SimplePie objects', E_USER_WARNING);
+					trigger_error( 'Arguments must be SimplePie objects', E_USER_WARNING );
 				}
 			}
 
 			$do_sort = true;
-			foreach ($items as $item)
-			{
-				if (!$item->get_date('U'))
-				{
+			foreach ( $items as $item ) {
+				if ( ! $item->get_date( 'U' ) ) {
 					$do_sort = false;
 					break;
 				}
 			}
 			$item = null;
-			if ($do_sort)
-			{
+			if ( $do_sort ) {
-				usort($items, array(get_class($urls[0]), 'sort_items'));
+				usort( $items, array( get_class( $urls[0] ), 'sort_items' ) );
 			}
 
-			if ($end === 0)
-			{
+			if ( $end === 0 ) {
-				return array_slice($items, $start);
+				return array_slice( $items, $start );
-			}
-			else
-			{
+			} else {
-				return array_slice($items, $start, $end);
+				return array_slice( $items, $start, $end );
 			}
-		}
-		else
-		{
+		} else {
-			trigger_error('Cannot merge zero SimplePie objects', E_USER_WARNING);
+			trigger_error( 'Cannot merge zero SimplePie objects', E_USER_WARNING );
+
 			return array();
 		}
 	}
-}
+}
\ No newline at end of file
-endif;
\ No newline at end of file
Index: www/wp-includes/Requests/IRI.php
===================================================================
--- www/wp-includes/Requests/IRI.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_IRI.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/Text/Diff/Engine/shell.php
===================================================================
--- www/wp-includes/Text/Diff/Engine/shell.php	(revision 38565)
+++ www/wp-includes/autoload/text-diff/Text_Diff_Engine_shell.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/includes/class-walker-nav-menu-checklist.php
===================================================================
--- www/wp-admin/includes/class-walker-nav-menu-checklist.php	(revision 38565)
+++ www/wp-admin/autoload/walker/Walker_Nav_Menu_Checklist.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/random_compat/error_polyfill.php
===================================================================
--- www/wp-includes/random_compat/error_polyfill.php	(revision 38565)
+++ www/wp-includes/random_compat/error_polyfill.php	(revision 38565)
@@ -1,42 +0,0 @@
-<?php
-/**
- * Random_* Compatibility Library 
- * for using the new PHP 7 random_* API in PHP 5 projects
- * 
- * The MIT License (MIT)
- * 
- * Copyright (c) 2015 Paragon Initiative Enterprises
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-if (!class_exists('Error', false)) {
-    // We can't really avoid making this extend Exception in PHP 5.
-    class Error extends Exception
-    {
-        
-    }
-}
-
-if (!class_exists('TypeError', false)) {
-    class TypeError extends Error
-    {
-        
-    }
-}
Index: www/wp-admin/ms-delete-site.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/ms-delete-site.php	(revision 38565)
+++ www/wp-admin/ms-delete-site.php	(revision 38565)
@@ -1,95 +0,0 @@
-<?php
-/**
- * Multisite delete site panel.
- *
- * @package WordPress
- * @subpackage Multisite
- * @since 3.0.0
- */
-
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-if ( !is_multisite() )
-	wp_die( __( 'Multisite support is not enabled.' ) );
-
-if ( ! current_user_can( 'delete_site' ) )
-	wp_die(__( 'Sorry, you are not allowed to delete this site.'));
-
-if ( isset( $_GET['h'] ) && $_GET['h'] != '' && get_option( 'delete_blog_hash' ) != false ) {
-	if ( hash_equals( get_option( 'delete_blog_hash' ), $_GET['h'] ) ) {
-		wpmu_delete_blog( $wpdb->blogid );
-		wp_die( sprintf( __( 'Thank you for using %s, your site has been deleted. Happy trails to you until we meet again.' ), $current_site->site_name ) );
-	} else {
-		wp_die( __( "I'm sorry, the link you clicked is stale. Please select another option." ) );
-	}
-}
-
-$blog = get_blog_details();
-$user = wp_get_current_user();
-
-$title = __( 'Delete Site' );
-$parent_file = 'tools.php';
-require_once( ABSPATH . 'wp-admin/admin-header.php' );
-
-echo '<div class="wrap">';
-echo '<h1>' . esc_html( $title ) . '</h1>';
-
-if ( isset( $_POST['action'] ) && $_POST['action'] == 'deleteblog' && isset( $_POST['confirmdelete'] ) && $_POST['confirmdelete'] == '1' ) {
-	check_admin_referer( 'delete-blog' );
-
-	$hash = wp_generate_password( 20, false );
-	update_option( 'delete_blog_hash', $hash );
-
-	$url_delete = esc_url( admin_url( 'ms-delete-site.php?h=' . $hash ) );
-
-	/* translators: Do not translate USERNAME, URL_DELETE, SITE_NAME: those are placeholders. */
-	$content = __( "Howdy ###USERNAME###,
-
-You recently clicked the 'Delete Site' link on your site and filled in a
-form on that page.
-
-If you really want to delete your site, click the link below. You will not
-be asked to confirm again so only click this link if you are absolutely certain:
-###URL_DELETE###
-
-If you delete your site, please consider opening a new site here
-some time in the future! (But remember your current site and username
-are gone forever.)
-
-Thanks for using the site,
-Webmaster
-###SITE_NAME###" );
-	/**
-	 * Filters the email content sent when a site in a Multisite network is deleted.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $content The email content that will be sent to the user who deleted a site in a Multisite network.
-	 */
-	$content = apply_filters( 'delete_site_email_content', $content );
-
-	$content = str_replace( '###USERNAME###', $user->user_login, $content );
-	$content = str_replace( '###URL_DELETE###', $url_delete, $content );
-	$content = str_replace( '###SITE_NAME###', $current_site->site_name, $content );
-
-	wp_mail( get_option( 'admin_email' ), "[ " . wp_specialchars_decode( get_option( 'blogname' ) ) . " ] ".__( 'Delete My Site' ), $content );
-	?>
-
-	<p><?php _e( 'Thank you. Please check your email for a link to confirm your action. Your site will not be deleted until this link is clicked.' ) ?></p>
-
-<?php } else {
-	?>
-	<p><?php printf( __( 'If you do not want to use your %s site any more, you can delete it using the form below. When you click <strong>Delete My Site Permanently</strong> you will be sent an email with a link in it. Click on this link to delete your site.'), $current_site->site_name); ?></p>
-	<p><?php _e( 'Remember, once deleted your site cannot be restored.' ) ?></p>
-
-	<form method="post" name="deletedirect">
-		<?php wp_nonce_field( 'delete-blog' ) ?>
-		<input type="hidden" name="action" value="deleteblog" />
-		<p><input id="confirmdelete" type="checkbox" name="confirmdelete" value="1" /> <label for="confirmdelete"><strong><?php printf( __( "I'm sure I want to permanently disable my site, and I am aware I can never get it back or use %s again." ), is_subdomain_install() ? $blog->domain : $blog->domain . $blog->path ); ?></strong></label></p>
-		<?php submit_button( __( 'Delete My Site Permanently' ) ); ?>
-	</form>
- 	<?php
-}
-echo '</div>';
-
-include( ABSPATH . 'wp-admin/admin-footer.php' );
Index: www/wp-includes/autoload/text-diff/Text_Diff_Op_delete.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/text-diff/Text_Diff_Op_delete.php	(revision )
+++ www/wp-includes/autoload/text-diff/Text_Diff_Op_delete.php	(revision )
@@ -0,0 +1,33 @@
+<?php
+
+/**
+ * @package Text_Diff
+ * @author  Geoffrey T. Dairiki <dairiki@dairiki.org>
+ *
+ * @access private
+ */
+class Text_Diff_Op_delete extends Text_Diff_Op {
+
+	/**
+	 * PHP5 constructor.
+	 */
+	function __construct( $lines )
+    {
+        $this->orig = $lines;
+        $this->final = false;
+    }
+
+	/**
+	 * PHP4 constructor.
+	 */
+	public function Text_Diff_Op_delete( $lines ) {
+		self::__construct( $lines );
+	}
+
+    function &reverse()
+    {
+        $reverse = new Text_Diff_Op_add($this->orig);
+        return $reverse;
+    }
+
+}
Index: www/wp-admin/includes/class-wp-theme-install-list-table.php
===================================================================
--- www/wp-admin/includes/class-wp-theme-install-list-table.php	(revision 38565)
+++ www/wp-admin/autoload/list-table/WP_Theme_Install_List_Table.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/import.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/import.php	(revision 38565)
+++ www/wp-admin/import.php	(revision 38565)
@@ -1,206 +0,0 @@
-<?php
-/**
- * Import WordPress Administration Screen
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-define('WP_LOAD_IMPORTERS', true);
-
-/** Load WordPress Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-if ( ! current_user_can( 'import' ) ) {
-	wp_die( __( 'Sorry, you are not allowed to import content.' ) );
-}
-
-$title = __('Import');
-
-get_current_screen()->add_help_tab( array(
-	'id'      => 'overview',
-	'title'   => __('Overview'),
-	'content' => '<p>' . __('This screen lists links to plugins to import data from blogging/content management platforms. Choose the platform you want to import from, and click Install Now when you are prompted in the popup window. If your platform is not listed, click the link to search the plugin directory for other importer plugins to see if there is one for your platform.') . '</p>' .
-		'<p>' . __('In previous versions of WordPress, all importers were built-in. They have been turned into plugins since most people only use them once or infrequently.') . '</p>',
-) );
-
-get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Tools_Import_Screen" target="_blank">Documentation on Import</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
-);
-
-if ( current_user_can( 'install_plugins' ) ) {
-	// List of popular importer plugins from the WordPress.org API.
-	$popular_importers = wp_get_popular_importers();
-} else {
- 	$popular_importers = array();
-}
-
-// Detect and redirect invalid importers like 'movabletype', which is registered as 'mt'
-if ( ! empty( $_GET['invalid'] ) && isset( $popular_importers[ $_GET['invalid'] ] ) ) {
-	$importer_id = $popular_importers[ $_GET['invalid'] ]['importer-id'];
-	if ( $importer_id != $_GET['invalid'] ) { // Prevent redirect loops.
-		wp_redirect( admin_url( 'admin.php?import=' . $importer_id ) );
-		exit;
-	}
-	unset( $importer_id );
-}
-
-add_thickbox();
-wp_enqueue_script( 'plugin-install' );
-wp_enqueue_script( 'updates' );
-
-require_once( ABSPATH . 'wp-admin/admin-header.php' );
-$parent_file = 'tools.php';
-?>
-
-<div class="wrap">
-<h1><?php echo esc_html( $title ); ?></h1>
-<?php if ( ! empty( $_GET['invalid'] ) ) : ?>
-	<div class="error">
-		<p><strong><?php _e( 'ERROR:' ); ?></strong> <?php
-			/* translators: %s: importer slug */
-			printf( __( 'The %s importer is invalid or is not installed.' ), '<strong>' . esc_html( $_GET['invalid'] ) . '</strong>' );
-		?></p>
-	</div>
-<?php endif; ?>
-<p><?php _e('If you have posts or comments in another system, WordPress can import those into this site. To get started, choose a system to import from below:'); ?></p>
-
-<?php
-// Registered (already installed) importers. They're stored in the global $wp_importers.
-$importers = get_importers();
-
-// If a popular importer is not registered, create a dummy registration that links to the plugin installer.
-foreach ( $popular_importers as $pop_importer => $pop_data ) {
-	if ( isset( $importers[ $pop_importer ] ) )
-		continue;
-	if ( isset( $importers[ $pop_data['importer-id'] ] ) )
-		continue;
-
-	// Fill the array of registered (already installed) importers with data of the popular importers from the WordPress.org API.
-	$importers[ $pop_data['importer-id'] ] = array( $pop_data['name'], $pop_data['description'], 'install' => $pop_data['plugin-slug'] );
-}
-
-if ( empty( $importers ) ) {
-	echo '<p>' . __('No importers are available.') . '</p>'; // TODO: make more helpful
-} else {
-	uasort( $importers, '_usort_by_first_member' );
-?>
-<table class="widefat importers striped">
-
-	<?php
-	foreach ( $importers as $importer_id => $data ) {
-		$plugin_slug = $action = '';
-		$is_plugin_installed = false;
-
-		if ( isset( $data['install'] ) ) {
-			$plugin_slug = $data['install'];
-
-			if ( file_exists( WP_PLUGIN_DIR . '/' . $plugin_slug ) ) {
-				// Looks like an importer is installed, but not active.
-				$plugins = get_plugins( '/' . $plugin_slug );
-				if ( ! empty( $plugins ) ) {
-					$keys = array_keys( $plugins );
-					$plugin_file = $plugin_slug . '/' . $keys[0];
-					$url = wp_nonce_url( add_query_arg( array(
-						'action' => 'activate',
-						'plugin' => $plugin_file,
-						'from'   => 'import',
-					), admin_url( 'plugins.php' ) ), 'activate-plugin_' . $plugin_file );
-					$action = sprintf(
-						'<a href="%s" aria-label="%s">%s</a>',
-						esc_url( $url ),
-						/* translators: %s: Importer name */
-						esc_attr( sprintf( __( 'Run %s' ), $data[0] ) ),
-						__( 'Run Importer' )
-					);
-
-					$is_plugin_installed = true;
-				}
-			}
-
-			if ( empty( $action ) ) {
-				if ( is_main_site() ) {
-					$url = wp_nonce_url( add_query_arg( array(
-						'action' => 'install-plugin',
-						'plugin' => $plugin_slug,
-						'from'   => 'import',
-					), self_admin_url( 'update.php' ) ), 'install-plugin_' . $plugin_slug );
-					$action = sprintf(
-						'<a href="%1$s" class="install-now" data-slug="%2$s" data-name="%3$s" aria-label="%4$s">%5$s</a>',
-						esc_url( $url ),
-						esc_attr( $plugin_slug ),
-						esc_attr( $data[0] ),
-						/* translators: %s: Importer name */
-						esc_attr( sprintf( __( 'Install %s' ), $data[0] ) ),
-						__( 'Install Now' )
-					);
-				} else {
-					$action = sprintf(
-						/* translators: URL to wp-admin/import.php */
-						__( 'This importer is not installed. Please install importers from <a href="%s">the main site</a>.' ),
-						get_admin_url( get_current_network_id(), 'import.php' )
-					);
-				}
-			}
-		} else {
-			$url = add_query_arg( array(
-				'import' => $importer_id,
-			), self_admin_url( 'admin.php' ) );
-			$action = sprintf(
-				'<a href="%1$s" aria-label="%2$s">%3$s</a>',
-				esc_url( $url ),
-				/* translators: %s: Importer name */
-				esc_attr( sprintf( __( 'Run %s' ), $data[0] ) ),
-				__( 'Run Importer' )
-			);
-
-			$is_plugin_installed = true;
-		}
-
-		if ( ! $is_plugin_installed && is_main_site() ) {
-			$url = add_query_arg( array(
-				'tab'       => 'plugin-information',
-				'plugin'    => $plugin_slug,
-				'from'      => 'import',
-				'TB_iframe' => 'true',
-				'width'     => 600,
-				'height'    => 550,
-			), network_admin_url( 'plugin-install.php' ) );
-			$action .= sprintf(
-				' | <a href="%1$s" class="thickbox open-plugin-details-modal" aria-label="%2$s">%3$s</a>',
-				esc_url( $url ),
-				/* translators: %s: Importer name */
-				esc_attr( sprintf( __( 'More information about %s' ), $data[0] ) ),
-				__( 'Details' )
-			);
-		}
-
-		echo "
-			<tr class='importer-item'>
-				<td class='import-system'>
-					<span class='importer-title'>{$data[0]}</span>
-					<span class='importer-action'>{$action}</span>
-				</td>
-				<td class='desc'>
-					<span class='importer-desc'>{$data[1]}</span>
-				</td>
-			</tr>";
-	}
-	?>
-</table>
-<?php
-}
-
-if ( current_user_can('install_plugins') )
-	echo '<p>' . sprintf( __('If the importer you need is not listed, <a href="%s">search the plugin directory</a> to see if an importer is available.'), esc_url( network_admin_url( 'plugin-install.php?tab=search&type=tag&s=importer' ) ) ) . '</p>';
-?>
-
-</div>
-
-<?php
-wp_print_request_filesystem_credentials_modal();
-wp_print_admin_notice_templates();
-
-include( ABSPATH . 'wp-admin/admin-footer.php' );
Index: www/wp-includes/class-wp-network.php
===================================================================
--- www/wp-includes/class-wp-network.php	(revision 38565)
+++ www/wp-includes/autoload/object/WP_Network.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/edit-form-comment.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/edit-form-comment.php	(revision 38565)
+++ www/wp-admin/edit-form-comment.php	(revision 38565)
@@ -1,209 +0,0 @@
-<?php
-/**
- * Edit comment form for inclusion in another file.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-// don't load directly
-if ( !defined('ABSPATH') )
-	die('-1');
-?>
-<form name="post" action="comment.php" method="post" id="post">
-<?php wp_nonce_field('update-comment_' . $comment->comment_ID) ?>
-<div class="wrap">
-<h1><?php _e( 'Edit Comment' ); ?></h1>
-
-<div id="poststuff">
-<input type="hidden" name="action" value="editedcomment" />
-<input type="hidden" name="comment_ID" value="<?php echo esc_attr( $comment->comment_ID ); ?>" />
-<input type="hidden" name="comment_post_ID" value="<?php echo esc_attr( $comment->comment_post_ID ); ?>" />
-
-<div id="post-body" class="metabox-holder columns-2">
-<div id="post-body-content" class="edit-form-section edit-comment-section">
-<?php
-if ( 'approved' === wp_get_comment_status( $comment ) && $comment->comment_post_ID > 0 ) :
-	$comment_link = get_comment_link( $comment );
-?>
-<div class="inside">
-	<div id="comment-link-box">
-		<strong><?php _ex( 'Permalink:', 'comment' ); ?></strong>
-		<span id="sample-permalink"><a href="<?php echo $comment_link; ?>"><?php echo $comment_link; ?></a></span>
-	</div>
-</div>
-<?php endif; ?>
-<div id="namediv" class="stuffbox">
-<div class="inside">
-<fieldset>
-<legend class="edit-comment-author"><?php _e( 'Author' ) ?></legend>
-<table class="form-table editcomment">
-<tbody>
-<tr>
-	<td class="first"><label for="name"><?php _e( 'Name:' ); ?></label></td>
-	<td><input type="text" name="newcomment_author" size="30" value="<?php echo esc_attr( $comment->comment_author ); ?>" id="name" /></td>
-</tr>
-<tr>
-	<td class="first"><label for="email"><?php _e( 'Email:' ); ?></label></td>
-	<td>
-		<input type="text" name="newcomment_author_email" size="30" value="<?php echo $comment->comment_author_email; ?>" id="email" />
-	</td>
-</tr>
-<tr>
-	<td class="first"><label for="newcomment_author_url"><?php _e( 'URL:' ); ?></label></td>
-	<td>
-		<input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" class="code" value="<?php echo esc_attr($comment->comment_author_url); ?>" />
-	</td>
-</tr>
-</tbody>
-</table>
-<br />
-</fieldset>
-</div>
-</div>
-
-<div id="postdiv" class="postarea">
-<?php
-	echo '<label for="content" class="screen-reader-text">' . __( 'Comment' ) . '</label>';
-	$quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
-	wp_editor( $comment->comment_content, 'content', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) );
-	wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
-</div>
-</div><!-- /post-body-content -->
-
-<div id="postbox-container-1" class="postbox-container">
-<div id="submitdiv" class="stuffbox" >
-<h2><?php _e( 'Status' ) ?></h2>
-<div class="inside">
-<div class="submitbox" id="submitcomment">
-<div id="minor-publishing">
-
-<div id="misc-publishing-actions">
-
-<fieldset class="misc-pub-section misc-pub-comment-status" id="comment-status-radio">
-<legend class="screen-reader-text"><?php _e( 'Comment status' ); ?></legend>
-<label><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php _ex( 'Approved', 'comment status' ); ?></label><br />
-<label><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php _ex( 'Pending', 'comment status' ); ?></label><br />
-<label><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php _ex( 'Spam', 'comment status' ); ?></label>
-</fieldset>
-
-<div class="misc-pub-section curtime misc-pub-curtime">
-<?php
-/* translators: Publish box date format, see https://secure.php.net/date */
-$datef = __( 'M j, Y @ H:i' );
-?>
-<span id="timestamp"><?php
-printf(
-	/* translators: %s: comment date */
-	__( 'Submitted on: %s' ),
-	'<b>' . date_i18n( $datef, strtotime( $comment->comment_date ) ) . '</b>'
-);
-?></span>
-<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit date and time' ); ?></span></a>
-<fieldset id='timestampdiv' class='hide-if-js'>
-<legend class="screen-reader-text"><?php _e( 'Date and time' ); ?></legend>
-<?php touch_time( ( 'editcomment' === $action ), 0 ); ?>
-</fieldset>
-</div>
-
-<?php
-$post_id = $comment->comment_post_ID;
-if ( current_user_can( 'edit_post', $post_id ) ) {
-	$post_link = "<a href='" . esc_url( get_edit_post_link( $post_id ) ) . "'>";
-	$post_link .= esc_html( get_the_title( $post_id ) ) . '</a>';
-} else {
-	$post_link = esc_html( get_the_title( $post_id ) );
-}
-?>
-
-<div class="misc-pub-section misc-pub-response-to">
-	<?php printf(
-		/* translators: %s: post link */
-		__( 'In response to: %s' ),
-		'<b>' . $post_link . '</b>'
-	); ?>
-</div>
-
-<?php
-if ( $comment->comment_parent ) :
-	$parent      = get_comment( $comment->comment_parent );
-	if ( $parent ) :
-		$parent_link = esc_url( get_comment_link( $parent ) );
-		$name        = get_comment_author( $parent );
-	?>
-	<div class="misc-pub-section misc-pub-reply-to">
-		<?php printf(
-			/* translators: %s: comment link */
-			__( 'In reply to: %s' ),
-			'<b><a href="' . $parent_link . '">' . $name . '</a></b>'
-		); ?>
-	</div>
-<?php endif;
-endif; ?>
-
-<?php
-	/**
-	 * Filters miscellaneous actions for the edit comment form sidebar.
-	 *
-	 * @since 4.3.0
-	 *
-	 * @param string $html    Output HTML to display miscellaneous action.
-	 * @param object $comment Current comment object.
-	 */
-	 echo apply_filters( 'edit_comment_misc_actions', '', $comment );
-?>
-
-</div> <!-- misc actions -->
-<div class="clear"></div>
-</div>
-
-<div id="major-publishing-actions">
-<div id="delete-action">
-<?php echo "<a class='submitdelete deletion' href='" . wp_nonce_url("comment.php?action=" . ( !EMPTY_TRASH_DAYS ? 'deletecomment' : 'trashcomment' ) . "&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . urlencode(wp_get_referer()), 'delete-comment_' . $comment->comment_ID) . "'>" . ( !EMPTY_TRASH_DAYS ? __('Delete Permanently') : __('Move to Trash') ) . "</a>\n"; ?>
-</div>
-<div id="publishing-action">
-<?php submit_button( __( 'Update' ), 'primary large', 'save', false ); ?>
-</div>
-<div class="clear"></div>
-</div>
-</div>
-</div>
-</div><!-- /submitdiv -->
-</div>
-
-<div id="postbox-container-2" class="postbox-container">
-<?php
-/** This action is documented in wp-admin/edit-form-advanced.php */
-do_action( 'add_meta_boxes', 'comment', $comment );
-
-/**
- * Fires when comment-specific meta boxes are added.
- *
- * @since 3.0.0
- *
- * @param WP_Comment $comment Comment object.
- */
-do_action( 'add_meta_boxes_comment', $comment );
-
-do_meta_boxes(null, 'normal', $comment);
-
-$referer = wp_get_referer();
-?>
-</div>
-
-<input type="hidden" name="c" value="<?php echo esc_attr($comment->comment_ID) ?>" />
-<input type="hidden" name="p" value="<?php echo esc_attr($comment->comment_post_ID) ?>" />
-<input name="referredby" type="hidden" id="referredby" value="<?php echo $referer ? esc_url( $referer ) : ''; ?>" />
-<?php wp_original_referer_field(true, 'previous'); ?>
-<input type="hidden" name="noredir" value="1" />
-
-</div><!-- /post-body -->
-</div>
-</div>
-</form>
-
-<?php if ( ! wp_is_mobile() ) : ?>
-<script type="text/javascript">
-try{document.post.name.focus();}catch(e){}
-</script>
-<?php endif;
Index: www/wp-admin/includes/admin.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/includes/admin.php	(revision 38565)
+++ www/wp-admin/includes/admin.php	(revision )
@@ -16,6 +16,10 @@
 	load_textdomain( 'default', WP_LANG_DIR . '/admin-' . get_locale() . '.mo' );
 }
 
+require_once(ABSPATH . 'wp-admin/constants/ftp.php');
+
+require_once(ABSPATH . 'wp-admin/constants/pclzip.php');
+
 /** WordPress Administration Hooks */
 require_once(ABSPATH . 'wp-admin/includes/admin-filters.php');
 
@@ -50,7 +54,6 @@
 require_once(ABSPATH . 'wp-admin/includes/post.php');
 
 /** WordPress Administration Screen API */
-require_once(ABSPATH . 'wp-admin/includes/class-wp-screen.php');
 require_once(ABSPATH . 'wp-admin/includes/screen.php');
 
 /** WordPress Taxonomy Administration API */
@@ -60,8 +63,6 @@
 require_once(ABSPATH . 'wp-admin/includes/template.php');
 
 /** WordPress List Table Administration API and base class */
-require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
-require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table-compat.php');
 require_once(ABSPATH . 'wp-admin/includes/list-table.php');
 
 /** WordPress Theme Administration API */
@@ -69,9 +70,6 @@
 
 /** WordPress User Administration API */
 require_once(ABSPATH . 'wp-admin/includes/user.php');
-
-/** WordPress Site Icon API */
-require_once(ABSPATH . 'wp-admin/includes/class-wp-site-icon.php');
 
 /** WordPress Update Administration API */
 require_once(ABSPATH . 'wp-admin/includes/update.php');
Index: www/wp-includes/autoload/customize/class-wp-customize-filter-setting.php
===================================================================
--- www/wp-includes/autoload/customize/class-wp-customize-filter-setting.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/customize/class-wp-customize-filter-setting.php	(revision UNDEFINED)
@@ -1,30 +0,0 @@
-<?php
-/**
- * Customize API: WP_Customize_Filter_Setting class
- *
- * @package WordPress
- * @subpackage Customize
- * @since 4.4.0
- */
-
-/**
- * A setting that is used to filter a value, but will not save the results.
- *
- * Results should be properly handled using another setting or callback.
- *
- * @since 3.4.0
- *
- * @see WP_Customize_Setting
- */
-class WP_Customize_Filter_Setting extends WP_Customize_Setting {
-
-	/**
-	 * Saves the value of the setting, using the related API.
-	 *
-	 * @since 3.4.0
-	 * @access public
-	 *
-	 * @param mixed $value The value to update.
-	 */
-	public function update( $value ) {}
-}
Index: www/wp-includes/SimplePie/Author.php
===================================================================
--- www/wp-includes/SimplePie/Author.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_Author.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/user-edit.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/user-edit.php	(revision 38565)
+++ www/wp-admin/user-edit.php	(revision 38565)
@@ -1,658 +0,0 @@
-<?php
-/**
- * Edit user administration panel.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-wp_reset_vars( array( 'action', 'user_id', 'wp_http_referer' ) );
-
-$user_id = (int) $user_id;
-$current_user = wp_get_current_user();
-if ( ! defined( 'IS_PROFILE_PAGE' ) )
-	define( 'IS_PROFILE_PAGE', ( $user_id == $current_user->ID ) );
-
-if ( ! $user_id && IS_PROFILE_PAGE )
-	$user_id = $current_user->ID;
-elseif ( ! $user_id && ! IS_PROFILE_PAGE )
-	wp_die(__( 'Invalid user ID.' ) );
-elseif ( ! get_userdata( $user_id ) )
-	wp_die( __('Invalid user ID.') );
-
-wp_enqueue_script('user-profile');
-
-$title = IS_PROFILE_PAGE ? __('Profile') : __('Edit User');
-if ( current_user_can('edit_users') && !IS_PROFILE_PAGE )
-	$submenu_file = 'users.php';
-else
-	$submenu_file = 'profile.php';
-
-if ( current_user_can('edit_users') && !is_user_admin() )
-	$parent_file = 'users.php';
-else
-	$parent_file = 'profile.php';
-
-$profile_help = '<p>' . __('Your profile contains information about you (your &#8220;account&#8221;) as well as some personal options related to using WordPress.') . '</p>' .
-	'<p>' . __('You can change your password, turn on keyboard shortcuts, change the color scheme of your WordPress administration screens, and turn off the WYSIWYG (Visual) editor, among other things. You can hide the Toolbar (formerly called the Admin Bar) from the front end of your site, however it cannot be disabled on the admin screens.') . '</p>' .
-	'<p>' . __('Your username cannot be changed, but you can use other fields to enter your real name or a nickname, and change which name to display on your posts.') . '</p>' .
-	'<p>' . __( 'You can log out of other devices, such as your phone or a public computer, by clicking the Log Out Everywhere Else button.' ) . '</p>' .
-	'<p>' . __('Required fields are indicated; the rest are optional. Profile information will only be displayed if your theme is set up to do so.') . '</p>' .
-	'<p>' . __('Remember to click the Update Profile button when you are finished.') . '</p>';
-
-get_current_screen()->add_help_tab( array(
-	'id'      => 'overview',
-	'title'   => __('Overview'),
-	'content' => $profile_help,
-) );
-
-get_current_screen()->set_help_sidebar(
-    '<p><strong>' . __('For more information:') . '</strong></p>' .
-    '<p>' . __('<a href="https://codex.wordpress.org/Users_Your_Profile_Screen" target="_blank">Documentation on User Profiles</a>') . '</p>' .
-    '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
-);
-
-$wp_http_referer = remove_query_arg( array( 'update', 'delete_count', 'user_id' ), $wp_http_referer );
-
-$user_can_edit = current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' );
-
-/**
- * Filters whether to allow administrators on Multisite to edit every user.
- *
- * Enabling the user editing form via this filter also hinges on the user holding
- * the 'manage_network_users' cap, and the logged-in user not matching the user
- * profile open for editing.
- *
- * The filter was introduced to replace the EDIT_ANY_USER constant.
- *
- * @since 3.0.0
- *
- * @param bool $allow Whether to allow editing of any user. Default true.
- */
-if ( is_multisite()
-	&& ! current_user_can( 'manage_network_users' )
-	&& $user_id != $current_user->ID
-	&& ! apply_filters( 'enable_edit_any_user_configuration', true )
-) {
-	wp_die( __( 'Sorry, you are not allowed to edit this user.' ) );
-}
-
-// Execute confirmed email change. See send_confirmation_on_profile_email().
-if ( is_multisite() && IS_PROFILE_PAGE && isset( $_GET[ 'newuseremail' ] ) && $current_user->ID ) {
-	$new_email = get_user_meta( $current_user->ID, '_new_email', true );
-	if ( $new_email && hash_equals( $new_email[ 'hash' ], $_GET[ 'newuseremail' ] ) ) {
-		$user = new stdClass;
-		$user->ID = $current_user->ID;
-		$user->user_email = esc_html( trim( $new_email[ 'newemail' ] ) );
-		if ( $wpdb->get_var( $wpdb->prepare( "SELECT user_login FROM {$wpdb->signups} WHERE user_login = %s", $current_user->user_login ) ) ) {
-			$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->signups} SET user_email = %s WHERE user_login = %s", $user->user_email, $current_user->user_login ) );
-		}
-		wp_update_user( $user );
-		delete_user_meta( $current_user->ID, '_new_email' );
-		wp_redirect( add_query_arg( array( 'updated' => 'true' ), self_admin_url( 'profile.php' ) ) );
-		die();
-	} else {
-		wp_redirect( add_query_arg( array( 'error' => 'new-email' ), self_admin_url( 'profile.php' ) ) );
-	}
-} elseif ( is_multisite() && IS_PROFILE_PAGE && !empty( $_GET['dismiss'] ) && $current_user->ID . '_new_email' === $_GET['dismiss'] ) {
-	check_admin_referer( 'dismiss-' . $current_user->ID . '_new_email' );
-	delete_user_meta( $current_user->ID, '_new_email' );
-	wp_redirect( add_query_arg( array('updated' => 'true'), self_admin_url( 'profile.php' ) ) );
-	die();
-}
-
-switch ($action) {
-case 'update':
-
-check_admin_referer('update-user_' . $user_id);
-
-if ( !current_user_can('edit_user', $user_id) )
-	wp_die(__('Sorry, you are not allowed to edit this user.'));
-
-if ( IS_PROFILE_PAGE ) {
-	/**
-	 * Fires before the page loads on the 'Your Profile' editing screen.
-	 *
-	 * The action only fires if the current user is editing their own profile.
-	 *
-	 * @since 2.0.0
-	 *
-	 * @param int $user_id The user ID.
-	 */
-	do_action( 'personal_options_update', $user_id );
-} else {
-	/**
-	 * Fires before the page loads on the 'Edit User' screen.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param int $user_id The user ID.
-	 */
-	do_action( 'edit_user_profile_update', $user_id );
-}
-
-// Update the email address in signups, if present.
-if ( is_multisite() ) {
-	$user = get_userdata( $user_id );
-
-	if ( $user->user_login && isset( $_POST[ 'email' ] ) && is_email( $_POST[ 'email' ] ) && $wpdb->get_var( $wpdb->prepare( "SELECT user_login FROM {$wpdb->signups} WHERE user_login = %s", $user->user_login ) ) ) {
-		$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->signups} SET user_email = %s WHERE user_login = %s", $_POST[ 'email' ], $user_login ) );
-	}
-}
-
-// Update the user.
-$errors = edit_user( $user_id );
-
-// Grant or revoke super admin status if requested.
-if ( is_multisite() && is_network_admin() && !IS_PROFILE_PAGE && current_user_can( 'manage_network_options' ) && !isset($super_admins) && empty( $_POST['super_admin'] ) == is_super_admin( $user_id ) ) {
-	empty( $_POST['super_admin'] ) ? revoke_super_admin( $user_id ) : grant_super_admin( $user_id );
-}
-
-if ( !is_wp_error( $errors ) ) {
-	$redirect = add_query_arg( 'updated', true, get_edit_user_link( $user_id ) );
-	if ( $wp_http_referer )
-		$redirect = add_query_arg('wp_http_referer', urlencode($wp_http_referer), $redirect);
-	wp_redirect($redirect);
-	exit;
-}
-
-default:
-$profileuser = get_user_to_edit($user_id);
-
-if ( !current_user_can('edit_user', $user_id) )
-	wp_die(__('Sorry, you are not allowed to edit this user.'));
-
-$sessions = WP_Session_Tokens::get_instance( $profileuser->ID );
-
-include(ABSPATH . 'wp-admin/admin-header.php');
-?>
-
-<?php if ( !IS_PROFILE_PAGE && is_super_admin( $profileuser->ID ) && current_user_can( 'manage_network_options' ) ) { ?>
-	<div class="updated"><p><strong><?php _e('Important:'); ?></strong> <?php _e('This user has super admin privileges.'); ?></p></div>
-<?php } ?>
-<?php if ( isset($_GET['updated']) ) : ?>
-<div id="message" class="updated notice is-dismissible">
-	<?php if ( IS_PROFILE_PAGE ) : ?>
-	<p><strong><?php _e('Profile updated.') ?></strong></p>
-	<?php else: ?>
-	<p><strong><?php _e('User updated.') ?></strong></p>
-	<?php endif; ?>
-	<?php if ( $wp_http_referer && false === strpos( $wp_http_referer, 'user-new.php' ) && ! IS_PROFILE_PAGE ) : ?>
-	<p><a href="<?php echo esc_url( $wp_http_referer ); ?>"><?php _e('&larr; Back to Users'); ?></a></p>
-	<?php endif; ?>
-</div>
-<?php endif; ?>
-<?php if ( isset( $_GET['error'] ) ) : ?>
-<div class="notice notice-error">
-	<?php if ( 'new-email' == $_GET['error'] ) : ?>
-	<p><?php _e( 'Error while saving the new email address. Please try again.' ); ?></p>
-	<?php endif; ?>
-</div>
-<?php endif; ?>
-<?php if ( isset( $errors ) && is_wp_error( $errors ) ) : ?>
-<div class="error"><p><?php echo implode( "</p>\n<p>", $errors->get_error_messages() ); ?></p></div>
-<?php endif; ?>
-
-<div class="wrap" id="profile-page">
-<h1>
-<?php
-echo esc_html( $title );
-if ( ! IS_PROFILE_PAGE ) {
-	if ( current_user_can( 'create_users' ) ) { ?>
-		<a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
-	<?php } elseif ( is_multisite() && current_user_can( 'promote_users' ) ) { ?>
-		<a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
-	<?php }
-} ?>
-</h1>
-<form id="your-profile" action="<?php echo esc_url( self_admin_url( IS_PROFILE_PAGE ? 'profile.php' : 'user-edit.php' ) ); ?>" method="post" novalidate="novalidate"<?php
-	/**
-	 * Fires inside the your-profile form tag on the user editing screen.
-	 *
-	 * @since 3.0.0
-	 */
-	do_action( 'user_edit_form_tag' );
-?>>
-<?php wp_nonce_field('update-user_' . $user_id) ?>
-<?php if ( $wp_http_referer ) : ?>
-	<input type="hidden" name="wp_http_referer" value="<?php echo esc_url($wp_http_referer); ?>" />
-<?php endif; ?>
-<p>
-<input type="hidden" name="from" value="profile" />
-<input type="hidden" name="checkuser_id" value="<?php echo get_current_user_id(); ?>" />
-</p>
-
-<h2><?php _e( 'Personal Options' ); ?></h2>
-
-<table class="form-table">
-<?php if ( ! ( IS_PROFILE_PAGE && ! $user_can_edit ) ) : ?>
-	<tr class="user-rich-editing-wrap">
-		<th scope="row"><?php _e( 'Visual Editor' ); ?></th>
-		<td><label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="false" <?php if ( ! empty( $profileuser->rich_editing ) ) checked( 'false', $profileuser->rich_editing ); ?> /> <?php _e( 'Disable the visual editor when writing' ); ?></label></td>
-	</tr>
-<?php endif; ?>
-<?php if ( count($_wp_admin_css_colors) > 1 && has_action('admin_color_scheme_picker') ) : ?>
-<tr class="user-admin-color-wrap">
-<th scope="row"><?php _e('Admin Color Scheme')?></th>
-<td><?php
-	/**
-	 * Fires in the 'Admin Color Scheme' section of the user editing screen.
-	 *
-	 * The section is only enabled if a callback is hooked to the action,
-	 * and if there is more than one defined color scheme for the admin.
-	 *
-	 * @since 3.0.0
-	 * @since 3.8.1 Added `$user_id` parameter.
-	 *
-	 * @param int $user_id The user ID.
-	 */
-	do_action( 'admin_color_scheme_picker', $user_id );
-?></td>
-</tr>
-<?php
-endif; // $_wp_admin_css_colors
-if ( !( IS_PROFILE_PAGE && !$user_can_edit ) ) : ?>
-<tr class="user-comment-shortcuts-wrap">
-<th scope="row"><?php _e( 'Keyboard Shortcuts' ); ?></th>
-<td><label for="comment_shortcuts"><input type="checkbox" name="comment_shortcuts" id="comment_shortcuts" value="true" <?php if ( ! empty( $profileuser->comment_shortcuts ) ) checked( 'true', $profileuser->comment_shortcuts ); ?> /> <?php _e('Enable keyboard shortcuts for comment moderation.'); ?></label> <?php _e('<a href="https://codex.wordpress.org/Keyboard_Shortcuts" target="_blank">More information</a>'); ?></td>
-</tr>
-<?php endif; ?>
-<tr class="show-admin-bar user-admin-bar-front-wrap">
-<th scope="row"><?php _e( 'Toolbar' ); ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Toolbar') ?></span></legend>
-<label for="admin_bar_front">
-<input name="admin_bar_front" type="checkbox" id="admin_bar_front" value="1"<?php checked( _get_admin_bar_pref( 'front', $profileuser->ID ) ); ?> />
-<?php _e( 'Show Toolbar when viewing site' ); ?></label><br />
-</fieldset>
-</td>
-</tr>
-<?php
-/**
- * Fires at the end of the 'Personal Options' settings table on the user editing screen.
- *
- * @since 2.7.0
- *
- * @param WP_User $profileuser The current WP_User object.
- */
-do_action( 'personal_options', $profileuser );
-?>
-
-</table>
-<?php
-	if ( IS_PROFILE_PAGE ) {
-		/**
-		 * Fires after the 'Personal Options' settings table on the 'Your Profile' editing screen.
-		 *
-		 * The action only fires if the current user is editing their own profile.
-		 *
-		 * @since 2.0.0
-		 *
-		 * @param WP_User $profileuser The current WP_User object.
-		 */
-		do_action( 'profile_personal_options', $profileuser );
-	}
-?>
-
-<h2><?php _e( 'Name' ); ?></h2>
-
-<table class="form-table">
-	<tr class="user-user-login-wrap">
-		<th><label for="user_login"><?php _e('Username'); ?></label></th>
-		<td><input type="text" name="user_login" id="user_login" value="<?php echo esc_attr($profileuser->user_login); ?>" disabled="disabled" class="regular-text" /> <span class="description"><?php _e('Usernames cannot be changed.'); ?></span></td>
-	</tr>
-
-<?php if ( !IS_PROFILE_PAGE && !is_network_admin() ) : ?>
-<tr class="user-role-wrap"><th><label for="role"><?php _e('Role') ?></label></th>
-<td><select name="role" id="role">
-<?php
-// Compare user role against currently editable roles
-$user_roles = array_intersect( array_values( $profileuser->roles ), array_keys( get_editable_roles() ) );
-$user_role  = reset( $user_roles );
-
-// print the full list of roles with the primary one selected.
-wp_dropdown_roles($user_role);
-
-// print the 'no role' option. Make it selected if the user has no role yet.
-if ( $user_role )
-	echo '<option value="">' . __('&mdash; No role for this site &mdash;') . '</option>';
-else
-	echo '<option value="" selected="selected">' . __('&mdash; No role for this site &mdash;') . '</option>';
-?>
-</select></td></tr>
-<?php endif; //!IS_PROFILE_PAGE
-
-if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_can( 'manage_network_options' ) && !isset($super_admins) ) { ?>
-<tr class="user-super-admin-wrap"><th><?php _e('Super Admin'); ?></th>
-<td>
-<?php if ( $profileuser->user_email != get_site_option( 'admin_email' ) || ! is_super_admin( $profileuser->ID ) ) : ?>
-<p><label><input type="checkbox" id="super_admin" name="super_admin"<?php checked( is_super_admin( $profileuser->ID ) ); ?> /> <?php _e( 'Grant this user super admin privileges for the Network.' ); ?></label></p>
-<?php else : ?>
-<p><?php _e( 'Super admin privileges cannot be removed because this user has the network admin email.' ); ?></p>
-<?php endif; ?>
-</td></tr>
-<?php } ?>
-
-<tr class="user-first-name-wrap">
-	<th><label for="first_name"><?php _e('First Name') ?></label></th>
-	<td><input type="text" name="first_name" id="first_name" value="<?php echo esc_attr($profileuser->first_name) ?>" class="regular-text" /></td>
-</tr>
-
-<tr class="user-last-name-wrap">
-	<th><label for="last_name"><?php _e('Last Name') ?></label></th>
-	<td><input type="text" name="last_name" id="last_name" value="<?php echo esc_attr($profileuser->last_name) ?>" class="regular-text" /></td>
-</tr>
-
-<tr class="user-nickname-wrap">
-	<th><label for="nickname"><?php _e('Nickname'); ?> <span class="description"><?php _e('(required)'); ?></span></label></th>
-	<td><input type="text" name="nickname" id="nickname" value="<?php echo esc_attr($profileuser->nickname) ?>" class="regular-text" /></td>
-</tr>
-
-<tr class="user-display-name-wrap">
-	<th><label for="display_name"><?php _e('Display name publicly as') ?></label></th>
-	<td>
-		<select name="display_name" id="display_name">
-		<?php
-			$public_display = array();
-			$public_display['display_nickname']  = $profileuser->nickname;
-			$public_display['display_username']  = $profileuser->user_login;
-
-			if ( !empty($profileuser->first_name) )
-				$public_display['display_firstname'] = $profileuser->first_name;
-
-			if ( !empty($profileuser->last_name) )
-				$public_display['display_lastname'] = $profileuser->last_name;
-
-			if ( !empty($profileuser->first_name) && !empty($profileuser->last_name) ) {
-				$public_display['display_firstlast'] = $profileuser->first_name . ' ' . $profileuser->last_name;
-				$public_display['display_lastfirst'] = $profileuser->last_name . ' ' . $profileuser->first_name;
-			}
-
-			if ( !in_array( $profileuser->display_name, $public_display ) ) // Only add this if it isn't duplicated elsewhere
-				$public_display = array( 'display_displayname' => $profileuser->display_name ) + $public_display;
-
-			$public_display = array_map( 'trim', $public_display );
-			$public_display = array_unique( $public_display );
-
-			foreach ( $public_display as $id => $item ) {
-		?>
-			<option <?php selected( $profileuser->display_name, $item ); ?>><?php echo $item; ?></option>
-		<?php
-			}
-		?>
-		</select>
-	</td>
-</tr>
-</table>
-
-<h2><?php _e( 'Contact Info' ); ?></h2>
-
-<table class="form-table">
-<tr class="user-email-wrap">
-	<th><label for="email"><?php _e('Email'); ?> <span class="description"><?php _e('(required)'); ?></span></label></th>
-	<td><input type="email" name="email" id="email" value="<?php echo esc_attr( $profileuser->user_email ) ?>" class="regular-text ltr" />
-	<?php
-	$new_email = get_user_meta( $current_user->ID, '_new_email', true );
-	if ( $new_email && $new_email['newemail'] != $current_user->user_email && $profileuser->ID == $current_user->ID ) : ?>
-	<div class="updated inline">
-	<p><?php
-		printf(
-			/* translators: %s: new email */
-			__( 'There is a pending change of your email to %s.' ),
-			'<code>' . esc_html( $new_email['newemail'] ) . '</code>'
-		);
-		printf(
-			' <a href="%1$s">%2$s</a>',
-			esc_url( wp_nonce_url( self_admin_url( 'profile.php?dismiss=' . $current_user->ID . '_new_email' ), 'dismiss-' . $current_user->ID . '_new_email' ) ),
-			__( 'Cancel' )
-		);
-	?></p>
-	</div>
-	<?php endif; ?>
-	</td>
-</tr>
-
-<tr class="user-url-wrap">
-	<th><label for="url"><?php _e('Website') ?></label></th>
-	<td><input type="url" name="url" id="url" value="<?php echo esc_attr( $profileuser->user_url ) ?>" class="regular-text code" /></td>
-</tr>
-
-<?php
-	foreach ( wp_get_user_contact_methods( $profileuser ) as $name => $desc ) {
-?>
-<tr class="user-<?php echo $name; ?>-wrap">
-	<th><label for="<?php echo $name; ?>">
-		<?php
-		/**
-		 * Filters a user contactmethod label.
-		 *
-		 * The dynamic portion of the filter hook, `$name`, refers to
-		 * each of the keys in the contactmethods array.
-		 *
-		 * @since 2.9.0
-		 *
-		 * @param string $desc The translatable label for the contactmethod.
-		 */
-		echo apply_filters( "user_{$name}_label", $desc );
-		?>
-	</label></th>
-	<td><input type="text" name="<?php echo $name; ?>" id="<?php echo $name; ?>" value="<?php echo esc_attr($profileuser->$name) ?>" class="regular-text" /></td>
-</tr>
-<?php
-	}
-?>
-</table>
-
-<h2><?php IS_PROFILE_PAGE ? _e( 'About Yourself' ) : _e( 'About the user' ); ?></h2>
-
-<table class="form-table">
-<tr class="user-description-wrap">
-	<th><label for="description"><?php _e('Biographical Info'); ?></label></th>
-	<td><textarea name="description" id="description" rows="5" cols="30"><?php echo $profileuser->description; // textarea_escaped ?></textarea>
-	<p class="description"><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?></p></td>
-</tr>
-
-<?php if ( get_option( 'show_avatars' ) ) : ?>
-<tr class="user-profile-picture">
-	<th><?php _e( 'Profile Picture' ); ?></th>
-	<td>
-		<?php echo get_avatar( $user_id ); ?>
-		<p class="description"><?php
-			if ( IS_PROFILE_PAGE ) {
-				/* translators: %s: Gravatar URL */
-				$description = sprintf( __( 'You can change your profile picture on <a href="%s">Gravatar</a>.' ),
-					__( 'https://en.gravatar.com/' )
-				);
-			} else {
-				$description = '';
-			}
-
-			/**
-			 * Filters the user profile picture description displayed under the Gravatar.
-			 *
-			 * @since 4.4.0
-			 * @since 4.7.0 Added the `$profileuser` parameter.
-			 *
-			 * @param string  $description The description that will be printed.
-			 * @param WP_User $profileuser The current WP_User object.
-			 */
-			echo apply_filters( 'user_profile_picture_description', $description, $profileuser );
-		?></p>
-	</td>
-</tr>
-<?php endif; ?>
-
-<?php
-/**
- * Filters the display of the password fields.
- *
- * @since 1.5.1
- * @since 2.8.0 Added the `$profileuser` parameter.
- * @since 4.4.0 Now evaluated only in user-edit.php.
- *
- * @param bool    $show        Whether to show the password fields. Default true.
- * @param WP_User $profileuser User object for the current user to edit.
- */
-if ( $show_password_fields = apply_filters( 'show_password_fields', true, $profileuser ) ) :
-?>
-</table>
-
-<h2><?php _e( 'Account Management' ); ?></h2>
-<table class="form-table">
-<tr id="password" class="user-pass1-wrap">
-	<th><label for="pass1"><?php _e( 'New Password' ); ?></label></th>
-	<td>
-		<input class="hidden" value=" " /><!-- #24364 workaround -->
-		<button type="button" class="button button-secondary wp-generate-pw hide-if-no-js"><?php _e( 'Generate Password' ); ?></button>
-		<div class="wp-pwd hide-if-js">
-			<span class="password-input-wrapper">
-				<input type="password" name="pass1" id="pass1" class="regular-text" value="" autocomplete="off" data-pw="<?php echo esc_attr( wp_generate_password( 24 ) ); ?>" aria-describedby="pass-strength-result" />
-			</span>
-			<button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
-				<span class="dashicons dashicons-hidden"></span>
-				<span class="text"><?php _e( 'Hide' ); ?></span>
-			</button>
-			<button type="button" class="button button-secondary wp-cancel-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Cancel password change' ); ?>">
-				<span class="text"><?php _e( 'Cancel' ); ?></span>
-			</button>
-			<div style="display:none" id="pass-strength-result" aria-live="polite"></div>
-		</div>
-	</td>
-</tr>
-<tr class="user-pass2-wrap hide-if-js">
-	<th scope="row"><label for="pass2"><?php _e( 'Repeat New Password' ); ?></label></th>
-	<td>
-	<input name="pass2" type="password" id="pass2" class="regular-text" value="" autocomplete="off" />
-	<p class="description"><?php _e( 'Type your new password again.' ); ?></p>
-	</td>
-</tr>
-<tr class="pw-weak">
-	<th><?php _e( 'Confirm Password' ); ?></th>
-	<td>
-		<label>
-			<input type="checkbox" name="pw_weak" class="pw-checkbox" />
-			<span id="pw-weak-text-label"><?php _e( 'Confirm use of potentially weak password' ); ?></span>
-		</label>
-	</td>
-</tr>
-<?php endif; ?>
-
-<?php
-if ( IS_PROFILE_PAGE && count( $sessions->get_all() ) === 1 ) : ?>
-	<tr class="user-sessions-wrap hide-if-no-js">
-		<th><?php _e( 'Sessions' ); ?></th>
-		<td aria-live="assertive">
-			<div class="destroy-sessions"><button type="button" disabled class="button button-secondary"><?php _e( 'Log Out Everywhere Else' ); ?></button></div>
-			<p class="description">
-				<?php _e( 'You are only logged in at this location.' ); ?>
-			</p>
-		</td>
-	</tr>
-<?php elseif ( IS_PROFILE_PAGE && count( $sessions->get_all() ) > 1 ) : ?>
-	<tr class="user-sessions-wrap hide-if-no-js">
-		<th><?php _e( 'Sessions' ); ?></th>
-		<td aria-live="assertive">
-			<div class="destroy-sessions"><button type="button" class="button button-secondary" id="destroy-sessions"><?php _e( 'Log Out Everywhere Else' ); ?></button></div>
-			<p class="description">
-				<?php _e( 'Did you lose your phone or leave your account logged in at a public computer? You can log out everywhere else, and stay logged in here.' ); ?>
-			</p>
-		</td>
-	</tr>
-<?php elseif ( ! IS_PROFILE_PAGE && $sessions->get_all() ) : ?>
-	<tr class="user-sessions-wrap hide-if-no-js">
-		<th><?php _e( 'Sessions' ); ?></th>
-		<td>
-			<p><button type="button" class="button button-secondary" id="destroy-sessions"><?php _e( 'Log Out Everywhere' ); ?></button></p>
-			<p class="description">
-				<?php
-				/* translators: 1: User's display name. */
-				printf( __( 'Log %s out of all locations.' ), $profileuser->display_name );
-				?>
-			</p>
-		</td>
-	</tr>
-<?php endif; ?>
-
-</table>
-
-<?php
-	if ( IS_PROFILE_PAGE ) {
-		/**
-		 * Fires after the 'About Yourself' settings table on the 'Your Profile' editing screen.
-		 *
-		 * The action only fires if the current user is editing their own profile.
-		 *
-		 * @since 2.0.0
-		 *
-		 * @param WP_User $profileuser The current WP_User object.
-		 */
-		do_action( 'show_user_profile', $profileuser );
-	} else {
-		/**
-		 * Fires after the 'About the User' settings table on the 'Edit User' screen.
-		 *
-		 * @since 2.0.0
-		 *
-		 * @param WP_User $profileuser The current WP_User object.
-		 */
-		do_action( 'edit_user_profile', $profileuser );
-	}
-?>
-
-<?php
-/**
- * Filters whether to display additional capabilities for the user.
- *
- * The 'Additional Capabilities' section will only be enabled if
- * the number of the user's capabilities exceeds their number of
- * roles.
- *
- * @since 2.8.0
- *
- * @param bool    $enable      Whether to display the capabilities. Default true.
- * @param WP_User $profileuser The current WP_User object.
- */
-if ( count( $profileuser->caps ) > count( $profileuser->roles )
-	&& apply_filters( 'additional_capabilities_display', true, $profileuser )
-) : ?>
-<h2><?php _e( 'Additional Capabilities' ); ?></h2>
-<table class="form-table">
-<tr class="user-capabilities-wrap">
-	<th scope="row"><?php _e( 'Capabilities' ); ?></th>
-	<td>
-<?php
-	$output = '';
-	foreach ( $profileuser->caps as $cap => $value ) {
-		if ( ! $wp_roles->is_role( $cap ) ) {
-			if ( '' != $output )
-				$output .= ', ';
-			$output .= $value ? $cap : sprintf( __( 'Denied: %s' ), $cap );
-		}
-	}
-	echo $output;
-?>
-	</td>
-</tr>
-</table>
-<?php endif; ?>
-
-<input type="hidden" name="action" value="update" />
-<input type="hidden" name="user_id" id="user_id" value="<?php echo esc_attr($user_id); ?>" />
-
-<?php submit_button( IS_PROFILE_PAGE ? __('Update Profile') : __('Update User') ); ?>
-
-</form>
-</div>
-<?php
-break;
-}
-?>
-<script type="text/javascript">
-	if (window.location.hash == '#password') {
-		document.getElementById('pass1').focus();
-	}
-</script>
-<?php
-include( ABSPATH . 'wp-admin/admin-footer.php');
Index: www/wp-includes/class-json.php
===================================================================
--- www/wp-includes/class-json.php	(revision 38565)
+++ www/wp-includes/autoload/json/Services_JSON.php	(revision )
@@ -1,5 +1,4 @@
 <?php
-if ( ! class_exists( 'Services_JSON' ) ) :
 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
 /**
  * Converts to and from JSON format.
@@ -57,46 +56,6 @@
  */
 
 /**
- * Marker constant for Services_JSON::decode(), used to flag stack state
- */
-define('SERVICES_JSON_SLICE',   1);
-
-/**
- * Marker constant for Services_JSON::decode(), used to flag stack state
- */
-define('SERVICES_JSON_IN_STR',  2);
-
-/**
- * Marker constant for Services_JSON::decode(), used to flag stack state
- */
-define('SERVICES_JSON_IN_ARR',  3);
-
-/**
- * Marker constant for Services_JSON::decode(), used to flag stack state
- */
-define('SERVICES_JSON_IN_OBJ',  4);
-
-/**
- * Marker constant for Services_JSON::decode(), used to flag stack state
- */
-define('SERVICES_JSON_IN_CMT', 5);
-
-/**
- * Behavior switch for Services_JSON::decode()
- */
-define('SERVICES_JSON_LOOSE_TYPE', 16);
-
-/**
- * Behavior switch for Services_JSON::decode()
- */
-define('SERVICES_JSON_SUPPRESS_ERRORS', 32);
-
-/**
- * Behavior switch for Services_JSON::decode()
- */
-define('SERVICES_JSON_USE_TO_JSON', 64);
-
-/**
  * Converts to and from JSON format.
  *
  * Brief example of use:
@@ -955,6 +914,4 @@
 		}
     }
     
-}
+}
\ No newline at end of file
-
-endif;
\ No newline at end of file
Index: www/wp-includes/class-wp-simplepie-sanitize-kses.php
===================================================================
--- www/wp-includes/class-wp-simplepie-sanitize-kses.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/WP_SimplePie_Sanitize_KSES.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/SimplePie/Core.php
===================================================================
--- www/wp-includes/SimplePie/Core.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_Core.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/SimplePie/HTTP/Parser.php
===================================================================
--- www/wp-includes/SimplePie/HTTP/Parser.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_HTTP_Parser.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/phpmailer/phpmailerException.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/phpmailer/phpmailerException.php	(revision )
+++ www/wp-includes/autoload/phpmailer/phpmailerException.php	(revision )
@@ -0,0 +1,18 @@
+<?php
+
+/**
+ * PHPMailer exception handler
+ * @package PHPMailer
+ */
+class phpmailerException extends Exception
+{
+	/**
+	 * Prettify error message output
+	 * @return string
+	 */
+	public function errorMessage()
+	{
+		$errorMsg = '<strong>' . $this->getMessage() . "</strong><br />\n";
+		return $errorMsg;
+	}
+}
Index: www/wp-includes/autoload/customize/class-wp-customize-upload-control.php
===================================================================
--- www/wp-includes/autoload/customize/class-wp-customize-upload-control.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/customize/class-wp-customize-upload-control.php	(revision UNDEFINED)
@@ -1,44 +0,0 @@
-<?php
-/**
- * Customize API: WP_Customize_Upload_Control class
- *
- * @package WordPress
- * @subpackage Customize
- * @since 4.4.0
- */
-
-/**
- * Customize Upload Control Class.
- *
- * @since 3.4.0
- *
- * @see WP_Customize_Media_Control
- */
-class WP_Customize_Upload_Control extends WP_Customize_Media_Control {
-	public $type          = 'upload';
-	public $mime_type     = '';
-	public $button_labels = array();
-	public $removed = ''; // unused
-	public $context; // unused
-	public $extensions = array(); // unused
-
-	/**
-	 * Refresh the parameters passed to the JavaScript via JSON.
-	 *
-	 * @since 3.4.0
-	 *
-	 * @uses WP_Customize_Media_Control::to_json()
-	 */
-	public function to_json() {
-		parent::to_json();
-
-		$value = $this->value();
-		if ( $value ) {
-			// Get the attachment model for the existing file.
-			$attachment_id = attachment_url_to_postid( $value );
-			if ( $attachment_id ) {
-				$this->json['attachment'] = wp_prepare_attachment_for_js( $attachment_id );
-			}
-		}
-	}
-}
Index: www/wp-admin/includes/class-wp-posts-list-table.php
===================================================================
--- www/wp-admin/includes/class-wp-posts-list-table.php	(revision 38565)
+++ www/wp-admin/autoload/list-table/WP_Posts_List_Table.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/registration.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/registration.php	(revision 38565)
+++ www/wp-includes/registration.php	(revision 38565)
@@ -1,7 +0,0 @@
-<?php
-/**
- * Deprecated. No longer needed.
- *
- * @package WordPress
- */
-_deprecated_file( basename(__FILE__), '3.1.0', null, __( 'This file no longer needs to be included.' ) );
Index: www/wp-includes/Requests/IDNAEncoder.php
===================================================================
--- www/wp-includes/Requests/IDNAEncoder.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_IDNAEncoder.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/ID3/module.tag.id3v1.php
===================================================================
--- www/wp-includes/ID3/module.tag.id3v1.php	(revision 38565)
+++ www/wp-includes/autoload/id3/getid3_id3v1.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/widgets/class-wp-widget-text.php
===================================================================
--- www/wp-includes/widgets/class-wp-widget-text.php	(revision 38565)
+++ www/wp-includes/autoload/widgets/WP_Widget_Text.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-post-type.php
===================================================================
--- www/wp-includes/class-wp-post-type.php	(revision 38565)
+++ www/wp-includes/autoload/object/WP_Post_Type.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/atomlib.php
===================================================================
--- www/wp-includes/atomlib.php	(revision 38565)
+++ www/wp-includes/autoload/WP_Autoloader.php	(revision )
@@ -1,363 +1,41 @@
 <?php
 /**
- * Atom Syndication Format PHP Library
- *
- * @package AtomLib
- * @link http://code.google.com/p/phpatomlib/
- *
- * @author Elias Torres <elias@torrez.us>
- * @version 0.4
- * @since 2.3.0
+ * WordPress Class and Trait Autoloader
  */
 
-/**
- * Structure that store common Atom Feed Properties
- *
- * @package AtomLib
- */
-class AtomFeed {
-	/**
-	 * Stores Links
-	 * @var array
-	 * @access public
-	 */
-    var $links = array();
-    /**
-     * Stores Categories
-     * @var array
-     * @access public
-     */
-    var $categories = array();
-	/**
-	 * Stores Entries
-	 *
-	 * @var array
-	 * @access public
-	 */
-    var $entries = array();
-}
+class WP_Autoloader {
 
-/**
+	/**
- * Structure that store Atom Entry Properties
- *
- * @package AtomLib
- */
-class AtomEntry {
-	/**
-	 * Stores Links
 	 * @var array
-	 * @access public
 	 */
-    var $links = array();
-    /**
-     * Stores Categories
-     * @var array
-	 * @access public
-     */
-    var $categories = array();
-}
+	private static $_classmap;
 
-/**
+	/**
- * AtomLib Atom Parser API
- *
- * @package AtomLib
+	 * WP_Autoloader constructor.
- */
+	 */
-class AtomParser {
+	function __construct() {
 
-    var $NS = 'http://www.w3.org/2005/Atom';
-    var $ATOM_CONTENT_ELEMENTS = array('content','summary','title','subtitle','rights');
-    var $ATOM_SIMPLE_ELEMENTS = array('id','updated','published','draft');
+		spl_autoload_register( array( $this, 'load' ), true, true );
 
-    var $debug = false;
+		if ( is_file( ABSPATH . 'wp-classmap.php' ) ) {
 
-    var $depth = 0;
-    var $indent = 2;
-    var $in_content;
-    var $ns_contexts = array();
-    var $ns_decls = array();
-    var $content_ns_decls = array();
-    var $content_ns_contexts = array();
-    var $is_xhtml = false;
-    var $is_html = false;
-    var $is_text = true;
-    var $skipped_div = false;
+			self::$_classmap = require( ABSPATH . 'wp-classmap.php' );
 
-    var $FILE = "php://input";
+		}
 
-    var $feed;
-    var $current;
-
-	/**
-	 * PHP5 constructor.
-	 */
-    function __construct() {
-
-        $this->feed = new AtomFeed();
-        $this->current = null;
-        $this->map_attrs_func = create_function('$k,$v', 'return "$k=\"$v\"";');
-        $this->map_xmlns_func = create_function('$p,$n', '$xd = "xmlns"; if(strlen($n[0])>0) $xd .= ":{$n[0]}"; return "{$xd}=\"{$n[1]}\"";');
-    }
+	}
 
 	/**
-	 * PHP4 constructor.
+	 * @param string $class_name
 	 */
-	public function AtomParser() {
-		self::__construct();
-	}
+	function load( $class_name ) {
 
-    function _p($msg) {
-        if($this->debug) {
-            print str_repeat(" ", $this->depth * $this->indent) . $msg ."\n";
-        }
-    }
+		if ( isset( self::$_classmap[ $class_name ] ) ) {
 
-    function error_handler($log_level, $log_text, $error_file, $error_line) {
-        $this->error = $log_text;
-    }
+			require ABSPATH . self::$_classmap[ $class_name ];
 
-    function parse() {
-
-        set_error_handler(array(&$this, 'error_handler'));
-
-        array_unshift($this->ns_contexts, array());
-
-        $parser = xml_parser_create_ns();
-        xml_set_object($parser, $this);
-        xml_set_element_handler($parser, "start_element", "end_element");
-        xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
-        xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
-        xml_set_character_data_handler($parser, "cdata");
-        xml_set_default_handler($parser, "_default");
-        xml_set_start_namespace_decl_handler($parser, "start_ns");
-        xml_set_end_namespace_decl_handler($parser, "end_ns");
-
-        $this->content = '';
-
-        $ret = true;
-
-        $fp = fopen($this->FILE, "r");
-        while ($data = fread($fp, 4096)) {
-            if($this->debug) $this->content .= $data;
-
-            if(!xml_parse($parser, $data, feof($fp))) {
-                /* translators: 1: error message, 2: line number */
-                trigger_error(sprintf(__('XML Error: %1$s at line %2$s')."\n",
-                    xml_error_string(xml_get_error_code($parser)),
-                    xml_get_current_line_number($parser)));
-                $ret = false;
-                break;
-            }
+		}
-        }
-        fclose($fp);
 
-        xml_parser_free($parser);
-
-        restore_error_handler();
-
-        return $ret;
-    }
+	}
 
-    function start_element($parser, $name, $attrs) {
-
-        $tag = array_pop(explode(":", $name));
-
-        switch($name) {
-            case $this->NS . ':feed':
-                $this->current = $this->feed;
-                break;
-            case $this->NS . ':entry':
-                $this->current = new AtomEntry();
-                break;
-        };
-
-        $this->_p("start_element('$name')");
-        #$this->_p(print_r($this->ns_contexts,true));
-        #$this->_p('current(' . $this->current . ')');
-
-        array_unshift($this->ns_contexts, $this->ns_decls);
-
-        $this->depth++;
-
-        if(!empty($this->in_content)) {
-
-            $this->content_ns_decls = array();
-
-            if($this->is_html || $this->is_text)
-                trigger_error("Invalid content in element found. Content must not be of type text or html if it contains markup.");
-
-            $attrs_prefix = array();
-
-            // resolve prefixes for attributes
-            foreach($attrs as $key => $value) {
-                $with_prefix = $this->ns_to_prefix($key, true);
-                $attrs_prefix[$with_prefix[1]] = $this->xml_escape($value);
-            }
-
-            $attrs_str = join(' ', array_map($this->map_attrs_func, array_keys($attrs_prefix), array_values($attrs_prefix)));
-            if(strlen($attrs_str) > 0) {
-                $attrs_str = " " . $attrs_str;
-            }
-
-            $with_prefix = $this->ns_to_prefix($name);
-
-            if(!$this->is_declared_content_ns($with_prefix[0])) {
-                array_push($this->content_ns_decls, $with_prefix[0]);
-            }
-
-            $xmlns_str = '';
-            if(count($this->content_ns_decls) > 0) {
-                array_unshift($this->content_ns_contexts, $this->content_ns_decls);
-                $xmlns_str .= join(' ', array_map($this->map_xmlns_func, array_keys($this->content_ns_contexts[0]), array_values($this->content_ns_contexts[0])));
-                if(strlen($xmlns_str) > 0) {
-                    $xmlns_str = " " . $xmlns_str;
-                }
-            }
-
-            array_push($this->in_content, array($tag, $this->depth, "<". $with_prefix[1] ."{$xmlns_str}{$attrs_str}" . ">"));
-
-        } else if(in_array($tag, $this->ATOM_CONTENT_ELEMENTS) || in_array($tag, $this->ATOM_SIMPLE_ELEMENTS)) {
-            $this->in_content = array();
-            $this->is_xhtml = $attrs['type'] == 'xhtml';
-            $this->is_html = $attrs['type'] == 'html' || $attrs['type'] == 'text/html';
-            $this->is_text = !in_array('type',array_keys($attrs)) || $attrs['type'] == 'text';
-            $type = $this->is_xhtml ? 'XHTML' : ($this->is_html ? 'HTML' : ($this->is_text ? 'TEXT' : $attrs['type']));
-
-            if(in_array('src',array_keys($attrs))) {
-                $this->current->$tag = $attrs;
-            } else {
-                array_push($this->in_content, array($tag,$this->depth, $type));
-            }
-        } else if($tag == 'link') {
-            array_push($this->current->links, $attrs);
-        } else if($tag == 'category') {
-            array_push($this->current->categories, $attrs);
-        }
-
-        $this->ns_decls = array();
-    }
-
-    function end_element($parser, $name) {
-
-        $tag = array_pop(explode(":", $name));
-
-        $ccount = count($this->in_content);
-
-        # if we are *in* content, then let's proceed to serialize it
-        if(!empty($this->in_content)) {
-            # if we are ending the original content element
-            # then let's finalize the content
-            if($this->in_content[0][0] == $tag &&
-                $this->in_content[0][1] == $this->depth) {
-                $origtype = $this->in_content[0][2];
-                array_shift($this->in_content);
-                $newcontent = array();
-                foreach($this->in_content as $c) {
-                    if(count($c) == 3) {
-                        array_push($newcontent, $c[2]);
-                    } else {
-                        if($this->is_xhtml || $this->is_text) {
-                            array_push($newcontent, $this->xml_escape($c));
-                        } else {
-                            array_push($newcontent, $c);
-                        }
-                    }
-                }
-                if(in_array($tag, $this->ATOM_CONTENT_ELEMENTS)) {
-                    $this->current->$tag = array($origtype, join('',$newcontent));
-                } else {
-                    $this->current->$tag = join('',$newcontent);
-                }
-                $this->in_content = array();
-            } else if($this->in_content[$ccount-1][0] == $tag &&
-                $this->in_content[$ccount-1][1] == $this->depth) {
-                $this->in_content[$ccount-1][2] = substr($this->in_content[$ccount-1][2],0,-1) . "/>";
-            } else {
-                # else, just finalize the current element's content
-                $endtag = $this->ns_to_prefix($name);
-                array_push($this->in_content, array($tag, $this->depth, "</$endtag[1]>"));
-            }
-        }
-
-        array_shift($this->ns_contexts);
-
-        $this->depth--;
-
-        if($name == ($this->NS . ':entry')) {
-            array_push($this->feed->entries, $this->current);
-            $this->current = null;
-        }
-
-        $this->_p("end_element('$name')");
-    }
-
-    function start_ns($parser, $prefix, $uri) {
-        $this->_p("starting: " . $prefix . ":" . $uri);
-        array_push($this->ns_decls, array($prefix,$uri));
-    }
-
-    function end_ns($parser, $prefix) {
-        $this->_p("ending: #" . $prefix . "#");
-    }
-
-    function cdata($parser, $data) {
-        $this->_p("data: #" . str_replace(array("\n"), array("\\n"), trim($data)) . "#");
-        if(!empty($this->in_content)) {
-            array_push($this->in_content, $data);
-        }
-    }
-
-    function _default($parser, $data) {
-        # when does this gets called?
-    }
-
-
-    function ns_to_prefix($qname, $attr=false) {
-        # split 'http://www.w3.org/1999/xhtml:div' into ('http','//www.w3.org/1999/xhtml','div')
-        $components = explode(":", $qname);
-
-        # grab the last one (e.g 'div')
-        $name = array_pop($components);
-
-        if(!empty($components)) {
-            # re-join back the namespace component
-            $ns = join(":",$components);
-            foreach($this->ns_contexts as $context) {
-                foreach($context as $mapping) {
-                    if($mapping[1] == $ns && strlen($mapping[0]) > 0) {
-                        return array($mapping, "$mapping[0]:$name");
-                    }
-                }
-            }
-        }
-
-        if($attr) {
-            return array(null, $name);
-        } else {
-            foreach($this->ns_contexts as $context) {
-                foreach($context as $mapping) {
-                    if(strlen($mapping[0]) == 0) {
-                        return array($mapping, $name);
-                    }
-                }
-            }
-        }
-    }
-
-    function is_declared_content_ns($new_mapping) {
-        foreach($this->content_ns_contexts as $context) {
-            foreach($context as $mapping) {
-                if($new_mapping == $mapping) {
-                    return true;
-                }
-            }
-        }
-        return false;
-    }
-
-    function xml_escape($string)
-    {
-             return str_replace(array('&','"',"'",'<','>'),
-                array('&amp;','&quot;','&apos;','&lt;','&gt;'),
-                $string );
-    }
-}
+}
\ No newline at end of file
Index: www/wp-includes/autoload/customize/class-wp-customize-image-control.php
===================================================================
--- www/wp-includes/autoload/customize/class-wp-customize-image-control.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/customize/class-wp-customize-image-control.php	(revision UNDEFINED)
@@ -1,77 +0,0 @@
-<?php
-/**
- * Customize API: WP_Customize_Image_Control class
- *
- * @package WordPress
- * @subpackage Customize
- * @since 4.4.0
- */
-
-/**
- * Customize Image Control class.
- *
- * @since 3.4.0
- *
- * @see WP_Customize_Upload_Control
- */
-class WP_Customize_Image_Control extends WP_Customize_Upload_Control {
-	public $type = 'image';
-	public $mime_type = 'image';
-
-	/**
-	 * Constructor.
-	 *
-	 * @since 3.4.0
-	 * @uses WP_Customize_Upload_Control::__construct()
-	 *
-	 * @param WP_Customize_Manager $manager Customizer bootstrap instance.
-	 * @param string               $id      Control ID.
-	 * @param array                $args    Optional. Arguments to override class property defaults.
-	 */
-	public function __construct( $manager, $id, $args = array() ) {
-		parent::__construct( $manager, $id, $args );
-
-		$this->button_labels = wp_parse_args( $this->button_labels, array(
-			'select'       => __( 'Select Image' ),
-			'change'       => __( 'Change Image' ),
-			'remove'       => __( 'Remove' ),
-			'default'      => __( 'Default' ),
-			'placeholder'  => __( 'No image selected' ),
-			'frame_title'  => __( 'Select Image' ),
-			'frame_button' => __( 'Choose Image' ),
-		) );
-	}
-
-	/**
-	 * @since 3.4.2
-	 * @deprecated 4.1.0
-	 */
-	public function prepare_control() {}
-
-	/**
-	 * @since 3.4.0
-	 * @deprecated 4.1.0
-	 *
-	 * @param string $id
-	 * @param string $label
-	 * @param mixed $callback
-	 */
-	public function add_tab( $id, $label, $callback ) {}
-
-	/**
-	 * @since 3.4.0
-	 * @deprecated 4.1.0
-	 *
-	 * @param string $id
-	 */
-	public function remove_tab( $id ) {}
-
-	/**
-	 * @since 3.4.0
-	 * @deprecated 4.1.0
-	 *
-	 * @param string $url
-	 * @param string $thumbnail_url
-	 */
-	public function print_tab_image( $url, $thumbnail_url = null ) {}
-}
Index: www/wp-includes/autoload/customize/class-wp-widget-form-customize-control.php
===================================================================
--- www/wp-includes/autoload/customize/class-wp-widget-form-customize-control.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/customize/class-wp-widget-form-customize-control.php	(revision UNDEFINED)
@@ -1,77 +0,0 @@
-<?php
-/**
- * Customize API: WP_Widget_Form_Customize_Control class
- *
- * @package WordPress
- * @subpackage Customize
- * @since 4.4.0
- */
-
-/**
- * Widget Form Customize Control class.
- *
- * @since 3.9.0
- *
- * @see WP_Customize_Control
- */
-class WP_Widget_Form_Customize_Control extends WP_Customize_Control {
-	public $type = 'widget_form';
-	public $widget_id;
-	public $widget_id_base;
-	public $sidebar_id;
-	public $is_new = false;
-	public $width;
-	public $height;
-	public $is_wide = false;
-
-	/**
-	 * Gather control params for exporting to JavaScript.
-	 *
-	 * @global array $wp_registered_widgets
-	 */
-	public function to_json() {
-		global $wp_registered_widgets;
-
-		parent::to_json();
-		$exported_properties = array( 'widget_id', 'widget_id_base', 'sidebar_id', 'width', 'height', 'is_wide' );
-		foreach ( $exported_properties as $key ) {
-			$this->json[ $key ] = $this->$key;
-		}
-
-		// Get the widget_control and widget_content.
-		require_once ABSPATH . '/wp-admin/includes/widgets.php';
-
-		$widget = $wp_registered_widgets[ $this->widget_id ];
-		if ( ! isset( $widget['params'][0] ) ) {
-			$widget['params'][0] = array();
-		}
-
-		$args = array(
-			'widget_id' => $widget['id'],
-			'widget_name' => $widget['name'],
-		);
-
-		$args = wp_list_widget_controls_dynamic_sidebar( array( 0 => $args, 1 => $widget['params'][0] ) );
-		$widget_control_parts = $this->manager->widgets->get_widget_control_parts( $args );
-
-		$this->json['widget_control'] = $widget_control_parts['control'];
-		$this->json['widget_content'] = $widget_control_parts['content'];
-	}
-
-	/**
-	 * Override render_content to be no-op since content is exported via to_json for deferred embedding.
-	 */
-	public function render_content() {}
-
-	/**
-	 * Whether the current widget is rendered on the page.
-	 *
-	 * @since 4.0.0
-	 * @access public
-	 *
-	 * @return bool Whether the widget is rendered.
-	 */
-	public function active_callback() {
-		return $this->manager->widgets->is_widget_rendered( $this->widget_id );
-	}
-}
Index: www/wp-includes/autoload/id3/ID3/license.txt
===================================================================
--- www/wp-includes/autoload/id3/ID3/license.txt	(revision UNDEFINED)
+++ www/wp-includes/autoload/id3/ID3/license.txt	(revision UNDEFINED)
@@ -1,29 +0,0 @@
-/////////////////////////////////////////////////////////////////
-/// getID3() by James Heinrich <info@getid3.org>               //
-//  available at http://getid3.sourceforge.net                 //
-//            or http://www.getid3.org                         //
-//          also https://github.com/JamesHeinrich/getID3       //
-/////////////////////////////////////////////////////////////////
-
-*****************************************************************
-*****************************************************************
-
-   getID3() is released under multiple licenses. You may choose
-   from the following licenses, and use getID3 according to the
-   terms of the license most suitable to your project.
-
-GNU GPL: https://gnu.org/licenses/gpl.html                   (v3)
-         https://gnu.org/licenses/old-licenses/gpl-2.0.html  (v2)
-         https://gnu.org/licenses/old-licenses/gpl-1.0.html  (v1)
-
-GNU LGPL: https://gnu.org/licenses/lgpl.html                 (v3)
-
-Mozilla MPL: http://www.mozilla.org/MPL/2.0/                 (v2)
-
-getID3 Commercial License: http://getid3.org/#gCL (payment required)
-
-*****************************************************************
-*****************************************************************
-
-Copies of each of the above licenses are included in the 'licenses'
-directory of the getID3 distribution.
Index: www/wp-admin/post-new.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/post-new.php	(revision 38565)
+++ www/wp-admin/post-new.php	(revision 38565)
@@ -1,86 +0,0 @@
-<?php
-/**
- * New Post Administration Screen.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** Load WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-/**
- * @global string  $post_type
- * @global object  $post_type_object
- * @global WP_Post $post
- */
-global $post_type, $post_type_object, $post;
-
-if ( ! isset( $_GET['post_type'] ) ) {
-	$post_type = 'post';
-} elseif ( in_array( $_GET['post_type'], get_post_types( array('show_ui' => true ) ) ) ) {
-	$post_type = $_GET['post_type'];
-} else {
-	wp_die( __( 'Invalid post type.' ) );
-}
-$post_type_object = get_post_type_object( $post_type );
-
-if ( 'post' == $post_type ) {
-	$parent_file = 'edit.php';
-	$submenu_file = 'post-new.php';
-} elseif ( 'attachment' == $post_type ) {
-	if ( wp_redirect( admin_url( 'media-new.php' ) ) )
-		exit;
-} else {
-	$submenu_file = "post-new.php?post_type=$post_type";
-	if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true ) {
-		$parent_file = $post_type_object->show_in_menu;
-		// What if there isn't a post-new.php item for this post type?
-		if ( ! isset( $_registered_pages[ get_plugin_page_hookname( "post-new.php?post_type=$post_type", $post_type_object->show_in_menu ) ] ) ) {
-			if (	isset( $_registered_pages[ get_plugin_page_hookname( "edit.php?post_type=$post_type", $post_type_object->show_in_menu ) ] ) ) {
-				// Fall back to edit.php for that post type, if it exists
-				$submenu_file = "edit.php?post_type=$post_type";
-			} else {
-				// Otherwise, give up and highlight the parent
-				$submenu_file = $parent_file;
-			}
-		}
-	} else {
-		$parent_file = "edit.php?post_type=$post_type";
-	}
-}
-
-$title = $post_type_object->labels->add_new_item;
-
-$editing = true;
-
-if ( ! current_user_can( $post_type_object->cap->edit_posts ) || ! current_user_can( $post_type_object->cap->create_posts ) ) {
-	wp_die(
-		'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-		'<p>' . __( 'Sorry, you are not allowed to create posts as this user.' ) . '</p>',
-		403
-	);
-}
-
-// Schedule auto-draft cleanup
-if ( ! wp_next_scheduled( 'wp_scheduled_auto_draft_delete' ) )
-	wp_schedule_event( time(), 'daily', 'wp_scheduled_auto_draft_delete' );
-
-wp_enqueue_script( 'autosave' );
-
-if ( is_multisite() ) {
-	add_action( 'admin_footer', '_admin_notice_post_locked' );
-} else {
-	$check_users = get_users( array( 'fields' => 'ID', 'number' => 2 ) );
-
-	if ( count( $check_users ) > 1 )
-		add_action( 'admin_footer', '_admin_notice_post_locked' );
-
-	unset( $check_users );
-}
-
-// Show post form.
-$post = get_default_post_to_edit( $post_type, true );
-$post_ID = $post->ID;
-include( ABSPATH . 'wp-admin/edit-form-advanced.php' );
-include( ABSPATH . 'wp-admin/admin-footer.php' );
Index: www/wp-includes/customize/class-wp-customize-color-control.php
===================================================================
--- www/wp-includes/customize/class-wp-customize-color-control.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Color_Control.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/simplepie/Parse/Date.php
===================================================================
--- www/wp-includes/autoload/simplepie/Parse/Date.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/simplepie/Parse/Date.php	(revision UNDEFINED)
@@ -1,984 +0,0 @@
-<?php
-/**
- * SimplePie
- *
- * A PHP-Based RSS and Atom Feed Framework.
- * Takes the hard work out of managing a complete RSS/Atom solution.
- *
- * Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 	* Redistributions of source code must retain the above copyright notice, this list of
- * 	  conditions and the following disclaimer.
- *
- * 	* Redistributions in binary form must reproduce the above copyright notice, this list
- * 	  of conditions and the following disclaimer in the documentation and/or other materials
- * 	  provided with the distribution.
- *
- * 	* Neither the name of the SimplePie Team nor the names of its contributors may be used
- * 	  to endorse or promote products derived from this software without specific prior
- * 	  written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
- * AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * @package SimplePie
- * @version 1.3.1
- * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
- * @author Ryan Parman
- * @author Geoffrey Sneddon
- * @author Ryan McCue
- * @link http://simplepie.org/ SimplePie
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
- */
-
-
-/**
- * Date Parser
- *
- * @package SimplePie
- * @subpackage Parsing
- */
-class SimplePie_Parse_Date
-{
-	/**
-	 * Input data
-	 *
-	 * @access protected
-	 * @var string
-	 */
-	var $date;
-
-	/**
-	 * List of days, calendar day name => ordinal day number in the week
-	 *
-	 * @access protected
-	 * @var array
-	 */
-	var $day = array(
-		// English
-		'mon' => 1,
-		'monday' => 1,
-		'tue' => 2,
-		'tuesday' => 2,
-		'wed' => 3,
-		'wednesday' => 3,
-		'thu' => 4,
-		'thursday' => 4,
-		'fri' => 5,
-		'friday' => 5,
-		'sat' => 6,
-		'saturday' => 6,
-		'sun' => 7,
-		'sunday' => 7,
-		// Dutch
-		'maandag' => 1,
-		'dinsdag' => 2,
-		'woensdag' => 3,
-		'donderdag' => 4,
-		'vrijdag' => 5,
-		'zaterdag' => 6,
-		'zondag' => 7,
-		// French
-		'lundi' => 1,
-		'mardi' => 2,
-		'mercredi' => 3,
-		'jeudi' => 4,
-		'vendredi' => 5,
-		'samedi' => 6,
-		'dimanche' => 7,
-		// German
-		'montag' => 1,
-		'dienstag' => 2,
-		'mittwoch' => 3,
-		'donnerstag' => 4,
-		'freitag' => 5,
-		'samstag' => 6,
-		'sonnabend' => 6,
-		'sonntag' => 7,
-		// Italian
-		'lunedì' => 1,
-		'martedì' => 2,
-		'mercoledì' => 3,
-		'giovedì' => 4,
-		'venerdì' => 5,
-		'sabato' => 6,
-		'domenica' => 7,
-		// Spanish
-		'lunes' => 1,
-		'martes' => 2,
-		'miércoles' => 3,
-		'jueves' => 4,
-		'viernes' => 5,
-		'sábado' => 6,
-		'domingo' => 7,
-		// Finnish
-		'maanantai' => 1,
-		'tiistai' => 2,
-		'keskiviikko' => 3,
-		'torstai' => 4,
-		'perjantai' => 5,
-		'lauantai' => 6,
-		'sunnuntai' => 7,
-		// Hungarian
-		'hétfő' => 1,
-		'kedd' => 2,
-		'szerda' => 3,
-		'csütörtok' => 4,
-		'péntek' => 5,
-		'szombat' => 6,
-		'vasárnap' => 7,
-		// Greek
-		'Δευ' => 1,
-		'Τρι' => 2,
-		'Τετ' => 3,
-		'Πεμ' => 4,
-		'Παρ' => 5,
-		'Σαβ' => 6,
-		'Κυρ' => 7,
-	);
-
-	/**
-	 * List of months, calendar month name => calendar month number
-	 *
-	 * @access protected
-	 * @var array
-	 */
-	var $month = array(
-		// English
-		'jan' => 1,
-		'january' => 1,
-		'feb' => 2,
-		'february' => 2,
-		'mar' => 3,
-		'march' => 3,
-		'apr' => 4,
-		'april' => 4,
-		'may' => 5,
-		// No long form of May
-		'jun' => 6,
-		'june' => 6,
-		'jul' => 7,
-		'july' => 7,
-		'aug' => 8,
-		'august' => 8,
-		'sep' => 9,
-		'september' => 8,
-		'oct' => 10,
-		'october' => 10,
-		'nov' => 11,
-		'november' => 11,
-		'dec' => 12,
-		'december' => 12,
-		// Dutch
-		'januari' => 1,
-		'februari' => 2,
-		'maart' => 3,
-		'april' => 4,
-		'mei' => 5,
-		'juni' => 6,
-		'juli' => 7,
-		'augustus' => 8,
-		'september' => 9,
-		'oktober' => 10,
-		'november' => 11,
-		'december' => 12,
-		// French
-		'janvier' => 1,
-		'février' => 2,
-		'mars' => 3,
-		'avril' => 4,
-		'mai' => 5,
-		'juin' => 6,
-		'juillet' => 7,
-		'août' => 8,
-		'septembre' => 9,
-		'octobre' => 10,
-		'novembre' => 11,
-		'décembre' => 12,
-		// German
-		'januar' => 1,
-		'februar' => 2,
-		'märz' => 3,
-		'april' => 4,
-		'mai' => 5,
-		'juni' => 6,
-		'juli' => 7,
-		'august' => 8,
-		'september' => 9,
-		'oktober' => 10,
-		'november' => 11,
-		'dezember' => 12,
-		// Italian
-		'gennaio' => 1,
-		'febbraio' => 2,
-		'marzo' => 3,
-		'aprile' => 4,
-		'maggio' => 5,
-		'giugno' => 6,
-		'luglio' => 7,
-		'agosto' => 8,
-		'settembre' => 9,
-		'ottobre' => 10,
-		'novembre' => 11,
-		'dicembre' => 12,
-		// Spanish
-		'enero' => 1,
-		'febrero' => 2,
-		'marzo' => 3,
-		'abril' => 4,
-		'mayo' => 5,
-		'junio' => 6,
-		'julio' => 7,
-		'agosto' => 8,
-		'septiembre' => 9,
-		'setiembre' => 9,
-		'octubre' => 10,
-		'noviembre' => 11,
-		'diciembre' => 12,
-		// Finnish
-		'tammikuu' => 1,
-		'helmikuu' => 2,
-		'maaliskuu' => 3,
-		'huhtikuu' => 4,
-		'toukokuu' => 5,
-		'kesäkuu' => 6,
-		'heinäkuu' => 7,
-		'elokuu' => 8,
-		'suuskuu' => 9,
-		'lokakuu' => 10,
-		'marras' => 11,
-		'joulukuu' => 12,
-		// Hungarian
-		'január' => 1,
-		'február' => 2,
-		'március' => 3,
-		'április' => 4,
-		'május' => 5,
-		'június' => 6,
-		'július' => 7,
-		'augusztus' => 8,
-		'szeptember' => 9,
-		'október' => 10,
-		'november' => 11,
-		'december' => 12,
-		// Greek
-		'Ιαν' => 1,
-		'Φεβ' => 2,
-		'Μάώ' => 3,
-		'Μαώ' => 3,
-		'Απρ' => 4,
-		'Μάι' => 5,
-		'Μαϊ' => 5,
-		'Μαι' => 5,
-		'Ιούν' => 6,
-		'Ιον' => 6,
-		'Ιούλ' => 7,
-		'Ιολ' => 7,
-		'Αύγ' => 8,
-		'Αυγ' => 8,
-		'Σεπ' => 9,
-		'Οκτ' => 10,
-		'Νοέ' => 11,
-		'Δεκ' => 12,
-	);
-
-	/**
-	 * List of timezones, abbreviation => offset from UTC
-	 *
-	 * @access protected
-	 * @var array
-	 */
-	var $timezone = array(
-		'ACDT' => 37800,
-		'ACIT' => 28800,
-		'ACST' => 34200,
-		'ACT' => -18000,
-		'ACWDT' => 35100,
-		'ACWST' => 31500,
-		'AEDT' => 39600,
-		'AEST' => 36000,
-		'AFT' => 16200,
-		'AKDT' => -28800,
-		'AKST' => -32400,
-		'AMDT' => 18000,
-		'AMT' => -14400,
-		'ANAST' => 46800,
-		'ANAT' => 43200,
-		'ART' => -10800,
-		'AZOST' => -3600,
-		'AZST' => 18000,
-		'AZT' => 14400,
-		'BIOT' => 21600,
-		'BIT' => -43200,
-		'BOT' => -14400,
-		'BRST' => -7200,
-		'BRT' => -10800,
-		'BST' => 3600,
-		'BTT' => 21600,
-		'CAST' => 18000,
-		'CAT' => 7200,
-		'CCT' => 23400,
-		'CDT' => -18000,
-		'CEDT' => 7200,
-		'CEST' => 7200,
-		'CET' => 3600,
-		'CGST' => -7200,
-		'CGT' => -10800,
-		'CHADT' => 49500,
-		'CHAST' => 45900,
-		'CIST' => -28800,
-		'CKT' => -36000,
-		'CLDT' => -10800,
-		'CLST' => -14400,
-		'COT' => -18000,
-		'CST' => -21600,
-		'CVT' => -3600,
-		'CXT' => 25200,
-		'DAVT' => 25200,
-		'DTAT' => 36000,
-		'EADT' => -18000,
-		'EAST' => -21600,
-		'EAT' => 10800,
-		'ECT' => -18000,
-		'EDT' => -14400,
-		'EEST' => 10800,
-		'EET' => 7200,
-		'EGT' => -3600,
-		'EKST' => 21600,
-		'EST' => -18000,
-		'FJT' => 43200,
-		'FKDT' => -10800,
-		'FKST' => -14400,
-		'FNT' => -7200,
-		'GALT' => -21600,
-		'GEDT' => 14400,
-		'GEST' => 10800,
-		'GFT' => -10800,
-		'GILT' => 43200,
-		'GIT' => -32400,
-		'GST' => 14400,
-		'GST' => -7200,
-		'GYT' => -14400,
-		'HAA' => -10800,
-		'HAC' => -18000,
-		'HADT' => -32400,
-		'HAE' => -14400,
-		'HAP' => -25200,
-		'HAR' => -21600,
-		'HAST' => -36000,
-		'HAT' => -9000,
-		'HAY' => -28800,
-		'HKST' => 28800,
-		'HMT' => 18000,
-		'HNA' => -14400,
-		'HNC' => -21600,
-		'HNE' => -18000,
-		'HNP' => -28800,
-		'HNR' => -25200,
-		'HNT' => -12600,
-		'HNY' => -32400,
-		'IRDT' => 16200,
-		'IRKST' => 32400,
-		'IRKT' => 28800,
-		'IRST' => 12600,
-		'JFDT' => -10800,
-		'JFST' => -14400,
-		'JST' => 32400,
-		'KGST' => 21600,
-		'KGT' => 18000,
-		'KOST' => 39600,
-		'KOVST' => 28800,
-		'KOVT' => 25200,
-		'KRAST' => 28800,
-		'KRAT' => 25200,
-		'KST' => 32400,
-		'LHDT' => 39600,
-		'LHST' => 37800,
-		'LINT' => 50400,
-		'LKT' => 21600,
-		'MAGST' => 43200,
-		'MAGT' => 39600,
-		'MAWT' => 21600,
-		'MDT' => -21600,
-		'MESZ' => 7200,
-		'MEZ' => 3600,
-		'MHT' => 43200,
-		'MIT' => -34200,
-		'MNST' => 32400,
-		'MSDT' => 14400,
-		'MSST' => 10800,
-		'MST' => -25200,
-		'MUT' => 14400,
-		'MVT' => 18000,
-		'MYT' => 28800,
-		'NCT' => 39600,
-		'NDT' => -9000,
-		'NFT' => 41400,
-		'NMIT' => 36000,
-		'NOVST' => 25200,
-		'NOVT' => 21600,
-		'NPT' => 20700,
-		'NRT' => 43200,
-		'NST' => -12600,
-		'NUT' => -39600,
-		'NZDT' => 46800,
-		'NZST' => 43200,
-		'OMSST' => 25200,
-		'OMST' => 21600,
-		'PDT' => -25200,
-		'PET' => -18000,
-		'PETST' => 46800,
-		'PETT' => 43200,
-		'PGT' => 36000,
-		'PHOT' => 46800,
-		'PHT' => 28800,
-		'PKT' => 18000,
-		'PMDT' => -7200,
-		'PMST' => -10800,
-		'PONT' => 39600,
-		'PST' => -28800,
-		'PWT' => 32400,
-		'PYST' => -10800,
-		'PYT' => -14400,
-		'RET' => 14400,
-		'ROTT' => -10800,
-		'SAMST' => 18000,
-		'SAMT' => 14400,
-		'SAST' => 7200,
-		'SBT' => 39600,
-		'SCDT' => 46800,
-		'SCST' => 43200,
-		'SCT' => 14400,
-		'SEST' => 3600,
-		'SGT' => 28800,
-		'SIT' => 28800,
-		'SRT' => -10800,
-		'SST' => -39600,
-		'SYST' => 10800,
-		'SYT' => 7200,
-		'TFT' => 18000,
-		'THAT' => -36000,
-		'TJT' => 18000,
-		'TKT' => -36000,
-		'TMT' => 18000,
-		'TOT' => 46800,
-		'TPT' => 32400,
-		'TRUT' => 36000,
-		'TVT' => 43200,
-		'TWT' => 28800,
-		'UYST' => -7200,
-		'UYT' => -10800,
-		'UZT' => 18000,
-		'VET' => -14400,
-		'VLAST' => 39600,
-		'VLAT' => 36000,
-		'VOST' => 21600,
-		'VUT' => 39600,
-		'WAST' => 7200,
-		'WAT' => 3600,
-		'WDT' => 32400,
-		'WEST' => 3600,
-		'WFT' => 43200,
-		'WIB' => 25200,
-		'WIT' => 32400,
-		'WITA' => 28800,
-		'WKST' => 18000,
-		'WST' => 28800,
-		'YAKST' => 36000,
-		'YAKT' => 32400,
-		'YAPT' => 36000,
-		'YEKST' => 21600,
-		'YEKT' => 18000,
-	);
-
-	/**
-	 * Cached PCRE for SimplePie_Parse_Date::$day
-	 *
-	 * @access protected
-	 * @var string
-	 */
-	var $day_pcre;
-
-	/**
-	 * Cached PCRE for SimplePie_Parse_Date::$month
-	 *
-	 * @access protected
-	 * @var string
-	 */
-	var $month_pcre;
-
-	/**
-	 * Array of user-added callback methods
-	 *
-	 * @access private
-	 * @var array
-	 */
-	var $built_in = array();
-
-	/**
-	 * Array of user-added callback methods
-	 *
-	 * @access private
-	 * @var array
-	 */
-	var $user = array();
-
-	/**
-	 * Create new SimplePie_Parse_Date object, and set self::day_pcre,
-	 * self::month_pcre, and self::built_in
-	 *
-	 * @access private
-	 */
-	public function __construct()
-	{
-		$this->day_pcre = '(' . implode(array_keys($this->day), '|') . ')';
-		$this->month_pcre = '(' . implode(array_keys($this->month), '|') . ')';
-
-		static $cache;
-		if (!isset($cache[get_class($this)]))
-		{
-			$all_methods = get_class_methods($this);
-
-			foreach ($all_methods as $method)
-			{
-				if (strtolower(substr($method, 0, 5)) === 'date_')
-				{
-					$cache[get_class($this)][] = $method;
-				}
-			}
-		}
-
-		foreach ($cache[get_class($this)] as $method)
-		{
-			$this->built_in[] = $method;
-		}
-	}
-
-	/**
-	 * Get the object
-	 *
-	 * @access public
-	 */
-	public static function get()
-	{
-		static $object;
-		if (!$object)
-		{
-			$object = new SimplePie_Parse_Date;
-		}
-		return $object;
-	}
-
-	/**
-	 * Parse a date
-	 *
-	 * @final
-	 * @access public
-	 * @param string $date Date to parse
-	 * @return int Timestamp corresponding to date string, or false on failure
-	 */
-	public function parse($date)
-	{
-		foreach ($this->user as $method)
-		{
-			if (($returned = call_user_func($method, $date)) !== false)
-			{
-				return $returned;
-			}
-		}
-
-		foreach ($this->built_in as $method)
-		{
-			if (($returned = call_user_func(array($this, $method), $date)) !== false)
-			{
-				return $returned;
-			}
-		}
-
-		return false;
-	}
-
-	/**
-	 * Add a callback method to parse a date
-	 *
-	 * @final
-	 * @access public
-	 * @param callable $callback
-	 */
-	public function add_callback($callback)
-	{
-		if (is_callable($callback))
-		{
-			$this->user[] = $callback;
-		}
-		else
-		{
-			trigger_error('User-supplied function must be a valid callback', E_USER_WARNING);
-		}
-	}
-
-	/**
-	 * Parse a superset of W3C-DTF (allows hyphens and colons to be omitted, as
-	 * well as allowing any of upper or lower case "T", horizontal tabs, or
-	 * spaces to be used as the time seperator (including more than one))
-	 *
-	 * @access protected
-	 * @return int Timestamp
-	 */
-	public function date_w3cdtf($date)
-	{
-		static $pcre;
-		if (!$pcre)
-		{
-			$year = '([0-9]{4})';
-			$month = $day = $hour = $minute = $second = '([0-9]{2})';
-			$decimal = '([0-9]*)';
-			$zone = '(?:(Z)|([+\-])([0-9]{1,2}):?([0-9]{1,2}))';
-			$pcre = '/^' . $year . '(?:-?' . $month . '(?:-?' . $day . '(?:[Tt\x09\x20]+' . $hour . '(?::?' . $minute . '(?::?' . $second . '(?:.' . $decimal . ')?)?)?' . $zone . ')?)?)?$/';
-		}
-		if (preg_match($pcre, $date, $match))
-		{
-			/*
-			Capturing subpatterns:
-			1: Year
-			2: Month
-			3: Day
-			4: Hour
-			5: Minute
-			6: Second
-			7: Decimal fraction of a second
-			8: Zulu
-			9: Timezone ±
-			10: Timezone hours
-			11: Timezone minutes
-			*/
-
-			// Fill in empty matches
-			for ($i = count($match); $i <= 3; $i++)
-			{
-				$match[$i] = '1';
-			}
-
-			for ($i = count($match); $i <= 7; $i++)
-			{
-				$match[$i] = '0';
-			}
-
-			// Numeric timezone
-			if (isset($match[9]) && $match[9] !== '')
-			{
-				$timezone = $match[10] * 3600;
-				$timezone += $match[11] * 60;
-				if ($match[9] === '-')
-				{
-					$timezone = 0 - $timezone;
-				}
-			}
-			else
-			{
-				$timezone = 0;
-			}
-
-			// Convert the number of seconds to an integer, taking decimals into account
-			$second = round($match[6] + $match[7] / pow(10, strlen($match[7])));
-
-			return gmmktime($match[4], $match[5], $second, $match[2], $match[3], $match[1]) - $timezone;
-		}
-		else
-		{
-			return false;
-		}
-	}
-
-	/**
-	 * Remove RFC822 comments
-	 *
-	 * @access protected
-	 * @param string $data Data to strip comments from
-	 * @return string Comment stripped string
-	 */
-	public function remove_rfc2822_comments($string)
-	{
-		$string = (string) $string;
-		$position = 0;
-		$length = strlen($string);
-		$depth = 0;
-
-		$output = '';
-
-		while ($position < $length && ($pos = strpos($string, '(', $position)) !== false)
-		{
-			$output .= substr($string, $position, $pos - $position);
-			$position = $pos + 1;
-			if ($string[$pos - 1] !== '\\')
-			{
-				$depth++;
-				while ($depth && $position < $length)
-				{
-					$position += strcspn($string, '()', $position);
-					if ($string[$position - 1] === '\\')
-					{
-						$position++;
-						continue;
-					}
-					elseif (isset($string[$position]))
-					{
-						switch ($string[$position])
-						{
-							case '(':
-								$depth++;
-								break;
-
-							case ')':
-								$depth--;
-								break;
-						}
-						$position++;
-					}
-					else
-					{
-						break;
-					}
-				}
-			}
-			else
-			{
-				$output .= '(';
-			}
-		}
-		$output .= substr($string, $position);
-
-		return $output;
-	}
-
-	/**
-	 * Parse RFC2822's date format
-	 *
-	 * @access protected
-	 * @return int Timestamp
-	 */
-	public function date_rfc2822($date)
-	{
-		static $pcre;
-		if (!$pcre)
-		{
-			$wsp = '[\x09\x20]';
-			$fws = '(?:' . $wsp . '+|' . $wsp . '*(?:\x0D\x0A' . $wsp . '+)+)';
-			$optional_fws = $fws . '?';
-			$day_name = $this->day_pcre;
-			$month = $this->month_pcre;
-			$day = '([0-9]{1,2})';
-			$hour = $minute = $second = '([0-9]{2})';
-			$year = '([0-9]{2,4})';
-			$num_zone = '([+\-])([0-9]{2})([0-9]{2})';
-			$character_zone = '([A-Z]{1,5})';
-			$zone = '(?:' . $num_zone . '|' . $character_zone . ')';
-			$pcre = '/(?:' . $optional_fws . $day_name . $optional_fws . ',)?' . $optional_fws . $day . $fws . $month . $fws . $year . $fws . $hour . $optional_fws . ':' . $optional_fws . $minute . '(?:' . $optional_fws . ':' . $optional_fws . $second . ')?' . $fws . $zone . '/i';
-		}
-		if (preg_match($pcre, $this->remove_rfc2822_comments($date), $match))
-		{
-			/*
-			Capturing subpatterns:
-			1: Day name
-			2: Day
-			3: Month
-			4: Year
-			5: Hour
-			6: Minute
-			7: Second
-			8: Timezone ±
-			9: Timezone hours
-			10: Timezone minutes
-			11: Alphabetic timezone
-			*/
-
-			// Find the month number
-			$month = $this->month[strtolower($match[3])];
-
-			// Numeric timezone
-			if ($match[8] !== '')
-			{
-				$timezone = $match[9] * 3600;
-				$timezone += $match[10] * 60;
-				if ($match[8] === '-')
-				{
-					$timezone = 0 - $timezone;
-				}
-			}
-			// Character timezone
-			elseif (isset($this->timezone[strtoupper($match[11])]))
-			{
-				$timezone = $this->timezone[strtoupper($match[11])];
-			}
-			// Assume everything else to be -0000
-			else
-			{
-				$timezone = 0;
-			}
-
-			// Deal with 2/3 digit years
-			if ($match[4] < 50)
-			{
-				$match[4] += 2000;
-			}
-			elseif ($match[4] < 1000)
-			{
-				$match[4] += 1900;
-			}
-
-			// Second is optional, if it is empty set it to zero
-			if ($match[7] !== '')
-			{
-				$second = $match[7];
-			}
-			else
-			{
-				$second = 0;
-			}
-
-			return gmmktime($match[5], $match[6], $second, $month, $match[2], $match[4]) - $timezone;
-		}
-		else
-		{
-			return false;
-		}
-	}
-
-	/**
-	 * Parse RFC850's date format
-	 *
-	 * @access protected
-	 * @return int Timestamp
-	 */
-	public function date_rfc850($date)
-	{
-		static $pcre;
-		if (!$pcre)
-		{
-			$space = '[\x09\x20]+';
-			$day_name = $this->day_pcre;
-			$month = $this->month_pcre;
-			$day = '([0-9]{1,2})';
-			$year = $hour = $minute = $second = '([0-9]{2})';
-			$zone = '([A-Z]{1,5})';
-			$pcre = '/^' . $day_name . ',' . $space . $day . '-' . $month . '-' . $year . $space . $hour . ':' . $minute . ':' . $second . $space . $zone . '$/i';
-		}
-		if (preg_match($pcre, $date, $match))
-		{
-			/*
-			Capturing subpatterns:
-			1: Day name
-			2: Day
-			3: Month
-			4: Year
-			5: Hour
-			6: Minute
-			7: Second
-			8: Timezone
-			*/
-
-			// Month
-			$month = $this->month[strtolower($match[3])];
-
-			// Character timezone
-			if (isset($this->timezone[strtoupper($match[8])]))
-			{
-				$timezone = $this->timezone[strtoupper($match[8])];
-			}
-			// Assume everything else to be -0000
-			else
-			{
-				$timezone = 0;
-			}
-
-			// Deal with 2 digit year
-			if ($match[4] < 50)
-			{
-				$match[4] += 2000;
-			}
-			else
-			{
-				$match[4] += 1900;
-			}
-
-			return gmmktime($match[5], $match[6], $match[7], $month, $match[2], $match[4]) - $timezone;
-		}
-		else
-		{
-			return false;
-		}
-	}
-
-	/**
-	 * Parse C99's asctime()'s date format
-	 *
-	 * @access protected
-	 * @return int Timestamp
-	 */
-	public function date_asctime($date)
-	{
-		static $pcre;
-		if (!$pcre)
-		{
-			$space = '[\x09\x20]+';
-			$wday_name = $this->day_pcre;
-			$mon_name = $this->month_pcre;
-			$day = '([0-9]{1,2})';
-			$hour = $sec = $min = '([0-9]{2})';
-			$year = '([0-9]{4})';
-			$terminator = '\x0A?\x00?';
-			$pcre = '/^' . $wday_name . $space . $mon_name . $space . $day . $space . $hour . ':' . $min . ':' . $sec . $space . $year . $terminator . '$/i';
-		}
-		if (preg_match($pcre, $date, $match))
-		{
-			/*
-			Capturing subpatterns:
-			1: Day name
-			2: Month
-			3: Day
-			4: Hour
-			5: Minute
-			6: Second
-			7: Year
-			*/
-
-			$month = $this->month[strtolower($match[2])];
-			return gmmktime($match[4], $match[5], $match[6], $month, $match[3], $match[7]);
-		}
-		else
-		{
-			return false;
-		}
-	}
-
-	/**
-	 * Parse dates using strtotime()
-	 *
-	 * @access protected
-	 * @return int Timestamp
-	 */
-	public function date_strtotime($date)
-	{
-		$strtotime = strtotime($date);
-		if ($strtotime === -1 || $strtotime === false)
-		{
-			return false;
-		}
-		else
-		{
-			return $strtotime;
-		}
-	}
-}
-
Index: www/wp-includes/class-wp-role.php
===================================================================
--- www/wp-includes/class-wp-role.php	(revision 38565)
+++ www/wp-includes/autoload/role/WP_Role.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/requests/Exception/HTTP/503.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/503.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/503.php	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-<?php
-/**
- * Exception for 503 Service Unavailable responses
- *
- * @package Requests
- */
-
-/**
- * Exception for 503 Service Unavailable responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_503 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 503;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Service Unavailable';
-}
\ No newline at end of file
Index: www/wp-includes/class-wp-http-ixr-client.php
===================================================================
--- www/wp-includes/class-wp-http-ixr-client.php	(revision 38565)
+++ www/wp-includes/autoload/http/WP_HTTP_IXR_Client.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/id3/ID3/module.audio-video.asf.php
===================================================================
--- www/wp-includes/autoload/id3/ID3/module.audio-video.asf.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/id3/ID3/module.audio-video.asf.php	(revision UNDEFINED)
@@ -1,2013 +0,0 @@
-<?php
-/////////////////////////////////////////////////////////////////
-/// getID3() by James Heinrich <info@getid3.org>               //
-//  available at http://getid3.sourceforge.net                 //
-//            or http://www.getid3.org                         //
-//          also https://github.com/JamesHeinrich/getID3       //
-/////////////////////////////////////////////////////////////////
-// See readme.txt for more details                             //
-/////////////////////////////////////////////////////////////////
-//                                                             //
-// module.audio-video.asf.php                                  //
-// module for analyzing ASF, WMA and WMV files                 //
-// dependencies: module.audio-video.riff.php                   //
-//                                                            ///
-/////////////////////////////////////////////////////////////////
-
-getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio-video.riff.php', __FILE__, true);
-
-class getid3_asf extends getid3_handler {
-
-	public function __construct(getID3 $getid3) {
-		parent::__construct($getid3);  // extends getid3_handler::__construct()
-
-		// initialize all GUID constants
-		$GUIDarray = $this->KnownGUIDs();
-		foreach ($GUIDarray as $GUIDname => $hexstringvalue) {
-			if (!defined($GUIDname)) {
-				define($GUIDname, $this->GUIDtoBytestring($hexstringvalue));
-			}
-		}
-	}
-
-	public function Analyze() {
-		$info = &$this->getid3->info;
-
-		// Shortcuts
-		$thisfile_audio = &$info['audio'];
-		$thisfile_video = &$info['video'];
-		$info['asf']  = array();
-		$thisfile_asf = &$info['asf'];
-		$thisfile_asf['comments'] = array();
-		$thisfile_asf_comments    = &$thisfile_asf['comments'];
-		$thisfile_asf['header_object'] = array();
-		$thisfile_asf_headerobject     = &$thisfile_asf['header_object'];
-
-
-		// ASF structure:
-		// * Header Object [required]
-		//   * File Properties Object [required]   (global file attributes)
-		//   * Stream Properties Object [required] (defines media stream & characteristics)
-		//   * Header Extension Object [required]  (additional functionality)
-		//   * Content Description Object          (bibliographic information)
-		//   * Script Command Object               (commands for during playback)
-		//   * Marker Object                       (named jumped points within the file)
-		// * Data Object [required]
-		//   * Data Packets
-		// * Index Object
-
-		// Header Object: (mandatory, one only)
-		// Field Name                   Field Type   Size (bits)
-		// Object ID                    GUID         128             // GUID for header object - GETID3_ASF_Header_Object
-		// Object Size                  QWORD        64              // size of header object, including 30 bytes of Header Object header
-		// Number of Header Objects     DWORD        32              // number of objects in header object
-		// Reserved1                    BYTE         8               // hardcoded: 0x01
-		// Reserved2                    BYTE         8               // hardcoded: 0x02
-
-		$info['fileformat'] = 'asf';
-
-		$this->fseek($info['avdataoffset']);
-		$HeaderObjectData = $this->fread(30);
-
-		$thisfile_asf_headerobject['objectid']      = substr($HeaderObjectData, 0, 16);
-		$thisfile_asf_headerobject['objectid_guid'] = $this->BytestringToGUID($thisfile_asf_headerobject['objectid']);
-		if ($thisfile_asf_headerobject['objectid'] != GETID3_ASF_Header_Object) {
-			unset($info['fileformat'], $info['asf']);
-			return $this->error('ASF header GUID {'.$this->BytestringToGUID($thisfile_asf_headerobject['objectid']).'} does not match expected "GETID3_ASF_Header_Object" GUID {'.$this->BytestringToGUID(GETID3_ASF_Header_Object).'}');
-		}
-		$thisfile_asf_headerobject['objectsize']    = getid3_lib::LittleEndian2Int(substr($HeaderObjectData, 16, 8));
-		$thisfile_asf_headerobject['headerobjects'] = getid3_lib::LittleEndian2Int(substr($HeaderObjectData, 24, 4));
-		$thisfile_asf_headerobject['reserved1']     = getid3_lib::LittleEndian2Int(substr($HeaderObjectData, 28, 1));
-		$thisfile_asf_headerobject['reserved2']     = getid3_lib::LittleEndian2Int(substr($HeaderObjectData, 29, 1));
-
-		$NextObjectOffset = $this->ftell();
-		$ASFHeaderData = $this->fread($thisfile_asf_headerobject['objectsize'] - 30);
-		$offset = 0;
-
-		for ($HeaderObjectsCounter = 0; $HeaderObjectsCounter < $thisfile_asf_headerobject['headerobjects']; $HeaderObjectsCounter++) {
-			$NextObjectGUID = substr($ASFHeaderData, $offset, 16);
-			$offset += 16;
-			$NextObjectGUIDtext = $this->BytestringToGUID($NextObjectGUID);
-			$NextObjectSize = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));
-			$offset += 8;
-			switch ($NextObjectGUID) {
-
-				case GETID3_ASF_File_Properties_Object:
-					// File Properties Object: (mandatory, one only)
-					// Field Name                   Field Type   Size (bits)
-					// Object ID                    GUID         128             // GUID for file properties object - GETID3_ASF_File_Properties_Object
-					// Object Size                  QWORD        64              // size of file properties object, including 104 bytes of File Properties Object header
-					// File ID                      GUID         128             // unique ID - identical to File ID in Data Object
-					// File Size                    QWORD        64              // entire file in bytes. Invalid if Broadcast Flag == 1
-					// Creation Date                QWORD        64              // date & time of file creation. Maybe invalid if Broadcast Flag == 1
-					// Data Packets Count           QWORD        64              // number of data packets in Data Object. Invalid if Broadcast Flag == 1
-					// Play Duration                QWORD        64              // playtime, in 100-nanosecond units. Invalid if Broadcast Flag == 1
-					// Send Duration                QWORD        64              // time needed to send file, in 100-nanosecond units. Players can ignore this value. Invalid if Broadcast Flag == 1
-					// Preroll                      QWORD        64              // time to buffer data before starting to play file, in 1-millisecond units. If <> 0, PlayDuration and PresentationTime have been offset by this amount
-					// Flags                        DWORD        32              //
-					// * Broadcast Flag             bits         1  (0x01)       // file is currently being written, some header values are invalid
-					// * Seekable Flag              bits         1  (0x02)       // is file seekable
-					// * Reserved                   bits         30 (0xFFFFFFFC) // reserved - set to zero
-					// Minimum Data Packet Size     DWORD        32              // in bytes. should be same as Maximum Data Packet Size. Invalid if Broadcast Flag == 1
-					// Maximum Data Packet Size     DWORD        32              // in bytes. should be same as Minimum Data Packet Size. Invalid if Broadcast Flag == 1
-					// Maximum Bitrate              DWORD        32              // maximum instantaneous bitrate in bits per second for entire file, including all data streams and ASF overhead
-
-					// shortcut
-					$thisfile_asf['file_properties_object'] = array();
-					$thisfile_asf_filepropertiesobject      = &$thisfile_asf['file_properties_object'];
-
-					$thisfile_asf_filepropertiesobject['offset']             = $NextObjectOffset + $offset;
-					$thisfile_asf_filepropertiesobject['objectid']           = $NextObjectGUID;
-					$thisfile_asf_filepropertiesobject['objectid_guid']      = $NextObjectGUIDtext;
-					$thisfile_asf_filepropertiesobject['objectsize']         = $NextObjectSize;
-					$thisfile_asf_filepropertiesobject['fileid']             = substr($ASFHeaderData, $offset, 16);
-					$offset += 16;
-					$thisfile_asf_filepropertiesobject['fileid_guid']        = $this->BytestringToGUID($thisfile_asf_filepropertiesobject['fileid']);
-					$thisfile_asf_filepropertiesobject['filesize']           = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));
-					$offset += 8;
-					$thisfile_asf_filepropertiesobject['creation_date']      = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));
-					$thisfile_asf_filepropertiesobject['creation_date_unix'] = $this->FILETIMEtoUNIXtime($thisfile_asf_filepropertiesobject['creation_date']);
-					$offset += 8;
-					$thisfile_asf_filepropertiesobject['data_packets']       = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));
-					$offset += 8;
-					$thisfile_asf_filepropertiesobject['play_duration']      = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));
-					$offset += 8;
-					$thisfile_asf_filepropertiesobject['send_duration']      = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));
-					$offset += 8;
-					$thisfile_asf_filepropertiesobject['preroll']            = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));
-					$offset += 8;
-					$thisfile_asf_filepropertiesobject['flags_raw']          = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
-					$offset += 4;
-					$thisfile_asf_filepropertiesobject['flags']['broadcast'] = (bool) ($thisfile_asf_filepropertiesobject['flags_raw'] & 0x0001);
-					$thisfile_asf_filepropertiesobject['flags']['seekable']  = (bool) ($thisfile_asf_filepropertiesobject['flags_raw'] & 0x0002);
-
-					$thisfile_asf_filepropertiesobject['min_packet_size']    = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
-					$offset += 4;
-					$thisfile_asf_filepropertiesobject['max_packet_size']    = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
-					$offset += 4;
-					$thisfile_asf_filepropertiesobject['max_bitrate']        = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
-					$offset += 4;
-
-					if ($thisfile_asf_filepropertiesobject['flags']['broadcast']) {
-
-						// broadcast flag is set, some values invalid
-						unset($thisfile_asf_filepropertiesobject['filesize']);
-						unset($thisfile_asf_filepropertiesobject['data_packets']);
-						unset($thisfile_asf_filepropertiesobject['play_duration']);
-						unset($thisfile_asf_filepropertiesobject['send_duration']);
-						unset($thisfile_asf_filepropertiesobject['min_packet_size']);
-						unset($thisfile_asf_filepropertiesobject['max_packet_size']);
-
-					} else {
-
-						// broadcast flag NOT set, perform calculations
-						$info['playtime_seconds'] = ($thisfile_asf_filepropertiesobject['play_duration'] / 10000000) - ($thisfile_asf_filepropertiesobject['preroll'] / 1000);
-
-						//$info['bitrate'] = $thisfile_asf_filepropertiesobject['max_bitrate'];
-						$info['bitrate'] = ((isset($thisfile_asf_filepropertiesobject['filesize']) ? $thisfile_asf_filepropertiesobject['filesize'] : $info['filesize']) * 8) / $info['playtime_seconds'];
-					}
-					break;
-
-				case GETID3_ASF_Stream_Properties_Object:
-					// Stream Properties Object: (mandatory, one per media stream)
-					// Field Name                   Field Type   Size (bits)
-					// Object ID                    GUID         128             // GUID for stream properties object - GETID3_ASF_Stream_Properties_Object
-					// Object Size                  QWORD        64              // size of stream properties object, including 78 bytes of Stream Properties Object header
-					// Stream Type                  GUID         128             // GETID3_ASF_Audio_Media, GETID3_ASF_Video_Media or GETID3_ASF_Command_Media
-					// Error Correction Type        GUID         128             // GETID3_ASF_Audio_Spread for audio-only streams, GETID3_ASF_No_Error_Correction for other stream types
-					// Time Offset                  QWORD        64              // 100-nanosecond units. typically zero. added to all timestamps of samples in the stream
-					// Type-Specific Data Length    DWORD        32              // number of bytes for Type-Specific Data field
-					// Error Correction Data Length DWORD        32              // number of bytes for Error Correction Data field
-					// Flags                        WORD         16              //
-					// * Stream Number              bits         7 (0x007F)      // number of this stream.  1 <= valid <= 127
-					// * Reserved                   bits         8 (0x7F80)      // reserved - set to zero
-					// * Encrypted Content Flag     bits         1 (0x8000)      // stream contents encrypted if set
-					// Reserved                     DWORD        32              // reserved - set to zero
-					// Type-Specific Data           BYTESTREAM   variable        // type-specific format data, depending on value of Stream Type
-					// Error Correction Data        BYTESTREAM   variable        // error-correction-specific format data, depending on value of Error Correct Type
-
-					// There is one GETID3_ASF_Stream_Properties_Object for each stream (audio, video) but the
-					// stream number isn't known until halfway through decoding the structure, hence it
-					// it is decoded to a temporary variable and then stuck in the appropriate index later
-
-					$StreamPropertiesObjectData['offset']             = $NextObjectOffset + $offset;
-					$StreamPropertiesObjectData['objectid']           = $NextObjectGUID;
-					$StreamPropertiesObjectData['objectid_guid']      = $NextObjectGUIDtext;
-					$StreamPropertiesObjectData['objectsize']         = $NextObjectSize;
-					$StreamPropertiesObjectData['stream_type']        = substr($ASFHeaderData, $offset, 16);
-					$offset += 16;
-					$StreamPropertiesObjectData['stream_type_guid']   = $this->BytestringToGUID($StreamPropertiesObjectData['stream_type']);
-					$StreamPropertiesObjectData['error_correct_type'] = substr($ASFHeaderData, $offset, 16);
-					$offset += 16;
-					$StreamPropertiesObjectData['error_correct_guid'] = $this->BytestringToGUID($StreamPropertiesObjectData['error_correct_type']);
-					$StreamPropertiesObjectData['time_offset']        = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));
-					$offset += 8;
-					$StreamPropertiesObjectData['type_data_length']   = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
-					$offset += 4;
-					$StreamPropertiesObjectData['error_data_length']  = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
-					$offset += 4;
-					$StreamPropertiesObjectData['flags_raw']          = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-					$offset += 2;
-					$StreamPropertiesObjectStreamNumber               = $StreamPropertiesObjectData['flags_raw'] & 0x007F;
-					$StreamPropertiesObjectData['flags']['encrypted'] = (bool) ($StreamPropertiesObjectData['flags_raw'] & 0x8000);
-
-					$offset += 4; // reserved - DWORD
-					$StreamPropertiesObjectData['type_specific_data'] = substr($ASFHeaderData, $offset, $StreamPropertiesObjectData['type_data_length']);
-					$offset += $StreamPropertiesObjectData['type_data_length'];
-					$StreamPropertiesObjectData['error_correct_data'] = substr($ASFHeaderData, $offset, $StreamPropertiesObjectData['error_data_length']);
-					$offset += $StreamPropertiesObjectData['error_data_length'];
-
-					switch ($StreamPropertiesObjectData['stream_type']) {
-
-						case GETID3_ASF_Audio_Media:
-							$thisfile_audio['dataformat']   = (!empty($thisfile_audio['dataformat'])   ? $thisfile_audio['dataformat']   : 'asf');
-							$thisfile_audio['bitrate_mode'] = (!empty($thisfile_audio['bitrate_mode']) ? $thisfile_audio['bitrate_mode'] : 'cbr');
-
-							$audiodata = getid3_riff::parseWAVEFORMATex(substr($StreamPropertiesObjectData['type_specific_data'], 0, 16));
-							unset($audiodata['raw']);
-							$thisfile_audio = getid3_lib::array_merge_noclobber($audiodata, $thisfile_audio);
-							break;
-
-						case GETID3_ASF_Video_Media:
-							$thisfile_video['dataformat']   = (!empty($thisfile_video['dataformat'])   ? $thisfile_video['dataformat']   : 'asf');
-							$thisfile_video['bitrate_mode'] = (!empty($thisfile_video['bitrate_mode']) ? $thisfile_video['bitrate_mode'] : 'cbr');
-							break;
-
-						case GETID3_ASF_Command_Media:
-						default:
-							// do nothing
-							break;
-
-					}
-
-					$thisfile_asf['stream_properties_object'][$StreamPropertiesObjectStreamNumber] = $StreamPropertiesObjectData;
-					unset($StreamPropertiesObjectData); // clear for next stream, if any
-					break;
-
-				case GETID3_ASF_Header_Extension_Object:
-					// Header Extension Object: (mandatory, one only)
-					// Field Name                   Field Type   Size (bits)
-					// Object ID                    GUID         128             // GUID for Header Extension object - GETID3_ASF_Header_Extension_Object
-					// Object Size                  QWORD        64              // size of Header Extension object, including 46 bytes of Header Extension Object header
-					// Reserved Field 1             GUID         128             // hardcoded: GETID3_ASF_Reserved_1
-					// Reserved Field 2             WORD         16              // hardcoded: 0x00000006
-					// Header Extension Data Size   DWORD        32              // in bytes. valid: 0, or > 24. equals object size minus 46
-					// Header Extension Data        BYTESTREAM   variable        // array of zero or more extended header objects
-
-					// shortcut
-					$thisfile_asf['header_extension_object'] = array();
-					$thisfile_asf_headerextensionobject      = &$thisfile_asf['header_extension_object'];
-
-					$thisfile_asf_headerextensionobject['offset']              = $NextObjectOffset + $offset;
-					$thisfile_asf_headerextensionobject['objectid']            = $NextObjectGUID;
-					$thisfile_asf_headerextensionobject['objectid_guid']       = $NextObjectGUIDtext;
-					$thisfile_asf_headerextensionobject['objectsize']          = $NextObjectSize;
-					$thisfile_asf_headerextensionobject['reserved_1']          = substr($ASFHeaderData, $offset, 16);
-					$offset += 16;
-					$thisfile_asf_headerextensionobject['reserved_1_guid']     = $this->BytestringToGUID($thisfile_asf_headerextensionobject['reserved_1']);
-					if ($thisfile_asf_headerextensionobject['reserved_1'] != GETID3_ASF_Reserved_1) {
-						$info['warning'][] = 'header_extension_object.reserved_1 GUID ('.$this->BytestringToGUID($thisfile_asf_headerextensionobject['reserved_1']).') does not match expected "GETID3_ASF_Reserved_1" GUID ('.$this->BytestringToGUID(GETID3_ASF_Reserved_1).')';
-						//return false;
-						break;
-					}
-					$thisfile_asf_headerextensionobject['reserved_2']          = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-					$offset += 2;
-					if ($thisfile_asf_headerextensionobject['reserved_2'] != 6) {
-						$info['warning'][] = 'header_extension_object.reserved_2 ('.getid3_lib::PrintHexBytes($thisfile_asf_headerextensionobject['reserved_2']).') does not match expected value of "6"';
-						//return false;
-						break;
-					}
-					$thisfile_asf_headerextensionobject['extension_data_size'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
-					$offset += 4;
-					$thisfile_asf_headerextensionobject['extension_data']      =                              substr($ASFHeaderData, $offset, $thisfile_asf_headerextensionobject['extension_data_size']);
-					$unhandled_sections = 0;
-					$thisfile_asf_headerextensionobject['extension_data_parsed'] = $this->HeaderExtensionObjectDataParse($thisfile_asf_headerextensionobject['extension_data'], $unhandled_sections);
-					if ($unhandled_sections === 0) {
-						unset($thisfile_asf_headerextensionobject['extension_data']);
-					}
-					$offset += $thisfile_asf_headerextensionobject['extension_data_size'];
-					break;
-
-				case GETID3_ASF_Codec_List_Object:
-					// Codec List Object: (optional, one only)
-					// Field Name                   Field Type   Size (bits)
-					// Object ID                    GUID         128             // GUID for Codec List object - GETID3_ASF_Codec_List_Object
-					// Object Size                  QWORD        64              // size of Codec List object, including 44 bytes of Codec List Object header
-					// Reserved                     GUID         128             // hardcoded: 86D15241-311D-11D0-A3A4-00A0C90348F6
-					// Codec Entries Count          DWORD        32              // number of entries in Codec Entries array
-					// Codec Entries                array of:    variable        //
-					// * Type                       WORD         16              // 0x0001 = Video Codec, 0x0002 = Audio Codec, 0xFFFF = Unknown Codec
-					// * Codec Name Length          WORD         16              // number of Unicode characters stored in the Codec Name field
-					// * Codec Name                 WCHAR        variable        // array of Unicode characters - name of codec used to create the content
-					// * Codec Description Length   WORD         16              // number of Unicode characters stored in the Codec Description field
-					// * Codec Description          WCHAR        variable        // array of Unicode characters - description of format used to create the content
-					// * Codec Information Length   WORD         16              // number of Unicode characters stored in the Codec Information field
-					// * Codec Information          BYTESTREAM   variable        // opaque array of information bytes about the codec used to create the content
-
-					// shortcut
-					$thisfile_asf['codec_list_object'] = array();
-					$thisfile_asf_codeclistobject      = &$thisfile_asf['codec_list_object'];
-
-					$thisfile_asf_codeclistobject['offset']                    = $NextObjectOffset + $offset;
-					$thisfile_asf_codeclistobject['objectid']                  = $NextObjectGUID;
-					$thisfile_asf_codeclistobject['objectid_guid']             = $NextObjectGUIDtext;
-					$thisfile_asf_codeclistobject['objectsize']                = $NextObjectSize;
-					$thisfile_asf_codeclistobject['reserved']                  = substr($ASFHeaderData, $offset, 16);
-					$offset += 16;
-					$thisfile_asf_codeclistobject['reserved_guid']             = $this->BytestringToGUID($thisfile_asf_codeclistobject['reserved']);
-					if ($thisfile_asf_codeclistobject['reserved'] != $this->GUIDtoBytestring('86D15241-311D-11D0-A3A4-00A0C90348F6')) {
-						$info['warning'][] = 'codec_list_object.reserved GUID {'.$this->BytestringToGUID($thisfile_asf_codeclistobject['reserved']).'} does not match expected "GETID3_ASF_Reserved_1" GUID {86D15241-311D-11D0-A3A4-00A0C90348F6}';
-						//return false;
-						break;
-					}
-					$thisfile_asf_codeclistobject['codec_entries_count'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
-					$offset += 4;
-					for ($CodecEntryCounter = 0; $CodecEntryCounter < $thisfile_asf_codeclistobject['codec_entries_count']; $CodecEntryCounter++) {
-						// shortcut
-						$thisfile_asf_codeclistobject['codec_entries'][$CodecEntryCounter] = array();
-						$thisfile_asf_codeclistobject_codecentries_current = &$thisfile_asf_codeclistobject['codec_entries'][$CodecEntryCounter];
-
-						$thisfile_asf_codeclistobject_codecentries_current['type_raw'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-						$offset += 2;
-						$thisfile_asf_codeclistobject_codecentries_current['type'] = self::codecListObjectTypeLookup($thisfile_asf_codeclistobject_codecentries_current['type_raw']);
-
-						$CodecNameLength = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2)) * 2; // 2 bytes per character
-						$offset += 2;
-						$thisfile_asf_codeclistobject_codecentries_current['name'] = substr($ASFHeaderData, $offset, $CodecNameLength);
-						$offset += $CodecNameLength;
-
-						$CodecDescriptionLength = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2)) * 2; // 2 bytes per character
-						$offset += 2;
-						$thisfile_asf_codeclistobject_codecentries_current['description'] = substr($ASFHeaderData, $offset, $CodecDescriptionLength);
-						$offset += $CodecDescriptionLength;
-
-						$CodecInformationLength = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-						$offset += 2;
-						$thisfile_asf_codeclistobject_codecentries_current['information'] = substr($ASFHeaderData, $offset, $CodecInformationLength);
-						$offset += $CodecInformationLength;
-
-						if ($thisfile_asf_codeclistobject_codecentries_current['type_raw'] == 2) { // audio codec
-
-							if (strpos($thisfile_asf_codeclistobject_codecentries_current['description'], ',') === false) {
-								$info['warning'][] = '[asf][codec_list_object][codec_entries]['.$CodecEntryCounter.'][description] expected to contain comma-seperated list of parameters: "'.$thisfile_asf_codeclistobject_codecentries_current['description'].'"';
-							} else {
-
-								list($AudioCodecBitrate, $AudioCodecFrequency, $AudioCodecChannels) = explode(',', $this->TrimConvert($thisfile_asf_codeclistobject_codecentries_current['description']));
-								$thisfile_audio['codec'] = $this->TrimConvert($thisfile_asf_codeclistobject_codecentries_current['name']);
-
-								if (!isset($thisfile_audio['bitrate']) && strstr($AudioCodecBitrate, 'kbps')) {
-									$thisfile_audio['bitrate'] = (int) (trim(str_replace('kbps', '', $AudioCodecBitrate)) * 1000);
-								}
-								//if (!isset($thisfile_video['bitrate']) && isset($thisfile_audio['bitrate']) && isset($thisfile_asf['file_properties_object']['max_bitrate']) && ($thisfile_asf_codeclistobject['codec_entries_count'] > 1)) {
-								if (empty($thisfile_video['bitrate']) && !empty($thisfile_audio['bitrate']) && !empty($info['bitrate'])) {
-									//$thisfile_video['bitrate'] = $thisfile_asf['file_properties_object']['max_bitrate'] - $thisfile_audio['bitrate'];
-									$thisfile_video['bitrate'] = $info['bitrate'] - $thisfile_audio['bitrate'];
-								}
-
-								$AudioCodecFrequency = (int) trim(str_replace('kHz', '', $AudioCodecFrequency));
-								switch ($AudioCodecFrequency) {
-									case 8:
-									case 8000:
-										$thisfile_audio['sample_rate'] = 8000;
-										break;
-
-									case 11:
-									case 11025:
-										$thisfile_audio['sample_rate'] = 11025;
-										break;
-
-									case 12:
-									case 12000:
-										$thisfile_audio['sample_rate'] = 12000;
-										break;
-
-									case 16:
-									case 16000:
-										$thisfile_audio['sample_rate'] = 16000;
-										break;
-
-									case 22:
-									case 22050:
-										$thisfile_audio['sample_rate'] = 22050;
-										break;
-
-									case 24:
-									case 24000:
-										$thisfile_audio['sample_rate'] = 24000;
-										break;
-
-									case 32:
-									case 32000:
-										$thisfile_audio['sample_rate'] = 32000;
-										break;
-
-									case 44:
-									case 441000:
-										$thisfile_audio['sample_rate'] = 44100;
-										break;
-
-									case 48:
-									case 48000:
-										$thisfile_audio['sample_rate'] = 48000;
-										break;
-
-									default:
-										$info['warning'][] = 'unknown frequency: "'.$AudioCodecFrequency.'" ('.$this->TrimConvert($thisfile_asf_codeclistobject_codecentries_current['description']).')';
-										break;
-								}
-
-								if (!isset($thisfile_audio['channels'])) {
-									if (strstr($AudioCodecChannels, 'stereo')) {
-										$thisfile_audio['channels'] = 2;
-									} elseif (strstr($AudioCodecChannels, 'mono')) {
-										$thisfile_audio['channels'] = 1;
-									}
-								}
-
-							}
-						}
-					}
-					break;
-
-				case GETID3_ASF_Script_Command_Object:
-					// Script Command Object: (optional, one only)
-					// Field Name                   Field Type   Size (bits)
-					// Object ID                    GUID         128             // GUID for Script Command object - GETID3_ASF_Script_Command_Object
-					// Object Size                  QWORD        64              // size of Script Command object, including 44 bytes of Script Command Object header
-					// Reserved                     GUID         128             // hardcoded: 4B1ACBE3-100B-11D0-A39B-00A0C90348F6
-					// Commands Count               WORD         16              // number of Commands structures in the Script Commands Objects
-					// Command Types Count          WORD         16              // number of Command Types structures in the Script Commands Objects
-					// Command Types                array of:    variable        //
-					// * Command Type Name Length   WORD         16              // number of Unicode characters for Command Type Name
-					// * Command Type Name          WCHAR        variable        // array of Unicode characters - name of a type of command
-					// Commands                     array of:    variable        //
-					// * Presentation Time          DWORD        32              // presentation time of that command, in milliseconds
-					// * Type Index                 WORD         16              // type of this command, as a zero-based index into the array of Command Types of this object
-					// * Command Name Length        WORD         16              // number of Unicode characters for Command Name
-					// * Command Name               WCHAR        variable        // array of Unicode characters - name of this command
-
-					// shortcut
-					$thisfile_asf['script_command_object'] = array();
-					$thisfile_asf_scriptcommandobject      = &$thisfile_asf['script_command_object'];
-
-					$thisfile_asf_scriptcommandobject['offset']               = $NextObjectOffset + $offset;
-					$thisfile_asf_scriptcommandobject['objectid']             = $NextObjectGUID;
-					$thisfile_asf_scriptcommandobject['objectid_guid']        = $NextObjectGUIDtext;
-					$thisfile_asf_scriptcommandobject['objectsize']           = $NextObjectSize;
-					$thisfile_asf_scriptcommandobject['reserved']             = substr($ASFHeaderData, $offset, 16);
-					$offset += 16;
-					$thisfile_asf_scriptcommandobject['reserved_guid']        = $this->BytestringToGUID($thisfile_asf_scriptcommandobject['reserved']);
-					if ($thisfile_asf_scriptcommandobject['reserved'] != $this->GUIDtoBytestring('4B1ACBE3-100B-11D0-A39B-00A0C90348F6')) {
-						$info['warning'][] = 'script_command_object.reserved GUID {'.$this->BytestringToGUID($thisfile_asf_scriptcommandobject['reserved']).'} does not match expected "GETID3_ASF_Reserved_1" GUID {4B1ACBE3-100B-11D0-A39B-00A0C90348F6}';
-						//return false;
-						break;
-					}
-					$thisfile_asf_scriptcommandobject['commands_count']       = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-					$offset += 2;
-					$thisfile_asf_scriptcommandobject['command_types_count']  = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-					$offset += 2;
-					for ($CommandTypesCounter = 0; $CommandTypesCounter < $thisfile_asf_scriptcommandobject['command_types_count']; $CommandTypesCounter++) {
-						$CommandTypeNameLength = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2)) * 2; // 2 bytes per character
-						$offset += 2;
-						$thisfile_asf_scriptcommandobject['command_types'][$CommandTypesCounter]['name'] = substr($ASFHeaderData, $offset, $CommandTypeNameLength);
-						$offset += $CommandTypeNameLength;
-					}
-					for ($CommandsCounter = 0; $CommandsCounter < $thisfile_asf_scriptcommandobject['commands_count']; $CommandsCounter++) {
-						$thisfile_asf_scriptcommandobject['commands'][$CommandsCounter]['presentation_time']  = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
-						$offset += 4;
-						$thisfile_asf_scriptcommandobject['commands'][$CommandsCounter]['type_index']         = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-						$offset += 2;
-
-						$CommandTypeNameLength = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2)) * 2; // 2 bytes per character
-						$offset += 2;
-						$thisfile_asf_scriptcommandobject['commands'][$CommandsCounter]['name'] = substr($ASFHeaderData, $offset, $CommandTypeNameLength);
-						$offset += $CommandTypeNameLength;
-					}
-					break;
-
-				case GETID3_ASF_Marker_Object:
-					// Marker Object: (optional, one only)
-					// Field Name                   Field Type   Size (bits)
-					// Object ID                    GUID         128             // GUID for Marker object - GETID3_ASF_Marker_Object
-					// Object Size                  QWORD        64              // size of Marker object, including 48 bytes of Marker Object header
-					// Reserved                     GUID         128             // hardcoded: 4CFEDB20-75F6-11CF-9C0F-00A0C90349CB
-					// Markers Count                DWORD        32              // number of Marker structures in Marker Object
-					// Reserved                     WORD         16              // hardcoded: 0x0000
-					// Name Length                  WORD         16              // number of bytes in the Name field
-					// Name                         WCHAR        variable        // name of the Marker Object
-					// Markers                      array of:    variable        //
-					// * Offset                     QWORD        64              // byte offset into Data Object
-					// * Presentation Time          QWORD        64              // in 100-nanosecond units
-					// * Entry Length               WORD         16              // length in bytes of (Send Time + Flags + Marker Description Length + Marker Description + Padding)
-					// * Send Time                  DWORD        32              // in milliseconds
-					// * Flags                      DWORD        32              // hardcoded: 0x00000000
-					// * Marker Description Length  DWORD        32              // number of bytes in Marker Description field
-					// * Marker Description         WCHAR        variable        // array of Unicode characters - description of marker entry
-					// * Padding                    BYTESTREAM   variable        // optional padding bytes
-
-					// shortcut
-					$thisfile_asf['marker_object'] = array();
-					$thisfile_asf_markerobject     = &$thisfile_asf['marker_object'];
-
-					$thisfile_asf_markerobject['offset']               = $NextObjectOffset + $offset;
-					$thisfile_asf_markerobject['objectid']             = $NextObjectGUID;
-					$thisfile_asf_markerobject['objectid_guid']        = $NextObjectGUIDtext;
-					$thisfile_asf_markerobject['objectsize']           = $NextObjectSize;
-					$thisfile_asf_markerobject['reserved']             = substr($ASFHeaderData, $offset, 16);
-					$offset += 16;
-					$thisfile_asf_markerobject['reserved_guid']        = $this->BytestringToGUID($thisfile_asf_markerobject['reserved']);
-					if ($thisfile_asf_markerobject['reserved'] != $this->GUIDtoBytestring('4CFEDB20-75F6-11CF-9C0F-00A0C90349CB')) {
-						$info['warning'][] = 'marker_object.reserved GUID {'.$this->BytestringToGUID($thisfile_asf_markerobject['reserved_1']).'} does not match expected "GETID3_ASF_Reserved_1" GUID {4CFEDB20-75F6-11CF-9C0F-00A0C90349CB}';
-						break;
-					}
-					$thisfile_asf_markerobject['markers_count'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
-					$offset += 4;
-					$thisfile_asf_markerobject['reserved_2'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-					$offset += 2;
-					if ($thisfile_asf_markerobject['reserved_2'] != 0) {
-						$info['warning'][] = 'marker_object.reserved_2 ('.getid3_lib::PrintHexBytes($thisfile_asf_markerobject['reserved_2']).') does not match expected value of "0"';
-						break;
-					}
-					$thisfile_asf_markerobject['name_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-					$offset += 2;
-					$thisfile_asf_markerobject['name'] = substr($ASFHeaderData, $offset, $thisfile_asf_markerobject['name_length']);
-					$offset += $thisfile_asf_markerobject['name_length'];
-					for ($MarkersCounter = 0; $MarkersCounter < $thisfile_asf_markerobject['markers_count']; $MarkersCounter++) {
-						$thisfile_asf_markerobject['markers'][$MarkersCounter]['offset']  = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));
-						$offset += 8;
-						$thisfile_asf_markerobject['markers'][$MarkersCounter]['presentation_time']         = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));
-						$offset += 8;
-						$thisfile_asf_markerobject['markers'][$MarkersCounter]['entry_length']              = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-						$offset += 2;
-						$thisfile_asf_markerobject['markers'][$MarkersCounter]['send_time']                 = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
-						$offset += 4;
-						$thisfile_asf_markerobject['markers'][$MarkersCounter]['flags']                     = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
-						$offset += 4;
-						$thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
-						$offset += 4;
-						$thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description']        = substr($ASFHeaderData, $offset, $thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description_length']);
-						$offset += $thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description_length'];
-						$PaddingLength = $thisfile_asf_markerobject['markers'][$MarkersCounter]['entry_length'] - 4 -  4 - 4 - $thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description_length'];
-						if ($PaddingLength > 0) {
-							$thisfile_asf_markerobject['markers'][$MarkersCounter]['padding']               = substr($ASFHeaderData, $offset, $PaddingLength);
-							$offset += $PaddingLength;
-						}
-					}
-					break;
-
-				case GETID3_ASF_Bitrate_Mutual_Exclusion_Object:
-					// Bitrate Mutual Exclusion Object: (optional)
-					// Field Name                   Field Type   Size (bits)
-					// Object ID                    GUID         128             // GUID for Bitrate Mutual Exclusion object - GETID3_ASF_Bitrate_Mutual_Exclusion_Object
-					// Object Size                  QWORD        64              // size of Bitrate Mutual Exclusion object, including 42 bytes of Bitrate Mutual Exclusion Object header
-					// Exlusion Type                GUID         128             // nature of mutual exclusion relationship. one of: (GETID3_ASF_Mutex_Bitrate, GETID3_ASF_Mutex_Unknown)
-					// Stream Numbers Count         WORD         16              // number of video streams
-					// Stream Numbers               WORD         variable        // array of mutually exclusive video stream numbers. 1 <= valid <= 127
-
-					// shortcut
-					$thisfile_asf['bitrate_mutual_exclusion_object'] = array();
-					$thisfile_asf_bitratemutualexclusionobject       = &$thisfile_asf['bitrate_mutual_exclusion_object'];
-
-					$thisfile_asf_bitratemutualexclusionobject['offset']               = $NextObjectOffset + $offset;
-					$thisfile_asf_bitratemutualexclusionobject['objectid']             = $NextObjectGUID;
-					$thisfile_asf_bitratemutualexclusionobject['objectid_guid']        = $NextObjectGUIDtext;
-					$thisfile_asf_bitratemutualexclusionobject['objectsize']           = $NextObjectSize;
-					$thisfile_asf_bitratemutualexclusionobject['reserved']             = substr($ASFHeaderData, $offset, 16);
-					$thisfile_asf_bitratemutualexclusionobject['reserved_guid']        = $this->BytestringToGUID($thisfile_asf_bitratemutualexclusionobject['reserved']);
-					$offset += 16;
-					if (($thisfile_asf_bitratemutualexclusionobject['reserved'] != GETID3_ASF_Mutex_Bitrate) && ($thisfile_asf_bitratemutualexclusionobject['reserved'] != GETID3_ASF_Mutex_Unknown)) {
-						$info['warning'][] = 'bitrate_mutual_exclusion_object.reserved GUID {'.$this->BytestringToGUID($thisfile_asf_bitratemutualexclusionobject['reserved']).'} does not match expected "GETID3_ASF_Mutex_Bitrate" GUID {'.$this->BytestringToGUID(GETID3_ASF_Mutex_Bitrate).'} or  "GETID3_ASF_Mutex_Unknown" GUID {'.$this->BytestringToGUID(GETID3_ASF_Mutex_Unknown).'}';
-						//return false;
-						break;
-					}
-					$thisfile_asf_bitratemutualexclusionobject['stream_numbers_count'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-					$offset += 2;
-					for ($StreamNumberCounter = 0; $StreamNumberCounter < $thisfile_asf_bitratemutualexclusionobject['stream_numbers_count']; $StreamNumberCounter++) {
-						$thisfile_asf_bitratemutualexclusionobject['stream_numbers'][$StreamNumberCounter] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-						$offset += 2;
-					}
-					break;
-
-				case GETID3_ASF_Error_Correction_Object:
-					// Error Correction Object: (optional, one only)
-					// Field Name                   Field Type   Size (bits)
-					// Object ID                    GUID         128             // GUID for Error Correction object - GETID3_ASF_Error_Correction_Object
-					// Object Size                  QWORD        64              // size of Error Correction object, including 44 bytes of Error Correction Object header
-					// Error Correction Type        GUID         128             // type of error correction. one of: (GETID3_ASF_No_Error_Correction, GETID3_ASF_Audio_Spread)
-					// Error Correction Data Length DWORD        32              // number of bytes in Error Correction Data field
-					// Error Correction Data        BYTESTREAM   variable        // structure depends on value of Error Correction Type field
-
-					// shortcut
-					$thisfile_asf['error_correction_object'] = array();
-					$thisfile_asf_errorcorrectionobject      = &$thisfile_asf['error_correction_object'];
-
-					$thisfile_asf_errorcorrectionobject['offset']                = $NextObjectOffset + $offset;
-					$thisfile_asf_errorcorrectionobject['objectid']              = $NextObjectGUID;
-					$thisfile_asf_errorcorrectionobject['objectid_guid']         = $NextObjectGUIDtext;
-					$thisfile_asf_errorcorrectionobject['objectsize']            = $NextObjectSize;
-					$thisfile_asf_errorcorrectionobject['error_correction_type'] = substr($ASFHeaderData, $offset, 16);
-					$offset += 16;
-					$thisfile_asf_errorcorrectionobject['error_correction_guid'] = $this->BytestringToGUID($thisfile_asf_errorcorrectionobject['error_correction_type']);
-					$thisfile_asf_errorcorrectionobject['error_correction_data_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
-					$offset += 4;
-					switch ($thisfile_asf_errorcorrectionobject['error_correction_type']) {
-						case GETID3_ASF_No_Error_Correction:
-							// should be no data, but just in case there is, skip to the end of the field
-							$offset += $thisfile_asf_errorcorrectionobject['error_correction_data_length'];
-							break;
-
-						case GETID3_ASF_Audio_Spread:
-							// Field Name                   Field Type   Size (bits)
-							// Span                         BYTE         8               // number of packets over which audio will be spread.
-							// Virtual Packet Length        WORD         16              // size of largest audio payload found in audio stream
-							// Virtual Chunk Length         WORD         16              // size of largest audio payload found in audio stream
-							// Silence Data Length          WORD         16              // number of bytes in Silence Data field
-							// Silence Data                 BYTESTREAM   variable        // hardcoded: 0x00 * (Silence Data Length) bytes
-
-							$thisfile_asf_errorcorrectionobject['span']                  = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 1));
-							$offset += 1;
-							$thisfile_asf_errorcorrectionobject['virtual_packet_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-							$offset += 2;
-							$thisfile_asf_errorcorrectionobject['virtual_chunk_length']  = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-							$offset += 2;
-							$thisfile_asf_errorcorrectionobject['silence_data_length']   = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-							$offset += 2;
-							$thisfile_asf_errorcorrectionobject['silence_data']          = substr($ASFHeaderData, $offset, $thisfile_asf_errorcorrectionobject['silence_data_length']);
-							$offset += $thisfile_asf_errorcorrectionobject['silence_data_length'];
-							break;
-
-						default:
-							$info['warning'][] = 'error_correction_object.error_correction_type GUID {'.$this->BytestringToGUID($thisfile_asf_errorcorrectionobject['reserved']).'} does not match expected "GETID3_ASF_No_Error_Correction" GUID {'.$this->BytestringToGUID(GETID3_ASF_No_Error_Correction).'} or  "GETID3_ASF_Audio_Spread" GUID {'.$this->BytestringToGUID(GETID3_ASF_Audio_Spread).'}';
-							//return false;
-							break;
-					}
-
-					break;
-
-				case GETID3_ASF_Content_Description_Object:
-					// Content Description Object: (optional, one only)
-					// Field Name                   Field Type   Size (bits)
-					// Object ID                    GUID         128             // GUID for Content Description object - GETID3_ASF_Content_Description_Object
-					// Object Size                  QWORD        64              // size of Content Description object, including 34 bytes of Content Description Object header
-					// Title Length                 WORD         16              // number of bytes in Title field
-					// Author Length                WORD         16              // number of bytes in Author field
-					// Copyright Length             WORD         16              // number of bytes in Copyright field
-					// Description Length           WORD         16              // number of bytes in Description field
-					// Rating Length                WORD         16              // number of bytes in Rating field
-					// Title                        WCHAR        16              // array of Unicode characters - Title
-					// Author                       WCHAR        16              // array of Unicode characters - Author
-					// Copyright                    WCHAR        16              // array of Unicode characters - Copyright
-					// Description                  WCHAR        16              // array of Unicode characters - Description
-					// Rating                       WCHAR        16              // array of Unicode characters - Rating
-
-					// shortcut
-					$thisfile_asf['content_description_object'] = array();
-					$thisfile_asf_contentdescriptionobject      = &$thisfile_asf['content_description_object'];
-
-					$thisfile_asf_contentdescriptionobject['offset']                = $NextObjectOffset + $offset;
-					$thisfile_asf_contentdescriptionobject['objectid']              = $NextObjectGUID;
-					$thisfile_asf_contentdescriptionobject['objectid_guid']         = $NextObjectGUIDtext;
-					$thisfile_asf_contentdescriptionobject['objectsize']            = $NextObjectSize;
-					$thisfile_asf_contentdescriptionobject['title_length']          = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-					$offset += 2;
-					$thisfile_asf_contentdescriptionobject['author_length']         = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-					$offset += 2;
-					$thisfile_asf_contentdescriptionobject['copyright_length']      = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-					$offset += 2;
-					$thisfile_asf_contentdescriptionobject['description_length']    = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-					$offset += 2;
-					$thisfile_asf_contentdescriptionobject['rating_length']         = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-					$offset += 2;
-					$thisfile_asf_contentdescriptionobject['title']                 = substr($ASFHeaderData, $offset, $thisfile_asf_contentdescriptionobject['title_length']);
-					$offset += $thisfile_asf_contentdescriptionobject['title_length'];
-					$thisfile_asf_contentdescriptionobject['author']                = substr($ASFHeaderData, $offset, $thisfile_asf_contentdescriptionobject['author_length']);
-					$offset += $thisfile_asf_contentdescriptionobject['author_length'];
-					$thisfile_asf_contentdescriptionobject['copyright']             = substr($ASFHeaderData, $offset, $thisfile_asf_contentdescriptionobject['copyright_length']);
-					$offset += $thisfile_asf_contentdescriptionobject['copyright_length'];
-					$thisfile_asf_contentdescriptionobject['description']           = substr($ASFHeaderData, $offset, $thisfile_asf_contentdescriptionobject['description_length']);
-					$offset += $thisfile_asf_contentdescriptionobject['description_length'];
-					$thisfile_asf_contentdescriptionobject['rating']                = substr($ASFHeaderData, $offset, $thisfile_asf_contentdescriptionobject['rating_length']);
-					$offset += $thisfile_asf_contentdescriptionobject['rating_length'];
-
-					$ASFcommentKeysToCopy = array('title'=>'title', 'author'=>'artist', 'copyright'=>'copyright', 'description'=>'comment', 'rating'=>'rating');
-					foreach ($ASFcommentKeysToCopy as $keytocopyfrom => $keytocopyto) {
-						if (!empty($thisfile_asf_contentdescriptionobject[$keytocopyfrom])) {
-							$thisfile_asf_comments[$keytocopyto][] = $this->TrimTerm($thisfile_asf_contentdescriptionobject[$keytocopyfrom]);
-						}
-					}
-					break;
-
-				case GETID3_ASF_Extended_Content_Description_Object:
-					// Extended Content Description Object: (optional, one only)
-					// Field Name                   Field Type   Size (bits)
-					// Object ID                    GUID         128             // GUID for Extended Content Description object - GETID3_ASF_Extended_Content_Description_Object
-					// Object Size                  QWORD        64              // size of ExtendedContent Description object, including 26 bytes of Extended Content Description Object header
-					// Content Descriptors Count    WORD         16              // number of entries in Content Descriptors list
-					// Content Descriptors          array of:    variable        //
-					// * Descriptor Name Length     WORD         16              // size in bytes of Descriptor Name field
-					// * Descriptor Name            WCHAR        variable        // array of Unicode characters - Descriptor Name
-					// * Descriptor Value Data Type WORD         16              // Lookup array:
-																					// 0x0000 = Unicode String (variable length)
-																					// 0x0001 = BYTE array     (variable length)
-																					// 0x0002 = BOOL           (DWORD, 32 bits)
-																					// 0x0003 = DWORD          (DWORD, 32 bits)
-																					// 0x0004 = QWORD          (QWORD, 64 bits)
-																					// 0x0005 = WORD           (WORD,  16 bits)
-					// * Descriptor Value Length    WORD         16              // number of bytes stored in Descriptor Value field
-					// * Descriptor Value           variable     variable        // value for Content Descriptor
-
-					// shortcut
-					$thisfile_asf['extended_content_description_object'] = array();
-					$thisfile_asf_extendedcontentdescriptionobject       = &$thisfile_asf['extended_content_description_object'];
-
-					$thisfile_asf_extendedcontentdescriptionobject['offset']                    = $NextObjectOffset + $offset;
-					$thisfile_asf_extendedcontentdescriptionobject['objectid']                  = $NextObjectGUID;
-					$thisfile_asf_extendedcontentdescriptionobject['objectid_guid']             = $NextObjectGUIDtext;
-					$thisfile_asf_extendedcontentdescriptionobject['objectsize']                = $NextObjectSize;
-					$thisfile_asf_extendedcontentdescriptionobject['content_descriptors_count'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-					$offset += 2;
-					for ($ExtendedContentDescriptorsCounter = 0; $ExtendedContentDescriptorsCounter < $thisfile_asf_extendedcontentdescriptionobject['content_descriptors_count']; $ExtendedContentDescriptorsCounter++) {
-						// shortcut
-						$thisfile_asf_extendedcontentdescriptionobject['content_descriptors'][$ExtendedContentDescriptorsCounter] = array();
-						$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current                 = &$thisfile_asf_extendedcontentdescriptionobject['content_descriptors'][$ExtendedContentDescriptorsCounter];
-
-						$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['base_offset']  = $offset + 30;
-						$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name_length']  = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-						$offset += 2;
-						$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name']         = substr($ASFHeaderData, $offset, $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name_length']);
-						$offset += $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name_length'];
-						$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_type']   = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-						$offset += 2;
-						$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-						$offset += 2;
-						$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']        = substr($ASFHeaderData, $offset, $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_length']);
-						$offset += $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_length'];
-						switch ($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_type']) {
-							case 0x0000: // Unicode string
-								break;
-
-							case 0x0001: // BYTE array
-								// do nothing
-								break;
-
-							case 0x0002: // BOOL
-								$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'] = (bool) getid3_lib::LittleEndian2Int($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
-								break;
-
-							case 0x0003: // DWORD
-							case 0x0004: // QWORD
-							case 0x0005: // WORD
-								$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'] = getid3_lib::LittleEndian2Int($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
-								break;
-
-							default:
-								$info['warning'][] = 'extended_content_description.content_descriptors.'.$ExtendedContentDescriptorsCounter.'.value_type is invalid ('.$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_type'].')';
-								//return false;
-								break;
-						}
-						switch ($this->TrimConvert(strtolower($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name']))) {
-
-							case 'wm/albumartist':
-							case 'artist':
-								// Note: not 'artist', that comes from 'author' tag
-								$thisfile_asf_comments['albumartist'] = array($this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
-								break;
-
-							case 'wm/albumtitle':
-							case 'album':
-								$thisfile_asf_comments['album']  = array($this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
-								break;
-
-							case 'wm/genre':
-							case 'genre':
-								$thisfile_asf_comments['genre'] = array($this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
-								break;
-
-							case 'wm/partofset':
-								$thisfile_asf_comments['partofset'] = array($this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
-								break;
-
-							case 'wm/tracknumber':
-							case 'tracknumber':
-								// be careful casting to int: casting unicode strings to int gives unexpected results (stops parsing at first non-numeric character)
-								$thisfile_asf_comments['track'] = array($this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
-								foreach ($thisfile_asf_comments['track'] as $key => $value) {
-									if (preg_match('/^[0-9\x00]+$/', $value)) {
-										$thisfile_asf_comments['track'][$key] = intval(str_replace("\x00", '', $value));
-									}
-								}
-								break;
-
-							case 'wm/track':
-								if (empty($thisfile_asf_comments['track'])) {
-									$thisfile_asf_comments['track'] = array(1 + $this->TrimConvert($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
-								}
-								break;
-
-							case 'wm/year':
-							case 'year':
-							case 'date':
-								$thisfile_asf_comments['year'] = array( $this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
-								break;
-
-							case 'wm/lyrics':
-							case 'lyrics':
-								$thisfile_asf_comments['lyrics'] = array($this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
-								break;
-
-							case 'isvbr':
-								if ($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']) {
-									$thisfile_audio['bitrate_mode'] = 'vbr';
-									$thisfile_video['bitrate_mode'] = 'vbr';
-								}
-								break;
-
-							case 'id3':
-								$this->getid3->include_module('tag.id3v2');
-
-								$getid3_id3v2 = new getid3_id3v2($this->getid3);
-								$getid3_id3v2->AnalyzeString($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
-								unset($getid3_id3v2);
-
-								if ($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_length'] > 1024) {
-									$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'] = '<value too large to display>';
-								}
-								break;
-
-							case 'wm/encodingtime':
-								$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['encoding_time_unix'] = $this->FILETIMEtoUNIXtime($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
-								$thisfile_asf_comments['encoding_time_unix'] = array($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['encoding_time_unix']);
-								break;
-
-							case 'wm/picture':
-								$WMpicture = $this->ASF_WMpicture($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
-								foreach ($WMpicture as $key => $value) {
-									$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current[$key] = $value;
-								}
-								unset($WMpicture);
-/*
-								$wm_picture_offset = 0;
-								$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_type_id'] = getid3_lib::LittleEndian2Int(substr($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'], $wm_picture_offset, 1));
-								$wm_picture_offset += 1;
-								$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_type']    = self::WMpictureTypeLookup($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_type_id']);
-								$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_size']    = getid3_lib::LittleEndian2Int(substr($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'], $wm_picture_offset, 4));
-								$wm_picture_offset += 4;
-
-								$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_mime'] = '';
-								do {
-									$next_byte_pair = substr($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'], $wm_picture_offset, 2);
-									$wm_picture_offset += 2;
-									$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_mime'] .= $next_byte_pair;
-								} while ($next_byte_pair !== "\x00\x00");
-
-								$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_description'] = '';
-								do {
-									$next_byte_pair = substr($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'], $wm_picture_offset, 2);
-									$wm_picture_offset += 2;
-									$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_description'] .= $next_byte_pair;
-								} while ($next_byte_pair !== "\x00\x00");
-
-								$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['dataoffset'] = $wm_picture_offset;
-								$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['data'] = substr($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'], $wm_picture_offset);
-								unset($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
-
-								$imageinfo = array();
-								$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_mime'] = '';
-								$imagechunkcheck = getid3_lib::GetDataImageSize($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['data'], $imageinfo);
-								unset($imageinfo);
-								if (!empty($imagechunkcheck)) {
-									$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_mime'] = image_type_to_mime_type($imagechunkcheck[2]);
-								}
-								if (!isset($thisfile_asf_comments['picture'])) {
-									$thisfile_asf_comments['picture'] = array();
-								}
-								$thisfile_asf_comments['picture'][] = array('data'=>$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['data'], 'image_mime'=>$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_mime']);
-*/
-								break;
-
-							default:
-								switch ($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_type']) {
-									case 0: // Unicode string
-										if (substr($this->TrimConvert($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name']), 0, 3) == 'WM/') {
-											$thisfile_asf_comments[str_replace('wm/', '', strtolower($this->TrimConvert($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name'])))] = array($this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
-										}
-										break;
-
-									case 1:
-										break;
-								}
-								break;
-						}
-
-					}
-					break;
-
-				case GETID3_ASF_Stream_Bitrate_Properties_Object:
-					// Stream Bitrate Properties Object: (optional, one only)
-					// Field Name                   Field Type   Size (bits)
-					// Object ID                    GUID         128             // GUID for Stream Bitrate Properties object - GETID3_ASF_Stream_Bitrate_Properties_Object
-					// Object Size                  QWORD        64              // size of Extended Content Description object, including 26 bytes of Stream Bitrate Properties Object header
-					// Bitrate Records Count        WORD         16              // number of records in Bitrate Records
-					// Bitrate Records              array of:    variable        //
-					// * Flags                      WORD         16              //
-					// * * Stream Number            bits         7  (0x007F)     // number of this stream
-					// * * Reserved                 bits         9  (0xFF80)     // hardcoded: 0
-					// * Average Bitrate            DWORD        32              // in bits per second
-
-					// shortcut
-					$thisfile_asf['stream_bitrate_properties_object'] = array();
-					$thisfile_asf_streambitratepropertiesobject       = &$thisfile_asf['stream_bitrate_properties_object'];
-
-					$thisfile_asf_streambitratepropertiesobject['offset']                    = $NextObjectOffset + $offset;
-					$thisfile_asf_streambitratepropertiesobject['objectid']                  = $NextObjectGUID;
-					$thisfile_asf_streambitratepropertiesobject['objectid_guid']             = $NextObjectGUIDtext;
-					$thisfile_asf_streambitratepropertiesobject['objectsize']                = $NextObjectSize;
-					$thisfile_asf_streambitratepropertiesobject['bitrate_records_count']     = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-					$offset += 2;
-					for ($BitrateRecordsCounter = 0; $BitrateRecordsCounter < $thisfile_asf_streambitratepropertiesobject['bitrate_records_count']; $BitrateRecordsCounter++) {
-						$thisfile_asf_streambitratepropertiesobject['bitrate_records'][$BitrateRecordsCounter]['flags_raw'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
-						$offset += 2;
-						$thisfile_asf_streambitratepropertiesobject['bitrate_records'][$BitrateRecordsCounter]['flags']['stream_number'] = $thisfile_asf_streambitratepropertiesobject['bitrate_records'][$BitrateRecordsCounter]['flags_raw'] & 0x007F;
-						$thisfile_asf_streambitratepropertiesobject['bitrate_records'][$BitrateRecordsCounter]['bitrate'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
-						$offset += 4;
-					}
-					break;
-
-				case GETID3_ASF_Padding_Object:
-					// Padding Object: (optional)
-					// Field Name                   Field Type   Size (bits)
-					// Object ID                    GUID         128             // GUID for Padding object - GETID3_ASF_Padding_Object
-					// Object Size                  QWORD        64              // size of Padding object, including 24 bytes of ASF Padding Object header
-					// Padding Data                 BYTESTREAM   variable        // ignore
-
-					// shortcut
-					$thisfile_asf['padding_object'] = array();
-					$thisfile_asf_paddingobject     = &$thisfile_asf['padding_object'];
-
-					$thisfile_asf_paddingobject['offset']                    = $NextObjectOffset + $offset;
-					$thisfile_asf_paddingobject['objectid']                  = $NextObjectGUID;
-					$thisfile_asf_paddingobject['objectid_guid']             = $NextObjectGUIDtext;
-					$thisfile_asf_paddingobject['objectsize']                = $NextObjectSize;
-					$thisfile_asf_paddingobject['padding_length']            = $thisfile_asf_paddingobject['objectsize'] - 16 - 8;
-					$thisfile_asf_paddingobject['padding']                   = substr($ASFHeaderData, $offset, $thisfile_asf_paddingobject['padding_length']);
-					$offset += ($NextObjectSize - 16 - 8);
-					break;
-
-				case GETID3_ASF_Extended_Content_Encryption_Object:
-				case GETID3_ASF_Content_Encryption_Object:
-					// WMA DRM - just ignore
-					$offset += ($NextObjectSize - 16 - 8);
-					break;
-
-				default:
-					// Implementations shall ignore any standard or non-standard object that they do not know how to handle.
-					if ($this->GUIDname($NextObjectGUIDtext)) {
-						$info['warning'][] = 'unhandled GUID "'.$this->GUIDname($NextObjectGUIDtext).'" {'.$NextObjectGUIDtext.'} in ASF header at offset '.($offset - 16 - 8);
-					} else {
-						$info['warning'][] = 'unknown GUID {'.$NextObjectGUIDtext.'} in ASF header at offset '.($offset - 16 - 8);
-					}
-					$offset += ($NextObjectSize - 16 - 8);
-					break;
-			}
-		}
-		if (isset($thisfile_asf_streambitrateproperties['bitrate_records_count'])) {
-			$ASFbitrateAudio = 0;
-			$ASFbitrateVideo = 0;
-			for ($BitrateRecordsCounter = 0; $BitrateRecordsCounter < $thisfile_asf_streambitrateproperties['bitrate_records_count']; $BitrateRecordsCounter++) {
-				if (isset($thisfile_asf_codeclistobject['codec_entries'][$BitrateRecordsCounter])) {
-					switch ($thisfile_asf_codeclistobject['codec_entries'][$BitrateRecordsCounter]['type_raw']) {
-						case 1:
-							$ASFbitrateVideo += $thisfile_asf_streambitrateproperties['bitrate_records'][$BitrateRecordsCounter]['bitrate'];
-							break;
-
-						case 2:
-							$ASFbitrateAudio += $thisfile_asf_streambitrateproperties['bitrate_records'][$BitrateRecordsCounter]['bitrate'];
-							break;
-
-						default:
-							// do nothing
-							break;
-					}
-				}
-			}
-			if ($ASFbitrateAudio > 0) {
-				$thisfile_audio['bitrate'] = $ASFbitrateAudio;
-			}
-			if ($ASFbitrateVideo > 0) {
-				$thisfile_video['bitrate'] = $ASFbitrateVideo;
-			}
-		}
-		if (isset($thisfile_asf['stream_properties_object']) && is_array($thisfile_asf['stream_properties_object'])) {
-
-			$thisfile_audio['bitrate'] = 0;
-			$thisfile_video['bitrate'] = 0;
-
-			foreach ($thisfile_asf['stream_properties_object'] as $streamnumber => $streamdata) {
-
-				switch ($streamdata['stream_type']) {
-					case GETID3_ASF_Audio_Media:
-						// Field Name                   Field Type   Size (bits)
-						// Codec ID / Format Tag        WORD         16              // unique ID of audio codec - defined as wFormatTag field of WAVEFORMATEX structure
-						// Number of Channels           WORD         16              // number of channels of audio - defined as nChannels field of WAVEFORMATEX structure
-						// Samples Per Second           DWORD        32              // in Hertz - defined as nSamplesPerSec field of WAVEFORMATEX structure
-						// Average number of Bytes/sec  DWORD        32              // bytes/sec of audio stream  - defined as nAvgBytesPerSec field of WAVEFORMATEX structure
-						// Block Alignment              WORD         16              // block size in bytes of audio codec - defined as nBlockAlign field of WAVEFORMATEX structure
-						// Bits per sample              WORD         16              // bits per sample of mono data. set to zero for variable bitrate codecs. defined as wBitsPerSample field of WAVEFORMATEX structure
-						// Codec Specific Data Size     WORD         16              // size in bytes of Codec Specific Data buffer - defined as cbSize field of WAVEFORMATEX structure
-						// Codec Specific Data          BYTESTREAM   variable        // array of codec-specific data bytes
-
-						// shortcut
-						$thisfile_asf['audio_media'][$streamnumber] = array();
-						$thisfile_asf_audiomedia_currentstream      = &$thisfile_asf['audio_media'][$streamnumber];
-
-						$audiomediaoffset = 0;
-
-						$thisfile_asf_audiomedia_currentstream = getid3_riff::parseWAVEFORMATex(substr($streamdata['type_specific_data'], $audiomediaoffset, 16));
-						$audiomediaoffset += 16;
-
-						$thisfile_audio['lossless'] = false;
-						switch ($thisfile_asf_audiomedia_currentstream['raw']['wFormatTag']) {
-							case 0x0001: // PCM
-							case 0x0163: // WMA9 Lossless
-								$thisfile_audio['lossless'] = true;
-								break;
-						}
-
-						if (!empty($thisfile_asf['stream_bitrate_properties_object']['bitrate_records'])) {
-							foreach ($thisfile_asf['stream_bitrate_properties_object']['bitrate_records'] as $dummy => $dataarray) {
-								if (isset($dataarray['flags']['stream_number']) && ($dataarray['flags']['stream_number'] == $streamnumber)) {
-									$thisfile_asf_audiomedia_currentstream['bitrate'] = $dataarray['bitrate'];
-									$thisfile_audio['bitrate'] += $dataarray['bitrate'];
-									break;
-								}
-							}
-						} else {
-							if (!empty($thisfile_asf_audiomedia_currentstream['bytes_sec'])) {
-								$thisfile_audio['bitrate'] += $thisfile_asf_audiomedia_currentstream['bytes_sec'] * 8;
-							} elseif (!empty($thisfile_asf_audiomedia_currentstream['bitrate'])) {
-								$thisfile_audio['bitrate'] += $thisfile_asf_audiomedia_currentstream['bitrate'];
-							}
-						}
-						$thisfile_audio['streams'][$streamnumber]                = $thisfile_asf_audiomedia_currentstream;
-						$thisfile_audio['streams'][$streamnumber]['wformattag']  = $thisfile_asf_audiomedia_currentstream['raw']['wFormatTag'];
-						$thisfile_audio['streams'][$streamnumber]['lossless']    = $thisfile_audio['lossless'];
-						$thisfile_audio['streams'][$streamnumber]['bitrate']     = $thisfile_audio['bitrate'];
-						$thisfile_audio['streams'][$streamnumber]['dataformat']  = 'wma';
-						unset($thisfile_audio['streams'][$streamnumber]['raw']);
-
-						$thisfile_asf_audiomedia_currentstream['codec_data_size'] = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $audiomediaoffset, 2));
-						$audiomediaoffset += 2;
-						$thisfile_asf_audiomedia_currentstream['codec_data']      = substr($streamdata['type_specific_data'], $audiomediaoffset, $thisfile_asf_audiomedia_currentstream['codec_data_size']);
-						$audiomediaoffset += $thisfile_asf_audiomedia_currentstream['codec_data_size'];
-
-						break;
-
-					case GETID3_ASF_Video_Media:
-						// Field Name                   Field Type   Size (bits)
-						// Encoded Image Width          DWORD        32              // width of image in pixels
-						// Encoded Image Height         DWORD        32              // height of image in pixels
-						// Reserved Flags               BYTE         8               // hardcoded: 0x02
-						// Format Data Size             WORD         16              // size of Format Data field in bytes
-						// Format Data                  array of:    variable        //
-						// * Format Data Size           DWORD        32              // number of bytes in Format Data field, in bytes - defined as biSize field of BITMAPINFOHEADER structure
-						// * Image Width                LONG         32              // width of encoded image in pixels - defined as biWidth field of BITMAPINFOHEADER structure
-						// * Image Height               LONG         32              // height of encoded image in pixels - defined as biHeight field of BITMAPINFOHEADER structure
-						// * Reserved                   WORD         16              // hardcoded: 0x0001 - defined as biPlanes field of BITMAPINFOHEADER structure
-						// * Bits Per Pixel Count       WORD         16              // bits per pixel - defined as biBitCount field of BITMAPINFOHEADER structure
-						// * Compression ID             FOURCC       32              // fourcc of video codec - defined as biCompression field of BITMAPINFOHEADER structure
-						// * Image Size                 DWORD        32              // image size in bytes - defined as biSizeImage field of BITMAPINFOHEADER structure
-						// * Horizontal Pixels / Meter  DWORD        32              // horizontal resolution of target device in pixels per meter - defined as biXPelsPerMeter field of BITMAPINFOHEADER structure
-						// * Vertical Pixels / Meter    DWORD        32              // vertical resolution of target device in pixels per meter - defined as biYPelsPerMeter field of BITMAPINFOHEADER structure
-						// * Colors Used Count          DWORD        32              // number of color indexes in the color table that are actually used - defined as biClrUsed field of BITMAPINFOHEADER structure
-						// * Important Colors Count     DWORD        32              // number of color index required for displaying bitmap. if zero, all colors are required. defined as biClrImportant field of BITMAPINFOHEADER structure
-						// * Codec Specific Data        BYTESTREAM   variable        // array of codec-specific data bytes
-
-						// shortcut
-						$thisfile_asf['video_media'][$streamnumber] = array();
-						$thisfile_asf_videomedia_currentstream      = &$thisfile_asf['video_media'][$streamnumber];
-
-						$videomediaoffset = 0;
-						$thisfile_asf_videomedia_currentstream['image_width']                     = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 4));
-						$videomediaoffset += 4;
-						$thisfile_asf_videomedia_currentstream['image_height']                    = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 4));
-						$videomediaoffset += 4;
-						$thisfile_asf_videomedia_currentstream['flags']                           = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 1));
-						$videomediaoffset += 1;
-						$thisfile_asf_videomedia_currentstream['format_data_size']                = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 2));
-						$videomediaoffset += 2;
-						$thisfile_asf_videomedia_currentstream['format_data']['format_data_size'] = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 4));
-						$videomediaoffset += 4;
-						$thisfile_asf_videomedia_currentstream['format_data']['image_width']      = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 4));
-						$videomediaoffset += 4;
-						$thisfile_asf_videomedia_currentstream['format_data']['image_height']     = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 4));
-						$videomediaoffset += 4;
-						$thisfile_asf_videomedia_currentstream['format_data']['reserved']         = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 2));
-						$videomediaoffset += 2;
-						$thisfile_asf_videomedia_currentstream['format_data']['bits_per_pixel']   = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 2));
-						$videomediaoffset += 2;
-						$thisfile_asf_videomedia_currentstream['format_data']['codec_fourcc']     = substr($streamdata['type_specific_data'], $videomediaoffset, 4);
-						$videomediaoffset += 4;
-						$thisfile_asf_videomedia_currentstream['format_data']['image_size']       = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 4));
-						$videomediaoffset += 4;
-						$thisfile_asf_videomedia_currentstream['format_data']['horizontal_pels']  = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 4));
-						$videomediaoffset += 4;
-						$thisfile_asf_videomedia_currentstream['format_data']['vertical_pels']    = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 4));
-						$videomediaoffset += 4;
-						$thisfile_asf_videomedia_currentstream['format_data']['colors_used']      = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 4));
-						$videomediaoffset += 4;
-						$thisfile_asf_videomedia_currentstream['format_data']['colors_important'] = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 4));
-						$videomediaoffset += 4;
-						$thisfile_asf_videomedia_currentstream['format_data']['codec_data']       = substr($streamdata['type_specific_data'], $videomediaoffset);
-
-						if (!empty($thisfile_asf['stream_bitrate_properties_object']['bitrate_records'])) {
-							foreach ($thisfile_asf['stream_bitrate_properties_object']['bitrate_records'] as $dummy => $dataarray) {
-								if (isset($dataarray['flags']['stream_number']) && ($dataarray['flags']['stream_number'] == $streamnumber)) {
-									$thisfile_asf_videomedia_currentstream['bitrate'] = $dataarray['bitrate'];
-									$thisfile_video['streams'][$streamnumber]['bitrate'] = $dataarray['bitrate'];
-									$thisfile_video['bitrate'] += $dataarray['bitrate'];
-									break;
-								}
-							}
-						}
-
-						$thisfile_asf_videomedia_currentstream['format_data']['codec'] = getid3_riff::fourccLookup($thisfile_asf_videomedia_currentstream['format_data']['codec_fourcc']);
-
-						$thisfile_video['streams'][$streamnumber]['fourcc']          = $thisfile_asf_videomedia_currentstream['format_data']['codec_fourcc'];
-						$thisfile_video['streams'][$streamnumber]['codec']           = $thisfile_asf_videomedia_currentstream['format_data']['codec'];
-						$thisfile_video['streams'][$streamnumber]['resolution_x']    = $thisfile_asf_videomedia_currentstream['image_width'];
-						$thisfile_video['streams'][$streamnumber]['resolution_y']    = $thisfile_asf_videomedia_currentstream['image_height'];
-						$thisfile_video['streams'][$streamnumber]['bits_per_sample'] = $thisfile_asf_videomedia_currentstream['format_data']['bits_per_pixel'];
-						break;
-
-					default:
-						break;
-				}
-			}
-		}
-
-		while ($this->ftell() < $info['avdataend']) {
-			$NextObjectDataHeader = $this->fread(24);
-			$offset = 0;
-			$NextObjectGUID = substr($NextObjectDataHeader, 0, 16);
-			$offset += 16;
-			$NextObjectGUIDtext = $this->BytestringToGUID($NextObjectGUID);
-			$NextObjectSize = getid3_lib::LittleEndian2Int(substr($NextObjectDataHeader, $offset, 8));
-			$offset += 8;
-
-			switch ($NextObjectGUID) {
-				case GETID3_ASF_Data_Object:
-					// Data Object: (mandatory, one only)
-					// Field Name                       Field Type   Size (bits)
-					// Object ID                        GUID         128             // GUID for Data object - GETID3_ASF_Data_Object
-					// Object Size                      QWORD        64              // size of Data object, including 50 bytes of Data Object header. may be 0 if FilePropertiesObject.BroadcastFlag == 1
-					// File ID                          GUID         128             // unique identifier. identical to File ID field in Header Object
-					// Total Data Packets               QWORD        64              // number of Data Packet entries in Data Object. invalid if FilePropertiesObject.BroadcastFlag == 1
-					// Reserved                         WORD         16              // hardcoded: 0x0101
-
-					// shortcut
-					$thisfile_asf['data_object'] = array();
-					$thisfile_asf_dataobject     = &$thisfile_asf['data_object'];
-
-					$DataObjectData = $NextObjectDataHeader.$this->fread(50 - 24);
-					$offset = 24;
-
-					$thisfile_asf_dataobject['objectid']           = $NextObjectGUID;
-					$thisfile_asf_dataobject['objectid_guid']      = $NextObjectGUIDtext;
-					$thisfile_asf_dataobject['objectsize']         = $NextObjectSize;
-
-					$thisfile_asf_dataobject['fileid']             = substr($DataObjectData, $offset, 16);
-					$offset += 16;
-					$thisfile_asf_dataobject['fileid_guid']        = $this->BytestringToGUID($thisfile_asf_dataobject['fileid']);
-					$thisfile_asf_dataobject['total_data_packets'] = getid3_lib::LittleEndian2Int(substr($DataObjectData, $offset, 8));
-					$offset += 8;
-					$thisfile_asf_dataobject['reserved']           = getid3_lib::LittleEndian2Int(substr($DataObjectData, $offset, 2));
-					$offset += 2;
-					if ($thisfile_asf_dataobject['reserved'] != 0x0101) {
-						$info['warning'][] = 'data_object.reserved ('.getid3_lib::PrintHexBytes($thisfile_asf_dataobject['reserved']).') does not match expected value of "0x0101"';
-						//return false;
-						break;
-					}
-
-					// Data Packets                     array of:    variable        //
-					// * Error Correction Flags         BYTE         8               //
-					// * * Error Correction Data Length bits         4               // if Error Correction Length Type == 00, size of Error Correction Data in bytes, else hardcoded: 0000
-					// * * Opaque Data Present          bits         1               //
-					// * * Error Correction Length Type bits         2               // number of bits for size of the error correction data. hardcoded: 00
-					// * * Error Correction Present     bits         1               // If set, use Opaque Data Packet structure, else use Payload structure
-					// * Error Correction Data
-
-					$info['avdataoffset'] = $this->ftell();
-					$this->fseek(($thisfile_asf_dataobject['objectsize'] - 50), SEEK_CUR); // skip actual audio/video data
-					$info['avdataend'] = $this->ftell();
-					break;
-
-				case GETID3_ASF_Simple_Index_Object:
-					// Simple Index Object: (optional, recommended, one per video stream)
-					// Field Name                       Field Type   Size (bits)
-					// Object ID                        GUID         128             // GUID for Simple Index object - GETID3_ASF_Data_Object
-					// Object Size                      QWORD        64              // size of Simple Index object, including 56 bytes of Simple Index Object header
-					// File ID                          GUID         128             // unique identifier. may be zero or identical to File ID field in Data Object and Header Object
-					// Index Entry Time Interval        QWORD        64              // interval between index entries in 100-nanosecond units
-					// Maximum Packet Count             DWORD        32              // maximum packet count for all index entries
-					// Index Entries Count              DWORD        32              // number of Index Entries structures
-					// Index Entries                    array of:    variable        //
-					// * Packet Number                  DWORD        32              // number of the Data Packet associated with this index entry
-					// * Packet Count                   WORD         16              // number of Data Packets to sent at this index entry
-
-					// shortcut
-					$thisfile_asf['simple_index_object'] = array();
-					$thisfile_asf_simpleindexobject      = &$thisfile_asf['simple_index_object'];
-
-					$SimpleIndexObjectData = $NextObjectDataHeader.$this->fread(56 - 24);
-					$offset = 24;
-
-					$thisfile_asf_simpleindexobject['objectid']                  = $NextObjectGUID;
-					$thisfile_asf_simpleindexobject['objectid_guid']             = $NextObjectGUIDtext;
-					$thisfile_asf_simpleindexobject['objectsize']                = $NextObjectSize;
-
-					$thisfile_asf_simpleindexobject['fileid']                    =                  substr($SimpleIndexObjectData, $offset, 16);
-					$offset += 16;
-					$thisfile_asf_simpleindexobject['fileid_guid']               = $this->BytestringToGUID($thisfile_asf_simpleindexobject['fileid']);
-					$thisfile_asf_simpleindexobject['index_entry_time_interval'] = getid3_lib::LittleEndian2Int(substr($SimpleIndexObjectData, $offset, 8));
-					$offset += 8;
-					$thisfile_asf_simpleindexobject['maximum_packet_count']      = getid3_lib::LittleEndian2Int(substr($SimpleIndexObjectData, $offset, 4));
-					$offset += 4;
-					$thisfile_asf_simpleindexobject['index_entries_count']       = getid3_lib::LittleEndian2Int(substr($SimpleIndexObjectData, $offset, 4));
-					$offset += 4;
-
-					$IndexEntriesData = $SimpleIndexObjectData.$this->fread(6 * $thisfile_asf_simpleindexobject['index_entries_count']);
-					for ($IndexEntriesCounter = 0; $IndexEntriesCounter < $thisfile_asf_simpleindexobject['index_entries_count']; $IndexEntriesCounter++) {
-						$thisfile_asf_simpleindexobject['index_entries'][$IndexEntriesCounter]['packet_number'] = getid3_lib::LittleEndian2Int(substr($IndexEntriesData, $offset, 4));
-						$offset += 4;
-						$thisfile_asf_simpleindexobject['index_entries'][$IndexEntriesCounter]['packet_count']  = getid3_lib::LittleEndian2Int(substr($IndexEntriesData, $offset, 4));
-						$offset += 2;
-					}
-
-					break;
-
-				case GETID3_ASF_Index_Object:
-					// 6.2 ASF top-level Index Object (optional but recommended when appropriate, 0 or 1)
-					// Field Name                       Field Type   Size (bits)
-					// Object ID                        GUID         128             // GUID for the Index Object - GETID3_ASF_Index_Object
-					// Object Size                      QWORD        64              // Specifies the size, in bytes, of the Index Object, including at least 34 bytes of Index Object header
-					// Index Entry Time Interval        DWORD        32              // Specifies the time interval between each index entry in ms.
-					// Index Specifiers Count           WORD         16              // Specifies the number of Index Specifiers structures in this Index Object.
-					// Index Blocks Count               DWORD        32              // Specifies the number of Index Blocks structures in this Index Object.
-
-					// Index Entry Time Interval        DWORD        32              // Specifies the time interval between index entries in milliseconds.  This value cannot be 0.
-					// Index Specifiers Count           WORD         16              // Specifies the number of entries in the Index Specifiers list.  Valid values are 1 and greater.
-					// Index Specifiers                 array of:    varies          //
-					// * Stream Number                  WORD         16              // Specifies the stream number that the Index Specifiers refer to. Valid values are between 1 and 127.
-					// * Index Type                     WORD         16              // Specifies Index Type values as follows:
-																					//   1 = Nearest Past Data Packet - indexes point to the data packet whose presentation time is closest to the index entry time.
-																					//   2 = Nearest Past Media Object - indexes point to the closest data packet containing an entire object or first fragment of an object.
-																					//   3 = Nearest Past Cleanpoint. - indexes point to the closest data packet containing an entire object (or first fragment of an object) that has the Cleanpoint Flag set.
-																					//   Nearest Past Cleanpoint is the most common type of index.
-					// Index Entry Count                DWORD        32              // Specifies the number of Index Entries in the block.
-					// * Block Positions                QWORD        varies          // Specifies a list of byte offsets of the beginnings of the blocks relative to the beginning of the first Data Packet (i.e., the beginning of the Data Object + 50 bytes). The number of entries in this list is specified by the value of the Index Specifiers Count field. The order of those byte offsets is tied to the order in which Index Specifiers are listed.
-					// * Index Entries                  array of:    varies          //
-					// * * Offsets                      DWORD        varies          // An offset value of 0xffffffff indicates an invalid offset value
-
-					// shortcut
-					$thisfile_asf['asf_index_object'] = array();
-					$thisfile_asf_asfindexobject      = &$thisfile_asf['asf_index_object'];
-
-					$ASFIndexObjectData = $NextObjectDataHeader.$this->fread(34 - 24);
-					$offset = 24;
-
-					$thisfile_asf_asfindexobject['objectid']                  = $NextObjectGUID;
-					$thisfile_asf_asfindexobject['objectid_guid']             = $NextObjectGUIDtext;
-					$thisfile_asf_asfindexobject['objectsize']                = $NextObjectSize;
-
-					$thisfile_asf_asfindexobject['entry_time_interval']       = getid3_lib::LittleEndian2Int(substr($ASFIndexObjectData, $offset, 4));
-					$offset += 4;
-					$thisfile_asf_asfindexobject['index_specifiers_count']    = getid3_lib::LittleEndian2Int(substr($ASFIndexObjectData, $offset, 2));
-					$offset += 2;
-					$thisfile_asf_asfindexobject['index_blocks_count']        = getid3_lib::LittleEndian2Int(substr($ASFIndexObjectData, $offset, 4));
-					$offset += 4;
-
-					$ASFIndexObjectData .= $this->fread(4 * $thisfile_asf_asfindexobject['index_specifiers_count']);
-					for ($IndexSpecifiersCounter = 0; $IndexSpecifiersCounter < $thisfile_asf_asfindexobject['index_specifiers_count']; $IndexSpecifiersCounter++) {
-						$IndexSpecifierStreamNumber = getid3_lib::LittleEndian2Int(substr($ASFIndexObjectData, $offset, 2));
-						$offset += 2;
-						$thisfile_asf_asfindexobject['index_specifiers'][$IndexSpecifiersCounter]['stream_number']   = $IndexSpecifierStreamNumber;
-						$thisfile_asf_asfindexobject['index_specifiers'][$IndexSpecifiersCounter]['index_type']      = getid3_lib::LittleEndian2Int(substr($ASFIndexObjectData, $offset, 2));
-						$offset += 2;
-						$thisfile_asf_asfindexobject['index_specifiers'][$IndexSpecifiersCounter]['index_type_text'] = $this->ASFIndexObjectIndexTypeLookup($thisfile_asf_asfindexobject['index_specifiers'][$IndexSpecifiersCounter]['index_type']);
-					}
-
-					$ASFIndexObjectData .= $this->fread(4);
-					$thisfile_asf_asfindexobject['index_entry_count'] = getid3_lib::LittleEndian2Int(substr($ASFIndexObjectData, $offset, 4));
-					$offset += 4;
-
-					$ASFIndexObjectData .= $this->fread(8 * $thisfile_asf_asfindexobject['index_specifiers_count']);
-					for ($IndexSpecifiersCounter = 0; $IndexSpecifiersCounter < $thisfile_asf_asfindexobject['index_specifiers_count']; $IndexSpecifiersCounter++) {
-						$thisfile_asf_asfindexobject['block_positions'][$IndexSpecifiersCounter] = getid3_lib::LittleEndian2Int(substr($ASFIndexObjectData, $offset, 8));
-						$offset += 8;
-					}
-
-					$ASFIndexObjectData .= $this->fread(4 * $thisfile_asf_asfindexobject['index_specifiers_count'] * $thisfile_asf_asfindexobject['index_entry_count']);
-					for ($IndexEntryCounter = 0; $IndexEntryCounter < $thisfile_asf_asfindexobject['index_entry_count']; $IndexEntryCounter++) {
-						for ($IndexSpecifiersCounter = 0; $IndexSpecifiersCounter < $thisfile_asf_asfindexobject['index_specifiers_count']; $IndexSpecifiersCounter++) {
-							$thisfile_asf_asfindexobject['offsets'][$IndexSpecifiersCounter][$IndexEntryCounter] = getid3_lib::LittleEndian2Int(substr($ASFIndexObjectData, $offset, 4));
-							$offset += 4;
-						}
-					}
-					break;
-
-
-				default:
-					// Implementations shall ignore any standard or non-standard object that they do not know how to handle.
-					if ($this->GUIDname($NextObjectGUIDtext)) {
-						$info['warning'][] = 'unhandled GUID "'.$this->GUIDname($NextObjectGUIDtext).'" {'.$NextObjectGUIDtext.'} in ASF body at offset '.($offset - 16 - 8);
-					} else {
-						$info['warning'][] = 'unknown GUID {'.$NextObjectGUIDtext.'} in ASF body at offset '.($this->ftell() - 16 - 8);
-					}
-					$this->fseek(($NextObjectSize - 16 - 8), SEEK_CUR);
-					break;
-			}
-		}
-
-		if (isset($thisfile_asf_codeclistobject['codec_entries']) && is_array($thisfile_asf_codeclistobject['codec_entries'])) {
-			foreach ($thisfile_asf_codeclistobject['codec_entries'] as $streamnumber => $streamdata) {
-				switch ($streamdata['information']) {
-					case 'WMV1':
-					case 'WMV2':
-					case 'WMV3':
-					case 'MSS1':
-					case 'MSS2':
-					case 'WMVA':
-					case 'WVC1':
-					case 'WMVP':
-					case 'WVP2':
-						$thisfile_video['dataformat'] = 'wmv';
-						$info['mime_type'] = 'video/x-ms-wmv';
-						break;
-
-					case 'MP42':
-					case 'MP43':
-					case 'MP4S':
-					case 'mp4s':
-						$thisfile_video['dataformat'] = 'asf';
-						$info['mime_type'] = 'video/x-ms-asf';
-						break;
-
-					default:
-						switch ($streamdata['type_raw']) {
-							case 1:
-								if (strstr($this->TrimConvert($streamdata['name']), 'Windows Media')) {
-									$thisfile_video['dataformat'] = 'wmv';
-									if ($info['mime_type'] == 'video/x-ms-asf') {
-										$info['mime_type'] = 'video/x-ms-wmv';
-									}
-								}
-								break;
-
-							case 2:
-								if (strstr($this->TrimConvert($streamdata['name']), 'Windows Media')) {
-									$thisfile_audio['dataformat'] = 'wma';
-									if ($info['mime_type'] == 'video/x-ms-asf') {
-										$info['mime_type'] = 'audio/x-ms-wma';
-									}
-								}
-								break;
-
-						}
-						break;
-				}
-			}
-		}
-
-		switch (isset($thisfile_audio['codec']) ? $thisfile_audio['codec'] : '') {
-			case 'MPEG Layer-3':
-				$thisfile_audio['dataformat'] = 'mp3';
-				break;
-
-			default:
-				break;
-		}
-
-		if (isset($thisfile_asf_codeclistobject['codec_entries'])) {
-			foreach ($thisfile_asf_codeclistobject['codec_entries'] as $streamnumber => $streamdata) {
-				switch ($streamdata['type_raw']) {
-
-					case 1: // video
-						$thisfile_video['encoder'] = $this->TrimConvert($thisfile_asf_codeclistobject['codec_entries'][$streamnumber]['name']);
-						break;
-
-					case 2: // audio
-						$thisfile_audio['encoder'] = $this->TrimConvert($thisfile_asf_codeclistobject['codec_entries'][$streamnumber]['name']);
-
-						// AH 2003-10-01
-						$thisfile_audio['encoder_options'] = $this->TrimConvert($thisfile_asf_codeclistobject['codec_entries'][0]['description']);
-
-						$thisfile_audio['codec']   = $thisfile_audio['encoder'];
-						break;
-
-					default:
-						$info['warning'][] = 'Unknown streamtype: [codec_list_object][codec_entries]['.$streamnumber.'][type_raw] == '.$streamdata['type_raw'];
-						break;
-
-				}
-			}
-		}
-
-		if (isset($info['audio'])) {
-			$thisfile_audio['lossless']           = (isset($thisfile_audio['lossless'])           ? $thisfile_audio['lossless']           : false);
-			$thisfile_audio['dataformat']         = (!empty($thisfile_audio['dataformat'])        ? $thisfile_audio['dataformat']         : 'asf');
-		}
-		if (!empty($thisfile_video['dataformat'])) {
-			$thisfile_video['lossless']           = (isset($thisfile_audio['lossless'])           ? $thisfile_audio['lossless']           : false);
-			$thisfile_video['pixel_aspect_ratio'] = (isset($thisfile_audio['pixel_aspect_ratio']) ? $thisfile_audio['pixel_aspect_ratio'] : (float) 1);
-			$thisfile_video['dataformat']         = (!empty($thisfile_video['dataformat'])        ? $thisfile_video['dataformat']         : 'asf');
-		}
-		if (!empty($thisfile_video['streams'])) {
-			$thisfile_video['resolution_x'] = 0;
-			$thisfile_video['resolution_y'] = 0;
-			foreach ($thisfile_video['streams'] as $key => $valuearray) {
-				if (($valuearray['resolution_x'] > $thisfile_video['resolution_x']) || ($valuearray['resolution_y'] > $thisfile_video['resolution_y'])) {
-					$thisfile_video['resolution_x'] = $valuearray['resolution_x'];
-					$thisfile_video['resolution_y'] = $valuearray['resolution_y'];
-				}
-			}
-		}
-		$info['bitrate'] = (isset($thisfile_audio['bitrate']) ? $thisfile_audio['bitrate'] : 0) + (isset($thisfile_video['bitrate']) ? $thisfile_video['bitrate'] : 0);
-
-		if ((!isset($info['playtime_seconds']) || ($info['playtime_seconds'] <= 0)) && ($info['bitrate'] > 0)) {
-			$info['playtime_seconds'] = ($info['filesize'] - $info['avdataoffset']) / ($info['bitrate'] / 8);
-		}
-
-		return true;
-	}
-
-	public static function codecListObjectTypeLookup($CodecListType) {
-		static $lookup = array(
-			0x0001 => 'Video Codec',
-			0x0002 => 'Audio Codec',
-			0xFFFF => 'Unknown Codec'
-		);
-
-		return (isset($lookup[$CodecListType]) ? $lookup[$CodecListType] : 'Invalid Codec Type');
-	}
-
-	public static function KnownGUIDs() {
-		static $GUIDarray = array(
-			'GETID3_ASF_Extended_Stream_Properties_Object'   => '14E6A5CB-C672-4332-8399-A96952065B5A',
-			'GETID3_ASF_Padding_Object'                      => '1806D474-CADF-4509-A4BA-9AABCB96AAE8',
-			'GETID3_ASF_Payload_Ext_Syst_Pixel_Aspect_Ratio' => '1B1EE554-F9EA-4BC8-821A-376B74E4C4B8',
-			'GETID3_ASF_Script_Command_Object'               => '1EFB1A30-0B62-11D0-A39B-00A0C90348F6',
-			'GETID3_ASF_No_Error_Correction'                 => '20FB5700-5B55-11CF-A8FD-00805F5C442B',
-			'GETID3_ASF_Content_Branding_Object'             => '2211B3FA-BD23-11D2-B4B7-00A0C955FC6E',
-			'GETID3_ASF_Content_Encryption_Object'           => '2211B3FB-BD23-11D2-B4B7-00A0C955FC6E',
-			'GETID3_ASF_Digital_Signature_Object'            => '2211B3FC-BD23-11D2-B4B7-00A0C955FC6E',
-			'GETID3_ASF_Extended_Content_Encryption_Object'  => '298AE614-2622-4C17-B935-DAE07EE9289C',
-			'GETID3_ASF_Simple_Index_Object'                 => '33000890-E5B1-11CF-89F4-00A0C90349CB',
-			'GETID3_ASF_Degradable_JPEG_Media'               => '35907DE0-E415-11CF-A917-00805F5C442B',
-			'GETID3_ASF_Payload_Extension_System_Timecode'   => '399595EC-8667-4E2D-8FDB-98814CE76C1E',
-			'GETID3_ASF_Binary_Media'                        => '3AFB65E2-47EF-40F2-AC2C-70A90D71D343',
-			'GETID3_ASF_Timecode_Index_Object'               => '3CB73FD0-0C4A-4803-953D-EDF7B6228F0C',
-			'GETID3_ASF_Metadata_Library_Object'             => '44231C94-9498-49D1-A141-1D134E457054',
-			'GETID3_ASF_Reserved_3'                          => '4B1ACBE3-100B-11D0-A39B-00A0C90348F6',
-			'GETID3_ASF_Reserved_4'                          => '4CFEDB20-75F6-11CF-9C0F-00A0C90349CB',
-			'GETID3_ASF_Command_Media'                       => '59DACFC0-59E6-11D0-A3AC-00A0C90348F6',
-			'GETID3_ASF_Header_Extension_Object'             => '5FBF03B5-A92E-11CF-8EE3-00C00C205365',
-			'GETID3_ASF_Media_Object_Index_Parameters_Obj'   => '6B203BAD-3F11-4E84-ACA8-D7613DE2CFA7',
-			'GETID3_ASF_Header_Object'                       => '75B22630-668E-11CF-A6D9-00AA0062CE6C',
-			'GETID3_ASF_Content_Description_Object'          => '75B22633-668E-11CF-A6D9-00AA0062CE6C',
-			'GETID3_ASF_Error_Correction_Object'             => '75B22635-668E-11CF-A6D9-00AA0062CE6C',
-			'GETID3_ASF_Data_Object'                         => '75B22636-668E-11CF-A6D9-00AA0062CE6C',
-			'GETID3_ASF_Web_Stream_Media_Subtype'            => '776257D4-C627-41CB-8F81-7AC7FF1C40CC',
-			'GETID3_ASF_Stream_Bitrate_Properties_Object'    => '7BF875CE-468D-11D1-8D82-006097C9A2B2',
-			'GETID3_ASF_Language_List_Object'                => '7C4346A9-EFE0-4BFC-B229-393EDE415C85',
-			'GETID3_ASF_Codec_List_Object'                   => '86D15240-311D-11D0-A3A4-00A0C90348F6',
-			'GETID3_ASF_Reserved_2'                          => '86D15241-311D-11D0-A3A4-00A0C90348F6',
-			'GETID3_ASF_File_Properties_Object'              => '8CABDCA1-A947-11CF-8EE4-00C00C205365',
-			'GETID3_ASF_File_Transfer_Media'                 => '91BD222C-F21C-497A-8B6D-5AA86BFC0185',
-			'GETID3_ASF_Old_RTP_Extension_Data'              => '96800C63-4C94-11D1-837B-0080C7A37F95',
-			'GETID3_ASF_Advanced_Mutual_Exclusion_Object'    => 'A08649CF-4775-4670-8A16-6E35357566CD',
-			'GETID3_ASF_Bandwidth_Sharing_Object'            => 'A69609E6-517B-11D2-B6AF-00C04FD908E9',
-			'GETID3_ASF_Reserved_1'                          => 'ABD3D211-A9BA-11cf-8EE6-00C00C205365',
-			'GETID3_ASF_Bandwidth_Sharing_Exclusive'         => 'AF6060AA-5197-11D2-B6AF-00C04FD908E9',
-			'GETID3_ASF_Bandwidth_Sharing_Partial'           => 'AF6060AB-5197-11D2-B6AF-00C04FD908E9',
-			'GETID3_ASF_JFIF_Media'                          => 'B61BE100-5B4E-11CF-A8FD-00805F5C442B',
-			'GETID3_ASF_Stream_Properties_Object'            => 'B7DC0791-A9B7-11CF-8EE6-00C00C205365',
-			'GETID3_ASF_Video_Media'                         => 'BC19EFC0-5B4D-11CF-A8FD-00805F5C442B',
-			'GETID3_ASF_Audio_Spread'                        => 'BFC3CD50-618F-11CF-8BB2-00AA00B4E220',
-			'GETID3_ASF_Metadata_Object'                     => 'C5F8CBEA-5BAF-4877-8467-AA8C44FA4CCA',
-			'GETID3_ASF_Payload_Ext_Syst_Sample_Duration'    => 'C6BD9450-867F-4907-83A3-C77921B733AD',
-			'GETID3_ASF_Group_Mutual_Exclusion_Object'       => 'D1465A40-5A79-4338-B71B-E36B8FD6C249',
-			'GETID3_ASF_Extended_Content_Description_Object' => 'D2D0A440-E307-11D2-97F0-00A0C95EA850',
-			'GETID3_ASF_Stream_Prioritization_Object'        => 'D4FED15B-88D3-454F-81F0-ED5C45999E24',
-			'GETID3_ASF_Payload_Ext_System_Content_Type'     => 'D590DC20-07BC-436C-9CF7-F3BBFBF1A4DC',
-			'GETID3_ASF_Old_File_Properties_Object'          => 'D6E229D0-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_ASF_Header_Object'               => 'D6E229D1-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_ASF_Data_Object'                 => 'D6E229D2-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Index_Object'                        => 'D6E229D3-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Stream_Properties_Object'        => 'D6E229D4-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Content_Description_Object'      => 'D6E229D5-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Script_Command_Object'           => 'D6E229D6-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Marker_Object'                   => 'D6E229D7-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Component_Download_Object'       => 'D6E229D8-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Stream_Group_Object'             => 'D6E229D9-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Scalable_Object'                 => 'D6E229DA-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Prioritization_Object'           => 'D6E229DB-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Bitrate_Mutual_Exclusion_Object'     => 'D6E229DC-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Inter_Media_Dependency_Object'   => 'D6E229DD-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Rating_Object'                   => 'D6E229DE-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Index_Parameters_Object'             => 'D6E229DF-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Color_Table_Object'              => 'D6E229E0-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Language_List_Object'            => 'D6E229E1-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Audio_Media'                     => 'D6E229E2-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Video_Media'                     => 'D6E229E3-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Image_Media'                     => 'D6E229E4-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Timecode_Media'                  => 'D6E229E5-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Text_Media'                      => 'D6E229E6-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_MIDI_Media'                      => 'D6E229E7-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Command_Media'                   => 'D6E229E8-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_No_Error_Concealment'            => 'D6E229EA-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Scrambled_Audio'                 => 'D6E229EB-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_No_Color_Table'                  => 'D6E229EC-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_SMPTE_Time'                      => 'D6E229ED-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_ASCII_Text'                      => 'D6E229EE-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Unicode_Text'                    => 'D6E229EF-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_HTML_Text'                       => 'D6E229F0-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_URL_Command'                     => 'D6E229F1-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Filename_Command'                => 'D6E229F2-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_ACM_Codec'                       => 'D6E229F3-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_VCM_Codec'                       => 'D6E229F4-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_QuickTime_Codec'                 => 'D6E229F5-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_DirectShow_Transform_Filter'     => 'D6E229F6-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_DirectShow_Rendering_Filter'     => 'D6E229F7-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_No_Enhancement'                  => 'D6E229F8-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Unknown_Enhancement_Type'        => 'D6E229F9-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Temporal_Enhancement'            => 'D6E229FA-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Spatial_Enhancement'             => 'D6E229FB-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Quality_Enhancement'             => 'D6E229FC-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Number_of_Channels_Enhancement'  => 'D6E229FD-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Frequency_Response_Enhancement'  => 'D6E229FE-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Media_Object'                    => 'D6E229FF-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Mutex_Language'                      => 'D6E22A00-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Mutex_Bitrate'                       => 'D6E22A01-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Mutex_Unknown'                       => 'D6E22A02-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_ASF_Placeholder_Object'          => 'D6E22A0E-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Old_Data_Unit_Extension_Object'      => 'D6E22A0F-35DA-11D1-9034-00A0C90349BE',
-			'GETID3_ASF_Web_Stream_Format'                   => 'DA1E6B13-8359-4050-B398-388E965BF00C',
-			'GETID3_ASF_Payload_Ext_System_File_Name'        => 'E165EC0E-19ED-45D7-B4A7-25CBD1E28E9B',
-			'GETID3_ASF_Marker_Object'                       => 'F487CD01-A951-11CF-8EE6-00C00C205365',
-			'GETID3_ASF_Timecode_Index_Parameters_Object'    => 'F55E496D-9797-4B5D-8C8B-604DFE9BFB24',
-			'GETID3_ASF_Audio_Media'                         => 'F8699E40-5B4D-11CF-A8FD-00805F5C442B',
-			'GETID3_ASF_Media_Object_Index_Object'           => 'FEB103F8-12AD-4C64-840F-2A1D2F7AD48C',
-			'GETID3_ASF_Alt_Extended_Content_Encryption_Obj' => 'FF889EF1-ADEE-40DA-9E71-98704BB928CE',
-			'GETID3_ASF_Index_Placeholder_Object'            => 'D9AADE20-7C17-4F9C-BC28-8555DD98E2A2', // http://cpan.uwinnipeg.ca/htdocs/Audio-WMA/Audio/WMA.pm.html
-			'GETID3_ASF_Compatibility_Object'                => '26F18B5D-4584-47EC-9F5F-0E651F0452C9', // http://cpan.uwinnipeg.ca/htdocs/Audio-WMA/Audio/WMA.pm.html
-		);
-		return $GUIDarray;
-	}
-
-	public static function GUIDname($GUIDstring) {
-		static $GUIDarray = array();
-		if (empty($GUIDarray)) {
-			$GUIDarray = self::KnownGUIDs();
-		}
-		return array_search($GUIDstring, $GUIDarray);
-	}
-
-	public static function ASFIndexObjectIndexTypeLookup($id) {
-		static $ASFIndexObjectIndexTypeLookup = array();
-		if (empty($ASFIndexObjectIndexTypeLookup)) {
-			$ASFIndexObjectIndexTypeLookup[1] = 'Nearest Past Data Packet';
-			$ASFIndexObjectIndexTypeLookup[2] = 'Nearest Past Media Object';
-			$ASFIndexObjectIndexTypeLookup[3] = 'Nearest Past Cleanpoint';
-		}
-		return (isset($ASFIndexObjectIndexTypeLookup[$id]) ? $ASFIndexObjectIndexTypeLookup[$id] : 'invalid');
-	}
-
-	public static function GUIDtoBytestring($GUIDstring) {
-		// Microsoft defines these 16-byte (128-bit) GUIDs in the strangest way:
-		// first 4 bytes are in little-endian order
-		// next 2 bytes are appended in little-endian order
-		// next 2 bytes are appended in little-endian order
-		// next 2 bytes are appended in big-endian order
-		// next 6 bytes are appended in big-endian order
-
-		// AaBbCcDd-EeFf-GgHh-IiJj-KkLlMmNnOoPp is stored as this 16-byte string:
-		// $Dd $Cc $Bb $Aa $Ff $Ee $Hh $Gg $Ii $Jj $Kk $Ll $Mm $Nn $Oo $Pp
-
-		$hexbytecharstring  = chr(hexdec(substr($GUIDstring,  6, 2)));
-		$hexbytecharstring .= chr(hexdec(substr($GUIDstring,  4, 2)));
-		$hexbytecharstring .= chr(hexdec(substr($GUIDstring,  2, 2)));
-		$hexbytecharstring .= chr(hexdec(substr($GUIDstring,  0, 2)));
-
-		$hexbytecharstring .= chr(hexdec(substr($GUIDstring, 11, 2)));
-		$hexbytecharstring .= chr(hexdec(substr($GUIDstring,  9, 2)));
-
-		$hexbytecharstring .= chr(hexdec(substr($GUIDstring, 16, 2)));
-		$hexbytecharstring .= chr(hexdec(substr($GUIDstring, 14, 2)));
-
-		$hexbytecharstring .= chr(hexdec(substr($GUIDstring, 19, 2)));
-		$hexbytecharstring .= chr(hexdec(substr($GUIDstring, 21, 2)));
-
-		$hexbytecharstring .= chr(hexdec(substr($GUIDstring, 24, 2)));
-		$hexbytecharstring .= chr(hexdec(substr($GUIDstring, 26, 2)));
-		$hexbytecharstring .= chr(hexdec(substr($GUIDstring, 28, 2)));
-		$hexbytecharstring .= chr(hexdec(substr($GUIDstring, 30, 2)));
-		$hexbytecharstring .= chr(hexdec(substr($GUIDstring, 32, 2)));
-		$hexbytecharstring .= chr(hexdec(substr($GUIDstring, 34, 2)));
-
-		return $hexbytecharstring;
-	}
-
-	public static function BytestringToGUID($Bytestring) {
-		$GUIDstring  = str_pad(dechex(ord($Bytestring{3})),  2, '0', STR_PAD_LEFT);
-		$GUIDstring .= str_pad(dechex(ord($Bytestring{2})),  2, '0', STR_PAD_LEFT);
-		$GUIDstring .= str_pad(dechex(ord($Bytestring{1})),  2, '0', STR_PAD_LEFT);
-		$GUIDstring .= str_pad(dechex(ord($Bytestring{0})),  2, '0', STR_PAD_LEFT);
-		$GUIDstring .= '-';
-		$GUIDstring .= str_pad(dechex(ord($Bytestring{5})),  2, '0', STR_PAD_LEFT);
-		$GUIDstring .= str_pad(dechex(ord($Bytestring{4})),  2, '0', STR_PAD_LEFT);
-		$GUIDstring .= '-';
-		$GUIDstring .= str_pad(dechex(ord($Bytestring{7})),  2, '0', STR_PAD_LEFT);
-		$GUIDstring .= str_pad(dechex(ord($Bytestring{6})),  2, '0', STR_PAD_LEFT);
-		$GUIDstring .= '-';
-		$GUIDstring .= str_pad(dechex(ord($Bytestring{8})),  2, '0', STR_PAD_LEFT);
-		$GUIDstring .= str_pad(dechex(ord($Bytestring{9})),  2, '0', STR_PAD_LEFT);
-		$GUIDstring .= '-';
-		$GUIDstring .= str_pad(dechex(ord($Bytestring{10})), 2, '0', STR_PAD_LEFT);
-		$GUIDstring .= str_pad(dechex(ord($Bytestring{11})), 2, '0', STR_PAD_LEFT);
-		$GUIDstring .= str_pad(dechex(ord($Bytestring{12})), 2, '0', STR_PAD_LEFT);
-		$GUIDstring .= str_pad(dechex(ord($Bytestring{13})), 2, '0', STR_PAD_LEFT);
-		$GUIDstring .= str_pad(dechex(ord($Bytestring{14})), 2, '0', STR_PAD_LEFT);
-		$GUIDstring .= str_pad(dechex(ord($Bytestring{15})), 2, '0', STR_PAD_LEFT);
-
-		return strtoupper($GUIDstring);
-	}
-
-	public static function FILETIMEtoUNIXtime($FILETIME, $round=true) {
-		// FILETIME is a 64-bit unsigned integer representing
-		// the number of 100-nanosecond intervals since January 1, 1601
-		// UNIX timestamp is number of seconds since January 1, 1970
-		// 116444736000000000 = 10000000 * 60 * 60 * 24 * 365 * 369 + 89 leap days
-		if ($round) {
-			return intval(round(($FILETIME - 116444736000000000) / 10000000));
-		}
-		return ($FILETIME - 116444736000000000) / 10000000;
-	}
-
-	public static function WMpictureTypeLookup($WMpictureType) {
-		static $lookup = null;
-		if ($lookup === null) {
-			$lookup = array(
-				0x03 => 'Front Cover',
-				0x04 => 'Back Cover',
-				0x00 => 'User Defined',
-				0x05 => 'Leaflet Page',
-				0x06 => 'Media Label',
-				0x07 => 'Lead Artist',
-				0x08 => 'Artist',
-				0x09 => 'Conductor',
-				0x0A => 'Band',
-				0x0B => 'Composer',
-				0x0C => 'Lyricist',
-				0x0D => 'Recording Location',
-				0x0E => 'During Recording',
-				0x0F => 'During Performance',
-				0x10 => 'Video Screen Capture',
-				0x12 => 'Illustration',
-				0x13 => 'Band Logotype',
-				0x14 => 'Publisher Logotype'
-			);
-			$lookup = array_map(function($str) {
-				return getid3_lib::iconv_fallback('UTF-8', 'UTF-16LE', $str);
-			}, $lookup);
-		}
-
-		return (isset($lookup[$WMpictureType]) ? $lookup[$WMpictureType] : '');
-	}
-
-	public function HeaderExtensionObjectDataParse(&$asf_header_extension_object_data, &$unhandled_sections) {
-		// http://msdn.microsoft.com/en-us/library/bb643323.aspx
-
-		$offset = 0;
-		$objectOffset = 0;
-		$HeaderExtensionObjectParsed = array();
-		while ($objectOffset < strlen($asf_header_extension_object_data)) {
-			$offset = $objectOffset;
-			$thisObject = array();
-
-			$thisObject['guid']                              =                              substr($asf_header_extension_object_data, $offset, 16);
-			$offset += 16;
-			$thisObject['guid_text'] = $this->BytestringToGUID($thisObject['guid']);
-			$thisObject['guid_name'] = $this->GUIDname($thisObject['guid_text']);
-
-			$thisObject['size']                              = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  8));
-			$offset += 8;
-			if ($thisObject['size'] <= 0) {
-				break;
-			}
-
-			switch ($thisObject['guid']) {
-				case GETID3_ASF_Extended_Stream_Properties_Object:
-					$thisObject['start_time']                        = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  8));
-					$offset += 8;
-					$thisObject['start_time_unix']                   = $this->FILETIMEtoUNIXtime($thisObject['start_time']);
-
-					$thisObject['end_time']                          = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  8));
-					$offset += 8;
-					$thisObject['end_time_unix']                     = $this->FILETIMEtoUNIXtime($thisObject['end_time']);
-
-					$thisObject['data_bitrate']                      = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
-					$offset += 4;
-
-					$thisObject['buffer_size']                       = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
-					$offset += 4;
-
-					$thisObject['initial_buffer_fullness']           = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
-					$offset += 4;
-
-					$thisObject['alternate_data_bitrate']            = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
-					$offset += 4;
-
-					$thisObject['alternate_buffer_size']             = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
-					$offset += 4;
-
-					$thisObject['alternate_initial_buffer_fullness'] = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
-					$offset += 4;
-
-					$thisObject['maximum_object_size']               = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
-					$offset += 4;
-
-					$thisObject['flags_raw']                         = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
-					$offset += 4;
-					$thisObject['flags']['reliable']                = (bool) $thisObject['flags_raw'] & 0x00000001;
-					$thisObject['flags']['seekable']                = (bool) $thisObject['flags_raw'] & 0x00000002;
-					$thisObject['flags']['no_cleanpoints']          = (bool) $thisObject['flags_raw'] & 0x00000004;
-					$thisObject['flags']['resend_live_cleanpoints'] = (bool) $thisObject['flags_raw'] & 0x00000008;
-
-					$thisObject['stream_number']                     = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
-					$offset += 2;
-
-					$thisObject['stream_language_id_index']          = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
-					$offset += 2;
-
-					$thisObject['average_time_per_frame']            = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
-					$offset += 4;
-
-					$thisObject['stream_name_count']                 = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
-					$offset += 2;
-
-					$thisObject['payload_extension_system_count']    = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
-					$offset += 2;
-
-					for ($i = 0; $i < $thisObject['stream_name_count']; $i++) {
-						$streamName = array();
-
-						$streamName['language_id_index']             = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
-						$offset += 2;
-
-						$streamName['stream_name_length']            = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
-						$offset += 2;
-
-						$streamName['stream_name']                   = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  $streamName['stream_name_length']));
-						$offset += $streamName['stream_name_length'];
-
-						$thisObject['stream_names'][$i] = $streamName;
-					}
-
-					for ($i = 0; $i < $thisObject['payload_extension_system_count']; $i++) {
-						$payloadExtensionSystem = array();
-
-						$payloadExtensionSystem['extension_system_id']   =                              substr($asf_header_extension_object_data, $offset, 16);
-						$offset += 16;
-						$payloadExtensionSystem['extension_system_id_text'] = $this->BytestringToGUID($payloadExtensionSystem['extension_system_id']);
-
-						$payloadExtensionSystem['extension_system_size'] = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
-						$offset += 2;
-						if ($payloadExtensionSystem['extension_system_size'] <= 0) {
-							break 2;
-						}
-
-						$payloadExtensionSystem['extension_system_info_length'] = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
-						$offset += 4;
-
-						$payloadExtensionSystem['extension_system_info_length'] = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  $payloadExtensionSystem['extension_system_info_length']));
-						$offset += $payloadExtensionSystem['extension_system_info_length'];
-
-						$thisObject['payload_extension_systems'][$i] = $payloadExtensionSystem;
-					}
-
-					break;
-
-				case GETID3_ASF_Padding_Object:
-					// padding, skip it
-					break;
-
-				case GETID3_ASF_Metadata_Object:
-					$thisObject['description_record_counts'] = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
-					$offset += 2;
-
-					for ($i = 0; $i < $thisObject['description_record_counts']; $i++) {
-						$descriptionRecord = array();
-
-						$descriptionRecord['reserved_1']         = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2)); // must be zero
-						$offset += 2;
-
-						$descriptionRecord['stream_number']      = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
-						$offset += 2;
-
-						$descriptionRecord['name_length']        = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
-						$offset += 2;
-
-						$descriptionRecord['data_type']          = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
-						$offset += 2;
-						$descriptionRecord['data_type_text'] = self::metadataLibraryObjectDataTypeLookup($descriptionRecord['data_type']);
-
-						$descriptionRecord['data_length']        = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
-						$offset += 4;
-
-						$descriptionRecord['name']               =                              substr($asf_header_extension_object_data, $offset,  $descriptionRecord['name_length']);
-						$offset += $descriptionRecord['name_length'];
-
-						$descriptionRecord['data']               =                              substr($asf_header_extension_object_data, $offset,  $descriptionRecord['data_length']);
-						$offset += $descriptionRecord['data_length'];
-						switch ($descriptionRecord['data_type']) {
-							case 0x0000: // Unicode string
-								break;
-
-							case 0x0001: // BYTE array
-								// do nothing
-								break;
-
-							case 0x0002: // BOOL
-								$descriptionRecord['data'] = (bool) getid3_lib::LittleEndian2Int($descriptionRecord['data']);
-								break;
-
-							case 0x0003: // DWORD
-							case 0x0004: // QWORD
-							case 0x0005: // WORD
-								$descriptionRecord['data'] = getid3_lib::LittleEndian2Int($descriptionRecord['data']);
-								break;
-
-							case 0x0006: // GUID
-								$descriptionRecord['data_text'] = $this->BytestringToGUID($descriptionRecord['data']);
-								break;
-						}
-
-						$thisObject['description_record'][$i] = $descriptionRecord;
-					}
-					break;
-
-				case GETID3_ASF_Language_List_Object:
-					$thisObject['language_id_record_counts'] = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
-					$offset += 2;
-
-					for ($i = 0; $i < $thisObject['language_id_record_counts']; $i++) {
-						$languageIDrecord = array();
-
-						$languageIDrecord['language_id_length']         = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  1));
-						$offset += 1;
-
-						$languageIDrecord['language_id']                =                              substr($asf_header_extension_object_data, $offset,  $languageIDrecord['language_id_length']);
-						$offset += $languageIDrecord['language_id_length'];
-
-						$thisObject['language_id_record'][$i] = $languageIDrecord;
-					}
-					break;
-
-				case GETID3_ASF_Metadata_Library_Object:
-					$thisObject['description_records_count'] = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
-					$offset += 2;
-
-					for ($i = 0; $i < $thisObject['description_records_count']; $i++) {
-						$descriptionRecord = array();
-
-						$descriptionRecord['language_list_index'] = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
-						$offset += 2;
-
-						$descriptionRecord['stream_number']       = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
-						$offset += 2;
-
-						$descriptionRecord['name_length']         = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
-						$offset += 2;
-
-						$descriptionRecord['data_type']           = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
-						$offset += 2;
-						$descriptionRecord['data_type_text'] = self::metadataLibraryObjectDataTypeLookup($descriptionRecord['data_type']);
-
-						$descriptionRecord['data_length']         = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
-						$offset += 4;
-
-						$descriptionRecord['name']                =                              substr($asf_header_extension_object_data, $offset,  $descriptionRecord['name_length']);
-						$offset += $descriptionRecord['name_length'];
-
-						$descriptionRecord['data']                =                              substr($asf_header_extension_object_data, $offset,  $descriptionRecord['data_length']);
-						$offset += $descriptionRecord['data_length'];
-
-						if (preg_match('#^WM/Picture$#', str_replace("\x00", '', trim($descriptionRecord['name'])))) {
-							$WMpicture = $this->ASF_WMpicture($descriptionRecord['data']);
-							foreach ($WMpicture as $key => $value) {
-								$descriptionRecord['data'] = $WMpicture;
-							}
-							unset($WMpicture);
-						}
-
-						$thisObject['description_record'][$i] = $descriptionRecord;
-					}
-					break;
-
-				default:
-					$unhandled_sections++;
-					if ($this->GUIDname($thisObject['guid_text'])) {
-						$this->getid3->info['warning'][] = 'unhandled Header Extension Object GUID "'.$this->GUIDname($thisObject['guid_text']).'" {'.$thisObject['guid_text'].'} at offset '.($offset - 16 - 8);
-					} else {
-						$this->getid3->info['warning'][] = 'unknown Header Extension Object GUID {'.$thisObject['guid_text'].'} in at offset '.($offset - 16 - 8);
-					}
-					break;
-			}
-			$HeaderExtensionObjectParsed[] = $thisObject;
-
-			$objectOffset += $thisObject['size'];
-		}
-		return $HeaderExtensionObjectParsed;
-	}
-
-
-	public static function metadataLibraryObjectDataTypeLookup($id) {
-		static $lookup = array(
-			0x0000 => 'Unicode string', // The data consists of a sequence of Unicode characters
-			0x0001 => 'BYTE array',     // The type of the data is implementation-specific
-			0x0002 => 'BOOL',           // The data is 2 bytes long and should be interpreted as a 16-bit unsigned integer. Only 0x0000 or 0x0001 are permitted values
-			0x0003 => 'DWORD',          // The data is 4 bytes long and should be interpreted as a 32-bit unsigned integer
-			0x0004 => 'QWORD',          // The data is 8 bytes long and should be interpreted as a 64-bit unsigned integer
-			0x0005 => 'WORD',           // The data is 2 bytes long and should be interpreted as a 16-bit unsigned integer
-			0x0006 => 'GUID',           // The data is 16 bytes long and should be interpreted as a 128-bit GUID
-		);
-		return (isset($lookup[$id]) ? $lookup[$id] : 'invalid');
-	}
-
-	public function ASF_WMpicture(&$data) {
-		//typedef struct _WMPicture{
-		//  LPWSTR  pwszMIMEType;
-		//  BYTE  bPictureType;
-		//  LPWSTR  pwszDescription;
-		//  DWORD  dwDataLen;
-		//  BYTE*  pbData;
-		//} WM_PICTURE;
-
-		$WMpicture = array();
-
-		$offset = 0;
-		$WMpicture['image_type_id'] = getid3_lib::LittleEndian2Int(substr($data, $offset, 1));
-		$offset += 1;
-		$WMpicture['image_type']    = self::WMpictureTypeLookup($WMpicture['image_type_id']);
-		$WMpicture['image_size']    = getid3_lib::LittleEndian2Int(substr($data, $offset, 4));
-		$offset += 4;
-
-		$WMpicture['image_mime'] = '';
-		do {
-			$next_byte_pair = substr($data, $offset, 2);
-			$offset += 2;
-			$WMpicture['image_mime'] .= $next_byte_pair;
-		} while ($next_byte_pair !== "\x00\x00");
-
-		$WMpicture['image_description'] = '';
-		do {
-			$next_byte_pair = substr($data, $offset, 2);
-			$offset += 2;
-			$WMpicture['image_description'] .= $next_byte_pair;
-		} while ($next_byte_pair !== "\x00\x00");
-
-		$WMpicture['dataoffset'] = $offset;
-		$WMpicture['data'] = substr($data, $offset);
-
-		$imageinfo = array();
-		$WMpicture['image_mime'] = '';
-		$imagechunkcheck = getid3_lib::GetDataImageSize($WMpicture['data'], $imageinfo);
-		unset($imageinfo);
-		if (!empty($imagechunkcheck)) {
-			$WMpicture['image_mime'] = image_type_to_mime_type($imagechunkcheck[2]);
-		}
-		if (!isset($this->getid3->info['asf']['comments']['picture'])) {
-			$this->getid3->info['asf']['comments']['picture'] = array();
-		}
-		$this->getid3->info['asf']['comments']['picture'][] = array('data'=>$WMpicture['data'], 'image_mime'=>$WMpicture['image_mime']);
-
-		return $WMpicture;
-	}
-
-
-	// Remove terminator 00 00 and convert UTF-16LE to Latin-1
-	public static function TrimConvert($string) {
-		return trim(getid3_lib::iconv_fallback('UTF-16LE', 'ISO-8859-1', self::TrimTerm($string)), ' ');
-	}
-
-
-	// Remove terminator 00 00
-	public static function TrimTerm($string) {
-		// remove terminator, only if present (it should be, but...)
-		if (substr($string, -2) === "\x00\x00") {
-			$string = substr($string, 0, -2);
-		}
-		return $string;
-	}
-
-}
Index: www/wp-admin/customize.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/customize.php	(revision 38565)
+++ www/wp-admin/customize.php	(revision 38565)
@@ -1,189 +0,0 @@
-<?php
-/**
- * Theme Customize Screen.
- *
- * @package WordPress
- * @subpackage Customize
- * @since 3.4.0
- */
-
-define( 'IFRAME_REQUEST', true );
-
-/** Load WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-if ( ! current_user_can( 'customize' ) ) {
-	wp_die(
-		'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-		'<p>' . __( 'Sorry, you are not allowed to customize this site.' ) . '</p>',
-		403
-	);
-}
-
-wp_reset_vars( array( 'url', 'return', 'autofocus' ) );
-if ( ! empty( $url ) ) {
-	$wp_customize->set_preview_url( wp_unslash( $url ) );
-}
-if ( ! empty( $return ) ) {
-	$wp_customize->set_return_url( wp_unslash( $return ) );
-}
-if ( ! empty( $autofocus ) && is_array( $autofocus ) ) {
-	$wp_customize->set_autofocus( wp_unslash( $autofocus ) );
-}
-
-/**
- * @global WP_Scripts           $wp_scripts
- * @global WP_Customize_Manager $wp_customize
- */
-global $wp_scripts, $wp_customize;
-
-$registered = $wp_scripts->registered;
-$wp_scripts = new WP_Scripts;
-$wp_scripts->registered = $registered;
-
-add_action( 'customize_controls_print_scripts',        'print_head_scripts', 20 );
-add_action( 'customize_controls_print_footer_scripts', '_wp_footer_scripts'     );
-add_action( 'customize_controls_print_styles',         'print_admin_styles', 20 );
-
-/**
- * Fires when Customizer controls are initialized, before scripts are enqueued.
- *
- * @since 3.4.0
- */
-do_action( 'customize_controls_init' );
-
-wp_enqueue_script( 'customize-controls' );
-wp_enqueue_style( 'customize-controls' );
-
-/**
- * Enqueue Customizer control scripts.
- *
- * @since 3.4.0
- */
-do_action( 'customize_controls_enqueue_scripts' );
-
-// Let's roll.
-@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
-
-wp_user_settings();
-_wp_admin_html_begin();
-
-$body_class = 'wp-core-ui wp-customizer js';
-
-if ( wp_is_mobile() ) :
-	$body_class .= ' mobile';
-
-	?><meta name="viewport" id="viewport-meta" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=1.2" /><?php
-endif;
-
-if ( $wp_customize->is_ios() ) {
-	$body_class .= ' ios';
-}
-
-if ( is_rtl() ) {
-	$body_class .= ' rtl';
-}
-$body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
-
-$admin_title = sprintf( $wp_customize->get_document_title_template(), __( 'Loading&hellip;' ) );
-
-?><title><?php echo $admin_title; ?></title>
-
-<script type="text/javascript">
-var ajaxurl = <?php echo wp_json_encode( admin_url( 'admin-ajax.php', 'relative' ) ); ?>;
-</script>
-
-<?php
-/**
- * Fires when Customizer control styles are printed.
- *
- * @since 3.4.0
- */
-do_action( 'customize_controls_print_styles' );
-
-/**
- * Fires when Customizer control scripts are printed.
- *
- * @since 3.4.0
- */
-do_action( 'customize_controls_print_scripts' );
-?>
-</head>
-<body class="<?php echo esc_attr( $body_class ); ?>">
-<div class="wp-full-overlay expanded">
-	<form id="customize-controls" class="wrap wp-full-overlay-sidebar">
-		<div id="customize-header-actions" class="wp-full-overlay-header">
-			<?php
-			$save_text = $wp_customize->is_theme_active() ? __( 'Save &amp; Publish' ) : __( 'Save &amp; Activate' );
-			submit_button( $save_text, 'primary save', 'save', false );
-			?>
-			<span class="spinner"></span>
-			<button type="button" class="customize-controls-preview-toggle">
-				<span class="controls"><?php _e( 'Customize' ); ?></span>
-				<span class="preview"><?php _e( 'Preview' ); ?></span>
-			</button>
-			<a class="customize-controls-close" href="<?php echo esc_url( $wp_customize->get_return_url() ); ?>">
-				<span class="screen-reader-text"><?php _e( 'Close the Customizer and go back to the previous page' ); ?></span>
-			</a>
-		</div>
-
-		<div id="widgets-right" class="wp-clearfix"><!-- For Widget Customizer, many widgets try to look for instances under div#widgets-right, so we have to add that ID to a container div in the Customizer for compat -->
-		<div class="wp-full-overlay-sidebar-content" tabindex="-1">
-			<div id="customize-info" class="accordion-section customize-info">
-				<div class="accordion-section-title">
-					<span class="preview-notice"><?php
-						echo sprintf( __( 'You are customizing %s' ), '<strong class="panel-title site-title">' . get_bloginfo( 'name' ) . '</strong>' );
-					?></span>
-					<button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></button>
-				</div>
-				<div class="customize-panel-description"><?php
-					_e( 'The Customizer allows you to preview changes to your site before publishing them. You can also navigate to different pages on your site to preview them.' );
-				?></div>
-			</div>
-
-			<div id="customize-theme-controls">
-				<ul><?php // Panels and sections are managed here via JavaScript ?></ul>
-			</div>
-		</div>
-		</div>
-
-		<div id="customize-footer-actions" class="wp-full-overlay-footer">
-			<?php $previewable_devices = $wp_customize->get_previewable_devices(); ?>
-			<?php if ( ! empty( $previewable_devices ) ) : ?>
-			<div class="devices">
-				<?php foreach ( (array) $previewable_devices as $device => $settings ) : ?>
-					<?php
-					if ( empty( $settings['label'] ) ) {
-						continue;
-					}
-					$active = ! empty( $settings['default'] );
-					$class = 'preview-' . $device;
-					if ( $active ) {
-						$class .= ' active';
-					}
-					?>
-					<button type="button" class="<?php echo esc_attr( $class ); ?>" aria-pressed="<?php echo esc_attr( $active ) ?>" data-device="<?php echo esc_attr( $device ); ?>">
-						<span class="screen-reader-text"><?php echo esc_html( $settings['label'] ); ?></span>
-					</button>
-				<?php endforeach; ?>
-			</div>
-			<?php endif; ?>
-			<button type="button" class="collapse-sidebar button-secondary" aria-expanded="true" aria-label="<?php esc_attr_e( 'Collapse Sidebar' ); ?>">
-				<span class="collapse-sidebar-arrow"></span>
-				<span class="collapse-sidebar-label"><?php _e( 'Collapse' ); ?></span>
-			</button>
-		</div>
-	</form>
-	<div id="customize-preview" class="wp-full-overlay-main"></div>
-	<?php
-
-	/**
-	 * Prints templates, control scripts, and settings in the footer.
-	 *
-	 * @since 3.4.0
-	 */
-	do_action( 'customize_controls_print_footer_scripts' );
-	?>
-</div>
-</body>
-</html>
Index: www/wp-includes/IXR/class-IXR-date.php
===================================================================
--- www/wp-includes/IXR/class-IXR-date.php	(revision 38565)
+++ www/wp-includes/autoload/ixr/IXR_Date.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/requests/Session.php
===================================================================
--- www/wp-includes/autoload/requests/Session.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Session.php	(revision UNDEFINED)
@@ -1,266 +0,0 @@
-<?php
-/**
- * Session handler for persistent requests and default parameters
- *
- * @package Requests
- * @subpackage Session Handler
- */
-
-/**
- * Session handler for persistent requests and default parameters
- *
- * Allows various options to be set as default values, and merges both the
- * options and URL properties together. A base URL can be set for all requests,
- * with all subrequests resolved from this. Base options can be set (including
- * a shared cookie jar), then overridden for individual requests.
- *
- * @package Requests
- * @subpackage Session Handler
- */
-class Requests_Session {
-	/**
-	 * Base URL for requests
-	 *
-	 * URLs will be made absolute using this as the base
-	 * @var string|null
-	 */
-	public $url = null;
-
-	/**
-	 * Base headers for requests
-	 * @var array
-	 */
-	public $headers = array();
-
-	/**
-	 * Base data for requests
-	 *
-	 * If both the base data and the per-request data are arrays, the data will
-	 * be merged before sending the request.
-	 *
-	 * @var array
-	 */
-	public $data = array();
-
-	/**
-	 * Base options for requests
-	 *
-	 * The base options are merged with the per-request data for each request.
-	 * The only default option is a shared cookie jar between requests.
-	 *
-	 * Values here can also be set directly via properties on the Session
-	 * object, e.g. `$session->useragent = 'X';`
-	 *
-	 * @var array
-	 */
-	public $options = array();
-
-	/**
-	 * Create a new session
-	 *
-	 * @param string|null $url Base URL for requests
-	 * @param array $headers Default headers for requests
-	 * @param array $data Default data for requests
-	 * @param array $options Default options for requests
-	 */
-	public function __construct($url = null, $headers = array(), $data = array(), $options = array()) {
-		$this->url = $url;
-		$this->headers = $headers;
-		$this->data = $data;
-		$this->options = $options;
-
-		if (empty($this->options['cookies'])) {
-			$this->options['cookies'] = new Requests_Cookie_Jar();
-		}
-	}
-
-	/**
-	 * Get a property's value
-	 *
-	 * @param string $key Property key
-	 * @return mixed|null Property value, null if none found
-	 */
-	public function __get($key) {
-		if (isset($this->options[$key])) {
-			return $this->options[$key];
-		}
-
-		return null;
-	}
-
-	/**
-	 * Set a property's value
-	 *
-	 * @param string $key Property key
-	 * @param mixed $value Property value
-	 */
-	public function __set($key, $value) {
-		$this->options[$key] = $value;
-	}
-
-	/**
-	 * Remove a property's value
-	 *
-	 * @param string $key Property key
-	 */
-	public function __isset($key) {
-		return isset($this->options[$key]);
-	}
-
-	/**
-	 * Remove a property's value
-	 *
-	 * @param string $key Property key
-	 */
-	public function __unset($key) {
-		if (isset($this->options[$key])) {
-			unset($this->options[$key]);
-		}
-	}
-
-	/**#@+
-	 * @see request()
-	 * @param string $url
-	 * @param array $headers
-	 * @param array $options
-	 * @return Requests_Response
-	 */
-	/**
-	 * Send a GET request
-	 */
-	public function get($url, $headers = array(), $options = array()) {
-		return $this->request($url, $headers, null, Requests::GET, $options);
-	}
-
-	/**
-	 * Send a HEAD request
-	 */
-	public function head($url, $headers = array(), $options = array()) {
-		return $this->request($url, $headers, null, Requests::HEAD, $options);
-	}
-
-	/**
-	 * Send a DELETE request
-	 */
-	public function delete($url, $headers = array(), $options = array()) {
-		return $this->request($url, $headers, null, Requests::DELETE, $options);
-	}
-	/**#@-*/
-
-	/**#@+
-	 * @see request()
-	 * @param string $url
-	 * @param array $headers
-	 * @param array $data
-	 * @param array $options
-	 * @return Requests_Response
-	 */
-	/**
-	 * Send a POST request
-	 */
-	public function post($url, $headers = array(), $data = array(), $options = array()) {
-		return $this->request($url, $headers, $data, Requests::POST, $options);
-	}
-
-	/**
-	 * Send a PUT request
-	 */
-	public function put($url, $headers = array(), $data = array(), $options = array()) {
-		return $this->request($url, $headers, $data, Requests::PUT, $options);
-	}
-
-	/**
-	 * Send a PATCH request
-	 *
-	 * Note: Unlike {@see post} and {@see put}, `$headers` is required, as the
-	 * specification recommends that should send an ETag
-	 *
-	 * @link https://tools.ietf.org/html/rfc5789
-	 */
-	public function patch($url, $headers, $data = array(), $options = array()) {
-		return $this->request($url, $headers, $data, Requests::PATCH, $options);
-	}
-	/**#@-*/
-
-	/**
-	 * Main interface for HTTP requests
-	 *
-	 * This method initiates a request and sends it via a transport before
-	 * parsing.
-	 *
-	 * @see Requests::request()
-	 *
-	 * @throws Requests_Exception On invalid URLs (`nonhttp`)
-	 *
-	 * @param string $url URL to request
-	 * @param array $headers Extra headers to send with the request
-	 * @param array|null $data Data to send either as a query string for GET/HEAD requests, or in the body for POST requests
-	 * @param string $type HTTP request type (use Requests constants)
-	 * @param array $options Options for the request (see {@see Requests::request})
-	 * @return Requests_Response
-	 */
-	public function request($url, $headers = array(), $data = array(), $type = Requests::GET, $options = array()) {
-		$request = $this->merge_request(compact('url', 'headers', 'data', 'options'));
-
-		return Requests::request($request['url'], $request['headers'], $request['data'], $type, $request['options']);
-	}
-
-	/**
-	 * Send multiple HTTP requests simultaneously
-	 *
-	 * @see Requests::request_multiple()
-	 *
-	 * @param array $requests Requests data (see {@see Requests::request_multiple})
-	 * @param array $options Global and default options (see {@see Requests::request})
-	 * @return array Responses (either Requests_Response or a Requests_Exception object)
-	 */
-	public function request_multiple($requests, $options = array()) {
-		foreach ($requests as $key => $request) {
-			$requests[$key] = $this->merge_request($request, false);
-		}
-
-		$options = array_merge($this->options, $options);
-
-		// Disallow forcing the type, as that's a per request setting
-		unset($options['type']);
-
-		return Requests::request_multiple($requests, $options);
-	}
-
-	/**
-	 * Merge a request's data with the default data
-	 *
-	 * @param array $request Request data (same form as {@see request_multiple})
-	 * @param boolean $merge_options Should we merge options as well?
-	 * @return array Request data
-	 */
-	protected function merge_request($request, $merge_options = true) {
-		if ($this->url !== null) {
-			$request['url'] = Requests_IRI::absolutize($this->url, $request['url']);
-			$request['url'] = $request['url']->uri;
-		}
-
-		if (empty($request['headers'])) {
-			$request['headers'] = array();
-		}
-		$request['headers'] = array_merge($this->headers, $request['headers']);
-
-		if (empty($request['data'])) {
-			if (is_array($this->data)) {
-				$request['data'] = $this->data;
-			}
-		}
-		elseif (is_array($request['data']) && is_array($this->data)) {
-			$request['data'] = array_merge($this->data, $request['data']);
-		}
-
-		if ($merge_options !== false) {
-			$request['options'] = array_merge($this->options, $request['options']);
-
-			// Disallow forcing the type, as that's a per request setting
-			unset($request['options']['type']);
-		}
-
-		return $request;
-	}
-}
Index: www/wp-includes/autoload/simplepie/Cache/DB.php
===================================================================
--- www/wp-includes/autoload/simplepie/Cache/DB.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/simplepie/Cache/DB.php	(revision UNDEFINED)
@@ -1,137 +0,0 @@
-<?php
-/**
- * SimplePie
- *
- * A PHP-Based RSS and Atom Feed Framework.
- * Takes the hard work out of managing a complete RSS/Atom solution.
- *
- * Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 	* Redistributions of source code must retain the above copyright notice, this list of
- * 	  conditions and the following disclaimer.
- *
- * 	* Redistributions in binary form must reproduce the above copyright notice, this list
- * 	  of conditions and the following disclaimer in the documentation and/or other materials
- * 	  provided with the distribution.
- *
- * 	* Neither the name of the SimplePie Team nor the names of its contributors may be used
- * 	  to endorse or promote products derived from this software without specific prior
- * 	  written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
- * AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * @package SimplePie
- * @version 1.3.1
- * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
- * @author Ryan Parman
- * @author Geoffrey Sneddon
- * @author Ryan McCue
- * @link http://simplepie.org/ SimplePie
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
- */
-
-/**
- * Base class for database-based caches
- *
- * @package SimplePie
- * @subpackage Caching
- */
-abstract class SimplePie_Cache_DB implements SimplePie_Cache_Base
-{
-	/**
-	 * Helper for database conversion
-	 *
-	 * Converts a given {@see SimplePie} object into data to be stored
-	 *
-	 * @param SimplePie $data
-	 * @return array First item is the serialized data for storage, second item is the unique ID for this item
-	 */
-	protected static function prepare_simplepie_object_for_cache($data)
-	{
-		$items = $data->get_items();
-		$items_by_id = array();
-
-		if (!empty($items))
-		{
-			foreach ($items as $item)
-			{
-				$items_by_id[$item->get_id()] = $item;
-			}
-
-			if (count($items_by_id) !== count($items))
-			{
-				$items_by_id = array();
-				foreach ($items as $item)
-				{
-					$items_by_id[$item->get_id(true)] = $item;
-				}
-			}
-
-			if (isset($data->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]))
-			{
-				$channel =& $data->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0];
-			}
-			elseif (isset($data->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]))
-			{
-				$channel =& $data->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0];
-			}
-			elseif (isset($data->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]))
-			{
-				$channel =& $data->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0];
-			}
-			elseif (isset($data->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_20]['channel'][0]))
-			{
-				$channel =& $data->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_20]['channel'][0];
-			}
-			else
-			{
-				$channel = null;
-			}
-
-			if ($channel !== null)
-			{
-				if (isset($channel['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['entry']))
-				{
-					unset($channel['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['entry']);
-				}
-				if (isset($channel['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['entry']))
-				{
-					unset($channel['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['entry']);
-				}
-				if (isset($channel['child'][SIMPLEPIE_NAMESPACE_RSS_10]['item']))
-				{
-					unset($channel['child'][SIMPLEPIE_NAMESPACE_RSS_10]['item']);
-				}
-				if (isset($channel['child'][SIMPLEPIE_NAMESPACE_RSS_090]['item']))
-				{
-					unset($channel['child'][SIMPLEPIE_NAMESPACE_RSS_090]['item']);
-				}
-				if (isset($channel['child'][SIMPLEPIE_NAMESPACE_RSS_20]['item']))
-				{
-					unset($channel['child'][SIMPLEPIE_NAMESPACE_RSS_20]['item']);
-				}
-			}
-			if (isset($data->data['items']))
-			{
-				unset($data->data['items']);
-			}
-			if (isset($data->data['ordered_items']))
-			{
-				unset($data->data['ordered_items']);
-			}
-		}
-		return array(serialize($data->data), $items_by_id);
-	}
-}
Index: www/wp-includes/class-smtp.php
===================================================================
--- www/wp-includes/class-smtp.php	(revision 38565)
+++ www/wp-includes/autoload/external/SMTP.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/link-template.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/link-template.php	(revision 38565)
+++ www/wp-includes/link-template.php	(revision 38565)
@@ -1,4148 +0,0 @@
-<?php
-/**
- * WordPress Link Template Functions
- *
- * @package WordPress
- * @subpackage Template
- */
-
-/**
- * Displays the permalink for the current post.
- *
- * @since 1.2.0
- * @since 4.4.0 Added the `$post` parameter.
- *
- * @param int|WP_Post $post Optional. Post ID or post object. Default is the global `$post`.
- */
-function the_permalink( $post = 0 ) {
-	/**
-	 * Filters the display of the permalink for the current post.
-	 *
-	 * @since 1.5.0
-	 * @since 4.4.0 Added the `$post` parameter.
-	 *
-	 * @param string      $permalink The permalink for the current post.
-	 * @param int|WP_Post $post      Post ID, WP_Post object, or 0. Default 0.
-	 */
-	echo esc_url( apply_filters( 'the_permalink', get_permalink( $post ), $post ) );
-}
-
-/**
- * Retrieves a trailing-slashed string if the site is set for adding trailing slashes.
- *
- * Conditionally adds a trailing slash if the permalink structure has a trailing
- * slash, strips the trailing slash if not. The string is passed through the
- * {@see 'user_trailingslashit'} filter. Will remove trailing slash from string, if
- * site is not set to have them.
- *
- * @since 2.2.0
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param string $string      URL with or without a trailing slash.
- * @param string $type_of_url Optional. The type of URL being considered (e.g. single, category, etc)
- *                            for use in the filter. Default empty string.
- * @return string The URL with the trailing slash appended or stripped.
- */
-function user_trailingslashit($string, $type_of_url = '') {
-	global $wp_rewrite;
-	if ( $wp_rewrite->use_trailing_slashes )
-		$string = trailingslashit($string);
-	else
-		$string = untrailingslashit($string);
-
-	/**
-	 * Filters the trailing-slashed string, depending on whether the site is set to use trailing slashes.
-	 *
-	 * @since 2.2.0
-	 *
-	 * @param string $string      URL with or without a trailing slash.
-	 * @param string $type_of_url The type of URL being considered. Accepts 'single', 'single_trackback',
-	 *                            'single_feed', 'single_paged', 'feed', 'category', 'page', 'year',
-	 *                            'month', 'day', 'paged', 'post_type_archive'.
-	 */
-	return apply_filters( 'user_trailingslashit', $string, $type_of_url );
-}
-
-/**
- * Displays the permalink anchor for the current post.
- *
- * The permalink mode title will use the post title for the 'a' element 'id'
- * attribute. The id mode uses 'post-' with the post ID for the 'id' attribute.
- *
- * @since 0.71
- *
- * @param string $mode Optional. Permalink mode. Accepts 'title' or 'id'. Default 'id'.
- */
-function permalink_anchor( $mode = 'id' ) {
-	$post = get_post();
-	switch ( strtolower( $mode ) ) {
-		case 'title':
-			$title = sanitize_title( $post->post_title ) . '-' . $post->ID;
-			echo '<a id="'.$title.'"></a>';
-			break;
-		case 'id':
-		default:
-			echo '<a id="post-' . $post->ID . '"></a>';
-			break;
-	}
-}
-
-/**
- * Retrieves the full permalink for the current post or post ID.
- *
- * This function is an alias for get_permalink().
- *
- * @since 3.9.0
- *
- * @see get_permalink()
- *
- * @param int|WP_Post $post      Optional. Post ID or post object. Default is the global `$post`.
- * @param bool        $leavename Optional. Whether to keep post name or page name. Default false.
- *
- * @return string|false The permalink URL or false if post does not exist.
- */
-function get_the_permalink( $post = 0, $leavename = false ) {
-	return get_permalink( $post, $leavename );
-}
-
-/**
- * Retrieves the full permalink for the current post or post ID.
- *
- * @since 1.0.0
- *
- * @param int|WP_Post $post      Optional. Post ID or post object. Default is the global `$post`.
- * @param bool        $leavename Optional. Whether to keep post name or page name. Default false.
- * @return string|false The permalink URL or false if post does not exist.
- */
-function get_permalink( $post = 0, $leavename = false ) {
-	$rewritecode = array(
-		'%year%',
-		'%monthnum%',
-		'%day%',
-		'%hour%',
-		'%minute%',
-		'%second%',
-		$leavename? '' : '%postname%',
-		'%post_id%',
-		'%category%',
-		'%author%',
-		$leavename? '' : '%pagename%',
-	);
-
-	if ( is_object( $post ) && isset( $post->filter ) && 'sample' == $post->filter ) {
-		$sample = true;
-	} else {
-		$post = get_post( $post );
-		$sample = false;
-	}
-
-	if ( empty($post->ID) )
-		return false;
-
-	if ( $post->post_type == 'page' )
-		return get_page_link($post, $leavename, $sample);
-	elseif ( $post->post_type == 'attachment' )
-		return get_attachment_link( $post, $leavename );
-	elseif ( in_array($post->post_type, get_post_types( array('_builtin' => false) ) ) )
-		return get_post_permalink($post, $leavename, $sample);
-
-	$permalink = get_option('permalink_structure');
-
-	/**
-	 * Filters the permalink structure for a post before token replacement occurs.
-	 *
-	 * Only applies to posts with post_type of 'post'.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string  $permalink The site's permalink structure.
-	 * @param WP_Post $post      The post in question.
-	 * @param bool    $leavename Whether to keep the post name.
-	 */
-	$permalink = apply_filters( 'pre_post_link', $permalink, $post, $leavename );
-
-	if ( '' != $permalink && !in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft', 'future' ) ) ) {
-		$unixtime = strtotime($post->post_date);
-
-		$category = '';
-		if ( strpos($permalink, '%category%') !== false ) {
-			$cats = get_the_category($post->ID);
-			if ( $cats ) {
-				usort($cats, '_usort_terms_by_ID'); // order by ID
-
-				/**
-				 * Filters the category that gets used in the %category% permalink token.
-				 *
-				 * @since 3.5.0
-				 *
-				 * @param WP_Term  $cat  The category to use in the permalink.
-				 * @param array    $cats Array of all categories (WP_Term objects) associated with the post.
-				 * @param WP_Post  $post The post in question.
-				 */
-				$category_object = apply_filters( 'post_link_category', $cats[0], $cats, $post );
-
-				$category_object = get_term( $category_object, 'category' );
-				$category = $category_object->slug;
-				if ( $parent = $category_object->parent )
-					$category = get_category_parents($parent, false, '/', true) . $category;
-			}
-			// show default category in permalinks, without
-			// having to assign it explicitly
-			if ( empty($category) ) {
-				$default_category = get_term( get_option( 'default_category' ), 'category' );
-				if ( $default_category && ! is_wp_error( $default_category ) ) {
-					$category = $default_category->slug;
-				}
-			}
-		}
-
-		$author = '';
-		if ( strpos($permalink, '%author%') !== false ) {
-			$authordata = get_userdata($post->post_author);
-			$author = $authordata->user_nicename;
-		}
-
-		$date = explode(" ",date('Y m d H i s', $unixtime));
-		$rewritereplace =
-		array(
-			$date[0],
-			$date[1],
-			$date[2],
-			$date[3],
-			$date[4],
-			$date[5],
-			$post->post_name,
-			$post->ID,
-			$category,
-			$author,
-			$post->post_name,
-		);
-		$permalink = home_url( str_replace($rewritecode, $rewritereplace, $permalink) );
-		$permalink = user_trailingslashit($permalink, 'single');
-	} else { // if they're not using the fancy permalink option
-		$permalink = home_url('?p=' . $post->ID);
-	}
-
-	/**
-	 * Filters the permalink for a post.
-	 *
-	 * Only applies to posts with post_type of 'post'.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string  $permalink The post's permalink.
-	 * @param WP_Post $post      The post in question.
-	 * @param bool    $leavename Whether to keep the post name.
-	 */
-	return apply_filters( 'post_link', $permalink, $post, $leavename );
-}
-
-/**
- * Retrieves the permalink for a post of a custom post type.
- *
- * @since 3.0.0
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param int $id         Optional. Post ID. Default uses the global `$post`.
- * @param bool $leavename Optional, defaults to false. Whether to keep post name. Default false.
- * @param bool $sample    Optional, defaults to false. Is it a sample permalink. Default false.
- * @return string|WP_Error The post permalink.
- */
-function get_post_permalink( $id = 0, $leavename = false, $sample = false ) {
-	global $wp_rewrite;
-
-	$post = get_post($id);
-
-	if ( is_wp_error( $post ) )
-		return $post;
-
-	$post_link = $wp_rewrite->get_extra_permastruct($post->post_type);
-
-	$slug = $post->post_name;
-
-	$draft_or_pending = get_post_status( $id ) && in_array( get_post_status( $id ), array( 'draft', 'pending', 'auto-draft', 'future' ) );
-
-	$post_type = get_post_type_object($post->post_type);
-
-	if ( $post_type->hierarchical ) {
-		$slug = get_page_uri( $id );
-	}
-
-	if ( !empty($post_link) && ( !$draft_or_pending || $sample ) ) {
-		if ( ! $leavename ) {
-			$post_link = str_replace("%$post->post_type%", $slug, $post_link);
-		}
-		$post_link = home_url( user_trailingslashit($post_link) );
-	} else {
-		if ( $post_type->query_var && ( isset($post->post_status) && !$draft_or_pending ) )
-			$post_link = add_query_arg($post_type->query_var, $slug, '');
-		else
-			$post_link = add_query_arg(array('post_type' => $post->post_type, 'p' => $post->ID), '');
-		$post_link = home_url($post_link);
-	}
-
-	/**
-	 * Filters the permalink for a post of a custom post type.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string  $post_link The post's permalink.
-	 * @param WP_Post $post      The post in question.
-	 * @param bool    $leavename Whether to keep the post name.
-	 * @param bool    $sample    Is it a sample permalink.
-	 */
-	return apply_filters( 'post_type_link', $post_link, $post, $leavename, $sample );
-}
-
-/**
- * Retrieves the permalink for the current page or page ID.
- *
- * Respects page_on_front. Use this one.
- *
- * @since 1.5.0
- *
- * @param int|WP_Post $post      Optional. Post ID or object. Default uses the global `$post`.
- * @param bool        $leavename Optional. Whether to keep the page name. Default false.
- * @param bool        $sample    Optional. Whether it should be treated as a sample permalink.
- *                               Default false.
- * @return string The page permalink.
- */
-function get_page_link( $post = false, $leavename = false, $sample = false ) {
-	$post = get_post( $post );
-
-	if ( 'page' == get_option( 'show_on_front' ) && $post->ID == get_option( 'page_on_front' ) )
-		$link = home_url('/');
-	else
-		$link = _get_page_link( $post, $leavename, $sample );
-
-	/**
-	 * Filters the permalink for a page.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $link    The page's permalink.
-	 * @param int    $post_id The ID of the page.
-	 * @param bool   $sample  Is it a sample permalink.
-	 */
-	return apply_filters( 'page_link', $link, $post->ID, $sample );
-}
-
-/**
- * Retrieves the page permalink.
- *
- * Ignores page_on_front. Internal use only.
- *
- * @since 2.1.0
- * @access private
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param int|WP_Post $post      Optional. Post ID or object. Default uses the global `$post`.
- * @param bool        $leavename Optional. Whether to keep the page name. Default false.
- * @param bool        $sample    Optional. Whether it should be treated as a sample permalink.
- *                               Default false.
- * @return string The page permalink.
- */
-function _get_page_link( $post = false, $leavename = false, $sample = false ) {
-	global $wp_rewrite;
-
-	$post = get_post( $post );
-
-	$draft_or_pending = in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft' ) );
-
-	$link = $wp_rewrite->get_page_permastruct();
-
-	if ( !empty($link) && ( ( isset($post->post_status) && !$draft_or_pending ) || $sample ) ) {
-		if ( ! $leavename ) {
-			$link = str_replace('%pagename%', get_page_uri( $post ), $link);
-		}
-
-		$link = home_url($link);
-		$link = user_trailingslashit($link, 'page');
-	} else {
-		$link = home_url( '?page_id=' . $post->ID );
-	}
-
-	/**
-	 * Filters the permalink for a non-page_on_front page.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param string $link    The page's permalink.
-	 * @param int    $post_id The ID of the page.
-	 */
-	return apply_filters( '_get_page_link', $link, $post->ID );
-}
-
-/**
- * Retrieves the permalink for an attachment.
- *
- * This can be used in the WordPress Loop or outside of it.
- *
- * @since 2.0.0
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param int|object $post      Optional. Post ID or object. Default uses the global `$post`.
- * @param bool       $leavename Optional. Whether to keep the page name. Default false.
- * @return string The attachment permalink.
- */
-function get_attachment_link( $post = null, $leavename = false ) {
-	global $wp_rewrite;
-
-	$link = false;
-
-	$post = get_post( $post );
-	$parent = ( $post->post_parent > 0 && $post->post_parent != $post->ID ) ? get_post( $post->post_parent ) : false;
-	if ( $parent && ! in_array( $parent->post_type, get_post_types() ) ) {
-		$parent = false;
-	}
-
-	if ( $wp_rewrite->using_permalinks() && $parent ) {
-		if ( 'page' == $parent->post_type )
-			$parentlink = _get_page_link( $post->post_parent ); // Ignores page_on_front
-		else
-			$parentlink = get_permalink( $post->post_parent );
-
-		if ( is_numeric($post->post_name) || false !== strpos(get_option('permalink_structure'), '%category%') )
-			$name = 'attachment/' . $post->post_name; // <permalink>/<int>/ is paged so we use the explicit attachment marker
-		else
-			$name = $post->post_name;
-
-		if ( strpos($parentlink, '?') === false )
-			$link = user_trailingslashit( trailingslashit($parentlink) . '%postname%' );
-
-		if ( ! $leavename )
-			$link = str_replace( '%postname%', $name, $link );
-	} elseif ( $wp_rewrite->using_permalinks() && ! $leavename ) {
-		$link = home_url( user_trailingslashit( $post->post_name ) );
-	}
-
-	if ( ! $link )
-		$link = home_url( '/?attachment_id=' . $post->ID );
-
-	/**
-	 * Filters the permalink for an attachment.
-	 *
-	 * @since 2.0.0
-	 *
-	 * @param string $link    The attachment's permalink.
-	 * @param int    $post_id Attachment ID.
-	 */
-	return apply_filters( 'attachment_link', $link, $post->ID );
-}
-
-/**
- * Retrieves the permalink for the year archives.
- *
- * @since 1.5.0
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param int|bool $year False for current year or year for permalink.
- * @return string The permalink for the specified year archive.
- */
-function get_year_link( $year ) {
-	global $wp_rewrite;
-	if ( !$year )
-		$year = gmdate('Y', current_time('timestamp'));
-	$yearlink = $wp_rewrite->get_year_permastruct();
-	if ( !empty($yearlink) ) {
-		$yearlink = str_replace('%year%', $year, $yearlink);
-		$yearlink = home_url( user_trailingslashit( $yearlink, 'year' ) );
-	} else {
-		$yearlink = home_url( '?m=' . $year );
-	}
-
-	/**
-	 * Filters the year archive permalink.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $yearlink Permalink for the year archive.
-	 * @param int    $year     Year for the archive.
-	 */
-	return apply_filters( 'year_link', $yearlink, $year );
-}
-
-/**
- * Retrieves the permalink for the month archives with year.
- *
- * @since 1.0.0
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param bool|int $year  False for current year. Integer of year.
- * @param bool|int $month False for current month. Integer of month.
- * @return string The permalink for the specified month and year archive.
- */
-function get_month_link($year, $month) {
-	global $wp_rewrite;
-	if ( !$year )
-		$year = gmdate('Y', current_time('timestamp'));
-	if ( !$month )
-		$month = gmdate('m', current_time('timestamp'));
-	$monthlink = $wp_rewrite->get_month_permastruct();
-	if ( !empty($monthlink) ) {
-		$monthlink = str_replace('%year%', $year, $monthlink);
-		$monthlink = str_replace('%monthnum%', zeroise(intval($month), 2), $monthlink);
-		$monthlink = home_url( user_trailingslashit( $monthlink, 'month' ) );
-	} else {
-		$monthlink = home_url( '?m=' . $year . zeroise( $month, 2 ) );
-	}
-
-	/**
-	 * Filters the month archive permalink.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $monthlink Permalink for the month archive.
-	 * @param int    $year      Year for the archive.
-	 * @param int    $month     The month for the archive.
-	 */
-	return apply_filters( 'month_link', $monthlink, $year, $month );
-}
-
-/**
- * Retrieves the permalink for the day archives with year and month.
- *
- * @since 1.0.0
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param bool|int $year  False for current year. Integer of year.
- * @param bool|int $month False for current month. Integer of month.
- * @param bool|int $day   False for current day. Integer of day.
- * @return string The permalink for the specified day, month, and year archive.
- */
-function get_day_link($year, $month, $day) {
-	global $wp_rewrite;
-	if ( !$year )
-		$year = gmdate('Y', current_time('timestamp'));
-	if ( !$month )
-		$month = gmdate('m', current_time('timestamp'));
-	if ( !$day )
-		$day = gmdate('j', current_time('timestamp'));
-
-	$daylink = $wp_rewrite->get_day_permastruct();
-	if ( !empty($daylink) ) {
-		$daylink = str_replace('%year%', $year, $daylink);
-		$daylink = str_replace('%monthnum%', zeroise(intval($month), 2), $daylink);
-		$daylink = str_replace('%day%', zeroise(intval($day), 2), $daylink);
-		$daylink = home_url( user_trailingslashit( $daylink, 'day' ) );
-	} else {
-		$daylink = home_url( '?m=' . $year . zeroise( $month, 2 ) . zeroise( $day, 2 ) );
-	}
-
-	/**
-	 * Filters the day archive permalink.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $daylink Permalink for the day archive.
-	 * @param int    $year    Year for the archive.
-	 * @param int    $month   Month for the archive.
-	 * @param int    $day     The day for the archive.
-	 */
-	return apply_filters( 'day_link', $daylink, $year, $month, $day );
-}
-
-/**
- * Displays the permalink for the feed type.
- *
- * @since 3.0.0
- *
- * @param string $anchor The link's anchor text.
- * @param string $feed   Optional. Feed type. Default empty.
- */
-function the_feed_link( $anchor, $feed = '' ) {
-	$link = '<a href="' . esc_url( get_feed_link( $feed ) ) . '">' . $anchor . '</a>';
-
-	/**
-	 * Filters the feed link anchor tag.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $link The complete anchor tag for a feed link.
-	 * @param string $feed The feed type, or an empty string for the
-	 *                     default feed type.
-	 */
-	echo apply_filters( 'the_feed_link', $link, $feed );
-}
-
-/**
- * Retrieves the permalink for the feed type.
- *
- * @since 1.5.0
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param string $feed Optional. Feed type. Default empty.
- * @return string The feed permalink.
- */
-function get_feed_link( $feed = '' ) {
-	global $wp_rewrite;
-
-	$permalink = $wp_rewrite->get_feed_permastruct();
-	if ( '' != $permalink ) {
-		if ( false !== strpos($feed, 'comments_') ) {
-			$feed = str_replace('comments_', '', $feed);
-			$permalink = $wp_rewrite->get_comment_feed_permastruct();
-		}
-
-		if ( get_default_feed() == $feed )
-			$feed = '';
-
-		$permalink = str_replace('%feed%', $feed, $permalink);
-		$permalink = preg_replace('#/+#', '/', "/$permalink");
-		$output =  home_url( user_trailingslashit($permalink, 'feed') );
-	} else {
-		if ( empty($feed) )
-			$feed = get_default_feed();
-
-		if ( false !== strpos($feed, 'comments_') )
-			$feed = str_replace('comments_', 'comments-', $feed);
-
-		$output = home_url("?feed={$feed}");
-	}
-
-	/**
-	 * Filters the feed type permalink.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $output The feed permalink.
-	 * @param string $feed   Feed type.
-	 */
-	return apply_filters( 'feed_link', $output, $feed );
-}
-
-/**
- * Retrieves the permalink for the post comments feed.
- *
- * @since 2.2.0
- *
- * @param int    $post_id Optional. Post ID. Default is the ID of the global `$post`.
- * @param string $feed    Optional. Feed type. Default empty.
- * @return string The permalink for the comments feed for the given post.
- */
-function get_post_comments_feed_link( $post_id = 0, $feed = '' ) {
-	$post_id = absint( $post_id );
-
-	if ( ! $post_id )
-		$post_id = get_the_ID();
-
-	if ( empty( $feed ) )
-		$feed = get_default_feed();
-
-	$post = get_post( $post_id );
-	$unattached = 'attachment' === $post->post_type && 0 === (int) $post->post_parent;
-
-	if ( '' != get_option('permalink_structure') ) {
-		if ( 'page' == get_option('show_on_front') && $post_id == get_option('page_on_front') )
-			$url = _get_page_link( $post_id );
-		else
-			$url = get_permalink($post_id);
-
-		if ( $unattached ) {
-			$url =  home_url( '/feed/' );
-			if ( $feed !== get_default_feed() ) {
-				$url .= "$feed/";
-			}
-			$url = add_query_arg( 'attachment_id', $post_id, $url );
-		} else {
-			$url = trailingslashit($url) . 'feed';
-			if ( $feed != get_default_feed() )
-				$url .= "/$feed";
-			$url = user_trailingslashit($url, 'single_feed');
-		}
-	} else {
-		if ( $unattached ) {
-			$url = add_query_arg( array( 'feed' => $feed, 'attachment_id' => $post_id ), home_url( '/' ) );
-		} elseif ( 'page' == $post->post_type ) {
-			$url = add_query_arg( array( 'feed' => $feed, 'page_id' => $post_id ), home_url( '/' ) );
-		} else {
-			$url = add_query_arg( array( 'feed' => $feed, 'p' => $post_id ), home_url( '/' ) );
-		}
-	}
-
-	/**
-	 * Filters the post comments feed permalink.
-	 *
-	 * @since 1.5.1
-	 *
-	 * @param string $url Post comments feed permalink.
-	 */
-	return apply_filters( 'post_comments_feed_link', $url );
-}
-
-/**
- * Displays the comment feed link for a post.
- *
- * Prints out the comment feed link for a post. Link text is placed in the
- * anchor. If no link text is specified, default text is used. If no post ID is
- * specified, the current post is used.
- *
- * @since 2.5.0
- *
- * @param string $link_text Optional. Descriptive link text. Default 'Comments Feed'.
- * @param int    $post_id   Optional. Post ID. Default is the ID of the global `$post`.
- * @param string $feed      Optional. Feed format. Default empty.
- */
-function post_comments_feed_link( $link_text = '', $post_id = '', $feed = '' ) {
-	$url = get_post_comments_feed_link( $post_id, $feed );
-	if ( empty( $link_text ) ) {
-		$link_text = __('Comments Feed');
-	}
-
-	$link = '<a href="' . esc_url( $url ) . '">' . $link_text . '</a>';
-	/**
-	 * Filters the post comment feed link anchor tag.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param string $link    The complete anchor tag for the comment feed link.
-	 * @param int    $post_id Post ID.
-	 * @param string $feed    The feed type, or an empty string for the default feed type.
-	 */
-	echo apply_filters( 'post_comments_feed_link_html', $link, $post_id, $feed );
-}
-
-/**
- * Retrieves the feed link for a given author.
- *
- * Returns a link to the feed for all posts by a given author. A specific feed
- * can be requested or left blank to get the default feed.
- *
- * @since 2.5.0
- *
- * @param int    $author_id Author ID.
- * @param string $feed      Optional. Feed type. Default empty.
- * @return string Link to the feed for the author specified by $author_id.
- */
-function get_author_feed_link( $author_id, $feed = '' ) {
-	$author_id = (int) $author_id;
-	$permalink_structure = get_option('permalink_structure');
-
-	if ( empty($feed) )
-		$feed = get_default_feed();
-
-	if ( '' == $permalink_structure ) {
-		$link = home_url("?feed=$feed&amp;author=" . $author_id);
-	} else {
-		$link = get_author_posts_url($author_id);
-		if ( $feed == get_default_feed() )
-			$feed_link = 'feed';
-		else
-			$feed_link = "feed/$feed";
-
-		$link = trailingslashit($link) . user_trailingslashit($feed_link, 'feed');
-	}
-
-	/**
-	 * Filters the feed link for a given author.
-	 *
-	 * @since 1.5.1
-	 *
-	 * @param string $link The author feed link.
-	 * @param string $feed Feed type.
-	 */
-	$link = apply_filters( 'author_feed_link', $link, $feed );
-
-	return $link;
-}
-
-/**
- * Retrieves the feed link for a category.
- *
- * Returns a link to the feed for all posts in a given category. A specific feed
- * can be requested or left blank to get the default feed.
- *
- * @since 2.5.0
- *
- * @param int    $cat_id Category ID.
- * @param string $feed   Optional. Feed type. Default empty.
- * @return string Link to the feed for the category specified by $cat_id.
- */
-function get_category_feed_link( $cat_id, $feed = '' ) {
-	return get_term_feed_link( $cat_id, 'category', $feed );
-}
-
-/**
- * Retrieves the feed link for a term.
- *
- * Returns a link to the feed for all posts in a given term. A specific feed
- * can be requested or left blank to get the default feed.
- *
- * @since 3.0.0
- *
- * @param int    $term_id  Term ID.
- * @param string $taxonomy Optional. Taxonomy of `$term_id`. Default 'category'.
- * @param string $feed     Optional. Feed type. Default empty.
- * @return string|false Link to the feed for the term specified by $term_id and $taxonomy.
- */
-function get_term_feed_link( $term_id, $taxonomy = 'category', $feed = '' ) {
-	$term_id = ( int ) $term_id;
-
-	$term = get_term( $term_id, $taxonomy  );
-
-	if ( empty( $term ) || is_wp_error( $term ) )
-		return false;
-
-	if ( empty( $feed ) )
-		$feed = get_default_feed();
-
-	$permalink_structure = get_option( 'permalink_structure' );
-
-	if ( '' == $permalink_structure ) {
-		if ( 'category' == $taxonomy ) {
-			$link = home_url("?feed=$feed&amp;cat=$term_id");
-		}
-		elseif ( 'post_tag' == $taxonomy ) {
-			$link = home_url("?feed=$feed&amp;tag=$term->slug");
-		} else {
-			$t = get_taxonomy( $taxonomy );
-			$link = home_url("?feed=$feed&amp;$t->query_var=$term->slug");
-		}
-	} else {
-		$link = get_term_link( $term_id, $term->taxonomy );
-		if ( $feed == get_default_feed() )
-			$feed_link = 'feed';
-		else
-			$feed_link = "feed/$feed";
-
-		$link = trailingslashit( $link ) . user_trailingslashit( $feed_link, 'feed' );
-	}
-
-	if ( 'category' == $taxonomy ) {
-		/**
-		 * Filters the category feed link.
-		 *
-		 * @since 1.5.1
-		 *
-		 * @param string $link The category feed link.
-		 * @param string $feed Feed type.
-		 */
-		$link = apply_filters( 'category_feed_link', $link, $feed );
-	} elseif ( 'post_tag' == $taxonomy ) {
-		/**
-		 * Filters the post tag feed link.
-		 *
-		 * @since 2.3.0
-		 *
-		 * @param string $link The tag feed link.
-		 * @param string $feed Feed type.
-		 */
-		$link = apply_filters( 'tag_feed_link', $link, $feed );
-	} else {
-		/**
-		 * Filters the feed link for a taxonomy other than 'category' or 'post_tag'.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param string $link The taxonomy feed link.
-		 * @param string $feed Feed type.
-		 * @param string $feed The taxonomy name.
-		 */
-		$link = apply_filters( 'taxonomy_feed_link', $link, $feed, $taxonomy );
-	}
-
-	return $link;
-}
-
-/**
- * Retrieves the permalink for a tag feed.
- *
- * @since 2.3.0
- *
- * @param int    $tag_id Tag ID.
- * @param string $feed   Optional. Feed type. Default empty.
- * @return string The feed permalink for the given tag.
- */
-function get_tag_feed_link( $tag_id, $feed = '' ) {
-	return get_term_feed_link( $tag_id, 'post_tag', $feed );
-}
-
-/**
- * Retrieves the edit link for a tag.
- *
- * @since 2.7.0
- *
- * @param int    $tag_id   Tag ID.
- * @param string $taxonomy Optional. Taxonomy slug. Default 'post_tag'.
- * @return string The edit tag link URL for the given tag.
- */
-function get_edit_tag_link( $tag_id, $taxonomy = 'post_tag' ) {
-	/**
-	 * Filters the edit link for a tag (or term in another taxonomy).
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param string $link The term edit link.
-	 */
-	return apply_filters( 'get_edit_tag_link', get_edit_term_link( $tag_id, $taxonomy ) );
-}
-
-/**
- * Displays or retrieves the edit link for a tag with formatting.
- *
- * @since 2.7.0
- *
- * @param string  $link   Optional. Anchor text. Default empty.
- * @param string  $before Optional. Display before edit link. Default empty.
- * @param string  $after  Optional. Display after edit link. Default empty.
- * @param WP_Term $tag    Optional. Term object. If null, the queried object will be inspected.
- *                        Default null.
- */
-function edit_tag_link( $link = '', $before = '', $after = '', $tag = null ) {
-	$link = edit_term_link( $link, '', '', $tag, false );
-
-	/**
-	 * Filters the anchor tag for the edit link for a tag (or term in another taxonomy).
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param string $link The anchor tag for the edit link.
-	 */
-	echo $before . apply_filters( 'edit_tag_link', $link ) . $after;
-}
-
-/**
- * Retrieves the URL for editing a given term.
- *
- * @since 3.1.0
- * @since 4.5.0 The `$taxonomy` argument was made optional.
- *
- * @param int    $term_id     Term ID.
- * @param string $taxonomy    Optional. Taxonomy. Defaults to the taxonomy of the term identified
- *                            by `$term_id`.
- * @param string $object_type Optional. The object type. Used to highlight the proper post type
- *                            menu on the linked page. Defaults to the first object_type associated
- *                            with the taxonomy.
- * @return string|null The edit term link URL for the given term, or null on failure.
- */
-function get_edit_term_link( $term_id, $taxonomy = '', $object_type = '' ) {
-	$term = get_term( $term_id, $taxonomy );
-	if ( ! $term || is_wp_error( $term ) ) {
-		return;
-	}
-
-	$tax = get_taxonomy( $term->taxonomy );
-	if ( ! $tax || ! current_user_can( $tax->cap->edit_terms ) ) {
-		return;
-	}
-
-	$args = array(
-		'taxonomy' => $taxonomy,
-		'tag_ID'   => $term->term_id,
-	);
-
-	if ( $object_type ) {
-		$args['post_type'] = $object_type;
-	} elseif ( ! empty( $tax->object_type ) ) {
-		$args['post_type'] = reset( $tax->object_type );
-	}
-
-	if ( $tax->show_ui ) {
-		$location = add_query_arg( $args, admin_url( 'term.php' ) );
-	} else {
-		$location = '';
-	}
-
-	/**
-	 * Filters the edit link for a term.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param string $location    The edit link.
-	 * @param int    $term_id     Term ID.
-	 * @param string $taxonomy    Taxonomy name.
-	 * @param string $object_type The object type (eg. the post type).
-	 */
-	return apply_filters( 'get_edit_term_link', $location, $term_id, $taxonomy, $object_type );
-}
-
-/**
- * Displays or retrieves the edit term link with formatting.
- *
- * @since 3.1.0
- *
- * @param string $link   Optional. Anchor text. Default empty.
- * @param string $before Optional. Display before edit link. Default empty.
- * @param string $after  Optional. Display after edit link. Default empty.
- * @param object $term   Optional. Term object. If null, the queried object will be inspected. Default null.
- * @param bool   $echo   Optional. Whether or not to echo the return. Default true.
- * @return string|void HTML content.
- */
-function edit_term_link( $link = '', $before = '', $after = '', $term = null, $echo = true ) {
-	if ( is_null( $term ) )
-		$term = get_queried_object();
-
-	if ( ! $term )
-		return;
-
-	$tax = get_taxonomy( $term->taxonomy );
-	if ( ! current_user_can( $tax->cap->edit_terms ) ) {
-		return;
-	}
-
-	if ( empty( $link ) )
-		$link = __('Edit This');
-
-	$link = '<a href="' . get_edit_term_link( $term->term_id, $term->taxonomy ) . '">' . $link . '</a>';
-
-	/**
-	 * Filters the anchor tag for the edit link of a term.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param string $link    The anchor tag for the edit link.
-	 * @param int    $term_id Term ID.
-	 */
-	$link = $before . apply_filters( 'edit_term_link', $link, $term->term_id ) . $after;
-
-	if ( $echo )
-		echo $link;
-	else
-		return $link;
-}
-
-/**
- * Retrieves the permalink for a search.
- *
- * @since  3.0.0
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param string $query Optional. The query string to use. If empty the current query is used. Default empty.
- * @return string The search permalink.
- */
-function get_search_link( $query = '' ) {
-	global $wp_rewrite;
-
-	if ( empty($query) )
-		$search = get_search_query( false );
-	else
-		$search = stripslashes($query);
-
-	$permastruct = $wp_rewrite->get_search_permastruct();
-
-	if ( empty( $permastruct ) ) {
-		$link = home_url('?s=' . urlencode($search) );
-	} else {
-		$search = urlencode($search);
-		$search = str_replace('%2F', '/', $search); // %2F(/) is not valid within a URL, send it un-encoded.
-		$link = str_replace( '%search%', $search, $permastruct );
-		$link = home_url( user_trailingslashit( $link, 'search' ) );
-	}
-
-	/**
-	 * Filters the search permalink.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $link   Search permalink.
-	 * @param string $search The URL-encoded search term.
-	 */
-	return apply_filters( 'search_link', $link, $search );
-}
-
-/**
- * Retrieves the permalink for the search results feed.
- *
- * @since 2.5.0
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param string $search_query Optional. Search query. Default empty.
- * @param string $feed         Optional. Feed type. Default empty.
- * @return string The search results feed permalink.
- */
-function get_search_feed_link($search_query = '', $feed = '') {
-	global $wp_rewrite;
-	$link = get_search_link($search_query);
-
-	if ( empty($feed) )
-		$feed = get_default_feed();
-
-	$permastruct = $wp_rewrite->get_search_permastruct();
-
-	if ( empty($permastruct) ) {
-		$link = add_query_arg('feed', $feed, $link);
-	} else {
-		$link = trailingslashit($link);
-		$link .= "feed/$feed/";
-	}
-
-	/**
-	 * Filters the search feed link.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param string $link Search feed link.
-	 * @param string $feed Feed type.
-	 * @param string $type The search type. One of 'posts' or 'comments'.
-	 */
-	return apply_filters( 'search_feed_link', $link, $feed, 'posts' );
-}
-
-/**
- * Retrieves the permalink for the search results comments feed.
- *
- * @since 2.5.0
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param string $search_query Optional. Search query. Default empty.
- * @param string $feed         Optional. Feed type. Default empty.
- * @return string The comments feed search results permalink.
- */
-function get_search_comments_feed_link($search_query = '', $feed = '') {
-	global $wp_rewrite;
-
-	if ( empty($feed) )
-		$feed = get_default_feed();
-
-	$link = get_search_feed_link($search_query, $feed);
-
-	$permastruct = $wp_rewrite->get_search_permastruct();
-
-	if ( empty($permastruct) )
-		$link = add_query_arg('feed', 'comments-' . $feed, $link);
-	else
-		$link = add_query_arg('withcomments', 1, $link);
-
-	/** This filter is documented in wp-includes/link-template.php */
-	return apply_filters( 'search_feed_link', $link, $feed, 'comments' );
-}
-
-/**
- * Retrieves the permalink for a post type archive.
- *
- * @since 3.1.0
- * @since 4.5.0 Support for posts was added.
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param string $post_type Post type.
- * @return string|false The post type archive permalink.
- */
-function get_post_type_archive_link( $post_type ) {
-	global $wp_rewrite;
-	if ( ! $post_type_obj = get_post_type_object( $post_type ) )
-		return false;
-
-	if ( 'post' === $post_type ) {
-		$show_on_front = get_option( 'show_on_front' );
-		$page_for_posts  = get_option( 'page_for_posts' );
-
-		if ( 'page' == $show_on_front && $page_for_posts ) {
-			$link = get_permalink( $page_for_posts );
-		} else {
-			$link = get_home_url();
-		}
-		/** This filter is documented in wp-includes/link-template.php */
-		return apply_filters( 'post_type_archive_link', $link, $post_type );
-	}
-
-	if ( ! $post_type_obj->has_archive )
-		return false;
-
-	if ( get_option( 'permalink_structure' ) && is_array( $post_type_obj->rewrite ) ) {
-		$struct = ( true === $post_type_obj->has_archive ) ? $post_type_obj->rewrite['slug'] : $post_type_obj->has_archive;
-		if ( $post_type_obj->rewrite['with_front'] )
-			$struct = $wp_rewrite->front . $struct;
-		else
-			$struct = $wp_rewrite->root . $struct;
-		$link = home_url( user_trailingslashit( $struct, 'post_type_archive' ) );
-	} else {
-		$link = home_url( '?post_type=' . $post_type );
-	}
-
-	/**
-	 * Filters the post type archive permalink.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param string $link      The post type archive permalink.
-	 * @param string $post_type Post type name.
-	 */
-	return apply_filters( 'post_type_archive_link', $link, $post_type );
-}
-
-/**
- * Retrieves the permalink for a post type archive feed.
- *
- * @since 3.1.0
- *
- * @param string $post_type Post type
- * @param string $feed      Optional. Feed type. Default empty.
- * @return string|false The post type feed permalink.
- */
-function get_post_type_archive_feed_link( $post_type, $feed = '' ) {
-	$default_feed = get_default_feed();
-	if ( empty( $feed ) )
-		$feed = $default_feed;
-
-	if ( ! $link = get_post_type_archive_link( $post_type ) )
-		return false;
-
-	$post_type_obj = get_post_type_object( $post_type );
-	if ( get_option( 'permalink_structure' ) && is_array( $post_type_obj->rewrite ) && $post_type_obj->rewrite['feeds'] ) {
-		$link = trailingslashit( $link );
-		$link .= 'feed/';
-		if ( $feed != $default_feed )
-			$link .= "$feed/";
-	} else {
-		$link = add_query_arg( 'feed', $feed, $link );
-	}
-
-	/**
-	 * Filters the post type archive feed link.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param string $link The post type archive feed link.
-	 * @param string $feed Feed type.
-	 */
-	return apply_filters( 'post_type_archive_feed_link', $link, $feed );
-}
-
-/**
- * Retrieves the URL used for the post preview.
- *
- * Allows additional query args to be appended.
- *
- * @since 4.4.0
- *
- * @param int|WP_Post $post         Optional. Post ID or `WP_Post` object. Defaults to global `$post`.
- * @param array       $query_args   Optional. Array of additional query args to be appended to the link.
- *                                  Default empty array.
- * @param string      $preview_link Optional. Base preview link to be used if it should differ from the
- *                                  post permalink. Default empty.
- * @return string|null URL used for the post preview, or null if the post does not exist.
- */
-function get_preview_post_link( $post = null, $query_args = array(), $preview_link = '' ) {
-	$post = get_post( $post );
-	if ( ! $post ) {
-		return;
-	}
-
-	$post_type_object = get_post_type_object( $post->post_type );
-	if ( is_post_type_viewable( $post_type_object ) ) {
-		if ( ! $preview_link ) {
-			$preview_link = set_url_scheme( get_permalink( $post ) );
-		}
-
-		$query_args['preview'] = 'true';
-		$preview_link = add_query_arg( $query_args, $preview_link );
-	}
-
-	/**
-	 * Filters the URL used for a post preview.
-	 *
-	 * @since 2.0.5
-	 * @since 4.0.0 Added the `$post` parameter.
-	 *
-	 * @param string  $preview_link URL used for the post preview.
-	 * @param WP_Post $post         Post object.
-	 */
-	return apply_filters( 'preview_post_link', $preview_link, $post );
-}
-
-/**
- * Retrieves the edit post link for post.
- *
- * Can be used within the WordPress loop or outside of it. Can be used with
- * pages, posts, attachments, and revisions.
- *
- * @since 2.3.0
- *
- * @param int    $id      Optional. Post ID. Default is the ID of the global `$post`.
- * @param string $context Optional. How to output the '&' character. Default '&amp;'.
- * @return string|null The edit post link for the given post. null if the post type is invalid or does
- *                     not allow an editing UI.
- */
-function get_edit_post_link( $id = 0, $context = 'display' ) {
-	if ( ! $post = get_post( $id ) )
-		return;
-
-	if ( 'revision' === $post->post_type )
-		$action = '';
-	elseif ( 'display' == $context )
-		$action = '&amp;action=edit';
-	else
-		$action = '&action=edit';
-
-	$post_type_object = get_post_type_object( $post->post_type );
-	if ( !$post_type_object )
-		return;
-
-	if ( !current_user_can( 'edit_post', $post->ID ) )
-		return;
-
-	if ( $post_type_object->_edit_link ) {
-		$link = admin_url( sprintf( $post_type_object->_edit_link . $action, $post->ID ) );
-	} else {
-		$link = '';
-	}
-
-	/**
-	 * Filters the post edit link.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param string $link    The edit link.
-	 * @param int    $post_id Post ID.
-	 * @param string $context The link context. If set to 'display' then ampersands
-	 *                        are encoded.
-	 */
-	return apply_filters( 'get_edit_post_link', $link, $post->ID, $context );
-}
-
-/**
- * Displays the edit post link for post.
- *
- * @since 1.0.0
- * @since 4.4.0 The `$class` argument was added.
- *
- * @param string $text   Optional. Anchor text. If null, default is 'Edit This'. Default null.
- * @param string $before Optional. Display before edit link. Default empty.
- * @param string $after  Optional. Display after edit link. Default empty.
- * @param int    $id     Optional. Post ID. Default is the ID of the global `$post`.
- * @param string $class  Optional. Add custom class to link. Default 'post-edit-link'.
- */
-function edit_post_link( $text = null, $before = '', $after = '', $id = 0, $class = 'post-edit-link' ) {
-	if ( ! $post = get_post( $id ) ) {
-		return;
-	}
-
-	if ( ! $url = get_edit_post_link( $post->ID ) ) {
-		return;
-	}
-
-	if ( null === $text ) {
-		$text = __( 'Edit This' );
-	}
-
-	$link = '<a class="' . esc_attr( $class ) . '" href="' . esc_url( $url ) . '">' . $text . '</a>';
-
-	/**
-	 * Filters the post edit link anchor tag.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param string $link    Anchor tag for the edit link.
-	 * @param int    $post_id Post ID.
-	 * @param string $text    Anchor text.
-	 */
-	echo $before . apply_filters( 'edit_post_link', $link, $post->ID, $text ) . $after;
-}
-
-/**
- * Retrieves the delete posts link for post.
- *
- * Can be used within the WordPress loop or outside of it, with any post type.
- *
- * @since 2.9.0
- *
- * @param int    $id           Optional. Post ID. Default is the ID of the global `$post`.
- * @param string $deprecated   Not used.
- * @param bool   $force_delete Optional. Whether to bypass trash and force deletion. Default false.
- * @return string|void The delete post link URL for the given post.
- */
-function get_delete_post_link( $id = 0, $deprecated = '', $force_delete = false ) {
-	if ( ! empty( $deprecated ) )
-		_deprecated_argument( __FUNCTION__, '3.0.0' );
-
-	if ( !$post = get_post( $id ) )
-		return;
-
-	$post_type_object = get_post_type_object( $post->post_type );
-	if ( !$post_type_object )
-		return;
-
-	if ( !current_user_can( 'delete_post', $post->ID ) )
-		return;
-
-	$action = ( $force_delete || !EMPTY_TRASH_DAYS ) ? 'delete' : 'trash';
-
-	$delete_link = add_query_arg( 'action', $action, admin_url( sprintf( $post_type_object->_edit_link, $post->ID ) ) );
-
-	/**
-	 * Filters the post delete link.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param string $link         The delete link.
-	 * @param int    $post_id      Post ID.
-	 * @param bool   $force_delete Whether to bypass the trash and force deletion. Default false.
-	 */
-	return apply_filters( 'get_delete_post_link', wp_nonce_url( $delete_link, "$action-post_{$post->ID}" ), $post->ID, $force_delete );
-}
-
-/**
- * Retrieves the edit comment link.
- *
- * @since 2.3.0
- *
- * @param int|WP_Comment $comment_id Optional. Comment ID or WP_Comment object.
- * @return string|void The edit comment link URL for the given comment.
- */
-function get_edit_comment_link( $comment_id = 0 ) {
-	$comment = get_comment( $comment_id );
-
-	if ( !current_user_can( 'edit_comment', $comment->comment_ID ) )
-		return;
-
-	$location = admin_url('comment.php?action=editcomment&amp;c=') . $comment->comment_ID;
-
-	/**
-	 * Filters the comment edit link.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param string $location The edit link.
-	 */
-	return apply_filters( 'get_edit_comment_link', $location );
-}
-
-/**
- * Displays the edit comment link with formatting.
- *
- * @since 1.0.0
- *
- * @param string $text   Optional. Anchor text. If null, default is 'Edit This'. Default null.
- * @param string $before Optional. Display before edit link. Default empty.
- * @param string $after  Optional. Display after edit link. Default empty.
- */
-function edit_comment_link( $text = null, $before = '', $after = '' ) {
-	$comment = get_comment();
-
-	if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) ) {
-		return;
-	}
-
-	if ( null === $text ) {
-		$text = __( 'Edit This' );
-	}
-
-	$link = '<a class="comment-edit-link" href="' . esc_url( get_edit_comment_link( $comment ) ) . '">' . $text . '</a>';
-
-	/**
-	 * Filters the comment edit link anchor tag.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param string $link       Anchor tag for the edit link.
-	 * @param int    $comment_id Comment ID.
-	 * @param string $text       Anchor text.
-	 */
-	echo $before . apply_filters( 'edit_comment_link', $link, $comment->comment_ID, $text ) . $after;
-}
-
-/**
- * Displays the edit bookmark link.
- *
- * @since 2.7.0
- *
- * @param int|stdClass $link Optional. Bookmark ID. Default is the id of the current bookmark.
- * @return string|void The edit bookmark link URL.
- */
-function get_edit_bookmark_link( $link = 0 ) {
-	$link = get_bookmark( $link );
-
-	if ( !current_user_can('manage_links') )
-		return;
-
-	$location = admin_url('link.php?action=edit&amp;link_id=') . $link->link_id;
-
-	/**
-	 * Filters the bookmark edit link.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param string $location The edit link.
-	 * @param int    $link_id  Bookmark ID.
-	 */
-	return apply_filters( 'get_edit_bookmark_link', $location, $link->link_id );
-}
-
-/**
- * Displays the edit bookmark link anchor content.
- *
- * @since 2.7.0
- *
- * @param string $link     Optional. Anchor text. Default empty.
- * @param string $before   Optional. Display before edit link. Default empty.
- * @param string $after    Optional. Display after edit link. Default empty.
- * @param int    $bookmark Optional. Bookmark ID. Default is the current bookmark.
- */
-function edit_bookmark_link( $link = '', $before = '', $after = '', $bookmark = null ) {
-	$bookmark = get_bookmark($bookmark);
-
-	if ( !current_user_can('manage_links') )
-		return;
-
-	if ( empty($link) )
-		$link = __('Edit This');
-
-	$link = '<a href="' . esc_url( get_edit_bookmark_link( $bookmark ) ) . '">' . $link . '</a>';
-
-	/**
-	 * Filters the bookmark edit link anchor tag.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param string $link    Anchor tag for the edit link.
-	 * @param int    $link_id Bookmark ID.
-	 */
-	echo $before . apply_filters( 'edit_bookmark_link', $link, $bookmark->link_id ) . $after;
-}
-
-/**
- * Retrieves the edit user link.
- *
- * @since 3.5.0
- *
- * @param int $user_id Optional. User ID. Defaults to the current user.
- * @return string URL to edit user page or empty string.
- */
-function get_edit_user_link( $user_id = null ) {
-	if ( ! $user_id )
-		$user_id = get_current_user_id();
-
-	if ( empty( $user_id ) || ! current_user_can( 'edit_user', $user_id ) )
-		return '';
-
-	$user = get_userdata( $user_id );
-
-	if ( ! $user )
-		return '';
-
-	if ( get_current_user_id() == $user->ID )
-		$link = get_edit_profile_url( $user->ID );
-	else
-		$link = add_query_arg( 'user_id', $user->ID, self_admin_url( 'user-edit.php' ) );
-
-	/**
-	 * Filters the user edit link.
-	 *
-	 * @since 3.5.0
-	 *
-	 * @param string $link    The edit link.
-	 * @param int    $user_id User ID.
-	 */
-	return apply_filters( 'get_edit_user_link', $link, $user->ID );
-}
-
-// Navigation links
-
-/**
- * Retrieves the previous post that is adjacent to the current post.
- *
- * @since 1.5.0
- *
- * @param bool         $in_same_term   Optional. Whether post should be in a same taxonomy term. Default false.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
- * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
- * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no
- *                             corresponding post exists.
- */
-function get_previous_post( $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
-	return get_adjacent_post( $in_same_term, $excluded_terms, true, $taxonomy );
-}
-
-/**
- * Retrieves the next post that is adjacent to the current post.
- *
- * @since 1.5.0
- *
- * @param bool         $in_same_term   Optional. Whether post should be in a same taxonomy term. Default false.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
- * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
- * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no
- *                             corresponding post exists.
- */
-function get_next_post( $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
-	return get_adjacent_post( $in_same_term, $excluded_terms, false, $taxonomy );
-}
-
-/**
- * Retrieves the adjacent post.
- *
- * Can either be next or previous post.
- *
- * @since 2.5.0
- *
- * @global wpdb $wpdb WordPress database abstraction object.
- *
- * @param bool         $in_same_term   Optional. Whether post should be in a same taxonomy term. Default false.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
- * @param bool         $previous       Optional. Whether to retrieve previous post. Default true
- * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
- * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no
- *                             corresponding post exists.
- */
-function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) {
-	global $wpdb;
-
-	if ( ( ! $post = get_post() ) || ! taxonomy_exists( $taxonomy ) )
-		return null;
-
-	$current_post_date = $post->post_date;
-
-	$join = '';
-	$where = '';
-	$adjacent = $previous ? 'previous' : 'next';
-
-	if ( $in_same_term || ! empty( $excluded_terms ) ) {
-		if ( ! empty( $excluded_terms ) && ! is_array( $excluded_terms ) ) {
-			// back-compat, $excluded_terms used to be $excluded_terms with IDs separated by " and "
-			if ( false !== strpos( $excluded_terms, ' and ' ) ) {
-				_deprecated_argument( __FUNCTION__, '3.3.0', sprintf( __( 'Use commas instead of %s to separate excluded terms.' ), "'and'" ) );
-				$excluded_terms = explode( ' and ', $excluded_terms );
-			} else {
-				$excluded_terms = explode( ',', $excluded_terms );
-			}
-
-			$excluded_terms = array_map( 'intval', $excluded_terms );
-		}
-
-		if ( $in_same_term ) {
-			$join .= " INNER JOIN $wpdb->term_relationships AS tr ON p.ID = tr.object_id INNER JOIN $wpdb->term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id";
-			$where .= $wpdb->prepare( "AND tt.taxonomy = %s", $taxonomy );
-
-			if ( ! is_object_in_taxonomy( $post->post_type, $taxonomy ) )
-				return '';
-			$term_array = wp_get_object_terms( $post->ID, $taxonomy, array( 'fields' => 'ids' ) );
-
-			// Remove any exclusions from the term array to include.
-			$term_array = array_diff( $term_array, (array) $excluded_terms );
-			$term_array = array_map( 'intval', $term_array );
-
-			if ( ! $term_array || is_wp_error( $term_array ) )
-				return '';
-
-			$where .= " AND tt.term_id IN (" . implode( ',', $term_array ) . ")";
-		}
-
-		/**
-		 * Filters the IDs of terms excluded from adjacent post queries.
-		 *
-		 * The dynamic portion of the hook name, `$adjacent`, refers to the type
-		 * of adjacency, 'next' or 'previous'.
-		 *
-		 * @since 4.4.0
-		 *
-		 * @param string $excluded_terms Array of excluded term IDs.
-		 */
-		$excluded_terms = apply_filters( "get_{$adjacent}_post_excluded_terms", $excluded_terms );
-
-		if ( ! empty( $excluded_terms ) ) {
-			$where .= " AND p.ID NOT IN ( SELECT tr.object_id FROM $wpdb->term_relationships tr LEFT JOIN $wpdb->term_taxonomy tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id) WHERE tt.term_id IN (" . implode( ',', array_map( 'intval', $excluded_terms ) ) . ') )';
-		}
-	}
-
-	// 'post_status' clause depends on the current user.
-	if ( is_user_logged_in() ) {
-		$user_id = get_current_user_id();
-
-		$post_type_object = get_post_type_object( $post->post_type );
-		if ( empty( $post_type_object ) ) {
-			$post_type_cap    = $post->post_type;
-			$read_private_cap = 'read_private_' . $post_type_cap . 's';
-		} else {
-			$read_private_cap = $post_type_object->cap->read_private_posts;
-		}
-
-		/*
-		 * Results should include private posts belonging to the current user, or private posts where the
-		 * current user has the 'read_private_posts' cap.
-		 */
-		$private_states = get_post_stati( array( 'private' => true ) );
-		$where .= " AND ( p.post_status = 'publish'";
-		foreach ( (array) $private_states as $state ) {
-			if ( current_user_can( $read_private_cap ) ) {
-				$where .= $wpdb->prepare( " OR p.post_status = %s", $state );
-			} else {
-				$where .= $wpdb->prepare( " OR (p.post_author = %d AND p.post_status = %s)", $user_id, $state );
-			}
-		}
-		$where .= " )";
-	} else {
-		$where .= " AND p.post_status = 'publish'";
-	}
-
-	$op = $previous ? '<' : '>';
-	$order = $previous ? 'DESC' : 'ASC';
-
-	/**
-	 * Filters the JOIN clause in the SQL for an adjacent post query.
-	 *
-	 * The dynamic portion of the hook name, `$adjacent`, refers to the type
-	 * of adjacency, 'next' or 'previous'.
-	 *
-	 * @since 2.5.0
-	 * @since 4.4.0 Added the `$taxonomy` and `$post` parameters.
-	 *
-	 * @param string  $join           The JOIN clause in the SQL.
-	 * @param bool    $in_same_term   Whether post should be in a same taxonomy term.
-	 * @param array   $excluded_terms Array of excluded term IDs.
-	 * @param string  $taxonomy       Taxonomy. Used to identify the term used when `$in_same_term` is true.
-	 * @param WP_Post $post           WP_Post object.
-	 */
-	$join = apply_filters( "get_{$adjacent}_post_join", $join, $in_same_term, $excluded_terms, $taxonomy, $post );
-
-	/**
-	 * Filters the WHERE clause in the SQL for an adjacent post query.
-	 *
-	 * The dynamic portion of the hook name, `$adjacent`, refers to the type
-	 * of adjacency, 'next' or 'previous'.
-	 *
-	 * @since 2.5.0
-	 * @since 4.4.0 Added the `$taxonomy` and `$post` parameters.
-	 *
-	 * @param string $where          The `WHERE` clause in the SQL.
-	 * @param bool   $in_same_term   Whether post should be in a same taxonomy term.
-	 * @param array  $excluded_terms Array of excluded term IDs.
-	 * @param string $taxonomy       Taxonomy. Used to identify the term used when `$in_same_term` is true.
-	 * @param WP_Post $post           WP_Post object.
-	 */
-	$where = apply_filters( "get_{$adjacent}_post_where", $wpdb->prepare( "WHERE p.post_date $op %s AND p.post_type = %s $where", $current_post_date, $post->post_type ), $in_same_term, $excluded_terms, $taxonomy, $post );
-
-	/**
-	 * Filters the ORDER BY clause in the SQL for an adjacent post query.
-	 *
-	 * The dynamic portion of the hook name, `$adjacent`, refers to the type
-	 * of adjacency, 'next' or 'previous'.
-	 *
-	 * @since 2.5.0
-	 * @since 4.4.0 Added the `$post` parameter.
-	 *
-	 * @param string $order_by The `ORDER BY` clause in the SQL.
-	 * @param WP_Post $post    WP_Post object.
-	 */
-	$sort  = apply_filters( "get_{$adjacent}_post_sort", "ORDER BY p.post_date $order LIMIT 1", $post );
-
-	$query = "SELECT p.ID FROM $wpdb->posts AS p $join $where $sort";
-	$query_key = 'adjacent_post_' . md5( $query );
-	$result = wp_cache_get( $query_key, 'counts' );
-	if ( false !== $result ) {
-		if ( $result )
-			$result = get_post( $result );
-		return $result;
-	}
-
-	$result = $wpdb->get_var( $query );
-	if ( null === $result )
-		$result = '';
-
-	wp_cache_set( $query_key, $result, 'counts' );
-
-	if ( $result )
-		$result = get_post( $result );
-
-	return $result;
-}
-
-/**
- * Retrieves the adjacent post relational link.
- *
- * Can either be next or previous post relational link.
- *
- * @since 2.8.0
- *
- * @param string       $title          Optional. Link title format. Default '%title'.
- * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
- * @param bool         $previous       Optional. Whether to display link to previous or next post. Default true.
- * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
- * @return string|void The adjacent post relational link URL.
- */
-function get_adjacent_post_rel_link( $title = '%title', $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) {
-	if ( $previous && is_attachment() && $post = get_post() )
-		$post = get_post( $post->post_parent );
-	else
-		$post = get_adjacent_post( $in_same_term, $excluded_terms, $previous, $taxonomy );
-
-	if ( empty( $post ) )
-		return;
-
-	$post_title = the_title_attribute( array( 'echo' => false, 'post' => $post ) );
-
-	if ( empty( $post_title ) )
-		$post_title = $previous ? __( 'Previous Post' ) : __( 'Next Post' );
-
-	$date = mysql2date( get_option( 'date_format' ), $post->post_date );
-
-	$title = str_replace( '%title', $post_title, $title );
-	$title = str_replace( '%date', $date, $title );
-
-	$link = $previous ? "<link rel='prev' title='" : "<link rel='next' title='";
-	$link .= esc_attr( $title );
-	$link .= "' href='" . get_permalink( $post ) . "' />\n";
-
-	$adjacent = $previous ? 'previous' : 'next';
-
-	/**
-	 * Filters the adjacent post relational link.
-	 *
-	 * The dynamic portion of the hook name, `$adjacent`, refers to the type
-	 * of adjacency, 'next' or 'previous'.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param string $link The relational link.
-	 */
-	return apply_filters( "{$adjacent}_post_rel_link", $link );
-}
-
-/**
- * Displays the relational links for the posts adjacent to the current post.
- *
- * @since 2.8.0
- *
- * @param string       $title          Optional. Link title format. Default '%title'.
- * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
- * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
- */
-function adjacent_posts_rel_link( $title = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
-	echo get_adjacent_post_rel_link( $title, $in_same_term, $excluded_terms, true, $taxonomy );
-	echo get_adjacent_post_rel_link( $title, $in_same_term, $excluded_terms, false, $taxonomy );
-}
-
-/**
- * Displays relational links for the posts adjacent to the current post for single post pages.
- *
- * This is meant to be attached to actions like 'wp_head'. Do not call this directly in plugins
- * or theme templates.
- *
- * @since 3.0.0
- *
- * @see adjacent_posts_rel_link()
- */
-function adjacent_posts_rel_link_wp_head() {
-	if ( ! is_single() || is_attachment() ) {
-		return;
-	}
-	adjacent_posts_rel_link();
-}
-
-/**
- * Displays the relational link for the next post adjacent to the current post.
- *
- * @since 2.8.0
- *
- * @see get_adjacent_post_rel_link()
- *
- * @param string       $title          Optional. Link title format. Default '%title'.
- * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
- * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
- */
-function next_post_rel_link( $title = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
-	echo get_adjacent_post_rel_link( $title, $in_same_term, $excluded_terms, false, $taxonomy );
-}
-
-/**
- * Displays the relational link for the previous post adjacent to the current post.
- *
- * @since 2.8.0
- *
- * @see get_adjacent_post_rel_link()
- *
- * @param string       $title          Optional. Link title format. Default '%title'.
- * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default true.
- * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
- */
-function prev_post_rel_link( $title = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
-	echo get_adjacent_post_rel_link( $title, $in_same_term, $excluded_terms, true, $taxonomy );
-}
-
-/**
- * Retrieves the boundary post.
- *
- * Boundary being either the first or last post by publish date within the constraints specified
- * by $in_same_term or $excluded_terms.
- *
- * @since 2.8.0
- *
- * @param bool         $in_same_term   Optional. Whether returned post should be in a same taxonomy term.
- *                                     Default false.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs.
- *                                     Default empty.
- * @param bool         $start          Optional. Whether to retrieve first or last post. Default true
- * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
- * @return null|array Array containing the boundary post object if successful, null otherwise.
- */
-function get_boundary_post( $in_same_term = false, $excluded_terms = '', $start = true, $taxonomy = 'category' ) {
-	$post = get_post();
-	if ( ! $post || ! is_single() || is_attachment() || ! taxonomy_exists( $taxonomy ) )
-		return null;
-
-	$query_args = array(
-		'posts_per_page' => 1,
-		'order' => $start ? 'ASC' : 'DESC',
-		'update_post_term_cache' => false,
-		'update_post_meta_cache' => false
-	);
-
-	$term_array = array();
-
-	if ( ! is_array( $excluded_terms ) ) {
-		if ( ! empty( $excluded_terms ) )
-			$excluded_terms = explode( ',', $excluded_terms );
-		else
-			$excluded_terms = array();
-	}
-
-	if ( $in_same_term || ! empty( $excluded_terms ) ) {
-		if ( $in_same_term )
-			$term_array = wp_get_object_terms( $post->ID, $taxonomy, array( 'fields' => 'ids' ) );
-
-		if ( ! empty( $excluded_terms ) ) {
-			$excluded_terms = array_map( 'intval', $excluded_terms );
-			$excluded_terms = array_diff( $excluded_terms, $term_array );
-
-			$inverse_terms = array();
-			foreach ( $excluded_terms as $excluded_term )
-				$inverse_terms[] = $excluded_term * -1;
-			$excluded_terms = $inverse_terms;
-		}
-
-		$query_args[ 'tax_query' ] = array( array(
-			'taxonomy' => $taxonomy,
-			'terms' => array_merge( $term_array, $excluded_terms )
-		) );
-	}
-
-	return get_posts( $query_args );
-}
-
-/**
- * Retrieves the previous post link that is adjacent to the current post.
- *
- * @since 3.7.0
- *
- * @param string       $format         Optional. Link anchor format. Default '&laquo; %link'.
- * @param string       $link           Optional. Link permalink format. Default '%title%'.
- * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
- * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
- * @return string The link URL of the previous post in relation to the current post.
- */
-function get_previous_post_link( $format = '&laquo; %link', $link = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
-	return get_adjacent_post_link( $format, $link, $in_same_term, $excluded_terms, true, $taxonomy );
-}
-
-/**
- * Displays the previous post link that is adjacent to the current post.
- *
- * @since 1.5.0
- *
- * @see get_previous_post_link()
- *
- * @param string       $format         Optional. Link anchor format. Default '&laquo; %link'.
- * @param string       $link           Optional. Link permalink format. Default '%title'.
- * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
- * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
- */
-function previous_post_link( $format = '&laquo; %link', $link = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
-	echo get_previous_post_link( $format, $link, $in_same_term, $excluded_terms, $taxonomy );
-}
-
-/**
- * Retrieves the next post link that is adjacent to the current post.
- *
- * @since 3.7.0
- *
- * @param string       $format         Optional. Link anchor format. Default '&laquo; %link'.
- * @param string       $link           Optional. Link permalink format. Default '%title'.
- * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
- * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
- * @return string The link URL of the next post in relation to the current post.
- */
-function get_next_post_link( $format = '%link &raquo;', $link = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
-	return get_adjacent_post_link( $format, $link, $in_same_term, $excluded_terms, false, $taxonomy );
-}
-
-/**
- * Displays the next post link that is adjacent to the current post.
- *
- * @since 1.5.0
- * @see get_next_post_link()
- *
- * @param string       $format         Optional. Link anchor format. Default '&laquo; %link'.
- * @param string       $link           Optional. Link permalink format. Default '%title'
- * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
- * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
- */
-function next_post_link( $format = '%link &raquo;', $link = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
-	 echo get_next_post_link( $format, $link, $in_same_term, $excluded_terms, $taxonomy );
-}
-
-/**
- * Retrieves the adjacent post link.
- *
- * Can be either next post link or previous.
- *
- * @since 3.7.0
- *
- * @param string       $format         Link anchor format.
- * @param string       $link           Link permalink format.
- * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded terms IDs. Default empty.
- * @param bool         $previous       Optional. Whether to display link to previous or next post. Default true.
- * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
- * @return string The link URL of the previous or next post in relation to the current post.
- */
-function get_adjacent_post_link( $format, $link, $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) {
-	if ( $previous && is_attachment() )
-		$post = get_post( get_post()->post_parent );
-	else
-		$post = get_adjacent_post( $in_same_term, $excluded_terms, $previous, $taxonomy );
-
-	if ( ! $post ) {
-		$output = '';
-	} else {
-		$title = $post->post_title;
-
-		if ( empty( $post->post_title ) )
-			$title = $previous ? __( 'Previous Post' ) : __( 'Next Post' );
-
-		/** This filter is documented in wp-includes/post-template.php */
-		$title = apply_filters( 'the_title', $title, $post->ID );
-
-		$date = mysql2date( get_option( 'date_format' ), $post->post_date );
-		$rel = $previous ? 'prev' : 'next';
-
-		$string = '<a href="' . get_permalink( $post ) . '" rel="'.$rel.'">';
-		$inlink = str_replace( '%title', $title, $link );
-		$inlink = str_replace( '%date', $date, $inlink );
-		$inlink = $string . $inlink . '</a>';
-
-		$output = str_replace( '%link', $inlink, $format );
-	}
-
-	$adjacent = $previous ? 'previous' : 'next';
-
-	/**
-	 * Filters the adjacent post link.
-	 *
-	 * The dynamic portion of the hook name, `$adjacent`, refers to the type
-	 * of adjacency, 'next' or 'previous'.
-	 *
-	 * @since 2.6.0
-	 * @since 4.2.0 Added the `$adjacent` parameter.
-	 *
-	 * @param string  $output   The adjacent post link.
-	 * @param string  $format   Link anchor format.
-	 * @param string  $link     Link permalink format.
-	 * @param WP_Post $post     The adjacent post.
-	 * @param string  $adjacent Whether the post is previous or next.
-	 */
-	return apply_filters( "{$adjacent}_post_link", $output, $format, $link, $post, $adjacent );
-}
-
-/**
- * Displays the adjacent post link.
- *
- * Can be either next post link or previous.
- *
- * @since 2.5.0
- *
- * @param string       $format         Link anchor format.
- * @param string       $link           Link permalink format.
- * @param bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
- * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded category IDs. Default empty.
- * @param bool         $previous       Optional. Whether to display link to previous or next post. Default true.
- * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
- */
-function adjacent_post_link( $format, $link, $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) {
-	echo get_adjacent_post_link( $format, $link, $in_same_term, $excluded_terms, $previous, $taxonomy );
-}
-
-/**
- * Retrieves the link for a page number.
- *
- * @since 1.5.0
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param int  $pagenum Optional. Page ID. Default 1.
- * @param bool $escape  Optional. Whether to escape the URL for display, with esc_url(). Defaults to true.
- * 	                    Otherwise, prepares the URL with esc_url_raw().
- * @return string The link URL for the given page number.
- */
-function get_pagenum_link($pagenum = 1, $escape = true ) {
-	global $wp_rewrite;
-
-	$pagenum = (int) $pagenum;
-
-	$request = remove_query_arg( 'paged' );
-
-	$home_root = parse_url(home_url());
-	$home_root = ( isset($home_root['path']) ) ? $home_root['path'] : '';
-	$home_root = preg_quote( $home_root, '|' );
-
-	$request = preg_replace('|^'. $home_root . '|i', '', $request);
-	$request = preg_replace('|^/+|', '', $request);
-
-	if ( !$wp_rewrite->using_permalinks() || is_admin() ) {
-		$base = trailingslashit( get_bloginfo( 'url' ) );
-
-		if ( $pagenum > 1 ) {
-			$result = add_query_arg( 'paged', $pagenum, $base . $request );
-		} else {
-			$result = $base . $request;
-		}
-	} else {
-		$qs_regex = '|\?.*?$|';
-		preg_match( $qs_regex, $request, $qs_match );
-
-		if ( !empty( $qs_match[0] ) ) {
-			$query_string = $qs_match[0];
-			$request = preg_replace( $qs_regex, '', $request );
-		} else {
-			$query_string = '';
-		}
-
-		$request = preg_replace( "|$wp_rewrite->pagination_base/\d+/?$|", '', $request);
-		$request = preg_replace( '|^' . preg_quote( $wp_rewrite->index, '|' ) . '|i', '', $request);
-		$request = ltrim($request, '/');
-
-		$base = trailingslashit( get_bloginfo( 'url' ) );
-
-		if ( $wp_rewrite->using_index_permalinks() && ( $pagenum > 1 || '' != $request ) )
-			$base .= $wp_rewrite->index . '/';
-
-		if ( $pagenum > 1 ) {
-			$request = ( ( !empty( $request ) ) ? trailingslashit( $request ) : $request ) . user_trailingslashit( $wp_rewrite->pagination_base . "/" . $pagenum, 'paged' );
-		}
-
-		$result = $base . $request . $query_string;
-	}
-
-	/**
-	 * Filters the page number link for the current request.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param string $result The page number link.
-	 */
-	$result = apply_filters( 'get_pagenum_link', $result );
-
-	if ( $escape )
-		return esc_url( $result );
-	else
-		return esc_url_raw( $result );
-}
-
-/**
- * Retrieves the next posts page link.
- *
- * Backported from 2.1.3 to 2.0.10.
- *
- * @since 2.0.10
- *
- * @global int $paged
- *
- * @param int $max_page Optional. Max pages. Default 0.
- * @return string|void The link URL for next posts page.
- */
-function get_next_posts_page_link($max_page = 0) {
-	global $paged;
-
-	if ( !is_single() ) {
-		if ( !$paged )
-			$paged = 1;
-		$nextpage = intval($paged) + 1;
-		if ( !$max_page || $max_page >= $nextpage )
-			return get_pagenum_link($nextpage);
-	}
-}
-
-/**
- * Displays or retrieves the next posts page link.
- *
- * @since 0.71
- *
- * @param int   $max_page Optional. Max pages. Default 0.
- * @param bool  $echo     Optional. Whether to echo the link. Default true.
- * @return string|void The link URL for next posts page if `$echo = false`.
- */
-function next_posts( $max_page = 0, $echo = true ) {
-	$output = esc_url( get_next_posts_page_link( $max_page ) );
-
-	if ( $echo )
-		echo $output;
-	else
-		return $output;
-}
-
-/**
- * Retrieves the next posts page link.
- *
- * @since 2.7.0
- *
- * @global int      $paged
- * @global WP_Query $wp_query
- *
- * @param string $label    Content for link text.
- * @param int    $max_page Optional. Max pages. Default 0.
- * @return string|void HTML-formatted next posts page link.
- */
-function get_next_posts_link( $label = null, $max_page = 0 ) {
-	global $paged, $wp_query;
-
-	if ( !$max_page )
-		$max_page = $wp_query->max_num_pages;
-
-	if ( !$paged )
-		$paged = 1;
-
-	$nextpage = intval($paged) + 1;
-
-	if ( null === $label )
-		$label = __( 'Next Page &raquo;' );
-
-	if ( !is_single() && ( $nextpage <= $max_page ) ) {
-		/**
-		 * Filters the anchor tag attributes for the next posts page link.
-		 *
-		 * @since 2.7.0
-		 *
-		 * @param string $attributes Attributes for the anchor tag.
-		 */
-		$attr = apply_filters( 'next_posts_link_attributes', '' );
-
-		return '<a href="' . next_posts( $max_page, false ) . "\" $attr>" . preg_replace('/&([^#])(?![a-z]{1,8};)/i', '&#038;$1', $label) . '</a>';
-	}
-}
-
-/**
- * Displays the next posts page link.
- *
- * @since 0.71
- *
- * @param string $label    Content for link text.
- * @param int    $max_page Optional. Max pages. Default 0.
- */
-function next_posts_link( $label = null, $max_page = 0 ) {
-	echo get_next_posts_link( $label, $max_page );
-}
-
-/**
- * Retrieves the previous posts page link.
- *
- * Will only return string, if not on a single page or post.
- *
- * Backported to 2.0.10 from 2.1.3.
- *
- * @since 2.0.10
- *
- * @global int $paged
- *
- * @return string|void The link for the previous posts page.
- */
-function get_previous_posts_page_link() {
-	global $paged;
-
-	if ( !is_single() ) {
-		$nextpage = intval($paged) - 1;
-		if ( $nextpage < 1 )
-			$nextpage = 1;
-		return get_pagenum_link($nextpage);
-	}
-}
-
-/**
- * Displays or retrieves the previous posts page link.
- *
- * @since 0.71
- *
- * @param bool $echo Optional. Whether to echo the link. Default true.
- * @return string|void The previous posts page link if `$echo = false`.
- */
-function previous_posts( $echo = true ) {
-	$output = esc_url( get_previous_posts_page_link() );
-
-	if ( $echo )
-		echo $output;
-	else
-		return $output;
-}
-
-/**
- * Retrieves the previous posts page link.
- *
- * @since 2.7.0
- *
- * @global int $paged
- *
- * @param string $label Optional. Previous page link text.
- * @return string|void HTML-formatted previous page link.
- */
-function get_previous_posts_link( $label = null ) {
-	global $paged;
-
-	if ( null === $label )
-		$label = __( '&laquo; Previous Page' );
-
-	if ( !is_single() && $paged > 1 ) {
-		/**
-		 * Filters the anchor tag attributes for the previous posts page link.
-		 *
-		 * @since 2.7.0
-		 *
-		 * @param string $attributes Attributes for the anchor tag.
-		 */
-		$attr = apply_filters( 'previous_posts_link_attributes', '' );
-		return '<a href="' . previous_posts( false ) . "\" $attr>". preg_replace( '/&([^#])(?![a-z]{1,8};)/i', '&#038;$1', $label ) .'</a>';
-	}
-}
-
-/**
- * Displays the previous posts page link.
- *
- * @since 0.71
- *
- * @param string $label Optional. Previous page link text.
- */
-function previous_posts_link( $label = null ) {
-	echo get_previous_posts_link( $label );
-}
-
-/**
- * Retrieves the post pages link navigation for previous and next pages.
- *
- * @since 2.8.0
- *
- * @global WP_Query $wp_query
- *
- * @param string|array $args {
- *     Optional. Arguments to build the post pages link navigation.
- *
- *     @type string $sep      Separator character. Default '&#8212;'.
- *     @type string $prelabel Link text to display for the previous page link.
- *                            Default '&laquo; Previous Page'.
- *     @type string $nxtlabel Link text to display for the next page link.
- *                            Default 'Next Page &raquo;'.
- * }
- * @return string The posts link navigation.
- */
-function get_posts_nav_link( $args = array() ) {
-	global $wp_query;
-
-	$return = '';
-
-	if ( !is_singular() ) {
-		$defaults = array(
-			'sep' => ' &#8212; ',
-			'prelabel' => __('&laquo; Previous Page'),
-			'nxtlabel' => __('Next Page &raquo;'),
-		);
-		$args = wp_parse_args( $args, $defaults );
-
-		$max_num_pages = $wp_query->max_num_pages;
-		$paged = get_query_var('paged');
-
-		//only have sep if there's both prev and next results
-		if ($paged < 2 || $paged >= $max_num_pages) {
-			$args['sep'] = '';
-		}
-
-		if ( $max_num_pages > 1 ) {
-			$return = get_previous_posts_link($args['prelabel']);
-			$return .= preg_replace('/&([^#])(?![a-z]{1,8};)/i', '&#038;$1', $args['sep']);
-			$return .= get_next_posts_link($args['nxtlabel']);
-		}
-	}
-	return $return;
-
-}
-
-/**
- * Displays the post pages link navigation for previous and next pages.
- *
- * @since 0.71
- *
- * @param string $sep      Optional. Separator for posts navigation links. Default empty.
- * @param string $prelabel Optional. Label for previous pages. Default empty.
- * @param string $nxtlabel Optional Label for next pages. Default empty.
- */
-function posts_nav_link( $sep = '', $prelabel = '', $nxtlabel = '' ) {
-	$args = array_filter( compact('sep', 'prelabel', 'nxtlabel') );
-	echo get_posts_nav_link($args);
-}
-
-/**
- * Retrieves the navigation to next/previous post, when applicable.
- *
- * @since 4.1.0
- * @since 4.4.0 Introduced the `in_same_term`, `excluded_terms`, and `taxonomy` arguments.
- *
- * @param array $args {
- *     Optional. Default post navigation arguments. Default empty array.
- *
- *     @type string       $prev_text          Anchor text to display in the previous post link. Default '%title'.
- *     @type string       $next_text          Anchor text to display in the next post link. Default '%title'.
- *     @type bool         $in_same_term       Whether link should be in a same taxonomy term. Default false.
- *     @type array|string $excluded_terms     Array or comma-separated list of excluded term IDs. Default empty.
- *     @type string       $taxonomy           Taxonomy, if `$in_same_term` is true. Default 'category'.
- *     @type string       $screen_reader_text Screen reader text for nav element. Default 'Post navigation'.
- * }
- * @return string Markup for post links.
- */
-function get_the_post_navigation( $args = array() ) {
-	$args = wp_parse_args( $args, array(
-		'prev_text'          => '%title',
-		'next_text'          => '%title',
-		'in_same_term'       => false,
-		'excluded_terms'     => '',
-		'taxonomy'           => 'category',
-		'screen_reader_text' => __( 'Post navigation' ),
-	) );
-
-	$navigation = '';
-
-	$previous = get_previous_post_link(
-		'<div class="nav-previous">%link</div>',
-		$args['prev_text'],
-		$args['in_same_term'],
-		$args['excluded_terms'],
-		$args['taxonomy']
-	);
-
-	$next = get_next_post_link(
-		'<div class="nav-next">%link</div>',
-		$args['next_text'],
-		$args['in_same_term'],
-		$args['excluded_terms'],
-		$args['taxonomy']
-	);
-
-	// Only add markup if there's somewhere to navigate to.
-	if ( $previous || $next ) {
-		$navigation = _navigation_markup( $previous . $next, 'post-navigation', $args['screen_reader_text'] );
-	}
-
-	return $navigation;
-}
-
-/**
- * Displays the navigation to next/previous post, when applicable.
- *
- * @since 4.1.0
- *
- * @param array $args Optional. See get_the_post_navigation() for available arguments.
- *                    Default empty array.
- */
-function the_post_navigation( $args = array() ) {
-	echo get_the_post_navigation( $args );
-}
-
-/**
- * Returns the navigation to next/previous set of posts, when applicable.
- *
- * @since 4.1.0
- *
- * @global WP_Query $wp_query WordPress Query object.
- *
- * @param array $args {
- *     Optional. Default posts navigation arguments. Default empty array.
- *
- *     @type string $prev_text          Anchor text to display in the previous posts link.
- *                                      Default 'Older posts'.
- *     @type string $next_text          Anchor text to display in the next posts link.
- *                                      Default 'Newer posts'.
- *     @type string $screen_reader_text Screen reader text for nav element.
- *                                      Default 'Posts navigation'.
- * }
- * @return string Markup for posts links.
- */
-function get_the_posts_navigation( $args = array() ) {
-	$navigation = '';
-
-	// Don't print empty markup if there's only one page.
-	if ( $GLOBALS['wp_query']->max_num_pages > 1 ) {
-		$args = wp_parse_args( $args, array(
-			'prev_text'          => __( 'Older posts' ),
-			'next_text'          => __( 'Newer posts' ),
-			'screen_reader_text' => __( 'Posts navigation' ),
-		) );
-
-		$next_link = get_previous_posts_link( $args['next_text'] );
-		$prev_link = get_next_posts_link( $args['prev_text'] );
-
-		if ( $prev_link ) {
-			$navigation .= '<div class="nav-previous">' . $prev_link . '</div>';
-		}
-
-		if ( $next_link ) {
-			$navigation .= '<div class="nav-next">' . $next_link . '</div>';
-		}
-
-		$navigation = _navigation_markup( $navigation, 'posts-navigation', $args['screen_reader_text'] );
-	}
-
-	return $navigation;
-}
-
-/**
- * Displays the navigation to next/previous set of posts, when applicable.
- *
- * @since 4.1.0
- *
- * @param array $args Optional. See get_the_posts_navigation() for available arguments.
- *                    Default empty array.
- */
-function the_posts_navigation( $args = array() ) {
-	echo get_the_posts_navigation( $args );
-}
-
-/**
- * Retrieves a paginated navigation to next/previous set of posts, when applicable.
- *
- * @since 4.1.0
- *
- * @param array $args {
- *     Optional. Default pagination arguments, see paginate_links().
- *
- *     @type string $screen_reader_text Screen reader text for navigation element.
- *                                      Default 'Posts navigation'.
- * }
- * @return string Markup for pagination links.
- */
-function get_the_posts_pagination( $args = array() ) {
-	$navigation = '';
-
-	// Don't print empty markup if there's only one page.
-	if ( $GLOBALS['wp_query']->max_num_pages > 1 ) {
-		$args = wp_parse_args( $args, array(
-			'mid_size'           => 1,
-			'prev_text'          => _x( 'Previous', 'previous set of posts' ),
-			'next_text'          => _x( 'Next', 'next set of posts' ),
-			'screen_reader_text' => __( 'Posts navigation' ),
-		) );
-
-		// Make sure we get a string back. Plain is the next best thing.
-		if ( isset( $args['type'] ) && 'array' == $args['type'] ) {
-			$args['type'] = 'plain';
-		}
-
-		// Set up paginated links.
-		$links = paginate_links( $args );
-
-		if ( $links ) {
-			$navigation = _navigation_markup( $links, 'pagination', $args['screen_reader_text'] );
-		}
-	}
-
-	return $navigation;
-}
-
-/**
- * Displays a paginated navigation to next/previous set of posts, when applicable.
- *
- * @since 4.1.0
- *
- * @param array $args Optional. See get_the_posts_pagination() for available arguments.
- *                    Default empty array.
- */
-function the_posts_pagination( $args = array() ) {
-	echo get_the_posts_pagination( $args );
-}
-
-/**
- * Wraps passed links in navigational markup.
- *
- * @since 4.1.0
- * @access private
- *
- * @param string $links              Navigational links.
- * @param string $class              Optional. Custom class for nav element. Default: 'posts-navigation'.
- * @param string $screen_reader_text Optional. Screen reader text for nav element. Default: 'Posts navigation'.
- * @return string Navigation template tag.
- */
-function _navigation_markup( $links, $class = 'posts-navigation', $screen_reader_text = '' ) {
-	if ( empty( $screen_reader_text ) ) {
-		$screen_reader_text = __( 'Posts navigation' );
-	}
-
-	$template = '
-	<nav class="navigation %1$s" role="navigation">
-		<h2 class="screen-reader-text">%2$s</h2>
-		<div class="nav-links">%3$s</div>
-	</nav>';
-
-	/**
-	 * Filters the navigation markup template.
-	 *
-	 * Note: The filtered template HTML must contain specifiers for the navigation
-	 * class (%1$s), the screen-reader-text value (%2$s), and placement of the
-	 * navigation links (%3$s):
-	 *
-	 *     <nav class="navigation %1$s" role="navigation">
-	 *         <h2 class="screen-reader-text">%2$s</h2>
-	 *         <div class="nav-links">%3$s</div>
-	 *     </nav>
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param string $template The default template.
-	 * @param string $class    The class passed by the calling function.
-	 * @return string Navigation template.
-	 */
-	$template = apply_filters( 'navigation_markup_template', $template, $class );
-
-	return sprintf( $template, sanitize_html_class( $class ), esc_html( $screen_reader_text ), $links );
-}
-
-/**
- * Retrieves the comments page number link.
- *
- * @since 2.7.0
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param int $pagenum  Optional. Page number. Default 1.
- * @param int $max_page Optional. The maximum number of comment pages. Default 0.
- * @return string The comments page number link URL.
- */
-function get_comments_pagenum_link( $pagenum = 1, $max_page = 0 ) {
-	global $wp_rewrite;
-
-	$pagenum = (int) $pagenum;
-
-	$result = get_permalink();
-
-	if ( 'newest' == get_option('default_comments_page') ) {
-		if ( $pagenum != $max_page ) {
-			if ( $wp_rewrite->using_permalinks() )
-				$result = user_trailingslashit( trailingslashit($result) . $wp_rewrite->comments_pagination_base . '-' . $pagenum, 'commentpaged');
-			else
-				$result = add_query_arg( 'cpage', $pagenum, $result );
-		}
-	} elseif ( $pagenum > 1 ) {
-		if ( $wp_rewrite->using_permalinks() )
-			$result = user_trailingslashit( trailingslashit($result) . $wp_rewrite->comments_pagination_base . '-' . $pagenum, 'commentpaged');
-		else
-			$result = add_query_arg( 'cpage', $pagenum, $result );
-	}
-
-	$result .= '#comments';
-
-	/**
-	 * Filters the comments page number link for the current request.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param string $result The comments page number link.
-	 */
-	return apply_filters( 'get_comments_pagenum_link', $result );
-}
-
-/**
- * Retrieves the link to the next comments page.
- *
- * @since 2.7.1
- *
- * @global WP_Query $wp_query
- *
- * @param string $label    Optional. Label for link text. Default empty.
- * @param int    $max_page Optional. Max page. Default 0.
- * @return string|void HTML-formatted link for the next page of comments.
- */
-function get_next_comments_link( $label = '', $max_page = 0 ) {
-	global $wp_query;
-
-	if ( ! is_singular() )
-		return;
-
-	$page = get_query_var('cpage');
-
-	if ( ! $page ) {
-		$page = 1;
-	}
-
-	$nextpage = intval($page) + 1;
-
-	if ( empty($max_page) )
-		$max_page = $wp_query->max_num_comment_pages;
-
-	if ( empty($max_page) )
-		$max_page = get_comment_pages_count();
-
-	if ( $nextpage > $max_page )
-		return;
-
-	if ( empty($label) )
-		$label = __('Newer Comments &raquo;');
-
-	/**
-	 * Filters the anchor tag attributes for the next comments page link.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param string $attributes Attributes for the anchor tag.
-	 */
-	return '<a href="' . esc_url( get_comments_pagenum_link( $nextpage, $max_page ) ) . '" ' . apply_filters( 'next_comments_link_attributes', '' ) . '>'. preg_replace('/&([^#])(?![a-z]{1,8};)/i', '&#038;$1', $label) .'</a>';
-}
-
-/**
- * Displays the link to the next comments page.
- *
- * @since 2.7.0
- *
- * @param string $label    Optional. Label for link text. Default empty.
- * @param int    $max_page Optional. Max page. Default 0.
- */
-function next_comments_link( $label = '', $max_page = 0 ) {
-	echo get_next_comments_link( $label, $max_page );
-}
-
-/**
- * Retrieves the link to the previous comments page.
- *
- * @since 2.7.1
- *
- * @param string $label Optional. Label for comments link text. Default empty.
- * @return string|void HTML-formatted link for the previous page of comments.
- */
-function get_previous_comments_link( $label = '' ) {
-	if ( ! is_singular() )
-		return;
-
-	$page = get_query_var('cpage');
-
-	if ( intval($page) <= 1 )
-		return;
-
-	$prevpage = intval($page) - 1;
-
-	if ( empty($label) )
-		$label = __('&laquo; Older Comments');
-
-	/**
-	 * Filters the anchor tag attributes for the previous comments page link.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param string $attributes Attributes for the anchor tag.
-	 */
-	return '<a href="' . esc_url( get_comments_pagenum_link( $prevpage ) ) . '" ' . apply_filters( 'previous_comments_link_attributes', '' ) . '>' . preg_replace('/&([^#])(?![a-z]{1,8};)/i', '&#038;$1', $label) .'</a>';
-}
-
-/**
- * Displays the link to the previous comments page.
- *
- * @since 2.7.0
- *
- * @param string $label Optional. Label for comments link text. Default empty.
- */
-function previous_comments_link( $label = '' ) {
-	echo get_previous_comments_link( $label );
-}
-
-/**
- * Displays or retrieves pagination links for the comments on the current post.
- *
- * @see paginate_links()
- * @since 2.7.0
- *
- * @global WP_Rewrite $wp_rewrite
- *
- * @param string|array $args Optional args. See paginate_links(). Default empty array.
- * @return string|void Markup for pagination links.
- */
-function paginate_comments_links( $args = array() ) {
-	global $wp_rewrite;
-
-	if ( ! is_singular() )
-		return;
-
-	$page = get_query_var('cpage');
-	if ( !$page )
-		$page = 1;
-	$max_page = get_comment_pages_count();
-	$defaults = array(
-		'base' => add_query_arg( 'cpage', '%#%' ),
-		'format' => '',
-		'total' => $max_page,
-		'current' => $page,
-		'echo' => true,
-		'add_fragment' => '#comments'
-	);
-	if ( $wp_rewrite->using_permalinks() )
-		$defaults['base'] = user_trailingslashit(trailingslashit(get_permalink()) . $wp_rewrite->comments_pagination_base . '-%#%', 'commentpaged');
-
-	$args = wp_parse_args( $args, $defaults );
-	$page_links = paginate_links( $args );
-
-	if ( $args['echo'] )
-		echo $page_links;
-	else
-		return $page_links;
-}
-
-/**
- * Retrieves navigation to next/previous set of comments, when applicable.
- *
- * @since 4.4.0
- *
- * @param array $args {
- *     Optional. Default comments navigation arguments.
- *
- *     @type string $prev_text          Anchor text to display in the previous comments link.
- *                                      Default 'Older comments'.
- *     @type string $next_text          Anchor text to display in the next comments link.
- *                                      Default 'Newer comments'.
- *     @type string $screen_reader_text Screen reader text for nav element. Default 'Comments navigation'.
- * }
- * @return string Markup for comments links.
- */
-function get_the_comments_navigation( $args = array() ) {
-	$navigation = '';
-
-	// Are there comments to navigate through?
-	if ( get_comment_pages_count() > 1 ) {
-		$args = wp_parse_args( $args, array(
-			'prev_text'          => __( 'Older comments' ),
-			'next_text'          => __( 'Newer comments' ),
-			'screen_reader_text' => __( 'Comments navigation' ),
-		) );
-
-		$prev_link = get_previous_comments_link( $args['prev_text'] );
-		$next_link = get_next_comments_link( $args['next_text'] );
-
-		if ( $prev_link ) {
-			$navigation .= '<div class="nav-previous">' . $prev_link . '</div>';
-		}
-
-		if ( $next_link ) {
-			$navigation .= '<div class="nav-next">' . $next_link . '</div>';
-		}
-
-		$navigation = _navigation_markup( $navigation, 'comment-navigation', $args['screen_reader_text'] );
-	}
-
-	return $navigation;
-}
-
-/**
- * Displays navigation to next/previous set of comments, when applicable.
- *
- * @since 4.4.0
- *
- * @param array $args See get_the_comments_navigation() for available arguments. Default empty array.
- */
-function the_comments_navigation( $args = array() ) {
-	echo get_the_comments_navigation( $args );
-}
-
-/**
- * Retrieves a paginated navigation to next/previous set of comments, when applicable.
- *
- * @since 4.4.0
- *
- * @see paginate_comments_links()
- *
- * @param array $args {
- *     Optional. Default pagination arguments.
- *
- *     @type string $screen_reader_text Screen reader text for nav element. Default 'Comments navigation'.
- * }
- * @return string Markup for pagination links.
- */
-function get_the_comments_pagination( $args = array() ) {
-	$navigation = '';
-	$args       = wp_parse_args( $args, array(
-		'screen_reader_text' => __( 'Comments navigation' ),
-	) );
-	$args['echo'] = false;
-
-	// Make sure we get plain links, so we get a string we can work with.
-	$args['type'] = 'plain';
-
-	$links = paginate_comments_links( $args );
-
-	if ( $links ) {
-		$navigation = _navigation_markup( $links, 'comments-pagination', $args['screen_reader_text'] );
-	}
-
-	return $navigation;
-}
-
-/**
- * Displays a paginated navigation to next/previous set of comments, when applicable.
- *
- * @since 4.4.0
- *
- * @param array $args See get_the_comments_pagination() for available arguments. Default empty array.
- */
-function the_comments_pagination( $args = array() ) {
-	echo get_the_comments_pagination( $args );
-}
-
-/**
- * Retrieves the Press This bookmarklet link.
- *
- * @since 2.6.0
- *
- * @global bool          $is_IE      Whether the browser matches an Internet Explorer user agent.
- */
-function get_shortcut_link() {
-	global $is_IE;
-
-	include_once( ABSPATH . 'wp-admin/includes/class-wp-press-this.php' );
-
-	$link = '';
-
-	if ( $is_IE ) {
-		/*
-		 * Return the old/shorter bookmarklet code for MSIE 8 and lower,
-		 * since they only support a max length of ~2000 characters for
-		 * bookmark[let] URLs, which is way to small for our smarter one.
-		 * Do update the version number so users do not get the "upgrade your
-		 * bookmarklet" notice when using PT in those browsers.
-		 */
-		$ua = $_SERVER['HTTP_USER_AGENT'];
-
-		if ( ! empty( $ua ) && preg_match( '/\bMSIE (\d)/', $ua, $matches ) && (int) $matches[1] <= 8 ) {
-			$url = wp_json_encode( admin_url( 'press-this.php' ) );
-
-			$link = 'javascript:var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,' .
-				's=(e?e():(k)?k():(x?x.createRange().text:0)),f=' . $url . ',l=d.location,e=encodeURIComponent,' .
-				'u=f+"?u="+e(l.href)+"&t="+e(d.title)+"&s="+e(s)+"&v=' . WP_Press_This::VERSION . '";' .
-				'a=function(){if(!w.open(u,"t","toolbar=0,resizable=1,scrollbars=1,status=1,width=600,height=700"))l.href=u;};' .
-				'if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();void(0)';
-		}
-	}
-
-	if ( empty( $link ) ) {
-		$src = @file_get_contents( ABSPATH . 'wp-admin/js/bookmarklet.min.js' );
-
-		if ( $src ) {
-			$url = wp_json_encode( admin_url( 'press-this.php' ) . '?v=' . WP_Press_This::VERSION );
-			$link = 'javascript:' . str_replace( 'window.pt_url', $url, $src );
-		}
-	}
-
-	$link = str_replace( array( "\r", "\n", "\t" ),  '', $link );
-
-	/**
-	 * Filters the Press This bookmarklet link.
-	 *
-	 * @since 2.6.0
-	 *
-	 * @param string $link The Press This bookmarklet link.
-	 */
-	return apply_filters( 'shortcut_link', $link );
-}
-
-/**
- * Retrieves the URL for the current site where the front end is accessible.
- *
- * Returns the 'home' option with the appropriate protocol, 'https' if
- * is_ssl() and 'http' otherwise. If `$scheme` is 'http' or 'https',
- * `is_ssl()` is overridden.
- *
- * @since 3.0.0
- *
- * @param  string      $path   Optional. Path relative to the home URL. Default empty.
- * @param  string|null $scheme Optional. Scheme to give the home URL context. Accepts
- *                             'http', 'https', 'relative', 'rest', or null. Default null.
- * @return string Home URL link with optional path appended.
- */
-function home_url( $path = '', $scheme = null ) {
-	return get_home_url( null, $path, $scheme );
-}
-
-/**
- * Retrieves the URL for a given site where the front end is accessible.
- *
- * Returns the 'home' option with the appropriate protocol, 'https' if
- * is_ssl() and 'http' otherwise. If `$scheme` is 'http' or 'https',
- * `is_ssl()` is overridden.
- *
- * @since 3.0.0
- *
- * @global string $pagenow
- *
- * @param  int         $blog_id Optional. Site ID. Default null (current site).
- * @param  string      $path    Optional. Path relative to the home URL. Default empty.
- * @param  string|null $scheme  Optional. Scheme to give the home URL context. Accepts
- *                              'http', 'https', 'relative', 'rest', or null. Default null.
- * @return string Home URL link with optional path appended.
- */
-function get_home_url( $blog_id = null, $path = '', $scheme = null ) {
-	global $pagenow;
-
-	$orig_scheme = $scheme;
-
-	if ( empty( $blog_id ) || !is_multisite() ) {
-		$url = get_option( 'home' );
-	} else {
-		switch_to_blog( $blog_id );
-		$url = get_option( 'home' );
-		restore_current_blog();
-	}
-
-	if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ) ) ) {
-		if ( is_ssl() && ! is_admin() && 'wp-login.php' !== $pagenow )
-			$scheme = 'https';
-		else
-			$scheme = parse_url( $url, PHP_URL_SCHEME );
-	}
-
-	$url = set_url_scheme( $url, $scheme );
-
-	if ( $path && is_string( $path ) )
-		$url .= '/' . ltrim( $path, '/' );
-
-	/**
-	 * Filters the home URL.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string      $url         The complete home URL including scheme and path.
-	 * @param string      $path        Path relative to the home URL. Blank string if no path is specified.
-	 * @param string|null $orig_scheme Scheme to give the home URL context. Accepts 'http', 'https',
-	 *                                 'relative', 'rest', or null.
-	 * @param int|null    $blog_id     Site ID, or null for the current site.
-	 */
-	return apply_filters( 'home_url', $url, $path, $orig_scheme, $blog_id );
-}
-
-/**
- * Retrieves the URL for the current site where WordPress application files
- * (e.g. wp-blog-header.php or the wp-admin/ folder) are accessible.
- *
- * Returns the 'site_url' option with the appropriate protocol, 'https' if
- * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
- * overridden.
- *
- * @since 3.0.0
- *
- * @param string $path   Optional. Path relative to the site URL. Default empty.
- * @param string $scheme Optional. Scheme to give the site URL context. See set_url_scheme().
- * @return string Site URL link with optional path appended.
- */
-function site_url( $path = '', $scheme = null ) {
-	return get_site_url( null, $path, $scheme );
-}
-
-/**
- * Retrieves the URL for a given site where WordPress application files
- * (e.g. wp-blog-header.php or the wp-admin/ folder) are accessible.
- *
- * Returns the 'site_url' option with the appropriate protocol, 'https' if
- * is_ssl() and 'http' otherwise. If `$scheme` is 'http' or 'https',
- * `is_ssl()` is overridden.
- *
- * @since 3.0.0
- *
- * @param int    $blog_id Optional. Site ID. Default null (current site).
- * @param string $path    Optional. Path relative to the site URL. Default empty.
- * @param string $scheme  Optional. Scheme to give the site URL context. Accepts
- *                        'http', 'https', 'login', 'login_post', 'admin', or
- *                        'relative'. Default null.
- * @return string Site URL link with optional path appended.
- */
-function get_site_url( $blog_id = null, $path = '', $scheme = null ) {
-	if ( empty( $blog_id ) || !is_multisite() ) {
-		$url = get_option( 'siteurl' );
-	} else {
-		switch_to_blog( $blog_id );
-		$url = get_option( 'siteurl' );
-		restore_current_blog();
-	}
-
-	$url = set_url_scheme( $url, $scheme );
-
-	if ( $path && is_string( $path ) )
-		$url .= '/' . ltrim( $path, '/' );
-
-	/**
-	 * Filters the site URL.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param string      $url     The complete site URL including scheme and path.
-	 * @param string      $path    Path relative to the site URL. Blank string if no path is specified.
-	 * @param string|null $scheme  Scheme to give the site URL context. Accepts 'http', 'https', 'login',
-	 *                             'login_post', 'admin', 'relative' or null.
-	 * @param int|null    $blog_id Site ID, or null for the current site.
-	 */
-	return apply_filters( 'site_url', $url, $path, $scheme, $blog_id );
-}
-
-/**
- * Retrieves the URL to the admin area for the current site.
- *
- * @since 2.6.0
- *
- * @param string $path   Optional path relative to the admin URL.
- * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl().
- *                       'http' or 'https' can be passed to force those schemes.
- * @return string Admin URL link with optional path appended.
- */
-function admin_url( $path = '', $scheme = 'admin' ) {
-	return get_admin_url( null, $path, $scheme );
-}
-
-/**
- * Retrieves the URL to the admin area for a given site.
- *
- * @since 3.0.0
- *
- * @param int    $blog_id Optional. Site ID. Default null (current site).
- * @param string $path    Optional. Path relative to the admin URL. Default empty.
- * @param string $scheme  Optional. The scheme to use. Accepts 'http' or 'https',
- *                        to force those schemes. Default 'admin', which obeys
- *                        force_ssl_admin() and is_ssl().
- * @return string Admin URL link with optional path appended.
- */
-function get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) {
-	$url = get_site_url($blog_id, 'wp-admin/', $scheme);
-
-	if ( $path && is_string( $path ) )
-		$url .= ltrim( $path, '/' );
-
-	/**
-	 * Filters the admin area URL.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param string   $url     The complete admin area URL including scheme and path.
-	 * @param string   $path    Path relative to the admin area URL. Blank string if no path is specified.
-	 * @param int|null $blog_id Site ID, or null for the current site.
-	 */
-	return apply_filters( 'admin_url', $url, $path, $blog_id );
-}
-
-/**
- * Retrieves the URL to the includes directory.
- *
- * @since 2.6.0
- *
- * @param string $path   Optional. Path relative to the includes URL. Default empty.
- * @param string $scheme Optional. Scheme to give the includes URL context. Accepts
- *                       'http', 'https', or 'relative'. Default null.
- * @return string Includes URL link with optional path appended.
- */
-function includes_url( $path = '', $scheme = null ) {
-	$url = site_url( '/' . WPINC . '/', $scheme );
-
-	if ( $path && is_string( $path ) )
-		$url .= ltrim($path, '/');
-
-	/**
-	 * Filters the URL to the includes directory.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param string $url  The complete URL to the includes directory including scheme and path.
-	 * @param string $path Path relative to the URL to the wp-includes directory. Blank string
-	 *                     if no path is specified.
-	 */
-	return apply_filters( 'includes_url', $url, $path );
-}
-
-/**
- * Retrieves the URL to the content directory.
- *
- * @since 2.6.0
- *
- * @param string $path Optional. Path relative to the content URL. Default empty.
- * @return string Content URL link with optional path appended.
- */
-function content_url( $path = '' ) {
-	$url = set_url_scheme( WP_CONTENT_URL );
-
-	if ( $path && is_string( $path ) )
-		$url .= '/' . ltrim($path, '/');
-
-	/**
-	 * Filters the URL to the content directory.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param string $url  The complete URL to the content directory including scheme and path.
-	 * @param string $path Path relative to the URL to the content directory. Blank string
-	 *                     if no path is specified.
-	 */
-	return apply_filters( 'content_url', $url, $path);
-}
-
-/**
- * Retrieves a URL within the plugins or mu-plugins directory.
- *
- * Defaults to the plugins directory URL if no arguments are supplied.
- *
- * @since 2.6.0
- *
- * @param  string $path   Optional. Extra path appended to the end of the URL, including
- *                        the relative directory if $plugin is supplied. Default empty.
- * @param  string $plugin Optional. A full path to a file inside a plugin or mu-plugin.
- *                        The URL will be relative to its directory. Default empty.
- *                        Typically this is done by passing `__FILE__` as the argument.
- * @return string Plugins URL link with optional paths appended.
- */
-function plugins_url( $path = '', $plugin = '' ) {
-
-	$path = wp_normalize_path( $path );
-	$plugin = wp_normalize_path( $plugin );
-	$mu_plugin_dir = wp_normalize_path( WPMU_PLUGIN_DIR );
-
-	if ( !empty($plugin) && 0 === strpos($plugin, $mu_plugin_dir) )
-		$url = WPMU_PLUGIN_URL;
-	else
-		$url = WP_PLUGIN_URL;
-
-
-	$url = set_url_scheme( $url );
-
-	if ( !empty($plugin) && is_string($plugin) ) {
-		$folder = dirname(plugin_basename($plugin));
-		if ( '.' != $folder )
-			$url .= '/' . ltrim($folder, '/');
-	}
-
-	if ( $path && is_string( $path ) )
-		$url .= '/' . ltrim($path, '/');
-
-	/**
-	 * Filters the URL to the plugins directory.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param string $url    The complete URL to the plugins directory including scheme and path.
-	 * @param string $path   Path relative to the URL to the plugins directory. Blank string
-	 *                       if no path is specified.
-	 * @param string $plugin The plugin file path to be relative to. Blank string if no plugin
-	 *                       is specified.
-	 */
-	return apply_filters( 'plugins_url', $url, $path, $plugin );
-}
-
-/**
- * Retrieves the site URL for the current network.
- *
- * Returns the site URL with the appropriate protocol, 'https' if
- * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
- * overridden.
- *
- * @since 3.0.0
- *
- * @see set_url_scheme()
- *
- * @param string $path   Optional. Path relative to the site URL. Default empty.
- * @param string $scheme Optional. Scheme to give the site URL context. Accepts
- *                       'http', 'https', or 'relative'. Default null.
- * @return string Site URL link with optional path appended.
- */
-function network_site_url( $path = '', $scheme = null ) {
-	if ( ! is_multisite() )
-		return site_url($path, $scheme);
-
-	$current_site = get_current_site();
-
-	if ( 'relative' == $scheme ) {
-		$url = $current_site->path;
-	} else {
-		$url = set_url_scheme( 'http://' . $current_site->domain . $current_site->path, $scheme );
-	}
-
-	if ( $path && is_string( $path ) ) {
-		$url .= ltrim( $path, '/' );
-	}
-
-	/**
-	 * Filters the network site URL.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string      $url    The complete network site URL including scheme and path.
-	 * @param string      $path   Path relative to the network site URL. Blank string if
-	 *                            no path is specified.
-	 * @param string|null $scheme Scheme to give the URL context. Accepts 'http', 'https',
-	 *                            'relative' or null.
-	 */
-	return apply_filters( 'network_site_url', $url, $path, $scheme );
-}
-
-/**
- * Retrieves the home URL for the current network.
- *
- * Returns the home URL with the appropriate protocol, 'https' is_ssl()
- * and 'http' otherwise. If `$scheme` is 'http' or 'https', `is_ssl()` is
- * overridden.
- *
- * @since 3.0.0
- *
- * @param  string $path   Optional. Path relative to the home URL. Default empty.
- * @param  string $scheme Optional. Scheme to give the home URL context. Accepts
- *                        'http', 'https', or 'relative'. Default null.
- * @return string Home URL link with optional path appended.
- */
-function network_home_url( $path = '', $scheme = null ) {
-	if ( ! is_multisite() )
-		return home_url($path, $scheme);
-
-	$current_site = get_current_site();
-	$orig_scheme = $scheme;
-
-	if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ) ) )
-		$scheme = is_ssl() && ! is_admin() ? 'https' : 'http';
-
-	if ( 'relative' == $scheme ) {
-		$url = $current_site->path;
-	} else {
-		$url = set_url_scheme( 'http://' . $current_site->domain . $current_site->path, $scheme );
-	}
-
-	if ( $path && is_string( $path ) ) {
-		$url .= ltrim( $path, '/' );
-	}
-
-	/**
-	 * Filters the network home URL.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string      $url         The complete network home URL including scheme and path.
-	 * @param string      $path        Path relative to the network home URL. Blank string
-	 *                                 if no path is specified.
-	 * @param string|null $orig_scheme Scheme to give the URL context. Accepts 'http', 'https',
-	 *                                 'relative' or null.
-	 */
-	return apply_filters( 'network_home_url', $url, $path, $orig_scheme);
-}
-
-/**
- * Retrieves the URL to the admin area for the network.
- *
- * @since 3.0.0
- *
- * @param string $path   Optional path relative to the admin URL. Default empty.
- * @param string $scheme Optional. The scheme to use. Default is 'admin', which obeys force_ssl_admin()
- *                       and is_ssl(). 'http' or 'https' can be passed to force those schemes.
- * @return string Admin URL link with optional path appended.
- */
-function network_admin_url( $path = '', $scheme = 'admin' ) {
-	if ( ! is_multisite() )
-		return admin_url( $path, $scheme );
-
-	$url = network_site_url('wp-admin/network/', $scheme);
-
-	if ( $path && is_string( $path ) )
-		$url .= ltrim($path, '/');
-
-	/**
-	 * Filters the network admin URL.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $url  The complete network admin URL including scheme and path.
-	 * @param string $path Path relative to the network admin URL. Blank string if
-	 *                     no path is specified.
-	 */
-	return apply_filters( 'network_admin_url', $url, $path );
-}
-
-/**
- * Retrieves the URL to the admin area for the current user.
- *
- * @since 3.0.0
- *
- * @param string $path   Optional. Path relative to the admin URL. Default empty.
- * @param string $scheme Optional. The scheme to use. Default is 'admin', which obeys force_ssl_admin()
- *                       and is_ssl(). 'http' or 'https' can be passed to force those schemes.
- * @return string Admin URL link with optional path appended.
- */
-function user_admin_url( $path = '', $scheme = 'admin' ) {
-	$url = network_site_url('wp-admin/user/', $scheme);
-
-	if ( $path && is_string( $path ) )
-		$url .= ltrim($path, '/');
-
-	/**
-	 * Filters the user admin URL for the current user.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param string $url  The complete URL including scheme and path.
-	 * @param string $path Path relative to the URL. Blank string if
-	 *                     no path is specified.
-	 */
-	return apply_filters( 'user_admin_url', $url, $path );
-}
-
-/**
- * Retrieves the URL to the admin area for either the current site or the network depending on context.
- *
- * @since 3.1.0
- *
- * @param string $path   Optional. Path relative to the admin URL. Default empty.
- * @param string $scheme Optional. The scheme to use. Default is 'admin', which obeys force_ssl_admin()
- *                       and is_ssl(). 'http' or 'https' can be passed to force those schemes.
- * @return string Admin URL link with optional path appended.
- */
-function self_admin_url( $path = '', $scheme = 'admin' ) {
-	if ( is_network_admin() )
-		return network_admin_url($path, $scheme);
-	elseif ( is_user_admin() )
-		return user_admin_url($path, $scheme);
-	else
-		return admin_url($path, $scheme);
-}
-
-/**
- * Sets the scheme for a URL.
- *
- * @since 3.4.0
- * @since 4.4.0 The 'rest' scheme was added.
- *
- * @param string      $url    Absolute URL that includes a scheme
- * @param string|null $scheme Optional. Scheme to give $url. Currently 'http', 'https', 'login',
- *                            'login_post', 'admin', 'relative', 'rest', 'rpc', or null. Default null.
- * @return string $url URL with chosen scheme.
- */
-function set_url_scheme( $url, $scheme = null ) {
-	$orig_scheme = $scheme;
-
-	if ( ! $scheme ) {
-		$scheme = is_ssl() ? 'https' : 'http';
-	} elseif ( $scheme === 'admin' || $scheme === 'login' || $scheme === 'login_post' || $scheme === 'rpc' ) {
-		$scheme = is_ssl() || force_ssl_admin() ? 'https' : 'http';
-	} elseif ( $scheme !== 'http' && $scheme !== 'https' && $scheme !== 'relative' ) {
-		$scheme = is_ssl() ? 'https' : 'http';
-	}
-
-	$url = trim( $url );
-	if ( substr( $url, 0, 2 ) === '//' )
-		$url = 'http:' . $url;
-
-	if ( 'relative' == $scheme ) {
-		$url = ltrim( preg_replace( '#^\w+://[^/]*#', '', $url ) );
-		if ( $url !== '' && $url[0] === '/' )
-			$url = '/' . ltrim($url , "/ \t\n\r\0\x0B" );
-	} else {
-		$url = preg_replace( '#^\w+://#', $scheme . '://', $url );
-	}
-
-	/**
-	 * Filters the resulting URL after setting the scheme.
-	 *
-	 * @since 3.4.0
-	 *
-	 * @param string      $url         The complete URL including scheme and path.
-	 * @param string      $scheme      Scheme applied to the URL. One of 'http', 'https', or 'relative'.
-	 * @param string|null $orig_scheme Scheme requested for the URL. One of 'http', 'https', 'login',
-	 *                                 'login_post', 'admin', 'relative', 'rest', 'rpc', or null.
-	 */
-	return apply_filters( 'set_url_scheme', $url, $scheme, $orig_scheme );
-}
-
-/**
- * Retrieves the URL to the user's dashboard.
- *
- * If a user does not belong to any site, the global user dashboard is used. If the user
- * belongs to the current site, the dashboard for the current site is returned. If the user
- * cannot edit the current site, the dashboard to the user's primary site is returned.
- *
- * @since 3.1.0
- *
- * @param int    $user_id Optional. User ID. Defaults to current user.
- * @param string $path    Optional path relative to the dashboard. Use only paths known to
- *                        both site and user admins. Default empty.
- * @param string $scheme  The scheme to use. Default is 'admin', which obeys force_ssl_admin()
- *                        and is_ssl(). 'http' or 'https' can be passed to force those schemes.
- * @return string Dashboard URL link with optional path appended.
- */
-function get_dashboard_url( $user_id = 0, $path = '', $scheme = 'admin' ) {
-	$user_id = $user_id ? (int) $user_id : get_current_user_id();
-
-	$blogs = get_blogs_of_user( $user_id );
-	if ( ! is_super_admin() && empty($blogs) ) {
-		$url = user_admin_url( $path, $scheme );
-	} elseif ( ! is_multisite() ) {
-		$url = admin_url( $path, $scheme );
-	} else {
-		$current_blog = get_current_blog_id();
-		if ( $current_blog  && ( is_super_admin( $user_id ) || in_array( $current_blog, array_keys( $blogs ) ) ) ) {
-			$url = admin_url( $path, $scheme );
-		} else {
-			$active = get_active_blog_for_user( $user_id );
-			if ( $active )
-				$url = get_admin_url( $active->blog_id, $path, $scheme );
-			else
-				$url = user_admin_url( $path, $scheme );
-		}
-	}
-
-	/**
-	 * Filters the dashboard URL for a user.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param string $url     The complete URL including scheme and path.
-	 * @param int    $user_id The user ID.
-	 * @param string $path    Path relative to the URL. Blank string if no path is specified.
-	 * @param string $scheme  Scheme to give the URL context. Accepts 'http', 'https', 'login',
-	 *                        'login_post', 'admin', 'relative' or null.
-	 */
-	return apply_filters( 'user_dashboard_url', $url, $user_id, $path, $scheme);
-}
-
-/**
- * Retrieves the URL to the user's profile editor.
- *
- * @since 3.1.0
- *
- * @param int    $user_id Optional. User ID. Defaults to current user.
- * @param string $scheme  Optional. The scheme to use. Default is 'admin', which obeys force_ssl_admin()
- *                        and is_ssl(). 'http' or 'https' can be passed to force those schemes.
- * @return string Dashboard URL link with optional path appended.
- */
-function get_edit_profile_url( $user_id = 0, $scheme = 'admin' ) {
-	$user_id = $user_id ? (int) $user_id : get_current_user_id();
-
-	if ( is_user_admin() )
-		$url = user_admin_url( 'profile.php', $scheme );
-	elseif ( is_network_admin() )
-		$url = network_admin_url( 'profile.php', $scheme );
-	else
-		$url = get_dashboard_url( $user_id, 'profile.php', $scheme );
-
-	/**
-	 * Filters the URL for a user's profile editor.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param string $url     The complete URL including scheme and path.
-	 * @param int    $user_id The user ID.
-	 * @param string $scheme  Scheme to give the URL context. Accepts 'http', 'https', 'login',
-	 *                        'login_post', 'admin', 'relative' or null.
-	 */
-	return apply_filters( 'edit_profile_url', $url, $user_id, $scheme);
-}
-
-/**
- * Returns the canonical URL for a post.
- *
- * When the post is the same as the current requested page the function will handle the
- * pagination arguments too.
- *
- * @since 4.6.0
- *
- * @param int|WP_Post $post Optional. Post ID or object. Default is global `$post`.
- * @return string|false The canonical URL, or false if the post does not exist or has not
- *                      been published yet.
- */
-function wp_get_canonical_url( $post = null ) {
-	$post = get_post( $post );
-
-	if ( ! $post ) {
-		return false;
-	}
-
-	if ( 'publish' !== $post->post_status ) {
-		return false;
-	}
-
-	$canonical_url = get_permalink( $post );
-
-	// If a canonical is being generated for the current page, make sure it has pagination if needed.
-	if ( $post->ID === get_queried_object_id() ) {
-		$page = get_query_var( 'page', 0 );
-		if ( $page >= 2 ) {
-			if ( '' == get_option( 'permalink_structure' ) ) {
-				$canonical_url = add_query_arg( 'page', $page, $canonical_url );
-			} else {
-				$canonical_url = trailingslashit( $canonical_url ) . user_trailingslashit( $page, 'single_paged' );
-			}
-		}
-
-		$cpage = get_query_var( 'cpage', 0 );
-		if ( $cpage ) {
-			$canonical_url = get_comments_pagenum_link( $cpage );
-		}
-	}
-
-	/**
-	 * Filters the canonical URL for a post.
-	 *
-	 * @since 4.6.0
-	 *
-	 * @param string  $string The post's canonical URL.
-	 * @param WP_Post $post   Post object.
-	 */
-	return apply_filters( 'get_canonical_url', $canonical_url, $post );
-}
-
-/**
- * Outputs rel=canonical for singular queries.
- *
- * @since 2.9.0
- * @since 4.6.0 Adjusted to use wp_get_canonical_url().
- */
-function rel_canonical() {
-	if ( ! is_singular() ) {
-		return;
-	}
-
-	$id = get_queried_object_id();
-
-	if ( 0 === $id ) {
-		return;
-	}
-
-	$url = wp_get_canonical_url( $id );
-
-	if ( ! empty( $url ) ) {
-		echo '<link rel="canonical" href="' . esc_url( $url ) . '" />' . "\n";
-	}
-}
-
-/**
- * Returns a shortlink for a post, page, attachment, or site.
- *
- * This function exists to provide a shortlink tag that all themes and plugins can target.
- * A plugin must hook in to provide the actual shortlinks. Default shortlink support is
- * limited to providing ?p= style links for posts. Plugins can short-circuit this function
- * via the {@see 'pre_get_shortlink'} filter or filter the output via the {@see 'get_shortlink'}
- * filter.
- *
- * @since 3.0.0.
- *
- * @param int    $id          Optional. A post or site id. Default is 0, which means the current post or site.
- * @param string $context     Optional. Whether the id is a 'site' id, 'post' id, or 'media' id. If 'post',
- *                            the post_type of the post is consulted. If 'query', the current query is consulted
- *                            to determine the id and context. Default 'post'.
- * @param bool   $allow_slugs Optional. Whether to allow post slugs in the shortlink. It is up to the plugin how
- *                            and whether to honor this. Default true.
- * @return string A shortlink or an empty string if no shortlink exists for the requested resource or if shortlinks
- *                are not enabled.
- */
-function wp_get_shortlink( $id = 0, $context = 'post', $allow_slugs = true ) {
-	/**
-	 * Filters whether to preempt generating a shortlink for the given post.
-	 *
-	 * Passing a truthy value to the filter will effectively short-circuit the
-	 * shortlink-generation process, returning that value instead.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param bool|string $return      Short-circuit return value. Either false or a URL string.
-	 * @param int         $id          Post ID, or 0 for the current post.
-	 * @param string      $context     The context for the link. One of 'post' or 'query',
-	 * @param bool        $allow_slugs Whether to allow post slugs in the shortlink.
-	 */
-	$shortlink = apply_filters( 'pre_get_shortlink', false, $id, $context, $allow_slugs );
-
-	if ( false !== $shortlink ) {
-		return $shortlink;
-	}
-
-	$post_id = 0;
-	if ( 'query' == $context && is_singular() ) {
-		$post_id = get_queried_object_id();
-		$post = get_post( $post_id );
-	} elseif ( 'post' == $context ) {
-		$post = get_post( $id );
-		if ( ! empty( $post->ID ) )
-			$post_id = $post->ID;
-	}
-
-	$shortlink = '';
-
-	// Return p= link for all public post types.
-	if ( ! empty( $post_id ) ) {
-		$post_type = get_post_type_object( $post->post_type );
-
-		if ( 'page' === $post->post_type && $post->ID == get_option( 'page_on_front' ) && 'page' == get_option( 'show_on_front' ) ) {
-			$shortlink = home_url( '/' );
-		} elseif ( $post_type->public ) {
-			$shortlink = home_url( '?p=' . $post_id );
-		}
-	}
-
-	/**
-	 * Filters the shortlink for a post.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $shortlink   Shortlink URL.
-	 * @param int    $id          Post ID, or 0 for the current post.
-	 * @param string $context     The context for the link. One of 'post' or 'query',
-	 * @param bool   $allow_slugs Whether to allow post slugs in the shortlink. Not used by default.
-	 */
-	return apply_filters( 'get_shortlink', $shortlink, $id, $context, $allow_slugs );
-}
-
-/**
- * Injects rel=shortlink into the head if a shortlink is defined for the current page.
- *
- * Attached to the {@see 'wp_head'} action.
- *
- * @since 3.0.0
- */
-function wp_shortlink_wp_head() {
-	$shortlink = wp_get_shortlink( 0, 'query' );
-
-	if ( empty( $shortlink ) )
-		return;
-
-	echo "<link rel='shortlink' href='" . esc_url( $shortlink ) . "' />\n";
-}
-
-/**
- * Sends a Link: rel=shortlink header if a shortlink is defined for the current page.
- *
- * Attached to the {@see 'wp'} action.
- *
- * @since 3.0.0
- */
-function wp_shortlink_header() {
-	if ( headers_sent() )
-		return;
-
-	$shortlink = wp_get_shortlink(0, 'query');
-
-	if ( empty($shortlink) )
-		return;
-
-	header('Link: <' . $shortlink . '>; rel=shortlink', false);
-}
-
-/**
- * Displays the shortlink for a post.
- *
- * Must be called from inside "The Loop"
- *
- * Call like the_shortlink( __( 'Shortlinkage FTW' ) )
- *
- * @since 3.0.0
- *
- * @param string $text   Optional The link text or HTML to be displayed. Defaults to 'This is the short link.'
- * @param string $title  Optional The tooltip for the link. Must be sanitized. Defaults to the sanitized post title.
- * @param string $before Optional HTML to display before the link. Default empty.
- * @param string $after  Optional HTML to display after the link. Default empty.
- */
-function the_shortlink( $text = '', $title = '', $before = '', $after = '' ) {
-	$post = get_post();
-
-	if ( empty( $text ) )
-		$text = __('This is the short link.');
-
-	if ( empty( $title ) )
-		$title = the_title_attribute( array( 'echo' => false ) );
-
-	$shortlink = wp_get_shortlink( $post->ID );
-
-	if ( !empty( $shortlink ) ) {
-		$link = '<a rel="shortlink" href="' . esc_url( $shortlink ) . '" title="' . $title . '">' . $text . '</a>';
-
-		/**
-		 * Filters the short link anchor tag for a post.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param string $link      Shortlink anchor tag.
-		 * @param string $shortlink Shortlink URL.
-		 * @param string $text      Shortlink's text.
-		 * @param string $title     Shortlink's title attribute.
-		 */
-		$link = apply_filters( 'the_shortlink', $link, $shortlink, $text, $title );
-		echo $before, $link, $after;
-	}
-}
-
-
-/**
- * Retrieves the avatar URL.
- *
- * @since 4.2.0
- *
- * @param mixed $id_or_email The Gravatar to retrieve a URL for. Accepts a user_id, gravatar md5 hash,
- *                           user email, WP_User object, WP_Post object, or WP_Comment object.
- * @param array $args {
- *     Optional. Arguments to return instead of the default arguments.
- *
- *     @type int    $size           Height and width of the avatar in pixels. Default 96.
- *     @type string $default        URL for the default image or a default type. Accepts '404' (return
- *                                  a 404 instead of a default image), 'retro' (8bit), 'monsterid' (monster),
- *                                  'wavatar' (cartoon face), 'indenticon' (the "quilt"), 'mystery', 'mm',
- *                                  or 'mysteryman' (The Oyster Man), 'blank' (transparent GIF), or
- *                                  'gravatar_default' (the Gravatar logo). Default is the value of the
- *                                  'avatar_default' option, with a fallback of 'mystery'.
- *     @type bool   $force_default  Whether to always show the default image, never the Gravatar. Default false.
- *     @type string $rating         What rating to display avatars up to. Accepts 'G', 'PG', 'R', 'X', and are
- *                                  judged in that order. Default is the value of the 'avatar_rating' option.
- *     @type string $scheme         URL scheme to use. See set_url_scheme() for accepted values.
- *                                  Default null.
- *     @type array  $processed_args When the function returns, the value will be the processed/sanitized $args
- *                                  plus a "found_avatar" guess. Pass as a reference. Default null.
- * }
- * @return false|string The URL of the avatar we found, or false if we couldn't find an avatar.
- */
-function get_avatar_url( $id_or_email, $args = null ) {
-	$args = get_avatar_data( $id_or_email, $args );
-	return $args['url'];
-}
-
-/**
- * Retrieves default data about the avatar.
- *
- * @since 4.2.0
- *
- * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash,
- *                            user email, WP_User object, WP_Post object, or WP_Comment object.
- * @param array $args {
- *     Optional. Arguments to return instead of the default arguments.
- *
- *     @type int    $size           Height and width of the avatar image file in pixels. Default 96.
- *     @type int    $height         Display height of the avatar in pixels. Defaults to $size.
- *     @type int    $width          Display width of the avatar in pixels. Defaults to $size.
- *     @type string $default        URL for the default image or a default type. Accepts '404' (return
- *                                  a 404 instead of a default image), 'retro' (8bit), 'monsterid' (monster),
- *                                  'wavatar' (cartoon face), 'indenticon' (the "quilt"), 'mystery', 'mm',
- *                                  or 'mysteryman' (The Oyster Man), 'blank' (transparent GIF), or
- *                                  'gravatar_default' (the Gravatar logo). Default is the value of the
- *                                  'avatar_default' option, with a fallback of 'mystery'.
- *     @type bool   $force_default  Whether to always show the default image, never the Gravatar. Default false.
- *     @type string $rating         What rating to display avatars up to. Accepts 'G', 'PG', 'R', 'X', and are
- *                                  judged in that order. Default is the value of the 'avatar_rating' option.
- *     @type string $scheme         URL scheme to use. See set_url_scheme() for accepted values.
- *                                  Default null.
- *     @type array  $processed_args When the function returns, the value will be the processed/sanitized $args
- *                                  plus a "found_avatar" guess. Pass as a reference. Default null.
- *     @type string $extra_attr     HTML attributes to insert in the IMG element. Is not sanitized. Default empty.
- * }
- * @return array $processed_args {
- *     Along with the arguments passed in `$args`, this will contain a couple of extra arguments.
- *
- *     @type bool   $found_avatar True if we were able to find an avatar for this user,
- *                                false or not set if we couldn't.
- *     @type string $url          The URL of the avatar we found.
- * }
- */
-function get_avatar_data( $id_or_email, $args = null ) {
-	$args = wp_parse_args( $args, array(
-		'size'           => 96,
-		'height'         => null,
-		'width'          => null,
-		'default'        => get_option( 'avatar_default', 'mystery' ),
-		'force_default'  => false,
-		'rating'         => get_option( 'avatar_rating' ),
-		'scheme'         => null,
-		'processed_args' => null, // if used, should be a reference
-		'extra_attr'     => '',
-	) );
-
-	if ( is_numeric( $args['size'] ) ) {
-		$args['size'] = absint( $args['size'] );
-		if ( ! $args['size'] ) {
-			$args['size'] = 96;
-		}
-	} else {
-		$args['size'] = 96;
-	}
-
-	if ( is_numeric( $args['height'] ) ) {
-		$args['height'] = absint( $args['height'] );
-		if ( ! $args['height'] ) {
-			$args['height'] = $args['size'];
-		}
-	} else {
-		$args['height'] = $args['size'];
-	}
-
-	if ( is_numeric( $args['width'] ) ) {
-		$args['width'] = absint( $args['width'] );
-		if ( ! $args['width'] ) {
-			$args['width'] = $args['size'];
-		}
-	} else {
-		$args['width'] = $args['size'];
-	}
-
-	if ( empty( $args['default'] ) ) {
-		$args['default'] = get_option( 'avatar_default', 'mystery' );
-	}
-
-	switch ( $args['default'] ) {
-		case 'mm' :
-		case 'mystery' :
-		case 'mysteryman' :
-			$args['default'] = 'mm';
-			break;
-		case 'gravatar_default' :
-			$args['default'] = false;
-			break;
-	}
-
-	$args['force_default'] = (bool) $args['force_default'];
-
-	$args['rating'] = strtolower( $args['rating'] );
-
-	$args['found_avatar'] = false;
-
-	/**
-	 * Filters whether to retrieve the avatar URL early.
-	 *
-	 * Passing a non-null value in the 'url' member of the return array will
-	 * effectively short circuit get_avatar_data(), passing the value through
-	 * the {@see 'get_avatar_data'} filter and returning early.
-	 *
-	 * @since 4.2.0
-	 *
-	 * @param array  $args        Arguments passed to get_avatar_data(), after processing.
-	 * @param mixed  $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash,
-	 *                            user email, WP_User object, WP_Post object, or WP_Comment object.
-	 */
-	$args = apply_filters( 'pre_get_avatar_data', $args, $id_or_email );
-
-	if ( isset( $args['url'] ) && ! is_null( $args['url'] ) ) {
-		/** This filter is documented in wp-includes/link-template.php */
-		return apply_filters( 'get_avatar_data', $args, $id_or_email );
-	}
-
-	$email_hash = '';
-	$user = $email = false;
-
-	if ( is_object( $id_or_email ) && isset( $id_or_email->comment_ID ) ) {
-		$id_or_email = get_comment( $id_or_email );
-	}
-
-	// Process the user identifier.
-	if ( is_numeric( $id_or_email ) ) {
-		$user = get_user_by( 'id', absint( $id_or_email ) );
-	} elseif ( is_string( $id_or_email ) ) {
-		if ( strpos( $id_or_email, '@md5.gravatar.com' ) ) {
-			// md5 hash
-			list( $email_hash ) = explode( '@', $id_or_email );
-		} else {
-			// email address
-			$email = $id_or_email;
-		}
-	} elseif ( $id_or_email instanceof WP_User ) {
-		// User Object
-		$user = $id_or_email;
-	} elseif ( $id_or_email instanceof WP_Post ) {
-		// Post Object
-		$user = get_user_by( 'id', (int) $id_or_email->post_author );
-	} elseif ( $id_or_email instanceof WP_Comment ) {
-		/**
-		 * Filters the list of allowed comment types for retrieving avatars.
-		 *
-		 * @since 3.0.0
-		 *
-		 * @param array $types An array of content types. Default only contains 'comment'.
-		 */
-		$allowed_comment_types = apply_filters( 'get_avatar_comment_types', array( 'comment' ) );
-		if ( ! empty( $id_or_email->comment_type ) && ! in_array( $id_or_email->comment_type, (array) $allowed_comment_types ) ) {
-			$args['url'] = false;
-			/** This filter is documented in wp-includes/link-template.php */
-			return apply_filters( 'get_avatar_data', $args, $id_or_email );
-		}
-
-		if ( ! empty( $id_or_email->user_id ) ) {
-			$user = get_user_by( 'id', (int) $id_or_email->user_id );
-		}
-		if ( ( ! $user || is_wp_error( $user ) ) && ! empty( $id_or_email->comment_author_email ) ) {
-			$email = $id_or_email->comment_author_email;
-		}
-	}
-
-	if ( ! $email_hash ) {
-		if ( $user ) {
-			$email = $user->user_email;
-		}
-
-		if ( $email ) {
-			$email_hash = md5( strtolower( trim( $email ) ) );
-		}
-	}
-
-	if ( $email_hash ) {
-		$args['found_avatar'] = true;
-		$gravatar_server = hexdec( $email_hash[0] ) % 3;
-	} else {
-		$gravatar_server = rand( 0, 2 );
-	}
-
-	$url_args = array(
-		's' => $args['size'],
-		'd' => $args['default'],
-		'f' => $args['force_default'] ? 'y' : false,
-		'r' => $args['rating'],
-	);
-
-	if ( is_ssl() ) {
-		$url = 'https://secure.gravatar.com/avatar/' . $email_hash;
-	} else {
-		$url = sprintf( 'http://%d.gravatar.com/avatar/%s', $gravatar_server, $email_hash );
-	}
-
-	$url = add_query_arg(
-		rawurlencode_deep( array_filter( $url_args ) ),
-		set_url_scheme( $url, $args['scheme'] )
-	);
-
-	/**
-	 * Filters the avatar URL.
-	 *
-	 * @since 4.2.0
-	 *
-	 * @param string $url         The URL of the avatar.
-	 * @param mixed  $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash,
-	 *                            user email, WP_User object, WP_Post object, or WP_Comment object.
-	 * @param array  $args        Arguments passed to get_avatar_data(), after processing.
-	 */
-	$args['url'] = apply_filters( 'get_avatar_url', $url, $id_or_email, $args );
-
-	/**
-	 * Filters the avatar data.
-	 *
-	 * @since 4.2.0
-	 *
-	 * @param array  $args        Arguments passed to get_avatar_data(), after processing.
-	 * @param mixed  $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash,
-	 *                            user email, WP_User object, WP_Post object, or WP_Comment object.
-	 */
-	return apply_filters( 'get_avatar_data', $args, $id_or_email );
-}
-
-/**
- * Retrieves the URL of a file in the theme.
- *
- * Searches in the stylesheet directory before the template directory so themes
- * which inherit from a parent theme can just override one file.
- *
- * @since 4.7.0
- *
- * @param string $file Optional. File to search for in the stylesheet directory.
- * @return string The URL of the file.
- */
-function get_theme_file_uri( $file = '' ) {
-	$file = ltrim( $file, '/' );
-
-	if ( empty( $file ) ) {
-		$url = get_stylesheet_directory_uri();
-	} elseif ( file_exists( get_stylesheet_directory() . '/' . $file ) ) {
-		$url = get_stylesheet_directory_uri() . '/' . $file;
-	} else {
-		$url = get_template_directory_uri() . '/' . $file;
-	}
-
-	/**
-	 * Filters the URL to a file in the theme.
-	 *
-	 * @since 4.7.0
-	 *
-	 * @param string $url  The file URL.
-	 * @param string $file The requested file to search for.
-	 */
-	return apply_filters( 'theme_file_uri', $url, $file );
-}
-
-/**
- * Retrieves the URL of a file in the parent theme.
- *
- * @since 4.7.0
- *
- * @param string $file Optional. File to return the URL for in the template directory.
- * @return string The URL of the file.
- */
-function get_parent_theme_file_uri( $file = '' ) {
-	$file = ltrim( $file, '/' );
-
-	if ( empty( $file ) ) {
-		$url = get_template_directory_uri();
-	} else {
-		$url = get_template_directory_uri() . '/' . $file;
-	}
-
-	/**
-	 * Filters the URL to a file in the parent theme.
-	 *
-	 * @since 4.7.0
-	 *
-	 * @param string $url  The file URL.
-	 * @param string $file The requested file to search for.
-	 */
-	return apply_filters( 'parent_theme_file_uri', $url, $file );
-}
-
-/**
- * Retrieves the path of a file in the theme.
- *
- * Searches in the stylesheet directory before the template directory so themes
- * which inherit from a parent theme can just override one file.
- *
- * @since 4.7.0
- *
- * @param string $file Optional. File to search for in the stylesheet directory.
- * @return string The path of the file.
- */
-function get_theme_file_path( $file = '' ) {
-	$file = ltrim( $file, '/' );
-
-	if ( empty( $file ) ) {
-		$path = get_stylesheet_directory();
-	} elseif ( file_exists( get_stylesheet_directory() . '/' . $file ) ) {
-		$path = get_stylesheet_directory() . '/' . $file;
-	} else {
-		$path = get_template_directory() . '/' . $file;
-	}
-
-	/**
-	 * Filters the path to a file in the theme.
-	 *
-	 * @since 4.7.0
-	 *
-	 * @param string $path The file path.
-	 * @param string $file The requested file to search for.
-	 */
-	return apply_filters( 'theme_file_path', $path, $file );
-}
-
-/**
- * Retrieves the path of a file in the parent theme.
- *
- * @since 4.7.0
- *
- * @param string $file Optional. File to return the path for in the template directory.
- * @return string The path of the file.
- */
-function get_parent_theme_file_path( $file = '' ) {
-	$file = ltrim( $file, '/' );
-
-	if ( empty( $file ) ) {
-		$path = get_template_directory();
-	} else {
-		$path = get_template_directory() . '/' . $file;
-	}
-
-	/**
-	 * Filters the path to a file in the parent theme.
-	 *
-	 * @since 4.7.0
-	 *
-	 * @param string $path The file path.
-	 * @param string $file The requested file to search for.
-	 */
-	return apply_filters( 'parent_theme_file_path', $path, $file );
-}
Index: www/wp-admin/term.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/term.php	(revision 38565)
+++ www/wp-admin/term.php	(revision 38565)
@@ -1,68 +0,0 @@
-<?php
-/**
- * Edit Term Administration Screen.
- *
- * @package WordPress
- * @subpackage Administration
- * @since 4.5.0
- */
-
-/** WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-if ( empty( $_REQUEST['tag_ID'] ) ) {
-	$sendback = admin_url( 'edit-tags.php' );
-	if ( ! empty( $taxnow ) ) {
-		$sendback = add_query_arg( array( 'taxonomy' => $taxnow ), $sendback );
-	}
-	wp_redirect( esc_url( $sendback ) );
-	exit;
-}
-
-$tag_ID = absint( $_REQUEST['tag_ID'] );
-$tag    = get_term( $tag_ID, $taxnow, OBJECT, 'edit' );
-
-if ( ! $tag instanceof WP_Term ) {
-	wp_die( __( 'You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?' ) );
-}
-
-$tax      = get_taxonomy( $tag->taxonomy );
-$taxonomy = $tax->name;
-$title    = $tax->labels->edit_item;
-
-if ( ! in_array( $taxonomy, get_taxonomies( array( 'show_ui' => true ) ) ) ||
-     ! current_user_can( $tax->cap->manage_terms )
-) {
-	wp_die(
-		'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-		'<p>' . __( 'Sorry, you are not allowed to manage this item.' ) . '</p>',
-		403
-	);
-}
-
-$post_type = get_current_screen()->post_type;
-
-// Default to the first object_type associated with the taxonomy if no post type was passed.
-if ( empty( $post_type ) ) {
-	$post_type = reset( $tax->object_type );
-}
-
-if ( 'post' != $post_type ) {
-	$parent_file  = ( 'attachment' == $post_type ) ? 'upload.php' : "edit.php?post_type=$post_type";
-	$submenu_file = "edit-tags.php?taxonomy=$taxonomy&amp;post_type=$post_type";
-} elseif ( 'link_category' == $taxonomy ) {
-	$parent_file  = 'link-manager.php';
-	$submenu_file = 'edit-tags.php?taxonomy=link_category';
-} else {
-	$parent_file  = 'edit.php';
-	$submenu_file = "edit-tags.php?taxonomy=$taxonomy";
-}
-
-get_current_screen()->set_screen_reader_content( array(
-	'heading_pagination' => $tax->labels->items_list_navigation,
-	'heading_list'       => $tax->labels->items_list,
-) );
-
-require_once( ABSPATH . 'wp-admin/admin-header.php' );
-include( ABSPATH . 'wp-admin/edit-tag-form.php' );
-include( ABSPATH . 'wp-admin/admin-footer.php' );
Index: www/wp-includes/autoload/requests/Exception/HTTP/505.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/505.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/505.php	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-<?php
-/**
- * Exception for 505 HTTP Version Not Supported responses
- *
- * @package Requests
- */
-
-/**
- * Exception for 505 HTTP Version Not Supported responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_505 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 505;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'HTTP Version Not Supported';
-}
\ No newline at end of file
Index: www/wp-admin/update.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/update.php	(revision 38565)
+++ www/wp-admin/update.php	(revision 38565)
@@ -1,289 +0,0 @@
-<?php
-/**
- * Update/Install Plugin/Theme administration panel.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-if ( ! defined( 'IFRAME_REQUEST' ) && isset( $_GET['action'] ) && in_array( $_GET['action'], array( 'update-selected', 'activate-plugin', 'update-selected-themes' ) ) )
-	define( 'IFRAME_REQUEST', true );
-
-/** WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
-
-if ( isset($_GET['action']) ) {
-	$plugin = isset($_REQUEST['plugin']) ? trim($_REQUEST['plugin']) : '';
-	$theme = isset($_REQUEST['theme']) ? urldecode($_REQUEST['theme']) : '';
-	$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
-
-	if ( 'update-selected' == $action ) {
-		if ( ! current_user_can( 'update_plugins' ) )
-			wp_die( __( 'Sorry, you are not allowed to update plugins for this site.' ) );
-
-		check_admin_referer( 'bulk-update-plugins' );
-
-		if ( isset( $_GET['plugins'] ) )
-			$plugins = explode( ',', stripslashes($_GET['plugins']) );
-		elseif ( isset( $_POST['checked'] ) )
-			$plugins = (array) $_POST['checked'];
-		else
-			$plugins = array();
-
-		$plugins = array_map('urldecode', $plugins);
-
-		$url = 'update.php?action=update-selected&amp;plugins=' . urlencode(implode(',', $plugins));
-		$nonce = 'bulk-update-plugins';
-
-		wp_enqueue_script( 'updates' );
-		iframe_header();
-
-		$upgrader = new Plugin_Upgrader( new Bulk_Plugin_Upgrader_Skin( compact( 'nonce', 'url' ) ) );
-		$upgrader->bulk_upgrade( $plugins );
-
-		iframe_footer();
-
-	} elseif ( 'upgrade-plugin' == $action ) {
-		if ( ! current_user_can('update_plugins') )
-			wp_die(__('Sorry, you are not allowed to update plugins for this site.'));
-
-		check_admin_referer('upgrade-plugin_' . $plugin);
-
-		$title = __('Update Plugin');
-		$parent_file = 'plugins.php';
-		$submenu_file = 'plugins.php';
-
-		wp_enqueue_script( 'updates' );
-		require_once(ABSPATH . 'wp-admin/admin-header.php');
-
-		$nonce = 'upgrade-plugin_' . $plugin;
-		$url = 'update.php?action=upgrade-plugin&plugin=' . urlencode( $plugin );
-
-		$upgrader = new Plugin_Upgrader( new Plugin_Upgrader_Skin( compact('title', 'nonce', 'url', 'plugin') ) );
-		$upgrader->upgrade($plugin);
-
-		include(ABSPATH . 'wp-admin/admin-footer.php');
-
-	} elseif ('activate-plugin' == $action ) {
-		if ( ! current_user_can('update_plugins') )
-			wp_die(__('Sorry, you are not allowed to update plugins for this site.'));
-
-		check_admin_referer('activate-plugin_' . $plugin);
-		if ( ! isset($_GET['failure']) && ! isset($_GET['success']) ) {
-			wp_redirect( admin_url('update.php?action=activate-plugin&failure=true&plugin=' . urlencode( $plugin ) . '&_wpnonce=' . $_GET['_wpnonce']) );
-			activate_plugin( $plugin, '', ! empty( $_GET['networkwide'] ), true );
-			wp_redirect( admin_url('update.php?action=activate-plugin&success=true&plugin=' . urlencode( $plugin ) . '&_wpnonce=' . $_GET['_wpnonce']) );
-			die();
-		}
-		iframe_header( __('Plugin Reactivation'), true );
-		if ( isset($_GET['success']) )
-			echo '<p>' . __('Plugin reactivated successfully.') . '</p>';
-
-		if ( isset($_GET['failure']) ){
-			echo '<p>' . __('Plugin failed to reactivate due to a fatal error.') . '</p>';
-
-			error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
-			@ini_set('display_errors', true); //Ensure that Fatal errors are displayed.
-			wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin );
-			include( WP_PLUGIN_DIR . '/' . $plugin );
-		}
-		iframe_footer();
-	} elseif ( 'install-plugin' == $action ) {
-
-		if ( ! current_user_can('install_plugins') )
-			wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) );
-
-		include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); //for plugins_api..
-
-		check_admin_referer( 'install-plugin_' . $plugin );
-		$api = plugins_api( 'plugin_information', array(
-			'slug' => $plugin,
-			'fields' => array(
-				'short_description' => false,
-				'sections' => false,
-				'requires' => false,
-				'rating' => false,
-				'ratings' => false,
-				'downloaded' => false,
-				'last_updated' => false,
-				'added' => false,
-				'tags' => false,
-				'compatibility' => false,
-				'homepage' => false,
-				'donate_link' => false,
-			),
-		) );
-
-		if ( is_wp_error( $api ) ) {
-	 		wp_die( $api );
-		}
-
-		$title = __('Plugin Install');
-		$parent_file = 'plugins.php';
-		$submenu_file = 'plugin-install.php';
-		require_once(ABSPATH . 'wp-admin/admin-header.php');
-
-		$title = sprintf( __('Installing Plugin: %s'), $api->name . ' ' . $api->version );
-		$nonce = 'install-plugin_' . $plugin;
-		$url = 'update.php?action=install-plugin&plugin=' . urlencode( $plugin );
-		if ( isset($_GET['from']) )
-			$url .= '&from=' . urlencode(stripslashes($_GET['from']));
-
-		$type = 'web'; //Install plugin type, From Web or an Upload.
-
-		$upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) );
-		$upgrader->install($api->download_link);
-
-		include(ABSPATH . 'wp-admin/admin-footer.php');
-
-	} elseif ( 'upload-plugin' == $action ) {
-
-		if ( ! current_user_can( 'upload_plugins' ) ) {
-			wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) );
-		}
-
-		check_admin_referer('plugin-upload');
-
-		$file_upload = new File_Upload_Upgrader('pluginzip', 'package');
-
-		$title = __('Upload Plugin');
-		$parent_file = 'plugins.php';
-		$submenu_file = 'plugin-install.php';
-		require_once(ABSPATH . 'wp-admin/admin-header.php');
-
-		$title = sprintf( __('Installing Plugin from uploaded file: %s'), esc_html( basename( $file_upload->filename ) ) );
-		$nonce = 'plugin-upload';
-		$url = add_query_arg(array('package' => $file_upload->id), 'update.php?action=upload-plugin');
-		$type = 'upload'; //Install plugin type, From Web or an Upload.
-
-		$upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact('type', 'title', 'nonce', 'url') ) );
-		$result = $upgrader->install( $file_upload->package );
-
-		if ( $result || is_wp_error($result) )
-			$file_upload->cleanup();
-
-		include(ABSPATH . 'wp-admin/admin-footer.php');
-
-	} elseif ( 'upgrade-theme' == $action ) {
-
-		if ( ! current_user_can('update_themes') )
-			wp_die(__('Sorry, you are not allowed to update themes for this site.'));
-
-		check_admin_referer('upgrade-theme_' . $theme);
-
-		wp_enqueue_script( 'customize-loader' );
-		wp_enqueue_script( 'updates' );
-
-		$title = __('Update Theme');
-		$parent_file = 'themes.php';
-		$submenu_file = 'themes.php';
-		require_once(ABSPATH . 'wp-admin/admin-header.php');
-
-		$nonce = 'upgrade-theme_' . $theme;
-		$url = 'update.php?action=upgrade-theme&theme=' . urlencode( $theme );
-
-		$upgrader = new Theme_Upgrader( new Theme_Upgrader_Skin( compact('title', 'nonce', 'url', 'theme') ) );
-		$upgrader->upgrade($theme);
-
-		include(ABSPATH . 'wp-admin/admin-footer.php');
-	} elseif ( 'update-selected-themes' == $action ) {
-		if ( ! current_user_can( 'update_themes' ) )
-			wp_die( __( 'Sorry, you are not allowed to update themes for this site.' ) );
-
-		check_admin_referer( 'bulk-update-themes' );
-
-		if ( isset( $_GET['themes'] ) )
-			$themes = explode( ',', stripslashes($_GET['themes']) );
-		elseif ( isset( $_POST['checked'] ) )
-			$themes = (array) $_POST['checked'];
-		else
-			$themes = array();
-
-		$themes = array_map('urldecode', $themes);
-
-		$url = 'update.php?action=update-selected-themes&amp;themes=' . urlencode(implode(',', $themes));
-		$nonce = 'bulk-update-themes';
-
-		wp_enqueue_script( 'updates' );
-		iframe_header();
-
-		$upgrader = new Theme_Upgrader( new Bulk_Theme_Upgrader_Skin( compact( 'nonce', 'url' ) ) );
-		$upgrader->bulk_upgrade( $themes );
-
-		iframe_footer();
-	} elseif ( 'install-theme' == $action ) {
-
-		if ( ! current_user_can('install_themes') )
-			wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) );
-
-		include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); //for themes_api..
-
-		check_admin_referer( 'install-theme_' . $theme );
-		$api = themes_api('theme_information', array('slug' => $theme, 'fields' => array('sections' => false, 'tags' => false) ) ); //Save on a bit of bandwidth.
-
-		if ( is_wp_error($api) )
-	 		wp_die($api);
-
-		wp_enqueue_script( 'customize-loader' );
-
-		$title = __('Install Themes');
-		$parent_file = 'themes.php';
-		$submenu_file = 'themes.php';
-		require_once(ABSPATH . 'wp-admin/admin-header.php');
-
-		$title = sprintf( __('Installing Theme: %s'), $api->name . ' ' . $api->version );
-		$nonce = 'install-theme_' . $theme;
-		$url = 'update.php?action=install-theme&theme=' . urlencode( $theme );
-		$type = 'web'; //Install theme type, From Web or an Upload.
-
-		$upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) );
-		$upgrader->install($api->download_link);
-
-		include(ABSPATH . 'wp-admin/admin-footer.php');
-
-	} elseif ( 'upload-theme' == $action ) {
-
-		if ( ! current_user_can( 'upload_themes' ) ) {
-			wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) );
-		}
-
-		check_admin_referer('theme-upload');
-
-		$file_upload = new File_Upload_Upgrader('themezip', 'package');
-
-		wp_enqueue_script( 'customize-loader' );
-
-		$title = __('Upload Theme');
-		$parent_file = 'themes.php';
-		$submenu_file = 'theme-install.php';
-
-		require_once(ABSPATH . 'wp-admin/admin-header.php');
-
-		$title = sprintf( __('Installing Theme from uploaded file: %s'), esc_html( basename( $file_upload->filename ) ) );
-		$nonce = 'theme-upload';
-		$url = add_query_arg(array('package' => $file_upload->id), 'update.php?action=upload-theme');
-		$type = 'upload'; //Install plugin type, From Web or an Upload.
-
-		$upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact('type', 'title', 'nonce', 'url') ) );
-		$result = $upgrader->install( $file_upload->package );
-
-		if ( $result || is_wp_error($result) )
-			$file_upload->cleanup();
-
-		include(ABSPATH . 'wp-admin/admin-footer.php');
-
-	} else {
-		/**
-		 * Fires when a custom plugin or theme update request is received.
-		 *
-		 * The dynamic portion of the hook name, `$action`, refers to the action
-		 * provided in the request for wp-admin/update.php. Can be used to
-		 * provide custom update functionality for themes and plugins.
-		 *
-		 * @since 2.8.0
-		 */
-		do_action( "update-custom_{$action}" );
-	}
-}
Index: www/wp-includes/Requests/Exception/HTTP/409.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/409.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_409.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/feed-rss2-comments.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/feed-rss2-comments.php	(revision 38565)
+++ www/wp-includes/feed-rss2-comments.php	(revision 38565)
@@ -1,101 +0,0 @@
-<?php
-/**
- * RSS2 Feed Template for displaying RSS2 Comments feed.
- *
- * @package WordPress
- */
-
-header('Content-Type: ' . feed_content_type('rss2') . '; charset=' . get_option('blog_charset'), true);
-
-echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
-
-/** This action is documented in wp-includes/feed-rss2.php */
-do_action( 'rss_tag_pre', 'rss2-comments' );
-?>
-<rss version="2.0"
-	xmlns:content="http://purl.org/rss/1.0/modules/content/"
-	xmlns:dc="http://purl.org/dc/elements/1.1/"
-	xmlns:atom="http://www.w3.org/2005/Atom"
-	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
-	<?php
-	/** This action is documented in wp-includes/feed-rss2.php */
-	do_action( 'rss2_ns' );
-	?>
-
-	<?php
-	/**
-	 * Fires at the end of the RSS root to add namespaces.
-	 *
-	 * @since 2.8.0
-	 */
-	do_action( 'rss2_comments_ns' );
-	?>
->
-<channel>
-	<title><?php
-		if ( is_singular() )
-			printf( ent2ncr( __( 'Comments on: %s' ) ), get_the_title_rss() );
-		elseif ( is_search() )
-			printf( ent2ncr( __( 'Comments for %1$s searching on %2$s' ) ), get_bloginfo_rss( 'name' ), get_search_query() );
-		else
-			printf( ent2ncr( __( 'Comments for %s' ) ), get_wp_title_rss() );
-	?></title>
-	<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
-	<link><?php (is_single()) ? the_permalink_rss() : bloginfo_rss("url") ?></link>
-	<description><?php bloginfo_rss("description") ?></description>
-	<lastBuildDate><?php echo mysql2date('r', get_lastcommentmodified('GMT')); ?></lastBuildDate>
-	<sy:updatePeriod><?php
-		/** This filter is documented in wp-includes/feed-rss2.php */
-		echo apply_filters( 'rss_update_period', 'hourly' );
-	?></sy:updatePeriod>
-	<sy:updateFrequency><?php
-		/** This filter is documented in wp-includes/feed-rss2.php */
-		echo apply_filters( 'rss_update_frequency', '1' );
-	?></sy:updateFrequency>
-	<?php
-	/**
-	 * Fires at the end of the RSS2 comment feed header.
-	 *
-	 * @since 2.3.0
-	 */
-	do_action( 'commentsrss2_head' );
-
-	if ( have_comments() ) : while ( have_comments() ) : the_comment();
-		$comment_post = $GLOBALS['post'] = get_post( $comment->comment_post_ID );
-	?>
-	<item>
-		<title><?php
-			if ( !is_singular() ) {
-				$title = get_the_title($comment_post->ID);
-				/** This filter is documented in wp-includes/feed.php */
-				$title = apply_filters( 'the_title_rss', $title );
-				printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss());
-			} else {
-				printf(ent2ncr(__('By: %s')), get_comment_author_rss());
-			}
-		?></title>
-		<link><?php comment_link() ?></link>
-		<dc:creator><![CDATA[<?php echo get_comment_author_rss() ?>]]></dc:creator>
-		<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_comment_time('Y-m-d H:i:s', true, false), false); ?></pubDate>
-		<guid isPermaLink="false"><?php comment_guid() ?></guid>
-<?php if ( post_password_required($comment_post) ) : ?>
-		<description><?php echo ent2ncr(__('Protected Comments: Please enter your password to view comments.')); ?></description>
-		<content:encoded><![CDATA[<?php echo get_the_password_form() ?>]]></content:encoded>
-<?php else : // post pass ?>
-		<description><![CDATA[<?php comment_text_rss() ?>]]></description>
-		<content:encoded><![CDATA[<?php comment_text() ?>]]></content:encoded>
-<?php endif; // post pass
-	/**
-	 * Fires at the end of each RSS2 comment feed item.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param int $comment->comment_ID The ID of the comment being displayed.
-	 * @param int $comment_post->ID    The ID of the post the comment is connected to.
-	 */
-	do_action( 'commentrss2_item', $comment->comment_ID, $comment_post->ID );
-?>
-	</item>
-<?php endwhile; endif; ?>
-</channel>
-</rss>
Index: www/wp-includes/class-wp-feed-cache-transient.php
===================================================================
--- www/wp-includes/class-wp-feed-cache-transient.php	(revision 38565)
+++ www/wp-includes/autoload/feed/WP_Feed_Cache_Transient.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/id3/getid3_exception.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/id3/getid3_exception.php	(revision )
+++ www/wp-includes/autoload/id3/getid3_exception.php	(revision )
@@ -0,0 +1,6 @@
+<?php
+
+class getid3_exception extends Exception
+{
+	public $message;
+}
Index: www/wp-includes/feed-atom-comments.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/feed-atom-comments.php	(revision 38565)
+++ www/wp-includes/feed-atom-comments.php	(revision 38565)
@@ -1,115 +0,0 @@
-<?php
-/**
- * Atom Feed Template for displaying Atom Comments feed.
- *
- * @package WordPress
- */
-
-header('Content-Type: ' . feed_content_type('atom') . '; charset=' . get_option('blog_charset'), true);
-echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '" ?' . '>';
-
-/** This action is documented in wp-includes/feed-rss2.php */
-do_action( 'rss_tag_pre', 'atom-comments' );
-?>
-<feed
-	xmlns="http://www.w3.org/2005/Atom"
-	xml:lang="<?php bloginfo_rss( 'language' ); ?>"
-	xmlns:thr="http://purl.org/syndication/thread/1.0"
-	<?php
-		/** This action is documented in wp-includes/feed-atom.php */
-		do_action( 'atom_ns' );
-
-		/**
-		 * Fires inside the feed tag in the Atom comment feed.
-		 *
-		 * @since 2.8.0
-		 */
-		do_action( 'atom_comments_ns' );
-	?>
->
-	<title type="text"><?php
-		if ( is_singular() )
-			printf( ent2ncr( __( 'Comments on %s' ) ), get_the_title_rss() );
-		elseif ( is_search() )
-			printf( ent2ncr( __( 'Comments for %1$s searching on %2$s' ) ), get_bloginfo_rss( 'name' ), get_search_query() );
-		else
-			printf( ent2ncr( __( 'Comments for %s' ) ), get_wp_title_rss() );
-	?></title>
-	<subtitle type="text"><?php bloginfo_rss('description'); ?></subtitle>
-
-	<updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastcommentmodified('GMT'), false); ?></updated>
-
-<?php if ( is_singular() ) { ?>
-	<link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php comments_link_feed(); ?>" />
-	<link rel="self" type="application/atom+xml" href="<?php echo esc_url( get_post_comments_feed_link('', 'atom') ); ?>" />
-	<id><?php echo esc_url( get_post_comments_feed_link('', 'atom') ); ?></id>
-<?php } elseif (is_search()) { ?>
-	<link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php echo home_url() . '?s=' . get_search_query(); ?>" />
-	<link rel="self" type="application/atom+xml" href="<?php echo get_search_comments_feed_link('', 'atom'); ?>" />
-	<id><?php echo get_search_comments_feed_link('', 'atom'); ?></id>
-<?php } else { ?>
-	<link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php bloginfo_rss('url'); ?>" />
-	<link rel="self" type="application/atom+xml" href="<?php bloginfo_rss('comments_atom_url'); ?>" />
-	<id><?php bloginfo_rss('comments_atom_url'); ?></id>
-<?php } ?>
-<?php
-	/**
-	 * Fires at the end of the Atom comment feed header.
-	 *
-	 * @since 2.8.0
-	 */
-	do_action( 'comments_atom_head' );
-?>
-<?php
-if ( have_comments() ) : while ( have_comments() ) : the_comment();
-	$comment_post = $GLOBALS['post'] = get_post( $comment->comment_post_ID );
-?>
-	<entry>
-		<title><?php
-			if ( !is_singular() ) {
-				$title = get_the_title($comment_post->ID);
-				/** This filter is documented in wp-includes/feed.php */
-				$title = apply_filters( 'the_title_rss', $title );
-				printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss());
-			} else {
-				printf(ent2ncr(__('By: %s')), get_comment_author_rss());
-			}
-		?></title>
-		<link rel="alternate" href="<?php comment_link(); ?>" type="<?php bloginfo_rss('html_type'); ?>" />
-
-		<author>
-			<name><?php comment_author_rss(); ?></name>
-			<?php if (get_comment_author_url()) echo '<uri>' . get_comment_author_url() . '</uri>'; ?>
-
-		</author>
-
-		<id><?php comment_guid(); ?></id>
-		<updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_comment_time('Y-m-d H:i:s', true, false), false); ?></updated>
-		<published><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_comment_time('Y-m-d H:i:s', true, false), false); ?></published>
-<?php if ( post_password_required($comment_post) ) : ?>
-		<content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php echo get_the_password_form(); ?>]]></content>
-<?php else : // post pass ?>
-		<content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php comment_text(); ?>]]></content>
-<?php endif; // post pass
-	// Return comment threading information (https://www.ietf.org/rfc/rfc4685.txt)
-	if ( $comment->comment_parent == 0 ) : // This comment is top level ?>
-		<thr:in-reply-to ref="<?php the_guid(); ?>" href="<?php the_permalink_rss() ?>" type="<?php bloginfo_rss('html_type'); ?>" />
-<?php else : // This comment is in reply to another comment
-	$parent_comment = get_comment($comment->comment_parent);
-	// The rel attribute below and the id tag above should be GUIDs, but WP doesn't create them for comments (unlike posts). Either way, it's more important that they both use the same system
-?>
-		<thr:in-reply-to ref="<?php comment_guid($parent_comment) ?>" href="<?php echo get_comment_link($parent_comment) ?>" type="<?php bloginfo_rss('html_type'); ?>" />
-<?php endif;
-	/**
-	 * Fires at the end of each Atom comment feed item.
-	 *
-	 * @since 2.2.0
-	 *
-	 * @param int $comment_id      ID of the current comment.
-	 * @param int $comment_post_id ID of the post the current comment is connected to.
-	 */
-	do_action( 'comment_atom_entry', $comment->comment_ID, $comment_post->ID );
-?>
-	</entry>
-<?php endwhile; endif; ?>
-</feed>
Index: www/wp-includes/customize/class-wp-customize-nav-menu-item-control.php
===================================================================
--- www/wp-includes/customize/class-wp-customize-nav-menu-item-control.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Nav_Menu_Item_Control.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/Requests/Exception/HTTP/511.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/511.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_511.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/SimplePie/Cache/File.php
===================================================================
--- www/wp-includes/SimplePie/Cache/File.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_Cache_File.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/plugin.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/plugin.php	(revision 38565)
+++ www/wp-includes/plugin.php	(revision 38565)
@@ -1,910 +0,0 @@
-<?php
-/**
- * The plugin API is located in this file, which allows for creating actions
- * and filters and hooking functions, and methods. The functions or methods will
- * then be run when the action or filter is called.
- *
- * The API callback examples reference functions, but can be methods of classes.
- * To hook methods, you'll need to pass an array one of two ways.
- *
- * Any of the syntaxes explained in the PHP documentation for the
- * {@link https://secure.php.net/manual/en/language.pseudo-types.php#language.types.callback 'callback'}
- * type are valid.
- *
- * Also see the {@link https://codex.wordpress.org/Plugin_API Plugin API} for
- * more information and examples on how to use a lot of these functions.
- *
- * This file should have no external dependencies.
- *
- * @package WordPress
- * @subpackage Plugin
- * @since 1.5.0
- */
-
-// Initialize the filter globals.
-require( dirname( __FILE__ ) . '/class-wp-hook.php' );
-
-/** @var WP_Hook[] $wp_filter */
-global $wp_filter, $wp_actions, $wp_current_filter;
-
-if ( $wp_filter ) {
-	$wp_filter = WP_Hook::build_preinitialized_hooks( $wp_filter );
-} else {
-	$wp_filter = array();
-}
-
-if ( ! isset( $wp_actions ) )
-	$wp_actions = array();
-
-if ( ! isset( $wp_current_filter ) )
-	$wp_current_filter = array();
-
-/**
- * Hook a function or method to a specific filter action.
- *
- * WordPress offers filter hooks to allow plugins to modify
- * various types of internal data at runtime.
- *
- * A plugin can modify data by binding a callback to a filter hook. When the filter
- * is later applied, each bound callback is run in order of priority, and given
- * the opportunity to modify a value by returning a new value.
- *
- * The following example shows how a callback function is bound to a filter hook.
- *
- * Note that `$example` is passed to the callback, (maybe) modified, then returned:
- *
- *     function example_callback( $example ) {
- *         // Maybe modify $example in some way.
- *         return $example;
- *     }
- *     add_filter( 'example_filter', 'example_callback' );
- *
- * Bound callbacks can accept from none to the total number of arguments passed as parameters
- * in the corresponding apply_filters() call.
- *
- * In other words, if an apply_filters() call passes four total arguments, callbacks bound to
- * it can accept none (the same as 1) of the arguments or up to four. The important part is that
- * the `$accepted_args` value must reflect the number of arguments the bound callback *actually*
- * opted to accept. If no arguments were accepted by the callback that is considered to be the
- * same as accepting 1 argument. For example:
- *
- *     // Filter call.
- *     $value = apply_filters( 'hook', $value, $arg2, $arg3 );
- *
- *     // Accepting zero/one arguments.
- *     function example_callback() {
- *         ...
- *         return 'some value';
- *     }
- *     add_filter( 'hook', 'example_callback' ); // Where $priority is default 10, $accepted_args is default 1.
- *
- *     // Accepting two arguments (three possible).
- *     function example_callback( $value, $arg2 ) {
- *         ...
- *         return $maybe_modified_value;
- *     }
- *     add_filter( 'hook', 'example_callback', 10, 2 ); // Where $priority is 10, $accepted_args is 2.
- *
- * *Note:* The function will return true whether or not the callback is valid.
- * It is up to you to take care. This is done for optimization purposes, so
- * everything is as quick as possible.
- *
- * @since 0.71
- *
- * @global array $wp_filter      A multidimensional array of all hooks and the callbacks hooked to them.
- *
- * @param string   $tag             The name of the filter to hook the $function_to_add callback to.
- * @param callable $function_to_add The callback to be run when the filter is applied.
- * @param int      $priority        Optional. Used to specify the order in which the functions
- *                                  associated with a particular action are executed. Default 10.
- *                                  Lower numbers correspond with earlier execution,
- *                                  and functions with the same priority are executed
- *                                  in the order in which they were added to the action.
- * @param int      $accepted_args   Optional. The number of arguments the function accepts. Default 1.
- * @return true
- */
-function add_filter( $tag, $function_to_add, $priority = 10, $accepted_args = 1 ) {
-	global $wp_filter;
-	if ( ! isset( $wp_filter[ $tag ] ) ) {
-		$wp_filter[ $tag ] = new WP_Hook();
-	}
-	$wp_filter[ $tag ]->add_filter( $tag, $function_to_add, $priority, $accepted_args );
-	return true;
-}
-
-/**
- * Check if any filter has been registered for a hook.
- *
- * @since 2.5.0
- *
- * @global array $wp_filter Stores all of the filters.
- *
- * @param string        $tag               The name of the filter hook.
- * @param callable|bool $function_to_check Optional. The callback to check for. Default false.
- * @return false|int If $function_to_check is omitted, returns boolean for whether the hook has
- *                   anything registered. When checking a specific function, the priority of that
- *                   hook is returned, or false if the function is not attached. When using the
- *                   $function_to_check argument, this function may return a non-boolean value
- *                   that evaluates to false (e.g.) 0, so use the === operator for testing the
- *                   return value.
- */
-function has_filter($tag, $function_to_check = false) {
-	global $wp_filter;
-
-	if ( ! isset( $wp_filter[ $tag ] ) ) {
-		return false;
-	}
-
-	return $wp_filter[ $tag ]->has_filter( $tag, $function_to_check );
-}
-
-/**
- * Call the functions added to a filter hook.
- *
- * The callback functions attached to filter hook $tag are invoked by calling
- * this function. This function can be used to create a new filter hook by
- * simply calling this function with the name of the new hook specified using
- * the $tag parameter.
- *
- * The function allows for additional arguments to be added and passed to hooks.
- *
- *     // Our filter callback function
- *     function example_callback( $string, $arg1, $arg2 ) {
- *         // (maybe) modify $string
- *         return $string;
- *     }
- *     add_filter( 'example_filter', 'example_callback', 10, 3 );
- *
- *     /*
- *      * Apply the filters by calling the 'example_callback' function we
- *      * "hooked" to 'example_filter' using the add_filter() function above.
- *      * - 'example_filter' is the filter hook $tag
- *      * - 'filter me' is the value being filtered
- *      * - $arg1 and $arg2 are the additional arguments passed to the callback.
- *     $value = apply_filters( 'example_filter', 'filter me', $arg1, $arg2 );
- *
- * @since 0.71
- *
- * @global array $wp_filter         Stores all of the filters.
- * @global array $wp_current_filter Stores the list of current filters with the current one last.
- *
- * @param string $tag     The name of the filter hook.
- * @param mixed  $value   The value on which the filters hooked to `$tag` are applied on.
- * @param mixed  $var,... Additional variables passed to the functions hooked to `$tag`.
- * @return mixed The filtered value after all hooked functions are applied to it.
- */
-function apply_filters( $tag, $value ) {
-	global $wp_filter, $wp_current_filter;
-
-	$args = array();
-
-	// Do 'all' actions first.
-	if ( isset($wp_filter['all']) ) {
-		$wp_current_filter[] = $tag;
-		$args = func_get_args();
-		_wp_call_all_hook($args);
-	}
-
-	if ( !isset($wp_filter[$tag]) ) {
-		if ( isset($wp_filter['all']) )
-			array_pop($wp_current_filter);
-		return $value;
-	}
-
-	if ( !isset($wp_filter['all']) )
-		$wp_current_filter[] = $tag;
-
-	if ( empty($args) )
-		$args = func_get_args();
-
-	// don't pass the tag name to WP_Hook
-	array_shift( $args );
-
-	$filtered = $wp_filter[ $tag ]->apply_filters( $value, $args );
-
-	array_pop( $wp_current_filter );
-
-	return $filtered;
-}
-
-/**
- * Execute functions hooked on a specific filter hook, specifying arguments in an array.
- *
- * @since 3.0.0
- *
- * @see apply_filters() This function is identical, but the arguments passed to the
- * functions hooked to `$tag` are supplied using an array.
- *
- * @global array $wp_filter         Stores all of the filters
- * @global array $wp_current_filter Stores the list of current filters with the current one last
- *
- * @param string $tag  The name of the filter hook.
- * @param array  $args The arguments supplied to the functions hooked to $tag.
- * @return mixed The filtered value after all hooked functions are applied to it.
- */
-function apply_filters_ref_array($tag, $args) {
-	global $wp_filter, $wp_current_filter;
-
-	// Do 'all' actions first
-	if ( isset($wp_filter['all']) ) {
-		$wp_current_filter[] = $tag;
-		$all_args = func_get_args();
-		_wp_call_all_hook($all_args);
-	}
-
-	if ( !isset($wp_filter[$tag]) ) {
-		if ( isset($wp_filter['all']) )
-			array_pop($wp_current_filter);
-		return $args[0];
-	}
-
-	if ( !isset($wp_filter['all']) )
-		$wp_current_filter[] = $tag;
-
-	$filtered = $wp_filter[ $tag ]->apply_filters( $args[0], $args );
-
-	array_pop( $wp_current_filter );
-
-	return $filtered;
-}
-
-/**
- * Removes a function from a specified filter hook.
- *
- * This function removes a function attached to a specified filter hook. This
- * method can be used to remove default functions attached to a specific filter
- * hook and possibly replace them with a substitute.
- *
- * To remove a hook, the $function_to_remove and $priority arguments must match
- * when the hook was added. This goes for both filters and actions. No warning
- * will be given on removal failure.
- *
- * @since 1.2.0
- *
- * @global array $wp_filter         Stores all of the filters
- *
- * @param string   $tag                The filter hook to which the function to be removed is hooked.
- * @param callable $function_to_remove The name of the function which should be removed.
- * @param int      $priority           Optional. The priority of the function. Default 10.
- * @return bool    Whether the function existed before it was removed.
- */
-function remove_filter( $tag, $function_to_remove, $priority = 10 ) {
-	global $wp_filter;
-
-	$r = false;
-	if ( isset( $wp_filter[ $tag ] ) ) {
-		$r = $wp_filter[ $tag ]->remove_filter( $tag, $function_to_remove, $priority );
-		if ( ! $wp_filter[ $tag ]->callbacks ) {
-			unset( $wp_filter[ $tag ] );
-		}
-	}
-
-	return $r;
-}
-
-/**
- * Remove all of the hooks from a filter.
- *
- * @since 2.7.0
- *
- * @global array $wp_filter  Stores all of the filters
- *
- * @param string   $tag      The filter to remove hooks from.
- * @param int|bool $priority Optional. The priority number to remove. Default false.
- * @return true True when finished.
- */
-function remove_all_filters( $tag, $priority = false ) {
-	global $wp_filter;
-
-	if ( isset( $wp_filter[ $tag ]) ) {
-		$wp_filter[ $tag ]->remove_all_filters( $priority );
-		if ( ! $wp_filter[ $tag ]->has_filters() ) {
-			unset( $wp_filter[ $tag ] );
-		}
-	}
-
-	return true;
-}
-
-/**
- * Retrieve the name of the current filter or action.
- *
- * @since 2.5.0
- *
- * @global array $wp_current_filter Stores the list of current filters with the current one last
- *
- * @return string Hook name of the current filter or action.
- */
-function current_filter() {
-	global $wp_current_filter;
-	return end( $wp_current_filter );
-}
-
-/**
- * Retrieve the name of the current action.
- *
- * @since 3.9.0
- *
- * @return string Hook name of the current action.
- */
-function current_action() {
-	return current_filter();
-}
-
-/**
- * Retrieve the name of a filter currently being processed.
- *
- * The function current_filter() only returns the most recent filter or action
- * being executed. did_action() returns true once the action is initially
- * processed.
- *
- * This function allows detection for any filter currently being
- * executed (despite not being the most recent filter to fire, in the case of
- * hooks called from hook callbacks) to be verified.
- *
- * @since 3.9.0
- *
- * @see current_filter()
- * @see did_action()
- * @global array $wp_current_filter Current filter.
- *
- * @param null|string $filter Optional. Filter to check. Defaults to null, which
- *                            checks if any filter is currently being run.
- * @return bool Whether the filter is currently in the stack.
- */
-function doing_filter( $filter = null ) {
-	global $wp_current_filter;
-
-	if ( null === $filter ) {
-		return ! empty( $wp_current_filter );
-	}
-
-	return in_array( $filter, $wp_current_filter );
-}
-
-/**
- * Retrieve the name of an action currently being processed.
- *
- * @since 3.9.0
- *
- * @param string|null $action Optional. Action to check. Defaults to null, which checks
- *                            if any action is currently being run.
- * @return bool Whether the action is currently in the stack.
- */
-function doing_action( $action = null ) {
-	return doing_filter( $action );
-}
-
-/**
- * Hooks a function on to a specific action.
- *
- * Actions are the hooks that the WordPress core launches at specific points
- * during execution, or when specific events occur. Plugins can specify that
- * one or more of its PHP functions are executed at these points, using the
- * Action API.
- *
- * @since 1.2.0
- *
- * @param string   $tag             The name of the action to which the $function_to_add is hooked.
- * @param callable $function_to_add The name of the function you wish to be called.
- * @param int      $priority        Optional. Used to specify the order in which the functions
- *                                  associated with a particular action are executed. Default 10.
- *                                  Lower numbers correspond with earlier execution,
- *                                  and functions with the same priority are executed
- *                                  in the order in which they were added to the action.
- * @param int      $accepted_args   Optional. The number of arguments the function accepts. Default 1.
- * @return true Will always return true.
- */
-function add_action($tag, $function_to_add, $priority = 10, $accepted_args = 1) {
-	return add_filter($tag, $function_to_add, $priority, $accepted_args);
-}
-
-/**
- * Execute functions hooked on a specific action hook.
- *
- * This function invokes all functions attached to action hook `$tag`. It is
- * possible to create new action hooks by simply calling this function,
- * specifying the name of the new hook using the `$tag` parameter.
- *
- * You can pass extra arguments to the hooks, much like you can with apply_filters().
- *
- * @since 1.2.0
- *
- * @global array $wp_filter         Stores all of the filters
- * @global array $wp_actions        Increments the amount of times action was triggered.
- * @global array $wp_current_filter Stores the list of current filters with the current one last
- *
- * @param string $tag     The name of the action to be executed.
- * @param mixed  $arg,... Optional. Additional arguments which are passed on to the
- *                        functions hooked to the action. Default empty.
- */
-function do_action($tag, $arg = '') {
-	global $wp_filter, $wp_actions, $wp_current_filter;
-
-	if ( ! isset($wp_actions[$tag]) )
-		$wp_actions[$tag] = 1;
-	else
-		++$wp_actions[$tag];
-
-	// Do 'all' actions first
-	if ( isset($wp_filter['all']) ) {
-		$wp_current_filter[] = $tag;
-		$all_args = func_get_args();
-		_wp_call_all_hook($all_args);
-	}
-
-	if ( !isset($wp_filter[$tag]) ) {
-		if ( isset($wp_filter['all']) )
-			array_pop($wp_current_filter);
-		return;
-	}
-
-	if ( !isset($wp_filter['all']) )
-		$wp_current_filter[] = $tag;
-
-	$args = array();
-	if ( is_array($arg) && 1 == count($arg) && isset($arg[0]) && is_object($arg[0]) ) // array(&$this)
-		$args[] =& $arg[0];
-	else
-		$args[] = $arg;
-	for ( $a = 2, $num = func_num_args(); $a < $num; $a++ )
-		$args[] = func_get_arg($a);
-
-	$wp_filter[ $tag ]->do_action( $args );
-
-	array_pop($wp_current_filter);
-}
-
-/**
- * Retrieve the number of times an action is fired.
- *
- * @since 2.1.0
- *
- * @global array $wp_actions Increments the amount of times action was triggered.
- *
- * @param string $tag The name of the action hook.
- * @return int The number of times action hook $tag is fired.
- */
-function did_action($tag) {
-	global $wp_actions;
-
-	if ( ! isset( $wp_actions[ $tag ] ) )
-		return 0;
-
-	return $wp_actions[$tag];
-}
-
-/**
- * Execute functions hooked on a specific action hook, specifying arguments in an array.
- *
- * @since 2.1.0
- *
- * @see do_action() This function is identical, but the arguments passed to the
- *                  functions hooked to $tag< are supplied using an array.
- * @global array $wp_filter         Stores all of the filters
- * @global array $wp_actions        Increments the amount of times action was triggered.
- * @global array $wp_current_filter Stores the list of current filters with the current one last
- *
- * @param string $tag  The name of the action to be executed.
- * @param array  $args The arguments supplied to the functions hooked to `$tag`.
- */
-function do_action_ref_array($tag, $args) {
-	global $wp_filter, $wp_actions, $wp_current_filter;
-
-	if ( ! isset($wp_actions[$tag]) )
-		$wp_actions[$tag] = 1;
-	else
-		++$wp_actions[$tag];
-
-	// Do 'all' actions first
-	if ( isset($wp_filter['all']) ) {
-		$wp_current_filter[] = $tag;
-		$all_args = func_get_args();
-		_wp_call_all_hook($all_args);
-	}
-
-	if ( !isset($wp_filter[$tag]) ) {
-		if ( isset($wp_filter['all']) )
-			array_pop($wp_current_filter);
-		return;
-	}
-
-	if ( !isset($wp_filter['all']) )
-		$wp_current_filter[] = $tag;
-
-	$wp_filter[ $tag ]->do_action( $args );
-
-	array_pop($wp_current_filter);
-}
-
-/**
- * Check if any action has been registered for a hook.
- *
- * @since 2.5.0
- *
- * @see has_filter() has_action() is an alias of has_filter().
- *
- * @param string        $tag               The name of the action hook.
- * @param callable|bool $function_to_check Optional. The callback to check for. Default false.
- * @return bool|int If $function_to_check is omitted, returns boolean for whether the hook has
- *                  anything registered. When checking a specific function, the priority of that
- *                  hook is returned, or false if the function is not attached. When using the
- *                  $function_to_check argument, this function may return a non-boolean value
- *                  that evaluates to false (e.g.) 0, so use the === operator for testing the
- *                  return value.
- */
-function has_action($tag, $function_to_check = false) {
-	return has_filter($tag, $function_to_check);
-}
-
-/**
- * Removes a function from a specified action hook.
- *
- * This function removes a function attached to a specified action hook. This
- * method can be used to remove default functions attached to a specific filter
- * hook and possibly replace them with a substitute.
- *
- * @since 1.2.0
- *
- * @param string   $tag                The action hook to which the function to be removed is hooked.
- * @param callable $function_to_remove The name of the function which should be removed.
- * @param int      $priority           Optional. The priority of the function. Default 10.
- * @return bool Whether the function is removed.
- */
-function remove_action( $tag, $function_to_remove, $priority = 10 ) {
-	return remove_filter( $tag, $function_to_remove, $priority );
-}
-
-/**
- * Remove all of the hooks from an action.
- *
- * @since 2.7.0
- *
- * @param string   $tag      The action to remove hooks from.
- * @param int|bool $priority The priority number to remove them from. Default false.
- * @return true True when finished.
- */
-function remove_all_actions($tag, $priority = false) {
-	return remove_all_filters($tag, $priority);
-}
-
-/**
- * Fires functions attached to a deprecated filter hook.
- *
- * When a filter hook is deprecated, the apply_filters() call is replaced with
- * apply_filters_deprecated(), which triggers a deprecation notice and then fires
- * the original filter hook.
- *
- * @since 4.6.0
- *
- * @see _deprecated_hook()
- *
- * @param string $tag         The name of the filter hook.
- * @param array  $args        Array of additional function arguments to be passed to apply_filters().
- * @param string $version     The version of WordPress that deprecated the hook.
- * @param string $replacement Optional. The hook that should have been used. Default false.
- * @param string $message     Optional. A message regarding the change. Default null.
- */
-function apply_filters_deprecated( $tag, $args, $version, $replacement = false, $message = null ) {
-	if ( ! has_filter( $tag ) ) {
-		return $args[0];
-	}
-
-	_deprecated_hook( $tag, $version, $replacement, $message );
-
-	return apply_filters_ref_array( $tag, $args );
-}
-
-/**
- * Fires functions attached to a deprecated action hook.
- *
- * When an action hook is deprecated, the do_action() call is replaced with
- * do_action_deprecated(), which triggers a deprecation notice and then fires
- * the original hook.
- *
- * @since 4.6.0
- *
- * @see _deprecated_hook()
- *
- * @param string $tag         The name of the action hook.
- * @param array  $args        Array of additional function arguments to be passed to do_action().
- * @param string $version     The version of WordPress that deprecated the hook.
- * @param string $replacement Optional. The hook that should have been used.
- * @param string $message     Optional. A message regarding the change.
- */
-function do_action_deprecated( $tag, $args, $version, $replacement = false, $message = null ) {
-	if ( ! has_action( $tag ) ) {
-		return;
-	}
-
-	_deprecated_hook( $tag, $version, $replacement, $message );
-
-	do_action_ref_array( $tag, $args );
-}
-
-//
-// Functions for handling plugins.
-//
-
-/**
- * Gets the basename of a plugin.
- *
- * This method extracts the name of a plugin from its filename.
- *
- * @since 1.5.0
- *
- * @global array $wp_plugin_paths
- *
- * @param string $file The filename of plugin.
- * @return string The name of a plugin.
- */
-function plugin_basename( $file ) {
-	global $wp_plugin_paths;
-
-	// $wp_plugin_paths contains normalized paths.
-	$file = wp_normalize_path( $file );
-
-	arsort( $wp_plugin_paths );
-	foreach ( $wp_plugin_paths as $dir => $realdir ) {
-		if ( strpos( $file, $realdir ) === 0 ) {
-			$file = $dir . substr( $file, strlen( $realdir ) );
-		}
-	}
-
-	$plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
-	$mu_plugin_dir = wp_normalize_path( WPMU_PLUGIN_DIR );
-
-	$file = preg_replace('#^' . preg_quote($plugin_dir, '#') . '/|^' . preg_quote($mu_plugin_dir, '#') . '/#','',$file); // get relative path from plugins dir
-	$file = trim($file, '/');
-	return $file;
-}
-
-/**
- * Register a plugin's real path.
- *
- * This is used in plugin_basename() to resolve symlinked paths.
- *
- * @since 3.9.0
- *
- * @see wp_normalize_path()
- *
- * @global array $wp_plugin_paths
- *
- * @staticvar string $wp_plugin_path
- * @staticvar string $wpmu_plugin_path
- *
- * @param string $file Known path to the file.
- * @return bool Whether the path was able to be registered.
- */
-function wp_register_plugin_realpath( $file ) {
-	global $wp_plugin_paths;
-
-	// Normalize, but store as static to avoid recalculation of a constant value
-	static $wp_plugin_path = null, $wpmu_plugin_path = null;
-	if ( ! isset( $wp_plugin_path ) ) {
-		$wp_plugin_path   = wp_normalize_path( WP_PLUGIN_DIR   );
-		$wpmu_plugin_path = wp_normalize_path( WPMU_PLUGIN_DIR );
-	}
-
-	$plugin_path = wp_normalize_path( dirname( $file ) );
-	$plugin_realpath = wp_normalize_path( dirname( realpath( $file ) ) );
-
-	if ( $plugin_path === $wp_plugin_path || $plugin_path === $wpmu_plugin_path ) {
-		return false;
-	}
-
-	if ( $plugin_path !== $plugin_realpath ) {
-		$wp_plugin_paths[ $plugin_path ] = $plugin_realpath;
-	}
-
-	return true;
-}
-
-/**
- * Get the filesystem directory path (with trailing slash) for the plugin __FILE__ passed in.
- *
- * @since 2.8.0
- *
- * @param string $file The filename of the plugin (__FILE__).
- * @return string the filesystem path of the directory that contains the plugin.
- */
-function plugin_dir_path( $file ) {
-	return trailingslashit( dirname( $file ) );
-}
-
-/**
- * Get the URL directory path (with trailing slash) for the plugin __FILE__ passed in.
- *
- * @since 2.8.0
- *
- * @param string $file The filename of the plugin (__FILE__).
- * @return string the URL path of the directory that contains the plugin.
- */
-function plugin_dir_url( $file ) {
-	return trailingslashit( plugins_url( '', $file ) );
-}
-
-/**
- * Set the activation hook for a plugin.
- *
- * When a plugin is activated, the action 'activate_PLUGINNAME' hook is
- * called. In the name of this hook, PLUGINNAME is replaced with the name
- * of the plugin, including the optional subdirectory. For example, when the
- * plugin is located in wp-content/plugins/sampleplugin/sample.php, then
- * the name of this hook will become 'activate_sampleplugin/sample.php'.
- *
- * When the plugin consists of only one file and is (as by default) located at
- * wp-content/plugins/sample.php the name of this hook will be
- * 'activate_sample.php'.
- *
- * @since 2.0.0
- *
- * @param string   $file     The filename of the plugin including the path.
- * @param callable $function The function hooked to the 'activate_PLUGIN' action.
- */
-function register_activation_hook($file, $function) {
-	$file = plugin_basename($file);
-	add_action('activate_' . $file, $function);
-}
-
-/**
- * Set the deactivation hook for a plugin.
- *
- * When a plugin is deactivated, the action 'deactivate_PLUGINNAME' hook is
- * called. In the name of this hook, PLUGINNAME is replaced with the name
- * of the plugin, including the optional subdirectory. For example, when the
- * plugin is located in wp-content/plugins/sampleplugin/sample.php, then
- * the name of this hook will become 'deactivate_sampleplugin/sample.php'.
- *
- * When the plugin consists of only one file and is (as by default) located at
- * wp-content/plugins/sample.php the name of this hook will be
- * 'deactivate_sample.php'.
- *
- * @since 2.0.0
- *
- * @param string   $file     The filename of the plugin including the path.
- * @param callable $function The function hooked to the 'deactivate_PLUGIN' action.
- */
-function register_deactivation_hook($file, $function) {
-	$file = plugin_basename($file);
-	add_action('deactivate_' . $file, $function);
-}
-
-/**
- * Set the uninstallation hook for a plugin.
- *
- * Registers the uninstall hook that will be called when the user clicks on the
- * uninstall link that calls for the plugin to uninstall itself. The link won't
- * be active unless the plugin hooks into the action.
- *
- * The plugin should not run arbitrary code outside of functions, when
- * registering the uninstall hook. In order to run using the hook, the plugin
- * will have to be included, which means that any code laying outside of a
- * function will be run during the uninstall process. The plugin should not
- * hinder the uninstall process.
- *
- * If the plugin can not be written without running code within the plugin, then
- * the plugin should create a file named 'uninstall.php' in the base plugin
- * folder. This file will be called, if it exists, during the uninstall process
- * bypassing the uninstall hook. The plugin, when using the 'uninstall.php'
- * should always check for the 'WP_UNINSTALL_PLUGIN' constant, before
- * executing.
- *
- * @since 2.7.0
- *
- * @param string   $file     Plugin file.
- * @param callable $callback The callback to run when the hook is called. Must be
- *                           a static method or function.
- */
-function register_uninstall_hook( $file, $callback ) {
-	if ( is_array( $callback ) && is_object( $callback[0] ) ) {
-		_doing_it_wrong( __FUNCTION__, __( 'Only a static class method or function can be used in an uninstall hook.' ), '3.1.0' );
-		return;
-	}
-
-	/*
-	 * The option should not be autoloaded, because it is not needed in most
-	 * cases. Emphasis should be put on using the 'uninstall.php' way of
-	 * uninstalling the plugin.
-	 */
-	$uninstallable_plugins = (array) get_option('uninstall_plugins');
-	$uninstallable_plugins[plugin_basename($file)] = $callback;
-
-	update_option('uninstall_plugins', $uninstallable_plugins);
-}
-
-/**
- * Call the 'all' hook, which will process the functions hooked into it.
- *
- * The 'all' hook passes all of the arguments or parameters that were used for
- * the hook, which this function was called for.
- *
- * This function is used internally for apply_filters(), do_action(), and
- * do_action_ref_array() and is not meant to be used from outside those
- * functions. This function does not check for the existence of the all hook, so
- * it will fail unless the all hook exists prior to this function call.
- *
- * @since 2.5.0
- * @access private
- *
- * @global array $wp_filter  Stores all of the filters
- *
- * @param array $args The collected parameters from the hook that was called.
- */
-function _wp_call_all_hook($args) {
-	global $wp_filter;
-
-	$wp_filter['all']->do_all_hook( $args );
-}
-
-/**
- * Build Unique ID for storage and retrieval.
- *
- * The old way to serialize the callback caused issues and this function is the
- * solution. It works by checking for objects and creating a new property in
- * the class to keep track of the object and new objects of the same class that
- * need to be added.
- *
- * It also allows for the removal of actions and filters for objects after they
- * change class properties. It is possible to include the property $wp_filter_id
- * in your class and set it to "null" or a number to bypass the workaround.
- * However this will prevent you from adding new classes and any new classes
- * will overwrite the previous hook by the same class.
- *
- * Functions and static method callbacks are just returned as strings and
- * shouldn't have any speed penalty.
- *
- * @link https://core.trac.wordpress.org/ticket/3875
- *
- * @since 2.2.3
- * @access private
- *
- * @global array $wp_filter Storage for all of the filters and actions.
- * @staticvar int $filter_id_count
- *
- * @param string   $tag      Used in counting how many hooks were applied
- * @param callable $function Used for creating unique id
- * @param int|bool $priority Used in counting how many hooks were applied. If === false
- *                           and $function is an object reference, we return the unique
- *                           id only if it already has one, false otherwise.
- * @return string|false Unique ID for usage as array key or false if $priority === false
- *                      and $function is an object reference, and it does not already have
- *                      a unique id.
- */
-function _wp_filter_build_unique_id($tag, $function, $priority) {
-	global $wp_filter;
-	static $filter_id_count = 0;
-
-	if ( is_string($function) )
-		return $function;
-
-	if ( is_object($function) ) {
-		// Closures are currently implemented as objects
-		$function = array( $function, '' );
-	} else {
-		$function = (array) $function;
-	}
-
-	if (is_object($function[0]) ) {
-		// Object Class Calling
-		if ( function_exists('spl_object_hash') ) {
-			return spl_object_hash($function[0]) . $function[1];
-		} else {
-			$obj_idx = get_class($function[0]).$function[1];
-			if ( !isset($function[0]->wp_filter_id) ) {
-				if ( false === $priority )
-					return false;
-				$obj_idx .= isset($wp_filter[$tag][$priority]) ? count((array)$wp_filter[$tag][$priority]) : $filter_id_count;
-				$function[0]->wp_filter_id = $filter_id_count;
-				++$filter_id_count;
-			} else {
-				$obj_idx .= $function[0]->wp_filter_id;
-			}
-
-			return $obj_idx;
-		}
-	} elseif ( is_string( $function[0] ) ) {
-		// Static Calling
-		return $function[0] . '::' . $function[1];
-	}
-}
Index: www/wp-includes/customize/class-wp-customize-theme-control.php
===================================================================
--- www/wp-includes/customize/class-wp-customize-theme-control.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Theme_Control.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/pomo/streams.php
===================================================================
--- www/wp-includes/pomo/streams.php	(revision 38565)
+++ www/wp-includes/autoload/pomo/POMO_CachedIntFileReader.php	(revision )
@@ -8,294 +8,9 @@
  * @subpackage streams
  */
 
-if ( ! class_exists( 'POMO_Reader', false ) ):
-class POMO_Reader {
-
-	var $endian = 'little';
-	var $_post = '';
-
-	/**
+/**
-	 * PHP5 constructor.
-	 */
-	function __construct() {
-		$this->is_overloaded = ((ini_get("mbstring.func_overload") & 2) != 0) && function_exists('mb_substr');
-		$this->_pos = 0;
-	}
-
-	/**
-	 * PHP4 constructor.
-	 */
-	public function POMO_Reader() {
-		self::__construct();
-	}
-
-	/**
-	 * Sets the endianness of the file.
-	 *
-	 * @param $endian string 'big' or 'little'
-	 */
-	function setEndian($endian) {
-		$this->endian = $endian;
-	}
-
-	/**
-	 * Reads a 32bit Integer from the Stream
-	 *
-	 * @return mixed The integer, corresponding to the next 32 bits from
-	 * 	the stream of false if there are not enough bytes or on error
-	 */
-	function readint32() {
-		$bytes = $this->read(4);
-		if (4 != $this->strlen($bytes))
-			return false;
-		$endian_letter = ('big' == $this->endian)? 'N' : 'V';
-		$int = unpack($endian_letter, $bytes);
-		return reset( $int );
-	}
-
-	/**
-	 * Reads an array of 32-bit Integers from the Stream
-	 *
-	 * @param integer count How many elements should be read
-	 * @return mixed Array of integers or false if there isn't
-	 * 	enough data or on error
-	 */
-	function readint32array($count) {
-		$bytes = $this->read(4 * $count);
-		if (4*$count != $this->strlen($bytes))
-			return false;
-		$endian_letter = ('big' == $this->endian)? 'N' : 'V';
-		return unpack($endian_letter.$count, $bytes);
-	}
-
-	/**
-	 * @param string $string
-	 * @param int    $start
-	 * @param int    $length
-	 * @return string
-	 */
-	function substr($string, $start, $length) {
-		if ($this->is_overloaded) {
-			return mb_substr($string, $start, $length, 'ascii');
-		} else {
-			return substr($string, $start, $length);
-		}
-	}
-
-	/**
-	 * @param string $string
-	 * @return int
-	 */
-	function strlen($string) {
-		if ($this->is_overloaded) {
-			return mb_strlen($string, 'ascii');
-		} else {
-			return strlen($string);
-		}
-	}
-
-	/**
-	 * @param string $string
-	 * @param int    $chunk_size
-	 * @return array
-	 */
-	function str_split($string, $chunk_size) {
-		if (!function_exists('str_split')) {
-			$length = $this->strlen($string);
-			$out = array();
-			for ($i = 0; $i < $length; $i += $chunk_size)
-				$out[] = $this->substr($string, $i, $chunk_size);
-			return $out;
-		} else {
-			return str_split( $string, $chunk_size );
-		}
-	}
-
-	/**
-	 * @return int
-	 */
-	function pos() {
-		return $this->_pos;
-	}
-
-	/**
-	 * @return true
-	 */
-	function is_resource() {
-		return true;
-	}
-
-	/**
-	 * @return true
-	 */
-	function close() {
-		return true;
-	}
-}
-endif;
-
-if ( ! class_exists( 'POMO_FileReader', false ) ):
-class POMO_FileReader extends POMO_Reader {
-
-	/**
-	 * @param string $filename
-	 */
-	function __construct( $filename ) {
-		parent::POMO_Reader();
-		$this->_f = fopen($filename, 'rb');
-	}
-
-	/**
-	 * PHP4 constructor.
-	 */
-	public function POMO_FileReader( $filename ) {
-		self::__construct( $filename );
-	}
-
-	/**
-	 * @param int $bytes
-	 */
-	function read($bytes) {
-		return fread($this->_f, $bytes);
-	}
-
-	/**
-	 * @param int $pos
-	 * @return boolean
-	 */
-	function seekto($pos) {
-		if ( -1 == fseek($this->_f, $pos, SEEK_SET)) {
-			return false;
-		}
-		$this->_pos = $pos;
-		return true;
-	}
-
-	/**
-	 * @return bool
-	 */
-	function is_resource() {
-		return is_resource($this->_f);
-	}
-
-	/**
-	 * @return bool
-	 */
-	function feof() {
-		return feof($this->_f);
-	}
-
-	/**
-	 * @return bool
-	 */
-	function close() {
-		return fclose($this->_f);
-	}
-
-	/**
-	 * @return string
-	 */
-	function read_all() {
-		$all = '';
-		while ( !$this->feof() )
-			$all .= $this->read(4096);
-		return $all;
-	}
-}
-endif;
-
-if ( ! class_exists( 'POMO_StringReader', false ) ):
-/**
- * Provides file-like methods for manipulating a string instead
- * of a physical file.
- */
-class POMO_StringReader extends POMO_Reader {
-
-	var $_str = '';
-
-	/**
-	 * PHP5 constructor.
-	 */
-	function __construct( $str = '' ) {
-		parent::POMO_Reader();
-		$this->_str = $str;
-		$this->_pos = 0;
-	}
-
-	/**
-	 * PHP4 constructor.
-	 */
-	public function POMO_StringReader( $str = '' ) {
-		self::__construct( $str );
-	}
-
-	/**
-	 * @param string $bytes
-	 * @return string
-	 */
-	function read($bytes) {
-		$data = $this->substr($this->_str, $this->_pos, $bytes);
-		$this->_pos += $bytes;
-		if ($this->strlen($this->_str) < $this->_pos) $this->_pos = $this->strlen($this->_str);
-		return $data;
-	}
-
-	/**
-	 * @param int $pos
-	 * @return int
-	 */
-	function seekto($pos) {
-		$this->_pos = $pos;
-		if ($this->strlen($this->_str) < $this->_pos) $this->_pos = $this->strlen($this->_str);
-		return $this->_pos;
-	}
-
-	/**
-	 * @return int
-	 */
-	function length() {
-		return $this->strlen($this->_str);
-	}
-
-	/**
-	 * @return string
-	 */
-	function read_all() {
-		return $this->substr($this->_str, $this->_pos, $this->strlen($this->_str));
-	}
-
-}
-endif;
-
-if ( ! class_exists( 'POMO_CachedFileReader', false ) ):
-/**
  * Reads the contents of the file in the beginning.
  */
-class POMO_CachedFileReader extends POMO_StringReader {
-	/**
-	 * PHP5 constructor.
-	 */
-	function __construct( $filename ) {
-		parent::POMO_StringReader();
-		$this->_str = file_get_contents($filename);
-		if (false === $this->_str)
-			return false;
-		$this->_pos = 0;
-	}
-
-	/**
-	 * PHP4 constructor.
-	 */
-	public function POMO_CachedFileReader( $filename ) {
-		self::__construct( $filename );
-	}
-}
-endif;
-
-if ( ! class_exists( 'POMO_CachedIntFileReader', false ) ):
-/**
- * Reads the contents of the file in the beginning.
- */
 class POMO_CachedIntFileReader extends POMO_CachedFileReader {
 	/**
 	 * PHP5 constructor.
@@ -311,5 +26,4 @@
 		self::__construct( $filename );
 	}
 }
-endif;
 
Index: www/wp-includes/autoload/requests/Transport/cURL.php
===================================================================
--- www/wp-includes/autoload/requests/Transport/cURL.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Transport/cURL.php	(revision UNDEFINED)
@@ -1,541 +0,0 @@
-<?php
-/**
- * cURL HTTP transport
- *
- * @package Requests
- * @subpackage Transport
- */
-
-/**
- * cURL HTTP transport
- *
- * @package Requests
- * @subpackage Transport
- */
-class Requests_Transport_cURL implements Requests_Transport {
-	const CURL_7_10_5 = 0x070A05;
-	const CURL_7_16_2 = 0x071002;
-
-	/**
-	 * Raw HTTP data
-	 *
-	 * @var string
-	 */
-	public $headers = '';
-
-	/**
-	 * Raw body data
-	 *
-	 * @var string
-	 */
-	public $response_data = '';
-
-	/**
-	 * Information on the current request
-	 *
-	 * @var array cURL information array, see {@see https://secure.php.net/curl_getinfo}
-	 */
-	public $info;
-
-	/**
-	 * Version string
-	 *
-	 * @var long
-	 */
-	public $version;
-
-	/**
-	 * cURL handle
-	 *
-	 * @var resource
-	 */
-	protected $handle;
-
-	/**
-	 * Hook dispatcher instance
-	 *
-	 * @var Requests_Hooks
-	 */
-	protected $hooks;
-
-	/**
-	 * Have we finished the headers yet?
-	 *
-	 * @var boolean
-	 */
-	protected $done_headers = false;
-
-	/**
-	 * If streaming to a file, keep the file pointer
-	 *
-	 * @var resource
-	 */
-	protected $stream_handle;
-
-	/**
-	 * How many bytes are in the response body?
-	 *
-	 * @var int
-	 */
-	protected $response_bytes;
-
-	/**
-	 * What's the maximum number of bytes we should keep?
-	 *
-	 * @var int|bool Byte count, or false if no limit.
-	 */
-	protected $response_byte_limit;
-
-	/**
-	 * Constructor
-	 */
-	public function __construct() {
-		$curl = curl_version();
-		$this->version = $curl['version_number'];
-		$this->handle = curl_init();
-
-		curl_setopt($this->handle, CURLOPT_HEADER, false);
-		curl_setopt($this->handle, CURLOPT_RETURNTRANSFER, 1);
-		if ($this->version >= self::CURL_7_10_5) {
-			curl_setopt($this->handle, CURLOPT_ENCODING, '');
-		}
-		if (defined('CURLOPT_PROTOCOLS')) {
-			curl_setopt($this->handle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
-		}
-		if (defined('CURLOPT_REDIR_PROTOCOLS')) {
-			curl_setopt($this->handle, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
-		}
-	}
-
-	/**
-	 * Destructor
-	 */
-	public function __destruct() {
-		if (is_resource($this->handle)) {
-			curl_close($this->handle);
-		}
-	}
-
-	/**
-	 * Perform a request
-	 *
-	 * @throws Requests_Exception On a cURL error (`curlerror`)
-	 *
-	 * @param string $url URL to request
-	 * @param array $headers Associative array of request headers
-	 * @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD
-	 * @param array $options Request options, see {@see Requests::response()} for documentation
-	 * @return string Raw HTTP result
-	 */
-	public function request($url, $headers = array(), $data = array(), $options = array()) {
-		$this->hooks = $options['hooks'];
-
-		$this->setup_handle($url, $headers, $data, $options);
-
-		$options['hooks']->dispatch('curl.before_send', array(&$this->handle));
-
-		if ($options['filename'] !== false) {
-			$this->stream_handle = fopen($options['filename'], 'wb');
-		}
-
-		$this->response_data = '';
-		$this->response_bytes = 0;
-		$this->response_byte_limit = false;
-		if ($options['max_bytes'] !== false) {
-			$this->response_byte_limit = $options['max_bytes'];
-		}
-
-		if (isset($options['verify'])) {
-			if ($options['verify'] === false) {
-				curl_setopt($this->handle, CURLOPT_SSL_VERIFYHOST, 0);
-				curl_setopt($this->handle, CURLOPT_SSL_VERIFYPEER, 0);
-			}
-			elseif (is_string($options['verify'])) {
-				curl_setopt($this->handle, CURLOPT_CAINFO, $options['verify']);
-			}
-		}
-
-		if (isset($options['verifyname']) && $options['verifyname'] === false) {
-			curl_setopt($this->handle, CURLOPT_SSL_VERIFYHOST, 0);
-		}
-
-		curl_exec($this->handle);
-		$response = $this->response_data;
-
-		$options['hooks']->dispatch('curl.after_send', array());
-
-		if (curl_errno($this->handle) === 23 || curl_errno($this->handle) === 61) {
-			// Reset encoding and try again
-			curl_setopt($this->handle, CURLOPT_ENCODING, 'none');
-
-			$this->response_data = '';
-			$this->response_bytes = 0;
-			curl_exec($this->handle);
-			$response = $this->response_data;
-		}
-
-		$this->process_response($response, $options);
-
-		// Need to remove the $this reference from the curl handle.
-		// Otherwise Requests_Transport_cURL wont be garbage collected and the curl_close() will never be called.
-		curl_setopt($this->handle, CURLOPT_HEADERFUNCTION, null);
-		curl_setopt($this->handle, CURLOPT_WRITEFUNCTION, null);
-
-		return $this->headers;
-	}
-
-	/**
-	 * Send multiple requests simultaneously
-	 *
-	 * @param array $requests Request data
-	 * @param array $options Global options
-	 * @return array Array of Requests_Response objects (may contain Requests_Exception or string responses as well)
-	 */
-	public function request_multiple($requests, $options) {
-		// If you're not requesting, we can't get any responses ¯\_(ツ)_/¯
-		if (empty($requests)) {
-			return array();
-		}
-
-		$multihandle = curl_multi_init();
-		$subrequests = array();
-		$subhandles = array();
-
-		$class = get_class($this);
-		foreach ($requests as $id => $request) {
-			$subrequests[$id] = new $class();
-			$subhandles[$id] = $subrequests[$id]->get_subrequest_handle($request['url'], $request['headers'], $request['data'], $request['options']);
-			$request['options']['hooks']->dispatch('curl.before_multi_add', array(&$subhandles[$id]));
-			curl_multi_add_handle($multihandle, $subhandles[$id]);
-		}
-
-		$completed = 0;
-		$responses = array();
-
-		$request['options']['hooks']->dispatch('curl.before_multi_exec', array(&$multihandle));
-
-		do {
-			$active = false;
-
-			do {
-				$status = curl_multi_exec($multihandle, $active);
-			}
-			while ($status === CURLM_CALL_MULTI_PERFORM);
-
-			$to_process = array();
-
-			// Read the information as needed
-			while ($done = curl_multi_info_read($multihandle)) {
-				$key = array_search($done['handle'], $subhandles, true);
-				if (!isset($to_process[$key])) {
-					$to_process[$key] = $done;
-				}
-			}
-
-			// Parse the finished requests before we start getting the new ones
-			foreach ($to_process as $key => $done) {
-				$options = $requests[$key]['options'];
-				if (CURLE_OK !== $done['result']) {
-					//get error string for handle.
-					$reason = curl_error($done['handle']);
-					$exception = new Requests_Exception_Transport_cURL(
-									$reason,
-									Requests_Exception_Transport_cURL::EASY,
-									$done['handle'],
-									$done['result']
-								);
-					$responses[$key] = $exception;
-					$options['hooks']->dispatch('transport.internal.parse_error', array(&$responses[$key], $requests[$key]));
-				}
-				else {
-					$responses[$key] = $subrequests[$key]->process_response($subrequests[$key]->response_data, $options);
-
-					$options['hooks']->dispatch('transport.internal.parse_response', array(&$responses[$key], $requests[$key]));
-				}
-
-				curl_multi_remove_handle($multihandle, $done['handle']);
-				curl_close($done['handle']);
-
-				if (!is_string($responses[$key])) {
-					$options['hooks']->dispatch('multiple.request.complete', array(&$responses[$key], $key));
-				}
-				$completed++;
-			}
-		}
-		while ($active || $completed < count($subrequests));
-
-		$request['options']['hooks']->dispatch('curl.after_multi_exec', array(&$multihandle));
-
-		curl_multi_close($multihandle);
-
-		return $responses;
-	}
-
-	/**
-	 * Get the cURL handle for use in a multi-request
-	 *
-	 * @param string $url URL to request
-	 * @param array $headers Associative array of request headers
-	 * @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD
-	 * @param array $options Request options, see {@see Requests::response()} for documentation
-	 * @return resource Subrequest's cURL handle
-	 */
-	public function &get_subrequest_handle($url, $headers, $data, $options) {
-		$this->setup_handle($url, $headers, $data, $options);
-
-		if ($options['filename'] !== false) {
-			$this->stream_handle = fopen($options['filename'], 'wb');
-		}
-
-		$this->response_data = '';
-		$this->response_bytes = 0;
-		$this->response_byte_limit = false;
-		if ($options['max_bytes'] !== false) {
-			$this->response_byte_limit = $options['max_bytes'];
-		}
-		$this->hooks = $options['hooks'];
-
-		return $this->handle;
-	}
-
-	/**
-	 * Setup the cURL handle for the given data
-	 *
-	 * @param string $url URL to request
-	 * @param array $headers Associative array of request headers
-	 * @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD
-	 * @param array $options Request options, see {@see Requests::response()} for documentation
-	 */
-	protected function setup_handle($url, $headers, $data, $options) {
-		$options['hooks']->dispatch('curl.before_request', array(&$this->handle));
-
-		// Force closing the connection for old versions of cURL (<7.22).
-		if ( ! isset( $headers['Connection'] ) ) {
-			$headers['Connection'] = 'close';
-		}
-
-		$headers = Requests::flatten($headers);
-
-		if (!empty($data)) {
-			$data_format = $options['data_format'];
-
-			if ($data_format === 'query') {
-				$url = self::format_get($url, $data);
-				$data = '';
-			}
-			elseif (!is_string($data)) {
-				$data = http_build_query($data, null, '&');
-			}
-		}
-
-		switch ($options['type']) {
-			case Requests::POST:
-				curl_setopt($this->handle, CURLOPT_POST, true);
-				curl_setopt($this->handle, CURLOPT_POSTFIELDS, $data);
-				break;
-			case Requests::HEAD:
-				curl_setopt($this->handle, CURLOPT_CUSTOMREQUEST, $options['type']);
-				curl_setopt($this->handle, CURLOPT_NOBODY, true);
-				break;
-			case Requests::TRACE:
-				curl_setopt($this->handle, CURLOPT_CUSTOMREQUEST, $options['type']);
-				break;
-			case Requests::PATCH:
-			case Requests::PUT:
-			case Requests::DELETE:
-			case Requests::OPTIONS:
-			default:
-				curl_setopt($this->handle, CURLOPT_CUSTOMREQUEST, $options['type']);
-				if (!empty($data)) {
-					curl_setopt($this->handle, CURLOPT_POSTFIELDS, $data);
-				}
-		}
-
-		// cURL requires a minimum timeout of 1 second when using the system
-		// DNS resolver, as it uses `alarm()`, which is second resolution only.
-		// There's no way to detect which DNS resolver is being used from our
-		// end, so we need to round up regardless of the supplied timeout.
-		//
-		// https://github.com/curl/curl/blob/4f45240bc84a9aa648c8f7243be7b79e9f9323a5/lib/hostip.c#L606-L609
-		$timeout = max($options['timeout'], 1);
-
-		if (is_int($timeout) || $this->version < self::CURL_7_16_2) {
-			curl_setopt($this->handle, CURLOPT_TIMEOUT, ceil($timeout));
-		}
-		else {
-			curl_setopt($this->handle, CURLOPT_TIMEOUT_MS, round($timeout * 1000));
-		}
-
-		if (is_int($options['connect_timeout']) || $this->version < self::CURL_7_16_2) {
-			curl_setopt($this->handle, CURLOPT_CONNECTTIMEOUT, ceil($options['connect_timeout']));
-		}
-		else {
-			curl_setopt($this->handle, CURLOPT_CONNECTTIMEOUT_MS, round($options['connect_timeout'] * 1000));
-		}
-		curl_setopt($this->handle, CURLOPT_URL, $url);
-		curl_setopt($this->handle, CURLOPT_REFERER, $url);
-		curl_setopt($this->handle, CURLOPT_USERAGENT, $options['useragent']);
-		curl_setopt($this->handle, CURLOPT_HTTPHEADER, $headers);
-
-		if ($options['protocol_version'] === 1.1) {
-			curl_setopt($this->handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
-		}
-		else {
-			curl_setopt($this->handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
-		}
-
-		if (true === $options['blocking']) {
-			curl_setopt($this->handle, CURLOPT_HEADERFUNCTION, array(&$this, 'stream_headers'));
-			curl_setopt($this->handle, CURLOPT_WRITEFUNCTION, array(&$this, 'stream_body'));
-			curl_setopt($this->handle, CURLOPT_BUFFERSIZE, Requests::BUFFER_SIZE);
-		}
-	}
-
-	/**
-	 * Process a response
-	 *
-	 * @param string $response Response data from the body
-	 * @param array $options Request options
-	 * @return string HTTP response data including headers
-	 */
-	public function process_response($response, $options) {
-		if ($options['blocking'] === false) {
-			$fake_headers = '';
-			$options['hooks']->dispatch('curl.after_request', array(&$fake_headers));
-			return false;
-		}
-		if ($options['filename'] !== false) {
-			fclose($this->stream_handle);
-			$this->headers = trim($this->headers);
-		}
-		else {
-			$this->headers .= $response;
-		}
-
-		if (curl_errno($this->handle)) {
-			$error = sprintf(
-				'cURL error %s: %s',
-				curl_errno($this->handle),
-				curl_error($this->handle)
-			);
-			throw new Requests_Exception($error, 'curlerror', $this->handle);
-		}
-		$this->info = curl_getinfo($this->handle);
-
-		$options['hooks']->dispatch('curl.after_request', array(&$this->headers, &$this->info));
-		return $this->headers;
-	}
-
-	/**
-	 * Collect the headers as they are received
-	 *
-	 * @param resource $handle cURL resource
-	 * @param string $headers Header string
-	 * @return integer Length of provided header
-	 */
-	public function stream_headers($handle, $headers) {
-		// Why do we do this? cURL will send both the final response and any
-		// interim responses, such as a 100 Continue. We don't need that.
-		// (We may want to keep this somewhere just in case)
-		if ($this->done_headers) {
-			$this->headers = '';
-			$this->done_headers = false;
-		}
-		$this->headers .= $headers;
-
-		if ($headers === "\r\n") {
-			$this->done_headers = true;
-		}
-		return strlen($headers);
-	}
-
-	/**
-	 * Collect data as it's received
-	 *
-	 * @since 1.6.1
-	 *
-	 * @param resource $handle cURL resource
-	 * @param string $data Body data
-	 * @return integer Length of provided data
-	 */
-	protected function stream_body($handle, $data) {
-		$this->hooks->dispatch('request.progress', array($data, $this->response_bytes, $this->response_byte_limit));
-		$data_length = strlen($data);
-
-		// Are we limiting the response size?
-		if ($this->response_byte_limit) {
-			if ($this->response_bytes === $this->response_byte_limit) {
-				// Already at maximum, move on
-				return $data_length;
-			}
-
-			if (($this->response_bytes + $data_length) > $this->response_byte_limit) {
-				// Limit the length
-				$limited_length = ($this->response_byte_limit - $this->response_bytes);
-				$data = substr($data, 0, $limited_length);
-			}
-		}
-
-		if ($this->stream_handle) {
-			fwrite($this->stream_handle, $data);
-		}
-		else {
-			$this->response_data .= $data;
-		}
-
-		$this->response_bytes += strlen($data);
-		return $data_length;
-	}
-
-	/**
-	 * Format a URL given GET data
-	 *
-	 * @param string $url
-	 * @param array|object $data Data to build query using, see {@see https://secure.php.net/http_build_query}
-	 * @return string URL with data
-	 */
-	protected static function format_get($url, $data) {
-		if (!empty($data)) {
-			$url_parts = parse_url($url);
-			if (empty($url_parts['query'])) {
-				$query = $url_parts['query'] = '';
-			}
-			else {
-				$query = $url_parts['query'];
-			}
-
-			$query .= '&' . http_build_query($data, null, '&');
-			$query = trim($query, '&');
-
-			if (empty($url_parts['query'])) {
-				$url .= '?' . $query;
-			}
-			else {
-				$url = str_replace($url_parts['query'], $query, $url);
-			}
-		}
-		return $url;
-	}
-
-	/**
-	 * Whether this transport is valid
-	 *
-	 * @codeCoverageIgnore
-	 * @return boolean True if the transport is valid, false otherwise.
-	 */
-	public static function test($capabilities = array()) {
-		if (!function_exists('curl_init') || !function_exists('curl_exec')) {
-			return false;
-		}
-
-		// If needed, check that our installed curl version supports SSL
-		if (isset($capabilities['ssl']) && $capabilities['ssl']) {
-			$curl_version = curl_version();
-			if (!(CURL_VERSION_SSL & $curl_version['features'])) {
-				return false;
-			}
-		}
-
-		return true;
-	}
-}
Index: www/wp-includes/autoload/id3/ID3/module.tag.id3v2.php
===================================================================
--- www/wp-includes/autoload/id3/ID3/module.tag.id3v2.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/id3/ID3/module.tag.id3v2.php	(revision UNDEFINED)
@@ -1,3627 +0,0 @@
-<?php
-/////////////////////////////////////////////////////////////////
-/// getID3() by James Heinrich <info@getid3.org>               //
-//  available at http://getid3.sourceforge.net                 //
-//            or http://www.getid3.org                         //
-//          also https://github.com/JamesHeinrich/getID3       //
-/////////////////////////////////////////////////////////////////
-// See readme.txt for more details                             //
-/////////////////////////////////////////////////////////////////
-///                                                            //
-// module.tag.id3v2.php                                        //
-// module for analyzing ID3v2 tags                             //
-// dependencies: module.tag.id3v1.php                          //
-//                                                            ///
-/////////////////////////////////////////////////////////////////
-
-getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.tag.id3v1.php', __FILE__, true);
-
-class getid3_id3v2 extends getid3_handler
-{
-	public $StartingOffset = 0;
-
-	public function Analyze() {
-		$info = &$this->getid3->info;
-
-		//    Overall tag structure:
-		//        +-----------------------------+
-		//        |      Header (10 bytes)      |
-		//        +-----------------------------+
-		//        |       Extended Header       |
-		//        | (variable length, OPTIONAL) |
-		//        +-----------------------------+
-		//        |   Frames (variable length)  |
-		//        +-----------------------------+
-		//        |           Padding           |
-		//        | (variable length, OPTIONAL) |
-		//        +-----------------------------+
-		//        | Footer (10 bytes, OPTIONAL) |
-		//        +-----------------------------+
-
-		//    Header
-		//        ID3v2/file identifier      "ID3"
-		//        ID3v2 version              $04 00
-		//        ID3v2 flags                (%ab000000 in v2.2, %abc00000 in v2.3, %abcd0000 in v2.4.x)
-		//        ID3v2 size             4 * %0xxxxxxx
-
-
-		// shortcuts
-		$info['id3v2']['header'] = true;
-		$thisfile_id3v2                  = &$info['id3v2'];
-		$thisfile_id3v2['flags']         =  array();
-		$thisfile_id3v2_flags            = &$thisfile_id3v2['flags'];
-
-
-		$this->fseek($this->StartingOffset);
-		$header = $this->fread(10);
-		if (substr($header, 0, 3) == 'ID3'  &&  strlen($header) == 10) {
-
-			$thisfile_id3v2['majorversion'] = ord($header{3});
-			$thisfile_id3v2['minorversion'] = ord($header{4});
-
-			// shortcut
-			$id3v2_majorversion = &$thisfile_id3v2['majorversion'];
-
-		} else {
-
-			unset($info['id3v2']);
-			return false;
-
-		}
-
-		if ($id3v2_majorversion > 4) { // this script probably won't correctly parse ID3v2.5.x and above (if it ever exists)
-
-			$info['error'][] = 'this script only parses up to ID3v2.4.x - this tag is ID3v2.'.$id3v2_majorversion.'.'.$thisfile_id3v2['minorversion'];
-			return false;
-
-		}
-
-		$id3_flags = ord($header{5});
-		switch ($id3v2_majorversion) {
-			case 2:
-				// %ab000000 in v2.2
-				$thisfile_id3v2_flags['unsynch']     = (bool) ($id3_flags & 0x80); // a - Unsynchronisation
-				$thisfile_id3v2_flags['compression'] = (bool) ($id3_flags & 0x40); // b - Compression
-				break;
-
-			case 3:
-				// %abc00000 in v2.3
-				$thisfile_id3v2_flags['unsynch']     = (bool) ($id3_flags & 0x80); // a - Unsynchronisation
-				$thisfile_id3v2_flags['exthead']     = (bool) ($id3_flags & 0x40); // b - Extended header
-				$thisfile_id3v2_flags['experim']     = (bool) ($id3_flags & 0x20); // c - Experimental indicator
-				break;
-
-			case 4:
-				// %abcd0000 in v2.4
-				$thisfile_id3v2_flags['unsynch']     = (bool) ($id3_flags & 0x80); // a - Unsynchronisation
-				$thisfile_id3v2_flags['exthead']     = (bool) ($id3_flags & 0x40); // b - Extended header
-				$thisfile_id3v2_flags['experim']     = (bool) ($id3_flags & 0x20); // c - Experimental indicator
-				$thisfile_id3v2_flags['isfooter']    = (bool) ($id3_flags & 0x10); // d - Footer present
-				break;
-		}
-
-		$thisfile_id3v2['headerlength'] = getid3_lib::BigEndian2Int(substr($header, 6, 4), 1) + 10; // length of ID3v2 tag in 10-byte header doesn't include 10-byte header length
-
-		$thisfile_id3v2['tag_offset_start'] = $this->StartingOffset;
-		$thisfile_id3v2['tag_offset_end']   = $thisfile_id3v2['tag_offset_start'] + $thisfile_id3v2['headerlength'];
-
-
-
-		// create 'encoding' key - used by getid3::HandleAllTags()
-		// in ID3v2 every field can have it's own encoding type
-		// so force everything to UTF-8 so it can be handled consistantly
-		$thisfile_id3v2['encoding'] = 'UTF-8';
-
-
-	//    Frames
-
-	//        All ID3v2 frames consists of one frame header followed by one or more
-	//        fields containing the actual information. The header is always 10
-	//        bytes and laid out as follows:
-	//
-	//        Frame ID      $xx xx xx xx  (four characters)
-	//        Size      4 * %0xxxxxxx
-	//        Flags         $xx xx
-
-		$sizeofframes = $thisfile_id3v2['headerlength'] - 10; // not including 10-byte initial header
-		if (!empty($thisfile_id3v2['exthead']['length'])) {
-			$sizeofframes -= ($thisfile_id3v2['exthead']['length'] + 4);
-		}
-		if (!empty($thisfile_id3v2_flags['isfooter'])) {
-			$sizeofframes -= 10; // footer takes last 10 bytes of ID3v2 header, after frame data, before audio
-		}
-		if ($sizeofframes > 0) {
-
-			$framedata = $this->fread($sizeofframes); // read all frames from file into $framedata variable
-
-			//    if entire frame data is unsynched, de-unsynch it now (ID3v2.3.x)
-			if (!empty($thisfile_id3v2_flags['unsynch']) && ($id3v2_majorversion <= 3)) {
-				$framedata = $this->DeUnsynchronise($framedata);
-			}
-			//        [in ID3v2.4.0] Unsynchronisation [S:6.1] is done on frame level, instead
-			//        of on tag level, making it easier to skip frames, increasing the streamability
-			//        of the tag. The unsynchronisation flag in the header [S:3.1] indicates that
-			//        there exists an unsynchronised frame, while the new unsynchronisation flag in
-			//        the frame header [S:4.1.2] indicates unsynchronisation.
-
-
-			//$framedataoffset = 10 + ($thisfile_id3v2['exthead']['length'] ? $thisfile_id3v2['exthead']['length'] + 4 : 0); // how many bytes into the stream - start from after the 10-byte header (and extended header length+4, if present)
-			$framedataoffset = 10; // how many bytes into the stream - start from after the 10-byte header
-
-
-			//    Extended Header
-			if (!empty($thisfile_id3v2_flags['exthead'])) {
-				$extended_header_offset = 0;
-
-				if ($id3v2_majorversion == 3) {
-
-					// v2.3 definition:
-					//Extended header size  $xx xx xx xx   // 32-bit integer
-					//Extended Flags        $xx xx
-					//     %x0000000 %00000000 // v2.3
-					//     x - CRC data present
-					//Size of padding       $xx xx xx xx
-
-					$thisfile_id3v2['exthead']['length'] = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, 4), 0);
-					$extended_header_offset += 4;
-
-					$thisfile_id3v2['exthead']['flag_bytes'] = 2;
-					$thisfile_id3v2['exthead']['flag_raw'] = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, $thisfile_id3v2['exthead']['flag_bytes']));
-					$extended_header_offset += $thisfile_id3v2['exthead']['flag_bytes'];
-
-					$thisfile_id3v2['exthead']['flags']['crc'] = (bool) ($thisfile_id3v2['exthead']['flag_raw'] & 0x8000);
-
-					$thisfile_id3v2['exthead']['padding_size'] = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, 4));
-					$extended_header_offset += 4;
-
-					if ($thisfile_id3v2['exthead']['flags']['crc']) {
-						$thisfile_id3v2['exthead']['flag_data']['crc'] = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, 4));
-						$extended_header_offset += 4;
-					}
-					$extended_header_offset += $thisfile_id3v2['exthead']['padding_size'];
-
-				} elseif ($id3v2_majorversion == 4) {
-
-					// v2.4 definition:
-					//Extended header size   4 * %0xxxxxxx // 28-bit synchsafe integer
-					//Number of flag bytes       $01
-					//Extended Flags             $xx
-					//     %0bcd0000 // v2.4
-					//     b - Tag is an update
-					//         Flag data length       $00
-					//     c - CRC data present
-					//         Flag data length       $05
-					//         Total frame CRC    5 * %0xxxxxxx
-					//     d - Tag restrictions
-					//         Flag data length       $01
-
-					$thisfile_id3v2['exthead']['length'] = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, 4), true);
-					$extended_header_offset += 4;
-
-					$thisfile_id3v2['exthead']['flag_bytes'] = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, 1)); // should always be 1
-					$extended_header_offset += 1;
-
-					$thisfile_id3v2['exthead']['flag_raw'] = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, $thisfile_id3v2['exthead']['flag_bytes']));
-					$extended_header_offset += $thisfile_id3v2['exthead']['flag_bytes'];
-
-					$thisfile_id3v2['exthead']['flags']['update']       = (bool) ($thisfile_id3v2['exthead']['flag_raw'] & 0x40);
-					$thisfile_id3v2['exthead']['flags']['crc']          = (bool) ($thisfile_id3v2['exthead']['flag_raw'] & 0x20);
-					$thisfile_id3v2['exthead']['flags']['restrictions'] = (bool) ($thisfile_id3v2['exthead']['flag_raw'] & 0x10);
-
-					if ($thisfile_id3v2['exthead']['flags']['update']) {
-						$ext_header_chunk_length = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, 1)); // should be 0
-						$extended_header_offset += 1;
-					}
-
-					if ($thisfile_id3v2['exthead']['flags']['crc']) {
-						$ext_header_chunk_length = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, 1)); // should be 5
-						$extended_header_offset += 1;
-						$thisfile_id3v2['exthead']['flag_data']['crc'] = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, $ext_header_chunk_length), true, false);
-						$extended_header_offset += $ext_header_chunk_length;
-					}
-
-					if ($thisfile_id3v2['exthead']['flags']['restrictions']) {
-						$ext_header_chunk_length = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, 1)); // should be 1
-						$extended_header_offset += 1;
-
-						// %ppqrrstt
-						$restrictions_raw = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, 1));
-						$extended_header_offset += 1;
-						$thisfile_id3v2['exthead']['flags']['restrictions']['tagsize']  = ($restrictions_raw & 0xC0) >> 6; // p - Tag size restrictions
-						$thisfile_id3v2['exthead']['flags']['restrictions']['textenc']  = ($restrictions_raw & 0x20) >> 5; // q - Text encoding restrictions
-						$thisfile_id3v2['exthead']['flags']['restrictions']['textsize'] = ($restrictions_raw & 0x18) >> 3; // r - Text fields size restrictions
-						$thisfile_id3v2['exthead']['flags']['restrictions']['imgenc']   = ($restrictions_raw & 0x04) >> 2; // s - Image encoding restrictions
-						$thisfile_id3v2['exthead']['flags']['restrictions']['imgsize']  = ($restrictions_raw & 0x03) >> 0; // t - Image size restrictions
-
-						$thisfile_id3v2['exthead']['flags']['restrictions_text']['tagsize']  = $this->LookupExtendedHeaderRestrictionsTagSizeLimits($thisfile_id3v2['exthead']['flags']['restrictions']['tagsize']);
-						$thisfile_id3v2['exthead']['flags']['restrictions_text']['textenc']  = $this->LookupExtendedHeaderRestrictionsTextEncodings($thisfile_id3v2['exthead']['flags']['restrictions']['textenc']);
-						$thisfile_id3v2['exthead']['flags']['restrictions_text']['textsize'] = $this->LookupExtendedHeaderRestrictionsTextFieldSize($thisfile_id3v2['exthead']['flags']['restrictions']['textsize']);
-						$thisfile_id3v2['exthead']['flags']['restrictions_text']['imgenc']   = $this->LookupExtendedHeaderRestrictionsImageEncoding($thisfile_id3v2['exthead']['flags']['restrictions']['imgenc']);
-						$thisfile_id3v2['exthead']['flags']['restrictions_text']['imgsize']  = $this->LookupExtendedHeaderRestrictionsImageSizeSize($thisfile_id3v2['exthead']['flags']['restrictions']['imgsize']);
-					}
-
-					if ($thisfile_id3v2['exthead']['length'] != $extended_header_offset) {
-						$info['warning'][] = 'ID3v2.4 extended header length mismatch (expecting '.intval($thisfile_id3v2['exthead']['length']).', found '.intval($extended_header_offset).')';
-					}
-				}
-
-				$framedataoffset += $extended_header_offset;
-				$framedata = substr($framedata, $extended_header_offset);
-			} // end extended header
-
-
-			while (isset($framedata) && (strlen($framedata) > 0)) { // cycle through until no more frame data is left to parse
-				if (strlen($framedata) <= $this->ID3v2HeaderLength($id3v2_majorversion)) {
-					// insufficient room left in ID3v2 header for actual data - must be padding
-					$thisfile_id3v2['padding']['start']  = $framedataoffset;
-					$thisfile_id3v2['padding']['length'] = strlen($framedata);
-					$thisfile_id3v2['padding']['valid']  = true;
-					for ($i = 0; $i < $thisfile_id3v2['padding']['length']; $i++) {
-						if ($framedata{$i} != "\x00") {
-							$thisfile_id3v2['padding']['valid'] = false;
-							$thisfile_id3v2['padding']['errorpos'] = $thisfile_id3v2['padding']['start'] + $i;
-							$info['warning'][] = 'Invalid ID3v2 padding found at offset '.$thisfile_id3v2['padding']['errorpos'].' (the remaining '.($thisfile_id3v2['padding']['length'] - $i).' bytes are considered invalid)';
-							break;
-						}
-					}
-					break; // skip rest of ID3v2 header
-				}
-				if ($id3v2_majorversion == 2) {
-					// Frame ID  $xx xx xx (three characters)
-					// Size      $xx xx xx (24-bit integer)
-					// Flags     $xx xx
-
-					$frame_header = substr($framedata, 0, 6); // take next 6 bytes for header
-					$framedata    = substr($framedata, 6);    // and leave the rest in $framedata
-					$frame_name   = substr($frame_header, 0, 3);
-					$frame_size   = getid3_lib::BigEndian2Int(substr($frame_header, 3, 3), 0);
-					$frame_flags  = 0; // not used for anything in ID3v2.2, just set to avoid E_NOTICEs
-
-				} elseif ($id3v2_majorversion > 2) {
-
-					// Frame ID  $xx xx xx xx (four characters)
-					// Size      $xx xx xx xx (32-bit integer in v2.3, 28-bit synchsafe in v2.4+)
-					// Flags     $xx xx
-
-					$frame_header = substr($framedata, 0, 10); // take next 10 bytes for header
-					$framedata    = substr($framedata, 10);    // and leave the rest in $framedata
-
-					$frame_name = substr($frame_header, 0, 4);
-					if ($id3v2_majorversion == 3) {
-						$frame_size = getid3_lib::BigEndian2Int(substr($frame_header, 4, 4), 0); // 32-bit integer
-					} else { // ID3v2.4+
-						$frame_size = getid3_lib::BigEndian2Int(substr($frame_header, 4, 4), 1); // 32-bit synchsafe integer (28-bit value)
-					}
-
-					if ($frame_size < (strlen($framedata) + 4)) {
-						$nextFrameID = substr($framedata, $frame_size, 4);
-						if ($this->IsValidID3v2FrameName($nextFrameID, $id3v2_majorversion)) {
-							// next frame is OK
-						} elseif (($frame_name == "\x00".'MP3') || ($frame_name == "\x00\x00".'MP') || ($frame_name == ' MP3') || ($frame_name == 'MP3e')) {
-							// MP3ext known broken frames - "ok" for the purposes of this test
-						} elseif (($id3v2_majorversion == 4) && ($this->IsValidID3v2FrameName(substr($framedata, getid3_lib::BigEndian2Int(substr($frame_header, 4, 4), 0), 4), 3))) {
-							$info['warning'][] = 'ID3v2 tag written as ID3v2.4, but with non-synchsafe integers (ID3v2.3 style). Older versions of (Helium2; iTunes) are known culprits of this. Tag has been parsed as ID3v2.3';
-							$id3v2_majorversion = 3;
-							$frame_size = getid3_lib::BigEndian2Int(substr($frame_header, 4, 4), 0); // 32-bit integer
-						}
-					}
-
-
-					$frame_flags = getid3_lib::BigEndian2Int(substr($frame_header, 8, 2));
-				}
-
-				if ((($id3v2_majorversion == 2) && ($frame_name == "\x00\x00\x00")) || ($frame_name == "\x00\x00\x00\x00")) {
-					// padding encountered
-
-					$thisfile_id3v2['padding']['start']  = $framedataoffset;
-					$thisfile_id3v2['padding']['length'] = strlen($frame_header) + strlen($framedata);
-					$thisfile_id3v2['padding']['valid']  = true;
-
-					$len = strlen($framedata);
-					for ($i = 0; $i < $len; $i++) {
-						if ($framedata{$i} != "\x00") {
-							$thisfile_id3v2['padding']['valid'] = false;
-							$thisfile_id3v2['padding']['errorpos'] = $thisfile_id3v2['padding']['start'] + $i;
-							$info['warning'][] = 'Invalid ID3v2 padding found at offset '.$thisfile_id3v2['padding']['errorpos'].' (the remaining '.($thisfile_id3v2['padding']['length'] - $i).' bytes are considered invalid)';
-							break;
-						}
-					}
-					break; // skip rest of ID3v2 header
-				}
-
-				if ($frame_name == 'COM ') {
-					$info['warning'][] = 'error parsing "'.$frame_name.'" ('.$framedataoffset.' bytes into the ID3v2.'.$id3v2_majorversion.' tag). (ERROR: IsValidID3v2FrameName("'.str_replace("\x00", ' ', $frame_name).'", '.$id3v2_majorversion.'))). [Note: this particular error has been known to happen with tags edited by iTunes (versions "X v2.0.3", "v3.0.1" are known-guilty, probably others too)]';
-					$frame_name = 'COMM';
-				}
-				if (($frame_size <= strlen($framedata)) && ($this->IsValidID3v2FrameName($frame_name, $id3v2_majorversion))) {
-
-					unset($parsedFrame);
-					$parsedFrame['frame_name']      = $frame_name;
-					$parsedFrame['frame_flags_raw'] = $frame_flags;
-					$parsedFrame['data']            = substr($framedata, 0, $frame_size);
-					$parsedFrame['datalength']      = getid3_lib::CastAsInt($frame_size);
-					$parsedFrame['dataoffset']      = $framedataoffset;
-
-					$this->ParseID3v2Frame($parsedFrame);
-					$thisfile_id3v2[$frame_name][] = $parsedFrame;
-
-					$framedata = substr($framedata, $frame_size);
-
-				} else { // invalid frame length or FrameID
-
-					if ($frame_size <= strlen($framedata)) {
-
-						if ($this->IsValidID3v2FrameName(substr($framedata, $frame_size, 4), $id3v2_majorversion)) {
-
-							// next frame is valid, just skip the current frame
-							$framedata = substr($framedata, $frame_size);
-							$info['warning'][] = 'Next ID3v2 frame is valid, skipping current frame.';
-
-						} else {
-
-							// next frame is invalid too, abort processing
-							//unset($framedata);
-							$framedata = null;
-							$info['error'][] = 'Next ID3v2 frame is also invalid, aborting processing.';
-
-						}
-
-					} elseif ($frame_size == strlen($framedata)) {
-
-						// this is the last frame, just skip
-						$info['warning'][] = 'This was the last ID3v2 frame.';
-
-					} else {
-
-						// next frame is invalid too, abort processing
-						//unset($framedata);
-						$framedata = null;
-						$info['warning'][] = 'Invalid ID3v2 frame size, aborting.';
-
-					}
-					if (!$this->IsValidID3v2FrameName($frame_name, $id3v2_majorversion)) {
-
-						switch ($frame_name) {
-							case "\x00\x00".'MP':
-							case "\x00".'MP3':
-							case ' MP3':
-							case 'MP3e':
-							case "\x00".'MP':
-							case ' MP':
-							case 'MP3':
-								$info['warning'][] = 'error parsing "'.$frame_name.'" ('.$framedataoffset.' bytes into the ID3v2.'.$id3v2_majorversion.' tag). (ERROR: !IsValidID3v2FrameName("'.str_replace("\x00", ' ', $frame_name).'", '.$id3v2_majorversion.'))). [Note: this particular error has been known to happen with tags edited by "MP3ext (www.mutschler.de/mp3ext/)"]';
-								break;
-
-							default:
-								$info['warning'][] = 'error parsing "'.$frame_name.'" ('.$framedataoffset.' bytes into the ID3v2.'.$id3v2_majorversion.' tag). (ERROR: !IsValidID3v2FrameName("'.str_replace("\x00", ' ', $frame_name).'", '.$id3v2_majorversion.'))).';
-								break;
-						}
-
-					} elseif (!isset($framedata) || ($frame_size > strlen($framedata))) {
-
-						$info['error'][] = 'error parsing "'.$frame_name.'" ('.$framedataoffset.' bytes into the ID3v2.'.$id3v2_majorversion.' tag). (ERROR: $frame_size ('.$frame_size.') > strlen($framedata) ('.(isset($framedata) ? strlen($framedata) : 'null').')).';
-
-					} else {
-
-						$info['error'][] = 'error parsing "'.$frame_name.'" ('.$framedataoffset.' bytes into the ID3v2.'.$id3v2_majorversion.' tag).';
-
-					}
-
-				}
-				$framedataoffset += ($frame_size + $this->ID3v2HeaderLength($id3v2_majorversion));
-
-			}
-
-		}
-
-
-	//    Footer
-
-	//    The footer is a copy of the header, but with a different identifier.
-	//        ID3v2 identifier           "3DI"
-	//        ID3v2 version              $04 00
-	//        ID3v2 flags                %abcd0000
-	//        ID3v2 size             4 * %0xxxxxxx
-
-		if (isset($thisfile_id3v2_flags['isfooter']) && $thisfile_id3v2_flags['isfooter']) {
-			$footer = $this->fread(10);
-			if (substr($footer, 0, 3) == '3DI') {
-				$thisfile_id3v2['footer'] = true;
-				$thisfile_id3v2['majorversion_footer'] = ord($footer{3});
-				$thisfile_id3v2['minorversion_footer'] = ord($footer{4});
-			}
-			if ($thisfile_id3v2['majorversion_footer'] <= 4) {
-				$id3_flags = ord(substr($footer{5}));
-				$thisfile_id3v2_flags['unsynch_footer']  = (bool) ($id3_flags & 0x80);
-				$thisfile_id3v2_flags['extfoot_footer']  = (bool) ($id3_flags & 0x40);
-				$thisfile_id3v2_flags['experim_footer']  = (bool) ($id3_flags & 0x20);
-				$thisfile_id3v2_flags['isfooter_footer'] = (bool) ($id3_flags & 0x10);
-
-				$thisfile_id3v2['footerlength'] = getid3_lib::BigEndian2Int(substr($footer, 6, 4), 1);
-			}
-		} // end footer
-
-		if (isset($thisfile_id3v2['comments']['genre'])) {
-			foreach ($thisfile_id3v2['comments']['genre'] as $key => $value) {
-				unset($thisfile_id3v2['comments']['genre'][$key]);
-				$thisfile_id3v2['comments'] = getid3_lib::array_merge_noclobber($thisfile_id3v2['comments'], array('genre'=>$this->ParseID3v2GenreString($value)));
-			}
-		}
-
-		if (isset($thisfile_id3v2['comments']['track'])) {
-			foreach ($thisfile_id3v2['comments']['track'] as $key => $value) {
-				if (strstr($value, '/')) {
-					list($thisfile_id3v2['comments']['tracknum'][$key], $thisfile_id3v2['comments']['totaltracks'][$key]) = explode('/', $thisfile_id3v2['comments']['track'][$key]);
-				}
-			}
-		}
-
-		if (!isset($thisfile_id3v2['comments']['year']) && !empty($thisfile_id3v2['comments']['recording_time'][0]) && preg_match('#^([0-9]{4})#', trim($thisfile_id3v2['comments']['recording_time'][0]), $matches)) {
-			$thisfile_id3v2['comments']['year'] = array($matches[1]);
-		}
-
-
-		if (!empty($thisfile_id3v2['TXXX'])) {
-			// MediaMonkey does this, maybe others: write a blank RGAD frame, but put replay-gain adjustment values in TXXX frames
-			foreach ($thisfile_id3v2['TXXX'] as $txxx_array) {
-				switch ($txxx_array['description']) {
-					case 'replaygain_track_gain':
-						if (empty($info['replay_gain']['track']['adjustment']) && !empty($txxx_array['data'])) {
-							$info['replay_gain']['track']['adjustment'] = floatval(trim(str_replace('dB', '', $txxx_array['data'])));
-						}
-						break;
-					case 'replaygain_track_peak':
-						if (empty($info['replay_gain']['track']['peak']) && !empty($txxx_array['data'])) {
-							$info['replay_gain']['track']['peak'] = floatval($txxx_array['data']);
-						}
-						break;
-					case 'replaygain_album_gain':
-						if (empty($info['replay_gain']['album']['adjustment']) && !empty($txxx_array['data'])) {
-							$info['replay_gain']['album']['adjustment'] = floatval(trim(str_replace('dB', '', $txxx_array['data'])));
-						}
-						break;
-				}
-			}
-		}
-
-
-		// Set avdataoffset
-		$info['avdataoffset'] = $thisfile_id3v2['headerlength'];
-		if (isset($thisfile_id3v2['footer'])) {
-			$info['avdataoffset'] += 10;
-		}
-
-		return true;
-	}
-
-
-	public function ParseID3v2GenreString($genrestring) {
-		// Parse genres into arrays of genreName and genreID
-		// ID3v2.2.x, ID3v2.3.x: '(21)' or '(4)Eurodisco' or '(51)(39)' or '(55)((I think...)'
-		// ID3v2.4.x: '21' $00 'Eurodisco' $00
-		$clean_genres = array();
-		if (strpos($genrestring, "\x00") === false) {
-			$genrestring = preg_replace('#\(([0-9]{1,3})\)#', '$1'."\x00", $genrestring);
-		}
-		$genre_elements = explode("\x00", $genrestring);
-		foreach ($genre_elements as $element) {
-			$element = trim($element);
-			if ($element) {
-				if (preg_match('#^[0-9]{1,3}#', $element)) {
-					$clean_genres[] = getid3_id3v1::LookupGenreName($element);
-				} else {
-					$clean_genres[] = str_replace('((', '(', $element);
-				}
-			}
-		}
-		return $clean_genres;
-	}
-
-
-	public function ParseID3v2Frame(&$parsedFrame) {
-
-		// shortcuts
-		$info = &$this->getid3->info;
-		$id3v2_majorversion = $info['id3v2']['majorversion'];
-
-		$parsedFrame['framenamelong']  = $this->FrameNameLongLookup($parsedFrame['frame_name']);
-		if (empty($parsedFrame['framenamelong'])) {
-			unset($parsedFrame['framenamelong']);
-		}
-		$parsedFrame['framenameshort'] = $this->FrameNameShortLookup($parsedFrame['frame_name']);
-		if (empty($parsedFrame['framenameshort'])) {
-			unset($parsedFrame['framenameshort']);
-		}
-
-		if ($id3v2_majorversion >= 3) { // frame flags are not part of the ID3v2.2 standard
-			if ($id3v2_majorversion == 3) {
-				//    Frame Header Flags
-				//    %abc00000 %ijk00000
-				$parsedFrame['flags']['TagAlterPreservation']  = (bool) ($parsedFrame['frame_flags_raw'] & 0x8000); // a - Tag alter preservation
-				$parsedFrame['flags']['FileAlterPreservation'] = (bool) ($parsedFrame['frame_flags_raw'] & 0x4000); // b - File alter preservation
-				$parsedFrame['flags']['ReadOnly']              = (bool) ($parsedFrame['frame_flags_raw'] & 0x2000); // c - Read only
-				$parsedFrame['flags']['compression']           = (bool) ($parsedFrame['frame_flags_raw'] & 0x0080); // i - Compression
-				$parsedFrame['flags']['Encryption']            = (bool) ($parsedFrame['frame_flags_raw'] & 0x0040); // j - Encryption
-				$parsedFrame['flags']['GroupingIdentity']      = (bool) ($parsedFrame['frame_flags_raw'] & 0x0020); // k - Grouping identity
-
-			} elseif ($id3v2_majorversion == 4) {
-				//    Frame Header Flags
-				//    %0abc0000 %0h00kmnp
-				$parsedFrame['flags']['TagAlterPreservation']  = (bool) ($parsedFrame['frame_flags_raw'] & 0x4000); // a - Tag alter preservation
-				$parsedFrame['flags']['FileAlterPreservation'] = (bool) ($parsedFrame['frame_flags_raw'] & 0x2000); // b - File alter preservation
-				$parsedFrame['flags']['ReadOnly']              = (bool) ($parsedFrame['frame_flags_raw'] & 0x1000); // c - Read only
-				$parsedFrame['flags']['GroupingIdentity']      = (bool) ($parsedFrame['frame_flags_raw'] & 0x0040); // h - Grouping identity
-				$parsedFrame['flags']['compression']           = (bool) ($parsedFrame['frame_flags_raw'] & 0x0008); // k - Compression
-				$parsedFrame['flags']['Encryption']            = (bool) ($parsedFrame['frame_flags_raw'] & 0x0004); // m - Encryption
-				$parsedFrame['flags']['Unsynchronisation']     = (bool) ($parsedFrame['frame_flags_raw'] & 0x0002); // n - Unsynchronisation
-				$parsedFrame['flags']['DataLengthIndicator']   = (bool) ($parsedFrame['frame_flags_raw'] & 0x0001); // p - Data length indicator
-
-				// Frame-level de-unsynchronisation - ID3v2.4
-				if ($parsedFrame['flags']['Unsynchronisation']) {
-					$parsedFrame['data'] = $this->DeUnsynchronise($parsedFrame['data']);
-				}
-
-				if ($parsedFrame['flags']['DataLengthIndicator']) {
-					$parsedFrame['data_length_indicator'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], 0, 4), 1);
-					$parsedFrame['data']                  =                           substr($parsedFrame['data'], 4);
-				}
-			}
-
-			//    Frame-level de-compression
-			if ($parsedFrame['flags']['compression']) {
-				$parsedFrame['decompressed_size'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], 0, 4));
-				if (!function_exists('gzuncompress')) {
-					$info['warning'][] = 'gzuncompress() support required to decompress ID3v2 frame "'.$parsedFrame['frame_name'].'"';
-				} else {
-					if ($decompresseddata = @gzuncompress(substr($parsedFrame['data'], 4))) {
-					//if ($decompresseddata = @gzuncompress($parsedFrame['data'])) {
-						$parsedFrame['data'] = $decompresseddata;
-						unset($decompresseddata);
-					} else {
-						$info['warning'][] = 'gzuncompress() failed on compressed contents of ID3v2 frame "'.$parsedFrame['frame_name'].'"';
-					}
-				}
-			}
-		}
-
-		if (!empty($parsedFrame['flags']['DataLengthIndicator'])) {
-			if ($parsedFrame['data_length_indicator'] != strlen($parsedFrame['data'])) {
-				$info['warning'][] = 'ID3v2 frame "'.$parsedFrame['frame_name'].'" should be '.$parsedFrame['data_length_indicator'].' bytes long according to DataLengthIndicator, but found '.strlen($parsedFrame['data']).' bytes of data';
-			}
-		}
-
-		if (isset($parsedFrame['datalength']) && ($parsedFrame['datalength'] == 0)) {
-
-			$warning = 'Frame "'.$parsedFrame['frame_name'].'" at offset '.$parsedFrame['dataoffset'].' has no data portion';
-			switch ($parsedFrame['frame_name']) {
-				case 'WCOM':
-					$warning .= ' (this is known to happen with files tagged by RioPort)';
-					break;
-
-				default:
-					break;
-			}
-			$info['warning'][] = $warning;
-
-		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'UFID')) || // 4.1   UFID Unique file identifier
-			(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'UFI'))) {  // 4.1   UFI  Unique file identifier
-			//   There may be more than one 'UFID' frame in a tag,
-			//   but only one with the same 'Owner identifier'.
-			// <Header for 'Unique file identifier', ID: 'UFID'>
-			// Owner identifier        <text string> $00
-			// Identifier              <up to 64 bytes binary data>
-			$exploded = explode("\x00", $parsedFrame['data'], 2);
-			$parsedFrame['ownerid'] = (isset($exploded[0]) ? $exploded[0] : '');
-			$parsedFrame['data']    = (isset($exploded[1]) ? $exploded[1] : '');
-
-		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'TXXX')) || // 4.2.2 TXXX User defined text information frame
-				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'TXX'))) {    // 4.2.2 TXX  User defined text information frame
-			//   There may be more than one 'TXXX' frame in each tag,
-			//   but only one with the same description.
-			// <Header for 'User defined text information frame', ID: 'TXXX'>
-			// Text encoding     $xx
-			// Description       <text string according to encoding> $00 (00)
-			// Value             <text string according to encoding>
-
-			$frame_offset = 0;
-			$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$frame_textencoding_terminator = $this->TextEncodingTerminatorLookup($frame_textencoding);
-			if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
-				$info['warning'][] = 'Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding';
-				$frame_textencoding_terminator = "\x00";
-			}
-			$frame_terminatorpos = strpos($parsedFrame['data'], $frame_textencoding_terminator, $frame_offset);
-			if (ord(substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
-				$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
-			}
-			$frame_description = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-			if (ord($frame_description) === 0) {
-				$frame_description = '';
-			}
-			$parsedFrame['encodingid']  = $frame_textencoding;
-			$parsedFrame['encoding']    = $this->TextEncodingNameLookup($frame_textencoding);
-
-			$parsedFrame['description'] = trim(getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $frame_description));
-			$parsedFrame['data'] = substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator));
-			if (!empty($parsedFrame['framenameshort']) && !empty($parsedFrame['data'])) {
-				$commentkey = ($parsedFrame['description'] ? $parsedFrame['description'] : (isset($info['id3v2']['comments'][$parsedFrame['framenameshort']]) ? count($info['id3v2']['comments'][$parsedFrame['framenameshort']]) : 0));
-				if (!isset($info['id3v2']['comments'][$parsedFrame['framenameshort']]) || !array_key_exists($commentkey, $info['id3v2']['comments'][$parsedFrame['framenameshort']])) {
-					$info['id3v2']['comments'][$parsedFrame['framenameshort']][$commentkey] = trim(getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $parsedFrame['data']));
-				} else {
-					$info['id3v2']['comments'][$parsedFrame['framenameshort']][]            = trim(getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $parsedFrame['data']));
-				}
-			}
-			//unset($parsedFrame['data']); do not unset, may be needed elsewhere, e.g. for replaygain
-
-
-		} elseif ($parsedFrame['frame_name']{0} == 'T') { // 4.2. T??[?] Text information frame
-			//   There may only be one text information frame of its kind in an tag.
-			// <Header for 'Text information frame', ID: 'T000' - 'TZZZ',
-			// excluding 'TXXX' described in 4.2.6.>
-			// Text encoding                $xx
-			// Information                  <text string(s) according to encoding>
-
-			$frame_offset = 0;
-			$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
-				$info['warning'][] = 'Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding';
-			}
-
-			$parsedFrame['data'] = (string) substr($parsedFrame['data'], $frame_offset);
-
-			$parsedFrame['encodingid'] = $frame_textencoding;
-			$parsedFrame['encoding']   = $this->TextEncodingNameLookup($frame_textencoding);
-
-			if (!empty($parsedFrame['framenameshort']) && !empty($parsedFrame['data'])) {
-				// ID3v2.3 specs say that TPE1 (and others) can contain multiple artist values separated with /
-				// This of course breaks when an artist name contains slash character, e.g. "AC/DC"
-				// MP3tag (maybe others) implement alternative system where multiple artists are null-separated, which makes more sense
-				// getID3 will split null-separated artists into multiple artists and leave slash-separated ones to the user
-				switch ($parsedFrame['encoding']) {
-					case 'UTF-16':
-					case 'UTF-16BE':
-					case 'UTF-16LE':
-						$wordsize = 2;
-						break;
-					case 'ISO-8859-1':
-					case 'UTF-8':
-					default:
-						$wordsize = 1;
-						break;
-				}
-				$Txxx_elements = array();
-				$Txxx_elements_start_offset = 0;
-				for ($i = 0; $i < strlen($parsedFrame['data']); $i += $wordsize) {
-					if (substr($parsedFrame['data'], $i, $wordsize) == str_repeat("\x00", $wordsize)) {
-						$Txxx_elements[] = substr($parsedFrame['data'], $Txxx_elements_start_offset, $i - $Txxx_elements_start_offset);
-						$Txxx_elements_start_offset = $i + $wordsize;
-					}
-				}
-				$Txxx_elements[] = substr($parsedFrame['data'], $Txxx_elements_start_offset, $i - $Txxx_elements_start_offset);
-				foreach ($Txxx_elements as $Txxx_element) {
-					$string = getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $Txxx_element);
-					if (!empty($string)) {
-						$info['id3v2']['comments'][$parsedFrame['framenameshort']][] = $string;
-					}
-				}
-				unset($string, $wordsize, $i, $Txxx_elements, $Txxx_element, $Txxx_elements_start_offset);
-			}
-
-		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'WXXX')) || // 4.3.2 WXXX User defined URL link frame
-				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'WXX'))) {    // 4.3.2 WXX  User defined URL link frame
-			//   There may be more than one 'WXXX' frame in each tag,
-			//   but only one with the same description
-			// <Header for 'User defined URL link frame', ID: 'WXXX'>
-			// Text encoding     $xx
-			// Description       <text string according to encoding> $00 (00)
-			// URL               <text string>
-
-			$frame_offset = 0;
-			$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$frame_textencoding_terminator = $this->TextEncodingTerminatorLookup($frame_textencoding);
-			if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
-				$info['warning'][] = 'Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding';
-				$frame_textencoding_terminator = "\x00";
-			}
-			$frame_terminatorpos = strpos($parsedFrame['data'], $frame_textencoding_terminator, $frame_offset);
-			if (ord(substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
-				$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
-			}
-			$frame_description = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-
-			if (ord($frame_description) === 0) {
-				$frame_description = '';
-			}
-			$parsedFrame['data'] = substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator));
-
-			$frame_terminatorpos = strpos($parsedFrame['data'], $frame_textencoding_terminator);
-			if (ord(substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
-				$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
-			}
-			if ($frame_terminatorpos) {
-				// there are null bytes after the data - this is not according to spec
-				// only use data up to first null byte
-				$frame_urldata = (string) substr($parsedFrame['data'], 0, $frame_terminatorpos);
-			} else {
-				// no null bytes following data, just use all data
-				$frame_urldata = (string) $parsedFrame['data'];
-			}
-
-			$parsedFrame['encodingid']  = $frame_textencoding;
-			$parsedFrame['encoding']    = $this->TextEncodingNameLookup($frame_textencoding);
-
-			$parsedFrame['url']         = $frame_urldata;
-			$parsedFrame['description'] = $frame_description;
-			if (!empty($parsedFrame['framenameshort']) && $parsedFrame['url']) {
-				$info['id3v2']['comments'][$parsedFrame['framenameshort']][] = getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $parsedFrame['url']);
-			}
-			unset($parsedFrame['data']);
-
-
-		} elseif ($parsedFrame['frame_name']{0} == 'W') { // 4.3. W??? URL link frames
-			//   There may only be one URL link frame of its kind in a tag,
-			//   except when stated otherwise in the frame description
-			// <Header for 'URL link frame', ID: 'W000' - 'WZZZ', excluding 'WXXX'
-			// described in 4.3.2.>
-			// URL              <text string>
-
-			$parsedFrame['url'] = trim($parsedFrame['data']);
-			if (!empty($parsedFrame['framenameshort']) && $parsedFrame['url']) {
-				$info['id3v2']['comments'][$parsedFrame['framenameshort']][] = $parsedFrame['url'];
-			}
-			unset($parsedFrame['data']);
-
-
-		} elseif ((($id3v2_majorversion == 3) && ($parsedFrame['frame_name'] == 'IPLS')) || // 4.4  IPLS Involved people list (ID3v2.3 only)
-				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'IPL'))) {     // 4.4  IPL  Involved people list (ID3v2.2 only)
-			// http://id3.org/id3v2.3.0#sec4.4
-			//   There may only be one 'IPL' frame in each tag
-			// <Header for 'User defined URL link frame', ID: 'IPL'>
-			// Text encoding     $xx
-			// People list strings    <textstrings>
-
-			$frame_offset = 0;
-			$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
-				$info['warning'][] = 'Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding';
-			}
-			$parsedFrame['encodingid'] = $frame_textencoding;
-			$parsedFrame['encoding']   = $this->TextEncodingNameLookup($parsedFrame['encodingid']);
-			$parsedFrame['data_raw']   = (string) substr($parsedFrame['data'], $frame_offset);
-
-			// http://www.getid3.org/phpBB3/viewtopic.php?t=1369
-			// "this tag typically contains null terminated strings, which are associated in pairs"
-			// "there are users that use the tag incorrectly"
-			$IPLS_parts = array();
-			if (strpos($parsedFrame['data_raw'], "\x00") !== false) {
-				$IPLS_parts_unsorted = array();
-				if (((strlen($parsedFrame['data_raw']) % 2) == 0) && ((substr($parsedFrame['data_raw'], 0, 2) == "\xFF\xFE") || (substr($parsedFrame['data_raw'], 0, 2) == "\xFE\xFF"))) {
-					// UTF-16, be careful looking for null bytes since most 2-byte characters may contain one; you need to find twin null bytes, and on even padding
-					$thisILPS  = '';
-					for ($i = 0; $i < strlen($parsedFrame['data_raw']); $i += 2) {
-						$twobytes = substr($parsedFrame['data_raw'], $i, 2);
-						if ($twobytes === "\x00\x00") {
-							$IPLS_parts_unsorted[] = getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $thisILPS);
-							$thisILPS  = '';
-						} else {
-							$thisILPS .= $twobytes;
-						}
-					}
-					if (strlen($thisILPS) > 2) { // 2-byte BOM
-						$IPLS_parts_unsorted[] = getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $thisILPS);
-					}
-				} else {
-					// ISO-8859-1 or UTF-8 or other single-byte-null character set
-					$IPLS_parts_unsorted = explode("\x00", $parsedFrame['data_raw']);
-				}
-				if (count($IPLS_parts_unsorted) == 1) {
-					// just a list of names, e.g. "Dino Baptiste, Jimmy Copley, John Gordon, Bernie Marsden, Sharon Watson"
-					foreach ($IPLS_parts_unsorted as $key => $value) {
-						$IPLS_parts_sorted = preg_split('#[;,\\r\\n\\t]#', $value);
-						$position = '';
-						foreach ($IPLS_parts_sorted as $person) {
-							$IPLS_parts[] = array('position'=>$position, 'person'=>$person);
-						}
-					}
-				} elseif ((count($IPLS_parts_unsorted) % 2) == 0) {
-					$position = '';
-					$person   = '';
-					foreach ($IPLS_parts_unsorted as $key => $value) {
-						if (($key % 2) == 0) {
-							$position = $value;
-						} else {
-							$person   = $value;
-							$IPLS_parts[] = array('position'=>$position, 'person'=>$person);
-							$position = '';
-							$person   = '';
-						}
-					}
-				} else {
-					foreach ($IPLS_parts_unsorted as $key => $value) {
-						$IPLS_parts[] = array($value);
-					}
-				}
-
-			} else {
-				$IPLS_parts = preg_split('#[;,\\r\\n\\t]#', $parsedFrame['data_raw']);
-			}
-			$parsedFrame['data'] = $IPLS_parts;
-
-			if (!empty($parsedFrame['framenameshort']) && !empty($parsedFrame['data'])) {
-				$info['id3v2']['comments'][$parsedFrame['framenameshort']][] = $parsedFrame['data'];
-			}
-
-
-		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'MCDI')) || // 4.4   MCDI Music CD identifier
-				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'MCI'))) {     // 4.5   MCI  Music CD identifier
-			//   There may only be one 'MCDI' frame in each tag
-			// <Header for 'Music CD identifier', ID: 'MCDI'>
-			// CD TOC                <binary data>
-
-			if (!empty($parsedFrame['framenameshort']) && !empty($parsedFrame['data'])) {
-				$info['id3v2']['comments'][$parsedFrame['framenameshort']][] = $parsedFrame['data'];
-			}
-
-
-		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'ETCO')) || // 4.5   ETCO Event timing codes
-				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'ETC'))) {     // 4.6   ETC  Event timing codes
-			//   There may only be one 'ETCO' frame in each tag
-			// <Header for 'Event timing codes', ID: 'ETCO'>
-			// Time stamp format    $xx
-			//   Where time stamp format is:
-			// $01  (32-bit value) MPEG frames from beginning of file
-			// $02  (32-bit value) milliseconds from beginning of file
-			//   Followed by a list of key events in the following format:
-			// Type of event   $xx
-			// Time stamp      $xx (xx ...)
-			//   The 'Time stamp' is set to zero if directly at the beginning of the sound
-			//   or after the previous event. All events MUST be sorted in chronological order.
-
-			$frame_offset = 0;
-			$parsedFrame['timestampformat'] = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-
-			while ($frame_offset < strlen($parsedFrame['data'])) {
-				$parsedFrame['typeid']    = substr($parsedFrame['data'], $frame_offset++, 1);
-				$parsedFrame['type']      = $this->ETCOEventLookup($parsedFrame['typeid']);
-				$parsedFrame['timestamp'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
-				$frame_offset += 4;
-			}
-			unset($parsedFrame['data']);
-
-
-		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'MLLT')) || // 4.6   MLLT MPEG location lookup table
-				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'MLL'))) {     // 4.7   MLL MPEG location lookup table
-			//   There may only be one 'MLLT' frame in each tag
-			// <Header for 'Location lookup table', ID: 'MLLT'>
-			// MPEG frames between reference  $xx xx
-			// Bytes between reference        $xx xx xx
-			// Milliseconds between reference $xx xx xx
-			// Bits for bytes deviation       $xx
-			// Bits for milliseconds dev.     $xx
-			//   Then for every reference the following data is included;
-			// Deviation in bytes         %xxx....
-			// Deviation in milliseconds  %xxx....
-
-			$frame_offset = 0;
-			$parsedFrame['framesbetweenreferences'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], 0, 2));
-			$parsedFrame['bytesbetweenreferences']  = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], 2, 3));
-			$parsedFrame['msbetweenreferences']     = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], 5, 3));
-			$parsedFrame['bitsforbytesdeviation']   = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], 8, 1));
-			$parsedFrame['bitsformsdeviation']      = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], 9, 1));
-			$parsedFrame['data'] = substr($parsedFrame['data'], 10);
-			while ($frame_offset < strlen($parsedFrame['data'])) {
-				$deviationbitstream .= getid3_lib::BigEndian2Bin(substr($parsedFrame['data'], $frame_offset++, 1));
-			}
-			$reference_counter = 0;
-			while (strlen($deviationbitstream) > 0) {
-				$parsedFrame[$reference_counter]['bytedeviation'] = bindec(substr($deviationbitstream, 0, $parsedFrame['bitsforbytesdeviation']));
-				$parsedFrame[$reference_counter]['msdeviation']   = bindec(substr($deviationbitstream, $parsedFrame['bitsforbytesdeviation'], $parsedFrame['bitsformsdeviation']));
-				$deviationbitstream = substr($deviationbitstream, $parsedFrame['bitsforbytesdeviation'] + $parsedFrame['bitsformsdeviation']);
-				$reference_counter++;
-			}
-			unset($parsedFrame['data']);
-
-
-		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'SYTC')) || // 4.7   SYTC Synchronised tempo codes
-				  (($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'STC'))) {  // 4.8   STC  Synchronised tempo codes
-			//   There may only be one 'SYTC' frame in each tag
-			// <Header for 'Synchronised tempo codes', ID: 'SYTC'>
-			// Time stamp format   $xx
-			// Tempo data          <binary data>
-			//   Where time stamp format is:
-			// $01  (32-bit value) MPEG frames from beginning of file
-			// $02  (32-bit value) milliseconds from beginning of file
-
-			$frame_offset = 0;
-			$parsedFrame['timestampformat'] = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$timestamp_counter = 0;
-			while ($frame_offset < strlen($parsedFrame['data'])) {
-				$parsedFrame[$timestamp_counter]['tempo'] = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-				if ($parsedFrame[$timestamp_counter]['tempo'] == 255) {
-					$parsedFrame[$timestamp_counter]['tempo'] += ord(substr($parsedFrame['data'], $frame_offset++, 1));
-				}
-				$parsedFrame[$timestamp_counter]['timestamp'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
-				$frame_offset += 4;
-				$timestamp_counter++;
-			}
-			unset($parsedFrame['data']);
-
-
-		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'USLT')) || // 4.8   USLT Unsynchronised lyric/text transcription
-				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'ULT'))) {     // 4.9   ULT  Unsynchronised lyric/text transcription
-			//   There may be more than one 'Unsynchronised lyrics/text transcription' frame
-			//   in each tag, but only one with the same language and content descriptor.
-			// <Header for 'Unsynchronised lyrics/text transcription', ID: 'USLT'>
-			// Text encoding        $xx
-			// Language             $xx xx xx
-			// Content descriptor   <text string according to encoding> $00 (00)
-			// Lyrics/text          <full text string according to encoding>
-
-			$frame_offset = 0;
-			$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$frame_textencoding_terminator = $this->TextEncodingTerminatorLookup($frame_textencoding);
-			if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
-				$info['warning'][] = 'Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding';
-				$frame_textencoding_terminator = "\x00";
-			}
-			$frame_language = substr($parsedFrame['data'], $frame_offset, 3);
-			$frame_offset += 3;
-			$frame_terminatorpos = strpos($parsedFrame['data'], $frame_textencoding_terminator, $frame_offset);
-			if (ord(substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
-				$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
-			}
-			$frame_description = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-			if (ord($frame_description) === 0) {
-				$frame_description = '';
-			}
-			$parsedFrame['data'] = substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator));
-
-			$parsedFrame['encodingid']   = $frame_textencoding;
-			$parsedFrame['encoding']     = $this->TextEncodingNameLookup($frame_textencoding);
-
-			$parsedFrame['data']         = $parsedFrame['data'];
-			$parsedFrame['language']     = $frame_language;
-			$parsedFrame['languagename'] = $this->LanguageLookup($frame_language, false);
-			$parsedFrame['description']  = $frame_description;
-			if (!empty($parsedFrame['framenameshort']) && !empty($parsedFrame['data'])) {
-				$info['id3v2']['comments'][$parsedFrame['framenameshort']][] = getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $parsedFrame['data']);
-			}
-			unset($parsedFrame['data']);
-
-
-		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'SYLT')) || // 4.9   SYLT Synchronised lyric/text
-				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'SLT'))) {     // 4.10  SLT  Synchronised lyric/text
-			//   There may be more than one 'SYLT' frame in each tag,
-			//   but only one with the same language and content descriptor.
-			// <Header for 'Synchronised lyrics/text', ID: 'SYLT'>
-			// Text encoding        $xx
-			// Language             $xx xx xx
-			// Time stamp format    $xx
-			//   $01  (32-bit value) MPEG frames from beginning of file
-			//   $02  (32-bit value) milliseconds from beginning of file
-			// Content type         $xx
-			// Content descriptor   <text string according to encoding> $00 (00)
-			//   Terminated text to be synced (typically a syllable)
-			//   Sync identifier (terminator to above string)   $00 (00)
-			//   Time stamp                                     $xx (xx ...)
-
-			$frame_offset = 0;
-			$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$frame_textencoding_terminator = $this->TextEncodingTerminatorLookup($frame_textencoding);
-			if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
-				$info['warning'][] = 'Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding';
-				$frame_textencoding_terminator = "\x00";
-			}
-			$frame_language = substr($parsedFrame['data'], $frame_offset, 3);
-			$frame_offset += 3;
-			$parsedFrame['timestampformat'] = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$parsedFrame['contenttypeid']   = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$parsedFrame['contenttype']     = $this->SYTLContentTypeLookup($parsedFrame['contenttypeid']);
-			$parsedFrame['encodingid']      = $frame_textencoding;
-			$parsedFrame['encoding']        = $this->TextEncodingNameLookup($frame_textencoding);
-
-			$parsedFrame['language']        = $frame_language;
-			$parsedFrame['languagename']    = $this->LanguageLookup($frame_language, false);
-
-			$timestampindex = 0;
-			$frame_remainingdata = substr($parsedFrame['data'], $frame_offset);
-			while (strlen($frame_remainingdata)) {
-				$frame_offset = 0;
-				$frame_terminatorpos = strpos($frame_remainingdata, $frame_textencoding_terminator);
-				if ($frame_terminatorpos === false) {
-					$frame_remainingdata = '';
-				} else {
-					if (ord(substr($frame_remainingdata, $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
-						$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
-					}
-					$parsedFrame['lyrics'][$timestampindex]['data'] = substr($frame_remainingdata, $frame_offset, $frame_terminatorpos - $frame_offset);
-
-					$frame_remainingdata = substr($frame_remainingdata, $frame_terminatorpos + strlen($frame_textencoding_terminator));
-					if (($timestampindex == 0) && (ord($frame_remainingdata{0}) != 0)) {
-						// timestamp probably omitted for first data item
-					} else {
-						$parsedFrame['lyrics'][$timestampindex]['timestamp'] = getid3_lib::BigEndian2Int(substr($frame_remainingdata, 0, 4));
-						$frame_remainingdata = substr($frame_remainingdata, 4);
-					}
-					$timestampindex++;
-				}
-			}
-			unset($parsedFrame['data']);
-
-
-		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'COMM')) || // 4.10  COMM Comments
-				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'COM'))) {     // 4.11  COM  Comments
-			//   There may be more than one comment frame in each tag,
-			//   but only one with the same language and content descriptor.
-			// <Header for 'Comment', ID: 'COMM'>
-			// Text encoding          $xx
-			// Language               $xx xx xx
-			// Short content descrip. <text string according to encoding> $00 (00)
-			// The actual text        <full text string according to encoding>
-
-			if (strlen($parsedFrame['data']) < 5) {
-
-				$info['warning'][] = 'Invalid data (too short) for "'.$parsedFrame['frame_name'].'" frame at offset '.$parsedFrame['dataoffset'];
-
-			} else {
-
-				$frame_offset = 0;
-				$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-				$frame_textencoding_terminator = $this->TextEncodingTerminatorLookup($frame_textencoding);
-				if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
-					$info['warning'][] = 'Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding';
-					$frame_textencoding_terminator = "\x00";
-				}
-				$frame_language = substr($parsedFrame['data'], $frame_offset, 3);
-				$frame_offset += 3;
-				$frame_terminatorpos = strpos($parsedFrame['data'], $frame_textencoding_terminator, $frame_offset);
-				if (ord(substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
-					$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
-				}
-				$frame_description = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-				if (ord($frame_description) === 0) {
-					$frame_description = '';
-				}
-				$frame_text = (string) substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator));
-
-				$parsedFrame['encodingid']   = $frame_textencoding;
-				$parsedFrame['encoding']     = $this->TextEncodingNameLookup($frame_textencoding);
-
-				$parsedFrame['language']     = $frame_language;
-				$parsedFrame['languagename'] = $this->LanguageLookup($frame_language, false);
-				$parsedFrame['description']  = $frame_description;
-				$parsedFrame['data']         = $frame_text;
-				if (!empty($parsedFrame['framenameshort']) && !empty($parsedFrame['data'])) {
-					$commentkey = ($parsedFrame['description'] ? $parsedFrame['description'] : (!empty($info['id3v2']['comments'][$parsedFrame['framenameshort']]) ? count($info['id3v2']['comments'][$parsedFrame['framenameshort']]) : 0));
-					if (!isset($info['id3v2']['comments'][$parsedFrame['framenameshort']]) || !array_key_exists($commentkey, $info['id3v2']['comments'][$parsedFrame['framenameshort']])) {
-						$info['id3v2']['comments'][$parsedFrame['framenameshort']][$commentkey] = getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $parsedFrame['data']);
-					} else {
-						$info['id3v2']['comments'][$parsedFrame['framenameshort']][]            = getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $parsedFrame['data']);
-					}
-				}
-
-			}
-
-		} elseif (($id3v2_majorversion >= 4) && ($parsedFrame['frame_name'] == 'RVA2')) { // 4.11  RVA2 Relative volume adjustment (2) (ID3v2.4+ only)
-			//   There may be more than one 'RVA2' frame in each tag,
-			//   but only one with the same identification string
-			// <Header for 'Relative volume adjustment (2)', ID: 'RVA2'>
-			// Identification          <text string> $00
-			//   The 'identification' string is used to identify the situation and/or
-			//   device where this adjustment should apply. The following is then
-			//   repeated for every channel:
-			// Type of channel         $xx
-			// Volume adjustment       $xx xx
-			// Bits representing peak  $xx
-			// Peak volume             $xx (xx ...)
-
-			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00");
-			$frame_idstring = substr($parsedFrame['data'], 0, $frame_terminatorpos);
-			if (ord($frame_idstring) === 0) {
-				$frame_idstring = '';
-			}
-			$frame_remainingdata = substr($parsedFrame['data'], $frame_terminatorpos + strlen("\x00"));
-			$parsedFrame['description'] = $frame_idstring;
-			$RVA2channelcounter = 0;
-			while (strlen($frame_remainingdata) >= 5) {
-				$frame_offset = 0;
-				$frame_channeltypeid = ord(substr($frame_remainingdata, $frame_offset++, 1));
-				$parsedFrame[$RVA2channelcounter]['channeltypeid']  = $frame_channeltypeid;
-				$parsedFrame[$RVA2channelcounter]['channeltype']    = $this->RVA2ChannelTypeLookup($frame_channeltypeid);
-				$parsedFrame[$RVA2channelcounter]['volumeadjust']   = getid3_lib::BigEndian2Int(substr($frame_remainingdata, $frame_offset, 2), false, true); // 16-bit signed
-				$frame_offset += 2;
-				$parsedFrame[$RVA2channelcounter]['bitspeakvolume'] = ord(substr($frame_remainingdata, $frame_offset++, 1));
-				if (($parsedFrame[$RVA2channelcounter]['bitspeakvolume'] < 1) || ($parsedFrame[$RVA2channelcounter]['bitspeakvolume'] > 4)) {
-					$info['warning'][] = 'ID3v2::RVA2 frame['.$RVA2channelcounter.'] contains invalid '.$parsedFrame[$RVA2channelcounter]['bitspeakvolume'].'-byte bits-representing-peak value';
-					break;
-				}
-				$frame_bytespeakvolume = ceil($parsedFrame[$RVA2channelcounter]['bitspeakvolume'] / 8);
-				$parsedFrame[$RVA2channelcounter]['peakvolume']     = getid3_lib::BigEndian2Int(substr($frame_remainingdata, $frame_offset, $frame_bytespeakvolume));
-				$frame_remainingdata = substr($frame_remainingdata, $frame_offset + $frame_bytespeakvolume);
-				$RVA2channelcounter++;
-			}
-			unset($parsedFrame['data']);
-
-
-		} elseif ((($id3v2_majorversion == 3) && ($parsedFrame['frame_name'] == 'RVAD')) || // 4.12  RVAD Relative volume adjustment (ID3v2.3 only)
-				  (($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'RVA'))) {  // 4.12  RVA  Relative volume adjustment (ID3v2.2 only)
-			//   There may only be one 'RVA' frame in each tag
-			// <Header for 'Relative volume adjustment', ID: 'RVA'>
-			// ID3v2.2 => Increment/decrement     %000000ba
-			// ID3v2.3 => Increment/decrement     %00fedcba
-			// Bits used for volume descr.        $xx
-			// Relative volume change, right      $xx xx (xx ...) // a
-			// Relative volume change, left       $xx xx (xx ...) // b
-			// Peak volume right                  $xx xx (xx ...)
-			// Peak volume left                   $xx xx (xx ...)
-			//   ID3v2.3 only, optional (not present in ID3v2.2):
-			// Relative volume change, right back $xx xx (xx ...) // c
-			// Relative volume change, left back  $xx xx (xx ...) // d
-			// Peak volume right back             $xx xx (xx ...)
-			// Peak volume left back              $xx xx (xx ...)
-			//   ID3v2.3 only, optional (not present in ID3v2.2):
-			// Relative volume change, center     $xx xx (xx ...) // e
-			// Peak volume center                 $xx xx (xx ...)
-			//   ID3v2.3 only, optional (not present in ID3v2.2):
-			// Relative volume change, bass       $xx xx (xx ...) // f
-			// Peak volume bass                   $xx xx (xx ...)
-
-			$frame_offset = 0;
-			$frame_incrdecrflags = getid3_lib::BigEndian2Bin(substr($parsedFrame['data'], $frame_offset++, 1));
-			$parsedFrame['incdec']['right'] = (bool) substr($frame_incrdecrflags, 6, 1);
-			$parsedFrame['incdec']['left']  = (bool) substr($frame_incrdecrflags, 7, 1);
-			$parsedFrame['bitsvolume'] = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$frame_bytesvolume = ceil($parsedFrame['bitsvolume'] / 8);
-			$parsedFrame['volumechange']['right'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
-			if ($parsedFrame['incdec']['right'] === false) {
-				$parsedFrame['volumechange']['right'] *= -1;
-			}
-			$frame_offset += $frame_bytesvolume;
-			$parsedFrame['volumechange']['left'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
-			if ($parsedFrame['incdec']['left'] === false) {
-				$parsedFrame['volumechange']['left'] *= -1;
-			}
-			$frame_offset += $frame_bytesvolume;
-			$parsedFrame['peakvolume']['right'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
-			$frame_offset += $frame_bytesvolume;
-			$parsedFrame['peakvolume']['left']  = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
-			$frame_offset += $frame_bytesvolume;
-			if ($id3v2_majorversion == 3) {
-				$parsedFrame['data'] = substr($parsedFrame['data'], $frame_offset);
-				if (strlen($parsedFrame['data']) > 0) {
-					$parsedFrame['incdec']['rightrear'] = (bool) substr($frame_incrdecrflags, 4, 1);
-					$parsedFrame['incdec']['leftrear']  = (bool) substr($frame_incrdecrflags, 5, 1);
-					$parsedFrame['volumechange']['rightrear'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
-					if ($parsedFrame['incdec']['rightrear'] === false) {
-						$parsedFrame['volumechange']['rightrear'] *= -1;
-					}
-					$frame_offset += $frame_bytesvolume;
-					$parsedFrame['volumechange']['leftrear'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
-					if ($parsedFrame['incdec']['leftrear'] === false) {
-						$parsedFrame['volumechange']['leftrear'] *= -1;
-					}
-					$frame_offset += $frame_bytesvolume;
-					$parsedFrame['peakvolume']['rightrear'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
-					$frame_offset += $frame_bytesvolume;
-					$parsedFrame['peakvolume']['leftrear']  = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
-					$frame_offset += $frame_bytesvolume;
-				}
-				$parsedFrame['data'] = substr($parsedFrame['data'], $frame_offset);
-				if (strlen($parsedFrame['data']) > 0) {
-					$parsedFrame['incdec']['center'] = (bool) substr($frame_incrdecrflags, 3, 1);
-					$parsedFrame['volumechange']['center'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
-					if ($parsedFrame['incdec']['center'] === false) {
-						$parsedFrame['volumechange']['center'] *= -1;
-					}
-					$frame_offset += $frame_bytesvolume;
-					$parsedFrame['peakvolume']['center'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
-					$frame_offset += $frame_bytesvolume;
-				}
-				$parsedFrame['data'] = substr($parsedFrame['data'], $frame_offset);
-				if (strlen($parsedFrame['data']) > 0) {
-					$parsedFrame['incdec']['bass'] = (bool) substr($frame_incrdecrflags, 2, 1);
-					$parsedFrame['volumechange']['bass'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
-					if ($parsedFrame['incdec']['bass'] === false) {
-						$parsedFrame['volumechange']['bass'] *= -1;
-					}
-					$frame_offset += $frame_bytesvolume;
-					$parsedFrame['peakvolume']['bass'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
-					$frame_offset += $frame_bytesvolume;
-				}
-			}
-			unset($parsedFrame['data']);
-
-
-		} elseif (($id3v2_majorversion >= 4) && ($parsedFrame['frame_name'] == 'EQU2')) { // 4.12  EQU2 Equalisation (2) (ID3v2.4+ only)
-			//   There may be more than one 'EQU2' frame in each tag,
-			//   but only one with the same identification string
-			// <Header of 'Equalisation (2)', ID: 'EQU2'>
-			// Interpolation method  $xx
-			//   $00  Band
-			//   $01  Linear
-			// Identification        <text string> $00
-			//   The following is then repeated for every adjustment point
-			// Frequency          $xx xx
-			// Volume adjustment  $xx xx
-
-			$frame_offset = 0;
-			$frame_interpolationmethod = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
-			$frame_idstring = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-			if (ord($frame_idstring) === 0) {
-				$frame_idstring = '';
-			}
-			$parsedFrame['description'] = $frame_idstring;
-			$frame_remainingdata = substr($parsedFrame['data'], $frame_terminatorpos + strlen("\x00"));
-			while (strlen($frame_remainingdata)) {
-				$frame_frequency = getid3_lib::BigEndian2Int(substr($frame_remainingdata, 0, 2)) / 2;
-				$parsedFrame['data'][$frame_frequency] = getid3_lib::BigEndian2Int(substr($frame_remainingdata, 2, 2), false, true);
-				$frame_remainingdata = substr($frame_remainingdata, 4);
-			}
-			$parsedFrame['interpolationmethod'] = $frame_interpolationmethod;
-			unset($parsedFrame['data']);
-
-
-		} elseif ((($id3v2_majorversion == 3) && ($parsedFrame['frame_name'] == 'EQUA')) || // 4.12  EQUA Equalisation (ID3v2.3 only)
-				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'EQU'))) {     // 4.13  EQU  Equalisation (ID3v2.2 only)
-			//   There may only be one 'EQUA' frame in each tag
-			// <Header for 'Relative volume adjustment', ID: 'EQU'>
-			// Adjustment bits    $xx
-			//   This is followed by 2 bytes + ('adjustment bits' rounded up to the
-			//   nearest byte) for every equalisation band in the following format,
-			//   giving a frequency range of 0 - 32767Hz:
-			// Increment/decrement   %x (MSB of the Frequency)
-			// Frequency             (lower 15 bits)
-			// Adjustment            $xx (xx ...)
-
-			$frame_offset = 0;
-			$parsedFrame['adjustmentbits'] = substr($parsedFrame['data'], $frame_offset++, 1);
-			$frame_adjustmentbytes = ceil($parsedFrame['adjustmentbits'] / 8);
-
-			$frame_remainingdata = (string) substr($parsedFrame['data'], $frame_offset);
-			while (strlen($frame_remainingdata) > 0) {
-				$frame_frequencystr = getid3_lib::BigEndian2Bin(substr($frame_remainingdata, 0, 2));
-				$frame_incdec    = (bool) substr($frame_frequencystr, 0, 1);
-				$frame_frequency = bindec(substr($frame_frequencystr, 1, 15));
-				$parsedFrame[$frame_frequency]['incdec'] = $frame_incdec;
-				$parsedFrame[$frame_frequency]['adjustment'] = getid3_lib::BigEndian2Int(substr($frame_remainingdata, 2, $frame_adjustmentbytes));
-				if ($parsedFrame[$frame_frequency]['incdec'] === false) {
-					$parsedFrame[$frame_frequency]['adjustment'] *= -1;
-				}
-				$frame_remainingdata = substr($frame_remainingdata, 2 + $frame_adjustmentbytes);
-			}
-			unset($parsedFrame['data']);
-
-
-		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'RVRB')) || // 4.13  RVRB Reverb
-				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'REV'))) {     // 4.14  REV  Reverb
-			//   There may only be one 'RVRB' frame in each tag.
-			// <Header for 'Reverb', ID: 'RVRB'>
-			// Reverb left (ms)                 $xx xx
-			// Reverb right (ms)                $xx xx
-			// Reverb bounces, left             $xx
-			// Reverb bounces, right            $xx
-			// Reverb feedback, left to left    $xx
-			// Reverb feedback, left to right   $xx
-			// Reverb feedback, right to right  $xx
-			// Reverb feedback, right to left   $xx
-			// Premix left to right             $xx
-			// Premix right to left             $xx
-
-			$frame_offset = 0;
-			$parsedFrame['left']  = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 2));
-			$frame_offset += 2;
-			$parsedFrame['right'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 2));
-			$frame_offset += 2;
-			$parsedFrame['bouncesL']      = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$parsedFrame['bouncesR']      = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$parsedFrame['feedbackLL']    = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$parsedFrame['feedbackLR']    = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$parsedFrame['feedbackRR']    = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$parsedFrame['feedbackRL']    = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$parsedFrame['premixLR']      = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$parsedFrame['premixRL']      = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			unset($parsedFrame['data']);
-
-
-		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'APIC')) || // 4.14  APIC Attached picture
-				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'PIC'))) {     // 4.15  PIC  Attached picture
-			//   There may be several pictures attached to one file,
-			//   each in their individual 'APIC' frame, but only one
-			//   with the same content descriptor
-			// <Header for 'Attached picture', ID: 'APIC'>
-			// Text encoding      $xx
-			// ID3v2.3+ => MIME type          <text string> $00
-			// ID3v2.2  => Image format       $xx xx xx
-			// Picture type       $xx
-			// Description        <text string according to encoding> $00 (00)
-			// Picture data       <binary data>
-
-			$frame_offset = 0;
-			$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$frame_textencoding_terminator = $this->TextEncodingTerminatorLookup($frame_textencoding);
-			if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
-				$info['warning'][] = 'Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding';
-				$frame_textencoding_terminator = "\x00";
-			}
-
-			if ($id3v2_majorversion == 2 && strlen($parsedFrame['data']) > $frame_offset) {
-				$frame_imagetype = substr($parsedFrame['data'], $frame_offset, 3);
-				if (strtolower($frame_imagetype) == 'ima') {
-					// complete hack for mp3Rage (www.chaoticsoftware.com) that puts ID3v2.3-formatted
-					// MIME type instead of 3-char ID3v2.2-format image type  (thanks xbhoffØpacbell*net)
-					$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
-					$frame_mimetype = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-					if (ord($frame_mimetype) === 0) {
-						$frame_mimetype = '';
-					}
-					$frame_imagetype = strtoupper(str_replace('image/', '', strtolower($frame_mimetype)));
-					if ($frame_imagetype == 'JPEG') {
-						$frame_imagetype = 'JPG';
-					}
-					$frame_offset = $frame_terminatorpos + strlen("\x00");
-				} else {
-					$frame_offset += 3;
-				}
-			}
-			if ($id3v2_majorversion > 2 && strlen($parsedFrame['data']) > $frame_offset) {
-				$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
-				$frame_mimetype = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-				if (ord($frame_mimetype) === 0) {
-					$frame_mimetype = '';
-				}
-				$frame_offset = $frame_terminatorpos + strlen("\x00");
-			}
-
-			$frame_picturetype = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-
-			if ($frame_offset >= $parsedFrame['datalength']) {
-				$info['warning'][] = 'data portion of APIC frame is missing at offset '.($parsedFrame['dataoffset'] + 8 + $frame_offset);
-			} else {
-				$frame_terminatorpos = strpos($parsedFrame['data'], $frame_textencoding_terminator, $frame_offset);
-				if (ord(substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
-					$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
-				}
-				$frame_description = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-				if (ord($frame_description) === 0) {
-					$frame_description = '';
-				}
-				$parsedFrame['encodingid']       = $frame_textencoding;
-				$parsedFrame['encoding']         = $this->TextEncodingNameLookup($frame_textencoding);
-
-				if ($id3v2_majorversion == 2) {
-					$parsedFrame['imagetype']    = $frame_imagetype;
-				} else {
-					$parsedFrame['mime']         = $frame_mimetype;
-				}
-				$parsedFrame['picturetypeid']    = $frame_picturetype;
-				$parsedFrame['picturetype']      = $this->APICPictureTypeLookup($frame_picturetype);
-				$parsedFrame['description']      = $frame_description;
-				$parsedFrame['data']             = substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator));
-				$parsedFrame['datalength']       = strlen($parsedFrame['data']);
-
-				$parsedFrame['image_mime'] = '';
-				$imageinfo = array();
-				$imagechunkcheck = getid3_lib::GetDataImageSize($parsedFrame['data'], $imageinfo);
-				if (($imagechunkcheck[2] >= 1) && ($imagechunkcheck[2] <= 3)) {
-					$parsedFrame['image_mime']       = 'image/'.getid3_lib::ImageTypesLookup($imagechunkcheck[2]);
-					if ($imagechunkcheck[0]) {
-						$parsedFrame['image_width']  = $imagechunkcheck[0];
-					}
-					if ($imagechunkcheck[1]) {
-						$parsedFrame['image_height'] = $imagechunkcheck[1];
-					}
-				}
-
-				do {
-					if ($this->getid3->option_save_attachments === false) {
-						// skip entirely
-						unset($parsedFrame['data']);
-						break;
-					}
-					if ($this->getid3->option_save_attachments === true) {
-						// great
-/*
-					} elseif (is_int($this->getid3->option_save_attachments)) {
-						if ($this->getid3->option_save_attachments < $parsedFrame['data_length']) {
-							// too big, skip
-							$info['warning'][] = 'attachment at '.$frame_offset.' is too large to process inline ('.number_format($parsedFrame['data_length']).' bytes)';
-							unset($parsedFrame['data']);
-							break;
-						}
-*/
-					} elseif (is_string($this->getid3->option_save_attachments)) {
-						$dir = rtrim(str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $this->getid3->option_save_attachments), DIRECTORY_SEPARATOR);
-						if (!is_dir($dir) || !is_writable($dir)) {
-							// cannot write, skip
-							$info['warning'][] = 'attachment at '.$frame_offset.' cannot be saved to "'.$dir.'" (not writable)';
-							unset($parsedFrame['data']);
-							break;
-						}
-					}
-					// if we get this far, must be OK
-					if (is_string($this->getid3->option_save_attachments)) {
-						$destination_filename = $dir.DIRECTORY_SEPARATOR.md5($info['filenamepath']).'_'.$frame_offset;
-						if (!file_exists($destination_filename) || is_writable($destination_filename)) {
-							file_put_contents($destination_filename, $parsedFrame['data']);
-						} else {
-							$info['warning'][] = 'attachment at '.$frame_offset.' cannot be saved to "'.$destination_filename.'" (not writable)';
-						}
-						$parsedFrame['data_filename'] = $destination_filename;
-						unset($parsedFrame['data']);
-					} else {
-						if (!empty($parsedFrame['framenameshort']) && !empty($parsedFrame['data'])) {
-							if (!isset($info['id3v2']['comments']['picture'])) {
-								$info['id3v2']['comments']['picture'] = array();
-							}
-							$comments_picture_data = array();
-							foreach (array('data', 'image_mime', 'image_width', 'image_height', 'imagetype', 'picturetype', 'description', 'datalength') as $picture_key) {
-								if (isset($parsedFrame[$picture_key])) {
-									$comments_picture_data[$picture_key] = $parsedFrame[$picture_key];
-								}
-							}
-							$info['id3v2']['comments']['picture'][] = $comments_picture_data;
-							unset($comments_picture_data);
-						}
-					}
-				} while (false);
-			}
-
-		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'GEOB')) || // 4.15  GEOB General encapsulated object
-				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'GEO'))) {     // 4.16  GEO  General encapsulated object
-			//   There may be more than one 'GEOB' frame in each tag,
-			//   but only one with the same content descriptor
-			// <Header for 'General encapsulated object', ID: 'GEOB'>
-			// Text encoding          $xx
-			// MIME type              <text string> $00
-			// Filename               <text string according to encoding> $00 (00)
-			// Content description    <text string according to encoding> $00 (00)
-			// Encapsulated object    <binary data>
-
-			$frame_offset = 0;
-			$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$frame_textencoding_terminator = $this->TextEncodingTerminatorLookup($frame_textencoding);
-			if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
-				$info['warning'][] = 'Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding';
-				$frame_textencoding_terminator = "\x00";
-			}
-			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
-			$frame_mimetype = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-			if (ord($frame_mimetype) === 0) {
-				$frame_mimetype = '';
-			}
-			$frame_offset = $frame_terminatorpos + strlen("\x00");
-
-			$frame_terminatorpos = strpos($parsedFrame['data'], $frame_textencoding_terminator, $frame_offset);
-			if (ord(substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
-				$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
-			}
-			$frame_filename = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-			if (ord($frame_filename) === 0) {
-				$frame_filename = '';
-			}
-			$frame_offset = $frame_terminatorpos + strlen($frame_textencoding_terminator);
-
-			$frame_terminatorpos = strpos($parsedFrame['data'], $frame_textencoding_terminator, $frame_offset);
-			if (ord(substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
-				$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
-			}
-			$frame_description = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-			if (ord($frame_description) === 0) {
-				$frame_description = '';
-			}
-			$frame_offset = $frame_terminatorpos + strlen($frame_textencoding_terminator);
-
-			$parsedFrame['objectdata']  = (string) substr($parsedFrame['data'], $frame_offset);
-			$parsedFrame['encodingid']  = $frame_textencoding;
-			$parsedFrame['encoding']    = $this->TextEncodingNameLookup($frame_textencoding);
-
-			$parsedFrame['mime']        = $frame_mimetype;
-			$parsedFrame['filename']    = $frame_filename;
-			$parsedFrame['description'] = $frame_description;
-			unset($parsedFrame['data']);
-
-
-		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'PCNT')) || // 4.16  PCNT Play counter
-				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'CNT'))) {     // 4.17  CNT  Play counter
-			//   There may only be one 'PCNT' frame in each tag.
-			//   When the counter reaches all one's, one byte is inserted in
-			//   front of the counter thus making the counter eight bits bigger
-			// <Header for 'Play counter', ID: 'PCNT'>
-			// Counter        $xx xx xx xx (xx ...)
-
-			$parsedFrame['data']          = getid3_lib::BigEndian2Int($parsedFrame['data']);
-
-
-		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'POPM')) || // 4.17  POPM Popularimeter
-				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'POP'))) {    // 4.18  POP  Popularimeter
-			//   There may be more than one 'POPM' frame in each tag,
-			//   but only one with the same email address
-			// <Header for 'Popularimeter', ID: 'POPM'>
-			// Email to user   <text string> $00
-			// Rating          $xx
-			// Counter         $xx xx xx xx (xx ...)
-
-			$frame_offset = 0;
-			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
-			$frame_emailaddress = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-			if (ord($frame_emailaddress) === 0) {
-				$frame_emailaddress = '';
-			}
-			$frame_offset = $frame_terminatorpos + strlen("\x00");
-			$frame_rating = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$parsedFrame['counter'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset));
-			$parsedFrame['email']   = $frame_emailaddress;
-			$parsedFrame['rating']  = $frame_rating;
-			unset($parsedFrame['data']);
-
-
-		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'RBUF')) || // 4.18  RBUF Recommended buffer size
-				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'BUF'))) {     // 4.19  BUF  Recommended buffer size
-			//   There may only be one 'RBUF' frame in each tag
-			// <Header for 'Recommended buffer size', ID: 'RBUF'>
-			// Buffer size               $xx xx xx
-			// Embedded info flag        %0000000x
-			// Offset to next tag        $xx xx xx xx
-
-			$frame_offset = 0;
-			$parsedFrame['buffersize'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 3));
-			$frame_offset += 3;
-
-			$frame_embeddedinfoflags = getid3_lib::BigEndian2Bin(substr($parsedFrame['data'], $frame_offset++, 1));
-			$parsedFrame['flags']['embededinfo'] = (bool) substr($frame_embeddedinfoflags, 7, 1);
-			$parsedFrame['nexttagoffset'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
-			unset($parsedFrame['data']);
-
-
-		} elseif (($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'CRM')) { // 4.20  Encrypted meta frame (ID3v2.2 only)
-			//   There may be more than one 'CRM' frame in a tag,
-			//   but only one with the same 'owner identifier'
-			// <Header for 'Encrypted meta frame', ID: 'CRM'>
-			// Owner identifier      <textstring> $00 (00)
-			// Content/explanation   <textstring> $00 (00)
-			// Encrypted datablock   <binary data>
-
-			$frame_offset = 0;
-			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
-			$frame_ownerid = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-			$frame_offset = $frame_terminatorpos + strlen("\x00");
-
-			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
-			$frame_description = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-			if (ord($frame_description) === 0) {
-				$frame_description = '';
-			}
-			$frame_offset = $frame_terminatorpos + strlen("\x00");
-
-			$parsedFrame['ownerid']     = $frame_ownerid;
-			$parsedFrame['data']        = (string) substr($parsedFrame['data'], $frame_offset);
-			$parsedFrame['description'] = $frame_description;
-			unset($parsedFrame['data']);
-
-
-		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'AENC')) || // 4.19  AENC Audio encryption
-				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'CRA'))) {     // 4.21  CRA  Audio encryption
-			//   There may be more than one 'AENC' frames in a tag,
-			//   but only one with the same 'Owner identifier'
-			// <Header for 'Audio encryption', ID: 'AENC'>
-			// Owner identifier   <text string> $00
-			// Preview start      $xx xx
-			// Preview length     $xx xx
-			// Encryption info    <binary data>
-
-			$frame_offset = 0;
-			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
-			$frame_ownerid = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-			if (ord($frame_ownerid) === 0) {
-				$frame_ownerid == '';
-			}
-			$frame_offset = $frame_terminatorpos + strlen("\x00");
-			$parsedFrame['ownerid'] = $frame_ownerid;
-			$parsedFrame['previewstart'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 2));
-			$frame_offset += 2;
-			$parsedFrame['previewlength'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 2));
-			$frame_offset += 2;
-			$parsedFrame['encryptioninfo'] = (string) substr($parsedFrame['data'], $frame_offset);
-			unset($parsedFrame['data']);
-
-
-		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'LINK')) || // 4.20  LINK Linked information
-				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'LNK'))) {    // 4.22  LNK  Linked information
-			//   There may be more than one 'LINK' frame in a tag,
-			//   but only one with the same contents
-			// <Header for 'Linked information', ID: 'LINK'>
-			// ID3v2.3+ => Frame identifier   $xx xx xx xx
-			// ID3v2.2  => Frame identifier   $xx xx xx
-			// URL                            <text string> $00
-			// ID and additional data         <text string(s)>
-
-			$frame_offset = 0;
-			if ($id3v2_majorversion == 2) {
-				$parsedFrame['frameid'] = substr($parsedFrame['data'], $frame_offset, 3);
-				$frame_offset += 3;
-			} else {
-				$parsedFrame['frameid'] = substr($parsedFrame['data'], $frame_offset, 4);
-				$frame_offset += 4;
-			}
-
-			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
-			$frame_url = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-			if (ord($frame_url) === 0) {
-				$frame_url = '';
-			}
-			$frame_offset = $frame_terminatorpos + strlen("\x00");
-			$parsedFrame['url'] = $frame_url;
-
-			$parsedFrame['additionaldata'] = (string) substr($parsedFrame['data'], $frame_offset);
-			if (!empty($parsedFrame['framenameshort']) && $parsedFrame['url']) {
-				$info['id3v2']['comments'][$parsedFrame['framenameshort']][] = getid3_lib::iconv_fallback_iso88591_utf8($parsedFrame['url']);
-			}
-			unset($parsedFrame['data']);
-
-
-		} elseif (($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'POSS')) { // 4.21  POSS Position synchronisation frame (ID3v2.3+ only)
-			//   There may only be one 'POSS' frame in each tag
-			// <Head for 'Position synchronisation', ID: 'POSS'>
-			// Time stamp format         $xx
-			// Position                  $xx (xx ...)
-
-			$frame_offset = 0;
-			$parsedFrame['timestampformat'] = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$parsedFrame['position']        = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset));
-			unset($parsedFrame['data']);
-
-
-		} elseif (($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'USER')) { // 4.22  USER Terms of use (ID3v2.3+ only)
-			//   There may be more than one 'Terms of use' frame in a tag,
-			//   but only one with the same 'Language'
-			// <Header for 'Terms of use frame', ID: 'USER'>
-			// Text encoding        $xx
-			// Language             $xx xx xx
-			// The actual text      <text string according to encoding>
-
-			$frame_offset = 0;
-			$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
-				$info['warning'][] = 'Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding';
-			}
-			$frame_language = substr($parsedFrame['data'], $frame_offset, 3);
-			$frame_offset += 3;
-			$parsedFrame['language']     = $frame_language;
-			$parsedFrame['languagename'] = $this->LanguageLookup($frame_language, false);
-			$parsedFrame['encodingid']   = $frame_textencoding;
-			$parsedFrame['encoding']     = $this->TextEncodingNameLookup($frame_textencoding);
-
-			$parsedFrame['data']         = (string) substr($parsedFrame['data'], $frame_offset);
-			if (!empty($parsedFrame['framenameshort']) && !empty($parsedFrame['data'])) {
-				$info['id3v2']['comments'][$parsedFrame['framenameshort']][] = getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $parsedFrame['data']);
-			}
-			unset($parsedFrame['data']);
-
-
-		} elseif (($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'OWNE')) { // 4.23  OWNE Ownership frame (ID3v2.3+ only)
-			//   There may only be one 'OWNE' frame in a tag
-			// <Header for 'Ownership frame', ID: 'OWNE'>
-			// Text encoding     $xx
-			// Price paid        <text string> $00
-			// Date of purch.    <text string>
-			// Seller            <text string according to encoding>
-
-			$frame_offset = 0;
-			$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
-				$info['warning'][] = 'Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding';
-			}
-			$parsedFrame['encodingid'] = $frame_textencoding;
-			$parsedFrame['encoding']   = $this->TextEncodingNameLookup($frame_textencoding);
-
-			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
-			$frame_pricepaid = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-			$frame_offset = $frame_terminatorpos + strlen("\x00");
-
-			$parsedFrame['pricepaid']['currencyid'] = substr($frame_pricepaid, 0, 3);
-			$parsedFrame['pricepaid']['currency']   = $this->LookupCurrencyUnits($parsedFrame['pricepaid']['currencyid']);
-			$parsedFrame['pricepaid']['value']      = substr($frame_pricepaid, 3);
-
-			$parsedFrame['purchasedate'] = substr($parsedFrame['data'], $frame_offset, 8);
-			if (!$this->IsValidDateStampString($parsedFrame['purchasedate'])) {
-				$parsedFrame['purchasedateunix'] = mktime (0, 0, 0, substr($parsedFrame['purchasedate'], 4, 2), substr($parsedFrame['purchasedate'], 6, 2), substr($parsedFrame['purchasedate'], 0, 4));
-			}
-			$frame_offset += 8;
-
-			$parsedFrame['seller'] = (string) substr($parsedFrame['data'], $frame_offset);
-			unset($parsedFrame['data']);
-
-
-		} elseif (($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'COMR')) { // 4.24  COMR Commercial frame (ID3v2.3+ only)
-			//   There may be more than one 'commercial frame' in a tag,
-			//   but no two may be identical
-			// <Header for 'Commercial frame', ID: 'COMR'>
-			// Text encoding      $xx
-			// Price string       <text string> $00
-			// Valid until        <text string>
-			// Contact URL        <text string> $00
-			// Received as        $xx
-			// Name of seller     <text string according to encoding> $00 (00)
-			// Description        <text string according to encoding> $00 (00)
-			// Picture MIME type  <string> $00
-			// Seller logo        <binary data>
-
-			$frame_offset = 0;
-			$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$frame_textencoding_terminator = $this->TextEncodingTerminatorLookup($frame_textencoding);
-			if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
-				$info['warning'][] = 'Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding';
-				$frame_textencoding_terminator = "\x00";
-			}
-
-			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
-			$frame_pricestring = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-			$frame_offset = $frame_terminatorpos + strlen("\x00");
-			$frame_rawpricearray = explode('/', $frame_pricestring);
-			foreach ($frame_rawpricearray as $key => $val) {
-				$frame_currencyid = substr($val, 0, 3);
-				$parsedFrame['price'][$frame_currencyid]['currency'] = $this->LookupCurrencyUnits($frame_currencyid);
-				$parsedFrame['price'][$frame_currencyid]['value']    = substr($val, 3);
-			}
-
-			$frame_datestring = substr($parsedFrame['data'], $frame_offset, 8);
-			$frame_offset += 8;
-
-			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
-			$frame_contacturl = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-			$frame_offset = $frame_terminatorpos + strlen("\x00");
-
-			$frame_receivedasid = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-
-			$frame_terminatorpos = strpos($parsedFrame['data'], $frame_textencoding_terminator, $frame_offset);
-			if (ord(substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
-				$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
-			}
-			$frame_sellername = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-			if (ord($frame_sellername) === 0) {
-				$frame_sellername = '';
-			}
-			$frame_offset = $frame_terminatorpos + strlen($frame_textencoding_terminator);
-
-			$frame_terminatorpos = strpos($parsedFrame['data'], $frame_textencoding_terminator, $frame_offset);
-			if (ord(substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
-				$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
-			}
-			$frame_description = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-			if (ord($frame_description) === 0) {
-				$frame_description = '';
-			}
-			$frame_offset = $frame_terminatorpos + strlen($frame_textencoding_terminator);
-
-			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
-			$frame_mimetype = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-			$frame_offset = $frame_terminatorpos + strlen("\x00");
-
-			$frame_sellerlogo = substr($parsedFrame['data'], $frame_offset);
-
-			$parsedFrame['encodingid']        = $frame_textencoding;
-			$parsedFrame['encoding']          = $this->TextEncodingNameLookup($frame_textencoding);
-
-			$parsedFrame['pricevaliduntil']   = $frame_datestring;
-			$parsedFrame['contacturl']        = $frame_contacturl;
-			$parsedFrame['receivedasid']      = $frame_receivedasid;
-			$parsedFrame['receivedas']        = $this->COMRReceivedAsLookup($frame_receivedasid);
-			$parsedFrame['sellername']        = $frame_sellername;
-			$parsedFrame['description']       = $frame_description;
-			$parsedFrame['mime']              = $frame_mimetype;
-			$parsedFrame['logo']              = $frame_sellerlogo;
-			unset($parsedFrame['data']);
-
-
-		} elseif (($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'ENCR')) { // 4.25  ENCR Encryption method registration (ID3v2.3+ only)
-			//   There may be several 'ENCR' frames in a tag,
-			//   but only one containing the same symbol
-			//   and only one containing the same owner identifier
-			// <Header for 'Encryption method registration', ID: 'ENCR'>
-			// Owner identifier    <text string> $00
-			// Method symbol       $xx
-			// Encryption data     <binary data>
-
-			$frame_offset = 0;
-			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
-			$frame_ownerid = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-			if (ord($frame_ownerid) === 0) {
-				$frame_ownerid = '';
-			}
-			$frame_offset = $frame_terminatorpos + strlen("\x00");
-
-			$parsedFrame['ownerid']      = $frame_ownerid;
-			$parsedFrame['methodsymbol'] = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$parsedFrame['data']         = (string) substr($parsedFrame['data'], $frame_offset);
-
-
-		} elseif (($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'GRID')) { // 4.26  GRID Group identification registration (ID3v2.3+ only)
-
-			//   There may be several 'GRID' frames in a tag,
-			//   but only one containing the same symbol
-			//   and only one containing the same owner identifier
-			// <Header for 'Group ID registration', ID: 'GRID'>
-			// Owner identifier      <text string> $00
-			// Group symbol          $xx
-			// Group dependent data  <binary data>
-
-			$frame_offset = 0;
-			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
-			$frame_ownerid = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-			if (ord($frame_ownerid) === 0) {
-				$frame_ownerid = '';
-			}
-			$frame_offset = $frame_terminatorpos + strlen("\x00");
-
-			$parsedFrame['ownerid']       = $frame_ownerid;
-			$parsedFrame['groupsymbol']   = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$parsedFrame['data']          = (string) substr($parsedFrame['data'], $frame_offset);
-
-
-		} elseif (($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'PRIV')) { // 4.27  PRIV Private frame (ID3v2.3+ only)
-			//   The tag may contain more than one 'PRIV' frame
-			//   but only with different contents
-			// <Header for 'Private frame', ID: 'PRIV'>
-			// Owner identifier      <text string> $00
-			// The private data      <binary data>
-
-			$frame_offset = 0;
-			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
-			$frame_ownerid = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
-			if (ord($frame_ownerid) === 0) {
-				$frame_ownerid = '';
-			}
-			$frame_offset = $frame_terminatorpos + strlen("\x00");
-
-			$parsedFrame['ownerid'] = $frame_ownerid;
-			$parsedFrame['data']    = (string) substr($parsedFrame['data'], $frame_offset);
-
-
-		} elseif (($id3v2_majorversion >= 4) && ($parsedFrame['frame_name'] == 'SIGN')) { // 4.28  SIGN Signature frame (ID3v2.4+ only)
-			//   There may be more than one 'signature frame' in a tag,
-			//   but no two may be identical
-			// <Header for 'Signature frame', ID: 'SIGN'>
-			// Group symbol      $xx
-			// Signature         <binary data>
-
-			$frame_offset = 0;
-			$parsedFrame['groupsymbol'] = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$parsedFrame['data']        = (string) substr($parsedFrame['data'], $frame_offset);
-
-
-		} elseif (($id3v2_majorversion >= 4) && ($parsedFrame['frame_name'] == 'SEEK')) { // 4.29  SEEK Seek frame (ID3v2.4+ only)
-			//   There may only be one 'seek frame' in a tag
-			// <Header for 'Seek frame', ID: 'SEEK'>
-			// Minimum offset to next tag       $xx xx xx xx
-
-			$frame_offset = 0;
-			$parsedFrame['data']          = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
-
-
-		} elseif (($id3v2_majorversion >= 4) && ($parsedFrame['frame_name'] == 'ASPI')) { // 4.30  ASPI Audio seek point index (ID3v2.4+ only)
-			//   There may only be one 'audio seek point index' frame in a tag
-			// <Header for 'Seek Point Index', ID: 'ASPI'>
-			// Indexed data start (S)         $xx xx xx xx
-			// Indexed data length (L)        $xx xx xx xx
-			// Number of index points (N)     $xx xx
-			// Bits per index point (b)       $xx
-			//   Then for every index point the following data is included:
-			// Fraction at index (Fi)          $xx (xx)
-
-			$frame_offset = 0;
-			$parsedFrame['datastart'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
-			$frame_offset += 4;
-			$parsedFrame['indexeddatalength'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
-			$frame_offset += 4;
-			$parsedFrame['indexpoints'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 2));
-			$frame_offset += 2;
-			$parsedFrame['bitsperpoint'] = ord(substr($parsedFrame['data'], $frame_offset++, 1));
-			$frame_bytesperpoint = ceil($parsedFrame['bitsperpoint'] / 8);
-			for ($i = 0; $i < $parsedFrame['indexpoints']; $i++) {
-				$parsedFrame['indexes'][$i] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesperpoint));
-				$frame_offset += $frame_bytesperpoint;
-			}
-			unset($parsedFrame['data']);
-
-		} elseif (($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'RGAD')) { // Replay Gain Adjustment
-			// http://privatewww.essex.ac.uk/~djmrob/replaygain/file_format_id3v2.html
-			//   There may only be one 'RGAD' frame in a tag
-			// <Header for 'Replay Gain Adjustment', ID: 'RGAD'>
-			// Peak Amplitude                      $xx $xx $xx $xx
-			// Radio Replay Gain Adjustment        %aaabbbcd %dddddddd
-			// Audiophile Replay Gain Adjustment   %aaabbbcd %dddddddd
-			//   a - name code
-			//   b - originator code
-			//   c - sign bit
-			//   d - replay gain adjustment
-
-			$frame_offset = 0;
-			$parsedFrame['peakamplitude'] = getid3_lib::BigEndian2Float(substr($parsedFrame['data'], $frame_offset, 4));
-			$frame_offset += 4;
-			$rg_track_adjustment = getid3_lib::Dec2Bin(substr($parsedFrame['data'], $frame_offset, 2));
-			$frame_offset += 2;
-			$rg_album_adjustment = getid3_lib::Dec2Bin(substr($parsedFrame['data'], $frame_offset, 2));
-			$frame_offset += 2;
-			$parsedFrame['raw']['track']['name']       = getid3_lib::Bin2Dec(substr($rg_track_adjustment, 0, 3));
-			$parsedFrame['raw']['track']['originator'] = getid3_lib::Bin2Dec(substr($rg_track_adjustment, 3, 3));
-			$parsedFrame['raw']['track']['signbit']    = getid3_lib::Bin2Dec(substr($rg_track_adjustment, 6, 1));
-			$parsedFrame['raw']['track']['adjustment'] = getid3_lib::Bin2Dec(substr($rg_track_adjustment, 7, 9));
-			$parsedFrame['raw']['album']['name']       = getid3_lib::Bin2Dec(substr($rg_album_adjustment, 0, 3));
-			$parsedFrame['raw']['album']['originator'] = getid3_lib::Bin2Dec(substr($rg_album_adjustment, 3, 3));
-			$parsedFrame['raw']['album']['signbit']    = getid3_lib::Bin2Dec(substr($rg_album_adjustment, 6, 1));
-			$parsedFrame['raw']['album']['adjustment'] = getid3_lib::Bin2Dec(substr($rg_album_adjustment, 7, 9));
-			$parsedFrame['track']['name']       = getid3_lib::RGADnameLookup($parsedFrame['raw']['track']['name']);
-			$parsedFrame['track']['originator'] = getid3_lib::RGADoriginatorLookup($parsedFrame['raw']['track']['originator']);
-			$parsedFrame['track']['adjustment'] = getid3_lib::RGADadjustmentLookup($parsedFrame['raw']['track']['adjustment'], $parsedFrame['raw']['track']['signbit']);
-			$parsedFrame['album']['name']       = getid3_lib::RGADnameLookup($parsedFrame['raw']['album']['name']);
-			$parsedFrame['album']['originator'] = getid3_lib::RGADoriginatorLookup($parsedFrame['raw']['album']['originator']);
-			$parsedFrame['album']['adjustment'] = getid3_lib::RGADadjustmentLookup($parsedFrame['raw']['album']['adjustment'], $parsedFrame['raw']['album']['signbit']);
-
-			$info['replay_gain']['track']['peak']       = $parsedFrame['peakamplitude'];
-			$info['replay_gain']['track']['originator'] = $parsedFrame['track']['originator'];
-			$info['replay_gain']['track']['adjustment'] = $parsedFrame['track']['adjustment'];
-			$info['replay_gain']['album']['originator'] = $parsedFrame['album']['originator'];
-			$info['replay_gain']['album']['adjustment'] = $parsedFrame['album']['adjustment'];
-
-			unset($parsedFrame['data']);
-
-		} elseif (($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'CHAP')) { // CHAP Chapters frame (ID3v2.3+ only)
-			// http://id3.org/id3v2-chapters-1.0
-			// <ID3v2.3 or ID3v2.4 frame header, ID: "CHAP">           (10 bytes)
-			// Element ID      <text string> $00
-			// Start time      $xx xx xx xx
-			// End time        $xx xx xx xx
-            // Start offset    $xx xx xx xx
-            // End offset      $xx xx xx xx
-            // <Optional embedded sub-frames>
-
-			$frame_offset = 0;
-			@list($parsedFrame['element_id']) = explode("\x00", $parsedFrame['data'], 2);
-			$frame_offset += strlen($parsedFrame['element_id']."\x00");
-			$parsedFrame['time_begin'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
-			$frame_offset += 4;
-			$parsedFrame['time_end']   = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
-			$frame_offset += 4;
-			if (substr($parsedFrame['data'], $frame_offset, 4) != "\xFF\xFF\xFF\xFF") {
-				// "If these bytes are all set to 0xFF then the value should be ignored and the start time value should be utilized."
-				$parsedFrame['offset_begin'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
-			}
-			$frame_offset += 4;
-			if (substr($parsedFrame['data'], $frame_offset, 4) != "\xFF\xFF\xFF\xFF") {
-				// "If these bytes are all set to 0xFF then the value should be ignored and the start time value should be utilized."
-				$parsedFrame['offset_end']   = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
-			}
-			$frame_offset += 4;
-
-			if ($frame_offset < strlen($parsedFrame['data'])) {
-				$parsedFrame['subframes'] = array();
-				while ($frame_offset < strlen($parsedFrame['data'])) {
-					// <Optional embedded sub-frames>
-					$subframe = array();
-					$subframe['name']      =                           substr($parsedFrame['data'], $frame_offset, 4);
-					$frame_offset += 4;
-					$subframe['size']      = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
-					$frame_offset += 4;
-					$subframe['flags_raw'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 2));
-					$frame_offset += 2;
-					if ($subframe['size'] > (strlen($parsedFrame['data']) - $frame_offset)) {
-						$info['warning'][] = 'CHAP subframe "'.$subframe['name'].'" at frame offset '.$frame_offset.' claims to be "'.$subframe['size'].'" bytes, which is more than the available data ('.(strlen($parsedFrame['data']) - $frame_offset).' bytes)';
-						break;
-					}
-					$subframe_rawdata = substr($parsedFrame['data'], $frame_offset, $subframe['size']);
-					$frame_offset += $subframe['size'];
-
-					$subframe['encodingid'] = ord(substr($subframe_rawdata, 0, 1));
-					$subframe['text']       =     substr($subframe_rawdata, 1);
-					$subframe['encoding']   = $this->TextEncodingNameLookup($subframe['encodingid']);
-					$encoding_converted_text = trim(getid3_lib::iconv_fallback($subframe['encoding'], $info['encoding'], $subframe['text']));;
-					switch (substr($encoding_converted_text, 0, 2)) {
-						case "\xFF\xFE":
-						case "\xFE\xFF":
-							switch (strtoupper($info['id3v2']['encoding'])) {
-								case 'ISO-8859-1':
-								case 'UTF-8':
-									$encoding_converted_text = substr($encoding_converted_text, 2);
-									// remove unwanted byte-order-marks
-									break;
-								default:
-									// ignore
-									break;
-							}
-							break;
-						default:
-							// do not remove BOM
-							break;
-					}
-
-					if (($subframe['name'] == 'TIT2') || ($subframe['name'] == 'TIT3')) {
-						if ($subframe['name'] == 'TIT2') {
-							$parsedFrame['chapter_name']        = $encoding_converted_text;
-						} elseif ($subframe['name'] == 'TIT3') {
-							$parsedFrame['chapter_description'] = $encoding_converted_text;
-						}
-						$parsedFrame['subframes'][] = $subframe;
-					} else {
-						$info['warning'][] = 'ID3v2.CHAP subframe "'.$subframe['name'].'" not handled (only TIT2 and TIT3)';
-					}
-				}
-				unset($subframe_rawdata, $subframe, $encoding_converted_text);
-			}
-
-			$id3v2_chapter_entry = array();
-			foreach (array('id', 'time_begin', 'time_end', 'offset_begin', 'offset_end', 'chapter_name', 'chapter_description') as $id3v2_chapter_key) {
-				if (isset($parsedFrame[$id3v2_chapter_key])) {
-					$id3v2_chapter_entry[$id3v2_chapter_key] = $parsedFrame[$id3v2_chapter_key];
-				}
-			}
-			if (!isset($info['id3v2']['chapters'])) {
-				$info['id3v2']['chapters'] = array();
-			}
-			$info['id3v2']['chapters'][] = $id3v2_chapter_entry;
-			unset($id3v2_chapter_entry, $id3v2_chapter_key);
-
-
-		} elseif (($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'CTOC')) { // CTOC Chapters Table Of Contents frame (ID3v2.3+ only)
-			// http://id3.org/id3v2-chapters-1.0
-			// <ID3v2.3 or ID3v2.4 frame header, ID: "CTOC">           (10 bytes)
-			// Element ID      <text string> $00
-			// CTOC flags        %xx
-			// Entry count       $xx
-			// Child Element ID  <string>$00   /* zero or more child CHAP or CTOC entries */
-            // <Optional embedded sub-frames>
-
-			$frame_offset = 0;
-			@list($parsedFrame['element_id']) = explode("\x00", $parsedFrame['data'], 2);
-			$frame_offset += strlen($parsedFrame['element_id']."\x00");
-			$ctoc_flags_raw = ord(substr($parsedFrame['data'], $frame_offset, 1));
-			$frame_offset += 1;
-			$parsedFrame['entry_count'] = ord(substr($parsedFrame['data'], $frame_offset, 1));
-			$frame_offset += 1;
-
-			$terminator_position = null;
-			for ($i = 0; $i < $parsedFrame['entry_count']; $i++) {
-				$terminator_position = strpos($parsedFrame['data'], "\x00", $frame_offset);
-				$parsedFrame['child_element_ids'][$i] = substr($parsedFrame['data'], $frame_offset, $terminator_position - $frame_offset);
-				$frame_offset = $terminator_position + 1;
-			}
-
-			$parsedFrame['ctoc_flags']['ordered']   = (bool) ($ctoc_flags_raw & 0x01);
-			$parsedFrame['ctoc_flags']['top_level'] = (bool) ($ctoc_flags_raw & 0x03);
-
-			unset($ctoc_flags_raw, $terminator_position);
-
-			if ($frame_offset < strlen($parsedFrame['data'])) {
-				$parsedFrame['subframes'] = array();
-				while ($frame_offset < strlen($parsedFrame['data'])) {
-					// <Optional embedded sub-frames>
-					$subframe = array();
-					$subframe['name']      =                           substr($parsedFrame['data'], $frame_offset, 4);
-					$frame_offset += 4;
-					$subframe['size']      = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
-					$frame_offset += 4;
-					$subframe['flags_raw'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 2));
-					$frame_offset += 2;
-					if ($subframe['size'] > (strlen($parsedFrame['data']) - $frame_offset)) {
-						$info['warning'][] = 'CTOS subframe "'.$subframe['name'].'" at frame offset '.$frame_offset.' claims to be "'.$subframe['size'].'" bytes, which is more than the available data ('.(strlen($parsedFrame['data']) - $frame_offset).' bytes)';
-						break;
-					}
-					$subframe_rawdata = substr($parsedFrame['data'], $frame_offset, $subframe['size']);
-					$frame_offset += $subframe['size'];
-
-					$subframe['encodingid'] = ord(substr($subframe_rawdata, 0, 1));
-					$subframe['text']       =     substr($subframe_rawdata, 1);
-					$subframe['encoding']   = $this->TextEncodingNameLookup($subframe['encodingid']);
-					$encoding_converted_text = trim(getid3_lib::iconv_fallback($subframe['encoding'], $info['encoding'], $subframe['text']));;
-					switch (substr($encoding_converted_text, 0, 2)) {
-						case "\xFF\xFE":
-						case "\xFE\xFF":
-							switch (strtoupper($info['id3v2']['encoding'])) {
-								case 'ISO-8859-1':
-								case 'UTF-8':
-									$encoding_converted_text = substr($encoding_converted_text, 2);
-									// remove unwanted byte-order-marks
-									break;
-								default:
-									// ignore
-									break;
-							}
-							break;
-						default:
-							// do not remove BOM
-							break;
-					}
-
-					if (($subframe['name'] == 'TIT2') || ($subframe['name'] == 'TIT3')) {
-						if ($subframe['name'] == 'TIT2') {
-							$parsedFrame['toc_name']        = $encoding_converted_text;
-						} elseif ($subframe['name'] == 'TIT3') {
-							$parsedFrame['toc_description'] = $encoding_converted_text;
-						}
-						$parsedFrame['subframes'][] = $subframe;
-					} else {
-						$info['warning'][] = 'ID3v2.CTOC subframe "'.$subframe['name'].'" not handled (only TIT2 and TIT3)';
-					}
-				}
-				unset($subframe_rawdata, $subframe, $encoding_converted_text);
-			}
-
-		}
-
-		return true;
-	}
-
-
-	public function DeUnsynchronise($data) {
-		return str_replace("\xFF\x00", "\xFF", $data);
-	}
-
-	public function LookupExtendedHeaderRestrictionsTagSizeLimits($index) {
-		static $LookupExtendedHeaderRestrictionsTagSizeLimits = array(
-			0x00 => 'No more than 128 frames and 1 MB total tag size',
-			0x01 => 'No more than 64 frames and 128 KB total tag size',
-			0x02 => 'No more than 32 frames and 40 KB total tag size',
-			0x03 => 'No more than 32 frames and 4 KB total tag size',
-		);
-		return (isset($LookupExtendedHeaderRestrictionsTagSizeLimits[$index]) ? $LookupExtendedHeaderRestrictionsTagSizeLimits[$index] : '');
-	}
-
-	public function LookupExtendedHeaderRestrictionsTextEncodings($index) {
-		static $LookupExtendedHeaderRestrictionsTextEncodings = array(
-			0x00 => 'No restrictions',
-			0x01 => 'Strings are only encoded with ISO-8859-1 or UTF-8',
-		);
-		return (isset($LookupExtendedHeaderRestrictionsTextEncodings[$index]) ? $LookupExtendedHeaderRestrictionsTextEncodings[$index] : '');
-	}
-
-	public function LookupExtendedHeaderRestrictionsTextFieldSize($index) {
-		static $LookupExtendedHeaderRestrictionsTextFieldSize = array(
-			0x00 => 'No restrictions',
-			0x01 => 'No string is longer than 1024 characters',
-			0x02 => 'No string is longer than 128 characters',
-			0x03 => 'No string is longer than 30 characters',
-		);
-		return (isset($LookupExtendedHeaderRestrictionsTextFieldSize[$index]) ? $LookupExtendedHeaderRestrictionsTextFieldSize[$index] : '');
-	}
-
-	public function LookupExtendedHeaderRestrictionsImageEncoding($index) {
-		static $LookupExtendedHeaderRestrictionsImageEncoding = array(
-			0x00 => 'No restrictions',
-			0x01 => 'Images are encoded only with PNG or JPEG',
-		);
-		return (isset($LookupExtendedHeaderRestrictionsImageEncoding[$index]) ? $LookupExtendedHeaderRestrictionsImageEncoding[$index] : '');
-	}
-
-	public function LookupExtendedHeaderRestrictionsImageSizeSize($index) {
-		static $LookupExtendedHeaderRestrictionsImageSizeSize = array(
-			0x00 => 'No restrictions',
-			0x01 => 'All images are 256x256 pixels or smaller',
-			0x02 => 'All images are 64x64 pixels or smaller',
-			0x03 => 'All images are exactly 64x64 pixels, unless required otherwise',
-		);
-		return (isset($LookupExtendedHeaderRestrictionsImageSizeSize[$index]) ? $LookupExtendedHeaderRestrictionsImageSizeSize[$index] : '');
-	}
-
-	public function LookupCurrencyUnits($currencyid) {
-
-		$begin = __LINE__;
-
-		/** This is not a comment!
-
-
-			AED	Dirhams
-			AFA	Afghanis
-			ALL	Leke
-			AMD	Drams
-			ANG	Guilders
-			AOA	Kwanza
-			ARS	Pesos
-			ATS	Schillings
-			AUD	Dollars
-			AWG	Guilders
-			AZM	Manats
-			BAM	Convertible Marka
-			BBD	Dollars
-			BDT	Taka
-			BEF	Francs
-			BGL	Leva
-			BHD	Dinars
-			BIF	Francs
-			BMD	Dollars
-			BND	Dollars
-			BOB	Bolivianos
-			BRL	Brazil Real
-			BSD	Dollars
-			BTN	Ngultrum
-			BWP	Pulas
-			BYR	Rubles
-			BZD	Dollars
-			CAD	Dollars
-			CDF	Congolese Francs
-			CHF	Francs
-			CLP	Pesos
-			CNY	Yuan Renminbi
-			COP	Pesos
-			CRC	Colones
-			CUP	Pesos
-			CVE	Escudos
-			CYP	Pounds
-			CZK	Koruny
-			DEM	Deutsche Marks
-			DJF	Francs
-			DKK	Kroner
-			DOP	Pesos
-			DZD	Algeria Dinars
-			EEK	Krooni
-			EGP	Pounds
-			ERN	Nakfa
-			ESP	Pesetas
-			ETB	Birr
-			EUR	Euro
-			FIM	Markkaa
-			FJD	Dollars
-			FKP	Pounds
-			FRF	Francs
-			GBP	Pounds
-			GEL	Lari
-			GGP	Pounds
-			GHC	Cedis
-			GIP	Pounds
-			GMD	Dalasi
-			GNF	Francs
-			GRD	Drachmae
-			GTQ	Quetzales
-			GYD	Dollars
-			HKD	Dollars
-			HNL	Lempiras
-			HRK	Kuna
-			HTG	Gourdes
-			HUF	Forints
-			IDR	Rupiahs
-			IEP	Pounds
-			ILS	New Shekels
-			IMP	Pounds
-			INR	Rupees
-			IQD	Dinars
-			IRR	Rials
-			ISK	Kronur
-			ITL	Lire
-			JEP	Pounds
-			JMD	Dollars
-			JOD	Dinars
-			JPY	Yen
-			KES	Shillings
-			KGS	Soms
-			KHR	Riels
-			KMF	Francs
-			KPW	Won
-			KWD	Dinars
-			KYD	Dollars
-			KZT	Tenge
-			LAK	Kips
-			LBP	Pounds
-			LKR	Rupees
-			LRD	Dollars
-			LSL	Maloti
-			LTL	Litai
-			LUF	Francs
-			LVL	Lati
-			LYD	Dinars
-			MAD	Dirhams
-			MDL	Lei
-			MGF	Malagasy Francs
-			MKD	Denars
-			MMK	Kyats
-			MNT	Tugriks
-			MOP	Patacas
-			MRO	Ouguiyas
-			MTL	Liri
-			MUR	Rupees
-			MVR	Rufiyaa
-			MWK	Kwachas
-			MXN	Pesos
-			MYR	Ringgits
-			MZM	Meticais
-			NAD	Dollars
-			NGN	Nairas
-			NIO	Gold Cordobas
-			NLG	Guilders
-			NOK	Krone
-			NPR	Nepal Rupees
-			NZD	Dollars
-			OMR	Rials
-			PAB	Balboa
-			PEN	Nuevos Soles
-			PGK	Kina
-			PHP	Pesos
-			PKR	Rupees
-			PLN	Zlotych
-			PTE	Escudos
-			PYG	Guarani
-			QAR	Rials
-			ROL	Lei
-			RUR	Rubles
-			RWF	Rwanda Francs
-			SAR	Riyals
-			SBD	Dollars
-			SCR	Rupees
-			SDD	Dinars
-			SEK	Kronor
-			SGD	Dollars
-			SHP	Pounds
-			SIT	Tolars
-			SKK	Koruny
-			SLL	Leones
-			SOS	Shillings
-			SPL	Luigini
-			SRG	Guilders
-			STD	Dobras
-			SVC	Colones
-			SYP	Pounds
-			SZL	Emalangeni
-			THB	Baht
-			TJR	Rubles
-			TMM	Manats
-			TND	Dinars
-			TOP	Pa'anga
-			TRL	Liras
-			TTD	Dollars
-			TVD	Tuvalu Dollars
-			TWD	New Dollars
-			TZS	Shillings
-			UAH	Hryvnia
-			UGX	Shillings
-			USD	Dollars
-			UYU	Pesos
-			UZS	Sums
-			VAL	Lire
-			VEB	Bolivares
-			VND	Dong
-			VUV	Vatu
-			WST	Tala
-			XAF	Francs
-			XAG	Ounces
-			XAU	Ounces
-			XCD	Dollars
-			XDR	Special Drawing Rights
-			XPD	Ounces
-			XPF	Francs
-			XPT	Ounces
-			YER	Rials
-			YUM	New Dinars
-			ZAR	Rand
-			ZMK	Kwacha
-			ZWD	Zimbabwe Dollars
-
-		*/
-
-		return getid3_lib::EmbeddedLookup($currencyid, $begin, __LINE__, __FILE__, 'id3v2-currency-units');
-	}
-
-
-	public function LookupCurrencyCountry($currencyid) {
-
-		$begin = __LINE__;
-
-		/** This is not a comment!
-
-			AED	United Arab Emirates
-			AFA	Afghanistan
-			ALL	Albania
-			AMD	Armenia
-			ANG	Netherlands Antilles
-			AOA	Angola
-			ARS	Argentina
-			ATS	Austria
-			AUD	Australia
-			AWG	Aruba
-			AZM	Azerbaijan
-			BAM	Bosnia and Herzegovina
-			BBD	Barbados
-			BDT	Bangladesh
-			BEF	Belgium
-			BGL	Bulgaria
-			BHD	Bahrain
-			BIF	Burundi
-			BMD	Bermuda
-			BND	Brunei Darussalam
-			BOB	Bolivia
-			BRL	Brazil
-			BSD	Bahamas
-			BTN	Bhutan
-			BWP	Botswana
-			BYR	Belarus
-			BZD	Belize
-			CAD	Canada
-			CDF	Congo/Kinshasa
-			CHF	Switzerland
-			CLP	Chile
-			CNY	China
-			COP	Colombia
-			CRC	Costa Rica
-			CUP	Cuba
-			CVE	Cape Verde
-			CYP	Cyprus
-			CZK	Czech Republic
-			DEM	Germany
-			DJF	Djibouti
-			DKK	Denmark
-			DOP	Dominican Republic
-			DZD	Algeria
-			EEK	Estonia
-			EGP	Egypt
-			ERN	Eritrea
-			ESP	Spain
-			ETB	Ethiopia
-			EUR	Euro Member Countries
-			FIM	Finland
-			FJD	Fiji
-			FKP	Falkland Islands (Malvinas)
-			FRF	France
-			GBP	United Kingdom
-			GEL	Georgia
-			GGP	Guernsey
-			GHC	Ghana
-			GIP	Gibraltar
-			GMD	Gambia
-			GNF	Guinea
-			GRD	Greece
-			GTQ	Guatemala
-			GYD	Guyana
-			HKD	Hong Kong
-			HNL	Honduras
-			HRK	Croatia
-			HTG	Haiti
-			HUF	Hungary
-			IDR	Indonesia
-			IEP	Ireland (Eire)
-			ILS	Israel
-			IMP	Isle of Man
-			INR	India
-			IQD	Iraq
-			IRR	Iran
-			ISK	Iceland
-			ITL	Italy
-			JEP	Jersey
-			JMD	Jamaica
-			JOD	Jordan
-			JPY	Japan
-			KES	Kenya
-			KGS	Kyrgyzstan
-			KHR	Cambodia
-			KMF	Comoros
-			KPW	Korea
-			KWD	Kuwait
-			KYD	Cayman Islands
-			KZT	Kazakstan
-			LAK	Laos
-			LBP	Lebanon
-			LKR	Sri Lanka
-			LRD	Liberia
-			LSL	Lesotho
-			LTL	Lithuania
-			LUF	Luxembourg
-			LVL	Latvia
-			LYD	Libya
-			MAD	Morocco
-			MDL	Moldova
-			MGF	Madagascar
-			MKD	Macedonia
-			MMK	Myanmar (Burma)
-			MNT	Mongolia
-			MOP	Macau
-			MRO	Mauritania
-			MTL	Malta
-			MUR	Mauritius
-			MVR	Maldives (Maldive Islands)
-			MWK	Malawi
-			MXN	Mexico
-			MYR	Malaysia
-			MZM	Mozambique
-			NAD	Namibia
-			NGN	Nigeria
-			NIO	Nicaragua
-			NLG	Netherlands (Holland)
-			NOK	Norway
-			NPR	Nepal
-			NZD	New Zealand
-			OMR	Oman
-			PAB	Panama
-			PEN	Peru
-			PGK	Papua New Guinea
-			PHP	Philippines
-			PKR	Pakistan
-			PLN	Poland
-			PTE	Portugal
-			PYG	Paraguay
-			QAR	Qatar
-			ROL	Romania
-			RUR	Russia
-			RWF	Rwanda
-			SAR	Saudi Arabia
-			SBD	Solomon Islands
-			SCR	Seychelles
-			SDD	Sudan
-			SEK	Sweden
-			SGD	Singapore
-			SHP	Saint Helena
-			SIT	Slovenia
-			SKK	Slovakia
-			SLL	Sierra Leone
-			SOS	Somalia
-			SPL	Seborga
-			SRG	Suriname
-			STD	São Tome and Principe
-			SVC	El Salvador
-			SYP	Syria
-			SZL	Swaziland
-			THB	Thailand
-			TJR	Tajikistan
-			TMM	Turkmenistan
-			TND	Tunisia
-			TOP	Tonga
-			TRL	Turkey
-			TTD	Trinidad and Tobago
-			TVD	Tuvalu
-			TWD	Taiwan
-			TZS	Tanzania
-			UAH	Ukraine
-			UGX	Uganda
-			USD	United States of America
-			UYU	Uruguay
-			UZS	Uzbekistan
-			VAL	Vatican City
-			VEB	Venezuela
-			VND	Viet Nam
-			VUV	Vanuatu
-			WST	Samoa
-			XAF	Communauté Financière Africaine
-			XAG	Silver
-			XAU	Gold
-			XCD	East Caribbean
-			XDR	International Monetary Fund
-			XPD	Palladium
-			XPF	Comptoirs Français du Pacifique
-			XPT	Platinum
-			YER	Yemen
-			YUM	Yugoslavia
-			ZAR	South Africa
-			ZMK	Zambia
-			ZWD	Zimbabwe
-
-		*/
-
-		return getid3_lib::EmbeddedLookup($currencyid, $begin, __LINE__, __FILE__, 'id3v2-currency-country');
-	}
-
-
-
-	public static function LanguageLookup($languagecode, $casesensitive=false) {
-
-		if (!$casesensitive) {
-			$languagecode = strtolower($languagecode);
-		}
-
-		// http://www.id3.org/id3v2.4.0-structure.txt
-		// [4.   ID3v2 frame overview]
-		// The three byte language field, present in several frames, is used to
-		// describe the language of the frame's content, according to ISO-639-2
-		// [ISO-639-2]. The language should be represented in lower case. If the
-		// language is not known the string "XXX" should be used.
-
-
-		// ISO 639-2 - http://www.id3.org/iso639-2.html
-
-		$begin = __LINE__;
-
-		/** This is not a comment!
-
-			XXX	unknown
-			xxx	unknown
-			aar	Afar
-			abk	Abkhazian
-			ace	Achinese
-			ach	Acoli
-			ada	Adangme
-			afa	Afro-Asiatic (Other)
-			afh	Afrihili
-			afr	Afrikaans
-			aka	Akan
-			akk	Akkadian
-			alb	Albanian
-			ale	Aleut
-			alg	Algonquian Languages
-			amh	Amharic
-			ang	English, Old (ca. 450-1100)
-			apa	Apache Languages
-			ara	Arabic
-			arc	Aramaic
-			arm	Armenian
-			arn	Araucanian
-			arp	Arapaho
-			art	Artificial (Other)
-			arw	Arawak
-			asm	Assamese
-			ath	Athapascan Languages
-			ava	Avaric
-			ave	Avestan
-			awa	Awadhi
-			aym	Aymara
-			aze	Azerbaijani
-			bad	Banda
-			bai	Bamileke Languages
-			bak	Bashkir
-			bal	Baluchi
-			bam	Bambara
-			ban	Balinese
-			baq	Basque
-			bas	Basa
-			bat	Baltic (Other)
-			bej	Beja
-			bel	Byelorussian
-			bem	Bemba
-			ben	Bengali
-			ber	Berber (Other)
-			bho	Bhojpuri
-			bih	Bihari
-			bik	Bikol
-			bin	Bini
-			bis	Bislama
-			bla	Siksika
-			bnt	Bantu (Other)
-			bod	Tibetan
-			bra	Braj
-			bre	Breton
-			bua	Buriat
-			bug	Buginese
-			bul	Bulgarian
-			bur	Burmese
-			cad	Caddo
-			cai	Central American Indian (Other)
-			car	Carib
-			cat	Catalan
-			cau	Caucasian (Other)
-			ceb	Cebuano
-			cel	Celtic (Other)
-			ces	Czech
-			cha	Chamorro
-			chb	Chibcha
-			che	Chechen
-			chg	Chagatai
-			chi	Chinese
-			chm	Mari
-			chn	Chinook jargon
-			cho	Choctaw
-			chr	Cherokee
-			chu	Church Slavic
-			chv	Chuvash
-			chy	Cheyenne
-			cop	Coptic
-			cor	Cornish
-			cos	Corsican
-			cpe	Creoles and Pidgins, English-based (Other)
-			cpf	Creoles and Pidgins, French-based (Other)
-			cpp	Creoles and Pidgins, Portuguese-based (Other)
-			cre	Cree
-			crp	Creoles and Pidgins (Other)
-			cus	Cushitic (Other)
-			cym	Welsh
-			cze	Czech
-			dak	Dakota
-			dan	Danish
-			del	Delaware
-			deu	German
-			din	Dinka
-			div	Divehi
-			doi	Dogri
-			dra	Dravidian (Other)
-			dua	Duala
-			dum	Dutch, Middle (ca. 1050-1350)
-			dut	Dutch
-			dyu	Dyula
-			dzo	Dzongkha
-			efi	Efik
-			egy	Egyptian (Ancient)
-			eka	Ekajuk
-			ell	Greek, Modern (1453-)
-			elx	Elamite
-			eng	English
-			enm	English, Middle (ca. 1100-1500)
-			epo	Esperanto
-			esk	Eskimo (Other)
-			esl	Spanish
-			est	Estonian
-			eus	Basque
-			ewe	Ewe
-			ewo	Ewondo
-			fan	Fang
-			fao	Faroese
-			fas	Persian
-			fat	Fanti
-			fij	Fijian
-			fin	Finnish
-			fiu	Finno-Ugrian (Other)
-			fon	Fon
-			fra	French
-			fre	French
-			frm	French, Middle (ca. 1400-1600)
-			fro	French, Old (842- ca. 1400)
-			fry	Frisian
-			ful	Fulah
-			gaa	Ga
-			gae	Gaelic (Scots)
-			gai	Irish
-			gay	Gayo
-			gdh	Gaelic (Scots)
-			gem	Germanic (Other)
-			geo	Georgian
-			ger	German
-			gez	Geez
-			gil	Gilbertese
-			glg	Gallegan
-			gmh	German, Middle High (ca. 1050-1500)
-			goh	German, Old High (ca. 750-1050)
-			gon	Gondi
-			got	Gothic
-			grb	Grebo
-			grc	Greek, Ancient (to 1453)
-			gre	Greek, Modern (1453-)
-			grn	Guarani
-			guj	Gujarati
-			hai	Haida
-			hau	Hausa
-			haw	Hawaiian
-			heb	Hebrew
-			her	Herero
-			hil	Hiligaynon
-			him	Himachali
-			hin	Hindi
-			hmo	Hiri Motu
-			hun	Hungarian
-			hup	Hupa
-			hye	Armenian
-			iba	Iban
-			ibo	Igbo
-			ice	Icelandic
-			ijo	Ijo
-			iku	Inuktitut
-			ilo	Iloko
-			ina	Interlingua (International Auxiliary language Association)
-			inc	Indic (Other)
-			ind	Indonesian
-			ine	Indo-European (Other)
-			ine	Interlingue
-			ipk	Inupiak
-			ira	Iranian (Other)
-			iri	Irish
-			iro	Iroquoian uages
-			isl	Icelandic
-			ita	Italian
-			jav	Javanese
-			jaw	Javanese
-			jpn	Japanese
-			jpr	Judeo-Persian
-			jrb	Judeo-Arabic
-			kaa	Kara-Kalpak
-			kab	Kabyle
-			kac	Kachin
-			kal	Greenlandic
-			kam	Kamba
-			kan	Kannada
-			kar	Karen
-			kas	Kashmiri
-			kat	Georgian
-			kau	Kanuri
-			kaw	Kawi
-			kaz	Kazakh
-			kha	Khasi
-			khi	Khoisan (Other)
-			khm	Khmer
-			kho	Khotanese
-			kik	Kikuyu
-			kin	Kinyarwanda
-			kir	Kirghiz
-			kok	Konkani
-			kom	Komi
-			kon	Kongo
-			kor	Korean
-			kpe	Kpelle
-			kro	Kru
-			kru	Kurukh
-			kua	Kuanyama
-			kum	Kumyk
-			kur	Kurdish
-			kus	Kusaie
-			kut	Kutenai
-			lad	Ladino
-			lah	Lahnda
-			lam	Lamba
-			lao	Lao
-			lat	Latin
-			lav	Latvian
-			lez	Lezghian
-			lin	Lingala
-			lit	Lithuanian
-			lol	Mongo
-			loz	Lozi
-			ltz	Letzeburgesch
-			lub	Luba-Katanga
-			lug	Ganda
-			lui	Luiseno
-			lun	Lunda
-			luo	Luo (Kenya and Tanzania)
-			mac	Macedonian
-			mad	Madurese
-			mag	Magahi
-			mah	Marshall
-			mai	Maithili
-			mak	Macedonian
-			mak	Makasar
-			mal	Malayalam
-			man	Mandingo
-			mao	Maori
-			map	Austronesian (Other)
-			mar	Marathi
-			mas	Masai
-			max	Manx
-			may	Malay
-			men	Mende
-			mga	Irish, Middle (900 - 1200)
-			mic	Micmac
-			min	Minangkabau
-			mis	Miscellaneous (Other)
-			mkh	Mon-Kmer (Other)
-			mlg	Malagasy
-			mlt	Maltese
-			mni	Manipuri
-			mno	Manobo Languages
-			moh	Mohawk
-			mol	Moldavian
-			mon	Mongolian
-			mos	Mossi
-			mri	Maori
-			msa	Malay
-			mul	Multiple Languages
-			mun	Munda Languages
-			mus	Creek
-			mwr	Marwari
-			mya	Burmese
-			myn	Mayan Languages
-			nah	Aztec
-			nai	North American Indian (Other)
-			nau	Nauru
-			nav	Navajo
-			nbl	Ndebele, South
-			nde	Ndebele, North
-			ndo	Ndongo
-			nep	Nepali
-			new	Newari
-			nic	Niger-Kordofanian (Other)
-			niu	Niuean
-			nla	Dutch
-			nno	Norwegian (Nynorsk)
-			non	Norse, Old
-			nor	Norwegian
-			nso	Sotho, Northern
-			nub	Nubian Languages
-			nya	Nyanja
-			nym	Nyamwezi
-			nyn	Nyankole
-			nyo	Nyoro
-			nzi	Nzima
-			oci	Langue d'Oc (post 1500)
-			oji	Ojibwa
-			ori	Oriya
-			orm	Oromo
-			osa	Osage
-			oss	Ossetic
-			ota	Turkish, Ottoman (1500 - 1928)
-			oto	Otomian Languages
-			paa	Papuan-Australian (Other)
-			pag	Pangasinan
-			pal	Pahlavi
-			pam	Pampanga
-			pan	Panjabi
-			pap	Papiamento
-			pau	Palauan
-			peo	Persian, Old (ca 600 - 400 B.C.)
-			per	Persian
-			phn	Phoenician
-			pli	Pali
-			pol	Polish
-			pon	Ponape
-			por	Portuguese
-			pra	Prakrit uages
-			pro	Provencal, Old (to 1500)
-			pus	Pushto
-			que	Quechua
-			raj	Rajasthani
-			rar	Rarotongan
-			roa	Romance (Other)
-			roh	Rhaeto-Romance
-			rom	Romany
-			ron	Romanian
-			rum	Romanian
-			run	Rundi
-			rus	Russian
-			sad	Sandawe
-			sag	Sango
-			sah	Yakut
-			sai	South American Indian (Other)
-			sal	Salishan Languages
-			sam	Samaritan Aramaic
-			san	Sanskrit
-			sco	Scots
-			scr	Serbo-Croatian
-			sel	Selkup
-			sem	Semitic (Other)
-			sga	Irish, Old (to 900)
-			shn	Shan
-			sid	Sidamo
-			sin	Singhalese
-			sio	Siouan Languages
-			sit	Sino-Tibetan (Other)
-			sla	Slavic (Other)
-			slk	Slovak
-			slo	Slovak
-			slv	Slovenian
-			smi	Sami Languages
-			smo	Samoan
-			sna	Shona
-			snd	Sindhi
-			sog	Sogdian
-			som	Somali
-			son	Songhai
-			sot	Sotho, Southern
-			spa	Spanish
-			sqi	Albanian
-			srd	Sardinian
-			srr	Serer
-			ssa	Nilo-Saharan (Other)
-			ssw	Siswant
-			ssw	Swazi
-			suk	Sukuma
-			sun	Sudanese
-			sus	Susu
-			sux	Sumerian
-			sve	Swedish
-			swa	Swahili
-			swe	Swedish
-			syr	Syriac
-			tah	Tahitian
-			tam	Tamil
-			tat	Tatar
-			tel	Telugu
-			tem	Timne
-			ter	Tereno
-			tgk	Tajik
-			tgl	Tagalog
-			tha	Thai
-			tib	Tibetan
-			tig	Tigre
-			tir	Tigrinya
-			tiv	Tivi
-			tli	Tlingit
-			tmh	Tamashek
-			tog	Tonga (Nyasa)
-			ton	Tonga (Tonga Islands)
-			tru	Truk
-			tsi	Tsimshian
-			tsn	Tswana
-			tso	Tsonga
-			tuk	Turkmen
-			tum	Tumbuka
-			tur	Turkish
-			tut	Altaic (Other)
-			twi	Twi
-			tyv	Tuvinian
-			uga	Ugaritic
-			uig	Uighur
-			ukr	Ukrainian
-			umb	Umbundu
-			und	Undetermined
-			urd	Urdu
-			uzb	Uzbek
-			vai	Vai
-			ven	Venda
-			vie	Vietnamese
-			vol	Volapük
-			vot	Votic
-			wak	Wakashan Languages
-			wal	Walamo
-			war	Waray
-			was	Washo
-			wel	Welsh
-			wen	Sorbian Languages
-			wol	Wolof
-			xho	Xhosa
-			yao	Yao
-			yap	Yap
-			yid	Yiddish
-			yor	Yoruba
-			zap	Zapotec
-			zen	Zenaga
-			zha	Zhuang
-			zho	Chinese
-			zul	Zulu
-			zun	Zuni
-
-		*/
-
-		return getid3_lib::EmbeddedLookup($languagecode, $begin, __LINE__, __FILE__, 'id3v2-languagecode');
-	}
-
-
-	public static function ETCOEventLookup($index) {
-		if (($index >= 0x17) && ($index <= 0xDF)) {
-			return 'reserved for future use';
-		}
-		if (($index >= 0xE0) && ($index <= 0xEF)) {
-			return 'not predefined synch 0-F';
-		}
-		if (($index >= 0xF0) && ($index <= 0xFC)) {
-			return 'reserved for future use';
-		}
-
-		static $EventLookup = array(
-			0x00 => 'padding (has no meaning)',
-			0x01 => 'end of initial silence',
-			0x02 => 'intro start',
-			0x03 => 'main part start',
-			0x04 => 'outro start',
-			0x05 => 'outro end',
-			0x06 => 'verse start',
-			0x07 => 'refrain start',
-			0x08 => 'interlude start',
-			0x09 => 'theme start',
-			0x0A => 'variation start',
-			0x0B => 'key change',
-			0x0C => 'time change',
-			0x0D => 'momentary unwanted noise (Snap, Crackle & Pop)',
-			0x0E => 'sustained noise',
-			0x0F => 'sustained noise end',
-			0x10 => 'intro end',
-			0x11 => 'main part end',
-			0x12 => 'verse end',
-			0x13 => 'refrain end',
-			0x14 => 'theme end',
-			0x15 => 'profanity',
-			0x16 => 'profanity end',
-			0xFD => 'audio end (start of silence)',
-			0xFE => 'audio file ends',
-			0xFF => 'one more byte of events follows'
-		);
-
-		return (isset($EventLookup[$index]) ? $EventLookup[$index] : '');
-	}
-
-	public static function SYTLContentTypeLookup($index) {
-		static $SYTLContentTypeLookup = array(
-			0x00 => 'other',
-			0x01 => 'lyrics',
-			0x02 => 'text transcription',
-			0x03 => 'movement/part name', // (e.g. 'Adagio')
-			0x04 => 'events',             // (e.g. 'Don Quijote enters the stage')
-			0x05 => 'chord',              // (e.g. 'Bb F Fsus')
-			0x06 => 'trivia/\'pop up\' information',
-			0x07 => 'URLs to webpages',
-			0x08 => 'URLs to images'
-		);
-
-		return (isset($SYTLContentTypeLookup[$index]) ? $SYTLContentTypeLookup[$index] : '');
-	}
-
-	public static function APICPictureTypeLookup($index, $returnarray=false) {
-		static $APICPictureTypeLookup = array(
-			0x00 => 'Other',
-			0x01 => '32x32 pixels \'file icon\' (PNG only)',
-			0x02 => 'Other file icon',
-			0x03 => 'Cover (front)',
-			0x04 => 'Cover (back)',
-			0x05 => 'Leaflet page',
-			0x06 => 'Media (e.g. label side of CD)',
-			0x07 => 'Lead artist/lead performer/soloist',
-			0x08 => 'Artist/performer',
-			0x09 => 'Conductor',
-			0x0A => 'Band/Orchestra',
-			0x0B => 'Composer',
-			0x0C => 'Lyricist/text writer',
-			0x0D => 'Recording Location',
-			0x0E => 'During recording',
-			0x0F => 'During performance',
-			0x10 => 'Movie/video screen capture',
-			0x11 => 'A bright coloured fish',
-			0x12 => 'Illustration',
-			0x13 => 'Band/artist logotype',
-			0x14 => 'Publisher/Studio logotype'
-		);
-		if ($returnarray) {
-			return $APICPictureTypeLookup;
-		}
-		return (isset($APICPictureTypeLookup[$index]) ? $APICPictureTypeLookup[$index] : '');
-	}
-
-	public static function COMRReceivedAsLookup($index) {
-		static $COMRReceivedAsLookup = array(
-			0x00 => 'Other',
-			0x01 => 'Standard CD album with other songs',
-			0x02 => 'Compressed audio on CD',
-			0x03 => 'File over the Internet',
-			0x04 => 'Stream over the Internet',
-			0x05 => 'As note sheets',
-			0x06 => 'As note sheets in a book with other sheets',
-			0x07 => 'Music on other media',
-			0x08 => 'Non-musical merchandise'
-		);
-
-		return (isset($COMRReceivedAsLookup[$index]) ? $COMRReceivedAsLookup[$index] : '');
-	}
-
-	public static function RVA2ChannelTypeLookup($index) {
-		static $RVA2ChannelTypeLookup = array(
-			0x00 => 'Other',
-			0x01 => 'Master volume',
-			0x02 => 'Front right',
-			0x03 => 'Front left',
-			0x04 => 'Back right',
-			0x05 => 'Back left',
-			0x06 => 'Front centre',
-			0x07 => 'Back centre',
-			0x08 => 'Subwoofer'
-		);
-
-		return (isset($RVA2ChannelTypeLookup[$index]) ? $RVA2ChannelTypeLookup[$index] : '');
-	}
-
-	public static function FrameNameLongLookup($framename) {
-
-		$begin = __LINE__;
-
-		/** This is not a comment!
-
-			AENC	Audio encryption
-			APIC	Attached picture
-			ASPI	Audio seek point index
-			BUF	Recommended buffer size
-			CNT	Play counter
-			COM	Comments
-			COMM	Comments
-			COMR	Commercial frame
-			CRA	Audio encryption
-			CRM	Encrypted meta frame
-			ENCR	Encryption method registration
-			EQU	Equalisation
-			EQU2	Equalisation (2)
-			EQUA	Equalisation
-			ETC	Event timing codes
-			ETCO	Event timing codes
-			GEO	General encapsulated object
-			GEOB	General encapsulated object
-			GRID	Group identification registration
-			IPL	Involved people list
-			IPLS	Involved people list
-			LINK	Linked information
-			LNK	Linked information
-			MCDI	Music CD identifier
-			MCI	Music CD Identifier
-			MLL	MPEG location lookup table
-			MLLT	MPEG location lookup table
-			OWNE	Ownership frame
-			PCNT	Play counter
-			PIC	Attached picture
-			POP	Popularimeter
-			POPM	Popularimeter
-			POSS	Position synchronisation frame
-			PRIV	Private frame
-			RBUF	Recommended buffer size
-			REV	Reverb
-			RVA	Relative volume adjustment
-			RVA2	Relative volume adjustment (2)
-			RVAD	Relative volume adjustment
-			RVRB	Reverb
-			SEEK	Seek frame
-			SIGN	Signature frame
-			SLT	Synchronised lyric/text
-			STC	Synced tempo codes
-			SYLT	Synchronised lyric/text
-			SYTC	Synchronised tempo codes
-			TAL	Album/Movie/Show title
-			TALB	Album/Movie/Show title
-			TBP	BPM (Beats Per Minute)
-			TBPM	BPM (beats per minute)
-			TCM	Composer
-			TCMP	Part of a compilation
-			TCO	Content type
-			TCOM	Composer
-			TCON	Content type
-			TCOP	Copyright message
-			TCP	Part of a compilation
-			TCR	Copyright message
-			TDA	Date
-			TDAT	Date
-			TDEN	Encoding time
-			TDLY	Playlist delay
-			TDOR	Original release time
-			TDRC	Recording time
-			TDRL	Release time
-			TDTG	Tagging time
-			TDY	Playlist delay
-			TEN	Encoded by
-			TENC	Encoded by
-			TEXT	Lyricist/Text writer
-			TFLT	File type
-			TFT	File type
-			TIM	Time
-			TIME	Time
-			TIPL	Involved people list
-			TIT1	Content group description
-			TIT2	Title/songname/content description
-			TIT3	Subtitle/Description refinement
-			TKE	Initial key
-			TKEY	Initial key
-			TLA	Language(s)
-			TLAN	Language(s)
-			TLE	Length
-			TLEN	Length
-			TMCL	Musician credits list
-			TMED	Media type
-			TMOO	Mood
-			TMT	Media type
-			TOA	Original artist(s)/performer(s)
-			TOAL	Original album/movie/show title
-			TOF	Original filename
-			TOFN	Original filename
-			TOL	Original Lyricist(s)/text writer(s)
-			TOLY	Original lyricist(s)/text writer(s)
-			TOPE	Original artist(s)/performer(s)
-			TOR	Original release year
-			TORY	Original release year
-			TOT	Original album/Movie/Show title
-			TOWN	File owner/licensee
-			TP1	Lead artist(s)/Lead performer(s)/Soloist(s)/Performing group
-			TP2	Band/Orchestra/Accompaniment
-			TP3	Conductor/Performer refinement
-			TP4	Interpreted, remixed, or otherwise modified by
-			TPA	Part of a set
-			TPB	Publisher
-			TPE1	Lead performer(s)/Soloist(s)
-			TPE2	Band/orchestra/accompaniment
-			TPE3	Conductor/performer refinement
-			TPE4	Interpreted, remixed, or otherwise modified by
-			TPOS	Part of a set
-			TPRO	Produced notice
-			TPUB	Publisher
-			TRC	ISRC (International Standard Recording Code)
-			TRCK	Track number/Position in set
-			TRD	Recording dates
-			TRDA	Recording dates
-			TRK	Track number/Position in set
-			TRSN	Internet radio station name
-			TRSO	Internet radio station owner
-			TS2	Album-Artist sort order
-			TSA	Album sort order
-			TSC	Composer sort order
-			TSI	Size
-			TSIZ	Size
-			TSO2	Album-Artist sort order
-			TSOA	Album sort order
-			TSOC	Composer sort order
-			TSOP	Performer sort order
-			TSOT	Title sort order
-			TSP	Performer sort order
-			TSRC	ISRC (international standard recording code)
-			TSS	Software/hardware and settings used for encoding
-			TSSE	Software/Hardware and settings used for encoding
-			TSST	Set subtitle
-			TST	Title sort order
-			TT1	Content group description
-			TT2	Title/Songname/Content description
-			TT3	Subtitle/Description refinement
-			TXT	Lyricist/text writer
-			TXX	User defined text information frame
-			TXXX	User defined text information frame
-			TYE	Year
-			TYER	Year
-			UFI	Unique file identifier
-			UFID	Unique file identifier
-			ULT	Unsychronised lyric/text transcription
-			USER	Terms of use
-			USLT	Unsynchronised lyric/text transcription
-			WAF	Official audio file webpage
-			WAR	Official artist/performer webpage
-			WAS	Official audio source webpage
-			WCM	Commercial information
-			WCOM	Commercial information
-			WCOP	Copyright/Legal information
-			WCP	Copyright/Legal information
-			WOAF	Official audio file webpage
-			WOAR	Official artist/performer webpage
-			WOAS	Official audio source webpage
-			WORS	Official Internet radio station homepage
-			WPAY	Payment
-			WPB	Publishers official webpage
-			WPUB	Publishers official webpage
-			WXX	User defined URL link frame
-			WXXX	User defined URL link frame
-			TFEA	Featured Artist
-			TSTU	Recording Studio
-			rgad	Replay Gain Adjustment
-
-		*/
-
-		return getid3_lib::EmbeddedLookup($framename, $begin, __LINE__, __FILE__, 'id3v2-framename_long');
-
-		// Last three:
-		// from Helium2 [www.helium2.com]
-		// from http://privatewww.essex.ac.uk/~djmrob/replaygain/file_format_id3v2.html
-	}
-
-
-	public static function FrameNameShortLookup($framename) {
-
-		$begin = __LINE__;
-
-		/** This is not a comment!
-
-			AENC	audio_encryption
-			APIC	attached_picture
-			ASPI	audio_seek_point_index
-			BUF	recommended_buffer_size
-			CNT	play_counter
-			COM	comment
-			COMM	comment
-			COMR	commercial_frame
-			CRA	audio_encryption
-			CRM	encrypted_meta_frame
-			ENCR	encryption_method_registration
-			EQU	equalisation
-			EQU2	equalisation
-			EQUA	equalisation
-			ETC	event_timing_codes
-			ETCO	event_timing_codes
-			GEO	general_encapsulated_object
-			GEOB	general_encapsulated_object
-			GRID	group_identification_registration
-			IPL	involved_people_list
-			IPLS	involved_people_list
-			LINK	linked_information
-			LNK	linked_information
-			MCDI	music_cd_identifier
-			MCI	music_cd_identifier
-			MLL	mpeg_location_lookup_table
-			MLLT	mpeg_location_lookup_table
-			OWNE	ownership_frame
-			PCNT	play_counter
-			PIC	attached_picture
-			POP	popularimeter
-			POPM	popularimeter
-			POSS	position_synchronisation_frame
-			PRIV	private_frame
-			RBUF	recommended_buffer_size
-			REV	reverb
-			RVA	relative_volume_adjustment
-			RVA2	relative_volume_adjustment
-			RVAD	relative_volume_adjustment
-			RVRB	reverb
-			SEEK	seek_frame
-			SIGN	signature_frame
-			SLT	synchronised_lyric
-			STC	synced_tempo_codes
-			SYLT	synchronised_lyric
-			SYTC	synchronised_tempo_codes
-			TAL	album
-			TALB	album
-			TBP	bpm
-			TBPM	bpm
-			TCM	composer
-			TCMP	part_of_a_compilation
-			TCO	genre
-			TCOM	composer
-			TCON	genre
-			TCOP	copyright_message
-			TCP	part_of_a_compilation
-			TCR	copyright_message
-			TDA	date
-			TDAT	date
-			TDEN	encoding_time
-			TDLY	playlist_delay
-			TDOR	original_release_time
-			TDRC	recording_time
-			TDRL	release_time
-			TDTG	tagging_time
-			TDY	playlist_delay
-			TEN	encoded_by
-			TENC	encoded_by
-			TEXT	lyricist
-			TFLT	file_type
-			TFT	file_type
-			TIM	time
-			TIME	time
-			TIPL	involved_people_list
-			TIT1	content_group_description
-			TIT2	title
-			TIT3	subtitle
-			TKE	initial_key
-			TKEY	initial_key
-			TLA	language
-			TLAN	language
-			TLE	length
-			TLEN	length
-			TMCL	musician_credits_list
-			TMED	media_type
-			TMOO	mood
-			TMT	media_type
-			TOA	original_artist
-			TOAL	original_album
-			TOF	original_filename
-			TOFN	original_filename
-			TOL	original_lyricist
-			TOLY	original_lyricist
-			TOPE	original_artist
-			TOR	original_year
-			TORY	original_year
-			TOT	original_album
-			TOWN	file_owner
-			TP1	artist
-			TP2	band
-			TP3	conductor
-			TP4	remixer
-			TPA	part_of_a_set
-			TPB	publisher
-			TPE1	artist
-			TPE2	band
-			TPE3	conductor
-			TPE4	remixer
-			TPOS	part_of_a_set
-			TPRO	produced_notice
-			TPUB	publisher
-			TRC	isrc
-			TRCK	track_number
-			TRD	recording_dates
-			TRDA	recording_dates
-			TRK	track_number
-			TRSN	internet_radio_station_name
-			TRSO	internet_radio_station_owner
-			TS2	album_artist_sort_order
-			TSA	album_sort_order
-			TSC	composer_sort_order
-			TSI	size
-			TSIZ	size
-			TSO2	album_artist_sort_order
-			TSOA	album_sort_order
-			TSOC	composer_sort_order
-			TSOP	performer_sort_order
-			TSOT	title_sort_order
-			TSP	performer_sort_order
-			TSRC	isrc
-			TSS	encoder_settings
-			TSSE	encoder_settings
-			TSST	set_subtitle
-			TST	title_sort_order
-			TT1	content_group_description
-			TT2	title
-			TT3	subtitle
-			TXT	lyricist
-			TXX	text
-			TXXX	text
-			TYE	year
-			TYER	year
-			UFI	unique_file_identifier
-			UFID	unique_file_identifier
-			ULT	unsychronised_lyric
-			USER	terms_of_use
-			USLT	unsynchronised_lyric
-			WAF	url_file
-			WAR	url_artist
-			WAS	url_source
-			WCM	commercial_information
-			WCOM	commercial_information
-			WCOP	copyright
-			WCP	copyright
-			WOAF	url_file
-			WOAR	url_artist
-			WOAS	url_source
-			WORS	url_station
-			WPAY	url_payment
-			WPB	url_publisher
-			WPUB	url_publisher
-			WXX	url_user
-			WXXX	url_user
-			TFEA	featured_artist
-			TSTU	recording_studio
-			rgad	replay_gain_adjustment
-
-		*/
-
-		return getid3_lib::EmbeddedLookup($framename, $begin, __LINE__, __FILE__, 'id3v2-framename_short');
-	}
-
-	public static function TextEncodingTerminatorLookup($encoding) {
-		// http://www.id3.org/id3v2.4.0-structure.txt
-		// Frames that allow different types of text encoding contains a text encoding description byte. Possible encodings:
-		static $TextEncodingTerminatorLookup = array(
-			0   => "\x00",     // $00  ISO-8859-1. Terminated with $00.
-			1   => "\x00\x00", // $01  UTF-16 encoded Unicode with BOM. All strings in the same frame SHALL have the same byteorder. Terminated with $00 00.
-			2   => "\x00\x00", // $02  UTF-16BE encoded Unicode without BOM. Terminated with $00 00.
-			3   => "\x00",     // $03  UTF-8 encoded Unicode. Terminated with $00.
-			255 => "\x00\x00"
-		);
-		return (isset($TextEncodingTerminatorLookup[$encoding]) ? $TextEncodingTerminatorLookup[$encoding] : "\x00");
-	}
-
-	public static function TextEncodingNameLookup($encoding) {
-		// http://www.id3.org/id3v2.4.0-structure.txt
-		// Frames that allow different types of text encoding contains a text encoding description byte. Possible encodings:
-		static $TextEncodingNameLookup = array(
-			0   => 'ISO-8859-1', // $00  ISO-8859-1. Terminated with $00.
-			1   => 'UTF-16',     // $01  UTF-16 encoded Unicode with BOM. All strings in the same frame SHALL have the same byteorder. Terminated with $00 00.
-			2   => 'UTF-16BE',   // $02  UTF-16BE encoded Unicode without BOM. Terminated with $00 00.
-			3   => 'UTF-8',      // $03  UTF-8 encoded Unicode. Terminated with $00.
-			255 => 'UTF-16BE'
-		);
-		return (isset($TextEncodingNameLookup[$encoding]) ? $TextEncodingNameLookup[$encoding] : 'ISO-8859-1');
-	}
-
-	public static function IsValidID3v2FrameName($framename, $id3v2majorversion) {
-		switch ($id3v2majorversion) {
-			case 2:
-				return preg_match('#[A-Z][A-Z0-9]{2}#', $framename);
-				break;
-
-			case 3:
-			case 4:
-				return preg_match('#[A-Z][A-Z0-9]{3}#', $framename);
-				break;
-		}
-		return false;
-	}
-
-	public static function IsANumber($numberstring, $allowdecimal=false, $allownegative=false) {
-		for ($i = 0; $i < strlen($numberstring); $i++) {
-			if ((chr($numberstring{$i}) < chr('0')) || (chr($numberstring{$i}) > chr('9'))) {
-				if (($numberstring{$i} == '.') && $allowdecimal) {
-					// allowed
-				} elseif (($numberstring{$i} == '-') && $allownegative && ($i == 0)) {
-					// allowed
-				} else {
-					return false;
-				}
-			}
-		}
-		return true;
-	}
-
-	public static function IsValidDateStampString($datestamp) {
-		if (strlen($datestamp) != 8) {
-			return false;
-		}
-		if (!self::IsANumber($datestamp, false)) {
-			return false;
-		}
-		$year  = substr($datestamp, 0, 4);
-		$month = substr($datestamp, 4, 2);
-		$day   = substr($datestamp, 6, 2);
-		if (($year == 0) || ($month == 0) || ($day == 0)) {
-			return false;
-		}
-		if ($month > 12) {
-			return false;
-		}
-		if ($day > 31) {
-			return false;
-		}
-		if (($day > 30) && (($month == 4) || ($month == 6) || ($month == 9) || ($month == 11))) {
-			return false;
-		}
-		if (($day > 29) && ($month == 2)) {
-			return false;
-		}
-		return true;
-	}
-
-	public static function ID3v2HeaderLength($majorversion) {
-		return (($majorversion == 2) ? 6 : 10);
-	}
-
-}
-
Index: www/wp-admin/constants/pclzip.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/constants/pclzip.php	(revision )
+++ www/wp-admin/constants/pclzip.php	(revision )
@@ -0,0 +1,174 @@
+<?php
+// --------------------------------------------------------------------------------
+// PhpConcept Library - Zip Module 2.8.2
+// --------------------------------------------------------------------------------
+// License GNU/LGPL - Vincent Blavet - August 2009
+// http://www.phpconcept.net
+// --------------------------------------------------------------------------------
+//
+// Presentation :
+//   PclZip is a PHP library that manage ZIP archives.
+//   So far tests show that archives generated by PclZip are readable by
+//   WinZip application and other tools.
+//
+// Description :
+//   See readme.txt and http://www.phpconcept.net
+//
+// Warning :
+//   This library and the associated files are non commercial, non professional
+//   work.
+//   It should not have unexpected results. However if any damage is caused by
+//   this software the author can not be responsible.
+//   The use of this software is at the risk of the user.
+//
+// --------------------------------------------------------------------------------
+// $Id: pclzip.lib.php,v 1.60 2009/09/30 21:01:04 vblavet Exp $
+// --------------------------------------------------------------------------------
+
+// ----- Constants
+if (!defined('PCLZIP_READ_BLOCK_SIZE')) {
+	define( 'PCLZIP_READ_BLOCK_SIZE', 2048 );
+}
+
+// ----- File list separator
+// In version 1.x of PclZip, the separator for file list is a space
+// (which is not a very smart choice, specifically for windows paths !).
+// A better separator should be a comma (,). This constant gives you the
+// abilty to change that.
+// However notice that changing this value, may have impact on existing
+// scripts, using space separated filenames.
+// Recommanded values for compatibility with older versions :
+//define( 'PCLZIP_SEPARATOR', ' ' );
+// Recommanded values for smart separation of filenames.
+if (!defined('PCLZIP_SEPARATOR')) {
+	define( 'PCLZIP_SEPARATOR', ',' );
+}
+
+// ----- Error configuration
+// 0 : PclZip Class integrated error handling
+// 1 : PclError external library error handling. By enabling this
+//     you must ensure that you have included PclError library.
+// [2,...] : reserved for futur use
+if (!defined('PCLZIP_ERROR_EXTERNAL')) {
+	define( 'PCLZIP_ERROR_EXTERNAL', 0 );
+}
+
+// ----- Optional static temporary directory
+//       By default temporary files are generated in the script current
+//       path.
+//       If defined :
+//       - MUST BE terminated by a '/'.
+//       - MUST be a valid, already created directory
+//       Samples :
+// define( 'PCLZIP_TEMPORARY_DIR', '/temp/' );
+// define( 'PCLZIP_TEMPORARY_DIR', 'C:/Temp/' );
+if (!defined('PCLZIP_TEMPORARY_DIR')) {
+	define( 'PCLZIP_TEMPORARY_DIR', '' );
+}
+
+// ----- Optional threshold ratio for use of temporary files
+//       Pclzip sense the size of the file to add/extract and decide to
+//       use or not temporary file. The algorythm is looking for
+//       memory_limit of PHP and apply a ratio.
+//       threshold = memory_limit * ratio.
+//       Recommended values are under 0.5. Default 0.47.
+//       Samples :
+// define( 'PCLZIP_TEMPORARY_FILE_RATIO', 0.5 );
+if (!defined('PCLZIP_TEMPORARY_FILE_RATIO')) {
+	define( 'PCLZIP_TEMPORARY_FILE_RATIO', 0.47 );
+}
+
+// --------------------------------------------------------------------------------
+// ***** UNDER THIS LINE NOTHING NEEDS TO BE MODIFIED *****
+// --------------------------------------------------------------------------------
+
+// ----- Global variables
+$g_pclzip_version = "2.8.2";
+
+// ----- Error codes
+//   -1 : Unable to open file in binary write mode
+//   -2 : Unable to open file in binary read mode
+//   -3 : Invalid parameters
+//   -4 : File does not exist
+//   -5 : Filename is too long (max. 255)
+//   -6 : Not a valid zip file
+//   -7 : Invalid extracted file size
+//   -8 : Unable to create directory
+//   -9 : Invalid archive extension
+//  -10 : Invalid archive format
+//  -11 : Unable to delete file (unlink)
+//  -12 : Unable to rename file (rename)
+//  -13 : Invalid header checksum
+//  -14 : Invalid archive size
+define( 'PCLZIP_ERR_USER_ABORTED', 2 );
+define( 'PCLZIP_ERR_NO_ERROR', 0 );
+define( 'PCLZIP_ERR_WRITE_OPEN_FAIL', -1 );
+define( 'PCLZIP_ERR_READ_OPEN_FAIL', -2 );
+define( 'PCLZIP_ERR_INVALID_PARAMETER', -3 );
+define( 'PCLZIP_ERR_MISSING_FILE', -4 );
+define( 'PCLZIP_ERR_FILENAME_TOO_LONG', -5 );
+define( 'PCLZIP_ERR_INVALID_ZIP', -6 );
+define( 'PCLZIP_ERR_BAD_EXTRACTED_FILE', -7 );
+define( 'PCLZIP_ERR_DIR_CREATE_FAIL', -8 );
+define( 'PCLZIP_ERR_BAD_EXTENSION', -9 );
+define( 'PCLZIP_ERR_BAD_FORMAT', -10 );
+define( 'PCLZIP_ERR_DELETE_FILE_FAIL', -11 );
+define( 'PCLZIP_ERR_RENAME_FILE_FAIL', -12 );
+define( 'PCLZIP_ERR_BAD_CHECKSUM', -13 );
+define( 'PCLZIP_ERR_INVALID_ARCHIVE_ZIP', -14 );
+define( 'PCLZIP_ERR_MISSING_OPTION_VALUE', -15 );
+define( 'PCLZIP_ERR_INVALID_OPTION_VALUE', -16 );
+define( 'PCLZIP_ERR_ALREADY_A_DIRECTORY', -17 );
+define( 'PCLZIP_ERR_UNSUPPORTED_COMPRESSION', -18 );
+define( 'PCLZIP_ERR_UNSUPPORTED_ENCRYPTION', -19 );
+define( 'PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE', -20 );
+define( 'PCLZIP_ERR_DIRECTORY_RESTRICTION', -21 );
+
+// ----- Options values
+define( 'PCLZIP_OPT_PATH', 77001 );
+define( 'PCLZIP_OPT_ADD_PATH', 77002 );
+define( 'PCLZIP_OPT_REMOVE_PATH', 77003 );
+define( 'PCLZIP_OPT_REMOVE_ALL_PATH', 77004 );
+define( 'PCLZIP_OPT_SET_CHMOD', 77005 );
+define( 'PCLZIP_OPT_EXTRACT_AS_STRING', 77006 );
+define( 'PCLZIP_OPT_NO_COMPRESSION', 77007 );
+define( 'PCLZIP_OPT_BY_NAME', 77008 );
+define( 'PCLZIP_OPT_BY_INDEX', 77009 );
+define( 'PCLZIP_OPT_BY_EREG', 77010 );
+define( 'PCLZIP_OPT_BY_PREG', 77011 );
+define( 'PCLZIP_OPT_COMMENT', 77012 );
+define( 'PCLZIP_OPT_ADD_COMMENT', 77013 );
+define( 'PCLZIP_OPT_PREPEND_COMMENT', 77014 );
+define( 'PCLZIP_OPT_EXTRACT_IN_OUTPUT', 77015 );
+define( 'PCLZIP_OPT_REPLACE_NEWER', 77016 );
+define( 'PCLZIP_OPT_STOP_ON_ERROR', 77017 );
+// Having big trouble with crypt. Need to multiply 2 long int
+// which is not correctly supported by PHP ...
+//define( 'PCLZIP_OPT_CRYPT', 77018 );
+define( 'PCLZIP_OPT_EXTRACT_DIR_RESTRICTION', 77019 );
+define( 'PCLZIP_OPT_TEMP_FILE_THRESHOLD', 77020 );
+define( 'PCLZIP_OPT_ADD_TEMP_FILE_THRESHOLD', 77020 ); // alias
+define( 'PCLZIP_OPT_TEMP_FILE_ON', 77021 );
+define( 'PCLZIP_OPT_ADD_TEMP_FILE_ON', 77021 ); // alias
+define( 'PCLZIP_OPT_TEMP_FILE_OFF', 77022 );
+define( 'PCLZIP_OPT_ADD_TEMP_FILE_OFF', 77022 ); // alias
+
+// ----- File description attributes
+define( 'PCLZIP_ATT_FILE_NAME', 79001 );
+define( 'PCLZIP_ATT_FILE_NEW_SHORT_NAME', 79002 );
+define( 'PCLZIP_ATT_FILE_NEW_FULL_NAME', 79003 );
+define( 'PCLZIP_ATT_FILE_MTIME', 79004 );
+define( 'PCLZIP_ATT_FILE_CONTENT', 79005 );
+define( 'PCLZIP_ATT_FILE_COMMENT', 79006 );
+
+// ----- Call backs values
+define( 'PCLZIP_CB_PRE_EXTRACT', 78001 );
+define( 'PCLZIP_CB_POST_EXTRACT', 78002 );
+define( 'PCLZIP_CB_PRE_ADD', 78003 );
+define( 'PCLZIP_CB_POST_ADD', 78004 );
+/* For futur use
+define( 'PCLZIP_CB_PRE_LIST', 78005 );
+define( 'PCLZIP_CB_POST_LIST', 78006 );
+define( 'PCLZIP_CB_PRE_DELETE', 78007 );
+define( 'PCLZIP_CB_POST_DELETE', 78008 );
+*/
Index: www/wp-includes/autoload/requests/Exception/HTTP/413.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/413.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/413.php	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-<?php
-/**
- * Exception for 413 Request Entity Too Large responses
- *
- * @package Requests
- */
-
-/**
- * Exception for 413 Request Entity Too Large responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_413 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 413;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Request Entity Too Large';
-}
\ No newline at end of file
Index: www/wp-includes/feed-rdf.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/feed-rdf.php	(revision 38565)
+++ www/wp-includes/feed-rdf.php	(revision 38565)
@@ -1,85 +0,0 @@
-<?php
-/**
- * RSS 1 RDF Feed Template for displaying RSS 1 Posts feed.
- *
- * @package WordPress
- */
-
-header('Content-Type: ' . feed_content_type('rdf') . '; charset=' . get_option('blog_charset'), true);
-$more = 1;
-
-echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
-
-/** This action is documented in wp-includes/feed-rss2.php */
-do_action( 'rss_tag_pre', 'rdf' );
-?>
-<rdf:RDF
-	xmlns="http://purl.org/rss/1.0/"
-	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-	xmlns:dc="http://purl.org/dc/elements/1.1/"
-	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
-	xmlns:admin="http://webns.net/mvcb/"
-	xmlns:content="http://purl.org/rss/1.0/modules/content/"
-	<?php
-	/**
-	 * Fires at the end of the feed root to add namespaces.
-	 *
-	 * @since 2.0.0
-	 */
-	do_action( 'rdf_ns' );
-	?>
->
-<channel rdf:about="<?php bloginfo_rss("url") ?>">
-	<title><?php wp_title_rss(); ?></title>
-	<link><?php bloginfo_rss('url') ?></link>
-	<description><?php bloginfo_rss('description') ?></description>
-	<dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></dc:date>
-	<sy:updatePeriod><?php
-		/** This filter is documented in wp-includes/feed-rss2.php */
-		echo apply_filters( 'rss_update_period', 'hourly' );
-	?></sy:updatePeriod>
-	<sy:updateFrequency><?php
-		/** This filter is documented in wp-includes/feed-rss2.php */
-		echo apply_filters( 'rss_update_frequency', '1' );
-	?></sy:updateFrequency>
-	<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
-	<?php
-	/**
-	 * Fires at the end of the RDF feed header.
-	 *
-	 * @since 2.0.0
-	 */
-	do_action( 'rdf_header' );
-	?>
-	<items>
-		<rdf:Seq>
-		<?php while (have_posts()): the_post(); ?>
-			<rdf:li rdf:resource="<?php the_permalink_rss() ?>"/>
-		<?php endwhile; ?>
-		</rdf:Seq>
-	</items>
-</channel>
-<?php rewind_posts(); while (have_posts()): the_post(); ?>
-<item rdf:about="<?php the_permalink_rss() ?>">
-	<title><?php the_title_rss() ?></title>
-	<link><?php the_permalink_rss() ?></link>
-	<dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', $post->post_date_gmt, false); ?></dc:date>
-	<dc:creator><![CDATA[<?php the_author() ?>]]></dc:creator>
-	<?php the_category_rss('rdf') ?>
-<?php if (get_option('rss_use_excerpt')) : ?>
-	<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
-<?php else : ?>
-	<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
-	<content:encoded><![CDATA[<?php the_content_feed('rdf') ?>]]></content:encoded>
-<?php endif; ?>
-	<?php
-	/**
-	 * Fires at the end of each RDF feed item.
-	 *
-	 * @since 2.0.0
-	 */
-	do_action( 'rdf_item' );
-	?>
-</item>
-<?php endwhile;  ?>
-</rdf:RDF>
Index: www/wp-admin/includes/class-wp-ms-users-list-table.php
===================================================================
--- www/wp-admin/includes/class-wp-ms-users-list-table.php	(revision 38565)
+++ www/wp-admin/autoload/list-table/WP_MS_Users_List_Table.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/load-styles.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/load-styles.php	(revision 38565)
+++ www/wp-admin/load-styles.php	(revision 38565)
@@ -1,95 +0,0 @@
-<?php
-
-/**
- * Disable error reporting
- *
- * Set this to error_reporting( -1 ) for debugging
- */
-error_reporting(0);
-
-/** Set ABSPATH for execution */
-if ( ! defined( 'ABSPATH' ) ) {
-	define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' );
-}
-
-define( 'WPINC', 'wp-includes' );
-
-require( ABSPATH . 'wp-admin/includes/noop.php' );
-require( ABSPATH . WPINC . '/script-loader.php' );
-require( ABSPATH . WPINC . '/version.php' );
-
-$load = $_GET['load'];
-if ( is_array( $load ) ) {
-	$load = implode( '', $load );
-}
-$load = preg_replace( '/[^a-z0-9,_-]+/i', '', $load );
-$load = array_unique( explode( ',', $load ) );
-
-if ( empty($load) )
-	exit;
-
-$compress = ( isset($_GET['c']) && $_GET['c'] );
-$force_gzip = ( $compress && 'gzip' == $_GET['c'] );
-$rtl = ( isset($_GET['dir']) && 'rtl' == $_GET['dir'] );
-$expires_offset = 31536000; // 1 year
-$out = '';
-
-$wp_styles = new WP_Styles();
-wp_default_styles($wp_styles);
-
-if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $wp_version ) {
-	$protocol = $_SERVER['SERVER_PROTOCOL'];
-	if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0' ) ) ) {
-		$protocol = 'HTTP/1.0';
-	}
-	header( "$protocol 304 Not Modified" );
-	exit();
-}
-
-foreach ( $load as $handle ) {
-	if ( !array_key_exists($handle, $wp_styles->registered) )
-		continue;
-
-	$style = $wp_styles->registered[$handle];
-
-	if ( empty( $style->src ) ) {
-		continue;
-	}
-
-	$path = ABSPATH . $style->src;
-
-	if ( $rtl && ! empty( $style->extra['rtl'] ) ) {
-		// All default styles have fully independent RTL files.
-		$path = str_replace( '.min.css', '-rtl.min.css', $path );
-	}
-
-	$content = get_file( $path ) . "\n";
-
-	if ( strpos( $style->src, '/' . WPINC . '/css/' ) === 0 ) {
-		$content = str_replace( '../images/', '../' . WPINC . '/images/', $content );
-		$content = str_replace( '../js/tinymce/', '../' . WPINC . '/js/tinymce/', $content );
-		$content = str_replace( '../fonts/', '../' . WPINC . '/fonts/', $content );
-		$out .= $content;
-	} else {
-		$out .= str_replace( '../images/', 'images/', $content );
-	}
-}
-
-header("Etag: $wp_version");
-header('Content-Type: text/css; charset=UTF-8');
-header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT');
-header("Cache-Control: public, max-age=$expires_offset");
-
-if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
-	header('Vary: Accept-Encoding'); // Handle proxies
-	if ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
-		header('Content-Encoding: deflate');
-		$out = gzdeflate( $out, 3 );
-	} elseif ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {
-		header('Content-Encoding: gzip');
-		$out = gzencode( $out, 3 );
-	}
-}
-
-echo $out;
-exit;
Index: www/wp-includes/autoload/requests/Hooker.php
===================================================================
--- www/wp-includes/autoload/requests/Hooker.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Hooker.php	(revision UNDEFINED)
@@ -1,33 +0,0 @@
-<?php
-/**
- * Event dispatcher
- *
- * @package Requests
- * @subpackage Utilities
- */
-
-/**
- * Event dispatcher
- *
- * @package Requests
- * @subpackage Utilities
- */
-interface Requests_Hooker {
-	/**
-	 * Register a callback for a hook
-	 *
-	 * @param string $hook Hook name
-	 * @param callback $callback Function/method to call on event
-	 * @param int $priority Priority number. <0 is executed earlier, >0 is executed later
-	 */
-	public function register($hook, $callback, $priority = 0);
-
-	/**
-	 * Dispatch a message
-	 *
-	 * @param string $hook Hook name
-	 * @param array $parameters Parameters to pass to callbacks
-	 * @return boolean Successfulness
-	 */
-	public function dispatch($hook, $parameters = array());
-}
\ No newline at end of file
Index: www/wp-admin/custom-background.php
===================================================================
--- www/wp-admin/custom-background.php	(revision 38565)
+++ www/wp-admin/autoload/appearance/Custom_Background.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-widget-factory.php
===================================================================
--- www/wp-includes/class-wp-widget-factory.php	(revision 38565)
+++ www/wp-includes/autoload/widget/WP_Widget_Factory.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/WP_Object_Cache.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/WP_Object_Cache.php	(revision )
+++ www/wp-includes/autoload/WP_Object_Cache.php	(revision )
@@ -0,0 +1,486 @@
+<?php
+
+/**
+ * Core class that implements an object cache.
+ *
+ * The WordPress Object Cache is used to save on trips to the database. The
+ * Object Cache stores all of the cache data to memory and makes the cache
+ * contents available by using a key, which is used to name and later retrieve
+ * the cache contents.
+ *
+ * The Object Cache can be replaced by other caching mechanisms by placing files
+ * in the wp-content folder which is looked at in wp-settings. If that file
+ * exists, then this file will not be included.
+ *
+ * @package WordPress
+ * @subpackage Cache
+ * @since 2.0.0
+ */
+class WP_Object_Cache {
+
+	/**
+	 * Holds the cached objects.
+	 *
+	 * @since 2.0.0
+	 * @access private
+	 * @var array
+	 */
+	private $cache = array();
+
+	/**
+	 * The amount of times the cache data was already stored in the cache.
+	 *
+	 * @since 2.5.0
+	 * @access public
+	 * @var int
+	 */
+	public $cache_hits = 0;
+
+	/**
+	 * Amount of times the cache did not have the request in cache.
+	 *
+	 * @since 2.0.0
+	 * @access public
+	 * @var int
+	 */
+	public $cache_misses = 0;
+
+	/**
+	 * List of global cache groups.
+	 *
+	 * @since 3.0.0
+	 * @access protected
+	 * @var array
+	 */
+	protected $global_groups = array();
+
+	/**
+	 * The blog prefix to prepend to keys in non-global groups.
+	 *
+	 * @since 3.5.0
+	 * @access private
+	 * @var int
+	 */
+	private $blog_prefix;
+
+	/**
+	 * Holds the value of is_multisite().
+	 *
+	 * @since 3.5.0
+	 * @access private
+	 * @var bool
+	 */
+	private $multisite;
+
+	/**
+	 * Makes private properties readable for backward compatibility.
+	 *
+	 * @since 4.0.0
+	 * @access public
+	 *
+	 * @param string $name Property to get.
+	 * @return mixed Property.
+	 */
+	public function __get( $name ) {
+		return $this->$name;
+	}
+
+	/**
+	 * Makes private properties settable for backward compatibility.
+	 *
+	 * @since 4.0.0
+	 * @access public
+	 *
+	 * @param string $name  Property to set.
+	 * @param mixed  $value Property value.
+	 * @return mixed Newly-set property.
+	 */
+	public function __set( $name, $value ) {
+		return $this->$name = $value;
+	}
+
+	/**
+	 * Makes private properties checkable for backward compatibility.
+	 *
+	 * @since 4.0.0
+	 * @access public
+	 *
+	 * @param string $name Property to check if set.
+	 * @return bool Whether the property is set.
+	 */
+	public function __isset( $name ) {
+		return isset( $this->$name );
+	}
+
+	/**
+	 * Makes private properties un-settable for backward compatibility.
+	 *
+	 * @since 4.0.0
+	 * @access public
+	 *
+	 * @param string $name Property to unset.
+	 */
+	public function __unset( $name ) {
+		unset( $this->$name );
+	}
+
+	/**
+	 * Adds data to the cache if it doesn't already exist.
+	 *
+	 * @since 2.0.0
+	 * @access public
+	 *
+	 * @uses WP_Object_Cache::_exists() Checks to see if the cache already has data.
+	 * @uses WP_Object_Cache::set()     Sets the data after the checking the cache
+	 *		                            contents existence.
+	 *
+	 * @param int|string $key    What to call the contents in the cache.
+	 * @param mixed      $data   The contents to store in the cache.
+	 * @param string     $group  Optional. Where to group the cache contents. Default 'default'.
+	 * @param int        $expire Optional. When to expire the cache contents. Default 0 (no expiration).
+	 * @return bool False if cache key and group already exist, true on success
+	 */
+	public function add( $key, $data, $group = 'default', $expire = 0 ) {
+		if ( wp_suspend_cache_addition() )
+			return false;
+
+		if ( empty( $group ) )
+			$group = 'default';
+
+		$id = $key;
+		if ( $this->multisite && ! isset( $this->global_groups[ $group ] ) )
+			$id = $this->blog_prefix . $key;
+
+		if ( $this->_exists( $id, $group ) )
+			return false;
+
+		return $this->set( $key, $data, $group, (int) $expire );
+	}
+
+	/**
+	 * Sets the list of global cache groups.
+	 *
+	 * @since 3.0.0
+	 * @access public
+	 *
+	 * @param array $groups List of groups that are global.
+	 */
+	public function add_global_groups( $groups ) {
+		$groups = (array) $groups;
+
+		$groups = array_fill_keys( $groups, true );
+		$this->global_groups = array_merge( $this->global_groups, $groups );
+	}
+
+	/**
+	 * Decrements numeric cache item's value.
+	 *
+	 * @since 3.3.0
+	 * @access public
+	 *
+	 * @param int|string $key    The cache key to decrement.
+	 * @param int        $offset Optional. The amount by which to decrement the item's value. Default 1.
+	 * @param string     $group  Optional. The group the key is in. Default 'default'.
+	 * @return false|int False on failure, the item's new value on success.
+	 */
+	public function decr( $key, $offset = 1, $group = 'default' ) {
+		if ( empty( $group ) )
+			$group = 'default';
+
+		if ( $this->multisite && ! isset( $this->global_groups[ $group ] ) )
+			$key = $this->blog_prefix . $key;
+
+		if ( ! $this->_exists( $key, $group ) )
+			return false;
+
+		if ( ! is_numeric( $this->cache[ $group ][ $key ] ) )
+			$this->cache[ $group ][ $key ] = 0;
+
+		$offset = (int) $offset;
+
+		$this->cache[ $group ][ $key ] -= $offset;
+
+		if ( $this->cache[ $group ][ $key ] < 0 )
+			$this->cache[ $group ][ $key ] = 0;
+
+		return $this->cache[ $group ][ $key ];
+	}
+
+	/**
+	 * Removes the contents of the cache key in the group.
+	 *
+	 * If the cache key does not exist in the group, then nothing will happen.
+	 *
+	 * @since 2.0.0
+	 * @access public
+	 *
+	 * @param int|string $key        What the contents in the cache are called.
+	 * @param string     $group      Optional. Where the cache contents are grouped. Default 'default'.
+	 * @param bool       $deprecated Optional. Unused. Default false.
+	 * @return bool False if the contents weren't deleted and true on success.
+	 */
+	public function delete( $key, $group = 'default', $deprecated = false ) {
+		if ( empty( $group ) )
+			$group = 'default';
+
+		if ( $this->multisite && ! isset( $this->global_groups[ $group ] ) )
+			$key = $this->blog_prefix . $key;
+
+		if ( ! $this->_exists( $key, $group ) )
+			return false;
+
+		unset( $this->cache[$group][$key] );
+		return true;
+	}
+
+	/**
+	 * Clears the object cache of all data.
+	 *
+	 * @since 2.0.0
+	 * @access public
+	 *
+	 * @return true Always returns true.
+	 */
+	public function flush() {
+		$this->cache = array();
+
+		return true;
+	}
+
+	/**
+	 * Retrieves the cache contents, if it exists.
+	 *
+	 * The contents will be first attempted to be retrieved by searching by the
+	 * key in the cache group. If the cache is hit (success) then the contents
+	 * are returned.
+	 *
+	 * On failure, the number of cache misses will be incremented.
+	 *
+	 * @since 2.0.0
+	 * @access public
+	 *
+	 * @param int|string $key    What the contents in the cache are called.
+	 * @param string     $group  Optional. Where the cache contents are grouped. Default 'default'.
+	 * @param string     $force  Optional. Unused. Whether to force a refetch rather than relying on the local
+	 *                           cache. Default false.
+	 * @param bool       $found  Optional. Whether the key was found in the cache. Disambiguates a return of
+	 *                           false, a storable value. Passed by reference. Default null.
+	 * @return false|mixed False on failure to retrieve contents or the cache contents on success.
+	 */
+	public function get( $key, $group = 'default', $force = false, &$found = null ) {
+		if ( empty( $group ) )
+			$group = 'default';
+
+		if ( $this->multisite && ! isset( $this->global_groups[ $group ] ) )
+			$key = $this->blog_prefix . $key;
+
+		if ( $this->_exists( $key, $group ) ) {
+			$found = true;
+			$this->cache_hits += 1;
+			if ( is_object($this->cache[$group][$key]) )
+				return clone $this->cache[$group][$key];
+			else
+				return $this->cache[$group][$key];
+		}
+
+		$found = false;
+		$this->cache_misses += 1;
+		return false;
+	}
+
+	/**
+	 * Increments numeric cache item's value.
+	 *
+	 * @since 3.3.0
+	 * @access public
+	 *
+	 * @param int|string $key    The cache key to increment
+	 * @param int        $offset Optional. The amount by which to increment the item's value. Default 1.
+	 * @param string     $group  Optional. The group the key is in. Default 'default'.
+	 * @return false|int False on failure, the item's new value on success.
+	 */
+	public function incr( $key, $offset = 1, $group = 'default' ) {
+		if ( empty( $group ) )
+			$group = 'default';
+
+		if ( $this->multisite && ! isset( $this->global_groups[ $group ] ) )
+			$key = $this->blog_prefix . $key;
+
+		if ( ! $this->_exists( $key, $group ) )
+			return false;
+
+		if ( ! is_numeric( $this->cache[ $group ][ $key ] ) )
+			$this->cache[ $group ][ $key ] = 0;
+
+		$offset = (int) $offset;
+
+		$this->cache[ $group ][ $key ] += $offset;
+
+		if ( $this->cache[ $group ][ $key ] < 0 )
+			$this->cache[ $group ][ $key ] = 0;
+
+		return $this->cache[ $group ][ $key ];
+	}
+
+	/**
+	 * Replaces the contents in the cache, if contents already exist.
+	 *
+	 * @since 2.0.0
+	 * @access public
+	 *
+	 * @see WP_Object_Cache::set()
+	 *
+	 * @param int|string $key    What to call the contents in the cache.
+	 * @param mixed      $data   The contents to store in the cache.
+	 * @param string     $group  Optional. Where to group the cache contents. Default 'default'.
+	 * @param int        $expire Optional. When to expire the cache contents. Default 0 (no expiration).
+	 * @return bool False if not exists, true if contents were replaced.
+	 */
+	public function replace( $key, $data, $group = 'default', $expire = 0 ) {
+		if ( empty( $group ) )
+			$group = 'default';
+
+		$id = $key;
+		if ( $this->multisite && ! isset( $this->global_groups[ $group ] ) )
+			$id = $this->blog_prefix . $key;
+
+		if ( ! $this->_exists( $id, $group ) )
+			return false;
+
+		return $this->set( $key, $data, $group, (int) $expire );
+	}
+
+	/**
+	 * Resets cache keys.
+	 *
+	 * @since 3.0.0
+	 * @access public
+	 *
+	 * @deprecated 3.5.0 Use switch_to_blog()
+	 * @see switch_to_blog()
+	 */
+	public function reset() {
+		_deprecated_function( __FUNCTION__, '3.5.0', 'switch_to_blog()' );
+
+		// Clear out non-global caches since the blog ID has changed.
+		foreach ( array_keys( $this->cache ) as $group ) {
+			if ( ! isset( $this->global_groups[ $group ] ) )
+				unset( $this->cache[ $group ] );
+		}
+	}
+
+	/**
+	 * Sets the data contents into the cache.
+	 *
+	 * The cache contents is grouped by the $group parameter followed by the
+	 * $key. This allows for duplicate ids in unique groups. Therefore, naming of
+	 * the group should be used with care and should follow normal function
+	 * naming guidelines outside of core WordPress usage.
+	 *
+	 * The $expire parameter is not used, because the cache will automatically
+	 * expire for each time a page is accessed and PHP finishes. The method is
+	 * more for cache plugins which use files.
+	 *
+	 * @since 2.0.0
+	 * @access public
+	 *
+	 * @param int|string $key    What to call the contents in the cache.
+	 * @param mixed      $data   The contents to store in the cache.
+	 * @param string     $group  Optional. Where to group the cache contents. Default 'default'.
+	 * @param int        $expire Not Used.
+	 * @return true Always returns true.
+	 */
+	public function set( $key, $data, $group = 'default', $expire = 0 ) {
+		if ( empty( $group ) )
+			$group = 'default';
+
+		if ( $this->multisite && ! isset( $this->global_groups[ $group ] ) )
+			$key = $this->blog_prefix . $key;
+
+		if ( is_object( $data ) )
+			$data = clone $data;
+
+		$this->cache[$group][$key] = $data;
+		return true;
+	}
+
+	/**
+	 * Echoes the stats of the caching.
+	 *
+	 * Gives the cache hits, and cache misses. Also prints every cached group,
+	 * key and the data.
+	 *
+	 * @since 2.0.0
+	 * @access public
+	 */
+	public function stats() {
+		echo "<p>";
+		echo "<strong>Cache Hits:</strong> {$this->cache_hits}<br />";
+		echo "<strong>Cache Misses:</strong> {$this->cache_misses}<br />";
+		echo "</p>";
+		echo '<ul>';
+		foreach ($this->cache as $group => $cache) {
+			echo "<li><strong>Group:</strong> $group - ( " . number_format( strlen( serialize( $cache ) ) / KB_IN_BYTES, 2 ) . 'k )</li>';
+		}
+		echo '</ul>';
+	}
+
+	/**
+	 * Switches the internal blog ID.
+	 *
+	 * This changes the blog ID used to create keys in blog specific groups.
+	 *
+	 * @since 3.5.0
+	 * @access public
+	 *
+	 * @param int $blog_id Blog ID.
+	 */
+	public function switch_to_blog( $blog_id ) {
+		$blog_id = (int) $blog_id;
+		$this->blog_prefix = $this->multisite ? $blog_id . ':' : '';
+	}
+
+	/**
+	 * Serves as a utility function to determine whether a key exists in the cache.
+	 *
+	 * @since 3.4.0
+	 * @access protected
+	 *
+	 * @param int|string $key   Cache key to check for existence.
+	 * @param string     $group Cache group for the key existence check.
+	 * @return bool Whether the key exists in the cache for the given group.
+	 */
+	protected function _exists( $key, $group ) {
+		return isset( $this->cache[ $group ] ) && ( isset( $this->cache[ $group ][ $key ] ) || array_key_exists( $key, $this->cache[ $group ] ) );
+	}
+
+	/**
+	 * Sets up object properties; PHP 5 style constructor.
+	 *
+	 * @since 2.0.8
+	 */
+	public function __construct() {
+		$this->multisite = is_multisite();
+		$this->blog_prefix =  $this->multisite ? get_current_blog_id() . ':' : '';
+
+
+		/**
+		 * @todo This should be moved to the PHP4 style constructor, PHP5
+		 * already calls __destruct()
+		 */
+		register_shutdown_function( array( $this, '__destruct' ) );
+	}
+
+	/**
+	 * Saves the object cache before object is completely destroyed.
+	 *
+	 * Called upon object destruction, which should be when PHP ends.
+	 *
+	 * @since 2.0.8
+	 *
+	 * @return true Always returns true.
+	 */
+	public function __destruct() {
+		return true;
+	}
+}
Index: www/wp-includes/autoload/requests/Exception/HTTP.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP.php	(revision UNDEFINED)
@@ -1,71 +0,0 @@
-<?php
-/**
- * Exception based on HTTP response
- *
- * @package Requests
- */
-
-/**
- * Exception based on HTTP response
- *
- * @package Requests
- */
-class Requests_Exception_HTTP extends Requests_Exception {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 0;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Unknown';
-
-	/**
-	 * Create a new exception
-	 *
-	 * There is no mechanism to pass in the status code, as this is set by the
-	 * subclass used. Reason phrases can vary, however.
-	 *
-	 * @param string|null $reason Reason phrase
-	 * @param mixed $data Associated data
-	 */
-	public function __construct($reason = null, $data = null) {
-		if ($reason !== null) {
-			$this->reason = $reason;
-		}
-
-		$message = sprintf('%d %s', $this->code, $this->reason);
-		parent::__construct($message, 'httpresponse', $data, $this->code);
-	}
-
-	/**
-	 * Get the status message
-	 */
-	public function getReason() {
-		return $this->reason;
-	}
-
-	/**
-	 * Get the correct exception class for a given error code
-	 *
-	 * @param int|bool $code HTTP status code, or false if unavailable
-	 * @return string Exception class name to use
-	 */
-	public static function get_class($code) {
-		if (!$code) {
-			return 'Requests_Exception_HTTP_Unknown';
-		}
-
-		$class = sprintf('Requests_Exception_HTTP_%d', $code);
-		if (class_exists($class)) {
-			return $class;
-		}
-
-		return 'Requests_Exception_HTTP_Unknown';
-	}
-}
\ No newline at end of file
Index: www/wp-includes/load.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/load.php	(revision 38565)
+++ www/wp-includes/load.php	(revision 38565)
@@ -1,1089 +0,0 @@
-<?php
-/**
- * These functions are needed to load WordPress.
- *
- * @internal This file must be parsable by PHP4.
- *
- * @package WordPress
- */
-
-/**
- * Return the HTTP protocol sent by the server.
- *
- * @since 4.4.0
- *
- * @return string The HTTP protocol. Default: HTTP/1.0.
- */
-function wp_get_server_protocol() {
-	$protocol = $_SERVER['SERVER_PROTOCOL'];
-	if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0' ) ) ) {
-		$protocol = 'HTTP/1.0';
-	}
-	return $protocol;
-}
-
-/**
- * Turn register globals off.
- *
- * @since 2.1.0
- * @access private
- */
-function wp_unregister_GLOBALS() {
-	if ( !ini_get( 'register_globals' ) )
-		return;
-
-	if ( isset( $_REQUEST['GLOBALS'] ) )
-		die( 'GLOBALS overwrite attempt detected' );
-
-	// Variables that shouldn't be unset
-	$no_unset = array( 'GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES', 'table_prefix' );
-
-	$input = array_merge( $_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, isset( $_SESSION ) && is_array( $_SESSION ) ? $_SESSION : array() );
-	foreach ( $input as $k => $v )
-		if ( !in_array( $k, $no_unset ) && isset( $GLOBALS[$k] ) ) {
-			unset( $GLOBALS[$k] );
-		}
-}
-
-/**
- * Fix `$_SERVER` variables for various setups.
- *
- * @since 3.0.0
- * @access private
- *
- * @global string $PHP_SELF The filename of the currently executing script,
- *                          relative to the document root.
- */
-function wp_fix_server_vars() {
-	global $PHP_SELF;
-
-	$default_server_values = array(
-		'SERVER_SOFTWARE' => '',
-		'REQUEST_URI' => '',
-	);
-
-	$_SERVER = array_merge( $default_server_values, $_SERVER );
-
-	// Fix for IIS when running with PHP ISAPI
-	if ( empty( $_SERVER['REQUEST_URI'] ) || ( PHP_SAPI != 'cgi-fcgi' && preg_match( '/^Microsoft-IIS\//', $_SERVER['SERVER_SOFTWARE'] ) ) ) {
-
-		// IIS Mod-Rewrite
-		if ( isset( $_SERVER['HTTP_X_ORIGINAL_URL'] ) ) {
-			$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL'];
-		}
-		// IIS Isapi_Rewrite
-		elseif ( isset( $_SERVER['HTTP_X_REWRITE_URL'] ) ) {
-			$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL'];
-		} else {
-			// Use ORIG_PATH_INFO if there is no PATH_INFO
-			if ( !isset( $_SERVER['PATH_INFO'] ) && isset( $_SERVER['ORIG_PATH_INFO'] ) )
-				$_SERVER['PATH_INFO'] = $_SERVER['ORIG_PATH_INFO'];
-
-			// Some IIS + PHP configurations puts the script-name in the path-info (No need to append it twice)
-			if ( isset( $_SERVER['PATH_INFO'] ) ) {
-				if ( $_SERVER['PATH_INFO'] == $_SERVER['SCRIPT_NAME'] )
-					$_SERVER['REQUEST_URI'] = $_SERVER['PATH_INFO'];
-				else
-					$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . $_SERVER['PATH_INFO'];
-			}
-
-			// Append the query string if it exists and isn't null
-			if ( ! empty( $_SERVER['QUERY_STRING'] ) ) {
-				$_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
-			}
-		}
-	}
-
-	// Fix for PHP as CGI hosts that set SCRIPT_FILENAME to something ending in php.cgi for all requests
-	if ( isset( $_SERVER['SCRIPT_FILENAME'] ) && ( strpos( $_SERVER['SCRIPT_FILENAME'], 'php.cgi' ) == strlen( $_SERVER['SCRIPT_FILENAME'] ) - 7 ) )
-		$_SERVER['SCRIPT_FILENAME'] = $_SERVER['PATH_TRANSLATED'];
-
-	// Fix for Dreamhost and other PHP as CGI hosts
-	if ( strpos( $_SERVER['SCRIPT_NAME'], 'php.cgi' ) !== false )
-		unset( $_SERVER['PATH_INFO'] );
-
-	// Fix empty PHP_SELF
-	$PHP_SELF = $_SERVER['PHP_SELF'];
-	if ( empty( $PHP_SELF ) )
-		$_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace( '/(\?.*)?$/', '', $_SERVER["REQUEST_URI"] );
-}
-
-/**
- * Check for the required PHP version, and the MySQL extension or
- * a database drop-in.
- *
- * Dies if requirements are not met.
- *
- * @since 3.0.0
- * @access private
- *
- * @global string $required_php_version The required PHP version string.
- * @global string $wp_version           The WordPress version string.
- */
-function wp_check_php_mysql_versions() {
-	global $required_php_version, $wp_version;
-	$php_version = phpversion();
-
-	if ( version_compare( $required_php_version, $php_version, '>' ) ) {
-		wp_load_translations_early();
-
-		$protocol = wp_get_server_protocol();
-		header( sprintf( '%s 500 Internal Server Error', $protocol ), true, 500 );
-		header( 'Content-Type: text/html; charset=utf-8' );
-		die( sprintf( __( 'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.' ), $php_version, $wp_version, $required_php_version ) );
-	}
-
-	if ( ! extension_loaded( 'mysql' ) && ! extension_loaded( 'mysqli' ) && ! extension_loaded( 'mysqlnd' ) && ! file_exists( WP_CONTENT_DIR . '/db.php' ) ) {
-		wp_load_translations_early();
-
-		$protocol = wp_get_server_protocol();
-		header( sprintf( '%s 500 Internal Server Error', $protocol ), true, 500 );
-		header( 'Content-Type: text/html; charset=utf-8' );
-		die( __( 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.' ) );
-	}
-}
-
-/**
- * Don't load all of WordPress when handling a favicon.ico request.
- *
- * Instead, send the headers for a zero-length favicon and bail.
- *
- * @since 3.0.0
- */
-function wp_favicon_request() {
-	if ( '/favicon.ico' == $_SERVER['REQUEST_URI'] ) {
-		header('Content-Type: image/vnd.microsoft.icon');
-		exit;
-	}
-}
-
-/**
- * Die with a maintenance message when conditions are met.
- *
- * Checks for a file in the WordPress root directory named ".maintenance".
- * This file will contain the variable $upgrading, set to the time the file
- * was created. If the file was created less than 10 minutes ago, WordPress
- * enters maintenance mode and displays a message.
- *
- * The default message can be replaced by using a drop-in (maintenance.php in
- * the wp-content directory).
- *
- * @since 3.0.0
- * @access private
- *
- * @global int $upgrading the unix timestamp marking when upgrading WordPress began.
- */
-function wp_maintenance() {
-	if ( ! file_exists( ABSPATH . '.maintenance' ) || wp_installing() )
-		return;
-
-	global $upgrading;
-
-	include( ABSPATH . '.maintenance' );
-	// If the $upgrading timestamp is older than 10 minutes, don't die.
-	if ( ( time() - $upgrading ) >= 600 )
-		return;
-
-	/**
-	 * Filters whether to enable maintenance mode.
-	 *
-	 * This filter runs before it can be used by plugins. It is designed for
-	 * non-web runtimes. If this filter returns true, maintenance mode will be
-	 * active and the request will end. If false, the request will be allowed to
-	 * continue processing even if maintenance mode should be active.
-	 *
-	 * @since 4.6.0
-	 *
-	 * @param bool $enable_checks Whether to enable maintenance mode. Default true.
-	 * @param int  $upgrading     The timestamp set in the .maintenance file.
-	 */
-	if ( ! apply_filters( 'enable_maintenance_mode', true, $upgrading ) ) {
-		return;
-	}
-
-	if ( file_exists( WP_CONTENT_DIR . '/maintenance.php' ) ) {
-		require_once( WP_CONTENT_DIR . '/maintenance.php' );
-		die();
-	}
-
-	wp_load_translations_early();
-
-	$protocol = wp_get_server_protocol();
-	header( "$protocol 503 Service Unavailable", true, 503 );
-	header( 'Content-Type: text/html; charset=utf-8' );
-	header( 'Retry-After: 600' );
-?>
-	<!DOCTYPE html>
-	<html xmlns="http://www.w3.org/1999/xhtml"<?php if ( is_rtl() ) echo ' dir="rtl"'; ?>>
-	<head>
-	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-		<title><?php _e( 'Maintenance' ); ?></title>
-
-	</head>
-	<body>
-		<h1><?php _e( 'Briefly unavailable for scheduled maintenance. Check back in a minute.' ); ?></h1>
-	</body>
-	</html>
-<?php
-	die();
-}
-
-/**
- * Start the WordPress micro-timer.
- *
- * @since 0.71
- * @access private
- *
- * @global float $timestart Unix timestamp set at the beginning of the page load.
- * @see timer_stop()
- *
- * @return bool Always returns true.
- */
-function timer_start() {
-	global $timestart;
-	$timestart = microtime( true );
-	return true;
-}
-
-/**
- * Retrieve or display the time from the page start to when function is called.
- *
- * @since 0.71
- *
- * @global float   $timestart Seconds from when timer_start() is called.
- * @global float   $timeend   Seconds from when function is called.
- *
- * @param int|bool $display   Whether to echo or return the results. Accepts 0|false for return,
- *                            1|true for echo. Default 0|false.
- * @param int      $precision The number of digits from the right of the decimal to display.
- *                            Default 3.
- * @return string The "second.microsecond" finished time calculation. The number is formatted
- *                for human consumption, both localized and rounded.
- */
-function timer_stop( $display = 0, $precision = 3 ) {
-	global $timestart, $timeend;
-	$timeend = microtime( true );
-	$timetotal = $timeend - $timestart;
-	$r = ( function_exists( 'number_format_i18n' ) ) ? number_format_i18n( $timetotal, $precision ) : number_format( $timetotal, $precision );
-	if ( $display )
-		echo $r;
-	return $r;
-}
-
-/**
- * Set PHP error reporting based on WordPress debug settings.
- *
- * Uses three constants: `WP_DEBUG`, `WP_DEBUG_DISPLAY`, and `WP_DEBUG_LOG`.
- * All three can be defined in wp-config.php. By default, `WP_DEBUG` and
- * `WP_DEBUG_LOG` are set to false, and `WP_DEBUG_DISPLAY` is set to true.
- *
- * When `WP_DEBUG` is true, all PHP notices are reported. WordPress will also
- * display internal notices: when a deprecated WordPress function, function
- * argument, or file is used. Deprecated code may be removed from a later
- * version.
- *
- * It is strongly recommended that plugin and theme developers use `WP_DEBUG`
- * in their development environments.
- *
- * `WP_DEBUG_DISPLAY` and `WP_DEBUG_LOG` perform no function unless `WP_DEBUG`
- * is true.
- *
- * When `WP_DEBUG_DISPLAY` is true, WordPress will force errors to be displayed.
- * `WP_DEBUG_DISPLAY` defaults to true. Defining it as null prevents WordPress
- * from changing the global configuration setting. Defining `WP_DEBUG_DISPLAY`
- * as false will force errors to be hidden.
- *
- * When `WP_DEBUG_LOG` is true, errors will be logged to debug.log in the content
- * directory.
- *
- * Errors are never displayed for XML-RPC, REST, and Ajax requests.
- *
- * @since 3.0.0
- * @access private
- */
-function wp_debug_mode() {
-	/**
-	 * Filters whether to allow the debug mode check to occur.
-	 *
-	 * This filter runs before it can be used by plugins. It is designed for
-	 * non-web run-times. Returning false causes the `WP_DEBUG` and related
-	 * constants to not be checked and the default php values for errors
-	 * will be used unless you take care to update them yourself.
-	 *
-	 * @since 4.6.0
-	 *
-	 * @param bool $enable_debug_mode Whether to enable debug mode checks to occur. Default true.
-	 */
-	if ( ! apply_filters( 'enable_wp_debug_mode_checks', true ) ){
-		return;
-	}
-
-	if ( WP_DEBUG ) {
-		error_reporting( E_ALL );
-
-		if ( WP_DEBUG_DISPLAY )
-			ini_set( 'display_errors', 1 );
-		elseif ( null !== WP_DEBUG_DISPLAY )
-			ini_set( 'display_errors', 0 );
-
-		if ( WP_DEBUG_LOG ) {
-			ini_set( 'log_errors', 1 );
-			ini_set( 'error_log', WP_CONTENT_DIR . '/debug.log' );
-		}
-	} else {
-		error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
-	}
-
-	if ( defined( 'XMLRPC_REQUEST' ) || defined( 'REST_REQUEST' ) || ( defined( 'WP_INSTALLING' ) && WP_INSTALLING ) || wp_doing_ajax() ) {
-		@ini_set( 'display_errors', 0 );
-	}
-}
-
-/**
- * Set the location of the language directory.
- *
- * To set directory manually, define the `WP_LANG_DIR` constant
- * in wp-config.php.
- *
- * If the language directory exists within `WP_CONTENT_DIR`, it
- * is used. Otherwise the language directory is assumed to live
- * in `WPINC`.
- *
- * @since 3.0.0
- * @access private
- */
-function wp_set_lang_dir() {
-	if ( !defined( 'WP_LANG_DIR' ) ) {
-		if ( file_exists( WP_CONTENT_DIR . '/languages' ) && @is_dir( WP_CONTENT_DIR . '/languages' ) || !@is_dir(ABSPATH . WPINC . '/languages') ) {
-			/**
-			 * Server path of the language directory.
-			 *
-			 * No leading slash, no trailing slash, full path, not relative to ABSPATH
-			 *
-			 * @since 2.1.0
-			 */
-			define( 'WP_LANG_DIR', WP_CONTENT_DIR . '/languages' );
-			if ( !defined( 'LANGDIR' ) ) {
-				// Old static relative path maintained for limited backward compatibility - won't work in some cases.
-				define( 'LANGDIR', 'wp-content/languages' );
-			}
-		} else {
-			/**
-			 * Server path of the language directory.
-			 *
-			 * No leading slash, no trailing slash, full path, not relative to `ABSPATH`.
-			 *
-			 * @since 2.1.0
-			 */
-			define( 'WP_LANG_DIR', ABSPATH . WPINC . '/languages' );
-			if ( !defined( 'LANGDIR' ) ) {
-				// Old relative path maintained for backward compatibility.
-				define( 'LANGDIR', WPINC . '/languages' );
-			}
-		}
-	}
-}
-
-/**
- * Load the database class file and instantiate the `$wpdb` global.
- *
- * @since 2.5.0
- *
- * @global wpdb $wpdb The WordPress database class.
- */
-function require_wp_db() {
-	global $wpdb;
-
-	require_once( ABSPATH . WPINC . '/wp-db.php' );
-	if ( file_exists( WP_CONTENT_DIR . '/db.php' ) )
-		require_once( WP_CONTENT_DIR . '/db.php' );
-
-	if ( isset( $wpdb ) ) {
-		return;
-	}
-
-	$wpdb = new wpdb( DB_USER, DB_PASSWORD, DB_NAME, DB_HOST );
-}
-
-/**
- * Set the database table prefix and the format specifiers for database
- * table columns.
- *
- * Columns not listed here default to `%s`.
- *
- * @since 3.0.0
- * @access private
- *
- * @global wpdb   $wpdb         The WordPress database class.
- * @global string $table_prefix The database table prefix.
- */
-function wp_set_wpdb_vars() {
-	global $wpdb, $table_prefix;
-	if ( !empty( $wpdb->error ) )
-		dead_db();
-
-	$wpdb->field_types = array( 'post_author' => '%d', 'post_parent' => '%d', 'menu_order' => '%d', 'term_id' => '%d', 'term_group' => '%d', 'term_taxonomy_id' => '%d',
-		'parent' => '%d', 'count' => '%d','object_id' => '%d', 'term_order' => '%d', 'ID' => '%d', 'comment_ID' => '%d', 'comment_post_ID' => '%d', 'comment_parent' => '%d',
-		'user_id' => '%d', 'link_id' => '%d', 'link_owner' => '%d', 'link_rating' => '%d', 'option_id' => '%d', 'blog_id' => '%d', 'meta_id' => '%d', 'post_id' => '%d',
-		'user_status' => '%d', 'umeta_id' => '%d', 'comment_karma' => '%d', 'comment_count' => '%d',
-		// multisite:
-		'active' => '%d', 'cat_id' => '%d', 'deleted' => '%d', 'lang_id' => '%d', 'mature' => '%d', 'public' => '%d', 'site_id' => '%d', 'spam' => '%d',
-	);
-
-	$prefix = $wpdb->set_prefix( $table_prefix );
-
-	if ( is_wp_error( $prefix ) ) {
-		wp_load_translations_early();
-		wp_die(
-			/* translators: 1: $table_prefix 2: wp-config.php */
-			sprintf( __( '<strong>ERROR</strong>: %1$s in %2$s can only contain numbers, letters, and underscores.' ),
-				'<code>$table_prefix</code>',
-				'<code>wp-config.php</code>'
-			)
-		);
-	}
-}
-
-/**
- * Toggle `$_wp_using_ext_object_cache` on and off without directly
- * touching global.
- *
- * @since 3.7.0
- *
- * @global bool $_wp_using_ext_object_cache
- *
- * @param bool $using Whether external object cache is being used.
- * @return bool The current 'using' setting.
- */
-function wp_using_ext_object_cache( $using = null ) {
-	global $_wp_using_ext_object_cache;
-	$current_using = $_wp_using_ext_object_cache;
-	if ( null !== $using )
-		$_wp_using_ext_object_cache = $using;
-	return $current_using;
-}
-
-/**
- * Start the WordPress object cache.
- *
- * If an object-cache.php file exists in the wp-content directory,
- * it uses that drop-in as an external object cache.
- *
- * @since 3.0.0
- * @access private
- */
-function wp_start_object_cache() {
-	$first_init = false;
- 	if ( ! function_exists( 'wp_cache_init' ) ) {
-		if ( file_exists( WP_CONTENT_DIR . '/object-cache.php' ) ) {
-			require_once ( WP_CONTENT_DIR . '/object-cache.php' );
-			if ( function_exists( 'wp_cache_init' ) ) {
-				wp_using_ext_object_cache( true );
-			}
-		}
-
-		$first_init = true;
-	} elseif ( ! wp_using_ext_object_cache() && file_exists( WP_CONTENT_DIR . '/object-cache.php' ) ) {
-		/*
-		 * Sometimes advanced-cache.php can load object-cache.php before
-		 * it is loaded here. This breaks the function_exists check above
-		 * and can result in `$_wp_using_ext_object_cache` being set
-		 * incorrectly. Double check if an external cache exists.
-		 */
-		wp_using_ext_object_cache( true );
-	}
-
-	if ( ! wp_using_ext_object_cache() ) {
-		require_once ( ABSPATH . WPINC . '/cache.php' );
-	}
-
-	/*
-	 * If cache supports reset, reset instead of init if already
-	 * initialized. Reset signals to the cache that global IDs
-	 * have changed and it may need to update keys and cleanup caches.
-	 */
-	if ( ! $first_init && function_exists( 'wp_cache_switch_to_blog' ) ) {
-		wp_cache_switch_to_blog( get_current_blog_id() );
-	} elseif ( function_exists( 'wp_cache_init' ) ) {
-		wp_cache_init();
-	}
-
-	if ( function_exists( 'wp_cache_add_global_groups' ) ) {
-		wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'site-details', 'rss', 'global-posts', 'blog-id-cache', 'networks', 'sites' ) );
-		wp_cache_add_non_persistent_groups( array( 'counts', 'plugins' ) );
-	}
-}
-
-/**
- * Redirect to the installer if WordPress is not installed.
- *
- * Dies with an error message when Multisite is enabled.
- *
- * @since 3.0.0
- * @access private
- */
-function wp_not_installed() {
-	if ( is_multisite() ) {
-		if ( ! is_blog_installed() && ! wp_installing() ) {
-			nocache_headers();
-
-			wp_die( __( 'The site you have requested is not installed properly. Please contact the system administrator.' ) );
-		}
-	} elseif ( ! is_blog_installed() && ! wp_installing() ) {
-		nocache_headers();
-
-		require( ABSPATH . WPINC . '/kses.php' );
-		require( ABSPATH . WPINC . '/pluggable.php' );
-		require( ABSPATH . WPINC . '/formatting.php' );
-
-		$link = wp_guess_url() . '/wp-admin/install.php';
-
-		wp_redirect( $link );
-		die();
-	}
-}
-
-/**
- * Retrieve an array of must-use plugin files.
- *
- * The default directory is wp-content/mu-plugins. To change the default
- * directory manually, define `WPMU_PLUGIN_DIR` and `WPMU_PLUGIN_URL`
- * in wp-config.php.
- *
- * @since 3.0.0
- * @access private
- *
- * @return array Files to include.
- */
-function wp_get_mu_plugins() {
-	$mu_plugins = array();
-	if ( !is_dir( WPMU_PLUGIN_DIR ) )
-		return $mu_plugins;
-	if ( ! $dh = opendir( WPMU_PLUGIN_DIR ) )
-		return $mu_plugins;
-	while ( ( $plugin = readdir( $dh ) ) !== false ) {
-		if ( substr( $plugin, -4 ) == '.php' )
-			$mu_plugins[] = WPMU_PLUGIN_DIR . '/' . $plugin;
-	}
-	closedir( $dh );
-	sort( $mu_plugins );
-
-	return $mu_plugins;
-}
-
-/**
- * Retrieve an array of active and valid plugin files.
- *
- * While upgrading or installing WordPress, no plugins are returned.
- *
- * The default directory is wp-content/plugins. To change the default
- * directory manually, define `WP_PLUGIN_DIR` and `WP_PLUGIN_URL`
- * in wp-config.php.
- *
- * @since 3.0.0
- * @access private
- *
- * @return array Files.
- */
-function wp_get_active_and_valid_plugins() {
-	$plugins = array();
-	$active_plugins = (array) get_option( 'active_plugins', array() );
-
-	// Check for hacks file if the option is enabled
-	if ( get_option( 'hack_file' ) && file_exists( ABSPATH . 'my-hacks.php' ) ) {
-		_deprecated_file( 'my-hacks.php', '1.5.0' );
-		array_unshift( $plugins, ABSPATH . 'my-hacks.php' );
-	}
-
-	if ( empty( $active_plugins ) || wp_installing() )
-		return $plugins;
-
-	$network_plugins = is_multisite() ? wp_get_active_network_plugins() : false;
-
-	foreach ( $active_plugins as $plugin ) {
-		if ( ! validate_file( $plugin ) // $plugin must validate as file
-			&& '.php' == substr( $plugin, -4 ) // $plugin must end with '.php'
-			&& file_exists( WP_PLUGIN_DIR . '/' . $plugin ) // $plugin must exist
-			// not already included as a network plugin
-			&& ( ! $network_plugins || ! in_array( WP_PLUGIN_DIR . '/' . $plugin, $network_plugins ) )
-			)
-		$plugins[] = WP_PLUGIN_DIR . '/' . $plugin;
-	}
-	return $plugins;
-}
-
-/**
- * Set internal encoding.
- *
- * In most cases the default internal encoding is latin1, which is
- * of no use, since we want to use the `mb_` functions for `utf-8` strings.
- *
- * @since 3.0.0
- * @access private
- */
-function wp_set_internal_encoding() {
-	if ( function_exists( 'mb_internal_encoding' ) ) {
-		$charset = get_option( 'blog_charset' );
-		if ( ! $charset || ! @mb_internal_encoding( $charset ) )
-			mb_internal_encoding( 'UTF-8' );
-	}
-}
-
-/**
- * Add magic quotes to `$_GET`, `$_POST`, `$_COOKIE`, and `$_SERVER`.
- *
- * Also forces `$_REQUEST` to be `$_GET + $_POST`. If `$_SERVER`,
- * `$_COOKIE`, or `$_ENV` are needed, use those superglobals directly.
- *
- * @since 3.0.0
- * @access private
- */
-function wp_magic_quotes() {
-	// If already slashed, strip.
-	if ( get_magic_quotes_gpc() ) {
-		$_GET    = stripslashes_deep( $_GET    );
-		$_POST   = stripslashes_deep( $_POST   );
-		$_COOKIE = stripslashes_deep( $_COOKIE );
-	}
-
-	// Escape with wpdb.
-	$_GET    = add_magic_quotes( $_GET    );
-	$_POST   = add_magic_quotes( $_POST   );
-	$_COOKIE = add_magic_quotes( $_COOKIE );
-	$_SERVER = add_magic_quotes( $_SERVER );
-
-	// Force REQUEST to be GET + POST.
-	$_REQUEST = array_merge( $_GET, $_POST );
-}
-
-/**
- * Runs just before PHP shuts down execution.
- *
- * @since 1.2.0
- * @access private
- */
-function shutdown_action_hook() {
-	/**
-	 * Fires just before PHP shuts down execution.
-	 *
-	 * @since 1.2.0
-	 */
-	do_action( 'shutdown' );
-
-	wp_cache_close();
-}
-
-/**
- * Copy an object.
- *
- * @since 2.7.0
- * @deprecated 3.2.0
- *
- * @param object $object The object to clone.
- * @return object The cloned object.
- */
-function wp_clone( $object ) {
-	// Use parens for clone to accommodate PHP 4. See #17880
-	return clone( $object );
-}
-
-/**
- * Whether the current request is for an administrative interface page.
- *
- * Does not check if the user is an administrator; current_user_can()
- * for checking roles and capabilities.
- *
- * @since 1.5.1
- *
- * @global WP_Screen $current_screen
- *
- * @return bool True if inside WordPress administration interface, false otherwise.
- */
-function is_admin() {
-	if ( isset( $GLOBALS['current_screen'] ) )
-		return $GLOBALS['current_screen']->in_admin();
-	elseif ( defined( 'WP_ADMIN' ) )
-		return WP_ADMIN;
-
-	return false;
-}
-
-/**
- * Whether the current request is for a site's admininstrative interface.
- *
- * e.g. `/wp-admin/`
- *
- * Does not check if the user is an administrator; current_user_can()
- * for checking roles and capabilities.
- *
- * @since 3.1.0
- *
- * @global WP_Screen $current_screen
- *
- * @return bool True if inside WordPress blog administration pages.
- */
-function is_blog_admin() {
-	if ( isset( $GLOBALS['current_screen'] ) )
-		return $GLOBALS['current_screen']->in_admin( 'site' );
-	elseif ( defined( 'WP_BLOG_ADMIN' ) )
-		return WP_BLOG_ADMIN;
-
-	return false;
-}
-
-/**
- * Whether the current request is for the network administrative interface.
- *
- * e.g. `/wp-admin/network/`
- *
- * Does not check if the user is an administrator; current_user_can()
- * for checking roles and capabilities.
- *
- * @since 3.1.0
- *
- * @global WP_Screen $current_screen
- *
- * @return bool True if inside WordPress network administration pages.
- */
-function is_network_admin() {
-	if ( isset( $GLOBALS['current_screen'] ) )
-		return $GLOBALS['current_screen']->in_admin( 'network' );
-	elseif ( defined( 'WP_NETWORK_ADMIN' ) )
-		return WP_NETWORK_ADMIN;
-
-	return false;
-}
-
-/**
- * Whether the current request is for a user admin screen.
- *
- * e.g. `/wp-admin/user/`
- *
- * Does not inform on whether the user is an admin! Use capability
- * checks to tell if the user should be accessing a section or not
- * current_user_can().
- *
- * @since 3.1.0
- *
- * @global WP_Screen $current_screen
- *
- * @return bool True if inside WordPress user administration pages.
- */
-function is_user_admin() {
-	if ( isset( $GLOBALS['current_screen'] ) )
-		return $GLOBALS['current_screen']->in_admin( 'user' );
-	elseif ( defined( 'WP_USER_ADMIN' ) )
-		return WP_USER_ADMIN;
-
-	return false;
-}
-
-/**
- * If Multisite is enabled.
- *
- * @since 3.0.0
- *
- * @return bool True if Multisite is enabled, false otherwise.
- */
-function is_multisite() {
-	if ( defined( 'MULTISITE' ) )
-		return MULTISITE;
-
-	if ( defined( 'SUBDOMAIN_INSTALL' ) || defined( 'VHOST' ) || defined( 'SUNRISE' ) )
-		return true;
-
-	return false;
-}
-
-/**
- * Retrieve the current site ID.
- *
- * @since 3.1.0
- *
- * @global int $blog_id
- *
- * @return int Site ID.
- */
-function get_current_blog_id() {
-	global $blog_id;
-	return absint($blog_id);
-}
-
-/**
- * Retrieves the current network ID.
- *
- * @since 4.6.0
- *
- * @global WP_Network $current_site The current network.
- *
- * @return int The ID of the current network.
- */
-function get_current_network_id() {
-	if ( ! is_multisite() ) {
-		return 1;
-	}
-
-	$current_site = get_current_site();
-
-	if ( ! isset( $current_site->id ) ) {
-		return get_main_network_id();
-	}
-
-	return absint( $current_site->id );
-}
-
-/**
- * Attempt an early load of translations.
- *
- * Used for errors encountered during the initial loading process, before
- * the locale has been properly detected and loaded.
- *
- * Designed for unusual load sequences (like setup-config.php) or for when
- * the script will then terminate with an error, otherwise there is a risk
- * that a file can be double-included.
- *
- * @since 3.4.0
- * @access private
- *
- * @global string    $text_direction
- * @global WP_Locale $wp_locale      The WordPress date and time locale object.
- *
- * @staticvar bool $loaded
- */
-function wp_load_translations_early() {
-	global $text_direction, $wp_locale;
-
-	static $loaded = false;
-	if ( $loaded )
-		return;
-	$loaded = true;
-
-	if ( function_exists( 'did_action' ) && did_action( 'init' ) )
-		return;
-
-	// We need $wp_local_package
-	require ABSPATH . WPINC . '/version.php';
-
-	// Translation and localization
-	require_once ABSPATH . WPINC . '/pomo/mo.php';
-	require_once ABSPATH . WPINC . '/l10n.php';
-	require_once ABSPATH . WPINC . '/class-wp-locale.php';
-
-	// General libraries
-	require_once ABSPATH . WPINC . '/plugin.php';
-
-	$locales = $locations = array();
-
-	while ( true ) {
-		if ( defined( 'WPLANG' ) ) {
-			if ( '' == WPLANG )
-				break;
-			$locales[] = WPLANG;
-		}
-
-		if ( isset( $wp_local_package ) )
-			$locales[] = $wp_local_package;
-
-		if ( ! $locales )
-			break;
-
-		if ( defined( 'WP_LANG_DIR' ) && @is_dir( WP_LANG_DIR ) )
-			$locations[] = WP_LANG_DIR;
-
-		if ( defined( 'WP_CONTENT_DIR' ) && @is_dir( WP_CONTENT_DIR . '/languages' ) )
-			$locations[] = WP_CONTENT_DIR . '/languages';
-
-		if ( @is_dir( ABSPATH . 'wp-content/languages' ) )
-			$locations[] = ABSPATH . 'wp-content/languages';
-
-		if ( @is_dir( ABSPATH . WPINC . '/languages' ) )
-			$locations[] = ABSPATH . WPINC . '/languages';
-
-		if ( ! $locations )
-			break;
-
-		$locations = array_unique( $locations );
-
-		foreach ( $locales as $locale ) {
-			foreach ( $locations as $location ) {
-				if ( file_exists( $location . '/' . $locale . '.mo' ) ) {
-					load_textdomain( 'default', $location . '/' . $locale . '.mo' );
-					if ( defined( 'WP_SETUP_CONFIG' ) && file_exists( $location . '/admin-' . $locale . '.mo' ) )
-						load_textdomain( 'default', $location . '/admin-' . $locale . '.mo' );
-					break 2;
-				}
-			}
-		}
-
-		break;
-	}
-
-	$wp_locale = new WP_Locale();
-}
-
-/**
- * Check or set whether WordPress is in "installation" mode.
- *
- * If the `WP_INSTALLING` constant is defined during the bootstrap, `wp_installing()` will default to `true`.
- *
- * @since 4.4.0
- *
- * @staticvar bool $installing
- *
- * @param bool $is_installing Optional. True to set WP into Installing mode, false to turn Installing mode off.
- *                            Omit this parameter if you only want to fetch the current status.
- * @return bool True if WP is installing, otherwise false. When a `$is_installing` is passed, the function will
- *              report whether WP was in installing mode prior to the change to `$is_installing`.
- */
-function wp_installing( $is_installing = null ) {
-	static $installing = null;
-
-	// Support for the `WP_INSTALLING` constant, defined before WP is loaded.
-	if ( is_null( $installing ) ) {
-		$installing = defined( 'WP_INSTALLING' ) && WP_INSTALLING;
-	}
-
-	if ( ! is_null( $is_installing ) ) {
-		$old_installing = $installing;
-		$installing = $is_installing;
-		return (bool) $old_installing;
-	}
-
-	return (bool) $installing;
-}
-
-/**
- * Determines if SSL is used.
- *
- * @since 2.6.0
- * @since 4.6.0 Moved from functions.php to load.php.
- *
- * @return bool True if SSL, otherwise false.
- */
-function is_ssl() {
-	if ( isset( $_SERVER['HTTPS'] ) ) {
-		if ( 'on' == strtolower( $_SERVER['HTTPS'] ) ) {
-			return true;
-		}
-
-		if ( '1' == $_SERVER['HTTPS'] ) {
-			return true;
-		}
-	} elseif ( isset($_SERVER['SERVER_PORT'] ) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
-		return true;
-	}
-	return false;
-}
-
-/**
- * Converts a shorthand byte value to an integer byte value.
- *
- * @since 2.3.0
- * @since 4.6.0 Moved from media.php to load.php.
- *
- * @link https://secure.php.net/manual/en/function.ini-get.php
- * @link https://secure.php.net/manual/en/faq.using.php#faq.using.shorthandbytes
- *
- * @param string $value A (PHP ini) byte value, either shorthand or ordinary.
- * @return int An integer byte value.
- */
-function wp_convert_hr_to_bytes( $value ) {
-	$value = strtolower( trim( $value ) );
-	$bytes = (int) $value;
-
-	if ( false !== strpos( $value, 'g' ) ) {
-		$bytes *= GB_IN_BYTES;
-	} elseif ( false !== strpos( $value, 'm' ) ) {
-		$bytes *= MB_IN_BYTES;
-	} elseif ( false !== strpos( $value, 'k' ) ) {
-		$bytes *= KB_IN_BYTES;
-	}
-
-	// Deal with large (float) values which run into the maximum integer size.
-	return min( $bytes, PHP_INT_MAX );
-}
-
-/**
- * Determines whether a PHP ini value is changeable at runtime.
- *
- * @since 4.6.0
- *
- * @link https://secure.php.net/manual/en/function.ini-get-all.php
- *
- * @param string $setting The name of the ini setting to check.
- * @return bool True if the value is changeable at runtime. False otherwise.
- */
-function wp_is_ini_value_changeable( $setting ) {
-	static $ini_all;
-
-	if ( ! isset( $ini_all ) ) {
-		$ini_all = false;
-		// Sometimes `ini_get_all()` is disabled via the `disable_functions` option for "security purposes".
-		if ( function_exists( 'ini_get_all' ) ) {
-			$ini_all = ini_get_all();
-		}
- 	}
-
-	// Bit operator to workaround https://bugs.php.net/bug.php?id=44936 which changes access level to 63 in PHP 5.2.6 - 5.2.17.
-	if ( isset( $ini_all[ $setting ]['access'] ) && ( INI_ALL === ( $ini_all[ $setting ]['access'] & 7 ) || INI_USER === ( $ini_all[ $setting ]['access'] & 7 ) ) ) {
-		return true;
-	}
-
-	// If we were unable to retrieve the details, fail gracefully to assume it's changeable.
-	if ( ! is_array( $ini_all ) ) {
-		return true;
-	}
-
-	return false;
-}
-
-/**
- * Determines whether the current request is a WordPress Ajax request.
- *
- * @since 4.7.0
- *
- * @return bool True if it's a WordPress Ajax request, false otherwise.
- */
-function wp_doing_ajax() {
-	/**
-	 * Filters whether the current request is a WordPress Ajax request.
-	 *
-	 * @since 4.7.0
-	 *
-	 * @param bool $wp_doing_ajax Whether the current request is a WordPress Ajax request.
-	 */
-	return apply_filters( 'wp_doing_ajax', defined( 'DOING_AJAX' ) && DOING_AJAX );
-}
-
-/**
- * Check whether variable is a WordPress Error.
- *
- * Returns true if $thing is an object of the WP_Error class.
- *
- * @since 2.1.0
- *
- * @param mixed $thing Check if unknown variable is a WP_Error object.
- * @return bool True, if WP_Error. False, if not WP_Error.
- */
-function is_wp_error( $thing ) {
-	return ( $thing instanceof WP_Error );
-}
-
-/**
- * Get the current network.
- *
- * Returns an object containing the 'id', 'domain', 'path', and 'site_name'
- * properties of the network being viewed.
- *
- * @see wpmu_current_site()
- *
- * @since MU
- *
- * @global WP_Network $current_site
- *
- * @return WP_Network
- */
-function get_current_site() {
-	global $current_site;
-	return $current_site;
-}
Index: www/wp-includes/class-wp-ajax-response.php
===================================================================
--- www/wp-includes/class-wp-ajax-response.php	(revision 38565)
+++ www/wp-includes/autoload/http/WP_Ajax_Response.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/includes/class-wp-plugins-list-table.php
===================================================================
--- www/wp-admin/includes/class-wp-plugins-list-table.php	(revision 38565)
+++ www/wp-admin/autoload/list-table/WP_Plugins_List_Table.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/Requests/Exception/HTTP/504.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/504.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_504.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/customize/class-wp-customize-new-menu-control.php
===================================================================
--- www/wp-includes/customize/class-wp-customize-new-menu-control.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_New_Menu_Control.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-walker-nav-menu.php
===================================================================
--- www/wp-includes/class-walker-nav-menu.php	(revision 38565)
+++ www/wp-includes/autoload/walker/Walker_Nav_Menu.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/includes/class-wp-filesystem-ftpsockets.php
===================================================================
--- www/wp-admin/includes/class-wp-filesystem-ftpsockets.php	(revision 38565)
+++ www/wp-admin/autoload/filesystem/WP_Filesystem_ftpsockets.php	(revision )
@@ -30,10 +30,6 @@
 		$this->method = 'ftpsockets';
 		$this->errors = new WP_Error();
 
-		// Check if possible to use ftp functions.
-		if ( ! @include_once( ABSPATH . 'wp-admin/includes/class-ftp.php' ) ) {
-			return;
-		}
 		$this->ftp = new ftp();
 
 		if ( empty($opt['port']) )
Index: www/wp-admin/admin-ajax.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/admin-ajax.php	(revision 38565)
+++ www/wp-admin/admin-ajax.php	(revision 38565)
@@ -1,104 +0,0 @@
-<?php
-/**
- * WordPress Ajax Process Execution
- *
- * @package WordPress
- * @subpackage Administration
- *
- * @link https://codex.wordpress.org/AJAX_in_Plugins
- */
-
-/**
- * Executing Ajax process.
- *
- * @since 2.1.0
- */
-define( 'DOING_AJAX', true );
-if ( ! defined( 'WP_ADMIN' ) ) {
-	define( 'WP_ADMIN', true );
-}
-
-/** Load WordPress Bootstrap */
-require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
-
-/** Allow for cross-domain requests (from the front end). */
-send_origin_headers();
-
-// Require an action parameter
-if ( empty( $_REQUEST['action'] ) )
-	die( '0' );
-
-/** Load WordPress Administration APIs */
-require_once( ABSPATH . 'wp-admin/includes/admin.php' );
-
-/** Load Ajax Handlers for WordPress Core */
-require_once( ABSPATH . 'wp-admin/includes/ajax-actions.php' );
-
-@header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) );
-@header( 'X-Robots-Tag: noindex' );
-
-send_nosniff_header();
-nocache_headers();
-
-/** This action is documented in wp-admin/admin.php */
-do_action( 'admin_init' );
-
-$core_actions_get = array(
-	'fetch-list', 'ajax-tag-search', 'wp-compression-test', 'imgedit-preview', 'oembed-cache',
-	'autocomplete-user', 'dashboard-widgets', 'logged-in',
-);
-
-$core_actions_post = array(
-	'oembed-cache', 'image-editor', 'delete-comment', 'delete-tag', 'delete-link',
-	'delete-meta', 'delete-post', 'trash-post', 'untrash-post', 'delete-page', 'dim-comment',
-	'add-link-category', 'add-tag', 'get-tagcloud', 'get-comments', 'replyto-comment',
-	'edit-comment', 'add-menu-item', 'add-meta', 'add-user', 'closed-postboxes',
-	'hidden-columns', 'update-welcome-panel', 'menu-get-metabox', 'wp-link-ajax',
-	'menu-locations-save', 'menu-quick-search', 'meta-box-order', 'get-permalink',
-	'sample-permalink', 'inline-save', 'inline-save-tax', 'find_posts', 'widgets-order',
-	'save-widget', 'delete-inactive-widgets', 'set-post-thumbnail', 'date_format', 'time_format',
-	'wp-remove-post-lock', 'dismiss-wp-pointer', 'upload-attachment', 'get-attachment',
-	'query-attachments', 'save-attachment', 'save-attachment-compat', 'send-link-to-editor',
-	'send-attachment-to-editor', 'save-attachment-order', 'heartbeat', 'get-revision-diffs',
-	'save-user-color-scheme', 'update-widget', 'query-themes', 'parse-embed', 'set-attachment-thumbnail',
-	'parse-media-shortcode', 'destroy-sessions', 'install-plugin', 'update-plugin', 'press-this-save-post',
-	'press-this-add-category', 'crop-image', 'generate-password', 'save-wporg-username', 'delete-plugin',
-	'search-plugins', 'search-install-plugins', 'activate-plugin', 'update-theme', 'delete-theme',
-	'install-theme', 'get-post-thumbnail-html',
-);
-
-// Deprecated
-$core_actions_post[] = 'wp-fullscreen-save-post';
-
-// Register core Ajax calls.
-if ( ! empty( $_GET['action'] ) && in_array( $_GET['action'], $core_actions_get ) )
-	add_action( 'wp_ajax_' . $_GET['action'], 'wp_ajax_' . str_replace( '-', '_', $_GET['action'] ), 1 );
-
-if ( ! empty( $_POST['action'] ) && in_array( $_POST['action'], $core_actions_post ) )
-	add_action( 'wp_ajax_' . $_POST['action'], 'wp_ajax_' . str_replace( '-', '_', $_POST['action'] ), 1 );
-
-add_action( 'wp_ajax_nopriv_heartbeat', 'wp_ajax_nopriv_heartbeat', 1 );
-
-if ( is_user_logged_in() ) {
-	/**
-	 * Fires authenticated Ajax actions for logged-in users.
-	 *
-	 * The dynamic portion of the hook name, `$_REQUEST['action']`,
-	 * refers to the name of the Ajax action callback being fired.
-	 *
-	 * @since 2.1.0
-	 */
-	do_action( 'wp_ajax_' . $_REQUEST['action'] );
-} else {
-	/**
-	 * Fires non-authenticated Ajax actions for logged-out users.
-	 *
-	 * The dynamic portion of the hook name, `$_REQUEST['action']`,
-	 * refers to the name of the Ajax action callback being fired.
-	 *
-	 * @since 2.8.0
-	 */
-	do_action( 'wp_ajax_nopriv_' . $_REQUEST['action'] );
-}
-// Default status
-die( '0' );
Index: www/wp-includes/pomo/mo.php
===================================================================
--- www/wp-includes/pomo/mo.php	(revision 38565)
+++ www/wp-includes/autoload/pomo/MO.php	(revision )
@@ -7,10 +7,6 @@
  * @subpackage mo
  */
 
-require_once dirname(__FILE__) . '/translations.php';
-require_once dirname(__FILE__) . '/streams.php';
-
-if ( ! class_exists( 'MO', false ) ):
 class MO extends Gettext_Translations {
 
 	var $_nplurals = 2;
@@ -299,4 +295,3 @@
 		return $this->_nplurals;
 	}
 }
-endif;
\ No newline at end of file
Index: www/wp-includes/Requests/Exception/Transport.php
===================================================================
--- www/wp-includes/Requests/Exception/Transport.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_Transport.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/options-reading.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/options-reading.php	(revision 38565)
+++ www/wp-admin/options-reading.php	(revision 38565)
@@ -1,151 +0,0 @@
-<?php
-/**
- * Reading settings administration panel.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-if ( ! current_user_can( 'manage_options' ) )
-	wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
-
-$title = __( 'Reading Settings' );
-$parent_file = 'options-general.php';
-
-add_action('admin_head', 'options_reading_add_js');
-
-get_current_screen()->add_help_tab( array(
-	'id'      => 'overview',
-	'title'   => __('Overview'),
-	'content' => '<p>' . __('This screen contains the settings that affect the display of your content.') . '</p>' .
-		'<p>' . sprintf(__('You can choose what&#8217;s displayed on the front page of your site. It can be posts in reverse chronological order (classic blog), or a fixed/static page. To set a static home page, you first need to create two <a href="%s">Pages</a>. One will become the front page, and the other will be where your posts are displayed.'), 'post-new.php?post_type=page') . '</p>' .
-		'<p>' . __('You can also control the display of your content in RSS feeds, including the maximum numbers of posts to display and whether to show full text or a summary.') . '</p>' .
-		'<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>',
-) );
-
-get_current_screen()->add_help_tab( array(
-	'id'      => 'site-visibility',
-	'title'   => has_action( 'blog_privacy_selector' ) ? __( 'Site Visibility' ) : __( 'Search Engine Visibility' ),
-	'content' => '<p>' . __( 'You can choose whether or not your site will be crawled by robots, ping services, and spiders. If you want those services to ignore your site, click the checkbox next to &#8220;Discourage search engines from indexing this site&#8221; and click the Save Changes button at the bottom of the screen. Note that your privacy is not complete; your site is still visible on the web.' ) . '</p>' .
-		'<p>' . __( 'When this setting is in effect, a reminder is shown in the At a Glance box of the Dashboard that says, &#8220;Search Engines Discouraged,&#8221; to remind you that your site is not being crawled.' ) . '</p>',
-) );
-
-get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Settings_Reading_Screen" target="_blank">Documentation on Reading Settings</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
-);
-
-include( ABSPATH . 'wp-admin/admin-header.php' );
-?>
-
-<div class="wrap">
-<h1><?php echo esc_html( $title ); ?></h1>
-
-<form method="post" action="options.php">
-<?php
-settings_fields( 'reading' );
-
-if ( ! in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) )
-	add_settings_field( 'blog_charset', __( 'Encoding for pages and feeds' ), 'options_reading_blog_charset', 'reading', 'default', array( 'label_for' => 'blog_charset' ) );
-?>
-
-<?php if ( ! get_pages() ) : ?>
-<input name="show_on_front" type="hidden" value="posts" />
-<table class="form-table">
-<?php
-	if ( 'posts' != get_option( 'show_on_front' ) ) :
-		update_option( 'show_on_front', 'posts' );
-	endif;
-
-else :
-	if ( 'page' == get_option( 'show_on_front' ) && ! get_option( 'page_on_front' ) && ! get_option( 'page_for_posts' ) )
-		update_option( 'show_on_front', 'posts' );
-?>
-<table class="form-table">
-<tr>
-<th scope="row"><?php _e( 'Front page displays' ); ?></th>
-<td id="front-static-pages"><fieldset><legend class="screen-reader-text"><span><?php _e( 'Front page displays' ); ?></span></legend>
-	<p><label>
-		<input name="show_on_front" type="radio" value="posts" class="tog" <?php checked( 'posts', get_option( 'show_on_front' ) ); ?> />
-		<?php _e( 'Your latest posts' ); ?>
-	</label>
-	</p>
-	<p><label>
-		<input name="show_on_front" type="radio" value="page" class="tog" <?php checked( 'page', get_option( 'show_on_front' ) ); ?> />
-		<?php printf( __( 'A <a href="%s">static page</a> (select below)' ), 'edit.php?post_type=page' ); ?>
-	</label>
-	</p>
-<ul>
-	<li><label for="page_on_front"><?php printf( __( 'Front page: %s' ), wp_dropdown_pages( array( 'name' => 'page_on_front', 'echo' => 0, 'show_option_none' => __( '&mdash; Select &mdash;' ), 'option_none_value' => '0', 'selected' => get_option( 'page_on_front' ) ) ) ); ?></label></li>
-	<li><label for="page_for_posts"><?php printf( __( 'Posts page: %s' ), wp_dropdown_pages( array( 'name' => 'page_for_posts', 'echo' => 0, 'show_option_none' => __( '&mdash; Select &mdash;' ), 'option_none_value' => '0', 'selected' => get_option( 'page_for_posts' ) ) ) ); ?></label></li>
-</ul>
-<?php if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) == get_option( 'page_on_front' ) ) : ?>
-<div id="front-page-warning" class="error inline"><p><?php _e( '<strong>Warning:</strong> these pages should not be the same!' ); ?></p></div>
-<?php endif; ?>
-</fieldset></td>
-</tr>
-<?php endif; ?>
-<tr>
-<th scope="row"><label for="posts_per_page"><?php _e( 'Blog pages show at most' ); ?></label></th>
-<td>
-<input name="posts_per_page" type="number" step="1" min="1" id="posts_per_page" value="<?php form_option( 'posts_per_page' ); ?>" class="small-text" /> <?php _e( 'posts' ); ?>
-</td>
-</tr>
-<tr>
-<th scope="row"><label for="posts_per_rss"><?php _e( 'Syndication feeds show the most recent' ); ?></label></th>
-<td><input name="posts_per_rss" type="number" step="1" min="1" id="posts_per_rss" value="<?php form_option( 'posts_per_rss' ); ?>" class="small-text" /> <?php _e( 'items' ); ?></td>
-</tr>
-<tr>
-<th scope="row"><?php _e( 'For each article in a feed, show' ); ?> </th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'For each article in a feed, show' ); ?> </span></legend>
-<p><label><input name="rss_use_excerpt" type="radio" value="0" <?php checked( 0, get_option( 'rss_use_excerpt' ) ); ?>	/> <?php _e( 'Full text' ); ?></label><br />
-<label><input name="rss_use_excerpt" type="radio" value="1" <?php checked( 1, get_option( 'rss_use_excerpt' ) ); ?> /> <?php _e( 'Summary' ); ?></label></p>
-</fieldset></td>
-</tr>
-
-<tr class="option-site-visibility">
-<th scope="row"><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?> </th>
-<td><fieldset><legend class="screen-reader-text"><span><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?> </span></legend>
-<?php if ( has_action( 'blog_privacy_selector' ) ) : ?>
-	<input id="blog-public" type="radio" name="blog_public" value="1" <?php checked('1', get_option('blog_public')); ?> />
-	<label for="blog-public"><?php _e( 'Allow search engines to index this site' );?></label><br/>
-	<input id="blog-norobots" type="radio" name="blog_public" value="0" <?php checked('0', get_option('blog_public')); ?> />
-	<label for="blog-norobots"><?php _e( 'Discourage search engines from indexing this site' ); ?></label>
-	<p class="description"><?php _e( 'Note: Neither of these options blocks access to your site &mdash; it is up to search engines to honor your request.' ); ?></p>
-	<?php
-	/**
-	 * Enable the legacy 'Site Visibility' privacy options.
-	 *
-	 * By default the privacy options form displays a single checkbox to 'discourage' search
-	 * engines from indexing the site. Hooking to this action serves a dual purpose:
-	 * 1. Disable the single checkbox in favor of a multiple-choice list of radio buttons.
-	 * 2. Open the door to adding additional radio button choices to the list.
-	 *
-	 * Hooking to this action also converts the 'Search Engine Visibility' heading to the more
-	 * open-ended 'Site Visibility' heading.
-	 *
-	 * @since 2.1.0
-	 */
-	do_action( 'blog_privacy_selector' );
-	?>
-<?php else : ?>
-	<label for="blog_public"><input name="blog_public" type="checkbox" id="blog_public" value="0" <?php checked( '0', get_option( 'blog_public' ) ); ?> />
-	<?php _e( 'Discourage search engines from indexing this site' ); ?></label>
-	<p class="description"><?php _e( 'It is up to search engines to honor this request.' ); ?></p>
-<?php endif; ?>
-</fieldset></td>
-</tr>
-
-<?php do_settings_fields( 'reading', 'default' ); ?>
-</table>
-
-<?php do_settings_sections( 'reading' ); ?>
-
-<?php submit_button(); ?>
-</form>
-</div>
-<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>
Index: www/wp-admin/includes/file.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/includes/file.php	(revision 38565)
+++ www/wp-admin/includes/file.php	(revision )
@@ -737,7 +737,7 @@
 
 	mbstring_binary_safe_encoding();
 
-	require_once(ABSPATH . 'wp-admin/includes/class-pclzip.php');
+	require_once(ABSPATH . 'wp-admin/includes/pclzip.php');
 
 	$archive = new PclZip($file);
 
@@ -885,8 +885,6 @@
  */
 function WP_Filesystem( $args = false, $context = false, $allow_relaxed_file_ownership = false ) {
 	global $wp_filesystem;
-
-	require_once(ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php');
 
 	$method = get_filesystem_method( $args, $context, $allow_relaxed_file_ownership );
 
Index: www/wp-includes/ID3/module.tag.id3v2.php
===================================================================
--- www/wp-includes/ID3/module.tag.id3v2.php	(revision 38565)
+++ www/wp-includes/autoload/id3/getid3_id3v2.php	(revision )
@@ -14,8 +14,6 @@
 //                                                            ///
 /////////////////////////////////////////////////////////////////
 
-getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.tag.id3v1.php', __FILE__, true);
-
 class getid3_id3v2 extends getid3_handler
 {
 	public $StartingOffset = 0;
Index: www/wp-includes/autoload/id3/AMFReader.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/id3/AMFReader.php	(revision )
+++ www/wp-includes/autoload/id3/AMFReader.php	(revision )
@@ -0,0 +1,211 @@
+<?php
+/////////////////////////////////////////////////////////////////
+/// getID3() by James Heinrich <info@getid3.org>               //
+//  available at http://getid3.sourceforge.net                 //
+//            or http://www.getid3.org                         //
+//          also https://github.com/JamesHeinrich/getID3       //
+//                                                             //
+//  FLV module by Seth Kaufman <sethØwhirl-i-gig*com>          //
+//                                                             //
+//  * version 0.1 (26 June 2005)                               //
+//                                                             //
+//                                                             //
+//  * version 0.1.1 (15 July 2005)                             //
+//  minor modifications by James Heinrich <info@getid3.org>    //
+//                                                             //
+//  * version 0.2 (22 February 2006)                           //
+//  Support for On2 VP6 codec and meta information             //
+//    by Steve Webster <steve.websterØfeaturecreep*com>        //
+//                                                             //
+//  * version 0.3 (15 June 2006)                               //
+//  Modified to not read entire file into memory               //
+//    by James Heinrich <info@getid3.org>                      //
+//                                                             //
+//  * version 0.4 (07 December 2007)                           //
+//  Bugfixes for incorrectly parsed FLV dimensions             //
+//    and incorrect parsing of onMetaTag                       //
+//    by Evgeny Moysevich <moysevichØgmail*com>                //
+//                                                             //
+//  * version 0.5 (21 May 2009)                                //
+//  Fixed parsing of audio tags and added additional codec     //
+//    details. The duration is now read from onMetaTag (if     //
+//    exists), rather than parsing whole file                  //
+//    by Nigel Barnes <ngbarnesØhotmail*com>                   //
+//                                                             //
+//  * version 0.6 (24 May 2009)                                //
+//  Better parsing of files with h264 video                    //
+//    by Evgeny Moysevich <moysevichØgmail*com>                //
+//                                                             //
+//  * version 0.6.1 (30 May 2011)                              //
+//    prevent infinite loops in expGolombUe()                  //
+//                                                             //
+//  * version 0.7.0 (16 Jul 2013)                              //
+//  handle GETID3_FLV_VIDEO_VP6FLV_ALPHA                       //
+//  improved AVCSequenceParameterSetReader::readData()         //
+//    by Xander Schouwerwou <schouwerwouØgmail*com>            //
+//                                                             //
+/////////////////////////////////////////////////////////////////
+//                                                             //
+// module.audio-video.flv.php                                  //
+// module for analyzing Shockwave Flash Video files            //
+// dependencies: NONE                                          //
+//                                                            ///
+/////////////////////////////////////////////////////////////////
+
+class AMFReader {
+	public $stream;
+
+	public function __construct(&$stream) {
+		$this->stream =& $stream;
+	}
+
+	public function readData() {
+		$value = null;
+
+		$type = $this->stream->readByte();
+		switch ($type) {
+
+			// Double
+			case 0:
+				$value = $this->readDouble();
+			break;
+
+			// Boolean
+			case 1:
+				$value = $this->readBoolean();
+				break;
+
+			// String
+			case 2:
+				$value = $this->readString();
+				break;
+
+			// Object
+			case 3:
+				$value = $this->readObject();
+				break;
+
+			// null
+			case 6:
+				return null;
+				break;
+
+			// Mixed array
+			case 8:
+				$value = $this->readMixedArray();
+				break;
+
+			// Array
+			case 10:
+				$value = $this->readArray();
+				break;
+
+			// Date
+			case 11:
+				$value = $this->readDate();
+				break;
+
+			// Long string
+			case 13:
+				$value = $this->readLongString();
+				break;
+
+			// XML (handled as string)
+			case 15:
+				$value = $this->readXML();
+				break;
+
+			// Typed object (handled as object)
+			case 16:
+				$value = $this->readTypedObject();
+				break;
+
+			// Long string
+			default:
+				$value = '(unknown or unsupported data type)';
+			break;
+		}
+
+		return $value;
+	}
+
+	public function readDouble() {
+		return $this->stream->readDouble();
+	}
+
+	public function readBoolean() {
+		return $this->stream->readByte() == 1;
+	}
+
+	public function readString() {
+		return $this->stream->readUTF();
+	}
+
+	public function readObject() {
+		// Get highest numerical index - ignored
+//		$highestIndex = $this->stream->readLong();
+
+		$data = array();
+
+		while ($key = $this->stream->readUTF()) {
+			$data[$key] = $this->readData();
+		}
+		// Mixed array record ends with empty string (0x00 0x00) and 0x09
+		if (($key == '') && ($this->stream->peekByte() == 0x09)) {
+			// Consume byte
+			$this->stream->readByte();
+		}
+		return $data;
+	}
+
+	public function readMixedArray() {
+		// Get highest numerical index - ignored
+		$highestIndex = $this->stream->readLong();
+
+		$data = array();
+
+		while ($key = $this->stream->readUTF()) {
+			if (is_numeric($key)) {
+				$key = (float) $key;
+			}
+			$data[$key] = $this->readData();
+		}
+		// Mixed array record ends with empty string (0x00 0x00) and 0x09
+		if (($key == '') && ($this->stream->peekByte() == 0x09)) {
+			// Consume byte
+			$this->stream->readByte();
+		}
+
+		return $data;
+	}
+
+	public function readArray() {
+		$length = $this->stream->readLong();
+		$data = array();
+
+		for ($i = 0; $i < $length; $i++) {
+			$data[] = $this->readData();
+		}
+		return $data;
+	}
+
+	public function readDate() {
+		$timestamp = $this->stream->readDouble();
+		$timezone = $this->stream->readInt();
+		return $timestamp;
+	}
+
+	public function readLongString() {
+		return $this->stream->readLongUTF();
+	}
+
+	public function readXML() {
+		return $this->stream->readLongUTF();
+	}
+
+	public function readTypedObject() {
+		$className = $this->stream->readUTF();
+		return $this->readObject();
+	}
+}
+
Index: www/wp-admin/includes/class-automatic-upgrader-skin.php
===================================================================
--- www/wp-admin/includes/class-automatic-upgrader-skin.php	(revision 38565)
+++ www/wp-admin/autoload/upgrader/Automatic_Upgrader_Skin.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/rest-api/class-wp-rest-request.php
===================================================================
--- www/wp-includes/autoload/rest-api/class-wp-rest-request.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/rest-api/class-wp-rest-request.php	(revision UNDEFINED)
@@ -1,996 +0,0 @@
-<?php
-/**
- * REST API: WP_REST_Request class
- *
- * @package WordPress
- * @subpackage REST_API
- * @since 4.4.0
- */
-
-/**
- * Core class used to implement a REST request object.
- *
- * Contains data from the request, to be passed to the callback.
- *
- * Note: This implements ArrayAccess, and acts as an array of parameters when
- * used in that manner. It does not use ArrayObject (as we cannot rely on SPL),
- * so be aware it may have non-array behaviour in some cases.
- *
- * Note: When using features provided by ArrayAccess, be aware that WordPress deliberately
- * does not distinguish between arguments of the same name for different request methods.
- * For instance, in a request with `GET id=1` and `POST id=2`, `$request['id']` will equal
- * 2 (`POST`) not 1 (`GET`). For more precision between request methods, use
- * WP_REST_Request::get_body_params(), WP_REST_Request::get_url_params(), etc.
- *
- * @since 4.4.0
- *
- * @see ArrayAccess
- */
-class WP_REST_Request implements ArrayAccess {
-
-	/**
-	 * HTTP method.
-	 *
-	 * @since 4.4.0
-	 * @access protected
-	 * @var string
-	 */
-	protected $method = '';
-
-	/**
-	 * Parameters passed to the request.
-	 *
-	 * These typically come from the `$_GET`, `$_POST` and `$_FILES`
-	 * superglobals when being created from the global scope.
-	 *
-	 * @since 4.4.0
-	 * @access protected
-	 * @var array Contains GET, POST and FILES keys mapping to arrays of data.
-	 */
-	protected $params;
-
-	/**
-	 * HTTP headers for the request.
-	 *
-	 * @since 4.4.0
-	 * @access protected
-	 * @var array Map of key to value. Key is always lowercase, as per HTTP specification.
-	 */
-	protected $headers = array();
-
-	/**
-	 * Body data.
-	 *
-	 * @since 4.4.0
-	 * @access protected
-	 * @var string Binary data from the request.
-	 */
-	protected $body = null;
-
-	/**
-	 * Route matched for the request.
-	 *
-	 * @since 4.4.0
-	 * @access protected
-	 * @var string
-	 */
-	protected $route;
-
-	/**
-	 * Attributes (options) for the route that was matched.
-	 *
-	 * This is the options array used when the route was registered, typically
-	 * containing the callback as well as the valid methods for the route.
-	 *
-	 * @since 4.4.0
-	 * @access protected
-	 * @var array Attributes for the request.
-	 */
-	protected $attributes = array();
-
-	/**
-	 * Used to determine if the JSON data has been parsed yet.
-	 *
-	 * Allows lazy-parsing of JSON data where possible.
-	 *
-	 * @since 4.4.0
-	 * @access protected
-	 * @var bool
-	 */
-	protected $parsed_json = false;
-
-	/**
-	 * Used to determine if the body data has been parsed yet.
-	 *
-	 * @since 4.4.0
-	 * @access protected
-	 * @var bool
-	 */
-	protected $parsed_body = false;
-
-	/**
-	 * Constructor.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param string $method     Optional. Request method. Default empty.
-	 * @param string $route      Optional. Request route. Default empty.
-	 * @param array  $attributes Optional. Request attributes. Default empty array.
-	 */
-	public function __construct( $method = '', $route = '', $attributes = array() ) {
-		$this->params = array(
-			'URL'   => array(),
-			'GET'   => array(),
-			'POST'  => array(),
-			'FILES' => array(),
-
-			// See parse_json_params.
-			'JSON'  => null,
-
-			'defaults' => array(),
-		);
-
-		$this->set_method( $method );
-		$this->set_route( $route );
-		$this->set_attributes( $attributes );
-	}
-
-	/**
-	 * Retrieves the HTTP method for the request.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @return string HTTP method.
-	 */
-	public function get_method() {
-		return $this->method;
-	}
-
-	/**
-	 * Sets HTTP method for the request.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param string $method HTTP method.
-	 */
-	public function set_method( $method ) {
-		$this->method = strtoupper( $method );
-	}
-
-	/**
-	 * Retrieves all headers from the request.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @return array Map of key to value. Key is always lowercase, as per HTTP specification.
-	 */
-	public function get_headers() {
-		return $this->headers;
-	}
-
-	/**
-	 * Canonicalizes the header name.
-	 *
-	 * Ensures that header names are always treated the same regardless of
-	 * source. Header names are always case insensitive.
-	 *
-	 * Note that we treat `-` (dashes) and `_` (underscores) as the same
-	 * character, as per header parsing rules in both Apache and nginx.
-	 *
-	 * @link http://stackoverflow.com/q/18185366
-	 * @link http://wiki.nginx.org/Pitfalls#Missing_.28disappearing.29_HTTP_headers
-	 * @link https://nginx.org/en/docs/http/ngx_http_core_module.html#underscores_in_headers
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 * @static
-	 *
-	 * @param string $key Header name.
-	 * @return string Canonicalized name.
-	 */
-	public static function canonicalize_header_name( $key ) {
-		$key = strtolower( $key );
-		$key = str_replace( '-', '_', $key );
-
-		return $key;
-	}
-
-	/**
-	 * Retrieves the given header from the request.
-	 *
-	 * If the header has multiple values, they will be concatenated with a comma
-	 * as per the HTTP specification. Be aware that some non-compliant headers
-	 * (notably cookie headers) cannot be joined this way.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param string $key Header name, will be canonicalized to lowercase.
-	 * @return string|null String value if set, null otherwise.
-	 */
-	public function get_header( $key ) {
-		$key = $this->canonicalize_header_name( $key );
-
-		if ( ! isset( $this->headers[ $key ] ) ) {
-			return null;
-		}
-
-		return implode( ',', $this->headers[ $key ] );
-	}
-
-	/**
-	 * Retrieves header values from the request.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param string $key Header name, will be canonicalized to lowercase.
-	 * @return array|null List of string values if set, null otherwise.
-	 */
-	public function get_header_as_array( $key ) {
-		$key = $this->canonicalize_header_name( $key );
-
-		if ( ! isset( $this->headers[ $key ] ) ) {
-			return null;
-		}
-
-		return $this->headers[ $key ];
-	}
-
-	/**
-	 * Sets the header on request.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param string $key   Header name.
-	 * @param string $value Header value, or list of values.
-	 */
-	public function set_header( $key, $value ) {
-		$key = $this->canonicalize_header_name( $key );
-		$value = (array) $value;
-
-		$this->headers[ $key ] = $value;
-	}
-
-	/**
-	 * Appends a header value for the given header.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param string $key   Header name.
-	 * @param string $value Header value, or list of values.
-	 */
-	public function add_header( $key, $value ) {
-		$key = $this->canonicalize_header_name( $key );
-		$value = (array) $value;
-
-		if ( ! isset( $this->headers[ $key ] ) ) {
-			$this->headers[ $key ] = array();
-		}
-
-		$this->headers[ $key ] = array_merge( $this->headers[ $key ], $value );
-	}
-
-	/**
-	 * Removes all values for a header.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param string $key Header name.
-	 */
-	public function remove_header( $key ) {
-		unset( $this->headers[ $key ] );
-	}
-
-	/**
-	 * Sets headers on the request.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param array $headers  Map of header name to value.
-	 * @param bool  $override If true, replace the request's headers. Otherwise, merge with existing.
-	 */
-	public function set_headers( $headers, $override = true ) {
-		if ( true === $override ) {
-			$this->headers = array();
-		}
-
-		foreach ( $headers as $key => $value ) {
-			$this->set_header( $key, $value );
-		}
-	}
-
-	/**
-	 * Retrieves the content-type of the request.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @return array Map containing 'value' and 'parameters' keys.
-	 */
-	public function get_content_type() {
-		$value = $this->get_header( 'content-type' );
-		if ( empty( $value ) ) {
-			return null;
-		}
-
-		$parameters = '';
-		if ( strpos( $value, ';' ) ) {
-			list( $value, $parameters ) = explode( ';', $value, 2 );
-		}
-
-		$value = strtolower( $value );
-		if ( strpos( $value, '/' ) === false ) {
-			return null;
-		}
-
-		// Parse type and subtype out.
-		list( $type, $subtype ) = explode( '/', $value, 2 );
-
-		$data = compact( 'value', 'type', 'subtype', 'parameters' );
-		$data = array_map( 'trim', $data );
-
-		return $data;
-	}
-
-	/**
-	 * Retrieves the parameter priority order.
-	 *
-	 * Used when checking parameters in get_param().
-	 *
-	 * @since 4.4.0
-	 * @access protected
-	 *
-	 * @return array List of types to check, in order of priority.
-	 */
-	protected function get_parameter_order() {
-		$order = array();
-		$order[] = 'JSON';
-
-		$this->parse_json_params();
-
-		// Ensure we parse the body data.
-		$body = $this->get_body();
-		if ( $this->method !== 'POST' && ! empty( $body ) ) {
-			$this->parse_body_params();
-		}
-
-		$accepts_body_data = array( 'POST', 'PUT', 'PATCH' );
-		if ( in_array( $this->method, $accepts_body_data ) ) {
-			$order[] = 'POST';
-		}
-
-		$order[] = 'GET';
-		$order[] = 'URL';
-		$order[] = 'defaults';
-
-		/**
-		 * Filters the parameter order.
-		 *
-		 * The order affects which parameters are checked when using get_param() and family.
-		 * This acts similarly to PHP's `request_order` setting.
-		 *
-		 * @since 4.4.0
-		 *
-		 * @param array           $order {
-		 *    An array of types to check, in order of priority.
-		 *
-		 *    @param string $type The type to check.
-		 * }
-		 * @param WP_REST_Request $this The request object.
-		 */
-		return apply_filters( 'rest_request_parameter_order', $order, $this );
-	}
-
-	/**
-	 * Retrieves a parameter from the request.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param string $key Parameter name.
-	 * @return mixed|null Value if set, null otherwise.
-	 */
-	public function get_param( $key ) {
-		$order = $this->get_parameter_order();
-
-		foreach ( $order as $type ) {
-			// Determine if we have the parameter for this type.
-			if ( isset( $this->params[ $type ][ $key ] ) ) {
-				return $this->params[ $type ][ $key ];
-			}
-		}
-
-		return null;
-	}
-
-	/**
-	 * Sets a parameter on the request.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param string $key   Parameter name.
-	 * @param mixed  $value Parameter value.
-	 */
-	public function set_param( $key, $value ) {
-		switch ( $this->method ) {
-			case 'POST':
-				$this->params['POST'][ $key ] = $value;
-				break;
-
-			default:
-				$this->params['GET'][ $key ] = $value;
-				break;
-		}
-	}
-
-	/**
-	 * Retrieves merged parameters from the request.
-	 *
-	 * The equivalent of get_param(), but returns all parameters for the request.
-	 * Handles merging all the available values into a single array.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @return array Map of key to value.
-	 */
-	public function get_params() {
-		$order = $this->get_parameter_order();
-		$order = array_reverse( $order, true );
-
-		$params = array();
-		foreach ( $order as $type ) {
-			$params = array_merge( $params, (array) $this->params[ $type ] );
-		}
-
-		return $params;
-	}
-
-	/**
-	 * Retrieves parameters from the route itself.
-	 *
-	 * These are parsed from the URL using the regex.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @return array Parameter map of key to value.
-	 */
-	public function get_url_params() {
-		return $this->params['URL'];
-	}
-
-	/**
-	 * Sets parameters from the route.
-	 *
-	 * Typically, this is set after parsing the URL.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param array $params Parameter map of key to value.
-	 */
-	public function set_url_params( $params ) {
-		$this->params['URL'] = $params;
-	}
-
-	/**
-	 * Retrieves parameters from the query string.
-	 *
-	 * These are the parameters you'd typically find in `$_GET`.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @return array Parameter map of key to value
-	 */
-	public function get_query_params() {
-		return $this->params['GET'];
-	}
-
-	/**
-	 * Sets parameters from the query string.
-	 *
-	 * Typically, this is set from `$_GET`.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param array $params Parameter map of key to value.
-	 */
-	public function set_query_params( $params ) {
-		$this->params['GET'] = $params;
-	}
-
-	/**
-	 * Retrieves parameters from the body.
-	 *
-	 * These are the parameters you'd typically find in `$_POST`.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @return array Parameter map of key to value.
-	 */
-	public function get_body_params() {
-		return $this->params['POST'];
-	}
-
-	/**
-	 * Sets parameters from the body.
-	 *
-	 * Typically, this is set from `$_POST`.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param array $params Parameter map of key to value.
-	 */
-	public function set_body_params( $params ) {
-		$this->params['POST'] = $params;
-	}
-
-	/**
-	 * Retrieves multipart file parameters from the body.
-	 *
-	 * These are the parameters you'd typically find in `$_FILES`.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @return array Parameter map of key to value
-	 */
-	public function get_file_params() {
-		return $this->params['FILES'];
-	}
-
-	/**
-	 * Sets multipart file parameters from the body.
-	 *
-	 * Typically, this is set from `$_FILES`.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param array $params Parameter map of key to value.
-	 */
-	public function set_file_params( $params ) {
-		$this->params['FILES'] = $params;
-	}
-
-	/**
-	 * Retrieves the default parameters.
-	 *
-	 * These are the parameters set in the route registration.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @return array Parameter map of key to value
-	 */
-	public function get_default_params() {
-		return $this->params['defaults'];
-	}
-
-	/**
-	 * Sets default parameters.
-	 *
-	 * These are the parameters set in the route registration.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param array $params Parameter map of key to value.
-	 */
-	public function set_default_params( $params ) {
-		$this->params['defaults'] = $params;
-	}
-
-	/**
-	 * Retrieves the request body content.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @return string Binary data from the request body.
-	 */
-	public function get_body() {
-		return $this->body;
-	}
-
-	/**
-	 * Sets body content.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param string $data Binary data from the request body.
-	 */
-	public function set_body( $data ) {
-		$this->body = $data;
-
-		// Enable lazy parsing.
-		$this->parsed_json = false;
-		$this->parsed_body = false;
-		$this->params['JSON'] = null;
-	}
-
-	/**
-	 * Retrieves the parameters from a JSON-formatted body.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @return array Parameter map of key to value.
-	 */
-	public function get_json_params() {
-		// Ensure the parameters have been parsed out.
-		$this->parse_json_params();
-
-		return $this->params['JSON'];
-	}
-
-	/**
-	 * Parses the JSON parameters.
-	 *
-	 * Avoids parsing the JSON data until we need to access it.
-	 *
-	 * @since 4.4.0
-	 * @access protected
-	 */
-	protected function parse_json_params() {
-		if ( $this->parsed_json ) {
-			return;
-		}
-
-		$this->parsed_json = true;
-
-		// Check that we actually got JSON.
-		$content_type = $this->get_content_type();
-
-		if ( empty( $content_type ) || 'application/json' !== $content_type['value'] ) {
-			return;
-		}
-
-		$params = json_decode( $this->get_body(), true );
-
-		/*
-		 * Check for a parsing error.
-		 *
-		 * Note that due to WP's JSON compatibility functions, json_last_error
-		 * might not be defined: https://core.trac.wordpress.org/ticket/27799
-		 */
-		if ( null === $params && ( ! function_exists( 'json_last_error' ) || JSON_ERROR_NONE !== json_last_error() ) ) {
-			return;
-		}
-
-		$this->params['JSON'] = $params;
-	}
-
-	/**
-	 * Parses the request body parameters.
-	 *
-	 * Parses out URL-encoded bodies for request methods that aren't supported
-	 * natively by PHP. In PHP 5.x, only POST has these parsed automatically.
-	 *
-	 * @since 4.4.0
-	 * @access protected
-	 */
-	protected function parse_body_params() {
-		if ( $this->parsed_body ) {
-			return;
-		}
-
-		$this->parsed_body = true;
-
-		/*
-		 * Check that we got URL-encoded. Treat a missing content-type as
-		 * URL-encoded for maximum compatibility.
-		 */
-		$content_type = $this->get_content_type();
-
-		if ( ! empty( $content_type ) && 'application/x-www-form-urlencoded' !== $content_type['value'] ) {
-			return;
-		}
-
-		parse_str( $this->get_body(), $params );
-
-		/*
-		 * Amazingly, parse_str follows magic quote rules. Sigh.
-		 *
-		 * NOTE: Do not refactor to use `wp_unslash`.
-		 */
-		if ( get_magic_quotes_gpc() ) {
-			$params = stripslashes_deep( $params );
-		}
-
-		/*
-		 * Add to the POST parameters stored internally. If a user has already
-		 * set these manually (via `set_body_params`), don't override them.
-		 */
-		$this->params['POST'] = array_merge( $params, $this->params['POST'] );
-	}
-
-	/**
-	 * Retrieves the route that matched the request.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @return string Route matching regex.
-	 */
-	public function get_route() {
-		return $this->route;
-	}
-
-	/**
-	 * Sets the route that matched the request.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param string $route Route matching regex.
-	 */
-	public function set_route( $route ) {
-		$this->route = $route;
-	}
-
-	/**
-	 * Retrieves the attributes for the request.
-	 *
-	 * These are the options for the route that was matched.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @return array Attributes for the request.
-	 */
-	public function get_attributes() {
-		return $this->attributes;
-	}
-
-	/**
-	 * Sets the attributes for the request.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param array $attributes Attributes for the request.
-	 */
-	public function set_attributes( $attributes ) {
-		$this->attributes = $attributes;
-	}
-
-	/**
-	 * Sanitizes (where possible) the params on the request.
-	 *
-	 * This is primarily based off the sanitize_callback param on each registered
-	 * argument.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @return true|WP_Error True if parameters were sanitized, WP_Error if an error occurred during sanitization.
-	 */
-	public function sanitize_params() {
-		$attributes = $this->get_attributes();
-
-		// No arguments set, skip sanitizing.
-		if ( empty( $attributes['args'] ) ) {
-			return true;
-		}
-
-		$order = $this->get_parameter_order();
-
-		$invalid_params = array();
-
-		foreach ( $order as $type ) {
-			if ( empty( $this->params[ $type ] ) ) {
-				continue;
-			}
-			foreach ( $this->params[ $type ] as $key => $value ) {
-				// Check if this param has a sanitize_callback added.
-				if ( ! isset( $attributes['args'][ $key ] ) || empty( $attributes['args'][ $key ]['sanitize_callback'] ) ) {
-					continue;
-				}
-
-				$sanitized_value = call_user_func( $attributes['args'][ $key ]['sanitize_callback'], $value, $this, $key );
-
-				if ( is_wp_error( $sanitized_value ) ) {
-					$invalid_params[ $key ] = $sanitized_value->get_error_message();
-				} else {
-					$this->params[ $type ][ $key ] = $sanitized_value;
-				}
-			}
-		}
-
-		if ( $invalid_params ) {
-			return new WP_Error( 'rest_invalid_param', sprintf( __( 'Invalid parameter(s): %s' ), implode( ', ', array_keys( $invalid_params ) ) ), array( 'status' => 400, 'params' => $invalid_params ) );
-		}
-
-		return true;
-	}
-
-	/**
-	 * Checks whether this request is valid according to its attributes.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @return bool|WP_Error True if there are no parameters to validate or if all pass validation,
-	 *                       WP_Error if required parameters are missing.
-	 */
-	public function has_valid_params() {
-		$attributes = $this->get_attributes();
-		$required = array();
-
-		// No arguments set, skip validation.
-		if ( empty( $attributes['args'] ) ) {
-			return true;
-		}
-
-		foreach ( $attributes['args'] as $key => $arg ) {
-
-			$param = $this->get_param( $key );
-			if ( isset( $arg['required'] ) && true === $arg['required'] && null === $param ) {
-				$required[] = $key;
-			}
-		}
-
-		if ( ! empty( $required ) ) {
-			return new WP_Error( 'rest_missing_callback_param', sprintf( __( 'Missing parameter(s): %s' ), implode( ', ', $required ) ), array( 'status' => 400, 'params' => $required ) );
-		}
-
-		/*
-		 * Check the validation callbacks for each registered arg.
-		 *
-		 * This is done after required checking as required checking is cheaper.
-		 */
-		$invalid_params = array();
-
-		foreach ( $attributes['args'] as $key => $arg ) {
-
-			$param = $this->get_param( $key );
-
-			if ( null !== $param && ! empty( $arg['validate_callback'] ) ) {
-				$valid_check = call_user_func( $arg['validate_callback'], $param, $this, $key );
-
-				if ( false === $valid_check ) {
-					$invalid_params[ $key ] = __( 'Invalid parameter.' );
-				}
-
-				if ( is_wp_error( $valid_check ) ) {
-					$invalid_params[ $key ] = $valid_check->get_error_message();
-				}
-			}
-		}
-
-		if ( $invalid_params ) {
-			return new WP_Error( 'rest_invalid_param', sprintf( __( 'Invalid parameter(s): %s' ), implode( ', ', array_keys( $invalid_params ) ) ), array( 'status' => 400, 'params' => $invalid_params ) );
-		}
-
-		return true;
-
-	}
-
-	/**
-	 * Checks if a parameter is set.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param string $offset Parameter name.
-	 * @return bool Whether the parameter is set.
-	 */
-	public function offsetExists( $offset ) {
-		$order = $this->get_parameter_order();
-
-		foreach ( $order as $type ) {
-			if ( isset( $this->params[ $type ][ $offset ] ) ) {
-				return true;
-			}
-		}
-
-		return false;
-	}
-
-	/**
-	 * Retrieves a parameter from the request.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param string $offset Parameter name.
-	 * @return mixed|null Value if set, null otherwise.
-	 */
-	public function offsetGet( $offset ) {
-		return $this->get_param( $offset );
-	}
-
-	/**
-	 * Sets a parameter on the request.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param string $offset Parameter name.
-	 * @param mixed  $value  Parameter value.
-	 */
-	public function offsetSet( $offset, $value ) {
-		$this->set_param( $offset, $value );
-	}
-
-	/**
-	 * Removes a parameter from the request.
-	 *
-	 * @since 4.4.0
-	 * @access public
-	 *
-	 * @param string $offset Parameter name.
-	 */
-	public function offsetUnset( $offset ) {
-		$order = $this->get_parameter_order();
-
-		// Remove the offset from every group.
-		foreach ( $order as $type ) {
-			unset( $this->params[ $type ][ $offset ] );
-		}
-	}
-
-	/**
-	 * Retrieves a WP_REST_Request object from a full URL.
-	 *
-	 * @static
-	 * @since 4.5.0
-	 * @access public
-	 *
-	 * @param string $url URL with protocol, domain, path and query args.
-	 * @return WP_REST_Request|false WP_REST_Request object on success, false on failure.
-	 */
-	public static function from_url( $url ) {
-		$bits = parse_url( $url );
-		$query_params = array();
-
-		if ( ! empty( $bits['query'] ) ) {
-			wp_parse_str( $bits['query'], $query_params );
-		}
-
-		$api_root = rest_url();
-		if ( get_option( 'permalink_structure' ) && 0 === strpos( $url, $api_root ) ) {
-			// Pretty permalinks on, and URL is under the API root
-			$api_url_part = substr( $url, strlen( untrailingslashit( $api_root ) ) );
-			$route = parse_url( $api_url_part, PHP_URL_PATH );
-		} elseif ( ! empty( $query_params['rest_route'] ) ) {
-			// ?rest_route=... set directly
-			$route = $query_params['rest_route'];
-			unset( $query_params['rest_route'] );
-		}
-
-		$request = false;
-		if ( ! empty( $route ) ) {
-			$request = new WP_REST_Request( 'GET', $route );
-			$request->set_query_params( $query_params );
-		}
-
-		/**
-		 * Filters the request generated from a URL.
-		 *
-		 * @since 4.5.0
-		 *
-		 * @param WP_REST_Request|false $request Generated request object, or false if URL
-		 *                                       could not be parsed.
-		 * @param string                $url     URL the request was generated from.
-		 */
-		return apply_filters( 'rest_request_from_url', $request, $url );
-	}
-}
Index: www/wp-admin/includes/class-wp-plugin-install-list-table.php
===================================================================
--- www/wp-admin/includes/class-wp-plugin-install-list-table.php	(revision 38565)
+++ www/wp-admin/autoload/list-table/WP_Plugin_Install_List_Table.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-http.php
===================================================================
--- www/wp-includes/class-http.php	(revision 38565)
+++ www/wp-includes/autoload/http/WP_Http.php	(revision )
@@ -7,12 +7,8 @@
  * @since 2.7.0
  */
 
-if ( ! class_exists( 'Requests' ) ) {
-	require( ABSPATH . WPINC . '/class-requests.php' );
-
-	Requests::register_autoloader();
-	Requests::set_certificate_path( ABSPATH . WPINC . '/certificates/ca-bundle.crt' );
+Requests::set_certificate_path( ABSPATH . WPINC . '/certificates/ca-bundle.crt' );
-}
+
 
 /**
  * Core class used for managing HTTP transports and making HTTP requests.
Index: www/wp-includes/customize/class-wp-customize-nav-menus-panel.php
===================================================================
--- www/wp-includes/customize/class-wp-customize-nav-menus-panel.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Nav_Menus_Panel.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/IXR/class-IXR-value.php
===================================================================
--- www/wp-includes/IXR/class-IXR-value.php	(revision 38565)
+++ www/wp-includes/autoload/ixr/IXR_Value.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/customize/class-wp-customize-header-image-control.php
===================================================================
--- www/wp-includes/customize/class-wp-customize-header-image-control.php	(revision 38565)
+++ www/wp-includes/autoload/customize/WP_Customize_Header_Image_Control.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/rest-api/class-wp-rest-response.php
===================================================================
--- www/wp-includes/rest-api/class-wp-rest-response.php	(revision 38565)
+++ www/wp-includes/autoload/rest-api/WP_REST_Response.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/ID3/module.audio.mp3.php
===================================================================
--- www/wp-includes/ID3/module.audio.mp3.php	(revision 38565)
+++ www/wp-includes/autoload/id3/getid3_mp3.php	(revision )
@@ -14,14 +14,6 @@
 //                                                            ///
 /////////////////////////////////////////////////////////////////
 
-
-// number of frames to scan to determine if MPEG-audio sequence is valid
-// Lower this number to 5-20 for faster scanning
-// Increase this number to 50+ for most accurate detection of valid VBR/CBR
-// mpeg-audio streams
-define('GETID3_MP3_VALID_CHECK_FRAMES', 35);
-
-
 class getid3_mp3 extends getid3_handler
 {
 
Index: www/wp-includes/autoload/requests/Exception/HTTP/305.php
===================================================================
--- www/wp-includes/autoload/requests/Exception/HTTP/305.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/Exception/HTTP/305.php	(revision UNDEFINED)
@@ -1,27 +0,0 @@
-<?php
-/**
- * Exception for 305 Use Proxy responses
- *
- * @package Requests
- */
-
-/**
- * Exception for 305 Use Proxy responses
- *
- * @package Requests
- */
-class Requests_Exception_HTTP_305 extends Requests_Exception_HTTP {
-	/**
-	 * HTTP status code
-	 *
-	 * @var integer
-	 */
-	protected $code = 305;
-
-	/**
-	 * Reason phrase
-	 *
-	 * @var string
-	 */
-	protected $reason = 'Use Proxy';
-}
Index: www/wp-includes/widgets/class-wp-widget-links.php
===================================================================
--- www/wp-includes/widgets/class-wp-widget-links.php	(revision 38565)
+++ www/wp-includes/autoload/widgets/WP_Widget_Links.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-dependency.php
===================================================================
--- www/wp-includes/class-wp-dependency.php	(revision 38565)
+++ www/wp-includes/autoload/dependency/_WP_Dependency.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/widgets/class-wp-widget-meta.php
===================================================================
--- www/wp-includes/widgets/class-wp-widget-meta.php	(revision 38565)
+++ www/wp-includes/autoload/widgets/WP_Widget_Meta.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/options-writing.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/options-writing.php	(revision 38565)
+++ www/wp-admin/options-writing.php	(revision 38565)
@@ -1,188 +0,0 @@
-<?php
-/**
- * Writing settings administration panel.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-if ( ! current_user_can( 'manage_options' ) )
-	wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
-
-$title = __('Writing Settings');
-$parent_file = 'options-general.php';
-
-get_current_screen()->add_help_tab( array(
-	'id'      => 'overview',
-	'title'   => __('Overview'),
-	'content' => '<p>' . __('You can submit content in several different ways; this screen holds the settings for all of them. The top section controls the editor within the dashboard, while the rest control external publishing methods. For more information on any of these methods, use the documentation links.') . '</p>' .
-		'<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>',
-) );
-
-/** This filter is documented in wp-admin/options.php */
-if ( apply_filters( 'enable_post_by_email_configuration', true ) ) {
-	get_current_screen()->add_help_tab( array(
-		'id'      => 'options-postemail',
-		'title'   => __( 'Post Via Email' ),
-		'content' => '<p>' . __( 'Post via email settings allow you to send your WordPress install an email with the content of your post. You must set up a secret email account with POP3 access to use this, and any mail received at this address will be posted, so it&#8217;s a good idea to keep this address very secret.' ) . '</p>',
-	) );
-}
-
-/** This filter is documented in wp-admin/options-writing.php */
-if ( apply_filters( 'enable_update_services_configuration', true ) ) {
-	get_current_screen()->add_help_tab( array(
-		'id'      => 'options-services',
-		'title'   => __( 'Update Services' ),
-		'content' => '<p>' . __( 'If desired, WordPress will automatically alert various services of your new posts.' ) . '</p>',
-	) );
-}
-
-get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Settings_Writing_Screen" target="_blank">Documentation on Writing Settings</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
-);
-
-include( ABSPATH . 'wp-admin/admin-header.php' );
-?>
-
-<div class="wrap">
-<h1><?php echo esc_html( $title ); ?></h1>
-
-<form method="post" action="options.php">
-<?php settings_fields('writing'); ?>
-
-<table class="form-table">
-<?php if ( get_site_option( 'initial_db_version' ) < 32453 ) : ?>
-<tr>
-<th scope="row"><?php _e('Formatting') ?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Formatting') ?></span></legend>
-<label for="use_smilies">
-<input name="use_smilies" type="checkbox" id="use_smilies" value="1" <?php checked('1', get_option('use_smilies')); ?> />
-<?php _e('Convert emoticons like <code>:-)</code> and <code>:-P</code> to graphics on display') ?></label><br />
-<label for="use_balanceTags"><input name="use_balanceTags" type="checkbox" id="use_balanceTags" value="1" <?php checked('1', get_option('use_balanceTags')); ?> /> <?php _e('WordPress should correct invalidly nested XHTML automatically') ?></label>
-</fieldset></td>
-</tr>
-<?php endif; ?>
-<tr>
-<th scope="row"><label for="default_category"><?php _e('Default Post Category') ?></label></th>
-<td>
-<?php
-wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'default_category', 'orderby' => 'name', 'selected' => get_option('default_category'), 'hierarchical' => true));
-?>
-</td>
-</tr>
-<?php
-$post_formats = get_post_format_strings();
-unset( $post_formats['standard'] );
-?>
-<tr>
-<th scope="row"><label for="default_post_format"><?php _e('Default Post Format') ?></label></th>
-<td>
-	<select name="default_post_format" id="default_post_format">
-		<option value="0"><?php echo get_post_format_string( 'standard' ); ?></option>
-<?php foreach ( $post_formats as $format_slug => $format_name ): ?>
-		<option<?php selected( get_option( 'default_post_format' ), $format_slug ); ?> value="<?php echo esc_attr( $format_slug ); ?>"><?php echo esc_html( $format_name ); ?></option>
-<?php endforeach; ?>
-	</select>
-</td>
-</tr>
-<?php
-if ( get_option( 'link_manager_enabled' ) ) :
-?>
-<tr>
-<th scope="row"><label for="default_link_category"><?php _e('Default Link Category') ?></label></th>
-<td>
-<?php
-wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'default_link_category', 'orderby' => 'name', 'selected' => get_option('default_link_category'), 'hierarchical' => true, 'taxonomy' => 'link_category'));
-?>
-</td>
-</tr>
-<?php endif; ?>
-
-<?php
-do_settings_fields('writing', 'default');
-do_settings_fields('writing', 'remote_publishing'); // A deprecated section.
-?>
-</table>
-
-<?php
-/** This filter is documented in wp-admin/options.php */
-if ( apply_filters( 'enable_post_by_email_configuration', true ) ) {
-?>
-<h2 class="title"><?php _e( 'Post via email' ) ?></h2>
-<p><?php
-printf(
-	/* translators: 1, 2, 3: examples of random email addresses */
-	__( 'To post to WordPress by email you must set up a secret email account with POP3 access. Any mail received at this address will be posted, so it&#8217;s a good idea to keep this address very secret. Here are three random strings you could use: %1$s, %2$s, %3$s.' ),
-	sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) ),
-	sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) ),
-	sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) )
-);
-?></p>
-
-<table class="form-table">
-<tr>
-<th scope="row"><label for="mailserver_url"><?php _e('Mail Server') ?></label></th>
-<td><input name="mailserver_url" type="text" id="mailserver_url" value="<?php form_option('mailserver_url'); ?>" class="regular-text code" />
-<label for="mailserver_port"><?php _e('Port') ?></label>
-<input name="mailserver_port" type="text" id="mailserver_port" value="<?php form_option('mailserver_port'); ?>" class="small-text" />
-</td>
-</tr>
-<tr>
-<th scope="row"><label for="mailserver_login"><?php _e('Login Name') ?></label></th>
-<td><input name="mailserver_login" type="text" id="mailserver_login" value="<?php form_option('mailserver_login'); ?>" class="regular-text ltr" /></td>
-</tr>
-<tr>
-<th scope="row"><label for="mailserver_pass"><?php _e('Password') ?></label></th>
-<td>
-<input name="mailserver_pass" type="text" id="mailserver_pass" value="<?php form_option('mailserver_pass'); ?>" class="regular-text ltr" />
-</td>
-</tr>
-<tr>
-<th scope="row"><label for="default_email_category"><?php _e('Default Mail Category') ?></label></th>
-<td>
-<?php
-wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'default_email_category', 'orderby' => 'name', 'selected' => get_option('default_email_category'), 'hierarchical' => true));
-?>
-</td>
-</tr>
-<?php do_settings_fields('writing', 'post_via_email'); ?>
-</table>
-<?php } ?>
-
-<?php
-/**
- * Filters whether to enable the Update Services section in the Writing settings screen.
- *
- * @since 3.0.0
- *
- * @param bool $enable Whether to enable the Update Services settings area. Default true.
- */
-if ( apply_filters( 'enable_update_services_configuration', true ) ) {
-?>
-<h2 class="title"><?php _e( 'Update Services' ) ?></h2>
-
-<?php if ( 1 == get_option('blog_public') ) : ?>
-
-<p><label for="ping_sites"><?php _e( 'When you publish a new post, WordPress automatically notifies the following site update services. For more about this, see <a href="https://codex.wordpress.org/Update_Services">Update Services</a> on the Codex. Separate multiple service URLs with line breaks.' ) ?></label></p>
-
-<textarea name="ping_sites" id="ping_sites" class="large-text code" rows="3"><?php echo esc_textarea( get_option('ping_sites') ); ?></textarea>
-
-<?php else : ?>
-
-	<p><?php printf(__('WordPress is not notifying any <a href="https://codex.wordpress.org/Update_Services">Update Services</a> because of your site&#8217;s <a href="%s">visibility settings</a>.'), 'options-reading.php'); ?></p>
-
-<?php endif; ?>
-<?php } // multisite ?>
-
-<?php do_settings_sections('writing'); ?>
-
-<?php submit_button(); ?>
-</form>
-</div>
-
-<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>
Index: www/wp-includes/script-loader.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/script-loader.php	(revision 38565)
+++ www/wp-includes/script-loader.php	(revision 38565)
@@ -1,1341 +0,0 @@
-<?php
-/**
- * WordPress scripts and styles default loader.
- *
- * Several constants are used to manage the loading, concatenating and compression of scripts and CSS:
- * define('SCRIPT_DEBUG', true); loads the development (non-minified) versions of all scripts and CSS, and disables compression and concatenation,
- * define('CONCATENATE_SCRIPTS', false); disables compression and concatenation of scripts and CSS,
- * define('COMPRESS_SCRIPTS', false); disables compression of scripts,
- * define('COMPRESS_CSS', false); disables compression of CSS,
- * define('ENFORCE_GZIP', true); forces gzip for compression (default is deflate).
- *
- * The globals $concatenate_scripts, $compress_scripts and $compress_css can be set by plugins
- * to temporarily override the above settings. Also a compression test is run once and the result is saved
- * as option 'can_compress_scripts' (0/1). The test will run again if that option is deleted.
- *
- * @package WordPress
- */
-
-/** WordPress Dependency Class */
-require( ABSPATH . WPINC . '/class-wp-dependency.php' );
-
-/** WordPress Dependencies Class */
-require( ABSPATH . WPINC . '/class.wp-dependencies.php' );
-
-/** WordPress Scripts Class */
-require( ABSPATH . WPINC . '/class.wp-scripts.php' );
-
-/** WordPress Scripts Functions */
-require( ABSPATH . WPINC . '/functions.wp-scripts.php' );
-
-/** WordPress Styles Class */
-require( ABSPATH . WPINC . '/class.wp-styles.php' );
-
-/** WordPress Styles Functions */
-require( ABSPATH . WPINC . '/functions.wp-styles.php' );
-
-/**
- * Register all WordPress scripts.
- *
- * Localizes some of them.
- * args order: `$scripts->add( 'handle', 'url', 'dependencies', 'query-string', 1 );`
- * when last arg === 1 queues the script for the footer
- *
- * @since 2.6.0
- *
- * @param WP_Scripts $scripts WP_Scripts object.
- */
-function wp_default_scripts( &$scripts ) {
-	include( ABSPATH . WPINC . '/version.php' ); // include an unmodified $wp_version
-
-	$develop_src = false !== strpos( $wp_version, '-src' );
-
-	if ( ! defined( 'SCRIPT_DEBUG' ) ) {
-		define( 'SCRIPT_DEBUG', $develop_src );
-	}
-
-	if ( ! $guessurl = site_url() ) {
-		$guessed_url = true;
-		$guessurl = wp_guess_url();
-	}
-
-	$scripts->base_url = $guessurl;
-	$scripts->content_url = defined('WP_CONTENT_URL')? WP_CONTENT_URL : '';
-	$scripts->default_version = get_bloginfo( 'version' );
-	$scripts->default_dirs = array('/wp-admin/js/', '/wp-includes/js/');
-
-	$suffix = SCRIPT_DEBUG ? '' : '.min';
-	$dev_suffix = $develop_src ? '' : '.min';
-
-	$scripts->add( 'utils', "/wp-includes/js/utils$suffix.js" );
-	did_action( 'init' ) && $scripts->localize( 'utils', 'userSettings', array(
-		'url' => (string) SITECOOKIEPATH,
-		'uid' => (string) get_current_user_id(),
-		'time' => (string) time(),
-		'secure' => (string) ( 'https' === parse_url( site_url(), PHP_URL_SCHEME ) ),
-	) );
-
-	$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), false, 1 );
-	did_action( 'init' ) && $scripts->localize( 'common', 'commonL10n', array(
-		'warnDelete' => __( "You are about to permanently delete these items.\n  'Cancel' to stop, 'OK' to delete." ),
-		'dismiss'    => __( 'Dismiss this notice.' ),
-	) );
-
-	$scripts->add( 'wp-a11y', "/wp-includes/js/wp-a11y$suffix.js", array( 'jquery' ), false, 1 );
-
-	$scripts->add( 'sack', "/wp-includes/js/tw-sack$suffix.js", array(), '1.6.1', 1 );
-
-	$scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", array(), false, 1 );
-	did_action( 'init' ) && $scripts->localize( 'quicktags', 'quicktagsL10n', array(
-		'closeAllOpenTags'      => __( 'Close all open tags' ),
-		'closeTags'             => __( 'close tags' ),
-		'enterURL'              => __( 'Enter the URL' ),
-		'enterImageURL'         => __( 'Enter the URL of the image' ),
-		'enterImageDescription' => __( 'Enter a description of the image' ),
-		'textdirection'         => __( 'text direction' ),
-		'toggleTextdirection'   => __( 'Toggle Editor Text Direction' ),
-		'dfw'                   => __( 'Distraction-free writing mode' ),
-		'strong'          => __( 'Bold' ),
-		'strongClose'     => __( 'Close bold tag' ),
-		'em'              => __( 'Italic' ),
-		'emClose'         => __( 'Close italic tag' ),
-		'link'            => __( 'Insert link' ),
-		'blockquote'      => __( 'Blockquote' ),
-		'blockquoteClose' => __( 'Close blockquote tag' ),
-		'del'             => __( 'Deleted text (strikethrough)' ),
-		'delClose'        => __( 'Close deleted text tag' ),
-		'ins'             => __( 'Inserted text' ),
-		'insClose'        => __( 'Close inserted text tag' ),
-		'image'           => __( 'Insert image' ),
-		'ul'              => __( 'Bulleted list' ),
-		'ulClose'         => __( 'Close bulleted list tag' ),
-		'ol'              => __( 'Numbered list' ),
-		'olClose'         => __( 'Close numbered list tag' ),
-		'li'              => __( 'List item' ),
-		'liClose'         => __( 'Close list item tag' ),
-		'code'            => __( 'Code' ),
-		'codeClose'       => __( 'Close code tag' ),
-		'more'            => __( 'Insert Read More tag' ),
-	) );
-
-	$scripts->add( 'colorpicker', "/wp-includes/js/colorpicker$suffix.js", array('prototype'), '3517m' );
-
-	$scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", array('utils','jquery'), false, 1 );
-
-	// Back-compat for old DFW. To-do: remove at the end of 2016.
-	$scripts->add( 'wp-fullscreen-stub', "/wp-admin/js/wp-fullscreen-stub$suffix.js", array(), false, 1 );
-
-	$scripts->add( 'wp-ajax-response', "/wp-includes/js/wp-ajax-response$suffix.js", array('jquery'), false, 1 );
-	did_action( 'init' ) && $scripts->localize( 'wp-ajax-response', 'wpAjax', array(
-		'noPerm' => __('Sorry, you are not allowed to do that.'),
-		'broken' => __('An unidentified error has occurred.')
-	) );
-
-	$scripts->add( 'wp-pointer', "/wp-includes/js/wp-pointer$suffix.js", array( 'jquery-ui-widget', 'jquery-ui-position' ), '20111129a', 1 );
-	did_action( 'init' ) && $scripts->localize( 'wp-pointer', 'wpPointerL10n', array(
-		'dismiss' => __('Dismiss'),
-	) );
-
-	$scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('heartbeat'), false, 1 );
-
-	$scripts->add( 'heartbeat', "/wp-includes/js/heartbeat$suffix.js", array('jquery'), false, 1 );
-	did_action( 'init' ) && $scripts->localize( 'heartbeat', 'heartbeatSettings',
-		/**
-		 * Filters the Heartbeat settings.
-		 *
-		 * @since 3.6.0
-		 *
-		 * @param array $settings Heartbeat settings array.
-		 */
-		apply_filters( 'heartbeat_settings', array() )
-	);
-
-	$scripts->add( 'wp-auth-check', "/wp-includes/js/wp-auth-check$suffix.js", array('heartbeat'), false, 1 );
-	did_action( 'init' ) && $scripts->localize( 'wp-auth-check', 'authcheckL10n', array(
-		'beforeunload' => __('Your session has expired. You can log in again from this page or go to the login page.'),
-
-		/**
-		 * Filters the authentication check interval.
-		 *
-		 * @since 3.6.0
-		 *
-		 * @param int $interval The interval in which to check a user's authentication.
-		 *                      Default 3 minutes in seconds, or 180.
-		 */
-		'interval' => apply_filters( 'wp_auth_check_interval', 3 * MINUTE_IN_SECONDS ),
-	) );
-
-	$scripts->add( 'wp-lists', "/wp-includes/js/wp-lists$suffix.js", array( 'wp-ajax-response', 'jquery-color' ), false, 1 );
-
-	// WordPress no longer uses or bundles Prototype or script.aculo.us. These are now pulled from an external source.
-	$scripts->add( 'prototype', 'https://ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js', array(), '1.7.1');
-	$scripts->add( 'scriptaculous-root', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js', array('prototype'), '1.9.0');
-	$scripts->add( 'scriptaculous-builder', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/builder.js', array('scriptaculous-root'), '1.9.0');
-	$scripts->add( 'scriptaculous-dragdrop', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/dragdrop.js', array('scriptaculous-builder', 'scriptaculous-effects'), '1.9.0');
-	$scripts->add( 'scriptaculous-effects', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/effects.js', array('scriptaculous-root'), '1.9.0');
-	$scripts->add( 'scriptaculous-slider', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/slider.js', array('scriptaculous-effects'), '1.9.0');
-	$scripts->add( 'scriptaculous-sound', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/sound.js', array( 'scriptaculous-root' ), '1.9.0' );
-	$scripts->add( 'scriptaculous-controls', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/controls.js', array('scriptaculous-root'), '1.9.0');
-	$scripts->add( 'scriptaculous', false, array('scriptaculous-dragdrop', 'scriptaculous-slider', 'scriptaculous-controls') );
-
-	// not used in core, replaced by Jcrop.js
-	$scripts->add( 'cropper', '/wp-includes/js/crop/cropper.js', array('scriptaculous-dragdrop') );
-
-	// jQuery
-	$scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '1.12.4' );
-	$scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.12.4' );
-	$scripts->add( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), '1.4.1' );
-
-	// full jQuery UI
-	$scripts->add( 'jquery-ui-core', "/wp-includes/js/jquery/ui/core$dev_suffix.js", array('jquery'), '1.11.4', 1 );
-	$scripts->add( 'jquery-effects-core', "/wp-includes/js/jquery/ui/effect$dev_suffix.js", array('jquery'), '1.11.4', 1 );
-
-	$scripts->add( 'jquery-effects-blind', "/wp-includes/js/jquery/ui/effect-blind$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
-	$scripts->add( 'jquery-effects-bounce', "/wp-includes/js/jquery/ui/effect-bounce$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
-	$scripts->add( 'jquery-effects-clip', "/wp-includes/js/jquery/ui/effect-clip$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
-	$scripts->add( 'jquery-effects-drop', "/wp-includes/js/jquery/ui/effect-drop$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
-	$scripts->add( 'jquery-effects-explode', "/wp-includes/js/jquery/ui/effect-explode$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
-	$scripts->add( 'jquery-effects-fade', "/wp-includes/js/jquery/ui/effect-fade$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
-	$scripts->add( 'jquery-effects-fold', "/wp-includes/js/jquery/ui/effect-fold$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
-	$scripts->add( 'jquery-effects-highlight', "/wp-includes/js/jquery/ui/effect-highlight$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
-	$scripts->add( 'jquery-effects-puff', "/wp-includes/js/jquery/ui/effect-puff$dev_suffix.js", array('jquery-effects-core', 'jquery-effects-scale'), '1.11.4', 1 );
-	$scripts->add( 'jquery-effects-pulsate', "/wp-includes/js/jquery/ui/effect-pulsate$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
-	$scripts->add( 'jquery-effects-scale', "/wp-includes/js/jquery/ui/effect-scale$dev_suffix.js", array('jquery-effects-core', 'jquery-effects-size'), '1.11.4', 1 );
-	$scripts->add( 'jquery-effects-shake', "/wp-includes/js/jquery/ui/effect-shake$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
-	$scripts->add( 'jquery-effects-size', "/wp-includes/js/jquery/ui/effect-size$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
-	$scripts->add( 'jquery-effects-slide', "/wp-includes/js/jquery/ui/effect-slide$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
-	$scripts->add( 'jquery-effects-transfer', "/wp-includes/js/jquery/ui/effect-transfer$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
-
-	$scripts->add( 'jquery-ui-accordion', "/wp-includes/js/jquery/ui/accordion$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11.4', 1 );
-	$scripts->add( 'jquery-ui-autocomplete', "/wp-includes/js/jquery/ui/autocomplete$dev_suffix.js", array( 'jquery-ui-menu', 'wp-a11y' ), '1.11.4', 1 );
-	$scripts->add( 'jquery-ui-button', "/wp-includes/js/jquery/ui/button$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11.4', 1 );
-	$scripts->add( 'jquery-ui-datepicker', "/wp-includes/js/jquery/ui/datepicker$dev_suffix.js", array('jquery-ui-core'), '1.11.4', 1 );
-	$scripts->add( 'jquery-ui-dialog', "/wp-includes/js/jquery/ui/dialog$dev_suffix.js", array('jquery-ui-resizable', 'jquery-ui-draggable', 'jquery-ui-button', 'jquery-ui-position'), '1.11.4', 1 );
-	$scripts->add( 'jquery-ui-draggable', "/wp-includes/js/jquery/ui/draggable$dev_suffix.js", array('jquery-ui-mouse'), '1.11.4', 1 );
-	$scripts->add( 'jquery-ui-droppable', "/wp-includes/js/jquery/ui/droppable$dev_suffix.js", array('jquery-ui-draggable'), '1.11.4', 1 );
-	$scripts->add( 'jquery-ui-menu', "/wp-includes/js/jquery/ui/menu$dev_suffix.js", array( 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position' ), '1.11.4', 1 );
-	$scripts->add( 'jquery-ui-mouse', "/wp-includes/js/jquery/ui/mouse$dev_suffix.js", array( 'jquery-ui-core', 'jquery-ui-widget' ), '1.11.4', 1 );
-	$scripts->add( 'jquery-ui-position', "/wp-includes/js/jquery/ui/position$dev_suffix.js", array('jquery'), '1.11.4', 1 );
-	$scripts->add( 'jquery-ui-progressbar', "/wp-includes/js/jquery/ui/progressbar$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11.4', 1 );
-	$scripts->add( 'jquery-ui-resizable', "/wp-includes/js/jquery/ui/resizable$dev_suffix.js", array('jquery-ui-mouse'), '1.11.4', 1 );
-	$scripts->add( 'jquery-ui-selectable', "/wp-includes/js/jquery/ui/selectable$dev_suffix.js", array('jquery-ui-mouse'), '1.11.4', 1 );
-	$scripts->add( 'jquery-ui-selectmenu', "/wp-includes/js/jquery/ui/selectmenu$dev_suffix.js", array('jquery-ui-menu'), '1.11.4', 1 );
-	$scripts->add( 'jquery-ui-slider', "/wp-includes/js/jquery/ui/slider$dev_suffix.js", array('jquery-ui-mouse'), '1.11.4', 1 );
-	$scripts->add( 'jquery-ui-sortable', "/wp-includes/js/jquery/ui/sortable$dev_suffix.js", array('jquery-ui-mouse'), '1.11.4', 1 );
-	$scripts->add( 'jquery-ui-spinner', "/wp-includes/js/jquery/ui/spinner$dev_suffix.js", array( 'jquery-ui-button' ), '1.11.4', 1 );
-	$scripts->add( 'jquery-ui-tabs', "/wp-includes/js/jquery/ui/tabs$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11.4', 1 );
-	$scripts->add( 'jquery-ui-tooltip', "/wp-includes/js/jquery/ui/tooltip$dev_suffix.js", array( 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position' ), '1.11.4', 1 );
-	$scripts->add( 'jquery-ui-widget', "/wp-includes/js/jquery/ui/widget$dev_suffix.js", array('jquery'), '1.11.4', 1 );
-
-	// Strings for 'jquery-ui-autocomplete' live region messages
-	did_action( 'init' ) && $scripts->localize( 'jquery-ui-autocomplete', 'uiAutocompleteL10n', array(
-		'noResults' => __( 'No search results.' ),
-		/* translators: Number of results found when using jQuery UI Autocomplete */
-		'oneResult' => __( '1 result found. Use up and down arrow keys to navigate.' ),
-		/* translators: %d: Number of results found when using jQuery UI Autocomplete */
-		'manyResults' => __( '%d results found. Use up and down arrow keys to navigate.' ),
-	) );
-
-	// deprecated, not used in core, most functionality is included in jQuery 1.3
-	$scripts->add( 'jquery-form', "/wp-includes/js/jquery/jquery.form$suffix.js", array('jquery'), '3.37.0', 1 );
-
-	// jQuery plugins
-	$scripts->add( 'jquery-color', "/wp-includes/js/jquery/jquery.color.min.js", array('jquery'), '2.1.1', 1 );
-	$scripts->add( 'suggest', "/wp-includes/js/jquery/suggest$suffix.js", array('jquery'), '1.1-20110113', 1 );
-	$scripts->add( 'schedule', '/wp-includes/js/jquery/jquery.schedule.js', array('jquery'), '20m', 1 );
-	$scripts->add( 'jquery-query', "/wp-includes/js/jquery/jquery.query.js", array('jquery'), '2.1.7', 1 );
-	$scripts->add( 'jquery-serialize-object', "/wp-includes/js/jquery/jquery.serialize-object.js", array('jquery'), '0.2', 1 );
-	$scripts->add( 'jquery-hotkeys', "/wp-includes/js/jquery/jquery.hotkeys$suffix.js", array('jquery'), '0.0.2m', 1 );
-	$scripts->add( 'jquery-table-hotkeys', "/wp-includes/js/jquery/jquery.table-hotkeys$suffix.js", array('jquery', 'jquery-hotkeys'), false, 1 );
-	$scripts->add( 'jquery-touch-punch', "/wp-includes/js/jquery/jquery.ui.touch-punch.js", array('jquery-ui-widget', 'jquery-ui-mouse'), '0.2.2', 1 );
-
-	// Masonry v2 depended on jQuery. v3 does not. The older jquery-masonry handle is a shiv.
-	// It sets jQuery as a dependency, as the theme may have been implicitly loading it this way.
-	$scripts->add( 'imagesloaded', "/wp-includes/js/imagesloaded.min.js", array(), '3.2.0', 1 );
-	$scripts->add( 'masonry', "/wp-includes/js/masonry.min.js", array( 'imagesloaded' ), '3.3.2', 1 );
-	$scripts->add( 'jquery-masonry', "/wp-includes/js/jquery/jquery.masonry$dev_suffix.js", array( 'jquery', 'masonry' ), '3.1.2b', 1 );
-
-	$scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20121105', 1 );
-	did_action( 'init' ) && $scripts->localize( 'thickbox', 'thickboxL10n', array(
-		'next' => __('Next &gt;'),
-		'prev' => __('&lt; Prev'),
-		'image' => __('Image'),
-		'of' => __('of'),
-		'close' => __('Close'),
-		'noiframes' => __('This feature requires inline frames. You have iframes disabled or your browser does not support them.'),
-		'loadingAnimation' => includes_url('js/thickbox/loadingAnimation.gif'),
-	) );
-
-	$scripts->add( 'jcrop', "/wp-includes/js/jcrop/jquery.Jcrop.min.js", array('jquery'), '0.9.12');
-
-	$scripts->add( 'swfobject', "/wp-includes/js/swfobject.js", array(), '2.2-20120417');
-
-	// error message for both plupload and swfupload
-	$uploader_l10n = array(
-		'queue_limit_exceeded' => __('You have attempted to queue too many files.'),
-		'file_exceeds_size_limit' => __('%s exceeds the maximum upload size for this site.'),
-		'zero_byte_file' => __('This file is empty. Please try another.'),
-		'invalid_filetype' => __('This file type is not allowed. Please try another.'),
-		'not_an_image' => __('This file is not an image. Please try another.'),
-		'image_memory_exceeded' => __('Memory exceeded. Please try another smaller file.'),
-		'image_dimensions_exceeded' => __('This is larger than the maximum size. Please try another.'),
-		'default_error' => __('An error occurred in the upload. Please try again later.'),
-		'missing_upload_url' => __('There was a configuration error. Please contact the server administrator.'),
-		'upload_limit_exceeded' => __('You may only upload 1 file.'),
-		'http_error' => __('HTTP error.'),
-		'upload_failed' => __('Upload failed.'),
-		'big_upload_failed' => __('Please try uploading this file with the %1$sbrowser uploader%2$s.'),
-		'big_upload_queued' => __('%s exceeds the maximum upload size for the multi-file uploader when used in your browser.'),
-		'io_error' => __('IO error.'),
-		'security_error' => __('Security error.'),
-		'file_cancelled' => __('File canceled.'),
-		'upload_stopped' => __('Upload stopped.'),
-		'dismiss' => __('Dismiss'),
-		'crunching' => __('Crunching&hellip;'),
-		'deleted' => __('moved to the trash.'),
-		'error_uploading' => __('&#8220;%s&#8221; has failed to upload.')
-	);
-
-	$scripts->add( 'plupload', '/wp-includes/js/plupload/plupload.full.min.js', array(), '2.1.8' );
-	// Back compat handles:
-	foreach ( array( 'all', 'html5', 'flash', 'silverlight', 'html4' ) as $handle ) {
-		$scripts->add( "plupload-$handle", false, array( 'plupload' ), '2.1.1' );
-	}
-
-	$scripts->add( 'plupload-handlers', "/wp-includes/js/plupload/handlers$suffix.js", array( 'plupload', 'jquery' ) );
-	did_action( 'init' ) && $scripts->localize( 'plupload-handlers', 'pluploadL10n', $uploader_l10n );
-
-	$scripts->add( 'wp-plupload', "/wp-includes/js/plupload/wp-plupload$suffix.js", array( 'plupload', 'jquery', 'json2', 'media-models' ), false, 1 );
-	did_action( 'init' ) && $scripts->localize( 'wp-plupload', 'pluploadL10n', $uploader_l10n );
-
-	// keep 'swfupload' for back-compat.
-	$scripts->add( 'swfupload', '/wp-includes/js/swfupload/swfupload.js', array(), '2201-20110113');
-	$scripts->add( 'swfupload-swfobject', '/wp-includes/js/swfupload/plugins/swfupload.swfobject.js', array('swfupload', 'swfobject'), '2201a');
-	$scripts->add( 'swfupload-queue', '/wp-includes/js/swfupload/plugins/swfupload.queue.js', array('swfupload'), '2201');
-	$scripts->add( 'swfupload-speed', '/wp-includes/js/swfupload/plugins/swfupload.speed.js', array('swfupload'), '2201');
-	$scripts->add( 'swfupload-all', false, array('swfupload', 'swfupload-swfobject', 'swfupload-queue'), '2201');
-	$scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload-all', 'jquery'), '2201-20110524');
-	did_action( 'init' ) && $scripts->localize( 'swfupload-handlers', 'swfuploadL10n', $uploader_l10n );
-
-	$scripts->add( 'comment-reply', "/wp-includes/js/comment-reply$suffix.js", array(), false, 1 );
-
-	$scripts->add( 'json2', "/wp-includes/js/json2$suffix.js", array(), '2015-05-03' );
-	did_action( 'init' ) && $scripts->add_data( 'json2', 'conditional', 'lt IE 8' );
-
-	$scripts->add( 'underscore', "/wp-includes/js/underscore$dev_suffix.js", array(), '1.8.3', 1 );
-	$scripts->add( 'backbone', "/wp-includes/js/backbone$dev_suffix.js", array( 'underscore','jquery' ), '1.2.3', 1 );
-
-	$scripts->add( 'wp-util', "/wp-includes/js/wp-util$suffix.js", array('underscore', 'jquery'), false, 1 );
-	did_action( 'init' ) && $scripts->localize( 'wp-util', '_wpUtilSettings', array(
-		'ajax' => array(
-			'url' => admin_url( 'admin-ajax.php', 'relative' ),
-		),
-	) );
-
-	$scripts->add( 'wp-backbone', "/wp-includes/js/wp-backbone$suffix.js", array('backbone', 'wp-util'), false, 1 );
-
-	$scripts->add( 'revisions', "/wp-admin/js/revisions$suffix.js", array( 'wp-backbone', 'jquery-ui-slider', 'hoverIntent' ), false, 1 );
-
-	$scripts->add( 'imgareaselect', "/wp-includes/js/imgareaselect/jquery.imgareaselect$suffix.js", array('jquery'), false, 1 );
-
-	$scripts->add( 'mediaelement', "/wp-includes/js/mediaelement/mediaelement-and-player.min.js", array('jquery'), '2.22.0', 1 );
-	did_action( 'init' ) && $scripts->localize( 'mediaelement', 'mejsL10n', array(
-		'language' => get_bloginfo( 'language' ),
-		'strings'  => array(
-			'Close'                   => __( 'Close' ),
-			'Fullscreen'              => __( 'Fullscreen' ),
-			'Turn off Fullscreen'     => __( 'Turn off Fullscreen' ),
-			'Go Fullscreen'           => __( 'Go Fullscreen' ),
-			'Download File'           => __( 'Download File' ),
-			'Download Video'          => __( 'Download Video' ),
-			'Play'                    => __( 'Play' ),
-			'Pause'                   => __( 'Pause' ),
-			'Captions/Subtitles'      => __( 'Captions/Subtitles' ),
-			'None'                    => __( 'None', 'no captions/subtitles' ),
-			'Time Slider'             => __( 'Time Slider' ),
-			/* translators: %1: number of seconds (30 by default) */
-			'Skip back %1 seconds'    => __( 'Skip back %1 seconds' ),
-			'Video Player'            => __( 'Video Player' ),
-			'Audio Player'            => __( 'Audio Player' ),
-			'Volume Slider'           => __( 'Volume Slider' ),
-			'Mute Toggle'             => __( 'Mute Toggle' ),
-			'Unmute'                  => __( 'Unmute' ),
-			'Mute'                    => __( 'Mute' ),
-			'Use Up/Down Arrow keys to increase or decrease volume.' => __( 'Use Up/Down Arrow keys to increase or decrease volume.' ),
-			'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.' => __( 'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.' ),
-		),
-	) );
-
-
-	$scripts->add( 'wp-mediaelement', "/wp-includes/js/mediaelement/wp-mediaelement$suffix.js", array('mediaelement'), false, 1 );
-	$mejs_settings = array(
-		'pluginPath' => includes_url( 'js/mediaelement/', 'relative' ),
-	);
-	did_action( 'init' ) && $scripts->localize( 'mediaelement', '_wpmejsSettings',
-		/**
-		 * Filters the MediaElement configuration settings.
-		 *
-		 * @since 4.4.0
-		 *
-		 * @param array $mejs_settings MediaElement settings array.
-		 */
-		apply_filters( 'mejs_settings', $mejs_settings )
-	);
-
-	$scripts->add( 'froogaloop',  "/wp-includes/js/mediaelement/froogaloop.min.js", array(), '2.0' );
-	$scripts->add( 'wp-playlist', "/wp-includes/js/mediaelement/wp-playlist$suffix.js", array( 'wp-util', 'backbone', 'mediaelement' ), false, 1 );
-
-	$scripts->add( 'zxcvbn-async', "/wp-includes/js/zxcvbn-async$suffix.js", array(), '1.0' );
-	did_action( 'init' ) && $scripts->localize( 'zxcvbn-async', '_zxcvbnSettings', array(
-		'src' => empty( $guessed_url ) ? includes_url( '/js/zxcvbn.min.js' ) : $scripts->base_url . '/wp-includes/js/zxcvbn.min.js',
-	) );
-
-	$scripts->add( 'password-strength-meter', "/wp-admin/js/password-strength-meter$suffix.js", array( 'jquery', 'zxcvbn-async' ), false, 1 );
-	did_action( 'init' ) && $scripts->localize( 'password-strength-meter', 'pwsL10n', array(
-		'unknown'  => _x( 'Password strength unknown', 'password strength' ),
-		'short'    => _x( 'Very weak', 'password strength' ),
-		'bad'      => _x( 'Weak', 'password strength' ),
-		'good'     => _x( 'Medium', 'password strength' ),
-		'strong'   => _x( 'Strong', 'password strength' ),
-		'mismatch' => _x( 'Mismatch', 'password mismatch' ),
-	) );
-
-	$scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array( 'jquery', 'password-strength-meter', 'wp-util' ), false, 1 );
-	did_action( 'init' ) && $scripts->localize( 'user-profile', 'userProfileL10n', array(
-		'warn'     => __( 'Your new password has not been saved.' ),
-		'warnWeak' => __( 'Confirm use of weak password' ),
-		'show'     => __( 'Show' ),
-		'hide'     => __( 'Hide' ),
-		'cancel'   => __( 'Cancel' ),
-		'ariaShow' => esc_attr__( 'Show password' ),
-		'ariaHide' => esc_attr__( 'Hide password' ),
-	) );
-
-	$scripts->add( 'language-chooser', "/wp-admin/js/language-chooser$suffix.js", array( 'jquery' ), false, 1 );
-
-	$scripts->add( 'user-suggest', "/wp-admin/js/user-suggest$suffix.js", array( 'jquery-ui-autocomplete' ), false, 1 );
-
-	$scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", array(), false, 1 );
-
-	$scripts->add( 'wplink', "/wp-includes/js/wplink$suffix.js", array( 'jquery', 'wp-a11y' ), false, 1 );
-	did_action( 'init' ) && $scripts->localize( 'wplink', 'wpLinkL10n', array(
-		'title' => __('Insert/edit link'),
-		'update' => __('Update'),
-		'save' => __('Add Link'),
-		'noTitle' => __('(no title)'),
-		'noMatchesFound' => __('No results found.'),
-		'linkSelected' => __( 'Link selected.' ),
-		'linkInserted' => __( 'Link inserted.' ),
-	) );
-
-	$scripts->add( 'wpdialogs', "/wp-includes/js/wpdialog$suffix.js", array( 'jquery-ui-dialog' ), false, 1 );
-
-	$scripts->add( 'word-count', "/wp-admin/js/word-count$suffix.js", array(), false, 1 );
-	did_action( 'init' ) && $scripts->localize( 'word-count', 'wordCountL10n', array(
-		/*
-		 * translators: If your word count is based on single characters (e.g. East Asian characters),
-		 * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.
-		 * Do not translate into your own language.
-		 */
-		'type' => _x( 'words', 'Word count type. Do not translate!' ),
-		'shortcodes' => ! empty( $GLOBALS['shortcode_tags'] ) ? array_keys( $GLOBALS['shortcode_tags'] ) : array()
-	) );
-
-	$scripts->add( 'media-upload', "/wp-admin/js/media-upload$suffix.js", array( 'thickbox', 'shortcode' ), false, 1 );
-
-	$scripts->add( 'hoverIntent', "/wp-includes/js/hoverIntent$suffix.js", array('jquery'), '1.8.1', 1 );
-
-	$scripts->add( 'customize-base',     "/wp-includes/js/customize-base$suffix.js",     array( 'jquery', 'json2', 'underscore' ), false, 1 );
-	$scripts->add( 'customize-loader',   "/wp-includes/js/customize-loader$suffix.js",   array( 'customize-base' ), false, 1 );
-	$scripts->add( 'customize-preview',  "/wp-includes/js/customize-preview$suffix.js",  array( 'customize-base' ), false, 1 );
-	$scripts->add( 'customize-models',   "/wp-includes/js/customize-models.js", array( 'underscore', 'backbone' ), false, 1 );
-	$scripts->add( 'customize-views',    "/wp-includes/js/customize-views.js",  array( 'jquery', 'underscore', 'imgareaselect', 'customize-models', 'media-editor', 'media-views' ), false, 1 );
-	$scripts->add( 'customize-controls', "/wp-admin/js/customize-controls$suffix.js", array( 'customize-base', 'wp-a11y' ), false, 1 );
-	did_action( 'init' ) && $scripts->localize( 'customize-controls', '_wpCustomizeControlsL10n', array(
-		'activate'           => __( 'Save &amp; Activate' ),
-		'save'               => __( 'Save &amp; Publish' ),
-		'saveAlert'          => __( 'The changes you made will be lost if you navigate away from this page.' ),
-		'saved'              => __( 'Saved' ),
-		'cancel'             => __( 'Cancel' ),
-		'close'              => __( 'Close' ),
-		'cheatin'            => __( 'Cheatin&#8217; uh?' ),
-		'notAllowed'         => __( 'Sorry, you are not allowed to customize this site.' ),
-		'previewIframeTitle' => __( 'Site Preview' ),
-		'loginIframeTitle'   => __( 'Session expired' ),
-		'collapseSidebar'    => __( 'Collapse Sidebar' ),
-		'expandSidebar'      => __( 'Expand Sidebar' ),
-		'untitledBlogName'   => __( '(Untitled)' ),
-		// Used for overriding the file types allowed in plupload.
-		'allowedFiles'       => __( 'Allowed Files' ),
-	) );
-	$scripts->add( 'customize-selective-refresh', "/wp-includes/js/customize-selective-refresh$suffix.js", array( 'jquery', 'wp-util', 'customize-preview' ), false, 1 );
-
-	$scripts->add( 'customize-widgets', "/wp-admin/js/customize-widgets$suffix.js", array( 'jquery', 'jquery-ui-sortable', 'jquery-ui-droppable', 'wp-backbone', 'customize-controls' ), false, 1 );
-	$scripts->add( 'customize-preview-widgets', "/wp-includes/js/customize-preview-widgets$suffix.js", array( 'jquery', 'wp-util', 'customize-preview', 'customize-selective-refresh' ), false, 1 );
-
-	$scripts->add( 'customize-nav-menus', "/wp-admin/js/customize-nav-menus$suffix.js", array( 'jquery', 'wp-backbone', 'customize-controls', 'accordion', 'nav-menu' ), false, 1 );
-	$scripts->add( 'customize-preview-nav-menus', "/wp-includes/js/customize-preview-nav-menus$suffix.js", array( 'jquery', 'wp-util', 'customize-preview', 'customize-selective-refresh' ), false, 1 );
-
-	$scripts->add( 'accordion', "/wp-admin/js/accordion$suffix.js", array( 'jquery' ), false, 1 );
-
-	$scripts->add( 'shortcode', "/wp-includes/js/shortcode$suffix.js", array( 'underscore' ), false, 1 );
-	$scripts->add( 'media-models', "/wp-includes/js/media-models$suffix.js", array( 'wp-backbone' ), false, 1 );
-	did_action( 'init' ) && $scripts->localize( 'media-models', '_wpMediaModelsL10n', array(
-		'settings' => array(
-			'ajaxurl' => admin_url( 'admin-ajax.php', 'relative' ),
-			'post' => array( 'id' => 0 ),
-		),
-	) );
-
-	$scripts->add( 'wp-embed', "/wp-includes/js/wp-embed$suffix.js" );
-
-	// To enqueue media-views or media-editor, call wp_enqueue_media().
-	// Both rely on numerous settings, styles, and templates to operate correctly.
-	$scripts->add( 'media-views',  "/wp-includes/js/media-views$suffix.js",  array( 'utils', 'media-models', 'wp-plupload', 'jquery-ui-sortable', 'wp-mediaelement' ), false, 1 );
-	$scripts->add( 'media-editor', "/wp-includes/js/media-editor$suffix.js", array( 'shortcode', 'media-views' ), false, 1 );
-	$scripts->add( 'media-audiovideo', "/wp-includes/js/media-audiovideo$suffix.js", array( 'media-editor' ), false, 1 );
-	$scripts->add( 'mce-view', "/wp-includes/js/mce-view$suffix.js", array( 'shortcode', 'jquery', 'media-views', 'media-audiovideo' ), false, 1 );
-
-	if ( is_admin() ) {
-		$scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array( 'jquery', 'wp-ajax-response' ), false, 1 );
-		did_action( 'init' ) && $scripts->localize( 'admin-tags', 'tagsl10n', array(
-			'noPerm' => __('Sorry, you are not allowed to do that.'),
-			'broken' => __('An unidentified error has occurred.')
-		));
-
-		$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'quicktags', 'jquery-query'), false, 1 );
-		did_action( 'init' ) && $scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
-			'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),
-			'hotkeys_highlight_last' => isset($_GET['hotkeys_highlight_last']),
-			'replyApprove' => __( 'Approve and Reply' ),
-			'reply' => __( 'Reply' ),
-			'warnQuickEdit' => __( "Are you sure you want to edit this comment?\nThe changes you made will be lost." ),
-			'warnCommentChanges' => __( "Are you sure you want to do this?\nThe comment changes you made will be lost." ),
-			'docTitleComments' => __( 'Comments' ),
-			/* translators: %s: comments count */
-			'docTitleCommentsCount' => __( 'Comments (%s)' ),
-		) );
-
-		$scripts->add( 'xfn', "/wp-admin/js/xfn$suffix.js", array('jquery'), false, 1 );
-
-		$scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array('jquery-ui-sortable'), false, 1 );
-		did_action( 'init' ) && $scripts->localize( 'postbox', 'postBoxL10n', array(
-			'postBoxEmptyString' => __( 'Drag boxes here' ),
-		) );
-
-		$scripts->add( 'tags-box', "/wp-admin/js/tags-box$suffix.js", array( 'jquery', 'suggest' ), false, 1 );
-		did_action( 'init' ) && $scripts->localize( 'tags-box', 'tagsBoxL10n', array(
-			'tagDelimiter' => _x( ',', 'tag delimiter' ),
-		) );
-
-		$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array( 'suggest', 'wp-lists', 'postbox', 'tags-box', 'underscore', 'word-count', 'wp-a11y' ), false, 1 );
-		did_action( 'init' ) && $scripts->localize( 'post', 'postL10n', array(
-			'ok' => __('OK'),
-			'cancel' => __('Cancel'),
-			'publishOn' => __('Publish on:'),
-			'publishOnFuture' =>  __('Schedule for:'),
-			'publishOnPast' => __('Published on:'),
-			/* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */
-			'dateFormat' => __('%1$s %2$s, %3$s @ %4$s:%5$s'),
-			'showcomm' => __('Show more comments'),
-			'endcomm' => __('No more comments found.'),
-			'publish' => __('Publish'),
-			'schedule' => __('Schedule'),
-			'update' => __('Update'),
-			'savePending' => __('Save as Pending'),
-			'saveDraft' => __('Save Draft'),
-			'private' => __('Private'),
-			'public' => __('Public'),
-			'publicSticky' => __('Public, Sticky'),
-			'password' => __('Password Protected'),
-			'privatelyPublished' => __('Privately Published'),
-			'published' => __('Published'),
-			'saveAlert' => __('The changes you made will be lost if you navigate away from this page.'),
-			'savingText' => __('Saving Draft&#8230;'),
-			'permalinkSaved' => __( 'Permalink saved' ),
-		) );
-
-		$scripts->add( 'press-this', "/wp-admin/js/press-this$suffix.js", array( 'jquery', 'tags-box' ), false, 1 );
-		did_action( 'init' ) && $scripts->localize( 'press-this', 'pressThisL10n', array(
-			'newPost' => __( 'Title' ),
-			'serverError' => __( 'Connection lost or the server is busy. Please try again later.' ),
-			'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ),
-			/* translators: %d: nth embed found in a post */
-			'suggestedEmbedAlt' => __( 'Suggested embed #%d' ),
-			/* translators: %d: nth image found in a post */
-			'suggestedImgAlt' => __( 'Suggested image #%d' ),
-		) );
-
-		$scripts->add( 'editor-expand', "/wp-admin/js/editor-expand$suffix.js", array( 'jquery', 'underscore' ), false, 1 );
-
-		$scripts->add( 'link', "/wp-admin/js/link$suffix.js", array( 'wp-lists', 'postbox' ), false, 1 );
-
-		$scripts->add( 'comment', "/wp-admin/js/comment$suffix.js", array( 'jquery', 'postbox' ) );
-		$scripts->add_data( 'comment', 'group', 1 );
-		did_action( 'init' ) && $scripts->localize( 'comment', 'commentL10n', array(
-			'submittedOn' => __( 'Submitted on:' ),
-			/* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */
-			'dateFormat' => __( '%1$s %2$s, %3$s @ %4$s:%5$s' )
-		) );
-
-		$scripts->add( 'admin-gallery', "/wp-admin/js/gallery$suffix.js", array( 'jquery-ui-sortable' ) );
-
-		$scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable' ), false, 1 );
-
-		$scripts->add( 'theme', "/wp-admin/js/theme$suffix.js", array( 'wp-backbone', 'wp-a11y' ), false, 1 );
-
-		$scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'suggest', 'wp-a11y' ), false, 1 );
-		did_action( 'init' ) && $scripts->localize( 'inline-edit-post', 'inlineEditL10n', array(
-			'error'      => __( 'Error while saving the changes.' ),
-			'ntdeltitle' => __( 'Remove From Bulk Edit' ),
-			'notitle'    => __( '(no title)' ),
-			'comma'      => trim( _x( ',', 'tag delimiter' ) ),
-			'saved'      => __( 'Changes saved.' ),
-		) );
-
-		$scripts->add( 'inline-edit-tax', "/wp-admin/js/inline-edit-tax$suffix.js", array( 'jquery', 'wp-a11y' ), false, 1 );
-		did_action( 'init' ) && $scripts->localize( 'inline-edit-tax', 'inlineEditL10n', array(
-			'error' => __( 'Error while saving the changes.' ),
-			'saved' => __( 'Changes saved.' ),
-		) );
-
-		$scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery', 'jquery-ui-core', 'thickbox' ), false, 1 );
-		did_action( 'init' ) && $scripts->localize( 'plugin-install', 'plugininstallL10n', array(
-			'plugin_information' => __( 'Plugin:' ),
-			'plugin_modal_label' => __( 'Plugin details' ),
-			'ays' => __('Are you sure you want to install this plugin?')
-		) );
-
-		$scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y' ) );
-		did_action( 'init' ) && $scripts->localize( 'updates', '_wpUpdatesSettings', array(
-			'ajax_nonce' => wp_create_nonce( 'updates' ),
-			'l10n'       => array(
-				/* translators: %s: Search string */
-				'searchResults'              => __( 'Search results for &#8220;%s&#8221;' ),
-				'searchResultsLabel'         => __( 'Search Results' ),
-				'noPlugins'                  => __( 'You do not appear to have any plugins available at this time.' ),
-				'noItemsSelected'            => __( 'Please select at least one item to perform this action on.' ),
-				'updating'                   => __( 'Updating...' ), // No ellipsis.
-				'updated'                    => __( 'Updated!' ),
-				'update'                     => __( 'Update' ),
-				'updateNow'                  => __( 'Update Now' ),
-				/* translators: %s: Plugin name and version */
-				'updateNowLabel'             => __( 'Update %s now' ),
-				'updateFailedShort'          => __( 'Update Failed!' ),
-				/* translators: %s: Error string for a failed update */
-				'updateFailed'               => __( 'Update Failed: %s' ),
-				/* translators: %s: Plugin name and version */
-				'updatingLabel'              => __( 'Updating %s...' ), // No ellipsis.
-				/* translators: %s: Plugin name and version */
-				'updatedLabel'               => __( '%s updated!' ),
-				/* translators: %s: Plugin name and version */
-				'updateFailedLabel'          => __( '%s update failed' ),
-				/* translators: JavaScript accessible string */
-				'updatingMsg'                => __( 'Updating... please wait.' ), // No ellipsis.
-				/* translators: JavaScript accessible string */
-				'updatedMsg'                 => __( 'Update completed successfully.' ),
-				/* translators: JavaScript accessible string */
-				'updateCancel'               => __( 'Update canceled.' ),
-				'beforeunload'               => __( 'Updates may not complete if you navigate away from this page.' ),
-				'installNow'                 => __( 'Install Now' ),
-				/* translators: %s: Plugin name */
-				'installNowLabel'            => __( 'Install %s now' ),
-				'installing'                 => __( 'Installing...' ),
-				'installed'                  => __( 'Installed!' ),
-				'installFailedShort'         => __( 'Install Failed!' ),
-				/* translators: %s: Error string for a failed installation */
-				'installFailed'              => __( 'Installation failed: %s' ),
-				/* translators: %s: Plugin name and version */
-				'pluginInstallingLabel'      => _x( 'Installing %s...', 'plugin' ), // no ellipsis
-				/* translators: %s: Theme name and version */
-				'themeInstallingLabel'       => _x( 'Installing %s...', 'theme' ), // no ellipsis
-				/* translators: %s: Plugin name and version */
-				'pluginInstalledLabel'       => _x( '%s installed!', 'plugin' ),
-				/* translators: %s: Theme name and version */
-				'themeInstalledLabel'        => _x( '%s installed!', 'theme' ),
-				/* translators: %s: Plugin name and version */
-				'pluginInstallFailedLabel'   => _x( '%s installation failed', 'plugin' ),
-				/* translators: %s: Theme name and version */
-				'themeInstallFailedLabel'    => _x( '%s installation failed', 'theme' ),
-				'installingMsg'              => __( 'Installing... please wait.' ),
-				'installedMsg'               => __( 'Installation completed successfully.' ),
-				/* translators: %s: Activation URL */
-				'importerInstalledMsg'       => __( 'Importer installed successfully. <a href="%s">Run importer</a>' ),
-				/* translators: %s: Theme name */
-				'aysDelete'                  => __( 'Are you sure you want to delete %s?' ),
-				/* translators: %s: Plugin name */
-				'aysDeleteUninstall'         => __( 'Are you sure you want to delete %s and its data?' ),
-				'aysBulkDelete'              => __( 'Are you sure you want to delete the selected plugins and their data?' ),
-				'aysBulkDeleteThemes'        => __( 'Caution: These themes may be active on other sites in the network. Are you sure you want to proceed?' ),
-				'deleting'                   => __( 'Deleting...' ),
-				/* translators: %s: Error string for a failed deletion */
-				'deleteFailed'               => __( 'Deletion failed: %s' ),
-				'deleted'                    => __( 'Deleted!' ),
-				'livePreview'                => __( 'Live Preview' ),
-				'activatePlugin'             => is_network_admin() ? __( 'Network Activate' ) : __( 'Activate' ),
-				'activateTheme'              => is_network_admin() ? __( 'Network Enable' ) : __( 'Activate' ),
-				/* translators: %s: Plugin name */
-				'activatePluginLabel'        => is_network_admin() ? _x( 'Network Activate %s', 'plugin' ) : _x( 'Activate %s', 'plugin' ),
-				/* translators: %s: Theme name */
-				'activateThemeLabel'         => is_network_admin() ? _x( 'Network Activate %s', 'theme' ) : _x( 'Activate %s', 'theme' ),
-				'activateImporter'           => __( 'Run Importer' ),
-				/* translators: %s: Importer name */
-				'activateImporterLabel'      => __( 'Run %s' ),
-				'unknownError'               => __( 'An unknown error occurred' ),
-				'connectionError'            => __( 'Connection lost or the server is busy. Please try again later.' ),
-				'nonceError'                 => __( 'An error has occurred. Please reload the page and try again.' ),
-				'pluginsFound'               => __( 'Number of plugins found: %d' ),
-				'noPluginsFound'             => __( 'No plugins found. Try a different search.' ),
-			),
-		) );
-
-		$scripts->add( 'farbtastic', '/wp-admin/js/farbtastic.js', array('jquery'), '1.2' );
-
-		$scripts->add( 'iris', '/wp-admin/js/iris.min.js', array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), '1.0.7', 1 );
-		$scripts->add( 'wp-color-picker', "/wp-admin/js/color-picker$suffix.js", array( 'iris' ), false, 1 );
-		did_action( 'init' ) && $scripts->localize( 'wp-color-picker', 'wpColorPickerL10n', array(
-			'clear' => __( 'Clear' ),
-			'defaultString' => __( 'Default' ),
-			'pick' => __( 'Select Color' ),
-			'current' => __( 'Current Color' ),
-		) );
-
-		$scripts->add( 'dashboard', "/wp-admin/js/dashboard$suffix.js", array( 'jquery', 'admin-comments', 'postbox' ), false, 1 );
-
-		$scripts->add( 'list-revisions', "/wp-includes/js/wp-list-revisions$suffix.js" );
-
-		$scripts->add( 'media-grid', "/wp-includes/js/media-grid$suffix.js", array( 'media-editor' ), false, 1 );
-		$scripts->add( 'media', "/wp-admin/js/media$suffix.js", array( 'jquery' ), false, 1 );
-		did_action( 'init' ) && $scripts->localize( 'media', 'attachMediaBoxL10n', array(
-			'error' => __( 'An error has occurred. Please reload the page and try again.' ),
-		));
-
-		$scripts->add( 'image-edit', "/wp-admin/js/image-edit$suffix.js", array('jquery', 'json2', 'imgareaselect'), false, 1 );
-		did_action( 'init' ) && $scripts->localize( 'image-edit', 'imageEditL10n', array(
-			'error' => __( 'Could not load the preview image. Please reload the page and try again.' )
-		));
-
-		$scripts->add( 'set-post-thumbnail', "/wp-admin/js/set-post-thumbnail$suffix.js", array( 'jquery' ), false, 1 );
-		did_action( 'init' ) && $scripts->localize( 'set-post-thumbnail', 'setPostThumbnailL10n', array(
-			'setThumbnail' => __( 'Use as featured image' ),
-			'saving' => __( 'Saving...' ), // no ellipsis
-			'error' => __( 'Could not set that as the thumbnail image. Try a different attachment.' ),
-			'done' => __( 'Done' )
-		) );
-
-		// Navigation Menus
-		$scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable', 'wp-lists', 'postbox', 'json2' ) );
-		did_action( 'init' ) && $scripts->localize( 'nav-menu', 'navMenuL10n', array(
-			'noResultsFound' => __( 'No results found.' ),
-			'warnDeleteMenu' => __( "You are about to permanently delete this menu. \n 'Cancel' to stop, 'OK' to delete." ),
-			'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ),
-			'untitled' => _x( '(no label)', 'missing menu item navigation label' )
-		) );
-
-		$scripts->add( 'custom-header', "/wp-admin/js/custom-header.js", array( 'jquery-masonry' ), false, 1 );
-		$scripts->add( 'custom-background', "/wp-admin/js/custom-background$suffix.js", array( 'wp-color-picker', 'media-views' ), false, 1 );
-		$scripts->add( 'media-gallery', "/wp-admin/js/media-gallery$suffix.js", array('jquery'), false, 1 );
-
-		$scripts->add( 'svg-painter', '/wp-admin/js/svg-painter.js', array( 'jquery' ), false, 1 );
-	}
-}
-
-/**
- * Assign default styles to $styles object.
- *
- * Nothing is returned, because the $styles parameter is passed by reference.
- * Meaning that whatever object is passed will be updated without having to
- * reassign the variable that was passed back to the same value. This saves
- * memory.
- *
- * Adding default styles is not the only task, it also assigns the base_url
- * property, the default version, and text direction for the object.
- *
- * @since 2.6.0
- *
- * @param WP_Styles $styles
- */
-function wp_default_styles( &$styles ) {
-	include( ABSPATH . WPINC . '/version.php' ); // include an unmodified $wp_version
-
-	if ( ! defined( 'SCRIPT_DEBUG' ) )
-		define( 'SCRIPT_DEBUG', false !== strpos( $wp_version, '-src' ) );
-
-	if ( ! $guessurl = site_url() )
-		$guessurl = wp_guess_url();
-
-	$styles->base_url = $guessurl;
-	$styles->content_url = defined('WP_CONTENT_URL')? WP_CONTENT_URL : '';
-	$styles->default_version = get_bloginfo( 'version' );
-	$styles->text_direction = function_exists( 'is_rtl' ) && is_rtl() ? 'rtl' : 'ltr';
-	$styles->default_dirs = array('/wp-admin/', '/wp-includes/css/');
-
-	// Open Sans is no longer used by core, but may be relied upon by themes and plugins.
-	$open_sans_font_url = '';
-
-	/* translators: If there are characters in your language that are not supported
-	 * by Open Sans, translate this to 'off'. Do not translate into your own language.
-	 */
-	if ( 'off' !== _x( 'on', 'Open Sans font: on or off' ) ) {
-		$subsets = 'latin,latin-ext';
-
-		/* translators: To add an additional Open Sans character subset specific to your language,
-		 * translate this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language.
-		 */
-		$subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)' );
-
-		if ( 'cyrillic' == $subset ) {
-			$subsets .= ',cyrillic,cyrillic-ext';
-		} elseif ( 'greek' == $subset ) {
-			$subsets .= ',greek,greek-ext';
-		} elseif ( 'vietnamese' == $subset ) {
-			$subsets .= ',vietnamese';
-		}
-
-		// Hotlink Open Sans, for now
-		$open_sans_font_url = "https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=$subsets";
-	}
-
-	// Register a stylesheet for the selected admin color scheme.
-	$styles->add( 'colors', true, array( 'wp-admin', 'buttons' ) );
-
-	$suffix = SCRIPT_DEBUG ? '' : '.min';
-
-	// Admin CSS
-	$styles->add( 'common',              "/wp-admin/css/common$suffix.css" );
-	$styles->add( 'forms',               "/wp-admin/css/forms$suffix.css" );
-	$styles->add( 'admin-menu',          "/wp-admin/css/admin-menu$suffix.css" );
-	$styles->add( 'dashboard',           "/wp-admin/css/dashboard$suffix.css" );
-	$styles->add( 'list-tables',         "/wp-admin/css/list-tables$suffix.css" );
-	$styles->add( 'edit',                "/wp-admin/css/edit$suffix.css" );
-	$styles->add( 'revisions',           "/wp-admin/css/revisions$suffix.css" );
-	$styles->add( 'media',               "/wp-admin/css/media$suffix.css" );
-	$styles->add( 'themes',              "/wp-admin/css/themes$suffix.css" );
-	$styles->add( 'about',               "/wp-admin/css/about$suffix.css" );
-	$styles->add( 'nav-menus',           "/wp-admin/css/nav-menus$suffix.css" );
-	$styles->add( 'widgets',             "/wp-admin/css/widgets$suffix.css" );
-	$styles->add( 'site-icon',           "/wp-admin/css/site-icon$suffix.css" );
-	$styles->add( 'l10n',                "/wp-admin/css/l10n$suffix.css" );
-
-	$styles->add( 'wp-admin', false, array( 'dashicons', 'common', 'forms', 'admin-menu', 'dashboard', 'list-tables', 'edit', 'revisions', 'media', 'themes', 'about', 'nav-menus', 'widgets', 'site-icon', 'l10n' ) );
-
-	$styles->add( 'login',               "/wp-admin/css/login$suffix.css", array( 'dashicons', 'buttons', 'forms', 'l10n' ) );
-	$styles->add( 'install',             "/wp-admin/css/install$suffix.css", array( 'buttons' ) );
-	$styles->add( 'wp-color-picker',     "/wp-admin/css/color-picker$suffix.css" );
-	$styles->add( 'customize-controls',  "/wp-admin/css/customize-controls$suffix.css", array( 'wp-admin', 'colors', 'ie', 'imgareaselect' ) );
-	$styles->add( 'customize-widgets',   "/wp-admin/css/customize-widgets$suffix.css", array( 'wp-admin', 'colors' ) );
-	$styles->add( 'customize-nav-menus', "/wp-admin/css/customize-nav-menus$suffix.css", array( 'wp-admin', 'colors' ) );
-	$styles->add( 'press-this',          "/wp-admin/css/press-this$suffix.css", array( 'buttons' ) );
-
-	$styles->add( 'ie', "/wp-admin/css/ie$suffix.css" );
-	$styles->add_data( 'ie', 'conditional', 'lte IE 7' );
-
-	// Common dependencies
-	$styles->add( 'buttons',   "/wp-includes/css/buttons$suffix.css" );
-	$styles->add( 'dashicons', "/wp-includes/css/dashicons$suffix.css" );
-
-	// Includes CSS
-	$styles->add( 'admin-bar',            "/wp-includes/css/admin-bar$suffix.css", array( 'dashicons' ) );
-	$styles->add( 'wp-auth-check',        "/wp-includes/css/wp-auth-check$suffix.css", array( 'dashicons' ) );
-	$styles->add( 'editor-buttons',       "/wp-includes/css/editor$suffix.css", array( 'dashicons' ) );
-	$styles->add( 'media-views',          "/wp-includes/css/media-views$suffix.css", array( 'buttons', 'dashicons', 'wp-mediaelement' ) );
-	$styles->add( 'wp-pointer',           "/wp-includes/css/wp-pointer$suffix.css", array( 'dashicons' ) );
-	$styles->add( 'customize-preview',    "/wp-includes/css/customize-preview$suffix.css" );
-	$styles->add( 'wp-embed-template-ie', "/wp-includes/css/wp-embed-template-ie$suffix.css" );
-	$styles->add_data( 'wp-embed-template-ie', 'conditional', 'lte IE 8' );
-
-	// External libraries and friends
-	$styles->add( 'imgareaselect',       '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.8' );
-	$styles->add( 'wp-jquery-ui-dialog', "/wp-includes/css/jquery-ui-dialog$suffix.css", array( 'dashicons' ) );
-	$styles->add( 'mediaelement',        "/wp-includes/js/mediaelement/mediaelementplayer.min.css", array(), '2.22.0' );
-	$styles->add( 'wp-mediaelement',     "/wp-includes/js/mediaelement/wp-mediaelement$suffix.css", array( 'mediaelement' ) );
-	$styles->add( 'thickbox',            '/wp-includes/js/thickbox/thickbox.css', array( 'dashicons' ) );
-
-	// Deprecated CSS
-	$styles->add( 'deprecated-media', "/wp-admin/css/deprecated-media$suffix.css" );
-	$styles->add( 'farbtastic',       "/wp-admin/css/farbtastic$suffix.css", array(), '1.3u1' );
-	$styles->add( 'jcrop',            "/wp-includes/js/jcrop/jquery.Jcrop.min.css", array(), '0.9.12' );
-	$styles->add( 'colors-fresh', false, array( 'wp-admin', 'buttons' ) ); // Old handle.
-	$styles->add( 'open-sans', $open_sans_font_url ); // No longer used in core as of 4.6
-
-	// RTL CSS
-	$rtl_styles = array(
-		// wp-admin
-		'common', 'forms', 'admin-menu', 'dashboard', 'list-tables', 'edit', 'revisions', 'media', 'themes', 'about', 'nav-menus',
-		'widgets', 'site-icon', 'l10n', 'install', 'wp-color-picker', 'customize-controls', 'customize-widgets', 'customize-nav-menus',
-		'ie', 'login', 'press-this',
-		// wp-includes
-		'buttons', 'admin-bar', 'wp-auth-check', 'editor-buttons', 'media-views', 'wp-pointer',
-		'wp-jquery-ui-dialog',
-		// deprecated
-		'deprecated-media', 'farbtastic',
-	);
-
-	foreach ( $rtl_styles as $rtl_style ) {
-		$styles->add_data( $rtl_style, 'rtl', 'replace' );
-		if ( $suffix ) {
-			$styles->add_data( $rtl_style, 'suffix', $suffix );
-		}
-	}
-}
-
-/**
- * Reorder JavaScript scripts array to place prototype before jQuery.
- *
- * @since 2.3.1
- *
- * @param array $js_array JavaScript scripts array
- * @return array Reordered array, if needed.
- */
-function wp_prototype_before_jquery( $js_array ) {
-	if ( false === $prototype = array_search( 'prototype', $js_array, true ) )
-		return $js_array;
-
-	if ( false === $jquery = array_search( 'jquery', $js_array, true ) )
-		return $js_array;
-
-	if ( $prototype < $jquery )
-		return $js_array;
-
-	unset($js_array[$prototype]);
-
-	array_splice( $js_array, $jquery, 0, 'prototype' );
-
-	return $js_array;
-}
-
-/**
- * Load localized data on print rather than initialization.
- *
- * These localizations require information that may not be loaded even by init.
- *
- * @since 2.5.0
- */
-function wp_just_in_time_script_localization() {
-
-	wp_localize_script( 'autosave', 'autosaveL10n', array(
-		'autosaveInterval' => AUTOSAVE_INTERVAL,
-		'blog_id' => get_current_blog_id(),
-	) );
-}
-
-/**
- * Localizes the jQuery UI datepicker.
- *
- * @since 4.6.0
- *
- * @link http://api.jqueryui.com/datepicker/#options
- *
- * @global WP_Locale $wp_locale The WordPress date and time locale object.
- */
-function wp_localize_jquery_ui_datepicker() {
-	global $wp_locale;
-
-	if ( ! wp_script_is( 'jquery-ui-datepicker', 'enqueued' ) ) {
-		return;
-	}
-
-	// Convert the PHP date format into jQuery UI's format.
-	$datepicker_date_format = str_replace(
-		array(
-			'd', 'j', 'l', 'z', // Day.
-			'F', 'M', 'n', 'm', // Month.
-			'Y', 'y'            // Year.
-		),
-		array(
-			'dd', 'd', 'DD', 'o',
-			'MM', 'M', 'm', 'mm',
-			'yy', 'y'
-		),
-		get_option( 'date_format' )
-	);
-
-	$datepicker_defaults = wp_json_encode( array(
-		'closeText'       => __( 'Close' ),
-		'currentText'     => __( 'Today' ),
-		'monthNames'      => array_values( $wp_locale->month ),
-		'monthNamesShort' => array_values( $wp_locale->month_abbrev ),
-		'nextText'        => __( 'Next' ),
-		'prevText'        => __( 'Previous' ),
-		'dayNames'        => array_values( $wp_locale->weekday ),
-		'dayNamesShort'   => array_values( $wp_locale->weekday_abbrev ),
-		'dayNamesMin'     => array_values( $wp_locale->weekday_initial ),
-		'dateFormat'      => $datepicker_date_format,
-		'firstDay'        => absint( get_option( 'start_of_week' ) ),
-		'isRTL'           => $wp_locale->is_rtl(),
-	) );
-
-	wp_add_inline_script( 'jquery-ui-datepicker', "jQuery(document).ready(function(jQuery){jQuery.datepicker.setDefaults({$datepicker_defaults});});" );
-}
-
-/**
- * Administration Screen CSS for changing the styles.
- *
- * If installing the 'wp-admin/' directory will be replaced with './'.
- *
- * The $_wp_admin_css_colors global manages the Administration Screens CSS
- * stylesheet that is loaded. The option that is set is 'admin_color' and is the
- * color and key for the array. The value for the color key is an object with
- * a 'url' parameter that has the URL path to the CSS file.
- *
- * The query from $src parameter will be appended to the URL that is given from
- * the $_wp_admin_css_colors array value URL.
- *
- * @since 2.6.0
- * @global array $_wp_admin_css_colors
- *
- * @param string $src    Source URL.
- * @param string $handle Either 'colors' or 'colors-rtl'.
- * @return string|false URL path to CSS stylesheet for Administration Screens.
- */
-function wp_style_loader_src( $src, $handle ) {
-	global $_wp_admin_css_colors;
-
-	if ( wp_installing() )
-		return preg_replace( '#^wp-admin/#', './', $src );
-
-	if ( 'colors' == $handle ) {
-		$color = get_user_option('admin_color');
-
-		if ( empty($color) || !isset($_wp_admin_css_colors[$color]) )
-			$color = 'fresh';
-
-		$color = $_wp_admin_css_colors[$color];
-		$url = $color->url;
-
-		if ( ! $url ) {
-			return false;
-		}
-
-		$parsed = parse_url( $src );
-		if ( isset($parsed['query']) && $parsed['query'] ) {
-			wp_parse_str( $parsed['query'], $qv );
-			$url = add_query_arg( $qv, $url );
-		}
-
-		return $url;
-	}
-
-	return $src;
-}
-
-/**
- * Prints the script queue in the HTML head on admin pages.
- *
- * Postpones the scripts that were queued for the footer.
- * print_footer_scripts() is called in the footer to print these scripts.
- *
- * @since 2.8.0
- *
- * @see wp_print_scripts()
- *
- * @global bool $concatenate_scripts
- *
- * @return array
- */
-function print_head_scripts() {
-	global $concatenate_scripts;
-
-	if ( ! did_action('wp_print_scripts') ) {
-		/** This action is documented in wp-includes/functions.wp-scripts.php */
-		do_action( 'wp_print_scripts' );
-	}
-
-	$wp_scripts = wp_scripts();
-
-	script_concat_settings();
-	$wp_scripts->do_concat = $concatenate_scripts;
-	$wp_scripts->do_head_items();
-
-	/**
-	 * Filters whether to print the head scripts.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param bool $print Whether to print the head scripts. Default true.
-	 */
-	if ( apply_filters( 'print_head_scripts', true ) ) {
-		_print_scripts();
-	}
-
-	$wp_scripts->reset();
-	return $wp_scripts->done;
-}
-
-/**
- * Prints the scripts that were queued for the footer or too late for the HTML head.
- *
- * @since 2.8.0
- *
- * @global WP_Scripts $wp_scripts
- * @global bool       $concatenate_scripts
- *
- * @return array
- */
-function print_footer_scripts() {
-	global $wp_scripts, $concatenate_scripts;
-
-	if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
-		return array(); // No need to run if not instantiated.
-	}
-	script_concat_settings();
-	$wp_scripts->do_concat = $concatenate_scripts;
-	$wp_scripts->do_footer_items();
-
-	/**
-	 * Filters whether to print the footer scripts.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param bool $print Whether to print the footer scripts. Default true.
-	 */
-	if ( apply_filters( 'print_footer_scripts', true ) ) {
-		_print_scripts();
-	}
-
-	$wp_scripts->reset();
-	return $wp_scripts->done;
-}
-
-/**
- * Print scripts (internal use only)
- *
- * @ignore
- *
- * @global WP_Scripts $wp_scripts
- * @global bool       $compress_scripts
- */
-function _print_scripts() {
-	global $wp_scripts, $compress_scripts;
-
-	$zip = $compress_scripts ? 1 : 0;
-	if ( $zip && defined('ENFORCE_GZIP') && ENFORCE_GZIP )
-		$zip = 'gzip';
-
-	if ( $concat = trim( $wp_scripts->concat, ', ' ) ) {
-
-		if ( !empty($wp_scripts->print_code) ) {
-			echo "\n<script type='text/javascript'>\n";
-			echo "/* <![CDATA[ */\n"; // not needed in HTML 5
-			echo $wp_scripts->print_code;
-			echo "/* ]]> */\n";
-			echo "</script>\n";
-		}
-
-		$concat = str_split( $concat, 128 );
-		$concat = 'load%5B%5D=' . implode( '&load%5B%5D=', $concat );
-
-		$src = $wp_scripts->base_url . "/wp-admin/load-scripts.php?c={$zip}&" . $concat . '&ver=' . $wp_scripts->default_version;
-		echo "<script type='text/javascript' src='" . esc_attr($src) . "'></script>\n";
-	}
-
-	if ( !empty($wp_scripts->print_html) )
-		echo $wp_scripts->print_html;
-}
-
-/**
- * Prints the script queue in the HTML head on the front end.
- *
- * Postpones the scripts that were queued for the footer.
- * wp_print_footer_scripts() is called in the footer to print these scripts.
- *
- * @since 2.8.0
- *
- * @global WP_Scripts $wp_scripts
- *
- * @return array
- */
-function wp_print_head_scripts() {
-	if ( ! did_action('wp_print_scripts') ) {
-		/** This action is documented in wp-includes/functions.wp-scripts.php */
-		do_action( 'wp_print_scripts' );
-	}
-
-	global $wp_scripts;
-
-	if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
-		return array(); // no need to run if nothing is queued
-	}
-	return print_head_scripts();
-}
-
-/**
- * Private, for use in *_footer_scripts hooks
- *
- * @since 3.3.0
- */
-function _wp_footer_scripts() {
-	print_late_styles();
-	print_footer_scripts();
-}
-
-/**
- * Hooks to print the scripts and styles in the footer.
- *
- * @since 2.8.0
- */
-function wp_print_footer_scripts() {
-	/**
-	 * Fires when footer scripts are printed.
-	 *
-	 * @since 2.8.0
-	 */
-	do_action( 'wp_print_footer_scripts' );
-}
-
-/**
- * Wrapper for do_action('wp_enqueue_scripts')
- *
- * Allows plugins to queue scripts for the front end using wp_enqueue_script().
- * Runs first in wp_head() where all is_home(), is_page(), etc. functions are available.
- *
- * @since 2.8.0
- */
-function wp_enqueue_scripts() {
-	/**
-	 * Fires when scripts and styles are enqueued.
-	 *
-	 * @since 2.8.0
-	 */
-	do_action( 'wp_enqueue_scripts' );
-}
-
-/**
- * Prints the styles queue in the HTML head on admin pages.
- *
- * @since 2.8.0
- *
- * @global bool $concatenate_scripts
- *
- * @return array
- */
-function print_admin_styles() {
-	global $concatenate_scripts;
-
-	$wp_styles = wp_styles();
-
-	script_concat_settings();
-	$wp_styles->do_concat = $concatenate_scripts;
-	$wp_styles->do_items(false);
-
-	/**
-	 * Filters whether to print the admin styles.
-	 *
-	 * @since 2.8.0
-	 *
-	 * @param bool $print Whether to print the admin styles. Default true.
-	 */
-	if ( apply_filters( 'print_admin_styles', true ) ) {
-		_print_styles();
-	}
-
-	$wp_styles->reset();
-	return $wp_styles->done;
-}
-
-/**
- * Prints the styles that were queued too late for the HTML head.
- *
- * @since 3.3.0
- *
- * @global WP_Styles $wp_styles
- * @global bool      $concatenate_scripts
- *
- * @return array|void
- */
-function print_late_styles() {
-	global $wp_styles, $concatenate_scripts;
-
-	if ( ! ( $wp_styles instanceof WP_Styles ) ) {
-		return;
-	}
-
-	script_concat_settings();
-	$wp_styles->do_concat = $concatenate_scripts;
-	$wp_styles->do_footer_items();
-
-	/**
-	 * Filters whether to print the styles queued too late for the HTML head.
-	 *
-	 * @since 3.3.0
-	 *
-	 * @param bool $print Whether to print the 'late' styles. Default true.
-	 */
-	if ( apply_filters( 'print_late_styles', true ) ) {
-		_print_styles();
-	}
-
-	$wp_styles->reset();
-	return $wp_styles->done;
-}
-
-/**
- * Print styles (internal use only)
- *
- * @ignore
- * @since 3.3.0
- *
- * @global bool $compress_css
- */
-function _print_styles() {
-	global $compress_css;
-
-	$wp_styles = wp_styles();
-
-	$zip = $compress_css ? 1 : 0;
-	if ( $zip && defined('ENFORCE_GZIP') && ENFORCE_GZIP )
-		$zip = 'gzip';
-
-	if ( $concat = trim( $wp_styles->concat, ', ' ) ) {
-		$dir = $wp_styles->text_direction;
-		$ver = $wp_styles->default_version;
-
-		$concat = str_split( $concat, 128 );
-		$concat = 'load%5B%5D=' . implode( '&load%5B%5D=', $concat );
-
-		$href = $wp_styles->base_url . "/wp-admin/load-styles.php?c={$zip}&dir={$dir}&" . $concat . '&ver=' . $ver;
-		echo "<link rel='stylesheet' href='" . esc_attr($href) . "' type='text/css' media='all' />\n";
-
-		if ( !empty($wp_styles->print_code) ) {
-			echo "<style type='text/css'>\n";
-			echo $wp_styles->print_code;
-			echo "\n</style>\n";
-		}
-	}
-
-	if ( !empty($wp_styles->print_html) )
-		echo $wp_styles->print_html;
-}
-
-/**
- * Determine the concatenation and compression settings for scripts and styles.
- *
- * @since 2.8.0
- *
- * @global bool $concatenate_scripts
- * @global bool $compress_scripts
- * @global bool $compress_css
- */
-function script_concat_settings() {
-	global $concatenate_scripts, $compress_scripts, $compress_css;
-
-	$compressed_output = ( ini_get('zlib.output_compression') || 'ob_gzhandler' == ini_get('output_handler') );
-
-	if ( ! isset($concatenate_scripts) ) {
-		$concatenate_scripts = defined('CONCATENATE_SCRIPTS') ? CONCATENATE_SCRIPTS : true;
-		if ( ( ! is_admin() && ! did_action( 'login_init' ) ) || ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) )
-			$concatenate_scripts = false;
-	}
-
-	if ( ! isset($compress_scripts) ) {
-		$compress_scripts = defined('COMPRESS_SCRIPTS') ? COMPRESS_SCRIPTS : true;
-		if ( $compress_scripts && ( ! get_site_option('can_compress_scripts') || $compressed_output ) )
-			$compress_scripts = false;
-	}
-
-	if ( ! isset($compress_css) ) {
-		$compress_css = defined('COMPRESS_CSS') ? COMPRESS_CSS : true;
-		if ( $compress_css && ( ! get_site_option('can_compress_scripts') || $compressed_output ) )
-			$compress_css = false;
-	}
-}
Index: www/wp-includes/wp-db.php
===================================================================
--- www/wp-includes/wp-db.php	(revision 38565)
+++ www/wp-includes/autoload/wpdb.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/includes/class-wp-themes-list-table.php
===================================================================
--- www/wp-admin/includes/class-wp-themes-list-table.php	(revision 38565)
+++ www/wp-admin/autoload/list-table/WP_Themes_List_Table.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/autoload/id3/AVCSequenceParameterSetReader.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/autoload/id3/AVCSequenceParameterSetReader.php	(revision )
+++ www/wp-includes/autoload/id3/AVCSequenceParameterSetReader.php	(revision )
@@ -0,0 +1,170 @@
+<?php
+/////////////////////////////////////////////////////////////////
+/// getID3() by James Heinrich <info@getid3.org>               //
+//  available at http://getid3.sourceforge.net                 //
+//            or http://www.getid3.org                         //
+//          also https://github.com/JamesHeinrich/getID3       //
+//                                                             //
+//  FLV module by Seth Kaufman <sethØwhirl-i-gig*com>          //
+//                                                             //
+//  * version 0.1 (26 June 2005)                               //
+//                                                             //
+//                                                             //
+//  * version 0.1.1 (15 July 2005)                             //
+//  minor modifications by James Heinrich <info@getid3.org>    //
+//                                                             //
+//  * version 0.2 (22 February 2006)                           //
+//  Support for On2 VP6 codec and meta information             //
+//    by Steve Webster <steve.websterØfeaturecreep*com>        //
+//                                                             //
+//  * version 0.3 (15 June 2006)                               //
+//  Modified to not read entire file into memory               //
+//    by James Heinrich <info@getid3.org>                      //
+//                                                             //
+//  * version 0.4 (07 December 2007)                           //
+//  Bugfixes for incorrectly parsed FLV dimensions             //
+//    and incorrect parsing of onMetaTag                       //
+//    by Evgeny Moysevich <moysevichØgmail*com>                //
+//                                                             //
+//  * version 0.5 (21 May 2009)                                //
+//  Fixed parsing of audio tags and added additional codec     //
+//    details. The duration is now read from onMetaTag (if     //
+//    exists), rather than parsing whole file                  //
+//    by Nigel Barnes <ngbarnesØhotmail*com>                   //
+//                                                             //
+//  * version 0.6 (24 May 2009)                                //
+//  Better parsing of files with h264 video                    //
+//    by Evgeny Moysevich <moysevichØgmail*com>                //
+//                                                             //
+//  * version 0.6.1 (30 May 2011)                              //
+//    prevent infinite loops in expGolombUe()                  //
+//                                                             //
+//  * version 0.7.0 (16 Jul 2013)                              //
+//  handle GETID3_FLV_VIDEO_VP6FLV_ALPHA                       //
+//  improved AVCSequenceParameterSetReader::readData()         //
+//    by Xander Schouwerwou <schouwerwouØgmail*com>            //
+//                                                             //
+/////////////////////////////////////////////////////////////////
+//                                                             //
+// module.audio-video.flv.php                                  //
+// module for analyzing Shockwave Flash Video files            //
+// dependencies: NONE                                          //
+//                                                            ///
+/////////////////////////////////////////////////////////////////
+
+class AVCSequenceParameterSetReader {
+	public $sps;
+	public $start = 0;
+	public $currentBytes = 0;
+	public $currentBits = 0;
+	public $width;
+	public $height;
+
+	public function __construct($sps) {
+		$this->sps = $sps;
+	}
+
+	public function readData() {
+		$this->skipBits(8);
+		$this->skipBits(8);
+		$profile = $this->getBits(8);                               // read profile
+		if ($profile > 0) {
+			$this->skipBits(8);
+			$level_idc = $this->getBits(8);                         // level_idc
+			$this->expGolombUe();                                   // seq_parameter_set_id // sps
+			$this->expGolombUe();                                   // log2_max_frame_num_minus4
+			$picOrderType = $this->expGolombUe();                   // pic_order_cnt_type
+			if ($picOrderType == 0) {
+				$this->expGolombUe();                               // log2_max_pic_order_cnt_lsb_minus4
+			} elseif ($picOrderType == 1) {
+				$this->skipBits(1);                                 // delta_pic_order_always_zero_flag
+				$this->expGolombSe();                               // offset_for_non_ref_pic
+				$this->expGolombSe();                               // offset_for_top_to_bottom_field
+				$num_ref_frames_in_pic_order_cnt_cycle = $this->expGolombUe(); // num_ref_frames_in_pic_order_cnt_cycle
+				for ($i = 0; $i < $num_ref_frames_in_pic_order_cnt_cycle; $i++) {
+					$this->expGolombSe();                           // offset_for_ref_frame[ i ]
+				}
+			}
+			$this->expGolombUe();                                   // num_ref_frames
+			$this->skipBits(1);                                     // gaps_in_frame_num_value_allowed_flag
+			$pic_width_in_mbs_minus1 = $this->expGolombUe();        // pic_width_in_mbs_minus1
+			$pic_height_in_map_units_minus1 = $this->expGolombUe(); // pic_height_in_map_units_minus1
+
+			$frame_mbs_only_flag = $this->getBits(1);               // frame_mbs_only_flag
+			if ($frame_mbs_only_flag == 0) {
+				$this->skipBits(1);                                 // mb_adaptive_frame_field_flag
+			}
+			$this->skipBits(1);                                     // direct_8x8_inference_flag
+			$frame_cropping_flag = $this->getBits(1);               // frame_cropping_flag
+
+			$frame_crop_left_offset   = 0;
+			$frame_crop_right_offset  = 0;
+			$frame_crop_top_offset    = 0;
+			$frame_crop_bottom_offset = 0;
+
+			if ($frame_cropping_flag) {
+				$frame_crop_left_offset   = $this->expGolombUe();   // frame_crop_left_offset
+				$frame_crop_right_offset  = $this->expGolombUe();   // frame_crop_right_offset
+				$frame_crop_top_offset    = $this->expGolombUe();   // frame_crop_top_offset
+				$frame_crop_bottom_offset = $this->expGolombUe();   // frame_crop_bottom_offset
+			}
+			$this->skipBits(1);                                     // vui_parameters_present_flag
+			// etc
+
+			$this->width  = (($pic_width_in_mbs_minus1 + 1) * 16) - ($frame_crop_left_offset * 2) - ($frame_crop_right_offset * 2);
+			$this->height = ((2 - $frame_mbs_only_flag) * ($pic_height_in_map_units_minus1 + 1) * 16) - ($frame_crop_top_offset * 2) - ($frame_crop_bottom_offset * 2);
+		}
+	}
+
+	public function skipBits($bits) {
+		$newBits = $this->currentBits + $bits;
+		$this->currentBytes += (int)floor($newBits / 8);
+		$this->currentBits = $newBits % 8;
+	}
+
+	public function getBit() {
+		$result = (getid3_lib::BigEndian2Int(substr($this->sps, $this->currentBytes, 1)) >> (7 - $this->currentBits)) & 0x01;
+		$this->skipBits(1);
+		return $result;
+	}
+
+	public function getBits($bits) {
+		$result = 0;
+		for ($i = 0; $i < $bits; $i++) {
+			$result = ($result << 1) + $this->getBit();
+		}
+		return $result;
+	}
+
+	public function expGolombUe() {
+		$significantBits = 0;
+		$bit = $this->getBit();
+		while ($bit == 0) {
+			$significantBits++;
+			$bit = $this->getBit();
+
+			if ($significantBits > 31) {
+				// something is broken, this is an emergency escape to prevent infinite loops
+				return 0;
+			}
+		}
+		return (1 << $significantBits) + $this->getBits($significantBits) - 1;
+	}
+
+	public function expGolombSe() {
+		$result = $this->expGolombUe();
+		if (($result & 0x01) == 0) {
+			return -($result >> 1);
+		} else {
+			return ($result + 1) >> 1;
+		}
+	}
+
+	public function getWidth() {
+		return $this->width;
+	}
+
+	public function getHeight() {
+		return $this->height;
+	}
+}
Index: www/wp-includes/class-wp-image-editor-imagick.php
===================================================================
--- www/wp-includes/class-wp-image-editor-imagick.php	(revision 38565)
+++ www/wp-includes/autoload/image/WP_Image_Editor_Imagick.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-comment.php
===================================================================
--- www/wp-includes/class-wp-comment.php	(revision 38565)
+++ www/wp-includes/autoload/object/WP_Comment.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/includes/class-wp-upgrader-skin.php
===================================================================
--- www/wp-admin/includes/class-wp-upgrader-skin.php	(revision 38565)
+++ www/wp-admin/autoload/upgrader/WP_Upgrader_Skin.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/IXR/class-IXR-clientmulticall.php
===================================================================
--- www/wp-includes/IXR/class-IXR-clientmulticall.php	(revision 38565)
+++ www/wp-includes/autoload/ixr/IXR_ClientMulticall.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/Requests/Exception/HTTP/415.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/415.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_415.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-wp-network-query.php
===================================================================
--- www/wp-includes/class-wp-network-query.php	(revision 38565)
+++ www/wp-includes/autoload/query/WP_Network_Query.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/shortcodes.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/shortcodes.php	(revision 38565)
+++ www/wp-includes/shortcodes.php	(revision 38565)
@@ -1,632 +0,0 @@
-<?php
-/**
- * WordPress API for creating bbcode-like tags or what WordPress calls
- * "shortcodes". The tag and attribute parsing or regular expression code is
- * based on the Textpattern tag parser.
- *
- * A few examples are below:
- *
- * [shortcode /]
- * [shortcode foo="bar" baz="bing" /]
- * [shortcode foo="bar"]content[/shortcode]
- *
- * Shortcode tags support attributes and enclosed content, but does not entirely
- * support inline shortcodes in other shortcodes. You will have to call the
- * shortcode parser in your function to account for that.
- *
- * {@internal
- * Please be aware that the above note was made during the beta of WordPress 2.6
- * and in the future may not be accurate. Please update the note when it is no
- * longer the case.}}
- *
- * To apply shortcode tags to content:
- *
- *     $out = do_shortcode( $content );
- *
- * @link https://codex.wordpress.org/Shortcode_API
- *
- * @package WordPress
- * @subpackage Shortcodes
- * @since 2.5.0
- */
-
-/**
- * Container for storing shortcode tags and their hook to call for the shortcode
- *
- * @since 2.5.0
- *
- * @name $shortcode_tags
- * @var array
- * @global array $shortcode_tags
- */
-$shortcode_tags = array();
-
-/**
- * Add hook for shortcode tag.
- *
- * There can only be one hook for each shortcode. Which means that if another
- * plugin has a similar shortcode, it will override yours or yours will override
- * theirs depending on which order the plugins are included and/or ran.
- *
- * Simplest example of a shortcode tag using the API:
- *
- *     // [footag foo="bar"]
- *     function footag_func( $atts ) {
- *         return "foo = {
- *             $atts[foo]
- *         }";
- *     }
- *     add_shortcode( 'footag', 'footag_func' );
- *
- * Example with nice attribute defaults:
- *
- *     // [bartag foo="bar"]
- *     function bartag_func( $atts ) {
- *         $args = shortcode_atts( array(
- *             'foo' => 'no foo',
- *             'baz' => 'default baz',
- *         ), $atts );
- *
- *         return "foo = {$args['foo']}";
- *     }
- *     add_shortcode( 'bartag', 'bartag_func' );
- *
- * Example with enclosed content:
- *
- *     // [baztag]content[/baztag]
- *     function baztag_func( $atts, $content = '' ) {
- *         return "content = $content";
- *     }
- *     add_shortcode( 'baztag', 'baztag_func' );
- *
- * @since 2.5.0
- *
- * @global array $shortcode_tags
- *
- * @param string   $tag  Shortcode tag to be searched in post content.
- * @param callable $func Hook to run when shortcode is found.
- */
-function add_shortcode($tag, $func) {
-	global $shortcode_tags;
-
-	if ( '' == trim( $tag ) ) {
-		$message = __( 'Invalid shortcode name: Empty name given.' );
-		_doing_it_wrong( __FUNCTION__, $message, '4.4.0' );
-		return;
-	}
-
-	if ( 0 !== preg_match( '@[<>&/\[\]\x00-\x20=]@', $tag ) ) {
-		/* translators: 1: shortcode name, 2: space separated list of reserved characters */
-		$message = sprintf( __( 'Invalid shortcode name: %1$s. Do not use spaces or reserved characters: %2$s' ), $tag, '& / < > [ ] =' );
-		_doing_it_wrong( __FUNCTION__, $message, '4.4.0' );
-		return;
-	}
-
-	$shortcode_tags[ $tag ] = $func;
-}
-
-/**
- * Removes hook for shortcode.
- *
- * @since 2.5.0
- *
- * @global array $shortcode_tags
- *
- * @param string $tag Shortcode tag to remove hook for.
- */
-function remove_shortcode($tag) {
-	global $shortcode_tags;
-
-	unset($shortcode_tags[$tag]);
-}
-
-/**
- * Clear all shortcodes.
- *
- * This function is simple, it clears all of the shortcode tags by replacing the
- * shortcodes global by a empty array. This is actually a very efficient method
- * for removing all shortcodes.
- *
- * @since 2.5.0
- *
- * @global array $shortcode_tags
- */
-function remove_all_shortcodes() {
-	global $shortcode_tags;
-
-	$shortcode_tags = array();
-}
-
-/**
- * Whether a registered shortcode exists named $tag
- *
- * @since 3.6.0
- *
- * @global array $shortcode_tags List of shortcode tags and their callback hooks.
- *
- * @param string $tag Shortcode tag to check.
- * @return bool Whether the given shortcode exists.
- */
-function shortcode_exists( $tag ) {
-	global $shortcode_tags;
-	return array_key_exists( $tag, $shortcode_tags );
-}
-
-/**
- * Whether the passed content contains the specified shortcode
- *
- * @since 3.6.0
- *
- * @global array $shortcode_tags
- *
- * @param string $content Content to search for shortcodes.
- * @param string $tag     Shortcode tag to check.
- * @return bool Whether the passed content contains the given shortcode.
- */
-function has_shortcode( $content, $tag ) {
-	if ( false === strpos( $content, '[' ) ) {
-		return false;
-	}
-
-	if ( shortcode_exists( $tag ) ) {
-		preg_match_all( '/' . get_shortcode_regex() . '/', $content, $matches, PREG_SET_ORDER );
-		if ( empty( $matches ) )
-			return false;
-
-		foreach ( $matches as $shortcode ) {
-			if ( $tag === $shortcode[2] ) {
-				return true;
-			} elseif ( ! empty( $shortcode[5] ) && has_shortcode( $shortcode[5], $tag ) ) {
-				return true;
-			}
-		}
-	}
-	return false;
-}
-
-/**
- * Search content for shortcodes and filter shortcodes through their hooks.
- *
- * If there are no shortcode tags defined, then the content will be returned
- * without any filtering. This might cause issues when plugins are disabled but
- * the shortcode will still show up in the post or content.
- *
- * @since 2.5.0
- *
- * @global array $shortcode_tags List of shortcode tags and their callback hooks.
- *
- * @param string $content Content to search for shortcodes.
- * @param bool $ignore_html When true, shortcodes inside HTML elements will be skipped.
- * @return string Content with shortcodes filtered out.
- */
-function do_shortcode( $content, $ignore_html = false ) {
-	global $shortcode_tags;
-
-	if ( false === strpos( $content, '[' ) ) {
-		return $content;
-	}
-
-	if (empty($shortcode_tags) || !is_array($shortcode_tags))
-		return $content;
-
-	// Find all registered tag names in $content.
-	preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches );
-	$tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
-
-	if ( empty( $tagnames ) ) {
-		return $content;
-	}
-
-	$content = do_shortcodes_in_html_tags( $content, $ignore_html, $tagnames );
-
-	$pattern = get_shortcode_regex( $tagnames );
-	$content = preg_replace_callback( "/$pattern/", 'do_shortcode_tag', $content );
-
-	// Always restore square braces so we don't break things like <!--[if IE ]>
-	$content = unescape_invalid_shortcodes( $content );
-
-	return $content;
-}
-
-/**
- * Retrieve the shortcode regular expression for searching.
- *
- * The regular expression combines the shortcode tags in the regular expression
- * in a regex class.
- *
- * The regular expression contains 6 different sub matches to help with parsing.
- *
- * 1 - An extra [ to allow for escaping shortcodes with double [[]]
- * 2 - The shortcode name
- * 3 - The shortcode argument list
- * 4 - The self closing /
- * 5 - The content of a shortcode when it wraps some content.
- * 6 - An extra ] to allow for escaping shortcodes with double [[]]
- *
- * @since 2.5.0
- *
- * @global array $shortcode_tags
- *
- * @param array $tagnames List of shortcodes to find. Optional. Defaults to all registered shortcodes.
- * @return string The shortcode search regular expression
- */
-function get_shortcode_regex( $tagnames = null ) {
-	global $shortcode_tags;
-
-	if ( empty( $tagnames ) ) {
-		$tagnames = array_keys( $shortcode_tags );
-	}
-	$tagregexp = join( '|', array_map('preg_quote', $tagnames) );
-
-	// WARNING! Do not change this regex without changing do_shortcode_tag() and strip_shortcode_tag()
-	// Also, see shortcode_unautop() and shortcode.js.
-	return
-		  '\\['                              // Opening bracket
-		. '(\\[?)'                           // 1: Optional second opening bracket for escaping shortcodes: [[tag]]
-		. "($tagregexp)"                     // 2: Shortcode name
-		. '(?![\\w-])'                       // Not followed by word character or hyphen
-		. '('                                // 3: Unroll the loop: Inside the opening shortcode tag
-		.     '[^\\]\\/]*'                   // Not a closing bracket or forward slash
-		.     '(?:'
-		.         '\\/(?!\\])'               // A forward slash not followed by a closing bracket
-		.         '[^\\]\\/]*'               // Not a closing bracket or forward slash
-		.     ')*?'
-		. ')'
-		. '(?:'
-		.     '(\\/)'                        // 4: Self closing tag ...
-		.     '\\]'                          // ... and closing bracket
-		. '|'
-		.     '\\]'                          // Closing bracket
-		.     '(?:'
-		.         '('                        // 5: Unroll the loop: Optionally, anything between the opening and closing shortcode tags
-		.             '[^\\[]*+'             // Not an opening bracket
-		.             '(?:'
-		.                 '\\[(?!\\/\\2\\])' // An opening bracket not followed by the closing shortcode tag
-		.                 '[^\\[]*+'         // Not an opening bracket
-		.             ')*+'
-		.         ')'
-		.         '\\[\\/\\2\\]'             // Closing shortcode tag
-		.     ')?'
-		. ')'
-		. '(\\]?)';                          // 6: Optional second closing brocket for escaping shortcodes: [[tag]]
-}
-
-/**
- * Regular Expression callable for do_shortcode() for calling shortcode hook.
- * @see get_shortcode_regex for details of the match array contents.
- *
- * @since 2.5.0
- * @access private
- *
- * @global array $shortcode_tags
- *
- * @param array $m Regular expression match array
- * @return string|false False on failure.
- */
-function do_shortcode_tag( $m ) {
-	global $shortcode_tags;
-
-	// allow [[foo]] syntax for escaping a tag
-	if ( $m[1] == '[' && $m[6] == ']' ) {
-		return substr($m[0], 1, -1);
-	}
-
-	$tag = $m[2];
-	$attr = shortcode_parse_atts( $m[3] );
-
-	if ( ! is_callable( $shortcode_tags[ $tag ] ) ) {
-		/* translators: %s: shortcode tag */
-		$message = sprintf( __( 'Attempting to parse a shortcode without a valid callback: %s' ), $tag );
-		_doing_it_wrong( __FUNCTION__, $message, '4.3.0' );
-		return $m[0];
-	}
-
-	/**
-	 * Filters whether to call a shortcode callback.
-	 *
-	 * Passing a truthy value to the filter will effectively short-circuit the
-	 * shortcode generation process, returning that value instead.
-	 *
-	 * @since 4.7.0
-	 *
-	 * @param bool|string $return      Short-circuit return value. Either false or the value to replace the shortcode with.
-	 * @param string      $tag         Shortcode name.
-	 * @param array       $attr        Shortcode attributes array,
-	 * @param array       $m           Regular expression match array.
-	 */
-	$return = apply_filters( 'pre_do_shortcode_tag', false, $tag, $attr, $m );
-	if ( false !== $return ) {
-		return $return;
-	}
-
-	if ( isset( $m[5] ) ) {
-		// enclosing tag - extra parameter
-		return $m[1] . call_user_func( $shortcode_tags[$tag], $attr, $m[5], $tag ) . $m[6];
-	} else {
-		// self-closing tag
-		return $m[1] . call_user_func( $shortcode_tags[$tag], $attr, null,  $tag ) . $m[6];
-	}
-}
-
-/**
- * Search only inside HTML elements for shortcodes and process them.
- *
- * Any [ or ] characters remaining inside elements will be HTML encoded
- * to prevent interference with shortcodes that are outside the elements.
- * Assumes $content processed by KSES already.  Users with unfiltered_html
- * capability may get unexpected output if angle braces are nested in tags.
- *
- * @since 4.2.3
- *
- * @param string $content Content to search for shortcodes
- * @param bool $ignore_html When true, all square braces inside elements will be encoded.
- * @param array $tagnames List of shortcodes to find.
- * @return string Content with shortcodes filtered out.
- */
-function do_shortcodes_in_html_tags( $content, $ignore_html, $tagnames ) {
-	// Normalize entities in unfiltered HTML before adding placeholders.
-	$trans = array( '&#91;' => '&#091;', '&#93;' => '&#093;' );
-	$content = strtr( $content, $trans );
-	$trans = array( '[' => '&#91;', ']' => '&#93;' );
-
-	$pattern = get_shortcode_regex( $tagnames );
-	$textarr = wp_html_split( $content );
-
-	foreach ( $textarr as &$element ) {
-		if ( '' == $element || '<' !== $element[0] ) {
-			continue;
-		}
-
-		$noopen = false === strpos( $element, '[' );
-		$noclose = false === strpos( $element, ']' );
-		if ( $noopen || $noclose ) {
-			// This element does not contain shortcodes.
-			if ( $noopen xor $noclose ) {
-				// Need to encode stray [ or ] chars.
-				$element = strtr( $element, $trans );
-			}
-			continue;
-		}
-
-		if ( $ignore_html || '<!--' === substr( $element, 0, 4 ) || '<![CDATA[' === substr( $element, 0, 9 ) ) {
-			// Encode all [ and ] chars.
-			$element = strtr( $element, $trans );
-			continue;
-		}
-
-		$attributes = wp_kses_attr_parse( $element );
-		if ( false === $attributes ) {
-			// Some plugins are doing things like [name] <[email]>.
-			if ( 1 === preg_match( '%^<\s*\[\[?[^\[\]]+\]%', $element ) ) {
-				$element = preg_replace_callback( "/$pattern/", 'do_shortcode_tag', $element );
-			}
-
-			// Looks like we found some crazy unfiltered HTML.  Skipping it for sanity.
-			$element = strtr( $element, $trans );
-			continue;
-		}
-
-		// Get element name
-		$front = array_shift( $attributes );
-		$back = array_pop( $attributes );
-		$matches = array();
-		preg_match('%[a-zA-Z0-9]+%', $front, $matches);
-		$elname = $matches[0];
-
-		// Look for shortcodes in each attribute separately.
-		foreach ( $attributes as &$attr ) {
-			$open = strpos( $attr, '[' );
-			$close = strpos( $attr, ']' );
-			if ( false === $open || false === $close ) {
-				continue; // Go to next attribute.  Square braces will be escaped at end of loop.
-			}
-			$double = strpos( $attr, '"' );
-			$single = strpos( $attr, "'" );
-			if ( ( false === $single || $open < $single ) && ( false === $double || $open < $double ) ) {
-				// $attr like '[shortcode]' or 'name = [shortcode]' implies unfiltered_html.
-				// In this specific situation we assume KSES did not run because the input
-				// was written by an administrator, so we should avoid changing the output
-				// and we do not need to run KSES here.
-				$attr = preg_replace_callback( "/$pattern/", 'do_shortcode_tag', $attr );
-			} else {
-				// $attr like 'name = "[shortcode]"' or "name = '[shortcode]'"
-				// We do not know if $content was unfiltered. Assume KSES ran before shortcodes.
-				$count = 0;
-				$new_attr = preg_replace_callback( "/$pattern/", 'do_shortcode_tag', $attr, -1, $count );
-				if ( $count > 0 ) {
-					// Sanitize the shortcode output using KSES.
-					$new_attr = wp_kses_one_attr( $new_attr, $elname );
-					if ( '' !== trim( $new_attr ) ) {
-						// The shortcode is safe to use now.
-						$attr = $new_attr;
-					}
-				}
-			}
-		}
-		$element = $front . implode( '', $attributes ) . $back;
-
-		// Now encode any remaining [ or ] chars.
-		$element = strtr( $element, $trans );
-	}
-
-	$content = implode( '', $textarr );
-
-	return $content;
-}
-
-/**
- * Remove placeholders added by do_shortcodes_in_html_tags().
- *
- * @since 4.2.3
- *
- * @param string $content Content to search for placeholders.
- * @return string Content with placeholders removed.
- */
-function unescape_invalid_shortcodes( $content ) {
-        // Clean up entire string, avoids re-parsing HTML.
-        $trans = array( '&#91;' => '[', '&#93;' => ']' );
-        $content = strtr( $content, $trans );
-
-        return $content;
-}
-
-/**
- * Retrieve the shortcode attributes regex.
- *
- * @since 4.4.0
- *
- * @return string The shortcode attribute regular expression
- */
-function get_shortcode_atts_regex() {
-	return '/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*\'([^\']*)\'(?:\s|$)|([\w-]+)\s*=\s*([^\s\'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|(\S+)(?:\s|$)/';
-}
-
-/**
- * Retrieve all attributes from the shortcodes tag.
- *
- * The attributes list has the attribute name as the key and the value of the
- * attribute as the value in the key/value pair. This allows for easier
- * retrieval of the attributes, since all attributes have to be known.
- *
- * @since 2.5.0
- *
- * @param string $text
- * @return array|string List of attribute values.
- *                      Returns empty array if trim( $text ) == '""'.
- *                      Returns empty string if trim( $text ) == ''.
- *                      All other matches are checked for not empty().
- */
-function shortcode_parse_atts($text) {
-	$atts = array();
-	$pattern = get_shortcode_atts_regex();
-	$text = preg_replace("/[\x{00a0}\x{200b}]+/u", " ", $text);
-	if ( preg_match_all($pattern, $text, $match, PREG_SET_ORDER) ) {
-		foreach ($match as $m) {
-			if (!empty($m[1]))
-				$atts[strtolower($m[1])] = stripcslashes($m[2]);
-			elseif (!empty($m[3]))
-				$atts[strtolower($m[3])] = stripcslashes($m[4]);
-			elseif (!empty($m[5]))
-				$atts[strtolower($m[5])] = stripcslashes($m[6]);
-			elseif (isset($m[7]) && strlen($m[7]))
-				$atts[] = stripcslashes($m[7]);
-			elseif (isset($m[8]))
-				$atts[] = stripcslashes($m[8]);
-		}
-
-		// Reject any unclosed HTML elements
-		foreach( $atts as &$value ) {
-			if ( false !== strpos( $value, '<' ) ) {
-				if ( 1 !== preg_match( '/^[^<]*+(?:<[^>]*+>[^<]*+)*+$/', $value ) ) {
-					$value = '';
-				}
-			}
-		}
-	} else {
-		$atts = ltrim($text);
-	}
-	return $atts;
-}
-
-/**
- * Combine user attributes with known attributes and fill in defaults when needed.
- *
- * The pairs should be considered to be all of the attributes which are
- * supported by the caller and given as a list. The returned attributes will
- * only contain the attributes in the $pairs list.
- *
- * If the $atts list has unsupported attributes, then they will be ignored and
- * removed from the final returned list.
- *
- * @since 2.5.0
- *
- * @param array  $pairs     Entire list of supported attributes and their defaults.
- * @param array  $atts      User defined attributes in shortcode tag.
- * @param string $shortcode Optional. The name of the shortcode, provided for context to enable filtering
- * @return array Combined and filtered attribute list.
- */
-function shortcode_atts( $pairs, $atts, $shortcode = '' ) {
-	$atts = (array)$atts;
-	$out = array();
-	foreach ($pairs as $name => $default) {
-		if ( array_key_exists($name, $atts) )
-			$out[$name] = $atts[$name];
-		else
-			$out[$name] = $default;
-	}
-	/**
-	 * Filters a shortcode's default attributes.
-	 *
-	 * If the third parameter of the shortcode_atts() function is present then this filter is available.
-	 * The third parameter, $shortcode, is the name of the shortcode.
-	 *
-	 * @since 3.6.0
-	 * @since 4.4.0 Added the `$shortcode` parameter.
-	 *
-	 * @param array  $out       The output array of shortcode attributes.
-	 * @param array  $pairs     The supported attributes and their defaults.
-	 * @param array  $atts      The user defined shortcode attributes.
-	 * @param string $shortcode The shortcode name.
-	 */
-	if ( $shortcode ) {
-		$out = apply_filters( "shortcode_atts_{$shortcode}", $out, $pairs, $atts, $shortcode );
-	}
-
-	return $out;
-}
-
-/**
- * Remove all shortcode tags from the given content.
- *
- * @since 2.5.0
- *
- * @global array $shortcode_tags
- *
- * @param string $content Content to remove shortcode tags.
- * @return string Content without shortcode tags.
- */
-function strip_shortcodes( $content ) {
-	global $shortcode_tags;
-
-	if ( false === strpos( $content, '[' ) ) {
-		return $content;
-	}
-
-	if (empty($shortcode_tags) || !is_array($shortcode_tags))
-		return $content;
-
-	// Find all registered tag names in $content.
-	preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches );
-	$tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
-
-	if ( empty( $tagnames ) ) {
-		return $content;
-	}
-
-	$content = do_shortcodes_in_html_tags( $content, true, $tagnames );
-
-	$pattern = get_shortcode_regex( $tagnames );
-	$content = preg_replace_callback( "/$pattern/", 'strip_shortcode_tag', $content );
-
-	// Always restore square braces so we don't break things like <!--[if IE ]>
-	$content = unescape_invalid_shortcodes( $content );
-
-	return $content;
-}
-
-/**
- * Strips a shortcode tag based on RegEx matches against post content.
- *
- * @since 3.3.0
- *
- * @param array $m RegEx matches against post content.
- * @return string|false The content stripped of the tag, otherwise false.
- */
-function strip_shortcode_tag( $m ) {
-	// allow [[foo]] syntax for escaping a tag
-	if ( $m[1] == '[' && $m[6] == ']' ) {
-		return substr($m[0], 1, -1);
-	}
-
-	return $m[1] . $m[6];
-}
Index: www/wp-admin/admin-functions.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/admin-functions.php	(revision 38565)
+++ www/wp-admin/admin-functions.php	(revision 38565)
@@ -1,15 +0,0 @@
-<?php
-/**
- * Administration Functions
- *
- * This file is deprecated, use 'wp-admin/includes/admin.php' instead.
- *
- * @deprecated 2.5.0
- * @package WordPress
- * @subpackage Administration
- */
-
-_deprecated_file( basename(__FILE__), '2.5.0', 'wp-admin/includes/admin.php' );
-
-/** WordPress Administration API: Includes all Administration functions. */
-require_once(ABSPATH . 'wp-admin/includes/admin.php');
Index: www/wp-includes/SimplePie/IRI.php
===================================================================
--- www/wp-includes/SimplePie/IRI.php	(revision 38565)
+++ www/wp-includes/autoload/simplepie/SimplePie_IRI.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/includes/class-theme-upgrader.php
===================================================================
--- www/wp-admin/includes/class-theme-upgrader.php	(revision 38565)
+++ www/wp-admin/autoload/upgrader/Theme_Upgrader.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/category.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/category.php	(revision 38565)
+++ www/wp-includes/category.php	(revision 38565)
@@ -1,357 +0,0 @@
-<?php
-/**
- * Taxonomy API: Core category-specific functionality
- *
- * @package WordPress
- * @subpackage Taxonomy
- */
-
-/**
- * Retrieve list of category objects.
- *
- * If you change the type to 'link' in the arguments, then the link categories
- * will be returned instead. Also all categories will be updated to be backward
- * compatible with pre-2.3 plugins and themes.
- *
- * @since 2.1.0
- * @see get_terms() Type of arguments that can be changed.
- *
- * @param string|array $args {
- *     Optional. Arguments to retrieve categories. See get_terms() for additional options.
- *
- *     @type string $taxonomy Taxonomy to retrieve terms for. In this case, default 'category'.
- * }
- * @return array List of categories.
- */
-function get_categories( $args = '' ) {
-	$defaults = array( 'taxonomy' => 'category' );
-	$args = wp_parse_args( $args, $defaults );
-
-	$taxonomy = $args['taxonomy'];
-
-	/**
-	 * Filters the taxonomy used to retrieve terms when calling get_categories().
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param string $taxonomy Taxonomy to retrieve terms from.
-	 * @param array  $args     An array of arguments. See get_terms().
-	 */
-	$taxonomy = apply_filters( 'get_categories_taxonomy', $taxonomy, $args );
-
-	// Back compat
-	if ( isset($args['type']) && 'link' == $args['type'] ) {
-		/* translators: 1: "type => link", 2: "taxonomy => link_category" alternative */
-		_deprecated_argument( __FUNCTION__, '3.0.0',
-			sprintf( __( '%1$s is deprecated. Use %2$s instead.' ),
-				'<code>type => link</code>',
-				'<code>taxonomy => link_category</code>'
-			)
-		);
-		$taxonomy = $args['taxonomy'] = 'link_category';
-	}
-
-	$categories = get_terms( $taxonomy, $args );
-
-	if ( is_wp_error( $categories ) ) {
-		$categories = array();
-	} else {
-		$categories = (array) $categories;
-		foreach ( array_keys( $categories ) as $k ) {
-			_make_cat_compat( $categories[ $k ] );
-		}
-	}
-
-	return $categories;
-}
-
-/**
- * Retrieves category data given a category ID or category object.
- *
- * If you pass the $category parameter an object, which is assumed to be the
- * category row object retrieved the database. It will cache the category data.
- *
- * If you pass $category an integer of the category ID, then that category will
- * be retrieved from the database, if it isn't already cached, and pass it back.
- *
- * If you look at get_term(), then both types will be passed through several
- * filters and finally sanitized based on the $filter parameter value.
- *
- * The category will converted to maintain backward compatibility.
- *
- * @since 1.5.1
- *
- * @param int|object $category Category ID or Category row object
- * @param string $output Optional. Constant OBJECT, ARRAY_A, or ARRAY_N
- * @param string $filter Optional. Default is raw or no WordPress defined filter will applied.
- * @return object|array|WP_Error|null Category data in type defined by $output parameter.
- *                                    WP_Error if $category is empty, null if it does not exist.
- */
-function get_category( $category, $output = OBJECT, $filter = 'raw' ) {
-	$category = get_term( $category, 'category', $output, $filter );
-
-	if ( is_wp_error( $category ) )
-		return $category;
-
-	_make_cat_compat( $category );
-
-	return $category;
-}
-
-/**
- * Retrieve category based on URL containing the category slug.
- *
- * Breaks the $category_path parameter up to get the category slug.
- *
- * Tries to find the child path and will return it. If it doesn't find a
- * match, then it will return the first category matching slug, if $full_match,
- * is set to false. If it does not, then it will return null.
- *
- * It is also possible that it will return a WP_Error object on failure. Check
- * for it when using this function.
- *
- * @since 2.1.0
- *
- * @param string $category_path URL containing category slugs.
- * @param bool $full_match Optional. Whether full path should be matched.
- * @param string $output Optional. Constant OBJECT, ARRAY_A, or ARRAY_N
- * @return object|array|WP_Error|void Type is based on $output value.
- */
-function get_category_by_path( $category_path, $full_match = true, $output = OBJECT ) {
-	$category_path = rawurlencode( urldecode( $category_path ) );
-	$category_path = str_replace( '%2F', '/', $category_path );
-	$category_path = str_replace( '%20', ' ', $category_path );
-	$category_paths = '/' . trim( $category_path, '/' );
-	$leaf_path  = sanitize_title( basename( $category_paths ) );
-	$category_paths = explode( '/', $category_paths );
-	$full_path = '';
-	foreach ( (array) $category_paths as $pathdir ) {
-		$full_path .= ( $pathdir != '' ? '/' : '' ) . sanitize_title( $pathdir );
-	}
-	$categories = get_terms( 'category', array('get' => 'all', 'slug' => $leaf_path) );
-
-	if ( empty( $categories ) ) {
-		return;
-	}
-
-	foreach ( $categories as $category ) {
-		$path = '/' . $leaf_path;
-		$curcategory = $category;
-		while ( ( $curcategory->parent != 0 ) && ( $curcategory->parent != $curcategory->term_id ) ) {
-			$curcategory = get_term( $curcategory->parent, 'category' );
-			if ( is_wp_error( $curcategory ) ) {
-				return $curcategory;
-			}
-			$path = '/' . $curcategory->slug . $path;
-		}
-
-		if ( $path == $full_path ) {
-			$category = get_term( $category->term_id, 'category', $output );
-			_make_cat_compat( $category );
-			return $category;
-		}
-	}
-
-	// If full matching is not required, return the first cat that matches the leaf.
-	if ( ! $full_match ) {
-		$category = get_term( reset( $categories )->term_id, 'category', $output );
-		_make_cat_compat( $category );
-		return $category;
-	}
-}
-
-/**
- * Retrieve category object by category slug.
- *
- * @since 2.3.0
- *
- * @param string $slug The category slug.
- * @return object Category data object
- */
-function get_category_by_slug( $slug  ) {
-	$category = get_term_by( 'slug', $slug, 'category' );
-	if ( $category )
-		_make_cat_compat( $category );
-
-	return $category;
-}
-
-/**
- * Retrieve the ID of a category from its name.
- *
- * @since 1.0.0
- *
- * @param string $cat_name Category name.
- * @return int 0, if failure and ID of category on success.
- */
-function get_cat_ID( $cat_name ) {
-	$cat = get_term_by( 'name', $cat_name, 'category' );
-	if ( $cat )
-		return $cat->term_id;
-	return 0;
-}
-
-/**
- * Retrieve the name of a category from its ID.
- *
- * @since 1.0.0
- *
- * @param int $cat_id Category ID
- * @return string Category name, or an empty string if category doesn't exist.
- */
-function get_cat_name( $cat_id ) {
-	$cat_id = (int) $cat_id;
-	$category = get_term( $cat_id, 'category' );
-	if ( ! $category || is_wp_error( $category ) )
-		return '';
-	return $category->name;
-}
-
-/**
- * Check if a category is an ancestor of another category.
- *
- * You can use either an id or the category object for both parameters. If you
- * use an integer the category will be retrieved.
- *
- * @since 2.1.0
- *
- * @param int|object $cat1 ID or object to check if this is the parent category.
- * @param int|object $cat2 The child category.
- * @return bool Whether $cat2 is child of $cat1
- */
-function cat_is_ancestor_of( $cat1, $cat2 ) {
-	return term_is_ancestor_of( $cat1, $cat2, 'category' );
-}
-
-/**
- * Sanitizes category data based on context.
- *
- * @since 2.3.0
- *
- * @param object|array $category Category data
- * @param string $context Optional. Default is 'display'.
- * @return object|array Same type as $category with sanitized data for safe use.
- */
-function sanitize_category( $category, $context = 'display' ) {
-	return sanitize_term( $category, 'category', $context );
-}
-
-/**
- * Sanitizes data in single category key field.
- *
- * @since 2.3.0
- *
- * @param string $field Category key to sanitize
- * @param mixed $value Category value to sanitize
- * @param int $cat_id Category ID
- * @param string $context What filter to use, 'raw', 'display', etc.
- * @return mixed Same type as $value after $value has been sanitized.
- */
-function sanitize_category_field( $field, $value, $cat_id, $context ) {
-	return sanitize_term_field( $field, $value, $cat_id, 'category', $context );
-}
-
-/* Tags */
-
-/**
- * Retrieves all post tags.
- *
- * @since 2.3.0
- * @see get_terms() For list of arguments to pass.
- *
- * @param string|array $args Tag arguments to use when retrieving tags.
- * @return array List of tags.
- */
-function get_tags( $args = '' ) {
-	$tags = get_terms( 'post_tag', $args );
-
-	if ( empty( $tags ) ) {
-		$return = array();
-		return $return;
-	}
-
-	/**
-	 * Filters the array of term objects returned for the 'post_tag' taxonomy.
-	 *
-	 * @since 2.3.0
-	 *
-	 * @param array $tags Array of 'post_tag' term objects.
-	 * @param array $args An array of arguments. @see get_terms()
-	 */
-	$tags = apply_filters( 'get_tags', $tags, $args );
-	return $tags;
-}
-
-/**
- * Retrieve post tag by tag ID or tag object.
- *
- * If you pass the $tag parameter an object, which is assumed to be the tag row
- * object retrieved the database. It will cache the tag data.
- *
- * If you pass $tag an integer of the tag ID, then that tag will
- * be retrieved from the database, if it isn't already cached, and pass it back.
- *
- * If you look at get_term(), then both types will be passed through several
- * filters and finally sanitized based on the $filter parameter value.
- *
- * @since 2.3.0
- *
- * @param int|object $tag
- * @param string $output Optional. Constant OBJECT, ARRAY_A, or ARRAY_N
- * @param string $filter Optional. Default is raw or no WordPress defined filter will applied.
- * @return object|array|WP_Error|null Tag data in type defined by $output parameter. WP_Error if $tag is empty, null if it does not exist.
- */
-function get_tag( $tag, $output = OBJECT, $filter = 'raw' ) {
-	return get_term( $tag, 'post_tag', $output, $filter );
-}
-
-/* Cache */
-
-/**
- * Remove the category cache data based on ID.
- *
- * @since 2.1.0
- *
- * @param int $id Category ID
- */
-function clean_category_cache( $id ) {
-	clean_term_cache( $id, 'category' );
-}
-
-/**
- * Update category structure to old pre 2.3 from new taxonomy structure.
- *
- * This function was added for the taxonomy support to update the new category
- * structure with the old category one. This will maintain compatibility with
- * plugins and themes which depend on the old key or property names.
- *
- * The parameter should only be passed a variable and not create the array or
- * object inline to the parameter. The reason for this is that parameter is
- * passed by reference and PHP will fail unless it has the variable.
- *
- * There is no return value, because everything is updated on the variable you
- * pass to it. This is one of the features with using pass by reference in PHP.
- *
- * @since 2.3.0
- * @since 4.4.0 The `$category` parameter now also accepts a WP_Term object.
- * @access private
- *
- * @param array|object|WP_Term $category Category Row object or array
- */
-function _make_cat_compat( &$category ) {
-	if ( is_object( $category ) && ! is_wp_error( $category ) ) {
-		$category->cat_ID = $category->term_id;
-		$category->category_count = $category->count;
-		$category->category_description = $category->description;
-		$category->cat_name = $category->name;
-		$category->category_nicename = $category->slug;
-		$category->category_parent = $category->parent;
-	} elseif ( is_array( $category ) && isset( $category['term_id'] ) ) {
-		$category['cat_ID'] = &$category['term_id'];
-		$category['category_count'] = &$category['count'];
-		$category['category_description'] = &$category['description'];
-		$category['cat_name'] = &$category['name'];
-		$category['category_nicename'] = &$category['slug'];
-		$category['category_parent'] = &$category['parent'];
-	}
-}
Index: www/wp-admin/ms-options.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/ms-options.php	(revision 38565)
+++ www/wp-admin/ms-options.php	(revision 38565)
@@ -1,12 +0,0 @@
-<?php
-/**
- * Multisite network settings administration panel.
- *
- * @package WordPress
- * @subpackage Multisite
- * @since 3.0.0
- */
-
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-wp_redirect( network_admin_url('settings.php') );
Index: www/wp-admin/edit-link-form.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/edit-link-form.php	(revision 38565)
+++ www/wp-admin/edit-link-form.php	(revision 38565)
@@ -1,150 +0,0 @@
-<?php
-/**
- * Edit links form for inclusion in administration panels.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-// don't load directly
-if ( !defined('ABSPATH') )
-	die('-1');
-
-if ( ! empty($link_id) ) {
-	$heading = sprintf( __( '<a href="%s">Links</a> / Edit Link' ), 'link-manager.php' );
-	$submit_text = __('Update Link');
-	$form_name = 'editlink';
-	$nonce_action = 'update-bookmark_' . $link_id;
-} else {
-	$heading = sprintf( __( '<a href="%s">Links</a> / Add New Link' ), 'link-manager.php' );
-	$submit_text = __('Add Link');
-	$form_name = 'addlink';
-	$nonce_action = 'add-bookmark';
-}
-
-require_once( ABSPATH . 'wp-admin/includes/meta-boxes.php' );
-
-add_meta_box('linksubmitdiv', __('Save'), 'link_submit_meta_box', null, 'side', 'core');
-add_meta_box('linkcategorydiv', __('Categories'), 'link_categories_meta_box', null, 'normal', 'core');
-add_meta_box('linktargetdiv', __('Target'), 'link_target_meta_box', null, 'normal', 'core');
-add_meta_box('linkxfndiv', __('Link Relationship (XFN)'), 'link_xfn_meta_box', null, 'normal', 'core');
-add_meta_box('linkadvanceddiv', __('Advanced'), 'link_advanced_meta_box', null, 'normal', 'core');
-
-/** This action is documented in wp-admin/edit-form-advanced.php */
-do_action( 'add_meta_boxes', 'link', $link );
-
-/**
- * Fires when link-specific meta boxes are added.
- *
- * @since 3.0.0
- *
- * @param object $link Link object.
- */
-do_action( 'add_meta_boxes_link', $link );
-
-/** This action is documented in wp-admin/edit-form-advanced.php */
-do_action( 'do_meta_boxes', 'link', 'normal', $link );
-/** This action is documented in wp-admin/edit-form-advanced.php */
-do_action( 'do_meta_boxes', 'link', 'advanced', $link );
-/** This action is documented in wp-admin/edit-form-advanced.php */
-do_action( 'do_meta_boxes', 'link', 'side', $link );
-
-add_screen_option('layout_columns', array('max' => 2, 'default' => 2) );
-
-get_current_screen()->add_help_tab( array(
-	'id'      => 'overview',
-	'title'   => __('Overview'),
-	'content' =>
-	'<p>' . __( 'You can add or edit links on this screen by entering information in each of the boxes. Only the link&#8217;s web address and name (the text you want to display on your site as the link) are required fields.' ) . '</p>' .
-	'<p>' . __( 'The boxes for link name, web address, and description have fixed positions, while the others may be repositioned using drag and drop. You can also hide boxes you don&#8217;t use in the Screen Options tab, or minimize boxes by clicking on the title bar of the box.' ) . '</p>' .
-	'<p>' . __( 'XFN stands for <a href="http://gmpg.org/xfn/" target="_blank">XHTML Friends Network</a>, which is optional. WordPress allows the generation of XFN attributes to show how you are related to the authors/owners of the site to which you are linking.' ) . '</p>'
-) );
-
-get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
-	'<p>' . __( '<a href="https://codex.wordpress.org/Links_Add_New_Screen" target="_blank">Documentation on Creating Links</a>' ) . '</p>' .
-	'<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
-);
-
-require_once( ABSPATH . 'wp-admin/admin-header.php' );
-?>
-
-<div class="wrap">
-<h1><?php echo esc_html( $title ); ?>  <a href="link-add.php" class="page-title-action"><?php echo esc_html_x('Add New', 'link'); ?></a></h1>
-
-<?php if ( isset( $_GET['added'] ) ) : ?>
-<div id="message" class="updated notice is-dismissible"><p><?php _e('Link added.'); ?></p></div>
-<?php endif; ?>
-
-<form name="<?php echo esc_attr( $form_name ); ?>" id="<?php echo esc_attr( $form_name ); ?>" method="post" action="link.php">
-<?php
-if ( ! empty( $link_added ) ) {
-	echo $link_added;
-}
-
-wp_nonce_field( $nonce_action );
-wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
-wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
-
-<div id="poststuff">
-
-<div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
-<div id="post-body-content">
-<div id="namediv" class="stuffbox">
-<h2><label for="link_name"><?php _ex( 'Name', 'link name' ) ?></label></h2>
-<div class="inside">
-	<input type="text" name="link_name" size="30" maxlength="255" value="<?php echo esc_attr($link->link_name); ?>" id="link_name" />
-	<p><?php _e('Example: Nifty blogging software'); ?></p>
-</div>
-</div>
-
-<div id="addressdiv" class="stuffbox">
-<h2><label for="link_url"><?php _e( 'Web Address' ) ?></label></h2>
-<div class="inside">
-	<input type="text" name="link_url" size="30" maxlength="255" class="code" value="<?php echo esc_attr($link->link_url); ?>" id="link_url" />
-	<p><?php _e('Example: <code>http://wordpress.org/</code> &#8212; don&#8217;t forget the <code>http://</code>'); ?></p>
-</div>
-</div>
-
-<div id="descriptiondiv" class="stuffbox">
-<h2><label for="link_description"><?php _e( 'Description' ) ?></label></h2>
-<div class="inside">
-	<input type="text" name="link_description" size="30" maxlength="255" value="<?php echo isset($link->link_description) ? esc_attr($link->link_description) : ''; ?>" id="link_description" />
-	<p><?php _e('This will be shown when someone hovers over the link in the blogroll, or optionally below the link.'); ?></p>
-</div>
-</div>
-</div><!-- /post-body-content -->
-
-<div id="postbox-container-1" class="postbox-container">
-<?php
-
-/** This action is documented in wp-admin/includes/meta-boxes.php */
-do_action( 'submitlink_box' );
-$side_meta_boxes = do_meta_boxes( 'link', 'side', $link );
-
-?>
-</div>
-<div id="postbox-container-2" class="postbox-container">
-<?php
-
-do_meta_boxes(null, 'normal', $link);
-
-do_meta_boxes(null, 'advanced', $link);
-
-?>
-</div>
-<?php
-
-if ( $link_id ) : ?>
-<input type="hidden" name="action" value="save" />
-<input type="hidden" name="link_id" value="<?php echo (int) $link_id; ?>" />
-<input type="hidden" name="cat_id" value="<?php echo (int) $cat_id ?>" />
-<?php else: ?>
-<input type="hidden" name="action" value="add" />
-<?php endif; ?>
-
-</div>
-</div>
-
-</form>
-</div>
Index: www/wp-includes/class.wp-dependencies.php
===================================================================
--- www/wp-includes/class.wp-dependencies.php	(revision 38565)
+++ www/wp-includes/autoload/dependency/WP_Dependencies.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/class-walker-page-dropdown.php
===================================================================
--- www/wp-includes/class-walker-page-dropdown.php	(revision 38565)
+++ www/wp-includes/autoload/walker/Walker_PageDropdown.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/ms-admin.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/ms-admin.php	(revision 38565)
+++ www/wp-admin/ms-admin.php	(revision 38565)
@@ -1,13 +0,0 @@
-<?php
-/**
- * Multisite administration panel.
- *
- * @package WordPress
- * @subpackage Multisite
- * @since 3.0.0
- */
-
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-wp_redirect( network_admin_url() );
-exit;
Index: www/wp-includes/random_compat/random_int.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/random_compat/random_int.php	(revision 38565)
+++ www/wp-includes/random_compat/random_int.php	(revision 38565)
@@ -1,191 +0,0 @@
-<?php
-/**
- * Random_* Compatibility Library 
- * for using the new PHP 7 random_* API in PHP 5 projects
- * 
- * The MIT License (MIT)
- * 
- * Copyright (c) 2015 Paragon Initiative Enterprises
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/**
- * Fetch a random integer between $min and $max inclusive
- * 
- * @param int $min
- * @param int $max
- * 
- * @throws Exception
- * 
- * @return int
- */
-function random_int($min, $max)
-{
-    /**
-     * Type and input logic checks
-     * 
-     * If you pass it a float in the range (~PHP_INT_MAX, PHP_INT_MAX)
-     * (non-inclusive), it will sanely cast it to an int. If you it's equal to
-     * ~PHP_INT_MAX or PHP_INT_MAX, we let it fail as not an integer. Floats 
-     * lose precision, so the <= and => operators might accidentally let a float
-     * through.
-     */
-    
-    try {
-        $min = RandomCompat_intval($min);
-    } catch (TypeError $ex) {
-        throw new TypeError(
-            'random_int(): $min must be an integer'
-        );
-    }
-
-    try {
-        $max = RandomCompat_intval($max);
-    } catch (TypeError $ex) {
-        throw new TypeError(
-            'random_int(): $max must be an integer'
-        );
-    }
-    
-    /**
-     * Now that we've verified our weak typing system has given us an integer,
-     * let's validate the logic then we can move forward with generating random
-     * integers along a given range.
-     */
-    if ($min > $max) {
-        throw new Error(
-            'Minimum value must be less than or equal to the maximum value'
-        );
-    }
-
-    if ($max === $min) {
-        return $min;
-    }
-
-    /**
-     * Initialize variables to 0
-     * 
-     * We want to store:
-     * $bytes => the number of random bytes we need
-     * $mask => an integer bitmask (for use with the &) operator
-     *          so we can minimize the number of discards
-     */
-    $attempts = $bits = $bytes = $mask = $valueShift = 0;
-
-    /**
-     * At this point, $range is a positive number greater than 0. It might
-     * overflow, however, if $max - $min > PHP_INT_MAX. PHP will cast it to
-     * a float and we will lose some precision.
-     */
-    $range = $max - $min;
-
-    /**
-     * Test for integer overflow:
-     */
-    if (!is_int($range)) {
-
-        /**
-         * Still safely calculate wider ranges.
-         * Provided by @CodesInChaos, @oittaa
-         * 
-         * @ref https://gist.github.com/CodesInChaos/03f9ea0b58e8b2b8d435
-         * 
-         * We use ~0 as a mask in this case because it generates all 1s
-         * 
-         * @ref https://eval.in/400356 (32-bit)
-         * @ref http://3v4l.org/XX9r5  (64-bit)
-         */
-        $bytes = PHP_INT_SIZE;
-        $mask = ~0;
-
-    } else {
-
-        /**
-         * $bits is effectively ceil(log($range, 2)) without dealing with 
-         * type juggling
-         */
-        while ($range > 0) {
-            if ($bits % 8 === 0) {
-               ++$bytes;
-            }
-            ++$bits;
-            $range >>= 1;
-            $mask = $mask << 1 | 1;
-        }
-        $valueShift = $min;
-    }
-
-    /**
-     * Now that we have our parameters set up, let's begin generating
-     * random integers until one falls between $min and $max
-     */
-    do {
-        /**
-         * The rejection probability is at most 0.5, so this corresponds
-         * to a failure probability of 2^-128 for a working RNG
-         */
-        if ($attempts > 128) {
-            throw new Exception(
-                'random_int: RNG is broken - too many rejections'
-            );
-        }
-
-        /**
-         * Let's grab the necessary number of random bytes
-         */
-        $randomByteString = random_bytes($bytes);
-        if ($randomByteString === false) {
-            throw new Exception(
-                'Random number generator failure'
-            );
-        }
-
-        /**
-         * Let's turn $randomByteString into an integer
-         * 
-         * This uses bitwise operators (<< and |) to build an integer
-         * out of the values extracted from ord()
-         * 
-         * Example: [9F] | [6D] | [32] | [0C] =>
-         *   159 + 27904 + 3276800 + 201326592 =>
-         *   204631455
-         */
-        $val = 0;
-        for ($i = 0; $i < $bytes; ++$i) {
-            $val |= ord($randomByteString[$i]) << ($i * 8);
-        }
-
-        /**
-         * Apply mask
-         */
-        $val &= $mask;
-        $val += $valueShift;
-
-        ++$attempts;
-        /**
-         * If $val overflows to a floating point number,
-         * ... or is larger than $max,
-         * ... or smaller than $min,
-         * then try again.
-         */
-    } while (!is_int($val) || $val > $max || $val < $min);
-
-    return (int) $val;
-}
Index: www/wp-includes/Requests/Exception/HTTP/404.php
===================================================================
--- www/wp-includes/Requests/Exception/HTTP/404.php	(revision 38565)
+++ www/wp-includes/autoload/requests/Requests_Exception_HTTP_404.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-includes/embed.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/embed.php	(revision 38565)
+++ www/wp-includes/embed.php	(revision 38565)
@@ -1,1087 +0,0 @@
-<?php
-/**
- * oEmbed API: Top-level oEmbed functionality
- *
- * @package WordPress
- * @subpackage oEmbed
- * @since 4.4.0
- */
-
-/**
- * Registers an embed handler.
- *
- * Should probably only be used for sites that do not support oEmbed.
- *
- * @since 2.9.0
- *
- * @global WP_Embed $wp_embed
- *
- * @param string   $id       An internal ID/name for the handler. Needs to be unique.
- * @param string   $regex    The regex that will be used to see if this handler should be used for a URL.
- * @param callable $callback The callback function that will be called if the regex is matched.
- * @param int      $priority Optional. Used to specify the order in which the registered handlers will
- *                           be tested. Default 10.
- */
-function wp_embed_register_handler( $id, $regex, $callback, $priority = 10 ) {
-	global $wp_embed;
-	$wp_embed->register_handler( $id, $regex, $callback, $priority );
-}
-
-/**
- * Unregisters a previously-registered embed handler.
- *
- * @since 2.9.0
- *
- * @global WP_Embed $wp_embed
- *
- * @param string $id       The handler ID that should be removed.
- * @param int    $priority Optional. The priority of the handler to be removed. Default 10.
- */
-function wp_embed_unregister_handler( $id, $priority = 10 ) {
-	global $wp_embed;
-	$wp_embed->unregister_handler( $id, $priority );
-}
-
-/**
- * Creates default array of embed parameters.
- *
- * The width defaults to the content width as specified by the theme. If the
- * theme does not specify a content width, then 500px is used.
- *
- * The default height is 1.5 times the width, or 1000px, whichever is smaller.
- *
- * The {@see 'embed_defaults'} filter can be used to adjust either of these values.
- *
- * @since 2.9.0
- *
- * @global int $content_width
- *
- * @param string $url Optional. The URL that should be embedded. Default empty.
- *
- * @return array Default embed parameters.
- */
-function wp_embed_defaults( $url = '' ) {
-	if ( ! empty( $GLOBALS['content_width'] ) )
-		$width = (int) $GLOBALS['content_width'];
-
-	if ( empty( $width ) )
-		$width = 500;
-
-	$height = min( ceil( $width * 1.5 ), 1000 );
-
-	/**
-	 * Filters the default array of embed dimensions.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param array  $size An array of embed width and height values
-	 *                     in pixels (in that order).
-	 * @param string $url  The URL that should be embedded.
-	 */
-	return apply_filters( 'embed_defaults', compact( 'width', 'height' ), $url );
-}
-
-/**
- * Attempts to fetch the embed HTML for a provided URL using oEmbed.
- *
- * @since 2.9.0
- *
- * @see WP_oEmbed
- *
- * @param string $url  The URL that should be embedded.
- * @param array  $args Optional. Additional arguments and parameters for retrieving embed HTML.
- *                     Default empty.
- * @return false|string False on failure or the embed HTML on success.
- */
-function wp_oembed_get( $url, $args = '' ) {
-	$oembed = _wp_oembed_get_object();
-	return $oembed->get_html( $url, $args );
-}
-
-/**
- * Returns the initialized WP_oEmbed object.
- *
- * @since 2.9.0
- * @access private
- *
- * @staticvar WP_oEmbed $wp_oembed
- *
- * @return WP_oEmbed object.
- */
-function _wp_oembed_get_object() {
-	static $wp_oembed = null;
-
-	if ( is_null( $wp_oembed ) ) {
-		$wp_oembed = new WP_oEmbed();
-	}
-	return $wp_oembed;
-}
-
-/**
- * Adds a URL format and oEmbed provider URL pair.
- *
- * @since 2.9.0
- *
- * @see WP_oEmbed
- *
- * @param string  $format   The format of URL that this provider can handle. You can use asterisks
- *                          as wildcards.
- * @param string  $provider The URL to the oEmbed provider.
- * @param boolean $regex    Optional. Whether the `$format` parameter is in a RegEx format. Default false.
- */
-function wp_oembed_add_provider( $format, $provider, $regex = false ) {
-	if ( did_action( 'plugins_loaded' ) ) {
-		$oembed = _wp_oembed_get_object();
-		$oembed->providers[$format] = array( $provider, $regex );
-	} else {
-		WP_oEmbed::_add_provider_early( $format, $provider, $regex );
-	}
-}
-
-/**
- * Removes an oEmbed provider.
- *
- * @since 3.5.0
- *
- * @see WP_oEmbed
- *
- * @param string $format The URL format for the oEmbed provider to remove.
- * @return bool Was the provider removed successfully?
- */
-function wp_oembed_remove_provider( $format ) {
-	if ( did_action( 'plugins_loaded' ) ) {
-		$oembed = _wp_oembed_get_object();
-
-		if ( isset( $oembed->providers[ $format ] ) ) {
-			unset( $oembed->providers[ $format ] );
-			return true;
-		}
-	} else {
-		WP_oEmbed::_remove_provider_early( $format );
-	}
-
-	return false;
-}
-
-/**
- * Determines if default embed handlers should be loaded.
- *
- * Checks to make sure that the embeds library hasn't already been loaded. If
- * it hasn't, then it will load the embeds library.
- *
- * @since 2.9.0
- *
- * @see wp_embed_register_handler()
- */
-function wp_maybe_load_embeds() {
-	/**
-	 * Filters whether to load the default embed handlers.
-	 *
-	 * Returning a falsey value will prevent loading the default embed handlers.
-	 *
-	 * @since 2.9.0
-	 *
-	 * @param bool $maybe_load_embeds Whether to load the embeds library. Default true.
-	 */
-	if ( ! apply_filters( 'load_default_embeds', true ) ) {
-		return;
-	}
-
-	wp_embed_register_handler( 'youtube_embed_url', '#https?://(www.)?youtube\.com/(?:v|embed)/([^/]+)#i', 'wp_embed_handler_youtube' );
-
-	/**
-	 * Filters the audio embed handler callback.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param callable $handler Audio embed handler callback function.
-	 */
-	wp_embed_register_handler( 'audio', '#^https?://.+?\.(' . join( '|', wp_get_audio_extensions() ) . ')$#i', apply_filters( 'wp_audio_embed_handler', 'wp_embed_handler_audio' ), 9999 );
-
-	/**
-	 * Filters the video embed handler callback.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param callable $handler Video embed handler callback function.
-	 */
-	wp_embed_register_handler( 'video', '#^https?://.+?\.(' . join( '|', wp_get_video_extensions() ) . ')$#i', apply_filters( 'wp_video_embed_handler', 'wp_embed_handler_video' ), 9999 );
-}
-
-/**
- * YouTube iframe embed handler callback.
- *
- * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
- *
- * @since 4.0.0
- *
- * @global WP_Embed $wp_embed
- *
- * @param array  $matches The RegEx matches from the provided regex when calling
- *                        wp_embed_register_handler().
- * @param array  $attr    Embed attributes.
- * @param string $url     The original URL that was matched by the regex.
- * @param array  $rawattr The original unmodified attributes.
- * @return string The embed HTML.
- */
-function wp_embed_handler_youtube( $matches, $attr, $url, $rawattr ) {
-	global $wp_embed;
-	$embed = $wp_embed->autoembed( "https://youtube.com/watch?v={$matches[2]}" );
-
-	/**
-	 * Filters the YoutTube embed output.
-	 *
-	 * @since 4.0.0
-	 *
-	 * @see wp_embed_handler_youtube()
-	 *
-	 * @param string $embed   YouTube embed output.
-	 * @param array  $attr    An array of embed attributes.
-	 * @param string $url     The original URL that was matched by the regex.
-	 * @param array  $rawattr The original unmodified attributes.
-	 */
-	return apply_filters( 'wp_embed_handler_youtube', $embed, $attr, $url, $rawattr );
-}
-
-/**
- * Audio embed handler callback.
- *
- * @since 3.6.0
- *
- * @param array  $matches The RegEx matches from the provided regex when calling wp_embed_register_handler().
- * @param array  $attr Embed attributes.
- * @param string $url The original URL that was matched by the regex.
- * @param array  $rawattr The original unmodified attributes.
- * @return string The embed HTML.
- */
-function wp_embed_handler_audio( $matches, $attr, $url, $rawattr ) {
-	$audio = sprintf( '[audio src="%s" /]', esc_url( $url ) );
-
-	/**
-	 * Filters the audio embed output.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param string $audio   Audio embed output.
-	 * @param array  $attr    An array of embed attributes.
-	 * @param string $url     The original URL that was matched by the regex.
-	 * @param array  $rawattr The original unmodified attributes.
-	 */
-	return apply_filters( 'wp_embed_handler_audio', $audio, $attr, $url, $rawattr );
-}
-
-/**
- * Video embed handler callback.
- *
- * @since 3.6.0
- *
- * @param array  $matches The RegEx matches from the provided regex when calling wp_embed_register_handler().
- * @param array  $attr    Embed attributes.
- * @param string $url     The original URL that was matched by the regex.
- * @param array  $rawattr The original unmodified attributes.
- * @return string The embed HTML.
- */
-function wp_embed_handler_video( $matches, $attr, $url, $rawattr ) {
-	$dimensions = '';
-	if ( ! empty( $rawattr['width'] ) && ! empty( $rawattr['height'] ) ) {
-		$dimensions .= sprintf( 'width="%d" ', (int) $rawattr['width'] );
-		$dimensions .= sprintf( 'height="%d" ', (int) $rawattr['height'] );
-	}
-	$video = sprintf( '[video %s src="%s" /]', $dimensions, esc_url( $url ) );
-
-	/**
-	 * Filters the video embed output.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param string $video   Video embed output.
-	 * @param array  $attr    An array of embed attributes.
-	 * @param string $url     The original URL that was matched by the regex.
-	 * @param array  $rawattr The original unmodified attributes.
-	 */
-	return apply_filters( 'wp_embed_handler_video', $video, $attr, $url, $rawattr );
-}
-
-/**
- * Registers the oEmbed REST API route.
- *
- * @since 4.4.0
- */
-function wp_oembed_register_route() {
-	$controller = new WP_oEmbed_Controller();
-	$controller->register_routes();
-}
-
-/**
- * Adds oEmbed discovery links in the website <head>.
- *
- * @since 4.4.0
- */
-function wp_oembed_add_discovery_links() {
-	$output = '';
-
-	if ( is_singular() ) {
-		$output .= '<link rel="alternate" type="application/json+oembed" href="' . esc_url( get_oembed_endpoint_url( get_permalink() ) ) . '" />' . "\n";
-
-		if ( class_exists( 'SimpleXMLElement' ) ) {
-			$output .= '<link rel="alternate" type="text/xml+oembed" href="' . esc_url( get_oembed_endpoint_url( get_permalink(), 'xml' ) ) . '" />' . "\n";
-		}
-	}
-
-	/**
-	 * Filters the oEmbed discovery links HTML.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param string $output HTML of the discovery links.
-	 */
-	echo apply_filters( 'oembed_discovery_links', $output );
-}
-
-/**
- * Adds the necessary JavaScript to communicate with the embedded iframes.
- *
- * @since 4.4.0
- */
-function wp_oembed_add_host_js() {
-	wp_enqueue_script( 'wp-embed' );
-}
-
-/**
- * Retrieves the URL to embed a specific post in an iframe.
- *
- * @since 4.4.0
- *
- * @param int|WP_Post $post Optional. Post ID or object. Defaults to the current post.
- * @return string|false The post embed URL on success, false if the post doesn't exist.
- */
-function get_post_embed_url( $post = null ) {
-	$post = get_post( $post );
-
-	if ( ! $post ) {
-		return false;
-	}
-
-	$embed_url     = trailingslashit( get_permalink( $post ) ) . user_trailingslashit( 'embed' );
-	$path_conflict = get_page_by_path( str_replace( home_url(), '', $embed_url ), OBJECT, get_post_types( array( 'public' => true ) ) );
-
-	if ( ! get_option( 'permalink_structure' ) || $path_conflict ) {
-		$embed_url = add_query_arg( array( 'embed' => 'true' ), get_permalink( $post ) );
-	}
-
-	/**
-	 * Filters the URL to embed a specific post.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param string  $embed_url The post embed URL.
-	 * @param WP_Post $post      The corresponding post object.
-	 */
-	return esc_url_raw( apply_filters( 'post_embed_url', $embed_url, $post ) );
-}
-
-/**
- * Retrieves the oEmbed endpoint URL for a given permalink.
- *
- * Pass an empty string as the first argument to get the endpoint base URL.
- *
- * @since 4.4.0
- *
- * @param string $permalink Optional. The permalink used for the `url` query arg. Default empty.
- * @param string $format    Optional. The requested response format. Default 'json'.
- * @return string The oEmbed endpoint URL.
- */
-function get_oembed_endpoint_url( $permalink = '', $format = 'json' ) {
-	$url = rest_url( 'oembed/1.0/embed' );
-
-	if ( '' !== $permalink ) {
-		$url = add_query_arg( array(
-			'url'    => urlencode( $permalink ),
-			'format' => ( 'json' !== $format ) ? $format : false,
-		), $url );
-	}
-
-	/**
-	 * Filters the oEmbed endpoint URL.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param string $url       The URL to the oEmbed endpoint.
-	 * @param string $permalink The permalink used for the `url` query arg.
-	 * @param string $format    The requested response format.
-	 */
-	return apply_filters( 'oembed_endpoint_url', $url, $permalink, $format );
-}
-
-/**
- * Retrieves the embed code for a specific post.
- *
- * @since 4.4.0
- *
- * @param int         $width  The width for the response.
- * @param int         $height The height for the response.
- * @param int|WP_Post $post   Optional. Post ID or object. Default is global `$post`.
- * @return string|false Embed code on success, false if post doesn't exist.
- */
-function get_post_embed_html( $width, $height, $post = null ) {
-	$post = get_post( $post );
-
-	if ( ! $post ) {
-		return false;
-	}
-
-	$embed_url = get_post_embed_url( $post );
-
-	$output = '<blockquote class="wp-embedded-content"><a href="' . esc_url( get_permalink( $post ) ) . '">' . get_the_title( $post ) . "</a></blockquote>\n";
-
-	$output .= "<script type='text/javascript'>\n";
-	$output .= "<!--//--><![CDATA[//><!--\n";
-	if ( SCRIPT_DEBUG ) {
-		$output .= file_get_contents( ABSPATH . WPINC . '/js/wp-embed.js' );
-	} else {
-		/*
-		 * If you're looking at a src version of this file, you'll see an "include"
-		 * statement below. This is used by the `grunt build` process to directly
-		 * include a minified version of wp-embed.js, instead of using the
-		 * file_get_contents() method from above.
-		 *
-		 * If you're looking at a build version of this file, you'll see a string of
-		 * minified JavaScript. If you need to debug it, please turn on SCRIPT_DEBUG
-		 * and edit wp-embed.js directly.
-		 */
-		$output .=<<<JS
-		!function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c<i.length;c++)if(d=i[c],!d.getAttribute("data-secret")){if(f=Math.random().toString(36).substr(2,10),d.src+="#?secret="+f,d.setAttribute("data-secret",f),g||h)a=d.cloneNode(!0),a.removeAttribute("security"),d.parentNode.replaceChild(a,d)}else;}}var d=!1,e=!1;if(b.querySelector)if(a.addEventListener)d=!0;if(a.wp=a.wp||{},!a.wp.receiveEmbedMessage)if(a.wp.receiveEmbedMessage=function(c){var d=c.data;if(d.secret||d.message||d.value)if(!/[^a-zA-Z0-9]/.test(d.secret)){var e,f,g,h,i,j=b.querySelectorAll('iframe[data-secret="'+d.secret+'"]'),k=b.querySelectorAll('blockquote[data-secret="'+d.secret+'"]');for(e=0;e<k.length;e++)k[e].style.display="none";for(e=0;e<j.length;e++)if(f=j[e],c.source===f.contentWindow){if(f.removeAttribute("style"),"height"===d.message){if(g=parseInt(d.value,10),g>1e3)g=1e3;else if(200>~~g)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document);
-JS;
-	}
-	$output .= "\n//--><!]]>";
-	$output .= "\n</script>";
-
-	$output .= sprintf(
-		'<iframe sandbox="allow-scripts" security="restricted" src="%1$s" width="%2$d" height="%3$d" title="%4$s" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" class="wp-embedded-content"></iframe>',
-		esc_url( $embed_url ),
-		absint( $width ),
-		absint( $height ),
-		esc_attr(
-			sprintf(
-				/* translators: 1: post title, 2: site name */
-				__( '&#8220;%1$s&#8221; &#8212; %2$s' ),
-				get_the_title( $post ),
-				get_bloginfo( 'name' )
-			)
-		)
-	);
-
-	/**
-	 * Filters the embed HTML output for a given post.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param string  $output The default HTML.
-	 * @param WP_Post $post   Current post object.
-	 * @param int     $width  Width of the response.
-	 * @param int     $height Height of the response.
-	 */
-	return apply_filters( 'embed_html', $output, $post, $width, $height );
-}
-
-/**
- * Retrieves the oEmbed response data for a given post.
- *
- * @since 4.4.0
- *
- * @param WP_Post|int $post  Post object or ID.
- * @param int         $width The requested width.
- * @return array|false Response data on success, false if post doesn't exist.
- */
-function get_oembed_response_data( $post, $width ) {
-	$post  = get_post( $post );
-	$width = absint( $width );
-
-	if ( ! $post ) {
-		return false;
-	}
-
-	if ( 'publish' !== get_post_status( $post ) ) {
-		return false;
-	}
-
-	/**
-	 * Filters the allowed minimum and maximum widths for the oEmbed response.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param array $min_max_width {
-	 *     Minimum and maximum widths for the oEmbed response.
-	 *
-	 *     @type int $min Minimum width. Default 200.
-	 *     @type int $max Maximum width. Default 600.
-	 * }
-	 */
-	$min_max_width = apply_filters( 'oembed_min_max_width', array(
-		'min' => 200,
-		'max' => 600
-	) );
-
-	$width  = min( max( $min_max_width['min'], $width ), $min_max_width['max'] );
-	$height = max( ceil( $width / 16 * 9 ), 200 );
-
-	$data = array(
-		'version'       => '1.0',
-		'provider_name' => get_bloginfo( 'name' ),
-		'provider_url'  => get_home_url(),
-		'author_name'   => get_bloginfo( 'name' ),
-		'author_url'    => get_home_url(),
-		'title'         => $post->post_title,
-		'type'          => 'link',
-	);
-
-	$author = get_userdata( $post->post_author );
-
-	if ( $author ) {
-		$data['author_name'] = $author->display_name;
-		$data['author_url']  = get_author_posts_url( $author->ID );
-	}
-
-	/**
-	 * Filters the oEmbed response data.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param array   $data   The response data.
-	 * @param WP_Post $post   The post object.
-	 * @param int     $width  The requested width.
-	 * @param int     $height The calculated height.
-	 */
-	return apply_filters( 'oembed_response_data', $data, $post, $width, $height );
-}
-
-/**
- * Filters the oEmbed response data to return an iframe embed code.
- *
- * @since 4.4.0
- *
- * @param array   $data   The response data.
- * @param WP_Post $post   The post object.
- * @param int     $width  The requested width.
- * @param int     $height The calculated height.
- * @return array The modified response data.
- */
-function get_oembed_response_data_rich( $data, $post, $width, $height ) {
-	$data['width']  = absint( $width );
-	$data['height'] = absint( $height );
-	$data['type']   = 'rich';
-	$data['html']   = get_post_embed_html( $width, $height, $post );
-
-	// Add post thumbnail to response if available.
-	$thumbnail_id = false;
-
-	if ( has_post_thumbnail( $post->ID ) ) {
-		$thumbnail_id = get_post_thumbnail_id( $post->ID );
-	}
-
-	if ( 'attachment' === get_post_type( $post ) ) {
-		if ( wp_attachment_is_image( $post ) ) {
-			$thumbnail_id = $post->ID;
-		} else if ( wp_attachment_is( 'video', $post ) ) {
-			$thumbnail_id = get_post_thumbnail_id( $post );
-			$data['type'] = 'video';
-		}
-	}
-
-	if ( $thumbnail_id ) {
-		list( $thumbnail_url, $thumbnail_width, $thumbnail_height ) = wp_get_attachment_image_src( $thumbnail_id, array( $width, 99999 ) );
-		$data['thumbnail_url']    = $thumbnail_url;
-		$data['thumbnail_width']  = $thumbnail_width;
-		$data['thumbnail_height'] = $thumbnail_height;
-	}
-
-	return $data;
-}
-
-/**
- * Ensures that the specified format is either 'json' or 'xml'.
- *
- * @since 4.4.0
- *
- * @param string $format The oEmbed response format. Accepts 'json' or 'xml'.
- * @return string The format, either 'xml' or 'json'. Default 'json'.
- */
-function wp_oembed_ensure_format( $format ) {
-	if ( ! in_array( $format, array( 'json', 'xml' ), true ) ) {
-		return 'json';
-	}
-
-	return $format;
-}
-
-/**
- * Hooks into the REST API output to print XML instead of JSON.
- *
- * This is only done for the oEmbed API endpoint,
- * which supports both formats.
- *
- * @access private
- * @since 4.4.0
- *
- * @param bool                      $served  Whether the request has already been served.
- * @param WP_HTTP_ResponseInterface $result  Result to send to the client. Usually a WP_REST_Response.
- * @param WP_REST_Request           $request Request used to generate the response.
- * @param WP_REST_Server            $server  Server instance.
- * @return true
- */
-function _oembed_rest_pre_serve_request( $served, $result, $request, $server ) {
-	$params = $request->get_params();
-
-	if ( '/oembed/1.0/embed' !== $request->get_route() || 'GET' !== $request->get_method() ) {
-		return $served;
-	}
-
-	if ( ! isset( $params['format'] ) || 'xml' !== $params['format'] ) {
-		return $served;
-	}
-
-	// Embed links inside the request.
-	$data = $server->response_to_data( $result, false );
-
-	if ( ! class_exists( 'SimpleXMLElement' ) ) {
-		status_header( 501 );
-		die( get_status_header_desc( 501 ) );
-	}
-
-	$result = _oembed_create_xml( $data );
-
-	// Bail if there's no XML.
-	if ( ! $result ) {
-		status_header( 501 );
-		return get_status_header_desc( 501 );
-	}
-
-	if ( ! headers_sent() ) {
-		$server->send_header( 'Content-Type', 'text/xml; charset=' . get_option( 'blog_charset' ) );
-	}
-
-	echo $result;
-
-	return true;
-}
-
-/**
- * Creates an XML string from a given array.
- *
- * @since 4.4.0
- * @access private
- *
- * @param array            $data The original oEmbed response data.
- * @param SimpleXMLElement $node Optional. XML node to append the result to recursively.
- * @return string|false XML string on success, false on error.
- */
-function _oembed_create_xml( $data, $node = null ) {
-	if ( ! is_array( $data ) || empty( $data ) ) {
-		return false;
-	}
-
-	if ( null === $node ) {
-		$node = new SimpleXMLElement( '<oembed></oembed>' );
-	}
-
-	foreach ( $data as $key => $value ) {
-		if ( is_numeric( $key ) ) {
-			$key = 'oembed';
-		}
-
-		if ( is_array( $value ) ) {
-			$item = $node->addChild( $key );
-			_oembed_create_xml( $value, $item );
-		} else {
-			$node->addChild( $key, esc_html( $value ) );
-		}
-	}
-
-	return $node->asXML();
-}
-
-/**
- * Filters the given oEmbed HTML.
- *
- * If the `$url` isn't on the trusted providers list,
- * we need to filter the HTML heavily for security.
- *
- * Only filters 'rich' and 'html' response types.
- *
- * @since 4.4.0
- *
- * @param string $result The oEmbed HTML result.
- * @param object $data   A data object result from an oEmbed provider.
- * @param string $url    The URL of the content to be embedded.
- * @return string The filtered and sanitized oEmbed result.
- */
-function wp_filter_oembed_result( $result, $data, $url ) {
-	if ( false === $result || ! in_array( $data->type, array( 'rich', 'video' ) ) ) {
-		return $result;
-	}
-
-	$wp_oembed = _wp_oembed_get_object();
-
-	// Don't modify the HTML for trusted providers.
-	if ( false !== $wp_oembed->get_provider( $url, array( 'discover' => false ) ) ) {
-		return $result;
-	}
-
-	$allowed_html = array(
-		'a'          => array(
-			'href'         => true,
-		),
-		'blockquote' => array(),
-		'iframe'     => array(
-			'src'          => true,
-			'width'        => true,
-			'height'       => true,
-			'frameborder'  => true,
-			'marginwidth'  => true,
-			'marginheight' => true,
-			'scrolling'    => true,
-			'title'        => true,
-		),
-	);
-
-	$html = wp_kses( $result, $allowed_html );
-
-	preg_match( '|(<blockquote>.*?</blockquote>)?.*(<iframe.*?></iframe>)|ms', $html, $content );
-	// We require at least the iframe to exist.
-	if ( empty( $content[2] ) ) {
-		return false;
-	}
-	$html = $content[1] . $content[2];
-
-	if ( ! empty( $content[1] ) ) {
-		// We have a blockquote to fall back on. Hide the iframe by default.
-		$html = str_replace( '<iframe', '<iframe style="position: absolute; clip: rect(1px, 1px, 1px, 1px);"', $html );
-		$html = str_replace( '<blockquote', '<blockquote class="wp-embedded-content"', $html );
-	}
-
-	$html = str_replace( '<iframe', '<iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"', $html );
-
-	preg_match( '/ src=[\'"]([^\'"]*)[\'"]/', $html, $results );
-
-	if ( ! empty( $results ) ) {
-		$secret = wp_generate_password( 10, false );
-
-		$url = esc_url( "{$results[1]}#?secret=$secret" );
-
-		$html = str_replace( $results[0], " src=\"$url\" data-secret=\"$secret\"", $html );
-		$html = str_replace( '<blockquote', "<blockquote data-secret=\"$secret\"", $html );
-	}
-
-	return $html;
-}
-
-/**
- * Filters the string in the 'more' link displayed after a trimmed excerpt.
- *
- * Replaces '[...]' (appended to automatically generated excerpts) with an
- * ellipsis and a "Continue reading" link in the embed template.
- *
- * @since 4.4.0
- *
- * @param string $more_string Default 'more' string.
- * @return string 'Continue reading' link prepended with an ellipsis.
- */
-function wp_embed_excerpt_more( $more_string ) {
-	if ( ! is_embed() ) {
-		return $more_string;
-	}
-
-	$link = sprintf( '<a href="%1$s" class="wp-embed-more" target="_top">%2$s</a>',
-		esc_url( get_permalink() ),
-		/* translators: %s: Name of current post */
-		sprintf( __( 'Continue reading %s' ), '<span class="screen-reader-text">' . get_the_title() . '</span>' )
-	);
-	return ' &hellip; ' . $link;
-}
-
-/**
- * Displays the post excerpt for the embed template.
- *
- * Intended to be used in 'The Loop'.
- *
- * @since 4.4.0
- */
-function the_excerpt_embed() {
-	$output = get_the_excerpt();
-
-	/**
-	 * Filters the post excerpt for the embed template.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param string $output The current post excerpt.
-	 */
-	echo apply_filters( 'the_excerpt_embed', $output );
-}
-
-/**
- * Filters the post excerpt for the embed template.
- *
- * Shows players for video and audio attachments.
- *
- * @since 4.4.0
- *
- * @param string $content The current post excerpt.
- * @return string The modified post excerpt.
- */
-function wp_embed_excerpt_attachment( $content ) {
-	if ( is_attachment() ) {
-		return prepend_attachment( '' );
-	}
-
-	return $content;
-}
-
-/**
- * Enqueue embed iframe default CSS and JS & fire do_action('enqueue_embed_scripts')
- *
- * Enqueue PNG fallback CSS for embed iframe for legacy versions of IE.
- *
- * Allows plugins to queue scripts for the embed iframe end using wp_enqueue_script().
- * Runs first in oembed_head().
- *
- * @since 4.4.0
- */
-function enqueue_embed_scripts() {
-	wp_enqueue_style( 'wp-embed-template-ie' );
-
-	/**
-	 * Fires when scripts and styles are enqueued for the embed iframe.
-	 *
-	 * @since 4.4.0
-	 */
-	do_action( 'enqueue_embed_scripts' );
-}
-
-/**
- * Prints the CSS in the embed iframe header.
- *
- * @since 4.4.0
- */
-function print_embed_styles() {
-	?>
-	<style type="text/css">
-	<?php
-		if ( SCRIPT_DEBUG ) {
-			readfile( ABSPATH . WPINC . "/css/wp-embed-template.css" );
-		} else {
-			/*
-			 * If you're looking at a src version of this file, you'll see an "include"
-			 * statement below. This is used by the `grunt build` process to directly
-			 * include a minified version of wp-oembed-embed.css, instead of using the
-			 * readfile() method from above.
-			 *
-			 * If you're looking at a build version of this file, you'll see a string of
-			 * minified CSS. If you need to debug it, please turn on SCRIPT_DEBUG
-			 * and edit wp-embed-template.css directly.
-			 */
-			?>
-			body,html{padding:0;margin:0}body{font-family:sans-serif}.wp-embed,.wp-embed-share-input{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;position:absolute!important;width:1px}.dashicons{display:inline-block;width:20px;height:20px;background-color:transparent;background-repeat:no-repeat;-webkit-background-size:20px 20px;background-size:20px;background-position:center;-webkit-transition:background .1s ease-in;transition:background .1s ease-in;position:relative;top:5px}.dashicons-no{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M15.55%2013.7l-2.19%202.06-3.42-3.65-3.64%203.43-2.06-2.18%203.64-3.43-3.42-3.64%202.18-2.06%203.43%203.64%203.64-3.42%202.05%202.18-3.64%203.43z%27%20fill%3D%27%23fff%27%2F%3E%3C%2Fsvg%3E")}.dashicons-admin-comments{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M5%202h9q.82%200%201.41.59T16%204v7q0%20.82-.59%201.41T14%2013h-2l-5%205v-5H5q-.82%200-1.41-.59T3%2011V4q0-.82.59-1.41T5%202z%27%20fill%3D%27%2382878c%27%2F%3E%3C%2Fsvg%3E")}.wp-embed-comments a:hover .dashicons-admin-comments{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M5%202h9q.82%200%201.41.59T16%204v7q0%20.82-.59%201.41T14%2013h-2l-5%205v-5H5q-.82%200-1.41-.59T3%2011V4q0-.82.59-1.41T5%202z%27%20fill%3D%27%230073aa%27%2F%3E%3C%2Fsvg%3E")}.dashicons-share{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%2382878c%27%2F%3E%3C%2Fsvg%3E");display:none}.js .dashicons-share{display:inline-block}.wp-embed-share-dialog-open:hover .dashicons-share{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%230073aa%27%2F%3E%3C%2Fsvg%3E")}.wp-embed{padding:25px;font-size:14px;font-weight:400;line-height:1.5;color:#82878c;background:#fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05);overflow:auto;zoom:1}.wp-embed a{color:#82878c;text-decoration:none}.wp-embed a:hover{text-decoration:underline}.wp-embed-featured-image{margin-bottom:20px}.wp-embed-featured-image img{width:100%;height:auto;border:none}.wp-embed-featured-image.square{float:left;max-width:160px;margin-right:20px}.wp-embed p{margin:0}p.wp-embed-heading{margin:0 0 15px;font-weight:600;font-size:22px;line-height:1.3}.wp-embed-heading a{color:#32373c}.wp-embed .wp-embed-more{color:#b4b9be}.wp-embed-footer{display:table;width:100%;margin-top:30px}.wp-embed-site-icon{position:absolute;top:50%;left:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);height:25px;width:25px;border:0}.wp-embed-site-title{font-weight:600;line-height:25px}.wp-embed-site-title a{position:relative;display:inline-block;padding-left:35px}.wp-embed-meta,.wp-embed-site-title{display:table-cell}.wp-embed-meta{text-align:right;white-space:nowrap;vertical-align:middle}.wp-embed-comments,.wp-embed-share{display:inline}.wp-embed-comments a,.wp-embed-share-tab-button{display:inline-block}.wp-embed-meta a:hover{text-decoration:none;color:#0073aa}.wp-embed-comments a{line-height:25px}.wp-embed-comments+.wp-embed-share{margin-left:10px}.wp-embed-share-dialog{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#222;background-color:rgba(10,10,10,.9);color:#fff;opacity:1;-webkit-transition:opacity .25s ease-in-out;transition:opacity .25s ease-in-out}.wp-embed-share-dialog.hidden{opacity:0;visibility:hidden}.wp-embed-share-dialog-close,.wp-embed-share-dialog-open{margin:-8px 0 0;padding:0;background:0 0;border:none;cursor:pointer;outline:0}.wp-embed-share-dialog-close .dashicons,.wp-embed-share-dialog-open .dashicons{padding:4px}.wp-embed-share-dialog-open .dashicons{top:8px}.wp-embed-share-dialog-close:focus .dashicons,.wp-embed-share-dialog-open:focus .dashicons{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);-webkit-border-radius:100%;border-radius:100%}.wp-embed-share-dialog-close{position:absolute;top:20px;right:20px;font-size:22px}.wp-embed-share-dialog-close:hover{text-decoration:none}.wp-embed-share-dialog-close .dashicons{height:24px;width:24px;-webkit-background-size:24px 24px;background-size:24px}.wp-embed-share-dialog-content{height:100%;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;overflow:hidden}.wp-embed-share-dialog-text{margin-top:25px;padding:20px}.wp-embed-share-tabs{margin:0 0 20px;padding:0;list-style:none}.wp-embed-share-tab-button button{margin:0;padding:0;border:none;background:0 0;font-size:16px;line-height:1.3;color:#aaa;cursor:pointer;-webkit-transition:color .1s ease-in;transition:color .1s ease-in}.wp-embed-share-tab-button [aria-selected=true],.wp-embed-share-tab-button button:hover{color:#fff}.wp-embed-share-tab-button+.wp-embed-share-tab-button{margin:0 0 0 10px;padding:0 0 0 11px;border-left:1px solid #aaa}.wp-embed-share-tab[aria-hidden=true]{display:none}p.wp-embed-share-description{margin:0;font-size:14px;line-height:1;font-style:italic;color:#aaa}.wp-embed-share-input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%;border:none;height:28px;margin:0 0 10px;padding:0 5px;font-size:14px;font-weight:400;line-height:1.5;resize:none;cursor:text}textarea.wp-embed-share-input{height:72px}html[dir=rtl] .wp-embed-featured-image.square{float:right;margin-right:0;margin-left:20px}html[dir=rtl] .wp-embed-site-title a{padding-left:0;padding-right:35px}html[dir=rtl] .wp-embed-site-icon{margin-right:0;margin-left:10px;left:auto;right:0}html[dir=rtl] .wp-embed-meta{text-align:left}html[dir=rtl] .wp-embed-share{margin-left:0;margin-right:10px}html[dir=rtl] .wp-embed-share-dialog-close{right:auto;left:20px}html[dir=rtl] .wp-embed-share-tab-button+.wp-embed-share-tab-button{margin:0 10px 0 0;padding:0 11px 0 0;border-left:none;border-right:1px solid #aaa}
-			<?php
-		}
-	?>
-	</style>
-	<?php
-}
-
-/**
- * Prints the JavaScript in the embed iframe header.
- *
- * @since 4.4.0
- */
-function print_embed_scripts() {
-	?>
-	<script type="text/javascript">
-	<?php
-		if ( SCRIPT_DEBUG ) {
-			readfile( ABSPATH . WPINC . "/js/wp-embed-template.js" );
-		} else {
-			/*
-			 * If you're looking at a src version of this file, you'll see an "include"
-			 * statement below. This is used by the `grunt build` process to directly
-			 * include a minified version of wp-embed-template.js, instead of using the
-			 * readfile() method from above.
-			 *
-			 * If you're looking at a build version of this file, you'll see a string of
-			 * minified JavaScript. If you need to debug it, please turn on SCRIPT_DEBUG
-			 * and edit wp-embed-template.js directly.
-			 */
-			?>
-			!function(a,b){"use strict";function c(b,c){a.parent.postMessage({message:b,value:c,secret:g},"*")}function d(){function d(){l.className=l.className.replace("hidden",""),b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]').focus()}function e(){l.className+=" hidden",b.querySelector(".wp-embed-share-dialog-open").focus()}function f(a){var c=b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]');c.setAttribute("aria-selected","false"),b.querySelector("#"+c.getAttribute("aria-controls")).setAttribute("aria-hidden","true"),a.target.setAttribute("aria-selected","true"),b.querySelector("#"+a.target.getAttribute("aria-controls")).setAttribute("aria-hidden","false")}function g(a){var c,d,e=a.target,f=e.parentElement.previousElementSibling,g=e.parentElement.nextElementSibling;if(37===a.keyCode)c=f;else{if(39!==a.keyCode)return!1;c=g}"rtl"===b.documentElement.getAttribute("dir")&&(c=c===f?g:f),c&&(d=c.firstElementChild,e.setAttribute("tabindex","-1"),e.setAttribute("aria-selected",!1),b.querySelector("#"+e.getAttribute("aria-controls")).setAttribute("aria-hidden","true"),d.setAttribute("tabindex","0"),d.setAttribute("aria-selected","true"),d.focus(),b.querySelector("#"+d.getAttribute("aria-controls")).setAttribute("aria-hidden","false"))}function h(a){var c=b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]');n!==a.target||a.shiftKey?c===a.target&&a.shiftKey&&(n.focus(),a.preventDefault()):(c.focus(),a.preventDefault())}function i(a){var b,d=a.target;b=d.hasAttribute("href")?d.getAttribute("href"):d.parentElement.getAttribute("href"),b&&(c("link",b),a.preventDefault())}if(!k){k=!0;var j,l=b.querySelector(".wp-embed-share-dialog"),m=b.querySelector(".wp-embed-share-dialog-open"),n=b.querySelector(".wp-embed-share-dialog-close"),o=b.querySelectorAll(".wp-embed-share-input"),p=b.querySelectorAll(".wp-embed-share-tab-button button"),q=b.querySelector(".wp-embed-featured-image img");if(o)for(j=0;j<o.length;j++)o[j].addEventListener("click",function(a){a.target.select()});if(m&&m.addEventListener("click",function(){d()}),n&&n.addEventListener("click",function(){e()}),p)for(j=0;j<p.length;j++)p[j].addEventListener("click",f),p[j].addEventListener("keydown",g);b.addEventListener("keydown",function(a){27===a.keyCode&&-1===l.className.indexOf("hidden")?e():9===a.keyCode&&h(a)},!1),a.self!==a.top&&(c("height",Math.ceil(b.body.getBoundingClientRect().height)),q&&q.addEventListener("load",function(){c("height",Math.ceil(b.body.getBoundingClientRect().height))}),b.addEventListener("click",i))}}function e(){a.self!==a.top&&(clearTimeout(i),i=setTimeout(function(){c("height",Math.ceil(b.body.getBoundingClientRect().height))},100))}function f(){a.self===a.top||g||(g=a.location.hash.replace(/.*secret=([\d\w]{10}).*/,"$1"),clearTimeout(h),h=setTimeout(function(){f()},100))}var g,h,i,j=b.querySelector&&a.addEventListener,k=!1;j&&(f(),b.documentElement.className=b.documentElement.className.replace(/\bno-js\b/,"")+" js",b.addEventListener("DOMContentLoaded",d,!1),a.addEventListener("load",d,!1),a.addEventListener("resize",e,!1))}(window,document);
-			<?php
-		}
-	?>
-	</script>
-	<?php
-}
-
-/**
- * Prepare the oembed HTML to be displayed in an RSS feed.
- *
- * @since 4.4.0
- * @access private
- *
- * @param string $content The content to filter.
- * @return string The filtered content.
- */
-function _oembed_filter_feed_content( $content ) {
-	return str_replace( '<iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted" style="position: absolute; clip: rect(1px, 1px, 1px, 1px);"', '<iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"', $content );
-}
-
-/**
- * Prints the necessary markup for the embed comments button.
- *
- * @since 4.4.0
- */
-function print_embed_comments_button() {
-	if ( is_404() || ! ( get_comments_number() || comments_open() ) ) {
-		return;
-	}
-	?>
-	<div class="wp-embed-comments">
-		<a href="<?php comments_link(); ?>" target="_top">
-			<span class="dashicons dashicons-admin-comments"></span>
-			<?php
-			printf(
-				_n(
-					'%s <span class="screen-reader-text">Comment</span>',
-					'%s <span class="screen-reader-text">Comments</span>',
-					get_comments_number()
-				),
-				number_format_i18n( get_comments_number() )
-			);
-			?>
-		</a>
-	</div>
-	<?php
-}
-
-/**
- * Prints the necessary markup for the embed sharing button.
- *
- * @since 4.4.0
- */
-function print_embed_sharing_button() {
-	if ( is_404() ) {
-		return;
-	}
-	?>
-	<div class="wp-embed-share">
-		<button type="button" class="wp-embed-share-dialog-open" aria-label="<?php esc_attr_e( 'Open sharing dialog' ); ?>">
-			<span class="dashicons dashicons-share"></span>
-		</button>
-	</div>
-	<?php
-}
-
-/**
- * Prints the necessary markup for the embed sharing dialog.
- *
- * @since 4.4.0
- */
-function print_embed_sharing_dialog() {
-	if ( is_404() ) {
-		return;
-	}
-	?>
-	<div class="wp-embed-share-dialog hidden" role="dialog" aria-label="<?php esc_attr_e( 'Sharing options' ); ?>">
-		<div class="wp-embed-share-dialog-content">
-			<div class="wp-embed-share-dialog-text">
-				<ul class="wp-embed-share-tabs" role="tablist">
-					<li class="wp-embed-share-tab-button wp-embed-share-tab-button-wordpress" role="presentation">
-						<button type="button" role="tab" aria-controls="wp-embed-share-tab-wordpress" aria-selected="true" tabindex="0"><?php esc_html_e( 'WordPress Embed' ); ?></button>
-					</li>
-					<li class="wp-embed-share-tab-button wp-embed-share-tab-button-html" role="presentation">
-						<button type="button" role="tab" aria-controls="wp-embed-share-tab-html" aria-selected="false" tabindex="-1"><?php esc_html_e( 'HTML Embed' ); ?></button>
-					</li>
-				</ul>
-				<div id="wp-embed-share-tab-wordpress" class="wp-embed-share-tab" role="tabpanel" aria-hidden="false">
-					<input type="text" value="<?php the_permalink(); ?>" class="wp-embed-share-input" aria-describedby="wp-embed-share-description-wordpress" tabindex="0" readonly/>
-
-					<p class="wp-embed-share-description" id="wp-embed-share-description-wordpress">
-						<?php _e( 'Copy and paste this URL into your WordPress site to embed' ); ?>
-					</p>
-				</div>
-				<div id="wp-embed-share-tab-html" class="wp-embed-share-tab" role="tabpanel" aria-hidden="true">
-					<textarea class="wp-embed-share-input" aria-describedby="wp-embed-share-description-html" tabindex="0" readonly><?php echo esc_textarea( get_post_embed_html( 600, 400 ) ); ?></textarea>
-
-					<p class="wp-embed-share-description" id="wp-embed-share-description-html">
-						<?php _e( 'Copy and paste this code into your site to embed' ); ?>
-					</p>
-				</div>
-			</div>
-
-			<button type="button" class="wp-embed-share-dialog-close" aria-label="<?php esc_attr_e( 'Close sharing dialog' ); ?>">
-				<span class="dashicons dashicons-no"></span>
-			</button>
-		</div>
-	</div>
-	<?php
-}
-
-/**
- * Prints the necessary markup for the site title in an embed template.
- *
- * @since 4.5.0
- */
-function the_embed_site_title() {
-	$site_title = sprintf(
-		'<a href="%s" target="_top"><img src="%s" srcset="%s 2x" width="32" height="32" alt="" class="wp-embed-site-icon"/><span>%s</span></a>',
-		esc_url( home_url() ),
-		esc_url( get_site_icon_url( 32, admin_url( 'images/w-logo-blue.png' ) ) ),
-		esc_url( get_site_icon_url( 64, admin_url( 'images/w-logo-blue.png' ) ) ),
-		esc_html( get_bloginfo( 'name' ) )
-	);
-
-	$site_title = '<div class="wp-embed-site-title">' . $site_title . '</div>';
-
-	/**
-	 * Filters the site title HTML in the embed footer.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param string $site_title The site title HTML.
-	 */
-	echo apply_filters( 'embed_site_title_html', $site_title );
-}
-
-/**
- * Filters the oEmbed result before any HTTP requests are made.
- *
- * If the URL belongs to the current site, the result is fetched directly instead of
- * going through the oEmbed discovery process.
- *
- * @since 4.5.3
- *
- * @param null|string $result The UNSANITIZED (and potentially unsafe) HTML that should be used to embed. Default null.
- * @param string      $url    The URL that should be inspected for discovery `<link>` tags.
- * @param array       $args   oEmbed remote get arguments.
- * @return null|string The UNSANITIZED (and potentially unsafe) HTML that should be used to embed.
- *                     Null if the URL does not belong to the current site.
- */
-function wp_filter_pre_oembed_result( $result, $url, $args ) {
-	$post_id = url_to_postid( $url );
-
-	/** This filter is documented in wp-includes/class-wp-oembed-controller.php */
-	$post_id = apply_filters( 'oembed_request_post_id', $post_id, $url );
-
-	if ( ! $post_id ) {
-		return $result;
-	}
-
-	$width = isset( $args['width'] ) ? $args['width'] : 0;
-
-	$data = get_oembed_response_data( $post_id, $width );
-	$data = _wp_oembed_get_object()->data2html( (object) $data, $url );
-
-	if ( ! $data ) {
-		return $result;
-	}
-
-	return $data;
-}
Index: www/wp-includes/ID3/module.audio-video.matroska.php
===================================================================
--- www/wp-includes/ID3/module.audio-video.matroska.php	(revision 38565)
+++ www/wp-includes/autoload/id3/getid3_matroska.php	(revision )
@@ -14,199 +14,6 @@
 //                                                            ///
 /////////////////////////////////////////////////////////////////
 
-
-define('EBML_ID_CHAPTERS',                  0x0043A770); // [10][43][A7][70] -- A system to define basic menus and partition data. For more detailed information, look at the Chapters Explanation.
-define('EBML_ID_SEEKHEAD',                  0x014D9B74); // [11][4D][9B][74] -- Contains the position of other level 1 elements.
-define('EBML_ID_TAGS',                      0x0254C367); // [12][54][C3][67] -- Element containing elements specific to Tracks/Chapters. A list of valid tags can be found <http://www.matroska.org/technical/specs/tagging/index.html>.
-define('EBML_ID_INFO',                      0x0549A966); // [15][49][A9][66] -- Contains miscellaneous general information and statistics on the file.
-define('EBML_ID_TRACKS',                    0x0654AE6B); // [16][54][AE][6B] -- A top-level block of information with many tracks described.
-define('EBML_ID_SEGMENT',                   0x08538067); // [18][53][80][67] -- This element contains all other top-level (level 1) elements. Typically a Matroska file is composed of 1 segment.
-define('EBML_ID_ATTACHMENTS',               0x0941A469); // [19][41][A4][69] -- Contain attached files.
-define('EBML_ID_EBML',                      0x0A45DFA3); // [1A][45][DF][A3] -- Set the EBML characteristics of the data to follow. Each EBML document has to start with this.
-define('EBML_ID_CUES',                      0x0C53BB6B); // [1C][53][BB][6B] -- A top-level element to speed seeking access. All entries are local to the segment.
-define('EBML_ID_CLUSTER',                   0x0F43B675); // [1F][43][B6][75] -- The lower level element containing the (monolithic) Block structure.
-define('EBML_ID_LANGUAGE',                    0x02B59C); //     [22][B5][9C] -- Specifies the language of the track in the Matroska languages form.
-define('EBML_ID_TRACKTIMECODESCALE',          0x03314F); //     [23][31][4F] -- The scale to apply on this track to work at normal speed in relation with other tracks (mostly used to adjust video speed when the audio length differs).
-define('EBML_ID_DEFAULTDURATION',             0x03E383); //     [23][E3][83] -- Number of nanoseconds (i.e. not scaled) per frame.
-define('EBML_ID_CODECNAME',                   0x058688); //     [25][86][88] -- A human-readable string specifying the codec.
-define('EBML_ID_CODECDOWNLOADURL',            0x06B240); //     [26][B2][40] -- A URL to download about the codec used.
-define('EBML_ID_TIMECODESCALE',               0x0AD7B1); //     [2A][D7][B1] -- Timecode scale in nanoseconds (1.000.000 means all timecodes in the segment are expressed in milliseconds).
-define('EBML_ID_COLOURSPACE',                 0x0EB524); //     [2E][B5][24] -- Same value as in AVI (32 bits).
-define('EBML_ID_GAMMAVALUE',                  0x0FB523); //     [2F][B5][23] -- Gamma Value.
-define('EBML_ID_CODECSETTINGS',               0x1A9697); //     [3A][96][97] -- A string describing the encoding setting used.
-define('EBML_ID_CODECINFOURL',                0x1B4040); //     [3B][40][40] -- A URL to find information about the codec used.
-define('EBML_ID_PREVFILENAME',                0x1C83AB); //     [3C][83][AB] -- An escaped filename corresponding to the previous segment.
-define('EBML_ID_PREVUID',                     0x1CB923); //     [3C][B9][23] -- A unique ID to identify the previous chained segment (128 bits).
-define('EBML_ID_NEXTFILENAME',                0x1E83BB); //     [3E][83][BB] -- An escaped filename corresponding to the next segment.
-define('EBML_ID_NEXTUID',                     0x1EB923); //     [3E][B9][23] -- A unique ID to identify the next chained segment (128 bits).
-define('EBML_ID_CONTENTCOMPALGO',               0x0254); //         [42][54] -- The compression algorithm used. Algorithms that have been specified so far are:
-define('EBML_ID_CONTENTCOMPSETTINGS',           0x0255); //         [42][55] -- Settings that might be needed by the decompressor. For Header Stripping (ContentCompAlgo=3), the bytes that were removed from the beggining of each frames of the track.
-define('EBML_ID_DOCTYPE',                       0x0282); //         [42][82] -- A string that describes the type of document that follows this EBML header ('matroska' in our case).
-define('EBML_ID_DOCTYPEREADVERSION',            0x0285); //         [42][85] -- The minimum DocType version an interpreter has to support to read this file.
-define('EBML_ID_EBMLVERSION',                   0x0286); //         [42][86] -- The version of EBML parser used to create the file.
-define('EBML_ID_DOCTYPEVERSION',                0x0287); //         [42][87] -- The version of DocType interpreter used to create the file.
-define('EBML_ID_EBMLMAXIDLENGTH',               0x02F2); //         [42][F2] -- The maximum length of the IDs you'll find in this file (4 or less in Matroska).
-define('EBML_ID_EBMLMAXSIZELENGTH',             0x02F3); //         [42][F3] -- The maximum length of the sizes you'll find in this file (8 or less in Matroska). This does not override the element size indicated at the beginning of an element. Elements that have an indicated size which is larger than what is allowed by EBMLMaxSizeLength shall be considered invalid.
-define('EBML_ID_EBMLREADVERSION',               0x02F7); //         [42][F7] -- The minimum EBML version a parser has to support to read this file.
-define('EBML_ID_CHAPLANGUAGE',                  0x037C); //         [43][7C] -- The languages corresponding to the string, in the bibliographic ISO-639-2 form.
-define('EBML_ID_CHAPCOUNTRY',                   0x037E); //         [43][7E] -- The countries corresponding to the string, same 2 octets as in Internet domains.
-define('EBML_ID_SEGMENTFAMILY',                 0x0444); //         [44][44] -- A randomly generated unique ID that all segments related to each other must use (128 bits).
-define('EBML_ID_DATEUTC',                       0x0461); //         [44][61] -- Date of the origin of timecode (value 0), i.e. production date.
-define('EBML_ID_TAGLANGUAGE',                   0x047A); //         [44][7A] -- Specifies the language of the tag specified, in the Matroska languages form.
-define('EBML_ID_TAGDEFAULT',                    0x0484); //         [44][84] -- Indication to know if this is the default/original language to use for the given tag.
-define('EBML_ID_TAGBINARY',                     0x0485); //         [44][85] -- The values of the Tag if it is binary. Note that this cannot be used in the same SimpleTag as TagString.
-define('EBML_ID_TAGSTRING',                     0x0487); //         [44][87] -- The value of the Tag.
-define('EBML_ID_DURATION',                      0x0489); //         [44][89] -- Duration of the segment (based on TimecodeScale).
-define('EBML_ID_CHAPPROCESSPRIVATE',            0x050D); //         [45][0D] -- Some optional data attached to the ChapProcessCodecID information. For ChapProcessCodecID = 1, it is the "DVD level" equivalent.
-define('EBML_ID_CHAPTERFLAGENABLED',            0x0598); //         [45][98] -- Specify wether the chapter is enabled. It can be enabled/disabled by a Control Track. When disabled, the movie should skip all the content between the TimeStart and TimeEnd of this chapter.
-define('EBML_ID_TAGNAME',                       0x05A3); //         [45][A3] -- The name of the Tag that is going to be stored.
-define('EBML_ID_EDITIONENTRY',                  0x05B9); //         [45][B9] -- Contains all information about a segment edition.
-define('EBML_ID_EDITIONUID',                    0x05BC); //         [45][BC] -- A unique ID to identify the edition. It's useful for tagging an edition.
-define('EBML_ID_EDITIONFLAGHIDDEN',             0x05BD); //         [45][BD] -- If an edition is hidden (1), it should not be available to the user interface (but still to Control Tracks).
-define('EBML_ID_EDITIONFLAGDEFAULT',            0x05DB); //         [45][DB] -- If a flag is set (1) the edition should be used as the default one.
-define('EBML_ID_EDITIONFLAGORDERED',            0x05DD); //         [45][DD] -- Specify if the chapters can be defined multiple times and the order to play them is enforced.
-define('EBML_ID_FILEDATA',                      0x065C); //         [46][5C] -- The data of the file.
-define('EBML_ID_FILEMIMETYPE',                  0x0660); //         [46][60] -- MIME type of the file.
-define('EBML_ID_FILENAME',                      0x066E); //         [46][6E] -- Filename of the attached file.
-define('EBML_ID_FILEREFERRAL',                  0x0675); //         [46][75] -- A binary value that a track/codec can refer to when the attachment is needed.
-define('EBML_ID_FILEDESCRIPTION',               0x067E); //         [46][7E] -- A human-friendly name for the attached file.
-define('EBML_ID_FILEUID',                       0x06AE); //         [46][AE] -- Unique ID representing the file, as random as possible.
-define('EBML_ID_CONTENTENCALGO',                0x07E1); //         [47][E1] -- The encryption algorithm used. The value '0' means that the contents have not been encrypted but only signed. Predefined values:
-define('EBML_ID_CONTENTENCKEYID',               0x07E2); //         [47][E2] -- For public key algorithms this is the ID of the public key the the data was encrypted with.
-define('EBML_ID_CONTENTSIGNATURE',              0x07E3); //         [47][E3] -- A cryptographic signature of the contents.
-define('EBML_ID_CONTENTSIGKEYID',               0x07E4); //         [47][E4] -- This is the ID of the private key the data was signed with.
-define('EBML_ID_CONTENTSIGALGO',                0x07E5); //         [47][E5] -- The algorithm used for the signature. A value of '0' means that the contents have not been signed but only encrypted. Predefined values:
-define('EBML_ID_CONTENTSIGHASHALGO',            0x07E6); //         [47][E6] -- The hash algorithm used for the signature. A value of '0' means that the contents have not been signed but only encrypted. Predefined values:
-define('EBML_ID_MUXINGAPP',                     0x0D80); //         [4D][80] -- Muxing application or library ("libmatroska-0.4.3").
-define('EBML_ID_SEEK',                          0x0DBB); //         [4D][BB] -- Contains a single seek entry to an EBML element.
-define('EBML_ID_CONTENTENCODINGORDER',          0x1031); //         [50][31] -- Tells when this modification was used during encoding/muxing starting with 0 and counting upwards. The decoder/demuxer has to start with the highest order number it finds and work its way down. This value has to be unique over all ContentEncodingOrder elements in the segment.
-define('EBML_ID_CONTENTENCODINGSCOPE',          0x1032); //         [50][32] -- A bit field that describes which elements have been modified in this way. Values (big endian) can be OR'ed. Possible values:
-define('EBML_ID_CONTENTENCODINGTYPE',           0x1033); //         [50][33] -- A value describing what kind of transformation has been done. Possible values:
-define('EBML_ID_CONTENTCOMPRESSION',            0x1034); //         [50][34] -- Settings describing the compression used. Must be present if the value of ContentEncodingType is 0 and absent otherwise. Each block must be decompressable even if no previous block is available in order not to prevent seeking.
-define('EBML_ID_CONTENTENCRYPTION',             0x1035); //         [50][35] -- Settings describing the encryption used. Must be present if the value of ContentEncodingType is 1 and absent otherwise.
-define('EBML_ID_CUEREFNUMBER',                  0x135F); //         [53][5F] -- Number of the referenced Block of Track X in the specified Cluster.
-define('EBML_ID_NAME',                          0x136E); //         [53][6E] -- A human-readable track name.
-define('EBML_ID_CUEBLOCKNUMBER',                0x1378); //         [53][78] -- Number of the Block in the specified Cluster.
-define('EBML_ID_TRACKOFFSET',                   0x137F); //         [53][7F] -- A value to add to the Block's Timecode. This can be used to adjust the playback offset of a track.
-define('EBML_ID_SEEKID',                        0x13AB); //         [53][AB] -- The binary ID corresponding to the element name.
-define('EBML_ID_SEEKPOSITION',                  0x13AC); //         [53][AC] -- The position of the element in the segment in octets (0 = first level 1 element).
-define('EBML_ID_STEREOMODE',                    0x13B8); //         [53][B8] -- Stereo-3D video mode.
-define('EBML_ID_OLDSTEREOMODE',                 0x13B9); //         [53][B9] -- Bogus StereoMode value used in old versions of libmatroska. DO NOT USE. (0: mono, 1: right eye, 2: left eye, 3: both eyes).
-define('EBML_ID_PIXELCROPBOTTOM',               0x14AA); //         [54][AA] -- The number of video pixels to remove at the bottom of the image (for HDTV content).
-define('EBML_ID_DISPLAYWIDTH',                  0x14B0); //         [54][B0] -- Width of the video frames to display.
-define('EBML_ID_DISPLAYUNIT',                   0x14B2); //         [54][B2] -- Type of the unit for DisplayWidth/Height (0: pixels, 1: centimeters, 2: inches).
-define('EBML_ID_ASPECTRATIOTYPE',               0x14B3); //         [54][B3] -- Specify the possible modifications to the aspect ratio (0: free resizing, 1: keep aspect ratio, 2: fixed).
-define('EBML_ID_DISPLAYHEIGHT',                 0x14BA); //         [54][BA] -- Height of the video frames to display.
-define('EBML_ID_PIXELCROPTOP',                  0x14BB); //         [54][BB] -- The number of video pixels to remove at the top of the image.
-define('EBML_ID_PIXELCROPLEFT',                 0x14CC); //         [54][CC] -- The number of video pixels to remove on the left of the image.
-define('EBML_ID_PIXELCROPRIGHT',                0x14DD); //         [54][DD] -- The number of video pixels to remove on the right of the image.
-define('EBML_ID_FLAGFORCED',                    0x15AA); //         [55][AA] -- Set if that track MUST be used during playback. There can be many forced track for a kind (audio, video or subs), the player should select the one which language matches the user preference or the default + forced track. Overlay MAY happen between a forced and non-forced track of the same kind.
-define('EBML_ID_MAXBLOCKADDITIONID',            0x15EE); //         [55][EE] -- The maximum value of BlockAddID. A value 0 means there is no BlockAdditions for this track.
-define('EBML_ID_WRITINGAPP',                    0x1741); //         [57][41] -- Writing application ("mkvmerge-0.3.3").
-define('EBML_ID_CLUSTERSILENTTRACKS',           0x1854); //         [58][54] -- The list of tracks that are not used in that part of the stream. It is useful when using overlay tracks on seeking. Then you should decide what track to use.
-define('EBML_ID_CLUSTERSILENTTRACKNUMBER',      0x18D7); //         [58][D7] -- One of the track number that are not used from now on in the stream. It could change later if not specified as silent in a further Cluster.
-define('EBML_ID_ATTACHEDFILE',                  0x21A7); //         [61][A7] -- An attached file.
-define('EBML_ID_CONTENTENCODING',               0x2240); //         [62][40] -- Settings for one content encoding like compression or encryption.
-define('EBML_ID_BITDEPTH',                      0x2264); //         [62][64] -- Bits per sample, mostly used for PCM.
-define('EBML_ID_CODECPRIVATE',                  0x23A2); //         [63][A2] -- Private data only known to the codec.
-define('EBML_ID_TARGETS',                       0x23C0); //         [63][C0] -- Contain all UIDs where the specified meta data apply. It is void to describe everything in the segment.
-define('EBML_ID_CHAPTERPHYSICALEQUIV',          0x23C3); //         [63][C3] -- Specify the physical equivalent of this ChapterAtom like "DVD" (60) or "SIDE" (50), see complete list of values.
-define('EBML_ID_TAGCHAPTERUID',                 0x23C4); //         [63][C4] -- A unique ID to identify the Chapter(s) the tags belong to. If the value is 0 at this level, the tags apply to all chapters in the Segment.
-define('EBML_ID_TAGTRACKUID',                   0x23C5); //         [63][C5] -- A unique ID to identify the Track(s) the tags belong to. If the value is 0 at this level, the tags apply to all tracks in the Segment.
-define('EBML_ID_TAGATTACHMENTUID',              0x23C6); //         [63][C6] -- A unique ID to identify the Attachment(s) the tags belong to. If the value is 0 at this level, the tags apply to all the attachments in the Segment.
-define('EBML_ID_TAGEDITIONUID',                 0x23C9); //         [63][C9] -- A unique ID to identify the EditionEntry(s) the tags belong to. If the value is 0 at this level, the tags apply to all editions in the Segment.
-define('EBML_ID_TARGETTYPE',                    0x23CA); //         [63][CA] -- An informational string that can be used to display the logical level of the target like "ALBUM", "TRACK", "MOVIE", "CHAPTER", etc (see TargetType).
-define('EBML_ID_TRACKTRANSLATE',                0x2624); //         [66][24] -- The track identification for the given Chapter Codec.
-define('EBML_ID_TRACKTRANSLATETRACKID',         0x26A5); //         [66][A5] -- The binary value used to represent this track in the chapter codec data. The format depends on the ChapProcessCodecID used.
-define('EBML_ID_TRACKTRANSLATECODEC',           0x26BF); //         [66][BF] -- The chapter codec using this ID (0: Matroska Script, 1: DVD-menu).
-define('EBML_ID_TRACKTRANSLATEEDITIONUID',      0x26FC); //         [66][FC] -- Specify an edition UID on which this translation applies. When not specified, it means for all editions found in the segment.
-define('EBML_ID_SIMPLETAG',                     0x27C8); //         [67][C8] -- Contains general information about the target.
-define('EBML_ID_TARGETTYPEVALUE',               0x28CA); //         [68][CA] -- A number to indicate the logical level of the target (see TargetType).
-define('EBML_ID_CHAPPROCESSCOMMAND',            0x2911); //         [69][11] -- Contains all the commands associated to the Atom.
-define('EBML_ID_CHAPPROCESSTIME',               0x2922); //         [69][22] -- Defines when the process command should be handled (0: during the whole chapter, 1: before starting playback, 2: after playback of the chapter).
-define('EBML_ID_CHAPTERTRANSLATE',              0x2924); //         [69][24] -- A tuple of corresponding ID used by chapter codecs to represent this segment.
-define('EBML_ID_CHAPPROCESSDATA',               0x2933); //         [69][33] -- Contains the command information. The data should be interpreted depending on the ChapProcessCodecID value. For ChapProcessCodecID = 1, the data correspond to the binary DVD cell pre/post commands.
-define('EBML_ID_CHAPPROCESS',                   0x2944); //         [69][44] -- Contains all the commands associated to the Atom.
-define('EBML_ID_CHAPPROCESSCODECID',            0x2955); //         [69][55] -- Contains the type of the codec used for the processing. A value of 0 means native Matroska processing (to be defined), a value of 1 means the DVD command set is used. More codec IDs can be added later.
-define('EBML_ID_CHAPTERTRANSLATEID',            0x29A5); //         [69][A5] -- The binary value used to represent this segment in the chapter codec data. The format depends on the ChapProcessCodecID used.
-define('EBML_ID_CHAPTERTRANSLATECODEC',         0x29BF); //         [69][BF] -- The chapter codec using this ID (0: Matroska Script, 1: DVD-menu).
-define('EBML_ID_CHAPTERTRANSLATEEDITIONUID',    0x29FC); //         [69][FC] -- Specify an edition UID on which this correspondance applies. When not specified, it means for all editions found in the segment.
-define('EBML_ID_CONTENTENCODINGS',              0x2D80); //         [6D][80] -- Settings for several content encoding mechanisms like compression or encryption.
-define('EBML_ID_MINCACHE',                      0x2DE7); //         [6D][E7] -- The minimum number of frames a player should be able to cache during playback. If set to 0, the reference pseudo-cache system is not used.
-define('EBML_ID_MAXCACHE',                      0x2DF8); //         [6D][F8] -- The maximum cache size required to store referenced frames in and the current frame. 0 means no cache is needed.
-define('EBML_ID_CHAPTERSEGMENTUID',             0x2E67); //         [6E][67] -- A segment to play in place of this chapter. Edition ChapterSegmentEditionUID should be used for this segment, otherwise no edition is used.
-define('EBML_ID_CHAPTERSEGMENTEDITIONUID',      0x2EBC); //         [6E][BC] -- The edition to play from the segment linked in ChapterSegmentUID.
-define('EBML_ID_TRACKOVERLAY',                  0x2FAB); //         [6F][AB] -- Specify that this track is an overlay track for the Track specified (in the u-integer). That means when this track has a gap (see SilentTracks) the overlay track should be used instead. The order of multiple TrackOverlay matters, the first one is the one that should be used. If not found it should be the second, etc.
-define('EBML_ID_TAG',                           0x3373); //         [73][73] -- Element containing elements specific to Tracks/Chapters.
-define('EBML_ID_SEGMENTFILENAME',               0x3384); //         [73][84] -- A filename corresponding to this segment.
-define('EBML_ID_SEGMENTUID',                    0x33A4); //         [73][A4] -- A randomly generated unique ID to identify the current segment between many others (128 bits).
-define('EBML_ID_CHAPTERUID',                    0x33C4); //         [73][C4] -- A unique ID to identify the Chapter.
-define('EBML_ID_TRACKUID',                      0x33C5); //         [73][C5] -- A unique ID to identify the Track. This should be kept the same when making a direct stream copy of the Track to another file.
-define('EBML_ID_ATTACHMENTLINK',                0x3446); //         [74][46] -- The UID of an attachment that is used by this codec.
-define('EBML_ID_CLUSTERBLOCKADDITIONS',         0x35A1); //         [75][A1] -- Contain additional blocks to complete the main one. An EBML parser that has no knowledge of the Block structure could still see and use/skip these data.
-define('EBML_ID_CHANNELPOSITIONS',              0x347B); //         [7D][7B] -- Table of horizontal angles for each successive channel, see appendix.
-define('EBML_ID_OUTPUTSAMPLINGFREQUENCY',       0x38B5); //         [78][B5] -- Real output sampling frequency in Hz (used for SBR techniques).
-define('EBML_ID_TITLE',                         0x3BA9); //         [7B][A9] -- General name of the segment.
-define('EBML_ID_CHAPTERDISPLAY',                  0x00); //             [80] -- Contains all possible strings to use for the chapter display.
-define('EBML_ID_TRACKTYPE',                       0x03); //             [83] -- A set of track types coded on 8 bits (1: video, 2: audio, 3: complex, 0x10: logo, 0x11: subtitle, 0x12: buttons, 0x20: control).
-define('EBML_ID_CHAPSTRING',                      0x05); //             [85] -- Contains the string to use as the chapter atom.
-define('EBML_ID_CODECID',                         0x06); //             [86] -- An ID corresponding to the codec, see the codec page for more info.
-define('EBML_ID_FLAGDEFAULT',                     0x08); //             [88] -- Set if that track (audio, video or subs) SHOULD be used if no language found matches the user preference.
-define('EBML_ID_CHAPTERTRACKNUMBER',              0x09); //             [89] -- UID of the Track to apply this chapter too. In the absense of a control track, choosing this chapter will select the listed Tracks and deselect unlisted tracks. Absense of this element indicates that the Chapter should be applied to any currently used Tracks.
-define('EBML_ID_CLUSTERSLICES',                   0x0E); //             [8E] -- Contains slices description.
-define('EBML_ID_CHAPTERTRACK',                    0x0F); //             [8F] -- List of tracks on which the chapter applies. If this element is not present, all tracks apply
-define('EBML_ID_CHAPTERTIMESTART',                0x11); //             [91] -- Timecode of the start of Chapter (not scaled).
-define('EBML_ID_CHAPTERTIMEEND',                  0x12); //             [92] -- Timecode of the end of Chapter (timecode excluded, not scaled).
-define('EBML_ID_CUEREFTIME',                      0x16); //             [96] -- Timecode of the referenced Block.
-define('EBML_ID_CUEREFCLUSTER',                   0x17); //             [97] -- Position of the Cluster containing the referenced Block.
-define('EBML_ID_CHAPTERFLAGHIDDEN',               0x18); //             [98] -- If a chapter is hidden (1), it should not be available to the user interface (but still to Control Tracks).
-define('EBML_ID_FLAGINTERLACED',                  0x1A); //             [9A] -- Set if the video is interlaced.
-define('EBML_ID_CLUSTERBLOCKDURATION',            0x1B); //             [9B] -- The duration of the Block (based on TimecodeScale). This element is mandatory when DefaultDuration is set for the track. When not written and with no DefaultDuration, the value is assumed to be the difference between the timecode of this Block and the timecode of the next Block in "display" order (not coding order). This element can be useful at the end of a Track (as there is not other Block available), or when there is a break in a track like for subtitle tracks.
-define('EBML_ID_FLAGLACING',                      0x1C); //             [9C] -- Set if the track may contain blocks using lacing.
-define('EBML_ID_CHANNELS',                        0x1F); //             [9F] -- Numbers of channels in the track.
-define('EBML_ID_CLUSTERBLOCKGROUP',               0x20); //             [A0] -- Basic container of information containing a single Block or BlockVirtual, and information specific to that Block/VirtualBlock.
-define('EBML_ID_CLUSTERBLOCK',                    0x21); //             [A1] -- Block containing the actual data to be rendered and a timecode relative to the Cluster Timecode.
-define('EBML_ID_CLUSTERBLOCKVIRTUAL',             0x22); //             [A2] -- A Block with no data. It must be stored in the stream at the place the real Block should be in display order.
-define('EBML_ID_CLUSTERSIMPLEBLOCK',              0x23); //             [A3] -- Similar to Block but without all the extra information, mostly used to reduced overhead when no extra feature is needed.
-define('EBML_ID_CLUSTERCODECSTATE',               0x24); //             [A4] -- The new codec state to use. Data interpretation is private to the codec. This information should always be referenced by a seek entry.
-define('EBML_ID_CLUSTERBLOCKADDITIONAL',          0x25); //             [A5] -- Interpreted by the codec as it wishes (using the BlockAddID).
-define('EBML_ID_CLUSTERBLOCKMORE',                0x26); //             [A6] -- Contain the BlockAdditional and some parameters.
-define('EBML_ID_CLUSTERPOSITION',                 0x27); //             [A7] -- Position of the Cluster in the segment (0 in live broadcast streams). It might help to resynchronise offset on damaged streams.
-define('EBML_ID_CODECDECODEALL',                  0x2A); //             [AA] -- The codec can decode potentially damaged data.
-define('EBML_ID_CLUSTERPREVSIZE',                 0x2B); //             [AB] -- Size of the previous Cluster, in octets. Can be useful for backward playing.
-define('EBML_ID_TRACKENTRY',                      0x2E); //             [AE] -- Describes a track with all elements.
-define('EBML_ID_CLUSTERENCRYPTEDBLOCK',           0x2F); //             [AF] -- Similar to SimpleBlock but the data inside the Block are Transformed (encrypt and/or signed).
-define('EBML_ID_PIXELWIDTH',                      0x30); //             [B0] -- Width of the encoded video frames in pixels.
-define('EBML_ID_CUETIME',                         0x33); //             [B3] -- Absolute timecode according to the segment time base.
-define('EBML_ID_SAMPLINGFREQUENCY',               0x35); //             [B5] -- Sampling frequency in Hz.
-define('EBML_ID_CHAPTERATOM',                     0x36); //             [B6] -- Contains the atom information to use as the chapter atom (apply to all tracks).
-define('EBML_ID_CUETRACKPOSITIONS',               0x37); //             [B7] -- Contain positions for different tracks corresponding to the timecode.
-define('EBML_ID_FLAGENABLED',                     0x39); //             [B9] -- Set if the track is used.
-define('EBML_ID_PIXELHEIGHT',                     0x3A); //             [BA] -- Height of the encoded video frames in pixels.
-define('EBML_ID_CUEPOINT',                        0x3B); //             [BB] -- Contains all information relative to a seek point in the segment.
-define('EBML_ID_CRC32',                           0x3F); //             [BF] -- The CRC is computed on all the data of the Master element it's in, regardless of its position. It's recommended to put the CRC value at the beggining of the Master element for easier reading. All level 1 elements should include a CRC-32.
-define('EBML_ID_CLUSTERBLOCKADDITIONID',          0x4B); //             [CB] -- The ID of the BlockAdditional element (0 is the main Block).
-define('EBML_ID_CLUSTERLACENUMBER',               0x4C); //             [CC] -- The reverse number of the frame in the lace (0 is the last frame, 1 is the next to last, etc). While there are a few files in the wild with this element, it is no longer in use and has been deprecated. Being able to interpret this element is not required for playback.
-define('EBML_ID_CLUSTERFRAMENUMBER',              0x4D); //             [CD] -- The number of the frame to generate from this lace with this delay (allow you to generate many frames from the same Block/Frame).
-define('EBML_ID_CLUSTERDELAY',                    0x4E); //             [CE] -- The (scaled) delay to apply to the element.
-define('EBML_ID_CLUSTERDURATION',                 0x4F); //             [CF] -- The (scaled) duration to apply to the element.
-define('EBML_ID_TRACKNUMBER',                     0x57); //             [D7] -- The track number as used in the Block Header (using more than 127 tracks is not encouraged, though the design allows an unlimited number).
-define('EBML_ID_CUEREFERENCE',                    0x5B); //             [DB] -- The Clusters containing the required referenced Blocks.
-define('EBML_ID_VIDEO',                           0x60); //             [E0] -- Video settings.
-define('EBML_ID_AUDIO',                           0x61); //             [E1] -- Audio settings.
-define('EBML_ID_CLUSTERTIMESLICE',                0x68); //             [E8] -- Contains extra time information about the data contained in the Block. While there are a few files in the wild with this element, it is no longer in use and has been deprecated. Being able to interpret this element is not required for playback.
-define('EBML_ID_CUECODECSTATE',                   0x6A); //             [EA] -- The position of the Codec State corresponding to this Cue element. 0 means that the data is taken from the initial Track Entry.
-define('EBML_ID_CUEREFCODECSTATE',                0x6B); //             [EB] -- The position of the Codec State corresponding to this referenced element. 0 means that the data is taken from the initial Track Entry.
-define('EBML_ID_VOID',                            0x6C); //             [EC] -- Used to void damaged data, to avoid unexpected behaviors when using damaged data. The content is discarded. Also used to reserve space in a sub-element for later use.
-define('EBML_ID_CLUSTERTIMECODE',                 0x67); //             [E7] -- Absolute timecode of the cluster (based on TimecodeScale).
-define('EBML_ID_CLUSTERBLOCKADDID',               0x6E); //             [EE] -- An ID to identify the BlockAdditional level.
-define('EBML_ID_CUECLUSTERPOSITION',              0x71); //             [F1] -- The position of the Cluster containing the required Block.
-define('EBML_ID_CUETRACK',                        0x77); //             [F7] -- The track for which a position is given.
-define('EBML_ID_CLUSTERREFERENCEPRIORITY',        0x7A); //             [FA] -- This frame is referenced and has the specified cache priority. In cache only a frame of the same or higher priority can replace this frame. A value of 0 means the frame is not referenced.
-define('EBML_ID_CLUSTERREFERENCEBLOCK',           0x7B); //             [FB] -- Timecode of another frame used as a reference (ie: B or P frame). The timecode is relative to the block it's attached to.
-define('EBML_ID_CLUSTERREFERENCEVIRTUAL',         0x7D); //             [FD] -- Relative position of the data that should be in position of the virtual block.
-
-
 /**
 * @tutorial http://www.matroska.org/technical/specs/index.html
 *
Index: www/wp-includes/comment-template.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/comment-template.php	(revision 38565)
+++ www/wp-includes/comment-template.php	(revision 38565)
@@ -1,2458 +0,0 @@
-<?php
-/**
- * Comment template functions
- *
- * These functions are meant to live inside of the WordPress loop.
- *
- * @package WordPress
- * @subpackage Template
- */
-
-/**
- * Retrieve the author of the current comment.
- *
- * If the comment has an empty comment_author field, then 'Anonymous' person is
- * assumed.
- *
- * @since 1.5.0
- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
- *
- * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to retrieve the author.
- *									 Default current comment.
- * @return string The comment author
- */
-function get_comment_author( $comment_ID = 0 ) {
-	$comment = get_comment( $comment_ID );
-
-	if ( empty( $comment->comment_author ) ) {
-		if ( $comment->user_id && $user = get_userdata( $comment->user_id ) )
-			$author = $user->display_name;
-		else
-			$author = __('Anonymous');
-	} else {
-		$author = $comment->comment_author;
-	}
-
-	/**
-	 * Filters the returned comment author name.
-	 *
-	 * @since 1.5.0
-	 * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
-	 *
-	 * @param string     $author     The comment author's username.
-	 * @param int        $comment_ID The comment ID.
-	 * @param WP_Comment $comment    The comment object.
-	 */
-	return apply_filters( 'get_comment_author', $author, $comment->comment_ID, $comment );
-}
-
-/**
- * Displays the author of the current comment.
- *
- * @since 0.71
- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
- *
- * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author.
- *									 Default current comment.
- */
-function comment_author( $comment_ID = 0 ) {
-	$comment = get_comment( $comment_ID );
-	$author  = get_comment_author( $comment );
-
-	/**
-	 * Filters the comment author's name for display.
-	 *
-	 * @since 1.2.0
-	 * @since 4.1.0 The `$comment_ID` parameter was added.
-	 *
-	 * @param string $author     The comment author's username.
-	 * @param int    $comment_ID The comment ID.
-	 */
-	echo apply_filters( 'comment_author', $author, $comment->comment_ID );
-}
-
-/**
- * Retrieve the email of the author of the current comment.
- *
- * @since 1.5.0
- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
- *
- * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to get the author's email.
- *									 Default current comment.
- * @return string The current comment author's email
- */
-function get_comment_author_email( $comment_ID = 0 ) {
-	$comment = get_comment( $comment_ID );
-
-	/**
-	 * Filters the comment author's returned email address.
-	 *
-	 * @since 1.5.0
-	 * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
-	 *
-	 * @param string     $comment_author_email The comment author's email address.
-	 * @param int        $comment_ID           The comment ID.
-	 * @param WP_Comment $comment              The comment object.
-	 */
-	return apply_filters( 'get_comment_author_email', $comment->comment_author_email, $comment->comment_ID, $comment );
-}
-
-/**
- * Display the email of the author of the current global $comment.
- *
- * Care should be taken to protect the email address and assure that email
- * harvesters do not capture your commentors' email address. Most assume that
- * their email address will not appear in raw form on the site. Doing so will
- * enable anyone, including those that people don't want to get the email
- * address and use it for their own means good and bad.
- *
- * @since 0.71
- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
- *
- * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author's email.
- *									 Default current comment.
- */
-function comment_author_email( $comment_ID = 0 ) {
-	$comment      = get_comment( $comment_ID );
-	$author_email = get_comment_author_email( $comment );
-
-	/**
-	 * Filters the comment author's email for display.
-	 *
-	 * @since 1.2.0
-	 * @since 4.1.0 The `$comment_ID` parameter was added.
-	 *
-	 * @param string $author_email The comment author's email address.
-	 * @param int    $comment_ID   The comment ID.
-	 */
-	echo apply_filters( 'author_email', $author_email, $comment->comment_ID );
-}
-
-/**
- * Display the html email link to the author of the current comment.
- *
- * Care should be taken to protect the email address and assure that email
- * harvesters do not capture your commentors' email address. Most assume that
- * their email address will not appear in raw form on the site. Doing so will
- * enable anyone, including those that people don't want to get the email
- * address and use it for their own means good and bad.
- *
- * @since 0.71
- * @since 4.6.0 Added the `$comment` parameter.
- *
- * @param string         $linktext Optional. Text to display instead of the comment author's email address.
- *                                 Default empty.
- * @param string         $before   Optional. Text or HTML to display before the email link. Default empty.
- * @param string         $after    Optional. Text or HTML to display after the email link. Default empty.
- * @param int|WP_Comment $comment  Optional. Comment ID or WP_Comment object. Default is the current comment.
- */
-function comment_author_email_link( $linktext = '', $before = '', $after = '', $comment = null ) {
-	if ( $link = get_comment_author_email_link( $linktext, $before, $after, $comment ) ) {
-		echo $link;
-	}
-}
-
-/**
- * Return the html email link to the author of the current comment.
- *
- * Care should be taken to protect the email address and assure that email
- * harvesters do not capture your commentors' email address. Most assume that
- * their email address will not appear in raw form on the site. Doing so will
- * enable anyone, including those that people don't want to get the email
- * address and use it for their own means good and bad.
- *
- * @since 2.7.0
- * @since 4.6.0 Added the `$comment` parameter.
- *
- * @param string         $linktext Optional. Text to display instead of the comment author's email address.
- *                                 Default empty.
- * @param string         $before   Optional. Text or HTML to display before the email link. Default empty.
- * @param string         $after    Optional. Text or HTML to display after the email link. Default empty.
- * @param int|WP_Comment $comment  Optional. Comment ID or WP_Comment object. Default is the current comment.
- * @return string HTML markup for the comment author email link. By default, the email address is obfuscated
- *                via the {@see 'comment_email'} filter with antispambot().
- */
-function get_comment_author_email_link( $linktext = '', $before = '', $after = '', $comment = null ) {
-	$comment = get_comment( $comment );
-
-	/**
-	 * Filters the comment author's email for display.
-	 *
-	 * Care should be taken to protect the email address and assure that email
-	 * harvesters do not capture your commenter's email address.
-	 *
-	 * @since 1.2.0
-	 * @since 4.1.0 The `$comment` parameter was added.
-	 *
-	 * @param string     $comment_author_email The comment author's email address.
-	 * @param WP_Comment $comment              The comment object.
-	 */
-	$email = apply_filters( 'comment_email', $comment->comment_author_email, $comment );
-
-	if ((!empty($email)) && ($email != '@')) {
-	$display = ($linktext != '') ? $linktext : $email;
-		$return  = $before;
-		$return .= sprintf( '<a href="%1$s">%2$s</a>', esc_url( 'mailto:' . $email ), esc_html( $display ) );
-	 	$return .= $after;
-		return $return;
-	} else {
-		return '';
-	}
-}
-
-/**
- * Retrieve the HTML link to the URL of the author of the current comment.
- *
- * Both get_comment_author_url() and get_comment_author() rely on get_comment(),
- * which falls back to the global comment variable if the $comment_ID argument is empty.
- *
- * @since 1.5.0
- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
- *
- * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to get the author's link.
- *									 Default current comment.
- * @return string The comment author name or HTML link for author's URL.
- */
-function get_comment_author_link( $comment_ID = 0 ) {
-	$comment = get_comment( $comment_ID );
-	$url     = get_comment_author_url( $comment );
-	$author  = get_comment_author( $comment );
-
-	if ( empty( $url ) || 'http://' == $url )
-		$return = $author;
-	else
-		$return = "<a href='$url' rel='external nofollow' class='url'>$author</a>";
-
-	/**
-	 * Filters the comment author's link for display.
-	 *
-	 * @since 1.5.0
-	 * @since 4.1.0 The `$author` and `$comment_ID` parameters were added.
-	 *
-	 * @param string $return     The HTML-formatted comment author link.
-	 *                           Empty for an invalid URL.
-	 * @param string $author     The comment author's username.
-	 * @param int    $comment_ID The comment ID.
-	 */
-	return apply_filters( 'get_comment_author_link', $return, $author, $comment->comment_ID );
-}
-
-/**
- * Display the html link to the url of the author of the current comment.
- *
- * @since 0.71
- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
- *
- * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author's link.
- *									 Default current comment.
- */
-function comment_author_link( $comment_ID = 0 ) {
-	echo get_comment_author_link( $comment_ID );
-}
-
-/**
- * Retrieve the IP address of the author of the current comment.
- *
- * @since 1.5.0
- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
- *
- * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to get the author's IP address.
- *									 Default current comment.
- * @return string Comment author's IP address.
- */
-function get_comment_author_IP( $comment_ID = 0 ) {
-	$comment = get_comment( $comment_ID );
-
-	/**
-	 * Filters the comment author's returned IP address.
-	 *
-	 * @since 1.5.0
-	 * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
-	 *
-	 * @param string     $comment_author_IP The comment author's IP address.
-	 * @param int        $comment_ID        The comment ID.
-	 * @param WP_Comment $comment           The comment object.
-	 */
-	return apply_filters( 'get_comment_author_IP', $comment->comment_author_IP, $comment->comment_ID, $comment );
-}
-
-/**
- * Display the IP address of the author of the current comment.
- *
- * @since 0.71
- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
- *
- * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author's IP address.
- *									 Default current comment.
- */
-function comment_author_IP( $comment_ID = 0 ) {
-	echo esc_html( get_comment_author_IP( $comment_ID ) );
-}
-
-/**
- * Retrieve the url of the author of the current comment.
- *
- * @since 1.5.0
- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
- *
- * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to get the author's URL.
- *									 Default current comment.
- * @return string Comment author URL.
- */
-function get_comment_author_url( $comment_ID = 0 ) {
-	$comment = get_comment( $comment_ID );
-	$url = '';
-	$id = 0;
-	if ( ! empty( $comment ) ) {
-		$author_url = ( 'http://' == $comment->comment_author_url ) ? '' : $comment->comment_author_url;
-		$url = esc_url( $author_url, array( 'http', 'https' ) );
-		$id = $comment->ID;
-	}
-
-	/**
-	 * Filters the comment author's URL.
-	 *
-	 * @since 1.5.0
-	 * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
-	 *
-	 * @param string     $url        The comment author's URL.
-	 * @param int        $comment_ID The comment ID.
-	 * @param WP_Comment $comment    The comment object.
-	 */
-	return apply_filters( 'get_comment_author_url', $url, $id, $comment );
-}
-
-/**
- * Display the url of the author of the current comment.
- *
- * @since 0.71
- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
- *
- * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author's URL.
- *									 Default current comment.
- */
-function comment_author_url( $comment_ID = 0 ) {
-	$comment    = get_comment( $comment_ID );
-	$author_url = get_comment_author_url( $comment );
-
-	/**
-	 * Filters the comment author's URL for display.
-	 *
-	 * @since 1.2.0
-	 * @since 4.1.0 The `$comment_ID` parameter was added.
-	 *
-	 * @param string $author_url The comment author's URL.
-	 * @param int    $comment_ID The comment ID.
-	 */
-	echo apply_filters( 'comment_url', $author_url, $comment->comment_ID );
-}
-
-/**
- * Retrieves the HTML link of the url of the author of the current comment.
- *
- * $linktext parameter is only used if the URL does not exist for the comment
- * author. If the URL does exist then the URL will be used and the $linktext
- * will be ignored.
- *
- * Encapsulate the HTML link between the $before and $after. So it will appear
- * in the order of $before, link, and finally $after.
- *
- * @since 1.5.0
- * @since 4.6.0 Added the `$comment` parameter.
- *
- * @param string         $linktext Optional. The text to display instead of the comment
- *                                 author's email address. Default empty.
- * @param string         $before   Optional. The text or HTML to display before the email link.
- *                                 Default empty.
- * @param string         $after    Optional. The text or HTML to display after the email link.
- *                                 Default empty.
- * @param int|WP_Comment $comment  Optional. Comment ID or WP_Comment object.
- *                                 Default is the current comment.
- * @return string The HTML link between the $before and $after parameters.
- */
-function get_comment_author_url_link( $linktext = '', $before = '', $after = '', $comment = 0 ) {
-	$url = get_comment_author_url( $comment );
-	$display = ($linktext != '') ? $linktext : $url;
-	$display = str_replace( 'http://www.', '', $display );
-	$display = str_replace( 'http://', '', $display );
-
-	if ( '/' == substr($display, -1) ) {
-		$display = substr($display, 0, -1);
-	}
-
-	$return = "$before<a href='$url' rel='external'>$display</a>$after";
-
-	/**
-	 * Filters the comment author's returned URL link.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string $return The HTML-formatted comment author URL link.
-	 */
-	return apply_filters( 'get_comment_author_url_link', $return );
-}
-
-/**
- * Displays the HTML link of the url of the author of the current comment.
- *
- * @since 0.71
- * @since 4.6.0 Added the `$comment` parameter.
- *
- * @param string         $linktext Optional. Text to display instead of the comment author's
- *                                 email address. Default empty.
- * @param string         $before   Optional. Text or HTML to display before the email link.
- *                                 Default empty.
- * @param string         $after    Optional. Text or HTML to display after the email link.
- *                                 Default empty.
- * @param int|WP_Comment $comment  Optional. Comment ID or WP_Comment object.
- *                                 Default is the current comment.
- */
-function comment_author_url_link( $linktext = '', $before = '', $after = '', $comment = 0 ) {
-	echo get_comment_author_url_link( $linktext, $before, $after, $comment );
-}
-
-/**
- * Generates semantic classes for each comment element.
- *
- * @since 2.7.0
- * @since 4.4.0 Added the ability for `$comment` to also accept a WP_Comment object.
- *
- * @param string|array   $class    Optional. One or more classes to add to the class list.
- *                                 Default empty.
- * @param int|WP_Comment $comment  Comment ID or WP_Comment object. Default current comment.
- * @param int|WP_Post    $post_id  Post ID or WP_Post object. Default current post.
- * @param bool           $echo     Optional. Whether to cho or return the output.
- *                                 Default true.
- * @return string If `$echo` is false, the class will be returned. Void otherwise.
- */
-function comment_class( $class = '', $comment = null, $post_id = null, $echo = true ) {
-	// Separates classes with a single space, collates classes for comment DIV
-	$class = 'class="' . join( ' ', get_comment_class( $class, $comment, $post_id ) ) . '"';
-	if ( $echo)
-		echo $class;
-	else
-		return $class;
-}
-
-/**
- * Returns the classes for the comment div as an array.
- *
- * @since 2.7.0
- * @since 4.4.0 Added the ability for `$comment_id` to also accept a WP_Comment object.
- *
- * @global int $comment_alt
- * @global int $comment_depth
- * @global int $comment_thread_alt
- *
- * @param string|array   $class      Optional. One or more classes to add to the class list. Default empty.
- * @param int|WP_Comment $comment_id Comment ID or WP_Comment object. Default current comment.
- * @param int|WP_Post    $post_id    Post ID or WP_Post object. Default current post.
- * @return array An array of classes.
- */
-function get_comment_class( $class = '', $comment_id = null, $post_id = null ) {
-	global $comment_alt, $comment_depth, $comment_thread_alt;
-
-	$classes = array();
-
-	$comment = get_comment( $comment_id );
-	if ( ! $comment ) {
-		return $classes;
-	}
-
-	// Get the comment type (comment, trackback),
-	$classes[] = ( empty( $comment->comment_type ) ) ? 'comment' : $comment->comment_type;
-
-	// Add classes for comment authors that are registered users.
-	if ( $comment->user_id > 0 && $user = get_userdata( $comment->user_id ) ) {
-		$classes[] = 'byuser';
-		$classes[] = 'comment-author-' . sanitize_html_class( $user->user_nicename, $comment->user_id );
-		// For comment authors who are the author of the post
-		if ( $post = get_post($post_id) ) {
-			if ( $comment->user_id === $post->post_author ) {
-				$classes[] = 'bypostauthor';
-			}
-		}
-	}
-
-	if ( empty($comment_alt) )
-		$comment_alt = 0;
-	if ( empty($comment_depth) )
-		$comment_depth = 1;
-	if ( empty($comment_thread_alt) )
-		$comment_thread_alt = 0;
-
-	if ( $comment_alt % 2 ) {
-		$classes[] = 'odd';
-		$classes[] = 'alt';
-	} else {
-		$classes[] = 'even';
-	}
-
-	$comment_alt++;
-
-	// Alt for top-level comments
-	if ( 1 == $comment_depth ) {
-		if ( $comment_thread_alt % 2 ) {
-			$classes[] = 'thread-odd';
-			$classes[] = 'thread-alt';
-		} else {
-			$classes[] = 'thread-even';
-		}
-		$comment_thread_alt++;
-	}
-
-	$classes[] = "depth-$comment_depth";
-
-	if ( !empty($class) ) {
-		if ( !is_array( $class ) )
-			$class = preg_split('#\s+#', $class);
-		$classes = array_merge($classes, $class);
-	}
-
-	$classes = array_map('esc_attr', $classes);
-
-	/**
-	 * Filters the returned CSS classes for the current comment.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param array       $classes    An array of comment classes.
-	 * @param string      $class      A comma-separated list of additional classes added to the list.
-	 * @param int         $comment_id The comment id.
-	 * @param WP_Comment  $comment    The comment object.
-	 * @param int|WP_Post $post_id    The post ID or WP_Post object.
-	 */
-	return apply_filters( 'comment_class', $classes, $class, $comment->comment_ID, $comment, $post_id );
-}
-
-/**
- * Retrieve the comment date of the current comment.
- *
- * @since 1.5.0
- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
- *
- * @param string          $d          Optional. The format of the date. Default user's setting.
- * @param int|WP_Comment  $comment_ID WP_Comment or ID of the comment for which to get the date.
- *                                    Default current comment.
- * @return string The comment's date.
- */
-function get_comment_date( $d = '', $comment_ID = 0 ) {
-	$comment = get_comment( $comment_ID );
-	if ( '' == $d )
-		$date = mysql2date(get_option('date_format'), $comment->comment_date);
-	else
-		$date = mysql2date($d, $comment->comment_date);
-	/**
-	 * Filters the returned comment date.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string|int $date    Formatted date string or Unix timestamp.
-	 * @param string     $d       The format of the date.
-	 * @param WP_Comment $comment The comment object.
-	 */
-	return apply_filters( 'get_comment_date', $date, $d, $comment );
-}
-
-/**
- * Display the comment date of the current comment.
- *
- * @since 0.71
- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
- *
- * @param string         $d          Optional. The format of the date. Default user's settings.
- * @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to print the date.
- *                                   Default current comment.
- */
-function comment_date( $d = '', $comment_ID = 0 ) {
-	echo get_comment_date( $d, $comment_ID );
-}
-
-/**
- * Retrieve the excerpt of the current comment.
- *
- * Will cut each word and only output the first 20 words with '&hellip;' at the end.
- * If the word count is less than 20, then no truncating is done and no '&hellip;'
- * will appear.
- *
- * @since 1.5.0
- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
- *
- * @param int|WP_Comment $comment_ID  WP_Comment or ID of the comment for which to get the excerpt.
- *                                    Default current comment.
- * @return string The maybe truncated comment with 20 words or less.
- */
-function get_comment_excerpt( $comment_ID = 0 ) {
-	$comment = get_comment( $comment_ID );
-	$comment_text = strip_tags( str_replace( array( "\n", "\r" ), ' ', $comment->comment_content ) );
-	$words = explode( ' ', $comment_text );
-
-	/**
-	 * Filters the amount of words used in the comment excerpt.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param int $comment_excerpt_length The amount of words you want to display in the comment excerpt.
-	 */
-	$comment_excerpt_length = apply_filters( 'comment_excerpt_length', 20 );
-
-	$use_ellipsis = count( $words ) > $comment_excerpt_length;
-	if ( $use_ellipsis ) {
-		$words = array_slice( $words, 0, $comment_excerpt_length );
-	}
-
-	$excerpt = trim( join( ' ', $words ) );
-	if ( $use_ellipsis ) {
-		$excerpt .= '&hellip;';
-	}
-	/**
-	 * Filters the retrieved comment excerpt.
-	 *
-	 * @since 1.5.0
-	 * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
-	 *
-	 * @param string     $excerpt    The comment excerpt text.
-	 * @param int        $comment_ID The comment ID.
-	 * @param WP_Comment $comment    The comment object.
-	 */
-	return apply_filters( 'get_comment_excerpt', $excerpt, $comment->comment_ID, $comment );
-}
-
-/**
- * Display the excerpt of the current comment.
- *
- * @since 1.2.0
- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
- *
- * @param int|WP_Comment $comment_ID  WP_Comment or ID of the comment for which to print the excerpt.
- *                                    Default current comment.
- */
-function comment_excerpt( $comment_ID = 0 ) {
-	$comment         = get_comment( $comment_ID );
-	$comment_excerpt = get_comment_excerpt( $comment );
-
-	/**
-	 * Filters the comment excerpt for display.
-	 *
-	 * @since 1.2.0
-	 * @since 4.1.0 The `$comment_ID` parameter was added.
-	 *
-	 * @param string $comment_excerpt The comment excerpt text.
-	 * @param int    $comment_ID      The comment ID.
-	 */
-	echo apply_filters( 'comment_excerpt', $comment_excerpt, $comment->comment_ID );
-}
-
-/**
- * Retrieve the comment id of the current comment.
- *
- * @since 1.5.0
- *
- * @return int The comment ID.
- */
-function get_comment_ID() {
-	$comment = get_comment();
-
-	/**
-	 * Filters the returned comment ID.
-	 *
-	 * @since 1.5.0
-	 * @since 4.1.0 The `$comment_ID` parameter was added.
-	 *
-	 * @param int        $comment_ID The current comment ID.
-	 * @param WP_Comment $comment    The comment object.
-	 */
-	return apply_filters( 'get_comment_ID', $comment->comment_ID, $comment );
-}
-
-/**
- * Display the comment id of the current comment.
- *
- * @since 0.71
- */
-function comment_ID() {
-	echo get_comment_ID();
-}
-
-/**
- * Retrieve the link to a given comment.
- *
- * @since 1.5.0
- * @since 4.4.0 Added the ability for `$comment` to also accept a WP_Comment object. Added `$cpage` argument.
- *
- * @see get_page_of_comment()
- *
- * @global WP_Rewrite $wp_rewrite
- * @global bool       $in_comment_loop
- *
- * @param WP_Comment|int|null $comment Comment to retrieve. Default current comment.
- * @param array               $args {
- *     An array of optional arguments to override the defaults.
- *
- *     @type string     $type      Passed to get_page_of_comment().
- *     @type int        $page      Current page of comments, for calculating comment pagination.
- *     @type int        $per_page  Per-page value for comment pagination.
- *     @type int        $max_depth Passed to get_page_of_comment().
- *     @type int|string $cpage     Value to use for the comment's "comment-page" or "cpage" value.
- *                                 If provided, this value overrides any value calculated from `$page`
- *                                 and `$per_page`.
- * }
- * @return string The permalink to the given comment.
- */
-function get_comment_link( $comment = null, $args = array() ) {
-	global $wp_rewrite, $in_comment_loop;
-
-	$comment = get_comment($comment);
-
-	// Back-compat.
-	if ( ! is_array( $args ) ) {
-		$args = array( 'page' => $args );
-	}
-
-	$defaults = array(
-		'type'      => 'all',
-		'page'      => '',
-		'per_page'  => '',
-		'max_depth' => '',
-		'cpage'     => null,
-	);
-	$args = wp_parse_args( $args, $defaults );
-
-	$link = get_permalink( $comment->comment_post_ID );
-
-	// The 'cpage' param takes precedence.
-	if ( ! is_null( $args['cpage'] ) ) {
-		$cpage = $args['cpage'];
-
-	// No 'cpage' is provided, so we calculate one.
-	} else {
-		if ( '' === $args['per_page'] && get_option( 'page_comments' ) ) {
-			$args['per_page'] = get_option('comments_per_page');
-		}
-
-		if ( empty( $args['per_page'] ) ) {
-			$args['per_page'] = 0;
-			$args['page'] = 0;
-		}
-
-		$cpage = $args['page'];
-
-		if ( '' == $cpage ) {
-			if ( ! empty( $in_comment_loop ) ) {
-				$cpage = get_query_var( 'cpage' );
-			} else {
-				// Requires a database hit, so we only do it when we can't figure out from context.
-				$cpage = get_page_of_comment( $comment->comment_ID, $args );
-			}
-		}
-
-		/*
-		 * If the default page displays the oldest comments, the permalinks for comments on the default page
-		 * do not need a 'cpage' query var.
-		 */
-		if ( 'oldest' === get_option( 'default_comments_page' ) && 1 === $cpage ) {
-			$cpage = '';
-		}
-	}
-
-	if ( $cpage && get_option( 'page_comments' ) ) {
-		if ( $wp_rewrite->using_permalinks() ) {
-			if ( $cpage ) {
-				$link = trailingslashit( $link ) . $wp_rewrite->comments_pagination_base . '-' . $cpage;
-			}
-
-			$link = user_trailingslashit( $link, 'comment' );
-		} elseif ( $cpage ) {
-			$link = add_query_arg( 'cpage', $cpage, $link );
-		}
-
-	}
-
-	if ( $wp_rewrite->using_permalinks() ) {
-		$link = user_trailingslashit( $link, 'comment' );
-	}
-
-	$link = $link . '#comment-' . $comment->comment_ID;
-
-	/**
-	 * Filters the returned single comment permalink.
-	 *
-	 * @since 2.8.0
-	 * @since 4.4.0 Added the `$cpage` parameter.
-	 *
-	 * @see get_page_of_comment()
-	 *
-	 * @param string     $link    The comment permalink with '#comment-$id' appended.
-	 * @param WP_Comment $comment The current comment object.
-	 * @param array      $args    An array of arguments to override the defaults.
-	 * @param int        $cpage   The calculated 'cpage' value.
-	 */
-	return apply_filters( 'get_comment_link', $link, $comment, $args, $cpage );
-}
-
-/**
- * Retrieves the link to the current post comments.
- *
- * @since 1.5.0
- *
- * @param int|WP_Post $post_id Optional. Post ID or WP_Post object. Default is global $post.
- * @return string The link to the comments.
- */
-function get_comments_link( $post_id = 0 ) {
-	$hash = get_comments_number( $post_id ) ? '#comments' : '#respond';
-	$comments_link = get_permalink( $post_id ) . $hash;
-
-	/**
-	 * Filters the returned post comments permalink.
-	 *
-	 * @since 3.6.0
-	 *
-	 * @param string      $comments_link Post comments permalink with '#comments' appended.
-	 * @param int|WP_Post $post_id       Post ID or WP_Post object.
-	 */
-	return apply_filters( 'get_comments_link', $comments_link, $post_id );
-}
-
-/**
- * Display the link to the current post comments.
- *
- * @since 0.71
- *
- * @param string $deprecated   Not Used.
- * @param string $deprecated_2 Not Used.
- */
-function comments_link( $deprecated = '', $deprecated_2 = '' ) {
-	if ( !empty( $deprecated ) )
-		_deprecated_argument( __FUNCTION__, '0.72' );
-	if ( !empty( $deprecated_2 ) )
-		_deprecated_argument( __FUNCTION__, '1.3.0' );
-	echo esc_url( get_comments_link() );
-}
-
-/**
- * Retrieve the amount of comments a post has.
- *
- * @since 1.5.0
- *
- * @param int|WP_Post $post_id Optional. Post ID or WP_Post object. Default is global $post.
- * @return int The number of comments a post has.
- */
-function get_comments_number( $post_id = 0 ) {
-	$post = get_post( $post_id );
-
-	if ( ! $post ) {
-		$count = 0;
-	} else {
-		$count = $post->comment_count;
-		$post_id = $post->ID;
-	}
-
-	/**
-	 * Filters the returned comment count for a post.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param int $count   Number of comments a post has.
-	 * @param int $post_id Post ID.
-	 */
-	return apply_filters( 'get_comments_number', $count, $post_id );
-}
-
-/**
- * Display the language string for the number of comments the current post has.
- *
- * @since 0.71
- *
- * @param string $zero       Optional. Text for no comments. Default false.
- * @param string $one        Optional. Text for one comment. Default false.
- * @param string $more       Optional. Text for more than one comment. Default false.
- * @param string $deprecated Not used.
- */
-function comments_number( $zero = false, $one = false, $more = false, $deprecated = '' ) {
-	if ( ! empty( $deprecated ) ) {
-		_deprecated_argument( __FUNCTION__, '1.3.0' );
-	}
-	echo get_comments_number_text( $zero, $one, $more );
-}
-
-/**
- * Display the language string for the number of comments the current post has.
- *
- * @since 4.0.0
- *
- * @param string $zero Optional. Text for no comments. Default false.
- * @param string $one  Optional. Text for one comment. Default false.
- * @param string $more Optional. Text for more than one comment. Default false.
- */
-function get_comments_number_text( $zero = false, $one = false, $more = false ) {
-	$number = get_comments_number();
-
-	if ( $number > 1 ) {
-		if ( false === $more ) {
-			/* translators: %s: number of comments */
-			$output = sprintf( _n( '%s Comment', '%s Comments', $number ), number_format_i18n( $number ) );
-		} else {
-			// % Comments
-			/* translators: If comment number in your language requires declension,
-			 * translate this to 'on'. Do not translate into your own language.
-			 */
-			if ( 'on' === _x( 'off', 'Comment number declension: on or off' ) ) {
-				$text = preg_replace( '#<span class="screen-reader-text">.+?</span>#', '', $more );
-				$text = preg_replace( '/&.+?;/', '', $text ); // Kill entities
-				$text = trim( strip_tags( $text ), '% ' );
-
-				// Replace '% Comments' with a proper plural form
-				if ( $text && ! preg_match( '/[0-9]+/', $text ) && false !== strpos( $more, '%' ) ) {
-					/* translators: %s: number of comments */
-					$new_text = _n( '%s Comment', '%s Comments', $number );
-					$new_text = trim( sprintf( $new_text, '' ) );
-
-					$more = str_replace( $text, $new_text, $more );
-					if ( false === strpos( $more, '%' ) ) {
-						$more = '% ' . $more;
-					}
-				}
-			}
-
-			$output = str_replace( '%', number_format_i18n( $number ), $more );
-		}
-	} elseif ( $number == 0 ) {
-		$output = ( false === $zero ) ? __( 'No Comments' ) : $zero;
-	} else { // must be one
-		$output = ( false === $one ) ? __( '1 Comment' ) : $one;
-	}
-	/**
-	 * Filters the comments count for display.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @see _n()
-	 *
-	 * @param string $output A translatable string formatted based on whether the count
-	 *                       is equal to 0, 1, or 1+.
-	 * @param int    $number The number of post comments.
-	 */
-	return apply_filters( 'comments_number', $output, $number );
-}
-
-/**
- * Retrieve the text of the current comment.
- *
- * @since 1.5.0
- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
- *
- * @see Walker_Comment::comment()
- *
- * @param int|WP_Comment  $comment_ID WP_Comment or ID of the comment for which to get the text.
- *                                    Default current comment.
- * @param array           $args       Optional. An array of arguments. Default empty.
- * @return string The comment content.
- */
-function get_comment_text( $comment_ID = 0, $args = array() ) {
-	$comment = get_comment( $comment_ID );
-
-	/**
-	 * Filters the text of a comment.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @see Walker_Comment::comment()
-	 *
-	 * @param string     $comment_content Text of the comment.
-	 * @param WP_Comment $comment         The comment object.
-	 * @param array      $args            An array of arguments.
-	 */
-	return apply_filters( 'get_comment_text', $comment->comment_content, $comment, $args );
-}
-
-/**
- * Display the text of the current comment.
- *
- * @since 0.71
- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
- *
- * @see Walker_Comment::comment()
- *
- * @param int|WP_Comment  $comment_ID WP_Comment or ID of the comment for which to print the text.
- *                                    Default current comment.
- * @param array           $args       Optional. An array of arguments. Default empty array. Default empty.
- */
-function comment_text( $comment_ID = 0, $args = array() ) {
-	$comment = get_comment( $comment_ID );
-
-	$comment_text = get_comment_text( $comment, $args );
-	/**
-	 * Filters the text of a comment to be displayed.
-	 *
-	 * @since 1.2.0
-	 *
-	 * @see Walker_Comment::comment()
-	 *
-	 * @param string     $comment_text Text of the current comment.
-	 * @param WP_Comment $comment      The comment object.
-	 * @param array      $args         An array of arguments.
-	 */
-	echo apply_filters( 'comment_text', $comment_text, $comment, $args );
-}
-
-/**
- * Retrieve the comment time of the current comment.
- *
- * @since 1.5.0
- *
- * @param string $d         Optional. The format of the time. Default user's settings.
- * @param bool   $gmt       Optional. Whether to use the GMT date. Default false.
- * @param bool   $translate Optional. Whether to translate the time (for use in feeds).
- *                          Default true.
- * @return string The formatted time.
- */
-function get_comment_time( $d = '', $gmt = false, $translate = true ) {
-	$comment = get_comment();
-
-	$comment_date = $gmt ? $comment->comment_date_gmt : $comment->comment_date;
-	if ( '' == $d )
-		$date = mysql2date(get_option('time_format'), $comment_date, $translate);
-	else
-		$date = mysql2date($d, $comment_date, $translate);
-
-	/**
-	 * Filters the returned comment time.
-	 *
-	 * @since 1.5.0
-	 *
-	 * @param string|int $date      The comment time, formatted as a date string or Unix timestamp.
-	 * @param string     $d         Date format.
-	 * @param bool       $gmt       Whether the GMT date is in use.
-	 * @param bool       $translate Whether the time is translated.
-	 * @param WP_Comment $comment   The comment object.
-	 */
-	return apply_filters( 'get_comment_time', $date, $d, $gmt, $translate, $comment );
-}
-
-/**
- * Display the comment time of the current comment.
- *
- * @since 0.71
- *
- * @param string $d Optional. The format of the time. Default user's settings.
- */
-function comment_time( $d = '' ) {
-	echo get_comment_time($d);
-}
-
-/**
- * Retrieve the comment type of the current comment.
- *
- * @since 1.5.0
- * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
- *
- * @param int|WP_Comment $comment_ID Optional. WP_Comment or ID of the comment for which to get the type.
- *                                   Default current comment.
- * @return string The comment type.
- */
-function get_comment_type( $comment_ID = 0 ) {
-	$comment = get_comment( $comment_ID );
-	if ( '' == $comment->comment_type )
-		$comment->comment_type = 'comment';
-
-	/**
-	 * Filters the returned comment type.
-	 *
-	 * @since 1.5.0
-	 * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
-	 *
-	 * @param string     $comment_type The type of comment, such as 'comment', 'pingback', or 'trackback'.
-	 * @param int 	     $comment_ID   The comment ID.
-	 * @param WP_Comment $comment      The comment object.
-	 */
-	return apply_filters( 'get_comment_type', $comment->comment_type, $comment->comment_ID, $comment );
-}
-
-/**
- * Display the comment type of the current comment.
- *
- * @since 0.71
- *
- * @param string $commenttxt   Optional. String to display for comment type. Default false.
- * @param string $trackbacktxt Optional. String to display for trackback type. Default false.
- * @param string $pingbacktxt  Optional. String to display for pingback type. Default false.
- */
-function comment_type( $commenttxt = false, $trackbacktxt = false, $pingbacktxt = false ) {
-	if ( false === $commenttxt ) $commenttxt = _x( 'Comment', 'noun' );
-	if ( false === $trackbacktxt ) $trackbacktxt = __( 'Trackback' );
-	if ( false === $pingbacktxt ) $pingbacktxt = __( 'Pingback' );
-	$type = get_comment_type();
-	switch( $type ) {
-		case 'trackback' :
-			echo $trackbacktxt;
-			break;
-		case 'pingback' :
-			echo $pingbacktxt;
-			break;
-		default :
-			echo $commenttxt;
-	}
-}
-
-/**
- * Retrieve The current post's trackback URL.
- *
- * There is a check to see if permalink's have been enabled and if so, will
- * retrieve the pretty path. If permalinks weren't enabled, the ID of the
- * current post is used and appended to the correct page to go to.
- *
- * @since 1.5.0
- *
- * @return string The trackback URL after being filtered.
- */
-function get_trackback_url() {
-	if ( '' != get_option('permalink_structure') )
-		$tb_url = trailingslashit(get_permalink()) . user_trailingslashit('trackback', 'single_trackback');
-	else
-		$tb_url = get_option('siteurl') . '/wp-trackback.php?p=' . get_the_ID();
-
-	/**
-	 * Filters the returned trackback URL.
-	 *
-	 * @since 2.2.0
-	 *
-	 * @param string $tb_url The trackback URL.
-	 */
-	return apply_filters( 'trackback_url', $tb_url );
-}
-
-/**
- * Display the current post's trackback URL.
- *
- * @since 0.71
- *
- * @param bool $deprecated_echo Not used.
- * @return void|string Should only be used to echo the trackback URL, use get_trackback_url()
- *                     for the result instead.
- */
-function trackback_url( $deprecated_echo = true ) {
-	if ( true !== $deprecated_echo ) {
-		_deprecated_argument( __FUNCTION__, '2.5.0',
-			/* translators: %s: get_trackback_url() */
-			sprintf( __( 'Use %s instead if you do not want the value echoed.' ),
-				'<code>get_trackback_url()</code>'
-			)
-		);
-	}
-
-	if ( $deprecated_echo ) {
-		echo get_trackback_url();
-	} else {
-		return get_trackback_url();
-	}
-}
-
-/**
- * Generate and display the RDF for the trackback information of current post.
- *
- * Deprecated in 3.0.0, and restored in 3.0.1.
- *
- * @since 0.71
- *
- * @param int $deprecated Not used (Was $timezone = 0).
- */
-function trackback_rdf( $deprecated = '' ) {
-	if ( ! empty( $deprecated ) ) {
-		_deprecated_argument( __FUNCTION__, '2.5.0' );
-	}
-
-	if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && false !== stripos( $_SERVER['HTTP_USER_AGENT'], 'W3C_Validator' ) ) {
-		return;
-	}
-
-	echo '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-			xmlns:dc="http://purl.org/dc/elements/1.1/"
-			xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
-		<rdf:Description rdf:about="';
-	the_permalink();
-	echo '"'."\n";
-	echo '    dc:identifier="';
-	the_permalink();
-	echo '"'."\n";
-	echo '    dc:title="'.str_replace('--', '&#x2d;&#x2d;', wptexturize(strip_tags(get_the_title()))).'"'."\n";
-	echo '    trackback:ping="'.get_trackback_url().'"'." />\n";
-	echo '</rdf:RDF>';
-}
-
-/**
- * Whether the current post is open for comments.
- *
- * @since 1.5.0
- *
- * @param int|WP_Post $post_id Post ID or WP_Post object. Default current post.
- * @return bool True if the comments are open.
- */
-function comments_open( $post_id = null ) {
-
-	$_post = get_post($post_id);
-
-	$open = ( 'open' == $_post->comment_status );
-
-	/**
-	 * Filters whether the current post is open for comments.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param bool        $open    Whether the current post is open for comments.
-	 * @param int|WP_Post $post_id The post ID or WP_Post object.
-	 */
-	return apply_filters( 'comments_open', $open, $post_id );
-}
-
-/**
- * Whether the current post is open for pings.
- *
- * @since 1.5.0
- *
- * @param int|WP_Post $post_id Post ID or WP_Post object. Default current post.
- * @return bool True if pings are accepted
- */
-function pings_open( $post_id = null ) {
-
-	$_post = get_post($post_id);
-
-	$open = ( 'open' == $_post->ping_status );
-
-	/**
-	 * Filters whether the current post is open for pings.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param bool        $open    Whether the current post is open for pings.
-	 * @param int|WP_Post $post_id The post ID or WP_Post object.
-	 */
-	return apply_filters( 'pings_open', $open, $post_id );
-}
-
-/**
- * Display form token for unfiltered comments.
- *
- * Will only display nonce token if the current user has permissions for
- * unfiltered html. Won't display the token for other users.
- *
- * The function was backported to 2.0.10 and was added to versions 2.1.3 and
- * above. Does not exist in versions prior to 2.0.10 in the 2.0 branch and in
- * the 2.1 branch, prior to 2.1.3. Technically added in 2.2.0.
- *
- * Backported to 2.0.10.
- *
- * @since 2.1.3
- */
-function wp_comment_form_unfiltered_html_nonce() {
-	$post = get_post();
-	$post_id = $post ? $post->ID : 0;
-
-	if ( current_user_can( 'unfiltered_html' ) ) {
-		wp_nonce_field( 'unfiltered-html-comment_' . $post_id, '_wp_unfiltered_html_comment_disabled', false );
-		echo "<script>(function(){if(window===window.parent){document.getElementById('_wp_unfiltered_html_comment_disabled').name='_wp_unfiltered_html_comment';}})();</script>\n";
-	}
-}
-
-/**
- * Load the comment template specified in $file.
- *
- * Will not display the comments template if not on single post or page, or if
- * the post does not have comments.
- *
- * Uses the WordPress database object to query for the comments. The comments
- * are passed through the {@see 'comments_array'} filter hook with the list of comments
- * and the post ID respectively.
- *
- * The `$file` path is passed through a filter hook called {@see 'comments_template'},
- * which includes the TEMPLATEPATH and $file combined. Tries the $filtered path
- * first and if it fails it will require the default comment template from the
- * default theme. If either does not exist, then the WordPress process will be
- * halted. It is advised for that reason, that the default theme is not deleted.
- *
- * Will not try to get the comments if the post has none.
- *
- * @since 1.5.0
- *
- * @global WP_Query   $wp_query
- * @global WP_Post    $post
- * @global wpdb       $wpdb
- * @global int        $id
- * @global WP_Comment $comment
- * @global string     $user_login
- * @global int        $user_ID
- * @global string     $user_identity
- * @global bool       $overridden_cpage
- * @global bool       $withcomments
- *
- * @param string $file              Optional. The file to load. Default '/comments.php'.
- * @param bool   $separate_comments Optional. Whether to separate the comments by comment type.
- *                                  Default false.
- */
-function comments_template( $file = '/comments.php', $separate_comments = false ) {
-	global $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity, $overridden_cpage;
-
-	if ( !(is_single() || is_page() || $withcomments) || empty($post) )
-		return;
-
-	if ( empty($file) )
-		$file = '/comments.php';
-
-	$req = get_option('require_name_email');
-
-	/*
-	 * Comment author information fetched from the comment cookies.
-	 */
-	$commenter = wp_get_current_commenter();
-
-	/*
-	 * The name of the current comment author escaped for use in attributes.
-	 * Escaped by sanitize_comment_cookies().
-	 */
-	$comment_author = $commenter['comment_author'];
-
-	/*
-	 * The email address of the current comment author escaped for use in attributes.
-	 * Escaped by sanitize_comment_cookies().
-	 */
-	$comment_author_email = $commenter['comment_author_email'];
-
-	/*
-	 * The url of the current comment author escaped for use in attributes.
-	 */
-	$comment_author_url = esc_url($commenter['comment_author_url']);
-
-	$comment_args = array(
-		'orderby' => 'comment_date_gmt',
-		'order' => 'ASC',
-		'status'  => 'approve',
-		'post_id' => $post->ID,
-		'no_found_rows' => false,
-		'update_comment_meta_cache' => false, // We lazy-load comment meta for performance.
-	);
-
-	if ( get_option('thread_comments') ) {
-		$comment_args['hierarchical'] = 'threaded';
-	} else {
-		$comment_args['hierarchical'] = false;
-	}
-
-	if ( $user_ID ) {
-		$comment_args['include_unapproved'] = array( $user_ID );
-	} elseif ( ! empty( $comment_author_email ) ) {
-		$comment_args['include_unapproved'] = array( $comment_author_email );
-	}
-
-	$per_page = 0;
-	if ( get_option( 'page_comments' ) ) {
-		$per_page = (int) get_query_var( 'comments_per_page' );
-		if ( 0 === $per_page ) {
-			$per_page = (int) get_option( 'comments_per_page' );
-		}
-
-		$comment_args['number'] = $per_page;
-		$page = (int) get_query_var( 'cpage' );
-
-		if ( $page ) {
-			$comment_args['offset'] = ( $page - 1 ) * $per_page;
-		} elseif ( 'oldest' === get_option( 'default_comments_page' ) ) {
-			$comment_args['offset'] = 0;
-		} else {
-			// If fetching the first page of 'newest', we need a top-level comment count.
-			$top_level_query = new WP_Comment_Query();
-			$top_level_args  = array(
-				'count'   => true,
-				'orderby' => false,
-				'post_id' => $post->ID,
-				'status'  => 'approve',
-			);
-
-			if ( $comment_args['hierarchical'] ) {
-				$top_level_args['parent'] = 0;
-			}
-
-			if ( isset( $comment_args['include_unapproved'] ) ) {
-				$top_level_args['include_unapproved'] = $comment_args['include_unapproved'];
-			}
-
-			$top_level_count = $top_level_query->query( $top_level_args );
-
-			$comment_args['offset'] = ( ceil( $top_level_count / $per_page ) - 1 ) * $per_page;
-		}
-	}
-
-	/**
-	 * Filters the arguments used to query comments in comments_template().
-	 *
-	 * @since 4.5.0
-	 *
-	 * @see WP_Comment_Query::__construct()
-	 *
-	 * @param array $comment_args {
-	 *     Array of WP_Comment_Query arguments.
-	 *
-	 *     @type string|array $orderby                   Field(s) to order by.
-	 *     @type string       $order                     Order of results. Accepts 'ASC' or 'DESC'.
-	 *     @type string       $status                    Comment status.
-	 *     @type array        $include_unapproved        Array of IDs or email addresses whose unapproved comments
-	 *                                                   will be included in results.
-	 *     @type int          $post_id                   ID of the post.
-	 *     @type bool         $no_found_rows             Whether to refrain from querying for found rows.
-	 *     @type bool         $update_comment_meta_cache Whether to prime cache for comment meta.
-	 *     @type bool|string  $hierarchical              Whether to query for comments hierarchically.
-	 *     @type int          $offset                    Comment offset.
-	 *     @type int          $number                    Number of comments to fetch.
-	 * }
-	 */
-	$comment_args = apply_filters( 'comments_template_query_args', $comment_args );
-	$comment_query = new WP_Comment_Query( $comment_args );
-	$_comments = $comment_query->comments;
-
-	// Trees must be flattened before they're passed to the walker.
-	if ( $comment_args['hierarchical'] ) {
-		$comments_flat = array();
-		foreach ( $_comments as $_comment ) {
-			$comments_flat[]  = $_comment;
-			$comment_children = $_comment->get_children( array(
-				'format' => 'flat',
-				'status' => $comment_args['status'],
-				'orderby' => $comment_args['orderby']
-			) );
-
-			foreach ( $comment_children as $comment_child ) {
-				$comments_flat[] = $comment_child;
-			}
-		}
-	} else {
-		$comments_flat = $_comments;
-	}
-
-	/**
-	 * Filters the comments array.
-	 *
-	 * @since 2.1.0
-	 *
-	 * @param array $comments Array of comments supplied to the comments template.
-	 * @param int   $post_ID  Post ID.
-	 */
-	$wp_query->comments = apply_filters( 'comments_array', $comments_flat, $post->ID );
-
-	$comments = &$wp_query->comments;
-	$wp_query->comment_count = count($wp_query->comments);
-	$wp_query->max_num_comment_pages = $comment_query->max_num_pages;
-
-	if ( $separate_comments ) {
-		$wp_query->comments_by_type = separate_comments($comments);
-		$comments_by_type = &$wp_query->comments_by_type;
-	} else {
-		$wp_query->comments_by_type = array();
-	}
-
-	$overridden_cpage = false;
-	if ( '' == get_query_var( 'cpage' ) && $wp_query->max_num_comment_pages > 1 ) {
-		set_query_var( 'cpage', 'newest' == get_option('default_comments_page') ? get_comment_pages_count() : 1 );
-		$overridden_cpage = true;
-	}
-
-	if ( !defined('COMMENTS_TEMPLATE') )
-		define('COMMENTS_TEMPLATE', true);
-
-	$theme_template = STYLESHEETPATH . $file;
-	/**
-	 * Filters the path to the theme template file used for the comments template.
-	 *
-	 * @since 1.5.1
-	 *
-	 * @param string $theme_template The path to the theme template file.
-	 */
-	$include = apply_filters( 'comments_template', $theme_template );
-	if ( file_exists( $include ) )
-		require( $include );
-	elseif ( file_exists( TEMPLATEPATH . $file ) )
-		require( TEMPLATEPATH . $file );
-	else // Backward compat code will be removed in a future release
-		require( ABSPATH . WPINC . '/theme-compat/comments.php');
-}
-
-/**
- * Displays the link to the comments for the current post ID.
- *
- * @since 0.71
- *
- * @param string $zero      Optional. String to display when no comments. Default false.
- * @param string $one       Optional. String to display when only one comment is available.
- *                          Default false.
- * @param string $more      Optional. String to display when there are more than one comment.
- *                          Default false.
- * @param string $css_class Optional. CSS class to use for comments. Default empty.
- * @param string $none      Optional. String to display when comments have been turned off.
- *                          Default false.
- */
-function comments_popup_link( $zero = false, $one = false, $more = false, $css_class = '', $none = false ) {
-	$id = get_the_ID();
-	$title = get_the_title();
-	$number = get_comments_number( $id );
-
-	if ( false === $zero ) {
-		/* translators: %s: post title */
-		$zero = sprintf( __( 'No Comments<span class="screen-reader-text"> on %s</span>' ), $title );
-	}
-
-	if ( false === $one ) {
-		/* translators: %s: post title */
-		$one = sprintf( __( '1 Comment<span class="screen-reader-text"> on %s</span>' ), $title );
-	}
-
-	if ( false === $more ) {
-		/* translators: 1: Number of comments 2: post title */
-		$more = _n( '%1$s Comment<span class="screen-reader-text"> on %2$s</span>', '%1$s Comments<span class="screen-reader-text"> on %2$s</span>', $number );
-		$more = sprintf( $more, number_format_i18n( $number ), $title );
-	}
-
-	if ( false === $none ) {
-		/* translators: %s: post title */
-		$none = sprintf( __( 'Comments Off<span class="screen-reader-text"> on %s</span>' ), $title );
-	}
-
-	if ( 0 == $number && !comments_open() && !pings_open() ) {
-		echo '<span' . ((!empty($css_class)) ? ' class="' . esc_attr( $css_class ) . '"' : '') . '>' . $none . '</span>';
-		return;
-	}
-
-	if ( post_password_required() ) {
-		_e( 'Enter your password to view comments.' );
-		return;
-	}
-
-	echo '<a href="';
-	if ( 0 == $number ) {
-		$respond_link = get_permalink() . '#respond';
-		/**
-		 * Filters the respond link when a post has no comments.
-		 *
-		 * @since 4.4.0
-		 *
-		 * @param string $respond_link The default response link.
-		 * @param integer $id The post ID.
-		 */
-		echo apply_filters( 'respond_link', $respond_link, $id );
-	} else {
-		comments_link();
-	}
-	echo '"';
-
-	if ( !empty( $css_class ) ) {
-		echo ' class="'.$css_class.'" ';
-	}
-
-	$attributes = '';
-	/**
-	 * Filters the comments link attributes for display.
-	 *
-	 * @since 2.5.0
-	 *
-	 * @param string $attributes The comments link attributes. Default empty.
-	 */
-	echo apply_filters( 'comments_popup_link_attributes', $attributes );
-
-	echo '>';
-	comments_number( $zero, $one, $more );
-	echo '</a>';
-}
-
-/**
- * Retrieve HTML content for reply to comment link.
- *
- * @since 2.7.0
- * @since 4.4.0 Added the ability for `$comment` to also accept a WP_Comment object.
- *
- * @param array $args {
- *     Optional. Override default arguments.
- *
- *     @type string $add_below  The first part of the selector used to identify the comment to respond below.
- *                              The resulting value is passed as the first parameter to addComment.moveForm(),
- *                              concatenated as $add_below-$comment->comment_ID. Default 'comment'.
- *     @type string $respond_id The selector identifying the responding comment. Passed as the third parameter
- *                              to addComment.moveForm(), and appended to the link URL as a hash value.
- *                              Default 'respond'.
- *     @type string $reply_text The text of the Reply link. Default 'Reply'.
- *     @type string $login_text The text of the link to reply if logged out. Default 'Log in to Reply'.
- *     @type int    $depth'     The depth of the new comment. Must be greater than 0 and less than the value
- *                              of the 'thread_comments_depth' option set in Settings > Discussion. Default 0.
- *     @type string $before     The text or HTML to add before the reply link. Default empty.
- *     @type string $after      The text or HTML to add after the reply link. Default empty.
- * }
- * @param int|WP_Comment $comment Comment being replied to. Default current comment.
- * @param int|WP_Post    $post    Post ID or WP_Post object the comment is going to be displayed on.
- *                                Default current post.
- * @return void|false|string Link to show comment form, if successful. False, if comments are closed.
- */
-function get_comment_reply_link( $args = array(), $comment = null, $post = null ) {
-	$defaults = array(
-		'add_below'     => 'comment',
-		'respond_id'    => 'respond',
-		'reply_text'    => __( 'Reply' ),
-		'reply_to_text' => __( 'Reply to %s' ),
-		'login_text'    => __( 'Log in to Reply' ),
-		'depth'         => 0,
-		'before'        => '',
-		'after'         => ''
-	);
-
-	$args = wp_parse_args( $args, $defaults );
-
-	if ( 0 == $args['depth'] || $args['max_depth'] <= $args['depth'] ) {
-		return;
-	}
-
-	$comment = get_comment( $comment );
-
-	if ( empty( $post ) ) {
-		$post = $comment->comment_post_ID;
-	}
-
-	$post = get_post( $post );
-
-	if ( ! comments_open( $post->ID ) ) {
-		return false;
-	}
-
-	/**
-	 * Filters the comment reply link arguments.
-	 *
-	 * @since 4.1.0
-	 *
-	 * @param array      $args    Comment reply link arguments. See get_comment_reply_link()
-	 *                            for more information on accepted arguments.
-	 * @param WP_Comment $comment The object of the comment being replied to.
-	 * @param WP_Post    $post    The WP_Post object.
-	 */
-	$args = apply_filters( 'comment_reply_link_args', $args, $comment, $post );
-
-	if ( get_option( 'comment_registration' ) && ! is_user_logged_in() ) {
-		$link = sprintf( '<a rel="nofollow" class="comment-reply-login" href="%s">%s</a>',
-			esc_url( wp_login_url( get_permalink() ) ),
-			$args['login_text']
-		);
-	} else {
-		$onclick = sprintf( 'return addComment.moveForm( "%1$s-%2$s", "%2$s", "%3$s", "%4$s" )',
-			$args['add_below'], $comment->comment_ID, $args['respond_id'], $post->ID
-		);
-
-		$link = sprintf( "<a rel='nofollow' class='comment-reply-link' href='%s' onclick='%s' aria-label='%s'>%s</a>",
-			esc_url( add_query_arg( 'replytocom', $comment->comment_ID, get_permalink( $post->ID ) ) ) . "#" . $args['respond_id'],
-			$onclick,
-			esc_attr( sprintf( $args['reply_to_text'], $comment->comment_author ) ),
-			$args['reply_text']
-		);
-	}
-
-	/**
-	 * Filters the comment reply link.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param string  $link    The HTML markup for the comment reply link.
-	 * @param array   $args    An array of arguments overriding the defaults.
-	 * @param object  $comment The object of the comment being replied.
-	 * @param WP_Post $post    The WP_Post object.
-	 */
-	return apply_filters( 'comment_reply_link', $args['before'] . $link . $args['after'], $args, $comment, $post );
-}
-
-/**
- * Displays the HTML content for reply to comment link.
- *
- * @since 2.7.0
- *
- * @see get_comment_reply_link()
- *
- * @param array       $args    Optional. Override default options.
- * @param int         $comment Comment being replied to. Default current comment.
- * @param int|WP_Post $post    Post ID or WP_Post object the comment is going to be displayed on.
- *                             Default current post.
- * @return mixed Link to show comment form, if successful. False, if comments are closed.
- */
-function comment_reply_link($args = array(), $comment = null, $post = null) {
-	echo get_comment_reply_link($args, $comment, $post);
-}
-
-/**
- * Retrieve HTML content for reply to post link.
- *
- * @since 2.7.0
- *
- * @param array $args {
- *     Optional. Override default arguments.
- *
- *     @type string $add_below  The first part of the selector used to identify the comment to respond below.
- *                              The resulting value is passed as the first parameter to addComment.moveForm(),
- *                              concatenated as $add_below-$comment->comment_ID. Default is 'post'.
- *     @type string $respond_id The selector identifying the responding comment. Passed as the third parameter
- *                              to addComment.moveForm(), and appended to the link URL as a hash value.
- *                              Default 'respond'.
- *     @type string $reply_text Text of the Reply link. Default is 'Leave a Comment'.
- *     @type string $login_text Text of the link to reply if logged out. Default is 'Log in to leave a Comment'.
- *     @type string $before     Text or HTML to add before the reply link. Default empty.
- *     @type string $after      Text or HTML to add after the reply link. Default empty.
- * }
- * @param int|WP_Post $post    Optional. Post ID or WP_Post object the comment is going to be displayed on.
- *                             Default current post.
- * @return false|null|string Link to show comment form, if successful. False, if comments are closed.
- */
-function get_post_reply_link($args = array(), $post = null) {
-	$defaults = array(
-		'add_below'  => 'post',
-		'respond_id' => 'respond',
-		'reply_text' => __('Leave a Comment'),
-		'login_text' => __('Log in to leave a Comment'),
-		'before'     => '',
-		'after'      => '',
-	);
-
-	$args = wp_parse_args($args, $defaults);
-
-	$post = get_post($post);
-
-	if ( ! comments_open( $post->ID ) ) {
-		return false;
-	}
-
-	if ( get_option('comment_registration') && ! is_user_logged_in() ) {
-		$link = sprintf( '<a rel="nofollow" class="comment-reply-login" href="%s">%s</a>',
-			wp_login_url( get_permalink() ),
-			$args['login_text']
-		);
-	} else {
-		$onclick = sprintf( 'return addComment.moveForm( "%1$s-%2$s", "0", "%3$s", "%2$s" )',
-			$args['add_below'], $post->ID, $args['respond_id']
-		);
-
-		$link = sprintf( "<a rel='nofollow' class='comment-reply-link' href='%s' onclick='%s'>%s</a>",
-			get_permalink( $post->ID ) . '#' . $args['respond_id'],
-			$onclick,
-			$args['reply_text']
-		);
-	}
-	$formatted_link = $args['before'] . $link . $args['after'];
-
-	/**
-	 * Filters the formatted post comments link HTML.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param string      $formatted The HTML-formatted post comments link.
-	 * @param int|WP_Post $post      The post ID or WP_Post object.
-	 */
-	return apply_filters( 'post_comments_link', $formatted_link, $post );
-}
-
-/**
- * Displays the HTML content for reply to post link.
- *
- * @since 2.7.0
- *
- * @see get_post_reply_link()
- *
- * @param array       $args Optional. Override default options,
- * @param int|WP_Post $post Post ID or WP_Post object the comment is going to be displayed on.
- *                          Default current post.
- * @return string|bool|null Link to show comment form, if successful. False, if comments are closed.
- */
-function post_reply_link($args = array(), $post = null) {
-	echo get_post_reply_link($args, $post);
-}
-
-/**
- * Retrieve HTML content for cancel comment reply link.
- *
- * @since 2.7.0
- *
- * @param string $text Optional. Text to display for cancel reply link. Default empty.
- * @return string
- */
-function get_cancel_comment_reply_link( $text = '' ) {
-	if ( empty($text) )
-		$text = __('Click here to cancel reply.');
-
-	$style = isset($_GET['replytocom']) ? '' : ' style="display:none;"';
-	$link = esc_html( remove_query_arg('replytocom') ) . '#respond';
-
-	$formatted_link = '<a rel="nofollow" id="cancel-comment-reply-link" href="' . $link . '"' . $style . '>' . $text . '</a>';
-
-	/**
-	 * Filters the cancel comment reply link HTML.
-	 *
-	 * @since 2.7.0
-	 *
-	 * @param string $formatted_link The HTML-formatted cancel comment reply link.
-	 * @param string $link           Cancel comment reply link URL.
-	 * @param string $text           Cancel comment reply link text.
-	 */
-	return apply_filters( 'cancel_comment_reply_link', $formatted_link, $link, $text );
-}
-
-/**
- * Display HTML content for cancel comment reply link.
- *
- * @since 2.7.0
- *
- * @param string $text Optional. Text to display for cancel reply link. Default empty.
- */
-function cancel_comment_reply_link( $text = '' ) {
-	echo get_cancel_comment_reply_link($text);
-}
-
-/**
- * Retrieve hidden input HTML for replying to comments.
- *
- * @since 3.0.0
- *
- * @param int $id Optional. Post ID. Default current post ID.
- * @return string Hidden input HTML for replying to comments
- */
-function get_comment_id_fields( $id = 0 ) {
-	if ( empty( $id ) )
-		$id = get_the_ID();
-
-	$replytoid = isset($_GET['replytocom']) ? (int) $_GET['replytocom'] : 0;
-	$result  = "<input type='hidden' name='comment_post_ID' value='$id' id='comment_post_ID' />\n";
-	$result .= "<input type='hidden' name='comment_parent' id='comment_parent' value='$replytoid' />\n";
-
-	/**
-	 * Filters the returned comment id fields.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param string $result    The HTML-formatted hidden id field comment elements.
-	 * @param int    $id        The post ID.
-	 * @param int    $replytoid The id of the comment being replied to.
-	 */
-	return apply_filters( 'comment_id_fields', $result, $id, $replytoid );
-}
-
-/**
- * Output hidden input HTML for replying to comments.
- *
- * @since 2.7.0
- *
- * @param int $id Optional. Post ID. Default current post ID.
- */
-function comment_id_fields( $id = 0 ) {
-	echo get_comment_id_fields( $id );
-}
-
-/**
- * Display text based on comment reply status.
- *
- * Only affects users with JavaScript disabled.
- *
- * @internal The $comment global must be present to allow template tags access to the current
- *           comment. See https://core.trac.wordpress.org/changeset/36512.
- *
- * @since 2.7.0
- *
- * @global WP_Comment $comment Current comment.
- *
- * @param string $noreplytext  Optional. Text to display when not replying to a comment.
- *                             Default false.
- * @param string $replytext    Optional. Text to display when replying to a comment.
- *                             Default false. Accepts "%s" for the author of the comment
- *                             being replied to.
- * @param string $linktoparent Optional. Boolean to control making the author's name a link
- *                             to their comment. Default true.
- */
-function comment_form_title( $noreplytext = false, $replytext = false, $linktoparent = true ) {
-	global $comment;
-
-	if ( false === $noreplytext ) $noreplytext = __( 'Leave a Reply' );
-	if ( false === $replytext ) $replytext = __( 'Leave a Reply to %s' );
-
-	$replytoid = isset($_GET['replytocom']) ? (int) $_GET['replytocom'] : 0;
-
-	if ( 0 == $replytoid )
-		echo $noreplytext;
-	else {
-		// Sets the global so that template tags can be used in the comment form.
-		$comment = get_comment($replytoid);
-		$author = ( $linktoparent ) ? '<a href="#comment-' . get_comment_ID() . '">' . get_comment_author( $comment ) . '</a>' : get_comment_author( $comment );
-		printf( $replytext, $author );
-	}
-}
-
-/**
- * List comments.
- *
- * Used in the comments.php template to list comments for a particular post.
- *
- * @since 2.7.0
- *
- * @see WP_Query->comments
- *
- * @global WP_Query $wp_query
- * @global int      $comment_alt
- * @global int      $comment_depth
- * @global int      $comment_thread_alt
- * @global bool     $overridden_cpage
- * @global bool     $in_comment_loop
- *
- * @param string|array $args {
- *     Optional. Formatting options.
- *
- *     @type object $walker            Instance of a Walker class to list comments. Default null.
- *     @type int    $max_depth         The maximum comments depth. Default empty.
- *     @type string $style             The style of list ordering. Default 'ul'. Accepts 'ul', 'ol'.
- *     @type string $callback          Callback function to use. Default null.
- *     @type string $end-callback      Callback function to use at the end. Default null.
- *     @type string $type              Type of comments to list.
- *                                     Default 'all'. Accepts 'all', 'comment', 'pingback', 'trackback', 'pings'.
- *     @type int    $page              Page ID to list comments for. Default empty.
- *     @type int    $per_page          Number of comments to list per page. Default empty.
- *     @type int    $avatar_size       Height and width dimensions of the avatar size. Default 32.
- *     @type string $reverse_top_level Ordering of the listed comments. Default null. Accepts 'desc', 'asc'.
- *     @type bool   $reverse_children  Whether to reverse child comments in the list. Default null.
- *     @type string $format            How to format the comments list.
- *                                     Default 'html5' if the theme supports it. Accepts 'html5', 'xhtml'.
- *     @type bool   $short_ping        Whether to output short pings. Default false.
- *     @type bool   $echo              Whether to echo the output or return it. Default true.
- * }
- * @param array $comments Optional. Array of WP_Comment objects.
- */
-function wp_list_comments( $args = array(), $comments = null ) {
-	global $wp_query, $comment_alt, $comment_depth, $comment_thread_alt, $overridden_cpage, $in_comment_loop;
-
-	$in_comment_loop = true;
-
-	$comment_alt = $comment_thread_alt = 0;
-	$comment_depth = 1;
-
-	$defaults = array(
-		'walker'            => null,
-		'max_depth'         => '',
-		'style'             => 'ul',
-		'callback'          => null,
-		'end-callback'      => null,
-		'type'              => 'all',
-		'page'              => '',
-		'per_page'          => '',
-		'avatar_size'       => 32,
-		'reverse_top_level' => null,
-		'reverse_children'  => '',
-		'format'            => current_theme_supports( 'html5', 'comment-list' ) ? 'html5' : 'xhtml',
-		'short_ping'        => false,
-		'echo'              => true,
-	);
-
-	$r = wp_parse_args( $args, $defaults );
-
-	/**
-	 * Filters the arguments used in retrieving the comment list.
-	 *
-	 * @since 4.0.0
-	 *
-	 * @see wp_list_comments()
-	 *
-	 * @param array $r An array of arguments for displaying comments.
-	 */
-	$r = apply_filters( 'wp_list_comments_args', $r );
-
-	// Figure out what comments we'll be looping through ($_comments)
-	if ( null !== $comments ) {
-		$comments = (array) $comments;
-		if ( empty($comments) )
-			return;
-		if ( 'all' != $r['type'] ) {
-			$comments_by_type = separate_comments($comments);
-			if ( empty($comments_by_type[$r['type']]) )
-				return;
-			$_comments = $comments_by_type[$r['type']];
-		} else {
-			$_comments = $comments;
-		}
-	} else {
-		/*
-		 * If 'page' or 'per_page' has been passed, and does not match what's in $wp_query,
-		 * perform a separate comment query and allow Walker_Comment to paginate.
-		 */
-		if ( $r['page'] || $r['per_page'] ) {
-			$current_cpage = get_query_var( 'cpage' );
-			if ( ! $current_cpage ) {
-				$current_cpage = 'newest' === get_option( 'default_comments_page' ) ? 1 : $wp_query->max_num_comment_pages;
-			}
-
-			$current_per_page = get_query_var( 'comments_per_page' );
-			if ( $r['page'] != $current_cpage || $r['per_page'] != $current_per_page ) {
-				$comment_args = array(
-					'post_id' => get_the_ID(),
-					'orderby' => 'comment_date_gmt',
-					'order' => 'ASC',
-					'status' => 'approve',
-				);
-
-				if ( is_user_logged_in() ) {
-					$comment_args['include_unapproved'] = get_current_user_id();
-				} else {
-					$commenter = wp_get_current_commenter();
-					if ( $commenter['comment_author_email'] ) {
-						$comment_args['include_unapproved'] = $commenter['comment_author_email'];
-					}
-				}
-
-				$comments = get_comments( $comment_args );
-
-				if ( 'all' != $r['type'] ) {
-					$comments_by_type = separate_comments( $comments );
-					if ( empty( $comments_by_type[ $r['type'] ] ) ) {
-						return;
-					}
-
-					$_comments = $comments_by_type[ $r['type'] ];
-				} else {
-					$_comments = $comments;
-				}
-			}
-
-		// Otherwise, fall back on the comments from `$wp_query->comments`.
-		} else {
-			if ( empty($wp_query->comments) )
-				return;
-			if ( 'all' != $r['type'] ) {
-				if ( empty($wp_query->comments_by_type) )
-					$wp_query->comments_by_type = separate_comments($wp_query->comments);
-				if ( empty($wp_query->comments_by_type[$r['type']]) )
-					return;
-				$_comments = $wp_query->comments_by_type[$r['type']];
-			} else {
-				$_comments = $wp_query->comments;
-			}
-
-			if ( $wp_query->max_num_comment_pages ) {
-				$default_comments_page = get_option( 'default_comments_page' );
-				$cpage = get_query_var( 'cpage' );
-				if ( 'newest' === $default_comments_page ) {
-					$r['cpage'] = $cpage;
-
-				/*
-				 * When first page shows oldest comments, post permalink is the same as
-				 * the comment permalink.
-				 */
-				} elseif ( $cpage == 1 ) {
-					$r['cpage'] = '';
-				} else {
-					$r['cpage'] = $cpage;
-				}
-
-				$r['page'] = 0;
-				$r['per_page'] = 0;
-			}
-		}
-	}
-
-	if ( '' === $r['per_page'] && get_option( 'page_comments' ) ) {
-		$r['per_page'] = get_query_var('comments_per_page');
-	}
-
-	if ( empty($r['per_page']) ) {
-		$r['per_page'] = 0;
-		$r['page'] = 0;
-	}
-
-	if ( '' === $r['max_depth'] ) {
-		if ( get_option('thread_comments') )
-			$r['max_depth'] = get_option('thread_comments_depth');
-		else
-			$r['max_depth'] = -1;
-	}
-
-	if ( '' === $r['page'] ) {
-		if ( empty($overridden_cpage) ) {
-			$r['page'] = get_query_var('cpage');
-		} else {
-			$threaded = ( -1 != $r['max_depth'] );
-			$r['page'] = ( 'newest' == get_option('default_comments_page') ) ? get_comment_pages_count($_comments, $r['per_page'], $threaded) : 1;
-			set_query_var( 'cpage', $r['page'] );
-		}
-	}
-	// Validation check
-	$r['page'] = intval($r['page']);
-	if ( 0 == $r['page'] && 0 != $r['per_page'] )
-		$r['page'] = 1;
-
-	if ( null === $r['reverse_top_level'] )
-		$r['reverse_top_level'] = ( 'desc' == get_option('comment_order') );
-
-	wp_queue_comments_for_comment_meta_lazyload( $_comments );
-
-	if ( empty( $r['walker'] ) ) {
-		$walker = new Walker_Comment;
-	} else {
-		$walker = $r['walker'];
-	}
-
-	$output = $walker->paged_walk( $_comments, $r['max_depth'], $r['page'], $r['per_page'], $r );
-
-	$in_comment_loop = false;
-
-	if ( $r['echo'] ) {
-		echo $output;
-	} else {
-		return $output;
-	}
-}
-
-/**
- * Outputs a complete commenting form for use within a template.
- *
- * Most strings and form fields may be controlled through the $args array passed
- * into the function, while you may also choose to use the {@see 'comment_form_default_fields'}
- * filter to modify the array of default fields if you'd just like to add a new
- * one or remove a single field. All fields are also individually passed through
- * a filter of the {@see 'comment_form_field_$name'} where $name is the key used
- * in the array of fields.
- *
- * @since 3.0.0
- * @since 4.1.0 Introduced the 'class_submit' argument.
- * @since 4.2.0 Introduced the 'submit_button' and 'submit_fields' arguments.
- * @since 4.4.0 Introduced the 'class_form', 'title_reply_before', 'title_reply_after',
- *              'cancel_reply_before', and 'cancel_reply_after' arguments.
- * @since 4.5.0 The 'author', 'email', and 'url' form fields are limited to 245, 100,
- *              and 200 characters, respectively.
- * @since 4.6.0 Introduced the 'action' argument.
- *
- * @param array       $args {
- *     Optional. Default arguments and form fields to override.
- *
- *     @type array $fields {
- *         Default comment fields, filterable by default via the {@see 'comment_form_default_fields'} hook.
- *
- *         @type string $author Comment author field HTML.
- *         @type string $email  Comment author email field HTML.
- *         @type string $url    Comment author URL field HTML.
- *     }
- *     @type string $comment_field        The comment textarea field HTML.
- *     @type string $must_log_in          HTML element for a 'must be logged in to comment' message.
- *     @type string $logged_in_as         HTML element for a 'logged in as [user]' message.
- *     @type string $comment_notes_before HTML element for a message displayed before the comment fields
- *                                        if the user is not logged in.
- *                                        Default 'Your email address will not be published.'.
- *     @type string $comment_notes_after  HTML element for a message displayed after the textarea field.
- *     @type string $action               The comment form element action attribute. Default '/wp-comments-post.php'.
- *     @type string $id_form              The comment form element id attribute. Default 'commentform'.
- *     @type string $id_submit            The comment submit element id attribute. Default 'submit'.
- *     @type string $class_form           The comment form element class attribute. Default 'comment-form'.
- *     @type string $class_submit         The comment submit element class attribute. Default 'submit'.
- *     @type string $name_submit          The comment submit element name attribute. Default 'submit'.
- *     @type string $title_reply          The translatable 'reply' button label. Default 'Leave a Reply'.
- *     @type string $title_reply_to       The translatable 'reply-to' button label. Default 'Leave a Reply to %s',
- *                                        where %s is the author of the comment being replied to.
- *     @type string $title_reply_before   HTML displayed before the comment form title.
- *                                        Default: '<h3 id="reply-title" class="comment-reply-title">'.
- *     @type string $title_reply_after    HTML displayed after the comment form title.
- *                                        Default: '</h3>'.
- *     @type string $cancel_reply_before  HTML displayed before the cancel reply link.
- *     @type string $cancel_reply_after   HTML displayed after the cancel reply link.
- *     @type string $cancel_reply_link    The translatable 'cancel reply' button label. Default 'Cancel reply'.
- *     @type string $label_submit         The translatable 'submit' button label. Default 'Post a comment'.
- *     @type string $submit_button        HTML format for the Submit button.
- *                                        Default: '<input name="%1$s" type="submit" id="%2$s" class="%3$s" value="%4$s" />'.
- *     @type string $submit_field         HTML format for the markup surrounding the Submit button and comment hidden
- *                                        fields. Default: '<p class="form-submit">%1$s %2$s</a>', where %1$s is the
- *                                        submit button markup and %2$s is the comment hidden fields.
- *     @type string $format               The comment form format. Default 'xhtml'. Accepts 'xhtml', 'html5'.
- * }
- * @param int|WP_Post $post_id Post ID or WP_Post object to generate the form for. Default current post.
- */
-function comment_form( $args = array(), $post_id = null ) {
-	if ( null === $post_id )
-		$post_id = get_the_ID();
-
-	$commenter = wp_get_current_commenter();
-	$user = wp_get_current_user();
-	$user_identity = $user->exists() ? $user->display_name : '';
-
-	$args = wp_parse_args( $args );
-	if ( ! isset( $args['format'] ) )
-		$args['format'] = current_theme_supports( 'html5', 'comment-form' ) ? 'html5' : 'xhtml';
-
-	$req      = get_option( 'require_name_email' );
-	$aria_req = ( $req ? " aria-required='true'" : '' );
-	$html_req = ( $req ? " required='required'" : '' );
-	$html5    = 'html5' === $args['format'];
-	$fields   =  array(
-		'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
-		            '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" maxlength="245"' . $aria_req . $html_req . ' /></p>',
-		'email'  => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
-		            '<input id="email" name="email" ' . ( $html5 ? 'type="email"' : 'type="text"' ) . ' value="' . esc_attr(  $commenter['comment_author_email'] ) . '" size="30" maxlength="100" aria-describedby="email-notes"' . $aria_req . $html_req  . ' /></p>',
-		'url'    => '<p class="comment-form-url"><label for="url">' . __( 'Website' ) . '</label> ' .
-		            '<input id="url" name="url" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" maxlength="200" /></p>',
-	);
-
-	$required_text = sprintf( ' ' . __('Required fields are marked %s'), '<span class="required">*</span>' );
-
-	/**
-	 * Filters the default comment form fields.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param array $fields The default comment fields.
-	 */
-	$fields = apply_filters( 'comment_form_default_fields', $fields );
-	$defaults = array(
-		'fields'               => $fields,
-		'comment_field'        => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label> <textarea id="comment" name="comment" cols="45" rows="8" maxlength="65525" aria-required="true" required="required"></textarea></p>',
-		/** This filter is documented in wp-includes/link-template.php */
-		'must_log_in'          => '<p class="must-log-in">' . sprintf(
-		                              /* translators: %s: login URL */
-		                              __( 'You must be <a href="%s">logged in</a> to post a comment.' ),
-		                              wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) )
-		                          ) . '</p>',
-		/** This filter is documented in wp-includes/link-template.php */
-		'logged_in_as'         => '<p class="logged-in-as">' . sprintf(
-		                              /* translators: 1: edit user link, 2: accessibility text, 3: user name, 4: logout URL */
-		                              __( '<a href="%1$s" aria-label="%2$s">Logged in as %3$s</a>. <a href="%4$s">Log out?</a>' ),
-		                              get_edit_user_link(),
-		                              /* translators: %s: user name */
-		                              esc_attr( sprintf( __( 'Logged in as %s. Edit your profile.' ), $user_identity ) ),
-		                              $user_identity,
-		                              wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) )
-		                          ) . '</p>',
-		'comment_notes_before' => '<p class="comment-notes"><span id="email-notes">' . __( 'Your email address will not be published.' ) . '</span>'. ( $req ? $required_text : '' ) . '</p>',
-		'comment_notes_after'  => '',
-		'action'               => site_url( '/wp-comments-post.php' ),
-		'id_form'              => 'commentform',
-		'id_submit'            => 'submit',
-		'class_form'           => 'comment-form',
-		'class_submit'         => 'submit',
-		'name_submit'          => 'submit',
-		'title_reply'          => __( 'Leave a Reply' ),
-		'title_reply_to'       => __( 'Leave a Reply to %s' ),
-		'title_reply_before'   => '<h3 id="reply-title" class="comment-reply-title">',
-		'title_reply_after'    => '</h3>',
-		'cancel_reply_before'  => ' <small>',
-		'cancel_reply_after'   => '</small>',
-		'cancel_reply_link'    => __( 'Cancel reply' ),
-		'label_submit'         => __( 'Post Comment' ),
-		'submit_button'        => '<input name="%1$s" type="submit" id="%2$s" class="%3$s" value="%4$s" />',
-		'submit_field'         => '<p class="form-submit">%1$s %2$s</p>',
-		'format'               => 'xhtml',
-	);
-
-	/**
-	 * Filters the comment form default arguments.
-	 *
-	 * Use {@see 'comment_form_default_fields'} to filter the comment fields.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param array $defaults The default comment form arguments.
-	 */
-	$args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) );
-
-	// Ensure that the filtered args contain all required default values.
-	$args = array_merge( $defaults, $args );
-
-	if ( comments_open( $post_id ) ) : ?>
-		<?php
-		/**
-		 * Fires before the comment form.
-		 *
-		 * @since 3.0.0
-		 */
-		do_action( 'comment_form_before' );
-		?>
-		<div id="respond" class="comment-respond">
-			<?php
-			echo $args['title_reply_before'];
-
-			comment_form_title( $args['title_reply'], $args['title_reply_to'] );
-
-			echo $args['cancel_reply_before'];
-
-			cancel_comment_reply_link( $args['cancel_reply_link'] );
-
-			echo $args['cancel_reply_after'];
-
-			echo $args['title_reply_after'];
-
-			if ( get_option( 'comment_registration' ) && !is_user_logged_in() ) :
-				echo $args['must_log_in'];
-				/**
-				 * Fires after the HTML-formatted 'must log in after' message in the comment form.
-				 *
-				 * @since 3.0.0
-				 */
-				do_action( 'comment_form_must_log_in_after' );
-			else : ?>
-				<form action="<?php echo esc_url( $args['action'] ); ?>" method="post" id="<?php echo esc_attr( $args['id_form'] ); ?>" class="<?php echo esc_attr( $args['class_form'] ); ?>"<?php echo $html5 ? ' novalidate' : ''; ?>>
-					<?php
-					/**
-					 * Fires at the top of the comment form, inside the form tag.
-					 *
-					 * @since 3.0.0
-					 */
-					do_action( 'comment_form_top' );
-
-					if ( is_user_logged_in() ) :
-						/**
-						 * Filters the 'logged in' message for the comment form for display.
-						 *
-						 * @since 3.0.0
-						 *
-						 * @param string $args_logged_in The logged-in-as HTML-formatted message.
-						 * @param array  $commenter      An array containing the comment author's
-						 *                               username, email, and URL.
-						 * @param string $user_identity  If the commenter is a registered user,
-						 *                               the display name, blank otherwise.
-						 */
-						echo apply_filters( 'comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity );
-
-						/**
-						 * Fires after the is_user_logged_in() check in the comment form.
-						 *
-						 * @since 3.0.0
-						 *
-						 * @param array  $commenter     An array containing the comment author's
-						 *                              username, email, and URL.
-						 * @param string $user_identity If the commenter is a registered user,
-						 *                              the display name, blank otherwise.
-						 */
-						do_action( 'comment_form_logged_in_after', $commenter, $user_identity );
-
-					else :
-
-						echo $args['comment_notes_before'];
-
-					endif;
-
-					// Prepare an array of all fields, including the textarea
-					$comment_fields = array( 'comment' => $args['comment_field'] ) + (array) $args['fields'];
-
-					/**
-					 * Filters the comment form fields, including the textarea.
-					 *
-					 * @since 4.4.0
-					 *
-					 * @param array $comment_fields The comment fields.
-					 */
-					$comment_fields = apply_filters( 'comment_form_fields', $comment_fields );
-
-					// Get an array of field names, excluding the textarea
-					$comment_field_keys = array_diff( array_keys( $comment_fields ), array( 'comment' ) );
-
-					// Get the first and the last field name, excluding the textarea
-					$first_field = reset( $comment_field_keys );
-					$last_field  = end( $comment_field_keys );
-
-					foreach ( $comment_fields as $name => $field ) {
-
-						if ( 'comment' === $name ) {
-
-							/**
-							 * Filters the content of the comment textarea field for display.
-							 *
-							 * @since 3.0.0
-							 *
-							 * @param string $args_comment_field The content of the comment textarea field.
-							 */
-							echo apply_filters( 'comment_form_field_comment', $field );
-
-							echo $args['comment_notes_after'];
-
-						} elseif ( ! is_user_logged_in() ) {
-
-							if ( $first_field === $name ) {
-								/**
-								 * Fires before the comment fields in the comment form, excluding the textarea.
-								 *
-								 * @since 3.0.0
-								 */
-								do_action( 'comment_form_before_fields' );
-							}
-
-							/**
-							 * Filters a comment form field for display.
-							 *
-							 * The dynamic portion of the filter hook, `$name`, refers to the name
-							 * of the comment form field. Such as 'author', 'email', or 'url'.
-							 *
-							 * @since 3.0.0
-							 *
-							 * @param string $field The HTML-formatted output of the comment form field.
-							 */
-							echo apply_filters( "comment_form_field_{$name}", $field ) . "\n";
-
-							if ( $last_field === $name ) {
-								/**
-								 * Fires after the comment fields in the comment form, excluding the textarea.
-								 *
-								 * @since 3.0.0
-								 */
-								do_action( 'comment_form_after_fields' );
-							}
-						}
-					}
-
-					$submit_button = sprintf(
-						$args['submit_button'],
-						esc_attr( $args['name_submit'] ),
-						esc_attr( $args['id_submit'] ),
-						esc_attr( $args['class_submit'] ),
-						esc_attr( $args['label_submit'] )
-					);
-
-					/**
-					 * Filters the submit button for the comment form to display.
-					 *
-					 * @since 4.2.0
-					 *
-					 * @param string $submit_button HTML markup for the submit button.
-					 * @param array  $args          Arguments passed to `comment_form()`.
-					 */
-					$submit_button = apply_filters( 'comment_form_submit_button', $submit_button, $args );
-
-					$submit_field = sprintf(
-						$args['submit_field'],
-						$submit_button,
-						get_comment_id_fields( $post_id )
-					);
-
-					/**
-					 * Filters the submit field for the comment form to display.
-					 *
-					 * The submit field includes the submit button, hidden fields for the
-					 * comment form, and any wrapper markup.
-					 *
-					 * @since 4.2.0
-					 *
-					 * @param string $submit_field HTML markup for the submit field.
-					 * @param array  $args         Arguments passed to comment_form().
-					 */
-					echo apply_filters( 'comment_form_submit_field', $submit_field, $args );
-
-					/**
-					 * Fires at the bottom of the comment form, inside the closing </form> tag.
-					 *
-					 * @since 1.5.0
-					 *
-					 * @param int $post_id The post ID.
-					 */
-					do_action( 'comment_form', $post_id );
-					?>
-				</form>
-			<?php endif; ?>
-		</div><!-- #respond -->
-		<?php
-		/**
-		 * Fires after the comment form.
-		 *
-		 * @since 3.0.0
-		 */
-		do_action( 'comment_form_after' );
-	else :
-		/**
-		 * Fires after the comment form if comments are closed.
-		 *
-		 * @since 3.0.0
-		 */
-		do_action( 'comment_form_comments_closed' );
-	endif;
-}
Index: www/wp-includes/widgets/class-wp-widget-search.php
===================================================================
--- www/wp-includes/widgets/class-wp-widget-search.php	(revision 38565)
+++ www/wp-includes/autoload/widgets/WP_Widget_Search.php	(revision )
@@ -1,0 +1,0 @@
Index: www/wp-admin/admin.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/admin.php	(revision 38565)
+++ www/wp-admin/admin.php	(revision 38565)
@@ -1,360 +0,0 @@
-<?php
-/**
- * WordPress Administration Bootstrap
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/**
- * In WordPress Administration Screens
- *
- * @since 2.3.2
- */
-if ( ! defined( 'WP_ADMIN' ) ) {
-	define( 'WP_ADMIN', true );
-}
-
-if ( ! defined('WP_NETWORK_ADMIN') )
-	define('WP_NETWORK_ADMIN', false);
-
-if ( ! defined('WP_USER_ADMIN') )
-	define('WP_USER_ADMIN', false);
-
-if ( ! WP_NETWORK_ADMIN && ! WP_USER_ADMIN ) {
-	define('WP_BLOG_ADMIN', true);
-}
-
-if ( isset($_GET['import']) && !defined('WP_LOAD_IMPORTERS') )
-	define('WP_LOAD_IMPORTERS', true);
-
-require_once(dirname(dirname(__FILE__)) . '/wp-load.php');
-
-nocache_headers();
-
-if ( get_option('db_upgraded') ) {
-	flush_rewrite_rules();
-	update_option( 'db_upgraded',  false );
-
-	/**
-	 * Fires on the next page load after a successful DB upgrade.
-	 *
-	 * @since 2.8.0
-	 */
-	do_action( 'after_db_upgrade' );
-} elseif ( get_option('db_version') != $wp_db_version && empty($_POST) ) {
-	if ( !is_multisite() ) {
-		wp_redirect( admin_url( 'upgrade.php?_wp_http_referer=' . urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) );
-		exit;
-
-	/**
-	 * Filters whether to attempt to perform the multisite DB upgrade routine.
-	 *
-	 * In single site, the user would be redirected to wp-admin/upgrade.php.
-	 * In multisite, the DB upgrade routine is automatically fired, but only
-	 * when this filter returns true.
-	 *
-	 * If the network is 50 sites or less, it will run every time. Otherwise,
-	 * it will throttle itself to reduce load.
-	 *
-	 * @since 3.0.0
-	 *
-	 * @param bool $do_mu_upgrade Whether to perform the Multisite upgrade routine. Default true.
-	 */
-	} elseif ( apply_filters( 'do_mu_upgrade', true ) ) {
-		$c = get_blog_count();
-
-		/*
-		 * If there are 50 or fewer sites, run every time. Otherwise, throttle to reduce load:
-		 * attempt to do no more than threshold value, with some +/- allowed.
-		 */
-		if ( $c <= 50 || ( $c > 50 && mt_rand( 0, (int)( $c / 50 ) ) == 1 ) ) {
-			require_once( ABSPATH . WPINC . '/http.php' );
-			$response = wp_remote_get( admin_url( 'upgrade.php?step=1' ), array( 'timeout' => 120, 'httpversion' => '1.1' ) );
-			/** This action is documented in wp-admin/network/upgrade.php */
-			do_action( 'after_mu_upgrade', $response );
-			unset($response);
-		}
-		unset($c);
-	}
-}
-
-require_once(ABSPATH . 'wp-admin/includes/admin.php');
-
-auth_redirect();
-
-// Schedule trash collection
-if ( ! wp_next_scheduled( 'wp_scheduled_delete' ) && ! wp_installing() )
-	wp_schedule_event(time(), 'daily', 'wp_scheduled_delete');
-
-set_screen_options();
-
-$date_format = __( 'F j, Y' );
-$time_format = __( 'g:i a' );
-
-wp_enqueue_script( 'common' );
-
-
-
-
-/**
- * $pagenow is set in vars.php
- * $wp_importers is sometimes set in wp-admin/includes/import.php
- * The remaining variables are imported as globals elsewhere, declared as globals here
- *
- * @global string $pagenow
- * @global array  $wp_importers
- * @global string $hook_suffix
- * @global string $plugin_page
- * @global string $typenow
- * @global string $taxnow
- */
-global $pagenow, $wp_importers, $hook_suffix, $plugin_page, $typenow, $taxnow;
-
-$page_hook = null;
-
-$editing = false;
-
-if ( isset($_GET['page']) ) {
-	$plugin_page = wp_unslash( $_GET['page'] );
-	$plugin_page = plugin_basename($plugin_page);
-}
-
-if ( isset( $_REQUEST['post_type'] ) && post_type_exists( $_REQUEST['post_type'] ) )
-	$typenow = $_REQUEST['post_type'];
-else
-	$typenow = '';
-
-if ( isset( $_REQUEST['taxonomy'] ) && taxonomy_exists( $_REQUEST['taxonomy'] ) )
-	$taxnow = $_REQUEST['taxonomy'];
-else
-	$taxnow = '';
-
-if ( WP_NETWORK_ADMIN )
-	require(ABSPATH . 'wp-admin/network/menu.php');
-elseif ( WP_USER_ADMIN )
-	require(ABSPATH . 'wp-admin/user/menu.php');
-else
-	require(ABSPATH . 'wp-admin/menu.php');
-
-if ( current_user_can( 'manage_options' ) ) {
-	wp_raise_memory_limit( 'admin' );
-}
-
-/**
- * Fires as an admin screen or script is being initialized.
- *
- * Note, this does not just run on user-facing admin screens.
- * It runs on admin-ajax.php and admin-post.php as well.
- *
- * This is roughly analogous to the more general {@see 'init'} hook, which fires earlier.
- *
- * @since 2.5.0
- */
-do_action( 'admin_init' );
-
-if ( isset($plugin_page) ) {
-	if ( !empty($typenow) )
-		$the_parent = $pagenow . '?post_type=' . $typenow;
-	else
-		$the_parent = $pagenow;
-	if ( ! $page_hook = get_plugin_page_hook($plugin_page, $the_parent) ) {
-		$page_hook = get_plugin_page_hook($plugin_page, $plugin_page);
-
-		// Back-compat for plugins using add_management_page().
-		if ( empty( $page_hook ) && 'edit.php' == $pagenow && '' != get_plugin_page_hook($plugin_page, 'tools.php') ) {
-			// There could be plugin specific params on the URL, so we need the whole query string
-			if ( !empty($_SERVER[ 'QUERY_STRING' ]) )
-				$query_string = $_SERVER[ 'QUERY_STRING' ];
-			else
-				$query_string = 'page=' . $plugin_page;
-			wp_redirect( admin_url('tools.php?' . $query_string) );
-			exit;
-		}
-	}
-	unset($the_parent);
-}
-
-$hook_suffix = '';
-if ( isset( $page_hook ) ) {
-	$hook_suffix = $page_hook;
-} elseif ( isset( $plugin_page ) ) {
-	$hook_suffix = $plugin_page;
-} elseif ( isset( $pagenow ) ) {
-	$hook_suffix = $pagenow;
-}
-
-set_current_screen();
-
-// Handle plugin admin pages.
-if ( isset($plugin_page) ) {
-	if ( $page_hook ) {
-		/**
-		 * Fires before a particular screen is loaded.
-		 *
-		 * The load-* hook fires in a number of contexts. This hook is for plugin screens
-		 * where a callback is provided when the screen is registered.
-		 *
-		 * The dynamic portion of the hook name, `$page_hook`, refers to a mixture of plugin
-		 * page information including:
-		 * 1. The page type. If the plugin page is registered as a submenu page, such as for
-		 *    Settings, the page type would be 'settings'. Otherwise the type is 'toplevel'.
-		 * 2. A separator of '_page_'.
-		 * 3. The plugin basename minus the file extension.
-		 *
-		 * Together, the three parts form the `$page_hook`. Citing the example above,
-		 * the hook name used would be 'load-settings_page_pluginbasename'.
-		 *
-		 * @see get_plugin_page_hook()
-		 *
-		 * @since 2.1.0
-		 */
-		do_action( "load-{$page_hook}" );
-		if (! isset($_GET['noheader']))
-			require_once(ABSPATH . 'wp-admin/admin-header.php');
-
-		/**
-		 * Used to call the registered callback for a plugin screen.
-		 *
-		 * @ignore
-		 * @since 1.5.0
-		 */
-		do_action( $page_hook );
-	} else {
-		if ( validate_file($plugin_page) )
-			wp_die(__('Invalid plugin page'));
-
-		if ( !( file_exists(WP_PLUGIN_DIR . "/$plugin_page") && is_file(WP_PLUGIN_DIR . "/$plugin_page") ) && !( file_exists(WPMU_PLUGIN_DIR . "/$plugin_page") && is_file(WPMU_PLUGIN_DIR . "/$plugin_page") ) )
-			wp_die(sprintf(__('Cannot load %s.'), htmlentities($plugin_page)));
-
-		/**
-		 * Fires before a particular screen is loaded.
-		 *
-		 * The load-* hook fires in a number of contexts. This hook is for plugin screens
-		 * where the file to load is directly included, rather than the use of a function.
-		 *
-		 * The dynamic portion of the hook name, `$plugin_page`, refers to the plugin basename.
-		 *
-		 * @see plugin_basename()
-		 *
-		 * @since 1.5.0
-		 */
-		do_action( "load-{$plugin_page}" );
-
-		if ( !isset($_GET['noheader']))
-			require_once(ABSPATH . 'wp-admin/admin-header.php');
-
-		if ( file_exists(WPMU_PLUGIN_DIR . "/$plugin_page") )
-			include(WPMU_PLUGIN_DIR . "/$plugin_page");
-		else
-			include(WP_PLUGIN_DIR . "/$plugin_page");
-	}
-
-	include(ABSPATH . 'wp-admin/admin-footer.php');
-
-	exit();
-} elseif ( isset( $_GET['import'] ) ) {
-
-	$importer = $_GET['import'];
-
-	if ( ! current_user_can( 'import' ) ) {
-		wp_die( __( 'Sorry, you are not allowed to import content.' ) );
-	}
-
-	if ( validate_file($importer) ) {
-		wp_redirect( admin_url( 'import.php?invalid=' . $importer ) );
-		exit;
-	}
-
-	if ( ! isset($wp_importers[$importer]) || ! is_callable($wp_importers[$importer][2]) ) {
-		wp_redirect( admin_url( 'import.php?invalid=' . $importer ) );
-		exit;
-	}
-
-	/**
-	 * Fires before an importer screen is loaded.
-	 *
-	 * The dynamic portion of the hook name, `$importer`, refers to the importer slug.
-	 *
-	 * @since 3.5.0
-	 */
-	do_action( "load-importer-{$importer}" );
-
-	$parent_file = 'tools.php';
-	$submenu_file = 'import.php';
-	$title = __('Import');
-
-	if (! isset($_GET['noheader']))
-		require_once(ABSPATH . 'wp-admin/admin-header.php');
-
-	require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
-
-	define('WP_IMPORTING', true);
-
-	/**
-	 * Whether to filter imported data through kses on import.
-	 *
-	 * Multisite uses this hook to filter all data through kses by default,
-	 * as a super administrator may be assisting an untrusted user.
-	 *
-	 * @since 3.1.0
-	 *
-	 * @param bool $force Whether to force data to be filtered through kses. Default false.
-	 */
-	if ( apply_filters( 'force_filtered_html_on_import', false ) ) {
-		kses_init_filters();  // Always filter imported data with kses on multisite.
-	}
-
-	call_user_func($wp_importers[$importer][2]);
-
-	include(ABSPATH . 'wp-admin/admin-footer.php');
-
-	// Make sure rules are flushed
-	flush_rewrite_rules(false);
-
-	exit();
-} else {
-	/**
-	 * Fires before a particular screen is loaded.
-	 *
-	 * The load-* hook fires in a number of contexts. This hook is for core screens.
-	 *
-	 * The dynamic portion of the hook name, `$pagenow`, is a global variable
-	 * referring to the filename of the current page, such as 'admin.php',
-	 * 'post-new.php' etc. A complete hook for the latter would be
-	 * 'load-post-new.php'.
-	 *
-	 * @since 2.1.0
-	 */
-	do_action( "load-{$pagenow}" );
-
-	/*
-	 * The following hooks are fired to ensure backward compatibility.
-	 * In all other cases, 'load-' . $pagenow should be used instead.
-	 */
-	if ( $typenow == 'page' ) {
-		if ( $pagenow == 'post-new.php' )
-			do_action( 'load-page-new.php' );
-		elseif ( $pagenow == 'post.php' )
-			do_action( 'load-page.php' );
-	}  elseif ( $pagenow == 'edit-tags.php' ) {
-		if ( $taxnow == 'category' )
-			do_action( 'load-categories.php' );
-		elseif ( $taxnow == 'link_category' )
-			do_action( 'load-edit-link-categories.php' );
-	} elseif( 'term.php' === $pagenow ) {
-		do_action( 'load-edit-tags.php' );
-	}
-}
-
-if ( ! empty( $_REQUEST['action'] ) ) {
-	/**
-	 * Fires when an 'action' request variable is sent.
-	 *
-	 * The dynamic portion of the hook name, `$_REQUEST['action']`,
-	 * refers to the action derived from the `GET` or `POST` request.
-	 *
-	 * @since 2.6.0
-	 */
-	do_action( 'admin_action_' . $_REQUEST['action'] );
-}
Index: www/wp-includes/autoload/customize/class-wp-customize-cropped-image-control.php
===================================================================
--- www/wp-includes/autoload/customize/class-wp-customize-cropped-image-control.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/customize/class-wp-customize-cropped-image-control.php	(revision UNDEFINED)
@@ -1,93 +0,0 @@
-<?php
-/**
- * Customize API: WP_Customize_Cropped_Image_Control class
- *
- * @package WordPress
- * @subpackage Customize
- * @since 4.4.0
- */
-
-/**
- * Customize Cropped Image Control class.
- *
- * @since 4.3.0
- *
- * @see WP_Customize_Image_Control
- */
-class WP_Customize_Cropped_Image_Control extends WP_Customize_Image_Control {
-
-	/**
-	 * Control type.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var string
-	 */
-	public $type = 'cropped_image';
-
-	/**
-	 * Suggested width for cropped image.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var int
-	 */
-	public $width = 150;
-
-	/**
-	 * Suggested height for cropped image.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var int
-	 */
-	public $height = 150;
-
-	/**
-	 * Whether the width is flexible.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var bool
-	 */
-	public $flex_width = false;
-
-	/**
-	 * Whether the height is flexible.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 * @var bool
-	 */
-	public $flex_height = false;
-
-	/**
-	 * Enqueue control related scripts/styles.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 */
-	public function enqueue() {
-		wp_enqueue_script( 'customize-views' );
-
-		parent::enqueue();
-	}
-
-	/**
-	 * Refresh the parameters passed to the JavaScript via JSON.
-	 *
-	 * @since 4.3.0
-	 * @access public
-	 *
-	 * @see WP_Customize_Control::to_json()
-	 */
-	public function to_json() {
-		parent::to_json();
-
-		$this->json['width']       = absint( $this->width );
-		$this->json['height']      = absint( $this->height );
-		$this->json['flex_width']  = absint( $this->flex_width );
-		$this->json['flex_height'] = absint( $this->flex_height );
-	}
-
-}
Index: www/wp-includes/pomo/po.php
===================================================================
--- www/wp-includes/pomo/po.php	(revision 38565)
+++ www/wp-includes/autoload/pomo/PO.php	(revision )
@@ -7,18 +7,9 @@
  * @subpackage po
  */
 
-require_once dirname(__FILE__) . '/translations.php';
-
-if ( ! defined( 'PO_MAX_LINE_LEN' ) ) {
-	define('PO_MAX_LINE_LEN', 79);
-}
-
-ini_set('auto_detect_line_endings', 1);
-
 /**
  * Routines for working with PO files
  */
-if ( ! class_exists( 'PO', false ) ):
 class PO extends Gettext_Translations {
 
 	var $comments_before_headers = '';
@@ -443,4 +434,3 @@
 		return $s;
 	}
 }
-endif;
Index: www/wp-admin/includes/class-ftp-sockets.php
===================================================================
--- www/wp-admin/includes/class-ftp-sockets.php	(revision 38565)
+++ www/wp-admin/autoload/ftp/ftp_sockets.php	(revision )
@@ -243,4 +243,4 @@
 		}
 	}
 }
-?>
+
Index: www/wp-includes/autoload/requests/IPv6.php
===================================================================
--- www/wp-includes/autoload/requests/IPv6.php	(revision UNDEFINED)
+++ www/wp-includes/autoload/requests/IPv6.php	(revision UNDEFINED)
@@ -1,190 +0,0 @@
-<?php
-/**
- * Class to validate and to work with IPv6 addresses
- *
- * @package Requests
- * @subpackage Utilities
- */
-
-/**
- * Class to validate and to work with IPv6 addresses
- *
- * This was originally based on the PEAR class of the same name, but has been
- * entirely rewritten.
- *
- * @package Requests
- * @subpackage Utilities
- */
-class Requests_IPv6 {
-	/**
-	 * Uncompresses an IPv6 address
-	 *
-	 * RFC 4291 allows you to compress consecutive zero pieces in an address to
-	 * '::'. This method expects a valid IPv6 address and expands the '::' to
-	 * the required number of zero pieces.
-	 *
-	 * Example:  FF01::101   ->  FF01:0:0:0:0:0:0:101
-	 *           ::1         ->  0:0:0:0:0:0:0:1
-	 *
-	 * @author Alexander Merz <alexander.merz@web.de>
-	 * @author elfrink at introweb dot nl
-	 * @author Josh Peck <jmp at joshpeck dot org>
-	 * @copyright 2003-2005 The PHP Group
-	 * @license http://www.opensource.org/licenses/bsd-license.php
-	 * @param string $ip An IPv6 address
-	 * @return string The uncompressed IPv6 address
-	 */
-	public static function uncompress($ip) {
-		if (substr_count($ip, '::') !== 1) {
-			return $ip;
-		}
-
-		list($ip1, $ip2) = explode('::', $ip);
-		$c1 = ($ip1 === '') ? -1 : substr_count($ip1, ':');
-		$c2 = ($ip2 === '') ? -1 : substr_count($ip2, ':');
-
-		if (strpos($ip2, '.') !== false) {
-			$c2++;
-		}
-		// ::
-		if ($c1 === -1 && $c2 === -1) {
-			$ip = '0:0:0:0:0:0:0:0';
-		}
-		// ::xxx
-		else if ($c1 === -1) {
-			$fill = str_repeat('0:', 7 - $c2);
-			$ip = str_replace('::', $fill, $ip);
-		}
-		// xxx::
-		else if ($c2 === -1) {
-			$fill = str_repeat(':0', 7 - $c1);
-			$ip = str_replace('::', $fill, $ip);
-		}
-		// xxx::xxx
-		else {
-			$fill = ':' . str_repeat('0:', 6 - $c2 - $c1);
-			$ip = str_replace('::', $fill, $ip);
-		}
-		return $ip;
-	}
-
-	/**
-	 * Compresses an IPv6 address
-	 *
-	 * RFC 4291 allows you to compress consecutive zero pieces in an address to
-	 * '::'. This method expects a valid IPv6 address and compresses consecutive
-	 * zero pieces to '::'.
-	 *
-	 * Example:  FF01:0:0:0:0:0:0:101   ->  FF01::101
-	 *           0:0:0:0:0:0:0:1        ->  ::1
-	 *
-	 * @see uncompress()
-	 * @param string $ip An IPv6 address
-	 * @return string The compressed IPv6 address
-	 */
-	public static function compress($ip) {
-		// Prepare the IP to be compressed
-		$ip = self::uncompress($ip);
-		$ip_parts = self::split_v6_v4($ip);
-
-		// Replace all leading zeros
-		$ip_parts[0] = preg_replace('/(^|:)0+([0-9])/', '\1\2', $ip_parts[0]);
-
-		// Find bunches of zeros
-		if (preg_match_all('/(?:^|:)(?:0(?::|$))+/', $ip_parts[0], $matches, PREG_OFFSET_CAPTURE)) {
-			$max = 0;
-			$pos = null;
-			foreach ($matches[0] as $match) {
-				if (strlen($match[0]) > $max) {
-					$max = strlen($match[0]);
-					$pos = $match[1];
-				}
-			}
-
-			$ip_parts[0] = substr_replace($ip_parts[0], '::', $pos, $max);
-		}
-
-		if ($ip_parts[1] !== '') {
-			return implode(':', $ip_parts);
-		}
-		else {
-			return $ip_parts[0];
-		}
-	}
-
-	/**
-	 * Splits an IPv6 address into the IPv6 and IPv4 representation parts
-	 *
-	 * RFC 4291 allows you to represent the last two parts of an IPv6 address
-	 * using the standard IPv4 representation
-	 *
-	 * Example:  0:0:0:0:0:0:13.1.68.3
-	 *           0:0:0:0:0:FFFF:129.144.52.38
-	 *
-	 * @param string $ip An IPv6 address
-	 * @return string[] [0] contains the IPv6 represented part, and [1] the IPv4 represented part
-	 */
-	protected static function split_v6_v4($ip) {
-		if (strpos($ip, '.') !== false) {
-			$pos = strrpos($ip, ':');
-			$ipv6_part = substr($ip, 0, $pos);
-			$ipv4_part = substr($ip, $pos + 1);
-			return array($ipv6_part, $ipv4_part);
-		}
-		else {
-			return array($ip, '');
-		}
-	}
-
-	/**
-	 * Checks an IPv6 address
-	 *
-	 * Checks if the given IP is a valid IPv6 address
-	 *
-	 * @param string $ip An IPv6 address
-	 * @return bool true if $ip is a valid IPv6 address
-	 */
-	public static function check_ipv6($ip) {
-		$ip = self::uncompress($ip);
-		list($ipv6, $ipv4) = self::split_v6_v4($ip);
-		$ipv6 = explode(':', $ipv6);
-		$ipv4 = explode('.', $ipv4);
-		if (count($ipv6) === 8 && count($ipv4) === 1 || count($ipv6) === 6 && count($ipv4) === 4) {
-			foreach ($ipv6 as $ipv6_part) {
-				// The section can't be empty
-				if ($ipv6_part === '') {
-					return false;
-				}
-
-				// Nor can it be over four characters
-				if (strlen($ipv6_part) > 4) {
-					return false;
-				}
-
-				// Remove leading zeros (this is safe because of the above)
-				$ipv6_part = ltrim($ipv6_part, '0');
-				if ($ipv6_part === '') {
-					$ipv6_part = '0';
-				}
-
-				// Check the value is valid
-				$value = hexdec($ipv6_part);
-				if (dechex($value) !== strtolower($ipv6_part) || $value < 0 || $value > 0xFFFF) {
-					return false;
-				}
-			}
-			if (count($ipv4) === 4) {
-				foreach ($ipv4 as $ipv4_part) {
-					$value = (int) $ipv4_part;
-					if ((string) $value !== $ipv4_part || $value < 0 || $value > 0xFF) {
-						return false;
-					}
-				}
-			}
-			return true;
-		}
-		else {
-			return false;
-		}
-	}
-}
Index: www/wp-admin/edit.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-admin/edit.php	(revision 38565)
+++ www/wp-admin/edit.php	(revision 38565)
@@ -1,361 +0,0 @@
-<?php
-/**
- * Edit Posts Administration Screen.
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-/** WordPress Administration Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
-
-if ( ! $typenow )
-	wp_die( __( 'Invalid post type.' ) );
-
-if ( ! in_array( $typenow, get_post_types( array( 'show_ui' => true ) ) ) ) {
-	wp_die( __( 'Sorry, you are not allowed to edit posts in this post type.' ) );
-}
-
-if ( 'attachment' === $typenow ) {
-	if ( wp_redirect( admin_url( 'upload.php' ) ) ) {
-		exit;
-	}
-}
-
-/**
- * @global string       $post_type
- * @global WP_Post_Type $post_type_object
- */
-global $post_type, $post_type_object;
-
-$post_type = $typenow;
-$post_type_object = get_post_type_object( $post_type );
-
-if ( ! $post_type_object )
-	wp_die( __( 'Invalid post type.' ) );
-
-if ( ! current_user_can( $post_type_object->cap->edit_posts ) ) {
-	wp_die(
-		'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-		'<p>' . __( 'Sorry, you are not allowed to edit posts in this post type.' ) . '</p>',
-		403
-	);
-}
-
-$wp_list_table = _get_list_table('WP_Posts_List_Table');
-$pagenum = $wp_list_table->get_pagenum();
-
-// Back-compat for viewing comments of an entry
-foreach ( array( 'p', 'attachment_id', 'page_id' ) as $_redirect ) {
-	if ( ! empty( $_REQUEST[ $_redirect ] ) ) {
-		wp_redirect( admin_url( 'edit-comments.php?p=' . absint( $_REQUEST[ $_redirect ] ) ) );
-		exit;
-	}
-}
-unset( $_redirect );
-
-if ( 'post' != $post_type ) {
-	$parent_file = "edit.php?post_type=$post_type";
-	$submenu_file = "edit.php?post_type=$post_type";
-	$post_new_file = "post-new.php?post_type=$post_type";
-} else {
-	$parent_file = 'edit.php';
-	$submenu_file = 'edit.php';
-	$post_new_file = 'post-new.php';
-}
-
-$doaction = $wp_list_table->current_action();
-
-if ( $doaction ) {
-	check_admin_referer('bulk-posts');
-
-	$sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'locked', 'ids'), wp_get_referer() );
-	if ( ! $sendback )
-		$sendback = admin_url( $parent_file );
-	$sendback = add_query_arg( 'paged', $pagenum, $sendback );
-	if ( strpos($sendback, 'post.php') !== false )
-		$sendback = admin_url($post_new_file);
-
-	if ( 'delete_all' == $doaction ) {
-		// Prepare for deletion of all posts with a specified post status (i.e. Empty trash).
-		$post_status = preg_replace('/[^a-z0-9_-]+/i', '', $_REQUEST['post_status']);
-		// Validate the post status exists.
-		if ( get_post_status_object( $post_status ) ) {
-			$post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type=%s AND post_status = %s", $post_type, $post_status ) );
-		}
-		$doaction = 'delete';
-	} elseif ( isset( $_REQUEST['media'] ) ) {
-		$post_ids = $_REQUEST['media'];
-	} elseif ( isset( $_REQUEST['ids'] ) ) {
-		$post_ids = explode( ',', $_REQUEST['ids'] );
-	} elseif ( !empty( $_REQUEST['post'] ) ) {
-		$post_ids = array_map('intval', $_REQUEST['post']);
-	}
-
-	if ( !isset( $post_ids ) ) {
-		wp_redirect( $sendback );
-		exit;
-	}
-
-	switch ( $doaction ) {
-		case 'trash':
-			$trashed = $locked = 0;
-
-			foreach ( (array) $post_ids as $post_id ) {
-				if ( !current_user_can( 'delete_post', $post_id) )
-					wp_die( __('Sorry, you are not allowed to move this item to the Trash.') );
-
-				if ( wp_check_post_lock( $post_id ) ) {
-					$locked++;
-					continue;
-				}
-
-				if ( !wp_trash_post($post_id) )
-					wp_die( __('Error in moving to Trash.') );
-
-				$trashed++;
-			}
-
-			$sendback = add_query_arg( array('trashed' => $trashed, 'ids' => join(',', $post_ids), 'locked' => $locked ), $sendback );
-			break;
-		case 'untrash':
-			$untrashed = 0;
-			foreach ( (array) $post_ids as $post_id ) {
-				if ( !current_user_can( 'delete_post', $post_id) )
-					wp_die( __('Sorry, you are not allowed to restore this item from the Trash.') );
-
-				if ( !wp_untrash_post($post_id) )
-					wp_die( __('Error in restoring from Trash.') );
-
-				$untrashed++;
-			}
-			$sendback = add_query_arg('untrashed', $untrashed, $sendback);
-			break;
-		case 'delete':
-			$deleted = 0;
-			foreach ( (array) $post_ids as $post_id ) {
-				$post_del = get_post($post_id);
-
-				if ( !current_user_can( 'delete_post', $post_id ) )
-					wp_die( __('Sorry, you are not allowed to delete this item.') );
-
-				if ( $post_del->post_type == 'attachment' ) {
-					if ( ! wp_delete_attachment($post_id) )
-						wp_die( __('Error in deleting.') );
-				} else {
-					if ( !wp_delete_post($post_id) )
-						wp_die( __('Error in deleting.') );
-				}
-				$deleted++;
-			}
-			$sendback = add_query_arg('deleted', $deleted, $sendback);
-			break;
-		case 'edit':
-			if ( isset($_REQUEST['bulk_edit']) ) {
-				$done = bulk_edit_posts($_REQUEST);
-
-				if ( is_array($done) ) {
-					$done['updated'] = count( $done['updated'] );
-					$done['skipped'] = count( $done['skipped'] );
-					$done['locked'] = count( $done['locked'] );
-					$sendback = add_query_arg( $done, $sendback );
-				}
-			}
-			break;
-	}
-
-	$sendback = remove_query_arg( array('action', 'action2', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view'), $sendback );
-
-	wp_redirect($sendback);
-	exit();
-} elseif ( ! empty($_REQUEST['_wp_http_referer']) ) {
-	 wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), wp_unslash($_SERVER['REQUEST_URI']) ) );
-	 exit;
-}
-
-$wp_list_table->prepare_items();
-
-wp_enqueue_script('inline-edit-post');
-wp_enqueue_script('heartbeat');
-
-$title = $post_type_object->labels->name;
-
-if ( 'post' == $post_type ) {
-	get_current_screen()->add_help_tab( array(
-	'id'		=> 'overview',
-	'title'		=> __('Overview'),
-	'content'	=>
-		'<p>' . __('This screen provides access to all of your posts. You can customize the display of this screen to suit your workflow.') . '</p>'
-	) );
-	get_current_screen()->add_help_tab( array(
-	'id'		=> 'screen-content',
-	'title'		=> __('Screen Content'),
-	'content'	=>
-		'<p>' . __('You can customize the display of this screen&#8217;s contents in a number of ways:') . '</p>' .
-		'<ul>' .
-			'<li>' . __('You can hide/display columns based on your needs and decide how many posts to list per screen using the Screen Options tab.') . '</li>' .
-			'<li>' . __( 'You can filter the list of posts by post status using the text links above the posts list to only show posts with that status. The default view is to show all posts.' ) . '</li>' .
-			'<li>' . __('You can view posts in a simple title list or with an excerpt using the Screen Options tab.') . '</li>' .
-			'<li>' . __('You can refine the list to show only posts in a specific category or from a specific month by using the dropdown menus above the posts list. Click the Filter button after making your selection. You also can refine the list by clicking on the post author, category or tag in the posts list.') . '</li>' .
-		'</ul>'
-	) );
-	get_current_screen()->add_help_tab( array(
-	'id'		=> 'action-links',
-	'title'		=> __('Available Actions'),
-	'content'	=>
-		'<p>' . __('Hovering over a row in the posts list will display action links that allow you to manage your post. You can perform the following actions:') . '</p>' .
-		'<ul>' .
-			'<li>' . __('<strong>Edit</strong> takes you to the editing screen for that post. You can also reach that screen by clicking on the post title.') . '</li>' .
-			'<li>' . __('<strong>Quick Edit</strong> provides inline access to the metadata of your post, allowing you to update post details without leaving this screen.') . '</li>' .
-			'<li>' . __('<strong>Trash</strong> removes your post from this list and places it in the trash, from which you can permanently delete it.') . '</li>' .
-			'<li>' . __('<strong>Preview</strong> will show you what your draft post will look like if you publish it. View will take you to your live site to view the post. Which link is available depends on your post&#8217;s status.') . '</li>' .
-		'</ul>'
-	) );
-	get_current_screen()->add_help_tab( array(
-	'id'		=> 'bulk-actions',
-	'title'		=> __('Bulk Actions'),
-	'content'	=>
-		'<p>' . __('You can also edit or move multiple posts to the trash at once. Select the posts you want to act on using the checkboxes, then select the action you want to take from the Bulk Actions menu and click Apply.') . '</p>' .
-				'<p>' . __('When using Bulk Edit, you can change the metadata (categories, author, etc.) for all selected posts at once. To remove a post from the grouping, just click the x next to its name in the Bulk Edit area that appears.') . '</p>'
-	) );
-
-	get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Posts_Screen" target="_blank">Documentation on Managing Posts</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
-	);
-
-} elseif ( 'page' == $post_type ) {
-	get_current_screen()->add_help_tab( array(
-	'id'		=> 'overview',
-	'title'		=> __('Overview'),
-	'content'	=>
-		'<p>' . __('Pages are similar to posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest pages under other pages by making one the &#8220;Parent&#8221; of the other, creating a group of pages.') . '</p>'
-	) );
-	get_current_screen()->add_help_tab( array(
-	'id'		=> 'managing-pages',
-	'title'		=> __('Managing Pages'),
-	'content'	=>
-		'<p>' . __('Managing pages is very similar to managing posts, and the screens can be customized in the same way.') . '</p>' .
-		'<p>' . __('You can also perform the same types of actions, including narrowing the list by using the filters, acting on a page using the action links that appear when you hover over a row, or using the Bulk Actions menu to edit the metadata for multiple pages at once.') . '</p>'
-	) );
-
-	get_current_screen()->set_help_sidebar(
-	'<p><strong>' . __('For more information:') . '</strong></p>' .
-	'<p>' . __('<a href="https://codex.wordpress.org/Pages_Screen" target="_blank">Documentation on Managing Pages</a>') . '</p>' .
-	'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
-	);
-
-}
-
-get_current_screen()->set_screen_reader_content( array(
-	'heading_views'      => $post_type_object->labels->filter_items_list,
-	'heading_pagination' => $post_type_object->labels->items_list_navigation,
-	'heading_list'       => $post_type_object->labels->items_list,
-) );
-
-add_screen_option( 'per_page', array( 'default' => 20, 'option' => 'edit_' . $post_type . '_per_page' ) );
-
-$bulk_counts = array(
-	'updated'   => isset( $_REQUEST['updated'] )   ? absint( $_REQUEST['updated'] )   : 0,
-	'locked'    => isset( $_REQUEST['locked'] )    ? absint( $_REQUEST['locked'] )    : 0,
-	'deleted'   => isset( $_REQUEST['deleted'] )   ? absint( $_REQUEST['deleted'] )   : 0,
-	'trashed'   => isset( $_REQUEST['trashed'] )   ? absint( $_REQUEST['trashed'] )   : 0,
-	'untrashed' => isset( $_REQUEST['untrashed'] ) ? absint( $_REQUEST['untrashed'] ) : 0,
-);
-
-$bulk_messages = array();
-$bulk_messages['post'] = array(
-	'updated'   => _n( '%s post updated.', '%s posts updated.', $bulk_counts['updated'] ),
-	'locked'    => ( 1 == $bulk_counts['locked'] ) ? __( '1 post not updated, somebody is editing it.' ) :
-	                   _n( '%s post not updated, somebody is editing it.', '%s posts not updated, somebody is editing them.', $bulk_counts['locked'] ),
-	'deleted'   => _n( '%s post permanently deleted.', '%s posts permanently deleted.', $bulk_counts['deleted'] ),
-	'trashed'   => _n( '%s post moved to the Trash.', '%s posts moved to the Trash.', $bulk_counts['trashed'] ),
-	'untrashed' => _n( '%s post restored from the Trash.', '%s posts restored from the Trash.', $bulk_counts['untrashed'] ),
-);
-$bulk_messages['page'] = array(
-	'updated'   => _n( '%s page updated.', '%s pages updated.', $bulk_counts['updated'] ),
-	'locked'    => ( 1 == $bulk_counts['locked'] ) ? __( '1 page not updated, somebody is editing it.' ) :
-	                   _n( '%s page not updated, somebody is editing it.', '%s pages not updated, somebody is editing them.', $bulk_counts['locked'] ),
-	'deleted'   => _n( '%s page permanently deleted.', '%s pages permanently deleted.', $bulk_counts['deleted'] ),
-	'trashed'   => _n( '%s page moved to the Trash.', '%s pages moved to the Trash.', $bulk_counts['trashed'] ),
-	'untrashed' => _n( '%s page restored from the Trash.', '%s pages restored from the Trash.', $bulk_counts['untrashed'] ),
-);
-
-/**
- * Filters the bulk action updated messages.
- *
- * By default, custom post types use the messages for the 'post' post type.
- *
- * @since 3.7.0
- *
- * @param array $bulk_messages Arrays of messages, each keyed by the corresponding post type. Messages are
- *                             keyed with 'updated', 'locked', 'deleted', 'trashed', and 'untrashed'.
- * @param array $bulk_counts   Array of item counts for each message, used to build internationalized strings.
- */
-$bulk_messages = apply_filters( 'bulk_post_updated_messages', $bulk_messages, $bulk_counts );
-$bulk_counts = array_filter( $bulk_counts );
-
-require_once( ABSPATH . 'wp-admin/admin-header.php' );
-?>
-<div class="wrap">
-<h1><?php
-echo esc_html( $post_type_object->labels->name );
-if ( current_user_can( $post_type_object->cap->create_posts ) )
-	echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="page-title-action">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
-
-if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
-	/* translators: %s: search keywords */
-	printf( ' <span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', get_search_query() );
-}
-?></h1>
-
-<?php
-// If we have a bulk message to issue:
-$messages = array();
-foreach ( $bulk_counts as $message => $count ) {
-	if ( isset( $bulk_messages[ $post_type ][ $message ] ) )
-		$messages[] = sprintf( $bulk_messages[ $post_type ][ $message ], number_format_i18n( $count ) );
-	elseif ( isset( $bulk_messages['post'][ $message ] ) )
-		$messages[] = sprintf( $bulk_messages['post'][ $message ], number_format_i18n( $count ) );
-
-	if ( $message == 'trashed' && isset( $_REQUEST['ids'] ) ) {
-		$ids = preg_replace( '/[^0-9,]/', '', $_REQUEST['ids'] );
-		$messages[] = '<a href="' . esc_url( wp_nonce_url( "edit.php?post_type=$post_type&doaction=undo&action=untrash&ids=$ids", "bulk-posts" ) ) . '">' . __('Undo') . '</a>';
-	}
-}
-
-if ( $messages )
-	echo '<div id="message" class="updated notice is-dismissible"><p>' . join( ' ', $messages ) . '</p></div>';
-unset( $messages );
-
-$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed' ), $_SERVER['REQUEST_URI'] );
-?>
-
-<?php $wp_list_table->views(); ?>
-
-<form id="posts-filter" method="get">
-
-<?php $wp_list_table->search_box( $post_type_object->labels->search_items, 'post' ); ?>
-
-<input type="hidden" name="post_status" class="post_status_page" value="<?php echo !empty($_REQUEST['post_status']) ? esc_attr($_REQUEST['post_status']) : 'all'; ?>" />
-<input type="hidden" name="post_type" class="post_type_page" value="<?php echo $post_type; ?>" />
-<?php if ( ! empty( $_REQUEST['show_sticky'] ) ) { ?>
-<input type="hidden" name="show_sticky" value="1" />
-<?php } ?>
-
-<?php $wp_list_table->display(); ?>
-
-</form>
-
-<?php
-if ( $wp_list_table->has_items() )
-	$wp_list_table->inline_edit();
-?>
-
-<div id="ajax-response"></div>
-<br class="clear" />
-</div>
-
-<?php
-include( ABSPATH . 'wp-admin/admin-footer.php' );
Index: www/wp-includes/constants/id3.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/constants/id3.php	(revision )
+++ www/wp-includes/constants/id3.php	(revision )
@@ -0,0 +1,298 @@
+<?php
+/////////////////////////////////////////////////////////////////
+/// getID3() by James Heinrich <info@getid3.org>               //
+//  available at http://getid3.sourceforge.net                 //
+//            or http://www.getid3.org                         //
+//          also https://github.com/JamesHeinrich/getID3       //
+/////////////////////////////////////////////////////////////////
+//                                                             //
+// Please see readme.txt for more information                  //
+//                                                            ///
+/////////////////////////////////////////////////////////////////
+
+// define a constant rather than looking up every time it is needed
+if (!defined('GETID3_OS_ISWINDOWS')) {
+	define('GETID3_OS_ISWINDOWS', (stripos(PHP_OS, 'WIN') === 0));
+}
+// Get base path of getID3() - ONCE
+if (!defined('GETID3_INCLUDEPATH')) {
+	define('GETID3_INCLUDEPATH', dirname(__FILE__).DIRECTORY_SEPARATOR);
+}
+// Workaround Bug #39923 (https://bugs.php.net/bug.php?id=39923)
+if (!defined('IMG_JPG') && defined('IMAGETYPE_JPEG')) {
+	define('IMG_JPG', IMAGETYPE_JPEG);
+}
+
+// attempt to define temp dir as something flexible but reliable
+$temp_dir = ini_get('upload_tmp_dir');
+if ($temp_dir && (!is_dir($temp_dir) || !is_readable($temp_dir))) {
+	$temp_dir = '';
+}
+if (!$temp_dir && function_exists('sys_get_temp_dir')) { // sys_get_temp_dir added in PHP v5.2.1
+	// sys_get_temp_dir() may give inaccessible temp dir, e.g. with open_basedir on virtual hosts
+	$temp_dir = sys_get_temp_dir();
+}
+$temp_dir = @realpath($temp_dir); // see https://github.com/JamesHeinrich/getID3/pull/10
+$open_basedir = ini_get('open_basedir');
+if ($open_basedir) {
+	// e.g. "/var/www/vhosts/getid3.org/httpdocs/:/tmp/"
+	$temp_dir     = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $temp_dir);
+	$open_basedir = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $open_basedir);
+	if (substr($temp_dir, -1, 1) != DIRECTORY_SEPARATOR) {
+		$temp_dir .= DIRECTORY_SEPARATOR;
+	}
+	$found_valid_tempdir = false;
+	$open_basedirs = explode(PATH_SEPARATOR, $open_basedir);
+	foreach ($open_basedirs as $basedir) {
+		if (substr($basedir, -1, 1) != DIRECTORY_SEPARATOR) {
+			$basedir .= DIRECTORY_SEPARATOR;
+		}
+		if (preg_match('#^'.preg_quote($basedir).'#', $temp_dir)) {
+			$found_valid_tempdir = true;
+			break;
+		}
+	}
+	if (!$found_valid_tempdir) {
+		$temp_dir = '';
+	}
+	unset($open_basedirs, $found_valid_tempdir, $basedir);
+}
+if (!$temp_dir) {
+	$temp_dir = '*'; // invalid directory name should force tempnam() to use system default temp dir
+}
+// $temp_dir = '/something/else/';  // feel free to override temp dir here if it works better for your system
+if (!defined('GETID3_TEMP_DIR')) {
+	define('GETID3_TEMP_DIR', $temp_dir);
+}
+unset($open_basedir, $temp_dir);
+
+// End: Defines
+
+
+
+/**
+ * Previously defined ahead of getid3_mp3() before autoloader
+ *
+ * Number of frames to scan to determine if MPEG-audio sequence is valid
+ * Lower this number to 5-20 for faster scanning
+ * Increase this number to 50+ for most accurate detection of valid VBR/CBR mpeg-audio streams
+ */
+define('GETID3_MP3_VALID_CHECK_FRAMES', 35);
+
+/**
+ * Previously defined ahead of getid3_flv() before autoloader 
+ */
+define('GETID3_FLV_TAG_AUDIO',          8);
+define('GETID3_FLV_TAG_VIDEO',          9);
+define('GETID3_FLV_TAG_META',          18);
+
+define('GETID3_FLV_VIDEO_H263',         2);
+define('GETID3_FLV_VIDEO_SCREEN',       3);
+define('GETID3_FLV_VIDEO_VP6FLV',       4);
+define('GETID3_FLV_VIDEO_VP6FLV_ALPHA', 5);
+define('GETID3_FLV_VIDEO_SCREENV2',     6);
+define('GETID3_FLV_VIDEO_H264',         7);
+
+define('H264_AVC_SEQUENCE_HEADER',          0);
+define('H264_PROFILE_BASELINE',            66);
+define('H264_PROFILE_MAIN',                77);
+define('H264_PROFILE_EXTENDED',            88);
+define('H264_PROFILE_HIGH',               100);
+define('H264_PROFILE_HIGH10',             110);
+define('H264_PROFILE_HIGH422',            122);
+define('H264_PROFILE_HIGH444',            144);
+define('H264_PROFILE_HIGH444_PREDICTIVE', 244);
+
+/**
+ * Previously defined ahead of getid3_matroska() before autoloader 
+ */
+define('EBML_ID_CHAPTERS',                  0x0043A770); // [10][43][A7][70] -- A system to define basic menus and partition data. For more detailed information, look at the Chapters Explanation.
+define('EBML_ID_SEEKHEAD',                  0x014D9B74); // [11][4D][9B][74] -- Contains the position of other level 1 elements.
+define('EBML_ID_TAGS',                      0x0254C367); // [12][54][C3][67] -- Element containing elements specific to Tracks/Chapters. A list of valid tags can be found <http://www.matroska.org/technical/specs/tagging/index.html>.
+define('EBML_ID_INFO',                      0x0549A966); // [15][49][A9][66] -- Contains miscellaneous general information and statistics on the file.
+define('EBML_ID_TRACKS',                    0x0654AE6B); // [16][54][AE][6B] -- A top-level block of information with many tracks described.
+define('EBML_ID_SEGMENT',                   0x08538067); // [18][53][80][67] -- This element contains all other top-level (level 1) elements. Typically a Matroska file is composed of 1 segment.
+define('EBML_ID_ATTACHMENTS',               0x0941A469); // [19][41][A4][69] -- Contain attached files.
+define('EBML_ID_EBML',                      0x0A45DFA3); // [1A][45][DF][A3] -- Set the EBML characteristics of the data to follow. Each EBML document has to start with this.
+define('EBML_ID_CUES',                      0x0C53BB6B); // [1C][53][BB][6B] -- A top-level element to speed seeking access. All entries are local to the segment.
+define('EBML_ID_CLUSTER',                   0x0F43B675); // [1F][43][B6][75] -- The lower level element containing the (monolithic) Block structure.
+define('EBML_ID_LANGUAGE',                    0x02B59C); //     [22][B5][9C] -- Specifies the language of the track in the Matroska languages form.
+define('EBML_ID_TRACKTIMECODESCALE',          0x03314F); //     [23][31][4F] -- The scale to apply on this track to work at normal speed in relation with other tracks (mostly used to adjust video speed when the audio length differs).
+define('EBML_ID_DEFAULTDURATION',             0x03E383); //     [23][E3][83] -- Number of nanoseconds (i.e. not scaled) per frame.
+define('EBML_ID_CODECNAME',                   0x058688); //     [25][86][88] -- A human-readable string specifying the codec.
+define('EBML_ID_CODECDOWNLOADURL',            0x06B240); //     [26][B2][40] -- A URL to download about the codec used.
+define('EBML_ID_TIMECODESCALE',               0x0AD7B1); //     [2A][D7][B1] -- Timecode scale in nanoseconds (1.000.000 means all timecodes in the segment are expressed in milliseconds).
+define('EBML_ID_COLOURSPACE',                 0x0EB524); //     [2E][B5][24] -- Same value as in AVI (32 bits).
+define('EBML_ID_GAMMAVALUE',                  0x0FB523); //     [2F][B5][23] -- Gamma Value.
+define('EBML_ID_CODECSETTINGS',               0x1A9697); //     [3A][96][97] -- A string describing the encoding setting used.
+define('EBML_ID_CODECINFOURL',                0x1B4040); //     [3B][40][40] -- A URL to find information about the codec used.
+define('EBML_ID_PREVFILENAME',                0x1C83AB); //     [3C][83][AB] -- An escaped filename corresponding to the previous segment.
+define('EBML_ID_PREVUID',                     0x1CB923); //     [3C][B9][23] -- A unique ID to identify the previous chained segment (128 bits).
+define('EBML_ID_NEXTFILENAME',                0x1E83BB); //     [3E][83][BB] -- An escaped filename corresponding to the next segment.
+define('EBML_ID_NEXTUID',                     0x1EB923); //     [3E][B9][23] -- A unique ID to identify the next chained segment (128 bits).
+define('EBML_ID_CONTENTCOMPALGO',               0x0254); //         [42][54] -- The compression algorithm used. Algorithms that have been specified so far are:
+define('EBML_ID_CONTENTCOMPSETTINGS',           0x0255); //         [42][55] -- Settings that might be needed by the decompressor. For Header Stripping (ContentCompAlgo=3), the bytes that were removed from the beggining of each frames of the track.
+define('EBML_ID_DOCTYPE',                       0x0282); //         [42][82] -- A string that describes the type of document that follows this EBML header ('matroska' in our case).
+define('EBML_ID_DOCTYPEREADVERSION',            0x0285); //         [42][85] -- The minimum DocType version an interpreter has to support to read this file.
+define('EBML_ID_EBMLVERSION',                   0x0286); //         [42][86] -- The version of EBML parser used to create the file.
+define('EBML_ID_DOCTYPEVERSION',                0x0287); //         [42][87] -- The version of DocType interpreter used to create the file.
+define('EBML_ID_EBMLMAXIDLENGTH',               0x02F2); //         [42][F2] -- The maximum length of the IDs you'll find in this file (4 or less in Matroska).
+define('EBML_ID_EBMLMAXSIZELENGTH',             0x02F3); //         [42][F3] -- The maximum length of the sizes you'll find in this file (8 or less in Matroska). This does not override the element size indicated at the beginning of an element. Elements that have an indicated size which is larger than what is allowed by EBMLMaxSizeLength shall be considered invalid.
+define('EBML_ID_EBMLREADVERSION',               0x02F7); //         [42][F7] -- The minimum EBML version a parser has to support to read this file.
+define('EBML_ID_CHAPLANGUAGE',                  0x037C); //         [43][7C] -- The languages corresponding to the string, in the bibliographic ISO-639-2 form.
+define('EBML_ID_CHAPCOUNTRY',                   0x037E); //         [43][7E] -- The countries corresponding to the string, same 2 octets as in Internet domains.
+define('EBML_ID_SEGMENTFAMILY',                 0x0444); //         [44][44] -- A randomly generated unique ID that all segments related to each other must use (128 bits).
+define('EBML_ID_DATEUTC',                       0x0461); //         [44][61] -- Date of the origin of timecode (value 0), i.e. production date.
+define('EBML_ID_TAGLANGUAGE',                   0x047A); //         [44][7A] -- Specifies the language of the tag specified, in the Matroska languages form.
+define('EBML_ID_TAGDEFAULT',                    0x0484); //         [44][84] -- Indication to know if this is the default/original language to use for the given tag.
+define('EBML_ID_TAGBINARY',                     0x0485); //         [44][85] -- The values of the Tag if it is binary. Note that this cannot be used in the same SimpleTag as TagString.
+define('EBML_ID_TAGSTRING',                     0x0487); //         [44][87] -- The value of the Tag.
+define('EBML_ID_DURATION',                      0x0489); //         [44][89] -- Duration of the segment (based on TimecodeScale).
+define('EBML_ID_CHAPPROCESSPRIVATE',            0x050D); //         [45][0D] -- Some optional data attached to the ChapProcessCodecID information. For ChapProcessCodecID = 1, it is the "DVD level" equivalent.
+define('EBML_ID_CHAPTERFLAGENABLED',            0x0598); //         [45][98] -- Specify wether the chapter is enabled. It can be enabled/disabled by a Control Track. When disabled, the movie should skip all the content between the TimeStart and TimeEnd of this chapter.
+define('EBML_ID_TAGNAME',                       0x05A3); //         [45][A3] -- The name of the Tag that is going to be stored.
+define('EBML_ID_EDITIONENTRY',                  0x05B9); //         [45][B9] -- Contains all information about a segment edition.
+define('EBML_ID_EDITIONUID',                    0x05BC); //         [45][BC] -- A unique ID to identify the edition. It's useful for tagging an edition.
+define('EBML_ID_EDITIONFLAGHIDDEN',             0x05BD); //         [45][BD] -- If an edition is hidden (1), it should not be available to the user interface (but still to Control Tracks).
+define('EBML_ID_EDITIONFLAGDEFAULT',            0x05DB); //         [45][DB] -- If a flag is set (1) the edition should be used as the default one.
+define('EBML_ID_EDITIONFLAGORDERED',            0x05DD); //         [45][DD] -- Specify if the chapters can be defined multiple times and the order to play them is enforced.
+define('EBML_ID_FILEDATA',                      0x065C); //         [46][5C] -- The data of the file.
+define('EBML_ID_FILEMIMETYPE',                  0x0660); //         [46][60] -- MIME type of the file.
+define('EBML_ID_FILENAME',                      0x066E); //         [46][6E] -- Filename of the attached file.
+define('EBML_ID_FILEREFERRAL',                  0x0675); //         [46][75] -- A binary value that a track/codec can refer to when the attachment is needed.
+define('EBML_ID_FILEDESCRIPTION',               0x067E); //         [46][7E] -- A human-friendly name for the attached file.
+define('EBML_ID_FILEUID',                       0x06AE); //         [46][AE] -- Unique ID representing the file, as random as possible.
+define('EBML_ID_CONTENTENCALGO',                0x07E1); //         [47][E1] -- The encryption algorithm used. The value '0' means that the contents have not been encrypted but only signed. Predefined values:
+define('EBML_ID_CONTENTENCKEYID',               0x07E2); //         [47][E2] -- For public key algorithms this is the ID of the public key the the data was encrypted with.
+define('EBML_ID_CONTENTSIGNATURE',              0x07E3); //         [47][E3] -- A cryptographic signature of the contents.
+define('EBML_ID_CONTENTSIGKEYID',               0x07E4); //         [47][E4] -- This is the ID of the private key the data was signed with.
+define('EBML_ID_CONTENTSIGALGO',                0x07E5); //         [47][E5] -- The algorithm used for the signature. A value of '0' means that the contents have not been signed but only encrypted. Predefined values:
+define('EBML_ID_CONTENTSIGHASHALGO',            0x07E6); //         [47][E6] -- The hash algorithm used for the signature. A value of '0' means that the contents have not been signed but only encrypted. Predefined values:
+define('EBML_ID_MUXINGAPP',                     0x0D80); //         [4D][80] -- Muxing application or library ("libmatroska-0.4.3").
+define('EBML_ID_SEEK',                          0x0DBB); //         [4D][BB] -- Contains a single seek entry to an EBML element.
+define('EBML_ID_CONTENTENCODINGORDER',          0x1031); //         [50][31] -- Tells when this modification was used during encoding/muxing starting with 0 and counting upwards. The decoder/demuxer has to start with the highest order number it finds and work its way down. This value has to be unique over all ContentEncodingOrder elements in the segment.
+define('EBML_ID_CONTENTENCODINGSCOPE',          0x1032); //         [50][32] -- A bit field that describes which elements have been modified in this way. Values (big endian) can be OR'ed. Possible values:
+define('EBML_ID_CONTENTENCODINGTYPE',           0x1033); //         [50][33] -- A value describing what kind of transformation has been done. Possible values:
+define('EBML_ID_CONTENTCOMPRESSION',            0x1034); //         [50][34] -- Settings describing the compression used. Must be present if the value of ContentEncodingType is 0 and absent otherwise. Each block must be decompressable even if no previous block is available in order not to prevent seeking.
+define('EBML_ID_CONTENTENCRYPTION',             0x1035); //         [50][35] -- Settings describing the encryption used. Must be present if the value of ContentEncodingType is 1 and absent otherwise.
+define('EBML_ID_CUEREFNUMBER',                  0x135F); //         [53][5F] -- Number of the referenced Block of Track X in the specified Cluster.
+define('EBML_ID_NAME',                          0x136E); //         [53][6E] -- A human-readable track name.
+define('EBML_ID_CUEBLOCKNUMBER',                0x1378); //         [53][78] -- Number of the Block in the specified Cluster.
+define('EBML_ID_TRACKOFFSET',                   0x137F); //         [53][7F] -- A value to add to the Block's Timecode. This can be used to adjust the playback offset of a track.
+define('EBML_ID_SEEKID',                        0x13AB); //         [53][AB] -- The binary ID corresponding to the element name.
+define('EBML_ID_SEEKPOSITION',                  0x13AC); //         [53][AC] -- The position of the element in the segment in octets (0 = first level 1 element).
+define('EBML_ID_STEREOMODE',                    0x13B8); //         [53][B8] -- Stereo-3D video mode.
+define('EBML_ID_OLDSTEREOMODE',                 0x13B9); //         [53][B9] -- Bogus StereoMode value used in old versions of libmatroska. DO NOT USE. (0: mono, 1: right eye, 2: left eye, 3: both eyes).
+define('EBML_ID_PIXELCROPBOTTOM',               0x14AA); //         [54][AA] -- The number of video pixels to remove at the bottom of the image (for HDTV content).
+define('EBML_ID_DISPLAYWIDTH',                  0x14B0); //         [54][B0] -- Width of the video frames to display.
+define('EBML_ID_DISPLAYUNIT',                   0x14B2); //         [54][B2] -- Type of the unit for DisplayWidth/Height (0: pixels, 1: centimeters, 2: inches).
+define('EBML_ID_ASPECTRATIOTYPE',               0x14B3); //         [54][B3] -- Specify the possible modifications to the aspect ratio (0: free resizing, 1: keep aspect ratio, 2: fixed).
+define('EBML_ID_DISPLAYHEIGHT',                 0x14BA); //         [54][BA] -- Height of the video frames to display.
+define('EBML_ID_PIXELCROPTOP',                  0x14BB); //         [54][BB] -- The number of video pixels to remove at the top of the image.
+define('EBML_ID_PIXELCROPLEFT',                 0x14CC); //         [54][CC] -- The number of video pixels to remove on the left of the image.
+define('EBML_ID_PIXELCROPRIGHT',                0x14DD); //         [54][DD] -- The number of video pixels to remove on the right of the image.
+define('EBML_ID_FLAGFORCED',                    0x15AA); //         [55][AA] -- Set if that track MUST be used during playback. There can be many forced track for a kind (audio, video or subs), the player should select the one which language matches the user preference or the default + forced track. Overlay MAY happen between a forced and non-forced track of the same kind.
+define('EBML_ID_MAXBLOCKADDITIONID',            0x15EE); //         [55][EE] -- The maximum value of BlockAddID. A value 0 means there is no BlockAdditions for this track.
+define('EBML_ID_WRITINGAPP',                    0x1741); //         [57][41] -- Writing application ("mkvmerge-0.3.3").
+define('EBML_ID_CLUSTERSILENTTRACKS',           0x1854); //         [58][54] -- The list of tracks that are not used in that part of the stream. It is useful when using overlay tracks on seeking. Then you should decide what track to use.
+define('EBML_ID_CLUSTERSILENTTRACKNUMBER',      0x18D7); //         [58][D7] -- One of the track number that are not used from now on in the stream. It could change later if not specified as silent in a further Cluster.
+define('EBML_ID_ATTACHEDFILE',                  0x21A7); //         [61][A7] -- An attached file.
+define('EBML_ID_CONTENTENCODING',               0x2240); //         [62][40] -- Settings for one content encoding like compression or encryption.
+define('EBML_ID_BITDEPTH',                      0x2264); //         [62][64] -- Bits per sample, mostly used for PCM.
+define('EBML_ID_CODECPRIVATE',                  0x23A2); //         [63][A2] -- Private data only known to the codec.
+define('EBML_ID_TARGETS',                       0x23C0); //         [63][C0] -- Contain all UIDs where the specified meta data apply. It is void to describe everything in the segment.
+define('EBML_ID_CHAPTERPHYSICALEQUIV',          0x23C3); //         [63][C3] -- Specify the physical equivalent of this ChapterAtom like "DVD" (60) or "SIDE" (50), see complete list of values.
+define('EBML_ID_TAGCHAPTERUID',                 0x23C4); //         [63][C4] -- A unique ID to identify the Chapter(s) the tags belong to. If the value is 0 at this level, the tags apply to all chapters in the Segment.
+define('EBML_ID_TAGTRACKUID',                   0x23C5); //         [63][C5] -- A unique ID to identify the Track(s) the tags belong to. If the value is 0 at this level, the tags apply to all tracks in the Segment.
+define('EBML_ID_TAGATTACHMENTUID',              0x23C6); //         [63][C6] -- A unique ID to identify the Attachment(s) the tags belong to. If the value is 0 at this level, the tags apply to all the attachments in the Segment.
+define('EBML_ID_TAGEDITIONUID',                 0x23C9); //         [63][C9] -- A unique ID to identify the EditionEntry(s) the tags belong to. If the value is 0 at this level, the tags apply to all editions in the Segment.
+define('EBML_ID_TARGETTYPE',                    0x23CA); //         [63][CA] -- An informational string that can be used to display the logical level of the target like "ALBUM", "TRACK", "MOVIE", "CHAPTER", etc (see TargetType).
+define('EBML_ID_TRACKTRANSLATE',                0x2624); //         [66][24] -- The track identification for the given Chapter Codec.
+define('EBML_ID_TRACKTRANSLATETRACKID',         0x26A5); //         [66][A5] -- The binary value used to represent this track in the chapter codec data. The format depends on the ChapProcessCodecID used.
+define('EBML_ID_TRACKTRANSLATECODEC',           0x26BF); //         [66][BF] -- The chapter codec using this ID (0: Matroska Script, 1: DVD-menu).
+define('EBML_ID_TRACKTRANSLATEEDITIONUID',      0x26FC); //         [66][FC] -- Specify an edition UID on which this translation applies. When not specified, it means for all editions found in the segment.
+define('EBML_ID_SIMPLETAG',                     0x27C8); //         [67][C8] -- Contains general information about the target.
+define('EBML_ID_TARGETTYPEVALUE',               0x28CA); //         [68][CA] -- A number to indicate the logical level of the target (see TargetType).
+define('EBML_ID_CHAPPROCESSCOMMAND',            0x2911); //         [69][11] -- Contains all the commands associated to the Atom.
+define('EBML_ID_CHAPPROCESSTIME',               0x2922); //         [69][22] -- Defines when the process command should be handled (0: during the whole chapter, 1: before starting playback, 2: after playback of the chapter).
+define('EBML_ID_CHAPTERTRANSLATE',              0x2924); //         [69][24] -- A tuple of corresponding ID used by chapter codecs to represent this segment.
+define('EBML_ID_CHAPPROCESSDATA',               0x2933); //         [69][33] -- Contains the command information. The data should be interpreted depending on the ChapProcessCodecID value. For ChapProcessCodecID = 1, the data correspond to the binary DVD cell pre/post commands.
+define('EBML_ID_CHAPPROCESS',                   0x2944); //         [69][44] -- Contains all the commands associated to the Atom.
+define('EBML_ID_CHAPPROCESSCODECID',            0x2955); //         [69][55] -- Contains the type of the codec used for the processing. A value of 0 means native Matroska processing (to be defined), a value of 1 means the DVD command set is used. More codec IDs can be added later.
+define('EBML_ID_CHAPTERTRANSLATEID',            0x29A5); //         [69][A5] -- The binary value used to represent this segment in the chapter codec data. The format depends on the ChapProcessCodecID used.
+define('EBML_ID_CHAPTERTRANSLATECODEC',         0x29BF); //         [69][BF] -- The chapter codec using this ID (0: Matroska Script, 1: DVD-menu).
+define('EBML_ID_CHAPTERTRANSLATEEDITIONUID',    0x29FC); //         [69][FC] -- Specify an edition UID on which this correspondance applies. When not specified, it means for all editions found in the segment.
+define('EBML_ID_CONTENTENCODINGS',              0x2D80); //         [6D][80] -- Settings for several content encoding mechanisms like compression or encryption.
+define('EBML_ID_MINCACHE',                      0x2DE7); //         [6D][E7] -- The minimum number of frames a player should be able to cache during playback. If set to 0, the reference pseudo-cache system is not used.
+define('EBML_ID_MAXCACHE',                      0x2DF8); //         [6D][F8] -- The maximum cache size required to store referenced frames in and the current frame. 0 means no cache is needed.
+define('EBML_ID_CHAPTERSEGMENTUID',             0x2E67); //         [6E][67] -- A segment to play in place of this chapter. Edition ChapterSegmentEditionUID should be used for this segment, otherwise no edition is used.
+define('EBML_ID_CHAPTERSEGMENTEDITIONUID',      0x2EBC); //         [6E][BC] -- The edition to play from the segment linked in ChapterSegmentUID.
+define('EBML_ID_TRACKOVERLAY',                  0x2FAB); //         [6F][AB] -- Specify that this track is an overlay track for the Track specified (in the u-integer). That means when this track has a gap (see SilentTracks) the overlay track should be used instead. The order of multiple TrackOverlay matters, the first one is the one that should be used. If not found it should be the second, etc.
+define('EBML_ID_TAG',                           0x3373); //         [73][73] -- Element containing elements specific to Tracks/Chapters.
+define('EBML_ID_SEGMENTFILENAME',               0x3384); //         [73][84] -- A filename corresponding to this segment.
+define('EBML_ID_SEGMENTUID',                    0x33A4); //         [73][A4] -- A randomly generated unique ID to identify the current segment between many others (128 bits).
+define('EBML_ID_CHAPTERUID',                    0x33C4); //         [73][C4] -- A unique ID to identify the Chapter.
+define('EBML_ID_TRACKUID',                      0x33C5); //         [73][C5] -- A unique ID to identify the Track. This should be kept the same when making a direct stream copy of the Track to another file.
+define('EBML_ID_ATTACHMENTLINK',                0x3446); //         [74][46] -- The UID of an attachment that is used by this codec.
+define('EBML_ID_CLUSTERBLOCKADDITIONS',         0x35A1); //         [75][A1] -- Contain additional blocks to complete the main one. An EBML parser that has no knowledge of the Block structure could still see and use/skip these data.
+define('EBML_ID_CHANNELPOSITIONS',              0x347B); //         [7D][7B] -- Table of horizontal angles for each successive channel, see appendix.
+define('EBML_ID_OUTPUTSAMPLINGFREQUENCY',       0x38B5); //         [78][B5] -- Real output sampling frequency in Hz (used for SBR techniques).
+define('EBML_ID_TITLE',                         0x3BA9); //         [7B][A9] -- General name of the segment.
+define('EBML_ID_CHAPTERDISPLAY',                  0x00); //             [80] -- Contains all possible strings to use for the chapter display.
+define('EBML_ID_TRACKTYPE',                       0x03); //             [83] -- A set of track types coded on 8 bits (1: video, 2: audio, 3: complex, 0x10: logo, 0x11: subtitle, 0x12: buttons, 0x20: control).
+define('EBML_ID_CHAPSTRING',                      0x05); //             [85] -- Contains the string to use as the chapter atom.
+define('EBML_ID_CODECID',                         0x06); //             [86] -- An ID corresponding to the codec, see the codec page for more info.
+define('EBML_ID_FLAGDEFAULT',                     0x08); //             [88] -- Set if that track (audio, video or subs) SHOULD be used if no language found matches the user preference.
+define('EBML_ID_CHAPTERTRACKNUMBER',              0x09); //             [89] -- UID of the Track to apply this chapter too. In the absense of a control track, choosing this chapter will select the listed Tracks and deselect unlisted tracks. Absense of this element indicates that the Chapter should be applied to any currently used Tracks.
+define('EBML_ID_CLUSTERSLICES',                   0x0E); //             [8E] -- Contains slices description.
+define('EBML_ID_CHAPTERTRACK',                    0x0F); //             [8F] -- List of tracks on which the chapter applies. If this element is not present, all tracks apply
+define('EBML_ID_CHAPTERTIMESTART',                0x11); //             [91] -- Timecode of the start of Chapter (not scaled).
+define('EBML_ID_CHAPTERTIMEEND',                  0x12); //             [92] -- Timecode of the end of Chapter (timecode excluded, not scaled).
+define('EBML_ID_CUEREFTIME',                      0x16); //             [96] -- Timecode of the referenced Block.
+define('EBML_ID_CUEREFCLUSTER',                   0x17); //             [97] -- Position of the Cluster containing the referenced Block.
+define('EBML_ID_CHAPTERFLAGHIDDEN',               0x18); //             [98] -- If a chapter is hidden (1), it should not be available to the user interface (but still to Control Tracks).
+define('EBML_ID_FLAGINTERLACED',                  0x1A); //             [9A] -- Set if the video is interlaced.
+define('EBML_ID_CLUSTERBLOCKDURATION',            0x1B); //             [9B] -- The duration of the Block (based on TimecodeScale). This element is mandatory when DefaultDuration is set for the track. When not written and with no DefaultDuration, the value is assumed to be the difference between the timecode of this Block and the timecode of the next Block in "display" order (not coding order). This element can be useful at the end of a Track (as there is not other Block available), or when there is a break in a track like for subtitle tracks.
+define('EBML_ID_FLAGLACING',                      0x1C); //       