wp ( $query_vars = '' )
引數
  • (string|array) $query_vars Default WP_Query arguments.
    Required:
    Default: (empty)
定義位置
相關方法
wp_diewp_rss
引入
2.0.0
棄用
-

wp: 這個函式是WordPress的主要入口點。它設定環境,初始化WordPress的核心類和函式,並處理使用者的請求。

設定WordPress查詢。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function wp( $query_vars = '' ) {
global $wp, $wp_query, $wp_the_query;
$wp->main( $query_vars );
if ( ! isset( $wp_the_query ) ) {
$wp_the_query = $wp_query;
}
}
function wp( $query_vars = '' ) { global $wp, $wp_query, $wp_the_query; $wp->main( $query_vars ); if ( ! isset( $wp_the_query ) ) { $wp_the_query = $wp_query; } }
function wp( $query_vars = '' ) {
	global $wp, $wp_query, $wp_the_query;

	$wp->main( $query_vars );

	if ( ! isset( $wp_the_query ) ) {
		$wp_the_query = $wp_query;
	}
}

常見問題

FAQs
檢視更多 >