about-widget.php
6 years ago
accordion-widget.php
6 years ago
accordion.php
6 years ago
attachment-url.php
6 years ago
audio.php
6 years ago
before-after.php
6 years ago
button.php
6 years ago
code.php
6 years ago
contact-box.php
6 years ago
contact-form.php
6 years ago
custom-list.php
6 years ago
divider.php
6 years ago
dropcap.php
6 years ago
facebook.php
6 years ago
flickr.php
6 years ago
gallery.php
6 years ago
general-element-fields.php
6 years ago
gmap.php
6 years ago
highlight.php
6 years ago
image.php
6 years ago
instagram-feed.php
6 years ago
latest-items.php
8 years ago
latest-posts-slider.php
6 years ago
popular-posts-widget.php
6 years ago
quote.php
6 years ago
recent-posts-grid-carousel.php
6 years ago
recent-posts-land-style.php
6 years ago
recent-posts-masonry.php
6 years ago
recent-posts-tiles-carousel.php
6 years ago
recent-posts-tiles.php
6 years ago
recent-posts-timeline.php
6 years ago
recent-posts-widget.php
6 years ago
recent-products.php
6 years ago
related-posts.php
8 years ago
sample-element.php
6 years ago
search.php
6 years ago
socials-list.php
6 years ago
staff.php
6 years ago
tab-widget.php
6 years ago
tabs.php
6 years ago
testimonial.php
6 years ago
text.php
6 years ago
touch-slider.php
6 years ago
video.php
6 years ago
general-element-fields.php
97 lines
| 1 | <?php |
| 2 | /** |
| 3 | * General fields to be applied to all VC Elements |
| 4 | * |
| 5 | * |
| 6 | * @package Auxin |
| 7 | * @license LICENSE.txt |
| 8 | * @author averta |
| 9 | * @link http://phlox.pro/ |
| 10 | * @copyright (c) 2010-2020 averta |
| 11 | */ |
| 12 | |
| 13 | function auxin_add_vc_extra_fields_for_all( $master_array ){ |
| 14 | |
| 15 | foreach ( $master_array as $element_base => $element ) { |
| 16 | |
| 17 | if( isset( $element['is_vc'] ) && false !== auxin_is_true( $element['is_vc'] ) ){ |
| 18 | |
| 19 | $master_array[ $element_base ]['params'][] = array( |
| 20 | 'type' => 'dropdown', |
| 21 | 'heading' => __( 'Transition', 'auxin-elements' ), |
| 22 | 'description' => __( 'Choose the type of tranistion while the element enters in view.', 'auxin-elements' ), |
| 23 | 'param_name' => 'inview_transition', |
| 24 | 'class' => '', |
| 25 | 'group' => __( 'Animation', 'auxin-elements' ), |
| 26 | 'value' => array( |
| 27 | 'none' => __( 'None' , 'auxin-elements' ), |
| 28 | 'aux-invu-short-left' => __( 'Short from left' , 'auxin-elements' ), |
| 29 | 'aux-invu-short-right' => __( 'Short from right' , 'auxin-elements' ), |
| 30 | 'aux-invu-short-bottom' => __( 'Short from bottom', 'auxin-elements' ), |
| 31 | 'aux-invu-short-top' => __( 'Short from top' , 'auxin-elements' ), |
| 32 | 'aux-invu-medium-left' => __( 'Medium from left' , 'auxin-elements' ), |
| 33 | 'aux-invu-medium-right' => __( 'Medium from right' , 'auxin-elements' ), |
| 34 | 'aux-invu-medium-bottom' => __( 'Medium from bottom', 'auxin-elements' ), |
| 35 | 'aux-invu-medium-top' => __( 'Medium from top' , 'auxin-elements' ), |
| 36 | 'aux-invu-long-left' => __( 'Long from left' , 'auxin-elements' ), |
| 37 | 'aux-invu-long-right' => __( 'Long from right' , 'auxin-elements' ), |
| 38 | 'aux-invu-long-bottom' => __( 'Long from bottom', 'auxin-elements' ), |
| 39 | 'aux-invu-long-top' => __( 'Long from top' , 'auxin-elements' ), |
| 40 | 'aux-invu-scale-down-small' => __( 'Small scale down' , 'auxin-elements' ), |
| 41 | 'aux-invu-scale-down-medium' => __( 'Medium scale down' , 'auxin-elements' ), |
| 42 | 'aux-invu-scale-down-large' => __( 'Large scale down', 'auxin-elements' ), |
| 43 | 'aux-invu-scale-up-small' => __( 'Small scale up' , 'auxin-elements' ), |
| 44 | 'aux-invu-scale-up-medium' => __( 'Medium scale up' , 'auxin-elements' ), |
| 45 | 'aux-invu-scale-up-large' => __( 'Large scale up', 'auxin-elements' ) |
| 46 | ) |
| 47 | ); |
| 48 | |
| 49 | $master_array[ $element_base ]['params'][] = array( |
| 50 | 'type' => 'textfield', |
| 51 | 'heading' => __( 'Duration', 'auxin-elements' ), |
| 52 | 'description' => __( 'The transition duration in milliseconds.', 'auxin-elements' ), |
| 53 | 'param_name' => 'inview_duration', |
| 54 | 'class' => '', |
| 55 | 'group' => __( 'Animation', 'auxin-elements' ), |
| 56 | 'value' => 600 |
| 57 | ); |
| 58 | |
| 59 | $master_array[ $element_base ]['params'][] = array( |
| 60 | 'type' => 'textfield', |
| 61 | 'heading' => __( 'Delay', 'auxin-elements' ), |
| 62 | 'description' => __( 'The delay before starting the animation in milliseconds.', 'auxin-elements' ), |
| 63 | 'param_name' => 'inview_delay', |
| 64 | 'group' => __( 'Animation', 'auxin-elements' ) |
| 65 | ); |
| 66 | |
| 67 | $master_array[ $element_base ]['params'][] = array( |
| 68 | 'type' => 'dropdown', |
| 69 | 'heading' => __( 'Repeat', 'auxin-elements' ), |
| 70 | 'description' => __( 'Choose "yes" to repeat the animation, or choose "no" to display the animation only once.', 'auxin-elements' ), |
| 71 | 'param_name' => 'inview_repeat', |
| 72 | 'group' => __( 'Animation', 'auxin-elements' ), |
| 73 | 'value' => array( |
| 74 | 'no' => __( 'No' , 'auxin-elements' ), |
| 75 | 'yes' => __( 'Yes', 'auxin-elements' ) |
| 76 | ), |
| 77 | 'def_value' => 'no' |
| 78 | ); |
| 79 | |
| 80 | $master_array[ $element_base ]['params'][] = array( |
| 81 | 'type' => 'textfield', |
| 82 | 'heading' => __( 'Offset', 'auxin-elements' ), |
| 83 | 'description' => __( 'The vertical offset in pixels in order to start playing the animation.', 'auxin-elements' ), |
| 84 | 'param_name' => 'inview_offset', |
| 85 | 'group' => __( 'Animation', 'auxin-elements' ) |
| 86 | ); |
| 87 | |
| 88 | } |
| 89 | |
| 90 | } |
| 91 | |
| 92 | return $master_array; |
| 93 | } |
| 94 | |
| 95 | add_filter( 'auxin_master_array_shortcodes', 'auxin_add_vc_extra_fields_for_all', 110, 1 ); |
| 96 | |
| 97 |