'%1$s%2$s', 'logo_class' => 'site-logo site-branding', 'title' => '%2$s', 'title_class' => 'site-title', 'home_wrap' => '

%2$s

', 'single_wrap' => '
%2$s
', 'condition' => (is_front_page() || is_home()) && !is_page(), ); $aerial_drone_args = wp_parse_args($aerial_drone_args, $aerial_drone_defaults); /** * Filters the arguments for `aerial_drone_site_logo()`. * * @param array $aerial_drone_args Parsed arguments. * @param array $aerial_drone_defaults Function's default arguments. */ $aerial_drone_args = apply_filters('aerial_drone_site_logo_args', $aerial_drone_args, $aerial_drone_defaults); $aerial_drone_show_logo = get_theme_mod('aerial_drone_display_logo', false); $aerial_drone_show_title = get_theme_mod('aerial_drone_display_title', true); if ( has_custom_logo() && $aerial_drone_show_logo ) { $aerial_drone_contents .= sprintf($aerial_drone_args['logo'], $aerial_drone_logo, esc_html($aerial_drone_site_title)); $aerial_drone_classname = $aerial_drone_args['logo_class']; } if ( $aerial_drone_show_title ) { $aerial_drone_contents .= sprintf($aerial_drone_args['title'], esc_url(get_home_url(null, '/')), esc_html($aerial_drone_site_title)); // If logo isn't shown, fallback to title class for wrapper. if ( !$aerial_drone_show_logo ) { $aerial_drone_classname = $aerial_drone_args['title_class']; } } // If nothing is shown (logo or title both disabled), exit early if ( empty($aerial_drone_contents) ) { return; } $aerial_drone_wrap = $aerial_drone_args['condition'] ? 'home_wrap' : 'single_wrap'; // $aerial_drone_wrap = 'home_wrap'; $aerial_drone_html = sprintf($aerial_drone_args[$aerial_drone_wrap], $aerial_drone_classname, $aerial_drone_contents); /** * Filters the arguments for `aerial_drone_site_logo()`. * * @param string $aerial_drone_html Compiled html based on our arguments. * @param array $aerial_drone_args Parsed arguments. * @param string $aerial_drone_classname Class name based on current view, home or single. * @param string $aerial_drone_contents HTML for site title or logo. */ $aerial_drone_html = apply_filters('aerial_drone_site_logo', $aerial_drone_html, $aerial_drone_args, $aerial_drone_classname, $aerial_drone_contents); if (!$aerial_drone_echo) { return $aerial_drone_html; } echo $aerial_drone_html; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } endif; if( !function_exists('aerial_drone_site_description') ): /** * Displays the site description. * * @param boolean $aerial_drone_echo Echo or return the html. * * @return string $aerial_drone_html The HTML to display. */ function aerial_drone_site_description($aerial_drone_echo = true){ if ( get_theme_mod('aerial_drone_display_header_text', false) == true ) : $aerial_drone_description = get_bloginfo('description'); if (!$aerial_drone_description) { return; } $aerial_drone_wrapper = '
%s
'; $aerial_drone_html = sprintf($aerial_drone_wrapper, esc_html($aerial_drone_description)); /** * Filters the html for the site description. * * @param string $aerial_drone_html The HTML to display. * @param string $aerial_drone_description Site description via `bloginfo()`. * @param string $aerial_drone_wrapper The format used in case you want to reuse it in a `sprintf()`. * @since 1.0.0 * */ $aerial_drone_html = apply_filters('aerial_drone_site_description', $aerial_drone_html, $aerial_drone_description, $aerial_drone_wrapper); if (!$aerial_drone_echo) { return $aerial_drone_html; } echo $aerial_drone_html; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped endif; } endif; if( !function_exists('aerial_drone_posted_on') ): /** * Prints HTML with meta information for the current post-date/time. */ function aerial_drone_posted_on( $aerial_drone_icon = true, $animation_class = '' ){ $aerial_drone_default = aerial_drone_get_default_theme_options(); $aerial_drone_post_date = absint( get_theme_mod( 'aerial_drone_post_date',$aerial_drone_default['aerial_drone_post_date'] ) ); if( $aerial_drone_post_date ){ $aerial_drone_time_string = ''; if (get_the_time('U') !== get_the_modified_time('U')) { $aerial_drone_time_string = ''; } $aerial_drone_time_string = sprintf($aerial_drone_time_string, esc_attr(get_the_date(DATE_W3C)), esc_html(get_the_date()), esc_attr(get_the_modified_date(DATE_W3C)), esc_html(get_the_modified_date()) ); $aerial_drone_year = get_the_date('Y'); $aerial_drone_month = get_the_date('m'); $aerial_drone_day = get_the_date('d'); $aerial_drone_link = get_day_link($aerial_drone_year, $aerial_drone_month, $aerial_drone_day); $aerial_drone_posted_on = '' . $aerial_drone_time_string . ''; echo '
'; echo '
'; if( $aerial_drone_icon ){ echo ''; } echo '' . $aerial_drone_posted_on . ''; // WPCS: XSS OK. echo '
'; echo '
'; } } endif; if( !function_exists('aerial_drone_posted_by') ) : /** * Prints HTML with meta information for the current author. */ function aerial_drone_posted_by( $aerial_drone_icon = true, $animation_class = '' ){ $aerial_drone_default = aerial_drone_get_default_theme_options(); $aerial_drone_post_author = absint( get_theme_mod( 'aerial_drone_post_author',$aerial_drone_default['aerial_drone_post_author'] ) ); if( $aerial_drone_post_author ){ echo '
'; echo '
'; if( $aerial_drone_icon ){ echo ''; } $aerial_drone_byline = '' . esc_html(get_the_author()) . ''; echo ''; // WPCS: XSS OK. echo '
'; echo '
'; } } endif; if( !function_exists('aerial_drone_posted_by_avatar') ) : /** * Prints HTML with meta information for the current author. */ function aerial_drone_posted_by_avatar( $aerial_drone_date = false ){ $aerial_drone_default = aerial_drone_get_default_theme_options(); $aerial_drone_post_author = absint( get_theme_mod( 'aerial_drone_post_author',$aerial_drone_default['aerial_drone_post_author'] ) ); if( $aerial_drone_post_author ){ echo '
'; echo '
'; echo wp_kses_post( get_avatar( get_the_author_meta( 'ID' ) ) ); echo '
'; echo '
'; echo '
'; $aerial_drone_byline = '' . esc_html(get_the_author()) . ''; echo '
' . $aerial_drone_byline . '
'; if( $aerial_drone_date ){ aerial_drone_posted_on($aerial_drone_icon = false); } echo '
'; } } endif; if( !function_exists('aerial_drone_entry_footer') ): /** * Prints HTML with meta information for the categories, tags and comments. */ function aerial_drone_entry_footer( $aerial_drone_cats = true, $aerial_drone_tags = true, $aerial_drone_edits = true){ $aerial_drone_default = aerial_drone_get_default_theme_options(); $aerial_drone_post_category = absint( get_theme_mod( 'aerial_drone_post_category',$aerial_drone_default['aerial_drone_post_category'] ) ); $aerial_drone_post_tags = absint( get_theme_mod( 'aerial_drone_post_tags',$aerial_drone_default['aerial_drone_post_tags'] ) ); // Hide category and tag text for pages. if ('post' === get_post_type()) { if( $aerial_drone_cats && $aerial_drone_post_category ){ /* translators: used between list items, there is a space after the comma */ $aerial_drone_categories = get_the_category(); if ($aerial_drone_categories) { echo '
'; echo '
'; /* translators: 1: list of categories. */ echo ''; foreach( $aerial_drone_categories as $aerial_drone_category ){ $aerial_drone_cat_name = $aerial_drone_category->name; $aerial_drone_cat_slug = $aerial_drone_category->slug; $aerial_drone_cat_url = get_category_link( $aerial_drone_category->term_id ); ?> '; // WPCS: XSS OK. echo '
'; echo '
'; } } if( $aerial_drone_tags && $aerial_drone_post_tags ){ /* translators: used between list items, there is a space after the comma */ $aerial_drone_tags_list = get_the_tag_list('', esc_html_x(', ', 'list item separator', 'aerial-drone')); if( $aerial_drone_tags_list ){ echo '
'; echo '
'; /* translators: 1: list of tags. */ echo ''; echo wp_kses_post($aerial_drone_tags_list) . ''; // WPCS: XSS OK. echo '
'; echo '
'; } } if( $aerial_drone_edits ){ edit_post_link( sprintf( wp_kses( /* translators: %s: Name of current post. Only visible to screen readers */ __('Edit %s', 'aerial-drone'), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ), '', '' ); } } } endif; if ( ! function_exists( 'aerial_drone_post_thumbnail' ) ) : /** * Displays an optional post thumbnail. * * Shows background style image with height class on archive/search/front, * and a normal inline image on single post/page views. */ function aerial_drone_post_thumbnail( $aerial_drone_image_size = 'medium' ) { if ( post_password_required() || is_attachment() ) { return; } // Fallback image path $aerial_drone_default_image = get_template_directory_uri() . '/assets/images/default.png'; // Image size → height class map $aerial_drone_size_class_map = array( 'full' => 'data-bg-large', 'large' => 'data-bg-big', 'medium' => 'data-bg-medium', 'small' => 'data-bg-small', 'xsmall' => 'data-bg-xsmall', 'thumbnail' => 'data-bg-thumbnail', ); $aerial_drone_class = isset( $aerial_drone_size_class_map[ $aerial_drone_image_size ] ) ? $aerial_drone_size_class_map[ $aerial_drone_image_size ] : 'data-bg-medium'; if ( is_singular() ) { the_post_thumbnail(); } else { // 🔵 On archives → use background image style $aerial_drone_image = has_post_thumbnail() ? wp_get_attachment_image_src( get_post_thumbnail_id(), $aerial_drone_image_size ) : array( $aerial_drone_default_image ); $aerial_drone_bg_image = isset( $aerial_drone_image[0] ) ? $aerial_drone_image[0] : $aerial_drone_default_image; ?>
user_id > 0) { $aerial_drone_user = get_userdata($aerial_drone_comment->user_id); $post = get_post($aerial_drone_comment->comment_post_ID); if (!empty($aerial_drone_user) && !empty($post)) { return $aerial_drone_comment->user_id === $post->post_author; } } return false; } endif; if( !function_exists('aerial_drone_breadcrumb') ) : /** * Aerial Drone Breadcrumb */ function aerial_drone_breadcrumb($aerial_drone_comment = null){ echo '
'; aerial_drone_breadcrumb_trail(); echo '
'; } endif;