Version Description
- Fixed the bug where the plugin would ignore FORCE_ADMIN_SSL setting and always use plain HTTP for it's forms and AJAX.
Download this release
Release Info
| Developer | whiteshadow |
| Plugin | |
| Version | 0.5.13 |
| Comparing to | |
| See all releases | |
Code changes from version 0.5.12 to 0.5.13
- broken-link-checker.php +1 -1
- core.php +15 -33
- readme.txt +7 -3
broken-link-checker.php
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
Plugin Name: Broken Link Checker
|
| 5 |
Plugin URI: http://w-shadow.com/blog/2007/08/05/broken-link-checker-for-wordpress/
|
| 6 |
Description: Checks your posts for broken links and missing images and notifies you on the dashboard if any are found.
|
| 7 |
-
Version: 0.5.
|
| 8 |
Author: Janis Elsts
|
| 9 |
Author URI: http://w-shadow.com/blog/
|
| 10 |
*/
|
| 4 |
Plugin Name: Broken Link Checker
|
| 5 |
Plugin URI: http://w-shadow.com/blog/2007/08/05/broken-link-checker-for-wordpress/
|
| 6 |
Description: Checks your posts for broken links and missing images and notifies you on the dashboard if any are found.
|
| 7 |
+
Version: 0.5.13
|
| 8 |
Author: Janis Elsts
|
| 9 |
Author URI: http://w-shadow.com/blog/
|
| 10 |
*/
|
core.php
CHANGED
|
@@ -94,7 +94,7 @@ class wsBrokenLinkChecker {
|
|
| 94 |
|
| 95 |
function blcDoWork(){
|
| 96 |
$.post(
|
| 97 |
-
"<?php
|
| 98 |
{
|
| 99 |
'action' : 'blc_work'
|
| 100 |
},
|
|
@@ -129,12 +129,12 @@ class wsBrokenLinkChecker {
|
|
| 129 |
?>
|
| 130 |
<p id='wsblc_activity_box'>Loading...</p>
|
| 131 |
<script type='text/javascript'>
|
| 132 |
-
jQuery(function($){
|
| 133 |
var blc_was_autoexpanded = false;
|
| 134 |
|
| 135 |
function blcDashboardStatus(){
|
| 136 |
$.getJSON(
|
| 137 |
-
"<?php
|
| 138 |
{
|
| 139 |
'action' : 'blc_dashboard_status'
|
| 140 |
},
|
|
@@ -160,7 +160,7 @@ class wsBrokenLinkChecker {
|
|
| 160 |
|
| 161 |
blcDashboardStatus();//Call it the first time
|
| 162 |
|
| 163 |
-
});
|
| 164 |
</script>
|
| 165 |
<?php
|
| 166 |
}
|
|
@@ -248,7 +248,6 @@ class wsBrokenLinkChecker {
|
|
| 248 |
//Drop all synchronization records
|
| 249 |
$wpdb->query("TRUNCATE {$wpdb->prefix}blc_synch");
|
| 250 |
|
| 251 |
-
|
| 252 |
//Create new synchronization records for posts
|
| 253 |
$q = "INSERT INTO {$wpdb->prefix}blc_synch(source_id, source_type, synched)
|
| 254 |
SELECT id, 'post', 0
|
|
@@ -519,7 +518,7 @@ class wsBrokenLinkChecker {
|
|
| 519 |
|
| 520 |
function blcUpdateStatus(){
|
| 521 |
$.getJSON(
|
| 522 |
-
"<?php
|
| 523 |
{
|
| 524 |
'action' : 'blc_full_status'
|
| 525 |
},
|
|
@@ -620,7 +619,7 @@ class wsBrokenLinkChecker {
|
|
| 620 |
?>
|
| 621 |
<br/>
|
| 622 |
<span class="description">
|
| 623 |
-
Set this field if you want the plugin to use a custom directory for
|
| 624 |
Otherwise, leave it blank.
|
| 625 |
</span>
|
| 626 |
|
|
@@ -994,7 +993,7 @@ jQuery(function($){
|
|
| 994 |
var link_id = $(me).parents('.blc-row').find('.blc-link-id').html();
|
| 995 |
|
| 996 |
$.post(
|
| 997 |
-
"<?php
|
| 998 |
{
|
| 999 |
'action' : 'blc_discard',
|
| 1000 |
'link_id' : link_id
|
|
@@ -1058,7 +1057,7 @@ jQuery(function($){
|
|
| 1058 |
url_el.html('Saving changes...');
|
| 1059 |
|
| 1060 |
$.getJSON(
|
| 1061 |
-
"<?php
|
| 1062 |
{
|
| 1063 |
'action' : 'blc_edit',
|
| 1064 |
'link_id' : link_id,
|
|
@@ -1091,7 +1090,7 @@ jQuery(function($){
|
|
| 1091 |
master.find('.blc-link-id').html(data.new_link_id);
|
| 1092 |
//Load up the new link info (so sue me)
|
| 1093 |
master.next('.blc-link-details').find('td').html('<center>Loading...</center>').load(
|
| 1094 |
-
"<?php
|
| 1095 |
{
|
| 1096 |
'action' : 'blc_link_details',
|
| 1097 |
'link_id' : data.new_link_id
|
|
@@ -1144,7 +1143,7 @@ jQuery(function($){
|
|
| 1144 |
var link_id = $(me).parents('.blc-row').find('.blc-link-id').html();
|
| 1145 |
|
| 1146 |
$.post(
|
| 1147 |
-
"<?php
|
| 1148 |
{
|
| 1149 |
'action' : 'blc_unlink',
|
| 1150 |
'link_id' : link_id
|
|
@@ -1181,7 +1180,7 @@ jQuery(function($){
|
|
| 1181 |
var link_id = $(me).parents('.blc-row').find('.blc-link-id').html();
|
| 1182 |
|
| 1183 |
$.post(
|
| 1184 |
-
"<?php
|
| 1185 |
{
|
| 1186 |
'action' : 'blc_exclude_link',
|
| 1187 |
'link_id' : link_id
|
|
@@ -1332,7 +1331,7 @@ jQuery(function($){
|
|
| 1332 |
AND ( ( {$wpdb->prefix}blc_instances.source_type = 'post' ) OR ( {$wpdb->prefix}blc_instances.source_type = 'custom_field' ) )";
|
| 1333 |
$rez = $wpdb->query($q);
|
| 1334 |
|
| 1335 |
-
//Delete all instances that reference non-
|
| 1336 |
$q = "DELETE FROM {$wpdb->prefix}blc_instances
|
| 1337 |
USING {$wpdb->prefix}blc_instances LEFT JOIN {$wpdb->links} ON {$wpdb->prefix}blc_instances.source_id = {$wpdb->links}.link_id
|
| 1338 |
WHERE
|
|
@@ -1710,8 +1709,8 @@ jQuery(function($){
|
|
| 1710 |
$text = '';
|
| 1711 |
|
| 1712 |
if( $status['broken_links'] > 0 ){
|
| 1713 |
-
$text .= sprintf( "<a href='%
|
| 1714 |
-
|
| 1715 |
} else {
|
| 1716 |
$text .= "No broken links found.";
|
| 1717 |
}
|
|
@@ -1748,24 +1747,7 @@ jQuery(function($){
|
|
| 1748 |
|
| 1749 |
function ajax_dashboard_status(){
|
| 1750 |
//Just display the full status.
|
| 1751 |
-
$this->ajax_full_status(
|
| 1752 |
-
/*
|
| 1753 |
-
global $wpdb;
|
| 1754 |
-
|
| 1755 |
-
//displays a notification if broken links have been found
|
| 1756 |
-
$q = "SELECT count(*) FROM {$wpdb->prefix}blc_links
|
| 1757 |
-
WHERE check_count > 0 AND ( http_code < 200 OR http_code >= 400 OR timeout = 1 )";
|
| 1758 |
-
$broken_links = $wpdb->get_var($q);
|
| 1759 |
-
|
| 1760 |
-
|
| 1761 |
-
if($broken_links>0){
|
| 1762 |
-
printf( "<a href='%stools.php?page=view-broken-links' title='View broken links'><strong>Found %d broken link%s</strong></a>",
|
| 1763 |
-
get_option('wpurl'), $broken_links, ($broken_links==1)?'':'s' );
|
| 1764 |
-
} else {
|
| 1765 |
-
echo "No broken links found.";
|
| 1766 |
-
}
|
| 1767 |
-
die();
|
| 1768 |
-
*/
|
| 1769 |
}
|
| 1770 |
|
| 1771 |
/**
|
| 94 |
|
| 95 |
function blcDoWork(){
|
| 96 |
$.post(
|
| 97 |
+
"<?php echo admin_url('admin-ajax.php'); ?>",
|
| 98 |
{
|
| 99 |
'action' : 'blc_work'
|
| 100 |
},
|
| 129 |
?>
|
| 130 |
<p id='wsblc_activity_box'>Loading...</p>
|
| 131 |
<script type='text/javascript'>
|
| 132 |
+
jQuery( function($){
|
| 133 |
var blc_was_autoexpanded = false;
|
| 134 |
|
| 135 |
function blcDashboardStatus(){
|
| 136 |
$.getJSON(
|
| 137 |
+
"<?php echo admin_url('admin-ajax.php'); ?>",
|
| 138 |
{
|
| 139 |
'action' : 'blc_dashboard_status'
|
| 140 |
},
|
| 160 |
|
| 161 |
blcDashboardStatus();//Call it the first time
|
| 162 |
|
| 163 |
+
} );
|
| 164 |
</script>
|
| 165 |
<?php
|
| 166 |
}
|
| 248 |
//Drop all synchronization records
|
| 249 |
$wpdb->query("TRUNCATE {$wpdb->prefix}blc_synch");
|
| 250 |
|
|
|
|
| 251 |
//Create new synchronization records for posts
|
| 252 |
$q = "INSERT INTO {$wpdb->prefix}blc_synch(source_id, source_type, synched)
|
| 253 |
SELECT id, 'post', 0
|
| 518 |
|
| 519 |
function blcUpdateStatus(){
|
| 520 |
$.getJSON(
|
| 521 |
+
"<?php echo admin_url('admin-ajax.php'); ?>",
|
| 522 |
{
|
| 523 |
'action' : 'blc_full_status'
|
| 524 |
},
|
| 619 |
?>
|
| 620 |
<br/>
|
| 621 |
<span class="description">
|
| 622 |
+
Set this field if you want the plugin to use a custom directory for its lockfiles.
|
| 623 |
Otherwise, leave it blank.
|
| 624 |
</span>
|
| 625 |
|
| 993 |
var link_id = $(me).parents('.blc-row').find('.blc-link-id').html();
|
| 994 |
|
| 995 |
$.post(
|
| 996 |
+
"<?php echo admin_url('admin-ajax.php'); ?>",
|
| 997 |
{
|
| 998 |
'action' : 'blc_discard',
|
| 999 |
'link_id' : link_id
|
| 1057 |
url_el.html('Saving changes...');
|
| 1058 |
|
| 1059 |
$.getJSON(
|
| 1060 |
+
"<?php echo admin_url('admin-ajax.php'); ?>",
|
| 1061 |
{
|
| 1062 |
'action' : 'blc_edit',
|
| 1063 |
'link_id' : link_id,
|
| 1090 |
master.find('.blc-link-id').html(data.new_link_id);
|
| 1091 |
//Load up the new link info (so sue me)
|
| 1092 |
master.next('.blc-link-details').find('td').html('<center>Loading...</center>').load(
|
| 1093 |
+
"<?php echo admin_url('admin-ajax.php'); ?>",
|
| 1094 |
{
|
| 1095 |
'action' : 'blc_link_details',
|
| 1096 |
'link_id' : data.new_link_id
|
| 1143 |
var link_id = $(me).parents('.blc-row').find('.blc-link-id').html();
|
| 1144 |
|
| 1145 |
$.post(
|
| 1146 |
+
"<?php echo admin_url('admin-ajax.php'); ?>",
|
| 1147 |
{
|
| 1148 |
'action' : 'blc_unlink',
|
| 1149 |
'link_id' : link_id
|
| 1180 |
var link_id = $(me).parents('.blc-row').find('.blc-link-id').html();
|
| 1181 |
|
| 1182 |
$.post(
|
| 1183 |
+
"<?php echo admin_url('admin-ajax.php'); ?>",
|
| 1184 |
{
|
| 1185 |
'action' : 'blc_exclude_link',
|
| 1186 |
'link_id' : link_id
|
| 1331 |
AND ( ( {$wpdb->prefix}blc_instances.source_type = 'post' ) OR ( {$wpdb->prefix}blc_instances.source_type = 'custom_field' ) )";
|
| 1332 |
$rez = $wpdb->query($q);
|
| 1333 |
|
| 1334 |
+
//Delete all instances that reference non-existent bookmarks
|
| 1335 |
$q = "DELETE FROM {$wpdb->prefix}blc_instances
|
| 1336 |
USING {$wpdb->prefix}blc_instances LEFT JOIN {$wpdb->links} ON {$wpdb->prefix}blc_instances.source_id = {$wpdb->links}.link_id
|
| 1337 |
WHERE
|
| 1709 |
$text = '';
|
| 1710 |
|
| 1711 |
if( $status['broken_links'] > 0 ){
|
| 1712 |
+
$text .= sprintf( "<a href='%s' title='View broken links'><strong>Found %d broken link%s</strong></a>",
|
| 1713 |
+
admin_url('tools.php?page=view-broken-links'), $status['broken_links'], ( $status['broken_links'] == 1 )?'':'s' );
|
| 1714 |
} else {
|
| 1715 |
$text .= "No broken links found.";
|
| 1716 |
}
|
| 1747 |
|
| 1748 |
function ajax_dashboard_status(){
|
| 1749 |
//Just display the full status.
|
| 1750 |
+
$this->ajax_full_status( );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1751 |
}
|
| 1752 |
|
| 1753 |
/**
|
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@ Contributors: whiteshadow
|
|
| 3 |
Tags: links, broken, maintenance, blogroll, custom fields, admin
|
| 4 |
Requires at least: 2.7.0
|
| 5 |
Tested up to: 2.9
|
| 6 |
-
Stable tag: 0.5.
|
| 7 |
|
| 8 |
This plugin will check your posts, custom fields and the blogroll for broken links and missing images and notify you if any are found.
|
| 9 |
|
|
@@ -60,6 +60,11 @@ To upgrade your installation
|
|
| 60 |
|
| 61 |
*This is an automatically generated changelog*
|
| 62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
= 0.5.12 =
|
| 64 |
* Let the user set a custom temporary directory, if the default one is not accessible for some reason.
|
| 65 |
|
|
@@ -245,5 +250,4 @@ To upgrade your installation
|
|
| 245 |
* *There are no release notes for this version*
|
| 246 |
|
| 247 |
= 0.1 =
|
| 248 |
-
* *There are no release notes for this version*
|
| 249 |
-
|
| 3 |
Tags: links, broken, maintenance, blogroll, custom fields, admin
|
| 4 |
Requires at least: 2.7.0
|
| 5 |
Tested up to: 2.9
|
| 6 |
+
Stable tag: 0.5.13
|
| 7 |
|
| 8 |
This plugin will check your posts, custom fields and the blogroll for broken links and missing images and notify you if any are found.
|
| 9 |
|
| 60 |
|
| 61 |
*This is an automatically generated changelog*
|
| 62 |
|
| 63 |
+
== Changelog ==
|
| 64 |
+
|
| 65 |
+
= 0.5.13 =
|
| 66 |
+
* Fixed the bug where the plugin would ignore FORCE\_ADMIN\_SSL setting and always use plain HTTP for it's forms and AJAX.
|
| 67 |
+
|
| 68 |
= 0.5.12 =
|
| 69 |
* Let the user set a custom temporary directory, if the default one is not accessible for some reason.
|
| 70 |
|
| 250 |
* *There are no release notes for this version*
|
| 251 |
|
| 252 |
= 0.1 =
|
| 253 |
+
* *There are no release notes for this version*
|
|
|
