do_all_trackbacks

函数
do_all_trackbacks ( No parameters )

do_all_trackbacks: 这个钩子用来发送一个文章的所有trackbacks。

执行所有的trackbacks

function do_all_trackbacks() {
	$trackbacks = get_posts(
		array(
			'post_type'        => get_post_types(),
			'suppress_filters' => false,
			'nopaging'         => true,
			'meta_key'         => '_trackbackme',
			'fields'           => 'ids',
		)
	);

	foreach ( $trackbacks as $trackback ) {
		delete_post_meta( $trackback, '_trackbackme' );
		do_trackbacks( $trackback );
	}
}

常见问题

FAQs
查看更多 >