[wp-trac] [WordPress Trac] #62385: Improve `WP_Image_Editor::generate_filename()` to support generating filenames without a suffix
WordPress Trac
noreply at wordpress.org
Thu Feb 20 22:00:54 UTC 2025
#62385: Improve `WP_Image_Editor::generate_filename()` to support generating
filenames without a suffix
-------------------------------------------------+-------------------------
Reporter: azaozz | Owner: joedolson
Type: enhancement | Status: assigned
Priority: normal | Milestone: 6.8
Component: Media | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing-info needs- | Focuses:
dev-note |
-------------------------------------------------+-------------------------
Changes (by azaozz):
* keywords: has-patch needs-testing-info => has-patch needs-testing-info
needs-dev-note
Comment:
Replying to [comment:4 audrasjb]:
> @azaozz do you have some time to perform a quick code review?
Sure. The [https://github.com/WordPress/wordpress-develop/pull/7772 PR]
looks good imho. May need a little update of the docs, or an inline
comment to explain the new behavior. Also probably good to mention this in
a dev. note as plugins authors may find it useful.
After this is committed this bit of code:
https://core.trac.wordpress.org/changeset/59379/trunk/src/wp-
admin/includes/image.php should be replaced with:
{{{
$saved = $editor->save( $editor->generate_filename( '' ) );
}}}
That uses the new functionality from this ticket.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62385#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list