Core_Command::get_wp_details PHP Метод

get_wp_details() приватный статический Метод

Get version information from wp-includes/version.php.
private static get_wp_details ( ) : array
Результат array { @type string $wp_version The WordPress version. @type int $wp_db_version The WordPress DB revision. @type string $tinymce_version The TinyMCE version. @type string $wp_local_package The TinyMCE version. }
    private static function get_wp_details()
    {
        $versions_path = ABSPATH . 'wp-includes/version.php';
        if (!is_readable($versions_path)) {
            WP_CLI::error("This does not seem to be a WordPress install.\n" . "Pass --path=`path/to/wordpress` or run `wp core download`.");
        }
        $version_content = file_get_contents($versions_path, null, null, 6, 2048);
        $vars = array('wp_version', 'wp_db_version', 'tinymce_version', 'wp_local_package');
        $result = array();
        foreach ($vars as $var_name) {
            $result[$var_name] = self::find_var($var_name, $version_content);
        }
        return $result;
    }