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 |
---|---|
125 | $name = ( $name_override ? $name_override : $pad . ' ' . $category->name ); |
126 | $edit_link = "categories.php?action=edit&cat_ID=$category->term_id"; |
127 | if ( current_user_can( 'manage_categories' ) ) { |
128 | $edit = "<a class='row-title' href='$edit_link' title='" . esc_attr(sprintf(__('Edit “%s”'), $category->name)) . "'>" . esc_attr( $name ) . '</a><br />'; |
129 | $actions = array(); |
130 | $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>'; |
131 | $actions['inline hide-if-no-js'] = '<a href="#" class="editinline">' . __('Quick Edit') . '</a>'; |
132 | if ( $default_cat_id != $category->term_id ) |
133 | $actions['delete'] = "<a class='delete:the-list:cat-$category->term_id submitdelete' href='" . wp_nonce_url("categories.php?action=delete&cat_ID=$category->term_id", 'delete-category_' . $category->term_id) . "'>" . __('Delete') . "</a>"; |
134 | $actions = apply_filters('cat_row_actions', $actions, $category); |
135 | $action_count = count($actions); |
136 | $i = 0; |
137 | $edit .= '<div class="row-actions">'; |
138 | foreach ( $actions as $action => $link ) { |
139 | ++$i; |
140 | ( $i == $action_count ) ? $sep = '' : $sep = ' | '; |
141 | $edit .= "<span class='$action'>$link$sep</span>"; |
142 | } |
143 | $edit .= '</div>'; |