Skip to content

[Step 1] Custom colors: stop serving discontinued COLOURLovers backgrounds#50011

Open
Copons wants to merge 1 commit into
trunkfrom
dotcom-1758-stop-the-colourlovers-feature-from-working
Open

[Step 1] Custom colors: stop serving discontinued COLOURLovers backgrounds#50011
Copons wants to merge 1 commit into
trunkfrom
dotcom-1758-stop-the-colourlovers-feature-from-working

Conversation

@Copons

@Copons Copons commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Proposed changes

  • COLOURLovers support has been discontinued. On Atomic sites, a background image set from a COLOURLovers pattern is stored on the COLOURLovers S3 bucket (colourlovers.com.s3.amazonaws.com) and emitted straight into the page, so every visitor's browser requests it on each load. This adds a theme_mod_background_image / theme_mod_background_image_thumb render filter (Colors_Manager_Common::remove_colourlovers_background()) that blanks any colourlovers.com.s3.amazonaws.com or colourlovers-static-replica.s3.amazonaws.com URL, so those requests stop.
  • No fallback is provided — empty/broken backgrounds are acceptable. The stored theme_mod is left untouched and only blanked at render time, so a site shows no background until its owner picks a new one.
  • The filter is attached before the enable_custom_customizer guard, so the requests stop even where the rest of the custom-colors tool is disabled.

Related product discussion/links

Does this pull request change what data or activity we track or use?

No.

Testing instructions

  • On an Atomic site, switch to a classic theme that supports custom backgrounds (e.g. Twenty Fifteen).
  • Give it a COLOURLovers background image, e.g.:
    • wp theme mod set background_image "https://colourlovers-static-replica.s3.amazonaws.com/images/patterns/5814/5814723.png"
    • wp theme mod set background_image_thumb "https://colourlovers-static-replica.s3.amazonaws.com/images/patterns/5814/5814723.png"
  • Before this change: load the front end → the #custom-background-css block contains that URL and the browser requests it (visible in DevTools → Network).
  • After this change: reload → the custom-background block is gone, get_theme_mod( 'background_image' ) returns empty, and no request is made to either COLOURLovers host.

COLOURLovers support has been discontinued. Atomic sites store background images on COLOURLovers' S3 bucket and emit those URLs directly into the page, so visitors' browsers request them on every load. Blank colourlovers.com.s3.amazonaws.com and colourlovers-static-replica.s3.amazonaws.com URLs at render time via the theme_mod_background_image and theme_mod_background_image_thumb filters. No fallback: broken backgrounds are acceptable.
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (WordPress.com Site Helper), and enable the dotcom-1758-stop-the-colourlovers-feature-from-working branch.

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • 🔴 Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!


Wpcomsh plugin:

  • Next scheduled release: Atomic deploys happen twice daily on weekdays (p9o2xV-2EN-p2)

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@github-actions github-actions Bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Jun 26, 2026
@jp-launch-control

jp-launch-control Bot commented Jun 26, 2026

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 1 file.

File Coverage Δ% Δ Uncovered
projects/plugins/wpcomsh/custom-colors/colors.php 0/814 (0.00%) 0.00% 7 💔

Full summary · PHP report

Coverage check overridden by I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. .

@Copons Copons self-assigned this Jun 26, 2026
@Copons Copons added the I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. label Jun 26, 2026
@Copons Copons requested a review from Copilot June 26, 2026 16:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the wpcomsh “custom-colors” functionality to prevent Atomic sites from continuing to serve (and therefore request) discontinued COLOURLovers-hosted background images by blanking those theme mods at render time.

Changes:

  • Add render-time filters for theme_mod_background_image and theme_mod_background_image_thumb to blank COLOURLovers S3 URLs.
  • Introduce Colors_Manager_Common::remove_colourlovers_background() to detect and remove legacy COLOURLovers background image URLs.
  • Add a wpcomsh changelog entry documenting the behavioral change.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
projects/plugins/wpcomsh/custom-colors/colors.php Adds unconditional theme-mod filters and a helper to blank COLOURLovers background URLs at render time.
projects/plugins/wpcomsh/changelog/dotcom-1758-stop-colourlovers-backgrounds Documents the change in wpcomsh’s changelog system.

Comment on lines +661 to +671
public static function remove_colourlovers_background( $url ) {
if ( is_string( $url ) && (
false !== stripos( $url, 'colourlovers.com.s3.amazonaws.com' )
|| false !== stripos( $url, 'colourlovers-static-replica.s3.amazonaws.com' )
) ) {
return '';
}

return $url;
}

@Copons Copons changed the title Custom colors: stop serving discontinued COLOURLovers backgrounds [Step 1] Custom colors: stop serving discontinued COLOURLovers backgrounds Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. [Plugin] Wpcomsh [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants