WordPress.org

Make WordPress Core

Opened 3 years ago

#40502 new defect (bug)

Add the check version and template attributes method for /themes/update-check/1.1/ API

Reported by: mxp Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.7.4
Component: HTTP API Keywords:
Focuses: template Cc:
PR Number:

Description

I created a child theme for work, but WordPress noticed me that new theme has an update. That is so weird. So I traced the code and found that problem is API(api.wordpress.org/themes/update-check/1.1/) did not check the whole theme's info between local and WordPress DB.

Here is my steps:

  1. install the base theme named site
  2. create a child theme named royal
  3. add theme info in royal/style.css and royal/functions.php

style.css:
/*
Theme Name: Royal
Author: Knockers
Version: 1.0
Template: site
*/

functions.php:
<?php
?>

  1. login to wp-admin/themes.php and the update notice shows up!

I think the API must check the Theme Name, Version, Author and Template attributes at least and make sure the theme package is current belong to someone.

Change History (0)

Note: See TracTickets for help on using tickets.