twentyten_attachment_size

過濾鉤子
apply_filters( 'twentyten_attachment_size', 900 )
引數
  • (int) $ The default attachment width in pixels. Default 900.
    Required:
定義位置
  • wp-content/themes/twentyten/loop-attachment.php , line 132
相關勾子
twentysixteen_attachment_sizetwentyfifteen_attachment_sizetwentynineteen_attachment_sizetwentytwelve_attachment_sizetwentyfourteen_attachment_size
相關方法
get_the_attachment_linkwp_delete_attachment_fileswp_get_attachment_imagewp_get_attachment_image_sizesthe_attachment_linkwp_attachment_is
引入
Twenty Ten 1.0
棄用
-

twentyten_attachment_size – 此函式用於指定Twenty Ten主題中附件的大小: 該函式以陣列的形式返回附件的大小,陣列中的鍵定義了附件的尺寸。

過濾掉Twenty Ten的預設附件寬度。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$attachment_width = apply_filters( 'twentyten_attachment_size', 900 );
$attachment_width = apply_filters( 'twentyten_attachment_size', 900 );
$attachment_width = apply_filters( 'twentyten_attachment_size', 900 );

常見問題

FAQs
檢視更多 >