Permalink
Browse files

Admin UI / Allow filtering of text and caption for special deletion l…

…inks.
  • Loading branch information...
radgeek committed Jul 8, 2014
1 parent 135d64e commit a09d78ba336bb5359789336841f719006dfbbd96
Showing with 8 additions and 6 deletions.
  1. +8 −6 feedwordpress.php
View
@@ -1635,9 +1635,10 @@ public function row_actions ($actions, $post) {
$link = get_delete_post_link($post->ID, '', true);
$eraseLink = MyPHP::url($link, array("fwp_post_delete" => "nuke"));
- $caption = 'Erase the record of this post (will be re-syndicated if it still appears on the feed).';
- $linktext = 'Erase/Resyndicate';
+ $caption = apply_filters('feedwordpress_ui_erase_link_caption', __('Erase the record of this post (will be re-syndicated if it still appears on the feed).'));
+ $linktext = apply_filters('feedwordpress_ui_erase_link_text', __('Erase/Resyndicate'));
+ $retireClass = NULL;
if ($post->post_status == 'fwpzapped') :
if (count(get_post_meta($post->ID, '_feedwordpress_zapped_blank_me')) > 0) :
$retireCap = 'Un-Zap this syndicated post (so it will appear on the site again)';
@@ -1650,9 +1651,10 @@ public function row_actions ($actions, $post) {
$retireLink = NULL;
endif;
else :
- $retireCap = 'Zap this syndicated post (so it will not be re-syndicated if it still appears on the feed).';
- $retireText = 'Zap/Don’t Resyndicate';
+ $retireCap = apply_filters('feedwordpress_ui_zap_link_caption', __('Zap this syndicated post (so it will not be re-syndicated if it still appears on the feed).'));
+ $retireText = apply_filters('feedwordpress_ui_zap_link_text', __('Zap/Don’t Resyndicate'));
$retireLink = MyPHP::url($link, array("fwp_post_delete" => "zap"));
+ $retireClass = 'submitdelete';
endif;
$keys = array_keys($actions);
@@ -1665,14 +1667,14 @@ public function row_actions ($actions, $post) {
// Placeholder.
if (!is_null($retireLink)) :
- $links['zap'] = '';
+ $links['zap trash'] = '';
endif;
$links['delete'] = '';
endif;
endforeach;
if (!is_null($retireLink)) :
- $links['zap'] = '<a class="retire" title="'.esc_attr(__($retireCap)).'" href="' . $retireLink . '">' . __($retireText) . '</a>';
+ $links['zap trash'] = '<a class="'.esc_attr($retireClass).'" title="'.esc_attr(__($retireCap)).'" href="' . $retireLink . '">' . __($retireText) . '</a>';
endif;
$links['delete'] = '<a class="submitdelete" title="'.esc_attr(__($caption)).'" href="' . $eraseLink . '">' . __($linktext) . '</a>';

0 comments on commit a09d78b

Please sign in to comment.