Uma área de pesquisa sobre o WordPress para devs e autores do tema



wp_save_image_file ›

Desde2.9.0
Obsoleto
apply_filters( 'wp_save_image_file', null, $filename, $image, $mime_type, $post_id )
Parâmetros: (5)
  • (mixed) $override Value to return instead of saving. Default null.
    Required: Yes
  • (string) $filename Name of the file to be saved.
    Required: Yes
  • (WP_Image_Editor) $image WP_Image_Editor instance.
    Required: Yes
  • (string) $mime_type Image mime type.
    Required: Yes
  • (int) $post_id Post ID.
    Required: Yes
Definido em:
Codex:

Filters whether to skip saving the image file.

Returning a non-null value will short-circuit the save method, returning that value instead.





Fonte

$saved = apply_filters( 'wp_save_image_file', null, $filename, $image, $mime_type, $post_id );