diff --git a/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/class-plugin-fields.php b/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/class-plugin-fields.php
index 11f0ba2308..77e800d1bf 100644
--- a/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/class-plugin-fields.php
+++ b/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/class-plugin-fields.php
@@ -76,12 +76,6 @@ private static function register_meta(): void {
'show_in_rest' => true,
] );
- register_meta( 'post', 'assets_banners_color', [
- 'description' => 'Fallback color for the plugin.',
- 'single' => true,
- 'show_in_rest' => true,
- ] );
-
register_meta( 'post', 'last_updated', [
'description' => 'Date the plugin was last updated.',
'single' => true,
diff --git a/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php b/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
index a960cb6752..308ff13770 100644
--- a/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
+++ b/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
@@ -472,24 +472,16 @@ public static function get_plugin_icon( $post = null, $output = 'raw', $locale =
/**
* Retrieve the Geopattern SVG URL for a given plugin.
+ *
+ * The pattern color is derived from the slug.
+ *
+ * @param int|\WP_Post|null $post Optional. Post ID or post object. Defaults to global $post.
+ * @return string The Geopattern SVG URL.
*/
- public static function get_geopattern_icon_url( $post = null, $color = null ) {
+ public static function get_geopattern_icon_url( $post = null ) {
$plugin = get_post( $post );
- if ( is_null( $color ) ) {
- $color = get_post_meta( $plugin->ID, 'assets_banners_color', true );
- }
-
- if ( strlen( $color ) === 6 && strspn( $color, 'abcdef0123456789' ) === 6 ) {
- $color = "_{$color}";
- } else {
- $color = '';
- }
-
- // This is a cached resource. The slug + color combine to form the cache buster.
- $url = "https://s.w.org/plugins/geopattern-icon/{$plugin->post_name}{$color}.svg";
-
- return $url;
+ return "https://s.w.org/plugins/geopattern-icon/{$plugin->post_name}.svg";
}
/**
diff --git a/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-tools.php b/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-tools.php
index 8057a3e399..3722961372 100644
--- a/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-tools.php
+++ b/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-tools.php
@@ -13,30 +13,6 @@
*/
class Tools {
- /**
- * Retrieve the average color of a specified image.
- *
- * This currently relies upon the Jetpack libraries.
- *
- * @static
- *
- * @param $file_location string URL or filepath of image.
- * @return string|bool Average color as a hex value, False on failure.
- */
- public static function get_image_average_color( $file_location ) {
- if ( ! class_exists( 'Tonesque' ) && defined( 'JETPACK__PLUGIN_DIR' ) ) {
- include JETPACK__PLUGIN_DIR . '/_inc/lib/tonesque.php';
- }
-
- if ( ! class_exists( 'Tonesque' ) ) {
- return false;
- }
-
- $tonesque = new \Tonesque( $file_location );
-
- return $tonesque->color();
- }
-
/**
* Returns the latest reviews of a specific plugin.
*
diff --git a/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php b/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php
index 1abbec62b1..dc905c280d 100644
--- a/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php
+++ b/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php
@@ -596,14 +596,6 @@ public function import_from_svn( $plugin_slug, $svn_changed_tags = array( 'trunk
update_post_meta( $plugin->ID, 'assets_banners', wp_slash( $assets['banner'] ) );
update_post_meta( $plugin->ID, 'last_updated', wp_slash( $plugin->post_modified_gmt ) );
- // Calculate the 'plugin color' from the average color of the banner if provided. This is used for fallback icons.
- $banner_average_color = '';
- if ( $first_banner = reset( $assets['banner'] ) ) {
- // The Banners are not stored locally, which is why a URL is used here
- $banner_average_color = Tools::get_image_average_color( Template::get_asset_url( $plugin, $first_banner, false /* no CDN */ ) );
- }
- update_post_meta( $plugin->ID, 'assets_banners_color', wp_slash( $banner_average_color ) );
-
// Store the content of blueprint files, if they're available and valid.
if ( isset( $assets['blueprint'] ) && count( $assets['blueprint'] ) > 0 ) {
update_post_meta( $plugin->ID, 'assets_blueprints', wp_slash( $assets['blueprint'] ) );
diff --git a/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload-handler.php b/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload-handler.php
index cf00f504f8..da945662e1 100644
--- a/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload-handler.php
+++ b/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload-handler.php
@@ -584,7 +584,6 @@ public function process_upload( $for_plugin = 0 ) {
'assets_screenshots' => array(),
'assets_icons' => array(),
'assets_banners' => array(),
- 'assets_banners_color' => false,
'support_threads' => 0,
'support_threads_resolved' => 0,
'downloads' => 0,