Plugin Directory

Changeset 2312012


Ignore:
Timestamp:
05/26/2020 06:08:00 AM (6 years ago)
Author:
bplv
Message:

Release 1.11.13

Location:
broken-link-checker
Files:
32 edited
1 copied

Legend:

Unmodified
Added
Removed
  • broken-link-checker/tags/1.11.13/broken-link-checker.php

    r2265659 r2312012  
    11<?php
    2 
    32/**
     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
    410 * Plugin Name: Broken Link Checker
    511 * Plugin URI:  https://wordpress.org/plugins/broken-link-checker/
    612 * Description: Checks your blog for broken links and missing images and notifies you on the dashboard if any are found.
    7  * Version:     1.11.12
     13 * Version:     1.11.13
    814 * Author:      WPMU DEV
    915 * Author URI:  https://premium.wpmudev.org/
     
    1117 * License:     GPLv2 or later
    1218 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
    13 */
     19 */
    1420
    1521/*
     
    2834*/
    2935
    30 //Path to this file
     36// Path to this file.
    3137if ( ! defined( 'BLC_PLUGIN_FILE' ) ) {
    3238    define( 'BLC_PLUGIN_FILE', __FILE__ );
    3339}
    3440
    35 //Path to the plugin's directory
     41// Path to the plugin's directory.
    3642if ( ! defined( 'BLC_DIRECTORY' ) ) {
    3743    define( 'BLC_DIRECTORY', dirname( __FILE__ ) );
    3844}
    3945
    40 //Load the actual plugin
     46// Load the actual plugin.
    4147require 'core/init.php';
  • broken-link-checker/tags/1.11.13/core/core.php

    r2265659 r2312012  
    11<?php
    2 
    32/**
    43 * 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
    58 */
     9
    610if ( ! function_exists( 'microtime_float' ) ) {
     11    /**
     12     * Calcualate microtime_float
     13     *
     14     * @since 1.0.0
     15     */
    716    function microtime_float() {
    817        list( $usec, $sec ) = explode( ' ', microtime() );
     
    1726
    1827if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
     28
     29    /**
     30     * Broken Link Checker core
     31     */
    1932    class wsBrokenLinkChecker {
    2033
    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;
    2775
    2876        /**
    2977         * Class constructor
    3078         *
    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 ) {
    3685            $this->db_version = BLC_DATABASE_VERSION;
    3786
     
    4291            $this->load_language();
    4392
    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
    4797            register_deactivation_hook( $loader, array( $this, 'deactivation' ) );
    4898
    4999            add_action( 'admin_menu', array( $this, 'admin_menu' ) );
    50100
    51             //Load jQuery on Dashboard pages (probably redundant as WP already does that)
    52             add_action( 'admin_print_scripts', array( $this, 'admin_print_scripts' ) );
    53 
    54             //The dashboard widget
     101            // Load jQuery on Dashboard pages (probably redundant as WP already does that).
     102            // add_action( 'admin_print_scripts', array( $this, 'admin_print_scripts' ) );.
     103
     104            // The dashboard widget.
    55105            add_action( 'wp_dashboard_setup', array( $this, 'hook_wp_dashboard_setup' ) );
    56106
    57             //AJAXy hooks
     107            // AJAXy hooks.
    58108            add_action( 'wp_ajax_blc_full_status', array( $this, 'ajax_full_status' ) );
    59109            add_action( 'wp_ajax_blc_dashboard_status', array( $this, 'ajax_dashboard_status' ) );
     
    70120            add_action( 'wp_ajax_blc_undismiss', array( $this, 'ajax_undismiss' ) );
    71121
    72             //Add/remove Cron events
     122            // Add/remove Cron events.
    73123            $this->setup_cron_events();
    74124
    75             //Set hooks that listen for our Cron actions
     125            // Set hooks that listen for our Cron actions.
    76126            add_action( 'blc_cron_email_notifications', array( $this, 'maybe_send_email_notifications' ) );
    77127            add_action( 'blc_cron_check_links', array( $this, 'cron_check_links' ) );
    78128            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.
    81132            add_action( 'admin_footer', array( $this, 'admin_footer' ) );
    82             //Add a "Screen Options" panel to the "Broken Links" page
     133            // Add a "Screen Options" panel to the "Broken Links" page.
    83134            add_screen_options_panel(
    84135                'blc-screen-options',
     
    90141            );
    91142
    92             //Display an explanatory note on the "Tools -> Broken Links -> Warnings" page.
     143            // Display an explanatory note on the "Tools -> Broken Links -> Warnings" page.
    93144            add_action( 'admin_notices', array( $this, 'show_warnings_section_notice' ) );
    94145
     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
    95149        }
    96150
     
    100154         * @return void
    101155         */
    102         function admin_footer() {
     156        public function admin_footer() {
    103157            if ( ! $this->conf->options['run_in_dashboard'] ) {
    104158                return;
     
    113167                function blcDoWork(){
    114168                    $.post(
    115                         "<?php echo admin_url( 'admin-ajax.php' ); ?>",
     169                        "<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>",
    116170                        {
    117171                            'action' : 'blc_work',
     
    135189         * Check if an URL matches the exclusion list.
    136190         *
    137          * @param string $url
     191         * @param string $url The url to exclude.
    138192         * @return bool
    139193         */
    140         function is_excluded( $url ) {
     194        public function is_excluded( $url ) {
    141195            if ( ! is_array( $this->conf->options['exclusion_list'] ) ) {
    142196                return false;
     
    150204        }
    151205
    152         function dashboard_widget() {
     206        /**
     207         * Get dashboard_widget
     208         */
     209        public function dashboard_widget() {
    153210            ?>
    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>
    155212            <script type='text/javascript'>
    156213                jQuery( function($){
     
    159216                    function blcDashboardStatus(){
    160217                        $.getJSON(
    161                             "<?php echo admin_url( 'admin-ajax.php' ); ?>",
     218                            "<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>",
    162219                            {
    163220                                'action' : 'blc_dashboard_status',
     
    176233                                    <?php } ?>
    177234                                } 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' ); ?>');
    179236                                }
    180237
     
    191248        }
    192249
    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;
    201269
    202270            ?>
     
    207275                    echo 'checked="checked"';}
    208276                ?>
    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' ); ?>
    211279            </label></p>
    212280            <?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 page
    222             wp_enqueue_script( 'jquery-ui-core' );   //Used for background color animation
     281
     282            wp_nonce_field( 'blc_update_widget', 'blc_update_widget_nonce' );
     283        }
     284
     285        /**
     286         * Enqueue settings script.
     287         */
     288        public function enqueue_settings_scripts() {
     289            // jQuery UI is used on the settings page.
     290            wp_enqueue_script( 'jquery-ui-core' );   // Used for background color animation.
    223291            wp_enqueue_script( 'jquery-ui-dialog' );
    224292            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() {
    229300            wp_enqueue_script( 'jquery-ui-core' );
    230             wp_enqueue_script( 'jquery-ui-dialog' ); //Used for the search form
    231             wp_enqueue_script( 'jquery-color' );     //Used for background color animation
    232             wp_enqueue_script( 'sprintf', plugins_url( 'js/sprintf.js', BLC_PLUGIN_FILE ) ); //Used in error messages
     301            wp_enqueue_script( 'jquery-ui-dialog' ); // Used for the search form.
     302            wp_enqueue_script( 'jquery-color' );     // Used for background color animation.
     303            wp_enqueue_script( 'sprintf', plugins_url( 'js/sprintf.js', BLC_PLUGIN_FILE ), array(), '1.0.0', false ); // Used in error messages.
    233304        }
    234305
     
    238309         * @return void
    239310         */
    240         function initiate_recheck() {
    241             global $wpdb; /** @var wpdb $wpdb */
    242 
    243             //Delete all discovered instances
    244             $wpdb->query( "TRUNCATE {$wpdb->prefix}blc_instances" );
    245 
    246             //Delete all discovered links
    247             $wpdb->query( "TRUNCATE {$wpdb->prefix}blc_links" );
    248 
    249             //Mark all posts, custom fields and bookmarks for processing.
     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.
    250321            blc_resynch( true );
    251322        }
     
    256327         * @return void
    257328         */
    258         function deactivation() {
    259             //Remove our Cron events
     329        public function deactivation() {
     330            // Remove our Cron events.
    260331            wp_clear_scheduled_hook( 'blc_cron_check_links' );
    261332            wp_clear_scheduled_hook( 'blc_cron_email_notifications' );
    262333            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.
    266338            $moduleManager = blcModuleManager::getInstance();
    267339            $the_time      = current_time( 'timestamp' );
     
    280352         * @return void
    281353         */
    282         function database_maintenance() {
     354        public function database_maintenance() {
    283355            blcContainerHelper::cleanup_containers();
    284356            blc_cleanup_instances();
     
    294366         * @return void
    295367         */
    296         function admin_menu() {
     368        public function admin_menu() {
    297369            if ( current_user_can( 'manage_options' ) ) {
    298370                add_filter( 'plugin_action_links', array( $this, 'plugin_action_links' ), 10, 2 );
     
    309381            $menu_title = __( 'Broken Links', 'broken-link-checker' );
    310382            if ( $this->conf->options['show_link_count_bubble'] ) {
    311                 //To make it easier to notice when broken links appear, display the current number of
    312                 //broken links in a little bubble notification in the "Broken Links" menu.
    313                 //(Similar to how the number of plugin updates and unmoderated comments is displayed).
     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).
    314386                $blc_link_query = blcLinkQuery::getInstance();
    315387                $broken_links   = $blc_link_query->get_filter_links( 'broken', array( 'count_only' => true ) );
    316388                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.
    318390                    $menu_title .= sprintf(
    319391                        ' <span class="update-plugins"><span class="update-count blc-menu-bubble">%d</span></span>',
     
    330402            );
    331403
    332             //Add plugin-specific scripts and CSS only to the it's own pages
     404            // Add plugin-specific scripts and CSS only to the it's own pages.
    333405            add_action( 'admin_print_styles-' . $options_page_hook, array( $this, 'options_page_css' ) );
    334406            add_action( 'admin_print_styles-' . $links_page_hook, array( $this, 'links_page_css' ) );
     
    336408            add_action( 'admin_print_scripts-' . $links_page_hook, array( $this, 'enqueue_link_page_scripts' ) );
    337409
    338             //Make the Settings page link to the link list
     410            // Make the Settings page link to the link list.
    339411            add_screen_meta_link(
    340412                'blc-links-page-link',
     
    347419
    348420        /**
    349          * plugin_action_links()
     421         * Function plugin_action_links()
    350422         * Handler for the 'plugin_action_links' hook. Adds a "Settings" link to this plugin's entry
    351423         * on the plugin list.
     
    355427         * @return array
    356428         */
    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 ) {
    359431                $links[] = "<a href='options-general.php?page=link-checker-settings'>" . __( 'Settings' ) . '</a>';
    360432            }
     
    362434        }
    363435
    364         function options_page() {
     436        /**
     437         * Function to show options page
     438         */
     439        public function options_page() {
    365440            $moduleManager = blcModuleManager::getInstance();
    366441
    367             //Prior to 1.5.2 (released 2012-05-27), there was a bug that would cause the donation flag to be
    368             //set incorrectly. So we'll unset the flag in that case.
     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.
    369444            $reset_donation_flag = ( $this->conf->get( 'first_installation_timestamp', 0 ) < strtotime( '2012-05-27 00:00' ) ) && ! $this->conf->get( 'donation_flag_fixed', false );
    370445
     
    378453                $this->initiate_recheck();
    379454
    380                 //Redirect back to the settings page
     455                // Redirect back to the settings page.
    381456                $base_url = remove_query_arg( array( '_wpnonce', 'noheader', 'updated', 'error', 'action', 'message' ) );
    382457                wp_redirect(
     
    405480                $cleanPost = $_POST;
    406481                if ( function_exists( 'wp_magic_quotes' ) ) {
    407                     $cleanPost = stripslashes_deep( $cleanPost ); //Ceterum censeo, WP shouldn't mangle superglobals.
    408                 }
    409 
    410                 //Activate/deactivate modules
     482                    $cleanPost = stripslashes_deep( $cleanPost ); // Ceterum censeo, WP shouldn't mangle superglobals.
     483                }
     484
     485                // Activate/deactivate modules.
    411486                if ( ! empty( $_POST['module'] ) ) {
    412487                    $active = array_keys( $_POST['module'] );
     
    414489                }
    415490
    416                 //Only post statuses that actually exist can be selected
     491                // Only post statuses that actually exist can be selected.
    417492                if ( isset( $_POST['enabled_post_statuses'] ) && is_array( $_POST['enabled_post_statuses'] ) ) {
    418493                    $available_statuses    = get_post_stati();
     
    489564                $acf_fields_diff2                  = array_diff( $this->conf->options['acf_fields'], $new_acf_fields );
    490565                $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'] );
    491569
    492570                //Turning off warnings turns existing warnings into "broken" links.
     
    568646                if ( $this->conf->options['logging_enabled'] ) {
    569647                    if ( $this->conf->options['custom_log_file_enabled'] ) {
     648
    570649                        $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                        }
    571667                    } else {
    572668                        //Default log file is /wp-content/uploads/broken-link-checker/blc-log.txt
     
    584680
    585681                    $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.
    588685                    if ( ! is_file( $log_file ) ) {
    589686                        file_put_contents( $log_file, '' );
     
    10101107                </tr>
    10111108
     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
    10121120            </table>
    10131121
     
    13191427            <td>
    13201428
    1321                 <div id="blc-logging-options">
     1429                <div class="blc-logging-options">
    13221430
    13231431                <p>
     
    13501458            </td>
    13511459        </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>
    13531486
    13541487        <tr valign="top">
     
    36123745
    36133746            //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' ) ) {
    36153748                $data = array(
    36163749                    'state' => 'ok',
     
    37693902            global $wpdb; /** @var wpdb $wpdb */
    37703903
    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 ) ) {
    37723910                return;
    37733911            }
     
    40124150                wp_schedule_event( time(), 'daily', 'blc_cron_database_maintenance' );
    40134151            }
    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
    40154212
    40164213        /**
  • broken-link-checker/tags/1.11.13/core/init.php

    r2265659 r2312012  
    4343    define( 'BLC_FOR_PARSING', 'parse' );
    4444    define( 'BLC_FOR_DISPLAY', 'display' );
    45     define( 'BLC_DATABASE_VERSION', 10 );
     45    define( 'BLC_DATABASE_VERSION', 16 );
    4646
    4747    /***********************************************
     
    9797            'logging_enabled'                  => false,
    9898            'log_file'                         => '',
     99            'incorrect_path'                   => false,
     100            'clear_log_on'                     => '',
    99101            'custom_log_file_enabled'          => false,
    100102            'installation_complete'            => false,
     
    105107            'show_link_actions'                => array( 'blc-deredirect-action' => false ), //Visible link actions.
    106108            'youtube_api_key'                  => '',
     109            'blc_post_modified'                => '',
    107110        )
    108111    );
     
    257260    ************************************************/
    258261
    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';
    265263
    266264    //Load the plugin if installed successfully
     
    325323                '<strong>' . __( 'Broken Link Checker installation failed. Try deactivating and then reactivating the plugin.', 'broken-link-checker' ) . '</strong>',
    326324            );
    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             }
    332325
    333326            if ( ! $blc_config_manager->db_option_loaded ) {
  • broken-link-checker/tags/1.11.13/css/links-page.css

    r2238832 r2312012  
    3030
    3131th.column-new-link-text {
    32    
     32
    3333}
    3434
    3535th.column-used-in {
    36    
     36
    3737}
    3838
     
    6363/* Cells */
    6464
    65 td.column-new-url, 
     65td.column-new-url,
    6666td.column-used-in
    6767{
     
    107107}
    108108
    109 .blc-permanently-broken { 
    110    
     109.blc-permanently-broken {
     110
    111111}
    112112
     
    200200.compact .link-last-checked,
    201201.compact .link-broken-for,
    202 .compact .link-text 
     202.compact .link-text
    203203{
    204204    display: none;
     
    220220    overflow: hidden;
    221221
    222     background-image: none; 
     222    background-image: none;
    223223    background-position: left center;
    224224    background-repeat: no-repeat;
     
    259259
    260260td.column-link-text, td.column-new-link-text {
    261     cursor: pointer; 
     261    cursor: pointer;
    262262}
    263263
     
    410410    border: 3px solid #EEEEEE;
    411411    padding: 12px;
    412    
     412
    413413    border-radius: 6px;
    414414    -moz-border-radius: 6px;
     
    450450    margin-left: 8px;
    451451    margin-right: 8px;
    452     margin-top: 8px; 
     452    margin-top: 8px;
    453453}
    454454
     
    504504    }
    505505}
     506th#cb {
     507    vertical-align: middle;
     508    padding: 6px 0 3px;
     509}
  • broken-link-checker/tags/1.11.13/includes/activation.php

    r2238832 r2312012  
    11<?php
     2
     3if ( get_option( 'blc_activation_enabled' ) ) {
     4    return;
     5}
    26
    37global $blclog, $blc_config_manager, $wpdb;
     
    117121$blclog->save();
    118122
     123// for multisite support.
     124update_option( 'blc_activation_enabled', true );
  • broken-link-checker/tags/1.11.13/includes/admin/db-upgrade.php

    r2238832 r2312012  
    246246                                ( $definition['collation'] && ( $tablefield->Collation != $definition['collation'] ) ) ||
    247247                                ( $definition['null_allowed'] && ( 'NO' == $tablefield->Null ) ) ||
    248                                 ( ! $definition['null_allowed'] && ( 'NO' == $tablefield->Null ) ) ||
    249248                                ( $tablefield->Default !== $definition['default'] );
    250249
  • broken-link-checker/tags/1.11.13/includes/admin/links-page-js.php

    r2238832 r2312012  
    651651        var me = this;
    652652        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);
    685675                    } 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 ){
    696693                                msg = msg + sprintf(
    697                                     '<?php echo esc_js( __( "However, %d instances couldn't be removed.", 'broken-link-checker' ) ); ?>\n',
    698                                     data.cnt_error
     694                                    '<?php echo esc_js( __( '%d instances of the link were successfully unlinked.', 'broken-link-checker' ) ); ?>\n',
     695                                    data.cnt_okay
    699696                                );
     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';
    700706                            }
    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);
    703713                        }
    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 message
    709                         alert(msg);
    710714                    }
     715
     716                    $(me).html('<?php echo esc_js( __( 'Unlink', 'broken-link-checker' ) ); ?>');
    711717                }
    712 
    713                 $(me).html('<?php echo esc_js( __( 'Unlink', 'broken-link-checker' ) ); ?>');
    714             }
    715         );
     718            );
     719
     720        }
    716721    });
    717722
  • broken-link-checker/tags/1.11.13/includes/admin/options-page-js.php

    r2238832 r2312012  
    131131    //Enable/disable log-related options depending on whether "Enable logging" is on.
    132132    function blcToggleLogOptions() {
    133         $('#blc-logging-options')
    134             .find('input')
     133        $('.blc-logging-options')
     134            .find('input,select')
    135135            .prop('disabled', ! $('#logging_enabled').is(':checked'));
    136136    }
  • broken-link-checker/tags/1.11.13/includes/any-post.php

    r2265659 r2312012  
    243243        } else {
    244244            //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
    253259            $q     = sprintf(
    254260                $q,
    255                 "'" . implode( "', '", $escaped_post_types ) . "'"
    256             );
     261                "'" . implode( "', '", $all_posts_id ) . "'"
     262            );
     263
    257264            $wpdb->query( $q );
    258265            $elapsed = microtime( true ) - $start;
     
    260267            $blclog->log( sprintf( '...... %d rows deleted in %.3f seconds', $wpdb->rows_affected, $elapsed ) );
    261268
    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 ) );
    280295
    281296            //Remove the 'synched' flag from all posts that have been updated
     
    586601        }
    587602
    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 );
    589607
    590608        if ( is_wp_error( $post_id ) ) {
     
    604622     * Update the the links on pagebuilders
    605623     *
    606      * @param $post_id  Post ID of whose content to update
     624     * @param int $post_id  Post ID of whose content to update.
    607625     */
    608626    function update_pagebuilders( $post_id ) {
     
    717735}
    718736
    719 
    720 
    721737/**
    722738 * Universal manager usable for most post types.
     
    727743class blcAnyPostContainerManager extends blcContainerManager {
    728744    var $container_class_name = 'blcAnyPostContainer';
    729     var $fields               = array( 'post_content' => 'html' );
     745    var $fields               = array( 'post_content' => 'html', 'post_excerpt' => 'html' );
    730746
    731747    function init() {
     
    748764     */
    749765    function get_containers( $containers, $purpose = '', $load_wrapped_objects = false ) {
     766        global $blclog;
    750767        $containers = $this->make_containers( $containers );
    751768
  • broken-link-checker/tags/1.11.13/includes/checkers.php

    r2238832 r2312012  
    9090        $manager         = blcModuleManager::getInstance();
    9191        $active_checkers = $manager->get_active_by_category( 'checker' );
    92 
    9392        foreach ( $active_checkers as $module_id => $module_data ) {
    9493            //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  
    284284            $results = array_merge( $defaults, $rez );
    285285
     286
    286287            //Some HTTP errors can be treated as warnings.
    287288            $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.12
    2 # This file is distributed under the same license as the Broken Link Checker 1.11.12 package.
     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.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Broken Link Checker 1.11.12\n"
     5"Project-Id-Version: Broken Link Checker 1.11.13\n"
    66"MIME-Version: 1.0\n"
    77"Content-Type: text/plain; charset=UTF-8\n"
     
    1414"Plural-Forms: nplurals=2; plural=(n != 1);\n"
    1515
    16 #: core/core.php:154, includes/admin/links-page-js.php:45
     16#: core/core.php:211, includes/admin/links-page-js.php:45
    1717msgid "Loading..."
    1818msgstr ""
    1919
    20 #: core/core.php:178, includes/admin/options-page-js.php:18
     20#: core/core.php:235, includes/admin/options-page-js.php:18
    2121msgid "[ Network error ]"
    2222msgstr ""
    2323
    24 #: core/core.php:210
     24#: core/core.php:278
    2525msgid "Automatically expand the widget if broken links have been detected"
    2626msgstr ""
    2727
    28 #: core/core.php:302
     28#: core/core.php:374
    2929msgid "Link Checker Settings"
    3030msgstr ""
    3131
    32 #: core/core.php:303
     32#: core/core.php:375
    3333msgid "Link Checker"
    3434msgstr ""
    3535
    36 #: core/core.php:309, includes/link-query.php:37
     36#: core/core.php:381, includes/link-query.php:37
    3737msgid "Broken Links"
    3838msgstr ""
    3939
    40 #: core/core.php:325
     40#: core/core.php:397
    4141msgid "View Broken Links"
    4242msgstr ""
    4343
    44 #: core/core.php:341
     44#: core/core.php:413
    4545msgid "Go to Broken Links"
    4646msgstr ""
    4747
    48 #: core/core.php:359
     48#: core/core.php:431
    4949msgid "Settings"
    5050msgstr ""
    5151
    52 #: core/core.php:394, includes/admin/table-printer.php:292, includes/admin/table-printer.php:710
     52#: core/core.php:469, includes/admin/table-printer.php:292, includes/admin/table-printer.php:710
    5353msgid "Edit URL"
    5454msgstr ""
    5555
    56 #: core/core.php:395, includes/admin/links-page-js.php:713, includes/admin/table-printer.php:297, includes/admin/table-printer.php:713
     56#: core/core.php:470, includes/admin/links-page-js.php:716, includes/admin/table-printer.php:297, includes/admin/table-printer.php:713
    5757msgid "Unlink"
    5858msgstr ""
    5959
    60 #: core/core.php:396, includes/admin/links-page-js.php:111, includes/admin/table-printer.php:719
     60#: core/core.php:471, includes/admin/links-page-js.php:111, includes/admin/table-printer.php:719
    6161msgid "Not broken"
    6262msgstr ""
    6363
    64 #: core/core.php:397, includes/admin/table-printer.php:296, includes/admin/table-printer.php:727
     64#: core/core.php:472, includes/admin/table-printer.php:296, includes/admin/table-printer.php:727
    6565msgid "Dismiss"
    6666msgstr ""
    6767
    68 #: core/core.php:398, includes/admin/table-printer.php:293, includes/admin/table-printer.php:739
     68#: core/core.php:473, includes/admin/table-printer.php:293, includes/admin/table-printer.php:739
    6969msgid "Recheck"
    7070msgstr ""
    7171
    72 #: core/core.php:399, includes/admin/table-printer.php:747
     72#: core/core.php:474, includes/admin/table-printer.php:747
    7373msgctxt "link action; replace one redirect with a direct link"
    7474msgid "Fix redirect"
    7575msgstr ""
    7676
    77 #: core/core.php:653
     77#: core/core.php:750
    7878msgid "Settings saved."
    7979msgstr ""
    8080
    81 #: core/core.php:659
     81#: core/core.php:756
    8282msgid "Thank you for your donation!"
    8383msgstr ""
    8484
    85 #: core/core.php:667
     85#: core/core.php:764
    8686msgid "Complete site recheck started."
    8787msgstr ""
    8888
    89 #: core/core.php:690
     89#: core/core.php:787
    9090msgid "General"
    9191msgstr ""
    9292
    93 #: core/core.php:691
     93#: core/core.php:788
    9494msgid "Look For Links In"
    9595msgstr ""
    9696
    97 #: core/core.php:692
     97#: core/core.php:789
    9898msgid "Which Links To Check"
    9999msgstr ""
    100100
    101 #: core/core.php:693
     101#: core/core.php:790
    102102msgid "Protocols & APIs"
    103103msgstr ""
    104104
    105 #: core/core.php:694
     105#: core/core.php:791
    106106msgid "Advanced"
    107107msgstr ""
    108108
    109 #: core/core.php:709
     109#: core/core.php:806
    110110msgid "Broken Link Checker Options"
    111111msgstr ""
    112112
    113 #: core/core.php:753, includes/admin/table-printer.php:215
     113#: core/core.php:850, includes/admin/table-printer.php:215
    114114msgid "Status"
    115115msgstr ""
    116116
    117 #: core/core.php:755, includes/admin/options-page-js.php:56
     117#: core/core.php:852, includes/admin/options-page-js.php:56
    118118msgid "Show debug info"
    119119msgstr ""
    120120
    121 #: core/core.php:783
     121#: core/core.php:880
    122122msgid "Check each link"
    123123msgstr ""
    124124
    125 #: core/core.php:788
     125#: core/core.php:885
    126126msgid "Every %s hours"
    127127msgstr ""
    128128
    129 #: core/core.php:797
     129#: core/core.php:894
    130130msgid "Existing links will be checked this often. New links will usually be checked ASAP."
    131131msgstr ""
    132132
    133 #: core/core.php:804
     133#: core/core.php:901
    134134msgid "E-mail notifications"
    135135msgstr ""
    136136
    137 #: core/core.php:814
     137#: core/core.php:911
    138138msgid "Send me e-mail notifications about newly detected broken links"
    139139msgstr ""
    140140
    141 #: core/core.php:826
     141#: core/core.php:923
    142142msgid "Send authors e-mail notifications about broken links in their posts"
    143143msgstr ""
    144144
    145 #: core/core.php:833
     145#: core/core.php:930
    146146msgid "Notification e-mail address"
    147147msgstr ""
    148148
    149 #: core/core.php:845
     149#: core/core.php:942
    150150msgid "Leave empty to use the e-mail address specified in Settings &rarr; General."
    151151msgstr ""
    152152
    153 #: core/core.php:852
     153#: core/core.php:949
    154154msgid "Link tweaks"
    155155msgstr ""
    156156
    157 #: core/core.php:862
     157#: core/core.php:959
    158158msgid "Apply custom formatting to broken links"
    159159msgstr ""
    160160
    161 #: core/core.php:867, core/core.php:910
     161#: core/core.php:964, core/core.php:1007
    162162msgid "Edit CSS"
    163163msgstr ""
    164164
    165 #: core/core.php:889
     165#: core/core.php:986
    166166msgid "Example : Lorem ipsum <a %s>broken link</a>, dolor sit amet."
    167167msgstr ""
    168168
    169 #: core/core.php:892, core/core.php:936
     169#: core/core.php:989, core/core.php:1033
    170170msgid "Click \"Save Changes\" to update example output."
    171171msgstr ""
    172172
    173 #: core/core.php:905
     173#: core/core.php:1002
    174174msgid "Apply custom formatting to removed links"
    175175msgstr ""
    176176
    177 #: core/core.php:933
     177#: core/core.php:1030
    178178msgid "Example : Lorem ipsum <span %s>removed link</span>, dolor sit amet."
    179179msgstr ""
    180180
    181 #: core/core.php:950
     181#: core/core.php:1047
    182182msgid "Stop search engines from following broken links"
    183183msgstr ""
    184184
    185 #: core/core.php:956
     185#: core/core.php:1053
    186186msgctxt "\"Link tweaks\" settings"
    187187msgid "These settings only apply to the content of posts, not comments or custom fields."
    188188msgstr ""
    189189
    190 #: core/core.php:967
     190#: core/core.php:1064
    191191msgctxt "settings page"
    192192msgid "Suggestions"
    193193msgstr ""
    194194
    195 #: core/core.php:972
     195#: core/core.php:1069
    196196msgid "Suggest alternatives to broken links"
    197197msgstr ""
    198198
    199 #: core/core.php:978
     199#: core/core.php:1075
    200200msgctxt "settings page"
    201201msgid "Warnings"
    202202msgstr ""
    203203
    204 #: core/core.php:983
     204#: core/core.php:1080
    205205msgid "Show uncertain or minor problems as \"warnings\" instead of \"broken\""
    206206msgstr ""
    207207
    208 #: core/core.php:987
     208#: core/core.php:1084
    209209msgid "Turning off this option will make the plugin report all problems as broken links."
    210210msgstr ""
    211211
    212 #: core/core.php:994
     212#: core/core.php:1091
    213213msgid "YouTube API Key"
    214214msgstr ""
    215215
    216 #: core/core.php:1006
     216#: core/core.php:1103
    217217msgid "Use your own %1$sapi key%2$s for checking youtube links."
    218218msgstr ""
    219219
    220 #: core/core.php:1022
     220#: core/core.php:1110
     221msgid "Post Modified Date"
     222msgstr ""
     223
     224#: core/core.php:1115
     225msgid "Disable post modified date change when link is edited"
     226msgstr ""
     227
     228#: core/core.php:1130
    221229msgid "Look for links in"
    222230msgstr ""
    223231
    224 #: core/core.php:1038
     232#: core/core.php:1146
    225233msgid "Post statuses"
    226234msgstr ""
    227235
    228 #: core/core.php:1071
     236#: core/core.php:1179
    229237msgid "Link types"
    230238msgstr ""
    231239
    232 #: core/core.php:1077
     240#: core/core.php:1185
    233241msgid "Error : All link parsers missing!"
    234242msgstr ""
    235243
    236 #: core/core.php:1084
     244#: core/core.php:1192
    237245msgid "Exclusion list"
    238246msgstr ""
    239247
    240 #: core/core.php:1085
     248#: core/core.php:1193
    241249msgid "Don't check links where the URL contains any of these words (one per line) :"
    242250msgstr ""
    243251
    244 #: core/core.php:1106
     252#: core/core.php:1214
    245253msgid "Check links using"
    246254msgstr ""
    247255
    248 #: core/core.php:1125, includes/links.php:1032
     256#: core/core.php:1233, includes/links.php:1033
    249257msgid "Timeout"
    250258msgstr ""
    251259
    252 #: core/core.php:1131, core/core.php:1226, core/core.php:3667
     260#: core/core.php:1239, core/core.php:1334, core/core.php:3800
    253261msgid "%s seconds"
    254262msgstr ""
    255263
    256 #: core/core.php:1140
     264#: core/core.php:1248
    257265msgid "Links that take longer than this to load will be marked as broken."
    258266msgstr ""
    259267
    260 #: core/core.php:1147
     268#: core/core.php:1255
    261269msgid "Link monitor"
    262270msgstr ""
    263271
    264 #: core/core.php:1159
     272#: core/core.php:1267
    265273msgid "Run continuously while the Dashboard is open"
    266274msgstr ""
    267275
    268 #: core/core.php:1171
     276#: core/core.php:1279
    269277msgid "Run hourly in the background"
    270278msgstr ""
    271279
    272 #: core/core.php:1179
     280#: core/core.php:1287
    273281msgid "Show the dashboard widget for"
    274282msgstr ""
    275283
    276 #: core/core.php:1184
     284#: core/core.php:1292
    277285msgctxt "dashboard widget visibility"
    278286msgid "Administrator"
    279287msgstr ""
    280288
    281 #: core/core.php:1185
     289#: core/core.php:1293
    282290msgctxt "dashboard widget visibility"
    283291msgid "Editor and above"
    284292msgstr ""
    285293
    286 #: core/core.php:1186
     294#: core/core.php:1294
    287295msgctxt "dashboard widget visibility"
    288296msgid "Nobody (disables the widget)"
    289297msgstr ""
    290298
    291 #: core/core.php:1202
     299#: core/core.php:1310
    292300msgctxt "settings page"
    293301msgid "Show link actions"
    294302msgstr ""
    295303
    296 #: core/core.php:1220
     304#: core/core.php:1328
    297305msgid "Max. execution time"
    298306msgstr ""
    299307
    300 #: core/core.php:1237
     308#: core/core.php:1345
    301309msgid "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."
    302310msgstr ""
    303311
    304 #: core/core.php:1246
     312#: core/core.php:1354
    305313msgid "Server load limit"
    306314msgstr ""
    307315
    308 #: core/core.php:1261
     316#: core/core.php:1369
    309317msgid "Current load : %s"
    310318msgstr ""
    311319
    312 #: core/core.php:1266
     320#: core/core.php:1374
    313321msgid "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."
    314322msgstr ""
    315323
    316 #: core/core.php:1275
     324#: core/core.php:1383
    317325msgid "Not available"
    318326msgstr ""
    319327
    320 #: core/core.php:1277
     328#: core/core.php:1385
    321329msgid "Load limiting only works on Linux-like systems where <code>/proc/loadavg</code> is present and accessible."
    322330msgstr ""
    323331
    324 #: core/core.php:1285
     332#: core/core.php:1393
    325333msgid "Target resource usage"
    326334msgstr ""
    327335
    328 #: core/core.php:1305
     336#: core/core.php:1413
    329337msgid "Logging"
    330338msgstr ""
    331339
    332 #: core/core.php:1311
     340#: core/core.php:1419
    333341msgid "Enable logging"
    334342msgstr ""
    335343
    336 #: core/core.php:1318
     344#: core/core.php:1426
    337345msgid "Log file location"
    338346msgstr ""
    339347
    340 #: core/core.php:1327
     348#: core/core.php:1435
    341349msgctxt "log file location"
    342350msgid "Default"
    343351msgstr ""
    344352
    345 #: core/core.php:1343
     353#: core/core.php:1451
    346354msgctxt "log file location"
    347355msgid "Custom"
    348356msgstr ""
    349357
    350 #: core/core.php:1355
     358#: core/core.php:1461
     359msgid "Log file clear schedule"
     360msgstr ""
     361
     362#: core/core.php:1467, includes/admin/table-printer.php:548
     363msgid "Never"
     364msgstr ""
     365
     366#: core/core.php:1488
    351367msgid "Forced recheck"
    352368msgstr ""
    353369
    354 #: core/core.php:1358
     370#: core/core.php:1491
    355371msgid "Re-check all pages"
    356372msgstr ""
    357373
    358 #: core/core.php:1363
     374#: core/core.php:1496
    359375msgid "The \"Nuclear Option\". Click this button to make the plugin empty its link database and recheck the entire site from scratch."
    360376msgstr ""
    361377
    362 #: core/core.php:1375
     378#: core/core.php:1508
    363379msgid "Save Changes"
    364380msgstr ""
    365381
    366 #: core/core.php:1426
     382#: core/core.php:1559
    367383msgid "Configure"
    368384msgstr ""
    369385
    370 #: core/core.php:1508
     386#: core/core.php:1641
    371387msgid "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>."
    372388msgstr ""
    373389
    374 #: core/core.php:1522
     390#: core/core.php:1655
    375391msgid "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>."
    376392msgstr ""
    377393
    378 #: core/core.php:1653, core/core.php:1739, core/core.php:1771
     394#: core/core.php:1786, core/core.php:1872, core/core.php:1904
    379395msgid "Database error : %s"
    380396msgstr ""
    381397
    382 #: core/core.php:1720
     398#: core/core.php:1853
    383399msgid "You must enter a filter name!"
    384400msgstr ""
    385401
    386 #: core/core.php:1724
     402#: core/core.php:1857
    387403msgid "Invalid search query."
    388404msgstr ""
    389405
    390 #: core/core.php:1734
     406#: core/core.php:1867
    391407msgid "Filter \"%s\" created"
    392408msgstr ""
    393409
    394 #: core/core.php:1761
     410#: core/core.php:1894
    395411msgid "Filter ID not specified."
    396412msgstr ""
    397413
    398 #: core/core.php:1768
     414#: core/core.php:1901
    399415msgid "Filter deleted"
    400416msgstr ""
    401417
    402 #: core/core.php:1817
     418#: core/core.php:1950
    403419msgid "Replaced %d redirect with a direct link"
    404420msgid_plural "Replaced %d redirects with direct links"
     
    406422msgstr[1] ""
    407423
    408 #: core/core.php:1828
     424#: core/core.php:1961
    409425msgid "Failed to fix %d redirect"
    410426msgid_plural "Failed to fix %d redirects"
     
    412428msgstr[1] ""
    413429
    414 #: core/core.php:1839
     430#: core/core.php:1972
    415431msgid "None of the selected links are redirects!"
    416432msgstr ""
    417433
    418 #: core/core.php:1919
     434#: core/core.php:2052
    419435msgid "%d link updated."
    420436msgid_plural "%d links updated."
     
    422438msgstr[1] ""
    423439
    424 #: core/core.php:1930
     440#: core/core.php:2063
    425441msgid "Failed to update %d link."
    426442msgid_plural "Failed to update %d links."
     
    428444msgstr[1] ""
    429445
    430 #: core/core.php:2021
     446#: core/core.php:2154
    431447msgid "%d link removed"
    432448msgid_plural "%d links removed"
     
    434450msgstr[1] ""
    435451
    436 #: core/core.php:2032
     452#: core/core.php:2165
    437453msgid "Failed to remove %d link"
    438454msgid_plural "Failed to remove %d links"
     
    440456msgstr[1] ""
    441457
    442 #: core/core.php:2142
     458#: core/core.php:2275
    443459msgid "%d item was skipped because it can't be moved to the Trash. You need to delete it manually."
    444460msgid_plural "%d items were skipped because they can't be moved to the Trash. You need to delete them manually."
     
    446462msgstr[1] ""
    447463
    448 #: core/core.php:2164
     464#: core/core.php:2297
    449465msgid "Didn't find anything to delete!"
    450466msgstr ""
    451467
    452 #: core/core.php:2202
     468#: core/core.php:2335
    453469msgid "%d link scheduled for rechecking"
    454470msgid_plural "%d links scheduled for rechecking"
     
    456472msgstr[1] ""
    457473
    458 #: core/core.php:2251, core/core.php:3088
     474#: core/core.php:2384, core/core.php:3221
    459475msgid "This link was manually marked as working by the user."
    460476msgstr ""
    461477
    462 #: core/core.php:2259, core/core.php:2322
     478#: core/core.php:2392, core/core.php:2455
    463479msgid "Couldn't modify link %d"
    464480msgstr ""
    465481
    466 #: core/core.php:2270
     482#: core/core.php:2403
    467483msgid "%d link marked as not broken"
    468484msgid_plural "%d links marked as not broken"
     
    470486msgstr[1] ""
    471487
    472 #: core/core.php:2333
     488#: core/core.php:2466
    473489msgid "%d link dismissed"
    474490msgid_plural "%d links dismissed"
     
    476492msgstr[1] ""
    477493
    478 #: core/core.php:2390
     494#: core/core.php:2523
    479495msgid "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."
    480496msgstr ""
    481497
    482 #: core/core.php:2395
     498#: core/core.php:2528
    483499msgctxt "admin notice under Tools - Broken links - Warnings"
    484500msgid "Hide notice"
    485501msgstr ""
    486502
    487 #: core/core.php:2401
     503#: core/core.php:2534
    488504msgctxt "a link from the admin notice under Tools - Broken links - Warnings"
    489505msgid "Change warning settings"
    490506msgstr ""
    491507
    492 #: core/core.php:2426
     508#: core/core.php:2559
    493509msgid "Table columns"
    494510msgstr ""
    495511
    496 #: core/core.php:2445
     512#: core/core.php:2578
    497513msgid "Show on screen"
    498514msgstr ""
    499515
    500 #: core/core.php:2452
     516#: core/core.php:2585
    501517msgid "links"
    502518msgstr ""
    503519
    504 #: core/core.php:2453, includes/admin/table-printer.php:175
     520#: core/core.php:2586, includes/admin/table-printer.php:175
    505521msgid "Apply"
    506522msgstr ""
    507523
    508 #: core/core.php:2457
     524#: core/core.php:2590
    509525msgid "Misc"
    510526msgstr ""
    511527
    512 #: core/core.php:2472
     528#: core/core.php:2605
    513529msgid "Highlight links broken for at least %s days"
    514530msgstr ""
    515531
    516 #: core/core.php:2481
     532#: core/core.php:2614
    517533msgid "Color-code status codes"
    518534msgstr ""
    519535
    520 #: core/core.php:2500, core/core.php:3072, core/core.php:3119, core/core.php:3158, core/core.php:3282, core/core.php:3341, core/core.php:3419
     536#: core/core.php:2633, core/core.php:3205, core/core.php:3252, core/core.php:3291, core/core.php:3415, core/core.php:3474, core/core.php:3552
    521537msgid "You're not allowed to do that!"
    522538msgstr ""
    523539
    524 #: core/core.php:2940
     540#: core/core.php:3073
    525541msgid "View broken links"
    526542msgstr ""
    527543
    528 #: core/core.php:2941
     544#: core/core.php:3074
    529545msgid "Found %d broken link"
    530546msgid_plural "Found %d broken links"
     
    532548msgstr[1] ""
    533549
    534 #: core/core.php:2947
     550#: core/core.php:3080
    535551msgid "No broken links found."
    536552msgstr ""
    537553
    538 #: core/core.php:2954
     554#: core/core.php:3087
    539555msgid "%d URL in the work queue"
    540556msgid_plural "%d URLs in the work queue"
     
    542558msgstr[1] ""
    543559
    544 #: core/core.php:2958
     560#: core/core.php:3091
    545561msgid "No URLs in the work queue."
    546562msgstr ""
    547563
    548 #: core/core.php:2964
     564#: core/core.php:3097
    549565msgctxt "for the \"Detected X unique URLs in Y links\" message"
    550566msgid "%d unique URL"
     
    553569msgstr[1] ""
    554570
    555 #: core/core.php:2968
     571#: core/core.php:3101
    556572msgctxt "for the \"Detected X unique URLs in Y links\" message"
    557573msgid "%d link"
     
    560576msgstr[1] ""
    561577
    562 #: core/core.php:2974
     578#: core/core.php:3107
    563579msgid "Detected %1$s in %2$s and still searching..."
    564580msgstr ""
    565581
    566 #: core/core.php:2980
     582#: core/core.php:3113
    567583msgid "Detected %1$s in %2$s."
    568584msgstr ""
    569585
    570 #: core/core.php:2987
     586#: core/core.php:3120
    571587msgid "Searching your blog for links..."
    572588msgstr ""
    573589
    574 #: core/core.php:2989
     590#: core/core.php:3122
    575591msgid "No links detected."
    576592msgstr ""
    577593
    578 #: core/core.php:3015
     594#: core/core.php:3148
    579595msgctxt "current load"
    580596msgid "Unknown"
    581597msgstr ""
    582598
    583 #: core/core.php:3080, core/core.php:3127, core/core.php:3181, core/core.php:3296, core/core.php:3364, core/core.php:3442
     599#: core/core.php:3213, core/core.php:3260, core/core.php:3314, core/core.php:3429, core/core.php:3497, core/core.php:3575
    584600msgid "Oops, I can't find the link %d"
    585601msgstr ""
    586602
    587 #: core/core.php:3100, core/core.php:3141
     603#: core/core.php:3233, core/core.php:3274
    588604msgid "Oops, couldn't modify the link!"
    589605msgstr ""
    590606
    591 #: core/core.php:3103, core/core.php:3144, core/core.php:3329, core/core.php:3351, core/core.php:3429
     607#: core/core.php:3236, core/core.php:3277, core/core.php:3462, core/core.php:3484, core/core.php:3562
    592608msgid "Error : link_id not specified"
    593609msgstr ""
    594610
    595 #: core/core.php:3168
     611#: core/core.php:3301
    596612msgid "Error : link_id or new_url not specified"
    597613msgstr ""
    598614
    599 #: core/core.php:3194, core/core.php:3208
     615#: core/core.php:3327, core/core.php:3341
    600616msgid "Oops, the new URL is invalid!"
    601617msgstr ""
    602618
    603 #: core/core.php:3228
     619#: core/core.php:3361
    604620msgid "An unexpected error occurred!"
    605621msgstr ""
    606622
    607 #: core/core.php:3309
     623#: core/core.php:3442
    608624msgid "An unexpected error occured!"
    609625msgstr ""
    610626
    611 #: core/core.php:3477
     627#: core/core.php:3610
    612628msgid "You don't have sufficient privileges to access this information!"
    613629msgstr ""
    614630
    615 #: core/core.php:3490
     631#: core/core.php:3623
    616632msgid "Error : link ID not specified"
    617633msgstr ""
    618634
    619 #: core/core.php:3504
     635#: core/core.php:3637
    620636msgid "Failed to load link details (%s)"
    621637msgstr ""
    622638
    623 #: core/core.php:3558
     639#: core/core.php:3691
    624640msgid "Broken Link Checker"
    625641msgstr ""
    626642
    627 #: core/core.php:3597
     643#: core/core.php:3730
    628644msgid "You have an old version of CURL. Redirect detection may not work properly."
    629645msgstr ""
    630646
    631 #: core/core.php:3608, core/core.php:3624, core/core.php:3629
     647#: core/core.php:3741, core/core.php:3757, core/core.php:3762
    632648msgid "Not installed"
    633649msgstr ""
    634650
    635 #: core/core.php:3617
     651#: core/core.php:3750
    636652msgid "Installed"
    637653msgstr ""
    638654
    639 #: core/core.php:3630
     655#: core/core.php:3763
    640656msgid "You must have either CURL or Snoopy installed for the plugin to work!"
    641657msgstr ""
    642658
    643 #: core/core.php:3640
     659#: core/core.php:3773
    644660msgid "On"
    645661msgstr ""
    646662
    647 #: core/core.php:3641
     663#: core/core.php:3774
    648664msgid "Redirects may be detected as broken links when safe_mode is on."
    649665msgstr ""
    650666
    651 #: core/core.php:3646, core/core.php:3660
     667#: core/core.php:3779, core/core.php:3793
    652668msgid "Off"
    653669msgstr ""
    654670
    655 #: core/core.php:3654
     671#: core/core.php:3787
    656672msgid "On ( %s )"
    657673msgstr ""
    658674
    659 #: core/core.php:3655
     675#: core/core.php:3788
    660676msgid "Redirects may be detected as broken links when open_basedir is on."
    661677msgstr ""
    662678
    663 #: core/core.php:3692
     679#: core/core.php:3825
    664680msgid "If this value is zero even after several page reloads you have probably encountered a bug."
    665681msgstr ""
    666682
    667 #: core/core.php:3816, core/core.php:3935
     683#: core/core.php:3954, core/core.php:4073
    668684msgid "[%s] Broken links detected"
    669685msgstr ""
    670686
    671 #: core/core.php:3821
     687#: core/core.php:3959
    672688msgid "Broken Link Checker has detected %d new broken link on your site."
    673689msgid_plural "Broken Link Checker has detected %d new broken links on your site."
     
    675691msgstr[1] ""
    676692
    677 #: core/core.php:3852
     693#: core/core.php:3990
    678694msgid "Here's a list of the first %d broken links:"
    679695msgid_plural "Here's a list of the first %d broken links:"
     
    681697msgstr[1] ""
    682698
    683 #: core/core.php:3861
     699#: core/core.php:3999
    684700msgid "Here's a list of the new broken links: "
    685701msgstr ""
    686702
    687 #: core/core.php:3870
     703#: core/core.php:4008
    688704msgid "Link text : %s"
    689705msgstr ""
    690706
    691 #: core/core.php:3871
     707#: core/core.php:4009
    692708msgid "Link URL : <a href=\"%1$s\">%2$s</a>"
    693709msgstr ""
    694710
    695 #: core/core.php:3872
     711#: core/core.php:4010
    696712msgid "Source : %s"
    697713msgstr ""
    698714
    699 #: core/core.php:3886
     715#: core/core.php:4024
    700716msgid "You can see all broken links here:"
    701717msgstr ""
    702718
    703 #: core/core.php:3940
     719#: core/core.php:4078
    704720msgid "Broken Link Checker has detected %d new broken link in your posts."
    705721msgid_plural "Broken Link Checker has detected %d new broken links in your posts."
     
    707723msgstr[1] ""
    708724
    709 #: core/init.php:234
     725#: core/init.php:237
    710726msgid "Every 10 minutes"
    711727msgstr ""
    712728
    713 #: core/init.php:241
     729#: core/init.php:244
    714730msgid "Once Weekly"
    715731msgstr ""
    716732
    717 #: core/init.php:247
     733#: core/init.php:250
    718734msgid "Twice a Month"
    719735msgstr ""
    720736
    721 #: core/init.php:325
     737#: core/init.php:323
    722738msgid "Broken Link Checker installation failed. Try deactivating and then reactivating the plugin."
    723739msgstr ""
    724740
    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
    730742msgid "Edit"
    731743msgstr ""
    732744
    733 #: includes/any-post.php:470, modules/containers/acf_field.php:252, modules/containers/custom_field.php:258
     745#: includes/any-post.php:485, modules/containers/acf_field.php:252, modules/containers/custom_field.php:258
    734746msgid "Move this item to the Trash"
    735747msgstr ""
    736748
    737 #: includes/any-post.php:472, modules/containers/acf_field.php:252, modules/containers/custom_field.php:260
     749#: includes/any-post.php:487, modules/containers/acf_field.php:252, modules/containers/custom_field.php:260
    738750msgid "Trash"
    739751msgstr ""
    740752
    741 #: includes/any-post.php:477, modules/containers/acf_field.php:254, modules/containers/custom_field.php:265
     753#: includes/any-post.php:492, modules/containers/acf_field.php:254, modules/containers/custom_field.php:265
    742754msgid "Delete this item permanently"
    743755msgstr ""
    744756
    745 #: includes/any-post.php:479, modules/containers/acf_field.php:254, modules/containers/blogroll.php:47, modules/containers/custom_field.php:267
     757#: includes/any-post.php:494, modules/containers/acf_field.php:254, modules/containers/blogroll.php:47, modules/containers/custom_field.php:267
    746758msgid "Delete"
    747759msgstr ""
    748760
    749 #: includes/any-post.php:492
     761#: includes/any-post.php:507
    750762msgid "Preview &#8220;%s&#8221;"
    751763msgstr ""
    752764
    753 #: includes/any-post.php:493
     765#: includes/any-post.php:508
    754766msgid "Preview"
    755767msgstr ""
    756768
    757 #: includes/any-post.php:500
     769#: includes/any-post.php:515
    758770msgid "View &#8220;%s&#8221;"
    759771msgstr ""
    760772
    761 #: includes/any-post.php:501, modules/containers/acf_field.php:258, modules/containers/comment.php:172, modules/containers/custom_field.php:272
     773#: includes/any-post.php:516, modules/containers/acf_field.php:258, modules/containers/comment.php:172, modules/containers/custom_field.php:272
    762774msgid "View"
    763775msgstr ""
    764776
    765 #: includes/any-post.php:520, modules/containers/acf_field.php:248, modules/containers/custom_field.php:252
     777#: includes/any-post.php:535, modules/containers/acf_field.php:248, modules/containers/custom_field.php:252
    766778msgid "Edit this item"
    767779msgstr ""
    768780
    769 #: includes/any-post.php:584, modules/containers/blogroll.php:83, modules/containers/comment.php:43
     781#: includes/any-post.php:599, modules/containers/blogroll.php:83, modules/containers/comment.php:43
    770782msgid "Nothing to update"
    771783msgstr ""
    772784
    773 #: includes/any-post.php:595
     785#: includes/any-post.php:613
    774786msgid "Updating post %d failed"
    775787msgstr ""
    776788
    777 #: includes/any-post.php:656, modules/containers/acf_field.php:327, modules/containers/custom_field.php:341
     789#: includes/any-post.php:674, modules/containers/acf_field.php:327, modules/containers/custom_field.php:341
    778790msgid "Failed to delete post \"%1$s\" (%2$d)"
    779791msgstr ""
    780792
    781 #: includes/any-post.php:675, modules/containers/acf_field.php:341, modules/containers/custom_field.php:360
     793#: includes/any-post.php:693, modules/containers/acf_field.php:341, modules/containers/custom_field.php:360
    782794msgid "Can't move post \"%1$s\" (%2$d) to the trash because the trash feature is disabled"
    783795msgstr ""
    784796
    785 #: includes/any-post.php:695, modules/containers/acf_field.php:353, modules/containers/custom_field.php:379
     797#: includes/any-post.php:713, modules/containers/acf_field.php:353, modules/containers/custom_field.php:379
    786798msgid "Failed to move post \"%1$s\" (%2$d) to the trash"
    787799msgstr ""
    788800
    789 #: includes/any-post.php:803
     801#: includes/any-post.php:820
    790802msgid "%d post deleted."
    791803msgid_plural "%d posts deleted."
     
    793805msgstr[1] ""
    794806
    795 #: includes/any-post.php:805
     807#: includes/any-post.php:822
    796808msgid "%d page deleted."
    797809msgid_plural "%d pages deleted."
     
    799811msgstr[1] ""
    800812
    801 #: includes/any-post.php:807
     813#: includes/any-post.php:824
    802814msgid "%1$d \"%2$s\" deleted."
    803815msgid_plural "%1$d \"%2$s\" deleted."
     
    805817msgstr[1] ""
    806818
    807 #: includes/any-post.php:826
     819#: includes/any-post.php:843
    808820msgid "%d post moved to the Trash."
    809821msgid_plural "%d posts moved to the Trash."
     
    811823msgstr[1] ""
    812824
    813 #: includes/any-post.php:828
     825#: includes/any-post.php:845
    814826msgid "%d page moved to the Trash."
    815827msgid_plural "%d pages moved to the Trash."
     
    817829msgstr[1] ""
    818830
    819 #: includes/any-post.php:830
     831#: includes/any-post.php:847
    820832msgid "%1$d \"%2$s\" moved to the Trash."
    821833msgid_plural "%1$d \"%2$s\" moved to the Trash."
     
    10141026msgstr ""
    10151027
    1016 #: includes/links.php:502
     1028#: includes/links.php:503
    10171029msgid "Link is broken."
    10181030msgstr ""
    10191031
    1020 #: includes/links.php:504
     1032#: includes/links.php:505
    10211033msgid "Link is valid."
    10221034msgstr ""
    10231035
    1024 #: includes/links.php:737, includes/links.php:840, includes/links.php:874
     1036#: includes/links.php:738, includes/links.php:841, includes/links.php:875
    10251037msgid "Link is not valid"
    10261038msgstr ""
    10271039
    1028 #: includes/links.php:754
     1040#: includes/links.php:755
    10291041msgid "This link can not be edited because it is not used anywhere on this site."
    10301042msgstr ""
    10311043
    1032 #: includes/links.php:780
     1044#: includes/links.php:781
    10331045msgid "Failed to create a DB entry for the new URL."
    10341046msgstr ""
    10351047
    1036 #: includes/links.php:847
     1048#: includes/links.php:848
    10371049msgid "This link is not a redirect"
    10381050msgstr ""
    10391051
    1040 #: includes/links.php:901, includes/links.php:938
     1052#: includes/links.php:902, includes/links.php:939
    10411053msgid "Couldn't delete the link's database record"
    10421054msgstr ""
    10431055
    1044 #: includes/links.php:1015
     1056#: includes/links.php:1016
    10451057msgctxt "link status"
    10461058msgid "Unknown"
    10471059msgstr ""
    10481060
    1049 #: includes/links.php:1028, modules/checkers/http.php:318, modules/extras/mediafire.php:115, modules/extras/youtube.php:136, modules/extras/youtube.php:231
     1061#: includes/links.php:1029, modules/checkers/http.php:312, modules/checkers/http.php:316, modules/extras/mediafire.php:115, modules/extras/youtube.php:135, modules/extras/youtube.php:230
    10501062msgid "Unknown Error"
    10511063msgstr ""
    10521064
    1053 #: includes/links.php:1051
     1065#: includes/links.php:1052
    10541066msgid "Not checked"
    10551067msgstr ""
    10561068
    1057 #: includes/links.php:1054
     1069#: includes/links.php:1055
    10581070msgid "False positive"
    10591071msgstr ""
    10601072
    1061 #: includes/links.php:1057, modules/extras/rapidshare.php:145, modules/extras/rapidshare.php:151, modules/extras/rapidshare.php:178, modules/extras/youtube.php:142, modules/extras/youtube.php:218
     1073#: includes/links.php:1058, modules/extras/rapidshare.php:145, modules/extras/rapidshare.php:151, modules/extras/rapidshare.php:178, modules/extras/youtube.php:141, modules/extras/youtube.php:217
    10621074msgctxt "link status"
    10631075msgid "OK"
     
    11361148msgstr ""
    11371149
    1138 #: includes/admin/links-page-js.php:64, includes/admin/links-page-js.php:653
     1150#: includes/admin/links-page-js.php:64, includes/admin/links-page-js.php:659
    11391151msgid "Wait..."
    11401152msgstr ""
     
    11851197msgstr ""
    11861198
    1187 #: includes/admin/links-page-js.php:691
     1199#: includes/admin/links-page-js.php:654
     1200msgid "Are you sure you want to unlink and remove this link from all posts?"
     1201msgstr ""
     1202
     1203#: includes/admin/links-page-js.php:694
    11881204msgid "%d instances of the link were successfully unlinked."
    11891205msgstr ""
    11901206
    1191 #: includes/admin/links-page-js.php:697
     1207#: includes/admin/links-page-js.php:700
    11921208msgid "However, %d instances couldn't be removed."
    11931209msgstr ""
    11941210
    1195 #: includes/admin/links-page-js.php:702
     1211#: includes/admin/links-page-js.php:705
    11961212msgid "The plugin failed to remove the link."
    11971213msgstr ""
    11981214
    1199 #: includes/admin/links-page-js.php:705
     1215#: includes/admin/links-page-js.php:708
    12001216msgid "The following error(s) occured :"
    12011217msgstr ""
    12021218
    1203 #: includes/admin/links-page-js.php:751
     1219#: includes/admin/links-page-js.php:756
    12041220msgid "Enter a name for the new custom filter"
    12051221msgstr ""
    12061222
    1207 #: includes/admin/links-page-js.php:763
     1223#: includes/admin/links-page-js.php:768
    12081224msgid ""
    12091225"You are about to delete the current filter.\n"
     
    12111227msgstr ""
    12121228
    1213 #: includes/admin/links-page-js.php:787
     1229#: includes/admin/links-page-js.php:792
    12141230msgid ""
    12151231"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"
     
    12171233msgstr ""
    12181234
    1219 #: includes/admin/links-page-js.php:801
     1235#: includes/admin/links-page-js.php:806
    12201236msgid ""
    12211237"Are you sure you want to remove the selected links? This action can't be undone.\n"
     
    12231239msgstr ""
    12241240
    1225 #: includes/admin/links-page-js.php:931
     1241#: includes/admin/links-page-js.php:936
    12261242msgid "Enter a search string first."
    12271243msgstr ""
    12281244
    1229 #: includes/admin/links-page-js.php:938
     1245#: includes/admin/links-page-js.php:943
    12301246msgid "Select one or more links to edit."
    12311247msgstr ""
     
    13611377#: includes/admin/table-printer.php:543
    13621378msgid "Link last checked"
    1363 msgstr ""
    1364 
    1365 #: includes/admin/table-printer.php:548
    1366 msgid "Never"
    13671379msgstr ""
    13681380
     
    14791491msgstr ""
    14801492
    1481 #: modules/checkers/http.php:295
     1493#: modules/checkers/http.php:289
    14821494msgid "Server Not Found"
    14831495msgstr ""
    14841496
    1485 #: modules/checkers/http.php:311
     1497#: modules/checkers/http.php:305
    14861498msgid "Connection Failed"
    14871499msgstr ""
    14881500
    1489 #: modules/checkers/http.php:359, modules/checkers/http.php:444
     1501#: modules/checkers/http.php:359, modules/checkers/http.php:448
    14901502msgid "HTTP code : %d"
    14911503msgstr ""
    14921504
    1493 #: modules/checkers/http.php:361, modules/checkers/http.php:446
     1505#: modules/checkers/http.php:361, modules/checkers/http.php:450
    14941506msgid "(No response)"
    14951507msgstr ""
     
    14991511msgstr ""
    15001512
    1501 #: modules/checkers/http.php:454
     1513#: modules/checkers/http.php:459
    15021514msgid "Request timed out."
    15031515msgstr ""
    15041516
    1505 #: modules/checkers/http.php:473
    1506 msgid "Using Snoopy"
     1517#: modules/checkers/http.php:466
     1518msgid "Using WP HTTP"
    15071519msgstr ""
    15081520
     
    16801692msgstr ""
    16811693
    1682 #: modules/extras/youtube.php:141
     1694#: modules/extras/youtube.php:140
    16831695msgid "Video OK"
    16841696msgstr ""
    16851697
    1686 #: modules/extras/youtube.php:152, modules/extras/youtube.php:155
     1698#: modules/extras/youtube.php:151, modules/extras/youtube.php:154
    16871699msgid "Video Not Found"
    16881700msgstr ""
    16891701
    1690 #: modules/extras/youtube.php:174, modules/extras/youtube.php:177
     1702#: modules/extras/youtube.php:173, modules/extras/youtube.php:176
    16911703msgid "Playlist Not Found"
    16921704msgstr ""
    16931705
    1694 #: modules/extras/youtube.php:184
     1706#: modules/extras/youtube.php:183
    16951707msgid "Playlist Restricted"
    16961708msgstr ""
    16971709
     1710#: modules/extras/youtube.php:190
     1711msgid "This playlist has no entries or all entries have been deleted."
     1712msgstr ""
     1713
    16981714#: 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:192
    17031715msgctxt "link status"
    17041716msgid "Empty Playlist"
    17051717msgstr ""
    17061718
    1707 #: modules/extras/youtube.php:202
     1719#: modules/extras/youtube.php:201
    17081720msgid "Video status : %1$s%2$s"
    17091721msgstr ""
    17101722
    1711 #: modules/extras/youtube.php:208
     1723#: modules/extras/youtube.php:207
    17121724msgid "Video Restricted"
    17131725msgstr ""
    17141726
    1715 #: modules/extras/youtube.php:217
     1727#: modules/extras/youtube.php:216
    17161728msgid "Playlist OK"
    17171729msgstr ""
    17181730
    1719 #: modules/extras/youtube.php:265
     1731#: modules/extras/youtube.php:264
    17201732msgid "Unknown YouTube API response received."
    17211733msgstr ""
  • broken-link-checker/tags/1.11.13/modules/checkers/http.php

    r2238832 r2312012  
    4343            );
    4444        } 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            );
    6252        }
    6353    }
     
    200190        if ( ! blcUtility::is_safe_mode() && ! blcUtility::is_open_basedir() ) {
    201191            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
    203196        //Set maximum redirects
    204197        curl_setopt( $ch, CURLOPT_MAXREDIRS, 10 );
     
    268261        $info = curl_getinfo( $ch );
    269262
     263        // var_dump( $info ); die();
    270264        //Store the results
    271265        $result['http_code']        = intval( $info['http_code'] );
     
    318312                    $result['status_text'] = __( 'Unknown Error', 'broken-link-checker' );
    319313            }
     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;
    320318        } else {
    321319            $result['broken'] = $this->is_error_code( $result['http_code'] );
     
    336334        );
    337335
    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)){
    339339            //The site in question might be expecting GET instead of HEAD, so lets retry the request
    340340            //using the GET verb...but not in cases of timeout, or where we've already done it.
     
    404404}
    405405
    406 class blcSnoopyHttp extends blcHttpCheckerBase {
     406class blcWPHttp extends blcHttpCheckerBase {
    407407
    408408    function check( $url ) {
    409         $url = $this->clean_url( $url );
     409
     410        // $url = $this->clean_url( $url );
    410411        //Note : Snoopy doesn't work too well with HTTPS URLs.
    411412
     
    423424
    424425        //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 ) ) {
    437436            $result['http_code'] = 0;
    438437            $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'];
    439443        }
    440444
     
    448452        $log .= " ===\n\n";
    449453
    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 ) ) {
    454459            $log              .= __( 'Request timed out.', 'broken-link-checker' ) . "\n";
    455460            $result['timeout'] = true;
    456461        }
    457462
    458         if ( is_array( $snoopy->headers ) ) {
    459             $log .= implode( '', $snoopy->headers ) . "\n"; //those headers already contain newlines
    460         }
    461 
    462         //Redirected?
    463         if ( $snoopy->lastredirectaddr ) {
    464             $result['final_url']      = $snoopy->lastredirectaddr;
    465             $result['redirect_count'] = $snoopy->_redirectdepth;
    466         } else {
    467             $result['final_url'] = $url;
    468         }
    469 
    470463        //Determine if the link counts as "broken"
    471464        $result['broken'] = $this->is_error_code( $result['http_code'] ) || $result['timeout'];
    472465
    473         $log          .= '<em>(' . __( 'Using Snoopy', 'broken-link-checker' ) . ')</em>';
     466        $log          .= '<em>(' . __( 'Using WP HTTP', 'broken-link-checker' ) . ')</em>';
    474467        $result['log'] = $log;
     468
     469        $result['final_url'] = $url;
    475470
    476471        //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  
    130130            $result['status_code'] = BLC_LINK_STATUS_WARNING;
    131131            $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'];
    135134            } else {
    136135                $result['status_text'] = __( 'Unknown Error', 'broken-link-checker' );
     
    288287        $conf = blc_get_configuration();
    289288
    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'] : '';
    292290
    293291        return apply_filters( 'blc_youtube_api_key', $conf->options['youtube_api_key'] );
  • broken-link-checker/tags/1.11.13/readme.txt

    r2265659 r2312012  
    55Requires at least: 4.6
    66Tested up to: 5.4
    7 Stable tag: 1.11.12
     7Stable tag: 1.11.13
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3838* "Unlink" removes the link but leaves the link text intact.
    3939* "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 from 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.
    4141
    4242You can also click on the contents of the "Status" or "Link Text" columns to get more info about the status of each link.
     
    6868
    6969== 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
    7084= 1.11.12 =
    7185* Added an interface to use personal YouTube API Key
  • broken-link-checker/tags/1.11.13/uninstall.php

    r2238832 r2312012  
    1111    // Remove the plugin's settings & installation log.
    1212    delete_option( 'wsblc_options' );
     13    delete_option( 'blc_activation_enabled' );
    1314    delete_option( 'blc_installation_log' );
    1415
  • broken-link-checker/trunk/broken-link-checker.php

    r2265659 r2312012  
    11<?php
    2 
    32/**
     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
    410 * Plugin Name: Broken Link Checker
    511 * Plugin URI:  https://wordpress.org/plugins/broken-link-checker/
    612 * Description: Checks your blog for broken links and missing images and notifies you on the dashboard if any are found.
    7  * Version:     1.11.12
     13 * Version:     1.11.13
    814 * Author:      WPMU DEV
    915 * Author URI:  https://premium.wpmudev.org/
     
    1117 * License:     GPLv2 or later
    1218 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
    13 */
     19 */
    1420
    1521/*
     
    2834*/
    2935
    30 //Path to this file
     36// Path to this file.
    3137if ( ! defined( 'BLC_PLUGIN_FILE' ) ) {
    3238    define( 'BLC_PLUGIN_FILE', __FILE__ );
    3339}
    3440
    35 //Path to the plugin's directory
     41// Path to the plugin's directory.
    3642if ( ! defined( 'BLC_DIRECTORY' ) ) {
    3743    define( 'BLC_DIRECTORY', dirname( __FILE__ ) );
    3844}
    3945
    40 //Load the actual plugin
     46// Load the actual plugin.
    4147require 'core/init.php';
  • broken-link-checker/trunk/core/core.php

    r2265659 r2312012  
    11<?php
    2 
    32/**
    43 * 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
    58 */
     9
    610if ( ! function_exists( 'microtime_float' ) ) {
     11    /**
     12     * Calcualate microtime_float
     13     *
     14     * @since 1.0.0
     15     */
    716    function microtime_float() {
    817        list( $usec, $sec ) = explode( ' ', microtime() );
     
    1726
    1827if ( ! class_exists( 'wsBrokenLinkChecker' ) ) {
     28
     29    /**
     30     * Broken Link Checker core
     31     */
    1932    class wsBrokenLinkChecker {
    2033
    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;
    2775
    2876        /**
    2977         * Class constructor
    3078         *
    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 ) {
    3685            $this->db_version = BLC_DATABASE_VERSION;
    3786
     
    4291            $this->load_language();
    4392
    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
    4797            register_deactivation_hook( $loader, array( $this, 'deactivation' ) );
    4898
    4999            add_action( 'admin_menu', array( $this, 'admin_menu' ) );
    50100
    51             //Load jQuery on Dashboard pages (probably redundant as WP already does that)
    52             add_action( 'admin_print_scripts', array( $this, 'admin_print_scripts' ) );
    53 
    54             //The dashboard widget
     101            // Load jQuery on Dashboard pages (probably redundant as WP already does that).
     102            // add_action( 'admin_print_scripts', array( $this, 'admin_print_scripts' ) );.
     103
     104            // The dashboard widget.
    55105            add_action( 'wp_dashboard_setup', array( $this, 'hook_wp_dashboard_setup' ) );
    56106
    57             //AJAXy hooks
     107            // AJAXy hooks.
    58108            add_action( 'wp_ajax_blc_full_status', array( $this, 'ajax_full_status' ) );
    59109            add_action( 'wp_ajax_blc_dashboard_status', array( $this, 'ajax_dashboard_status' ) );
     
    70120            add_action( 'wp_ajax_blc_undismiss', array( $this, 'ajax_undismiss' ) );
    71121
    72             //Add/remove Cron events
     122            // Add/remove Cron events.
    73123            $this->setup_cron_events();
    74124
    75             //Set hooks that listen for our Cron actions
     125            // Set hooks that listen for our Cron actions.
    76126            add_action( 'blc_cron_email_notifications', array( $this, 'maybe_send_email_notifications' ) );
    77127            add_action( 'blc_cron_check_links', array( $this, 'cron_check_links' ) );
    78128            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.
    81132            add_action( 'admin_footer', array( $this, 'admin_footer' ) );
    82             //Add a "Screen Options" panel to the "Broken Links" page
     133            // Add a "Screen Options" panel to the "Broken Links" page.
    83134            add_screen_options_panel(
    84135                'blc-screen-options',
     
    90141            );
    91142
    92             //Display an explanatory note on the "Tools -> Broken Links -> Warnings" page.
     143            // Display an explanatory note on the "Tools -> Broken Links -> Warnings" page.
    93144            add_action( 'admin_notices', array( $this, 'show_warnings_section_notice' ) );
    94145
     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
    95149        }
    96150
     
    100154         * @return void
    101155         */
    102         function admin_footer() {
     156        public function admin_footer() {
    103157            if ( ! $this->conf->options['run_in_dashboard'] ) {
    104158                return;
     
    113167                function blcDoWork(){
    114168                    $.post(
    115                         "<?php echo admin_url( 'admin-ajax.php' ); ?>",
     169                        "<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>",
    116170                        {
    117171                            'action' : 'blc_work',
     
    135189         * Check if an URL matches the exclusion list.
    136190         *
    137          * @param string $url
     191         * @param string $url The url to exclude.
    138192         * @return bool
    139193         */
    140         function is_excluded( $url ) {
     194        public function is_excluded( $url ) {
    141195            if ( ! is_array( $this->conf->options['exclusion_list'] ) ) {
    142196                return false;
     
    150204        }
    151205
    152         function dashboard_widget() {
     206        /**
     207         * Get dashboard_widget
     208         */
     209        public function dashboard_widget() {
    153210            ?>
    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>
    155212            <script type='text/javascript'>
    156213                jQuery( function($){
     
    159216                    function blcDashboardStatus(){
    160217                        $.getJSON(
    161                             "<?php echo admin_url( 'admin-ajax.php' ); ?>",
     218                            "<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>",
    162219                            {
    163220                                'action' : 'blc_dashboard_status',
     
    176233                                    <?php } ?>
    177234                                } 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' ); ?>');
    179236                                }
    180237
     
    191248        }
    192249
    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;
    201269
    202270            ?>
     
    207275                    echo 'checked="checked"';}
    208276                ?>
    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' ); ?>
    211279            </label></p>
    212280            <?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 page
    222             wp_enqueue_script( 'jquery-ui-core' );   //Used for background color animation
     281
     282            wp_nonce_field( 'blc_update_widget', 'blc_update_widget_nonce' );
     283        }
     284
     285        /**
     286         * Enqueue settings script.
     287         */
     288        public function enqueue_settings_scripts() {
     289            // jQuery UI is used on the settings page.
     290            wp_enqueue_script( 'jquery-ui-core' );   // Used for background color animation.
    223291            wp_enqueue_script( 'jquery-ui-dialog' );
    224292            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() {
    229300            wp_enqueue_script( 'jquery-ui-core' );
    230             wp_enqueue_script( 'jquery-ui-dialog' ); //Used for the search form
    231             wp_enqueue_script( 'jquery-color' );     //Used for background color animation
    232             wp_enqueue_script( 'sprintf', plugins_url( 'js/sprintf.js', BLC_PLUGIN_FILE ) ); //Used in error messages
     301            wp_enqueue_script( 'jquery-ui-dialog' ); // Used for the search form.
     302            wp_enqueue_script( 'jquery-color' );     // Used for background color animation.
     303            wp_enqueue_script( 'sprintf', plugins_url( 'js/sprintf.js', BLC_PLUGIN_FILE ), array(), '1.0.0', false ); // Used in error messages.
    233304        }
    234305
     
    238309         * @return void
    239310         */
    240         function initiate_recheck() {
    241             global $wpdb; /** @var wpdb $wpdb */
    242 
    243             //Delete all discovered instances
    244             $wpdb->query( "TRUNCATE {$wpdb->prefix}blc_instances" );
    245 
    246             //Delete all discovered links
    247             $wpdb->query( "TRUNCATE {$wpdb->prefix}blc_links" );
    248 
    249             //Mark all posts, custom fields and bookmarks for processing.
     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.
    250321            blc_resynch( true );
    251322        }
     
    256327         * @return void
    257328         */
    258         function deactivation() {
    259             //Remove our Cron events
     329        public function deactivation() {
     330            // Remove our Cron events.
    260331            wp_clear_scheduled_hook( 'blc_cron_check_links' );
    261332            wp_clear_scheduled_hook( 'blc_cron_email_notifications' );
    262333            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.
    266338            $moduleManager = blcModuleManager::getInstance();
    267339            $the_time      = current_time( 'timestamp' );
     
    280352         * @return void
    281353         */
    282         function database_maintenance() {
     354        public function database_maintenance() {
    283355            blcContainerHelper::cleanup_containers();
    284356            blc_cleanup_instances();
     
    294366         * @return void
    295367         */
    296         function admin_menu() {
     368        public function admin_menu() {
    297369            if ( current_user_can( 'manage_options' ) ) {
    298370                add_filter( 'plugin_action_links', array( $this, 'plugin_action_links' ), 10, 2 );
     
    309381            $menu_title = __( 'Broken Links', 'broken-link-checker' );
    310382            if ( $this->conf->options['show_link_count_bubble'] ) {
    311                 //To make it easier to notice when broken links appear, display the current number of
    312                 //broken links in a little bubble notification in the "Broken Links" menu.
    313                 //(Similar to how the number of plugin updates and unmoderated comments is displayed).
     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).
    314386                $blc_link_query = blcLinkQuery::getInstance();
    315387                $broken_links   = $blc_link_query->get_filter_links( 'broken', array( 'count_only' => true ) );
    316388                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.
    318390                    $menu_title .= sprintf(
    319391                        ' <span class="update-plugins"><span class="update-count blc-menu-bubble">%d</span></span>',
     
    330402            );
    331403
    332             //Add plugin-specific scripts and CSS only to the it's own pages
     404            // Add plugin-specific scripts and CSS only to the it's own pages.
    333405            add_action( 'admin_print_styles-' . $options_page_hook, array( $this, 'options_page_css' ) );
    334406            add_action( 'admin_print_styles-' . $links_page_hook, array( $this, 'links_page_css' ) );
     
    336408            add_action( 'admin_print_scripts-' . $links_page_hook, array( $this, 'enqueue_link_page_scripts' ) );
    337409
    338             //Make the Settings page link to the link list
     410            // Make the Settings page link to the link list.
    339411            add_screen_meta_link(
    340412                'blc-links-page-link',
     
    347419
    348420        /**
    349          * plugin_action_links()
     421         * Function plugin_action_links()
    350422         * Handler for the 'plugin_action_links' hook. Adds a "Settings" link to this plugin's entry
    351423         * on the plugin list.
     
    355427         * @return array
    356428         */
    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 ) {
    359431                $links[] = "<a href='options-general.php?page=link-checker-settings'>" . __( 'Settings' ) . '</a>';
    360432            }
     
    362434        }
    363435
    364         function options_page() {
     436        /**
     437         * Function to show options page
     438         */
     439        public function options_page() {
    365440            $moduleManager = blcModuleManager::getInstance();
    366441
    367             //Prior to 1.5.2 (released 2012-05-27), there was a bug that would cause the donation flag to be
    368             //set incorrectly. So we'll unset the flag in that case.
     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.
    369444            $reset_donation_flag = ( $this->conf->get( 'first_installation_timestamp', 0 ) < strtotime( '2012-05-27 00:00' ) ) && ! $this->conf->get( 'donation_flag_fixed', false );
    370445
     
    378453                $this->initiate_recheck();
    379454
    380                 //Redirect back to the settings page
     455                // Redirect back to the settings page.
    381456                $base_url = remove_query_arg( array( '_wpnonce', 'noheader', 'updated', 'error', 'action', 'message' ) );
    382457                wp_redirect(
     
    405480                $cleanPost = $_POST;
    406481                if ( function_exists( 'wp_magic_quotes' ) ) {
    407                     $cleanPost = stripslashes_deep( $cleanPost ); //Ceterum censeo, WP shouldn't mangle superglobals.
    408                 }
    409 
    410                 //Activate/deactivate modules
     482                    $cleanPost = stripslashes_deep( $cleanPost ); // Ceterum censeo, WP shouldn't mangle superglobals.
     483                }
     484
     485                // Activate/deactivate modules.
    411486                if ( ! empty( $_POST['module'] ) ) {
    412487                    $active = array_keys( $_POST['module'] );
     
    414489                }
    415490
    416                 //Only post statuses that actually exist can be selected
     491                // Only post statuses that actually exist can be selected.
    417492                if ( isset( $_POST['enabled_post_statuses'] ) && is_array( $_POST['enabled_post_statuses'] ) ) {
    418493                    $available_statuses    = get_post_stati();
     
    489564                $acf_fields_diff2                  = array_diff( $this->conf->options['acf_fields'], $new_acf_fields );
    490565                $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'] );
    491569
    492570                //Turning off warnings turns existing warnings into "broken" links.
     
    568646                if ( $this->conf->options['logging_enabled'] ) {
    569647                    if ( $this->conf->options['custom_log_file_enabled'] ) {
     648
    570649                        $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                        }
    571667                    } else {
    572668                        //Default log file is /wp-content/uploads/broken-link-checker/blc-log.txt
     
    584680
    585681                    $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.
    588685                    if ( ! is_file( $log_file ) ) {
    589686                        file_put_contents( $log_file, '' );
     
    10101107                </tr>
    10111108
     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
    10121120            </table>
    10131121
     
    13191427            <td>
    13201428
    1321                 <div id="blc-logging-options">
     1429                <div class="blc-logging-options">
    13221430
    13231431                <p>
     
    13501458            </td>
    13511459        </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>
    13531486
    13541487        <tr valign="top">
     
    36123745
    36133746            //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' ) ) {
    36153748                $data = array(
    36163749                    'state' => 'ok',
     
    37693902            global $wpdb; /** @var wpdb $wpdb */
    37703903
    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 ) ) {
    37723910                return;
    37733911            }
     
    40124150                wp_schedule_event( time(), 'daily', 'blc_cron_database_maintenance' );
    40134151            }
    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
    40154212
    40164213        /**
  • broken-link-checker/trunk/core/init.php

    r2265659 r2312012  
    4343    define( 'BLC_FOR_PARSING', 'parse' );
    4444    define( 'BLC_FOR_DISPLAY', 'display' );
    45     define( 'BLC_DATABASE_VERSION', 10 );
     45    define( 'BLC_DATABASE_VERSION', 16 );
    4646
    4747    /***********************************************
     
    9797            'logging_enabled'                  => false,
    9898            'log_file'                         => '',
     99            'incorrect_path'                   => false,
     100            'clear_log_on'                     => '',
    99101            'custom_log_file_enabled'          => false,
    100102            'installation_complete'            => false,
     
    105107            'show_link_actions'                => array( 'blc-deredirect-action' => false ), //Visible link actions.
    106108            'youtube_api_key'                  => '',
     109            'blc_post_modified'                => '',
    107110        )
    108111    );
     
    257260    ************************************************/
    258261
    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';
    265263
    266264    //Load the plugin if installed successfully
     
    325323                '<strong>' . __( 'Broken Link Checker installation failed. Try deactivating and then reactivating the plugin.', 'broken-link-checker' ) . '</strong>',
    326324            );
    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             }
    332325
    333326            if ( ! $blc_config_manager->db_option_loaded ) {
  • broken-link-checker/trunk/css/links-page.css

    r2238832 r2312012  
    3030
    3131th.column-new-link-text {
    32    
     32
    3333}
    3434
    3535th.column-used-in {
    36    
     36
    3737}
    3838
     
    6363/* Cells */
    6464
    65 td.column-new-url, 
     65td.column-new-url,
    6666td.column-used-in
    6767{
     
    107107}
    108108
    109 .blc-permanently-broken { 
    110    
     109.blc-permanently-broken {
     110
    111111}
    112112
     
    200200.compact .link-last-checked,
    201201.compact .link-broken-for,
    202 .compact .link-text 
     202.compact .link-text
    203203{
    204204    display: none;
     
    220220    overflow: hidden;
    221221
    222     background-image: none; 
     222    background-image: none;
    223223    background-position: left center;
    224224    background-repeat: no-repeat;
     
    259259
    260260td.column-link-text, td.column-new-link-text {
    261     cursor: pointer; 
     261    cursor: pointer;
    262262}
    263263
     
    410410    border: 3px solid #EEEEEE;
    411411    padding: 12px;
    412    
     412
    413413    border-radius: 6px;
    414414    -moz-border-radius: 6px;
     
    450450    margin-left: 8px;
    451451    margin-right: 8px;
    452     margin-top: 8px; 
     452    margin-top: 8px;
    453453}
    454454
     
    504504    }
    505505}
     506th#cb {
     507    vertical-align: middle;
     508    padding: 6px 0 3px;
     509}
  • broken-link-checker/trunk/includes/activation.php

    r2238832 r2312012  
    11<?php
     2
     3if ( get_option( 'blc_activation_enabled' ) ) {
     4    return;
     5}
    26
    37global $blclog, $blc_config_manager, $wpdb;
     
    117121$blclog->save();
    118122
     123// for multisite support.
     124update_option( 'blc_activation_enabled', true );
  • broken-link-checker/trunk/includes/admin/db-upgrade.php

    r2238832 r2312012  
    246246                                ( $definition['collation'] && ( $tablefield->Collation != $definition['collation'] ) ) ||
    247247                                ( $definition['null_allowed'] && ( 'NO' == $tablefield->Null ) ) ||
    248                                 ( ! $definition['null_allowed'] && ( 'NO' == $tablefield->Null ) ) ||
    249248                                ( $tablefield->Default !== $definition['default'] );
    250249
  • broken-link-checker/trunk/includes/admin/links-page-js.php

    r2238832 r2312012  
    651651        var me = this;
    652652        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);
    685675                    } 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 ){
    696693                                msg = msg + sprintf(
    697                                     '<?php echo esc_js( __( "However, %d instances couldn't be removed.", 'broken-link-checker' ) ); ?>\n',
    698                                     data.cnt_error
     694                                    '<?php echo esc_js( __( '%d instances of the link were successfully unlinked.', 'broken-link-checker' ) ); ?>\n',
     695                                    data.cnt_okay
    699696                                );
     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';
    700706                            }
    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);
    703713                        }
    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 message
    709                         alert(msg);
    710714                    }
     715
     716                    $(me).html('<?php echo esc_js( __( 'Unlink', 'broken-link-checker' ) ); ?>');
    711717                }
    712 
    713                 $(me).html('<?php echo esc_js( __( 'Unlink', 'broken-link-checker' ) ); ?>');
    714             }
    715         );
     718            );
     719
     720        }
    716721    });
    717722
  • broken-link-checker/trunk/includes/admin/options-page-js.php

    r2238832 r2312012  
    131131    //Enable/disable log-related options depending on whether "Enable logging" is on.
    132132    function blcToggleLogOptions() {
    133         $('#blc-logging-options')
    134             .find('input')
     133        $('.blc-logging-options')
     134            .find('input,select')
    135135            .prop('disabled', ! $('#logging_enabled').is(':checked'));
    136136    }
  • broken-link-checker/trunk/includes/any-post.php

    r2265659 r2312012  
    243243        } else {
    244244            //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
    253259            $q     = sprintf(
    254260                $q,
    255                 "'" . implode( "', '", $escaped_post_types ) . "'"
    256             );
     261                "'" . implode( "', '", $all_posts_id ) . "'"
     262            );
     263
    257264            $wpdb->query( $q );
    258265            $elapsed = microtime( true ) - $start;
     
    260267            $blclog->log( sprintf( '...... %d rows deleted in %.3f seconds', $wpdb->rows_affected, $elapsed ) );
    261268
    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 ) );
    280295
    281296            //Remove the 'synched' flag from all posts that have been updated
     
    586601        }
    587602
    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 );
    589607
    590608        if ( is_wp_error( $post_id ) ) {
     
    604622     * Update the the links on pagebuilders
    605623     *
    606      * @param $post_id  Post ID of whose content to update
     624     * @param int $post_id  Post ID of whose content to update.
    607625     */
    608626    function update_pagebuilders( $post_id ) {
     
    717735}
    718736
    719 
    720 
    721737/**
    722738 * Universal manager usable for most post types.
     
    727743class blcAnyPostContainerManager extends blcContainerManager {
    728744    var $container_class_name = 'blcAnyPostContainer';
    729     var $fields               = array( 'post_content' => 'html' );
     745    var $fields               = array( 'post_content' => 'html', 'post_excerpt' => 'html' );
    730746
    731747    function init() {
     
    748764     */
    749765    function get_containers( $containers, $purpose = '', $load_wrapped_objects = false ) {
     766        global $blclog;
    750767        $containers = $this->make_containers( $containers );
    751768
  • broken-link-checker/trunk/includes/checkers.php

    r2238832 r2312012  
    9090        $manager         = blcModuleManager::getInstance();
    9191        $active_checkers = $manager->get_active_by_category( 'checker' );
    92 
    9392        foreach ( $active_checkers as $module_id => $module_data ) {
    9493            //Try the URL pattern in the header first. If it doesn't match,
  • broken-link-checker/trunk/includes/links.php

    r2238832 r2312012  
    284284            $results = array_merge( $defaults, $rez );
    285285
     286
    286287            //Some HTTP errors can be treated as warnings.
    287288            $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.12
    2 # This file is distributed under the same license as the Broken Link Checker 1.11.12 package.
     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.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Broken Link Checker 1.11.12\n"
     5"Project-Id-Version: Broken Link Checker 1.11.13\n"
    66"MIME-Version: 1.0\n"
    77"Content-Type: text/plain; charset=UTF-8\n"
     
    1414"Plural-Forms: nplurals=2; plural=(n != 1);\n"
    1515
    16 #: core/core.php:154, includes/admin/links-page-js.php:45
     16#: core/core.php:211, includes/admin/links-page-js.php:45
    1717msgid "Loading..."
    1818msgstr ""
    1919
    20 #: core/core.php:178, includes/admin/options-page-js.php:18
     20#: core/core.php:235, includes/admin/options-page-js.php:18
    2121msgid "[ Network error ]"
    2222msgstr ""
    2323
    24 #: core/core.php:210
     24#: core/core.php:278
    2525msgid "Automatically expand the widget if broken links have been detected"
    2626msgstr ""
    2727
    28 #: core/core.php:302
     28#: core/core.php:374
    2929msgid "Link Checker Settings"
    3030msgstr ""
    3131
    32 #: core/core.php:303
     32#: core/core.php:375
    3333msgid "Link Checker"
    3434msgstr ""
    3535
    36 #: core/core.php:309, includes/link-query.php:37
     36#: core/core.php:381, includes/link-query.php:37
    3737msgid "Broken Links"
    3838msgstr ""
    3939
    40 #: core/core.php:325
     40#: core/core.php:397
    4141msgid "View Broken Links"
    4242msgstr ""
    4343
    44 #: core/core.php:341
     44#: core/core.php:413
    4545msgid "Go to Broken Links"
    4646msgstr ""
    4747
    48 #: core/core.php:359
     48#: core/core.php:431
    4949msgid "Settings"
    5050msgstr ""
    5151
    52 #: core/core.php:394, includes/admin/table-printer.php:292, includes/admin/table-printer.php:710
     52#: core/core.php:469, includes/admin/table-printer.php:292, includes/admin/table-printer.php:710
    5353msgid "Edit URL"
    5454msgstr ""
    5555
    56 #: core/core.php:395, includes/admin/links-page-js.php:713, includes/admin/table-printer.php:297, includes/admin/table-printer.php:713
     56#: core/core.php:470, includes/admin/links-page-js.php:716, includes/admin/table-printer.php:297, includes/admin/table-printer.php:713
    5757msgid "Unlink"
    5858msgstr ""
    5959
    60 #: core/core.php:396, includes/admin/links-page-js.php:111, includes/admin/table-printer.php:719
     60#: core/core.php:471, includes/admin/links-page-js.php:111, includes/admin/table-printer.php:719
    6161msgid "Not broken"
    6262msgstr ""
    6363
    64 #: core/core.php:397, includes/admin/table-printer.php:296, includes/admin/table-printer.php:727
     64#: core/core.php:472, includes/admin/table-printer.php:296, includes/admin/table-printer.php:727
    6565msgid "Dismiss"
    6666msgstr ""
    6767
    68 #: core/core.php:398, includes/admin/table-printer.php:293, includes/admin/table-printer.php:739
     68#: core/core.php:473, includes/admin/table-printer.php:293, includes/admin/table-printer.php:739
    6969msgid "Recheck"
    7070msgstr ""
    7171
    72 #: core/core.php:399, includes/admin/table-printer.php:747
     72#: core/core.php:474, includes/admin/table-printer.php:747
    7373msgctxt "link action; replace one redirect with a direct link"
    7474msgid "Fix redirect"
    7575msgstr ""
    7676
    77 #: core/core.php:653
     77#: core/core.php:750
    7878msgid "Settings saved."
    7979msgstr ""
    8080
    81 #: core/core.php:659
     81#: core/core.php:756
    8282msgid "Thank you for your donation!"
    8383msgstr ""
    8484
    85 #: core/core.php:667
     85#: core/core.php:764
    8686msgid "Complete site recheck started."
    8787msgstr ""
    8888
    89 #: core/core.php:690
     89#: core/core.php:787
    9090msgid "General"
    9191msgstr ""
    9292
    93 #: core/core.php:691
     93#: core/core.php:788
    9494msgid "Look For Links In"
    9595msgstr ""
    9696
    97 #: core/core.php:692
     97#: core/core.php:789
    9898msgid "Which Links To Check"
    9999msgstr ""
    100100
    101 #: core/core.php:693
     101#: core/core.php:790
    102102msgid "Protocols & APIs"
    103103msgstr ""
    104104
    105 #: core/core.php:694
     105#: core/core.php:791
    106106msgid "Advanced"
    107107msgstr ""
    108108
    109 #: core/core.php:709
     109#: core/core.php:806
    110110msgid "Broken Link Checker Options"
    111111msgstr ""
    112112
    113 #: core/core.php:753, includes/admin/table-printer.php:215
     113#: core/core.php:850, includes/admin/table-printer.php:215
    114114msgid "Status"
    115115msgstr ""
    116116
    117 #: core/core.php:755, includes/admin/options-page-js.php:56
     117#: core/core.php:852, includes/admin/options-page-js.php:56
    118118msgid "Show debug info"
    119119msgstr ""
    120120
    121 #: core/core.php:783
     121#: core/core.php:880
    122122msgid "Check each link"
    123123msgstr ""
    124124
    125 #: core/core.php:788
     125#: core/core.php:885
    126126msgid "Every %s hours"
    127127msgstr ""
    128128
    129 #: core/core.php:797
     129#: core/core.php:894
    130130msgid "Existing links will be checked this often. New links will usually be checked ASAP."
    131131msgstr ""
    132132
    133 #: core/core.php:804
     133#: core/core.php:901
    134134msgid "E-mail notifications"
    135135msgstr ""
    136136
    137 #: core/core.php:814
     137#: core/core.php:911
    138138msgid "Send me e-mail notifications about newly detected broken links"
    139139msgstr ""
    140140
    141 #: core/core.php:826
     141#: core/core.php:923
    142142msgid "Send authors e-mail notifications about broken links in their posts"
    143143msgstr ""
    144144
    145 #: core/core.php:833
     145#: core/core.php:930
    146146msgid "Notification e-mail address"
    147147msgstr ""
    148148
    149 #: core/core.php:845
     149#: core/core.php:942
    150150msgid "Leave empty to use the e-mail address specified in Settings &rarr; General."
    151151msgstr ""
    152152
    153 #: core/core.php:852
     153#: core/core.php:949
    154154msgid "Link tweaks"
    155155msgstr ""
    156156
    157 #: core/core.php:862
     157#: core/core.php:959
    158158msgid "Apply custom formatting to broken links"
    159159msgstr ""
    160160
    161 #: core/core.php:867, core/core.php:910
     161#: core/core.php:964, core/core.php:1007
    162162msgid "Edit CSS"
    163163msgstr ""
    164164
    165 #: core/core.php:889
     165#: core/core.php:986
    166166msgid "Example : Lorem ipsum <a %s>broken link</a>, dolor sit amet."
    167167msgstr ""
    168168
    169 #: core/core.php:892, core/core.php:936
     169#: core/core.php:989, core/core.php:1033
    170170msgid "Click \"Save Changes\" to update example output."
    171171msgstr ""
    172172
    173 #: core/core.php:905
     173#: core/core.php:1002
    174174msgid "Apply custom formatting to removed links"
    175175msgstr ""
    176176
    177 #: core/core.php:933
     177#: core/core.php:1030
    178178msgid "Example : Lorem ipsum <span %s>removed link</span>, dolor sit amet."
    179179msgstr ""
    180180
    181 #: core/core.php:950
     181#: core/core.php:1047
    182182msgid "Stop search engines from following broken links"
    183183msgstr ""
    184184
    185 #: core/core.php:956
     185#: core/core.php:1053
    186186msgctxt "\"Link tweaks\" settings"
    187187msgid "These settings only apply to the content of posts, not comments or custom fields."
    188188msgstr ""
    189189
    190 #: core/core.php:967
     190#: core/core.php:1064
    191191msgctxt "settings page"
    192192msgid "Suggestions"
    193193msgstr ""
    194194
    195 #: core/core.php:972
     195#: core/core.php:1069
    196196msgid "Suggest alternatives to broken links"
    197197msgstr ""
    198198
    199 #: core/core.php:978
     199#: core/core.php:1075
    200200msgctxt "settings page"
    201201msgid "Warnings"
    202202msgstr ""
    203203
    204 #: core/core.php:983
     204#: core/core.php:1080
    205205msgid "Show uncertain or minor problems as \"warnings\" instead of \"broken\""
    206206msgstr ""
    207207
    208 #: core/core.php:987
     208#: core/core.php:1084
    209209msgid "Turning off this option will make the plugin report all problems as broken links."
    210210msgstr ""
    211211
    212 #: core/core.php:994
     212#: core/core.php:1091
    213213msgid "YouTube API Key"
    214214msgstr ""
    215215
    216 #: core/core.php:1006
     216#: core/core.php:1103
    217217msgid "Use your own %1$sapi key%2$s for checking youtube links."
    218218msgstr ""
    219219
    220 #: core/core.php:1022
     220#: core/core.php:1110
     221msgid "Post Modified Date"
     222msgstr ""
     223
     224#: core/core.php:1115
     225msgid "Disable post modified date change when link is edited"
     226msgstr ""
     227
     228#: core/core.php:1130
    221229msgid "Look for links in"
    222230msgstr ""
    223231
    224 #: core/core.php:1038
     232#: core/core.php:1146
    225233msgid "Post statuses"
    226234msgstr ""
    227235
    228 #: core/core.php:1071
     236#: core/core.php:1179
    229237msgid "Link types"
    230238msgstr ""
    231239
    232 #: core/core.php:1077
     240#: core/core.php:1185
    233241msgid "Error : All link parsers missing!"
    234242msgstr ""
    235243
    236 #: core/core.php:1084
     244#: core/core.php:1192
    237245msgid "Exclusion list"
    238246msgstr ""
    239247
    240 #: core/core.php:1085
     248#: core/core.php:1193
    241249msgid "Don't check links where the URL contains any of these words (one per line) :"
    242250msgstr ""
    243251
    244 #: core/core.php:1106
     252#: core/core.php:1214
    245253msgid "Check links using"
    246254msgstr ""
    247255
    248 #: core/core.php:1125, includes/links.php:1032
     256#: core/core.php:1233, includes/links.php:1033
    249257msgid "Timeout"
    250258msgstr ""
    251259
    252 #: core/core.php:1131, core/core.php:1226, core/core.php:3667
     260#: core/core.php:1239, core/core.php:1334, core/core.php:3800
    253261msgid "%s seconds"
    254262msgstr ""
    255263
    256 #: core/core.php:1140
     264#: core/core.php:1248
    257265msgid "Links that take longer than this to load will be marked as broken."
    258266msgstr ""
    259267
    260 #: core/core.php:1147
     268#: core/core.php:1255
    261269msgid "Link monitor"
    262270msgstr ""
    263271
    264 #: core/core.php:1159
     272#: core/core.php:1267
    265273msgid "Run continuously while the Dashboard is open"
    266274msgstr ""
    267275
    268 #: core/core.php:1171
     276#: core/core.php:1279
    269277msgid "Run hourly in the background"
    270278msgstr ""
    271279
    272 #: core/core.php:1179
     280#: core/core.php:1287
    273281msgid "Show the dashboard widget for"
    274282msgstr ""
    275283
    276 #: core/core.php:1184
     284#: core/core.php:1292
    277285msgctxt "dashboard widget visibility"
    278286msgid "Administrator"
    279287msgstr ""
    280288
    281 #: core/core.php:1185
     289#: core/core.php:1293
    282290msgctxt "dashboard widget visibility"
    283291msgid "Editor and above"
    284292msgstr ""
    285293
    286 #: core/core.php:1186
     294#: core/core.php:1294
    287295msgctxt "dashboard widget visibility"
    288296msgid "Nobody (disables the widget)"
    289297msgstr ""
    290298
    291 #: core/core.php:1202
     299#: core/core.php:1310
    292300msgctxt "settings page"
    293301msgid "Show link actions"
    294302msgstr ""
    295303
    296 #: core/core.php:1220
     304#: core/core.php:1328
    297305msgid "Max. execution time"
    298306msgstr ""
    299307
    300 #: core/core.php:1237
     308#: core/core.php:1345
    301309msgid "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."
    302310msgstr ""
    303311
    304 #: core/core.php:1246
     312#: core/core.php:1354
    305313msgid "Server load limit"
    306314msgstr ""
    307315
    308 #: core/core.php:1261
     316#: core/core.php:1369
    309317msgid "Current load : %s"
    310318msgstr ""
    311319
    312 #: core/core.php:1266
     320#: core/core.php:1374
    313321msgid "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."
    314322msgstr ""
    315323
    316 #: core/core.php:1275
     324#: core/core.php:1383
    317325msgid "Not available"
    318326msgstr ""
    319327
    320 #: core/core.php:1277
     328#: core/core.php:1385
    321329msgid "Load limiting only works on Linux-like systems where <code>/proc/loadavg</code> is present and accessible."
    322330msgstr ""
    323331
    324 #: core/core.php:1285
     332#: core/core.php:1393
    325333msgid "Target resource usage"
    326334msgstr ""
    327335
    328 #: core/core.php:1305
     336#: core/core.php:1413
    329337msgid "Logging"
    330338msgstr ""
    331339
    332 #: core/core.php:1311
     340#: core/core.php:1419
    333341msgid "Enable logging"
    334342msgstr ""
    335343
    336 #: core/core.php:1318
     344#: core/core.php:1426
    337345msgid "Log file location"
    338346msgstr ""
    339347
    340 #: core/core.php:1327
     348#: core/core.php:1435
    341349msgctxt "log file location"
    342350msgid "Default"
    343351msgstr ""
    344352
    345 #: core/core.php:1343
     353#: core/core.php:1451
    346354msgctxt "log file location"
    347355msgid "Custom"
    348356msgstr ""
    349357
    350 #: core/core.php:1355
     358#: core/core.php:1461
     359msgid "Log file clear schedule"
     360msgstr ""
     361
     362#: core/core.php:1467, includes/admin/table-printer.php:548
     363msgid "Never"
     364msgstr ""
     365
     366#: core/core.php:1488
    351367msgid "Forced recheck"
    352368msgstr ""
    353369
    354 #: core/core.php:1358
     370#: core/core.php:1491
    355371msgid "Re-check all pages"
    356372msgstr ""
    357373
    358 #: core/core.php:1363
     374#: core/core.php:1496
    359375msgid "The \"Nuclear Option\". Click this button to make the plugin empty its link database and recheck the entire site from scratch."
    360376msgstr ""
    361377
    362 #: core/core.php:1375
     378#: core/core.php:1508
    363379msgid "Save Changes"
    364380msgstr ""
    365381
    366 #: core/core.php:1426
     382#: core/core.php:1559
    367383msgid "Configure"
    368384msgstr ""
    369385
    370 #: core/core.php:1508
     386#: core/core.php:1641
    371387msgid "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>."
    372388msgstr ""
    373389
    374 #: core/core.php:1522
     390#: core/core.php:1655
    375391msgid "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>."
    376392msgstr ""
    377393
    378 #: core/core.php:1653, core/core.php:1739, core/core.php:1771
     394#: core/core.php:1786, core/core.php:1872, core/core.php:1904
    379395msgid "Database error : %s"
    380396msgstr ""
    381397
    382 #: core/core.php:1720
     398#: core/core.php:1853
    383399msgid "You must enter a filter name!"
    384400msgstr ""
    385401
    386 #: core/core.php:1724
     402#: core/core.php:1857
    387403msgid "Invalid search query."
    388404msgstr ""
    389405
    390 #: core/core.php:1734
     406#: core/core.php:1867
    391407msgid "Filter \"%s\" created"
    392408msgstr ""
    393409
    394 #: core/core.php:1761
     410#: core/core.php:1894
    395411msgid "Filter ID not specified."
    396412msgstr ""
    397413
    398 #: core/core.php:1768
     414#: core/core.php:1901
    399415msgid "Filter deleted"
    400416msgstr ""
    401417
    402 #: core/core.php:1817
     418#: core/core.php:1950
    403419msgid "Replaced %d redirect with a direct link"
    404420msgid_plural "Replaced %d redirects with direct links"
     
    406422msgstr[1] ""
    407423
    408 #: core/core.php:1828
     424#: core/core.php:1961
    409425msgid "Failed to fix %d redirect"
    410426msgid_plural "Failed to fix %d redirects"
     
    412428msgstr[1] ""
    413429
    414 #: core/core.php:1839
     430#: core/core.php:1972
    415431msgid "None of the selected links are redirects!"
    416432msgstr ""
    417433
    418 #: core/core.php:1919
     434#: core/core.php:2052
    419435msgid "%d link updated."
    420436msgid_plural "%d links updated."
     
    422438msgstr[1] ""
    423439
    424 #: core/core.php:1930
     440#: core/core.php:2063
    425441msgid "Failed to update %d link."
    426442msgid_plural "Failed to update %d links."
     
    428444msgstr[1] ""
    429445
    430 #: core/core.php:2021
     446#: core/core.php:2154
    431447msgid "%d link removed"
    432448msgid_plural "%d links removed"
     
    434450msgstr[1] ""
    435451
    436 #: core/core.php:2032
     452#: core/core.php:2165
    437453msgid "Failed to remove %d link"
    438454msgid_plural "Failed to remove %d links"
     
    440456msgstr[1] ""
    441457
    442 #: core/core.php:2142
     458#: core/core.php:2275
    443459msgid "%d item was skipped because it can't be moved to the Trash. You need to delete it manually."
    444460msgid_plural "%d items were skipped because they can't be moved to the Trash. You need to delete them manually."
     
    446462msgstr[1] ""
    447463
    448 #: core/core.php:2164
     464#: core/core.php:2297
    449465msgid "Didn't find anything to delete!"
    450466msgstr ""
    451467
    452 #: core/core.php:2202
     468#: core/core.php:2335
    453469msgid "%d link scheduled for rechecking"
    454470msgid_plural "%d links scheduled for rechecking"
     
    456472msgstr[1] ""
    457473
    458 #: core/core.php:2251, core/core.php:3088
     474#: core/core.php:2384, core/core.php:3221
    459475msgid "This link was manually marked as working by the user."
    460476msgstr ""
    461477
    462 #: core/core.php:2259, core/core.php:2322
     478#: core/core.php:2392, core/core.php:2455
    463479msgid "Couldn't modify link %d"
    464480msgstr ""
    465481
    466 #: core/core.php:2270
     482#: core/core.php:2403
    467483msgid "%d link marked as not broken"
    468484msgid_plural "%d links marked as not broken"
     
    470486msgstr[1] ""
    471487
    472 #: core/core.php:2333
     488#: core/core.php:2466
    473489msgid "%d link dismissed"
    474490msgid_plural "%d links dismissed"
     
    476492msgstr[1] ""
    477493
    478 #: core/core.php:2390
     494#: core/core.php:2523
    479495msgid "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."
    480496msgstr ""
    481497
    482 #: core/core.php:2395
     498#: core/core.php:2528
    483499msgctxt "admin notice under Tools - Broken links - Warnings"
    484500msgid "Hide notice"
    485501msgstr ""
    486502
    487 #: core/core.php:2401
     503#: core/core.php:2534
    488504msgctxt "a link from the admin notice under Tools - Broken links - Warnings"
    489505msgid "Change warning settings"
    490506msgstr ""
    491507
    492 #: core/core.php:2426
     508#: core/core.php:2559
    493509msgid "Table columns"
    494510msgstr ""
    495511
    496 #: core/core.php:2445
     512#: core/core.php:2578
    497513msgid "Show on screen"
    498514msgstr ""
    499515
    500 #: core/core.php:2452
     516#: core/core.php:2585
    501517msgid "links"
    502518msgstr ""
    503519
    504 #: core/core.php:2453, includes/admin/table-printer.php:175
     520#: core/core.php:2586, includes/admin/table-printer.php:175
    505521msgid "Apply"
    506522msgstr ""
    507523
    508 #: core/core.php:2457
     524#: core/core.php:2590
    509525msgid "Misc"
    510526msgstr ""
    511527
    512 #: core/core.php:2472
     528#: core/core.php:2605
    513529msgid "Highlight links broken for at least %s days"
    514530msgstr ""
    515531
    516 #: core/core.php:2481
     532#: core/core.php:2614
    517533msgid "Color-code status codes"
    518534msgstr ""
    519535
    520 #: core/core.php:2500, core/core.php:3072, core/core.php:3119, core/core.php:3158, core/core.php:3282, core/core.php:3341, core/core.php:3419
     536#: core/core.php:2633, core/core.php:3205, core/core.php:3252, core/core.php:3291, core/core.php:3415, core/core.php:3474, core/core.php:3552
    521537msgid "You're not allowed to do that!"
    522538msgstr ""
    523539
    524 #: core/core.php:2940
     540#: core/core.php:3073
    525541msgid "View broken links"
    526542msgstr ""
    527543
    528 #: core/core.php:2941
     544#: core/core.php:3074
    529545msgid "Found %d broken link"
    530546msgid_plural "Found %d broken links"
     
    532548msgstr[1] ""
    533549
    534 #: core/core.php:2947
     550#: core/core.php:3080
    535551msgid "No broken links found."
    536552msgstr ""
    537553
    538 #: core/core.php:2954
     554#: core/core.php:3087
    539555msgid "%d URL in the work queue"
    540556msgid_plural "%d URLs in the work queue"
     
    542558msgstr[1] ""
    543559
    544 #: core/core.php:2958
     560#: core/core.php:3091
    545561msgid "No URLs in the work queue."
    546562msgstr ""
    547563
    548 #: core/core.php:2964
     564#: core/core.php:3097
    549565msgctxt "for the \"Detected X unique URLs in Y links\" message"
    550566msgid "%d unique URL"
     
    553569msgstr[1] ""
    554570
    555 #: core/core.php:2968
     571#: core/core.php:3101
    556572msgctxt "for the \"Detected X unique URLs in Y links\" message"
    557573msgid "%d link"
     
    560576msgstr[1] ""
    561577
    562 #: core/core.php:2974
     578#: core/core.php:3107
    563579msgid "Detected %1$s in %2$s and still searching..."
    564580msgstr ""
    565581
    566 #: core/core.php:2980
     582#: core/core.php:3113
    567583msgid "Detected %1$s in %2$s."
    568584msgstr ""
    569585
    570 #: core/core.php:2987
     586#: core/core.php:3120
    571587msgid "Searching your blog for links..."
    572588msgstr ""
    573589
    574 #: core/core.php:2989
     590#: core/core.php:3122
    575591msgid "No links detected."
    576592msgstr ""
    577593
    578 #: core/core.php:3015
     594#: core/core.php:3148
    579595msgctxt "current load"
    580596msgid "Unknown"
    581597msgstr ""
    582598
    583 #: core/core.php:3080, core/core.php:3127, core/core.php:3181, core/core.php:3296, core/core.php:3364, core/core.php:3442
     599#: core/core.php:3213, core/core.php:3260, core/core.php:3314, core/core.php:3429, core/core.php:3497, core/core.php:3575
    584600msgid "Oops, I can't find the link %d"
    585601msgstr ""
    586602
    587 #: core/core.php:3100, core/core.php:3141
     603#: core/core.php:3233, core/core.php:3274
    588604msgid "Oops, couldn't modify the link!"
    589605msgstr ""
    590606
    591 #: core/core.php:3103, core/core.php:3144, core/core.php:3329, core/core.php:3351, core/core.php:3429
     607#: core/core.php:3236, core/core.php:3277, core/core.php:3462, core/core.php:3484, core/core.php:3562
    592608msgid "Error : link_id not specified"
    593609msgstr ""
    594610
    595 #: core/core.php:3168
     611#: core/core.php:3301
    596612msgid "Error : link_id or new_url not specified"
    597613msgstr ""
    598614
    599 #: core/core.php:3194, core/core.php:3208
     615#: core/core.php:3327, core/core.php:3341
    600616msgid "Oops, the new URL is invalid!"
    601617msgstr ""
    602618
    603 #: core/core.php:3228
     619#: core/core.php:3361
    604620msgid "An unexpected error occurred!"
    605621msgstr ""
    606622
    607 #: core/core.php:3309
     623#: core/core.php:3442
    608624msgid "An unexpected error occured!"
    609625msgstr ""
    610626
    611 #: core/core.php:3477
     627#: core/core.php:3610
    612628msgid "You don't have sufficient privileges to access this information!"
    613629msgstr ""
    614630
    615 #: core/core.php:3490
     631#: core/core.php:3623
    616632msgid "Error : link ID not specified"
    617633msgstr ""
    618634
    619 #: core/core.php:3504
     635#: core/core.php:3637
    620636msgid "Failed to load link details (%s)"
    621637msgstr ""
    622638
    623 #: core/core.php:3558
     639#: core/core.php:3691
    624640msgid "Broken Link Checker"
    625641msgstr ""
    626642
    627 #: core/core.php:3597
     643#: core/core.php:3730
    628644msgid "You have an old version of CURL. Redirect detection may not work properly."
    629645msgstr ""
    630646
    631 #: core/core.php:3608, core/core.php:3624, core/core.php:3629
     647#: core/core.php:3741, core/core.php:3757, core/core.php:3762
    632648msgid "Not installed"
    633649msgstr ""
    634650
    635 #: core/core.php:3617
     651#: core/core.php:3750
    636652msgid "Installed"
    637653msgstr ""
    638654
    639 #: core/core.php:3630
     655#: core/core.php:3763
    640656msgid "You must have either CURL or Snoopy installed for the plugin to work!"
    641657msgstr ""
    642658
    643 #: core/core.php:3640
     659#: core/core.php:3773
    644660msgid "On"
    645661msgstr ""
    646662
    647 #: core/core.php:3641
     663#: core/core.php:3774
    648664msgid "Redirects may be detected as broken links when safe_mode is on."
    649665msgstr ""
    650666
    651 #: core/core.php:3646, core/core.php:3660
     667#: core/core.php:3779, core/core.php:3793
    652668msgid "Off"
    653669msgstr ""
    654670
    655 #: core/core.php:3654
     671#: core/core.php:3787
    656672msgid "On ( %s )"
    657673msgstr ""
    658674
    659 #: core/core.php:3655
     675#: core/core.php:3788
    660676msgid "Redirects may be detected as broken links when open_basedir is on."
    661677msgstr ""
    662678
    663 #: core/core.php:3692
     679#: core/core.php:3825
    664680msgid "If this value is zero even after several page reloads you have probably encountered a bug."
    665681msgstr ""
    666682
    667 #: core/core.php:3816, core/core.php:3935
     683#: core/core.php:3954, core/core.php:4073
    668684msgid "[%s] Broken links detected"
    669685msgstr ""
    670686
    671 #: core/core.php:3821
     687#: core/core.php:3959
    672688msgid "Broken Link Checker has detected %d new broken link on your site."
    673689msgid_plural "Broken Link Checker has detected %d new broken links on your site."
     
    675691msgstr[1] ""
    676692
    677 #: core/core.php:3852
     693#: core/core.php:3990
    678694msgid "Here's a list of the first %d broken links:"
    679695msgid_plural "Here's a list of the first %d broken links:"
     
    681697msgstr[1] ""
    682698
    683 #: core/core.php:3861
     699#: core/core.php:3999
    684700msgid "Here's a list of the new broken links: "
    685701msgstr ""
    686702
    687 #: core/core.php:3870
     703#: core/core.php:4008
    688704msgid "Link text : %s"
    689705msgstr ""
    690706
    691 #: core/core.php:3871
     707#: core/core.php:4009
    692708msgid "Link URL : <a href=\"%1$s\">%2$s</a>"
    693709msgstr ""
    694710
    695 #: core/core.php:3872
     711#: core/core.php:4010
    696712msgid "Source : %s"
    697713msgstr ""
    698714
    699 #: core/core.php:3886
     715#: core/core.php:4024
    700716msgid "You can see all broken links here:"
    701717msgstr ""
    702718
    703 #: core/core.php:3940
     719#: core/core.php:4078
    704720msgid "Broken Link Checker has detected %d new broken link in your posts."
    705721msgid_plural "Broken Link Checker has detected %d new broken links in your posts."
     
    707723msgstr[1] ""
    708724
    709 #: core/init.php:234
     725#: core/init.php:237
    710726msgid "Every 10 minutes"
    711727msgstr ""
    712728
    713 #: core/init.php:241
     729#: core/init.php:244
    714730msgid "Once Weekly"
    715731msgstr ""
    716732
    717 #: core/init.php:247
     733#: core/init.php:250
    718734msgid "Twice a Month"
    719735msgstr ""
    720736
    721 #: core/init.php:325
     737#: core/init.php:323
    722738msgid "Broken Link Checker installation failed. Try deactivating and then reactivating the plugin."
    723739msgstr ""
    724740
    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
    730742msgid "Edit"
    731743msgstr ""
    732744
    733 #: includes/any-post.php:470, modules/containers/acf_field.php:252, modules/containers/custom_field.php:258
     745#: includes/any-post.php:485, modules/containers/acf_field.php:252, modules/containers/custom_field.php:258
    734746msgid "Move this item to the Trash"
    735747msgstr ""
    736748
    737 #: includes/any-post.php:472, modules/containers/acf_field.php:252, modules/containers/custom_field.php:260
     749#: includes/any-post.php:487, modules/containers/acf_field.php:252, modules/containers/custom_field.php:260
    738750msgid "Trash"
    739751msgstr ""
    740752
    741 #: includes/any-post.php:477, modules/containers/acf_field.php:254, modules/containers/custom_field.php:265
     753#: includes/any-post.php:492, modules/containers/acf_field.php:254, modules/containers/custom_field.php:265
    742754msgid "Delete this item permanently"
    743755msgstr ""
    744756
    745 #: includes/any-post.php:479, modules/containers/acf_field.php:254, modules/containers/blogroll.php:47, modules/containers/custom_field.php:267
     757#: includes/any-post.php:494, modules/containers/acf_field.php:254, modules/containers/blogroll.php:47, modules/containers/custom_field.php:267
    746758msgid "Delete"
    747759msgstr ""
    748760
    749 #: includes/any-post.php:492
     761#: includes/any-post.php:507
    750762msgid "Preview &#8220;%s&#8221;"
    751763msgstr ""
    752764
    753 #: includes/any-post.php:493
     765#: includes/any-post.php:508
    754766msgid "Preview"
    755767msgstr ""
    756768
    757 #: includes/any-post.php:500
     769#: includes/any-post.php:515
    758770msgid "View &#8220;%s&#8221;"
    759771msgstr ""
    760772
    761 #: includes/any-post.php:501, modules/containers/acf_field.php:258, modules/containers/comment.php:172, modules/containers/custom_field.php:272
     773#: includes/any-post.php:516, modules/containers/acf_field.php:258, modules/containers/comment.php:172, modules/containers/custom_field.php:272
    762774msgid "View"
    763775msgstr ""
    764776
    765 #: includes/any-post.php:520, modules/containers/acf_field.php:248, modules/containers/custom_field.php:252
     777#: includes/any-post.php:535, modules/containers/acf_field.php:248, modules/containers/custom_field.php:252
    766778msgid "Edit this item"
    767779msgstr ""
    768780
    769 #: includes/any-post.php:584, modules/containers/blogroll.php:83, modules/containers/comment.php:43
     781#: includes/any-post.php:599, modules/containers/blogroll.php:83, modules/containers/comment.php:43
    770782msgid "Nothing to update"
    771783msgstr ""
    772784
    773 #: includes/any-post.php:595
     785#: includes/any-post.php:613
    774786msgid "Updating post %d failed"
    775787msgstr ""
    776788
    777 #: includes/any-post.php:656, modules/containers/acf_field.php:327, modules/containers/custom_field.php:341
     789#: includes/any-post.php:674, modules/containers/acf_field.php:327, modules/containers/custom_field.php:341
    778790msgid "Failed to delete post \"%1$s\" (%2$d)"
    779791msgstr ""
    780792
    781 #: includes/any-post.php:675, modules/containers/acf_field.php:341, modules/containers/custom_field.php:360
     793#: includes/any-post.php:693, modules/containers/acf_field.php:341, modules/containers/custom_field.php:360
    782794msgid "Can't move post \"%1$s\" (%2$d) to the trash because the trash feature is disabled"
    783795msgstr ""
    784796
    785 #: includes/any-post.php:695, modules/containers/acf_field.php:353, modules/containers/custom_field.php:379
     797#: includes/any-post.php:713, modules/containers/acf_field.php:353, modules/containers/custom_field.php:379
    786798msgid "Failed to move post \"%1$s\" (%2$d) to the trash"
    787799msgstr ""
    788800
    789 #: includes/any-post.php:803
     801#: includes/any-post.php:820
    790802msgid "%d post deleted."
    791803msgid_plural "%d posts deleted."
     
    793805msgstr[1] ""
    794806
    795 #: includes/any-post.php:805
     807#: includes/any-post.php:822
    796808msgid "%d page deleted."
    797809msgid_plural "%d pages deleted."
     
    799811msgstr[1] ""
    800812
    801 #: includes/any-post.php:807
     813#: includes/any-post.php:824
    802814msgid "%1$d \"%2$s\" deleted."
    803815msgid_plural "%1$d \"%2$s\" deleted."
     
    805817msgstr[1] ""
    806818
    807 #: includes/any-post.php:826
     819#: includes/any-post.php:843
    808820msgid "%d post moved to the Trash."
    809821msgid_plural "%d posts moved to the Trash."
     
    811823msgstr[1] ""
    812824
    813 #: includes/any-post.php:828
     825#: includes/any-post.php:845
    814826msgid "%d page moved to the Trash."
    815827msgid_plural "%d pages moved to the Trash."
     
    817829msgstr[1] ""
    818830
    819 #: includes/any-post.php:830
     831#: includes/any-post.php:847
    820832msgid "%1$d \"%2$s\" moved to the Trash."
    821833msgid_plural "%1$d \"%2$s\" moved to the Trash."
     
    10141026msgstr ""
    10151027
    1016 #: includes/links.php:502
     1028#: includes/links.php:503
    10171029msgid "Link is broken."
    10181030msgstr ""
    10191031
    1020 #: includes/links.php:504
     1032#: includes/links.php:505
    10211033msgid "Link is valid."
    10221034msgstr ""
    10231035
    1024 #: includes/links.php:737, includes/links.php:840, includes/links.php:874
     1036#: includes/links.php:738, includes/links.php:841, includes/links.php:875
    10251037msgid "Link is not valid"
    10261038msgstr ""
    10271039
    1028 #: includes/links.php:754
     1040#: includes/links.php:755
    10291041msgid "This link can not be edited because it is not used anywhere on this site."
    10301042msgstr ""
    10311043
    1032 #: includes/links.php:780
     1044#: includes/links.php:781
    10331045msgid "Failed to create a DB entry for the new URL."
    10341046msgstr ""
    10351047
    1036 #: includes/links.php:847
     1048#: includes/links.php:848
    10371049msgid "This link is not a redirect"
    10381050msgstr ""
    10391051
    1040 #: includes/links.php:901, includes/links.php:938
     1052#: includes/links.php:902, includes/links.php:939
    10411053msgid "Couldn't delete the link's database record"
    10421054msgstr ""
    10431055
    1044 #: includes/links.php:1015
     1056#: includes/links.php:1016
    10451057msgctxt "link status"
    10461058msgid "Unknown"
    10471059msgstr ""
    10481060
    1049 #: includes/links.php:1028, modules/checkers/http.php:318, modules/extras/mediafire.php:115, modules/extras/youtube.php:136, modules/extras/youtube.php:231
     1061#: includes/links.php:1029, modules/checkers/http.php:312, modules/checkers/http.php:316, modules/extras/mediafire.php:115, modules/extras/youtube.php:135, modules/extras/youtube.php:230
    10501062msgid "Unknown Error"
    10511063msgstr ""
    10521064
    1053 #: includes/links.php:1051
     1065#: includes/links.php:1052
    10541066msgid "Not checked"
    10551067msgstr ""
    10561068
    1057 #: includes/links.php:1054
     1069#: includes/links.php:1055
    10581070msgid "False positive"
    10591071msgstr ""
    10601072
    1061 #: includes/links.php:1057, modules/extras/rapidshare.php:145, modules/extras/rapidshare.php:151, modules/extras/rapidshare.php:178, modules/extras/youtube.php:142, modules/extras/youtube.php:218
     1073#: includes/links.php:1058, modules/extras/rapidshare.php:145, modules/extras/rapidshare.php:151, modules/extras/rapidshare.php:178, modules/extras/youtube.php:141, modules/extras/youtube.php:217
    10621074msgctxt "link status"
    10631075msgid "OK"
     
    11361148msgstr ""
    11371149
    1138 #: includes/admin/links-page-js.php:64, includes/admin/links-page-js.php:653
     1150#: includes/admin/links-page-js.php:64, includes/admin/links-page-js.php:659
    11391151msgid "Wait..."
    11401152msgstr ""
     
    11851197msgstr ""
    11861198
    1187 #: includes/admin/links-page-js.php:691
     1199#: includes/admin/links-page-js.php:654
     1200msgid "Are you sure you want to unlink and remove this link from all posts?"
     1201msgstr ""
     1202
     1203#: includes/admin/links-page-js.php:694
    11881204msgid "%d instances of the link were successfully unlinked."
    11891205msgstr ""
    11901206
    1191 #: includes/admin/links-page-js.php:697
     1207#: includes/admin/links-page-js.php:700
    11921208msgid "However, %d instances couldn't be removed."
    11931209msgstr ""
    11941210
    1195 #: includes/admin/links-page-js.php:702
     1211#: includes/admin/links-page-js.php:705
    11961212msgid "The plugin failed to remove the link."
    11971213msgstr ""
    11981214
    1199 #: includes/admin/links-page-js.php:705
     1215#: includes/admin/links-page-js.php:708
    12001216msgid "The following error(s) occured :"
    12011217msgstr ""
    12021218
    1203 #: includes/admin/links-page-js.php:751
     1219#: includes/admin/links-page-js.php:756
    12041220msgid "Enter a name for the new custom filter"
    12051221msgstr ""
    12061222
    1207 #: includes/admin/links-page-js.php:763
     1223#: includes/admin/links-page-js.php:768
    12081224msgid ""
    12091225"You are about to delete the current filter.\n"
     
    12111227msgstr ""
    12121228
    1213 #: includes/admin/links-page-js.php:787
     1229#: includes/admin/links-page-js.php:792
    12141230msgid ""
    12151231"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"
     
    12171233msgstr ""
    12181234
    1219 #: includes/admin/links-page-js.php:801
     1235#: includes/admin/links-page-js.php:806
    12201236msgid ""
    12211237"Are you sure you want to remove the selected links? This action can't be undone.\n"
     
    12231239msgstr ""
    12241240
    1225 #: includes/admin/links-page-js.php:931
     1241#: includes/admin/links-page-js.php:936
    12261242msgid "Enter a search string first."
    12271243msgstr ""
    12281244
    1229 #: includes/admin/links-page-js.php:938
     1245#: includes/admin/links-page-js.php:943
    12301246msgid "Select one or more links to edit."
    12311247msgstr ""
     
    13611377#: includes/admin/table-printer.php:543
    13621378msgid "Link last checked"
    1363 msgstr ""
    1364 
    1365 #: includes/admin/table-printer.php:548
    1366 msgid "Never"
    13671379msgstr ""
    13681380
     
    14791491msgstr ""
    14801492
    1481 #: modules/checkers/http.php:295
     1493#: modules/checkers/http.php:289
    14821494msgid "Server Not Found"
    14831495msgstr ""
    14841496
    1485 #: modules/checkers/http.php:311
     1497#: modules/checkers/http.php:305
    14861498msgid "Connection Failed"
    14871499msgstr ""
    14881500
    1489 #: modules/checkers/http.php:359, modules/checkers/http.php:444
     1501#: modules/checkers/http.php:359, modules/checkers/http.php:448
    14901502msgid "HTTP code : %d"
    14911503msgstr ""
    14921504
    1493 #: modules/checkers/http.php:361, modules/checkers/http.php:446
     1505#: modules/checkers/http.php:361, modules/checkers/http.php:450
    14941506msgid "(No response)"
    14951507msgstr ""
     
    14991511msgstr ""
    15001512
    1501 #: modules/checkers/http.php:454
     1513#: modules/checkers/http.php:459
    15021514msgid "Request timed out."
    15031515msgstr ""
    15041516
    1505 #: modules/checkers/http.php:473
    1506 msgid "Using Snoopy"
     1517#: modules/checkers/http.php:466
     1518msgid "Using WP HTTP"
    15071519msgstr ""
    15081520
     
    16801692msgstr ""
    16811693
    1682 #: modules/extras/youtube.php:141
     1694#: modules/extras/youtube.php:140
    16831695msgid "Video OK"
    16841696msgstr ""
    16851697
    1686 #: modules/extras/youtube.php:152, modules/extras/youtube.php:155
     1698#: modules/extras/youtube.php:151, modules/extras/youtube.php:154
    16871699msgid "Video Not Found"
    16881700msgstr ""
    16891701
    1690 #: modules/extras/youtube.php:174, modules/extras/youtube.php:177
     1702#: modules/extras/youtube.php:173, modules/extras/youtube.php:176
    16911703msgid "Playlist Not Found"
    16921704msgstr ""
    16931705
    1694 #: modules/extras/youtube.php:184
     1706#: modules/extras/youtube.php:183
    16951707msgid "Playlist Restricted"
    16961708msgstr ""
    16971709
     1710#: modules/extras/youtube.php:190
     1711msgid "This playlist has no entries or all entries have been deleted."
     1712msgstr ""
     1713
    16981714#: 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:192
    17031715msgctxt "link status"
    17041716msgid "Empty Playlist"
    17051717msgstr ""
    17061718
    1707 #: modules/extras/youtube.php:202
     1719#: modules/extras/youtube.php:201
    17081720msgid "Video status : %1$s%2$s"
    17091721msgstr ""
    17101722
    1711 #: modules/extras/youtube.php:208
     1723#: modules/extras/youtube.php:207
    17121724msgid "Video Restricted"
    17131725msgstr ""
    17141726
    1715 #: modules/extras/youtube.php:217
     1727#: modules/extras/youtube.php:216
    17161728msgid "Playlist OK"
    17171729msgstr ""
    17181730
    1719 #: modules/extras/youtube.php:265
     1731#: modules/extras/youtube.php:264
    17201732msgid "Unknown YouTube API response received."
    17211733msgstr ""
  • broken-link-checker/trunk/modules/checkers/http.php

    r2238832 r2312012  
    4343            );
    4444        } 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            );
    6252        }
    6353    }
     
    200190        if ( ! blcUtility::is_safe_mode() && ! blcUtility::is_open_basedir() ) {
    201191            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
    203196        //Set maximum redirects
    204197        curl_setopt( $ch, CURLOPT_MAXREDIRS, 10 );
     
    268261        $info = curl_getinfo( $ch );
    269262
     263        // var_dump( $info ); die();
    270264        //Store the results
    271265        $result['http_code']        = intval( $info['http_code'] );
     
    318312                    $result['status_text'] = __( 'Unknown Error', 'broken-link-checker' );
    319313            }
     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;
    320318        } else {
    321319            $result['broken'] = $this->is_error_code( $result['http_code'] );
     
    336334        );
    337335
    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)){
    339339            //The site in question might be expecting GET instead of HEAD, so lets retry the request
    340340            //using the GET verb...but not in cases of timeout, or where we've already done it.
     
    404404}
    405405
    406 class blcSnoopyHttp extends blcHttpCheckerBase {
     406class blcWPHttp extends blcHttpCheckerBase {
    407407
    408408    function check( $url ) {
    409         $url = $this->clean_url( $url );
     409
     410        // $url = $this->clean_url( $url );
    410411        //Note : Snoopy doesn't work too well with HTTPS URLs.
    411412
     
    423424
    424425        //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 ) ) {
    437436            $result['http_code'] = 0;
    438437            $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'];
    439443        }
    440444
     
    448452        $log .= " ===\n\n";
    449453
    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 ) ) {
    454459            $log              .= __( 'Request timed out.', 'broken-link-checker' ) . "\n";
    455460            $result['timeout'] = true;
    456461        }
    457462
    458         if ( is_array( $snoopy->headers ) ) {
    459             $log .= implode( '', $snoopy->headers ) . "\n"; //those headers already contain newlines
    460         }
    461 
    462         //Redirected?
    463         if ( $snoopy->lastredirectaddr ) {
    464             $result['final_url']      = $snoopy->lastredirectaddr;
    465             $result['redirect_count'] = $snoopy->_redirectdepth;
    466         } else {
    467             $result['final_url'] = $url;
    468         }
    469 
    470463        //Determine if the link counts as "broken"
    471464        $result['broken'] = $this->is_error_code( $result['http_code'] ) || $result['timeout'];
    472465
    473         $log          .= '<em>(' . __( 'Using Snoopy', 'broken-link-checker' ) . ')</em>';
     466        $log          .= '<em>(' . __( 'Using WP HTTP', 'broken-link-checker' ) . ')</em>';
    474467        $result['log'] = $log;
     468
     469        $result['final_url'] = $url;
    475470
    476471        //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  
    130130            $result['status_code'] = BLC_LINK_STATUS_WARNING;
    131131            $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'];
    135134            } else {
    136135                $result['status_text'] = __( 'Unknown Error', 'broken-link-checker' );
     
    288287        $conf = blc_get_configuration();
    289288
    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'] : '';
    292290
    293291        return apply_filters( 'blc_youtube_api_key', $conf->options['youtube_api_key'] );
  • broken-link-checker/trunk/readme.txt

    r2265659 r2312012  
    55Requires at least: 4.6
    66Tested up to: 5.4
    7 Stable tag: 1.11.12
     7Stable tag: 1.11.13
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3838* "Unlink" removes the link but leaves the link text intact.
    3939* "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 from 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.
    4141
    4242You can also click on the contents of the "Status" or "Link Text" columns to get more info about the status of each link.
     
    6868
    6969== 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
    7084= 1.11.12 =
    7185* Added an interface to use personal YouTube API Key
  • broken-link-checker/trunk/uninstall.php

    r2238832 r2312012  
    1111    // Remove the plugin's settings & installation log.
    1212    delete_option( 'wsblc_options' );
     13    delete_option( 'blc_activation_enabled' );
    1314    delete_option( 'blc_installation_log' );
    1415
Note: See TracChangeset for help on using the changeset viewer.