Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#29915 closed enhancement (fixed)

Deprecate admin_created_user_subject()

Reported by: jeremyfelt's profile jeremyfelt Owned by: jeremyfelt's profile jeremyfelt
Milestone: 4.1 Priority: normal
Severity: normal Version:
Component: Users Keywords: has-patch commit
Focuses: multisite Cc:

Description

In MU:1529, a wpmu_signup_user_notification_subject filter was added which called admin_created_user_subject() to set the subject of an invite email when a new user was added. A similar filter and function were added for the email content itself.

In the merge, [12722], the filter and function for the email were brought over into wp-admin/user-new.php, but only the function for the subject was brought over—not the filter.

It doesn't appear to have been missed. :)

The strange part about deprecating this is admin_create_user_subject() is currently defined only when wp-admin/user-new.php is accessed in multisite. Once deprecated, it will be loaded into memory more often. But, we really don't need it.

Attachments (1)

29915.diff (1.2 KB) - added by jeremyfelt 10 years ago.

Download all attachments as: .zip

Change History (6)

@jeremyfelt
10 years ago

#1 @SergeyBiryukov
10 years ago

  • Keywords commit added

#2 @jeremyfelt
10 years ago

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

In 30005:

Deprecate admin_created_user_subject()

When admin_created_user_subjec() was merged from MU, the accompanying filter was left behind. As it has never been used by WordPress core, and is not an otherwise useful function, it can be deprecated.

Fixes #29915

#3 follow-up: @jeremyfelt
10 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

After talking with @nacin last week about this, it looks like we can delete admin_created_user_subject() entirely.

It was previously only available on user-new.php in multisite and never used in MU as a callback to the original filter. At the worst, if a developer was reusing that filter configuration, they would see a notice.

#4 @jeremyfelt
10 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 30176:

Delete admin_created_user_subject() rather than deprecate

As it was never used as anything more than a callback to a filter before the MU merge, and is only available in user-new.php in multisite, it is safe to remove this function entirely.

Fixes #29915

#5 in reply to: ↑ 3 @nacin
10 years ago

Replying to jeremyfelt:

After talking with @nacin last week about this, it looks like we can delete admin_created_user_subject() entirely.

I just reviewed [30176] and was coming to this ticket to note I agreed with removing it. Now I'm also noting I don't remember that conversation from 6 weeks ago, so thank you for documenting it. :-)

Note: See TracTickets for help on using tickets.