Make WordPress Core

Changeset 10629


Ignore:
Timestamp:
02/23/2009 04:28:50 AM (18 years ago)
Author:
ryan
Message:

Filter row actions. Props jamescollins. fixes #9172

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r10585 r10629  
    125125                if ( $default_cat_id != $category->term_id )
    126126                        $actions['delete'] = "<a class='delete:the-list:cat-$category->term_id submitdelete' href='" . wp_nonce_url("categories.php?action=delete&amp;cat_ID=$category->term_id", 'delete-category_' . $category->term_id) . "'>" . __('Delete') . "</a>";
     127                $actions = apply_filters('cat_row_actions', $actions, $category);
    127128                $action_count = count($actions);
    128129                $i = 0;
    … …  
    295296                if ( $default_cat_id != $category->term_id )
    296297                        $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>";
     298                $actions = apply_filters('link_cat_row_actions', $actions, $category);
    297299                $action_count = count($actions);
    298300                $i = 0;
    … …  
    624626                                        $actions['inline hide-if-no-js'] = '<a href="#" class="editinline">' . __('Quick&nbsp;Edit') . '</a>';
    625627                                        $actions['delete'] = "<a class='delete:the-list:tag-$tag->term_id submitdelete' href='" . wp_nonce_url("edit-tags.php?action=delete&amp;taxonomy=$taxonomy&amp;tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id) . "'>" . __('Delete') . "</a>";
     628                                        $actions = apply_filters('tag_row_actions', $actions, $tag);
    626629                                        $action_count = count($actions);
    627630                                        $i = 0;
    … …  
    14001403                                $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . attribute_escape(sprintf(__('View "%s"'), $title)) . '" rel="permalink">' . __('View') . '</a>';
    14011404                        }
     1405                        $actions = apply_filters('post_row_actions', $actions, $post);
    14021406                        $action_count = count($actions);
    14031407                        $i = 0;
    … …  
    15951599                        $actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . attribute_escape(sprintf(__('View "%s"'), $title)) . '" rel="permalink">' . __('View') . '</a>';
    15961600                }
     1601                $actions = apply_filters('page_row_actions', $actions, $page);
    15971602                $action_count = count($actions);
    15981603
    … …  
    18331838                if ( $current_user->ID != $user_object->ID )
    18341839                        $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("users.php?action=delete&amp;user=$user_object->ID", 'bulk-users') . "'>" . __('Delete') . "</a>";
     1840                $actions = apply_filters('user_row_actions', $actions, $user_object);
    18351841                $action_count = count($actions);
    18361842                $i = 0;
Note: See TracChangeset for help on using the changeset viewer.