#45642 closed defect (bug) (invalid)
function is_child_theme() bug
| Reported by: | samet5 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Themes | Version: | 5.0.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
<?php function is_child_theme() { return ( TEMPLATEPATH !== STYLESHEETPATH ); }
needs to get replaced in:
<?php function is_child_theme() { return ( 'TEMPLATEPATH' !== 'STYLESHEETPATH' ); }
Change History (4)
#2
@
8 years ago
- Keywords ? removed
- Milestone Awaiting Review
- Resolution → invalid
- Status new → closed
Hi, and welcome to WordPress Trac!
Why do you think this needs to be changed?
TEMPLATEPATH !== STYLESHEETPATH compares the two constants TEMPLATEPATH and STYLESHEETPATH, which can have any value.
On the other hand, 'TEMPLATEPATH' !== 'STYLESHEETPATH' compares the two strings "TEMPLATEPATH" and "STYLESHEETPATH", which will never be the same.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
/wp-includes/theme.php