Skip to content

Commit

Permalink
gpfr-global-filename-template.php: Fixed issue where {i} merge ta…
Browse files Browse the repository at this point in the history
…g would increment twice as fast as it should.
  • Loading branch information
veryspry committed Sep 21, 2023
1 parent 30ded20 commit b0d5af7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions gp-file-renamer/gpfr-global-filename-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
* Requires GP File Renamer v1.0.5+.
*/
add_filter( 'gpfr_filename', function( $renamed_file, $file, $entry, $form, $field ) {
$renamed_file = gp_file_renamer()->get_template_value( '{entry:id}/{filename}-{i}', $file, $entry, $form, $field );
return $renamed_file;
add_filter( 'gpfr_filename_template', function ( $template, $filename, $form, $field, $entry ) {
return '{entry:id}/{filename}-{i}';
}, 10, 5 );

0 comments on commit b0d5af7

Please sign in to comment.