implode( '&family=', $font_families ), 'display' => 'swap', ), 'https://fonts.googleapis.com/css2' ); return esc_url_raw($fonts_url); } endif; if ( ! function_exists( 'architect_contractor_sub_menu_toggle_button' ) ) : function architect_contractor_sub_menu_toggle_button( $args, $item, $depth ) { // Add sub menu toggles to the main menu with toggles if ( $args->theme_location == 'architect-contractor-primary-menu' && isset( $args->show_toggles ) ) { // Wrap the menu item link contents in a div, used for positioning $args->before = ''; // Add sub menu icons to the main menu without toggles (the fallback menu) }elseif( $args->theme_location == 'architect-contractor-primary-menu' ) { if ( in_array( 'menu-item-has-children', $item->classes ) ) { $args->before = ''; } else { $args->before = ''; $args->after = ''; } } return $args; } endif; add_filter( 'nav_menu_item_args', 'architect_contractor_sub_menu_toggle_button', 10, 3 ); if ( ! function_exists( 'architect_contractor_the_theme_svg' ) ): function architect_contractor_the_theme_svg( $svg_name, $return = false ) { if( $return ){ return architect_contractor_get_theme_svg( $svg_name ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in architect_contractor_get_theme_svg();. }else{ echo architect_contractor_get_theme_svg( $svg_name ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in architect_contractor_get_theme_svg();. } } endif; if ( ! function_exists( 'architect_contractor_get_theme_svg' ) ): function architect_contractor_get_theme_svg( $svg_name ) { // Make sure that only our allowed tags and attributes are included. $svg = wp_kses( Architect_Contractor_SVG_Icons::get_svg( $svg_name ), array( 'svg' => array( 'class' => true, 'xmlns' => true, 'width' => true, 'height' => true, 'viewbox' => true, 'aria-hidden' => true, 'role' => true, 'focusable' => true, ), 'path' => array( 'fill' => true, 'fill-rule' => true, 'd' => true, 'transform' => true, ), 'polygon' => array( 'fill' => true, 'fill-rule' => true, 'points' => true, 'transform' => true, 'focusable' => true, ), 'polyline' => array( 'fill' => true, 'points' => true, ), 'line' => array( 'fill' => true, 'x1' => true, 'x2' => true, 'y1' => true, 'y2' => true, ), ) ); if ( ! $svg ) { return false; } return $svg; } endif; if( !function_exists( 'architect_contractor_post_category_list' ) ) : // Post Category List. function architect_contractor_post_category_list( $select_cat = true ){ $post_cat_lists = get_categories( array( 'hide_empty' => '0', 'exclude' => '1', ) ); $post_cat_cat_array = array(); if( $select_cat ){ $post_cat_cat_array[''] = esc_html__( '-- Select Category --','architect-contractor' ); } foreach ( $post_cat_lists as $post_cat_list ) { $post_cat_cat_array[$post_cat_list->slug] = $post_cat_list->name; } return $post_cat_cat_array; } endif; if( !function_exists('architect_contractor_single_post_navigation') ): function architect_contractor_single_post_navigation(){ $architect_contractor_default = architect_contractor_get_default_theme_options(); $twp_navigation_type = esc_attr( get_post_meta( get_the_ID(), 'twp_disable_ajax_load_next_post', true ) ); $current_id = ''; $article_wrap_class = ''; global $post; $current_id = $post->ID; if( $twp_navigation_type == '' || $twp_navigation_type == 'global-layout' ){ $twp_navigation_type = get_theme_mod('twp_navigation_type', $architect_contractor_default['twp_navigation_type']); } if( $twp_navigation_type != 'no-navigation' && 'post' === get_post_type() ){ if( $twp_navigation_type == 'theme-normal-navigation' ){ ?> ID ) ){ $next_post_id = $next_post->ID; echo '
'; } } } } endif; add_action( 'architect_contractor_navigation_action','architect_contractor_single_post_navigation',30 ); if( !function_exists('architect_contractor_content_offcanvas') ): // Offcanvas Contents function architect_contractor_content_offcanvas(){ ?>
'post', 'posts_per_page' => 4,'post__not_in' => get_option("sticky_posts"), 'category_name' => esc_html( $architect_contractor_header_banner_cat ) ) ); if( $banner_query->have_posts() ): ?>
'.esc_html( $title ).''; } ?>
array( 'class' => true, 'xmlns' => true, 'width' => true, 'height' => true, 'viewbox' => true, 'aria-hidden' => true, 'role' => true, 'focusable' => true, ), 'path' => array( 'fill' => true, 'fill-rule' => true, 'd' => true, 'transform' => true, ), 'polygon' => array( 'fill' => true, 'fill-rule' => true, 'points' => true, 'transform' => true, 'focusable' => true, ), ) ); if ( ! $svg ) { return false; } return $svg; } endif; if( !function_exists( 'architect_contractor_sanitize_sidebar_option_meta' ) ) : // Sidebar Option Sanitize. function architect_contractor_sanitize_sidebar_option_meta( $input ){ $metabox_options = array( 'global-sidebar','left-sidebar','right-sidebar','no-sidebar' ); if( in_array( $input,$metabox_options ) ){ return $input; }else{ return ''; } } endif; if( !function_exists( 'architect_contractor_services_slider' ) ) : function architect_contractor_services_slider(){ $architect_contractor_defaults = architect_contractor_get_default_theme_options(); $architect_contractor_services = get_theme_mod( 'architect_contractor_services', $architect_contractor_defaults['architect_contractor_services'] ); $architect_contractor_services_cat = get_theme_mod( 'architect_contractor_services_cat' ); $architect_contractor_services_section_title = esc_html( get_theme_mod( 'architect_contractor_services_section_title', $architect_contractor_defaults['architect_contractor_services_section_title'] ) ); $architect_contractor_services_section_short_title = esc_html( get_theme_mod( 'architect_contractor_services_section_short_title', $architect_contractor_defaults['architect_contractor_services_section_short_title'] ) ); if( $architect_contractor_services ){ $architect_contractor_rtl = ''; if( is_rtl() ){ $architect_contractor_rtl = 'dir="rtl"'; } $services_query = new WP_Query( array('post_type' => 'post', 'posts_per_page' => 4,'post__not_in' => get_option("sticky_posts"), 'category_name' => esc_html( $architect_contractor_services_cat ) ) ); if( $services_query->have_posts() ): ?>

'post', 'posts_per_page' => 4,'post__not_in' => get_option("sticky_posts"), 'category_name' => esc_html( $architect_contractor_counter_cat ) ) ); if( $counter_query->have_posts() ): ?>