| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?php
- /*------------------------------------------------------*/
- /* taskereasy Testimonials
- /*------------------------------------------------------*/
- vc_map(array(
- "name" => esc_html__("Call to Action", 'taskereasy'),
- "base" => "taskereasy_cta",
- 'icon' => get_template_directory_uri() . '/assets/images/favicon-icon/shortcode-icon.png',
- "class" => "",
- "description" => esc_html__("Add taskereasy CTA", 'taskereasy'),
- "category" => esc_html__('Taskereasy Shortcodes', 'taskereasy'),
- "params" => array(
- array(
- "type" => "textfield",
- "heading" => esc_html__("Title", 'taskereasy'),
- "param_name" => "title",
- ),
- array(
- "type" => "checkbox",
- "heading" => esc_html__("Add Link", 'taskereasy'),
- "param_name" => "show_link",
- ),
- array(
- 'type' => 'vc_link',
- 'heading' => esc_html__( 'Link', 'taskereasy' ),
- 'param_name' => 'btn_link',
- "dependency" => array(
- "element" => "show_link",
- "value" => "true"
- )
- ),
- /***************************design option tab*******************/
- array(
- 'type' => 'css_editor',
- 'heading' => esc_html__( 'CSS', 'taskereasy' ),
- 'param_name' => 'custom_design',
- 'group' => esc_html__( 'Design options', 'taskereasy' ),
- )
- )
- ));
- add_shortcode( 'taskereasy_cta', function($atts, $content = null) {
- extract(shortcode_atts(array(
- 'title' => '',
- 'btn_link' => '',
- 'custom_design' => '',
- ), $atts));
- $custom_design = vc_shortcode_custom_css_class( $custom_design, ' ' );
- $output = '';
- $title_text = html_entity_decode(vc_value_from_safe($title, true));
- $btnlink = vc_build_link( $btn_link );
- $btn_link = $btnlink['url'];
- $btn_title = $btnlink['title'];
- $btn_target = $btnlink['target'];
- $output .=
- '<section class="banner4-wrapper-inner '.$custom_design.'">
- <h2>'.$title_text.'</h2>
- <p><a href="'.esc_url($btn_link).'" target="'.esc_attr($btn_target).'">'.esc_html($btn_title).'</a></p>
- </section>';
- return $output;
- });
|