Broken Link Checker - Version 0.8

Version Description

  • Initial support for performing some action on multiple links at once.
  • Added a "Delete sources" bulk action that lets you delete all posts (or blogroll entries) that contain any of the selected links. Doing this in WP 2.9 and up this will instead move the posts to the trash, not delete them permanently.
  • New bulk action : Unlink. Removes all selected links from all posts.
  • New bulk action : Fix redirects. Analyzes the selected links and replaces any redirects with direct links.
  • Added a notice asking the user to take the feedback survey.
  • Updated the .POT file with new i18n strings.
Download this release

Release Info

Developer whiteshadow
Plugin Icon 128x128 Broken Link Checker
Version 0.8
Comparing to
See all releases

Code changes from version 0.7.4 to 0.8

broken-link-checker.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Broken Link Checker
5
  Plugin URI: http://w-shadow.com/blog/2007/08/05/broken-link-checker-for-wordpress/
6
  Description: Checks your posts for broken links and missing images and notifies you on the dashboard if any are found.
7
- Version: 0.7.4
8
  Author: Janis Elsts
9
  Author URI: http://w-shadow.com/blog/
10
  Text Domain: broken-link-checker
@@ -79,11 +79,12 @@ $blc_config_manager = new blcConfigurationManager(
79
  //If this option is not set, the plugin's own directory or the
80
  //system-wide /tmp directory will be used instead.
81
 
82
- 'timeout' => 30, //Links that take longer than this to respond will be treated as broken.
 
 
83
  )
84
  );
85
 
86
-
87
  if ( !is_admin() ){
88
  //This is user-side request, so we may need to do is run the broken link highlighter.
89
  if ( $blc_config_manager->options['mark_broken_links'] ){
4
  Plugin Name: Broken Link Checker
5
  Plugin URI: http://w-shadow.com/blog/2007/08/05/broken-link-checker-for-wordpress/
6
  Description: Checks your posts for broken links and missing images and notifies you on the dashboard if any are found.
7
+ Version: 0.8
8
  Author: Janis Elsts
9
  Author URI: http://w-shadow.com/blog/
10
  Text Domain: broken-link-checker
79
  //If this option is not set, the plugin's own directory or the
80
  //system-wide /tmp directory will be used instead.
81
 
82
+ 'timeout' => 30, //Links that take longer than this to respond will be treated as broken.
83
+
84
+ 'show_survey_notice' => true, //Show/hide the Dashboard notice asking the user to take a survey about the plugin
85
  )
86
  );
