Last active
October 21, 2015 01:53
-
-
Save soramugi/e24c3327f4abffa0d54b to your computer and use it in GitHub Desktop.
wordpressのルート直下に置けばBroken Link Checkerでのリンク切れ記事が解るwebapiファイル
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once(dirname(__FILE__) . '/wp-load.php'); | |
$results = $wpdb->get_results( ' | |
select instances.container_id from wp_blc_links AS links | |
LEFT JOIN wp_blc_instances AS instances | |
ON (links.link_id = instances.link_id) | |
where links.http_code="404" | |
' ); | |
header("Content-Type: application/json; charset=utf-8"); | |
echo json_encode($results); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment