self_link

函式
self_link ( No parameters )
定義位置
相關方法
get_self_linkrsd_linkget_linkedit_linkpost_reply_link
引入
2.5.0
棄用
-

self_link: 這是一個WordPress的函式,顯示當前頁面的連結。它通常被用來在WordPress管理區輸出當前頁面的連結: 這個函式需要一個可選的引數,就是連結文字。

以XSS安全的方式顯示當前顯示的feed的連結。

為atom:self元素生成一個正確的連結。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function self_link() {
/**
* Filters the current feed URL.
*
* @since 3.6.0
*
* @see set_url_scheme()
* @see wp_unslash()
*
* @param string $feed_link The link for the feed with set URL scheme.
*/
echo esc_url( apply_filters( 'self_link', get_self_link() ) );
}
function self_link() { /** * Filters the current feed URL. * * @since 3.6.0 * * @see set_url_scheme() * @see wp_unslash() * * @param string $feed_link The link for the feed with set URL scheme. */ echo esc_url( apply_filters( 'self_link', get_self_link() ) ); }
function self_link() {
	/**
	 * Filters the current feed URL.
	 *
	 * @since 3.6.0
	 *
	 * @see set_url_scheme()
	 * @see wp_unslash()
	 *
	 * @param string $feed_link The link for the feed with set URL scheme.
	 */
	echo esc_url( apply_filters( 'self_link', get_self_link() ) );
}

常見問題

FAQs
檢視更多 >