get_pung

函式
get_pung ( $post )
引數
  • (int|WP_Post) $post Post ID or object.
    Required:
返回值
  • (string[]|false) Array of URLs already pinged for the given post, false if the post is not found.
定義位置
相關方法
get_pageget_to_pingget_pluginsget_pagesget_tag
引入
1.5.0
棄用
-

get_pung函式是一個WordPress的函式,它檢索一個陣列的URLs,這些URLs已經ping了一個特定的文章: 這個函式把文章的ID作為一個引數,並返回一個URL陣列。

檢索已經為一個文章ping過的URL。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function get_pung( $post ) {
$post = get_post( $post );
if ( ! $post ) {
return false;
}
$pung = trim( $post->pinged );
$pung = preg_split( '/s/', $pung );
/**
* Filters the list of already-pinged URLs for the given post.
*
* @since 2.0.0
*
* @param string[] $pung Array of URLs already pinged for the given post.
*/
return apply_filters( 'get_pung', $pung );
}
function get_pung( $post ) { $post = get_post( $post ); if ( ! $post ) { return false; } $pung = trim( $post->pinged ); $pung = preg_split( '/s/', $pung ); /** * Filters the list of already-pinged URLs for the given post. * * @since 2.0.0 * * @param string[] $pung Array of URLs already pinged for the given post. */ return apply_filters( 'get_pung', $pung ); }
function get_pung( $post ) {
	$post = get_post( $post );

	if ( ! $post ) {
		return false;
	}

	$pung = trim( $post->pinged );
	$pung = preg_split( '/s/', $pung );

	/**
	 * Filters the list of already-pinged URLs for the given post.
	 *
	 * @since 2.0.0
	 *
	 * @param string[] $pung Array of URLs already pinged for the given post.
	 */
	return apply_filters( 'get_pung', $pung );
}

常見問題

FAQs
檢視更多 >