WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 2 years ago

#18544 closed enhancement (fixed)

Remove wp-register.php

Reported by: christopherross Owned by: nacin
Milestone: 3.4 Priority: normal
Severity: trivial Version: 3.3
Component: General Keywords: has-patch commit
Focuses: Cc:

Description

added spacing to wp-register.php to match Codex Coding Standards for brackets

Attachments (3)

08-29-wp-register.diff (443 bytes) - added by christopherross 3 years ago.
18544.patch (1.8 KB) - added by SergeyBiryukov 3 years ago.
18544.2.patch (1.8 KB) - added by SergeyBiryukov 2 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 christopherross3 years ago

  • Keywords has-patch added
  • Type changed from defect (bug) to enhancement

comment:2 SergeyBiryukov3 years ago

http://wpdevel.wordpress.com/2011/03/23/code-refactoring/

There was a number of code cleanup tickets like #17997, and the consensus was that coding style fixes should be a result of more substantial changes than just improving readability.

comment:3 nacin3 years ago

  • Milestone changed from Awaiting Review to 3.3
  • Summary changed from Spacing fixed in WP-Register.php to Remove wp-register.php

Actually, I think we could probably remove wp-register.php the way we removed the feed files.

comment:4 SergeyBiryukov3 years ago

18544.patch removes wp-register.php and performs canonical redirect to the appropriate place.

Needs bumping the db version on commit to regenerate rewrite rules.

SergeyBiryukov3 years ago

comment:5 SergeyBiryukov3 years ago

Should we add it to $_old_files to be removed on upgrade? We didn't do that for the feed files to prevent possible breakage in case of a lame use.

comment:6 ryan3 years ago

  • Milestone changed from 3.3 to Future Release

Punting enhancements from 3.3.

comment:7 SergeyBiryukov2 years ago

  • Milestone changed from Future Release to 3.4

Related: #19798

comment:8 nacin2 years ago

  • Keywords commit added

comment:9 nacin2 years ago

Can't get this to work. Not sure what happened, but the redirect isn't working for the feed files either.

SergeyBiryukov2 years ago

comment:10 SergeyBiryukov2 years ago

The redirect from wp-register.php to wp-login.php?action=register seems to work fine on my install (after applying the patch and flushing rewrite rules, which, according to admin.php, happens on DB upgrade). The redirect for the feed files works as well.

Refreshed the patch.

comment:11 follow-up: christopherross2 years ago

@SergeyBiryukov / @Nacin would it be possible to remove the wp-pass.php file using the same approach? Chris

if ( 'wp-pass.php' == basename( $redirect['path'] ) ) { 
    // 10 days
    setcookie('wp-postpass_' . COOKIEHASH, stripslashes( $_POST['post_password'] ), time() + 864000, COOKIEPATH);
    wp_safe_redirect(wp_get_referer());
    die();
}
Last edited 2 years ago by SergeyBiryukov (previous) (diff)

comment:12 in reply to: ↑ 11 SergeyBiryukov2 years ago

Replying to christopherross:

would it be possible to remove the wp-pass.php file using the same approach?

wp-pass.php is already removed in #19798.

comment:13 christopherross2 years ago

oops, my bad :)

I didn't notice #19798.

comment:14 nacin2 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In [20596]:

Remove wp-register.php.

  • Don't remove it on update. If you have it now, you'll keep it. New installs won't get it.
  • Peform a redirect using rewrite + canonical to the new location, if the file doesn't exist.

props SergeyBiryukov.
fixes #18544.

Note: See TracTickets for help on using tickets.