| Server IP : 68.178.247.200 / Your IP : 216.73.217.50 Web Server : Apache System : Linux p3plzcpnl489463.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64 User : x9dppmxs4rgd ( 8559391) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/x9dppmxs4rgd/public_html/wp-content/plugins/js_composer/include/autoload/ |
Upload File : |
<?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;
}