implode( '&family=', $font_families ), 'display' => 'swap', ), 'https://fonts.googleapis.com/css2' ); return esc_url_raw($fonts_url); } endif; if ( ! function_exists( 'aerial_drone_sub_menu_toggle_button' ) ) : function aerial_drone_sub_menu_toggle_button( $args, $item, $depth ) { // Add sub menu toggles to the main menu with toggles if ( $args->theme_location == 'aerial-drone-primary-menu' && isset( $args->show_toggles ) ) { // Wrap the menu item link contents in a div, used for positioning $args->before = '
'; $args->after = ''; // Add a toggle to items with children if ( in_array( 'menu-item-has-children', $item->classes ) ) { $toggle_target_string = '.menu-item.menu-item-' . $item->ID . ' > .sub-menu'; // Add the sub menu toggle $args->after .= ''; } // Close the wrapper $args->after .= '
'; // Add sub menu icons to the main menu without toggles (the fallback menu) }elseif( $args->theme_location == 'aerial-drone-primary-menu' ) { if ( in_array( 'menu-item-has-children', $item->classes ) ) { $args->before = '
'; $args->after = aerial_drone_get_theme_svg( 'chevron-down' ) . '
'; } else { $args->before = ''; $args->after = ''; } } return $args; } endif; add_filter( 'nav_menu_item_args', 'aerial_drone_sub_menu_toggle_button', 10, 3 ); if ( ! function_exists( 'aerial_drone_the_theme_svg' ) ): function aerial_drone_the_theme_svg( $svg_name, $return = false ) { if( $return ){ return aerial_drone_get_theme_svg( $svg_name ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in aerial_drone_get_theme_svg();. }else{ echo aerial_drone_get_theme_svg( $svg_name ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in aerial_drone_get_theme_svg();. } } endif; if ( ! function_exists( 'aerial_drone_get_theme_svg' ) ): function aerial_drone_get_theme_svg( $svg_name ) { // Make sure that only our allowed tags and attributes are included. $svg = wp_kses( Aerial_Drone_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( 'aerial_drone_post_category_list' ) ) : // Post Category List. function aerial_drone_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 --','aerial-drone' ); } 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('aerial_drone_single_post_navigation') ): function aerial_drone_single_post_navigation(){ $aerial_drone_default = aerial_drone_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', $aerial_drone_default['twp_navigation_type']); } if( $twp_navigation_type != 'no-navigation' && 'post' === get_post_type() ){ if( $twp_navigation_type == 'theme-normal-navigation' ){ ?>
'' . aerial_drone_the_theme_svg('arrow-left',$return = true ) . '' . esc_html__('Previous post:', 'aerial-drone') . '%title', 'next_text' => '' . aerial_drone_the_theme_svg('arrow-right',$return = true ) . '' . esc_html__('Next post:', 'aerial-drone') . '%title', )); ?>
ID ) ){ $next_post_id = $next_post->ID; echo '
'; } } } } endif; add_action( 'aerial_drone_navigation_action','aerial_drone_single_post_navigation',30 ); if( !function_exists('aerial_drone_footer_content_widget') ): function aerial_drone_footer_content_widget(){ $aerial_drone_default = aerial_drone_get_default_theme_options(); $aerial_drone_footer_column_layout = absint(get_theme_mod('aerial_drone_footer_column_layout', $aerial_drone_default['aerial_drone_footer_column_layout'])); $aerial_drone_footer_sidebar_class = 12; if($aerial_drone_footer_column_layout == 2) { $aerial_drone_footer_sidebar_class = 6; } if($aerial_drone_footer_column_layout == 3) { $aerial_drone_footer_sidebar_class = 4; } ?>
'; echo esc_html__('Theme: ', 'aerial-drone') . '' . esc_html__('AERIAL DRONE', 'aerial-drone') . '' . esc_html__(' By ', 'aerial-drone') . ' ' . esc_html__('OMEGA ', 'aerial-drone') . ''; echo esc_html__('Powered by ', 'aerial-drone') . '' . esc_html__('WordPress.', 'aerial-drone') . ''; ?>
array( 'class' => array(), 'aria-hidden' => array() ) ) ), esc_html( $aerial_drone_to_the_top_text ), '↑' ); ?>
'post', 'posts_per_page' => 4, 'post__not_in' => get_option( 'sticky_posts' ), 'category_name' => esc_html( $aerial_drone_header_banner_cat ), ) ); // Check if the query has posts if ( ! $banner_query->have_posts() ) { error_log('No posts found for the banner query.'); return ''; // Exit early if no posts } ob_start(); // Start output buffering ?>
>
have_posts() ) : $banner_query->the_post(); $aerial_drone_featured_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large' )[0] ?? get_template_directory_uri() . '/assets/images/default.png'; ?>

×

'post', 'posts_per_page' => 6,'post__not_in' => get_option("sticky_posts"), 'category_name' => esc_html( $omega_storefron_locations_post_cat ) ) ); if( $aerial_drone_locations_query->have_posts() ): ?>

have_posts() ): $aerial_drone_locations_query->the_post(); $aerial_drone_featured_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large'); $aerial_drone_featured_image = isset( $aerial_drone_featured_image[0] ) ? $aerial_drone_featured_image[0] : ''; $aerial_drone_showcase_video_button_url = esc_url( get_theme_mod( 'aerial_drone_showcase_video_button_url' . $s, ) ); ?>

'.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( 'aerial_drone_sanitize_sidebar_option_meta' ) ) : // Sidebar Option Sanitize. function aerial_drone_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( 'aerial_drone_sanitize_pagination_meta' ) ) : // Sidebar Option Sanitize. function aerial_drone_sanitize_pagination_meta( $input ){ $aerial_drone_metabox_options = array( 'Center','Right','Left'); if( in_array( $input,$aerial_drone_metabox_options ) ){ return $input; }else{ return ''; } } endif; // Sanitize the enable/disable setting for pagination if( !function_exists('aerial_drone_sanitize_enable_pagination') ) : function aerial_drone_sanitize_enable_pagination( $aerial_drone_input ) { return (bool) $aerial_drone_input; } endif; if( !function_exists( 'aerial_drone_sanitize_pagination_type' ) ) : /** * Sanitize the pagination type setting. * * @param string $aerial_drone_input The input value from the Customizer. * @return string The sanitized value. */ function aerial_drone_sanitize_pagination_type( $aerial_drone_input ) { // Define valid options for the pagination type. $aerial_drone_valid_options = array( 'numeric', 'newer_older' ); // Update valid options to include 'newer_older' // If the input is one of the valid options, return it. Otherwise, return the default option ('numeric'). if ( in_array( $aerial_drone_input, $aerial_drone_valid_options, true ) ) { return $aerial_drone_input; } else { // Return 'numeric' as the fallback if the input is invalid. return 'numeric'; } } endif; if( !function_exists( 'aerial_drone_sanitize_menu_transform' ) ) : // Sidebar Option Sanitize. function aerial_drone_sanitize_menu_transform( $input ){ $aerial_drone_metabox_options = array( 'capitalize','uppercase','lowercase'); if( in_array( $input,$aerial_drone_metabox_options ) ){ return $input; }else{ return ''; } } endif; if( !function_exists( 'aerial_drone_sanitize_page_content_alignment' ) ) : // Sidebar Option Sanitize. function aerial_drone_sanitize_page_content_alignment( $input ){ $aerial_drone_metabox_options = array( 'left','center','right'); if( in_array( $input,$aerial_drone_metabox_options ) ){ return $input; }else{ return ''; } } endif;