privacy_ping_filter

函式
privacy_ping_filter ( $sites )
引數
  • (mixed) $sites Will return if blog is public, will not return if not public.
    Required:
返回值
  • (mixed) Empty string if blog is not public, returns $sites, if site is public.
定義位置
相關方法
doing_filterwp_list_filterwp_print_plugin_file_tree_copy_image_file_wp_privacy_settings_filter_draft_page_titles
引入
2.1.0
棄用
-

privacy_ping_filter: 這是WordPress中的一個過濾器鉤子,用於修改當一個文章釋出時收到pingbacks的網站列表。它允許開發者過濾掉那些由於隱私原因不應該收到pingbacks的網站。

在返回站點之前,檢查部落格是否是公開的。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function privacy_ping_filter( $sites ) {
if ( '0' != get_option( 'blog_public' ) ) {
return $sites;
} else {
return '';
}
}
function privacy_ping_filter( $sites ) { if ( '0' != get_option( 'blog_public' ) ) { return $sites; } else { return ''; } }
function privacy_ping_filter( $sites ) {
	if ( '0' != get_option( 'blog_public' ) ) {
		return $sites;
	} else {
		return '';
	}
}

常見問題

FAQs
檢視更多 >