Changeset 2312012
- Timestamp:
- 05/26/2020 06:08:00 AM (6 years ago)
- Location:
- broken-link-checker
- Files:
-
- 32 edited
- 1 copied
-
tags/1.11.13 (copied) (copied from broken-link-checker/trunk)
-
tags/1.11.13/broken-link-checker.php (modified) (3 diffs)
-
tags/1.11.13/core/core.php (modified) (35 diffs)
-
tags/1.11.13/core/init.php (modified) (5 diffs)
-
tags/1.11.13/css/links-page.css (modified) (9 diffs)
-
tags/1.11.13/includes/activation.php (modified) (2 diffs)
-
tags/1.11.13/includes/admin/db-upgrade.php (modified) (1 diff)
-
tags/1.11.13/includes/admin/links-page-js.php (modified) (1 diff)
-
tags/1.11.13/includes/admin/options-page-js.php (modified) (1 diff)
-
tags/1.11.13/includes/any-post.php (modified) (7 diffs)
-
tags/1.11.13/includes/checkers.php (modified) (1 diff)
-
tags/1.11.13/includes/links.php (modified) (1 diff)
-
tags/1.11.13/languages/broken-link-checker.pot (modified) (34 diffs)
-
tags/1.11.13/modules/checkers/http.php (modified) (8 diffs)
-
tags/1.11.13/modules/extras/youtube.php (modified) (2 diffs)
-
tags/1.11.13/readme.txt (modified) (3 diffs)
-
tags/1.11.13/uninstall.php (modified) (1 diff)
-
trunk/broken-link-checker.php (modified) (3 diffs)
-
trunk/core/core.php (modified) (35 diffs)
-
trunk/core/init.php (modified) (5 diffs)
-
trunk/css/links-page.css (modified) (9 diffs)
-
trunk/includes/activation.php (modified) (2 diffs)
-
trunk/includes/admin/db-upgrade.php (modified) (1 diff)
-
trunk/includes/admin/links-page-js.php (modified) (1 diff)
-
trunk/includes/admin/options-page-js.php (modified) (1 diff)
-
trunk/includes/any-post.php (modified) (7 diffs)
-
trunk/includes/checkers.php (modified) (1 diff)
-
trunk/includes/links.php (modified) (1 diff)
-
trunk/languages/broken-link-checker.pot (modified) (34 diffs)
-
trunk/modules/checkers/http.php (modified) (8 diffs)
-
trunk/modules/extras/youtube.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
broken-link-checker/tags/1.11.13/broken-link-checker.php
r2265659 r2312012 1 1 <?php 2 3 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 4 10 * Plugin Name: Broken Link Checker 5 11 * Plugin URI: https://wordpress.org/plugins/broken-link-checker/ 6 12 * Description: Checks your blog for broken links and missing images and notifies you on the dashboard if any are found. 7 * Version: 1.11.1 213 * Version: 1.11.13 8 14 * Author: WPMU DEV 9 15 * Author URI: https://premium.wpmudev.org/ … … 11 17 * License: GPLv2 or later 12 18 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 13 */19 */ 14 20 15 21 /* … … 28 34 */ 29 35 30 // Path to this file36 // Path to this file. 31 37 if ( ! defined( 'BLC_PLUGIN_FILE' ) ) { 32 38 define( 'BLC_PLUGIN_FILE', __FILE__ ); 33 39 } 34 40 35 // Path to the plugin's directory41 // Path to the plugin's directory. 36 42 if ( ! defined( 'BLC_DIRECTORY' ) ) { 37 43 define( 'BLC_DIRECTORY', dirname( __FILE__ ) ); 38 44 } 39 45 40 // Load the actual plugin46 // Load the actual plugin. 41 47 require 'core/init.php'; -
broken-link-checker/tags/1.11.13/core/core.php
r2265659 r2312012 1 1 <?php 2 3 2 /** 4 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 5 8 */ 9 6 10 if ( ! function_exists( 'microtime_float' ) ) { 11 /** 12 * Calcualate microtime_float 13 * 14 * @since 1.0.0 15 */ 7 16 function microtime_float() { 8 17 list( $usec, $sec ) = explode( ' ', microtime() ); … … 17 26 18 27 if ( ! class_exists( 'wsBrokenLinkChecker' ) ) { 28 29 /** 30 * Broken Link Checker core 31 */ 19 32 class wsBrokenLinkChecker { 20 33 21 var $conf; 22 var $loader; 23 var $my_basename = ''; 24 var $db_version; //The required version of the plugin's DB schema. 25 var $execution_start_time; 26 var $is_textdomain_loaded = false; 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; 27 75 28 76 /** 29 77 * Class constructor 30 78 * 31 * @param string $loader The fully qualified filename of the loader script that WP identifies as the "main" plugin file. 32 * @param blcConfigurationManager $conf An instance of the configuration manager 33 * @return void 34 */ 35 function __construct( $loader, $conf ) { 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 ) { 36 85 $this->db_version = BLC_DATABASE_VERSION; 37 86 … … 42 91 $this->load_language(); 43 92 44 //Unlike the activation hook, the deactivation callback *can* be registered in this file 45 //because deactivation happens after this class has already been instantiated (durinng the 46 //'init' action). 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 47 97 register_deactivation_hook( $loader, array( $this, 'deactivation' ) ); 48 98 49 99 add_action( 'admin_menu', array( $this, 'admin_menu' ) ); 50 100 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 widget101 // 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. 55 105 add_action( 'wp_dashboard_setup', array( $this, 'hook_wp_dashboard_setup' ) ); 56 106 57 // AJAXy hooks107 // AJAXy hooks. 58 108 add_action( 'wp_ajax_blc_full_status', array( $this, 'ajax_full_status' ) ); 59 109 add_action( 'wp_ajax_blc_dashboard_status', array( $this, 'ajax_dashboard_status' ) ); … … 70 120 add_action( 'wp_ajax_blc_undismiss', array( $this, 'ajax_undismiss' ) ); 71 121 72 // Add/remove Cron events122 // Add/remove Cron events. 73 123 $this->setup_cron_events(); 74 124 75 // Set hooks that listen for our Cron actions125 // Set hooks that listen for our Cron actions. 76 126 add_action( 'blc_cron_email_notifications', array( $this, 'maybe_send_email_notifications' ) ); 77 127 add_action( 'blc_cron_check_links', array( $this, 'cron_check_links' ) ); 78 128 add_action( 'blc_cron_database_maintenance', array( $this, 'database_maintenance' ) ); 79 80 //Set the footer hook that will call the worker function via AJAX. 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. 81 132 add_action( 'admin_footer', array( $this, 'admin_footer' ) ); 82 // Add a "Screen Options" panel to the "Broken Links" page133 // Add a "Screen Options" panel to the "Broken Links" page. 83 134 add_screen_options_panel( 84 135 'blc-screen-options', … … 90 141 ); 91 142 92 // Display an explanatory note on the "Tools -> Broken Links -> Warnings" page.143 // Display an explanatory note on the "Tools -> Broken Links -> Warnings" page. 93 144 add_action( 'admin_notices', array( $this, 'show_warnings_section_notice' ) ); 94 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 95 149 } 96 150 … … 100 154 * @return void 101 155 */ 102 function admin_footer() {156 public function admin_footer() { 103 157 if ( ! $this->conf->options['run_in_dashboard'] ) { 104 158 return; … … 113 167 function blcDoWork(){ 114 168 $.post( 115 "<?php echo admin_url( 'admin-ajax.php'); ?>",169 "<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>", 116 170 { 117 171 'action' : 'blc_work', … … 135 189 * Check if an URL matches the exclusion list. 136 190 * 137 * @param string $url 191 * @param string $url The url to exclude. 138 192 * @return bool 139 193 */ 140 function is_excluded( $url ) {194 public function is_excluded( $url ) { 141 195 if ( ! is_array( $this->conf->options['exclusion_list'] ) ) { 142 196 return false; … … 150 204 } 151 205 152 function dashboard_widget() { 206 /** 207 * Get dashboard_widget 208 */ 209 public function dashboard_widget() { 153 210 ?> 154 <p id='wsblc_activity_box'><?php _e( 'Loading...', 'broken-link-checker' ); ?></p>211 <p id='wsblc_activity_box'><?php esc_html_e( 'Loading...', 'broken-link-checker' ); ?></p> 155 212 <script type='text/javascript'> 156 213 jQuery( function($){ … … 159 216 function blcDashboardStatus(){ 160 217 $.getJSON( 161 "<?php echo admin_url( 'admin-ajax.php'); ?>",218 "<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>", 162 219 { 163 220 'action' : 'blc_dashboard_status', … … 176 233 <?php } ?> 177 234 } else { 178 $('#wsblc_activity_box').html('<?php _e( '[ Network error ]', 'broken-link-checker' ); ?>');235 $('#wsblc_activity_box').html('<?php esc_html_e( '[ Network error ]', 'broken-link-checker' ); ?>'); 179 236 } 180 237 … … 191 248 } 192 249 193 function dashboard_widget_control( 194 /** @noinspection PhpUnusedParameterInspection */ $widget_id, $form_inputs = array() 195 ) { 196 if ( 'POST' == $_SERVER['REQUEST_METHOD'] && 'blc_dashboard_widget' == $_POST['widget_id'] ) { 197 //It appears $form_inputs isn't used in the current WP version, so lets just use $_POST 198 $this->conf->options['autoexpand_widget'] = ! empty( $_POST['blc-autoexpand'] ); 199 $this->conf->save_options(); 200 } 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; 201 269 202 270 ?> … … 207 275 echo 'checked="checked"';} 208 276 ?> 209 />210 <?php _e( 'Automatically expand the widget if broken links have been detected', 'broken-link-checker' ); ?>277 /> 278 <?php esc_html_e( 'Automatically expand the widget if broken links have been detected', 'broken-link-checker' ); ?> 211 279 </label></p> 212 280 <?php 213 } 214 215 function admin_print_scripts() {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 function enqueue_settings_scripts() {221 // jQuery UI is used on the settings page222 wp_enqueue_script( 'jquery-ui-core' ); // Used for background color animation281 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. 223 291 wp_enqueue_script( 'jquery-ui-dialog' ); 224 292 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 function enqueue_link_page_scripts() { 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() { 229 300 wp_enqueue_script( 'jquery-ui-core' ); 230 wp_enqueue_script( 'jquery-ui-dialog' ); // Used for the search form231 wp_enqueue_script( 'jquery-color' ); // Used for background color animation232 wp_enqueue_script( 'sprintf', plugins_url( 'js/sprintf.js', BLC_PLUGIN_FILE ) ); //Used in error messages301 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. 233 304 } 234 305 … … 238 309 * @return void 239 310 */ 240 function initiate_recheck() {241 global $wpdb; / ** @var wpdb $wpdb */242 243 // Delete all discovered instances244 $wpdb->query( "TRUNCATE {$wpdb->prefix}blc_instances" ); 245 246 // Delete all discovered links247 $wpdb->query( "TRUNCATE {$wpdb->prefix}blc_links" ); 248 249 // Mark all posts, custom fields and bookmarks for processing.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. 250 321 blc_resynch( true ); 251 322 } … … 256 327 * @return void 257 328 */ 258 function deactivation() {259 // Remove our Cron events329 public function deactivation() { 330 // Remove our Cron events. 260 331 wp_clear_scheduled_hook( 'blc_cron_check_links' ); 261 332 wp_clear_scheduled_hook( 'blc_cron_email_notifications' ); 262 333 wp_clear_scheduled_hook( 'blc_cron_database_maintenance' ); 263 wp_clear_scheduled_hook( 'blc_cron_check_news' ); //Unused event. 264 //Note the deactivation time for each module. This will help them 265 //synch up propely if/when the plugin is reactivated. 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. 266 338 $moduleManager = blcModuleManager::getInstance(); 267 339 $the_time = current_time( 'timestamp' ); … … 280 352 * @return void 281 353 */ 282 function database_maintenance() {354 public function database_maintenance() { 283 355 blcContainerHelper::cleanup_containers(); 284 356 blc_cleanup_instances(); … … 294 366 * @return void 295 367 */ 296 function admin_menu() {368 public function admin_menu() { 297 369 if ( current_user_can( 'manage_options' ) ) { 298 370 add_filter( 'plugin_action_links', array( $this, 'plugin_action_links' ), 10, 2 ); … … 309 381 $menu_title = __( 'Broken Links', 'broken-link-checker' ); 310 382 if ( $this->conf->options['show_link_count_bubble'] ) { 311 // To make it easier to notice when broken links appear, display the current number of312 // 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).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). 314 386 $blc_link_query = blcLinkQuery::getInstance(); 315 387 $broken_links = $blc_link_query->get_filter_links( 'broken', array( 'count_only' => true ) ); 316 388 if ( $broken_links > 0 ) { 317 // TODO: Appropriating existing CSS classes for my own purposes is hacky. Fix eventually.389 // TODO: Appropriating existing CSS classes for my own purposes is hacky. Fix eventually. 318 390 $menu_title .= sprintf( 319 391 ' <span class="update-plugins"><span class="update-count blc-menu-bubble">%d</span></span>', … … 330 402 ); 331 403 332 // Add plugin-specific scripts and CSS only to the it's own pages404 // Add plugin-specific scripts and CSS only to the it's own pages. 333 405 add_action( 'admin_print_styles-' . $options_page_hook, array( $this, 'options_page_css' ) ); 334 406 add_action( 'admin_print_styles-' . $links_page_hook, array( $this, 'links_page_css' ) ); … … 336 408 add_action( 'admin_print_scripts-' . $links_page_hook, array( $this, 'enqueue_link_page_scripts' ) ); 337 409 338 // Make the Settings page link to the link list410 // Make the Settings page link to the link list. 339 411 add_screen_meta_link( 340 412 'blc-links-page-link', … … 347 419 348 420 /** 349 * plugin_action_links()421 * Function plugin_action_links() 350 422 * Handler for the 'plugin_action_links' hook. Adds a "Settings" link to this plugin's entry 351 423 * on the plugin list. … … 355 427 * @return array 356 428 */ 357 function plugin_action_links( $links, $file ) {358 if ( $file == $this->my_basename ) {429 public function plugin_action_links( $links, $file ) { 430 if ( $file === $this->my_basename ) { 359 431 $links[] = "<a href='options-general.php?page=link-checker-settings'>" . __( 'Settings' ) . '</a>'; 360 432 } … … 362 434 } 363 435 364 function options_page() { 436 /** 437 * Function to show options page 438 */ 439 public function options_page() { 365 440 $moduleManager = blcModuleManager::getInstance(); 366 441 367 // Prior to 1.5.2 (released 2012-05-27), there was a bug that would cause the donation flag to be368 // set incorrectly. So we'll unset the flag in that case.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. 369 444 $reset_donation_flag = ( $this->conf->get( 'first_installation_timestamp', 0 ) < strtotime( '2012-05-27 00:00' ) ) && ! $this->conf->get( 'donation_flag_fixed', false ); 370 445 … … 378 453 $this->initiate_recheck(); 379 454 380 // Redirect back to the settings page455 // Redirect back to the settings page. 381 456 $base_url = remove_query_arg( array( '_wpnonce', 'noheader', 'updated', 'error', 'action', 'message' ) ); 382 457 wp_redirect( … … 405 480 $cleanPost = $_POST; 406 481 if ( function_exists( 'wp_magic_quotes' ) ) { 407 $cleanPost = stripslashes_deep( $cleanPost ); // Ceterum censeo, WP shouldn't mangle superglobals.408 } 409 410 // Activate/deactivate modules482 $cleanPost = stripslashes_deep( $cleanPost ); // Ceterum censeo, WP shouldn't mangle superglobals. 483 } 484 485 // Activate/deactivate modules. 411 486 if ( ! empty( $_POST['module'] ) ) { 412 487 $active = array_keys( $_POST['module'] ); … … 414 489 } 415 490 416 // Only post statuses that actually exist can be selected491 // Only post statuses that actually exist can be selected. 417 492 if ( isset( $_POST['enabled_post_statuses'] ) && is_array( $_POST['enabled_post_statuses'] ) ) { 418 493 $available_statuses = get_post_stati(); … … 489 564 $acf_fields_diff2 = array_diff( $this->conf->options['acf_fields'], $new_acf_fields ); 490 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'] ); 491 569 492 570 //Turning off warnings turns existing warnings into "broken" links. … … 568 646 if ( $this->conf->options['logging_enabled'] ) { 569 647 if ( $this->conf->options['custom_log_file_enabled'] ) { 648 570 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 } 571 667 } else { 572 668 //Default log file is /wp-content/uploads/broken-link-checker/blc-log.txt … … 584 680 585 681 $this->conf->options['log_file'] = $log_file; 586 587 //Attempt to create the log file if not already there. 682 $this->conf->options['clear_log_on'] = strval( $cleanPost['clear_log_on'] ); 683 684 // Attempt to create the log file if not already there. 588 685 if ( ! is_file( $log_file ) ) { 589 686 file_put_contents( $log_file, '' ); … … 1010 1107 </tr> 1011 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 1012 1120 </table> 1013 1121 … … 1319 1427 <td> 1320 1428 1321 <div id="blc-logging-options">1429 <div class="blc-logging-options"> 1322 1430 1323 1431 <p> … … 1350 1458 </td> 1351 1459 </tr> 1352 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> 1353 1486 1354 1487 <tr valign="top"> … … 3612 3745 3613 3746 //Snoopy presence 3614 if ( class_exists( ' Snoopy' ) || file_exists( ABSPATH . WPINC . '/class-snoopy.php' ) ) {3747 if ( class_exists( 'WP_Http' ) || file_exists( ABSPATH . WPINC . '/class-http.php' ) ) { 3615 3748 $data = array( 3616 3749 'state' => 'ok', … … 3769 3902 global $wpdb; /** @var wpdb $wpdb */ 3770 3903 3771 if ( ! ( $this->conf->options['send_email_notifications'] || $this->conf->options['send_authors_email_notifications'] ) ) { 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 ) ) { 3772 3910 return; 3773 3911 } … … 4012 4150 wp_schedule_event( time(), 'daily', 'blc_cron_database_maintenance' ); 4013 4151 } 4014 } 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 4015 4212 4016 4213 /** -
broken-link-checker/tags/1.11.13/core/init.php
r2265659 r2312012 43 43 define( 'BLC_FOR_PARSING', 'parse' ); 44 44 define( 'BLC_FOR_DISPLAY', 'display' ); 45 define( 'BLC_DATABASE_VERSION', 1 0);45 define( 'BLC_DATABASE_VERSION', 16 ); 46 46 47 47 /*********************************************** … … 97 97 'logging_enabled' => false, 98 98 'log_file' => '', 99 'incorrect_path' => false, 100 'clear_log_on' => '', 99 101 'custom_log_file_enabled' => false, 100 102 'installation_complete' => false, … … 105 107 'show_link_actions' => array( 'blc-deredirect-action' => false ), //Visible link actions. 106 108 'youtube_api_key' => '', 109 'blc_post_modified' => '', 107 110 ) 108 111 ); … … 257 260 ************************************************/ 258 261 259 //Execute the installation/upgrade script when the plugin is activated. 260 function blc_activation_hook() { 261 require BLC_DIRECTORY . '/includes/activation.php'; 262 } 263 264 register_activation_hook( BLC_PLUGIN_FILE, 'blc_activation_hook' ); 262 require BLC_DIRECTORY . '/includes/activation.php'; 265 263 266 264 //Load the plugin if installed successfully … … 325 323 '<strong>' . __( 'Broken Link Checker installation failed. Try deactivating and then reactivating the plugin.', 'broken-link-checker' ) . '</strong>', 326 324 ); 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 325 333 326 if ( ! $blc_config_manager->db_option_loaded ) { -
broken-link-checker/tags/1.11.13/css/links-page.css
r2238832 r2312012 30 30 31 31 th.column-new-link-text { 32 32 33 33 } 34 34 35 35 th.column-used-in { 36 36 37 37 } 38 38 … … 63 63 /* Cells */ 64 64 65 td.column-new-url, 65 td.column-new-url, 66 66 td.column-used-in 67 67 { … … 107 107 } 108 108 109 .blc-permanently-broken { 110 109 .blc-permanently-broken { 110 111 111 } 112 112 … … 200 200 .compact .link-last-checked, 201 201 .compact .link-broken-for, 202 .compact .link-text 202 .compact .link-text 203 203 { 204 204 display: none; … … 220 220 overflow: hidden; 221 221 222 background-image: none; 222 background-image: none; 223 223 background-position: left center; 224 224 background-repeat: no-repeat; … … 259 259 260 260 td.column-link-text, td.column-new-link-text { 261 cursor: pointer; 261 cursor: pointer; 262 262 } 263 263 … … 410 410 border: 3px solid #EEEEEE; 411 411 padding: 12px; 412 412 413 413 border-radius: 6px; 414 414 -moz-border-radius: 6px; … … 450 450 margin-left: 8px; 451 451 margin-right: 8px; 452 margin-top: 8px; 452 margin-top: 8px; 453 453 } 454 454 … … 504 504 } 505 505 } 506 th#cb { 507 vertical-align: middle; 508 padding: 6px 0 3px; 509 } -
broken-link-checker/tags/1.11.13/includes/activation.php
r2238832 r2312012 1 1 <?php 2 3 if ( get_option( 'blc_activation_enabled' ) ) { 4 return; 5 } 2 6 3 7 global $blclog, $blc_config_manager, $wpdb; … … 117 121 $blclog->save(); 118 122 123 // for multisite support. 124 update_option( 'blc_activation_enabled', true ); -
broken-link-checker/tags/1.11.13/includes/admin/db-upgrade.php
r2238832 r2312012 246 246 ( $definition['collation'] && ( $tablefield->Collation != $definition['collation'] ) ) || 247 247 ( $definition['null_allowed'] && ( 'NO' == $tablefield->Null ) ) || 248 ( ! $definition['null_allowed'] && ( 'NO' == $tablefield->Null ) ) ||249 248 ( $tablefield->Default !== $definition['default'] ); 250 249 -
broken-link-checker/tags/1.11.13/includes/admin/links-page-js.php
r2238832 r2312012 651 651 var me = this; 652 652 var master = $(me).parents('.blc-row'); 653 $(me).html('<?php echo esc_js( __( 'Wait...', 'broken-link-checker' ) ); ?>'); 654 655 //Find the link ID 656 var link_id = master.attr('id').split('-')[2]; 657 658 $.post( 659 "<?php echo admin_url( 'admin-ajax.php' ); ?>", 660 { 661 'action' : 'blc_unlink', 662 'link_id' : link_id, 663 '_ajax_nonce' : '<?php echo esc_js( wp_create_nonce( 'blc_unlink' ) ); ?>' 664 }, 665 function (data, textStatus){ 666 eval('data = ' + data); 667 668 if ( data && (typeof(data['error']) != 'undefined') ){ 669 //An internal error occurred before the link could be edited. 670 //data.error is an error message. 671 alert(data.error); 672 } else { 673 if ( data.errors.length == 0 ){ 674 //The link was successfully removed. Hide its details. 675 $('#link-details-'+link_id).hide(); 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; 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); 685 675 } else { 686 //Build and display an error message. 687 var msg = ''; 688 689 if ( data.cnt_okay > 0 ){ 690 msg = msg + sprintf( 691 '<?php echo esc_js( __( '%d instances of the link were successfully unlinked.', 'broken-link-checker' ) ); ?>\n', 692 data.cnt_okay 693 ); 694 695 if ( data.cnt_error > 0 ){ 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 ){ 696 693 msg = msg + sprintf( 697 '<?php echo esc_js( __( "However, %d instances couldn't be removed.", 'broken-link-checker' ) ); ?>\n',698 data.cnt_ error694 '<?php echo esc_js( __( '%d instances of the link were successfully unlinked.', 'broken-link-checker' ) ); ?>\n', 695 data.cnt_okay 699 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'; 700 706 } 701 } else { 702 msg = msg + '<?php echo esc_js( __( 'The plugin failed to remove the link.', 'broken-link-checker' ) ); ?>\n'; 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); 703 713 } 704 705 msg = msg + '\n<?php echo esc_js( __( 'The following error(s) occured :', 'broken-link-checker' ) ); ?>\n* ';706 msg = msg + data.errors.join('\n* ');707 708 //Show the error message709 alert(msg);710 714 } 715 716 $(me).html('<?php echo esc_js( __( 'Unlink', 'broken-link-checker' ) ); ?>'); 711 717 } 712 713 $(me).html('<?php echo esc_js( __( 'Unlink', 'broken-link-checker' ) ); ?>'); 714 } 715 ); 718 ); 719 720 } 716 721 }); 717 722 -
broken-link-checker/tags/1.11.13/includes/admin/options-page-js.php
r2238832 r2312012 131 131 //Enable/disable log-related options depending on whether "Enable logging" is on. 132 132 function blcToggleLogOptions() { 133 $(' #blc-logging-options')134 .find('input ')133 $('.blc-logging-options') 134 .find('input,select') 135 135 .prop('disabled', ! $('#logging_enabled').is(':checked')); 136 136 } -
broken-link-checker/tags/1.11.13/includes/any-post.php
r2265659 r2312012 243 243 } else { 244 244 //Delete synch records corresponding to posts that no longer exist. 245 $blclog->log( '...... Deleting synch records for removed posts' ); 246 $start = microtime( true ); 247 $q = "DELETE synch.* 248 FROM 249 {$wpdb->prefix}blc_synch AS synch LEFT JOIN {$wpdb->posts} AS posts 250 ON posts.ID = synch.container_id 251 WHERE 252 synch.container_type IN (%s) AND posts.ID IS NULL"; 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 253 259 $q = sprintf( 254 260 $q, 255 "'" . implode( "', '", $escaped_post_types ) . "'" 256 ); 261 "'" . implode( "', '", $all_posts_id ) . "'" 262 ); 263 257 264 $wpdb->query( $q ); 258 265 $elapsed = microtime( true ) - $start; … … 260 267 $blclog->log( sprintf( '...... %d rows deleted in %.3f seconds', $wpdb->rows_affected, $elapsed ) ); 261 268 262 //Delete records where the post status is not one of the enabled statuses. 263 $blclog->log( '...... Deleting synch records for posts that have a disallowed status' ); 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( "', '", $escaped_post_statuses ) . "'" 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 ) ); 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 ) ); 280 295 281 296 //Remove the 'synched' flag from all posts that have been updated … … 586 601 } 587 602 588 $post_id = wp_update_post( $this->wrapped_object, true ); 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 ); 589 607 590 608 if ( is_wp_error( $post_id ) ) { … … 604 622 * Update the the links on pagebuilders 605 623 * 606 * @param $post_id Post ID of whose content to update624 * @param int $post_id Post ID of whose content to update. 607 625 */ 608 626 function update_pagebuilders( $post_id ) { … … 717 735 } 718 736 719 720 721 737 /** 722 738 * Universal manager usable for most post types. … … 727 743 class blcAnyPostContainerManager extends blcContainerManager { 728 744 var $container_class_name = 'blcAnyPostContainer'; 729 var $fields = array( 'post_content' => 'html' );745 var $fields = array( 'post_content' => 'html', 'post_excerpt' => 'html' ); 730 746 731 747 function init() { … … 748 764 */ 749 765 function get_containers( $containers, $purpose = '', $load_wrapped_objects = false ) { 766 global $blclog; 750 767 $containers = $this->make_containers( $containers ); 751 768 -
broken-link-checker/tags/1.11.13/includes/checkers.php
r2238832 r2312012 90 90 $manager = blcModuleManager::getInstance(); 91 91 $active_checkers = $manager->get_active_by_category( 'checker' ); 92 93 92 foreach ( $active_checkers as $module_id => $module_data ) { 94 93 //Try the URL pattern in the header first. If it doesn't match, -
broken-link-checker/tags/1.11.13/includes/links.php
r2238832 r2312012 284 284 $results = array_merge( $defaults, $rez ); 285 285 286 286 287 //Some HTTP errors can be treated as warnings. 287 288 $results = $this->decide_warning_state( $results ); -
broken-link-checker/tags/1.11.13/languages/broken-link-checker.pot
r2265659 r2312012 1 # Copyright (C) 2020 Broken Link Checker 1.11.1 22 # This file is distributed under the same license as the Broken Link Checker 1.11.1 2package.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 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Broken Link Checker 1.11.1 2\n"5 "Project-Id-Version: Broken Link Checker 1.11.13\n" 6 6 "MIME-Version: 1.0\n" 7 7 "Content-Type: text/plain; charset=UTF-8\n" … … 14 14 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 15 15 16 #: core/core.php: 154, includes/admin/links-page-js.php:4516 #: core/core.php:211, includes/admin/links-page-js.php:45 17 17 msgid "Loading..." 18 18 msgstr "" 19 19 20 #: core/core.php: 178, includes/admin/options-page-js.php:1820 #: core/core.php:235, includes/admin/options-page-js.php:18 21 21 msgid "[ Network error ]" 22 22 msgstr "" 23 23 24 #: core/core.php:2 1024 #: core/core.php:278 25 25 msgid "Automatically expand the widget if broken links have been detected" 26 26 msgstr "" 27 27 28 #: core/core.php:3 0228 #: core/core.php:374 29 29 msgid "Link Checker Settings" 30 30 msgstr "" 31 31 32 #: core/core.php:3 0332 #: core/core.php:375 33 33 msgid "Link Checker" 34 34 msgstr "" 35 35 36 #: core/core.php:3 09, includes/link-query.php:3736 #: core/core.php:381, includes/link-query.php:37 37 37 msgid "Broken Links" 38 38 msgstr "" 39 39 40 #: core/core.php:3 2540 #: core/core.php:397 41 41 msgid "View Broken Links" 42 42 msgstr "" 43 43 44 #: core/core.php: 34144 #: core/core.php:413 45 45 msgid "Go to Broken Links" 46 46 msgstr "" 47 47 48 #: core/core.php: 35948 #: core/core.php:431 49 49 msgid "Settings" 50 50 msgstr "" 51 51 52 #: core/core.php: 394, includes/admin/table-printer.php:292, includes/admin/table-printer.php:71052 #: core/core.php:469, includes/admin/table-printer.php:292, includes/admin/table-printer.php:710 53 53 msgid "Edit URL" 54 54 msgstr "" 55 55 56 #: core/core.php: 395, includes/admin/links-page-js.php:713, includes/admin/table-printer.php:297, includes/admin/table-printer.php:71356 #: core/core.php:470, includes/admin/links-page-js.php:716, includes/admin/table-printer.php:297, includes/admin/table-printer.php:713 57 57 msgid "Unlink" 58 58 msgstr "" 59 59 60 #: core/core.php: 396, includes/admin/links-page-js.php:111, includes/admin/table-printer.php:71960 #: core/core.php:471, includes/admin/links-page-js.php:111, includes/admin/table-printer.php:719 61 61 msgid "Not broken" 62 62 msgstr "" 63 63 64 #: core/core.php: 397, includes/admin/table-printer.php:296, includes/admin/table-printer.php:72764 #: core/core.php:472, includes/admin/table-printer.php:296, includes/admin/table-printer.php:727 65 65 msgid "Dismiss" 66 66 msgstr "" 67 67 68 #: core/core.php: 398, includes/admin/table-printer.php:293, includes/admin/table-printer.php:73968 #: core/core.php:473, includes/admin/table-printer.php:293, includes/admin/table-printer.php:739 69 69 msgid "Recheck" 70 70 msgstr "" 71 71 72 #: core/core.php: 399, includes/admin/table-printer.php:74772 #: core/core.php:474, includes/admin/table-printer.php:747 73 73 msgctxt "link action; replace one redirect with a direct link" 74 74 msgid "Fix redirect" 75 75 msgstr "" 76 76 77 #: core/core.php: 65377 #: core/core.php:750 78 78 msgid "Settings saved." 79 79 msgstr "" 80 80 81 #: core/core.php: 65981 #: core/core.php:756 82 82 msgid "Thank you for your donation!" 83 83 msgstr "" 84 84 85 #: core/core.php: 66785 #: core/core.php:764 86 86 msgid "Complete site recheck started." 87 87 msgstr "" 88 88 89 #: core/core.php: 69089 #: core/core.php:787 90 90 msgid "General" 91 91 msgstr "" 92 92 93 #: core/core.php: 69193 #: core/core.php:788 94 94 msgid "Look For Links In" 95 95 msgstr "" 96 96 97 #: core/core.php: 69297 #: core/core.php:789 98 98 msgid "Which Links To Check" 99 99 msgstr "" 100 100 101 #: core/core.php: 693101 #: core/core.php:790 102 102 msgid "Protocols & APIs" 103 103 msgstr "" 104 104 105 #: core/core.php: 694105 #: core/core.php:791 106 106 msgid "Advanced" 107 107 msgstr "" 108 108 109 #: core/core.php: 709109 #: core/core.php:806 110 110 msgid "Broken Link Checker Options" 111 111 msgstr "" 112 112 113 #: core/core.php: 753, includes/admin/table-printer.php:215113 #: core/core.php:850, includes/admin/table-printer.php:215 114 114 msgid "Status" 115 115 msgstr "" 116 116 117 #: core/core.php: 755, includes/admin/options-page-js.php:56117 #: core/core.php:852, includes/admin/options-page-js.php:56 118 118 msgid "Show debug info" 119 119 msgstr "" 120 120 121 #: core/core.php: 783121 #: core/core.php:880 122 122 msgid "Check each link" 123 123 msgstr "" 124 124 125 #: core/core.php: 788125 #: core/core.php:885 126 126 msgid "Every %s hours" 127 127 msgstr "" 128 128 129 #: core/core.php: 797129 #: core/core.php:894 130 130 msgid "Existing links will be checked this often. New links will usually be checked ASAP." 131 131 msgstr "" 132 132 133 #: core/core.php: 804133 #: core/core.php:901 134 134 msgid "E-mail notifications" 135 135 msgstr "" 136 136 137 #: core/core.php: 814137 #: core/core.php:911 138 138 msgid "Send me e-mail notifications about newly detected broken links" 139 139 msgstr "" 140 140 141 #: core/core.php: 826141 #: core/core.php:923 142 142 msgid "Send authors e-mail notifications about broken links in their posts" 143 143 msgstr "" 144 144 145 #: core/core.php: 833145 #: core/core.php:930 146 146 msgid "Notification e-mail address" 147 147 msgstr "" 148 148 149 #: core/core.php: 845149 #: core/core.php:942 150 150 msgid "Leave empty to use the e-mail address specified in Settings → General." 151 151 msgstr "" 152 152 153 #: core/core.php: 852153 #: core/core.php:949 154 154 msgid "Link tweaks" 155 155 msgstr "" 156 156 157 #: core/core.php: 862157 #: core/core.php:959 158 158 msgid "Apply custom formatting to broken links" 159 159 msgstr "" 160 160 161 #: core/core.php: 867, core/core.php:910161 #: core/core.php:964, core/core.php:1007 162 162 msgid "Edit CSS" 163 163 msgstr "" 164 164 165 #: core/core.php: 889165 #: core/core.php:986 166 166 msgid "Example : Lorem ipsum <a %s>broken link</a>, dolor sit amet." 167 167 msgstr "" 168 168 169 #: core/core.php: 892, core/core.php:936169 #: core/core.php:989, core/core.php:1033 170 170 msgid "Click \"Save Changes\" to update example output." 171 171 msgstr "" 172 172 173 #: core/core.php: 905173 #: core/core.php:1002 174 174 msgid "Apply custom formatting to removed links" 175 175 msgstr "" 176 176 177 #: core/core.php: 933177 #: core/core.php:1030 178 178 msgid "Example : Lorem ipsum <span %s>removed link</span>, dolor sit amet." 179 179 msgstr "" 180 180 181 #: core/core.php: 950181 #: core/core.php:1047 182 182 msgid "Stop search engines from following broken links" 183 183 msgstr "" 184 184 185 #: core/core.php: 956185 #: core/core.php:1053 186 186 msgctxt "\"Link tweaks\" settings" 187 187 msgid "These settings only apply to the content of posts, not comments or custom fields." 188 188 msgstr "" 189 189 190 #: core/core.php: 967190 #: core/core.php:1064 191 191 msgctxt "settings page" 192 192 msgid "Suggestions" 193 193 msgstr "" 194 194 195 #: core/core.php: 972195 #: core/core.php:1069 196 196 msgid "Suggest alternatives to broken links" 197 197 msgstr "" 198 198 199 #: core/core.php: 978199 #: core/core.php:1075 200 200 msgctxt "settings page" 201 201 msgid "Warnings" 202 202 msgstr "" 203 203 204 #: core/core.php: 983204 #: core/core.php:1080 205 205 msgid "Show uncertain or minor problems as \"warnings\" instead of \"broken\"" 206 206 msgstr "" 207 207 208 #: core/core.php: 987208 #: core/core.php:1084 209 209 msgid "Turning off this option will make the plugin report all problems as broken links." 210 210 msgstr "" 211 211 212 #: core/core.php: 994212 #: core/core.php:1091 213 213 msgid "YouTube API Key" 214 214 msgstr "" 215 215 216 #: core/core.php:1 006216 #: core/core.php:1103 217 217 msgid "Use your own %1$sapi key%2$s for checking youtube links." 218 218 msgstr "" 219 219 220 #: core/core.php:1022 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 221 229 msgid "Look for links in" 222 230 msgstr "" 223 231 224 #: core/core.php:1 038232 #: core/core.php:1146 225 233 msgid "Post statuses" 226 234 msgstr "" 227 235 228 #: core/core.php:1 071236 #: core/core.php:1179 229 237 msgid "Link types" 230 238 msgstr "" 231 239 232 #: core/core.php:1 077240 #: core/core.php:1185 233 241 msgid "Error : All link parsers missing!" 234 242 msgstr "" 235 243 236 #: core/core.php:1 084244 #: core/core.php:1192 237 245 msgid "Exclusion list" 238 246 msgstr "" 239 247 240 #: core/core.php:1 085248 #: core/core.php:1193 241 249 msgid "Don't check links where the URL contains any of these words (one per line) :" 242 250 msgstr "" 243 251 244 #: core/core.php:1 106252 #: core/core.php:1214 245 253 msgid "Check links using" 246 254 msgstr "" 247 255 248 #: core/core.php:1 125, includes/links.php:1032256 #: core/core.php:1233, includes/links.php:1033 249 257 msgid "Timeout" 250 258 msgstr "" 251 259 252 #: core/core.php:1 131, core/core.php:1226, core/core.php:3667260 #: core/core.php:1239, core/core.php:1334, core/core.php:3800 253 261 msgid "%s seconds" 254 262 msgstr "" 255 263 256 #: core/core.php:1 140264 #: core/core.php:1248 257 265 msgid "Links that take longer than this to load will be marked as broken." 258 266 msgstr "" 259 267 260 #: core/core.php:1 147268 #: core/core.php:1255 261 269 msgid "Link monitor" 262 270 msgstr "" 263 271 264 #: core/core.php:1 159272 #: core/core.php:1267 265 273 msgid "Run continuously while the Dashboard is open" 266 274 msgstr "" 267 275 268 #: core/core.php:1 171276 #: core/core.php:1279 269 277 msgid "Run hourly in the background" 270 278 msgstr "" 271 279 272 #: core/core.php:1 179280 #: core/core.php:1287 273 281 msgid "Show the dashboard widget for" 274 282 msgstr "" 275 283 276 #: core/core.php:1 184284 #: core/core.php:1292 277 285 msgctxt "dashboard widget visibility" 278 286 msgid "Administrator" 279 287 msgstr "" 280 288 281 #: core/core.php:1 185289 #: core/core.php:1293 282 290 msgctxt "dashboard widget visibility" 283 291 msgid "Editor and above" 284 292 msgstr "" 285 293 286 #: core/core.php:1 186294 #: core/core.php:1294 287 295 msgctxt "dashboard widget visibility" 288 296 msgid "Nobody (disables the widget)" 289 297 msgstr "" 290 298 291 #: core/core.php:1 202299 #: core/core.php:1310 292 300 msgctxt "settings page" 293 301 msgid "Show link actions" 294 302 msgstr "" 295 303 296 #: core/core.php:1 220304 #: core/core.php:1328 297 305 msgid "Max. execution time" 298 306 msgstr "" 299 307 300 #: core/core.php:1 237308 #: core/core.php:1345 301 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." 302 310 msgstr "" 303 311 304 #: core/core.php:1 246312 #: core/core.php:1354 305 313 msgid "Server load limit" 306 314 msgstr "" 307 315 308 #: core/core.php:1 261316 #: core/core.php:1369 309 317 msgid "Current load : %s" 310 318 msgstr "" 311 319 312 #: core/core.php:1 266320 #: core/core.php:1374 313 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." 314 322 msgstr "" 315 323 316 #: core/core.php:1 275324 #: core/core.php:1383 317 325 msgid "Not available" 318 326 msgstr "" 319 327 320 #: core/core.php:1 277328 #: core/core.php:1385 321 329 msgid "Load limiting only works on Linux-like systems where <code>/proc/loadavg</code> is present and accessible." 322 330 msgstr "" 323 331 324 #: core/core.php:1 285332 #: core/core.php:1393 325 333 msgid "Target resource usage" 326 334 msgstr "" 327 335 328 #: core/core.php:1 305336 #: core/core.php:1413 329 337 msgid "Logging" 330 338 msgstr "" 331 339 332 #: core/core.php:1 311340 #: core/core.php:1419 333 341 msgid "Enable logging" 334 342 msgstr "" 335 343 336 #: core/core.php:1 318344 #: core/core.php:1426 337 345 msgid "Log file location" 338 346 msgstr "" 339 347 340 #: core/core.php:1 327348 #: core/core.php:1435 341 349 msgctxt "log file location" 342 350 msgid "Default" 343 351 msgstr "" 344 352 345 #: core/core.php:1 343353 #: core/core.php:1451 346 354 msgctxt "log file location" 347 355 msgid "Custom" 348 356 msgstr "" 349 357 350 #: core/core.php:1355 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 351 367 msgid "Forced recheck" 352 368 msgstr "" 353 369 354 #: core/core.php:1 358370 #: core/core.php:1491 355 371 msgid "Re-check all pages" 356 372 msgstr "" 357 373 358 #: core/core.php:1 363374 #: core/core.php:1496 359 375 msgid "The \"Nuclear Option\". Click this button to make the plugin empty its link database and recheck the entire site from scratch." 360 376 msgstr "" 361 377 362 #: core/core.php:1 375378 #: core/core.php:1508 363 379 msgid "Save Changes" 364 380 msgstr "" 365 381 366 #: core/core.php:1 426382 #: core/core.php:1559 367 383 msgid "Configure" 368 384 msgstr "" 369 385 370 #: core/core.php:1 508386 #: core/core.php:1641 371 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>." 372 388 msgstr "" 373 389 374 #: core/core.php:1 522390 #: core/core.php:1655 375 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>." 376 392 msgstr "" 377 393 378 #: core/core.php:1 653, core/core.php:1739, core/core.php:1771394 #: core/core.php:1786, core/core.php:1872, core/core.php:1904 379 395 msgid "Database error : %s" 380 396 msgstr "" 381 397 382 #: core/core.php:1 720398 #: core/core.php:1853 383 399 msgid "You must enter a filter name!" 384 400 msgstr "" 385 401 386 #: core/core.php:1 724402 #: core/core.php:1857 387 403 msgid "Invalid search query." 388 404 msgstr "" 389 405 390 #: core/core.php:1 734406 #: core/core.php:1867 391 407 msgid "Filter \"%s\" created" 392 408 msgstr "" 393 409 394 #: core/core.php:1 761410 #: core/core.php:1894 395 411 msgid "Filter ID not specified." 396 412 msgstr "" 397 413 398 #: core/core.php:1 768414 #: core/core.php:1901 399 415 msgid "Filter deleted" 400 416 msgstr "" 401 417 402 #: core/core.php:1 817418 #: core/core.php:1950 403 419 msgid "Replaced %d redirect with a direct link" 404 420 msgid_plural "Replaced %d redirects with direct links" … … 406 422 msgstr[1] "" 407 423 408 #: core/core.php:1 828424 #: core/core.php:1961 409 425 msgid "Failed to fix %d redirect" 410 426 msgid_plural "Failed to fix %d redirects" … … 412 428 msgstr[1] "" 413 429 414 #: core/core.php:1 839430 #: core/core.php:1972 415 431 msgid "None of the selected links are redirects!" 416 432 msgstr "" 417 433 418 #: core/core.php: 1919434 #: core/core.php:2052 419 435 msgid "%d link updated." 420 436 msgid_plural "%d links updated." … … 422 438 msgstr[1] "" 423 439 424 #: core/core.php: 1930440 #: core/core.php:2063 425 441 msgid "Failed to update %d link." 426 442 msgid_plural "Failed to update %d links." … … 428 444 msgstr[1] "" 429 445 430 #: core/core.php:2 021446 #: core/core.php:2154 431 447 msgid "%d link removed" 432 448 msgid_plural "%d links removed" … … 434 450 msgstr[1] "" 435 451 436 #: core/core.php:2 032452 #: core/core.php:2165 437 453 msgid "Failed to remove %d link" 438 454 msgid_plural "Failed to remove %d links" … … 440 456 msgstr[1] "" 441 457 442 #: core/core.php:2 142458 #: core/core.php:2275 443 459 msgid "%d item was skipped because it can't be moved to the Trash. You need to delete it manually." 444 460 msgid_plural "%d items were skipped because they can't be moved to the Trash. You need to delete them manually." … … 446 462 msgstr[1] "" 447 463 448 #: core/core.php:2 164464 #: core/core.php:2297 449 465 msgid "Didn't find anything to delete!" 450 466 msgstr "" 451 467 452 #: core/core.php:2 202468 #: core/core.php:2335 453 469 msgid "%d link scheduled for rechecking" 454 470 msgid_plural "%d links scheduled for rechecking" … … 456 472 msgstr[1] "" 457 473 458 #: core/core.php:2 251, core/core.php:3088474 #: core/core.php:2384, core/core.php:3221 459 475 msgid "This link was manually marked as working by the user." 460 476 msgstr "" 461 477 462 #: core/core.php:2 259, core/core.php:2322478 #: core/core.php:2392, core/core.php:2455 463 479 msgid "Couldn't modify link %d" 464 480 msgstr "" 465 481 466 #: core/core.php:2 270482 #: core/core.php:2403 467 483 msgid "%d link marked as not broken" 468 484 msgid_plural "%d links marked as not broken" … … 470 486 msgstr[1] "" 471 487 472 #: core/core.php:2 333488 #: core/core.php:2466 473 489 msgid "%d link dismissed" 474 490 msgid_plural "%d links dismissed" … … 476 492 msgstr[1] "" 477 493 478 #: core/core.php:2 390494 #: core/core.php:2523 479 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." 480 496 msgstr "" 481 497 482 #: core/core.php:2 395498 #: core/core.php:2528 483 499 msgctxt "admin notice under Tools - Broken links - Warnings" 484 500 msgid "Hide notice" 485 501 msgstr "" 486 502 487 #: core/core.php:2 401503 #: core/core.php:2534 488 504 msgctxt "a link from the admin notice under Tools - Broken links - Warnings" 489 505 msgid "Change warning settings" 490 506 msgstr "" 491 507 492 #: core/core.php:2 426508 #: core/core.php:2559 493 509 msgid "Table columns" 494 510 msgstr "" 495 511 496 #: core/core.php:2 445512 #: core/core.php:2578 497 513 msgid "Show on screen" 498 514 msgstr "" 499 515 500 #: core/core.php:2 452516 #: core/core.php:2585 501 517 msgid "links" 502 518 msgstr "" 503 519 504 #: core/core.php:2 453, includes/admin/table-printer.php:175520 #: core/core.php:2586, includes/admin/table-printer.php:175 505 521 msgid "Apply" 506 522 msgstr "" 507 523 508 #: core/core.php:2 457524 #: core/core.php:2590 509 525 msgid "Misc" 510 526 msgstr "" 511 527 512 #: core/core.php:2 472528 #: core/core.php:2605 513 529 msgid "Highlight links broken for at least %s days" 514 530 msgstr "" 515 531 516 #: core/core.php:2 481532 #: core/core.php:2614 517 533 msgid "Color-code status codes" 518 534 msgstr "" 519 535 520 #: core/core.php:2 500, core/core.php:3072, core/core.php:3119, core/core.php:3158, core/core.php:3282, core/core.php:3341, core/core.php:3419536 #: 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 521 537 msgid "You're not allowed to do that!" 522 538 msgstr "" 523 539 524 #: core/core.php: 2940540 #: core/core.php:3073 525 541 msgid "View broken links" 526 542 msgstr "" 527 543 528 #: core/core.php: 2941544 #: core/core.php:3074 529 545 msgid "Found %d broken link" 530 546 msgid_plural "Found %d broken links" … … 532 548 msgstr[1] "" 533 549 534 #: core/core.php: 2947550 #: core/core.php:3080 535 551 msgid "No broken links found." 536 552 msgstr "" 537 553 538 #: core/core.php: 2954554 #: core/core.php:3087 539 555 msgid "%d URL in the work queue" 540 556 msgid_plural "%d URLs in the work queue" … … 542 558 msgstr[1] "" 543 559 544 #: core/core.php: 2958560 #: core/core.php:3091 545 561 msgid "No URLs in the work queue." 546 562 msgstr "" 547 563 548 #: core/core.php: 2964564 #: core/core.php:3097 549 565 msgctxt "for the \"Detected X unique URLs in Y links\" message" 550 566 msgid "%d unique URL" … … 553 569 msgstr[1] "" 554 570 555 #: core/core.php: 2968571 #: core/core.php:3101 556 572 msgctxt "for the \"Detected X unique URLs in Y links\" message" 557 573 msgid "%d link" … … 560 576 msgstr[1] "" 561 577 562 #: core/core.php: 2974578 #: core/core.php:3107 563 579 msgid "Detected %1$s in %2$s and still searching..." 564 580 msgstr "" 565 581 566 #: core/core.php: 2980582 #: core/core.php:3113 567 583 msgid "Detected %1$s in %2$s." 568 584 msgstr "" 569 585 570 #: core/core.php: 2987586 #: core/core.php:3120 571 587 msgid "Searching your blog for links..." 572 588 msgstr "" 573 589 574 #: core/core.php: 2989590 #: core/core.php:3122 575 591 msgid "No links detected." 576 592 msgstr "" 577 593 578 #: core/core.php:3 015594 #: core/core.php:3148 579 595 msgctxt "current load" 580 596 msgid "Unknown" 581 597 msgstr "" 582 598 583 #: core/core.php:3 080, core/core.php:3127, core/core.php:3181, core/core.php:3296, core/core.php:3364, core/core.php:3442599 #: core/core.php:3213, core/core.php:3260, core/core.php:3314, core/core.php:3429, core/core.php:3497, core/core.php:3575 584 600 msgid "Oops, I can't find the link %d" 585 601 msgstr "" 586 602 587 #: core/core.php:3 100, core/core.php:3141603 #: core/core.php:3233, core/core.php:3274 588 604 msgid "Oops, couldn't modify the link!" 589 605 msgstr "" 590 606 591 #: core/core.php:3 103, core/core.php:3144, core/core.php:3329, core/core.php:3351, core/core.php:3429607 #: core/core.php:3236, core/core.php:3277, core/core.php:3462, core/core.php:3484, core/core.php:3562 592 608 msgid "Error : link_id not specified" 593 609 msgstr "" 594 610 595 #: core/core.php:3 168611 #: core/core.php:3301 596 612 msgid "Error : link_id or new_url not specified" 597 613 msgstr "" 598 614 599 #: core/core.php:3 194, core/core.php:3208615 #: core/core.php:3327, core/core.php:3341 600 616 msgid "Oops, the new URL is invalid!" 601 617 msgstr "" 602 618 603 #: core/core.php:3 228619 #: core/core.php:3361 604 620 msgid "An unexpected error occurred!" 605 621 msgstr "" 606 622 607 #: core/core.php:3 309623 #: core/core.php:3442 608 624 msgid "An unexpected error occured!" 609 625 msgstr "" 610 626 611 #: core/core.php:3 477627 #: core/core.php:3610 612 628 msgid "You don't have sufficient privileges to access this information!" 613 629 msgstr "" 614 630 615 #: core/core.php:3 490631 #: core/core.php:3623 616 632 msgid "Error : link ID not specified" 617 633 msgstr "" 618 634 619 #: core/core.php:3 504635 #: core/core.php:3637 620 636 msgid "Failed to load link details (%s)" 621 637 msgstr "" 622 638 623 #: core/core.php:3 558639 #: core/core.php:3691 624 640 msgid "Broken Link Checker" 625 641 msgstr "" 626 642 627 #: core/core.php:3 597643 #: core/core.php:3730 628 644 msgid "You have an old version of CURL. Redirect detection may not work properly." 629 645 msgstr "" 630 646 631 #: core/core.php:3 608, core/core.php:3624, core/core.php:3629647 #: core/core.php:3741, core/core.php:3757, core/core.php:3762 632 648 msgid "Not installed" 633 649 msgstr "" 634 650 635 #: core/core.php:3 617651 #: core/core.php:3750 636 652 msgid "Installed" 637 653 msgstr "" 638 654 639 #: core/core.php:3 630655 #: core/core.php:3763 640 656 msgid "You must have either CURL or Snoopy installed for the plugin to work!" 641 657 msgstr "" 642 658 643 #: core/core.php:3 640659 #: core/core.php:3773 644 660 msgid "On" 645 661 msgstr "" 646 662 647 #: core/core.php:3 641663 #: core/core.php:3774 648 664 msgid "Redirects may be detected as broken links when safe_mode is on." 649 665 msgstr "" 650 666 651 #: core/core.php:3 646, core/core.php:3660667 #: core/core.php:3779, core/core.php:3793 652 668 msgid "Off" 653 669 msgstr "" 654 670 655 #: core/core.php:3 654671 #: core/core.php:3787 656 672 msgid "On ( %s )" 657 673 msgstr "" 658 674 659 #: core/core.php:3 655675 #: core/core.php:3788 660 676 msgid "Redirects may be detected as broken links when open_basedir is on." 661 677 msgstr "" 662 678 663 #: core/core.php:3 692679 #: core/core.php:3825 664 680 msgid "If this value is zero even after several page reloads you have probably encountered a bug." 665 681 msgstr "" 666 682 667 #: core/core.php:3 816, core/core.php:3935683 #: core/core.php:3954, core/core.php:4073 668 684 msgid "[%s] Broken links detected" 669 685 msgstr "" 670 686 671 #: core/core.php:3 821687 #: core/core.php:3959 672 688 msgid "Broken Link Checker has detected %d new broken link on your site." 673 689 msgid_plural "Broken Link Checker has detected %d new broken links on your site." … … 675 691 msgstr[1] "" 676 692 677 #: core/core.php:3 852693 #: core/core.php:3990 678 694 msgid "Here's a list of the first %d broken links:" 679 695 msgid_plural "Here's a list of the first %d broken links:" … … 681 697 msgstr[1] "" 682 698 683 #: core/core.php:3 861699 #: core/core.php:3999 684 700 msgid "Here's a list of the new broken links: " 685 701 msgstr "" 686 702 687 #: core/core.php: 3870703 #: core/core.php:4008 688 704 msgid "Link text : %s" 689 705 msgstr "" 690 706 691 #: core/core.php: 3871707 #: core/core.php:4009 692 708 msgid "Link URL : <a href=\"%1$s\">%2$s</a>" 693 709 msgstr "" 694 710 695 #: core/core.php: 3872711 #: core/core.php:4010 696 712 msgid "Source : %s" 697 713 msgstr "" 698 714 699 #: core/core.php: 3886715 #: core/core.php:4024 700 716 msgid "You can see all broken links here:" 701 717 msgstr "" 702 718 703 #: core/core.php: 3940719 #: core/core.php:4078 704 720 msgid "Broken Link Checker has detected %d new broken link in your posts." 705 721 msgid_plural "Broken Link Checker has detected %d new broken links in your posts." … … 707 723 msgstr[1] "" 708 724 709 #: core/init.php:23 4725 #: core/init.php:237 710 726 msgid "Every 10 minutes" 711 727 msgstr "" 712 728 713 #: core/init.php:24 1729 #: core/init.php:244 714 730 msgid "Once Weekly" 715 731 msgstr "" 716 732 717 #: core/init.php:2 47733 #: core/init.php:250 718 734 msgid "Twice a Month" 719 735 msgstr "" 720 736 721 #: core/init.php:32 5737 #: core/init.php:323 722 738 msgid "Broken Link Checker installation failed. Try deactivating and then reactivating the plugin." 723 739 msgstr "" 724 740 725 #: core/init.php:329 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 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 730 742 msgid "Edit" 731 743 msgstr "" 732 744 733 #: includes/any-post.php:4 70, modules/containers/acf_field.php:252, modules/containers/custom_field.php:258745 #: includes/any-post.php:485, modules/containers/acf_field.php:252, modules/containers/custom_field.php:258 734 746 msgid "Move this item to the Trash" 735 747 msgstr "" 736 748 737 #: includes/any-post.php:4 72, modules/containers/acf_field.php:252, modules/containers/custom_field.php:260749 #: includes/any-post.php:487, modules/containers/acf_field.php:252, modules/containers/custom_field.php:260 738 750 msgid "Trash" 739 751 msgstr "" 740 752 741 #: includes/any-post.php:4 77, modules/containers/acf_field.php:254, modules/containers/custom_field.php:265753 #: includes/any-post.php:492, modules/containers/acf_field.php:254, modules/containers/custom_field.php:265 742 754 msgid "Delete this item permanently" 743 755 msgstr "" 744 756 745 #: includes/any-post.php:4 79, modules/containers/acf_field.php:254, modules/containers/blogroll.php:47, modules/containers/custom_field.php:267757 #: includes/any-post.php:494, modules/containers/acf_field.php:254, modules/containers/blogroll.php:47, modules/containers/custom_field.php:267 746 758 msgid "Delete" 747 759 msgstr "" 748 760 749 #: includes/any-post.php: 492761 #: includes/any-post.php:507 750 762 msgid "Preview “%s”" 751 763 msgstr "" 752 764 753 #: includes/any-post.php: 493765 #: includes/any-post.php:508 754 766 msgid "Preview" 755 767 msgstr "" 756 768 757 #: includes/any-post.php:5 00769 #: includes/any-post.php:515 758 770 msgid "View “%s”" 759 771 msgstr "" 760 772 761 #: includes/any-post.php:5 01, modules/containers/acf_field.php:258, modules/containers/comment.php:172, modules/containers/custom_field.php:272773 #: includes/any-post.php:516, modules/containers/acf_field.php:258, modules/containers/comment.php:172, modules/containers/custom_field.php:272 762 774 msgid "View" 763 775 msgstr "" 764 776 765 #: includes/any-post.php:5 20, modules/containers/acf_field.php:248, modules/containers/custom_field.php:252777 #: includes/any-post.php:535, modules/containers/acf_field.php:248, modules/containers/custom_field.php:252 766 778 msgid "Edit this item" 767 779 msgstr "" 768 780 769 #: includes/any-post.php:5 84, modules/containers/blogroll.php:83, modules/containers/comment.php:43781 #: includes/any-post.php:599, modules/containers/blogroll.php:83, modules/containers/comment.php:43 770 782 msgid "Nothing to update" 771 783 msgstr "" 772 784 773 #: includes/any-post.php: 595785 #: includes/any-post.php:613 774 786 msgid "Updating post %d failed" 775 787 msgstr "" 776 788 777 #: includes/any-post.php:6 56, modules/containers/acf_field.php:327, modules/containers/custom_field.php:341789 #: includes/any-post.php:674, modules/containers/acf_field.php:327, modules/containers/custom_field.php:341 778 790 msgid "Failed to delete post \"%1$s\" (%2$d)" 779 791 msgstr "" 780 792 781 #: includes/any-post.php:6 75, modules/containers/acf_field.php:341, modules/containers/custom_field.php:360793 #: includes/any-post.php:693, modules/containers/acf_field.php:341, modules/containers/custom_field.php:360 782 794 msgid "Can't move post \"%1$s\" (%2$d) to the trash because the trash feature is disabled" 783 795 msgstr "" 784 796 785 #: includes/any-post.php: 695, modules/containers/acf_field.php:353, modules/containers/custom_field.php:379797 #: includes/any-post.php:713, modules/containers/acf_field.php:353, modules/containers/custom_field.php:379 786 798 msgid "Failed to move post \"%1$s\" (%2$d) to the trash" 787 799 msgstr "" 788 800 789 #: includes/any-post.php:8 03801 #: includes/any-post.php:820 790 802 msgid "%d post deleted." 791 803 msgid_plural "%d posts deleted." … … 793 805 msgstr[1] "" 794 806 795 #: includes/any-post.php:8 05807 #: includes/any-post.php:822 796 808 msgid "%d page deleted." 797 809 msgid_plural "%d pages deleted." … … 799 811 msgstr[1] "" 800 812 801 #: includes/any-post.php:8 07813 #: includes/any-post.php:824 802 814 msgid "%1$d \"%2$s\" deleted." 803 815 msgid_plural "%1$d \"%2$s\" deleted." … … 805 817 msgstr[1] "" 806 818 807 #: includes/any-post.php:8 26819 #: includes/any-post.php:843 808 820 msgid "%d post moved to the Trash." 809 821 msgid_plural "%d posts moved to the Trash." … … 811 823 msgstr[1] "" 812 824 813 #: includes/any-post.php:8 28825 #: includes/any-post.php:845 814 826 msgid "%d page moved to the Trash." 815 827 msgid_plural "%d pages moved to the Trash." … … 817 829 msgstr[1] "" 818 830 819 #: includes/any-post.php:8 30831 #: includes/any-post.php:847 820 832 msgid "%1$d \"%2$s\" moved to the Trash." 821 833 msgid_plural "%1$d \"%2$s\" moved to the Trash." … … 1014 1026 msgstr "" 1015 1027 1016 #: includes/links.php:50 21028 #: includes/links.php:503 1017 1029 msgid "Link is broken." 1018 1030 msgstr "" 1019 1031 1020 #: includes/links.php:50 41032 #: includes/links.php:505 1021 1033 msgid "Link is valid." 1022 1034 msgstr "" 1023 1035 1024 #: includes/links.php:73 7, includes/links.php:840, includes/links.php:8741036 #: includes/links.php:738, includes/links.php:841, includes/links.php:875 1025 1037 msgid "Link is not valid" 1026 1038 msgstr "" 1027 1039 1028 #: includes/links.php:75 41040 #: includes/links.php:755 1029 1041 msgid "This link can not be edited because it is not used anywhere on this site." 1030 1042 msgstr "" 1031 1043 1032 #: includes/links.php:78 01044 #: includes/links.php:781 1033 1045 msgid "Failed to create a DB entry for the new URL." 1034 1046 msgstr "" 1035 1047 1036 #: includes/links.php:84 71048 #: includes/links.php:848 1037 1049 msgid "This link is not a redirect" 1038 1050 msgstr "" 1039 1051 1040 #: includes/links.php:90 1, includes/links.php:9381052 #: includes/links.php:902, includes/links.php:939 1041 1053 msgid "Couldn't delete the link's database record" 1042 1054 msgstr "" 1043 1055 1044 #: includes/links.php:101 51056 #: includes/links.php:1016 1045 1057 msgctxt "link status" 1046 1058 msgid "Unknown" 1047 1059 msgstr "" 1048 1060 1049 #: includes/links.php:102 8, modules/checkers/http.php:318, modules/extras/mediafire.php:115, modules/extras/youtube.php:136, modules/extras/youtube.php:2311061 #: 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 1050 1062 msgid "Unknown Error" 1051 1063 msgstr "" 1052 1064 1053 #: includes/links.php:105 11065 #: includes/links.php:1052 1054 1066 msgid "Not checked" 1055 1067 msgstr "" 1056 1068 1057 #: includes/links.php:105 41069 #: includes/links.php:1055 1058 1070 msgid "False positive" 1059 1071 msgstr "" 1060 1072 1061 #: includes/links.php:105 7, modules/extras/rapidshare.php:145, modules/extras/rapidshare.php:151, modules/extras/rapidshare.php:178, modules/extras/youtube.php:142, modules/extras/youtube.php:2181073 #: 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 1062 1074 msgctxt "link status" 1063 1075 msgid "OK" … … 1136 1148 msgstr "" 1137 1149 1138 #: includes/admin/links-page-js.php:64, includes/admin/links-page-js.php:65 31150 #: includes/admin/links-page-js.php:64, includes/admin/links-page-js.php:659 1139 1151 msgid "Wait..." 1140 1152 msgstr "" … … 1185 1197 msgstr "" 1186 1198 1187 #: includes/admin/links-page-js.php:691 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 1188 1204 msgid "%d instances of the link were successfully unlinked." 1189 1205 msgstr "" 1190 1206 1191 #: includes/admin/links-page-js.php: 6971207 #: includes/admin/links-page-js.php:700 1192 1208 msgid "However, %d instances couldn't be removed." 1193 1209 msgstr "" 1194 1210 1195 #: includes/admin/links-page-js.php:70 21211 #: includes/admin/links-page-js.php:705 1196 1212 msgid "The plugin failed to remove the link." 1197 1213 msgstr "" 1198 1214 1199 #: includes/admin/links-page-js.php:70 51215 #: includes/admin/links-page-js.php:708 1200 1216 msgid "The following error(s) occured :" 1201 1217 msgstr "" 1202 1218 1203 #: includes/admin/links-page-js.php:75 11219 #: includes/admin/links-page-js.php:756 1204 1220 msgid "Enter a name for the new custom filter" 1205 1221 msgstr "" 1206 1222 1207 #: includes/admin/links-page-js.php:76 31223 #: includes/admin/links-page-js.php:768 1208 1224 msgid "" 1209 1225 "You are about to delete the current filter.\n" … … 1211 1227 msgstr "" 1212 1228 1213 #: includes/admin/links-page-js.php:7 871229 #: includes/admin/links-page-js.php:792 1214 1230 msgid "" 1215 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" … … 1217 1233 msgstr "" 1218 1234 1219 #: includes/admin/links-page-js.php:80 11235 #: includes/admin/links-page-js.php:806 1220 1236 msgid "" 1221 1237 "Are you sure you want to remove the selected links? This action can't be undone.\n" … … 1223 1239 msgstr "" 1224 1240 1225 #: includes/admin/links-page-js.php:93 11241 #: includes/admin/links-page-js.php:936 1226 1242 msgid "Enter a search string first." 1227 1243 msgstr "" 1228 1244 1229 #: includes/admin/links-page-js.php:9 381245 #: includes/admin/links-page-js.php:943 1230 1246 msgid "Select one or more links to edit." 1231 1247 msgstr "" … … 1361 1377 #: includes/admin/table-printer.php:543 1362 1378 msgid "Link last checked" 1363 msgstr ""1364 1365 #: includes/admin/table-printer.php:5481366 msgid "Never"1367 1379 msgstr "" 1368 1380 … … 1479 1491 msgstr "" 1480 1492 1481 #: modules/checkers/http.php:2 951493 #: modules/checkers/http.php:289 1482 1494 msgid "Server Not Found" 1483 1495 msgstr "" 1484 1496 1485 #: modules/checkers/http.php:3 111497 #: modules/checkers/http.php:305 1486 1498 msgid "Connection Failed" 1487 1499 msgstr "" 1488 1500 1489 #: modules/checkers/http.php:359, modules/checkers/http.php:44 41501 #: modules/checkers/http.php:359, modules/checkers/http.php:448 1490 1502 msgid "HTTP code : %d" 1491 1503 msgstr "" 1492 1504 1493 #: modules/checkers/http.php:361, modules/checkers/http.php:4 461505 #: modules/checkers/http.php:361, modules/checkers/http.php:450 1494 1506 msgid "(No response)" 1495 1507 msgstr "" … … 1499 1511 msgstr "" 1500 1512 1501 #: modules/checkers/http.php:45 41513 #: modules/checkers/http.php:459 1502 1514 msgid "Request timed out." 1503 1515 msgstr "" 1504 1516 1505 #: modules/checkers/http.php:4 731506 msgid "Using Snoopy"1517 #: modules/checkers/http.php:466 1518 msgid "Using WP HTTP" 1507 1519 msgstr "" 1508 1520 … … 1680 1692 msgstr "" 1681 1693 1682 #: modules/extras/youtube.php:14 11694 #: modules/extras/youtube.php:140 1683 1695 msgid "Video OK" 1684 1696 msgstr "" 1685 1697 1686 #: modules/extras/youtube.php:15 2, modules/extras/youtube.php:1551698 #: modules/extras/youtube.php:151, modules/extras/youtube.php:154 1687 1699 msgid "Video Not Found" 1688 1700 msgstr "" 1689 1701 1690 #: modules/extras/youtube.php:17 4, modules/extras/youtube.php:1771702 #: modules/extras/youtube.php:173, modules/extras/youtube.php:176 1691 1703 msgid "Playlist Not Found" 1692 1704 msgstr "" 1693 1705 1694 #: modules/extras/youtube.php:18 41706 #: modules/extras/youtube.php:183 1695 1707 msgid "Playlist Restricted" 1696 1708 msgstr "" 1697 1709 1710 #: modules/extras/youtube.php:190 1711 msgid "This playlist has no entries or all entries have been deleted." 1712 msgstr "" 1713 1698 1714 #: modules/extras/youtube.php:191 1699 msgid "This playlist has no entries or all entries have been deleted."1700 msgstr ""1701 1702 #: modules/extras/youtube.php:1921703 1715 msgctxt "link status" 1704 1716 msgid "Empty Playlist" 1705 1717 msgstr "" 1706 1718 1707 #: modules/extras/youtube.php:20 21719 #: modules/extras/youtube.php:201 1708 1720 msgid "Video status : %1$s%2$s" 1709 1721 msgstr "" 1710 1722 1711 #: modules/extras/youtube.php:20 81723 #: modules/extras/youtube.php:207 1712 1724 msgid "Video Restricted" 1713 1725 msgstr "" 1714 1726 1715 #: modules/extras/youtube.php:21 71727 #: modules/extras/youtube.php:216 1716 1728 msgid "Playlist OK" 1717 1729 msgstr "" 1718 1730 1719 #: modules/extras/youtube.php:26 51731 #: modules/extras/youtube.php:264 1720 1732 msgid "Unknown YouTube API response received." 1721 1733 msgstr "" -
broken-link-checker/tags/1.11.13/modules/checkers/http.php
r2238832 r2312012 43 43 ); 44 44 } else { 45 //Try to load Snoopy. 46 if ( ! class_exists( 'Snoopy' ) ) { 47 $snoopy_file = ABSPATH . WPINC . '/class-snoopy.php'; 48 if ( file_exists( $snoopy_file ) ) { 49 include $snoopy_file; 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 } 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 ); 62 52 } 63 53 } … … 200 190 if ( ! blcUtility::is_safe_mode() && ! blcUtility::is_open_basedir() ) { 201 191 curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true ); 202 } 192 } else { 193 $log .= "[Warning] Could't follow the redirect URL (if any) because safemode or open base dir enabled\n"; 194 } 195 203 196 //Set maximum redirects 204 197 curl_setopt( $ch, CURLOPT_MAXREDIRS, 10 ); … … 268 261 $info = curl_getinfo( $ch ); 269 262 263 // var_dump( $info ); die(); 270 264 //Store the results 271 265 $result['http_code'] = intval( $info['http_code'] ); … … 318 312 $result['status_text'] = __( 'Unknown Error', 'broken-link-checker' ); 319 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; 320 318 } else { 321 319 $result['broken'] = $this->is_error_code( $result['http_code'] ); … … 336 334 ); 337 335 338 if ( $nobody && $result['broken'] && ! $result['timeout'] && ! $use_get ) { 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 339 //The site in question might be expecting GET instead of HEAD, so lets retry the request 340 340 //using the GET verb...but not in cases of timeout, or where we've already done it. … … 404 404 } 405 405 406 class blc SnoopyHttp extends blcHttpCheckerBase {406 class blcWPHttp extends blcHttpCheckerBase { 407 407 408 408 function check( $url ) { 409 $url = $this->clean_url( $url ); 409 410 // $url = $this->clean_url( $url ); 410 411 //Note : Snoopy doesn't work too well with HTTPS URLs. 411 412 … … 423 424 424 425 //Fetch the URL with Snoopy 425 $snoopy = new Snoopy; 426 $snoopy->read_timeout = $timeout; //read timeout in seconds 427 $snoopy->agent = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)'; //masquerade as IE 7 428 $snoopy->referer = home_url(); //valid referer helps circumvent some hotlink protection schemes 429 $snoopy->maxlength = 1024 * 5; //load up to 5 kilobytes 430 $snoopy->fetch( $this->urlencodefix( $url ) ); 431 432 $result['request_duration'] = microtime_float() - $start_time; 433 434 $result['http_code'] = $snoopy->status; //HTTP status code 435 //Snoopy returns -100 on timeout 436 if ( -100 == $result['http_code'] ) { 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 ) ) { 437 436 $result['http_code'] = 0; 438 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']; 439 443 } 440 444 … … 448 452 $log .= " ===\n\n"; 449 453 450 if ( $snoopy->error ) { 451 $log .= $snoopy->error . "\n"; 452 } 453 if ( $snoopy->timed_out ) { 454 if ( $result['message'] ) { 455 $log .= $result['message'] . "\n"; 456 } 457 458 if ( is_wp_error( $request ) ) { 454 459 $log .= __( 'Request timed out.', 'broken-link-checker' ) . "\n"; 455 460 $result['timeout'] = true; 456 461 } 457 462 458 if ( is_array( $snoopy->headers ) ) {459 $log .= implode( '', $snoopy->headers ) . "\n"; //those headers already contain newlines460 }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 463 //Determine if the link counts as "broken" 471 464 $result['broken'] = $this->is_error_code( $result['http_code'] ) || $result['timeout']; 472 465 473 $log .= '<em>(' . __( 'Using Snoopy', 'broken-link-checker' ) . ')</em>';466 $log .= '<em>(' . __( 'Using WP HTTP', 'broken-link-checker' ) . ')</em>'; 474 467 $result['log'] = $log; 468 469 $result['final_url'] = $url; 475 470 476 471 //The hash should contain info about all pieces of data that pertain to determining if the -
broken-link-checker/tags/1.11.13/modules/extras/youtube.php
r2265659 r2312012 130 130 $result['status_code'] = BLC_LINK_STATUS_WARNING; 131 131 $result['warning'] = true; 132 133 if ( isset( $api['error']['message'] ) ) { 134 $result['status_text'] = $api['error']['message']; 132 if ( isset( $api['error']['errors'] ) ) { 133 $result['status_text'] = $api['error']['errors'][0]['reason']; 135 134 } else { 136 135 $result['status_text'] = __( 'Unknown Error', 'broken-link-checker' ); … … 288 287 $conf = blc_get_configuration(); 289 288 290 //todo: Remove defualt API key. 291 $api_key = ! empty( $conf->options['youtube_api_key'] ) ? $conf->options['youtube_api_key'] : 'AIzaSyCE2HKP0BneF8YdVT45UpadENdBeYCzFrE'; 289 $api_key = ! empty( $conf->options['youtube_api_key'] ) ? $conf->options['youtube_api_key'] : ''; 292 290 293 291 return apply_filters( 'blc_youtube_api_key', $conf->options['youtube_api_key'] ); -
broken-link-checker/tags/1.11.13/readme.txt
r2265659 r2312012 5 5 Requires at least: 4.6 6 6 Tested up to: 5.4 7 Stable tag: 1.11.1 27 Stable tag: 1.11.13 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 38 38 * "Unlink" removes the link but leaves the link text intact. 39 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 fr om 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.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 41 42 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. … … 68 68 69 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 70 84 = 1.11.12 = 71 85 * Added an interface to use personal YouTube API Key -
broken-link-checker/tags/1.11.13/uninstall.php
r2238832 r2312012 11 11 // Remove the plugin's settings & installation log. 12 12 delete_option( 'wsblc_options' ); 13 delete_option( 'blc_activation_enabled' ); 13 14 delete_option( 'blc_installation_log' ); 14 15 -
broken-link-checker/trunk/broken-link-checker.php
r2265659 r2312012 1 1 <?php 2 3 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 4 10 * Plugin Name: Broken Link Checker 5 11 * Plugin URI: https://wordpress.org/plugins/broken-link-checker/ 6 12 * Description: Checks your blog for broken links and missing images and notifies you on the dashboard if any are found. 7 * Version: 1.11.1 213 * Version: 1.11.13 8 14 * Author: WPMU DEV 9 15 * Author URI: https://premium.wpmudev.org/ … … 11 17 * License: GPLv2 or later 12 18 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 13 */19 */ 14 20 15 21 /* … … 28 34 */ 29 35 30 // Path to this file36 // Path to this file. 31 37 if ( ! defined( 'BLC_PLUGIN_FILE' ) ) { 32 38 define( 'BLC_PLUGIN_FILE', __FILE__ ); 33 39 } 34 40 35 // Path to the plugin's directory41 // Path to the plugin's directory. 36 42 if ( ! defined( 'BLC_DIRECTORY' ) ) { 37 43 define( 'BLC_DIRECTORY', dirname( __FILE__ ) ); 38 44 } 39 45 40 // Load the actual plugin46 // Load the actual plugin. 41 47 require 'core/init.php'; -
broken-link-checker/trunk/core/core.php
r2265659 r2312012 1 1 <?php 2 3 2 /** 4 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 5 8 */ 9 6 10 if ( ! function_exists( 'microtime_float' ) ) { 11 /** 12 * Calcualate microtime_float 13 * 14 * @since 1.0.0 15 */ 7 16 function microtime_float() { 8 17 list( $usec, $sec ) = explode( ' ', microtime() ); … … 17 26 18 27 if ( ! class_exists( 'wsBrokenLinkChecker' ) ) { 28 29 /** 30 * Broken Link Checker core 31 */ 19 32 class wsBrokenLinkChecker { 20 33 21 var $conf; 22 var $loader; 23 var $my_basename = ''; 24 var $db_version; //The required version of the plugin's DB schema. 25 var $execution_start_time; 26 var $is_textdomain_loaded = false; 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; 27 75 28 76 /** 29 77 * Class constructor 30 78 * 31 * @param string $loader The fully qualified filename of the loader script that WP identifies as the "main" plugin file. 32 * @param blcConfigurationManager $conf An instance of the configuration manager 33 * @return void 34 */ 35 function __construct( $loader, $conf ) { 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 ) { 36 85 $this->db_version = BLC_DATABASE_VERSION; 37 86 … … 42 91 $this->load_language(); 43 92 44 //Unlike the activation hook, the deactivation callback *can* be registered in this file 45 //because deactivation happens after this class has already been instantiated (durinng the 46 //'init' action). 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 47 97 register_deactivation_hook( $loader, array( $this, 'deactivation' ) ); 48 98 49 99 add_action( 'admin_menu', array( $this, 'admin_menu' ) ); 50 100 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 widget101 // 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. 55 105 add_action( 'wp_dashboard_setup', array( $this, 'hook_wp_dashboard_setup' ) ); 56 106 57 // AJAXy hooks107 // AJAXy hooks. 58 108 add_action( 'wp_ajax_blc_full_status', array( $this, 'ajax_full_status' ) ); 59 109 add_action( 'wp_ajax_blc_dashboard_status', array( $this, 'ajax_dashboard_status' ) ); … … 70 120 add_action( 'wp_ajax_blc_undismiss', array( $this, 'ajax_undismiss' ) ); 71 121 72 // Add/remove Cron events122 // Add/remove Cron events. 73 123 $this->setup_cron_events(); 74 124 75 // Set hooks that listen for our Cron actions125 // Set hooks that listen for our Cron actions. 76 126 add_action( 'blc_cron_email_notifications', array( $this, 'maybe_send_email_notifications' ) ); 77 127 add_action( 'blc_cron_check_links', array( $this, 'cron_check_links' ) ); 78 128 add_action( 'blc_cron_database_maintenance', array( $this, 'database_maintenance' ) ); 79 80 //Set the footer hook that will call the worker function via AJAX. 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. 81 132 add_action( 'admin_footer', array( $this, 'admin_footer' ) ); 82 // Add a "Screen Options" panel to the "Broken Links" page133 // Add a "Screen Options" panel to the "Broken Links" page. 83 134 add_screen_options_panel( 84 135 'blc-screen-options', … … 90 141 ); 91 142 92 // Display an explanatory note on the "Tools -> Broken Links -> Warnings" page.143 // Display an explanatory note on the "Tools -> Broken Links -> Warnings" page. 93 144 add_action( 'admin_notices', array( $this, 'show_warnings_section_notice' ) ); 94 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 95 149 } 96 150 … … 100 154 * @return void 101 155 */ 102 function admin_footer() {156 public function admin_footer() { 103 157 if ( ! $this->conf->options['run_in_dashboard'] ) { 104 158 return; … … 113 167 function blcDoWork(){ 114 168 $.post( 115 "<?php echo admin_url( 'admin-ajax.php'); ?>",169 "<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>", 116 170 { 117 171 'action' : 'blc_work', … … 135 189 * Check if an URL matches the exclusion list. 136 190 * 137 * @param string $url 191 * @param string $url The url to exclude. 138 192 * @return bool 139 193 */ 140 function is_excluded( $url ) {194 public function is_excluded( $url ) { 141 195 if ( ! is_array( $this->conf->options['exclusion_list'] ) ) { 142 196 return false; … … 150 204 } 151 205 152 function dashboard_widget() { 206 /** 207 * Get dashboard_widget 208 */ 209 public function dashboard_widget() { 153 210 ?> 154 <p id='wsblc_activity_box'><?php _e( 'Loading...', 'broken-link-checker' ); ?></p>211 <p id='wsblc_activity_box'><?php esc_html_e( 'Loading...', 'broken-link-checker' ); ?></p> 155 212 <script type='text/javascript'> 156 213 jQuery( function($){ … … 159 216 function blcDashboardStatus(){ 160 217 $.getJSON( 161 "<?php echo admin_url( 'admin-ajax.php'); ?>",218 "<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>", 162 219 { 163 220 'action' : 'blc_dashboard_status', … … 176 233 <?php } ?> 177 234 } else { 178 $('#wsblc_activity_box').html('<?php _e( '[ Network error ]', 'broken-link-checker' ); ?>');235 $('#wsblc_activity_box').html('<?php esc_html_e( '[ Network error ]', 'broken-link-checker' ); ?>'); 179 236 } 180 237 … … 191 248 } 192 249 193 function dashboard_widget_control( 194 /** @noinspection PhpUnusedParameterInspection */ $widget_id, $form_inputs = array() 195 ) { 196 if ( 'POST' == $_SERVER['REQUEST_METHOD'] && 'blc_dashboard_widget' == $_POST['widget_id'] ) { 197 //It appears $form_inputs isn't used in the current WP version, so lets just use $_POST 198 $this->conf->options['autoexpand_widget'] = ! empty( $_POST['blc-autoexpand'] ); 199 $this->conf->save_options(); 200 } 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; 201 269 202 270 ?> … … 207 275 echo 'checked="checked"';} 208 276 ?> 209 />210 <?php _e( 'Automatically expand the widget if broken links have been detected', 'broken-link-checker' ); ?>277 /> 278 <?php esc_html_e( 'Automatically expand the widget if broken links have been detected', 'broken-link-checker' ); ?> 211 279 </label></p> 212 280 <?php 213 } 214 215 function admin_print_scripts() {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 function enqueue_settings_scripts() {221 // jQuery UI is used on the settings page222 wp_enqueue_script( 'jquery-ui-core' ); // Used for background color animation281 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. 223 291 wp_enqueue_script( 'jquery-ui-dialog' ); 224 292 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 function enqueue_link_page_scripts() { 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() { 229 300 wp_enqueue_script( 'jquery-ui-core' ); 230 wp_enqueue_script( 'jquery-ui-dialog' ); // Used for the search form231 wp_enqueue_script( 'jquery-color' ); // Used for background color animation232 wp_enqueue_script( 'sprintf', plugins_url( 'js/sprintf.js', BLC_PLUGIN_FILE ) ); //Used in error messages301 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. 233 304 } 234 305 … … 238 309 * @return void 239 310 */ 240 function initiate_recheck() {241 global $wpdb; / ** @var wpdb $wpdb */242 243 // Delete all discovered instances244 $wpdb->query( "TRUNCATE {$wpdb->prefix}blc_instances" ); 245 246 // Delete all discovered links247 $wpdb->query( "TRUNCATE {$wpdb->prefix}blc_links" ); 248 249 // Mark all posts, custom fields and bookmarks for processing.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. 250 321 blc_resynch( true ); 251 322 } … … 256 327 * @return void 257 328 */ 258 function deactivation() {259 // Remove our Cron events329 public function deactivation() { 330 // Remove our Cron events. 260 331 wp_clear_scheduled_hook( 'blc_cron_check_links' ); 261 332 wp_clear_scheduled_hook( 'blc_cron_email_notifications' ); 262 333 wp_clear_scheduled_hook( 'blc_cron_database_maintenance' ); 263 wp_clear_scheduled_hook( 'blc_cron_check_news' ); //Unused event. 264 //Note the deactivation time for each module. This will help them 265 //synch up propely if/when the plugin is reactivated. 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. 266 338 $moduleManager = blcModuleManager::getInstance(); 267 339 $the_time = current_time( 'timestamp' ); … … 280 352 * @return void 281 353 */ 282 function database_maintenance() {354 public function database_maintenance() { 283 355 blcContainerHelper::cleanup_containers(); 284 356 blc_cleanup_instances(); … … 294 366 * @return void 295 367 */ 296 function admin_menu() {368 public function admin_menu() { 297 369 if ( current_user_can( 'manage_options' ) ) { 298 370 add_filter( 'plugin_action_links', array( $this, 'plugin_action_links' ), 10, 2 ); … … 309 381 $menu_title = __( 'Broken Links', 'broken-link-checker' ); 310 382 if ( $this->conf->options['show_link_count_bubble'] ) { 311 // To make it easier to notice when broken links appear, display the current number of312 // 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).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). 314 386 $blc_link_query = blcLinkQuery::getInstance(); 315 387 $broken_links = $blc_link_query->get_filter_links( 'broken', array( 'count_only' => true ) ); 316 388 if ( $broken_links > 0 ) { 317 // TODO: Appropriating existing CSS classes for my own purposes is hacky. Fix eventually.389 // TODO: Appropriating existing CSS classes for my own purposes is hacky. Fix eventually. 318 390 $menu_title .= sprintf( 319 391 ' <span class="update-plugins"><span class="update-count blc-menu-bubble">%d</span></span>', … … 330 402 ); 331 403 332 // Add plugin-specific scripts and CSS only to the it's own pages404 // Add plugin-specific scripts and CSS only to the it's own pages. 333 405 add_action( 'admin_print_styles-' . $options_page_hook, array( $this, 'options_page_css' ) ); 334 406 add_action( 'admin_print_styles-' . $links_page_hook, array( $this, 'links_page_css' ) ); … … 336 408 add_action( 'admin_print_scripts-' . $links_page_hook, array( $this, 'enqueue_link_page_scripts' ) ); 337 409 338 // Make the Settings page link to the link list410 // Make the Settings page link to the link list. 339 411 add_screen_meta_link( 340 412 'blc-links-page-link', … … 347 419 348 420 /** 349 * plugin_action_links()421 * Function plugin_action_links() 350 422 * Handler for the 'plugin_action_links' hook. Adds a "Settings" link to this plugin's entry 351 423 * on the plugin list. … … 355 427 * @return array 356 428 */ 357 function plugin_action_links( $links, $file ) {358 if ( $file == $this->my_basename ) {429 public function plugin_action_links( $links, $file ) { 430 if ( $file === $this->my_basename ) { 359 431 $links[] = "<a href='options-general.php?page=link-checker-settings'>" . __( 'Settings' ) . '</a>'; 360 432 } … … 362 434 } 363 435 364 function options_page() { 436 /** 437 * Function to show options page 438 */ 439 public function options_page() { 365 440 $moduleManager = blcModuleManager::getInstance(); 366 441 367 // Prior to 1.5.2 (released 2012-05-27), there was a bug that would cause the donation flag to be368 // set incorrectly. So we'll unset the flag in that case.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. 369 444 $reset_donation_flag = ( $this->conf->get( 'first_installation_timestamp', 0 ) < strtotime( '2012-05-27 00:00' ) ) && ! $this->conf->get( 'donation_flag_fixed', false ); 370 445 … … 378 453 $this->initiate_recheck(); 379 454 380 // Redirect back to the settings page455 // Redirect back to the settings page. 381 456 $base_url = remove_query_arg( array( '_wpnonce', 'noheader', 'updated', 'error', 'action', 'message' ) ); 382 457 wp_redirect( … … 405 480 $cleanPost = $_POST; 406 481 if ( function_exists( 'wp_magic_quotes' ) ) { 407 $cleanPost = stripslashes_deep( $cleanPost ); // Ceterum censeo, WP shouldn't mangle superglobals.408 } 409 410 // Activate/deactivate modules482 $cleanPost = stripslashes_deep( $cleanPost ); // Ceterum censeo, WP shouldn't mangle superglobals. 483 } 484 485 // Activate/deactivate modules. 411 486 if ( ! empty( $_POST['module'] ) ) { 412 487 $active = array_keys( $_POST['module'] ); … … 414 489 } 415 490 416 // Only post statuses that actually exist can be selected491 // Only post statuses that actually exist can be selected. 417 492 if ( isset( $_POST['enabled_post_statuses'] ) && is_array( $_POST['enabled_post_statuses'] ) ) { 418 493 $available_statuses = get_post_stati(); … … 489 564 $acf_fields_diff2 = array_diff( $this->conf->options['acf_fields'], $new_acf_fields ); 490 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'] ); 491 569 492 570 //Turning off warnings turns existing warnings into "broken" links. … … 568 646 if ( $this->conf->options['logging_enabled'] ) { 569 647 if ( $this->conf->options['custom_log_file_enabled'] ) { 648 570 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 } 571 667 } else { 572 668 //Default log file is /wp-content/uploads/broken-link-checker/blc-log.txt … … 584 680 585 681 $this->conf->options['log_file'] = $log_file; 586 587 //Attempt to create the log file if not already there. 682 $this->conf->options['clear_log_on'] = strval( $cleanPost['clear_log_on'] ); 683 684 // Attempt to create the log file if not already there. 588 685 if ( ! is_file( $log_file ) ) { 589 686 file_put_contents( $log_file, '' ); … … 1010 1107 </tr> 1011 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 1012 1120 </table> 1013 1121 … … 1319 1427 <td> 1320 1428 1321 <div id="blc-logging-options">1429 <div class="blc-logging-options"> 1322 1430 1323 1431 <p> … … 1350 1458 </td> 1351 1459 </tr> 1352 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> 1353 1486 1354 1487 <tr valign="top"> … … 3612 3745 3613 3746 //Snoopy presence 3614 if ( class_exists( ' Snoopy' ) || file_exists( ABSPATH . WPINC . '/class-snoopy.php' ) ) {3747 if ( class_exists( 'WP_Http' ) || file_exists( ABSPATH . WPINC . '/class-http.php' ) ) { 3615 3748 $data = array( 3616 3749 'state' => 'ok', … … 3769 3902 global $wpdb; /** @var wpdb $wpdb */ 3770 3903 3771 if ( ! ( $this->conf->options['send_email_notifications'] || $this->conf->options['send_authors_email_notifications'] ) ) { 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 ) ) { 3772 3910 return; 3773 3911 } … … 4012 4150 wp_schedule_event( time(), 'daily', 'blc_cron_database_maintenance' ); 4013 4151 } 4014 } 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 4015 4212 4016 4213 /** -
broken-link-checker/trunk/core/init.php
r2265659 r2312012 43 43 define( 'BLC_FOR_PARSING', 'parse' ); 44 44 define( 'BLC_FOR_DISPLAY', 'display' ); 45 define( 'BLC_DATABASE_VERSION', 1 0);45 define( 'BLC_DATABASE_VERSION', 16 ); 46 46 47 47 /*********************************************** … … 97 97 'logging_enabled' => false, 98 98 'log_file' => '', 99 'incorrect_path' => false, 100 'clear_log_on' => '', 99 101 'custom_log_file_enabled' => false, 100 102 'installation_complete' => false, … … 105 107 'show_link_actions' => array( 'blc-deredirect-action' => false ), //Visible link actions. 106 108 'youtube_api_key' => '', 109 'blc_post_modified' => '', 107 110 ) 108 111 ); … … 257 260 ************************************************/ 258 261 259 //Execute the installation/upgrade script when the plugin is activated. 260 function blc_activation_hook() { 261 require BLC_DIRECTORY . '/includes/activation.php'; 262 } 263 264 register_activation_hook( BLC_PLUGIN_FILE, 'blc_activation_hook' ); 262 require BLC_DIRECTORY . '/includes/activation.php'; 265 263 266 264 //Load the plugin if installed successfully … … 325 323 '<strong>' . __( 'Broken Link Checker installation failed. Try deactivating and then reactivating the plugin.', 'broken-link-checker' ) . '</strong>', 326 324 ); 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 325 333 326 if ( ! $blc_config_manager->db_option_loaded ) { -
broken-link-checker/trunk/css/links-page.css
r2238832 r2312012 30 30 31 31 th.column-new-link-text { 32 32 33 33 } 34 34 35 35 th.column-used-in { 36 36 37 37 } 38 38 … … 63 63 /* Cells */ 64 64 65 td.column-new-url, 65 td.column-new-url, 66 66 td.column-used-in 67 67 { … … 107 107 } 108 108 109 .blc-permanently-broken { 110 109 .blc-permanently-broken { 110 111 111 } 112 112 … … 200 200 .compact .link-last-checked, 201 201 .compact .link-broken-for, 202 .compact .link-text 202 .compact .link-text 203 203 { 204 204 display: none; … … 220 220 overflow: hidden; 221 221 222 background-image: none; 222 background-image: none; 223 223 background-position: left center; 224 224 background-repeat: no-repeat; … … 259 259 260 260 td.column-link-text, td.column-new-link-text { 261 cursor: pointer; 261 cursor: pointer; 262 262 } 263 263 … … 410 410 border: 3px solid #EEEEEE; 411 411 padding: 12px; 412 412 413 413 border-radius: 6px; 414 414 -moz-border-radius: 6px; … … 450 450 margin-left: 8px; 451 451 margin-right: 8px; 452 margin-top: 8px; 452 margin-top: 8px; 453 453 } 454 454 … … 504 504 } 505 505 } 506 th#cb { 507 vertical-align: middle; 508 padding: 6px 0 3px; 509 } -
broken-link-checker/trunk/includes/activation.php
r2238832 r2312012 1 1 <?php 2 3 if ( get_option( 'blc_activation_enabled' ) ) { 4 return; 5 } 2 6 3 7 global $blclog, $blc_config_manager, $wpdb; … … 117 121 $blclog->save(); 118 122 123 // for multisite support. 124 update_option( 'blc_activation_enabled', true ); -
broken-link-checker/trunk/includes/admin/db-upgrade.php
r2238832 r2312012 246 246 ( $definition['collation'] && ( $tablefield->Collation != $definition['collation'] ) ) || 247 247 ( $definition['null_allowed'] && ( 'NO' == $tablefield->Null ) ) || 248 ( ! $definition['null_allowed'] && ( 'NO' == $tablefield->Null ) ) ||249 248 ( $tablefield->Default !== $definition['default'] ); 250 249 -
broken-link-checker/trunk/includes/admin/links-page-js.php
r2238832 r2312012 651 651 var me = this; 652 652 var master = $(me).parents('.blc-row'); 653 $(me).html('<?php echo esc_js( __( 'Wait...', 'broken-link-checker' ) ); ?>'); 654 655 //Find the link ID 656 var link_id = master.attr('id').split('-')[2]; 657 658 $.post( 659 "<?php echo admin_url( 'admin-ajax.php' ); ?>", 660 { 661 'action' : 'blc_unlink', 662 'link_id' : link_id, 663 '_ajax_nonce' : '<?php echo esc_js( wp_create_nonce( 'blc_unlink' ) ); ?>' 664 }, 665 function (data, textStatus){ 666 eval('data = ' + data); 667 668 if ( data && (typeof(data['error']) != 'undefined') ){ 669 //An internal error occurred before the link could be edited. 670 //data.error is an error message. 671 alert(data.error); 672 } else { 673 if ( data.errors.length == 0 ){ 674 //The link was successfully removed. Hide its details. 675 $('#link-details-'+link_id).hide(); 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; 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); 685 675 } else { 686 //Build and display an error message. 687 var msg = ''; 688 689 if ( data.cnt_okay > 0 ){ 690 msg = msg + sprintf( 691 '<?php echo esc_js( __( '%d instances of the link were successfully unlinked.', 'broken-link-checker' ) ); ?>\n', 692 data.cnt_okay 693 ); 694 695 if ( data.cnt_error > 0 ){ 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 ){ 696 693 msg = msg + sprintf( 697 '<?php echo esc_js( __( "However, %d instances couldn't be removed.", 'broken-link-checker' ) ); ?>\n',698 data.cnt_ error694 '<?php echo esc_js( __( '%d instances of the link were successfully unlinked.', 'broken-link-checker' ) ); ?>\n', 695 data.cnt_okay 699 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'; 700 706 } 701 } else { 702 msg = msg + '<?php echo esc_js( __( 'The plugin failed to remove the link.', 'broken-link-checker' ) ); ?>\n'; 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); 703 713 } 704 705 msg = msg + '\n<?php echo esc_js( __( 'The following error(s) occured :', 'broken-link-checker' ) ); ?>\n* ';706 msg = msg + data.errors.join('\n* ');707 708 //Show the error message709 alert(msg);710 714 } 715 716 $(me).html('<?php echo esc_js( __( 'Unlink', 'broken-link-checker' ) ); ?>'); 711 717 } 712 713 $(me).html('<?php echo esc_js( __( 'Unlink', 'broken-link-checker' ) ); ?>'); 714 } 715 ); 718 ); 719 720 } 716 721 }); 717 722 -
broken-link-checker/trunk/includes/admin/options-page-js.php
r2238832 r2312012 131 131 //Enable/disable log-related options depending on whether "Enable logging" is on. 132 132 function blcToggleLogOptions() { 133 $(' #blc-logging-options')134 .find('input ')133 $('.blc-logging-options') 134 .find('input,select') 135 135 .prop('disabled', ! $('#logging_enabled').is(':checked')); 136 136 } -
broken-link-checker/trunk/includes/any-post.php
r2265659 r2312012 243 243 } else { 244 244 //Delete synch records corresponding to posts that no longer exist. 245 $blclog->log( '...... Deleting synch records for removed posts' ); 246 $start = microtime( true ); 247 $q = "DELETE synch.* 248 FROM 249 {$wpdb->prefix}blc_synch AS synch LEFT JOIN {$wpdb->posts} AS posts 250 ON posts.ID = synch.container_id 251 WHERE 252 synch.container_type IN (%s) AND posts.ID IS NULL"; 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 253 259 $q = sprintf( 254 260 $q, 255 "'" . implode( "', '", $escaped_post_types ) . "'" 256 ); 261 "'" . implode( "', '", $all_posts_id ) . "'" 262 ); 263 257 264 $wpdb->query( $q ); 258 265 $elapsed = microtime( true ) - $start; … … 260 267 $blclog->log( sprintf( '...... %d rows deleted in %.3f seconds', $wpdb->rows_affected, $elapsed ) ); 261 268 262 //Delete records where the post status is not one of the enabled statuses. 263 $blclog->log( '...... Deleting synch records for posts that have a disallowed status' ); 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( "', '", $escaped_post_statuses ) . "'" 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 ) ); 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 ) ); 280 295 281 296 //Remove the 'synched' flag from all posts that have been updated … … 586 601 } 587 602 588 $post_id = wp_update_post( $this->wrapped_object, true ); 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 ); 589 607 590 608 if ( is_wp_error( $post_id ) ) { … … 604 622 * Update the the links on pagebuilders 605 623 * 606 * @param $post_id Post ID of whose content to update624 * @param int $post_id Post ID of whose content to update. 607 625 */ 608 626 function update_pagebuilders( $post_id ) { … … 717 735 } 718 736 719 720 721 737 /** 722 738 * Universal manager usable for most post types. … … 727 743 class blcAnyPostContainerManager extends blcContainerManager { 728 744 var $container_class_name = 'blcAnyPostContainer'; 729 var $fields = array( 'post_content' => 'html' );745 var $fields = array( 'post_content' => 'html', 'post_excerpt' => 'html' ); 730 746 731 747 function init() { … … 748 764 */ 749 765 function get_containers( $containers, $purpose = '', $load_wrapped_objects = false ) { 766 global $blclog; 750 767 $containers = $this->make_containers( $containers ); 751 768 -
broken-link-checker/trunk/includes/checkers.php
r2238832 r2312012 90 90 $manager = blcModuleManager::getInstance(); 91 91 $active_checkers = $manager->get_active_by_category( 'checker' ); 92 93 92 foreach ( $active_checkers as $module_id => $module_data ) { 94 93 //Try the URL pattern in the header first. If it doesn't match, -
broken-link-checker/trunk/includes/links.php
r2238832 r2312012 284 284 $results = array_merge( $defaults, $rez ); 285 285 286 286 287 //Some HTTP errors can be treated as warnings. 287 288 $results = $this->decide_warning_state( $results ); -
broken-link-checker/trunk/languages/broken-link-checker.pot
r2265659 r2312012 1 # Copyright (C) 2020 Broken Link Checker 1.11.1 22 # This file is distributed under the same license as the Broken Link Checker 1.11.1 2package.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 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Broken Link Checker 1.11.1 2\n"5 "Project-Id-Version: Broken Link Checker 1.11.13\n" 6 6 "MIME-Version: 1.0\n" 7 7 "Content-Type: text/plain; charset=UTF-8\n" … … 14 14 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 15 15 16 #: core/core.php: 154, includes/admin/links-page-js.php:4516 #: core/core.php:211, includes/admin/links-page-js.php:45 17 17 msgid "Loading..." 18 18 msgstr "" 19 19 20 #: core/core.php: 178, includes/admin/options-page-js.php:1820 #: core/core.php:235, includes/admin/options-page-js.php:18 21 21 msgid "[ Network error ]" 22 22 msgstr "" 23 23 24 #: core/core.php:2 1024 #: core/core.php:278 25 25 msgid "Automatically expand the widget if broken links have been detected" 26 26 msgstr "" 27 27 28 #: core/core.php:3 0228 #: core/core.php:374 29 29 msgid "Link Checker Settings" 30 30 msgstr "" 31 31 32 #: core/core.php:3 0332 #: core/core.php:375 33 33 msgid "Link Checker" 34 34 msgstr "" 35 35 36 #: core/core.php:3 09, includes/link-query.php:3736 #: core/core.php:381, includes/link-query.php:37 37 37 msgid "Broken Links" 38 38 msgstr "" 39 39 40 #: core/core.php:3 2540 #: core/core.php:397 41 41 msgid "View Broken Links" 42 42 msgstr "" 43 43 44 #: core/core.php: 34144 #: core/core.php:413 45 45 msgid "Go to Broken Links" 46 46 msgstr "" 47 47 48 #: core/core.php: 35948 #: core/core.php:431 49 49 msgid "Settings" 50 50 msgstr "" 51 51 52 #: core/core.php: 394, includes/admin/table-printer.php:292, includes/admin/table-printer.php:71052 #: core/core.php:469, includes/admin/table-printer.php:292, includes/admin/table-printer.php:710 53 53 msgid "Edit URL" 54 54 msgstr "" 55 55 56 #: core/core.php: 395, includes/admin/links-page-js.php:713, includes/admin/table-printer.php:297, includes/admin/table-printer.php:71356 #: core/core.php:470, includes/admin/links-page-js.php:716, includes/admin/table-printer.php:297, includes/admin/table-printer.php:713 57 57 msgid "Unlink" 58 58 msgstr "" 59 59 60 #: core/core.php: 396, includes/admin/links-page-js.php:111, includes/admin/table-printer.php:71960 #: core/core.php:471, includes/admin/links-page-js.php:111, includes/admin/table-printer.php:719 61 61 msgid "Not broken" 62 62 msgstr "" 63 63 64 #: core/core.php: 397, includes/admin/table-printer.php:296, includes/admin/table-printer.php:72764 #: core/core.php:472, includes/admin/table-printer.php:296, includes/admin/table-printer.php:727 65 65 msgid "Dismiss" 66 66 msgstr "" 67 67 68 #: core/core.php: 398, includes/admin/table-printer.php:293, includes/admin/table-printer.php:73968 #: core/core.php:473, includes/admin/table-printer.php:293, includes/admin/table-printer.php:739 69 69 msgid "Recheck" 70 70 msgstr "" 71 71 72 #: core/core.php: 399, includes/admin/table-printer.php:74772 #: core/core.php:474, includes/admin/table-printer.php:747 73 73 msgctxt "link action; replace one redirect with a direct link" 74 74 msgid "Fix redirect" 75 75 msgstr "" 76 76 77 #: core/core.php: 65377 #: core/core.php:750 78 78 msgid "Settings saved." 79 79 msgstr "" 80 80 81 #: core/core.php: 65981 #: core/core.php:756 82 82 msgid "Thank you for your donation!" 83 83 msgstr "" 84 84 85 #: core/core.php: 66785 #: core/core.php:764 86 86 msgid "Complete site recheck started." 87 87 msgstr "" 88 88 89 #: core/core.php: 69089 #: core/core.php:787 90 90 msgid "General" 91 91 msgstr "" 92 92 93 #: core/core.php: 69193 #: core/core.php:788 94 94 msgid "Look For Links In" 95 95 msgstr "" 96 96 97 #: core/core.php: 69297 #: core/core.php:789 98 98 msgid "Which Links To Check" 99 99 msgstr "" 100 100 101 #: core/core.php: 693101 #: core/core.php:790 102 102 msgid "Protocols & APIs" 103 103 msgstr "" 104 104 105 #: core/core.php: 694105 #: core/core.php:791 106 106 msgid "Advanced" 107 107 msgstr "" 108 108 109 #: core/core.php: 709109 #: core/core.php:806 110 110 msgid "Broken Link Checker Options" 111 111 msgstr "" 112 112 113 #: core/core.php: 753, includes/admin/table-printer.php:215113 #: core/core.php:850, includes/admin/table-printer.php:215 114 114 msgid "Status" 115 115 msgstr "" 116 116 117 #: core/core.php: 755, includes/admin/options-page-js.php:56117 #: core/core.php:852, includes/admin/options-page-js.php:56 118 118 msgid "Show debug info" 119 119 msgstr "" 120 120 121 #: core/core.php: 783121 #: core/core.php:880 122 122 msgid "Check each link" 123 123 msgstr "" 124 124 125 #: core/core.php: 788125 #: core/core.php:885 126 126 msgid "Every %s hours" 127 127 msgstr "" 128 128 129 #: core/core.php: 797129 #: core/core.php:894 130 130 msgid "Existing links will be checked this often. New links will usually be checked ASAP." 131 131 msgstr "" 132 132 133 #: core/core.php: 804133 #: core/core.php:901 134 134 msgid "E-mail notifications" 135 135 msgstr "" 136 136 137 #: core/core.php: 814137 #: core/core.php:911 138 138 msgid "Send me e-mail notifications about newly detected broken links" 139 139 msgstr "" 140 140 141 #: core/core.php: 826141 #: core/core.php:923 142 142 msgid "Send authors e-mail notifications about broken links in their posts" 143 143 msgstr "" 144 144 145 #: core/core.php: 833145 #: core/core.php:930 146 146 msgid "Notification e-mail address" 147 147 msgstr "" 148 148 149 #: core/core.php: 845149 #: core/core.php:942 150 150 msgid "Leave empty to use the e-mail address specified in Settings → General." 151 151 msgstr "" 152 152 153 #: core/core.php: 852153 #: core/core.php:949 154 154 msgid "Link tweaks" 155 155 msgstr "" 156 156 157 #: core/core.php: 862157 #: core/core.php:959 158 158 msgid "Apply custom formatting to broken links" 159 159 msgstr "" 160 160 161 #: core/core.php: 867, core/core.php:910161 #: core/core.php:964, core/core.php:1007 162 162 msgid "Edit CSS" 163 163 msgstr "" 164 164 165 #: core/core.php: 889165 #: core/core.php:986 166 166 msgid "Example : Lorem ipsum <a %s>broken link</a>, dolor sit amet." 167 167 msgstr "" 168 168 169 #: core/core.php: 892, core/core.php:936169 #: core/core.php:989, core/core.php:1033 170 170 msgid "Click \"Save Changes\" to update example output." 171 171 msgstr "" 172 172 173 #: core/core.php: 905173 #: core/core.php:1002 174 174 msgid "Apply custom formatting to removed links" 175 175 msgstr "" 176 176 177 #: core/core.php: 933177 #: core/core.php:1030 178 178 msgid "Example : Lorem ipsum <span %s>removed link</span>, dolor sit amet." 179 179 msgstr "" 180 180 181 #: core/core.php: 950181 #: core/core.php:1047 182 182 msgid "Stop search engines from following broken links" 183 183 msgstr "" 184 184 185 #: core/core.php: 956185 #: core/core.php:1053 186 186 msgctxt "\"Link tweaks\" settings" 187 187 msgid "These settings only apply to the content of posts, not comments or custom fields." 188 188 msgstr "" 189 189 190 #: core/core.php: 967190 #: core/core.php:1064 191 191 msgctxt "settings page" 192 192 msgid "Suggestions" 193 193 msgstr "" 194 194 195 #: core/core.php: 972195 #: core/core.php:1069 196 196 msgid "Suggest alternatives to broken links" 197 197 msgstr "" 198 198 199 #: core/core.php: 978199 #: core/core.php:1075 200 200 msgctxt "settings page" 201 201 msgid "Warnings" 202 202 msgstr "" 203 203 204 #: core/core.php: 983204 #: core/core.php:1080 205 205 msgid "Show uncertain or minor problems as \"warnings\" instead of \"broken\"" 206 206 msgstr "" 207 207 208 #: core/core.php: 987208 #: core/core.php:1084 209 209 msgid "Turning off this option will make the plugin report all problems as broken links." 210 210 msgstr "" 211 211 212 #: core/core.php: 994212 #: core/core.php:1091 213 213 msgid "YouTube API Key" 214 214 msgstr "" 215 215 216 #: core/core.php:1 006216 #: core/core.php:1103 217 217 msgid "Use your own %1$sapi key%2$s for checking youtube links." 218 218 msgstr "" 219 219 220 #: core/core.php:1022 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 221 229 msgid "Look for links in" 222 230 msgstr "" 223 231 224 #: core/core.php:1 038232 #: core/core.php:1146 225 233 msgid "Post statuses" 226 234 msgstr "" 227 235 228 #: core/core.php:1 071236 #: core/core.php:1179 229 237 msgid "Link types" 230 238 msgstr "" 231 239 232 #: core/core.php:1 077240 #: core/core.php:1185 233 241 msgid "Error : All link parsers missing!" 234 242 msgstr "" 235 243 236 #: core/core.php:1 084244 #: core/core.php:1192 237 245 msgid "Exclusion list" 238 246 msgstr "" 239 247 240 #: core/core.php:1 085248 #: core/core.php:1193 241 249 msgid "Don't check links where the URL contains any of these words (one per line) :" 242 250 msgstr "" 243 251 244 #: core/core.php:1 106252 #: core/core.php:1214 245 253 msgid "Check links using" 246 254 msgstr "" 247 255 248 #: core/core.php:1 125, includes/links.php:1032256 #: core/core.php:1233, includes/links.php:1033 249 257 msgid "Timeout" 250 258 msgstr "" 251 259 252 #: core/core.php:1 131, core/core.php:1226, core/core.php:3667260 #: core/core.php:1239, core/core.php:1334, core/core.php:3800 253 261 msgid "%s seconds" 254 262 msgstr "" 255 263 256 #: core/core.php:1 140264 #: core/core.php:1248 257 265 msgid "Links that take longer than this to load will be marked as broken." 258 266 msgstr "" 259 267 260 #: core/core.php:1 147268 #: core/core.php:1255 261 269 msgid "Link monitor" 262 270 msgstr "" 263 271 264 #: core/core.php:1 159272 #: core/core.php:1267 265 273 msgid "Run continuously while the Dashboard is open" 266 274 msgstr "" 267 275 268 #: core/core.php:1 171276 #: core/core.php:1279 269 277 msgid "Run hourly in the background" 270 278 msgstr "" 271 279 272 #: core/core.php:1 179280 #: core/core.php:1287 273 281 msgid "Show the dashboard widget for" 274 282 msgstr "" 275 283 276 #: core/core.php:1 184284 #: core/core.php:1292 277 285 msgctxt "dashboard widget visibility" 278 286 msgid "Administrator" 279 287 msgstr "" 280 288 281 #: core/core.php:1 185289 #: core/core.php:1293 282 290 msgctxt "dashboard widget visibility" 283 291 msgid "Editor and above" 284 292 msgstr "" 285 293 286 #: core/core.php:1 186294 #: core/core.php:1294 287 295 msgctxt "dashboard widget visibility" 288 296 msgid "Nobody (disables the widget)" 289 297 msgstr "" 290 298 291 #: core/core.php:1 202299 #: core/core.php:1310 292 300 msgctxt "settings page" 293 301 msgid "Show link actions" 294 302 msgstr "" 295 303 296 #: core/core.php:1 220304 #: core/core.php:1328 297 305 msgid "Max. execution time" 298 306 msgstr "" 299 307 300 #: core/core.php:1 237308 #: core/core.php:1345 301 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." 302 310 msgstr "" 303 311 304 #: core/core.php:1 246312 #: core/core.php:1354 305 313 msgid "Server load limit" 306 314 msgstr "" 307 315 308 #: core/core.php:1 261316 #: core/core.php:1369 309 317 msgid "Current load : %s" 310 318 msgstr "" 311 319 312 #: core/core.php:1 266320 #: core/core.php:1374 313 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." 314 322 msgstr "" 315 323 316 #: core/core.php:1 275324 #: core/core.php:1383 317 325 msgid "Not available" 318 326 msgstr "" 319 327 320 #: core/core.php:1 277328 #: core/core.php:1385 321 329 msgid "Load limiting only works on Linux-like systems where <code>/proc/loadavg</code> is present and accessible." 322 330 msgstr "" 323 331 324 #: core/core.php:1 285332 #: core/core.php:1393 325 333 msgid "Target resource usage" 326 334 msgstr "" 327 335 328 #: core/core.php:1 305336 #: core/core.php:1413 329 337 msgid "Logging" 330 338 msgstr "" 331 339 332 #: core/core.php:1 311340 #: core/core.php:1419 333 341 msgid "Enable logging" 334 342 msgstr "" 335 343 336 #: core/core.php:1 318344 #: core/core.php:1426 337 345 msgid "Log file location" 338 346 msgstr "" 339 347 340 #: core/core.php:1 327348 #: core/core.php:1435 341 349 msgctxt "log file location" 342 350 msgid "Default" 343 351 msgstr "" 344 352 345 #: core/core.php:1 343353 #: core/core.php:1451 346 354 msgctxt "log file location" 347 355 msgid "Custom" 348 356 msgstr "" 349 357 350 #: core/core.php:1355 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 351 367 msgid "Forced recheck" 352 368 msgstr "" 353 369 354 #: core/core.php:1 358370 #: core/core.php:1491 355 371 msgid "Re-check all pages" 356 372 msgstr "" 357 373 358 #: core/core.php:1 363374 #: core/core.php:1496 359 375 msgid "The \"Nuclear Option\". Click this button to make the plugin empty its link database and recheck the entire site from scratch." 360 376 msgstr "" 361 377 362 #: core/core.php:1 375378 #: core/core.php:1508 363 379 msgid "Save Changes" 364 380 msgstr "" 365 381 366 #: core/core.php:1 426382 #: core/core.php:1559 367 383 msgid "Configure" 368 384 msgstr "" 369 385 370 #: core/core.php:1 508386 #: core/core.php:1641 371 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>." 372 388 msgstr "" 373 389 374 #: core/core.php:1 522390 #: core/core.php:1655 375 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>." 376 392 msgstr "" 377 393 378 #: core/core.php:1 653, core/core.php:1739, core/core.php:1771394 #: core/core.php:1786, core/core.php:1872, core/core.php:1904 379 395 msgid "Database error : %s" 380 396 msgstr "" 381 397 382 #: core/core.php:1 720398 #: core/core.php:1853 383 399 msgid "You must enter a filter name!" 384 400 msgstr "" 385 401 386 #: core/core.php:1 724402 #: core/core.php:1857 387 403 msgid "Invalid search query." 388 404 msgstr "" 389 405 390 #: core/core.php:1 734406 #: core/core.php:1867 391 407 msgid "Filter \"%s\" created" 392 408 msgstr "" 393 409 394 #: core/core.php:1 761410 #: core/core.php:1894 395 411 msgid "Filter ID not specified." 396 412 msgstr "" 397 413 398 #: core/core.php:1 768414 #: core/core.php:1901 399 415 msgid "Filter deleted" 400 416 msgstr "" 401 417 402 #: core/core.php:1 817418 #: core/core.php:1950 403 419 msgid "Replaced %d redirect with a direct link" 404 420 msgid_plural "Replaced %d redirects with direct links" … … 406 422 msgstr[1] "" 407 423 408 #: core/core.php:1 828424 #: core/core.php:1961 409 425 msgid "Failed to fix %d redirect" 410 426 msgid_plural "Failed to fix %d redirects" … … 412 428 msgstr[1] "" 413 429 414 #: core/core.php:1 839430 #: core/core.php:1972 415 431 msgid "None of the selected links are redirects!" 416 432 msgstr "" 417 433 418 #: core/core.php: 1919434 #: core/core.php:2052 419 435 msgid "%d link updated." 420 436 msgid_plural "%d links updated." … … 422 438 msgstr[1] "" 423 439 424 #: core/core.php: 1930440 #: core/core.php:2063 425 441 msgid "Failed to update %d link." 426 442 msgid_plural "Failed to update %d links." … … 428 444 msgstr[1] "" 429 445 430 #: core/core.php:2 021446 #: core/core.php:2154 431 447 msgid "%d link removed" 432 448 msgid_plural "%d links removed" … … 434 450 msgstr[1] "" 435 451 436 #: core/core.php:2 032452 #: core/core.php:2165 437 453 msgid "Failed to remove %d link" 438 454 msgid_plural "Failed to remove %d links" … … 440 456 msgstr[1] "" 441 457 442 #: core/core.php:2 142458 #: core/core.php:2275 443 459 msgid "%d item was skipped because it can't be moved to the Trash. You need to delete it manually." 444 460 msgid_plural "%d items were skipped because they can't be moved to the Trash. You need to delete them manually." … … 446 462 msgstr[1] "" 447 463 448 #: core/core.php:2 164464 #: core/core.php:2297 449 465 msgid "Didn't find anything to delete!" 450 466 msgstr "" 451 467 452 #: core/core.php:2 202468 #: core/core.php:2335 453 469 msgid "%d link scheduled for rechecking" 454 470 msgid_plural "%d links scheduled for rechecking" … … 456 472 msgstr[1] "" 457 473 458 #: core/core.php:2 251, core/core.php:3088474 #: core/core.php:2384, core/core.php:3221 459 475 msgid "This link was manually marked as working by the user." 460 476 msgstr "" 461 477 462 #: core/core.php:2 259, core/core.php:2322478 #: core/core.php:2392, core/core.php:2455 463 479 msgid "Couldn't modify link %d" 464 480 msgstr "" 465 481 466 #: core/core.php:2 270482 #: core/core.php:2403 467 483 msgid "%d link marked as not broken" 468 484 msgid_plural "%d links marked as not broken" … … 470 486 msgstr[1] "" 471 487 472 #: core/core.php:2 333488 #: core/core.php:2466 473 489 msgid "%d link dismissed" 474 490 msgid_plural "%d links dismissed" … … 476 492 msgstr[1] "" 477 493 478 #: core/core.php:2 390494 #: core/core.php:2523 479 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." 480 496 msgstr "" 481 497 482 #: core/core.php:2 395498 #: core/core.php:2528 483 499 msgctxt "admin notice under Tools - Broken links - Warnings" 484 500 msgid "Hide notice" 485 501 msgstr "" 486 502 487 #: core/core.php:2 401503 #: core/core.php:2534 488 504 msgctxt "a link from the admin notice under Tools - Broken links - Warnings" 489 505 msgid "Change warning settings" 490 506 msgstr "" 491 507 492 #: core/core.php:2 426508 #: core/core.php:2559 493 509 msgid "Table columns" 494 510 msgstr "" 495 511 496 #: core/core.php:2 445512 #: core/core.php:2578 497 513 msgid "Show on screen" 498 514 msgstr "" 499 515 500 #: core/core.php:2 452516 #: core/core.php:2585 501 517 msgid "links" 502 518 msgstr "" 503 519 504 #: core/core.php:2 453, includes/admin/table-printer.php:175520 #: core/core.php:2586, includes/admin/table-printer.php:175 505 521 msgid "Apply" 506 522 msgstr "" 507 523 508 #: core/core.php:2 457524 #: core/core.php:2590 509 525 msgid "Misc" 510 526 msgstr "" 511 527 512 #: core/core.php:2 472528 #: core/core.php:2605 513 529 msgid "Highlight links broken for at least %s days" 514 530 msgstr "" 515 531 516 #: core/core.php:2 481532 #: core/core.php:2614 517 533 msgid "Color-code status codes" 518 534 msgstr "" 519 535 520 #: core/core.php:2 500, core/core.php:3072, core/core.php:3119, core/core.php:3158, core/core.php:3282, core/core.php:3341, core/core.php:3419536 #: 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 521 537 msgid "You're not allowed to do that!" 522 538 msgstr "" 523 539 524 #: core/core.php: 2940540 #: core/core.php:3073 525 541 msgid "View broken links" 526 542 msgstr "" 527 543 528 #: core/core.php: 2941544 #: core/core.php:3074 529 545 msgid "Found %d broken link" 530 546 msgid_plural "Found %d broken links" … … 532 548 msgstr[1] "" 533 549 534 #: core/core.php: 2947550 #: core/core.php:3080 535 551 msgid "No broken links found." 536 552 msgstr "" 537 553 538 #: core/core.php: 2954554 #: core/core.php:3087 539 555 msgid "%d URL in the work queue" 540 556 msgid_plural "%d URLs in the work queue" … … 542 558 msgstr[1] "" 543 559 544 #: core/core.php: 2958560 #: core/core.php:3091 545 561 msgid "No URLs in the work queue." 546 562 msgstr "" 547 563 548 #: core/core.php: 2964564 #: core/core.php:3097 549 565 msgctxt "for the \"Detected X unique URLs in Y links\" message" 550 566 msgid "%d unique URL" … … 553 569 msgstr[1] "" 554 570 555 #: core/core.php: 2968571 #: core/core.php:3101 556 572 msgctxt "for the \"Detected X unique URLs in Y links\" message" 557 573 msgid "%d link" … … 560 576 msgstr[1] "" 561 577 562 #: core/core.php: 2974578 #: core/core.php:3107 563 579 msgid "Detected %1$s in %2$s and still searching..." 564 580 msgstr "" 565 581 566 #: core/core.php: 2980582 #: core/core.php:3113 567 583 msgid "Detected %1$s in %2$s." 568 584 msgstr "" 569 585 570 #: core/core.php: 2987586 #: core/core.php:3120 571 587 msgid "Searching your blog for links..." 572 588 msgstr "" 573 589 574 #: core/core.php: 2989590 #: core/core.php:3122 575 591 msgid "No links detected." 576 592 msgstr "" 577 593 578 #: core/core.php:3 015594 #: core/core.php:3148 579 595 msgctxt "current load" 580 596 msgid "Unknown" 581 597 msgstr "" 582 598 583 #: core/core.php:3 080, core/core.php:3127, core/core.php:3181, core/core.php:3296, core/core.php:3364, core/core.php:3442599 #: core/core.php:3213, core/core.php:3260, core/core.php:3314, core/core.php:3429, core/core.php:3497, core/core.php:3575 584 600 msgid "Oops, I can't find the link %d" 585 601 msgstr "" 586 602 587 #: core/core.php:3 100, core/core.php:3141603 #: core/core.php:3233, core/core.php:3274 588 604 msgid "Oops, couldn't modify the link!" 589 605 msgstr "" 590 606 591 #: core/core.php:3 103, core/core.php:3144, core/core.php:3329, core/core.php:3351, core/core.php:3429607 #: core/core.php:3236, core/core.php:3277, core/core.php:3462, core/core.php:3484, core/core.php:3562 592 608 msgid "Error : link_id not specified" 593 609 msgstr "" 594 610 595 #: core/core.php:3 168611 #: core/core.php:3301 596 612 msgid "Error : link_id or new_url not specified" 597 613 msgstr "" 598 614 599 #: core/core.php:3 194, core/core.php:3208615 #: core/core.php:3327, core/core.php:3341 600 616 msgid "Oops, the new URL is invalid!" 601 617 msgstr "" 602 618 603 #: core/core.php:3 228619 #: core/core.php:3361 604 620 msgid "An unexpected error occurred!" 605 621 msgstr "" 606 622 607 #: core/core.php:3 309623 #: core/core.php:3442 608 624 msgid "An unexpected error occured!" 609 625 msgstr "" 610 626 611 #: core/core.php:3 477627 #: core/core.php:3610 612 628 msgid "You don't have sufficient privileges to access this information!" 613 629 msgstr "" 614 630 615 #: core/core.php:3 490631 #: core/core.php:3623 616 632 msgid "Error : link ID not specified" 617 633 msgstr "" 618 634 619 #: core/core.php:3 504635 #: core/core.php:3637 620 636 msgid "Failed to load link details (%s)" 621 637 msgstr "" 622 638 623 #: core/core.php:3 558639 #: core/core.php:3691 624 640 msgid "Broken Link Checker" 625 641 msgstr "" 626 642 627 #: core/core.php:3 597643 #: core/core.php:3730 628 644 msgid "You have an old version of CURL. Redirect detection may not work properly." 629 645 msgstr "" 630 646 631 #: core/core.php:3 608, core/core.php:3624, core/core.php:3629647 #: core/core.php:3741, core/core.php:3757, core/core.php:3762 632 648 msgid "Not installed" 633 649 msgstr "" 634 650 635 #: core/core.php:3 617651 #: core/core.php:3750 636 652 msgid "Installed" 637 653 msgstr "" 638 654 639 #: core/core.php:3 630655 #: core/core.php:3763 640 656 msgid "You must have either CURL or Snoopy installed for the plugin to work!" 641 657 msgstr "" 642 658 643 #: core/core.php:3 640659 #: core/core.php:3773 644 660 msgid "On" 645 661 msgstr "" 646 662 647 #: core/core.php:3 641663 #: core/core.php:3774 648 664 msgid "Redirects may be detected as broken links when safe_mode is on." 649 665 msgstr "" 650 666 651 #: core/core.php:3 646, core/core.php:3660667 #: core/core.php:3779, core/core.php:3793 652 668 msgid "Off" 653 669 msgstr "" 654 670 655 #: core/core.php:3 654671 #: core/core.php:3787 656 672 msgid "On ( %s )" 657 673 msgstr "" 658 674 659 #: core/core.php:3 655675 #: core/core.php:3788 660 676 msgid "Redirects may be detected as broken links when open_basedir is on." 661 677 msgstr "" 662 678 663 #: core/core.php:3 692679 #: core/core.php:3825 664 680 msgid "If this value is zero even after several page reloads you have probably encountered a bug." 665 681 msgstr "" 666 682 667 #: core/core.php:3 816, core/core.php:3935683 #: core/core.php:3954, core/core.php:4073 668 684 msgid "[%s] Broken links detected" 669 685 msgstr "" 670 686 671 #: core/core.php:3 821687 #: core/core.php:3959 672 688 msgid "Broken Link Checker has detected %d new broken link on your site." 673 689 msgid_plural "Broken Link Checker has detected %d new broken links on your site." … … 675 691 msgstr[1] "" 676 692 677 #: core/core.php:3 852693 #: core/core.php:3990 678 694 msgid "Here's a list of the first %d broken links:" 679 695 msgid_plural "Here's a list of the first %d broken links:" … … 681 697 msgstr[1] "" 682 698 683 #: core/core.php:3 861699 #: core/core.php:3999 684 700 msgid "Here's a list of the new broken links: " 685 701 msgstr "" 686 702 687 #: core/core.php: 3870703 #: core/core.php:4008 688 704 msgid "Link text : %s" 689 705 msgstr "" 690 706 691 #: core/core.php: 3871707 #: core/core.php:4009 692 708 msgid "Link URL : <a href=\"%1$s\">%2$s</a>" 693 709 msgstr "" 694 710 695 #: core/core.php: 3872711 #: core/core.php:4010 696 712 msgid "Source : %s" 697 713 msgstr "" 698 714 699 #: core/core.php: 3886715 #: core/core.php:4024 700 716 msgid "You can see all broken links here:" 701 717 msgstr "" 702 718 703 #: core/core.php: 3940719 #: core/core.php:4078 704 720 msgid "Broken Link Checker has detected %d new broken link in your posts." 705 721 msgid_plural "Broken Link Checker has detected %d new broken links in your posts." … … 707 723 msgstr[1] "" 708 724 709 #: core/init.php:23 4725 #: core/init.php:237 710 726 msgid "Every 10 minutes" 711 727 msgstr "" 712 728 713 #: core/init.php:24 1729 #: core/init.php:244 714 730 msgid "Once Weekly" 715 731 msgstr "" 716 732 717 #: core/init.php:2 47733 #: core/init.php:250 718 734 msgid "Twice a Month" 719 735 msgstr "" 720 736 721 #: core/init.php:32 5737 #: core/init.php:323 722 738 msgid "Broken Link Checker installation failed. Try deactivating and then reactivating the plugin." 723 739 msgstr "" 724 740 725 #: core/init.php:329 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 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 730 742 msgid "Edit" 731 743 msgstr "" 732 744 733 #: includes/any-post.php:4 70, modules/containers/acf_field.php:252, modules/containers/custom_field.php:258745 #: includes/any-post.php:485, modules/containers/acf_field.php:252, modules/containers/custom_field.php:258 734 746 msgid "Move this item to the Trash" 735 747 msgstr "" 736 748 737 #: includes/any-post.php:4 72, modules/containers/acf_field.php:252, modules/containers/custom_field.php:260749 #: includes/any-post.php:487, modules/containers/acf_field.php:252, modules/containers/custom_field.php:260 738 750 msgid "Trash" 739 751 msgstr "" 740 752 741 #: includes/any-post.php:4 77, modules/containers/acf_field.php:254, modules/containers/custom_field.php:265753 #: includes/any-post.php:492, modules/containers/acf_field.php:254, modules/containers/custom_field.php:265 742 754 msgid "Delete this item permanently" 743 755 msgstr "" 744 756 745 #: includes/any-post.php:4 79, modules/containers/acf_field.php:254, modules/containers/blogroll.php:47, modules/containers/custom_field.php:267757 #: includes/any-post.php:494, modules/containers/acf_field.php:254, modules/containers/blogroll.php:47, modules/containers/custom_field.php:267 746 758 msgid "Delete" 747 759 msgstr "" 748 760 749 #: includes/any-post.php: 492761 #: includes/any-post.php:507 750 762 msgid "Preview “%s”" 751 763 msgstr "" 752 764 753 #: includes/any-post.php: 493765 #: includes/any-post.php:508 754 766 msgid "Preview" 755 767 msgstr "" 756 768 757 #: includes/any-post.php:5 00769 #: includes/any-post.php:515 758 770 msgid "View “%s”" 759 771 msgstr "" 760 772 761 #: includes/any-post.php:5 01, modules/containers/acf_field.php:258, modules/containers/comment.php:172, modules/containers/custom_field.php:272773 #: includes/any-post.php:516, modules/containers/acf_field.php:258, modules/containers/comment.php:172, modules/containers/custom_field.php:272 762 774 msgid "View" 763 775 msgstr "" 764 776 765 #: includes/any-post.php:5 20, modules/containers/acf_field.php:248, modules/containers/custom_field.php:252777 #: includes/any-post.php:535, modules/containers/acf_field.php:248, modules/containers/custom_field.php:252 766 778 msgid "Edit this item" 767 779 msgstr "" 768 780 769 #: includes/any-post.php:5 84, modules/containers/blogroll.php:83, modules/containers/comment.php:43781 #: includes/any-post.php:599, modules/containers/blogroll.php:83, modules/containers/comment.php:43 770 782 msgid "Nothing to update" 771 783 msgstr "" 772 784 773 #: includes/any-post.php: 595785 #: includes/any-post.php:613 774 786 msgid "Updating post %d failed" 775 787 msgstr "" 776 788 777 #: includes/any-post.php:6 56, modules/containers/acf_field.php:327, modules/containers/custom_field.php:341789 #: includes/any-post.php:674, modules/containers/acf_field.php:327, modules/containers/custom_field.php:341 778 790 msgid "Failed to delete post \"%1$s\" (%2$d)" 779 791 msgstr "" 780 792 781 #: includes/any-post.php:6 75, modules/containers/acf_field.php:341, modules/containers/custom_field.php:360793 #: includes/any-post.php:693, modules/containers/acf_field.php:341, modules/containers/custom_field.php:360 782 794 msgid "Can't move post \"%1$s\" (%2$d) to the trash because the trash feature is disabled" 783 795 msgstr "" 784 796 785 #: includes/any-post.php: 695, modules/containers/acf_field.php:353, modules/containers/custom_field.php:379797 #: includes/any-post.php:713, modules/containers/acf_field.php:353, modules/containers/custom_field.php:379 786 798 msgid "Failed to move post \"%1$s\" (%2$d) to the trash" 787 799 msgstr "" 788 800 789 #: includes/any-post.php:8 03801 #: includes/any-post.php:820 790 802 msgid "%d post deleted." 791 803 msgid_plural "%d posts deleted." … … 793 805 msgstr[1] "" 794 806 795 #: includes/any-post.php:8 05807 #: includes/any-post.php:822 796 808 msgid "%d page deleted." 797 809 msgid_plural "%d pages deleted." … … 799 811 msgstr[1] "" 800 812 801 #: includes/any-post.php:8 07813 #: includes/any-post.php:824 802 814 msgid "%1$d \"%2$s\" deleted." 803 815 msgid_plural "%1$d \"%2$s\" deleted." … … 805 817 msgstr[1] "" 806 818 807 #: includes/any-post.php:8 26819 #: includes/any-post.php:843 808 820 msgid "%d post moved to the Trash." 809 821 msgid_plural "%d posts moved to the Trash." … … 811 823 msgstr[1] "" 812 824 813 #: includes/any-post.php:8 28825 #: includes/any-post.php:845 814 826 msgid "%d page moved to the Trash." 815 827 msgid_plural "%d pages moved to the Trash." … … 817 829 msgstr[1] "" 818 830 819 #: includes/any-post.php:8 30831 #: includes/any-post.php:847 820 832 msgid "%1$d \"%2$s\" moved to the Trash." 821 833 msgid_plural "%1$d \"%2$s\" moved to the Trash." … … 1014 1026 msgstr "" 1015 1027 1016 #: includes/links.php:50 21028 #: includes/links.php:503 1017 1029 msgid "Link is broken." 1018 1030 msgstr "" 1019 1031 1020 #: includes/links.php:50 41032 #: includes/links.php:505 1021 1033 msgid "Link is valid." 1022 1034 msgstr "" 1023 1035 1024 #: includes/links.php:73 7, includes/links.php:840, includes/links.php:8741036 #: includes/links.php:738, includes/links.php:841, includes/links.php:875 1025 1037 msgid "Link is not valid" 1026 1038 msgstr "" 1027 1039 1028 #: includes/links.php:75 41040 #: includes/links.php:755 1029 1041 msgid "This link can not be edited because it is not used anywhere on this site." 1030 1042 msgstr "" 1031 1043 1032 #: includes/links.php:78 01044 #: includes/links.php:781 1033 1045 msgid "Failed to create a DB entry for the new URL." 1034 1046 msgstr "" 1035 1047 1036 #: includes/links.php:84 71048 #: includes/links.php:848 1037 1049 msgid "This link is not a redirect" 1038 1050 msgstr "" 1039 1051 1040 #: includes/links.php:90 1, includes/links.php:9381052 #: includes/links.php:902, includes/links.php:939 1041 1053 msgid "Couldn't delete the link's database record" 1042 1054 msgstr "" 1043 1055 1044 #: includes/links.php:101 51056 #: includes/links.php:1016 1045 1057 msgctxt "link status" 1046 1058 msgid "Unknown" 1047 1059 msgstr "" 1048 1060 1049 #: includes/links.php:102 8, modules/checkers/http.php:318, modules/extras/mediafire.php:115, modules/extras/youtube.php:136, modules/extras/youtube.php:2311061 #: 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 1050 1062 msgid "Unknown Error" 1051 1063 msgstr "" 1052 1064 1053 #: includes/links.php:105 11065 #: includes/links.php:1052 1054 1066 msgid "Not checked" 1055 1067 msgstr "" 1056 1068 1057 #: includes/links.php:105 41069 #: includes/links.php:1055 1058 1070 msgid "False positive" 1059 1071 msgstr "" 1060 1072 1061 #: includes/links.php:105 7, modules/extras/rapidshare.php:145, modules/extras/rapidshare.php:151, modules/extras/rapidshare.php:178, modules/extras/youtube.php:142, modules/extras/youtube.php:2181073 #: 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 1062 1074 msgctxt "link status" 1063 1075 msgid "OK" … … 1136 1148 msgstr "" 1137 1149 1138 #: includes/admin/links-page-js.php:64, includes/admin/links-page-js.php:65 31150 #: includes/admin/links-page-js.php:64, includes/admin/links-page-js.php:659 1139 1151 msgid "Wait..." 1140 1152 msgstr "" … … 1185 1197 msgstr "" 1186 1198 1187 #: includes/admin/links-page-js.php:691 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 1188 1204 msgid "%d instances of the link were successfully unlinked." 1189 1205 msgstr "" 1190 1206 1191 #: includes/admin/links-page-js.php: 6971207 #: includes/admin/links-page-js.php:700 1192 1208 msgid "However, %d instances couldn't be removed." 1193 1209 msgstr "" 1194 1210 1195 #: includes/admin/links-page-js.php:70 21211 #: includes/admin/links-page-js.php:705 1196 1212 msgid "The plugin failed to remove the link." 1197 1213 msgstr "" 1198 1214 1199 #: includes/admin/links-page-js.php:70 51215 #: includes/admin/links-page-js.php:708 1200 1216 msgid "The following error(s) occured :" 1201 1217 msgstr "" 1202 1218 1203 #: includes/admin/links-page-js.php:75 11219 #: includes/admin/links-page-js.php:756 1204 1220 msgid "Enter a name for the new custom filter" 1205 1221 msgstr "" 1206 1222 1207 #: includes/admin/links-page-js.php:76 31223 #: includes/admin/links-page-js.php:768 1208 1224 msgid "" 1209 1225 "You are about to delete the current filter.\n" … … 1211 1227 msgstr "" 1212 1228 1213 #: includes/admin/links-page-js.php:7 871229 #: includes/admin/links-page-js.php:792 1214 1230 msgid "" 1215 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" … … 1217 1233 msgstr "" 1218 1234 1219 #: includes/admin/links-page-js.php:80 11235 #: includes/admin/links-page-js.php:806 1220 1236 msgid "" 1221 1237 "Are you sure you want to remove the selected links? This action can't be undone.\n" … … 1223 1239 msgstr "" 1224 1240 1225 #: includes/admin/links-page-js.php:93 11241 #: includes/admin/links-page-js.php:936 1226 1242 msgid "Enter a search string first." 1227 1243 msgstr "" 1228 1244 1229 #: includes/admin/links-page-js.php:9 381245 #: includes/admin/links-page-js.php:943 1230 1246 msgid "Select one or more links to edit." 1231 1247 msgstr "" … … 1361 1377 #: includes/admin/table-printer.php:543 1362 1378 msgid "Link last checked" 1363 msgstr ""1364 1365 #: includes/admin/table-printer.php:5481366 msgid "Never"1367 1379 msgstr "" 1368 1380 … … 1479 1491 msgstr "" 1480 1492 1481 #: modules/checkers/http.php:2 951493 #: modules/checkers/http.php:289 1482 1494 msgid "Server Not Found" 1483 1495 msgstr "" 1484 1496 1485 #: modules/checkers/http.php:3 111497 #: modules/checkers/http.php:305 1486 1498 msgid "Connection Failed" 1487 1499 msgstr "" 1488 1500 1489 #: modules/checkers/http.php:359, modules/checkers/http.php:44 41501 #: modules/checkers/http.php:359, modules/checkers/http.php:448 1490 1502 msgid "HTTP code : %d" 1491 1503 msgstr "" 1492 1504 1493 #: modules/checkers/http.php:361, modules/checkers/http.php:4 461505 #: modules/checkers/http.php:361, modules/checkers/http.php:450 1494 1506 msgid "(No response)" 1495 1507 msgstr "" … … 1499 1511 msgstr "" 1500 1512 1501 #: modules/checkers/http.php:45 41513 #: modules/checkers/http.php:459 1502 1514 msgid "Request timed out." 1503 1515 msgstr "" 1504 1516 1505 #: modules/checkers/http.php:4 731506 msgid "Using Snoopy"1517 #: modules/checkers/http.php:466 1518 msgid "Using WP HTTP" 1507 1519 msgstr "" 1508 1520 … … 1680 1692 msgstr "" 1681 1693 1682 #: modules/extras/youtube.php:14 11694 #: modules/extras/youtube.php:140 1683 1695 msgid "Video OK" 1684 1696 msgstr "" 1685 1697 1686 #: modules/extras/youtube.php:15 2, modules/extras/youtube.php:1551698 #: modules/extras/youtube.php:151, modules/extras/youtube.php:154 1687 1699 msgid "Video Not Found" 1688 1700 msgstr "" 1689 1701 1690 #: modules/extras/youtube.php:17 4, modules/extras/youtube.php:1771702 #: modules/extras/youtube.php:173, modules/extras/youtube.php:176 1691 1703 msgid "Playlist Not Found" 1692 1704 msgstr "" 1693 1705 1694 #: modules/extras/youtube.php:18 41706 #: modules/extras/youtube.php:183 1695 1707 msgid "Playlist Restricted" 1696 1708 msgstr "" 1697 1709 1710 #: modules/extras/youtube.php:190 1711 msgid "This playlist has no entries or all entries have been deleted." 1712 msgstr "" 1713 1698 1714 #: modules/extras/youtube.php:191 1699 msgid "This playlist has no entries or all entries have been deleted."1700 msgstr ""1701 1702 #: modules/extras/youtube.php:1921703 1715 msgctxt "link status" 1704 1716 msgid "Empty Playlist" 1705 1717 msgstr "" 1706 1718 1707 #: modules/extras/youtube.php:20 21719 #: modules/extras/youtube.php:201 1708 1720 msgid "Video status : %1$s%2$s" 1709 1721 msgstr "" 1710 1722 1711 #: modules/extras/youtube.php:20 81723 #: modules/extras/youtube.php:207 1712 1724 msgid "Video Restricted" 1713 1725 msgstr "" 1714 1726 1715 #: modules/extras/youtube.php:21 71727 #: modules/extras/youtube.php:216 1716 1728 msgid "Playlist OK" 1717 1729 msgstr "" 1718 1730 1719 #: modules/extras/youtube.php:26 51731 #: modules/extras/youtube.php:264 1720 1732 msgid "Unknown YouTube API response received." 1721 1733 msgstr "" -
broken-link-checker/trunk/modules/checkers/http.php
r2238832 r2312012 43 43 ); 44 44 } else { 45 //Try to load Snoopy. 46 if ( ! class_exists( 'Snoopy' ) ) { 47 $snoopy_file = ABSPATH . WPINC . '/class-snoopy.php'; 48 if ( file_exists( $snoopy_file ) ) { 49 include $snoopy_file; 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 } 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 ); 62 52 } 63 53 } … … 200 190 if ( ! blcUtility::is_safe_mode() && ! blcUtility::is_open_basedir() ) { 201 191 curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true ); 202 } 192 } else { 193 $log .= "[Warning] Could't follow the redirect URL (if any) because safemode or open base dir enabled\n"; 194 } 195 203 196 //Set maximum redirects 204 197 curl_setopt( $ch, CURLOPT_MAXREDIRS, 10 ); … … 268 261 $info = curl_getinfo( $ch ); 269 262 263 // var_dump( $info ); die(); 270 264 //Store the results 271 265 $result['http_code'] = intval( $info['http_code'] ); … … 318 312 $result['status_text'] = __( 'Unknown Error', 'broken-link-checker' ); 319 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; 320 318 } else { 321 319 $result['broken'] = $this->is_error_code( $result['http_code'] ); … … 336 334 ); 337 335 338 if ( $nobody && $result['broken'] && ! $result['timeout'] && ! $use_get ) { 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 339 //The site in question might be expecting GET instead of HEAD, so lets retry the request 340 340 //using the GET verb...but not in cases of timeout, or where we've already done it. … … 404 404 } 405 405 406 class blc SnoopyHttp extends blcHttpCheckerBase {406 class blcWPHttp extends blcHttpCheckerBase { 407 407 408 408 function check( $url ) { 409 $url = $this->clean_url( $url ); 409 410 // $url = $this->clean_url( $url ); 410 411 //Note : Snoopy doesn't work too well with HTTPS URLs. 411 412 … … 423 424 424 425 //Fetch the URL with Snoopy 425 $snoopy = new Snoopy; 426 $snoopy->read_timeout = $timeout; //read timeout in seconds 427 $snoopy->agent = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)'; //masquerade as IE 7 428 $snoopy->referer = home_url(); //valid referer helps circumvent some hotlink protection schemes 429 $snoopy->maxlength = 1024 * 5; //load up to 5 kilobytes 430 $snoopy->fetch( $this->urlencodefix( $url ) ); 431 432 $result['request_duration'] = microtime_float() - $start_time; 433 434 $result['http_code'] = $snoopy->status; //HTTP status code 435 //Snoopy returns -100 on timeout 436 if ( -100 == $result['http_code'] ) { 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 ) ) { 437 436 $result['http_code'] = 0; 438 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']; 439 443 } 440 444 … … 448 452 $log .= " ===\n\n"; 449 453 450 if ( $snoopy->error ) { 451 $log .= $snoopy->error . "\n"; 452 } 453 if ( $snoopy->timed_out ) { 454 if ( $result['message'] ) { 455 $log .= $result['message'] . "\n"; 456 } 457 458 if ( is_wp_error( $request ) ) { 454 459 $log .= __( 'Request timed out.', 'broken-link-checker' ) . "\n"; 455 460 $result['timeout'] = true; 456 461 } 457 462 458 if ( is_array( $snoopy->headers ) ) {459 $log .= implode( '', $snoopy->headers ) . "\n"; //those headers already contain newlines460 }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 463 //Determine if the link counts as "broken" 471 464 $result['broken'] = $this->is_error_code( $result['http_code'] ) || $result['timeout']; 472 465 473 $log .= '<em>(' . __( 'Using Snoopy', 'broken-link-checker' ) . ')</em>';466 $log .= '<em>(' . __( 'Using WP HTTP', 'broken-link-checker' ) . ')</em>'; 474 467 $result['log'] = $log; 468 469 $result['final_url'] = $url; 475 470 476 471 //The hash should contain info about all pieces of data that pertain to determining if the -
broken-link-checker/trunk/modules/extras/youtube.php
r2265659 r2312012 130 130 $result['status_code'] = BLC_LINK_STATUS_WARNING; 131 131 $result['warning'] = true; 132 133 if ( isset( $api['error']['message'] ) ) { 134 $result['status_text'] = $api['error']['message']; 132 if ( isset( $api['error']['errors'] ) ) { 133 $result['status_text'] = $api['error']['errors'][0]['reason']; 135 134 } else { 136 135 $result['status_text'] = __( 'Unknown Error', 'broken-link-checker' ); … … 288 287 $conf = blc_get_configuration(); 289 288 290 //todo: Remove defualt API key. 291 $api_key = ! empty( $conf->options['youtube_api_key'] ) ? $conf->options['youtube_api_key'] : 'AIzaSyCE2HKP0BneF8YdVT45UpadENdBeYCzFrE'; 289 $api_key = ! empty( $conf->options['youtube_api_key'] ) ? $conf->options['youtube_api_key'] : ''; 292 290 293 291 return apply_filters( 'blc_youtube_api_key', $conf->options['youtube_api_key'] ); -
broken-link-checker/trunk/readme.txt
r2265659 r2312012 5 5 Requires at least: 4.6 6 6 Tested up to: 5.4 7 Stable tag: 1.11.1 27 Stable tag: 1.11.13 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 38 38 * "Unlink" removes the link but leaves the link text intact. 39 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 fr om 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.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 41 42 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. … … 68 68 69 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 70 84 = 1.11.12 = 71 85 * Added an interface to use personal YouTube API Key -
broken-link-checker/trunk/uninstall.php
r2238832 r2312012 11 11 // Remove the plugin's settings & installation log. 12 12 delete_option( 'wsblc_options' ); 13 delete_option( 'blc_activation_enabled' ); 13 14 delete_option( 'blc_installation_log' ); 14 15
Note: See TracChangeset
for help on using the changeset viewer.