Version Description
- Added filter for disabling email notifications.
- Added filter to use GET requests.
- Added option to disable last updated time on post types.
- Added option to check post excerpts.
- Added a confirmation box when unlinking.
- Added basic multisite support.
- Added proper error messages on YouTube video errors.
- Fixed bulk recheck option.
- Fixed minor database errors.
- Improved performance.
- Removed default YouTube API key.
- Removed usage of depricated WP Snoopy.
Download this release
Release Info
Developer | bplv |
Plugin | Broken Link Checker |
Version | 1.11.13 |
Comparing to | |
See all releases |
Code changes from version 1.11.12 to 1.11.13
- broken-link-checker.php +12 -6
- core/core.php +284 -87
- core/init.php +5 -12
- css/links-page.css +14 -10
- includes/activation.php +6 -0
- includes/admin/db-upgrade.php +0 -1
- includes/admin/links-page-js.php +57 -52
- includes/admin/options-page-js.php +2 -2
- includes/any-post.php +48 -31
- includes/checkers.php +0 -1
- includes/links.php +1 -0
- languages/broken-link-checker.pot +249 -237
- modules/checkers/http.php +43 -48
- modules/extras/youtube.php +3 -5
- readme.txt +16 -2
- uninstall.php +1 -0
broken-link-checker.php
CHANGED
@@ -1,16 +1,22 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
* Plugin Name: Broken Link Checker
|
5 |
* Plugin URI: https://wordpress.org/plugins/broken-link-checker/
|
6 |
* Description: Checks your blog for broken links and missing images and notifies you on the dashboard if any are found.
|
7 |
-
* Version: 1.11.
|
8 |
* Author: WPMU DEV
|
9 |
* Author URI: https://premium.wpmudev.org/
|
10 |
* Text Domain: broken-link-checker
|
11 |
* License: GPLv2 or later
|
12 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
13 |
-
*/
|
14 |
|
15 |
/*
|
16 |
Broken Link Checker is free software: you can redistribute it and/or modify
|
@@ -27,15 +33,15 @@ You should have received a copy of the GNU General Public License
|
|
27 |
along with Broken Link Checker. If not, see https://www.gnu.org/licenses/gpl-2.0.html.
|
28 |
*/
|
29 |
|
30 |
-
//Path to this file
|
31 |
if ( ! defined( 'BLC_PLUGIN_FILE' ) ) {
|
32 |
define( 'BLC_PLUGIN_FILE', __FILE__ );
|
33 |
}
|
34 |
|
35 |
-
//Path to the plugin's directory
|
36 |
if ( ! defined( 'BLC_DIRECTORY' ) ) {
|
37 |
define( 'BLC_DIRECTORY', dirname( __FILE__ ) );
|
38 |
}
|
39 |
|
40 |
-
//Load the actual plugin
|
41 |
require 'core/init.php';
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
+
* Broken Link Checker
|
4 |
+
*
|
5 |
+
* @link https://wordpress.org/plugins/broken-link-checker/
|
6 |
+
* @since 1.0.0
|
7 |
+
* @package broken-link-checker
|
8 |
+
*
|
9 |
+
* @wordpress-plugin
|
10 |
* Plugin Name: Broken Link Checker
|
11 |
* Plugin URI: https://wordpress.org/plugins/broken-link-checker/
|
12 |
* Description: Checks your blog for broken links and missing images and notifies you on the dashboard if any are found.
|
13 |
+
* Version: 1.11.13
|
14 |
* Author: WPMU DEV
|
15 |
* Author URI: https://premium.wpmudev.org/
|
16 |
* Text Domain: broken-link-checker
|
17 |
* License: GPLv2 or later
|
18 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
19 |
+
*/
|
20 |
|
21 |
/*
|
22 |
Broken Link Checker is free software: you can redistribute it and/or modify
|
33 |
along with Broken Link Checker. If not, see https://www.gnu.org/licenses/gpl-2.0.html.
|
34 |
*/
|
35 |
|
36 |
+
// Path to this file.
|
37 |
if ( ! defined( 'BLC_PLUGIN_FILE' ) ) {
|
38 |
define( 'BLC_PLUGIN_FILE', __FILE__ );
|
39 |
}
|
40 |
|
41 |
+
// Path to the plugin's directory.
|
42 |
if ( ! defined( 'BLC_DIRECTORY' ) ) {
|
43 |
define( 'BLC_DIRECTORY', dirname( __FILE__ ) );
|
44 |
}
|
45 |
|
46 |
+
// Load the actual plugin.
|
47 |
require 'core/init.php';
|
core/core.php
CHANGED
@@ -1,9 +1,18 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/**
|
4 |
* Simple function to replicate PHP 5 behaviour
|
|
|
|
|
|
|
|
|
5 |
*/
|
|
|
6 |
if ( ! function_exists( 'microtime_float' ) ) {
|
|
|
|
|
|
|
|
|
|
|
7 |
function microtime_float() {
|
8 |
list( $usec, $sec ) = explode( ' ', microtime() );
|
9 |
return ( (float) $usec + (float) $sec );
|
@@ -16,23 +25,63 @@ require BLC_DIRECTORY . '/includes/wp-mutex.php';
|
|
16 |
require BLC_DIRECTORY . '/includes/transactions-manager.php';
|
17 |
|
18 |
if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
|
|
|
|
|
|
|
19 |
class wsBrokenLinkChecker {
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
/**
|
29 |
* Class constructor
|
30 |
*
|
31 |
-
* @param string
|
32 |
-
*
|
33 |
-
*
|
|
|
34 |
*/
|
35 |
-
function __construct( $loader, $conf ) {
|
36 |
$this->db_version = BLC_DATABASE_VERSION;
|
37 |
|
38 |
$this->conf = $conf;
|
@@ -41,20 +90,21 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
41 |
|
42 |
$this->load_language();
|
43 |
|
44 |
-
//Unlike the activation hook, the deactivation callback *can* be registered in this file
|
45 |
-
|
46 |
-
//'init' action).
|
|
|
47 |
register_deactivation_hook( $loader, array( $this, 'deactivation' ) );
|
48 |
|
49 |
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
|
50 |
|
51 |
-
//Load jQuery on Dashboard pages (probably redundant as WP already does that)
|
52 |
-
add_action( 'admin_print_scripts', array( $this, 'admin_print_scripts' ) )
|
53 |
|
54 |
-
//The dashboard widget
|
55 |
add_action( 'wp_dashboard_setup', array( $this, 'hook_wp_dashboard_setup' ) );
|
56 |
|
57 |
-
//AJAXy hooks
|
58 |
add_action( 'wp_ajax_blc_full_status', array( $this, 'ajax_full_status' ) );
|
59 |
add_action( 'wp_ajax_blc_dashboard_status', array( $this, 'ajax_dashboard_status' ) );
|
60 |
add_action( 'wp_ajax_blc_work', array( $this, 'ajax_work' ) );
|
@@ -69,17 +119,18 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
69 |
add_action( 'wp_ajax_blc_dismiss', array( $this, 'ajax_dismiss' ) );
|
70 |
add_action( 'wp_ajax_blc_undismiss', array( $this, 'ajax_undismiss' ) );
|
71 |
|
72 |
-
//Add/remove Cron events
|
73 |
$this->setup_cron_events();
|
74 |
|
75 |
-
//Set hooks that listen for our Cron actions
|
76 |
add_action( 'blc_cron_email_notifications', array( $this, 'maybe_send_email_notifications' ) );
|
77 |
add_action( 'blc_cron_check_links', array( $this, 'cron_check_links' ) );
|
78 |
add_action( 'blc_cron_database_maintenance', array( $this, 'database_maintenance' ) );
|
|
|
79 |
|
80 |
-
//Set the footer hook that will call the worker function via AJAX.
|
81 |
add_action( 'admin_footer', array( $this, 'admin_footer' ) );
|
82 |
-
//Add a "Screen Options" panel to the "Broken Links" page
|
83 |
add_screen_options_panel(
|
84 |
'blc-screen-options',
|
85 |
'',
|
@@ -89,9 +140,12 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
89 |
true
|
90 |
);
|
91 |
|
92 |
-
//Display an explanatory note on the "Tools -> Broken Links -> Warnings" page.
|
93 |
add_action( 'admin_notices', array( $this, 'show_warnings_section_notice' ) );
|
94 |
|
|
|
|
|
|
|
95 |
}
|
96 |
|
97 |
/**
|
@@ -99,7 +153,7 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
99 |
*
|
100 |
* @return void
|
101 |
*/
|
102 |
-
function admin_footer() {
|
103 |
if ( ! $this->conf->options['run_in_dashboard'] ) {
|
104 |
return;
|
105 |
}
|
@@ -112,7 +166,7 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
112 |
//(Re)starts the background worker thread
|
113 |
function blcDoWork(){
|
114 |
$.post(
|
115 |
-
"<?php echo admin_url( 'admin-ajax.php' ); ?>",
|
116 |
{
|
117 |
'action' : 'blc_work',
|
118 |
'_ajax_nonce' : '<?php echo esc_js( $nonce ); ?>'
|
@@ -134,10 +188,10 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
134 |
/**
|
135 |
* Check if an URL matches the exclusion list.
|
136 |
*
|
137 |
-
* @param string $url
|
138 |
* @return bool
|
139 |
*/
|
140 |
-
function is_excluded( $url ) {
|
141 |
if ( ! is_array( $this->conf->options['exclusion_list'] ) ) {
|
142 |
return false;
|
143 |
}
|
@@ -149,16 +203,19 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
149 |
return false;
|
150 |
}
|
151 |
|
152 |
-
|
|
|
|
|
|
|
153 |
?>
|
154 |
-
<p id='wsblc_activity_box'><?php
|
155 |
<script type='text/javascript'>
|
156 |
jQuery( function($){
|
157 |
var blc_was_autoexpanded = false;
|
158 |
|
159 |
function blcDashboardStatus(){
|
160 |
$.getJSON(
|
161 |
-
"<?php echo admin_url( 'admin-ajax.php' ); ?>",
|
162 |
{
|
163 |
'action' : 'blc_dashboard_status',
|
164 |
'random' : Math.random()
|
@@ -175,7 +232,7 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
175 |
}
|
176 |
<?php } ?>
|
177 |
} else {
|
178 |
-
$('#wsblc_activity_box').html('<?php
|
179 |
}
|
180 |
|
181 |
setTimeout( blcDashboardStatus, 120*1000 ); //...update every two minutes
|
@@ -190,14 +247,25 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
190 |
<?php
|
191 |
}
|
192 |
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
|
202 |
?>
|
203 |
<p><label for="blc-autoexpand">
|
@@ -206,30 +274,33 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
206 |
if ( $this->conf->options['autoexpand_widget'] ) {
|
207 |
echo 'checked="checked"';}
|
208 |
?>
|
209 |
-
|
210 |
-
<?php
|
211 |
</label></p>
|
212 |
<?php
|
213 |
-
}
|
214 |
|
215 |
-
|
216 |
-
//jQuery is used for triggering the link monitor via AJAX when any admin page is open.
|
217 |
-
wp_enqueue_script( 'jquery' );
|
218 |
}
|
219 |
|
220 |
-
|
221 |
-
|
222 |
-
|
|
|
|
|
|
|
223 |
wp_enqueue_script( 'jquery-ui-dialog' );
|
224 |
wp_enqueue_script( 'jquery-ui-tabs' );
|
225 |
-
wp_enqueue_script( 'jquery-cookie', plugins_url( 'js/jquery.cookie.js', BLC_PLUGIN_FILE ) ); //Used for storing last widget states, etc
|
226 |
}
|
227 |
|
228 |
-
|
|
|
|
|
|
|
229 |
wp_enqueue_script( 'jquery-ui-core' );
|
230 |
-
wp_enqueue_script( 'jquery-ui-dialog' ); //Used for the search form
|
231 |
-
wp_enqueue_script( 'jquery-color' ); //Used for background color animation
|
232 |
-
wp_enqueue_script( 'sprintf', plugins_url( 'js/sprintf.js', BLC_PLUGIN_FILE ) ); //Used in error messages
|
233 |
}
|
234 |
|
235 |
/**
|
@@ -237,16 +308,16 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
237 |
*
|
238 |
* @return void
|
239 |
*/
|
240 |
-
function initiate_recheck() {
|
241 |
-
global $wpdb;
|
242 |
|
243 |
-
//Delete all discovered instances
|
244 |
-
$wpdb->query( "TRUNCATE {$wpdb->prefix}blc_instances" );
|
245 |
|
246 |
-
//Delete all discovered links
|
247 |
-
$wpdb->query( "TRUNCATE {$wpdb->prefix}blc_links" );
|
248 |
|
249 |
-
//Mark all posts, custom fields and bookmarks for processing.
|
250 |
blc_resynch( true );
|
251 |
}
|
252 |
|
@@ -255,14 +326,15 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
255 |
*
|
256 |
* @return void
|
257 |
*/
|
258 |
-
function deactivation() {
|
259 |
-
//Remove our Cron events
|
260 |
wp_clear_scheduled_hook( 'blc_cron_check_links' );
|
261 |
wp_clear_scheduled_hook( 'blc_cron_email_notifications' );
|
262 |
wp_clear_scheduled_hook( 'blc_cron_database_maintenance' );
|
263 |
-
wp_clear_scheduled_hook( '
|
264 |
-
|
265 |
-
//
|
|
|
266 |
$moduleManager = blcModuleManager::getInstance();
|
267 |
$the_time = current_time( 'timestamp' );
|
268 |
foreach ( $moduleManager->get_active_modules() as $module_id => $module ) {
|
@@ -279,7 +351,7 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
279 |
*
|
280 |
* @return void
|
281 |
*/
|
282 |
-
function database_maintenance() {
|
283 |
blcContainerHelper::cleanup_containers();
|
284 |
blc_cleanup_instances();
|
285 |
blc_cleanup_links();
|
@@ -293,7 +365,7 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
293 |
*
|
294 |
* @return void
|
295 |
*/
|
296 |
-
function admin_menu() {
|
297 |
if ( current_user_can( 'manage_options' ) ) {
|
298 |
add_filter( 'plugin_action_links', array( $this, 'plugin_action_links' ), 10, 2 );
|
299 |
}
|
@@ -308,13 +380,13 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
308 |
|
309 |
$menu_title = __( 'Broken Links', 'broken-link-checker' );
|
310 |
if ( $this->conf->options['show_link_count_bubble'] ) {
|
311 |
-
//To make it easier to notice when broken links appear, display the current number of
|
312 |
-
//broken links in a little bubble notification in the "Broken Links" menu.
|
313 |
-
//(Similar to how the number of plugin updates and unmoderated comments is displayed).
|
314 |
$blc_link_query = blcLinkQuery::getInstance();
|
315 |
$broken_links = $blc_link_query->get_filter_links( 'broken', array( 'count_only' => true ) );
|
316 |
if ( $broken_links > 0 ) {
|
317 |
-
//TODO: Appropriating existing CSS classes for my own purposes is hacky. Fix eventually.
|
318 |
$menu_title .= sprintf(
|
319 |
' <span class="update-plugins"><span class="update-count blc-menu-bubble">%d</span></span>',
|
320 |
$broken_links
|
@@ -329,13 +401,13 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
329 |
array( $this, 'links_page' )
|
330 |
);
|
331 |
|
332 |
-
//Add plugin-specific scripts and CSS only to the it's own pages
|
333 |
add_action( 'admin_print_styles-' . $options_page_hook, array( $this, 'options_page_css' ) );
|
334 |
add_action( 'admin_print_styles-' . $links_page_hook, array( $this, 'links_page_css' ) );
|
335 |
add_action( 'admin_print_scripts-' . $options_page_hook, array( $this, 'enqueue_settings_scripts' ) );
|
336 |
add_action( 'admin_print_scripts-' . $links_page_hook, array( $this, 'enqueue_link_page_scripts' ) );
|
337 |
|
338 |
-
//Make the Settings page link to the link list
|
339 |
add_screen_meta_link(
|
340 |
'blc-links-page-link',
|
341 |
__( 'Go to Broken Links', 'broken-link-checker' ),
|
@@ -346,7 +418,7 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
346 |
}
|
347 |
|
348 |
/**
|
349 |
-
* plugin_action_links()
|
350 |
* Handler for the 'plugin_action_links' hook. Adds a "Settings" link to this plugin's entry
|
351 |
* on the plugin list.
|
352 |
*
|
@@ -354,18 +426,21 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
354 |
* @param string $file
|
355 |
* @return array
|
356 |
*/
|
357 |
-
function plugin_action_links( $links, $file ) {
|
358 |
-
if ( $file
|
359 |
$links[] = "<a href='options-general.php?page=link-checker-settings'>" . __( 'Settings' ) . '</a>';
|
360 |
}
|
361 |
return $links;
|
362 |
}
|
363 |
|
364 |
-
|
|
|
|
|
|
|
365 |
$moduleManager = blcModuleManager::getInstance();
|
366 |
|
367 |
-
//Prior to 1.5.2 (released 2012-05-27), there was a bug that would cause the donation flag to be
|
368 |
-
//set incorrectly. So we'll unset the flag in that case.
|
369 |
$reset_donation_flag = ( $this->conf->get( 'first_installation_timestamp', 0 ) < strtotime( '2012-05-27 00:00' ) ) && ! $this->conf->get( 'donation_flag_fixed', false );
|
370 |
|
371 |
if ( $reset_donation_flag ) {
|
@@ -377,7 +452,7 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
377 |
if ( isset( $_POST['recheck'] ) && ! empty( $_POST['recheck'] ) ) {
|
378 |
$this->initiate_recheck();
|
379 |
|
380 |
-
//Redirect back to the settings page
|
381 |
$base_url = remove_query_arg( array( '_wpnonce', 'noheader', 'updated', 'error', 'action', 'message' ) );
|
382 |
wp_redirect(
|
383 |
add_query_arg(
|
@@ -404,16 +479,16 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
404 |
|
405 |
$cleanPost = $_POST;
|
406 |
if ( function_exists( 'wp_magic_quotes' ) ) {
|
407 |
-
$cleanPost = stripslashes_deep( $cleanPost ); //Ceterum censeo, WP shouldn't mangle superglobals.
|
408 |
}
|
409 |
|
410 |
-
//Activate/deactivate modules
|
411 |
if ( ! empty( $_POST['module'] ) ) {
|
412 |
$active = array_keys( $_POST['module'] );
|
413 |
$moduleManager->set_active_modules( $active );
|
414 |
}
|
415 |
|
416 |
-
//Only post statuses that actually exist can be selected
|
417 |
if ( isset( $_POST['enabled_post_statuses'] ) && is_array( $_POST['enabled_post_statuses'] ) ) {
|
418 |
$available_statuses = get_post_stati();
|
419 |
$enabled_post_statuses = array_intersect( $_POST['enabled_post_statuses'], $available_statuses );
|
@@ -489,6 +564,9 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
489 |
$acf_fields_diff2 = array_diff( $this->conf->options['acf_fields'], $new_acf_fields );
|
490 |
$this->conf->options['acf_fields'] = $new_acf_fields;
|
491 |
|
|
|
|
|
|
|
492 |
//Turning off warnings turns existing warnings into "broken" links.
|
493 |
$warnings_enabled = ! empty( $_POST['warnings_enabled'] );
|
494 |
if ( $this->conf->get( 'warnings_enabled' ) && ! $warnings_enabled ) {
|
@@ -567,7 +645,25 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
567 |
|
568 |
if ( $this->conf->options['logging_enabled'] ) {
|
569 |
if ( $this->conf->options['custom_log_file_enabled'] ) {
|
|
|
570 |
$log_file = strval( $cleanPost['log_file'] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
571 |
} else {
|
572 |
//Default log file is /wp-content/uploads/broken-link-checker/blc-log.txt
|
573 |
$log_directory = self::get_default_log_directory();
|
@@ -583,8 +679,9 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
583 |
}
|
584 |
|
585 |
$this->conf->options['log_file'] = $log_file;
|
|
|
586 |
|
587 |
-
//Attempt to create the log file if not already there.
|
588 |
if ( ! is_file( $log_file ) ) {
|
589 |
file_put_contents( $log_file, '' );
|
590 |
}
|
@@ -1009,6 +1106,17 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
1009 |
</td>
|
1010 |
</tr>
|
1011 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1012 |
</table>
|
1013 |
|
1014 |
</div>
|
@@ -1318,7 +1426,7 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
1318 |
<th scope="row"><?php _e( 'Log file location', 'broken-link-checker' ); ?></th>
|
1319 |
<td>
|
1320 |
|
1321 |
-
<div
|
1322 |
|
1323 |
<p>
|
1324 |
<label>
|
@@ -1349,7 +1457,32 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
1349 |
</div>
|
1350 |
</td>
|
1351 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1352 |
|
|
|
|
|
|
|
|
|
|
|
1353 |
|
1354 |
<tr valign="top">
|
1355 |
<th scope="row"><?php _e( 'Forced recheck', 'broken-link-checker' ); ?></th>
|
@@ -3611,7 +3744,7 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
3611 |
$debug[ __( 'CURL version', 'broken-link-checker' ) ] = $data;
|
3612 |
|
3613 |
//Snoopy presence
|
3614 |
-
if ( class_exists( '
|
3615 |
$data = array(
|
3616 |
'state' => 'ok',
|
3617 |
'value' => __( 'Installed', 'broken-link-checker' ),
|
@@ -3768,7 +3901,12 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
3768 |
function maybe_send_email_notifications() {
|
3769 |
global $wpdb; /** @var wpdb $wpdb */
|
3770 |
|
3771 |
-
|
|
|
|
|
|
|
|
|
|
|
3772 |
return;
|
3773 |
}
|
3774 |
|
@@ -4011,8 +4149,67 @@ if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
|
4011 |
if ( ! wp_next_scheduled( 'blc_cron_database_maintenance' ) ) {
|
4012 |
wp_schedule_event( time(), 'daily', 'blc_cron_database_maintenance' );
|
4013 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4014 |
}
|
4015 |
|
|
|
|
|
4016 |
/**
|
4017 |
* Load the plugin's textdomain.
|
4018 |
*
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Simple function to replicate PHP 5 behaviour
|
4 |
+
*
|
5 |
+
* @link https://wordpress.org/plugins/broken-link-checker/
|
6 |
+
* @since 1.0.0
|
7 |
+
* @package broken-link-checker
|
8 |
*/
|
9 |
+
|
10 |
if ( ! function_exists( 'microtime_float' ) ) {
|
11 |
+
/**
|
12 |
+
* Calcualate microtime_float
|
13 |
+
*
|
14 |
+
* @since 1.0.0
|
15 |
+
*/
|
16 |
function microtime_float() {
|
17 |
list( $usec, $sec ) = explode( ' ', microtime() );
|
18 |
return ( (float) $usec + (float) $sec );
|
25 |
require BLC_DIRECTORY . '/includes/transactions-manager.php';
|
26 |
|
27 |
if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Broken Link Checker core
|
31 |
+
*/
|
32 |
class wsBrokenLinkChecker {
|
33 |
|
34 |
+
/**
|
35 |
+
* Plugin configuration.
|
36 |
+
*
|
37 |
+
* @var object
|
38 |
+
*/
|
39 |
+
public $conf;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Loader script path.
|
43 |
+
*
|
44 |
+
* @var string
|
45 |
+
*/
|
46 |
+
public $loader;
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Loader basename.
|
50 |
+
*
|
51 |
+
* @var string
|
52 |
+
*/
|
53 |
+
public $my_basename = '';
|
54 |
+
|
55 |
+
/**
|
56 |
+
* DB version.
|
57 |
+
*
|
58 |
+
* @var string
|
59 |
+
*/
|
60 |
+
public $db_version; // The required version of the plugin's DB schema.
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Execution start time.
|
64 |
+
*
|
65 |
+
* @var string
|
66 |
+
*/
|
67 |
+
public $execution_start_time;
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Text domain status.
|
71 |
+
*
|
72 |
+
* @var string
|
73 |
+
*/
|
74 |
+
public $is_textdomain_loaded = false;
|
75 |
|
76 |
/**
|
77 |
* Class constructor
|
78 |
*
|
79 |
+
* @param string $loader The fully
|
80 |
+
* qualified filename of the loader script that WP
|
81 |
+
* identifies as the "main" plugin file.
|
82 |
+
* @param blcConfigurationManager $conf An instance of the configuration manager.
|
83 |
*/
|
84 |
+
public function __construct( $loader, blcConfigurationManager $conf ) {
|
85 |
$this->db_version = BLC_DATABASE_VERSION;
|
86 |
|
87 |
$this->conf = $conf;
|
90 |
|
91 |
$this->load_language();
|
92 |
|
93 |
+
// Unlike the activation hook, the deactivation callback *can* be registered in this file.
|
94 |
+
|
95 |
+
// because deactivation happens after this class has already been instantiated (during the 'init' action).
|
96 |
+
|
97 |
register_deactivation_hook( $loader, array( $this, 'deactivation' ) );
|
98 |
|
99 |
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
|
100 |
|
101 |
+
// Load jQuery on Dashboard pages (probably redundant as WP already does that).
|
102 |
+
// add_action( 'admin_print_scripts', array( $this, 'admin_print_scripts' ) );.
|
103 |
|
104 |
+
// The dashboard widget.
|
105 |
add_action( 'wp_dashboard_setup', array( $this, 'hook_wp_dashboard_setup' ) );
|
106 |
|
107 |
+
// AJAXy hooks.
|
108 |
add_action( 'wp_ajax_blc_full_status', array( $this, 'ajax_full_status' ) );
|
109 |
add_action( 'wp_ajax_blc_dashboard_status', array( $this, 'ajax_dashboard_status' ) );
|
110 |
add_action( 'wp_ajax_blc_work', array( $this, 'ajax_work' ) );
|
119 |
add_action( 'wp_ajax_blc_dismiss', array( $this, 'ajax_dismiss' ) );
|
120 |
add_action( 'wp_ajax_blc_undismiss', array( $this, 'ajax_undismiss' ) );
|
121 |
|
122 |
+
// Add/remove Cron events.
|
123 |
$this->setup_cron_events();
|
124 |
|
125 |
+
// Set hooks that listen for our Cron actions.
|
126 |
add_action( 'blc_cron_email_notifications', array( $this, 'maybe_send_email_notifications' ) );
|
127 |
add_action( 'blc_cron_check_links', array( $this, 'cron_check_links' ) );
|
128 |
add_action( 'blc_cron_database_maintenance', array( $this, 'database_maintenance' ) );
|
129 |
+
add_action( 'blc_corn_clear_log_file', array( $this, 'clear_log_file' ) );
|
130 |
|
131 |
+
// Set the footer hook that will call the worker function via AJAX.
|
132 |
add_action( 'admin_footer', array( $this, 'admin_footer' ) );
|
133 |
+
// Add a "Screen Options" panel to the "Broken Links" page.
|
134 |
add_screen_options_panel(
|
135 |
'blc-screen-options',
|
136 |
'',
|
140 |
true
|
141 |
);
|
142 |
|
143 |
+
// Display an explanatory note on the "Tools -> Broken Links -> Warnings" page.
|
144 |
add_action( 'admin_notices', array( $this, 'show_warnings_section_notice' ) );
|
145 |
|
146 |
+
// Restore post date updated with the update link.
|
147 |
+
add_filter( 'wp_insert_post_data', array( $this, 'disable_post_date_update' ), 10, 2 );
|
148 |
+
|
149 |
}
|
150 |
|
151 |
/**
|
153 |
*
|
154 |
* @return void
|
155 |
*/
|
156 |
+
public function admin_footer() {
|
157 |
if ( ! $this->conf->options['run_in_dashboard'] ) {
|
158 |
return;
|
159 |
}
|
166 |
//(Re)starts the background worker thread
|
167 |
function blcDoWork(){
|
168 |
$.post(
|
169 |
+
"<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>",
|
170 |
{
|
171 |
'action' : 'blc_work',
|
172 |
'_ajax_nonce' : '<?php echo esc_js( $nonce ); ?>'
|
188 |
/**
|
189 |
* Check if an URL matches the exclusion list.
|
190 |
*
|
191 |
+
* @param string $url The url to exclude.
|
192 |
* @return bool
|
193 |
*/
|
194 |
+
public function is_excluded( $url ) {
|
195 |
if ( ! is_array( $this->conf->options['exclusion_list'] ) ) {
|
196 |
return false;
|
197 |
}
|
203 |
return false;
|
204 |
}
|
205 |
|
206 |
+
/**
|
207 |
+
* Get dashboard_widget
|
208 |
+
*/
|
209 |
+
public function dashboard_widget() {
|
210 |
?>
|
211 |
+
<p id='wsblc_activity_box'><?php esc_html_e( 'Loading...', 'broken-link-checker' ); ?></p>
|
212 |
<script type='text/javascript'>
|
213 |
jQuery( function($){
|
214 |
var blc_was_autoexpanded = false;
|
215 |
|
216 |
function blcDashboardStatus(){
|
217 |
$.getJSON(
|
218 |
+
"<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>",
|
219 |
{
|
220 |
'action' : 'blc_dashboard_status',
|
221 |
'random' : Math.random()
|
232 |
}
|
233 |
<?php } ?>
|
234 |
} else {
|
235 |
+
$('#wsblc_activity_box').html('<?php esc_html_e( '[ Network error ]', 'broken-link-checker' ); ?>');
|
236 |
}
|
237 |
|
238 |
setTimeout( blcDashboardStatus, 120*1000 ); //...update every two minutes
|
247 |
<?php
|
248 |
}
|
249 |
|
250 |
+
/**
|
251 |
+
* Dashboard widget controls.
|
252 |
+
*
|
253 |
+
* @param int $widget_id The widget ID.
|
254 |
+
* @param array $form_inputs The form inputs.
|
255 |
+
*/
|
256 |
+
public function dashboard_widget_control( $widget_id, $form_inputs = array() ) {
|
257 |
+
if ( isset( $_POST['blc_update_widget_nonce'] ) ) :
|
258 |
+
|
259 |
+
// Ignore sanitization field for nonce.
|
260 |
+
$nonce = sanitize_text_field( wp_unslash( $_POST['blc_update_widget_nonce'] ) );
|
261 |
+
|
262 |
+
if ( wp_verify_nonce( $nonce, 'blc_update_widget' ) && isset( $_SERVER['REQUEST_METHOD'] ) && 'POST' === $_SERVER['REQUEST_METHOD'] && isset( $_POST['widget_id'] ) && 'blc_dashboard_widget' === $_POST['widget_id'] ) {
|
263 |
+
|
264 |
+
// It appears $form_inputs isn't used in the current WP version, so lets just use $_POST.
|
265 |
+
$this->conf->options['autoexpand_widget'] = ! empty( $_POST['blc-autoexpand'] );
|
266 |
+
$this->conf->save_options();
|
267 |
+
}
|
268 |
+
endif;
|
269 |
|
270 |
?>
|
271 |
<p><label for="blc-autoexpand">
|
274 |
if ( $this->conf->options['autoexpand_widget'] ) {
|
275 |
echo 'checked="checked"';}
|
276 |
?>
|
277 |
+
/>
|
278 |
+
<?php esc_html_e( 'Automatically expand the widget if broken links have been detected', 'broken-link-checker' ); ?>
|
279 |
</label></p>
|
280 |
<?php
|
|
|
281 |
|
282 |
+
wp_nonce_field( 'blc_update_widget', 'blc_update_widget_nonce' );
|
|
|
|
|
283 |
}
|
284 |
|
285 |
+
/**
|
286 |
+
* Enqueue settings script.
|
287 |
+
*/
|
288 |
+
public function enqueue_settings_scripts() {
|
289 |
+
// jQuery UI is used on the settings page.
|
290 |
+
wp_enqueue_script( 'jquery-ui-core' ); // Used for background color animation.
|
291 |
wp_enqueue_script( 'jquery-ui-dialog' );
|
292 |
wp_enqueue_script( 'jquery-ui-tabs' );
|
293 |
+
wp_enqueue_script( 'jquery-cookie', plugins_url( 'js/jquery.cookie.js', BLC_PLUGIN_FILE ), array(), '1.0.0', false ); // Used for storing last widget states, etc.
|
294 |
}
|
295 |
|
296 |
+
/**
|
297 |
+
* Enqueue linkpage script.
|
298 |
+
*/
|
299 |
+
public function enqueue_link_page_scripts() {
|
300 |
wp_enqueue_script( 'jquery-ui-core' );
|
301 |
+
wp_enqueue_script( 'jquery-ui-dialog' ); // Used for the search form.
|
302 |
+
wp_enqueue_script( 'jquery-color' ); // Used for background color animation.
|
303 |
+
wp_enqueue_script( 'sprintf', plugins_url( 'js/sprintf.js', BLC_PLUGIN_FILE ), array(), '1.0.0', false ); // Used in error messages.
|
304 |
}
|
305 |
|
306 |
/**
|
308 |
*
|
309 |
* @return void
|
310 |
*/
|
311 |
+
public function initiate_recheck() {
|
312 |
+
global $wpdb; // wpdb.
|
313 |
|
314 |
+
// Delete all discovered instances.
|
315 |
+
$wpdb->query( "TRUNCATE {$wpdb->prefix}blc_instances" ); //phpcs:ignore
|
316 |
|
317 |
+
// Delete all discovered links.
|
318 |
+
$wpdb->query( "TRUNCATE {$wpdb->prefix}blc_links" ); //phpcs:ignore
|
319 |
|
320 |
+
// Mark all posts, custom fields and bookmarks for processing.
|
321 |
blc_resynch( true );
|
322 |
}
|
323 |
|
326 |
*
|
327 |
* @return void
|
328 |
*/
|
329 |
+
public function deactivation() {
|
330 |
+
// Remove our Cron events.
|
331 |
wp_clear_scheduled_hook( 'blc_cron_check_links' );
|
332 |
wp_clear_scheduled_hook( 'blc_cron_email_notifications' );
|
333 |
wp_clear_scheduled_hook( 'blc_cron_database_maintenance' );
|
334 |
+
wp_clear_scheduled_hook( 'blc_corn_clear_log_file' );
|
335 |
+
wp_clear_scheduled_hook( 'blc_cron_check_news' ); // Unused event.
|
336 |
+
// Note the deactivation time for each module. This will help them
|
337 |
+
// synch up propely if/when the plugin is reactivated.
|
338 |
$moduleManager = blcModuleManager::getInstance();
|
339 |
$the_time = current_time( 'timestamp' );
|
340 |
foreach ( $moduleManager->get_active_modules() as $module_id => $module ) {
|
351 |
*
|
352 |
* @return void
|
353 |
*/
|
354 |
+
public function database_maintenance() {
|
355 |
blcContainerHelper::cleanup_containers();
|
356 |
blc_cleanup_instances();
|
357 |
blc_cleanup_links();
|
365 |
*
|
366 |
* @return void
|
367 |
*/
|
368 |
+
public function admin_menu() {
|
369 |
if ( current_user_can( 'manage_options' ) ) {
|
370 |
add_filter( 'plugin_action_links', array( $this, 'plugin_action_links' ), 10, 2 );
|
371 |
}
|
380 |
|
381 |
$menu_title = __( 'Broken Links', 'broken-link-checker' );
|
382 |
if ( $this->conf->options['show_link_count_bubble'] ) {
|
383 |
+
// To make it easier to notice when broken links appear, display the current number of
|
384 |
+
// broken links in a little bubble notification in the "Broken Links" menu.
|
385 |
+
// (Similar to how the number of plugin updates and unmoderated comments is displayed).
|
386 |
$blc_link_query = blcLinkQuery::getInstance();
|
387 |
$broken_links = $blc_link_query->get_filter_links( 'broken', array( 'count_only' => true ) );
|
388 |
if ( $broken_links > 0 ) {
|
389 |
+
// TODO: Appropriating existing CSS classes for my own purposes is hacky. Fix eventually.
|
390 |
$menu_title .= sprintf(
|
391 |
' <span class="update-plugins"><span class="update-count blc-menu-bubble">%d</span></span>',
|
392 |
$broken_links
|
401 |
array( $this, 'links_page' )
|
402 |
);
|
403 |
|
404 |
+
// Add plugin-specific scripts and CSS only to the it's own pages.
|
405 |
add_action( 'admin_print_styles-' . $options_page_hook, array( $this, 'options_page_css' ) );
|
406 |
add_action( 'admin_print_styles-' . $links_page_hook, array( $this, 'links_page_css' ) );
|
407 |
add_action( 'admin_print_scripts-' . $options_page_hook, array( $this, 'enqueue_settings_scripts' ) );
|
408 |
add_action( 'admin_print_scripts-' . $links_page_hook, array( $this, 'enqueue_link_page_scripts' ) );
|
409 |
|
410 |
+
// Make the Settings page link to the link list.
|
411 |
add_screen_meta_link(
|
412 |
'blc-links-page-link',
|
413 |
__( 'Go to Broken Links', 'broken-link-checker' ),
|
418 |
}
|
419 |
|
420 |
/**
|
421 |
+
* Function plugin_action_links()
|
422 |
* Handler for the 'plugin_action_links' hook. Adds a "Settings" link to this plugin's entry
|
423 |
* on the plugin list.
|
424 |
*
|
426 |
* @param string $file
|
427 |
* @return array
|
428 |
*/
|
429 |
+
public function plugin_action_links( $links, $file ) {
|
430 |
+
if ( $file === $this->my_basename ) {
|
431 |
$links[] = "<a href='options-general.php?page=link-checker-settings'>" . __( 'Settings' ) . '</a>';
|
432 |
}
|
433 |
return $links;
|
434 |
}
|
435 |
|
436 |
+
/**
|
437 |
+
* Function to show options page
|
438 |
+
*/
|
439 |
+
public function options_page() {
|
440 |
$moduleManager = blcModuleManager::getInstance();
|
441 |
|
442 |
+
// Prior to 1.5.2 (released 2012-05-27), there was a bug that would cause the donation flag to be
|
443 |
+
// set incorrectly. So we'll unset the flag in that case.
|
444 |
$reset_donation_flag = ( $this->conf->get( 'first_installation_timestamp', 0 ) < strtotime( '2012-05-27 00:00' ) ) && ! $this->conf->get( 'donation_flag_fixed', false );
|
445 |
|
446 |
if ( $reset_donation_flag ) {
|
452 |
if ( isset( $_POST['recheck'] ) && ! empty( $_POST['recheck'] ) ) {
|
453 |
$this->initiate_recheck();
|
454 |
|
455 |
+
// Redirect back to the settings page.
|
456 |
$base_url = remove_query_arg( array( '_wpnonce', 'noheader', 'updated', 'error', 'action', 'message' ) );
|
457 |
wp_redirect(
|
458 |
add_query_arg(
|
479 |
|
480 |
$cleanPost = $_POST;
|
481 |
if ( function_exists( 'wp_magic_quotes' ) ) {
|
482 |
+
$cleanPost = stripslashes_deep( $cleanPost ); // Ceterum censeo, WP shouldn't mangle superglobals.
|
483 |
}
|
484 |
|
485 |
+
// Activate/deactivate modules.
|
486 |
if ( ! empty( $_POST['module'] ) ) {
|
487 |
$active = array_keys( $_POST['module'] );
|
488 |
$moduleManager->set_active_modules( $active );
|
489 |
}
|
490 |
|
491 |
+
// Only post statuses that actually exist can be selected.
|
492 |
if ( isset( $_POST['enabled_post_statuses'] ) && is_array( $_POST['enabled_post_statuses'] ) ) {
|
493 |
$available_statuses = get_post_stati();
|
494 |
$enabled_post_statuses = array_intersect( $_POST['enabled_post_statuses'], $available_statuses );
|
564 |
$acf_fields_diff2 = array_diff( $this->conf->options['acf_fields'], $new_acf_fields );
|
565 |
$this->conf->options['acf_fields'] = $new_acf_fields;
|
566 |
|
567 |
+
//Turning off warnings turns existing warnings into "broken" links.
|
568 |
+
$this->conf->options['blc_post_modified'] = ! empty( $_POST['blc_post_modified'] );
|
569 |
+
|
570 |
//Turning off warnings turns existing warnings into "broken" links.
|
571 |
$warnings_enabled = ! empty( $_POST['warnings_enabled'] );
|
572 |
if ( $this->conf->get( 'warnings_enabled' ) && ! $warnings_enabled ) {
|
645 |
|
646 |
if ( $this->conf->options['logging_enabled'] ) {
|
647 |
if ( $this->conf->options['custom_log_file_enabled'] ) {
|
648 |
+
|
649 |
$log_file = strval( $cleanPost['log_file'] );
|
650 |
+
if ( ! file_exists( $log_file ) ) {
|
651 |
+
if ( ! file_exists( dirname( $log_file ) ) ) {
|
652 |
+
mkdir( dirname( $log_file ), 0750, true );
|
653 |
+
}
|
654 |
+
// Attempt to create the log file if not already there.
|
655 |
+
if ( ! is_file( $log_file ) ) {
|
656 |
+
//Add a .htaccess to hide the log file from site visitors.
|
657 |
+
file_put_contents( dirname( $log_file ) . '/.htaccess', 'Deny from all' );
|
658 |
+
file_put_contents( $log_file, '' );
|
659 |
+
}
|
660 |
+
}
|
661 |
+
//revert to default
|
662 |
+
if ( ! is_writable( $log_file ) || ! is_file( $log_file ) ) {
|
663 |
+
$this->conf->options['custom_log_file_enabled'] = '';
|
664 |
+
$log_directory = self::get_default_log_directory();
|
665 |
+
$log_file = $log_directory . '/' . self::get_default_log_basename();
|
666 |
+
}
|
667 |
} else {
|
668 |
//Default log file is /wp-content/uploads/broken-link-checker/blc-log.txt
|
669 |
$log_directory = self::get_default_log_directory();
|
679 |
}
|
680 |
|
681 |
$this->conf->options['log_file'] = $log_file;
|
682 |
+
$this->conf->options['clear_log_on'] = strval( $cleanPost['clear_log_on'] );
|
683 |
|
684 |
+
// Attempt to create the log file if not already there.
|
685 |
if ( ! is_file( $log_file ) ) {
|
686 |
file_put_contents( $log_file, '' );
|
687 |
}
|
1106 |
</td>
|
1107 |
</tr>
|
1108 |
|
1109 |
+
<tr valign="top">
|
1110 |
+
<th scope="row"><?php echo esc_html__( 'Post Modified Date', 'broken-link-checker' ); ?></th>
|
1111 |
+
<td>
|
1112 |
+
<label>
|
1113 |
+
<input type="checkbox" name="blc_post_modified" id="blc_post_modified"
|
1114 |
+
<?php checked( $this->conf->options['blc_post_modified'] ); ?>/>
|
1115 |
+
<?php esc_html_e( 'Disable post modified date change when link is edited', 'broken-link-checker' ); ?>
|
1116 |
+
</label>
|
1117 |
+
</td>
|
1118 |
+
</tr>
|
1119 |
+
|
1120 |
</table>
|
1121 |
|
1122 |
</div>
|
1426 |
<th scope="row"><?php _e( 'Log file location', 'broken-link-checker' ); ?></th>
|
1427 |
<td>
|
1428 |
|
1429 |
+
<div class="blc-logging-options">
|
1430 |
|
1431 |
<p>
|
1432 |
<label>
|
1457 |
</div>
|
1458 |
</td>
|
1459 |
</tr>
|
1460 |
+
<tr valign="top">
|
1461 |
+
<th scope="row"><?php _e( 'Log file clear schedule', 'broken-link-checker' ); ?></th>
|
1462 |
+
<td>
|
1463 |
+
<div class="blc-logging-options">
|
1464 |
+
<p>
|
1465 |
+
<?php $schedules = wp_get_schedules(); ?>
|
1466 |
+
<select name="clear_log_on">
|
1467 |
+
<option value=""> <?php esc_html_e( 'Never', 'wpmudev' ); ?></option>
|
1468 |
+
<?php
|
1469 |
+
foreach ( $schedules as $key => $schedule ) {
|
1470 |
+
$selected = selected(
|
1471 |
+
$this->conf->options['clear_log_on'],
|
1472 |
+
$key,
|
1473 |
+
false
|
1474 |
+
);
|
1475 |
+
?>
|
1476 |
+
<option <?php echo $selected; ?>value="<?php echo esc_attr( $key ); ?>"> <?php echo esc_html( $schedule['display'] ); ?></option>
|
1477 |
+
<?php
|
1478 |
+
}
|
1479 |
+
?>
|
1480 |
|
1481 |
+
</select>
|
1482 |
+
</p>
|
1483 |
+
</div>
|
1484 |
+
</td>
|
1485 |
+
</tr>
|
1486 |
|
1487 |
<tr valign="top">
|
1488 |
<th scope="row"><?php _e( 'Forced recheck', 'broken-link-checker' ); ?></th>
|
3744 |
$debug[ __( 'CURL version', 'broken-link-checker' ) ] = $data;
|
3745 |
|
3746 |
//Snoopy presence
|
3747 |
+
if ( class_exists( 'WP_Http' ) || file_exists( ABSPATH . WPINC . '/class-http.php' ) ) {
|
3748 |
$data = array(
|
3749 |
'state' => 'ok',
|
3750 |
'value' => __( 'Installed', 'broken-link-checker' ),
|
3901 |
function maybe_send_email_notifications() {
|
3902 |
global $wpdb; /** @var wpdb $wpdb */
|
3903 |
|
3904 |
+
// email notificaiton.
|
3905 |
+
$send_notification = apply_filters( 'blc_allow_send_email_notification', $this->conf->options['send_email_notifications'] );
|
3906 |
+
|
3907 |
+
$send_authors_notifications = apply_filters( 'blc_allow_send_author_email_notification', $this->conf->options['send_authors_email_notifications'] );
|
3908 |
+
|
3909 |
+
if ( ! ( $send_notification || $send_authors_notifications ) ) {
|
3910 |
return;
|
3911 |
}
|
3912 |
|
4149 |
if ( ! wp_next_scheduled( 'blc_cron_database_maintenance' ) ) {
|
4150 |
wp_schedule_event( time(), 'daily', 'blc_cron_database_maintenance' );
|
4151 |
}
|
4152 |
+
|
4153 |
+
$clear_log = $this->conf->options['clear_log_on'];
|
4154 |
+
if ( ! wp_next_scheduled( 'blc_corn_clear_log_file' ) && ! empty( $clear_log ) ) {
|
4155 |
+
wp_schedule_event( time(), $clear_log, 'blc_corn_clear_log_file' );
|
4156 |
+
}
|
4157 |
+
|
4158 |
+
if ( empty( $clear_log ) ) {
|
4159 |
+
wp_clear_scheduled_hook( 'blc_corn_clear_log_file' );
|
4160 |
+
}
|
4161 |
+
}
|
4162 |
+
|
4163 |
+
/**
|
4164 |
+
* Clear blc log file
|
4165 |
+
* @return void
|
4166 |
+
*/
|
4167 |
+
function clear_log_file() {
|
4168 |
+
$log_file = $this->conf->options['log_file'];
|
4169 |
+
|
4170 |
+
//clear log file
|
4171 |
+
if ( is_writable( $log_file ) && is_file( $log_file ) ) {
|
4172 |
+
$handle = fopen( $log_file, 'w' );
|
4173 |
+
fclose( $handle );
|
4174 |
+
}
|
4175 |
+
}
|
4176 |
+
|
4177 |
+
/**
|
4178 |
+
* Don't update the last updated date of a post
|
4179 |
+
*
|
4180 |
+
* @param array $data An array of slashed post data.
|
4181 |
+
* @param array $postarr An array of sanitized, but otherwise unmodified post data.
|
4182 |
+
* @return array $data Resulting array of slashed post data.
|
4183 |
+
*/
|
4184 |
+
public function disable_post_date_update( $data, $postarr ) {
|
4185 |
+
|
4186 |
+
$last_modified = isset( $postarr['blc_post_modified'] ) ? $postarr['blc_post_modified'] : '';
|
4187 |
+
|
4188 |
+
$last_modified_gmt = isset( $postarr['blc_post_modified_gmt'] ) ? $postarr['blc_post_modified_gmt'] : '';
|
4189 |
+
|
4190 |
+
|
4191 |
+
// if is not enabled bail!
|
4192 |
+
if( ! $this->conf->options['blc_post_modified'] ) {
|
4193 |
+
return $data;
|
4194 |
+
}
|
4195 |
+
|
4196 |
+
|
4197 |
+
// only restore the post modified for BLC links
|
4198 |
+
if( empty( $last_modified ) || empty( $last_modified_gmt ) ) {
|
4199 |
+
return $data;
|
4200 |
+
}
|
4201 |
+
|
4202 |
+
// modify the post modified date.
|
4203 |
+
$data['post_modified'] = $last_modified;
|
4204 |
+
|
4205 |
+
// modify the post modified gmt
|
4206 |
+
$data['post_modified_gmt'] = $last_modified_gmt;
|
4207 |
+
|
4208 |
+
return $data;
|
4209 |
}
|
4210 |
|
4211 |
+
|
4212 |
+
|
4213 |
/**
|
4214 |
* Load the plugin's textdomain.
|
4215 |
*
|
core/init.php
CHANGED
@@ -42,7 +42,7 @@ if ( defined( 'BLC_ACTIVE' ) ) {
|
|
42 |
define( 'BLC_FOR_EDITING', 'edit' );
|
43 |
define( 'BLC_FOR_PARSING', 'parse' );
|
44 |
define( 'BLC_FOR_DISPLAY', 'display' );
|
45 |
-
define( 'BLC_DATABASE_VERSION',
|
46 |
|
47 |
/***********************************************
|
48 |
Configuration
|
@@ -96,6 +96,8 @@ if ( defined( 'BLC_ACTIVE' ) ) {
|
|
96 |
'failure_duration_threshold' => 3, // (days) Assume a link is permanently broken if it still hasn't recovered after this many days.
|
97 |
'logging_enabled' => false,
|
98 |
'log_file' => '',
|
|
|
|
|
99 |
'custom_log_file_enabled' => false,
|
100 |
'installation_complete' => false,
|
101 |
'installation_flag_cleared_on' => 0,
|
@@ -104,6 +106,7 @@ if ( defined( 'BLC_ACTIVE' ) ) {
|
|
104 |
'donation_flag_fixed' => false,
|
105 |
'show_link_actions' => array( 'blc-deredirect-action' => false ), //Visible link actions.
|
106 |
'youtube_api_key' => '',
|
|
|
107 |
)
|
108 |
);
|
109 |
|
@@ -256,12 +259,7 @@ if ( defined( 'BLC_ACTIVE' ) ) {
|
|
256 |
Main functionality
|
257 |
************************************************/
|
258 |
|
259 |
-
|
260 |
-
function blc_activation_hook() {
|
261 |
-
require BLC_DIRECTORY . '/includes/activation.php';
|
262 |
-
}
|
263 |
-
|
264 |
-
register_activation_hook( BLC_PLUGIN_FILE, 'blc_activation_hook' );
|
265 |
|
266 |
//Load the plugin if installed successfully
|
267 |
if ( $blc_config_manager->options['installation_complete'] ) {
|
@@ -325,11 +323,6 @@ if ( defined( 'BLC_ACTIVE' ) ) {
|
|
325 |
'<strong>' . __( 'Broken Link Checker installation failed. Try deactivating and then reactivating the plugin.', 'broken-link-checker' ) . '</strong>',
|
326 |
);
|
327 |
|
328 |
-
if ( is_multisite() && is_plugin_active_for_network( plugin_basename( BLC_PLUGIN_FILE ) ) ) {
|
329 |
-
$messages[] = __( 'Please activate the plugin separately on each site. Network activation is not supported.', 'broken-link-checker' );
|
330 |
-
$messages[] = '';
|
331 |
-
}
|
332 |
-
|
333 |
if ( ! $blc_config_manager->db_option_loaded ) {
|
334 |
$messages[] = sprintf(
|
335 |
'<strong>Failed to load plugin settings from the "%s" option.</strong>',
|
42 |
define( 'BLC_FOR_EDITING', 'edit' );
|
43 |
define( 'BLC_FOR_PARSING', 'parse' );
|
44 |
define( 'BLC_FOR_DISPLAY', 'display' );
|
45 |
+
define( 'BLC_DATABASE_VERSION', 16 );
|
46 |
|
47 |
/***********************************************
|
48 |
Configuration
|
96 |
'failure_duration_threshold' => 3, // (days) Assume a link is permanently broken if it still hasn't recovered after this many days.
|
97 |
'logging_enabled' => false,
|
98 |
'log_file' => '',
|
99 |
+
'incorrect_path' => false,
|
100 |
+
'clear_log_on' => '',
|
101 |
'custom_log_file_enabled' => false,
|
102 |
'installation_complete' => false,
|
103 |
'installation_flag_cleared_on' => 0,
|
106 |
'donation_flag_fixed' => false,
|
107 |
'show_link_actions' => array( 'blc-deredirect-action' => false ), //Visible link actions.
|
108 |
'youtube_api_key' => '',
|
109 |
+
'blc_post_modified' => '',
|
110 |
)
|
111 |
);
|
112 |
|
259 |
Main functionality
|
260 |
************************************************/
|
261 |
|
262 |
+
require BLC_DIRECTORY . '/includes/activation.php';
|
|
|
|
|
|
|
|
|
|
|
263 |
|
264 |
//Load the plugin if installed successfully
|
265 |
if ( $blc_config_manager->options['installation_complete'] ) {
|
323 |
'<strong>' . __( 'Broken Link Checker installation failed. Try deactivating and then reactivating the plugin.', 'broken-link-checker' ) . '</strong>',
|
324 |
);
|
325 |
|
|
|
|
|
|
|
|
|
|
|
326 |
if ( ! $blc_config_manager->db_option_loaded ) {
|
327 |
$messages[] = sprintf(
|
328 |
'<strong>Failed to load plugin settings from the "%s" option.</strong>',
|
css/links-page.css
CHANGED
@@ -29,11 +29,11 @@ th.column-status {
|
|
29 |
}
|
30 |
|
31 |
th.column-new-link-text {
|
32 |
-
|
33 |
}
|
34 |
|
35 |
th.column-used-in {
|
36 |
-
|
37 |
}
|
38 |
|
39 |
th.column-source {
|
@@ -62,7 +62,7 @@ th.column-instance-count {
|
|
62 |
|
63 |
/* Cells */
|
64 |
|
65 |
-
td.column-new-url,
|
66 |
td.column-used-in
|
67 |
{
|
68 |
/*
|
@@ -106,8 +106,8 @@ table.mini-status {
|
|
106 |
background-color: #E2E2E2;
|
107 |
}
|
108 |
|
109 |
-
.blc-permanently-broken {
|
110 |
-
|
111 |
}
|
112 |
|
113 |
.blc-permanently-broken-hl {
|
@@ -199,7 +199,7 @@ td.column-status {
|
|
199 |
|
200 |
.compact .link-last-checked,
|
201 |
.compact .link-broken-for,
|
202 |
-
.compact .link-text
|
203 |
{
|
204 |
display: none;
|
205 |
}
|
@@ -219,7 +219,7 @@ td.column-status {
|
|
219 |
padding-left: 16px;
|
220 |
overflow: hidden;
|
221 |
|
222 |
-
background-image: none;
|
223 |
background-position: left center;
|
224 |
background-repeat: no-repeat;
|
225 |
}
|
@@ -258,7 +258,7 @@ img.waiting {
|
|
258 |
}
|
259 |
|
260 |
td.column-link-text, td.column-new-link-text {
|
261 |
-
cursor: pointer;
|
262 |
}
|
263 |
|
264 |
.blc-small-image {
|
@@ -409,7 +409,7 @@ ul.blc-suggestion-list li {
|
|
409 |
background : white !important;
|
410 |
border: 3px solid #EEEEEE;
|
411 |
padding: 12px;
|
412 |
-
|
413 |
border-radius: 6px;
|
414 |
-moz-border-radius: 6px;
|
415 |
-webkit-border-radius: 6px;
|
@@ -449,7 +449,7 @@ ul.blc-suggestion-list li {
|
|
449 |
#blc-search-button-row input {
|
450 |
margin-left: 8px;
|
451 |
margin-right: 8px;
|
452 |
-
margin-top: 8px;
|
453 |
}
|
454 |
|
455 |
.blc-inline-form {
|
@@ -502,4 +502,8 @@ div.search-box{
|
|
502 |
table#blc-links {
|
503 |
table-layout: auto;
|
504 |
}
|
|
|
|
|
|
|
|
|
505 |
}
|
29 |
}
|
30 |
|
31 |
th.column-new-link-text {
|
32 |
+
|
33 |
}
|
34 |
|
35 |
th.column-used-in {
|
36 |
+
|
37 |
}
|
38 |
|
39 |
th.column-source {
|
62 |
|
63 |
/* Cells */
|
64 |
|
65 |
+
td.column-new-url,
|
66 |
td.column-used-in
|
67 |
{
|
68 |
/*
|
106 |
background-color: #E2E2E2;
|
107 |
}
|
108 |
|
109 |
+
.blc-permanently-broken {
|
110 |
+
|
111 |
}
|
112 |
|
113 |
.blc-permanently-broken-hl {
|
199 |
|
200 |
.compact .link-last-checked,
|
201 |
.compact .link-broken-for,
|
202 |
+
.compact .link-text
|
203 |
{
|
204 |
display: none;
|
205 |
}
|
219 |
padding-left: 16px;
|
220 |
overflow: hidden;
|
221 |
|
222 |
+
background-image: none;
|
223 |
background-position: left center;
|
224 |
background-repeat: no-repeat;
|
225 |
}
|
258 |
}
|
259 |
|
260 |
td.column-link-text, td.column-new-link-text {
|
261 |
+
cursor: pointer;
|
262 |
}
|
263 |
|
264 |
.blc-small-image {
|
409 |
background : white !important;
|
410 |
border: 3px solid #EEEEEE;
|
411 |
padding: 12px;
|
412 |
+
|
413 |
border-radius: 6px;
|
414 |
-moz-border-radius: 6px;
|
415 |
-webkit-border-radius: 6px;
|
449 |
#blc-search-button-row input {
|
450 |
margin-left: 8px;
|
451 |
margin-right: 8px;
|
452 |
+
margin-top: 8px;
|
453 |
}
|
454 |
|
455 |
.blc-inline-form {
|
502 |
table#blc-links {
|
503 |
table-layout: auto;
|
504 |
}
|
505 |
+
}
|
506 |
+
th#cb {
|
507 |
+
vertical-align: middle;
|
508 |
+
padding: 6px 0 3px;
|
509 |
}
|
includes/activation.php
CHANGED
@@ -1,5 +1,9 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
3 |
global $blclog, $blc_config_manager, $wpdb;
|
4 |
$queryCnt = $wpdb->num_queries;
|
5 |
|
@@ -116,3 +120,5 @@ $blclog->info(
|
|
116 |
$blclog->info( sprintf( 'Total time: %.3f seconds', microtime( true ) - $activation_start ) );
|
117 |
$blclog->save();
|
118 |
|
|
|
|
1 |
<?php
|
2 |
|
3 |
+
if ( get_option( 'blc_activation_enabled' ) ) {
|
4 |
+
return;
|
5 |
+
}
|
6 |
+
|
7 |
global $blclog, $blc_config_manager, $wpdb;
|
8 |
$queryCnt = $wpdb->num_queries;
|
9 |
|
120 |
$blclog->info( sprintf( 'Total time: %.3f seconds', microtime( true ) - $activation_start ) );
|
121 |
$blclog->save();
|
122 |
|
123 |
+
// for multisite support.
|
124 |
+
update_option( 'blc_activation_enabled', true );
|
includes/admin/db-upgrade.php
CHANGED
@@ -245,7 +245,6 @@ class blcTableDelta {
|
|
245 |
( $tablefield->Type != $definition['data_type'] ) ||
|
246 |
( $definition['collation'] && ( $tablefield->Collation != $definition['collation'] ) ) ||
|
247 |
( $definition['null_allowed'] && ( 'NO' == $tablefield->Null ) ) ||
|
248 |
-
( ! $definition['null_allowed'] && ( 'NO' == $tablefield->Null ) ) ||
|
249 |
( $tablefield->Default !== $definition['default'] );
|
250 |
|
251 |
// Add a query to change the column type
|
245 |
( $tablefield->Type != $definition['data_type'] ) ||
|
246 |
( $definition['collation'] && ( $tablefield->Collation != $definition['collation'] ) ) ||
|
247 |
( $definition['null_allowed'] && ( 'NO' == $tablefield->Null ) ) ||
|
|
|
248 |
( $tablefield->Default !== $definition['default'] );
|
249 |
|
250 |
// Add a query to change the column type
|
includes/admin/links-page-js.php
CHANGED
@@ -650,69 +650,74 @@ jQuery(function($){
|
|
650 |
$(".blc-unlink-button").click(function () {
|
651 |
var me = this;
|
652 |
var master = $(me).parents('.blc-row');
|
653 |
-
$(me).html('<?php echo esc_js( __( 'Wait...', 'broken-link-checker' ) ); ?>');
|
654 |
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
//
|
675 |
-
|
676 |
-
//Flash the main row green to indicate success, then hide it.
|
677 |
-
var oldColor = master.css('background-color');
|
678 |
-
master.animate({ backgroundColor: "#E0FFB3" }, 200).animate({ backgroundColor: oldColor }, 300, function(){
|
679 |
-
master.hide();
|
680 |
-
});
|
681 |
-
|
682 |
-
alterLinkCounter(-1);
|
683 |
-
|
684 |
-
return;
|
685 |
} else {
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
694 |
|
695 |
-
if ( data.
|
696 |
msg = msg + sprintf(
|
697 |
-
'<?php echo esc_js( __(
|
698 |
-
data.
|
699 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
700 |
}
|
701 |
-
} else {
|
702 |
-
msg = msg + '<?php echo esc_js( __( 'The plugin failed to remove the link.', 'broken-link-checker' ) ); ?>\n';
|
703 |
-
}
|
704 |
|
705 |
-
|
706 |
-
|
707 |
|
708 |
-
|
709 |
-
|
|
|
710 |
}
|
|
|
|
|
711 |
}
|
|
|
712 |
|
713 |
-
|
714 |
-
}
|
715 |
-
);
|
716 |
});
|
717 |
|
718 |
//--------------------------------------------
|
650 |
$(".blc-unlink-button").click(function () {
|
651 |
var me = this;
|
652 |
var master = $(me).parents('.blc-row');
|
|
|
653 |
|
654 |
+
var confirm_msg = "<?php echo esc_js( __( 'Are you sure you want to unlink and remove this link from all posts?', 'broken-link-checker' ) ); ?>";
|
655 |
+
|
656 |
+
if( confirm( confirm_msg ) ) {
|
657 |
+
//Find the link ID
|
658 |
+
var link_id = master.attr('id').split('-')[2];
|
659 |
+
$(me).html('<?php echo esc_js( __( 'Wait...', 'broken-link-checker' ) ); ?>');
|
660 |
+
|
661 |
+
$.post(
|
662 |
+
"<?php echo admin_url( 'admin-ajax.php' ); ?>",
|
663 |
+
{
|
664 |
+
'action' : 'blc_unlink',
|
665 |
+
'link_id' : link_id,
|
666 |
+
'_ajax_nonce' : '<?php echo esc_js( wp_create_nonce( 'blc_unlink' ) ); ?>'
|
667 |
+
},
|
668 |
+
function (data, textStatus){
|
669 |
+
eval('data = ' + data);
|
670 |
+
|
671 |
+
if ( data && (typeof(data['error']) != 'undefined') ){
|
672 |
+
//An internal error occurred before the link could be edited.
|
673 |
+
//data.error is an error message.
|
674 |
+
alert(data.error);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
675 |
} else {
|
676 |
+
if ( data.errors.length == 0 ){
|
677 |
+
//The link was successfully removed. Hide its details.
|
678 |
+
$('#link-details-'+link_id).hide();
|
679 |
+
//Flash the main row green to indicate success, then hide it.
|
680 |
+
var oldColor = master.css('background-color');
|
681 |
+
master.animate({ backgroundColor: "#E0FFB3" }, 200).animate({ backgroundColor: oldColor }, 300, function(){
|
682 |
+
master.hide();
|
683 |
+
});
|
684 |
+
|
685 |
+
alterLinkCounter(-1);
|
686 |
+
|
687 |
+
return;
|
688 |
+
} else {
|
689 |
+
//Build and display an error message.
|
690 |
+
var msg = '';
|
691 |
|
692 |
+
if ( data.cnt_okay > 0 ){
|
693 |
msg = msg + sprintf(
|
694 |
+
'<?php echo esc_js( __( '%d instances of the link were successfully unlinked.', 'broken-link-checker' ) ); ?>\n',
|
695 |
+
data.cnt_okay
|
696 |
);
|
697 |
+
|
698 |
+
if ( data.cnt_error > 0 ){
|
699 |
+
msg = msg + sprintf(
|
700 |
+
'<?php echo esc_js( __( "However, %d instances couldn't be removed.", 'broken-link-checker' ) ); ?>\n',
|
701 |
+
data.cnt_error
|
702 |
+
);
|
703 |
+
}
|
704 |
+
} else {
|
705 |
+
msg = msg + '<?php echo esc_js( __( 'The plugin failed to remove the link.', 'broken-link-checker' ) ); ?>\n';
|
706 |
}
|
|
|
|
|
|
|
707 |
|
708 |
+
msg = msg + '\n<?php echo esc_js( __( 'The following error(s) occured :', 'broken-link-checker' ) ); ?>\n* ';
|
709 |
+
msg = msg + data.errors.join('\n* ');
|
710 |
|
711 |
+
//Show the error message
|
712 |
+
alert(msg);
|
713 |
+
}
|
714 |
}
|
715 |
+
|
716 |
+
$(me).html('<?php echo esc_js( __( 'Unlink', 'broken-link-checker' ) ); ?>');
|
717 |
}
|
718 |
+
);
|
719 |
|
720 |
+
}
|
|
|
|
|
721 |
});
|
722 |
|
723 |
//--------------------------------------------
|
includes/admin/options-page-js.php
CHANGED
@@ -130,8 +130,8 @@ jQuery(function($){
|
|
130 |
|
131 |
//Enable/disable log-related options depending on whether "Enable logging" is on.
|
132 |
function blcToggleLogOptions() {
|
133 |
-
$('
|
134 |
-
.find('input')
|
135 |
.prop('disabled', ! $('#logging_enabled').is(':checked'));
|
136 |
}
|
137 |
|
130 |
|
131 |
//Enable/disable log-related options depending on whether "Enable logging" is on.
|
132 |
function blcToggleLogOptions() {
|
133 |
+
$('.blc-logging-options')
|
134 |
+
.find('input,select')
|
135 |
.prop('disabled', ! $('#logging_enabled').is(':checked'));
|
136 |
}
|
137 |
|
includes/any-post.php
CHANGED
@@ -242,42 +242,57 @@ class blcPostTypeOverlord {
|
|
242 |
$blclog->log( sprintf( '...... %d rows inserted in %.3f seconds', $wpdb->rows_affected, microtime( true ) - $start ) );
|
243 |
} else {
|
244 |
//Delete synch records corresponding to posts that no longer exist.
|
245 |
-
|
246 |
-
$
|
247 |
-
$
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
"'" . implode( "', '", $escaped_post_types ) . "'"
|
256 |
);
|
257 |
-
$wpdb->query( $q );
|
258 |
-
$elapsed = microtime( true ) - $start;
|
259 |
-
$blclog->debug( $q );
|
260 |
-
$blclog->log( sprintf( '...... %d rows deleted in %.3f seconds', $wpdb->rows_affected, $elapsed ) );
|
261 |
|
262 |
-
|
263 |
-
|
264 |
-
$start = microtime( true );
|
265 |
-
$q = "DELETE synch.*
|
266 |
-
FROM
|
267 |
-
{$wpdb->prefix}blc_synch AS synch
|
268 |
-
LEFT JOIN {$wpdb->posts} AS posts
|
269 |
-
ON (synch.container_id = posts.ID and synch.container_type = posts.post_type)
|
270 |
-
WHERE
|
271 |
-
posts.post_status NOT IN (%s)";
|
272 |
$q = sprintf(
|
273 |
$q,
|
274 |
-
"'" . implode( "', '", $
|
275 |
);
|
|
|
276 |
$wpdb->query( $q );
|
277 |
$elapsed = microtime( true ) - $start;
|
278 |
$blclog->debug( $q );
|
279 |
$blclog->log( sprintf( '...... %d rows deleted in %.3f seconds', $wpdb->rows_affected, $elapsed ) );
|
280 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
//Remove the 'synched' flag from all posts that have been updated
|
282 |
//since the last time they were parsed/synchronized.
|
283 |
$blclog->log( '...... Marking changed posts as unsynched' );
|
@@ -585,7 +600,10 @@ class blcAnyPostContainer extends blcContainer {
|
|
585 |
);
|
586 |
}
|
587 |
|
588 |
-
$
|
|
|
|
|
|
|
589 |
|
590 |
if ( is_wp_error( $post_id ) ) {
|
591 |
return $post_id;
|
@@ -603,7 +621,7 @@ class blcAnyPostContainer extends blcContainer {
|
|
603 |
/**
|
604 |
* Update the the links on pagebuilders
|
605 |
*
|
606 |
-
* @param $post_id Post ID of whose content to update
|
607 |
*/
|
608 |
function update_pagebuilders( $post_id ) {
|
609 |
|
@@ -716,8 +734,6 @@ class blcAnyPostContainer extends blcContainer {
|
|
716 |
}
|
717 |
}
|
718 |
|
719 |
-
|
720 |
-
|
721 |
/**
|
722 |
* Universal manager usable for most post types.
|
723 |
*
|
@@ -726,7 +742,7 @@ class blcAnyPostContainer extends blcContainer {
|
|
726 |
*/
|
727 |
class blcAnyPostContainerManager extends blcContainerManager {
|
728 |
var $container_class_name = 'blcAnyPostContainer';
|
729 |
-
var $fields = array( 'post_content' => 'html' );
|
730 |
|
731 |
function init() {
|
732 |
parent::init();
|
@@ -747,6 +763,7 @@ class blcAnyPostContainerManager extends blcContainerManager {
|
|
747 |
* @return array of blcPostContainer indexed by "container_type|container_id"
|
748 |
*/
|
749 |
function get_containers( $containers, $purpose = '', $load_wrapped_objects = false ) {
|
|
|
750 |
$containers = $this->make_containers( $containers );
|
751 |
|
752 |
//Preload post data if it is likely to be useful later
|
242 |
$blclog->log( sprintf( '...... %d rows inserted in %.3f seconds', $wpdb->rows_affected, microtime( true ) - $start ) );
|
243 |
} else {
|
244 |
//Delete synch records corresponding to posts that no longer exist.
|
245 |
+
//Also delete posts that don't have enabled post status
|
246 |
+
$blclog->log( '...... Deleting synch records for removed posts & post with invalid status' );
|
247 |
+
$start = microtime( true );
|
248 |
+
$all_posts_id = get_posts(
|
249 |
+
array(
|
250 |
+
'posts_per_page' => -1,
|
251 |
+
'fields' => 'ids',
|
252 |
+
'post_type' => $this->enabled_post_types,
|
253 |
+
'post_status' => $this->enabled_post_statuses,
|
254 |
+
)
|
|
|
255 |
);
|
|
|
|
|
|
|
|
|
256 |
|
257 |
+
$q = "DELETE synch.* FROM {$wpdb->prefix}blc_synch AS synch WHERE synch.container_id NOT IN (%s)";
|
258 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
$q = sprintf(
|
260 |
$q,
|
261 |
+
"'" . implode( "', '", $all_posts_id ) . "'"
|
262 |
);
|
263 |
+
|
264 |
$wpdb->query( $q );
|
265 |
$elapsed = microtime( true ) - $start;
|
266 |
$blclog->debug( $q );
|
267 |
$blclog->log( sprintf( '...... %d rows deleted in %.3f seconds', $wpdb->rows_affected, $elapsed ) );
|
268 |
|
269 |
+
// //Delete records where the post status is not one of the enabled statuses.
|
270 |
+
// $blclog->log( '...... Deleting synch records for posts that have a disallowed status' );
|
271 |
+
// $start = microtime( true );
|
272 |
+
// $all_posts_status = get_posts(
|
273 |
+
// array(
|
274 |
+
// 'posts_per_page' => -1,
|
275 |
+
// 'fields' => 'ids',
|
276 |
+
// 'post_type' => $this->enabled_post_types,
|
277 |
+
// 'post_status' => $this->enabled_post_statuses,
|
278 |
+
// )
|
279 |
+
// );
|
280 |
+
|
281 |
+
// $q = "DELETE synch.*
|
282 |
+
// FROM
|
283 |
+
// {$wpdb->prefix}blc_synch AS synch
|
284 |
+
// WHERE
|
285 |
+
// posts.post_status NOT IN (%s)";
|
286 |
+
// $q = sprintf(
|
287 |
+
// $q,
|
288 |
+
// "'" . implode( "', '", $escaped_post_statuses ) . "'",
|
289 |
+
// "'" . implode( "', '", wp_list_pluck( $all_posts, 'post_status' ) ) . "'",
|
290 |
+
// );
|
291 |
+
// $wpdb->query( $q );
|
292 |
+
// $elapsed = microtime( true ) - $start;
|
293 |
+
// $blclog->debug( $q );
|
294 |
+
// $blclog->log( sprintf( '...... %d rows deleted in %.3f seconds', $wpdb->rows_affected, $elapsed ) );
|
295 |
+
|
296 |
//Remove the 'synched' flag from all posts that have been updated
|
297 |
//since the last time they were parsed/synchronized.
|
298 |
$blclog->log( '...... Marking changed posts as unsynched' );
|
600 |
);
|
601 |
}
|
602 |
|
603 |
+
$post = $this->wrapped_object;
|
604 |
+
$post->blc_post_modified = $post->post_modified;
|
605 |
+
$post->blc_post_modified_gmt = $post->post_modified_gmt;
|
606 |
+
$post_id = wp_update_post( $post, true );
|
607 |
|
608 |
if ( is_wp_error( $post_id ) ) {
|
609 |
return $post_id;
|
621 |
/**
|
622 |
* Update the the links on pagebuilders
|
623 |
*
|
624 |
+
* @param int $post_id Post ID of whose content to update.
|
625 |
*/
|
626 |
function update_pagebuilders( $post_id ) {
|
627 |
|
734 |
}
|
735 |
}
|
736 |
|
|
|
|
|
737 |
/**
|
738 |
* Universal manager usable for most post types.
|
739 |
*
|
742 |
*/
|
743 |
class blcAnyPostContainerManager extends blcContainerManager {
|
744 |
var $container_class_name = 'blcAnyPostContainer';
|
745 |
+
var $fields = array( 'post_content' => 'html', 'post_excerpt' => 'html' );
|
746 |
|
747 |
function init() {
|
748 |
parent::init();
|
763 |
* @return array of blcPostContainer indexed by "container_type|container_id"
|
764 |
*/
|
765 |
function get_containers( $containers, $purpose = '', $load_wrapped_objects = false ) {
|
766 |
+
global $blclog;
|
767 |
$containers = $this->make_containers( $containers );
|
768 |
|
769 |
//Preload post data if it is likely to be useful later
|
includes/checkers.php
CHANGED
@@ -89,7 +89,6 @@ class blcCheckerHelper {
|
|
89 |
|
90 |
$manager = blcModuleManager::getInstance();
|
91 |
$active_checkers = $manager->get_active_by_category( 'checker' );
|
92 |
-
|
93 |
foreach ( $active_checkers as $module_id => $module_data ) {
|
94 |
//Try the URL pattern in the header first. If it doesn't match,
|
95 |
//we can avoid loading the module altogether.
|
89 |
|
90 |
$manager = blcModuleManager::getInstance();
|
91 |
$active_checkers = $manager->get_active_by_category( 'checker' );
|
|
|
92 |
foreach ( $active_checkers as $module_id => $module_data ) {
|
93 |
//Try the URL pattern in the header first. If it doesn't match,
|
94 |
//we can avoid loading the module altogether.
|
includes/links.php
CHANGED
@@ -283,6 +283,7 @@ if ( ! class_exists( 'blcLink' ) ) {
|
|
283 |
|
284 |
$results = array_merge( $defaults, $rez );
|
285 |
|
|
|
286 |
//Some HTTP errors can be treated as warnings.
|
287 |
$results = $this->decide_warning_state( $results );
|
288 |
|
283 |
|
284 |
$results = array_merge( $defaults, $rez );
|
285 |
|
286 |
+
|
287 |
//Some HTTP errors can be treated as warnings.
|
288 |
$results = $this->decide_warning_state( $results );
|
289 |
|
languages/broken-link-checker.pot
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
# Copyright (C) 2020 Broken Link Checker 1.11.
|
2 |
-
# This file is distributed under the same license as the Broken Link Checker 1.11.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Broken Link Checker 1.11.
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -13,810 +13,822 @@ msgstr ""
|
|
13 |
"X-Poedit-SourceCharset: UTF-8\n"
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
|
16 |
-
#: core/core.php:
|
17 |
msgid "Loading..."
|
18 |
msgstr ""
|
19 |
|
20 |
-
#: core/core.php:
|
21 |
msgid "[ Network error ]"
|
22 |
msgstr ""
|
23 |
|
24 |
-
#: core/core.php:
|
25 |
msgid "Automatically expand the widget if broken links have been detected"
|
26 |
msgstr ""
|
27 |
|
28 |
-
#: core/core.php:
|
29 |
msgid "Link Checker Settings"
|
30 |
msgstr ""
|
31 |
|
32 |
-
#: core/core.php:
|
33 |
msgid "Link Checker"
|
34 |
msgstr ""
|
35 |
|
36 |
-
#: core/core.php:
|
37 |
msgid "Broken Links"
|
38 |
msgstr ""
|
39 |
|
40 |
-
#: core/core.php:
|
41 |
msgid "View Broken Links"
|
42 |
msgstr ""
|
43 |
|
44 |
-
#: core/core.php:
|
45 |
msgid "Go to Broken Links"
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: core/core.php:
|
49 |
msgid "Settings"
|
50 |
msgstr ""
|
51 |
|
52 |
-
#: core/core.php:
|
53 |
msgid "Edit URL"
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: core/core.php:
|
57 |
msgid "Unlink"
|
58 |
msgstr ""
|
59 |
|
60 |
-
#: core/core.php:
|
61 |
msgid "Not broken"
|
62 |
msgstr ""
|
63 |
|
64 |
-
#: core/core.php:
|
65 |
msgid "Dismiss"
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: core/core.php:
|
69 |
msgid "Recheck"
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: core/core.php:
|
73 |
msgctxt "link action; replace one redirect with a direct link"
|
74 |
msgid "Fix redirect"
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: core/core.php:
|
78 |
msgid "Settings saved."
|
79 |
msgstr ""
|
80 |
|
81 |
-
#: core/core.php:
|
82 |
msgid "Thank you for your donation!"
|
83 |
msgstr ""
|
84 |
|
85 |
-
#: core/core.php:
|
86 |
msgid "Complete site recheck started."
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: core/core.php:
|
90 |
msgid "General"
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: core/core.php:
|
94 |
msgid "Look For Links In"
|
95 |
msgstr ""
|
96 |
|
97 |
-
#: core/core.php:
|
98 |
msgid "Which Links To Check"
|
99 |
msgstr ""
|
100 |
|
101 |
-
#: core/core.php:
|
102 |
msgid "Protocols & APIs"
|
103 |
msgstr ""
|
104 |
|
105 |
-
#: core/core.php:
|
106 |
msgid "Advanced"
|
107 |
msgstr ""
|
108 |
|
109 |
-
#: core/core.php:
|
110 |
msgid "Broken Link Checker Options"
|
111 |
msgstr ""
|
112 |
|
113 |
-
#: core/core.php:
|
114 |
msgid "Status"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: core/core.php:
|
118 |
msgid "Show debug info"
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: core/core.php:
|
122 |
msgid "Check each link"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: core/core.php:
|
126 |
msgid "Every %s hours"
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: core/core.php:
|
130 |
msgid "Existing links will be checked this often. New links will usually be checked ASAP."
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: core/core.php:
|
134 |
msgid "E-mail notifications"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: core/core.php:
|
138 |
msgid "Send me e-mail notifications about newly detected broken links"
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: core/core.php:
|
142 |
msgid "Send authors e-mail notifications about broken links in their posts"
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: core/core.php:
|
146 |
msgid "Notification e-mail address"
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: core/core.php:
|
150 |
msgid "Leave empty to use the e-mail address specified in Settings → General."
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: core/core.php:
|
154 |
msgid "Link tweaks"
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: core/core.php:
|
158 |
msgid "Apply custom formatting to broken links"
|
159 |
msgstr ""
|
160 |
|
161 |
-
#: core/core.php:
|
162 |
msgid "Edit CSS"
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: core/core.php:
|
166 |
msgid "Example : Lorem ipsum <a %s>broken link</a>, dolor sit amet."
|
167 |
msgstr ""
|
168 |
|
169 |
-
#: core/core.php:
|
170 |
msgid "Click \"Save Changes\" to update example output."
|
171 |
msgstr ""
|
172 |
|
173 |
-
#: core/core.php:
|
174 |
msgid "Apply custom formatting to removed links"
|
175 |
msgstr ""
|
176 |
|
177 |
-
#: core/core.php:
|
178 |
msgid "Example : Lorem ipsum <span %s>removed link</span>, dolor sit amet."
|
179 |
msgstr ""
|
180 |
|
181 |
-
#: core/core.php:
|
182 |
msgid "Stop search engines from following broken links"
|
183 |
msgstr ""
|
184 |
|
185 |
-
#: core/core.php:
|
186 |
msgctxt "\"Link tweaks\" settings"
|
187 |
msgid "These settings only apply to the content of posts, not comments or custom fields."
|
188 |
msgstr ""
|
189 |
|
190 |
-
#: core/core.php:
|
191 |
msgctxt "settings page"
|
192 |
msgid "Suggestions"
|
193 |
msgstr ""
|
194 |
|
195 |
-
#: core/core.php:
|
196 |
msgid "Suggest alternatives to broken links"
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: core/core.php:
|
200 |
msgctxt "settings page"
|
201 |
msgid "Warnings"
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: core/core.php:
|
205 |
msgid "Show uncertain or minor problems as \"warnings\" instead of \"broken\""
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: core/core.php:
|
209 |
msgid "Turning off this option will make the plugin report all problems as broken links."
|
210 |
msgstr ""
|
211 |
|
212 |
-
#: core/core.php:
|
213 |
msgid "YouTube API Key"
|
214 |
msgstr ""
|
215 |
|
216 |
-
#: core/core.php:
|
217 |
msgid "Use your own %1$sapi key%2$s for checking youtube links."
|
218 |
msgstr ""
|
219 |
|
220 |
-
#: core/core.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
msgid "Look for links in"
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: core/core.php:
|
225 |
msgid "Post statuses"
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: core/core.php:
|
229 |
msgid "Link types"
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: core/core.php:
|
233 |
msgid "Error : All link parsers missing!"
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: core/core.php:
|
237 |
msgid "Exclusion list"
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: core/core.php:
|
241 |
msgid "Don't check links where the URL contains any of these words (one per line) :"
|
242 |
msgstr ""
|
243 |
|
244 |
-
#: core/core.php:
|
245 |
msgid "Check links using"
|
246 |
msgstr ""
|
247 |
|
248 |
-
#: core/core.php:
|
249 |
msgid "Timeout"
|
250 |
msgstr ""
|
251 |
|
252 |
-
#: core/core.php:
|
253 |
msgid "%s seconds"
|
254 |
msgstr ""
|
255 |
|
256 |
-
#: core/core.php:
|
257 |
msgid "Links that take longer than this to load will be marked as broken."
|
258 |
msgstr ""
|
259 |
|
260 |
-
#: core/core.php:
|
261 |
msgid "Link monitor"
|
262 |
msgstr ""
|
263 |
|
264 |
-
#: core/core.php:
|
265 |
msgid "Run continuously while the Dashboard is open"
|
266 |
msgstr ""
|
267 |
|
268 |
-
#: core/core.php:
|
269 |
msgid "Run hourly in the background"
|
270 |
msgstr ""
|
271 |
|
272 |
-
#: core/core.php:
|
273 |
msgid "Show the dashboard widget for"
|
274 |
msgstr ""
|
275 |
|
276 |
-
#: core/core.php:
|
277 |
msgctxt "dashboard widget visibility"
|
278 |
msgid "Administrator"
|
279 |
msgstr ""
|
280 |
|
281 |
-
#: core/core.php:
|
282 |
msgctxt "dashboard widget visibility"
|
283 |
msgid "Editor and above"
|
284 |
msgstr ""
|
285 |
|
286 |
-
#: core/core.php:
|
287 |
msgctxt "dashboard widget visibility"
|
288 |
msgid "Nobody (disables the widget)"
|
289 |
msgstr ""
|
290 |
|
291 |
-
#: core/core.php:
|
292 |
msgctxt "settings page"
|
293 |
msgid "Show link actions"
|
294 |
msgstr ""
|
295 |
|
296 |
-
#: core/core.php:
|
297 |
msgid "Max. execution time"
|
298 |
msgstr ""
|
299 |
|
300 |
-
#: core/core.php:
|
301 |
msgid "The plugin works by periodically launching a background job that parses your posts for links, checks the discovered URLs, and performs other time-consuming tasks. Here you can set for how long, at most, the link monitor may run each time before stopping."
|
302 |
msgstr ""
|
303 |
|
304 |
-
#: core/core.php:
|
305 |
msgid "Server load limit"
|
306 |
msgstr ""
|
307 |
|
308 |
-
#: core/core.php:
|
309 |
msgid "Current load : %s"
|
310 |
msgstr ""
|
311 |
|
312 |
-
#: core/core.php:
|
313 |
msgid "Link checking will be suspended if the average <a href=\"%s\">server load</a> rises above this number. Leave this field blank to disable load limiting."
|
314 |
msgstr ""
|
315 |
|
316 |
-
#: core/core.php:
|
317 |
msgid "Not available"
|
318 |
msgstr ""
|
319 |
|
320 |
-
#: core/core.php:
|
321 |
msgid "Load limiting only works on Linux-like systems where <code>/proc/loadavg</code> is present and accessible."
|
322 |
msgstr ""
|
323 |
|
324 |
-
#: core/core.php:
|
325 |
msgid "Target resource usage"
|
326 |
msgstr ""
|
327 |
|
328 |
-
#: core/core.php:
|
329 |
msgid "Logging"
|
330 |
msgstr ""
|
331 |
|
332 |
-
#: core/core.php:
|
333 |
msgid "Enable logging"
|
334 |
msgstr ""
|
335 |
|
336 |
-
#: core/core.php:
|
337 |
msgid "Log file location"
|
338 |
msgstr ""
|
339 |
|
340 |
-
#: core/core.php:
|
341 |
msgctxt "log file location"
|
342 |
msgid "Default"
|
343 |
msgstr ""
|
344 |
|
345 |
-
#: core/core.php:
|
346 |
msgctxt "log file location"
|
347 |
msgid "Custom"
|
348 |
msgstr ""
|
349 |
|
350 |
-
#: core/core.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
351 |
msgid "Forced recheck"
|
352 |
msgstr ""
|
353 |
|
354 |
-
#: core/core.php:
|
355 |
msgid "Re-check all pages"
|
356 |
msgstr ""
|
357 |
|
358 |
-
#: core/core.php:
|
359 |
msgid "The \"Nuclear Option\". Click this button to make the plugin empty its link database and recheck the entire site from scratch."
|
360 |
msgstr ""
|
361 |
|
362 |
-
#: core/core.php:
|
363 |
msgid "Save Changes"
|
364 |
msgstr ""
|
365 |
|
366 |
-
#: core/core.php:
|
367 |
msgid "Configure"
|
368 |
msgstr ""
|
369 |
|
370 |
-
#: core/core.php:
|
371 |
msgid "Enter the names of custom fields you want to check (one per line). If a field contains HTML code, prefix its name with <code>html:</code>. For example, <code>html:field_name</code>."
|
372 |
msgstr ""
|
373 |
|
374 |
-
#: core/core.php:
|
375 |
msgid "Enter the keys of acf fields you want to check (one per line). If a field contains HTML code, prefix its name with <code>html:</code>. For example, <code>html:field_586a3eaa4091b</code>."
|
376 |
msgstr ""
|
377 |
|
378 |
-
#: core/core.php:
|
379 |
msgid "Database error : %s"
|
380 |
msgstr ""
|
381 |
|
382 |
-
#: core/core.php:
|
383 |
msgid "You must enter a filter name!"
|
384 |
msgstr ""
|
385 |
|
386 |
-
#: core/core.php:
|
387 |
msgid "Invalid search query."
|
388 |
msgstr ""
|
389 |
|
390 |
-
#: core/core.php:
|
391 |
msgid "Filter \"%s\" created"
|
392 |
msgstr ""
|
393 |
|
394 |
-
#: core/core.php:
|
395 |
msgid "Filter ID not specified."
|
396 |
msgstr ""
|
397 |
|
398 |
-
#: core/core.php:
|
399 |
msgid "Filter deleted"
|
400 |
msgstr ""
|
401 |
|
402 |
-
#: core/core.php:
|
403 |
msgid "Replaced %d redirect with a direct link"
|
404 |
msgid_plural "Replaced %d redirects with direct links"
|
405 |
msgstr[0] ""
|
406 |
msgstr[1] ""
|
407 |
|
408 |
-
#: core/core.php:
|
409 |
msgid "Failed to fix %d redirect"
|
410 |
msgid_plural "Failed to fix %d redirects"
|
411 |
msgstr[0] ""
|
412 |
msgstr[1] ""
|
413 |
|
414 |
-
#: core/core.php:
|
415 |
msgid "None of the selected links are redirects!"
|
416 |
msgstr ""
|
417 |
|
418 |
-
#: core/core.php:
|
419 |
msgid "%d link updated."
|
420 |
msgid_plural "%d links updated."
|
421 |
msgstr[0] ""
|
422 |
msgstr[1] ""
|
423 |
|
424 |
-
#: core/core.php:
|
425 |
msgid "Failed to update %d link."
|
426 |
msgid_plural "Failed to update %d links."
|
427 |
msgstr[0] ""
|
428 |
msgstr[1] ""
|
429 |
|
430 |
-
#: core/core.php:
|
431 |
msgid "%d link removed"
|
432 |
msgid_plural "%d links removed"
|
433 |
msgstr[0] ""
|
434 |
msgstr[1] ""
|
435 |
|
436 |
-
#: core/core.php:
|
437 |
msgid "Failed to remove %d link"
|
438 |
msgid_plural "Failed to remove %d links"
|
439 |
msgstr[0] ""
|
440 |
msgstr[1] ""
|
441 |
|
442 |
-
#: core/core.php:
|
443 |
msgid "%d item was skipped because it can't be moved to the Trash. You need to delete it manually."
|
444 |
msgid_plural "%d items were skipped because they can't be moved to the Trash. You need to delete them manually."
|
445 |
msgstr[0] ""
|
446 |
msgstr[1] ""
|
447 |
|
448 |
-
#: core/core.php:
|
449 |
msgid "Didn't find anything to delete!"
|
450 |
msgstr ""
|
451 |
|
452 |
-
#: core/core.php:
|
453 |
msgid "%d link scheduled for rechecking"
|
454 |
msgid_plural "%d links scheduled for rechecking"
|
455 |
msgstr[0] ""
|
456 |
msgstr[1] ""
|
457 |
|
458 |
-
#: core/core.php:
|
459 |
msgid "This link was manually marked as working by the user."
|
460 |
msgstr ""
|
461 |
|
462 |
-
#: core/core.php:
|
463 |
msgid "Couldn't modify link %d"
|
464 |
msgstr ""
|
465 |
|
466 |
-
#: core/core.php:
|
467 |
msgid "%d link marked as not broken"
|
468 |
msgid_plural "%d links marked as not broken"
|
469 |
msgstr[0] ""
|
470 |
msgstr[1] ""
|
471 |
|
472 |
-
#: core/core.php:
|
473 |
msgid "%d link dismissed"
|
474 |
msgid_plural "%d links dismissed"
|
475 |
msgstr[0] ""
|
476 |
msgstr[1] ""
|
477 |
|
478 |
-
#: core/core.php:
|
479 |
msgid "The \"Warnings\" page lists problems that are probably temporary or suspected to be false positives.<br> Warnings that persist for a long time will usually be reclassified as broken links."
|
480 |
msgstr ""
|
481 |
|
482 |
-
#: core/core.php:
|
483 |
msgctxt "admin notice under Tools - Broken links - Warnings"
|
484 |
msgid "Hide notice"
|
485 |
msgstr ""
|
486 |
|
487 |
-
#: core/core.php:
|
488 |
msgctxt "a link from the admin notice under Tools - Broken links - Warnings"
|
489 |
msgid "Change warning settings"
|
490 |
msgstr ""
|
491 |
|
492 |
-
#: core/core.php:
|
493 |
msgid "Table columns"
|
494 |
msgstr ""
|
495 |
|
496 |
-
#: core/core.php:
|
497 |
msgid "Show on screen"
|
498 |
msgstr ""
|
499 |
|
500 |
-
#: core/core.php:
|
501 |
msgid "links"
|
502 |
msgstr ""
|
503 |
|
504 |
-
#: core/core.php:
|
505 |
msgid "Apply"
|
506 |
msgstr ""
|
507 |
|
508 |
-
#: core/core.php:
|
509 |
msgid "Misc"
|
510 |
msgstr ""
|
511 |
|
512 |
-
#: core/core.php:
|
513 |
msgid "Highlight links broken for at least %s days"
|
514 |
msgstr ""
|
515 |
|
516 |
-
#: core/core.php:
|
517 |
msgid "Color-code status codes"
|
518 |
msgstr ""
|
519 |
|
520 |
-
#: core/core.php:
|
521 |
msgid "You're not allowed to do that!"
|
522 |
msgstr ""
|
523 |
|
524 |
-
#: core/core.php:
|
525 |
msgid "View broken links"
|
526 |
msgstr ""
|
527 |
|
528 |
-
#: core/core.php:
|
529 |
msgid "Found %d broken link"
|
530 |
msgid_plural "Found %d broken links"
|
531 |
msgstr[0] ""
|
532 |
msgstr[1] ""
|
533 |
|
534 |
-
#: core/core.php:
|
535 |
msgid "No broken links found."
|
536 |
msgstr ""
|
537 |
|
538 |
-
#: core/core.php:
|
539 |
msgid "%d URL in the work queue"
|
540 |
msgid_plural "%d URLs in the work queue"
|
541 |
msgstr[0] ""
|
542 |
msgstr[1] ""
|
543 |
|
544 |
-
#: core/core.php:
|
545 |
msgid "No URLs in the work queue."
|
546 |
msgstr ""
|
547 |
|
548 |
-
#: core/core.php:
|
549 |
msgctxt "for the \"Detected X unique URLs in Y links\" message"
|
550 |
msgid "%d unique URL"
|
551 |
msgid_plural "%d unique URLs"
|
552 |
msgstr[0] ""
|
553 |
msgstr[1] ""
|
554 |
|
555 |
-
#: core/core.php:
|
556 |
msgctxt "for the \"Detected X unique URLs in Y links\" message"
|
557 |
msgid "%d link"
|
558 |
msgid_plural "%d links"
|
559 |
msgstr[0] ""
|
560 |
msgstr[1] ""
|
561 |
|
562 |
-
#: core/core.php:
|
563 |
msgid "Detected %1$s in %2$s and still searching..."
|
564 |
msgstr ""
|
565 |
|
566 |
-
#: core/core.php:
|
567 |
msgid "Detected %1$s in %2$s."
|
568 |
msgstr ""
|
569 |
|
570 |
-
#: core/core.php:
|
571 |
msgid "Searching your blog for links..."
|
572 |
msgstr ""
|
573 |
|
574 |
-
#: core/core.php:
|
575 |
msgid "No links detected."
|
576 |
msgstr ""
|
577 |
|
578 |
-
#: core/core.php:
|
579 |
msgctxt "current load"
|
580 |
msgid "Unknown"
|
581 |
msgstr ""
|
582 |
|
583 |
-
#: core/core.php:
|
584 |
msgid "Oops, I can't find the link %d"
|
585 |
msgstr ""
|
586 |
|
587 |
-
#: core/core.php:
|
588 |
msgid "Oops, couldn't modify the link!"
|
589 |
msgstr ""
|
590 |
|
591 |
-
#: core/core.php:
|
592 |
msgid "Error : link_id not specified"
|
593 |
msgstr ""
|
594 |
|
595 |
-
#: core/core.php:
|
596 |
msgid "Error : link_id or new_url not specified"
|
597 |
msgstr ""
|
598 |
|
599 |
-
#: core/core.php:
|
600 |
msgid "Oops, the new URL is invalid!"
|
601 |
msgstr ""
|
602 |
|
603 |
-
#: core/core.php:
|
604 |
msgid "An unexpected error occurred!"
|
605 |
msgstr ""
|
606 |
|
607 |
-
#: core/core.php:
|
608 |
msgid "An unexpected error occured!"
|
609 |
msgstr ""
|
610 |
|
611 |
-
#: core/core.php:
|
612 |
msgid "You don't have sufficient privileges to access this information!"
|
613 |
msgstr ""
|
614 |
|
615 |
-
#: core/core.php:
|
616 |
msgid "Error : link ID not specified"
|
617 |
msgstr ""
|
618 |
|
619 |
-
#: core/core.php:
|
620 |
msgid "Failed to load link details (%s)"
|
621 |
msgstr ""
|
622 |
|
623 |
-
#: core/core.php:
|
624 |
msgid "Broken Link Checker"
|
625 |
msgstr ""
|
626 |
|
627 |
-
#: core/core.php:
|
628 |
msgid "You have an old version of CURL. Redirect detection may not work properly."
|
629 |
msgstr ""
|
630 |
|
631 |
-
#: core/core.php:
|
632 |
msgid "Not installed"
|
633 |
msgstr ""
|
634 |
|
635 |
-
#: core/core.php:
|
636 |
msgid "Installed"
|
637 |
msgstr ""
|
638 |
|
639 |
-
#: core/core.php:
|
640 |
msgid "You must have either CURL or Snoopy installed for the plugin to work!"
|
641 |
msgstr ""
|
642 |
|
643 |
-
#: core/core.php:
|
644 |
msgid "On"
|
645 |
msgstr ""
|
646 |
|
647 |
-
#: core/core.php:
|
648 |
msgid "Redirects may be detected as broken links when safe_mode is on."
|
649 |
msgstr ""
|
650 |
|
651 |
-
#: core/core.php:
|
652 |
msgid "Off"
|
653 |
msgstr ""
|
654 |
|
655 |
-
#: core/core.php:
|
656 |
msgid "On ( %s )"
|
657 |
msgstr ""
|
658 |
|
659 |
-
#: core/core.php:
|
660 |
msgid "Redirects may be detected as broken links when open_basedir is on."
|
661 |
msgstr ""
|
662 |
|
663 |
-
#: core/core.php:
|
664 |
msgid "If this value is zero even after several page reloads you have probably encountered a bug."
|
665 |
msgstr ""
|
666 |
|
667 |
-
#: core/core.php:
|
668 |
msgid "[%s] Broken links detected"
|
669 |
msgstr ""
|
670 |
|
671 |
-
#: core/core.php:
|
672 |
msgid "Broken Link Checker has detected %d new broken link on your site."
|
673 |
msgid_plural "Broken Link Checker has detected %d new broken links on your site."
|
674 |
msgstr[0] ""
|
675 |
msgstr[1] ""
|
676 |
|
677 |
-
#: core/core.php:
|
678 |
msgid "Here's a list of the first %d broken links:"
|
679 |
msgid_plural "Here's a list of the first %d broken links:"
|
680 |
msgstr[0] ""
|
681 |
msgstr[1] ""
|
682 |
|
683 |
-
#: core/core.php:
|
684 |
msgid "Here's a list of the new broken links: "
|
685 |
msgstr ""
|
686 |
|
687 |
-
#: core/core.php:
|
688 |
msgid "Link text : %s"
|
689 |
msgstr ""
|
690 |
|
691 |
-
#: core/core.php:
|
692 |
msgid "Link URL : <a href=\"%1$s\">%2$s</a>"
|
693 |
msgstr ""
|
694 |
|
695 |
-
#: core/core.php:
|
696 |
msgid "Source : %s"
|
697 |
msgstr ""
|
698 |
|
699 |
-
#: core/core.php:
|
700 |
msgid "You can see all broken links here:"
|
701 |
msgstr ""
|
702 |
|
703 |
-
#: core/core.php:
|
704 |
msgid "Broken Link Checker has detected %d new broken link in your posts."
|
705 |
msgid_plural "Broken Link Checker has detected %d new broken links in your posts."
|
706 |
msgstr[0] ""
|
707 |
msgstr[1] ""
|
708 |
|
709 |
-
#: core/init.php:
|
710 |
msgid "Every 10 minutes"
|
711 |
msgstr ""
|
712 |
|
713 |
-
#: core/init.php:
|
714 |
msgid "Once Weekly"
|
715 |
msgstr ""
|
716 |
|
717 |
-
#: core/init.php:
|
718 |
msgid "Twice a Month"
|
719 |
msgstr ""
|
720 |
|
721 |
-
#: core/init.php:
|
722 |
msgid "Broken Link Checker installation failed. Try deactivating and then reactivating the plugin."
|
723 |
msgstr ""
|
724 |
|
725 |
-
#:
|
726 |
-
msgid "Please activate the plugin separately on each site. Network activation is not supported."
|
727 |
-
msgstr ""
|
728 |
-
|
729 |
-
#: includes/any-post.php:462, modules/containers/acf_field.php:248, modules/containers/blogroll.php:46, modules/containers/comment.php:159, modules/containers/custom_field.php:252
|
730 |
msgid "Edit"
|
731 |
msgstr ""
|
732 |
|
733 |
-
#: includes/any-post.php:
|
734 |
msgid "Move this item to the Trash"
|
735 |
msgstr ""
|
736 |
|
737 |
-
#: includes/any-post.php:
|
738 |
msgid "Trash"
|
739 |
msgstr ""
|
740 |
|
741 |
-
#: includes/any-post.php:
|
742 |
msgid "Delete this item permanently"
|
743 |
msgstr ""
|
744 |
|
745 |
-
#: includes/any-post.php:
|
746 |
msgid "Delete"
|
747 |
msgstr ""
|
748 |
|
749 |
-
#: includes/any-post.php:
|
750 |
msgid "Preview “%s”"
|
751 |
msgstr ""
|
752 |
|
753 |
-
#: includes/any-post.php:
|
754 |
msgid "Preview"
|
755 |
msgstr ""
|
756 |
|
757 |
-
#: includes/any-post.php:
|
758 |
msgid "View “%s”"
|
759 |
msgstr ""
|
760 |
|
761 |
-
#: includes/any-post.php:
|
762 |
msgid "View"
|
763 |
msgstr ""
|
764 |
|
765 |
-
#: includes/any-post.php:
|
766 |
msgid "Edit this item"
|
767 |
msgstr ""
|
768 |
|
769 |
-
#: includes/any-post.php:
|
770 |
msgid "Nothing to update"
|
771 |
msgstr ""
|
772 |
|
773 |
-
#: includes/any-post.php:
|
774 |
msgid "Updating post %d failed"
|
775 |
msgstr ""
|
776 |
|
777 |
-
#: includes/any-post.php:
|
778 |
msgid "Failed to delete post \"%1$s\" (%2$d)"
|
779 |
msgstr ""
|
780 |
|
781 |
-
#: includes/any-post.php:
|
782 |
msgid "Can't move post \"%1$s\" (%2$d) to the trash because the trash feature is disabled"
|
783 |
msgstr ""
|
784 |
|
785 |
-
#: includes/any-post.php:
|
786 |
msgid "Failed to move post \"%1$s\" (%2$d) to the trash"
|
787 |
msgstr ""
|
788 |
|
789 |
-
#: includes/any-post.php:
|
790 |
msgid "%d post deleted."
|
791 |
msgid_plural "%d posts deleted."
|
792 |
msgstr[0] ""
|
793 |
msgstr[1] ""
|
794 |
|
795 |
-
#: includes/any-post.php:
|
796 |
msgid "%d page deleted."
|
797 |
msgid_plural "%d pages deleted."
|
798 |
msgstr[0] ""
|
799 |
msgstr[1] ""
|
800 |
|
801 |
-
#: includes/any-post.php:
|
802 |
msgid "%1$d \"%2$s\" deleted."
|
803 |
msgid_plural "%1$d \"%2$s\" deleted."
|
804 |
msgstr[0] ""
|
805 |
msgstr[1] ""
|
806 |
|
807 |
-
#: includes/any-post.php:
|
808 |
msgid "%d post moved to the Trash."
|
809 |
msgid_plural "%d posts moved to the Trash."
|
810 |
msgstr[0] ""
|
811 |
msgstr[1] ""
|
812 |
|
813 |
-
#: includes/any-post.php:
|
814 |
msgid "%d page moved to the Trash."
|
815 |
msgid_plural "%d pages moved to the Trash."
|
816 |
msgstr[0] ""
|
817 |
msgstr[1] ""
|
818 |
|
819 |
-
#: includes/any-post.php:
|
820 |
msgid "%1$d \"%2$s\" moved to the Trash."
|
821 |
msgid_plural "%1$d \"%2$s\" moved to the Trash."
|
822 |
msgstr[0] ""
|
@@ -1013,52 +1025,52 @@ msgstr ""
|
|
1013 |
msgid "The plugin doesn't know how to check this type of link."
|
1014 |
msgstr ""
|
1015 |
|
1016 |
-
#: includes/links.php:
|
1017 |
msgid "Link is broken."
|
1018 |
msgstr ""
|
1019 |
|
1020 |
-
#: includes/links.php:
|
1021 |
msgid "Link is valid."
|
1022 |
msgstr ""
|
1023 |
|
1024 |
-
#: includes/links.php:
|
1025 |
msgid "Link is not valid"
|
1026 |
msgstr ""
|
1027 |
|
1028 |
-
#: includes/links.php:
|
1029 |
msgid "This link can not be edited because it is not used anywhere on this site."
|
1030 |
msgstr ""
|
1031 |
|
1032 |
-
#: includes/links.php:
|
1033 |
msgid "Failed to create a DB entry for the new URL."
|
1034 |
msgstr ""
|
1035 |
|
1036 |
-
#: includes/links.php:
|
1037 |
msgid "This link is not a redirect"
|
1038 |
msgstr ""
|
1039 |
|
1040 |
-
#: includes/links.php:
|
1041 |
msgid "Couldn't delete the link's database record"
|
1042 |
msgstr ""
|
1043 |
|
1044 |
-
#: includes/links.php:
|
1045 |
msgctxt "link status"
|
1046 |
msgid "Unknown"
|
1047 |
msgstr ""
|
1048 |
|
1049 |
-
#: includes/links.php:
|
1050 |
msgid "Unknown Error"
|
1051 |
msgstr ""
|
1052 |
|
1053 |
-
#: includes/links.php:
|
1054 |
msgid "Not checked"
|
1055 |
msgstr ""
|
1056 |
|
1057 |
-
#: includes/links.php:
|
1058 |
msgid "False positive"
|
1059 |
msgstr ""
|
1060 |
|
1061 |
-
#: includes/links.php:
|
1062 |
msgctxt "link status"
|
1063 |
msgid "OK"
|
1064 |
msgstr ""
|
@@ -1135,7 +1147,7 @@ msgstr[1] ""
|
|
1135 |
msgid "Failed to delete old DB tables. Database error : %s"
|
1136 |
msgstr ""
|
1137 |
|
1138 |
-
#: includes/admin/links-page-js.php:64, includes/admin/links-page-js.php:
|
1139 |
msgid "Wait..."
|
1140 |
msgstr ""
|
1141 |
|
@@ -1184,49 +1196,53 @@ msgstr ""
|
|
1184 |
msgid "Error: Link URL must not be empty."
|
1185 |
msgstr ""
|
1186 |
|
1187 |
-
#: includes/admin/links-page-js.php:
|
|
|
|
|
|
|
|
|
1188 |
msgid "%d instances of the link were successfully unlinked."
|
1189 |
msgstr ""
|
1190 |
|
1191 |
-
#: includes/admin/links-page-js.php:
|
1192 |
msgid "However, %d instances couldn't be removed."
|
1193 |
msgstr ""
|
1194 |
|
1195 |
-
#: includes/admin/links-page-js.php:
|
1196 |
msgid "The plugin failed to remove the link."
|
1197 |
msgstr ""
|
1198 |
|
1199 |
-
#: includes/admin/links-page-js.php:
|
1200 |
msgid "The following error(s) occured :"
|
1201 |
msgstr ""
|
1202 |
|
1203 |
-
#: includes/admin/links-page-js.php:
|
1204 |
msgid "Enter a name for the new custom filter"
|
1205 |
msgstr ""
|
1206 |
|
1207 |
-
#: includes/admin/links-page-js.php:
|
1208 |
msgid ""
|
1209 |
"You are about to delete the current filter.\n"
|
1210 |
"'Cancel' to stop, 'OK' to delete"
|
1211 |
msgstr ""
|
1212 |
|
1213 |
-
#: includes/admin/links-page-js.php:
|
1214 |
msgid ""
|
1215 |
"Are you sure you want to delete all posts, bookmarks or other items that contain any of the selected links? This action can't be undone.\n"
|
1216 |
"'Cancel' to stop, 'OK' to delete"
|
1217 |
msgstr ""
|
1218 |
|
1219 |
-
#: includes/admin/links-page-js.php:
|
1220 |
msgid ""
|
1221 |
"Are you sure you want to remove the selected links? This action can't be undone.\n"
|
1222 |
"'Cancel' to stop, 'OK' to remove"
|
1223 |
msgstr ""
|
1224 |
|
1225 |
-
#: includes/admin/links-page-js.php:
|
1226 |
msgid "Enter a search string first."
|
1227 |
msgstr ""
|
1228 |
|
1229 |
-
#: includes/admin/links-page-js.php:
|
1230 |
msgid "Select one or more links to edit."
|
1231 |
msgstr ""
|
1232 |
|
@@ -1362,10 +1378,6 @@ msgstr ""
|
|
1362 |
msgid "Link last checked"
|
1363 |
msgstr ""
|
1364 |
|
1365 |
-
#: includes/admin/table-printer.php:548
|
1366 |
-
msgid "Never"
|
1367 |
-
msgstr ""
|
1368 |
-
|
1369 |
#: includes/admin/table-printer.php:566
|
1370 |
msgid "Response time"
|
1371 |
msgstr ""
|
@@ -1478,19 +1490,19 @@ msgstr ""
|
|
1478 |
msgid "Use this URL"
|
1479 |
msgstr ""
|
1480 |
|
1481 |
-
#: modules/checkers/http.php:
|
1482 |
msgid "Server Not Found"
|
1483 |
msgstr ""
|
1484 |
|
1485 |
-
#: modules/checkers/http.php:
|
1486 |
msgid "Connection Failed"
|
1487 |
msgstr ""
|
1488 |
|
1489 |
-
#: modules/checkers/http.php:359, modules/checkers/http.php:
|
1490 |
msgid "HTTP code : %d"
|
1491 |
msgstr ""
|
1492 |
|
1493 |
-
#: modules/checkers/http.php:361, modules/checkers/http.php:
|
1494 |
msgid "(No response)"
|
1495 |
msgstr ""
|
1496 |
|
@@ -1498,12 +1510,12 @@ msgstr ""
|
|
1498 |
msgid "Most likely the connection timed out or the domain doesn't exist."
|
1499 |
msgstr ""
|
1500 |
|
1501 |
-
#: modules/checkers/http.php:
|
1502 |
msgid "Request timed out."
|
1503 |
msgstr ""
|
1504 |
|
1505 |
-
#: modules/checkers/http.php:
|
1506 |
-
msgid "Using
|
1507 |
msgstr ""
|
1508 |
|
1509 |
#: modules/containers/acf_field.php:102, modules/containers/custom_field.php:107
|
@@ -1679,44 +1691,44 @@ msgstr ""
|
|
1679 |
msgid "Embedded YouTube playlist"
|
1680 |
msgstr ""
|
1681 |
|
1682 |
-
#: modules/extras/youtube.php:
|
1683 |
msgid "Video OK"
|
1684 |
msgstr ""
|
1685 |
|
1686 |
-
#: modules/extras/youtube.php:
|
1687 |
msgid "Video Not Found"
|
1688 |
msgstr ""
|
1689 |
|
1690 |
-
#: modules/extras/youtube.php:
|
1691 |
msgid "Playlist Not Found"
|
1692 |
msgstr ""
|
1693 |
|
1694 |
-
#: modules/extras/youtube.php:
|
1695 |
msgid "Playlist Restricted"
|
1696 |
msgstr ""
|
1697 |
|
1698 |
-
#: modules/extras/youtube.php:
|
1699 |
msgid "This playlist has no entries or all entries have been deleted."
|
1700 |
msgstr ""
|
1701 |
|
1702 |
-
#: modules/extras/youtube.php:
|
1703 |
msgctxt "link status"
|
1704 |
msgid "Empty Playlist"
|
1705 |
msgstr ""
|
1706 |
|
1707 |
-
#: modules/extras/youtube.php:
|
1708 |
msgid "Video status : %1$s%2$s"
|
1709 |
msgstr ""
|
1710 |
|
1711 |
-
#: modules/extras/youtube.php:
|
1712 |
msgid "Video Restricted"
|
1713 |
msgstr ""
|
1714 |
|
1715 |
-
#: modules/extras/youtube.php:
|
1716 |
msgid "Playlist OK"
|
1717 |
msgstr ""
|
1718 |
|
1719 |
-
#: modules/extras/youtube.php:
|
1720 |
msgid "Unknown YouTube API response received."
|
1721 |
msgstr ""
|
1722 |
|
1 |
+
# Copyright (C) 2020 Broken Link Checker 1.11.13
|
2 |
+
# This file is distributed under the same license as the Broken Link Checker 1.11.13 package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Broken Link Checker 1.11.13\n"
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
"X-Poedit-SourceCharset: UTF-8\n"
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
|
16 |
+
#: core/core.php:211, includes/admin/links-page-js.php:45
|
17 |
msgid "Loading..."
|
18 |
msgstr ""
|
19 |
|
20 |
+
#: core/core.php:235, includes/admin/options-page-js.php:18
|
21 |
msgid "[ Network error ]"
|
22 |
msgstr ""
|
23 |
|
24 |
+
#: core/core.php:278
|
25 |
msgid "Automatically expand the widget if broken links have been detected"
|
26 |
msgstr ""
|
27 |
|
28 |
+
#: core/core.php:374
|
29 |
msgid "Link Checker Settings"
|
30 |
msgstr ""
|
31 |
|
32 |
+
#: core/core.php:375
|
33 |
msgid "Link Checker"
|
34 |
msgstr ""
|
35 |
|
36 |
+
#: core/core.php:381, includes/link-query.php:37
|
37 |
msgid "Broken Links"
|
38 |
msgstr ""
|
39 |
|
40 |
+
#: core/core.php:397
|
41 |
msgid "View Broken Links"
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: core/core.php:413
|
45 |
msgid "Go to Broken Links"
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: core/core.php:431
|
49 |
msgid "Settings"
|
50 |
msgstr ""
|
51 |
|
52 |
+
#: core/core.php:469, includes/admin/table-printer.php:292, includes/admin/table-printer.php:710
|
53 |
msgid "Edit URL"
|
54 |
msgstr ""
|
55 |
|
56 |
+
#: core/core.php:470, includes/admin/links-page-js.php:716, includes/admin/table-printer.php:297, includes/admin/table-printer.php:713
|
57 |
msgid "Unlink"
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: core/core.php:471, includes/admin/links-page-js.php:111, includes/admin/table-printer.php:719
|
61 |
msgid "Not broken"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: core/core.php:472, includes/admin/table-printer.php:296, includes/admin/table-printer.php:727
|
65 |
msgid "Dismiss"
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: core/core.php:473, includes/admin/table-printer.php:293, includes/admin/table-printer.php:739
|
69 |
msgid "Recheck"
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: core/core.php:474, includes/admin/table-printer.php:747
|
73 |
msgctxt "link action; replace one redirect with a direct link"
|
74 |
msgid "Fix redirect"
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: core/core.php:750
|
78 |
msgid "Settings saved."
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: core/core.php:756
|
82 |
msgid "Thank you for your donation!"
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: core/core.php:764
|
86 |
msgid "Complete site recheck started."
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: core/core.php:787
|
90 |
msgid "General"
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: core/core.php:788
|
94 |
msgid "Look For Links In"
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: core/core.php:789
|
98 |
msgid "Which Links To Check"
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: core/core.php:790
|
102 |
msgid "Protocols & APIs"
|
103 |
msgstr ""
|
104 |
|
105 |
+
#: core/core.php:791
|
106 |
msgid "Advanced"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: core/core.php:806
|
110 |
msgid "Broken Link Checker Options"
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: core/core.php:850, includes/admin/table-printer.php:215
|
114 |
msgid "Status"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: core/core.php:852, includes/admin/options-page-js.php:56
|
118 |
msgid "Show debug info"
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: core/core.php:880
|
122 |
msgid "Check each link"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: core/core.php:885
|
126 |
msgid "Every %s hours"
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: core/core.php:894
|
130 |
msgid "Existing links will be checked this often. New links will usually be checked ASAP."
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: core/core.php:901
|
134 |
msgid "E-mail notifications"
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: core/core.php:911
|
138 |
msgid "Send me e-mail notifications about newly detected broken links"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: core/core.php:923
|
142 |
msgid "Send authors e-mail notifications about broken links in their posts"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: core/core.php:930
|
146 |
msgid "Notification e-mail address"
|
147 |
msgstr ""
|
148 |
|
149 |
+
#: core/core.php:942
|
150 |
msgid "Leave empty to use the e-mail address specified in Settings → General."
|
151 |
msgstr ""
|
152 |
|
153 |
+
#: core/core.php:949
|
154 |
msgid "Link tweaks"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: core/core.php:959
|
158 |
msgid "Apply custom formatting to broken links"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: core/core.php:964, core/core.php:1007
|
162 |
msgid "Edit CSS"
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: core/core.php:986
|
166 |
msgid "Example : Lorem ipsum <a %s>broken link</a>, dolor sit amet."
|
167 |
msgstr ""
|
168 |
|
169 |
+
#: core/core.php:989, core/core.php:1033
|
170 |
msgid "Click \"Save Changes\" to update example output."
|
171 |
msgstr ""
|
172 |
|
173 |
+
#: core/core.php:1002
|
174 |
msgid "Apply custom formatting to removed links"
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: core/core.php:1030
|
178 |
msgid "Example : Lorem ipsum <span %s>removed link</span>, dolor sit amet."
|
179 |
msgstr ""
|
180 |
|
181 |
+
#: core/core.php:1047
|
182 |
msgid "Stop search engines from following broken links"
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: core/core.php:1053
|
186 |
msgctxt "\"Link tweaks\" settings"
|
187 |
msgid "These settings only apply to the content of posts, not comments or custom fields."
|
188 |
msgstr ""
|
189 |
|
190 |
+
#: core/core.php:1064
|
191 |
msgctxt "settings page"
|
192 |
msgid "Suggestions"
|
193 |
msgstr ""
|
194 |
|
195 |
+
#: core/core.php:1069
|
196 |
msgid "Suggest alternatives to broken links"
|
197 |
msgstr ""
|
198 |
|
199 |
+
#: core/core.php:1075
|
200 |
msgctxt "settings page"
|
201 |
msgid "Warnings"
|
202 |
msgstr ""
|
203 |
|
204 |
+
#: core/core.php:1080
|
205 |
msgid "Show uncertain or minor problems as \"warnings\" instead of \"broken\""
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: core/core.php:1084
|
209 |
msgid "Turning off this option will make the plugin report all problems as broken links."
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: core/core.php:1091
|
213 |
msgid "YouTube API Key"
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: core/core.php:1103
|
217 |
msgid "Use your own %1$sapi key%2$s for checking youtube links."
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: core/core.php:1110
|
221 |
+
msgid "Post Modified Date"
|
222 |
+
msgstr ""
|
223 |
+
|
224 |
+
#: core/core.php:1115
|
225 |
+
msgid "Disable post modified date change when link is edited"
|
226 |
+
msgstr ""
|
227 |
+
|
228 |
+
#: core/core.php:1130
|
229 |
msgid "Look for links in"
|
230 |
msgstr ""
|
231 |
|
232 |
+
#: core/core.php:1146
|
233 |
msgid "Post statuses"
|
234 |
msgstr ""
|
235 |
|
236 |
+
#: core/core.php:1179
|
237 |
msgid "Link types"
|
238 |
msgstr ""
|
239 |
|
240 |
+
#: core/core.php:1185
|
241 |
msgid "Error : All link parsers missing!"
|
242 |
msgstr ""
|
243 |
|
244 |
+
#: core/core.php:1192
|
245 |
msgid "Exclusion list"
|
246 |
msgstr ""
|
247 |
|
248 |
+
#: core/core.php:1193
|
249 |
msgid "Don't check links where the URL contains any of these words (one per line) :"
|
250 |
msgstr ""
|
251 |
|
252 |
+
#: core/core.php:1214
|
253 |
msgid "Check links using"
|
254 |
msgstr ""
|
255 |
|
256 |
+
#: core/core.php:1233, includes/links.php:1033
|
257 |
msgid "Timeout"
|
258 |
msgstr ""
|
259 |
|
260 |
+
#: core/core.php:1239, core/core.php:1334, core/core.php:3800
|
261 |
msgid "%s seconds"
|
262 |
msgstr ""
|
263 |
|
264 |
+
#: core/core.php:1248
|
265 |
msgid "Links that take longer than this to load will be marked as broken."
|
266 |
msgstr ""
|
267 |
|
268 |
+
#: core/core.php:1255
|
269 |
msgid "Link monitor"
|
270 |
msgstr ""
|
271 |
|
272 |
+
#: core/core.php:1267
|
273 |
msgid "Run continuously while the Dashboard is open"
|
274 |
msgstr ""
|
275 |
|
276 |
+
#: core/core.php:1279
|
277 |
msgid "Run hourly in the background"
|
278 |
msgstr ""
|
279 |
|
280 |
+
#: core/core.php:1287
|
281 |
msgid "Show the dashboard widget for"
|
282 |
msgstr ""
|
283 |
|
284 |
+
#: core/core.php:1292
|
285 |
msgctxt "dashboard widget visibility"
|
286 |
msgid "Administrator"
|
287 |
msgstr ""
|
288 |
|
289 |
+
#: core/core.php:1293
|
290 |
msgctxt "dashboard widget visibility"
|
291 |
msgid "Editor and above"
|
292 |
msgstr ""
|
293 |
|
294 |
+
#: core/core.php:1294
|
295 |
msgctxt "dashboard widget visibility"
|
296 |
msgid "Nobody (disables the widget)"
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: core/core.php:1310
|
300 |
msgctxt "settings page"
|
301 |
msgid "Show link actions"
|
302 |
msgstr ""
|
303 |
|
304 |
+
#: core/core.php:1328
|
305 |
msgid "Max. execution time"
|
306 |
msgstr ""
|
307 |
|
308 |
+
#: core/core.php:1345
|
309 |
msgid "The plugin works by periodically launching a background job that parses your posts for links, checks the discovered URLs, and performs other time-consuming tasks. Here you can set for how long, at most, the link monitor may run each time before stopping."
|
310 |
msgstr ""
|
311 |
|
312 |
+
#: core/core.php:1354
|
313 |
msgid "Server load limit"
|
314 |
msgstr ""
|
315 |
|
316 |
+
#: core/core.php:1369
|
317 |
msgid "Current load : %s"
|
318 |
msgstr ""
|
319 |
|
320 |
+
#: core/core.php:1374
|
321 |
msgid "Link checking will be suspended if the average <a href=\"%s\">server load</a> rises above this number. Leave this field blank to disable load limiting."
|
322 |
msgstr ""
|
323 |
|
324 |
+
#: core/core.php:1383
|
325 |
msgid "Not available"
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: core/core.php:1385
|
329 |
msgid "Load limiting only works on Linux-like systems where <code>/proc/loadavg</code> is present and accessible."
|
330 |
msgstr ""
|
331 |
|
332 |
+
#: core/core.php:1393
|
333 |
msgid "Target resource usage"
|
334 |
msgstr ""
|
335 |
|
336 |
+
#: core/core.php:1413
|
337 |
msgid "Logging"
|
338 |
msgstr ""
|
339 |
|
340 |
+
#: core/core.php:1419
|
341 |
msgid "Enable logging"
|
342 |
msgstr ""
|
343 |
|
344 |
+
#: core/core.php:1426
|
345 |
msgid "Log file location"
|
346 |
msgstr ""
|
347 |
|
348 |
+
#: core/core.php:1435
|
349 |
msgctxt "log file location"
|
350 |
msgid "Default"
|
351 |
msgstr ""
|
352 |
|
353 |
+
#: core/core.php:1451
|
354 |
msgctxt "log file location"
|
355 |
msgid "Custom"
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: core/core.php:1461
|
359 |
+
msgid "Log file clear schedule"
|
360 |
+
msgstr ""
|
361 |
+
|
362 |
+
#: core/core.php:1467, includes/admin/table-printer.php:548
|
363 |
+
msgid "Never"
|
364 |
+
msgstr ""
|
365 |
+
|
366 |
+
#: core/core.php:1488
|
367 |
msgid "Forced recheck"
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: core/core.php:1491
|
371 |
msgid "Re-check all pages"
|
372 |
msgstr ""
|
373 |
|
374 |
+
#: core/core.php:1496
|
375 |
msgid "The \"Nuclear Option\". Click this button to make the plugin empty its link database and recheck the entire site from scratch."
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: core/core.php:1508
|
379 |
msgid "Save Changes"
|
380 |
msgstr ""
|
381 |
|
382 |
+
#: core/core.php:1559
|
383 |
msgid "Configure"
|
384 |
msgstr ""
|
385 |
|
386 |
+
#: core/core.php:1641
|
387 |
msgid "Enter the names of custom fields you want to check (one per line). If a field contains HTML code, prefix its name with <code>html:</code>. For example, <code>html:field_name</code>."
|
388 |
msgstr ""
|
389 |
|
390 |
+
#: core/core.php:1655
|
391 |
msgid "Enter the keys of acf fields you want to check (one per line). If a field contains HTML code, prefix its name with <code>html:</code>. For example, <code>html:field_586a3eaa4091b</code>."
|
392 |
msgstr ""
|
393 |
|
394 |
+
#: core/core.php:1786, core/core.php:1872, core/core.php:1904
|
395 |
msgid "Database error : %s"
|
396 |
msgstr ""
|
397 |
|
398 |
+
#: core/core.php:1853
|
399 |
msgid "You must enter a filter name!"
|
400 |
msgstr ""
|
401 |
|
402 |
+
#: core/core.php:1857
|
403 |
msgid "Invalid search query."
|
404 |
msgstr ""
|
405 |
|
406 |
+
#: core/core.php:1867
|
407 |
msgid "Filter \"%s\" created"
|
408 |
msgstr ""
|
409 |
|
410 |
+
#: core/core.php:1894
|
411 |
msgid "Filter ID not specified."
|
412 |
msgstr ""
|
413 |
|
414 |
+
#: core/core.php:1901
|
415 |
msgid "Filter deleted"
|
416 |
msgstr ""
|
417 |
|
418 |
+
#: core/core.php:1950
|
419 |
msgid "Replaced %d redirect with a direct link"
|
420 |
msgid_plural "Replaced %d redirects with direct links"
|
421 |
msgstr[0] ""
|
422 |
msgstr[1] ""
|
423 |
|
424 |
+
#: core/core.php:1961
|
425 |
msgid "Failed to fix %d redirect"
|
426 |
msgid_plural "Failed to fix %d redirects"
|
427 |
msgstr[0] ""
|
428 |
msgstr[1] ""
|
429 |
|
430 |
+
#: core/core.php:1972
|
431 |
msgid "None of the selected links are redirects!"
|
432 |
msgstr ""
|
433 |
|
434 |
+
#: core/core.php:2052
|
435 |
msgid "%d link updated."
|
436 |
msgid_plural "%d links updated."
|
437 |
msgstr[0] ""
|
438 |
msgstr[1] ""
|
439 |
|
440 |
+
#: core/core.php:2063
|
441 |
msgid "Failed to update %d link."
|
442 |
msgid_plural "Failed to update %d links."
|
443 |
msgstr[0] ""
|
444 |
msgstr[1] ""
|
445 |
|
446 |
+
#: core/core.php:2154
|
447 |
msgid "%d link removed"
|
448 |
msgid_plural "%d links removed"
|
449 |
msgstr[0] ""
|
450 |
msgstr[1] ""
|
451 |
|
452 |
+
#: core/core.php:2165
|
453 |
msgid "Failed to remove %d link"
|
454 |
msgid_plural "Failed to remove %d links"
|
455 |
msgstr[0] ""
|
456 |
msgstr[1] ""
|
457 |
|
458 |
+
#: core/core.php:2275
|
459 |
msgid "%d item was skipped because it can't be moved to the Trash. You need to delete it manually."
|
460 |
msgid_plural "%d items were skipped because they can't be moved to the Trash. You need to delete them manually."
|
461 |
msgstr[0] ""
|
462 |
msgstr[1] ""
|
463 |
|
464 |
+
#: core/core.php:2297
|
465 |
msgid "Didn't find anything to delete!"
|
466 |
msgstr ""
|
467 |
|
468 |
+
#: core/core.php:2335
|
469 |
msgid "%d link scheduled for rechecking"
|
470 |
msgid_plural "%d links scheduled for rechecking"
|
471 |
msgstr[0] ""
|
472 |
msgstr[1] ""
|
473 |
|
474 |
+
#: core/core.php:2384, core/core.php:3221
|
475 |
msgid "This link was manually marked as working by the user."
|
476 |
msgstr ""
|
477 |
|
478 |
+
#: core/core.php:2392, core/core.php:2455
|
479 |
msgid "Couldn't modify link %d"
|
480 |
msgstr ""
|
481 |
|
482 |
+
#: core/core.php:2403
|
483 |
msgid "%d link marked as not broken"
|
484 |
msgid_plural "%d links marked as not broken"
|
485 |
msgstr[0] ""
|
486 |
msgstr[1] ""
|
487 |
|
488 |
+
#: core/core.php:2466
|
489 |
msgid "%d link dismissed"
|
490 |
msgid_plural "%d links dismissed"
|
491 |
msgstr[0] ""
|
492 |
msgstr[1] ""
|
493 |
|
494 |
+
#: core/core.php:2523
|
495 |
msgid "The \"Warnings\" page lists problems that are probably temporary or suspected to be false positives.<br> Warnings that persist for a long time will usually be reclassified as broken links."
|
496 |
msgstr ""
|
497 |
|
498 |
+
#: core/core.php:2528
|
499 |
msgctxt "admin notice under Tools - Broken links - Warnings"
|
500 |
msgid "Hide notice"
|
501 |
msgstr ""
|
502 |
|
503 |
+
#: core/core.php:2534
|
504 |
msgctxt "a link from the admin notice under Tools - Broken links - Warnings"
|
505 |
msgid "Change warning settings"
|
506 |
msgstr ""
|
507 |
|
508 |
+
#: core/core.php:2559
|
509 |
msgid "Table columns"
|
510 |
msgstr ""
|
511 |
|
512 |
+
#: core/core.php:2578
|
513 |
msgid "Show on screen"
|
514 |
msgstr ""
|
515 |
|
516 |
+
#: core/core.php:2585
|
517 |
msgid "links"
|
518 |
msgstr ""
|
519 |
|
520 |
+
#: core/core.php:2586, includes/admin/table-printer.php:175
|
521 |
msgid "Apply"
|
522 |
msgstr ""
|
523 |
|
524 |
+
#: core/core.php:2590
|
525 |
msgid "Misc"
|
526 |
msgstr ""
|
527 |
|
528 |
+
#: core/core.php:2605
|
529 |
msgid "Highlight links broken for at least %s days"
|
530 |
msgstr ""
|
531 |
|
532 |
+
#: core/core.php:2614
|
533 |
msgid "Color-code status codes"
|
534 |
msgstr ""
|
535 |
|
536 |
+
#: core/core.php:2633, core/core.php:3205, core/core.php:3252, core/core.php:3291, core/core.php:3415, core/core.php:3474, core/core.php:3552
|
537 |
msgid "You're not allowed to do that!"
|
538 |
msgstr ""
|
539 |
|
540 |
+
#: core/core.php:3073
|
541 |
msgid "View broken links"
|
542 |
msgstr ""
|
543 |
|
544 |
+
#: core/core.php:3074
|
545 |
msgid "Found %d broken link"
|
546 |
msgid_plural "Found %d broken links"
|
547 |
msgstr[0] ""
|
548 |
msgstr[1] ""
|
549 |
|
550 |
+
#: core/core.php:3080
|
551 |
msgid "No broken links found."
|
552 |
msgstr ""
|
553 |
|
554 |
+
#: core/core.php:3087
|
555 |
msgid "%d URL in the work queue"
|
556 |
msgid_plural "%d URLs in the work queue"
|
557 |
msgstr[0] ""
|
558 |
msgstr[1] ""
|
559 |
|
560 |
+
#: core/core.php:3091
|
561 |
msgid "No URLs in the work queue."
|
562 |
msgstr ""
|
563 |
|
564 |
+
#: core/core.php:3097
|
565 |
msgctxt "for the \"Detected X unique URLs in Y links\" message"
|
566 |
msgid "%d unique URL"
|
567 |
msgid_plural "%d unique URLs"
|
568 |
msgstr[0] ""
|
569 |
msgstr[1] ""
|
570 |
|
571 |
+
#: core/core.php:3101
|
572 |
msgctxt "for the \"Detected X unique URLs in Y links\" message"
|
573 |
msgid "%d link"
|
574 |
msgid_plural "%d links"
|
575 |
msgstr[0] ""
|
576 |
msgstr[1] ""
|
577 |
|
578 |
+
#: core/core.php:3107
|
579 |
msgid "Detected %1$s in %2$s and still searching..."
|
580 |
msgstr ""
|
581 |
|
582 |
+
#: core/core.php:3113
|
583 |
msgid "Detected %1$s in %2$s."
|
584 |
msgstr ""
|
585 |
|
586 |
+
#: core/core.php:3120
|
587 |
msgid "Searching your blog for links..."
|
588 |
msgstr ""
|
589 |
|
590 |
+
#: core/core.php:3122
|
591 |
msgid "No links detected."
|
592 |
msgstr ""
|
593 |
|
594 |
+
#: core/core.php:3148
|
595 |
msgctxt "current load"
|
596 |
msgid "Unknown"
|
597 |
msgstr ""
|
598 |
|
599 |
+
#: core/core.php:3213, core/core.php:3260, core/core.php:3314, core/core.php:3429, core/core.php:3497, core/core.php:3575
|
600 |
msgid "Oops, I can't find the link %d"
|
601 |
msgstr ""
|
602 |
|
603 |
+
#: core/core.php:3233, core/core.php:3274
|
604 |
msgid "Oops, couldn't modify the link!"
|
605 |
msgstr ""
|
606 |
|
607 |
+
#: core/core.php:3236, core/core.php:3277, core/core.php:3462, core/core.php:3484, core/core.php:3562
|
608 |
msgid "Error : link_id not specified"
|
609 |
msgstr ""
|
610 |
|
611 |
+
#: core/core.php:3301
|
612 |
msgid "Error : link_id or new_url not specified"
|
613 |
msgstr ""
|
614 |
|
615 |
+
#: core/core.php:3327, core/core.php:3341
|
616 |
msgid "Oops, the new URL is invalid!"
|
617 |
msgstr ""
|
618 |
|
619 |
+
#: core/core.php:3361
|
620 |
msgid "An unexpected error occurred!"
|
621 |
msgstr ""
|
622 |
|
623 |
+
#: core/core.php:3442
|
624 |
msgid "An unexpected error occured!"
|
625 |
msgstr ""
|
626 |
|
627 |
+
#: core/core.php:3610
|
628 |
msgid "You don't have sufficient privileges to access this information!"
|
629 |
msgstr ""
|
630 |
|
631 |
+
#: core/core.php:3623
|
632 |
msgid "Error : link ID not specified"
|
633 |
msgstr ""
|
634 |
|
635 |
+
#: core/core.php:3637
|
636 |
msgid "Failed to load link details (%s)"
|
637 |
msgstr ""
|
638 |
|
639 |
+
#: core/core.php:3691
|
640 |
msgid "Broken Link Checker"
|
641 |
msgstr ""
|
642 |
|
643 |
+
#: core/core.php:3730
|
644 |
msgid "You have an old version of CURL. Redirect detection may not work properly."
|
645 |
msgstr ""
|
646 |
|
647 |
+
#: core/core.php:3741, core/core.php:3757, core/core.php:3762
|
648 |
msgid "Not installed"
|
649 |
msgstr ""
|
650 |
|
651 |
+
#: core/core.php:3750
|
652 |
msgid "Installed"
|
653 |
msgstr ""
|
654 |
|
655 |
+
#: core/core.php:3763
|
656 |
msgid "You must have either CURL or Snoopy installed for the plugin to work!"
|
657 |
msgstr ""
|
658 |
|
659 |
+
#: core/core.php:3773
|
660 |
msgid "On"
|
661 |
msgstr ""
|
662 |
|
663 |
+
#: core/core.php:3774
|
664 |
msgid "Redirects may be detected as broken links when safe_mode is on."
|
665 |
msgstr ""
|
666 |
|
667 |
+
#: core/core.php:3779, core/core.php:3793
|
668 |
msgid "Off"
|
669 |
msgstr ""
|
670 |
|
671 |
+
#: core/core.php:3787
|
672 |
msgid "On ( %s )"
|
673 |
msgstr ""
|
674 |
|
675 |
+
#: core/core.php:3788
|
676 |
msgid "Redirects may be detected as broken links when open_basedir is on."
|
677 |
msgstr ""
|
678 |
|
679 |
+
#: core/core.php:3825
|
680 |
msgid "If this value is zero even after several page reloads you have probably encountered a bug."
|
681 |
msgstr ""
|
682 |
|
683 |
+
#: core/core.php:3954, core/core.php:4073
|
684 |
msgid "[%s] Broken links detected"
|
685 |
msgstr ""
|
686 |
|
687 |
+
#: core/core.php:3959
|
688 |
msgid "Broken Link Checker has detected %d new broken link on your site."
|
689 |
msgid_plural "Broken Link Checker has detected %d new broken links on your site."
|
690 |
msgstr[0] ""
|
691 |
msgstr[1] ""
|
692 |
|
693 |
+
#: core/core.php:3990
|
694 |
msgid "Here's a list of the first %d broken links:"
|
695 |
msgid_plural "Here's a list of the first %d broken links:"
|
696 |
msgstr[0] ""
|
697 |
msgstr[1] ""
|
698 |
|
699 |
+
#: core/core.php:3999
|
700 |
msgid "Here's a list of the new broken links: "
|
701 |
msgstr ""
|
702 |
|
703 |
+
#: core/core.php:4008
|
704 |
msgid "Link text : %s"
|
705 |
msgstr ""
|
706 |
|
707 |
+
#: core/core.php:4009
|
708 |
msgid "Link URL : <a href=\"%1$s\">%2$s</a>"
|
709 |
msgstr ""
|
710 |
|
711 |
+
#: core/core.php:4010
|
712 |
msgid "Source : %s"
|
713 |
msgstr ""
|
714 |
|
715 |
+
#: core/core.php:4024
|
716 |
msgid "You can see all broken links here:"
|
717 |
msgstr ""
|
718 |
|
719 |
+
#: core/core.php:4078
|
720 |
msgid "Broken Link Checker has detected %d new broken link in your posts."
|
721 |
msgid_plural "Broken Link Checker has detected %d new broken links in your posts."
|
722 |
msgstr[0] ""
|
723 |
msgstr[1] ""
|
724 |
|
725 |
+
#: core/init.php:237
|
726 |
msgid "Every 10 minutes"
|
727 |
msgstr ""
|
728 |
|
729 |
+
#: core/init.php:244
|
730 |
msgid "Once Weekly"
|
731 |
msgstr ""
|
732 |
|
733 |
+
#: core/init.php:250
|
734 |
msgid "Twice a Month"
|
735 |
msgstr ""
|
736 |
|
737 |
+
#: core/init.php:323
|
738 |
msgid "Broken Link Checker installation failed. Try deactivating and then reactivating the plugin."
|
739 |
msgstr ""
|
740 |
|
741 |
+
#: includes/any-post.php:477, modules/containers/acf_field.php:248, modules/containers/blogroll.php:46, modules/containers/comment.php:159, modules/containers/custom_field.php:252
|
|
|
|
|
|
|
|
|
742 |
msgid "Edit"
|
743 |
msgstr ""
|
744 |
|
745 |
+
#: includes/any-post.php:485, modules/containers/acf_field.php:252, modules/containers/custom_field.php:258
|
746 |
msgid "Move this item to the Trash"
|
747 |
msgstr ""
|
748 |
|
749 |
+
#: includes/any-post.php:487, modules/containers/acf_field.php:252, modules/containers/custom_field.php:260
|
750 |
msgid "Trash"
|
751 |
msgstr ""
|
752 |
|
753 |
+
#: includes/any-post.php:492, modules/containers/acf_field.php:254, modules/containers/custom_field.php:265
|
754 |
msgid "Delete this item permanently"
|
755 |
msgstr ""
|
756 |
|
757 |
+
#: includes/any-post.php:494, modules/containers/acf_field.php:254, modules/containers/blogroll.php:47, modules/containers/custom_field.php:267
|
758 |
msgid "Delete"
|
759 |
msgstr ""
|
760 |
|
761 |
+
#: includes/any-post.php:507
|
762 |
msgid "Preview “%s”"
|
763 |
msgstr ""
|
764 |
|
765 |
+
#: includes/any-post.php:508
|
766 |
msgid "Preview"
|
767 |
msgstr ""
|
768 |
|
769 |
+
#: includes/any-post.php:515
|
770 |
msgid "View “%s”"
|
771 |
msgstr ""
|
772 |
|
773 |
+
#: includes/any-post.php:516, modules/containers/acf_field.php:258, modules/containers/comment.php:172, modules/containers/custom_field.php:272
|
774 |
msgid "View"
|
775 |
msgstr ""
|
776 |
|
777 |
+
#: includes/any-post.php:535, modules/containers/acf_field.php:248, modules/containers/custom_field.php:252
|
778 |
msgid "Edit this item"
|
779 |
msgstr ""
|
780 |
|
781 |
+
#: includes/any-post.php:599, modules/containers/blogroll.php:83, modules/containers/comment.php:43
|
782 |
msgid "Nothing to update"
|
783 |
msgstr ""
|
784 |
|
785 |
+
#: includes/any-post.php:613
|
786 |
msgid "Updating post %d failed"
|
787 |
msgstr ""
|
788 |
|
789 |
+
#: includes/any-post.php:674, modules/containers/acf_field.php:327, modules/containers/custom_field.php:341
|
790 |
msgid "Failed to delete post \"%1$s\" (%2$d)"
|
791 |
msgstr ""
|
792 |
|
793 |
+
#: includes/any-post.php:693, modules/containers/acf_field.php:341, modules/containers/custom_field.php:360
|
794 |
msgid "Can't move post \"%1$s\" (%2$d) to the trash because the trash feature is disabled"
|
795 |
msgstr ""
|
796 |
|
797 |
+
#: includes/any-post.php:713, modules/containers/acf_field.php:353, modules/containers/custom_field.php:379
|
798 |
msgid "Failed to move post \"%1$s\" (%2$d) to the trash"
|
799 |
msgstr ""
|
800 |
|
801 |
+
#: includes/any-post.php:820
|
802 |
msgid "%d post deleted."
|
803 |
msgid_plural "%d posts deleted."
|
804 |
msgstr[0] ""
|
805 |
msgstr[1] ""
|
806 |
|
807 |
+
#: includes/any-post.php:822
|
808 |
msgid "%d page deleted."
|
809 |
msgid_plural "%d pages deleted."
|
810 |
msgstr[0] ""
|
811 |
msgstr[1] ""
|
812 |
|
813 |
+
#: includes/any-post.php:824
|
814 |
msgid "%1$d \"%2$s\" deleted."
|
815 |
msgid_plural "%1$d \"%2$s\" deleted."
|
816 |
msgstr[0] ""
|
817 |
msgstr[1] ""
|
818 |
|
819 |
+
#: includes/any-post.php:843
|
820 |
msgid "%d post moved to the Trash."
|
821 |
msgid_plural "%d posts moved to the Trash."
|
822 |
msgstr[0] ""
|
823 |
msgstr[1] ""
|
824 |
|
825 |
+
#: includes/any-post.php:845
|
826 |
msgid "%d page moved to the Trash."
|
827 |
msgid_plural "%d pages moved to the Trash."
|
828 |
msgstr[0] ""
|
829 |
msgstr[1] ""
|
830 |
|
831 |
+
#: includes/any-post.php:847
|
832 |
msgid "%1$d \"%2$s\" moved to the Trash."
|
833 |
msgid_plural "%1$d \"%2$s\" moved to the Trash."
|
834 |
msgstr[0] ""
|
1025 |
msgid "The plugin doesn't know how to check this type of link."
|
1026 |
msgstr ""
|
1027 |
|
1028 |
+
#: includes/links.php:503
|
1029 |
msgid "Link is broken."
|
1030 |
msgstr ""
|
1031 |
|
1032 |
+
#: includes/links.php:505
|
1033 |
msgid "Link is valid."
|
1034 |
msgstr ""
|
1035 |
|
1036 |
+
#: includes/links.php:738, includes/links.php:841, includes/links.php:875
|
1037 |
msgid "Link is not valid"
|
1038 |
msgstr ""
|
1039 |
|
1040 |
+
#: includes/links.php:755
|
1041 |
msgid "This link can not be edited because it is not used anywhere on this site."
|
1042 |
msgstr ""
|
1043 |
|
1044 |
+
#: includes/links.php:781
|
1045 |
msgid "Failed to create a DB entry for the new URL."
|
1046 |
msgstr ""
|
1047 |
|
1048 |
+
#: includes/links.php:848
|
1049 |
msgid "This link is not a redirect"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
+
#: includes/links.php:902, includes/links.php:939
|
1053 |
msgid "Couldn't delete the link's database record"
|
1054 |
msgstr ""
|
1055 |
|
1056 |
+
#: includes/links.php:1016
|
1057 |
msgctxt "link status"
|
1058 |
msgid "Unknown"
|
1059 |
msgstr ""
|
1060 |
|
1061 |
+
#: includes/links.php:1029, modules/checkers/http.php:312, modules/checkers/http.php:316, modules/extras/mediafire.php:115, modules/extras/youtube.php:135, modules/extras/youtube.php:230
|
1062 |
msgid "Unknown Error"
|
1063 |
msgstr ""
|
1064 |
|
1065 |
+
#: includes/links.php:1052
|
1066 |
msgid "Not checked"
|
1067 |
msgstr ""
|
1068 |
|
1069 |
+
#: includes/links.php:1055
|
1070 |
msgid "False positive"
|
1071 |
msgstr ""
|
1072 |
|
1073 |
+
#: includes/links.php:1058, modules/extras/rapidshare.php:145, modules/extras/rapidshare.php:151, modules/extras/rapidshare.php:178, modules/extras/youtube.php:141, modules/extras/youtube.php:217
|
1074 |
msgctxt "link status"
|
1075 |
msgid "OK"
|
1076 |
msgstr ""
|
1147 |
msgid "Failed to delete old DB tables. Database error : %s"
|
1148 |
msgstr ""
|
1149 |
|
1150 |
+
#: includes/admin/links-page-js.php:64, includes/admin/links-page-js.php:659
|
1151 |
msgid "Wait..."
|
1152 |
msgstr ""
|
1153 |
|
1196 |
msgid "Error: Link URL must not be empty."
|
1197 |
msgstr ""
|
1198 |
|
1199 |
+
#: includes/admin/links-page-js.php:654
|
1200 |
+
msgid "Are you sure you want to unlink and remove this link from all posts?"
|
1201 |
+
msgstr ""
|
1202 |
+
|
1203 |
+
#: includes/admin/links-page-js.php:694
|
1204 |
msgid "%d instances of the link were successfully unlinked."
|
1205 |
msgstr ""
|
1206 |
|
1207 |
+
#: includes/admin/links-page-js.php:700
|
1208 |
msgid "However, %d instances couldn't be removed."
|
1209 |
msgstr ""
|
1210 |
|
1211 |
+
#: includes/admin/links-page-js.php:705
|
1212 |
msgid "The plugin failed to remove the link."
|
1213 |
msgstr ""
|
1214 |
|
1215 |
+
#: includes/admin/links-page-js.php:708
|
1216 |
msgid "The following error(s) occured :"
|
1217 |
msgstr ""
|
1218 |
|
1219 |
+
#: includes/admin/links-page-js.php:756
|
1220 |
msgid "Enter a name for the new custom filter"
|
1221 |
msgstr ""
|
1222 |
|
1223 |
+
#: includes/admin/links-page-js.php:768
|
1224 |
msgid ""
|
1225 |
"You are about to delete the current filter.\n"
|
1226 |
"'Cancel' to stop, 'OK' to delete"
|
1227 |
msgstr ""
|
1228 |
|
1229 |
+
#: includes/admin/links-page-js.php:792
|
1230 |
msgid ""
|
1231 |
"Are you sure you want to delete all posts, bookmarks or other items that contain any of the selected links? This action can't be undone.\n"
|
1232 |
"'Cancel' to stop, 'OK' to delete"
|
1233 |
msgstr ""
|
1234 |
|
1235 |
+
#: includes/admin/links-page-js.php:806
|
1236 |
msgid ""
|
1237 |
"Are you sure you want to remove the selected links? This action can't be undone.\n"
|
1238 |
"'Cancel' to stop, 'OK' to remove"
|
1239 |
msgstr ""
|
1240 |
|
1241 |
+
#: includes/admin/links-page-js.php:936
|
1242 |
msgid "Enter a search string first."
|
1243 |
msgstr ""
|
1244 |
|
1245 |
+
#: includes/admin/links-page-js.php:943
|
1246 |
msgid "Select one or more links to edit."
|
1247 |
msgstr ""
|
1248 |
|
1378 |
msgid "Link last checked"
|
1379 |
msgstr ""
|
1380 |
|
|
|
|
|
|
|
|
|
1381 |
#: includes/admin/table-printer.php:566
|
1382 |
msgid "Response time"
|
1383 |
msgstr ""
|
1490 |
msgid "Use this URL"
|
1491 |
msgstr ""
|
1492 |
|
1493 |
+
#: modules/checkers/http.php:289
|
1494 |
msgid "Server Not Found"
|
1495 |
msgstr ""
|
1496 |
|
1497 |
+
#: modules/checkers/http.php:305
|
1498 |
msgid "Connection Failed"
|
1499 |
msgstr ""
|
1500 |
|
1501 |
+
#: modules/checkers/http.php:359, modules/checkers/http.php:448
|
1502 |
msgid "HTTP code : %d"
|
1503 |
msgstr ""
|
1504 |
|
1505 |
+
#: modules/checkers/http.php:361, modules/checkers/http.php:450
|
1506 |
msgid "(No response)"
|
1507 |
msgstr ""
|
1508 |
|
1510 |
msgid "Most likely the connection timed out or the domain doesn't exist."
|
1511 |
msgstr ""
|
1512 |
|
1513 |
+
#: modules/checkers/http.php:459
|
1514 |
msgid "Request timed out."
|
1515 |
msgstr ""
|
1516 |
|
1517 |
+
#: modules/checkers/http.php:466
|
1518 |
+
msgid "Using WP HTTP"
|
1519 |
msgstr ""
|
1520 |
|
1521 |
#: modules/containers/acf_field.php:102, modules/containers/custom_field.php:107
|
1691 |
msgid "Embedded YouTube playlist"
|
1692 |
msgstr ""
|
1693 |
|
1694 |
+
#: modules/extras/youtube.php:140
|
1695 |
msgid "Video OK"
|
1696 |
msgstr ""
|
1697 |
|
1698 |
+
#: modules/extras/youtube.php:151, modules/extras/youtube.php:154
|
1699 |
msgid "Video Not Found"
|
1700 |
msgstr ""
|
1701 |
|
1702 |
+
#: modules/extras/youtube.php:173, modules/extras/youtube.php:176
|
1703 |
msgid "Playlist Not Found"
|
1704 |
msgstr ""
|
1705 |
|
1706 |
+
#: modules/extras/youtube.php:183
|
1707 |
msgid "Playlist Restricted"
|
1708 |
msgstr ""
|
1709 |
|
1710 |
+
#: modules/extras/youtube.php:190
|
1711 |
msgid "This playlist has no entries or all entries have been deleted."
|
1712 |
msgstr ""
|
1713 |
|
1714 |
+
#: modules/extras/youtube.php:191
|
1715 |
msgctxt "link status"
|
1716 |
msgid "Empty Playlist"
|
1717 |
msgstr ""
|
1718 |
|
1719 |
+
#: modules/extras/youtube.php:201
|
1720 |
msgid "Video status : %1$s%2$s"
|
1721 |
msgstr ""
|
1722 |
|
1723 |
+
#: modules/extras/youtube.php:207
|
1724 |
msgid "Video Restricted"
|
1725 |
msgstr ""
|
1726 |
|
1727 |
+
#: modules/extras/youtube.php:216
|
1728 |
msgid "Playlist OK"
|
1729 |
msgstr ""
|
1730 |
|
1731 |
+
#: modules/extras/youtube.php:264
|
1732 |
msgid "Unknown YouTube API response received."
|
1733 |
msgstr ""
|
1734 |
|
modules/checkers/http.php
CHANGED
@@ -42,23 +42,13 @@ class blcHttpChecker extends blcChecker {
|
|
42 |
$this->module_manager
|
43 |
);
|
44 |
} else {
|
45 |
-
//
|
46 |
-
|
47 |
-
$
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
//If Snoopy is available, it will be used in place of CURL.
|
54 |
-
if ( class_exists( 'Snoopy' ) ) {
|
55 |
-
$this->implementation = new blcSnoopyHttp(
|
56 |
-
$this->module_id,
|
57 |
-
$this->cached_header,
|
58 |
-
$this->plugin_conf,
|
59 |
-
$this->module_manager
|
60 |
-
);
|
61 |
-
}
|
62 |
}
|
63 |
}
|
64 |
|
@@ -199,7 +189,10 @@ class blcCurlHttp extends blcHttpCheckerBase {
|
|
199 |
//Redirects don't work when safe mode or open_basedir is enabled.
|
200 |
if ( ! blcUtility::is_safe_mode() && ! blcUtility::is_open_basedir() ) {
|
201 |
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
|
|
|
|
|
202 |
}
|
|
|
203 |
//Set maximum redirects
|
204 |
curl_setopt( $ch, CURLOPT_MAXREDIRS, 10 );
|
205 |
|
@@ -267,6 +260,7 @@ class blcCurlHttp extends blcHttpCheckerBase {
|
|
267 |
|
268 |
$info = curl_getinfo( $ch );
|
269 |
|
|
|
270 |
//Store the results
|
271 |
$result['http_code'] = intval( $info['http_code'] );
|
272 |
$result['final_url'] = $info['url'];
|
@@ -317,6 +311,10 @@ class blcCurlHttp extends blcHttpCheckerBase {
|
|
317 |
$result['status_code'] = BLC_LINK_STATUS_WARNING;
|
318 |
$result['status_text'] = __( 'Unknown Error', 'broken-link-checker' );
|
319 |
}
|
|
|
|
|
|
|
|
|
320 |
} else {
|
321 |
$result['broken'] = $this->is_error_code( $result['http_code'] );
|
322 |
}
|
@@ -335,7 +333,9 @@ class blcCurlHttp extends blcHttpCheckerBase {
|
|
335 |
)
|
336 |
);
|
337 |
|
338 |
-
|
|
|
|
|
339 |
//The site in question might be expecting GET instead of HEAD, so lets retry the request
|
340 |
//using the GET verb...but not in cases of timeout, or where we've already done it.
|
341 |
return $this->check( $url, true );
|
@@ -403,10 +403,11 @@ class blcCurlHttp extends blcHttpCheckerBase {
|
|
403 |
|
404 |
}
|
405 |
|
406 |
-
class
|
407 |
|
408 |
function check( $url ) {
|
409 |
-
|
|
|
410 |
//Note : Snoopy doesn't work too well with HTTPS URLs.
|
411 |
|
412 |
$result = array(
|
@@ -422,20 +423,23 @@ class blcSnoopyHttp extends blcHttpCheckerBase {
|
|
422 |
$start_time = microtime_float();
|
423 |
|
424 |
//Fetch the URL with Snoopy
|
425 |
-
$snoopy = new
|
426 |
-
$
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
//Snoopy returns -100 on timeout
|
436 |
-
if ( -100 == $result['http_code'] ) {
|
437 |
$result['http_code'] = 0;
|
438 |
$result['timeout'] = true;
|
|
|
|
|
|
|
|
|
|
|
439 |
}
|
440 |
|
441 |
//Build the log
|
@@ -447,32 +451,23 @@ class blcSnoopyHttp extends blcHttpCheckerBase {
|
|
447 |
}
|
448 |
$log .= " ===\n\n";
|
449 |
|
450 |
-
if ( $
|
451 |
-
$log .= $
|
452 |
}
|
453 |
-
|
|
|
454 |
$log .= __( 'Request timed out.', 'broken-link-checker' ) . "\n";
|
455 |
$result['timeout'] = true;
|
456 |
}
|
457 |
|
458 |
-
if ( is_array( $snoopy->headers ) ) {
|
459 |
-
$log .= implode( '', $snoopy->headers ) . "\n"; //those headers already contain newlines
|
460 |
-
}
|
461 |
-
|
462 |
-
//Redirected?
|
463 |
-
if ( $snoopy->lastredirectaddr ) {
|
464 |
-
$result['final_url'] = $snoopy->lastredirectaddr;
|
465 |
-
$result['redirect_count'] = $snoopy->_redirectdepth;
|
466 |
-
} else {
|
467 |
-
$result['final_url'] = $url;
|
468 |
-
}
|
469 |
-
|
470 |
//Determine if the link counts as "broken"
|
471 |
$result['broken'] = $this->is_error_code( $result['http_code'] ) || $result['timeout'];
|
472 |
|
473 |
-
$log .= '<em>(' . __( 'Using
|
474 |
$result['log'] = $log;
|
475 |
|
|
|
|
|
476 |
//The hash should contain info about all pieces of data that pertain to determining if the
|
477 |
//link is working.
|
478 |
$result['result_hash'] = implode(
|
42 |
$this->module_manager
|
43 |
);
|
44 |
} else {
|
45 |
+
//try and use wp request method
|
46 |
+
$this->implementation = new blcWPHttp(
|
47 |
+
$this->module_id,
|
48 |
+
$this->cached_header,
|
49 |
+
$this->plugin_conf,
|
50 |
+
$this->module_manager
|
51 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
}
|
53 |
}
|
54 |
|
189 |
//Redirects don't work when safe mode or open_basedir is enabled.
|
190 |
if ( ! blcUtility::is_safe_mode() && ! blcUtility::is_open_basedir() ) {
|
191 |
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
|
192 |
+
} else {
|
193 |
+
$log .= "[Warning] Could't follow the redirect URL (if any) because safemode or open base dir enabled\n";
|
194 |
}
|
195 |
+
|
196 |
//Set maximum redirects
|
197 |
curl_setopt( $ch, CURLOPT_MAXREDIRS, 10 );
|
198 |
|
260 |
|
261 |
$info = curl_getinfo( $ch );
|
262 |
|
263 |
+
// var_dump( $info ); die();
|
264 |
//Store the results
|
265 |
$result['http_code'] = intval( $info['http_code'] );
|
266 |
$result['final_url'] = $info['url'];
|
311 |
$result['status_code'] = BLC_LINK_STATUS_WARNING;
|
312 |
$result['status_text'] = __( 'Unknown Error', 'broken-link-checker' );
|
313 |
}
|
314 |
+
} elseif ( 999 === $result['http_code'] ) {
|
315 |
+
$result['status_code'] = BLC_LINK_STATUS_WARNING;
|
316 |
+
$result['status_text'] = __( 'Unknown Error', 'broken-link-checker' );
|
317 |
+
$result['warning'] = true;
|
318 |
} else {
|
319 |
$result['broken'] = $this->is_error_code( $result['http_code'] );
|
320 |
}
|
333 |
)
|
334 |
);
|
335 |
|
336 |
+
$use_get = apply_filters( 'blc_use_get_checker', false, $result );
|
337 |
+
|
338 |
+
if ( $nobody && !$result['timeout'] && !$use_get && ($result['broken'] || $result['redirect_count'] == 1)){
|
339 |
//The site in question might be expecting GET instead of HEAD, so lets retry the request
|
340 |
//using the GET verb...but not in cases of timeout, or where we've already done it.
|
341 |
return $this->check( $url, true );
|
403 |
|
404 |
}
|
405 |
|
406 |
+
class blcWPHttp extends blcHttpCheckerBase {
|
407 |
|
408 |
function check( $url ) {
|
409 |
+
|
410 |
+
// $url = $this->clean_url( $url );
|
411 |
//Note : Snoopy doesn't work too well with HTTPS URLs.
|
412 |
|
413 |
$result = array(
|
423 |
$start_time = microtime_float();
|
424 |
|
425 |
//Fetch the URL with Snoopy
|
426 |
+
$snoopy = new WP_Http;
|
427 |
+
$request_args = array(
|
428 |
+
'timeout' => $timeout,
|
429 |
+
'user-agent' => 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)', //masquerade as IE 7
|
430 |
+
'aa' => 1024 * 5,
|
431 |
+
);
|
432 |
+
$request = wp_safe_remote_get( $this->urlencodefix( $url ), $request_args );
|
433 |
+
|
434 |
+
//request timeout results in WP ERROR
|
435 |
+
if ( is_wp_error( $request ) ) {
|
|
|
|
|
436 |
$result['http_code'] = 0;
|
437 |
$result['timeout'] = true;
|
438 |
+
$result['message'] = $request::get_error_message();
|
439 |
+
} else {
|
440 |
+
$http_resp = $request['http_response'];
|
441 |
+
$result['http_code'] = $request['response']['status']; //HTTP status code
|
442 |
+
$result['message'] = $request['response']['message'];
|
443 |
}
|
444 |
|
445 |
//Build the log
|
451 |
}
|
452 |
$log .= " ===\n\n";
|
453 |
|
454 |
+
if ( $result['message'] ) {
|
455 |
+
$log .= $result['message'] . "\n";
|
456 |
}
|
457 |
+
|
458 |
+
if ( is_wp_error( $request ) ) {
|
459 |
$log .= __( 'Request timed out.', 'broken-link-checker' ) . "\n";
|
460 |
$result['timeout'] = true;
|
461 |
}
|
462 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
463 |
//Determine if the link counts as "broken"
|
464 |
$result['broken'] = $this->is_error_code( $result['http_code'] ) || $result['timeout'];
|
465 |
|
466 |
+
$log .= '<em>(' . __( 'Using WP HTTP', 'broken-link-checker' ) . ')</em>';
|
467 |
$result['log'] = $log;
|
468 |
|
469 |
+
$result['final_url'] = $url;
|
470 |
+
|
471 |
//The hash should contain info about all pieces of data that pertain to determining if the
|
472 |
//link is working.
|
473 |
$result['result_hash'] = implode(
|
modules/extras/youtube.php
CHANGED
@@ -129,9 +129,8 @@ class blcYouTubeChecker extends blcChecker {
|
|
129 |
if ( isset( $api['error'] ) && ( 404 !== $result['http_code'] ) ) { //404's are handled later.
|
130 |
$result['status_code'] = BLC_LINK_STATUS_WARNING;
|
131 |
$result['warning'] = true;
|
132 |
-
|
133 |
-
|
134 |
-
$result['status_text'] = $api['error']['message'];
|
135 |
} else {
|
136 |
$result['status_text'] = __( 'Unknown Error', 'broken-link-checker' );
|
137 |
}
|
@@ -287,8 +286,7 @@ class blcYouTubeChecker extends blcChecker {
|
|
287 |
public function get_youtube_api_key() {
|
288 |
$conf = blc_get_configuration();
|
289 |
|
290 |
-
|
291 |
-
$api_key = ! empty( $conf->options['youtube_api_key'] ) ? $conf->options['youtube_api_key'] : 'AIzaSyCE2HKP0BneF8YdVT45UpadENdBeYCzFrE';
|
292 |
|
293 |
return apply_filters( 'blc_youtube_api_key', $conf->options['youtube_api_key'] );
|
294 |
}
|
129 |
if ( isset( $api['error'] ) && ( 404 !== $result['http_code'] ) ) { //404's are handled later.
|
130 |
$result['status_code'] = BLC_LINK_STATUS_WARNING;
|
131 |
$result['warning'] = true;
|
132 |
+
if ( isset( $api['error']['errors'] ) ) {
|
133 |
+
$result['status_text'] = $api['error']['errors'][0]['reason'];
|
|
|
134 |
} else {
|
135 |
$result['status_text'] = __( 'Unknown Error', 'broken-link-checker' );
|
136 |
}
|
286 |
public function get_youtube_api_key() {
|
287 |
$conf = blc_get_configuration();
|
288 |
|
289 |
+
$api_key = ! empty( $conf->options['youtube_api_key'] ) ? $conf->options['youtube_api_key'] : '';
|
|
|
290 |
|
291 |
return apply_filters( 'blc_youtube_api_key', $conf->options['youtube_api_key'] );
|
292 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link:
|
|
4 |
Tags: links, broken, maintenance, blogroll, custom fields, admin, comments, posts
|
5 |
Requires at least: 4.6
|
6 |
Tested up to: 5.4
|
7 |
-
Stable tag: 1.11.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -37,7 +37,7 @@ There are several actions associated with each link. They show up when you move
|
|
37 |
* "Edit URL" lets you change the URL of that link. If the link is present in more than one place (e.g. both in a post and in the blogroll), all occurrences of that URL will be changed.
|
38 |
* "Unlink" removes the link but leaves the link text intact.
|
39 |
* "Not broken" lets you manually mark a "broken" link as working. This is useful if you know it was incorrectly detected as broken due to a network glitch or a bug. The marked link will still be checked periodically, but the plugin won't consider it broken unless it gets a new result.
|
40 |
-
* "Dismiss" hides the link
|
41 |
|
42 |
You can also click on the contents of the "Status" or "Link Text" columns to get more info about the status of each link.
|
43 |
|
@@ -67,6 +67,20 @@ To upgrade your installation
|
|
67 |
1. Reactivate the plugin. Your settings will be retained from the previous version.
|
68 |
|
69 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
= 1.11.12 =
|
71 |
* Added an interface to use personal YouTube API Key
|
72 |
* Fixed database errors on installation for some hosts.
|
4 |
Tags: links, broken, maintenance, blogroll, custom fields, admin, comments, posts
|
5 |
Requires at least: 4.6
|
6 |
Tested up to: 5.4
|
7 |
+
Stable tag: 1.11.13
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
37 |
* "Edit URL" lets you change the URL of that link. If the link is present in more than one place (e.g. both in a post and in the blogroll), all occurrences of that URL will be changed.
|
38 |
* "Unlink" removes the link but leaves the link text intact.
|
39 |
* "Not broken" lets you manually mark a "broken" link as working. This is useful if you know it was incorrectly detected as broken due to a network glitch or a bug. The marked link will still be checked periodically, but the plugin won't consider it broken unless it gets a new result.
|
40 |
+
* "Dismiss" hides the link frm the "Broken Links" and "Redirects" views. It will still be checked as normal and get the normal link styles (e.g. a strike-through effect for broken links), but won't be reported again unless its status changes. Useful if you want to acknowledge a link as broken/redirected and just leave as it is.
|
41 |
|
42 |
You can also click on the contents of the "Status" or "Link Text" columns to get more info about the status of each link.
|
43 |
|
67 |
1. Reactivate the plugin. Your settings will be retained from the previous version.
|
68 |
|
69 |
== Changelog ==
|
70 |
+
= 1.11.13 =
|
71 |
+
* Added filter for disabling email notifications.
|
72 |
+
* Added filter to use GET requests.
|
73 |
+
* Added option to disable last updated time on post types.
|
74 |
+
* Added option to check post excerpts.
|
75 |
+
* Added a confirmation box when unlinking.
|
76 |
+
* Added basic multisite support.
|
77 |
+
* Added proper error messages on YouTube video errors.
|
78 |
+
* Fixed bulk recheck option.
|
79 |
+
* Fixed minor database errors.
|
80 |
+
* Improved performance.
|
81 |
+
* Removed default YouTube API key.
|
82 |
+
* Removed usage of depricated WP Snoopy.
|
83 |
+
|
84 |
= 1.11.12 =
|
85 |
* Added an interface to use personal YouTube API Key
|
86 |
* Fixed database errors on installation for some hosts.
|
uninstall.php
CHANGED
@@ -10,6 +10,7 @@ if ( defined( 'ABSPATH' ) && defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
|
10 |
|
11 |
// Remove the plugin's settings & installation log.
|
12 |
delete_option( 'wsblc_options' );
|
|
|
13 |
delete_option( 'blc_installation_log' );
|
14 |
|
15 |
// Remove the database tables.
|
10 |
|
11 |
// Remove the plugin's settings & installation log.
|
12 |
delete_option( 'wsblc_options' );
|
13 |
+
delete_option( 'blc_activation_enabled' );
|
14 |
delete_option( 'blc_installation_log' );
|
15 |
|
16 |
// Remove the database tables.
|