Last active
July 20, 2023 09:27
-
-
Save mahfuzul/68b88667588e12075361b6cd7d3fc0a9 to your computer and use it in GitHub Desktop.
Visual Composer field dependency variations
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
<?php | |
#Visual Composer field dependency examples: | |
array( | |
"type" => "attach_image", | |
"holder" => "div", | |
"param_name" => "section_title_image", | |
"dependency" => [ | |
"element" => "title_type", | |
"value" => ["image"] | |
], | |
), | |
'dependency' => array( | |
'element' => 'source', | |
'value' => 'external_link', | |
), | |
'dependency' => array( | |
'element' => 'source', | |
'value' => array( | |
'media_library', | |
'featured_image', | |
), | |
), | |
'dependency' => array( | |
'element' => 'stroke_width', | |
'value_not_equal_to' => '0', | |
) | |
'dependency' => array( | |
'element' => 'use_theme_fonts', | |
'value_not_equal_to' => 'yes', | |
), | |
'dependency' => array( | |
'element' => 'source', | |
'is_empty' => true, | |
), | |
'dependency' => array( | |
'element' => 'background_style', | |
'not_empty' => true, | |
), | |
'dependency' => array( | |
'element' => 'href', | |
'not_empty' => true, | |
'callback' => 'vc_cta_button_param_target_callback', | |
), | |
'dependency' => array( | |
'element' => 'post_type', | |
'value_not_equal_to' => array( | |
'ids', | |
'custom', | |
), | |
), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment