ID, 'ip_theme_true_fullwidth', true); if ($post_fullwidth == 'fullwidth') { $class[] = 'content-true-fullwidth'; } } return implode(' ', apply_filters('ip_theme_content_container_class', $class)); } } if (!function_exists('ip_theme_get_footer_container_class')) { /** * Get the classes for footer container * * @return string */ function ip_theme_get_footer_container_class() { $class = array( 'footer-container' ); /** * Let plugins and child themes override layout * fullwidth/ boxed */ $site_layout = apply_filters('ip_theme_site_layout', get_option(IP_THEME . 'site_layout', ip_theme_get_default_options()['site_layout'])); $class[] = 'container-' . $site_layout; return implode(' ', apply_filters('ip_theme_footer_container_class', $class)); } } if (!function_exists('ip_theme_get_content_template_type')) { /** * Get the type how to display individual posts on blog and archive pages * * Excerpt/ Full content/ Grid / List * @return string */ function ip_theme_get_content_template_type() { $archive_content_display = get_option(IP_THEME . 'archive_content_display', ip_theme_get_default_options()['archive_content_display']); /** * If archive is set to display full content */ if ($archive_content_display != 'excerpt') { return apply_filters('ip_theme_archive_type', $archive_content_display); } /** * If archive is set to display as excerpt determine whether to display as list or grid * */ return apply_filters('ip_theme_archive_type', get_option(IP_THEME . 'archive_type', ip_theme_get_default_options()['archive_type'])); } } if (!function_exists('ip_theme_get_grid_col_number')) { /** * Get number of columns in each row of grid view * * @return integer */ function ip_theme_get_grid_col_number() { return apply_filters('ip_theme_grid_col_number', get_option(IP_THEME . 'grid_col_number', ip_theme_get_default_options()['grid_col_number'])); } } if (!function_exists('ip_theme_get_archive_wrapper_class')) { /** * Get classes for archive items wrapper * * @return string */ function ip_theme_get_archive_wrapper_class() { $classes = array( 'archive-items-wrapper' ); $classes[] = 'ip-archive-wrapper-' . ip_theme_get_content_template_type(); return apply_filters('ip_theme_archive_wrapper_class', implode(' ', $classes)); } } if (!function_exists('ip_theme_get_archive_content_class')) { /** * Get the classes for individual post on archive and blog pages for grid view * * @return string */ function ip_theme_get_archive_content_class() { $classes = array( 'ip-col', 'ip-archive-item' ); //Content display type excerpt/full $classes[] = 'ip-archive-item-' . ip_theme_get_content_template_type(); //Number of columns in each row $classes[] = 'ip-col-' . ip_theme_get_grid_col_number(); global $post; //If post has thumbnail if (!has_post_thumbnail($post)) { $classes[] = 'post-has-no-thumbnail'; } else { $classes[] = 'post-has-thumbnail'; } //Whether to show categories if (ip_theme_should_show_archive_categories()) { $classes[] = 'categories-showing'; } else { $classes[] = 'categories-hidden'; } //If it is a sticky post if ( is_sticky() ){ $classes[] = 'ip-archive-sticky'; } return apply_filters('ip_theme_archive_content_class', implode(' ', $classes)); } } if (!function_exists('ip_theme_get_archive_list_content_class')) { /** * Get the classes for individual post on archive and blog pages for list view * * @return string */ function ip_theme_get_archive_list_content_class() { $classes = array( 'ip-row', 'ip-archive-item' ); //Content display type excerpt/full $classes[] = 'ip-archive-item-' . ip_theme_get_content_template_type(); global $post; //If post has thumbnail if (!has_post_thumbnail($post)) { $classes[] = 'post-has-no-thumbnail'; } else { $classes[] = 'post-has-thumbnail'; } //Whether to show categories if (ip_theme_should_show_archive_categories()) { $classes[] = 'categories-showing'; } else { $classes[] = 'categories-hidden'; } //If it is a sticky post if ( is_sticky() ){ $classes[] = 'ip-archive-sticky'; } return apply_filters('ip_theme_archive_list_content_class', implode(' ', $classes)); } } if (!function_exists('ip_theme_archive_thumbnail')) { /** * Display post thumbnail on blog and archive pages * * @return void */ function ip_theme_archive_thumbnail() { if (!apply_filters('ip_theme_can_show_archive_thumbnail', !post_password_required() && !is_attachment())) return; if (has_post_thumbnail()) : ?>
%2s', esc_url(get_term_link($category)), esc_html($category->name)); } } echo apply_filters('ip_theme_archive_categories', '' . __('Posted in', 'bizflow') . '' . $category_output . ''); } } if (!function_exists('ip_theme_clearfix')) { /** * Display a full width empty html element * * @return void */ function ip_theme_clearfix() { get_template_part('template-parts/global/clearfix'); } } if (!function_exists('ip_theme_layout_start_row')) { /** * Display start of a layout row * * @return void */ function ip_theme_layout_start_row() { get_template_part('template-parts/global/row-start'); } } if (!function_exists('ip_theme_layout_end_row')) { /** * Display end of a layout row * * @return void */ function ip_theme_layout_end_row() { get_template_part('template-parts/global/row-end'); } } if (!function_exists('ip_theme_before_archive_item')) { /** * Start a new row based on the count of item in that page * * @param integer $counter * @return integer */ function ip_theme_before_archive_item($counter = 0) { // Count of item in the loop $counter++; if ($counter % (int) ip_theme_get_grid_col_number() == 1) { ip_theme_layout_start_row(); } return $counter; } } if (!function_exists('ip_theme_after_archive_item')) { /** * End a row based on the count of item in that page * * @param integer $counter * @return integer */ function ip_theme_after_archive_item($counter = 0) { //count of item in the loop $counter++; if (!ip_theme_get_grid_col_number()) return $counter; if ($counter % (int) ip_theme_get_grid_col_number() == 0) { ip_theme_layout_end_row(); ip_theme_layout_start_row(); } return $counter; } } if (!function_exists('ip_theme_archive_empty_items')) { /** * Add empty columns in a row to keep the display intact * * @param integer $counter * @return void */ function ip_theme_archive_empty_items($counter) { for ($i = 0; $i < ($counter % (int) ip_theme_get_grid_col_number()); $i++) { ?>
aria-hidden="true">
ID) . '" title="' . get_the_title($post->ID) . '">' . __('Read more', 'bizflow') . ' '; } } } if (!function_exists('ip_theme_get_single_content_class')) { /** * Get classes for single post * * @return string */ function ip_theme_get_single_content_class() { $classes = array( 'ip-single-item' ); $always_show_types = apply_filters('ip_theme_show_title_post_types', array('post')); global $post; //Whether to hide title $show_title = get_post_meta($post->ID, 'ip_theme_show_title', true); if (!in_array($post->post_type, $always_show_types) && $show_title !== 'show') { $classes[] = 'hide-entry-header'; } //If it is a sticky post if ( is_sticky() ){ $classes[] = 'ip-single-sticky'; } return apply_filters('ip_theme_single_content_class', implode(' ', $classes)); } } if (!function_exists('ip_theme_single_thumbnail')) { /** * Display single post thumbnail * * No default thumbnail here * * @return void */ function ip_theme_single_thumbnail() { if (!apply_filters('ip_theme_can_show_single_thumbnail', !post_password_required() && !is_attachment() && has_post_thumbnail())) return; ?>
%2s', esc_url(get_term_link($category)), esc_html($category->name)); } } if ($category_output) { echo apply_filters('ip_theme_single_categories', ' ' . __('Posted in', 'bizflow') . ': ' . $category_output . ''); } } } if (!function_exists('ip_theme_display_single_author_and_date')) { /** * Display date and author of single post * * @return void */ function ip_theme_display_single_author_and_date() { //Display author if only it should be, determined based on options from customizer if (ip_theme_should_show_author()) { echo apply_filters('ip_theme_single_author', sprintf( ' %s%s', __('Posted by', 'bizflow'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), esc_html(get_the_author()) )); } //Display date if only it should be, determined based on options from customizer if (ip_theme_should_show_date()) { $time_string = ''; if (get_the_time('U') !== get_the_modified_time('U')) { $time_string = ''; } $time_string = sprintf( $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()) ); echo apply_filters('ip_theme_single_date', sprintf( ' %1$s%3$s', __('Posted on', 'bizflow'), esc_url(get_permalink()), $time_string )); } } } if (!function_exists('ip_theme_display_single_tags')) { /** * Display tags of single post below content * * @return void */ function ip_theme_display_single_tags() { // Check if tags shoule be displayed based on options from customizer if (!ip_theme_should_show_single_tags()) return; global $post; $tag_output = get_the_term_list($post->ID, 'post_tag', ' ' . __('Tagged as', 'bizflow') . ': ', '', ''); if ($tag_output) { echo apply_filters('ip_theme_single_tags', $tag_output); } } } if (!function_exists('ip_theme_copyright_text')) { /** * Get copyright text, set on customizer panel or default * * @return string */ function ip_theme_copyright_text() { return apply_filters('ip_theme_copyright_text', __('All copyright reserved ©Site name, 2019', 'bizflow')); } } if( !function_exists( 'ip_theme_get_copyright_text' ) ){ function ip_theme_get_copyright_text( $copy = '' ){ if( $copyright_text = get_option( IP_THEME . 'copyright_text' ) ){ $copy = $copyright_text; } return $copy; } } if (!function_exists('ip_theme_get_discussion_data')) { /** * Get comments data * * Adapted from twenty nineteen theme * * @return array */ function ip_theme_get_discussion_data() { static $discussion, $post_id; $current_post_id = get_the_ID(); if ($current_post_id === $post_id) { return $discussion; /* If we have discussion information for post ID, return cached object */ } else { $post_id = $current_post_id; } $comments = get_comments( array( 'post_id' => $current_post_id, 'orderby' => 'comment_date_gmt', 'order' => get_option('comment_order', 'asc'), /* Respect comment order from Settings ยป Discussion. */ 'status' => 'approve', 'number' => 20, /* Only retrieve the last 20 comments, as the end goal is just 6 unique authors */ ) ); $authors = array(); foreach ($comments as $comment) { $authors[] = ((int) $comment->user_id > 0) ? (int) $comment->user_id : $comment->comment_author_email; } $authors = array_unique($authors); $discussion = (object) array( 'authors' => array_slice($authors, 0, 6), /* Six unique authors commenting on the post. */ 'responses' => get_comments_number($current_post_id), /* Number of responses. */ ); return $discussion; } } if (!function_exists('ip_theme_comment_form')) { /** * Display the comment form * * @param string $order * @return void */ function ip_theme_comment_form($order) { if (true === $order || strtolower($order) === strtolower(get_option('comment_order', 'asc'))) { comment_form( array( 'logged_in_as' => null, 'title_reply' => null, ) ); } } } if (!function_exists('ip_theme_back_to_top')) { /** * Display back to top button * * Makes it easy for visitor to reach top of the page from bottom * * @return void */ function ip_theme_back_to_top() { get_template_part('template-parts/global/back-to-top'); } }