[wp-trac] [WordPress Trac] #14179: Theme asking to update (theme with same name on WordPress.org)

WordPress Trac noreply at wordpress.org
Wed Aug 24 01:27:38 UTC 2022


#14179: Theme asking to update (theme with same name on WordPress.org)
-------------------------------------------------+-------------------------
 Reporter:  design_dolphin                       |       Owner:  audrasjb
     Type:  task (blessed)                       |      Status:  accepted
 Priority:  normal                               |   Milestone:  6.1
Component:  Upgrade/Install                      |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing dev-         |     Focuses:
  feedback has-unit-tests                        |
-------------------------------------------------+-------------------------

Comment (by dd32):

 Replying to [comment:105 audrasjb]:
 > The patch looks good to me, but we'd need to make sure it's also
 implemented on the dotorg themes repository.

 Just noting that the WordPress.org themes update API did already have
 support for this, the code on the API is effectively this:
 {{{
 if ( header is set ) {
    // Two options: a) It's set to a supported wordpress.org/themes/$slug
 type URI (handles typos and w.org domain, etc) or b) it's elsewhere
    if ( header matches a WordPress.org theme url ) {
       # a - header matches WordPress.org structure.
       set $slug to slug from URI, rather than folder name.
    } else {
       # b - elsewhere, do not even attempt to find an update for this
 theme
       return no update for theme;
    }
 }
 }}}

 You should be able to set the header on a Core theme, and cease to get
 update notifications about it. You should also be able to set it on a
 Theme with a URI that's a valid theme, but that doesn't match the folder
 the theme is installed in, and get update notifications for the "correct"
 theme. Let me know if you see any issues with it.

 NOTE: We don't currently block theme uploads with the header set AFAIK,
 Theme authors: Please don't set this header in a theme hosted on
 WordPress.org, as it may cause breakage later on.. We'll want to block
 upload (I believe there's a ticket for this somewhere)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/14179#comment:108>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list