embed_defaults

過濾鉤子
apply_filters( 'embed_defaults', compact( 'width', 'height' )
引數
  • (int[]) $size { Indexed array of the embed width and height in pixels. @type int $0 The embed width. @type int $1 The embed height. }
    Required:
  • (string) $url The URL that should be embedded.
    Required:
定義位置
相關勾子
oembed_default_widthoembed_resultget_terms_defaultsembed_headcomment_form_defaults
相關方法
wp_embed_defaultsget_metadata_defaultwp_get_widget_defaultsget_default_feedwp_oembed_getwp_default_styles
引入
2.9.0
棄用
-

embed_defaults: 這個過濾器鉤子允許你修改預設的oEmbed響應引數。

過濾嵌入維度的預設陣列。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'embed_defaults', compact( 'width', 'height' ), $url );
return apply_filters( 'embed_defaults', compact( 'width', 'height' ), $url );
return apply_filters( 'embed_defaults', compact( 'width', 'height' ), $url );

常見問題

FAQs
檢視更多 >