87
 
 
88
  if ( !is_admin() ){
89
  //This is user-side request, so we may need to do is run the broken link highlighter.
90
  if ( $blc_config_manager->options['mark_broken_links'] ){
core.php CHANGED
@@ -53,12 +53,17 @@ class wsBrokenLinkChecker {
53
  //These hooks update the plugin's internal records when posts are added, deleted or modified.
54
  add_action('delete_post', array(&$this,'post_deleted'));
55
  add_action('save_post', array(&$this,'post_saved'));
 
 
 
56
 
57
  //These do the same for (blogroll) links.
58
  add_action('add_link', array(&$this,'hook_add_link'));
59
  add_action('edit_link', array(&$this,'hook_edit_link'));
60
  add_action('delete_link', array(&$this,'hook_delete_link'));
61
 
 
 
62
  //Load jQuery on Dashboard pages (probably redundant as WP already does that)
63
  add_action('admin_print_scripts', array(&$this,'admin_print_scripts'));
64
 
@@ -88,6 +93,11 @@ class wsBrokenLinkChecker {
88
 
89
  //Initialize the built-in link filters
90
  add_action('init', array(&$this,'init_native_filters'));
 
 
 
 
 
91
  }
92
 
93
  function admin_footer(){
@@ -453,6 +463,7 @@ class wsBrokenLinkChecker {
453
  );
454
 
455
  //Add plugin-specific scripts and CSS only to the it's own pages
 
456
  add_action( 'admin_print_styles-' . $options_page_hook, array(&$this, 'options_page_css') );
457
  add_action( 'admin_print_styles-' . $links_page_hook, array(&$this, 'links_page_css') );
458
  add_action( 'admin_print_scripts-' . $options_page_hook, array(&$this, 'load_ui_scripts') );
@@ -956,15 +967,28 @@ class wsBrokenLinkChecker {
956
  global $wpdb;
957
 
958
  $action = !empty($_POST['action'])?$_POST['action']:'';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
959
 
960
  if ( $action == 'create-custom-filter' ){
961
  //Create a custom filter!
962
 
963
  check_admin_referer( $action );
964
 
965
- $message = '';
966
- $msg_class = 'updated';
967
-
968
  //Filter name must be set
969
  if ( empty($_POST['name']) ){
970
  $message = __("You must enter a filter name!", 'broken-link-checker');
@@ -992,16 +1016,11 @@ class wsBrokenLinkChecker {
992
  }
993
  }
994
 
995
- echo '<div id="message" class="'.$msg_class.' fade"><p><strong>'.$message.'</strong></p></div>';
996
-
997
  } elseif ( $action == 'delete-custom-filter' ){
998
  //Delete an existing custom filter!
999
 
1000
  check_admin_referer( $action );
1001
 
1002
- $message = '';
1003
- $msg_class = 'updated';
1004
-
1005
  //Filter ID must be set
1006
  if ( empty($_POST['filter_id']) ){
1007
  $message = __("Filter ID not specified.", 'broken-link-checker');
@@ -1020,9 +1039,238 @@ class wsBrokenLinkChecker {
1020
  $msg_class = 'error';
1021
  }
1022
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1023
  echo '<div id="message" class="'.$msg_class.' fade"><p><strong>'.$message.'</strong></p></div>';
1024
- }
1025
-
1026
  //Build the filter list
1027
  $filters = array_merge($this->native_filters, $this->get_custom_filters());
1028
 
@@ -1078,6 +1326,11 @@ class wsBrokenLinkChecker {
1078
  //Display the "Discard" button when listing broken links
1079
  $show_discard_button = ('broken' == $filter_id) || (!empty($search_params['s_filter']) && ($search_params['s_filter'] == 'broken'));
1080
 
 
 
 
 
 
1081
  ?>
1082
 
1083
  <script type='text/javascript'>
@@ -1207,35 +1460,34 @@ class wsBrokenLinkChecker {
1207
  </form>
1208
  </div>
1209
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1210
  <div class='tablenav'>
1211
-
1212
  <div class="alignleft actions">
1213
- <span class='description'>
1214
- <?php
1215
- /*
1216
- //If this is a search filter, display the search query here
1217
- if ( !empty($current_filter['is_search']) ){
1218
- $params = $search_params;
1219
- $search_query = array();
1220
-
1221
- if ( !empty($params['s_link_text']) ){
1222
- $search_query[] = sprintf('link text is like "%s"', $params['s_link_text']);
1223
- }
1224
- if ( !empty($params['s_link_url']) ){
1225
- $search_query[] = sprintf('the URL contains "%s"', $params['s_link_url']);
1226
- }
1227
- if ( !empty($params['s_http_code']) ){
1228
- $search_query[] = 'HTTP code matches ' . $params['s_http_code'];
1229
- }
1230
- if ( !empty($params['s_link_type']) ){
1231
- $search_query[] = sprintf('link type is "%s"', $params['s_link_type']);
1232
- }
1233
-
1234
- echo sprintf("Showing %s links where ", $params['s_filter']) , implode(', ', $search_query);
1235
- }
1236
- */
1237
- ?>
1238
- </span>
1239
  </div>
1240
  <?php
1241
  //Display pagination links
@@ -1262,16 +1514,14 @@ class wsBrokenLinkChecker {
1262
  ?>
1263
 
1264
  </div>
1265
-
1266
- <?php
1267
- if($links && (count($links)>0)){
1268
- ?>
1269
- <table class="widefat">
1270
  <thead>
1271
  <tr>
1272
 
1273
- <th scope="col"><?php _e('Source', 'broken-link-checker'); ?>
1274
- </th>
 
 
1275
  <th scope="col"><?php _e('Link Text', 'broken-link-checker'); ?></th>
1276
  <th scope="col"><?php _e('URL', 'broken-link-checker'); ?></th>
1277
 
@@ -1293,6 +1543,11 @@ class wsBrokenLinkChecker {
1293
 
1294
  ?>
1295
  <tr id='<?php echo "blc-row-$rownum"; ?>' class='blc-row <?php echo $rowclass; ?>'>
 
 
 
 
 
1296
  <td class='post-title column-title'>
1297
  <span class='blc-link-id' style='display:none;'><?php echo $link['link_id']; ?></span>
1298
  <?php
@@ -1418,14 +1673,22 @@ class wsBrokenLinkChecker {
1418
  </tr>
1419
  <!-- Link details -->
1420
  <tr id='<?php print "link-details-$rownum"; ?>' style='display:none;' class='blc-link-details'>
1421
- <td colspan='4'><?php $this->link_details_row($link); ?></td>
1422
  </tr><?php
1423
  }
1424
- ?></tbody></table><?php
 
 
 
 
 
 
 
 
1425
 
1426
  //Also display pagination links at the bottom
1427
- if ( $page_links ) {
1428
- echo '<div class="tablenav"><div class="tablenav-pages">';
1429
  $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s&#8211;%s of <span class="current-link-count">%s</span>', 'broken-link-checker' ) . '</span>%s',
1430
  number_format_i18n( ( $page - 1 ) * $per_page + 1 ),
1431
  number_format_i18n( min( $page * $per_page, $current_filter['count'] ) ),
@@ -1433,14 +1696,22 @@ class wsBrokenLinkChecker {
1433
  $page_links
1434
  );
1435
  echo $page_links_text;
1436
- echo '</div></div>';
1437
  }
1438
- };
1439
  ?>
 
 
 
 
 
 
 
 
 
1440
  <?php $this->links_page_js(); ?>
1441
  </div>
1442
  <?php
1443
- }
1444
 
1445
  function links_page_js(){
1446
  ?>
@@ -1757,6 +2028,11 @@ jQuery(function($){
1757
  }
1758
  });
1759
 
 
 
 
 
 
1760
  });
1761
 
1762
  </script>
@@ -1905,7 +2181,7 @@ div.search-box{
1905
  * ws_broken_link_checker::cleanup_links()
1906
  * Remove orphaned links that have no corresponding instances
1907
  *
1908
- * @param int $link_id (optional) Only check this link
1909
  * @return bool
1910
  */
1911
  function cleanup_links( $link_id = null ){
@@ -1917,8 +2193,11 @@ div.search-box{
1917
  WHERE
1918
  {$wpdb->prefix}blc_instances.link_id IS NULL";
1919
 
1920
- if ( $link_id !==null ) {
1921
- $q .= " AND {$wpdb->prefix}blc_links.link_id = " . intval( $link_id );
 
 
 
1922
  }
1923
 
1924
  return $wpdb->query( $q );
@@ -3100,6 +3379,40 @@ div.search-box{
3100
  return $wpdb->get_results($q, ARRAY_A);
3101
  }
3102
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3103
 
3104
  }//class ends here
3105
 
53
  //These hooks update the plugin's internal records when posts are added, deleted or modified.
54
  add_action('delete_post', array(&$this,'post_deleted'));
55
  add_action('save_post', array(&$this,'post_saved'));
56
+ //Treat post trashing/untrashing as delete/save.
57
+ add_action('trash_post', array(&$this,'post_deleted'));
58
+ add_action('untrash_post', array(&$this,'post_saved'));
59
 
60
  //These do the same for (blogroll) links.
61
  add_action('add_link', array(&$this,'hook_add_link'));
62
  add_action('edit_link', array(&$this,'hook_edit_link'));
63
  add_action('delete_link', array(&$this,'hook_delete_link'));
64
 
65
+ //TODO: Hook the delete_post_meta action to detect when custom fields are deleted directly
66
+
67
  //Load jQuery on Dashboard pages (probably redundant as WP already does that)
68
  add_action('admin_print_scripts', array(&$this,'admin_print_scripts'));
69
 
93
 
94
  //Initialize the built-in link filters
95
  add_action('init', array(&$this,'init_native_filters'));
96
+
97
+ //Appearify the survey notice on all Dashboard pages
98
+ if ( $this->conf->options['show_survey_notice'] ){
99
+ add_action('admin_notices', array(&$this, 'display_survey_notice'));
100
+ }
101
  }
102
 
103
  function admin_footer(){
463
  );
464
 
465
  //Add plugin-specific scripts and CSS only to the it's own pages
466
+ //TODO: Use the admin_enqueue_scripts action to enqueue the scripts
467
  add_action( 'admin_print_styles-' . $options_page_hook, array(&$this, 'options_page_css') );
468
  add_action( 'admin_print_styles-' . $links_page_hook, array(&$this, 'links_page_css') );
469
  add_action( 'admin_print_scripts-' . $options_page_hook, array(&$this, 'load_ui_scripts') );
967
  global $wpdb;
968
 
969
  $action = !empty($_POST['action'])?$_POST['action']:'';
970
+ if ( intval($action) == -1 ){
971
+ //Try the second bulk actions box
972
+ $action = !empty($_POST['action2'])?$_POST['action2']:'';
973
+ }
974
+
975
+ //Get the list of link IDs selected via checkboxes
976
+ $selected_links = array();
977
+ if ( isset($_POST['selected_links']) && is_array($_POST['selected_links']) ){
978
+ //Convert all link IDs to integers (non-numeric entries are converted to zero)
979
+ $selected_links = array_map('intval', $_POST['selected_links']);
980
+ //Remove all zeroes
981
+ $selected_links = array_filter($selected_links);
982
+ }
983
+
984
+ $message = '';
985
+ $msg_class = 'updated';
986
 
987
  if ( $action == 'create-custom-filter' ){
988
  //Create a custom filter!
989
 
990
  check_admin_referer( $action );
991
 
 
 
 
992
  //Filter name must be set
993
  if ( empty($_POST['name']) ){
994
  $message = __("You must enter a filter name!", 'broken-link-checker');
1016
  }
1017
  }
1018
 
 
 
1019
  } elseif ( $action == 'delete-custom-filter' ){
1020
  //Delete an existing custom filter!
1021
 
1022
  check_admin_referer( $action );
1023
 
 
 
 
1024
  //Filter ID must be set
1025
  if ( empty($_POST['filter_id']) ){
1026
  $message = __("Filter ID not specified.", 'broken-link-checker');
1039
  $msg_class = 'error';
1040
  }
1041
  }
1042
+
1043
+ } elseif ($action == 'bulk-delete-sources') {
1044
+ //Delete posts and blogroll entries that contain any of the selected links
1045
+ //(links inside custom fields count as part of the post for the purposes of this action).
1046
+ //
1047
+ //Note that once all posts/bookmarks containing a particular link have been deleted,
1048
+ //there is no need to explicitly delete the link record itself. The hooks attached to
1049
+ //the post_deleted and delete_link actions will take care of that.
1050
+
1051
+ check_admin_referer( 'bulk-action' );
1052
+
1053
+ if ( count($selected_links) > 0 ) {
1054
+ $selected_links_sql = implode(', ', $selected_links);
1055
+
1056
+ $messages = array();
1057
+
1058
+ //First, fetch the posts that contain any of the selected links,
1059
+ //either in the content or in a custom field.
1060
+ $q = "
1061
+ SELECT posts.id, posts.post_title
1062
+ FROM
1063
+ {$wpdb->prefix}blc_links AS links,
1064
+ {$wpdb->prefix}blc_instances AS instances,
1065
+ {$wpdb->posts} AS posts
1066
+ WHERE
1067
+ links.link_id IN ($selected_links_sql)
1068
+ AND links.link_id = instances.link_id
1069
+ AND (instances.source_type = 'post' OR instances.source_type = 'custom_field')
1070
+ AND instances.source_id = posts.id
1071
+ AND posts.post_status <> \"trash\"
1072
+ GROUP BY posts.id
1073
+ ";
1074
+
1075
+ $posts_to_delete = $wpdb->get_results($q);
1076
+ $deleted_posts = array();
1077
+
1078
+ //Delete the selected posts
1079
+ foreach($posts_to_delete as $post){
1080
+ if ( wp_delete_post($post->id) !== false) {
1081
+ $deleted_posts[] = $post;
1082
+ } else {
1083
+ $messages[] = sprintf(
1084
+ __('Failed to delete post "%s" (%d)', 'broken-link-checker'),
1085
+ $post->pots_title,
1086
+ $post->id
1087
+ );
1088
+ $msg_class = 'error';
1089
+ };
1090
+ }
1091
+
1092
+ if ( count($deleted_posts) > 0 ) {
1093
+ //Since the "Trash" feature has been introduced, calling wp_delete_post
1094
+ //doesn't actually delete the post (unless you set force_delete to True),
1095
+ //just moves it to the trash. So we pick the message accordingly.
1096
+ if ( function_exists('wp_trash_post') ){
1097
+ $delete_msg = _n("%d post moved to the trash", "%d posts moved to the trash", count($deleted_posts), 'broken-link-checker');
1098
+ } else {
1099
+ $delete_msg = _n("%d post deleted", "%d posts deleted", count($deleted_posts), 'broken-link-checker');
1100
+ }
1101
+
1102
+ $messages[] = sprintf(
1103
+ $delete_msg,
1104
+ count($deleted_posts)
1105
+ );
1106
+ }
1107
+
1108
+ //Fetch blogroll links (AKA bookmarks) that match any of the selected links
1109
+ $q = "
1110
+ SELECT bookmarks.link_id AS bookmark_id, bookmarks.link_name
1111
+ FROM
1112
+ {$wpdb->prefix}blc_links AS links,
1113
+ {$wpdb->prefix}blc_instances AS instances,
1114
+ {$wpdb->links} AS bookmarks
1115
+ WHERE
1116
+ links.link_id IN ($selected_links_sql)
1117
+ AND links.link_id = instances.link_id
1118
+ AND instances.source_type = 'blogroll'
1119
+ AND instances.source_id = bookmarks.link_id
1120
+ GROUP BY bookmarks.link_id
1121
+ ";
1122
+ //echo "<pre>$q</pre>";
1123
+
1124
+ $bookmarks_to_delete = $wpdb->get_results($q);
1125
+ $deleted_bookmarks = array();
1126
+
1127
+ if ( count($bookmarks_to_delete) > 0 ){
1128
+ //Delete the matching blogroll links
1129
+ foreach($bookmarks_to_delete as $bookmark){
1130
+ if ( wp_delete_link($bookmark->bookmark_id) ){
1131
+ $deleted_bookmarks[] = $bookmark;
1132
+ } else {
1133
+ $messages[] = sprintf(
1134
+ __('Failed to delete blogroll link "%s" (%d)', 'broken-link-checker'),
1135
+ $bookmark->link_name,
1136
+ $bookmark->link_id
1137
+ );
1138
+ $msg_class = 'error';
1139
+ }
1140
+ }
1141
+
1142
+ if ( count($deleted_bookmarks) > 0 ) {
1143
+ $messages[] = sprintf(
1144
+ _n("%d blogroll link deleted", "%d blogroll links deleted", count($deleted_bookmarks), 'broken-link-checker'),
1145
+ count($deleted_bookmarks)
1146
+ );
1147
+ }
1148
+ }
1149
+
1150
+ if ( count($messages) > 0 ){
1151
+ $message = implode('<br>', $messages);
1152
+ } else {
1153
+ $message = __("Didn't find anything to delete!", 'broken-link-checker');
1154
+ $msg_class = 'error';
1155
+ }
1156
+
1157
+
1158
+ }
1159
+
1160
+ } elseif ($action == 'bulk-unlink') {
1161
+ //Unlink all selected links.
1162
+
1163
+ check_admin_referer( 'bulk-action' );
1164
+
1165
+ if ( count($selected_links) > 0 ) {
1166
+ $selected_links_sql = implode(', ', $selected_links);
1167
+
1168
+ //Fetch the selected links
1169
+ $q = "SELECT * FROM {$wpdb->prefix}blc_links WHERE link_id IN ($selected_links_sql)";
1170
+ $links = $wpdb->get_results($q, ARRAY_A);
1171
+
1172
+ if ( count($links) > 0 ) {
1173
+ $processed_links = 0;
1174
+ $failed_links = 0;
1175
+
1176
+ //Unlink (delete) all selected links
1177
+ foreach($links as $link){
1178
+ $the_link = new blcLink($link);
1179
+ $rez = $the_link->unlink();
1180
+ if ( $rez !== false ){
1181
+ $processed_links++;
1182
+ } else {
1183
+ $failed_links++;
1184
+ }
1185
+ }
1186
+
1187
+ //This message is slightly misleading - it doesn't account for the fact that
1188
+ //a link can be present in more than one post.
1189
+ $message = sprintf(
1190
+ _n(
1191
+ '%d link removed',
1192
+ '%d links removed',
1193
+ $processed_links,
1194
+ 'broken-link-checker'
1195
+ ),
1196
+ $processed_links
1197
+ );
1198
+
1199
+ if ( $failed_links > 0 ) {
1200
+ $message .= '<br>' . sprintf(
1201
+ _n(
1202
+ 'Failed to remove %d link',
1203
+ 'Failed to remove %d links',
1204
+ $failed_links,
1205
+ 'broken-link-checker'
1206
+ ),
1207
+ $failed_links
1208
+ );
1209
+ $msg_class = 'error';
1210
+ }
1211
+ }
1212
+ }
1213
+
1214
+ } elseif ($action == 'bulk-deredirect') {
1215
+ //For all selected links, replace the URL with the final URL that it redirects to.
1216
+
1217
+ check_admin_referer( 'bulk-action' );
1218
+
1219
+ if ( count($selected_links) > 0 ) {
1220
+ $selected_links_sql = implode(', ', $selected_links);
1221
+
1222
+ //Fetch the selected links
1223
+ $q = "SELECT * FROM {$wpdb->prefix}blc_links WHERE link_id IN ($selected_links_sql) AND redirect_count > 0";
1224
+ $links = $wpdb->get_results($q, ARRAY_A);
1225
+
1226
+ if ( count($links) > 0 ) {
1227
+ $processed_links = 0;
1228
+ $failed_links = 0;
1229
+
1230
+ //Deredirect all selected links
1231
+ foreach($links as $link){
1232
+ $the_link = new blcLink($link);
1233
+ $rez = $the_link->deredirect();
1234
+ if ( $rez !== false ){
1235
+ $processed_links++;
1236
+ } else {
1237
+ $failed_links++;
1238
+ }
1239
+ }
1240
+
1241
+ $message = sprintf(
1242
+ _n(
1243
+ 'Replaced %d redirect with a direct link',
1244
+ 'Replaced %d redirects with direct links',
1245
+ $processed_links,
1246
+ 'broken-link-checker'
1247
+ ),
1248
+ $processed_links
1249
+ );
1250
+
1251
+ if ( $failed_links > 0 ) {
1252
+ $message .= '<br>' . sprintf(
1253
+ _n(
1254
+ 'Failed to fix %d redirect',
1255
+ 'Failed to fix %d redirects',
1256
+ $failed_links,
1257
+ 'broken-link-checker'
1258
+ ),
1259
+ $failed_links
1260
+ );
1261
+ $msg_class = 'error';
1262
+ }
1263
+ } else {
1264
+ $message = __('None of the selected links are redirects!', 'broken-link-checker');
1265
+ }
1266
+ }
1267
+
1268
+ }
1269
+
1270
+ if ( !empty($message) ){
1271
  echo '<div id="message" class="'.$msg_class.' fade"><p><strong>'.$message.'</strong></p></div>';
1272
+ }
1273
+
1274
  //Build the filter list
1275
  $filters = array_merge($this->native_filters, $this->get_custom_filters());
1276
 
1326
  //Display the "Discard" button when listing broken links
1327
  $show_discard_button = ('broken' == $filter_id) || (!empty($search_params['s_filter']) && ($search_params['s_filter'] == 'broken'));
1328
 
1329
+ //Figure out what the "safe" URL to acccess the current page would be.
1330
+ //This is used by the bulk action form.
1331
+ $special_args = array('_wpnonce', '_wp_http_referer', 'action', 'selected_links');
1332
+ $neutral_current_url = remove_query_arg($special_args);
1333
+
1334
  ?>
1335
 
1336
  <script type='text/javascript'>
1460
  </form>
1461
  </div>
1462
 
1463
+ <?php
1464
+ //Do we have any links to display?
1465
+ if( $links && ( count($links) > 0 ) ) {
1466
+ ?>
1467
+ <!-- The link list -->
1468
+ <form id="blc-bulk-action-form" action="<?php echo $neutral_current_url; ?>" method="post">
1469
+ <?php
1470
+ wp_nonce_field('bulk-action');
1471
+
1472
+ $bulk_actions = array(
1473
+ '-1' => __('Bulk Actions', 'broken-link-checker'),
1474
+ "bulk-unlink" => __('Unlink', 'broken-link-checker'),
1475
+ "bulk-deredirect" => __('Fix redirects', 'broken-link-checker'),
1476
+ "bulk-delete-sources" => __('Delete sources', 'broken-link-checker'),
1477
+ );
1478
+
1479
+ $bulk_actions_html = '';
1480
+ foreach($bulk_actions as $value => $name){
1481
+ $bulk_actions_html .= sprintf('<option value="%s">%s</option>', $value, $name);
1482
+ }
1483
+ ?>
1484
+
1485
  <div class='tablenav'>
 
1486
  <div class="alignleft actions">
1487
+ <select name="action">
1488
+ <?php echo $bulk_actions_html; ?>
1489
+ </select>
1490
+ <input type="submit" name="doaction" id="doaction" value="<?php echo attribute_escape(__('Apply', 'broken-link-checker')); ?>" class="button-secondary action">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1491
  </div>
1492
  <?php
1493
  //Display pagination links
1514
  ?>
1515
 
1516
  </div>
1517
+ <table class="widefat" id="blc-links">
 
 
 
 
1518
  <thead>
1519
  <tr>
1520
 
1521
+ <th scope="col" id="cb" class="check-column">
1522
+ <input type="checkbox">
1523
+ </th>
1524
+ <th scope="col"><?php _e('Source', 'broken-link-checker'); ?></th>
1525
  <th scope="col"><?php _e('Link Text', 'broken-link-checker'); ?></th>
1526
  <th scope="col"><?php _e('URL', 'broken-link-checker'); ?></th>
1527
 
1543
 
1544
  ?>
1545
  <tr id='<?php echo "blc-row-$rownum"; ?>' class='blc-row <?php echo $rowclass; ?>'>
1546
+
1547
+ <th class="check-column" scope="row">
1548
+ <input type="checkbox" name="selected_links[]" value="<?php echo $link['link_id']; ?>">
1549
+ </th>
1550
+
1551
  <td class='post-title column-title'>
1552
  <span class='blc-link-id' style='display:none;'><?php echo $link['link_id']; ?></span>
1553
  <?php
1673
  </tr>
1674
  <!-- Link details -->
1675
  <tr id='<?php print "link-details-$rownum"; ?>' style='display:none;' class='blc-link-details'>
1676
+ <td colspan='<?php echo $show_discard_button?5:4; ?>'><?php $this->link_details_row($link); ?></td>
1677
  </tr><?php
1678
  }
1679
+ ?></tbody></table>
1680
+
1681
+ <div class="tablenav">
1682
+ <div class="alignleft actions">
1683
+ <select name="action2">
1684
+ <?php echo $bulk_actions_html; ?>
1685
+ </select>
1686
+ <input type="submit" name="doaction2" id="doaction2" value="<?php echo attribute_escape(__('Apply', 'broken-link-checker')); ?>" class="button-secondary action">
1687
+ </div><?php
1688
 
1689
  //Also display pagination links at the bottom
1690
+ if ( $page_links ) {
1691
+ echo '<div class="tablenav-pages">';
1692
  $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s&#8211;%s of <span class="current-link-count">%s</span>', 'broken-link-checker' ) . '</span>%s',
1693
  number_format_i18n( ( $page - 1 ) * $per_page + 1 ),
1694
  number_format_i18n( min( $page * $per_page, $current_filter['count'] ) ),
1696
  $page_links
1697
  );
1698
  echo $page_links_text;
1699
+ echo '</div>';
1700
  }
 
1701
  ?>
1702
+ </div>
1703
+
1704
+ </form>
1705
+ <?php
1706
+
1707
+ }; //End of the links table & assorted nav stuff
1708
+
1709
+ ?>
1710
+
1711
  <?php $this->links_page_js(); ?>
1712
  </div>
1713
  <?php
1714
+ } //Function ends
1715
 
1716
  function links_page_js(){
1717
  ?>
2028
  }
2029
  });
2030
 
2031
+ //--------------------------------------------
2032
+ // Bulk actions
2033
+ //--------------------------------------------
2034
+
2035
+ //Not implemented yet
2036
  });
