Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
/** * JKIT || Example Output Filter of WooCommerce Product Images * * Add Caption to Product Images * * @param string $html Rendered HTML. * @param WC_Product $class Class of WC_Product. * @param string $size (default: 'woocommerce_thumbnail'). * @param array $attr Image attributes. * @param bool $placeholder True to return $placeholder if no image is found, or false to return an empty string. * @param string $image Rendered Image HTML. * * @return string */ function add_caption_to_product_images( $html, $class, $size, $attr, $placeholder, $image ) { $html .= '
Custom Caption
'; return $html; } add_filter( 'woocommerce_product_get_image', 'add_caption_to_product_images', 10, 6 );
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)