Make WordPress Core

Opened 14 years ago

Closed 10 years ago

Last modified 7 years ago

#14752 closed feature request (wontfix)

Warn after theme activation if wp_head/footer is missing

Reported by: nacin's profile nacin Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Themes Keywords: 2nd-opinion health-check
Focuses: Cc:

Description

After theme activation, we can reliably test for wp_head() and wp_footer() with an HTTP call to the front page.

We should do that and check for two things:

  1. That wp_head() and wp_footer() are present in the theme.
  1. That they are in the correct location, immediately before </head> and </body>.

Then throw a warning that the theme may not function properly (with a link to a Codex page?) because it is not using the API correctly.

Is this core material?

Change History (10)

#1 @nacin
14 years ago

  • Type changed from defect (bug) to feature request

#2 @hakre
14 years ago

Looks like testing material to me. Something a theme author can verify it's stuff prior to release in quality control. Better to educate a theme-author then the user who might just does not get what this all is about (too technical).

The workflow suggested is making the user the tester when it's already too late: Theme distributed and the error thrown means a full roundtrip from user -> themer -> user.

#3 @TobiasBg
14 years ago

As a plugin developer, I'd love this.

There are just so many users with themes which are lacking one of the two hooks.
Then they blame my plugin, when the JavaScript is not working...
Which is no surprise, as it is never included without the hooks, as it is included using wp_enqueue_script().

#4 @nacin
14 years ago

  • Keywords health-check added

Might be better as part of the health check plugin.

#5 @filosofo
14 years ago

I think hakre has a good point: at that point it's too late. This feedback expects too much of the end user. When confronted with such an error message, he has to then decide what it means, whether it's worth doing anything about, and if so, what to do.

Also, I have a hard time believing this is a widespread problem, which I remember coming across a few times in 2005 and 2006, but not much since. Haven't we won the war by now?

#6 @kretzschmar
14 years ago

Themes are automatically checked after upload and reviewed. This is be the place to check for things like that.

#7 @nacin
13 years ago

  • Milestone changed from Awaiting Review to Future Release

#8 @ocean90
10 years ago

Related: #12839

#9 @nacin
10 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

#10 @swissspidy
7 years ago

#38267 was marked as a duplicate.

Note: See TracTickets for help on using tickets.