アイキャッチ画像を書き換え

<?php
$spacial_eye_chatches= array( '投稿ID'=>'画像URL',
				26064=> 'http://www.example.com/example.jpg' );

add_filter( 'post_thumbnail_html', 'function_name', 10, 4 );

function function_name( $return_value, $post_id, $post_thumbnail_id, $size ) {
	global $spacial_eye_chatches;
	if ( array_key_exists($post_id, $spacial_eye_chatches) ) {
		preg_match( '!src="([^"]+)"!', $return_value, $regs );
		$before	= $regs[1];
		$after	= $spacial_eye_chatches[ $post_id ];
		return str_replace( $before, $after, $return_value );
	}
	return $return_value;
}
?>

[emulsion_relate_posts]