Index: src/wp-settings.php
===================================================================
--- src/wp-settings.php	(revision 9568134d7b1f857322745e0694730a209fd7d2cb)
+++ src/wp-settings.php	(date 1593115393831)
@@ -256,6 +256,7 @@
 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-renderer-controller.php';
 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-settings-controller.php';
 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-themes-controller.php';
+require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-site-health-controller.php';
 require ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-meta-fields.php';
 require ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-comment-meta-fields.php';
 require ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-post-meta-fields.php';
Index: src/wp-admin/includes/ajax-actions.php
===================================================================
--- src/wp-admin/includes/ajax-actions.php	(revision 9568134d7b1f857322745e0694730a209fd7d2cb)
+++ src/wp-admin/includes/ajax-actions.php	(date 1593115393850)
@@ -5120,8 +5120,21 @@
  * Ajax handler for site health checks on server communication.
  *
  * @since 5.2.0
+ * @deprecated 5.4.0 Use WP_REST_Site_Health_Controller::test_dotorg_communication()
+ * @see WP_REST_Site_Health_Controller::test_dotorg_communication()
  */
 function wp_ajax_health_check_dotorg_communication() {
+	_doing_it_wrong(
+		'wp_ajax_health_check_dotorg_communication',
+		sprintf(
+			// translators: 1: The Site Health action that is no longer used by core. 2: The new function taht replaces it.
+			__( 'The Site Health check for %1$s has been replaced with %2$s.' ),
+			'wp_ajax_health_check_dotorg_communication',
+			'WP_REST_Site_Health_Controller::test_dotorg_communication'
+		),
+		'5.4.0'
+	);
+
 	check_ajax_referer( 'health-check-site-status' );
 
 	if ( ! current_user_can( 'view_site_health_checks' ) ) {
@@ -5140,8 +5153,21 @@
  * Ajax handler for site health checks on debug mode.
  *
  * @since 5.2.0
+ * @deprecated 5.4.0 Use WP_REST_Site_Health_Controller::test_is_in_debug_mode()
+ * @see WP_REST_Site_Health_Controller::test_is_in_debug_mode()
  */
 function wp_ajax_health_check_is_in_debug_mode() {
+	_doing_it_wrong(
+		'wp_ajax_health_check_is_in_debug_mode',
+		sprintf(
+			// translators: 1: The Site Health action that is no longer used by core. 2: The new function taht replaces it.
+			__( 'The Site Health check for %1$s has been replaced with %2$s.' ),
+			'wp_ajax_health_check_is_in_debug_mode',
+			'WP_REST_Site_Health_Controller::test_is_in_debug_mode'
+		),
+		'5.4.0'
+	);
+
 	wp_verify_nonce( 'health-check-site-status' );
 
 	if ( ! current_user_can( 'view_site_health_checks' ) ) {
@@ -5160,8 +5186,21 @@
  * Ajax handler for site health checks on background updates.
  *
  * @since 5.2.0
+ * @deprecated 5.4.0 Use WP_REST_Site_Health_Controller::test_background_updates()
+ * @see WP_REST_Site_Health_Controller::test_background_updates()
  */
 function wp_ajax_health_check_background_updates() {
+	_doing_it_wrong(
+		'wp_ajax_health_check_background_updates',
+		sprintf(
+		// translators: 1: The Site Health action that is no longer used by core. 2: The new function taht replaces it.
+			__( 'The Site Health check for %1$s has been replaced with %2$s.' ),
+			'wp_ajax_health_check_background_updates',
+			'WP_REST_Site_Health_Controller::test_background_updates'
+		),
+		'5.4.0'
+	);
+
 	check_ajax_referer( 'health-check-site-status' );
 
 	if ( ! current_user_can( 'view_site_health_checks' ) ) {
@@ -5181,8 +5220,21 @@
  * Ajax handler for site health checks on loopback requests.
  *
  * @since 5.2.0
+ * @deprecated 5.4.0 Use WP_REST_Site_Health_Controller::test_loopback_requests()
+ * @see WP_REST_Site_Health_Controller::test_loopback_requests()
  */
 function wp_ajax_health_check_loopback_requests() {
+	_doing_it_wrong(
+		'wp_ajax_health_check_loopback_requests',
+		sprintf(
+		// translators: 1: The Site Health action that is no longer used by core. 2: The new function taht replaces it.
+			__( 'The Site Health check for %1$s has been replaced with %2$s.' ),
+			'wp_ajax_health_check_loopback_requests',
+			'WP_REST_Site_Health_Controller::test_loopback_requests'
+		),
+		'5.4.0'
+	);
+
 	check_ajax_referer( 'health-check-site-status' );
 
 	if ( ! current_user_can( 'view_site_health_checks' ) ) {
@@ -5218,8 +5270,21 @@
  * Ajax handler for site health check to get directories and database sizes.
  *
  * @since 5.2.0
+ * @deprecated 5.4.0 Use WP_REST_Site_Health_Controller::get_directory_sizes()
+ * @see WP_REST_Site_Health_Controller::get_directory_sizes()
  */
 function wp_ajax_health_check_get_sizes() {
+	_doing_it_wrong(
+		'wp_ajax_health_check_get_sizes',
+		sprintf(
+		// translators: 1: The Site Health action that is no longer used by core. 2: The new function taht replaces it.
+			__( 'The Site Health check for %1$s has been replaced with %2$s.' ),
+			'wp_ajax_health_check_get_sizes',
+			'WP_REST_Site_Health_Controller::get_directory_sizes'
+		),
+		'5.4.0'
+	);
+
 	check_ajax_referer( 'health-check-site-status-result' );
 
 	if ( ! current_user_can( 'view_site_health_checks' ) || is_multisite() ) {
Index: src/wp-admin/admin-ajax.php
===================================================================
--- src/wp-admin/admin-ajax.php	(revision 9568134d7b1f857322745e0694730a209fd7d2cb)
+++ src/wp-admin/admin-ajax.php	(date 1593115234341)
@@ -134,11 +134,6 @@
 	'wp-privacy-export-personal-data',
 	'wp-privacy-erase-personal-data',
 	'health-check-site-status-result',
-	'health-check-dotorg-communication',
-	'health-check-is-in-debug-mode',
-	'health-check-background-updates',
-	'health-check-loopback-requests',
-	'health-check-get-sizes',
 	'toggle-auto-updates',
 );
 
Index: src/js/_enqueues/admin/site-health.js
===================================================================
--- src/js/_enqueues/admin/site-health.js	(revision 9568134d7b1f857322745e0694730a209fd7d2cb)
+++ src/js/_enqueues/admin/site-health.js	(date 1593120565580)
@@ -162,11 +162,19 @@
 
 		if ( 1 <= SiteHealth.site_status.async.length ) {
 			$.each( SiteHealth.site_status.async, function() {
+				var url = ajaxurl;
 				var data = {
 					'action': 'health-check-' + this.test.replace( '_', '-' ),
 					'_wpnonce': SiteHealth.nonce.site_status
 				};
 
+				if ( "undefined" !== typeof( this.has_rest ) && this.has_rest ) {
+					url = this.test;
+					data = {
+						'_wpnonce': SiteHealth.nonce.rest_api
+					};
+				}
+
 				if ( this.completed ) {
 					return true;
 				}
@@ -176,14 +184,36 @@
 				this.completed = true;
 
 				$.post(
-					ajaxurl,
-					data,
-					function( response ) {
-						/** This filter is documented in wp-admin/includes/class-wp-site-health.php */
-						AppendIssue( wp.hooks.applyFilters( 'site_status_test_result', response.data ) );
-						maybeRunNextAsyncTest();
-					}
-				);
+					url,
+					data
+				).done( function( response ) {
+					/** This filter is documented in wp-admin/includes/class-wp-site-health.php */
+					AppendIssue( wp.hooks.applyFilters( 'site_status_test_result', response.data ) );
+				} ).fail( function( response ) {
+					var description, issue;
+
+					if ( "undefined" !== typeof( response.responseJSON ) && "undefined" !== typeof( response.responseJSON.message ) ) {
+						description = response.responseJSON.message;
+					} else {
+						description = __( 'No details available' );
+					}
+
+					issue = {
+						'status': 'recommended',
+						'label': __( 'A test is unavailable' ),
+						'badge': {
+							'color': 'red',
+							'label': __( 'Unavailable' )
+						},
+						'description': '<p>' + this.url + '</p><p>' + description + '</p>',
+						'actions': ''
+					};
+
+					/** This filter is documented in wp-admin/includes/class-wp-site-health.php */
+					AppendIssue( wp.hooks.applyFilters( 'site_status_test_result', issue ) );
+				} ).always( function() {
+					maybeRunNextAsyncTest();
+				} );
 
 				return false;
 			} );
@@ -212,21 +242,7 @@
 		}
 
 		if ( 0 < SiteHealth.site_status.async.length ) {
-			data = {
-				'action': 'health-check-' + SiteHealth.site_status.async[0].test.replace( '_', '-' ),
-				'_wpnonce': SiteHealth.nonce.site_status
-			};
-
-			SiteHealth.site_status.async[0].completed = true;
-
-			$.post(
-				ajaxurl,
-				data,
-				function( response ) {
-					AppendIssue( response.data );
-					maybeRunNextAsyncTest();
-				}
-			);
+			maybeRunNextAsyncTest();
 		} else {
 			RecalculateProgression();
 		}
@@ -234,8 +250,7 @@
 
 	function getDirectorySizes() {
 		var data = {
-			action: 'health-check-get-sizes',
-			_wpnonce: SiteHealth.nonce.site_status_result
+			_wpnonce: SiteHealth.nonce.rest_api
 		};
 
 		var timestamp = ( new Date().getTime() );
@@ -246,12 +261,11 @@
 		}, 3000 );
 
 		$.post( {
-			type: 'POST',
-			url: ajaxurl,
+			url: SiteHealth.rest_base + 'wp-site-health/v1/get/directory-sizes',
 			data: data,
 			dataType: 'json'
 		} ).done( function( response ) {
-			updateDirSizes( response.data || {} );
+			updateDirSizes( response || {} );
 		} ).always( function() {
 			var delay = ( new Date().getTime() ) - timestamp;
 
Index: src/wp-admin/includes/class-wp-site-health.php
===================================================================
--- src/wp-admin/includes/class-wp-site-health.php	(revision 9568134d7b1f857322745e0694730a209fd7d2cb)
+++ src/wp-admin/includes/class-wp-site-health.php	(date 1593120739825)
@@ -80,7 +80,9 @@
 
 		$health_check_js_variables = array(
 			'screen'      => $screen->id,
+			'rest_base'   => rest_url( '/' ),
 			'nonce'       => array(
+				'rest_api'           => wp_create_nonce( 'wp_rest' ),
 				'site_status'        => wp_create_nonce( 'health-check-site-status' ),
 				'site_status_result' => wp_create_nonce( 'health-check-site-status-result' ),
 			),
@@ -133,6 +135,7 @@
 				if ( is_string( $test['test'] ) ) {
 					$health_check_js_variables['site_status']['async'][] = array(
 						'test'      => $test['test'],
+						'has_rest'  => ( isset( $test['has_rest'] ) ? $test['has_rest'] : false ),
 						'completed' => false,
 					);
 				}
@@ -1963,6 +1966,7 @@
 	 * experiences.
 	 *
 	 * @since 5.2.0
+	 * @since 5.5.0 Added support for `has_rest` and `permissions`.
 	 *
 	 * @return array The list of tests to run.
 	 */
@@ -2028,27 +2032,22 @@
 			),
 			'async'  => array(
 				'dotorg_communication' => array(
-					'label' => __( 'Communication with WordPress.org' ),
-					'test'  => 'dotorg_communication',
+					'label'    => __( 'Communication with WordPress.org' ),
+					'test'     => rest_url( 'wp-site-health/v1/test/dotorg-communication' ),
+					'has_rest' => true,
 				),
 				'background_updates'   => array(
-					'label' => __( 'Background updates' ),
-					'test'  => 'background_updates',
+					'label'    => __( 'Background updates' ),
+					'test'     => rest_url( 'wp-site-health/v1/test/background-updates' ),
+					'has_rest' => true,
 				),
 				'loopback_requests'    => array(
-					'label' => __( 'Loopback request' ),
-					'test'  => 'loopback_requests',
+					'label'    => __( 'Loopback request' ),
+					'test'     => rest_url( 'wp-site-health/v1/test/loopback-requests' ),
+					'has_rest' => true,
 				),
 			),
 		);
-
-		// Conditionally include REST rules if the function for it exists.
-		if ( function_exists( 'rest_url' ) ) {
-			$tests['direct']['rest_availability'] = array(
-				'label' => __( 'REST API availability' ),
-				'test'  => 'rest_availability',
-			);
-		}
 
 		/**
 		 * Add or modify which site status tests are run on a site.
@@ -2074,9 +2073,10 @@
 		 *         Plugins and themes are encouraged to prefix test identifiers with their slug
 		 *         to avoid any collisions between tests.
 		 *
-		 *         @type string $label A friendly label for your test to identify it by.
-		 *         @type mixed  $test  A callable to perform a direct test, or a string Ajax action to be called
-		 *                             to perform an async test.
+		 *         @type string  $label       A friendly label for your test to identify it by.
+		 *         @type mixed   $test        A callable to perform a direct test, or a string AJAX action to be
+		 *                                    called to perform an async test.
+		 *         @type boolean $has_rest    Optional. Denote if `$test` has a REST API endpoint.
 		 *     }
 		 * }
 		 */
Index: src/wp-admin/includes/class-wp-site-health-auto-updates.php
===================================================================
--- src/wp-admin/includes/class-wp-site-health-auto-updates.php	(revision 9568134d7b1f857322745e0694730a209fd7d2cb)
+++ src/wp-admin/includes/class-wp-site-health-auto-updates.php	(date 1593115393868)
@@ -85,46 +85,7 @@
 	 * @return array The test results.
 	 */
 	public function test_wp_version_check_attached() {
-		if ( ! is_main_site() ) {
-			return;
-		}
-
-		$cookies = wp_unslash( $_COOKIE );
-		$timeout = 10;
-		$headers = array(
-			'Cache-Control' => 'no-cache',
-		);
-		/** This filter is documented in wp-includes/class-wp-http-streams.php */
-		$sslverify = apply_filters( 'https_local_ssl_verify', false );
-
-		// Include Basic auth in loopback requests.
-		if ( isset( $_SERVER['PHP_AUTH_USER'] ) && isset( $_SERVER['PHP_AUTH_PW'] ) ) {
-			$headers['Authorization'] = 'Basic ' . base64_encode( wp_unslash( $_SERVER['PHP_AUTH_USER'] ) . ':' . wp_unslash( $_SERVER['PHP_AUTH_PW'] ) );
-		}
-
-		$url = add_query_arg(
-			array(
-				'health-check-test-wp_version_check' => true,
-			),
-			admin_url( 'site-health.php' )
-		);
-
-		$test = wp_remote_get( $url, compact( 'cookies', 'headers', 'timeout', 'sslverify' ) );
-
-		if ( is_wp_error( $test ) ) {
-			return array(
-				'description' => sprintf(
-					/* translators: %s: Name of the filter used. */
-					__( 'Could not confirm that the %s filter is available.' ),
-					'<code>wp_version_check()</code>'
-				),
-				'severity'    => 'warning',
-			);
-		}
-
-		$response = wp_remote_retrieve_body( $test );
-
-		if ( 'yes' !== $response ) {
+		if ( ! has_filter( 'wp_version_check', 'wp_version_check' ) ) {
 			return array(
 				'description' => sprintf(
 					/* translators: %s: Name of the filter used. */
@@ -305,6 +266,11 @@
 	 * @return array The test results.
 	 */
 	function test_check_wp_filesystem_method() {
+		// Make sure the `request_filesystem_credentials` function is available during our REST call.
+		if ( ! function_exists( 'request_filesystem_credentials' ) ) {
+			require_once( ABSPATH . '/wp-admin/includes/file.php' );
+		}
+
 		$skin    = new Automatic_Upgrader_Skin;
 		$success = $skin->request_filesystem_credentials( false, ABSPATH );
 
@@ -351,6 +317,11 @@
 			return false;
 		}
 
+		// Make sure the `get_core_checksums` function is available during our REST call.
+		if ( ! function_exists( 'get_core_checksums' ) ) {
+			require_once( ABSPATH . '/wp-admin/includes/update.php' );
+		}
+
 		$checksums = get_core_checksums( $wp_version, 'en_US' );
 		$dev       = ( false !== strpos( $wp_version, '-' ) );
 		// Get the last stable version's files and test against that.
Index: src/wp-includes/rest-api.php
===================================================================
--- src/wp-includes/rest-api.php	(revision 9568134d7b1f857322745e0694730a209fd7d2cb)
+++ src/wp-includes/rest-api.php	(date 1593115393878)
@@ -281,6 +281,10 @@
 	$controller = new WP_REST_Themes_Controller;
 	$controller->register_routes();
 
+	// Site Health
+	$controller = new WP_REST_Site_Health_Controller;
+	$controller->register_routes();
+
 }
 
 /**
Index: src/wp-admin/site-health.php
===================================================================
--- src/wp-admin/site-health.php	(revision 9568134d7b1f857322745e0694730a209fd7d2cb)
+++ src/wp-admin/site-health.php	(date 1593117675919)
@@ -23,15 +23,6 @@
 wp_enqueue_style( 'site-health' );
 wp_enqueue_script( 'site-health' );
 
-if ( ! class_exists( 'WP_Site_Health' ) ) {
-	require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php';
-}
-
-$health_check_site_status = WP_Site_Health::get_instance();
-
-// Start by checking if this is a special request checking for the existence of certain filters.
-$health_check_site_status->check_wp_version_check_exists();
-
 require_once ABSPATH . 'wp-admin/admin-header.php';
 ?>
 <div class="health-check-header">
Index: src/wp-includes/rest-api/endpoints/class-wp-rest-site-health-controller.php
===================================================================
--- src/wp-includes/rest-api/endpoints/class-wp-rest-site-health-controller.php	(date 1593120287666)
+++ src/wp-includes/rest-api/endpoints/class-wp-rest-site-health-controller.php	(date 1593120287666)
@@ -0,0 +1,244 @@
+<?php
+/**
+ * REST API: WP_REST_Site_Health_Controller class
+ *
+ * @package WordPress
+ * @subpackage REST_API
+ * @since 5.5.0
+ */
+
+/**
+ * Core class for interacting with Site Health elements.
+ *
+ * @since 5.5.0
+ *
+ * @see WP_REST_Controller
+ */
+class WP_REST_Site_Health_Controller extends WP_REST_Controller {
+
+	private $site_health;
+
+	/**
+	 * Constructor.
+	 */
+	public function __construct() {
+		if ( ! class_exists( 'WP_Site_Health' ) ) {
+			require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php';
+		}
+
+		$this->namespace = 'wp-site-health/v1';
+
+		$this->site_health = WP_Site_Health::get_instance();
+	}
+
+	/**
+	 * Register API routes.
+	 *
+	 * @since 5.5.0
+	 *
+	 * @see register_rest_route()
+	 */
+	public function register_routes() {
+		register_rest_route(
+			$this->namespace,
+			sprintf(
+				'/%s/%s',
+				'test',
+				'background-updates'
+			),
+			array(
+				'methods'             => 'POST',
+				'callback'            => array( $this, 'test_background_updates' ),
+				'permission_callback' => function() {
+					return $this->validate_request_permission( 'background_updates' );
+				},
+			)
+		);
+
+		register_rest_route(
+			$this->namespace,
+			sprintf(
+				'/%s/%s',
+				'test',
+				'loopback-requests'
+			),
+			array(
+				'methods'             => 'POST',
+				'callback'            => array( $this, 'test_loopback_requests' ),
+				'permission_callback' => function() {
+					return $this->validate_request_permission( 'loopback_requests' );
+				},
+			)
+		);
+
+		register_rest_route(
+			$this->namespace,
+			sprintf(
+				'/%s/%s',
+				'test',
+				'dotorg-communication'
+			),
+			array(
+				'methods'             => 'POST',
+				'callback'            => array( $this, 'test_dotorg_communication' ),
+				'permission_callback' => function() {
+					return $this->validate_request_permission( 'dotorg_communication' );
+				},
+			)
+		);
+
+		register_rest_route(
+			$this->namespace,
+			sprintf(
+				'/%s/%s',
+				'test',
+				'debug_enabled'
+			),
+			array(
+				'methods'             => 'POST',
+				'callback'            => array( $this, 'test_is_in_debug_mode' ),
+				'permission_callback' => function() {
+					return $this->validate_request_permission( 'debug_enabled' );
+				},
+			)
+		);
+
+		register_rest_route(
+			$this->namespace,
+			sprintf(
+				'/%s/%s',
+				'get',
+				'directory-sizes'
+			),
+			array(
+				'methods'             => 'POST',
+				'callback'            => array( $this, 'get_directory_sizes' ),
+				'permission_callback' => function() {
+					return $this->validate_request_permission( 'debug_enabled' ) && ! is_multisite();
+				},
+			)
+		);
+	}
+
+	/**
+	 * Validate if the current user can request this REST endpoint.
+	 *
+	 * @param string $check The endpoint check being ran.
+	 *
+	 * @return bool
+	 */
+	public function validate_request_permission( $check ) {
+		$default_capability = 'view_site_health_checks';
+
+		/**
+		 * Filter the capability needed to run a given Site Health check.
+		 *
+		 * @since 5.5.0
+		 *
+		 * @param string $default_capability The default capability required for this check.
+		 * @param string $check              The Site Health check being performed.
+		 */
+		$capability = apply_filters( "site_health_test_rest_capability_{$check}", $default_capability, $check );
+
+		return current_user_can( $capability );
+	}
+
+	/**
+	 * Check if background updates work as expected.
+	 *
+	 * @since 5.5.0
+	 *
+	 * @return array
+	 */
+	public function test_background_updates() {
+		return array(
+			'data' => $this->site_health->get_test_background_updates()
+		);
+	}
+
+	/**
+	 * Check that the site can reach the WordPress.org API.
+	 *
+	 * @since 5.5.0
+	 *
+	 * @return array
+	 */
+	public function test_dotorg_communication() {
+		return array(
+			'data' => $this->site_health->get_test_dotorg_communication()
+		);
+	}
+
+	/**
+	 * Check that loopbacks can be performed.
+	 *
+	 * @since 5.5.0
+	 *
+	 * @return array
+	 */
+	public function test_loopback_requests() {
+		return array(
+			'data' => $this->site_health->get_test_loopback_requests()
+		);
+	}
+
+	/**
+	 * Check if the site has debug mode enabled.
+	 *
+	 * @since 5.5.0
+	 *
+	 * @return array
+	 */
+	public function test_is_in_debug_mode() {
+		return array(
+			'data' => $this->site_health->get_test_is_in_debug_mode()
+		);
+	}
+
+	/**
+	 * Get the current directory sizes for this install.
+	 *
+	 * @since 5.5.0
+	 */
+	public function get_directory_sizes() {
+		if ( ! class_exists( 'WP_Debug_Data' ) ) {
+			require_once( ABSPATH . 'wp-admin/includes/class-wp-debug-data.php' );
+		}
+
+		$sizes_data = WP_Debug_Data::get_sizes();
+		$all_sizes  = array( 'raw' => 0 );
+
+		foreach ( $sizes_data as $name => $value ) {
+			$name = sanitize_text_field( $name );
+			$data = array();
+
+			if ( isset( $value['size'] ) ) {
+				if ( is_string( $value['size'] ) ) {
+					$data['size'] = sanitize_text_field( $value['size'] );
+				} else {
+					$data['size'] = (int) $value['size'];
+				}
+			}
+
+			if ( isset( $value['debug'] ) ) {
+				if ( is_string( $value['debug'] ) ) {
+					$data['debug'] = sanitize_text_field( $value['debug'] );
+				} else {
+					$data['debug'] = (int) $value['debug'];
+				}
+			}
+
+			if ( ! empty( $value['raw'] ) ) {
+				$data['raw'] = (int) $value['raw'];
+			}
+
+			$all_sizes[ $name ] = $data;
+		}
+
+		if ( isset( $all_sizes['total_size']['debug'] ) && 'not available' === $all_sizes['total_size']['debug'] ) {
+			return new WP_Error( 'not_available', 'not_available', $all_sizes );
+		}
+
+		return $all_sizes;
+	}
+}
