WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 158 | if ( is_multisite() && is_super_admin() ) { |
| 159 | if ( !is_network_admin() ) |
| 160 | $links[10] = '<a href="' . network_admin_url() . '" title="' . ( ! empty( $update_title ) ? $update_title : esc_attr__('Network Admin') ) . '">' . __('Network Admin') . ( ! empty( $total_update_count ) ? ' (' . number_format_i18n( $total_update_count ) . ')' : '' ) . '</a>'; |
| 161 | else |
| 162 | $links[10] = '<a href="' . get_dashboard_url( get_current_user_id() ) . '" title="' . esc_attr__('Site Admin') . '">' . __('Site Admin') . '</a>'; |
| 163 | } |
| 164 | |
| 165 | $links[15] = '<a href="' . wp_logout_url() . '" title="' . esc_attr__('Log Out') . '">' . __('Log Out') . '</a>'; |
| 166 | |
| 167 | $links = apply_filters( 'admin_user_info_links', $links, $current_user ); |
| 168 | ksort( $links ); |
| 169 | |
| 170 | // Trim whitespace and pipes from links, then convert to list items. |
| 171 | $links = array_map( 'trim', $links, array_fill( 0, count( $links ), " |\n\t" ) ); |
| 172 | |
| 173 | $howdy = array_shift( $links ); |
| 174 | |
| 175 | $links_no_js = implode( ' | ', $links ); |
| 176 | $links_js = '<li>' . implode( '</li><li>', $links ) . '</li>'; |