wp_image_editor_supports

函式
wp_image_editor_supports ( $args = array() )
引數
  • (string|array) $args Optional. Array of arguments to retrieve the image editor supports. Default empty array.
    Required:
    Default: array()
返回值
  • (bool) True if an eligible editor is found; false otherwise.
定義位置
相關方法
wp_image_editorwp_get_image_editorwp_cache_supportswp_ajax_image_editorwp_timezone_supported
引入
3.5.0
棄用
-

wp_image_editor_supports: 這個函式用於檢查某個影象編輯器是否支援某個功能。它需要兩個引數,影象編輯器物件和要檢查的特性,如果該特性被支援,則返回true,否則返回false。

測試是否有一個編輯器支援給定的mime型別或方法。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function wp_image_editor_supports( $args = array() ) {
return (bool) _wp_image_editor_choose( $args );
}
function wp_image_editor_supports( $args = array() ) { return (bool) _wp_image_editor_choose( $args ); }
function wp_image_editor_supports( $args = array() ) {
	return (bool) _wp_image_editor_choose( $args );
}

常見問題

FAQs
檢視更多 >