| Server IP : 141.193.213.10 / Your IP : 216.73.216.101 Web Server : nginx System : Linux pod-400555 6.8.0-1055-gke #61-Ubuntu SMP Tue May 26 22:57:42 UTC 2026 x86_64 User : fpm200079 ( 200079) PHP Version : 8.2.36 Disable Function : apache_child_terminate,apache_get_modules,apache_get_version,apache_getenv,apache_note,apache_setenv,disk_free_space,disk_total_space,diskfreespace,dl,exec,fastcgi_finish_request,link,opcache_compile_file,opcache_get_configuration,opcache_invalidate,opcache_is_script_cached,opcache_reset,passthru,pclose,pcntl_exec,popen,posix_getpid,posix_getppid,posix_getpwuid,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,realpath_cache_get,shell_exec,show_source,symlink,system MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /nas/content/live/bartislaw/wp-content/themes/spk/lib/ |
Upload File : |
<?php
/**
* Visual Composer functions
*
* @package Spk Builder
* @author Team Spk
* @link https://www.speakeasymarketinginc.com/
*
*/
/* ---------------------------------------------------------------------------
* Banner Section
* --------------------------------------------------------------------------- */
if (!function_exists('banner_section')) {
function banner_section($attr, $content = null) {
extract(shortcode_atts(array(
'banner_text_hd' => '',
'banner_text_hd2' => '',
'banner_text_hd3' => '',
'image' => '',
'link_title' => '',
'link' => '',
'link_title_cta' => '',
'link_cta' => '',
'youtube_id' => "",
'attorney' => '',
'text_image' => '',
'attorney_link' => '',
'attorney2' => '',
'attorney_link2' => '',
'style' => 'one',
'color' => '',
), $attr));
$slider1_img = lb_vc_image($image, false);
$attorney_img = lb_vc_image($attorney, true);
$text_img = lb_vc_image($text_image, true);
// classes
$output = '<div class="banner_section ">';
$alt = lb_get_attachment_data($image, 'alt');
$alt2 = lb_get_attachment_data($attorney, 'alt');
$alt3 = lb_get_attachment_data($text_image, 'alt');
$output .= '<div class="banner_left ">';
$output .= '<img class="animate-plus" src="' . $text_img . '" alt="' . $alt3 . '" />';
$output .= '<h2 class="banner_text text-center mt-0">' . $banner_text_hd2 . '</h2>';
$output .= '<h4 class="banner_text text-center mt-0 ">' . $banner_text_hd3 . '</h4>';
if ($link) {
$output .= '<div class="button-div">';
$output .= '<a href="' . $link . '" class="btnall BtnHover1 hvr-sweep-to-right banner-btn d-block m-auto" ' . $target . '>' . $link_title . '</a>';
$output .= '</div>';
}
$output .= '</div>';
if ($attorney) {
$attorney_alt = lb_get_attachment_data($attorney, 'alt');
$output .= '<div class="banner_right d-none d-sm-none d-md-none d-lg-block">';
$output .= '<a href="' . $attorney_link . '"><img class="animate-plus" src="' . $attorney_img . '" alt="' . $alt2 . '" /></a>';
$output .= '</div>';
}
$output .= '</div>' . "\n";
return $output;
}
}
add_shortcode('banner_section', 'banner_section');
/* ---------------------------------------------------------------------------
* Icon Box [Contact Home Section] [/lb_icon_box]
* --------------------------------------------------------------------------- */
if (!function_exists('lb_icon_box_callback')) {
function lb_icon_box_callback($attr, $content = null) {
extract(shortcode_atts(array(
'title' => '',
'sub_title' => '',
'icon' => 'fa fa-envelope-o',
'icon_style' => 'ib_round',
'icon_background' => '#000',
'button' => '',
'link' => '',
'color' => '',
'style' => 'one', 'text_color' => '',
), $attr));
$image = lb_vc_image($image);
$brd_class = '';
$output = '<div class="home_section" id="style-ib-' . $style . '" >';
$output .= '<div class="container">';
$output .= '<div class="middle_div mt-2">';
if ($title) {
$output .= '<h6 class="text-center m-0 mt-2">' . $title . '</h6>';
} if ($sub_title) {
$output .= '<h2 class="text-center m-0 mt-1">' . $sub_title . '</h2>';
}
$output .= '</div>';
if ($link) {
$output .= '<div class="call_div mt-md-3 mt-2 text-center">';
$output .= '<a class="btnall BtnHover1 call_btn hvr-sweep-to-left" href="' . $link . '">' . $button . '</a>';
$output .= '</div>';
}
$output .= '</div>';
$output .= '</div>';
return $output;
}
}
add_shortcode('lb_icon_box', 'lb_icon_box_callback');
/* ---------------------------------------------------------------------------
* Testimonials [lb_testimonials] [/lb_testimonials]
* --------------------------------------------------------------------------- */
if (!function_exists('lb_testimonials_callback')) {
function lb_testimonials_callback($attr, $content = null) {
extract(shortcode_atts(array(
'testimonial_hd' => "",
'button_link' => "",
'count' => '',
'category_multi' => '',
'style' => 'one', 'text_color' => '',
), $attr));
$args = array(
'posts_per_page' => intval($count),
'post_type' => 'testimonials',
'post_status' => 'publish',
'orderby' => 'menu_order',
'order' => 'ASC',
);
// private
if (is_user_logged_in()) {
$args['post_status'] = array('publish', 'private');
}
// categories
if ($category_multi) {
$args['category_name'] = trim($category_multi);
}
$query_blog = new WP_Query($args);
$output = '<div class="' . $text_color . ' " id="testimonial_div">';
$output .= '<div class="container">';
if ($testimonial_hd) {
$output .= '<h2 class="brd_inline text-center mt-0 mb-4">' . $testimonial_hd . '</h2>';
}
while ($query_blog->have_posts()) {
$query_blog->the_post();
if (get_post_meta(get_the_ID(), 'spk_testi_home', true)) {
$output .= '<div class="item">';
$output .= '<div class="ts_text_wrap text-center">';
$output .= get_post_meta(get_the_ID(), 'spk_testi_home_text', true);
$output .= '</div>';
$output .= '<div class="ts_title text-center my-2">' . get_the_title() . '</div>';
$output .= '</div>';
}
}
wp_reset_postdata();
$output .= '<div class="text-center mt-2">';
$output .= '<a class="btnall BtnHover2 read_btn3 hvr-sweep-to-bottom" href=' . $button_link . '>Read More</a>';
$output .= '</div>';
$output .= '</div>';
$output .= '</div>' . "\n";
return $output;
}
}
add_shortcode('lb_testimonials', 'lb_testimonials_callback');
/* ---------------------------------------------------------------------------
* Testimonials [lb_testimonials] [/lb_testimonials]
* --------------------------------------------------------------------------- */
if (!function_exists('lb_testimonials_inner')) {
function lb_testimonials_inner($attr, $content = null) {
extract(shortcode_atts(array(
'visible_items' => "1",
'Testimonial_hd' => "",
'speed' => "5000",
'count' => 3,
'category_multi' => '',
'style' => 'one', 'text_color' => '',
), $attr));
$args = array(
'posts_per_page' => intval($count),
'post_type' => 'testimonials',
'post_status' => 'publish',
'orderby' => 'menu_order',
'order' => 'ASC',
);
// private
if (is_user_logged_in()) {
$args['post_status'] = array('publish', 'private');
}
// categories
if ($category_multi) {
$args['category_name'] = trim($category_multi);
}
$query_blog = new WP_Query($args);
while ($query_blog->have_posts()) {
$query_blog->the_post();
if ($style == 'one') {
$output .= '<div class="spk-testimonial-wrap rounded mb-3 py-3 px-3">';
if (get_theme_mod('theme_other_page_testimonial_box_show')):
require_once TEMPLATEPATH . '/includes/files/testimonial-form-code.php';
endif;
$output .= '<div class="clearfix"></div>';
$output .= get_the_content();
$output .= '<strong class="text-right d-block">' . get_the_title() . '</strong>';
$output .= '</div>';
}
}
wp_reset_postdata();
return $output;
}
}
add_shortcode('lb_testimonials_inn', 'lb_testimonials_inner');
/* ---------------------------------------------------------------------------
* Practice Area Slider [lb_praslider] [/lb_praslider]
* --------------------------------------------------------------------------- */
if (!function_exists('lb_practice_area_icon')) {
function lb_practice_area_icon($attr, $content = null) {
extract(shortcode_atts(array(
'visible_items' => "10",
'practice_hd' => '',
'style' => 'one',
'text_color' => '',
), $attr));
$args = array(
'posts_per_page' => intval(10),
'post_type' => 'practice',
'post_status' => 'publish',
'orderby' => 'date',
'order' => 'DESC',
);
// private
if (is_user_logged_in()) {
$args['post_status'] = array('publish', 'private');
}
$query_blog = new WP_Query($args);
$output = '<div class="social_link text-center p-0 mt-1">';
$output .= '<h2 class="text-center m-0 mb-4 brd_inline">' . $practice_hd . '</h2>';
$output .= '<div class="practice_icon owl-carousel owl-theme" data-items="' . $visible_items . '" data-speed="' . $speed . '">';
while ($query_blog->have_posts()) {
$query_blog->the_post();
if ($style == 'one') {
$output .= '<a href="' . get_post_meta(get_the_ID(), 'spk_pratice_link', true) . '">';
$output .= '<div class="item">';
$output .= '<div class="inner_practice">';
$output .= '<img class="active_images" alt =' . urlencode(get_the_title()) . ' src=' . lb_vc_image(get_post_meta(get_the_ID(), 'spk_home_practice_img', true), true) . '>';
$output .= '<img class="hover_images" alt =' . urlencode(get_the_title()) . ' src=' . lb_vc_image(get_post_meta(get_the_ID(), 'spk_home_practiceh_img', true), true) . '>';
$output .= '<p class="py-3">' . get_the_title() . '</p>';
$output .= '</div>';
$output .= '</div>';
$output .= '</a>';
}
}
wp_reset_postdata();
$output .= '</div>';
$output .= '</div>' . "\n";
return $output;
}
}
add_shortcode('lb_practice_area_icon', 'lb_practice_area_icon');
/* ---------------------------------------------------------------------------
* Accolades [Accolades] [/Accolades]
* --------------------------------------------------------------------------- */
if (!function_exists('lb_accolades')) {
function lb_accolades($attr, $content = null) {
extract(shortcode_atts(array(
'achd' => "",
'visible_items' => "",
'style' => 'one', 'text_color' => '',
), $attr));
$args = array(
'posts_per_page' => intval($count),
'post_type' => 'accolades',
'post_status' => 'publish',
'orderby' => 'menu_order',
'order' => 'ASC',
);
// private
if (is_user_logged_in()) {
$args['post_status'] = array('publish', 'private');
}
$query_blog = new WP_Query($args);
$output = '<div class="accolades_div">';
$output .= '<div class="">';
if ($achd) {
$output .= '<h2 class="text-center mt-0 mb-3">' . $achd . '</h2>';
}
$output .= '<div id="accolades" class="accolades owl-carousel owl-theme" data-items="' . $visible_items . '" data-speed="' . $speed . '">';
while ($query_blog->have_posts()) {
$query_blog->the_post();
$imgID = get_post_thumbnail_id($post->ID);
$img = lb_vc_image(wp_get_attachment_image_src($imgID, 'full', false, ''));
$output .= '<a href="' . get_post_meta(get_the_ID(), 'spk_accolades_link', true) . '" target="_blank">';
$output .= '<div class="item">';
$output .= '<img src="' . $img[0] . '" alt="' . get_the_title() . '" />';
$output .= '</div>';
$output .= '</a>';
}
wp_reset_postdata();
$output .= '</div>';
$output .= '</div>';
$output .= '</div>' . "\n";
return $output;
}
}
add_shortcode('lb_accolades', 'lb_accolades');
/* ---------------------------------------------------------------------------
* Accolades [Youtube Short Code] [/Youtube Short Code]
* --------------------------------------------------------------------------- */
if (!function_exists('lb_youtube')) {
function lb_youtube($attr, $content = null) {
extract(shortcode_atts(array(
'youtube_hd' => "",
'youtube_id' => "",
'content_heading' => "",
'content_area' => "",
'content_btn' => "",
'style' => 'one', 'text_color' => '',
), $attr));
$output = '<div class="youtube_div">';
if ($youtube_hd) {
$output .= '<h2 class="text-center m-0 mb-3 brd_inline">' . $youtube_hd . '</h2>';
}
if ($youtube_id) {
$image = 'http://i.ytimg.com/vi/' . $youtube_id . '/hqdefault.jpg';
// $img_encoded = file_get_contents($image);
// $image = 'data:image/png' . $type . ';base64,' . base64_encode($img_encoded);
$output .= '<div class="youtube" id="' . $youtube_id . '" style="background-image:url(' . $image . ')">';
$output .= '</div> <div>' . do_shortcode('[BdForm type="1" mod="desk"]') . '</div>';
}
if ($content_heading) {
$output .= '<div class="home_content_right text-white">';
$output .= '<h3 class="text-center m-0 mb-3">' . $content_heading . '</h3>';
}
if ($content_area) {
$output .= '<p class="m-0 mb-3">' . $content_area . '</p>';
}
if ($content_btn) {
$output .= '<div class="text-center"><a class="btnall BtnHover2 read_btn hvr-sweep-to-bottom" href="' . $content_btn . '">Read More </a></div>';
$output .= '</div>';
}
$output .= '</div>' . "\n";
return $output;
}
}
add_shortcode('lb_youtube', 'lb_youtube');
/* ---------------------------------------------------------------------------
* Vimeo Code
* --------------------------------------------------------------------------- */
if (!function_exists('lb_vimeo')) {
function lb_vimeo($attr, $content = null) {
extract(shortcode_atts(array(
'vimeo_id_code' => ""
), $attr));
$output = '<div class="home_vimeo_div">';
if ($vimeo_hd) {
$output .= '<h2 class="text-center brd_inline m-0">' . $vimeo_hd . '</h2>';
}
$image = 'https://i.vimeocdn.com/video/' . $vimeo_id_code;
$imgid = $vimeo_id_code;
$data = json_decode(file_get_contents('http://vimeo.com/api/oembed.json?url=//player.vimeo.com/video/' . $vimeo_id_code));
$image = $data->thumbnail_url;
$img_encoded = file_get_contents($image);
$image_url = 'data:image/png' . $type . ';base64,' . base64_encode($img_encoded);
if ($vimeo_id_code) {
$output .= '<div class="vimeo_outer_section"><div class="vimeo_section vimeo" id="' . $vimeo_id_code . '" class="vimeo" style="background-image:url(' . $image_url . ');">';
$output .= '</div></div>';
}
$output .= '<div class="home_book">'.do_shortcode('[BdForm type="1" mod="desk"]').'</div>';
$output .= '</div>';
return $output;
}
}
add_shortcode('lb_vimeo', 'lb_vimeo');
/* ---------------------------------------------------------------------------
* Home page Map
* --------------------------------------------------------------------------- */
if (!function_exists('lb_map')) {
function lb_map($attr, $content = null) {
extract(shortcode_atts(array(
'static_map_link' => "",
'image' => "",
'map_iframe' => '', 'text_color' => '',
), $attr));
$image = lb_vc_image($image, true);
$output .= '<div id="my-fast-map" data-iframe-width="100%" data-iframe-height="430" data-iframe-src="' . $map_iframe . '">';
$output .= '<a title="Click to activate map"><img src="' . $image . '" alt="Click to activate map"></a>';
$output .= '</div>';
return $output;
}
}
add_shortcode('lb_map', 'lb_map');
/* ---------------------------------------------------------------------------
* Newsletter
* --------------------------------------------------------------------------- */
if (!function_exists('lb_newsletter')) {
function lb_newsletter($attr, $content = null) {
extract(shortcode_atts(array(
'heading' => '',
'text' => '', 'text_color' => '',
), $attr));
$output .= '<div id="news_letter" class="newsletter_div">';
$output .= '<h2 class="text-center m-0 ">' . $heading . '</h2>';
$output .= '<p class="text-center m-0 pb-1 px-md-2 px-sm-2">' . $text . '</p>';
$output .= '<div class="">' . do_shortcode('[newsletterForm]') . '</div>';
$output .= '</div>';
return $output;
}
}
add_shortcode('lb_newsletter', 'lb_newsletter');
/* ---------------------------------------------------------------------------
* Home Address
* --------------------------------------------------------------------------- */
if (!function_exists('lb_address')) {
function lb_address($attr, $content = null) {
extract(shortcode_atts(array(
'heading' => '',
'address1' => '',
'phone1' => '',
'fax1' => '',
'text_color' => '', 'style' => 'one',
), $attr));
// $map_image = lb_vc_image($map_image, true);
// $map_image2 = lb_vc_image($map_image2, true);
$output = '<div class="office_location">';
$output .= ' <h2 class = "m-0 text-center brd_inline">' . $heading . '</h2>';
if ($style == '1') {
$output .= '<div class="location-1 text-center">';
$output .= '<p class="mb-3 mt-4">' . $address1 . '</p>';
$output .= '<p class="phoneText m-0">Phone: ' . $phone1 . '</p>';
if ($fax1) {
$output .= '<p class="m-0 faxText">Fax: <span>' . $fax1 . '</span></p>';
}
$output .= '</div>';
} elseif ($style == '2') {
}
$output .= '</div>' . "\n";
return $output;
}
}
add_shortcode('lb_address', 'lb_address');
/* ---------------------------------------------------------------------------
* Contact Us Page
* --------------------------------------------------------------------------- */
if (!function_exists('lb_contactpage')) {
function lb_contactpage($attr, $content = null) {
extract(shortcode_atts(array(
'heading' => '',
'sub_heading' => '',
'office_hd' => '',
'office_hd2' => '',
'address1' => '',
'address2' => '',
'phone1' => '',
'phone2' => '',
'fax1' => '',
'phone_text' => '',
'cont_img' => "",
'map_image' => "",
'map_iframe' => '',
'map_image2' => "",
'map_iframe2' => '',
'text_color' => '', 'style' => 'one',
), $attr));
$map_image = lb_vc_image($map_image, true);
$map_image2 = lb_vc_image($map_image2, true);
$cont_img = lb_vc_image($cont_img, true);
if ($style == '1') {
$output .= '<div class="">' . do_shortcode('[cForm]') . '</div>';
$output .= '<div class="contact-us-page-map-box-wrap rounded p-3">';
$output .= '<div class="row">';
$output .= '<div class="col-lg-4 left text-center align-self-center" id="mapMarker">';
$output .= '<div class="address-hd mb-2"><b>' . $office_hd . '</b></div>';
$output .= '<p class="m-0 p-0">' . $address1 . '</p>';
$output .= '<p class="mt-2 mb-0 ml-0 mr-0 p-0"><b>Phone: ' . $phone1 . '</b></p>';
$output .= '<p class="mt-2 mb-0 ml-0 mr-0 p-0"><b>Fax: ' . $fax1 . '</b></p>';
// $output .='<p class="mt-2 mb-0 ml-0 mr-0 p-0">' . $phone_text . '</p>';
$output .= '</div>';
$output .= '<div class="col-lg-8 right mapMarker mt-3">';
$output .= '<div id="my-fast-map" data-iframe-width="100%" data-iframe-height="300" data-iframe-src="' . $map_iframe . '">';
$output .= '<a title="Click to activate map"><img src="' . $map_image . '" alt="Click to activate map"></a>';
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';
} elseif ($style == '2') {
$output .= '<div class="">' . do_shortcode('[cForm]') . '</div>';
$output .= '<div class="contact-us-page-map-box-wrap rounded p-3 mt-3">';
$output .= '<div class="row">';
$output .= '<div class="col-sm-5 col-md-4 left text-center align-self-center">';
$output .= '<div class="address-hd mb-2"><b>' . $office_hd . '</b></div>';
$output .= '<p class="m-0 p-0">' . $address1 . '</p>';
$output .= '<p class="mt-2 mb-0 ml-0 mr-0 p-0"><b>Phone: ' . $phone1 . '</b></p>';
$output .= '<p class="mt-2 mb-0 ml-0 mr-0 p-0">' . $phone_text . '</p>';
if ($fax1) {
$output .= '<p class="mt-2 mb-0 ml-0 mr-0 p-0"><b>Fax: ' . $fax1 . '</b></p>';
}
$output .= '</div>';
$output .= '<div class="col-sm-7 col-md-8 right mapMarker mt-3 mt-sm-0" id="mapMarker">';
$output .= '<div id="my-fast-map" data-iframe-width="100%" data-iframe-height="300" data-iframe-src="' . $map_iframe . '">';
$output .= '<a title="Click to activate map"><img src="' . $map_image . '" alt="Click to activate map"></a>';
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';
$output .= '<div class="contact-us-page-map-box-wrap rounded p-3 mt-3">';
$output .= '<div class="row">';
$output .= '<div class="col-sm-5 col-md-4 left text-center align-self-center">';
$output .= '<div class="address-hd mb-2"><b>' . $office_hd2 . '</b></div>';
$output .= '<p class="m-0 p-0">' . $address2 . '</p>';
$output .= '<p class="mt-2 mb-0 ml-0 mr-0 p-0"><b>Phone: ' . $phone2 . '</b></p>';
$output .= '<p class="mt-2 mb-0 ml-0 mr-0 p-0">' . $phone_text . '</p>';
if ($fax1) {
$output .= '<p class="mt-2 mb-0 ml-0 mr-0 p-0"><b>Fax: ' . $fax1 . '</b></p>';
}
$output .= '</div>';
$output .= '<div class="col-sm-7 col-md-8 right mapMarker mt-3 mt-sm-0" id="mapMarker">';
$output .= '<div id="my-fast-map" data-iframe-width="100%" data-iframe-height="300" data-iframe-src="' . $map_iframe2 . '">';
$output .= '<a title="Click to activate map"><img src="' . $map_image2 . '" alt="Click to activate map"></a>';
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';
} return $output;
}
}
add_shortcode('lb_contactpage', 'lb_contactpage');
/* ---------------------------------------------------------------------------
* Theme Editor Phone
* --------------------------------------------------------------------------- */
if (!function_exists('lb_number')) {
function lb_number($attr, $content = null) {
extract(shortcode_atts(array(), $attr));
$output .= get_theme_mod('theme_phone');
return $output;
}
}
add_shortcode('number', 'lb_number');
/* ---------------------------------------------------------------------------
* Home 3 Practice Area
* --------------------------------------------------------------------------- */
if (!function_exists('lb_practice_area')) {
function lb_practice_area($attr, $content = null) {
extract(shortcode_atts(array(
'visible_items' => "5",
'practice_hd' => "",
'style' => 'one',
'viewimg' => '',
'viewhover' => '',
'viewlink' => '',
'viewtxt' => '', 'text_color' => '',
), $attr));
$args = array(
'posts_per_page' => intval(6),
'post_type' => 'home_practice',
'post_status' => 'publish',
'orderby' => 'menu_order',
'order' => 'ASC',
);
// private
if (is_user_logged_in()) {
$args['post_status'] = array('publish', 'private');
}
$query_blog = new WP_Query($args);
$output = '<div class="hm_practice_area text-center">';
if ($practice_hd) {
$output .= '<h2 class="text-center brd_inline text-white mt-0 mb-4">' . $practice_hd . '</h2>';
}
$output .= '<div id="practice_area" class="practice_area owl-carousel owl-theme" data-items="' . $visible_items . '" data-speed="' . $speed . '">';
while ($query_blog->have_posts()) {
$query_blog->the_post();
$imgID = get_post_thumbnail_id($post->ID);
$img = lb_vc_image(wp_get_attachment_image_src($imgID, 'full', false, ''));
$tittle_text = get_the_title();
$content_text = get_the_content();
$output .= '<div class="item">';
$output .= '<a href="' . get_post_meta(get_the_ID(), 'spk_pratice_img_link', true) . '">';
if ($imgID) {
$output .= ' <img src = "' . $img[0] . '"alt = "' . get_the_title() . '" />';
}
if ($tittle_text) {
$output .= '<h3 class="">' . $tittle_text . '</h3>';
}
$output .= '</a>';
if ($content_text) {
$output .= '<p class="">' . $content_text . '</p>';
}
if (get_post_meta(get_the_ID(), 'spk_pratice_btn_link', true)) {
$output .= '<a class="btnall home_read_btn hvr-sweep-to-bottom" href="' . get_post_meta(get_the_ID(), 'spk_pratice_btn_link', true) . '">Read More</a>';
}
$output .= '</div>';
}
$output .= '</div>';
$output .= '</div>' . "\n";
return $output;
}
}
add_shortcode('lb_practice_area', 'lb_practice_area');
/* ---------------------------------------------------------------------------
* Home Cform
* --------------------------------------------------------------------------- */
if (!function_exists('lb_home_Cform')) {
function lb_home_Cform($attr, $content = null) {
extract(shortcode_atts(array(
'contact_hd' => '',
'cform_text' => '',
'text_color' => '',
'style' => 'one',
), $attr));
$output = '<div class="home_contact">';
if ($contact_hd) {
$output .= '<h2 class="brd_inline mb-4 mt-0 mb-4 p-0 pb-2 text-center">' . $contact_hd . '</h2>';
}
if ($cform_text) {
$output .= '<p class="m-0 p-0 pb-3 text-center">' . $cform_text . '</p>';
}
$output .= '<div class="wrapper">' . do_shortcode('[cForm]') . '</div>';
$output .= '</div>';
return $output;
}
}
add_shortcode('lb_home_Cform', 'lb_home_Cform');
/* ---------------------------------------------------------------------------
* Home Content Right
* --------------------------------------------------------------------------- */
if (!function_exists('lb_home_content_right')) {
function lb_home_content_right($attr, $content = null) {
extract(shortcode_atts(array(
'heading' => '',
'content_area' => '',
'style' => '',
'color' => '',
), $attr));
$output = '<div class="home_content_right text-center text-white">';
$output .= '<h2 class="m-0">' . $heading . '</h2>';
$output .= '<p>' . $content_area . '</p>';
$output .= '</div>';
return $output;
}
}
add_shortcode('lb_home_content_right', 'lb_home_content_right');
if (!function_exists('lb_practice_area2')) {
function lb_practice_area2($attr, $content = null) {
extract(shortcode_atts(array(
'visible_items' => "5",
'practice_hd' => "",
'practice_sub_hd' => "",
'style' => 'one',
'viewimg' => '',
'viewhover' => '',
'viewlink' => '',
'viewtxt' => '', 'text_color' => '',
), $attr));
$args = array(
'posts_per_page' => intval(6),
'post_type' => 'practice2',
'post_status' => 'publish',
'orderby' => 'menu_order',
'order' => 'ASC',
);
// private
if (is_user_logged_in()) {
$args['post_status'] = array('publish', 'private');
}
$query_blog = new WP_Query($args);
$output = '<div class=" news_sectn text-center">';
if ($practice_hd) {
$output .= '<h2 class="text-center brd_inline mt-0 mb-4">' . $practice_hd . '</h2>';
}
if ($practice_sub_hd) {
$output .= '<h5 class="text-center my-4">' . $practice_sub_hd . '</h5>';
}
$output .= '<div id="practice_area2" class=" owl-carousel owl-theme" data-items="' . $visible_items . '" data-speed="' . $speed . '">';
while ($query_blog->have_posts()) {
$query_blog->the_post();
$imgID = get_post_thumbnail_id($post->ID);
$img = lb_vc_image(wp_get_attachment_image_src($imgID, 'full', false, ''));
$tittle_text = get_the_title();
$content_text = get_the_content();
$output .= '<div class="item">';
$output .= '<a href="' . get_post_meta(get_the_ID(), 'spk_pratice_img_link', true) . '">';
if ($imgID) {
$output .= ' <img src = "' . $img[0] . '"alt = "' . get_the_title() . '" />';
}
if ($tittle_text) {
$output .= '<h3 class="">' . $tittle_text . '</h3>';
}
$output .= '</a>';
if ($content_text) {
$output .= '<p class="">' . $content_text . '</p>';
}
if (get_post_meta(get_the_ID(), 'spk_pratice_btn_link', true)) {
$output .= '<a class=" btnall BtnHover2 read_btn2 hvr-sweep-to-bottom" href="' . get_post_meta(get_the_ID(), 'spk_pratice_btn_link', true) . '">Read More</a>';
}
$output .= '</div>';
}
$output .= '</div>';
$output .= '</div>' . "\n";
return $output;
}
}
add_shortcode('lb_practice_area2', 'lb_practice_area2');