wp_customize_url

函式
wp_customize_url ( $stylesheet = '' )
引數
  • (string) $stylesheet Optional. Theme to customize. Defaults to active theme. The theme's stylesheet will be urlencoded if necessary.
    Required:
    Default: (empty)
返回值
  • (string)
定義位置
相關方法
_wp_customize_includewp_customize_support_scriptis_customize_previewwp_admin_bar_customize_menuwp_parse_url
引入
3.4.0
棄用
-

wp_customize_url: 這是一個過濾鉤子,允許你修改WordPress定製器的URL。如果你想自定義URL以配合你的網站的品牌,或者讓使用者更容易訪問自定義器,這可能很有用。

返回一個URL來載入自定義器。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function wp_customize_url( $stylesheet = '' ) {
$url = admin_url( 'customize.php' );
if ( $stylesheet ) {
$url .= '?theme=' . urlencode( $stylesheet );
}
return esc_url( $url );
}
function wp_customize_url( $stylesheet = '' ) { $url = admin_url( 'customize.php' ); if ( $stylesheet ) { $url .= '?theme=' . urlencode( $stylesheet ); } return esc_url( $url ); }
function wp_customize_url( $stylesheet = '' ) {
	$url = admin_url( 'customize.php' );
	if ( $stylesheet ) {
		$url .= '?theme=' . urlencode( $stylesheet );
	}
	return esc_url( $url );
}

常見問題

FAQs
檢視更多 >