generic_ping

函式
generic_ping ( $post_id = 0 )
引數
  • (int) $post_id Post ID.
    Required:
返回值
  • (int) Same post ID as provided.
定義位置
相關方法
get_to_pingget_others_pendingget_pungget_network_optionget_user_option
引入
1.2.0
棄用
-

generic_ping: 這個函式用來向一個外部網站傳送ping,以通知它你的網站上有新的文章。

向所有平移站點服務傳送平移。

function generic_ping( $post_id = 0 ) {
	$services = get_option( 'ping_sites' );

	$services = explode( "n", $services );
	foreach ( (array) $services as $service ) {
		$service = trim( $service );
		if ( '' !== $service ) {
			weblog_ping( $service );
		}
	}

	return $post_id;
}

常見問題

FAQs
檢視更多 >