wp_high_priority_element_flag

函式
wp_high_priority_element_flag ( $value = null )
Access
Private
引數
  • (bool) $value Optional. Used to change the static variable. Default null.
    Required:
    Default: null
返回值
  • (bool) Returns true if high-priority element was marked already, otherwise false.
定義位置
相關方法
wp_get_elements_class_namewp_print_community_events_markupwp_print_community_events_templateswp_mediaelement_fallbackwp_recovery_mode_nag
引入
6.3.0
棄用
-

訪問一個標誌,指示元素是否可能是 ” fetchpriority='high' “的候選元素。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function wp_high_priority_element_flag( $value = null ) {
static $high_priority_element = true;
if ( is_bool( $value ) ) {
$high_priority_element = $value;
}
return $high_priority_element;
}
function wp_high_priority_element_flag( $value = null ) { static $high_priority_element = true; if ( is_bool( $value ) ) { $high_priority_element = $value; } return $high_priority_element; }
function wp_high_priority_element_flag( $value = null ) {
	static $high_priority_element = true;

	if ( is_bool( $value ) ) {
		$high_priority_element = $value;
	}

	return $high_priority_element;
}

常見問題

FAQs
檢視更多 >