wpseek.com
WordPress开发者和主题制作者的搜索引擎



admin_post_thumbnail_size › WordPress过滤钩子

Since4.4.0
已弃用n/a
apply_filters( 'admin_post_thumbnail_size', $size, $thumbnail_id, $post )
参数: (3)
  • (string|int[]) $size Requested image size. Can be any registered image size name, or an array of width and height values in pixels (in that order).
    Required: Yes
  • (int) $thumbnail_id Post thumbnail attachment ID.
    Required: Yes
  • (WP_Post) $post The post object associated with the thumbnail.
    Required: Yes
定义在:
文档:

Filters the size used to display the post thumbnail image in the 'Featured image' meta box.

Note: When a theme adds 'post-thumbnail' support, a special 'post-thumbnail' image size is registered, which differs from the 'thumbnail' image size managed via the Settings > Media screen.





源码

$size = apply_filters( 'admin_post_thumbnail_size', $size, $thumbnail_id, $post );