Make WordPress Core

Opened 17 years ago

Closed 14 years ago

#4860 closed enhancement (wontfix)

Comments popup page needs a pretty URL

Reported by: jeremyvisser's profile JeremyVisser Owned by:
Milestone: Priority: low
Severity: minor Version: 2.3
Component: Template Keywords:
Focuses: Cc:

Description

Currently, the URL provided by comments_popup_link() to provide a link to a separate comments window looks like this:

http://localhost/wordpress/?comments_popup=13

It looks ugly, and is like that even when pretty permalinks are enabled.

Now, it'd be better if it were accessible from this URL:

http://localhost/wordpress/comments/popup/13

or maybe even this

http://localhost/wordpress/2007/01/01/hello-world/comments/

I managed to get the popup form accessible from http://localhost/wordpress/comments/popup/13 with a plugin. The significant code I used was (using the skills I learned today from DD32 -- thanks!):

function cp_comments_popup_rewrite_rules( $rules ) {
	$rules[ 'comments/popup/([0-9]+)' ] = 'index.php?comments_popup=$matches[1]';
	return $rules;
}

add_filter('rewrite_rules_array', 'cp_comments_popup_rewrite_rules');

However, it'd be better in core. From looking at the code, I was wondering if it should go in the WP_Rewrite::generate_rewrite_rules() function, but I've been staring at that function for about 10 minutes now, and now my eyes are all blurry. I don't understand it one bit.

How else can we acheive this?

Change History (4)

#1 @santosj
16 years ago

  • Component changed from General to Template

#2 @ffemtcj
16 years ago

  • Milestone changed from 2.5 to 2.6

#3 @FFEMTcJ
15 years ago

  • Keywords needs-patch added
  • Milestone changed from 2.9 to Future Release

#4 @johnbillion
14 years ago

  • Keywords needs-patch removed
  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Stale ticket. Does anyone use popups for comments? I've never seen it in 4+ years. And if they do, nobody is going to patch this.

Note: See TracTickets for help on using tickets.