functions.php に以下を追記することで
url入力したサイトのスクリーンショットを手軽に貼付けることができます。
スクリーンショットには自動でリンクが貼られます。
//URLを入力しスクリーンショットを撮る
function wpr_snap($atts, $content = null) {
extract(shortcode_atts(array(
"snap" => 'http://s.wordpress.com/mshots/v1/',
"url" => 'http://tande.jp/',
"link" => '',
"alt" => 'My image',
"w" => '480', // width
"h" => '360' // height
), $atts));
if($link == '') { $link = $url; }
$img = '<img src="' . $snap . '' . urlencode($url) . '?w=' . $w . '&h=' . $h . '" alt="' . $alt . '"/>';
return '<p>' . '<a href="' . $link . '" target="_blank">' . $img . '</a>' . '</p>';
}
add_shortcode("snap", "wpr_snap");
Read More