2037
 
2038
  </script>
2181
  * ws_broken_link_checker::cleanup_links()
2182
  * Remove orphaned links that have no corresponding instances
2183
  *
2184
+ * @param int|array $link_id (optional) Only check these links
2185
  * @return bool
2186
  */
2187
  function cleanup_links( $link_id = null ){
2193
  WHERE
2194
  {$wpdb->prefix}blc_instances.link_id IS NULL";
2195
 
2196
+ if ( $link_id !== null ) {
2197
+ if ( !is_array($link_id) ){
2198
+ $link_id = array( intval($link_id) );
2199
+ }
2200
+ $q .= " AND {$wpdb->prefix}blc_links.link_id IN (" . implode(', ', $link_id) . ')';
2201
  }
2202
 
2203
  return $wpdb->query( $q );
3379
  return $wpdb->get_results($q, ARRAY_A);
3380
  }
3381
  }
3382
+
3383
+ /**
3384
+ * wsBrokenLinkChecker::display_survey_notice()
3385
+ * Display a notice asking the user to take the Broken Link Checker user survey.
3386
+ *
3387
+ * @return void
3388
+ */
3389
+ function display_survey_notice(){
3390
+ //Only people who can actually use the plugin will see the notice
3391
+ if ( !current_user_can('manage_links') ) return;
3392
+
3393
+ if ( !empty($_GET['dismiss-blc-survey']) ){
3394
+ //The user has chosen to hide the survey notice
3395
+ $this->conf->options['show_survey_notice'] = false;
3396
+ $this->conf->save_options();
3397
+ return;
3398
+ }
3399
+
3400
+ $survey_url = 'http://spreadsheets.google.com/viewform?formkey=dEZxR1Y3QWZ2WjV4WEJORWJ2UHhJZGc6MA';
3401
+
3402
+ $msg = sprintf(
3403
+ '<strong>Help improve Broken Link Checker - take the user feedback survey!</strong>
3404
+ <ul>
3405
+ <li><a href="%s" target="_blank" title="This link will open in a new window"><strong>Take the survey</strong></a></li>
3406
+ <li><a href="%s">Dismiss this notice</a></li>
3407
+ </ul>',
3408
+ $survey_url,
3409
+ add_query_arg('dismiss-blc-survey', 1)
3410
+ );
3411
+
3412
+
3413
+
3414
+ echo '<div id="update-nag" style="text-align: left; padding-left: 20px;">'.$msg.'</div>';
3415
+ }
3416
 
3417
  }//class ends here
3418
 
instance-classes.php CHANGED
@@ -239,7 +239,7 @@ class blcLinkInstance_post_link extends blcLinkInstance {
239
 
240
  //Track how many links in the post are successfully edited so that we can report an error if none are.
241
  $this->changed_links = 0;
242
-
243
  //Find all links and replace those that match $old_url.
244
  $content = preg_replace_callback(blcUtility::link_pattern(), array(&$this, 'edit_callback'), $post['post_content']);
245
 
@@ -248,14 +248,27 @@ class blcLinkInstance_post_link extends blcLinkInstance {
248
  return false;
249
  }
250
 
251
- //Save the modified post
252
- $q = $wpdb->prepare("UPDATE $wpdb->posts SET post_content = %s WHERE id = %d", $content, $this->source_id);
253
- return $wpdb->query($q) !== false;
 
 
 
 
 
 
 
 
 
 
 
 
 
254
  }
255
 
256
  function edit_callback($matches){
257
  $url = blcUtility::normalize_url($matches[3], $this->post_permalink);
258
- //FB::log('Found an link with URL "' . $matches[3] . '", normalized URL = "' . $url . '"');
259
 
260
  if ($url == $this->old_url){
261
  //FB::log('Changing this link');
@@ -299,8 +312,22 @@ class blcLinkInstance_post_link extends blcLinkInstance {
299
  return false;
300
  }
301
 
302
- $q = $wpdb->prepare("UPDATE $wpdb->posts SET post_content = %s WHERE id = %d", $content, $this->source_id);
303
- if ( $wpdb->query($q) !== false ){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
304
  //Delete the instance record
305
  //FB::info("Post updated, deleting instance from DB");
306
  return $this->forget() !== false;
@@ -380,9 +407,22 @@ class blcLinkInstance_post_image extends blcLinkInstance {
380
  return false;
381
  }
382
 
 
 
 
 
 
 
 
 
383
  //Save the modified post
384
- $q = $wpdb->prepare("UPDATE $wpdb->posts SET post_content = %s WHERE id = %d", $content, $this->source_id);
385
- return $wpdb->query($q) !== false;
 
 
 
 
 
386
  }
387
 
388
  function edit_callback($matches){
@@ -427,9 +467,22 @@ class blcLinkInstance_post_image extends blcLinkInstance {
427
  return false;
428
  }
429
 
430
- $q = $wpdb->prepare("UPDATE $wpdb->posts SET post_content = %s WHERE id = %d", $content, $this->source_id);
 
 
 
 
 
 
 
 
 
 
 
 
 
431
 
432
- if ( $wpdb->query($q) !== false ){
433
  //Delete the instance record
434
  //FB::info("Post updated, deleting instance from DB");
435
  return $this->forget() !== false;
@@ -477,6 +530,7 @@ class blcLinkInstance_custom_field_link extends blcLinkInstance {
477
 
478
  //FB::log("Removing [{$this->link_text}] from post {$this->source_id} where value is '$url'");
479
  delete_post_meta( $this->source_id, $this->link_text, $url );
 
480
 
481
  return $this->forget() !== false;
482
  }
239
 
240
  //Track how many links in the post are successfully edited so that we can report an error if none are.
241
  $this->changed_links = 0;
242
+
243
  //Find all links and replace those that match $old_url.
244
  $content = preg_replace_callback(blcUtility::link_pattern(), array(&$this, 'edit_callback'), $post['post_content']);
245
 
248
  return false;
249
  }
250
 
251
+ //Clear the post/page cache. This ensures that any further calls to this method
252
+ //will not load the post content from the cache and thus discard the changes
253
+ //we just made.
254
+ if ( 'page' == $post['post_type'] )
255
+ clean_page_cache($this->source_id);
256
+ else
257
+ clean_post_cache($this->source_id);
258
+
259
+ //Update the post
260
+ $rez = $wpdb->update(
261
+ $wpdb->posts,
262
+ array( 'post_content' => $content ),
263
+ array( 'id' => $this->source_id )
264
+ );
265
+
266
+ return $rez !== false;
267
  }
268
 
269
  function edit_callback($matches){
270
  $url = blcUtility::normalize_url($matches[3], $this->post_permalink);
271
+ //FB::log('Found a link with URL "' . $matches[3] . '", normalized URL = "' . $url . '"');
272
 
273
  if ($url == $this->old_url){
274
  //FB::log('Changing this link');
312
  return false;
313
  }
314
 
315
+ //Clear the post/page cache. This ensures that any further calls to this method
316
+ //will not load the post content from the cache and thus discard the changes
317
+ //we just made.
318
+ if ( 'page' == $post['post_type'] )
319
+ clean_page_cache($this->source_id);
320
+ else
321
+ clean_post_cache($this->source_id);
322
+
323
+ //Update the post
324
+ $rez = $wpdb->update(
325
+ $wpdb->posts,
326
+ array( 'post_content' => $content ),
327
+ array( 'id' => $this->source_id )
328
+ );
329
+
330
+ if ( $rez !== false ){
331
  //Delete the instance record
332
  //FB::info("Post updated, deleting instance from DB");
333
  return $this->forget() !== false;
407
  return false;
408
  }
409
 
410
+ //Clear the post/page cache. This ensures that any further calls to this method
411
+ //will not load the post content from the cache and thus discard the changes
412
+ //we just made.
413
+ if ( 'page' == $post['post_type'] )
414
+ clean_page_cache($this->source_id);
415
+ else
416
+ clean_post_cache($this->source_id);
417
+
418
  //Save the modified post
419
+ $rez = $wpdb->update(
420
+ $wpdb->posts,
421
+ array( 'post_content' => $content ),
422
+ array( 'id' => $this->source_id )
423
+ );
424
+
425
+ return $rez !== false;
426
  }
427
 
428
  function edit_callback($matches){
467
  return false;
468
  }
469
 
470
+ //Clear the post/page cache. This ensures that any further calls to this method
471
+ //will not load the post content from the cache and thus discard the changes
472
+ //we just made.
473
+ if ( 'page' == $post['post_type'] )
474
+ clean_page_cache($this->source_id);
475
+ else
476
+ clean_post_cache($this->source_id);
477
+
478
+ //Save the modified post
479
+ $rez = $wpdb->update(
480
+ $wpdb->posts,
481
+ array( 'post_content' => $content ),
482
+ array( 'id' => $this->source_id )
483
+ );
484
 
485
+ if ( $rez !== false ){
486
  //Delete the instance record
487
  //FB::info("Post updated, deleting instance from DB");
488
  return $this->forget() !== false;
530
 
531
  //FB::log("Removing [{$this->link_text}] from post {$this->source_id} where value is '$url'");
532
  delete_post_meta( $this->source_id, $this->link_text, $url );
533
+ //TODO: Make unlink work for custom fields where the URL is only the first line, not the entire value
534
 
535
  return $this->forget() !== false;
536
  }
languages/broken-link-checker.pot CHANGED
@@ -1,168 +1,168 @@
1
  # Broken Link Checker POT file
2
- # Copyright (C) 2009 Janis Elsts
3
- # This file is distributed under the same license as the BLC package.
4
- # Janis Elsts <whiteshadow@w-shadow.com>, 2009.
5
  #
6
  #, fuzzy
7
  msgid ""
8
  msgstr ""
9
- "Project-Id-Version: broken-link-checker\n"
10
  "Report-Msgid-Bugs-To: whiteshadow@w-shadow.com\n"
11
- "POT-Creation-Date: 2009-11-23 19:32+0000\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
  "MIME-Version: 1.0\n"
16
- "Content-Type: text/plain; charset=CHARSET\n"
17
  "Content-Transfer-Encoding: 8bit\n"
18
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
19
 
20
- #: core.php:133 core.php:1564
21
  msgid "Loading..."
22
  msgstr ""
23
 
24
- #: core.php:156 core.php:593
25
  msgid "[ Network error ]"
26
  msgstr ""
27
 
28
- #: core.php:181
29
  msgid "Automatically expand the widget if broken links have been detected"
30
  msgstr ""
31
 
32
- #: core.php:365 core.php:374 core.php:404 core.php:416 core.php:990
33
- #: core.php:1019 core.php:1068
34
  #, php-format
35
  msgid "Database error : %s"
36
  msgstr ""
37
 
38
- #: core.php:442
39
  msgid "Link Checker Settings"
40
  msgstr ""
41
 
42
- #: core.php:443
43
  msgid "Link Checker"
44
  msgstr ""
45
 
46
- #: core.php:449
47
  msgid "View Broken Links"
48
  msgstr ""
49
 
50
- #: core.php:450 core.php:881
51
  msgid "Broken Links"
52
  msgstr ""
53
 
54
- #: core.php:473
55
  msgid "Settings"
56
  msgstr ""
57
 
58
- #: core.php:557
59
  msgid "Broken Link Checker Options"
60
  msgstr ""
61
 
62
- #: core.php:570
63
  msgid "Status"
64
  msgstr ""
65
 
66
- #: core.php:572 core.php:812
67
  msgid "Show debug info"
68
  msgstr ""
69
 
70
- #: core.php:606
71
  msgid "Re-check all pages"
72
  msgstr ""
73
 
74
- #: core.php:630
75
  msgid "Check each link"
76
  msgstr ""
77
 
78
- #: core.php:635
79
  #, php-format
80
  msgid "Every %s hours"
81
  msgstr ""
82
 
83
- #: core.php:644
84
  msgid ""
85
  "Existing links will be checked this often. New links will usually be checked "
86
  "ASAP."
87
  msgstr ""
88
 
89
- #: core.php:651
90
  msgid "Broken link CSS"
91
  msgstr ""
92
 
93
- #: core.php:656
94
  msgid "Apply <em>class=\"broken_link\"</em> to broken links"
95
  msgstr ""
96
 
97
- #: core.php:668
98
  msgid "Removed link CSS"
99
  msgstr ""
100
 
101
- #: core.php:673
102
  msgid "Apply <em>class=\"removed_link\"</em> to unlinked links"
103
  msgstr ""
104
 
105
- #: core.php:685
106
  msgid "Exclusion list"
107
  msgstr ""
108
 
109
- #: core.php:686
110
  msgid ""
111
  "Don't check links where the URL contains any of these words (one per line) :"
112
  msgstr ""
113
 
114
- #: core.php:696
115
  msgid "Custom fields"
116
  msgstr ""
117
 
118
- #: core.php:697
119
  msgid "Check URLs entered in these custom fields (one per line) :"
120
  msgstr ""
121
 
122
- #: core.php:708
123
  msgid "Advanced"
124
  msgstr ""
125
 
126
- #: core.php:714
127
  msgid "Timeout"
128
  msgstr ""
129
 
130
- #: core.php:720 core.php:776
131
  #, php-format
132
  msgid "%s seconds"
133
  msgstr ""
134
 
135
- #: core.php:729
136
  msgid "Links that take longer than this to load will be marked as broken."
137
  msgstr ""
138
 
139
- #: core.php:738
140
  msgid "Custom temporary directory"
141
  msgstr ""
142
 
143
- #: core.php:747 core.php:2511
144
  msgid "OK"
145
  msgstr ""
146
 
147
- #: core.php:750
148
  msgid "Error : This directory isn't writable by PHP."
149
  msgstr ""
150
 
151
- #: core.php:755
152
  msgid "Error : This directory doesn't exist."
153
  msgstr ""
154
 
155
- #: core.php:763
156
  msgid ""
157
  "Set this field if you want the plugin to use a custom directory for its "
158
  "lockfiles. Otherwise, leave it blank."
159
  msgstr ""
160
 
161
- #: core.php:770
162
  msgid "Max. execution time"
163
  msgstr ""
164
 
165
- #: core.php:787
166
  msgid ""
167
  "The plugin works by periodically creating a background worker instance that "
168
  "parses your posts looking for links, checks the discovered URLs, and "
@@ -170,458 +170,541 @@ msgid ""
170
  "the background instance may run each time before stopping."
171
  msgstr ""
172
 
173
- #: core.php:797
174
  msgid "Save Changes"
175
  msgstr ""
176
 
177
- #: core.php:810
178
  msgid "Hide debug info"
179
  msgstr ""
180
 
181
- #: core.php:880
182
  msgid "Broken"
183
  msgstr ""
184
 
185
- #: core.php:882
186
  msgid "No broken links found"
187
  msgstr ""
188
 
189
- #: core.php:886
190
  msgid "Redirects"
191
  msgstr ""
192
 
193
- #: core.php:887
194
  msgid "Redirected Links"
195
  msgstr ""
196
 
197
- #: core.php:888
198
  msgid "No redirects found"
199
  msgstr ""
200
 
201
- #: core.php:893
202
  msgid "All"
203
  msgstr ""
204
 
205
- #: core.php:894
206
  msgid "Detected Links"
207
  msgstr ""
208
 
209
- #: core.php:895
210
  msgid "No links found (yet)"
211
  msgstr ""
212
 
213
- #: core.php:922 core.php:1033
214
  msgid "No links found for your query"
215
  msgstr ""
216
 
217
- #: core.php:970
218
  msgid "You must enter a filter name!"
219
  msgstr ""
220
 
221
- #: core.php:974
222
  msgid "Invalid search query."
223
  msgstr ""
224
 
225
- #: core.php:985
226
  #, php-format
227
  msgid "Filter \"%s\" created"
228
  msgstr ""
229
 
230
- #: core.php:1007
231
  msgid "Filter ID not specified."
232
  msgstr ""
233
 
234
- #: core.php:1016
235
  msgid "Filter deleted"
236
  msgstr ""
237
 
238
- #: core.php:1031 core.php:1147
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
239
  msgid "Search"
240
  msgstr ""
241
 
242
- #: core.php:1032
243
  msgid "Search Results"
244
  msgstr ""
245
 
246
- #: core.php:1131
247
  msgid "Save This Search As a Filter"
248
  msgstr ""
249
 
250
- #: core.php:1141
251
  msgid "Delete This Filter"
252
  msgstr ""
253
 
254
- #: core.php:1157
255
  msgid "Link text"
256
  msgstr ""
257
 
258
- #: core.php:1160 core.php:1276
259
  msgid "URL"
260
  msgstr ""
261
 
262
- #: core.php:1163 core.php:1865
263
  msgid "HTTP code"
264
  msgstr ""
265
 
266
- #: core.php:1166
267
  msgid "Link status"
268
  msgstr ""
269
 
270
- #: core.php:1182
271
  msgid "Link type"
272
  msgstr ""
273
 
274
- #: core.php:1186
275
  msgid "Any"
276
  msgstr ""
277
 
278
- #: core.php:1187
279
  msgid "Normal link"
280
  msgstr ""
281
 
282
- #: core.php:1188 core.php:1347
283
  msgid "Image"
284
  msgstr ""
285
 
286
- #: core.php:1189 core.php:1358
287
  msgid "Custom field"
288
  msgstr ""
289
 
290
- #: core.php:1190 core.php:1366
291
  msgid "Bookmark"
292
  msgstr ""
293
 
294
- #: core.php:1203
295
  msgid "Search Links"
296
  msgstr ""
297
 
298
- #: core.php:1204 core.php:1399
299
  msgid "Cancel"
300
  msgstr ""
301
 
302
- #: core.php:1245
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
303
  msgid "&laquo;"
304
  msgstr ""
305
 
306
- #: core.php:1246
307
  msgid "&raquo;"
308
  msgstr ""
309
 
310
- #: core.php:1253 core.php:1429
311
  #, php-format
312
  msgid "Displaying %s&#8211;%s of <span class=\"current-link-count\">%s</span>"
313
  msgstr ""
314
 
315
- #: core.php:1273
316
  msgid "Source"
317
  msgstr ""
318
 
319
- #: core.php:1275
320
  msgid "Link Text"
321
  msgstr ""
322
 
323
- #: core.php:1302 core.php:1308
324
  msgid "Edit this post"
325
  msgstr ""
326
 
327
- #: core.php:1308 core.php:1323
328
  msgid "Edit"
329
  msgstr ""
330
 
331
- #: core.php:1309
332
  msgid "Delete this post"
333
  msgstr ""
334
 
335
- #: core.php:1309
336
  #, php-format
337
  msgid ""
338
  "You are about to delete this post '%s'\n"
339
  " 'Cancel' to stop, 'OK' to delete."
340
  msgstr ""
341
 
342
- #: core.php:1309 core.php:1324
343
  msgid "Delete"
344
  msgstr ""
345
 
346
- #: core.php:1311
347
  #, php-format
348
  msgid "View \"%s\""
349
  msgstr ""
350
 
351
- #: core.php:1311
352
  msgid "View"
353
  msgstr ""
354
 
355
- #: core.php:1318 core.php:1323
356
  msgid "Edit this bookmark"
357
  msgstr ""
358
 
359
- #: core.php:1324
360
  #, php-format
361
  msgid ""
362
  "You are about to delete this link '%s'\n"
363
  " 'Cancel' to stop, 'OK' to delete."
364
  msgstr ""
365
 
366
- #: core.php:1333
367
  msgid "[An orphaned link! This is a bug.]"
368
  msgstr ""
369
 
370
- #: core.php:1381
371
  msgid "Show more info about this link"
372
  msgstr ""
373
 
374
- #: core.php:1381 core.php:2804
375
  msgid "Details"
376
  msgstr ""
377
 
378
- #: core.php:1383
379
  msgid "Remove this link from all posts"
380
  msgstr ""
381
 
382
- #: core.php:1384 core.php:1651
383
- msgid "Unlink"
384
- msgstr ""
385
-
386
- #: core.php:1387 core.php:1681 core.php:1692
387
  msgid "Excluded"
388
  msgstr ""
389
 
390
- #: core.php:1389
391
  msgid "Add this URL to the exclusion list"
392
  msgstr ""
393
 
394
- #: core.php:1390 core.php:1695
395
  msgid "Exclude"
396
  msgstr ""
397
 
398
- #: core.php:1393
399
  msgid "Edit link URL"
400
  msgstr ""
401
 
402
- #: core.php:1393 core.php:1592 core.php:1620
403
  msgid "Edit URL"
404
  msgstr ""
405
 
406
- #: core.php:1399
407
  msgid "Cancel URL editing"
408
  msgstr ""
409
 
410
- #: core.php:1413
411
  msgid "Remove this link from the list of broken links and mark it as valid"
412
  msgstr ""
413
 
414
- #: core.php:1415 core.php:1484
415
  msgid "Discard"
416
  msgstr ""
417
 
418
- #: core.php:1460 core.php:1627 core.php:1664
419
  msgid "Wait..."
420
  msgstr ""
421
 
422
- #: core.php:1518
423
  msgid "Save URL"
424
  msgstr ""
425
 
426
- #: core.php:1528
427
  msgid "Saving changes..."
428
  msgstr ""
429
 
430
- #: core.php:1740
431
  msgid "Enter a name for the new custom filter"
432
  msgstr ""
433
 
434
- #: core.php:1751
435
  msgid ""
436
  "You are about to delete the current filter.\n"
437
  "'Cancel' to stop, 'OK' to delete"
438
  msgstr ""
439
 
440
- #: core.php:1842
441
  msgid "Log"
442
  msgstr ""
443
 
444
- #: core.php:1850
445
  msgid "Post published on"
446
  msgstr ""
447
 
448
- #: core.php:1855
449
  msgid "Link last checked"
450
  msgstr ""
451
 
452
- #: core.php:1859
453
  msgid "Never"
454
  msgstr ""
455
 
456
- #: core.php:1870
457
  msgid "Response time"
458
  msgstr ""
459
 
460
- #: core.php:1872
461
  #, php-format
462
  msgid "%2.3f seconds"
463
  msgstr ""
464
 
465
- #: core.php:1875
466
  msgid "Final URL"
467
  msgstr ""
468
 
469
- #: core.php:1880
470
  msgid "Redirect count"
471
  msgstr ""
472
 
473
- #: core.php:1885
474
  msgid "Instance count"
475
  msgstr ""
476
 
477
- #: core.php:1894
478
  #, php-format
479
  msgid "This link has failed %d time."
480
  msgid_plural "This link has failed %d times."
481
  msgstr[0] ""
482
  msgstr[1] ""
483
 
484
- #: core.php:2299 core.php:2629
485
  msgid ""
486
  "This link wasn't checked because a matching keyword was found on your "
487
  "exclusion list."
488
  msgstr ""
489
 
490
- #: core.php:2341
491
  msgid "View broken links"
492
  msgstr ""
493
 
494
- #: core.php:2342
495
  #, php-format
496
  msgid "Found %d broken link"
497
  msgid_plural "Found %d broken links"
498
  msgstr[0] ""
499
  msgstr[1] ""
500
 
501
- #: core.php:2348
502
  msgid "No broken links found."
503
  msgstr ""
504
 
505
- #: core.php:2355
506
  #, php-format
507
  msgid "%d URL in the work queue"
508
  msgid_plural "%d URLs in the work queue"
509
  msgstr[0] ""
510
  msgstr[1] ""
511
 
512
- #: core.php:2358
513
  msgid "No URLs in the work queue."
514
  msgstr ""
515
 
516
- #: core.php:2364
517
  #, php-format
518
  msgid "Detected %d unique URL"
519
  msgid_plural "Detected %d unique URLs"
520
  msgstr[0] ""
521
  msgstr[1] ""
522
 
523
- #: core.php:2365
524
  #, php-format
525
  msgid "in %d link"
526
  msgid_plural "in %d links"
527
  msgstr[0] ""
528
  msgstr[1] ""
529
 
530
- #: core.php:2370
531
  msgid "and still searching..."
532
  msgstr ""
533
 
534
- #: core.php:2376
535
  msgid "Searching your blog for links..."
536
  msgstr ""
537
 
538
- #: core.php:2378
539
  msgid "No links detected."
540
  msgstr ""
541
 
542
- #: core.php:2450 core.php:2482 core.php:2525 core.php:2606
543
  msgid "You're not allowed to do that!"
544
  msgstr ""
545
 
546
- #: core.php:2458 core.php:2492 core.php:2535 core.php:2616
547
  #, php-format
548
  msgid "Oops, I can't find the link %d"
549
  msgstr ""
550
 
551
- #: core.php:2466
552
  msgid "This link was manually marked as working by the user."
553
  msgstr ""
554
 
555
- #: core.php:2472
556
  msgid "Oops, couldn't modify the link!"
557
  msgstr ""
558
 
559
- #: core.php:2475 core.php:2552
560
  msgid "Error : link_id not specified"
561
  msgstr ""
562
 
563
- #: core.php:2499
564
  msgid "Oops, the new URL is invalid!"
565
  msgstr ""
566
 
567
- #: core.php:2508
568
  msgid "An unexpected error occured!"
569
  msgstr ""
570
 
571
- #: core.php:2517
572
  msgid "Error : link_id or new_url not specified"
573
  msgstr ""
574
 
575
- #: core.php:2542
576
  #, php-format
577
  msgid "URL %s was removed."
578
  msgstr ""
579
 
580
- #: core.php:2546
581
  msgid "The plugin failed to remove the link."
582
  msgstr ""
583
 
584
- #: core.php:2561
585
  msgid "You don't have sufficient privileges to access this information!"
586
  msgstr ""
587
 
588
- #: core.php:2574
589
  msgid "Error : link ID not specified"
590
  msgstr ""
591
 
592
- #: core.php:2598
593
  #, php-format
594
  msgid "Failed to load link details (%s)"
595
  msgstr ""
596
 
597
- #: core.php:2636
598
  #, php-format
599
  msgid "URL %s added to the exclusion list"
600
  msgstr ""
601
 
602
- #: core.php:2640
603
  msgid "Link ID not specified"
604
  msgstr ""
605
 
606
- #: core.php:2790
607
  #, php-format
608
  msgid ""
609
  "The current temporary directory is not accessible; please <a href=\"%s\">set "
610
  "a different one</a>."
611
  msgstr ""
612
 
613
- #: core.php:2795
614
  #, php-format
615
  msgid ""
616
  "Please make the directory <code>%1$s</code> writable by plugins or <a href="
617
  "\"%2$s\">set a custom temporary directory</a>."
618
  msgstr ""
619
 
620
- #: core.php:2802
621
  msgid "Broken Link Checker can't create a lockfile."
622
  msgstr ""
623
 
624
- #: core.php:2807
625
  msgid ""
626
  "The plugin uses a file-based locking mechanism to ensure that only one "
627
  "instance of the resource-heavy link checking algorithm is running at any "
@@ -632,57 +715,57 @@ msgid ""
632
  "specify a custom temporary directory in the plugin's settings."
633
  msgstr ""
634
 
635
- #: core.php:2827
636
  msgid "PHP version"
637
  msgstr ""
638
 
639
- #: core.php:2833
640
  msgid "MySQL version"
641
  msgstr ""
642
 
643
- #: core.php:2846
644
  msgid ""
645
  "You have an old version of CURL. Redirect detection may not work properly."
646
  msgstr ""
647
 
648
- #: core.php:2858 core.php:2874 core.php:2879
649
  msgid "Not installed"
650
  msgstr ""
651
 
652
- #: core.php:2861
653
  msgid "CURL version"
654
  msgstr ""
655
 
656
- #: core.php:2867
657
  msgid "Installed"
658
  msgstr ""
659
 
660
- #: core.php:2880
661
  msgid "You must have either CURL or Snoopy installed for the plugin to work!"
662
  msgstr ""
663
 
664
- #: core.php:2891
665
  msgid "On"
666
  msgstr ""
667
 
668
- #: core.php:2892
669
  msgid "Redirects may be detected as broken links when safe_mode is on."
670
  msgstr ""
671
 
672
- #: core.php:2897 core.php:2911
673
  msgid "Off"
674
  msgstr ""
675
 
676
- #: core.php:2905
677
  #, php-format
678
  msgid "On ( %s )"
679
  msgstr ""
680
 
681
- #: core.php:2906
682
  msgid "Redirects may be detected as broken links when open_basedir is on."
683
  msgstr ""
684
 
685
- #: core.php:2925
686
  msgid "Can't create a lockfile. Please specify a custom temporary directory."
687
  msgstr ""
688
 
1
  # Broken Link Checker POT file
2
+ # Copyright (C) 2010 Janis Elsts
3
+ # This file is distributed under the same license as the Broken Link Checker package.
4
+ # Janis Elsts <whiteshadow@w-shadow.com>, 2010.
5
  #
6
  #, fuzzy
7
  msgid ""
8
  msgstr ""
9
+ "Project-Id-Version: Broken Link Checker 0.8\n"
10
  "Report-Msgid-Bugs-To: whiteshadow@w-shadow.com\n"
11
+ "POT-Creation-Date: 2010-01-24 15:25+0000\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
  "MIME-Version: 1.0\n"
16
+ "Content-Type: text/plain; charset=utf-8\n"
17
  "Content-Transfer-Encoding: 8bit\n"
18
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
19
 
20
+ #: core.php:143 core.php:1835
21
  msgid "Loading..."
22
  msgstr ""
23
 
24
+ #: core.php:166 core.php:604
25
  msgid "[ Network error ]"
26
  msgstr ""
27
 
28
+ #: core.php:191
29
  msgid "Automatically expand the widget if broken links have been detected"
30
  msgstr ""
31
 
32
+ #: core.php:375 core.php:384 core.php:414 core.php:426 core.php:1014
33
+ #: core.php:1038 core.php:1316
34
  #, php-format
35
  msgid "Database error : %s"
36
  msgstr ""
37
 
38
+ #: core.php:452
39
  msgid "Link Checker Settings"
40
  msgstr ""
41
 
42
+ #: core.php:453
43
  msgid "Link Checker"
44
  msgstr ""
45
 
46
+ #: core.php:459
47
  msgid "View Broken Links"
48
  msgstr ""
49
 
50
+ #: core.php:460 core.php:892
51
  msgid "Broken Links"
52
  msgstr ""
53
 
54
+ #: core.php:484
55
  msgid "Settings"
56
  msgstr ""
57
 
58
+ #: core.php:568
59
  msgid "Broken Link Checker Options"
60
  msgstr ""
61
 
62
+ #: core.php:581
63
  msgid "Status"
64
  msgstr ""
65
 
66
+ #: core.php:583 core.php:823
67
  msgid "Show debug info"
68
  msgstr ""
69
 
70
+ #: core.php:617
71
  msgid "Re-check all pages"
72
  msgstr ""
73
 
74
+ #: core.php:641
75
  msgid "Check each link"
76
  msgstr ""
77
 
78
+ #: core.php:646
79
  #, php-format
80
  msgid "Every %s hours"
81
  msgstr ""
82
 
83
+ #: core.php:655
84
  msgid ""
85
  "Existing links will be checked this often. New links will usually be checked "
86
  "ASAP."
87
  msgstr ""
88
 
89
+ #: core.php:662
90
  msgid "Broken link CSS"
91
  msgstr ""
92
 
93
+ #: core.php:667
94
  msgid "Apply <em>class=\"broken_link\"</em> to broken links"
95
  msgstr ""
96
 
97
+ #: core.php:679
98
  msgid "Removed link CSS"
99
  msgstr ""
100
 
101
+ #: core.php:684
102
  msgid "Apply <em>class=\"removed_link\"</em> to unlinked links"
103
  msgstr ""
104
 
105
+ #: core.php:696
106
  msgid "Exclusion list"
107
  msgstr ""
108
 
109
+ #: core.php:697
110
  msgid ""
111
  "Don't check links where the URL contains any of these words (one per line) :"
112
  msgstr ""
113
 
114
+ #: core.php:707
115
  msgid "Custom fields"
116
  msgstr ""
117
 
118
+ #: core.php:708
119
  msgid "Check URLs entered in these custom fields (one per line) :"
120
  msgstr ""
121
 
122
+ #: core.php:719
123
  msgid "Advanced"
124
  msgstr ""
125
 
126
+ #: core.php:725
127
  msgid "Timeout"
128
  msgstr ""
129
 
130
+ #: core.php:731 core.php:787
131
  #, php-format
132
  msgid "%s seconds"
133
  msgstr ""
134
 
135
+ #: core.php:740
136
  msgid "Links that take longer than this to load will be marked as broken."
137
  msgstr ""
138
 
139
+ #: core.php:749
140
  msgid "Custom temporary directory"
141
  msgstr ""
142
 
143
+ #: core.php:758 core.php:2792
144
  msgid "OK"
145
  msgstr ""
146
 
147
+ #: core.php:761
148
  msgid "Error : This directory isn't writable by PHP."
149
  msgstr ""
150
 
151
+ #: core.php:766
152
  msgid "Error : This directory doesn't exist."
153
  msgstr ""
154
 
155
+ #: core.php:774
156
  msgid ""
157
  "Set this field if you want the plugin to use a custom directory for its "
158
  "lockfiles. Otherwise, leave it blank."
159
  msgstr ""
160
 
161
+ #: core.php:781
162
  msgid "Max. execution time"
163
  msgstr ""
164
 
165
+ #: core.php:798
166
  msgid ""
167
  "The plugin works by periodically creating a background worker instance that "
168
  "parses your posts looking for links, checks the discovered URLs, and "
170
  "the background instance may run each time before stopping."
171
  msgstr ""
172
 
173
+ #: core.php:808
174
  msgid "Save Changes"
175
  msgstr ""
176
 
177
+ #: core.php:821
178
  msgid "Hide debug info"
179
  msgstr ""
180
 
181
+ #: core.php:891
182
  msgid "Broken"
183
  msgstr ""
184
 
185
+ #: core.php:893
186
  msgid "No broken links found"
187
  msgstr ""
188
 
189
+ #: core.php:897
190
  msgid "Redirects"
191
  msgstr ""
192
 
193
+ #: core.php:898
194
  msgid "Redirected Links"
195
  msgstr ""
196
 
197
+ #: core.php:899
198
  msgid "No redirects found"
199
  msgstr ""
200
 
201
+ #: core.php:904
202
  msgid "All"
203
  msgstr ""
204
 
205
+ #: core.php:905
206
  msgid "Detected Links"
207
  msgstr ""
208
 
209
+ #: core.php:906
210
  msgid "No links found (yet)"
211
  msgstr ""
212
 
213
+ #: core.php:933 core.php:1281
214
  msgid "No links found for your query"
215
  msgstr ""
216
 
217
+ #: core.php:994
218
  msgid "You must enter a filter name!"
219
  msgstr ""
220
 
221
+ #: core.php:998
222
  msgid "Invalid search query."
223
  msgstr ""
224
 
225
+ #: core.php:1009
226
  #, php-format
227
  msgid "Filter \"%s\" created"
228
  msgstr ""
229
 
230
+ #: core.php:1026
231
  msgid "Filter ID not specified."
232
  msgstr ""
233
 
234
+ #: core.php:1035
235
  msgid "Filter deleted"
236
  msgstr ""
237
 
238
+ #: core.php:1084
239
+ #, php-format
240
+ msgid "Failed to delete post \"%s\" (%d)"
241
+ msgstr ""
242
+
243
+ #: core.php:1097
244
+ #, php-format
245
+ msgid "%d post moved to the trash"
246
+ msgid_plural "%d posts moved to the trash"
247
+ msgstr[0] ""
248
+ msgstr[1] ""
249
+
250
+ #: core.php:1099
251
+ #, php-format
252
+ msgid "%d post deleted"
253
+ msgid_plural "%d posts deleted"
254
+ msgstr[0] ""
255
+ msgstr[1] ""
256
+
257
+ #: core.php:1134
258
+ #, php-format
259
+ msgid "Failed to delete blogroll link \"%s\" (%d)"
260
+ msgstr ""
261
+
262
+ #: core.php:1144
263
+ #, php-format
264
+ msgid "%d blogroll link deleted"
265
+ msgid_plural "%d blogroll links deleted"
266
+ msgstr[0] ""
267
+ msgstr[1] ""
268
+
269
+ #: core.php:1153
270
+ msgid "Didn't find anything to delete!"
271
+ msgstr ""
272
+
273
+ #: core.php:1191
274
+ #, php-format
275
+ msgid "%d link removed"
276
+ msgid_plural "%d links removed"
277
+ msgstr[0] ""
278
+ msgstr[1] ""
279
+
280
+ #: core.php:1202
281
+ #, php-format
282
+ msgid "Failed to remove %d link"
283
+ msgid_plural "Failed to remove %d links"
284
+ msgstr[0] ""
285
+ msgstr[1] ""
286
+
287
+ #: core.php:1243
288
+ #, php-format
289
+ msgid "Replaced %d redirect with a direct link"
290
+ msgid_plural "Replaced %d redirects with direct links"
291
+ msgstr[0] ""
292
+ msgstr[1] ""
293
+
294
+ #: core.php:1254
295
+ #, php-format
296
+ msgid "Failed to fix %d redirect"
297
+ msgid_plural "Failed to fix %d redirects"
298
+ msgstr[0] ""
299
+ msgstr[1] ""
300
+
301
+ #: core.php:1264
302
+ msgid "None of the selected links are redirects!"
303
+ msgstr ""
304
+
305
+ #: core.php:1279 core.php:1400
306
  msgid "Search"
307
  msgstr ""
308
 
309
+ #: core.php:1280
310
  msgid "Search Results"
311
  msgstr ""
312
 
313
+ #: core.php:1384
314
  msgid "Save This Search As a Filter"
315
  msgstr ""
316
 
317
+ #: core.php:1394
318
  msgid "Delete This Filter"
319
  msgstr ""
320
 
321
+ #: core.php:1410
322
  msgid "Link text"
323
  msgstr ""
324
 
325
+ #: core.php:1413 core.php:1526
326
  msgid "URL"
327
  msgstr ""
328
 
329
+ #: core.php:1416 core.php:2141
330
  msgid "HTTP code"
331
  msgstr ""
332
 
333
+ #: core.php:1419
334
  msgid "Link status"
335
  msgstr ""
336
 
337
+ #: core.php:1435
338
  msgid "Link type"
339
  msgstr ""
340
 
341
+ #: core.php:1439
342
  msgid "Any"
343
  msgstr ""
344
 
345
+ #: core.php:1440
346
  msgid "Normal link"
347
  msgstr ""
348
 
349
+ #: core.php:1441 core.php:1602
350
  msgid "Image"
351
  msgstr ""
352
 
353
+ #: core.php:1442 core.php:1613
354
  msgid "Custom field"
355
  msgstr ""
356
 
357
+ #: core.php:1443 core.php:1621
358
  msgid "Bookmark"
359
  msgstr ""
360
 
361
+ #: core.php:1456
362
  msgid "Search Links"
363
  msgstr ""
364
 
365
+ #: core.php:1457 core.php:1654
366
  msgid "Cancel"
367
  msgstr ""
368
 
369
+ #: core.php:1473
370
+ msgid "Bulk Actions"
371
+ msgstr ""
372
+
373
+ #: core.php:1474 core.php:1639 core.php:1922
374
+ msgid "Unlink"
375
+ msgstr ""
376
+
377
+ #: core.php:1475
378
+ msgid "Fix redirects"
379
+ msgstr ""
380
+
381
+ #: core.php:1476
382
+ msgid "Delete sources"
383
+ msgstr ""
384
+
385
+ #: core.php:1490 core.php:1686
386
+ msgid "Apply"
387
+ msgstr ""
388
+
389
+ #: core.php:1497
390
  msgid "&laquo;"
391
  msgstr ""
392
 
393
+ #: core.php:1498
394
  msgid "&raquo;"
395
  msgstr ""
396
 
397
+ #: core.php:1505 core.php:1692
398
  #, php-format
399
  msgid "Displaying %s&#8211;%s of <span class=\"current-link-count\">%s</span>"
400
  msgstr ""
401
 
402
+ #: core.php:1524
403
  msgid "Source"
404
  msgstr ""
405
 
406
+ #: core.php:1525
407
  msgid "Link Text"
408
  msgstr ""
409
 
410
+ #: core.php:1557 core.php:1563
411
  msgid "Edit this post"
412
  msgstr ""
413
 
414
+ #: core.php:1563 core.php:1578
415
  msgid "Edit"
416
  msgstr ""
417
 
418
+ #: core.php:1564
419
  msgid "Delete this post"
420
  msgstr ""
421
 
422
+ #: core.php:1564
423
  #, php-format
424
  msgid ""
425
  "You are about to delete this post '%s'\n"
426
  " 'Cancel' to stop, 'OK' to delete."
427
  msgstr ""
428
 
429
+ #: core.php:1564 core.php:1579
430
  msgid "Delete"
431
  msgstr ""
432
 
433
+ #: core.php:1566
434
  #, php-format
435
  msgid "View \"%s\""
436
  msgstr ""
437
 
438
+ #: core.php:1566
439
  msgid "View"
440
  msgstr ""
441
 
442
+ #: core.php:1573 core.php:1578
443
  msgid "Edit this bookmark"
444
  msgstr ""
445
 
446
+ #: core.php:1579
447
  #, php-format
448
  msgid ""
449
  "You are about to delete this link '%s'\n"
450
  " 'Cancel' to stop, 'OK' to delete."
451
  msgstr ""
452
 
453
+ #: core.php:1588
454
  msgid "[An orphaned link! This is a bug.]"
455
  msgstr ""
456
 
457
+ #: core.php:1636
458
  msgid "Show more info about this link"
459
  msgstr ""
460
 
461
+ #: core.php:1636 core.php:3085
462
  msgid "Details"
463
  msgstr ""
464
 
465
+ #: core.php:1638
466
  msgid "Remove this link from all posts"
467
  msgstr ""
468
 
469
+ #: core.php:1642 core.php:1952 core.php:1963
 
 
 
 
470
  msgid "Excluded"
471
  msgstr ""
472
 
473
+ #: core.php:1644
474
  msgid "Add this URL to the exclusion list"
475
  msgstr ""
476
 
477
+ #: core.php:1645 core.php:1966
478
  msgid "Exclude"
479
  msgstr ""
480
 
481
+ #: core.php:1648
482
  msgid "Edit link URL"
483
  msgstr ""
484
 
485
+ #: core.php:1648 core.php:1863 core.php:1891
486
  msgid "Edit URL"
487
  msgstr ""
488
 
489
+ #: core.php:1654
490
  msgid "Cancel URL editing"
491
  msgstr ""
492
 
493
+ #: core.php:1668
494
  msgid "Remove this link from the list of broken links and mark it as valid"
495
  msgstr ""
496
 
497
+ #: core.php:1670 core.php:1755
498
  msgid "Discard"
499
  msgstr ""
500
 
501
+ #: core.php:1731 core.php:1898 core.php:1935
502
  msgid "Wait..."
503
  msgstr ""
504
 
505
+ #: core.php:1789
506
  msgid "Save URL"
507
  msgstr ""
508
 
509
+ #: core.php:1799
510
  msgid "Saving changes..."
511
  msgstr ""
512
 
513
+ #: core.php:2011
514
  msgid "Enter a name for the new custom filter"
515
  msgstr ""
516
 
517
+ #: core.php:2022
518
  msgid ""
519
  "You are about to delete the current filter.\n"
520
  "'Cancel' to stop, 'OK' to delete"
521
  msgstr ""
522
 
523
+ #: core.php:2118
524
  msgid "Log"
525
  msgstr ""
526
 
527
+ #: core.php:2126
528
  msgid "Post published on"
529
  msgstr ""
530
 
531
+ #: core.php:2131
532
  msgid "Link last checked"
533
  msgstr ""
534
 
535
+ #: core.php:2135
536
  msgid "Never"
537
  msgstr ""
538
 
539
+ #: core.php:2146
540
  msgid "Response time"
541
  msgstr ""
542
 
543
+ #: core.php:2148
544
  #, php-format
545
  msgid "%2.3f seconds"
546
  msgstr ""
547
 
548
+ #: core.php:2151
549
  msgid "Final URL"
550
  msgstr ""
551
 
552
+ #: core.php:2156
553
  msgid "Redirect count"
554
  msgstr ""
555
 
556
+ #: core.php:2161
557
  msgid "Instance count"
558
  msgstr ""
559
 
560
+ #: core.php:2170
561
  #, php-format
562
  msgid "This link has failed %d time."
563
  msgid_plural "This link has failed %d times."
564
  msgstr[0] ""
565
  msgstr[1] ""
566
 
567
+ #: core.php:2580 core.php:2910
568
  msgid ""
569
  "This link wasn't checked because a matching keyword was found on your "
570
  "exclusion list."
571
  msgstr ""
572
 
573
+ #: core.php:2622
574
  msgid "View broken links"
575
  msgstr ""
576
 
577
+ #: core.php:2623
578
  #, php-format
579
  msgid "Found %d broken link"
580
  msgid_plural "Found %d broken links"
581
  msgstr[0] ""
582
  msgstr[1] ""
583
 
584
+ #: core.php:2629
585
  msgid "No broken links found."
586
  msgstr ""
587
 
588
+ #: core.php:2636
589
  #, php-format
590
  msgid "%d URL in the work queue"
591
  msgid_plural "%d URLs in the work queue"
592
  msgstr[0] ""
593
  msgstr[1] ""
594
 
595
+ #: core.php:2639
596
  msgid "No URLs in the work queue."
597
  msgstr ""
598
 
599
+ #: core.php:2645
600
  #, php-format
601
  msgid "Detected %d unique URL"
602
  msgid_plural "Detected %d unique URLs"
603
  msgstr[0] ""
604
  msgstr[1] ""
605
 
606
+ #: core.php:2646
607
  #, php-format
608
  msgid "in %d link"
609
  msgid_plural "in %d links"
610
  msgstr[0] ""
611
  msgstr[1] ""
612
 
613
+ #: core.php:2651
614
  msgid "and still searching..."
615
  msgstr ""
616
 
617
+ #: core.php:2657
618
  msgid "Searching your blog for links..."
619
  msgstr ""
620
 
621
+ #: core.php:2659
622
  msgid "No links detected."
623
  msgstr ""
624
 
625
+ #: core.php:2731 core.php:2763 core.php:2806 core.php:2887
626
  msgid "You're not allowed to do that!"
627
  msgstr ""
628
 
629
+ #: core.php:2739 core.php:2773 core.php:2816 core.php:2897
630
  #, php-format
631
  msgid "Oops, I can't find the link %d"
632
  msgstr ""
633
 
634
+ #: core.php:2747
635
  msgid "This link was manually marked as working by the user."
636
  msgstr ""
637
 
638
+ #: core.php:2753
639
  msgid "Oops, couldn't modify the link!"
640
  msgstr ""
641
 
642
+ #: core.php:2756 core.php:2833
643
  msgid "Error : link_id not specified"
644
  msgstr ""
645
 
646
+ #: core.php:2780
647
  msgid "Oops, the new URL is invalid!"
648
  msgstr ""
649
 
650
+ #: core.php:2789
651
  msgid "An unexpected error occured!"
652
  msgstr ""
653
 
654
+ #: core.php:2798
655
  msgid "Error : link_id or new_url not specified"
656
  msgstr ""
657
 
658
+ #: core.php:2823
659
  #, php-format
660
  msgid "URL %s was removed."
661
  msgstr ""
662
 
663
+ #: core.php:2827
664
  msgid "The plugin failed to remove the link."
665
  msgstr ""
666
 
667
+ #: core.php:2842
668
  msgid "You don't have sufficient privileges to access this information!"
669
  msgstr ""
670
 
671
+ #: core.php:2855
672
  msgid "Error : link ID not specified"
673
  msgstr ""
674
 
675
+ #: core.php:2879
676
  #, php-format
677
  msgid "Failed to load link details (%s)"
678
  msgstr ""
679
 
680
+ #: core.php:2917
681
  #, php-format
682
  msgid "URL %s added to the exclusion list"
683
  msgstr ""
684
 
685
+ #: core.php:2921
686
  msgid "Link ID not specified"
687
  msgstr ""
688
 
689
+ #: core.php:3071
690
  #, php-format
691
  msgid ""
692
  "The current temporary directory is not accessible; please <a href=\"%s\">set "
693
  "a different one</a>."
694
  msgstr ""
695
 
696
+ #: core.php:3076
697
  #, php-format
698
  msgid ""
699
  "Please make the directory <code>%1$s</code> writable by plugins or <a href="
700
  "\"%2$s\">set a custom temporary directory</a>."
701
  msgstr ""
702
 
703
+ #: core.php:3083
704
  msgid "Broken Link Checker can't create a lockfile."
705
  msgstr ""
706
 
707
+ #: core.php:3088
708
  msgid ""
709
  "The plugin uses a file-based locking mechanism to ensure that only one "
710
  "instance of the resource-heavy link checking algorithm is running at any "
715
  "specify a custom temporary directory in the plugin's settings."
716
  msgstr ""
717
 
718
+ #: core.php:3108
719
  msgid "PHP version"
720
  msgstr ""
721
 
722
+ #: core.php:3114
723
  msgid "MySQL version"
724
  msgstr ""
725
 
726
+ #: core.php:3127
727
  msgid ""
728
  "You have an old version of CURL. Redirect detection may not work properly."
729
  msgstr ""
730
 
731
+ #: core.php:3139 core.php:3155 core.php:3160
732
  msgid "Not installed"
733
  msgstr ""
734
 
735
+ #: core.php:3142
736
  msgid "CURL version"
737
  msgstr ""
738
 
739
+ #: core.php:3148
740
  msgid "Installed"
741
  msgstr ""
742
 
743
+ #: core.php:3161
744
  msgid "You must have either CURL or Snoopy installed for the plugin to work!"
745
  msgstr ""
746
 
747
+ #: core.php:3172
748
  msgid "On"
749
  msgstr ""
750
 
751
+ #: core.php:3173
752
  msgid "Redirects may be detected as broken links when safe_mode is on."
753
  msgstr ""
754
 
755
+ #: core.php:3178 core.php:3192
756
  msgid "Off"
757
  msgstr ""
758
 
759
+ #: core.php:3186
760
  #, php-format
761
  msgid "On ( %s )"
762
  msgstr ""
763
 
764
+ #: core.php:3187
765
  msgid "Redirects may be detected as broken links when open_basedir is on."
766
  msgstr ""
767
 
768
+ #: core.php:3206
769
  msgid "Can't create a lockfile. Please specify a custom temporary directory."
770
  msgstr ""
771
 
link-classes.php CHANGED
@@ -457,7 +457,31 @@ class blcLink {
457
  );
458
  }
459
 
460
- //Delete (unlink) all instances and the link itself
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
461
  function unlink(){
462
  if ( !$this->valid() ){
463
  return false;
457
  );
458
  }
459
 
460
+ /**
461
+ * blcLink::deredirect()
462
+ * Edit all of of this link's instances and replace the URL with the URL that it redirects to.
463
+ * This method does nothing if the link isn't a redirect.
464
+ *
465
+ * @return bool|array An associative array with the new_link_id, the number of successfully edited instances (cnt_okay) and the number of failed edits (cnt_error). Returns False on error or if the link is not a redirect.
466
+ */
467
+ function deredirect(){
468
+ if ( !$this->valid() ){
469
+ return false;
470
+ }
471
+
472
+ if ( ($this->redirect_count <= 0) || empty($this->final_url) ){
473
+ return false;
474
+ }
475
+
476
+ return $this->edit($this->final_url);
477
+ }
478
+
479
+ /**
480
+ * blcLink::unlink()
481
+ * Delete (unlink) all instances and the link itself
482
+ *
483
+ * @return bool Returns True on success, False on error
484
+ */
485
  function unlink(){
486
  if ( !$this->valid() ){
487
  return false;
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: whiteshadow
3
  Tags: links, broken, maintenance, blogroll, custom fields, admin
4
  Requires at least: 2.8.0
5
- Tested up to: 2.9
6
- Stable tag: 0.7.4
7
 
8
  This plugin will check your posts, custom fields and the blogroll for broken links and missing images and notify you if any are found.
9
 
@@ -75,6 +75,14 @@ To upgrade your installation
75
 
76
  *This is an automatically generated changelog*
77
 
 
 
 
 
 
 
 
 
78
  = 0.7.4 =
79
  * Fixed a minor bug where the plugin would display an incorrect number of links in the "Displaying x-y of z" label when the user moves to a different page of the results.
80
  * Added Ukrainian translation.
@@ -333,4 +341,3 @@ To upgrade your installation
333
 
334
  = 0.1 =
335
  * *There are no release notes for this version*
336
-
2
  Contributors: whiteshadow
3
  Tags: links, broken, maintenance, blogroll, custom fields, admin
4
  Requires at least: 2.8.0
5
+ Tested up to: 3.0-alpha
6
+ Stable tag: 0.8
7
 
8
  This plugin will check your posts, custom fields and the blogroll for broken links and missing images and notify you if any are found.
9
 
75
 
76
  *This is an automatically generated changelog*
77
 
78
+ = 0.8 =
79
+ * Initial support for performing some action on multiple links at once.
80
+ * Added a "Delete sources" bulk action that lets you delete all posts (or blogroll entries) that contain any of the selected links. Doing this in WP 2.9 and up this will instead move the posts to the trash, not delete them permanently.
81
+ * New bulk action : Unlink. Removes all selected links from all posts.
82
+ * New bulk action : Fix redirects. Analyzes the selected links and replaces any redirects with direct links.
83
+ * Added a notice asking the user to take the feedback survey.
84
+ * Updated the .POT file with new i18n strings.
85
+
86
  = 0.7.4 =
87
  * Fixed a minor bug where the plugin would display an incorrect number of links in the "Displaying x-y of z" label when the user moves to a different page of the results.
88
  * Added Ukrainian translation.
341
 
342
  = 0.1 =
343
  * *There are no release notes for this version*