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
/** | |
* Removes trailing hyphen from filename if any. | |
*/ | |
function prefix_iaff_clean_filename_helper( $file ) { | |
// Process only images. | |
$image_extensions = array ( | |
'image/jpeg', 'image/gif', 'image/png', 'image/bmp', 'image/tiff', 'ico' | |
); | |
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 %image_alt_text% for Image Attributes Pro. | |
* | |
* @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. | |
* @param $args (array) An array containing additional arguments. | |
* | |
* @return (string) Image alt text from Media Library. | |
*/ | |
function iaffpro_get_custom_attribute_tag_image_alt_text( $image_id, $parent_post_id, $args = array() ) { |
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. |
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 %product_description% for Image Attributes Pro | |
* | |
* @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. | |
* @param $args (array) An array containing additional arguments. | |
* | |
* @return string WordPress post content. WooCommerce product long description is saved as post content. | |
* | |
* @refer https://imageattributespro.com/codex/iaffpro_get_custom_attribute_tag_tagname/ |
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 %post_slug% for Image Attributes Pro | |
* | |
* @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. | |
* @param $args (array) An array containing additional arguments. | |
* | |
* @return string Slug of the post where the image is uploaded to. | |
* | |
* @refer https://imageattributespro.com/codex/iaffpro_get_custom_attribute_tag_tagname/ |
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 %image_id% for Image Attributes Pro | |
* | |
* @param $image_id (integer) The ID of the image that is being updated. | |
* @param $parent_post_id (integer) The post to which the image is attached (uploaded) to. | |
* @param $args (array) An array containing additional arguments. | |
* | |
* @return (string) ID of the image. | |
* | |
* @refer https://imageattributespro.com/codex/iaffpro_get_custom_attribute_tag_tagname/ |
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 %ds_page_title% for Image Attributes Pro that returns title of Page. | |
* | |
* @param $image_id (integer) The ID of the image that is being updated. | |
* @param $parent_post_id (integer) Post to which the image is attached (uploaded) to. | |
* @param $args (array) An array containing additional arguments. | |
* | |
* @return (string) Title of the page to which the image is uploaded to. Post title if page cannot be found. | |
* | |
* @refer https://imageattributespro.com/codex/iaffpro_get_custom_attribute_tag_tagname/ |
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
/** | |
* Add Image Attributes Pro features to Classified Listing. | |
* | |
* Note: Classified Listing plugin hides gallery images from the WordPress Media Library. However these images are simply hidden | |
* and the Bulk Updater of Image Attributes Pro will be able to discover them. | |
* If you wish to display them in the Media Library, please add this snippet to | |
* your functions.php as well - https://wordpress.org/support/topic/about-adding-gallery-images-to-media-library/#post-16643698 | |
* | |
* @link https://imageattributespro.com | |
* @link https://wordpress.org/plugins/classified-listing/ |
NewerOlder