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

WordPress Trac noreply at wordpress.org
Fri Jul 21 21:10:50 UTC 2017


#14179: Theme asking to update (theme with same name on WordPress.org)
----------------------------+----------------------------
 Reporter:  design_dolphin  |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  WordPress.org
Component:  Themes          |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+----------------------------

Comment (by dingdang):

 P.S. Another good part of this is that only very simple code must be added
 in several places:

 '''The API:'''
 1. calculate the UID based on slug, author, author id
 2. check in the table of native UIDs
 3. if the UID is present, slug = the part that precedes the delimiter and
 continue as usual
 4. else, ignore that theme and continue (the same way it is ignored if the
 slug is not present in wordpress' database now)

 '''The "one time job":'''
 1. foreach active themes and all of their versions in the SVN
 2. read style.css and calculate the UID based on slug, author, author id
 3. store the UID in the table of UIDs (if it's non existing)

 '''On new theme/update approval:'''
 1. calculate the UID based on slug, author, author id
 2. store the UID in the table of UIDs (if it's non existing, most of the
 times it is not new and is already there)

 '''The active themes counter/collector:'''
 1. calculate the UID based on slug, author, author id
 2. checks if it is present in the table of UIDs
 3. only if it is present increase the counter for the slug = the part that
 precedes the delimiter
 4. count at a second table active installs for non-existing UIDs as well
 (as it does now for non-existing slugs - to be able to inform how much
 active installs has a newly uploaded theme so the reviewer could
 investigate if it is a legitimate author that must be linked to these
 copies, or someone uploaded someone else's theme).

 '''The code that reports "currently has ... active installations"'''
 1. It must report not just >500 cases but now the exact number of
 installations of the exact UID match (which is for the exact combination
 of slug, author, author uri) - we have this in the table 4. from the
 previous section.

 May be these are all in all 30-50 lines of code.

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


More information about the wp-trac mailing list