ACF_Media::image_size_names_choose()
Filters the names and labels of the default image sizes.
Метод класса: ACF_Media{}
Хуков нет.
Возвращает
Массив
.
Использование
$ACF_Media = new ACF_Media(); $ACF_Media->image_size_names_choose( $size_names );
- $size_names(массив) (обязательный)
- Array of image size labels keyed by their name.
Список изменений
С версии 5.9.7 | Введена. |
Код ACF_Media::image_size_names_choose() ACF Media::image size names choose ACF 6.0.4
function image_size_names_choose( $size_names ) { $field = $this->get_source_field(); // Append "preview_size" setting to array of image sizes so WP will include in prepared JS data. if ( isset( $field['preview_size'] ) ) { $name = (string) $field['preview_size']; $size_names[ $name ] = $name; // Don't worry about size label, it is never used. } return $size_names; }