WordPress.org

Make WordPress Core

Opened 21 months ago

Closed 19 months ago

Last modified 19 months ago

#18880 closed defect (bug) (wontfix)

Back compat for the admin_user_info_links filter

Reported by: nacin Owned by: nacin
Priority: low Milestone:
Component: Toolbar Version: 3.3
Severity: normal Keywords: let-it-ride
Cc: trepmal@…, mitcho@…

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 21 months ago.

Download all attachments as: .zip

Change History (17)

nacin21 months ago

comment:1 Otto4221 months 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.

comment:2 dd3221 months 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.

comment:3 trepmal21 months ago

  • Cc trepmal@… added

comment:4 nacin20 months 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.

comment:5 nacin20 months ago

This is waiting on #19136 to be fixed.

comment:6 mitchoyoshitaka20 months 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

comment:7 nacin20 months ago

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

comment:8 ocean9019 months ago

  • Keywords has-patch needs-refresh added

comment:9 westi19 months ago

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

comment:10 ryan19 months ago

  • Version set to 3.3

comment:11 ryan19 months ago

  • Priority changed from normal to low

comment:12 ryan19 months 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.

comment:13 nacin19 months ago

Need to wait for #19136 to settle.

comment:14 nacin19 months ago

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

comment:15 nacin19 months ago

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

comment:16 coffee2code19 months 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.