Spectra plugin edit (image gallery block)

[ad_1]

For those familiar with Spectra blocks, for its image gallery block, I’m looking to display the alt text instead of caption which isn’t an option in the block’s caption setting. I haven’t edited a plugin before so I’m just trying to find my way through the gallery block php file. I believe the following function might be where I need to apply the edit but I’m not sure where or what the call is for alt text. Thanks in advance!

private function render_media_caption( $mediaArray, $atts ) {
$limitedCaption = ( isset( $mediaArray[‘caption’] ) && $mediaArray[‘caption’] ) ? (
$mediaArray[‘caption’] ) : (
$mediaArray[‘url’] ? (
$atts[‘imageDefaultCaption’] ) : (
__( ‘Unable to load image’, ‘ultimate-addons-for-gutenberg’ )
)
);
?>
<div class=”spectra-image-gallery__media-thumbnail-caption spectra-image-gallery__media-thumbnail-caption–<?php echo esc_attr( $atts[‘captionDisplayType’] ); ?>”>
<?php echo wp_kses_post( $limitedCaption ); ?>
</div>
<?php
}

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer