/
var
/
www
/
barefootlaw.org
/
wp-content
/
themes
/
barefoot
/
inc
/
vc
/
Upload File
HOME
<?php /** * Override Visual Composer Elements * * @package Aisconverse * @subpackage Covercase * @since Covercase 1.0 */ if ( ! function_exists( 'covercase_vc_lean_map_init' ) ) { /** * VC first init hook in WP * * @since Covercase 1.0 */ function covercase_vc_lean_map_init() { // Override default shortcodes if ( function_exists( 'vc_lean_map' ) ) { vc_lean_map( 'vc_gmaps', 'covercase_vc_gmaps_map', null ); vc_lean_map( 'contact-form-7', 'covercase_vc_cf7', null ); } } add_action( 'init', 'covercase_vc_lean_map_init' ); } if ( ! function_exists( 'covercase_vc_cf7' ) ) { /** * Override VC Contact Form 7 Element * * @since Covercase 1.0 */ function covercase_vc_cf7( $tag ) { $cf7 = get_posts( 'post_type="wpcf7_contact_form"&numberposts=-1' ); $contact_forms = array(); if ( $cf7 ) { foreach ( $cf7 as $cform ) { $contact_forms[ $cform->post_title ] = $cform->ID; } } else { $contact_forms[ __( 'No contact forms found', 'covercase' ) ] = 0; } return array( 'base' => $tag, 'name' => __( 'Contact Form 7', 'covercase' ), 'icon' => 'icon-wpb-contactform7', 'category' => __( 'Content', 'covercase' ), 'description' => __( 'Place Contact Form7', 'covercase' ), 'params' => array( array( 'type' => 'dropdown', 'heading' => __( 'Contact form', 'covercase' ), 'param_name' => 'id', 'value' => $contact_forms, 'admin_label' => true, 'description' => __( 'Choose previously created contact form from the drop down list.', 'covercase' ), ), array( 'type' => 'dropdown', 'heading' => __( 'Form style', 'covercase' ), 'description' => __( 'Sets the style for the form and its elements.', 'covercase' ), 'param_name' => 'form_style', 'admin_label' => true, 'value' => array( __( 'Light', 'covercase' ) => 'wpcf7-form-light', __( 'Dark', 'covercase' ) => 'wpcf7-form-dark', ) ), array( 'type' => 'dropdown', 'heading' => __( 'Button style', 'covercase' ), 'description' => __( 'Sets the style for the submit button.', 'covercase' ), 'param_name' => 'submit_style', 'admin_label' => true, 'value' => array( __( 'Default', 'covercase' ) => 'wpcf7-submit-default', __( 'Default Inverse', 'covercase' ) => 'wpcf7-submit-default default-inversed', __( 'Primary', 'covercase' ) => 'wpcf7-submit-primary', __( 'Success', 'covercase' ) => 'wpcf7-submit-success', __( 'Info', 'covercase' ) => 'wpcf7-submit-info', __( 'Warning', 'covercase' ) => 'wpcf7-submit-warning', __( 'Danger', 'covercase' ) => 'wpcf7-submit-danger', ) ), array( 'type' => 'dropdown', 'heading' => __( 'Button align', 'covercase' ), 'description' => __( 'Sets the submit button alignment.', 'covercase' ), 'param_name' => 'submit_align', 'admin_label' => true, 'value' => array( __( 'Left', 'covercase' ) => 'wpcf7-submit-left', __( 'Center', 'covercase' ) => 'wpcf7-submit-center', __( 'Right', 'covercase' ) => 'wpcf7-submit-right' ) ), array( 'type' => 'textfield', 'heading' => __( 'Search title', 'covercase' ), 'param_name' => 'title', 'admin_label' => true, 'description' => __( 'Enter optional title to search if no ID selected or cannot find by ID.', 'covercase' ), ) ), ); } } if ( ! function_exists( 'covercase_vc_gmaps_map' ) ) { /** * Override VC Google Map Element * * @since Covercase 1.0 */ function covercase_vc_gmaps_map() { return array( 'name' => __( 'Google Maps', 'covercase' ), 'base' => 'vc_gmaps', 'icon' => 'icon-wpb-map-pin', 'category' => __( 'Content', 'covercase' ), 'description' => __( 'Map block', 'covercase' ), 'params' => array( array( 'type' => 'dropdown', 'heading' => __( 'Embed Map?', 'covercase' ), 'description' => __( 'Choose embed map or not.', 'covercase' ), 'param_name' => 'embed_map', 'value' => array( __( 'Yes', 'covercase' ) => 'yes', __( 'No', 'covercase' ) => 'no', ), ), array( 'type' => 'textarea_safe', 'heading' => __( 'Map embed iframe', 'covercase' ), 'param_name' => 'link', 'value' => sprintf( '<%1$s src="%2$s" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></%1$s>', 'iframe', '//www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d6304.829986131271!2d-122.4746968033092!3d37.80374752160443!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x808586e6302615a1%3A0x86bd130251757c00!2sStorey+Ave%2C+San+Francisco%2C+CA+94129!5e0!3m2!1sen!2sus!4v1435826432051' ), 'description' => sprintf( __( 'Visit %s to create your map (Step by step: 1) Find location 2) Click the cog symbol in the lower right corner and select "Share or embed map" 3) On modal window select "Embed map" 4) Copy iframe code and paste it).', 'covercase' ), '<a href="//www.google.com/maps" target="_blank">' . __( 'Google maps', 'covercase' ) . '</a>' ), 'dependency' => array( 'element' => 'embed_map', 'value' => 'yes' ) ), array( 'type' => 'param_group', 'heading' => __( 'Markers', 'covercase' ), 'param_name' => 'markers', 'description' => __( 'Enter the coordinates and other options for each Google Map marker.', 'covercase' ), 'value' => urlencode( json_encode( array( array( 'latitude' => '51.513447', 'longitude' => '-0.1159143', 'marker_color' => '#2884d7' ) ) ) ), 'params' => array( array( 'type' => 'textfield', 'heading' => __( 'Latitude', 'covercase' ), 'param_name' => 'latitude', 'description' => __( 'Set map center point latitude. Creates google map with custom parameters. You can get latitude and longitude here <a href="//www.latlong.net/" target="_blank" title="LatLong">http://www.latlong.net/</a>', 'covercase' ), 'admin_label' => true ), array( 'type' => 'textfield', 'heading' => __( 'Longitude', 'covercase' ), 'param_name' => 'longitude', 'description' => __( 'Set map center point longitude.', 'covercase' ), 'admin_label' => true ), array( 'type' => 'colorpicker', 'heading' => __( 'Color', 'covercase' ), 'param_name' => 'marker_color', 'description' => __( 'Sets the marker color.', 'covercase' ), 'admin_label' => true, ), array( 'type' => 'checkbox', 'heading' => __( 'Enable info box?', 'covercase' ), 'param_name' => 'infobox', 'description' => __( 'Sets the info box for the marker.', 'covercase' ) ), array( 'type' => 'textfield', 'heading' => __( 'Title', 'covercase' ), 'param_name' => 'infobox_title', 'description' => __( 'Sets the title for info box.', 'covercase' ), 'dependency' => array( 'element' => 'infobox', 'value' => 'true' ), ), array( 'type' => 'attach_image', 'heading' => __( 'Image', 'covercase' ), 'param_name' => 'infobox_img', 'description' => __( 'Sets the image for the info box.', 'covercase' ), 'dependency' => array( 'element' => 'infobox', 'value' => 'true' ), ), array( 'type' => 'textarea', 'heading' => __( 'Text', 'covercase' ), 'param_name' => 'infobox_content', 'value' => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', 'covercase' ), 'dependency' => array( 'element' => 'infobox', 'value' => 'true' ), ), array( 'type' => 'dropdown', 'heading' => __( 'Position on large devices', 'covercase' ), 'param_name' => 'infobox_lg', 'value' => array( __( 'Left & Top', 'covercase' ) => 'left_top', __( 'Left & Center', 'covercase' ) => 'left_center', __( 'Left & Bottom', 'covercase' ) => 'left_bottom', __( 'Center & Top', 'covercase' ) => 'center_top', __( 'Center & Center', 'covercase' ) => 'center_center', __( 'Center & Bottom', 'covercase' ) => 'center_bottom', __( 'Right & Top', 'covercase' ) => 'right_top', __( 'Right & Center', 'covercase' ) => 'right_center', __( 'Right & Bottom', 'covercase' ) => 'right_bottom' ), 'description' => __( 'Sets the info box position on large screens.', 'covercase' ), 'std' => 'left_top', 'dependency' => array( 'element' => 'infobox', 'value' => 'true' ), ), array( 'type' => 'checkbox', 'heading' => __( 'Visible on large devices', 'covercase' ), 'param_name' => 'infobox_show_lg', 'dependency' => array( 'element' => 'infobox', 'value' => 'true' ) ), array( 'type' => 'dropdown', 'heading' => __( 'Position on medium devices', 'covercase' ), 'param_name' => 'infobox_md', 'value' => array( __( 'Left & Top', 'covercase' ) => 'left_top', __( 'Left & Center', 'covercase' ) => 'left_center', __( 'Left & Bottom', 'covercase' ) => 'left_bottom', __( 'Center & Top', 'covercase' ) => 'center_top', __( 'Center & Center', 'covercase' ) => 'center_center', __( 'Center & Bottom', 'covercase' ) => 'center_bottom', __( 'Right & Top', 'covercase' ) => 'right_top', __( 'Right & Center', 'covercase' ) => 'right_center', __( 'Right & Bottom', 'covercase' ) => 'right_bottom' ), 'description' => __( 'Sets the info box position on medium screens.', 'covercase' ), 'std' => 'left_top', 'dependency' => array( 'element' => 'infobox', 'value' => 'true' ), ), array( 'type' => 'checkbox', 'heading' => __( 'Visible on medium devices', 'covercase' ), 'param_name' => 'infobox_show_md', 'dependency' => array( 'element' => 'infobox', 'value' => 'true' ) ), array( 'type' => 'dropdown', 'heading' => __( 'Position on small devices', 'covercase' ), 'param_name' => 'infobox_sm', 'value' => array( __( 'Left & Top', 'covercase' ) => 'left_top', __( 'Left & Center', 'covercase' ) => 'left_center', __( 'Left & Bottom', 'covercase' ) => 'left_bottom', __( 'Center & Top', 'covercase' ) => 'center_top', __( 'Center & Center', 'covercase' ) => 'center_center', __( 'Center & Bottom', 'covercase' ) => 'center_bottom', __( 'Right & Top', 'covercase' ) => 'right_top', __( 'Right & Center', 'covercase' ) => 'right_center', __( 'Right & Bottom', 'covercase' ) => 'right_bottom' ), 'description' => __( 'Sets the info box position on small screens.', 'covercase' ), 'std' => 'left_top', 'dependency' => array( 'element' => 'infobox', 'value' => 'true' ), ), array( 'type' => 'checkbox', 'heading' => __( 'Visible on small devices', 'covercase' ), 'param_name' => 'infobox_show_sm', 'dependency' => array( 'element' => 'infobox', 'value' => 'true' ) ), array( 'type' => 'dropdown', 'heading' => __( 'Position on extra small devices', 'covercase' ), 'param_name' => 'infobox_xs', 'value' => array( __( 'Left & Top', 'covercase' ) => 'left_top', __( 'Left & Center', 'covercase' ) => 'left_center', __( 'Left & Bottom', 'covercase' ) => 'left_bottom', __( 'Center & Top', 'covercase' ) => 'center_top', __( 'Center & Center', 'covercase' ) => 'center_center', __( 'Center & Bottom', 'covercase' ) => 'center_bottom', __( 'Right & Top', 'covercase' ) => 'right_top', __( 'Right & Center', 'covercase' ) => 'right_center', __( 'Right & Bottom', 'covercase' ) => 'right_bottom' ), 'description' => __( 'Sets the info box position on extra small screens.', 'covercase' ), 'std' => 'left_top', 'dependency' => array( 'element' => 'infobox', 'value' => 'true' ), ), array( 'type' => 'checkbox', 'heading' => __( 'Visible on extra small devices', 'covercase' ), 'param_name' => 'infobox_show_xs', 'dependency' => array( 'element' => 'infobox', 'value' => 'true' ) ), array( 'type' => 'dropdown', 'heading' => __( 'Container', 'covercase' ), 'description' => __( 'Sets the size of the container for the info box.', 'covercase' ), 'param_name' => 'infobox_container', 'value' => array( __( 'Boxed', 'covercase' ) => 'container', __( 'Full width', 'covercase' ) => 'container-fluid' ), ), ), 'dependency' => array( 'element' => 'embed_map', 'value' => 'no' ) ), array( 'type' => 'checkbox', 'heading' => __( 'Map center', 'covercase' ), 'param_name' => 'map_center', 'description' => __( 'Sets the center position of the map. The coordinates of the last marker are used by default.', 'covercase' ), 'dependency' => array( 'element' => 'embed_map', 'value' => 'no' ) ), array( 'type' => 'textfield', 'heading' => __( 'Latitude', 'covercase' ), 'param_name' => 'center_latitude', 'description' => __( 'Set map center point latitude. Creates google map with custom parameters. You can get latitude and longitude here <a href="//www.latlong.net/" target="_blank" title="LatLong">http://www.latlong.net/</a>', 'covercase' ), 'dependency' => array( 'element' => 'map_center', 'value' => 'true' ) ), array( 'type' => 'textfield', 'heading' => __( 'Longitude', 'covercase' ), 'param_name' => 'center_longitude', 'description' => __( 'Set map center point longitude.', 'covercase' ), 'dependency' => array( 'element' => 'map_center', 'value' => 'true' ) ), array( 'type' => 'checkbox', 'heading' => __( 'Control the marker position?', 'covercase' ), 'param_name' => 'marker_position', 'description' => __( 'Marker positions (in px) on different screen sizes.', 'covercase' ), 'dependency' => array( 'element' => 'embed_map', 'value' => 'no' ) ), array( 'type' => 'textfield', 'heading' => __( 'Title', 'covercase' ), 'param_name' => 'title', 'description' => __( 'Enter text used as widget title (Note: located above content element).', 'covercase' ), 'group' => __( 'Map settings', 'covercase' ) ), array( 'type' => 'textfield', 'heading' => __( 'Zoom', 'covercase' ), 'param_name' => 'zoom', 'description' => __( 'Use zoom value from 0 to 19.', 'covercase' ), 'dependency' => array( 'element' => 'embed_map', 'value' => 'no' ), 'group' => __( 'Map settings', 'covercase' ) ), array( 'type' => 'textfield', 'heading' => __( 'Map height', 'covercase' ), 'param_name' => 'size', 'value' => 'standard', 'admin_label' => true, 'description' => __( 'Enter map height (in pixels or leave empty for responsive map).', 'covercase' ), 'group' => __( 'Map settings', 'covercase' ) ), array( 'type' => 'dropdown', 'heading' => __( 'Style', 'covercase' ), 'description' => __( 'Choose the map style.', 'covercase' ), 'param_name' => 'style', 'value' => array( __( 'Default', 'covercase' ) => 'default', __( 'Shades of Grey', 'covercase' ) => 'shades_gray', __( 'Ultra Light with Labels', 'covercase' ) => 'ultra_light_labels', __( 'Pastel Tones', 'covercase' ) => 'pastel_tones' ), 'dependency' => array( 'element' => 'embed_map', 'value' => 'no' ), 'group' => __( 'Map settings', 'covercase' ) ), array( 'type' => 'checkbox', 'heading' => __( 'Full screen controls', 'covercase' ), 'description' => __( 'Enable map full screen controlls.', 'covercase' ), 'param_name' => 'full_screen', 'dependency' => array( 'element' => 'embed_map', 'value' => 'no' ), 'group' => __( 'Map settings', 'covercase' ) ), array( 'type' => 'textfield', 'value' => '0', 'heading' => __( 'Horizontal offset on large devices', 'covercase' ), 'param_name' => 'lg_horizontal_offset', 'dependency' => array( 'element' => 'marker_position', 'value' => 'true' ), 'group' => __( 'Marker position', 'covercase' ), 'description' => __( 'All values are set in pixels (negative/positive values in a rectangular coordinate system). 0 - default value at which the marker is centered strictly on the map.', 'covercase' ) ), array( 'type' => 'textfield', 'value' => '0', 'heading' => __( 'Vertical offset on large devices', 'covercase' ), 'param_name' => 'lg_vertical_offset', 'dependency' => array( 'element' => 'marker_position', 'value' => 'true' ), 'group' => __( 'Marker position', 'covercase' ) ), array( 'type' => 'textfield', 'value' => '0', //'heading' => __( 'Left/Right offset on medium devices', 'covercase' ), 'param_name' => 'md_horizontal_offset', 'heading' => __( 'Horizontal offset on medium devices', 'covercase' ), 'dependency' => array( 'element' => 'marker_position', 'value' => 'true' ), 'group' => __( 'Marker position', 'covercase' ) ), array( 'type' => 'textfield', 'value' => '0', 'heading' => __( 'Vertical offset on medium devices', 'covercase' ), 'param_name' => 'md_vertical_offset', 'dependency' => array( 'element' => 'marker_position', 'value' => 'true' ), 'group' => __( 'Marker position', 'covercase' ) ), array( 'type' => 'textfield', 'value' => '0', //'heading' => __( 'Left/Right offset on medium devices', 'covercase' ), 'param_name' => 'sm_horizontal_offset', 'heading' => __( 'Horizontal offset on small devices', 'covercase' ), 'dependency' => array( 'element' => 'marker_position', 'value' => 'true' ), 'group' => __( 'Marker position', 'covercase' ) ), array( 'type' => 'textfield', 'value' => '0', 'heading' => __( 'Vertical offset on small devices', 'covercase' ), 'param_name' => 'sm_vertical_offset', 'dependency' => array( 'element' => 'marker_position', 'value' => 'true' ), 'group' => __( 'Marker position', 'covercase' ) ), array( 'type' => 'textfield', 'value' => '0', 'heading' => __( 'Horizontal offset on extra small devices', 'covercase' ), 'param_name' => 'xs_horizontal_offset', 'dependency' => array( 'element' => 'marker_position', 'value' => 'true' ), 'group' => __( 'Marker position', 'covercase' ) ), array( 'type' => 'textfield', 'value' => '0', 'heading' => __( 'Vertical offset on extra small devices', 'covercase' ), 'param_name' => 'xs_vertical_offset', 'dependency' => array( 'element' => 'marker_position', 'value' => 'true' ), 'group' => __( 'Marker position', 'covercase' ) ), array( 'type' => 'animation_style', 'heading' => __( 'CSS Animation', 'covercase' ), 'param_name' => 'css_animation', 'admin_label' => true, 'value' => '', 'settings' => array( 'type' => 'in', 'custom' => array( array( 'label' => __( 'Default', 'covercase' ), 'values' => array( __( 'Top to bottom', 'covercase' ) => 'top-to-bottom', __( 'Bottom to top', 'covercase' ) => 'bottom-to-top', __( 'Left to right', 'covercase' ) => 'left-to-right', __( 'Right to left', 'covercase' ) => 'right-to-left', __( 'Appear from center', 'covercase' ) => 'appear', ), ), ), ), 'description' => __( 'Select type of animation for element to be animated when it "enters" the browsers viewport (Note: works only in modern browsers).', 'covercase' ), 'group' => __( 'Map settings', 'covercase' ), 'dependency' => array( 'element' => 'embed_map', 'value' => 'yes' ), ), array( 'type' => 'el_id', 'heading' => __( 'Element ID', 'covercase' ), 'param_name' => 'el_id', 'description' => sprintf( __( 'Enter element ID (Note: make sure it is unique and valid according to <a href="%s" target="_blank">w3c specification</a>).', 'covercase' ), 'http://www.w3schools.com/tags/att_global_id.asp' ), 'group' => __( 'Map settings', 'covercase' ) ), array( 'type' => 'textfield', 'heading' => __( 'Extra class name', 'covercase' ), 'param_name' => 'el_class', 'description' => __( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'covercase' ), 'group' => __( 'Map settings', 'covercase' ) ), array( 'type' => 'css_editor', 'heading' => __( 'CSS box', 'covercase' ), 'param_name' => 'css', 'group' => __( 'Design Options', 'covercase' ), ), ), ); } }