Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_dashboard_widget_links_{$widget_id}

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
218                $links[] = '<a href="' . remove_query_arg( 'edit' ) . '">' . __( 'Cancel' ) . '</a>';
219           } else {
220                $links[] = '<a href="' . add_query_arg( 'edit', $widget_id ) . "#$widget_id" . '">' . __( 'Edit' ) . '</a>';
221           }
222      }
223
224      if ( $widget_feed_link )
225           $links[] = '<img class="rss-icon" src="' . get_option( 'siteurl' ) . '/' . WPINC . '/images/rss.png" alt="' . __( 'rss icon' ) . '" /> <a href="' . clean_url( $widget_feed_link ) . '">' . __( 'RSS' ) . '</a>';
226
227      $links = apply_filters( "wp_dashboard_widget_links_$widget_id", $links );
228
229      // Add links to widget's title bar
230      if ( $links ) {
231           $sidebar_before_title .= '<span>';
232           $sidebar_after_title   = '</span><small>' . join( '&nbsp;|&nbsp;', $links ) . "</small><br class='clear' />$sidebar_after_title";
233      }
234
235      // Could have put this in widget-content.  Doesn't really matter
236      if ( $widget_notice )