Last active
April 11, 2016 10:16
-
-
Save polevaultweb/b0aa58b903001b12e4945d76e824ff7a to your computer and use it in GitHub Desktop.
Using the `igp_image_filename` filter in Instagrate Pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'igp_image_filename', 'my_igp_image_filename', 10, 4 ); | |
function my_igp_image_filename( $file_name, $file, $post_name, $postid ) { | |
$file_name_parts = explode( '.', $file_name ); | |
$ext = array_pop( $file_name_parts ); | |
$file_name = 'my-prefix-' . implode( '.', $file_name_parts ) . '-'. date( 'Y-m-d' ) . '.' . $ext; | |
return $file_name; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment