Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 12 years ago

#2704 closed enhancement (worksforme)

new hook request

Reported by: enricopulatzo Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0.2
Component: General Keywords: hook action bg|dev-feedback
Focuses: Cc:


I'd like to see a new hook added for sending additional/custom headers for a regular pageview. The change that would be made would altering the wp-includes/classes.php send_headers() function.

	function send_headers() {
		} else if ( empty($this->query_vars['feed']) ) {
			@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
/* change is below: */
		} else {

I called it "send_headers_pageview" but as long as it gets picked up, it could be called "grandmothers_blue_hair" for all I care :)

Attachments (1)

classes.php (50.3 KB) - added by enricopulatzo 16 years ago.
a copy of my modified classes.php file

Download all attachments as: .zip

Change History (3)

16 years ago

a copy of my modified classes.php file

#1 @westi
16 years ago

  • Keywords bg|dev-feedback added

Do we really need a hook for this.

This can already be done by hooking into template_redirect and sending the headers then I believe.

#2 @markjaquith
16 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

template_redirect should suit your needs just fine.

Note: See TracTickets for help on using tickets.