Last active
April 24, 2023 07:18
-
-
Save arunbasillal/8b33e4b3822324a112323d2503afd104 to your computer and use it in GitHub Desktop.
Custom tag %random_number% for Image Attributes 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
/** | |
* Custom tag %random_number% for Image Attributes Pro. | |
* | |
* Generates a random number between 0 and 999. | |
* | |
* @param $image_id The ID of the image that is being updated. | |
* @param $parent_post_id The post to which the image is attached (uploaded) to. 0 if the image is not attached to any post. | |
* @param $args (array) An array containing additional arguments. | |
* | |
* @return (integer) A random number between 0 and 999. | |
* | |
* @refer https://imageattributespro.com/codex/iaffpro_get_custom_attribute_tag_tagname/ | |
*/ | |
function iaffpro_get_custom_attribute_tag_random_number( $image_id, $parent_post_id, $args = array() ) { | |
return rand(0, 999); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment