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