Opened 13 years ago
Closed 4 years ago
#18097 closed defect (bug) (duplicate)
Themes update-check should check parent/child
Reported by: | nacin | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Upgrade/Install | Keywords: | needs-patch |
Focuses: | Cc: |
Description
A child theme by the name of Commune gets served the updates of a parent theme.
We should only serve an update to a theme if it's a child or parent, appropriately. For child themes, we should also confirm the parent.
Change History (14)
#3
follow-up:
↓ 4
@
11 years ago
- Milestone WordPress.org deleted
- Resolution set to wontfix
- Status changed from new to closed
This is a generic problem with naming, not specific to child/parent themes. When you make your custom theme, I recommend choosing a name unique to the site, like "Example.com-themename" or what have you.
#4
in reply to:
↑ 3
@
11 years ago
- Milestone set to WordPress.org
- Resolution wontfix deleted
- Status changed from closed to reopened
Replying to Otto42:
This is a generic problem with naming, not specific to child/parent themes. When you make your custom theme, I recommend choosing a name unique to the site, like "Example.com-themename" or what have you.
Correct, but a sanity check on the parent/child situation of the theme is an additional way for us to know if we have the right theme.
It's entirely possible that a theme switches to a different parent or child at one point, but I don't think the theme directory can or should support that ever, and thus this would be a safe check.
#6
@
5 years ago
- Component changed from WordPress.org site to Upgrade/Install
- Milestone set to Future Release
Moving this to the Upgrade/Install component as "WordPress.org Site component shouldn't really be used".
As WP.org theme repo doesn't hold any child themes it would make sense to check if the suggested update is for a child theme and avoid it as it's most likely an unintended name clash.
#7
follow-up:
↓ 8
@
5 years ago
As WP.org theme repo doesn't hold any child themes it would make sense to check if the suggested update is for a child theme and avoid it as it's most likely an unintended name clash.
Umm, there are many child themes in the repo, and if you install one, WordPress will detect it and auto-install the parent for it too.
#8
in reply to:
↑ 7
@
5 years ago
Replying to Otto42:
As WP.org theme repo doesn't hold any child themes it would make sense to check if the suggested update is for a child theme and avoid it as it's most likely an unintended name clash.
Umm, there are many child themes in the repo, and if you install one, WordPress will detect it and auto-install the parent for it too.
Thanks @Otto42 my bad, had searched in the repo but couldn't see any denoted as child themes or any filters to find them so had assumed there. I appreciate you correcting my lack of knowledge there.
#9
@
5 years ago
Ahh, yes, we don't have a search specifically for it. However if you look at a theme, like this for example:
https://wordpress.org/themes/featured-news/
On the right hand site you will see the blue box saying that it is a child of the Magazine 7 theme.
#10
@
5 years ago
Thanks @Otto42 I learned something new today.
Does the repo allow for child themes to hold the same name as any parent? If they're not ensured to be unique then this check makes sense to keep the two types separate. If they are ensured to be unique then I guess the check is more to help custom themes and would only help if the custom theme is not the same type as the WP.org same-named theme.
#11
follow-up:
↓ 12
@
5 years ago
No, the names all live in the same namespace, so they're unique. Can't have two themes with the same name in the directory.
#12
in reply to:
↑ 11
@
5 years ago
Replying to Otto42:
No, the names all live in the same namespace, so they're unique. Can't have two themes with the same name in the directory.
Thanks @Otto42 that's great news. So this safety check would only really benefit custom themes who've named their child theme the same as a parent theme on WP.org, or have their parent theme named the same as a child theme on WP.org.
Seems like a fairly negligible benefit in that case and one which is being mitigated by education on custom themes should use a unique name not present in WP.org theme directory.
Random thought, if Theme URI
was (may already be) required for all WP.org themes and was required to match the WP.org theme page it could more realistically help in this manner. So custom themes that have no Theme URI or a non-WP.org Theme URI would be skipped over for updates avoiding custom themes being replaced. The only edge case there is a user accidentally using a Theme URI pointed to WP.org. And only if the Theme name and Theme URI match what's expected for the WP.org hosted theme would it prompt an update.
Closed #18147 as duplicate of this.