Make WordPress Core

Opened 18 years ago

Closed 18 years ago

Last modified 15 years ago

#2704 closed enhancement (worksforme)

new hook request

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

Description

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() {
<snip!>
		} else if ( empty($this->query_vars['feed']) ) {
			@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
/* change is below: */
			do_action('send_headers_pageview');
		} else {
<snip!>

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 18 years ago.
a copy of my modified classes.php file

Download all attachments as: .zip

Change History (3)

@enricopulatzo
18 years ago

a copy of my modified classes.php file

#1 @westi
18 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
18 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.