HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/shootinschool/wp-content/plugins/js_composer/include/autoload/vc-single-image.php
<?php
if ( ! defined( 'ABSPATH' ) ) {
	die( '-1' );
}

if ( 'vc_edit_form' === vc_post_param( 'action' ) ) {
	add_filter( 'vc_edit_form_fields_attributes_vc_single_image', 'vc_single_image_convert_old_link_to_new' );
}
/**
 * Backward compatibility
 *
 * @since 4.6
 * @param $atts
 * @return mixed
 */
function vc_single_image_convert_old_link_to_new( $atts ) {
	if ( empty( $atts['onclick'] ) && isset( $atts['img_link_large'] ) && 'yes' === $atts['img_link_large'] ) {
		$atts['onclick'] = 'img_link_large';
		unset( $atts['img_link_large'] );
	} elseif ( empty( $atts['onclick'] ) && ( ! isset( $atts['img_link_large'] ) || 'yes' !== $atts['img_link_large'] ) ) {
		unset( $atts['img_link_large'] );
	}

	if ( empty( $atts['onclick'] ) && ! empty( $atts['link'] ) ) {
		$atts['onclick'] = 'custom_link';
	}

	return $atts;
}