Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: link_cat_row_actions

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
97      $name = ( $name_override ? $name_override : $category->name );
98      $edit_link = "link-category.php?action=edit&cat_ID=$category->term_id";
99      if ( current_user_can( 'manage_categories' ) ) {
100           $edit = "<a class='row-title' href='$edit_link' title='" . esc_attr(sprintf(__('Edit &#8220;%s&#8221;'), $category->name)) . "'>$name</a><br />";
101           $actions = array();
102           $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
103           $actions['inline hide-if-no-js'] = '<a href="#" class="editinline">' . __('Quick&nbsp;Edit') . '</a>';
104           if ( $default_cat_id != $category->term_id )
105                $actions['delete'] = "<a class='delete:the-list:link-cat-$category->term_id submitdelete' href='" . wp_nonce_url("link-category.php?action=delete&amp;cat_ID=$category->term_id", 'delete-link-category_' . $category->term_id) . "'>" . __('Delete') . "</a>";
106           $actions = apply_filters('link_cat_row_actions', $actions, $category);
107           $action_count = count($actions);
108           $i = 0;
109           $edit .= '<div class="row-actions">';
110           foreach ( $actions as $action => $link ) {
111                ++$i;
112                ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
113                $edit .= "<span class='$action'>$link$sep</span>";
114           }
115           $edit .= '</div>';