'%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(), ); $boat_rental_args = wp_parse_args($boat_rental_args, $boat_rental_defaults); /** * Filters the arguments for `boat_rental_site_logo()`. * * @param array $boat_rental_args Parsed arguments. * @param array $boat_rental_defaults Function's default arguments. */ $boat_rental_args = apply_filters('boat_rental_site_logo_args', $boat_rental_args, $boat_rental_defaults); $boat_rental_show_logo = get_theme_mod('boat_rental_display_logo', false); $boat_rental_show_title = get_theme_mod('boat_rental_display_title', true); if ( has_custom_logo() && $boat_rental_show_logo ) { $boat_rental_contents .= sprintf($boat_rental_args['logo'], $boat_rental_logo, esc_html($boat_rental_site_title)); $boat_rental_classname = $boat_rental_args['logo_class']; } if ( $boat_rental_show_title ) { $boat_rental_contents .= sprintf($boat_rental_args['title'], esc_url(get_home_url(null, '/')), esc_html($boat_rental_site_title)); // If logo isn't shown, fallback to title class for wrapper. if ( !$boat_rental_show_logo ) { $boat_rental_classname = $boat_rental_args['title_class']; } } // If nothing is shown (logo or title both disabled), exit early if ( empty($boat_rental_contents) ) { return; } $boat_rental_wrap = $boat_rental_args['condition'] ? 'home_wrap' : 'single_wrap'; // $boat_rental_wrap = 'home_wrap'; $boat_rental_html = sprintf($boat_rental_args[$boat_rental_wrap], $boat_rental_classname, $boat_rental_contents); /** * Filters the arguments for `boat_rental_site_logo()`. * * @param string $boat_rental_html Compiled html based on our arguments. * @param array $boat_rental_args Parsed arguments. * @param string $boat_rental_classname Class name based on current view, home or single. * @param string $boat_rental_contents HTML for site title or logo. */ $boat_rental_html = apply_filters('boat_rental_site_logo', $boat_rental_html, $boat_rental_args, $boat_rental_classname, $boat_rental_contents); if (!$boat_rental_echo) { return $boat_rental_html; } echo $boat_rental_html; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } endif; if( !function_exists('boat_rental_site_description') ): /** * Displays the site description. * * @param boolean $boat_rental_echo Echo or return the html. * * @return string $boat_rental_html The HTML to display. */ function boat_rental_site_description($boat_rental_echo = true){ if ( get_theme_mod('boat_rental_display_header_text', false) == true ) : $boat_rental_description = get_bloginfo('description'); if (!$boat_rental_description) { return; } $boat_rental_wrapper = '
%s
'; $boat_rental_html = sprintf($boat_rental_wrapper, esc_html($boat_rental_description)); /** * Filters the html for the site description. * * @param string $boat_rental_html The HTML to display. * @param string $boat_rental_description Site description via `bloginfo()`. * @param string $boat_rental_wrapper The format used in case you want to reuse it in a `sprintf()`. * @since 1.0.0 * */ $boat_rental_html = apply_filters('boat_rental_site_description', $boat_rental_html, $boat_rental_description, $boat_rental_wrapper); if (!$boat_rental_echo) { return $boat_rental_html; } echo $boat_rental_html; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped endif; } endif; if( !function_exists('boat_rental_posted_on') ): /** * Prints HTML with meta information for the current post-date/time. */ function boat_rental_posted_on( $boat_rental_icon = true, $boat_rental_animation_class = '' ){ $boat_rental_default = boat_rental_get_default_theme_options(); $boat_rental_post_date = absint( get_theme_mod( 'boat_rental_post_date',$boat_rental_default['boat_rental_post_date'] ) ); if( $boat_rental_post_date ){ $boat_rental_time_string = ''; if (get_the_time('U') !== get_the_modified_time('U')) { $boat_rental_time_string = ''; } $boat_rental_time_string = sprintf($boat_rental_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()) ); $boat_rental_year = get_the_date('Y'); $boat_rental_month = get_the_date('m'); $boat_rental_day = get_the_date('d'); $boat_rental_link = get_day_link($boat_rental_year, $boat_rental_month, $boat_rental_day); $boat_rental_posted_on = '' . $boat_rental_time_string . ''; echo '
'; echo '
'; if( $boat_rental_icon ){ echo ''; } echo '' . $boat_rental_posted_on . ''; // phpcs:ignore Standard.Category.SniffName.ErrorCode echo '
'; echo '
'; } } endif; if( !function_exists('boat_rental_posted_by') ) : /** * Prints HTML with meta information for the current author. */ function boat_rental_posted_by( $boat_rental_icon = true, $boat_rental_animation_class = '' ){ $boat_rental_default = boat_rental_get_default_theme_options(); $boat_rental_post_author = absint( get_theme_mod( 'boat_rental_post_author',$boat_rental_default['boat_rental_post_author'] ) ); if( $boat_rental_post_author ){ echo '
'; echo '
'; if( $boat_rental_icon ){ echo ''; } $boat_rental_byline = '' . esc_html(get_the_author()) . ''; echo ''; // phpcs:ignore Standard.Category.SniffName.ErrorCode echo '
'; echo '
'; } } endif; if( !function_exists('boat_rental_posted_by_avatar') ) : /** * Prints HTML with meta information for the current author. */ function boat_rental_posted_by_avatar( $boat_rental_date = false ){ $boat_rental_default = boat_rental_get_default_theme_options(); $boat_rental_post_author = absint( get_theme_mod( 'boat_rental_post_author',$boat_rental_default['boat_rental_post_author'] ) ); if( $boat_rental_post_author ){ echo '
'; echo '
'; echo wp_kses_post( get_avatar( get_the_author_meta( 'ID' ) ) ); echo '
'; echo '
'; echo '
'; $boat_rental_byline = '' . esc_html(get_the_author()) . ''; echo '
' . $boat_rental_byline . '
'; if( $boat_rental_date ){ boat_rental_posted_on($boat_rental_icon = false); } echo '
'; } } endif; if( !function_exists('boat_rental_entry_footer') ): /** * Prints HTML with meta information for the categories, tags and comments. */ function boat_rental_entry_footer( $boat_rental_cats = true, $boat_rental_tags = true, $boat_rental_edits = true){ $boat_rental_default = boat_rental_get_default_theme_options(); $boat_rental_post_category = absint( get_theme_mod( 'boat_rental_post_category',$boat_rental_default['boat_rental_post_category'] ) ); $boat_rental_post_tags = absint( get_theme_mod( 'boat_rental_post_tags',$boat_rental_default['boat_rental_post_tags'] ) ); // Hide category and tag text for pages. if ('post' === get_post_type()) { if( $boat_rental_cats && $boat_rental_post_category ){ /* translators: used between list items, there is a space after the comma */ $boat_rental_categories = get_the_category(); if ($boat_rental_categories) { echo '
'; echo '
'; /* translators: 1: list of categories. */ echo ''; foreach( $boat_rental_categories as $boat_rental_category ){ $boat_rental_cat_name = $boat_rental_category->name; $boat_rental_cat_slug = $boat_rental_category->slug; $boat_rental_cat_url = get_category_link( $boat_rental_category->term_id ); ?> '; // phpcs:ignore Standard.Category.SniffName.ErrorCode echo '
'; echo '
'; } } if( $boat_rental_tags && $boat_rental_post_tags ){ /* translators: used between list items, there is a space after the comma */ $boat_rental_tags_list = get_the_tag_list('', esc_html_x(', ', 'list item separator', 'boat-rental')); if( $boat_rental_tags_list ){ echo '
'; echo '
'; /* translators: 1: list of tags. */ echo ''; echo wp_kses_post($boat_rental_tags_list) . ''; // phpcs:ignore Standard.Category.SniffName.ErrorCode echo '
'; echo '
'; } } if( $boat_rental_edits ){ edit_post_link( sprintf( wp_kses( /* translators: %s: Name of current post. Only visible to screen readers */ __('Edit %s', 'boat-rental'), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ), '', '' ); } } } endif; if ( ! function_exists( 'boat_rental_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 boat_rental_post_thumbnail( $boat_rental_image_size = 'full' ) { if ( post_password_required() || is_attachment() ) { return; } // Fallback image path $boat_rental_default_image = get_template_directory_uri() . '/assets/images/slide-bg.png'; // Image size → height class map $boat_rental_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', ); $boat_rental_class = isset( $boat_rental_size_class_map[ $boat_rental_image_size ] ) ? $boat_rental_size_class_map[ $boat_rental_image_size ] : 'data-bg-medium'; if ( is_singular() ) { the_post_thumbnail(); } else { // 🔵 On archives → use background image style $boat_rental_image = has_post_thumbnail() ? wp_get_attachment_image_src( get_post_thumbnail_id(), $boat_rental_image_size ) : array( $boat_rental_default_image ); $boat_rental_bg_image = isset( $boat_rental_image[0] ) ? $boat_rental_image[0] : $boat_rental_default_image; ?>
user_id > 0) { $boat_rental_user = get_userdata($boat_rental_comment->user_id); $post = get_post($boat_rental_comment->comment_post_ID); if (!empty($boat_rental_user) && !empty($post)) { return $boat_rental_comment->user_id === $post->post_author; } } return false; } endif; if( !function_exists('boat_rental_breadcrumb') ) : /** * Boat Rental Breadcrumb */ function boat_rental_breadcrumb($boat_rental_comment = null){ echo '
'; boat_rental_breadcrumb_trail(); echo '
'; } endif;