| 开发者 | mansoormunib |
|---|---|
| 更新时间 | 2026年6月9日 11:53 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
add_image_size() is picked up automatically, alongside the built-in thumbnail, medium, medium_large and large sizes. Each row shows:
the_post_thumbnail() and the media library.
More detail on registering custom image sizes: https://developer.wordpress.org/reference/functions/add_image_size/
image-sizes-in-admin-dashboard folder to your /wp-content/plugins/ directory.Only users with the manage_options capability (administrators by default).
Make sure add_image_size() runs on the after_setup_theme or init hook in your theme or plugin so the size is registered before the Dashboard loads.
The widget renders on each site's Dashboard. To show it on the Network Admin Dashboard, hook the registration to wp_network_dashboard_setup instead of wp_dashboard_setup.
manage_options) before registering and rendering the widget.wp_get_registered_image_subsizes() instead of the private $_wp_additional_image_sizes global.image-sizes-admin-dashboard text domain.