Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#18880 closed defect (bug) (wontfix)

Back compat for the admin_user_info_links filter

Reported by: nacin's profile nacin Owned by: nacin's profile nacin
Milestone: Priority: low
Severity: normal Version: 3.3
Component: Toolbar Keywords: let-it-ride
Focuses: Cc:

Description

Brought up by otto42 in #18197, the admin_user_info_links filter is now gone.

Given the backwards compatibility workarounds this filter required for the 3.2 dropdown, I figured it couldn't be that difficult to push these into the admin bar.

Warning, reading this patch may make you susceptible to nausea. It works. Um. Yeah. Definitely leaning toward wontfix. Was still quite fun to write. :-)

I searched through the plugins directory and only found about a dozen plugins using the filter: two from otto42, one from dd32, one from mitcho*, a few admin simplification plugins, and a number of Howdy tweakers.

The admin simplification plugins would need an update anyway, and we all love Howdy, so this further supports a death. So I'm inclined to post to wpdevel and contact each developer as well.

One more note, this filter always kind of sucked. When it was introduced in 3.0, the bars separating the links were included in each link, rather than the links being imploded, and the link itself was raw HTML. (Note the fun regular expression in my patch.)

Plugin directory scan results below:

/plugins/admin-trim-interface/admin-trim-interface.php:142:		add_filter( 'admin_user_info_links',                   array( &$this, 'admin_user_info_links' ) );
./plugins/admin-trim-interface/admin-trim-interface.php:206:	public function admin_user_info_links( $links ) {
./plugins/better-howdy/better-howdy.php:18:add_filter( 'admin_user_info_links', 'better_howdy' );
./plugins/blog-id-in-site-admin-menu/blog-id-in-site-admin-menu.php:28:	add_filter('admin_user_info_links','blog_id_in_howdy_greeting');
./plugins/dirtysuds-kill-howdy/howdy.php:31:add_filter('admin_user_info_links', 'dirtysuds_howdy');
./plugins/edit-howdy/edithowdy.php:206:add_filter( 'admin_user_info_links', 'edithowdy_update_howdy_message', 9 );
./plugins/edit-howdy/edithowdy.php:209: * This function filters the admin_user_info_links function to apply our new Howdy message.
./plugins/howdy-tweaks/howdy-greeting-tweaks.php:33:		add_filter( 'admin_user_info_links', array( &$this, 'the_info_tweaks' ) );
./plugins/quick-admin-color-scheme-picker/quick-admin-color-scheme-picker.php:9:add_action('admin_user_info_links', 'qacsp_link', 10, 1000);
./plugins/simple-facebook-connect/sfc-login.php:100:add_filter('admin_user_info_links','sfc_login_admin_header');
./plugins/simple-twitter-connect/stc-login.php:156:add_filter('admin_user_info_links','stc_login_admin_header');
./plugins/wp-simplify/wp-simplify.php:458:    add_filter('admin_user_info_links', array('WP_Simplify','admin_user_info_links'), 0, 2);
./plugins/wp-simplify/wp-simplify.php:485:  function admin_user_info_links($links, $current_user) {
./plugins/wp-su/wp-su.php:57:		// 3.0+ add_action('admin_user_info_links', array(&$this, 'admin_header_su'));

Attachments (1)

18880.diff (2.9 KB) - added by nacin 13 years ago.

Download all attachments as: .zip

Change History (17)

@nacin
13 years ago

#1 @Otto42
13 years ago

Yeah, imma say let it go. Admin bar is still changing, trying to work something like this in now won't be useful. I already adapted SFC to it a bit, but it'll be a while before admin bar finalizes enough to consider it.

#2 @dd32
13 years ago

and I'm going to agree.. The only reason my plugin used that location was because.. well.. It was the most obvious place at the time. most of the other uses seem likely to be items that are designed to be in specific spots, so they're likely going to have to update to display right anyway.

#3 @trepmal
13 years ago

  • Cc trepmal@… added

#4 @nacin
13 years ago

  • Keywords has-patch 2nd-opinion removed

If we're going to retire this filter, we need to do a wpdevel post highlighting how to add items to the Howdy menu. So I've been leaving this ticket open until the admin bar API is solid enough to provide actual code in said post.

#5 @nacin
13 years ago

This is waiting on #19136 to be fixed.

#6 @mitchoyoshitaka
13 years ago

  • Cc mitcho@… added

Make that one less plugin: I've updated the Quick Admin Color Scheme Picker to use the new admin bar API for WP 3.3+.

http://cl.ly/2I3k121z3w2R3N0S1R2X

#7 @nacin
13 years ago

  • Component changed from Plugins to Admin Bar
  • Owner set to nacin
  • Status changed from new to accepted

#8 @ocean90
13 years ago

  • Keywords has-patch needs-refresh added

#9 @westi
13 years ago

nacin: I agree that we should just kill the filter - are we ready now for the wpdevel post?

#10 @ryan
13 years ago

  • Version set to 3.3

#11 @ryan
13 years ago

  • Priority changed from normal to low

#12 @ryan
13 years ago

We're agreed on retiring the filter and documenting use of Admin Bar API. We'll do a wpdevel post shortly and then close this ticket.

#13 @nacin
13 years ago

Need to wait for #19136 to settle.

#14 @nacin
13 years ago

  • Keywords let-it-ride added; has-patch needs-refresh removed

#15 @nacin
13 years ago

  • Milestone 3.3 deleted
  • Resolution set to wontfix
  • Status changed from accepted to closed

#16 @coffee2code
13 years ago

Further decrement the list of plugins affected; Admin Trim Interface will handle the removal of the filter in time for 3.3.

Note: See TracTickets for help on using tickets.