'; $home_title = 'Home'; // Get the query & post information global $post, $wp_query; // Do not display on the homepage if ( ! is_front_page() ) { echo '
'; echo '
    '; echo '
  • ' . esc_html( $home_title ) . '
  • ';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo '
  • '; if ( is_archive() ) { if ( ! is_tax() && ! is_category() && ! is_tag() ) { echo '
  • ' . post_type_archive_title( '', false ) . '
  • '; } else { $post_type = get_post_type(); if ( $post_type != 'post' ) { $post_type_object = get_post_type_object( $post_type ); $post_type_archive = get_post_type_archive_link( $post_type ); echo '
  • ' . esc_html( $post_type_object->labels->name ) . '
  • '; echo '
  • '; } echo '
  • ' . single_term_title( '', false ) . '
  • '; } } elseif ( is_single() ) { $post_type = get_post_type(); if ( $post_type != 'post' ) { $post_type_object = get_post_type_object( $post_type ); $post_type_archive = get_post_type_archive_link( $post_type ); echo '
  • ' . esc_html( $post_type_object->labels->name ) ) . '
  • '; echo '
  • '; } $category = get_the_category(); if ( ! empty( $category ) ) { $last_category = end( $category ); $cat_parents = rtrim( get_category_parents( $last_category->term_id, true, ',' ), ',' ); $cat_parents = explode( ',', $cat_parents ); foreach ( $cat_parents as $parent ) { echo '
  • ' . $parent . '
  • ';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo '
  • '; } } echo '
  • ' . get_the_title() . '
  • ';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } elseif ( is_page() ) { if ( $post->post_parent ) { $ancestors = get_post_ancestors( $post->ID ); $ancestors = array_reverse( $ancestors ); foreach ( $ancestors as $ancestor ) { echo '
  • ' . get_the_title( $ancestor ) . '
  • ';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo '
  • '; } } echo '
  • ' . get_the_title() . '
  • ';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } elseif ( is_category() ) { echo '
  • ' . single_cat_title( '', false ) . '
  • '; } elseif ( is_tag() ) { echo '
  • ' . single_tag_title( '', false ) . '
  • '; } elseif ( is_day() ) { echo '
  • ' . get_the_time( 'Y' ) . '
  • ';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo '
  • '; echo '
  • ' . get_the_time( 'F' ) . '
  • ';/// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo '
  • '; echo '
  • ' . get_the_time( 'jS' ) . '
  • ';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } elseif ( is_month() ) { echo '
  • ' . get_the_time( 'Y' ) . '
  • ';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo '
  • '; echo '
  • ' . get_the_time( 'F' ) . '
  • ';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } elseif ( is_year() ) { echo '
  • ' . get_the_time( 'Y' ) . '
  • ';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } elseif ( is_author() ) { global $author; $userdata = get_userdata( $author ); echo '
  • Author: ' . esc_html( $userdata->display_name ) . '
  • '; } elseif ( is_search() ) { echo '
  • Search results for: ' . get_search_query() . '
  • '; } elseif ( is_404() ) { echo '
  • Error 404
  • '; } echo '
'; echo '
'; } } // Add breadcrumb action add_action( 'blog_reflection_breadcrumb', 'blog_reflection_breadcrumb' ); // Post pagination function function blog_reflection_post_pagination() { the_posts_pagination( array( 'screen_reader_text' => '', 'prev_text' => '', 'next_text' => '', 'type' => 'list', 'mid_size' => 1, ) ); } //Dark logo function blog_reflection_dark_logo_customize_register($wp_customize) { // Add a setting for the dark mode logo $wp_customize->add_setting('dark_mode_logo', array( 'default' => '', 'transport' => 'refresh', 'sanitize_callback' => 'blog_reflection_sanitize_image_url', )); // Add the control for the dark mode logo $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'dark_mode_logo', array( 'label' => __('Dark Mode Logo', 'blog-reflection'), 'section' => 'title_tagline', 'settings' => 'dark_mode_logo', ))); } add_action('customize_register', 'blog_reflection_dark_logo_customize_register'); // Sanitization callback function for the dark mode logo URL function blog_reflection_sanitize_image_url($url) { return esc_url_raw($url); } //Add custom menu function blog_reflection_menu_page() { add_menu_page(// phpcs:ignore WPThemeReview.PluginTerritory.NoAddAdminPages.add_menu_pages_add_menu_page 'Blog Reflection', // Page title 'Blog Reflection', // Menu title 'manage_options', // Capability 'blog-reflection', // Menu slug 'blog_reflection_menu_page_content', // Function to display page content 'dashicons-format-aside', // Icon URL (dashicons for WP icons) 6 // Position ); } add_action( 'admin_menu', 'blog_reflection_menu_page' ); function blog_reflection_menu_page_content() { if(class_exists('Advanced_Import')) { $blog_reflection_home_url = home_url().'/wp-admin/themes.php?page=advanced-import'; } else{ $blog_reflection_home_url = home_url().'/wp-admin/themes.php?page=tgmpa-install-plugins&plugin_status=install'; } ?>


array( array( 'key' => 'video_url', 'value' => '', // Checks for a non-empty value 'compare' => '!=' // Not equal to an empty string ) ), 'category__in' => $blog_reflection_video_post_category, 'order' => $blog_reflection_video_order, 'orderby' => $blog_reflection_video_orderby, 'posts_per_page' => $blog_reflection_video_post_number, ); $blog_reflection_video_post_query = new WP_Query($blog_reflection_video_post_args); if ($blog_reflection_video_post_query->have_posts()){ ?>


have_posts()) : while ($blog_reflection_video_post_query->have_posts()) : $blog_reflection_video_post_query->the_post(); $blog_reflection_video_post_get_video_url = get_post_meta(get_the_ID(), 'video_url', true); $blog_reflection_video_post_categories = get_the_category(); $blog_reflection_video_post_img = (get_the_post_thumbnail_url()) ? get_the_post_thumbnail_url() : get_template_directory_uri() . '/assets/images/no-image.jpg'; // Get post date $blog_reflection_video_post_date = get_the_date('Y-m-d'); // Get the post thumbnail ID $blog_reflection_video_post_thumbnail_id = get_post_thumbnail_id(get_the_ID()); if (get_the_post_thumbnail_url()) { $video_post_image_alt_text = get_post_meta($blog_reflection_video_post_thumbnail_id, '_wp_attachment_image_alt', true); } else { $video_post_image_alt_text = 'No Image'; } // Extract year, month, and day $blog_reflection_video_post_year = get_the_date('Y'); $blog_reflection_video_post_month = get_the_date('m'); $blog_reflection_video_post_day = get_the_date('d'); // Get date URL $blog_reflection_video_date_url = get_day_link($blog_reflection_video_post_year, $blog_reflection_video_post_month, $blog_reflection_video_post_day); if (strlen(get_the_title()) > 5) { // Trim to the first 5 characters and add ellipsis $blog_reflection_video_main_title = substr(get_the_title(), 0, 48) . '...'; } else { // If the title is less than or equal to 5 characters, display it as is $blog_reflection_video_main_title = get_the_title(); } ?>
<?php echo esc_attr($video_post_image_alt_text); ?>

have_posts()) : while ($blog_reflection_video_post_query->have_posts()) : $blog_reflection_video_post_query->the_post(); $blog_reflection_get_video_url = get_post_meta(get_the_ID(), 'video_url', true); $blog_reflection_video_post_category = get_the_category(); $cat_url = get_category_link($blog_reflection_video_post_category[0]->term_id); $blog_reflection_tag_color = array('style-dark-green', 'style-red', 'style-blue'); // Example colors, adjust as needed // Get the categories of the specific post if (!empty($blog_reflection_video_post_category)) { $custom_field_cat_color = get_term_meta($blog_reflection_video_post_category[0]->term_id, 'term_color', true); $random_color = $blog_reflection_tag_color[array_rand($blog_reflection_tag_color)]; } else { $custom_field_cat_color = ''; } $blog_reflection_video_post_img = (get_the_post_thumbnail_url()) ? get_the_post_thumbnail_url() : get_template_directory_uri() . '/assets/images/no-image.jpg'; $blog_reflection_get_video_icon = get_template_directory_uri() . '/assets/images/wave.svg'; // Get the post thumbnail ID $video_post_image_thumbnail_id = get_post_thumbnail_id(get_the_ID()); if (get_the_post_thumbnail_url()) { $video_post_image_alt_text = get_post_meta($video_post_image_thumbnail_id, '_wp_attachment_image_alt', true); } else { $video_post_image_alt_text = 'No Image'; } // Get post date $post_date = get_the_date('Y-m-d'); // Extract year, month, and day $blog_reflection_video_post_year = get_the_date('Y'); $blog_reflection_video_post_month = get_the_date('m'); $blog_reflection_video_post_day = get_the_date('d'); // Get date URL $date_url = get_day_link($blog_reflection_video_post_year, $blog_reflection_video_post_month, $blog_reflection_video_post_day); if (strlen(get_the_title()) > 5) { // Trim to the first 5 characters and add ellipsis $blog_reflection_video_right_title = substr(get_the_title(), 0, 20) . '...'; } else { // If the title is less than or equal to 5 characters, display it as is $blog_reflection_video_right_title = get_the_title(); } ?>
<?php echo esc_attr($video_post_image_alt_text) ?>
<?php echo esc_attr($video_post_image_alt_text) ?>
name); ?>
array( 'title' => __( 'Default Demo One', 'blog-reflection' ),/*Title*/ 'is_pro' => false,/*Is Premium*/ 'author' => __( 'MyCodeCare', 'blog-reflection' ),/*Author Name*/ 'keywords' => array( 'Default 1' ),/*Search keyword*/ 'categories' => array( 'default'),/*Categories*/ 'template_url' => array( 'content' => $demo_image_link.'/default-demo-content.json',/*Full URL Path to content.json*/ 'options' => $demo_image_link.'/default-demo-options.json',/*Full URL Path to options.json*/ 'widgets' => $demo_image_link.'/default-demo-widgets.json'/*Full URL Path to widgets.json*/ ), 'screenshot_url' => $demo_image_link.'/default-demo.jpg',/*Full URL Path to demo screenshot image*/ 'demo_url' => $live_preview_demo.'/',/*Full URL Path to Live Demo*/ ), 'demo2' =>array( 'title' => __( 'Default Demo Two', 'blog-reflection' ),/*Title*/ 'is_pro' => false,/*Is Premium*/ 'author' => __( 'MyCodeCare', 'blog-reflection' ),/*Author Name*/ 'keywords' => array( 'Default 2'),/*Search keyword*/ 'categories' => array( 'default'),/*Categories*/ 'template_url' => array( 'content' => $demo_image_link.'/default-demo-two-content.json',/*Full URL Path to content.json*/ 'options' => $demo_image_link.'/default-demo-two-options.json',/*Full URL Path to options.json*/ 'widgets' => $demo_image_link.'/default-demo-two-widgets.json'/*Full URL Path to widgets.json*/ ), 'screenshot_url' => $demo_image_link.'/default-demo-two.jpg',/*Full URL Path to demo screenshot image*/ 'demo_url' => $live_preview_demo.'/default-demo',/*Full URL Path to Live Demo*/ ), 'pro-demo1' =>array( 'title' => __( 'Business Demo Pro', 'blog-reflection' ),/*Title*/ 'is_pro' => true,/*Is Premium : Support Premium Version*/ 'pro_url' => 'https://checkout.freemius.com/mode/dialog/plugin/16758/plan/27963/',/*Premium version/Pricing Url*/ 'author' => __( 'MyCodeCare', 'blog-reflection' ),/*Author Name*/ 'keywords' => array( 'Business' ),/*Search keyword*/ 'categories' => array( 'business' ),/*Categories*/ 'template_url' => array(/* Optional for premium theme, you can add your own logic by hook*/ 'content' => '#',/*Full URL Path to content.json*/ 'options' => '#',/*Full URL Path to options.json*/ 'widgets' => '#'/*Full URL Path to widgets.json*/ ), 'screenshot_url' => $demo_image_link.'/business-demo.jpg',/*Full URL Path to demo screenshot image*/ 'demo_url' => $live_preview_demo.'/demo-business',/*Full URL Path to Live Demo*/ ), 'pro-demo2' =>array( 'title' => __( 'Fashion Demo Pro', 'blog-reflection' ),/*Title*/ 'is_pro' => true,/*Is Premium : Support Premium Version*/ 'pro_url' => 'https://checkout.freemius.com/mode/dialog/plugin/16758/plan/27963/',/*Premium version/Pricing Url*/ 'author' => __( 'MyCodeCare', 'blog-reflection' ),/*Author Name*/ 'keywords' => array( 'Fashion', ),/*Search keyword*/ 'categories' => array( 'fashion' ),/*Categories*/ 'template_url' => array(/* Optional for premium theme, you can add your own logic by hook*/ 'content' => '#',/*Full URL Path to content.json*/ 'options' => '#',/*Full URL Path to options.json*/ 'widgets' => '#'/*Full URL Path to widgets.json*/ ), 'screenshot_url' => $demo_image_link.'/fashion.jpg',/*Full URL Path to demo screenshot image*/ 'demo_url' => $live_preview_demo.'/demo-fashion',/*Full URL Path to Live Demo*/ ), 'pro-demo3' =>array( 'title' => __( 'Fashion Demo Pro', 'blog-reflection' ),/*Title*/ 'is_pro' => true,/*Is Premium : Support Premium Version*/ 'pro_url' => 'https://checkout.freemius.com/mode/dialog/plugin/16758/plan/27963/',/*Premium version/Pricing Url*/ 'author' => __( 'MyCodeCare', 'blog-reflection' ),/*Author Name*/ 'keywords' => array( 'Fashion'),/*Search keyword*/ 'categories' => array( 'fashion' ),/*Categories*/ 'template_url' => array(/* Optional for premium theme, you can add your own logic by hook*/ 'content' => '#',/*Full URL Path to content.json*/ 'options' => '#',/*Full URL Path to options.json*/ 'widgets' => '#'/*Full URL Path to widgets.json*/ ), 'screenshot_url' => $demo_image_link.'/fashion-two.jpg',/*Full URL Path to demo screenshot image*/ 'demo_url' => $live_preview_demo.'/demo-fashion-two',/*Full URL Path to Live Demo*/ ), 'pro-demo4' =>array( 'title' => __( 'Fitness Demo Pro', 'blog-reflection' ),/*Title*/ 'is_pro' => true,/*Is Premium : Support Premium Version*/ 'pro_url' => 'https://checkout.freemius.com/mode/dialog/plugin/16758/plan/27963/',/*Premium version/Pricing Url*/ 'author' => __( 'MyCodeCare', 'blog-reflection' ),/*Author Name*/ 'keywords' => array( 'Fitness'),/*Search keyword*/ 'categories' => array( 'fitness' ),/*Categories*/ 'template_url' => array(/* Optional for premium theme, you can add your own logic by hook*/ 'content' => '#',/*Full URL Path to content.json*/ 'options' => '#',/*Full URL Path to options.json*/ 'widgets' => '#'/*Full URL Path to widgets.json*/ ), 'screenshot_url' => $demo_image_link.'/fitness.jpg',/*Full URL Path to demo screenshot image*/ 'demo_url' => $live_preview_demo.'/demo-fitness',/*Full URL Path to Live Demo*/ ), 'pro-demo5' =>array( 'title' => __( 'Food Demo Pro', 'blog-reflection' ),/*Title*/ 'is_pro' => true,/*Is Premium : Support Premium Version*/ 'pro_url' => 'https://checkout.freemius.com/mode/dialog/plugin/16758/plan/27963/',/*Premium version/Pricing Url*/ 'author' => __( 'MyCodeCare', 'blog-reflection' ),/*Author Name*/ 'keywords' => array( 'Food', ),/*Search keyword*/ 'categories' => array( 'food'),/*Categories*/ 'template_url' => array(/* Optional for premium theme, you can add your own logic by hook*/ 'content' => '#',/*Full URL Path to content.json*/ 'options' => '#',/*Full URL Path to options.json*/ 'widgets' => '#'/*Full URL Path to widgets.json*/ ), 'screenshot_url' => $demo_image_link.'/food-demo.jpg',/*Full URL Path to demo screenshot image*/ 'demo_url' => $live_preview_demo.'/food',/*Full URL Path to Live Demo*/ ), 'pro-demo6' =>array( 'title' => __( 'Lifestyle Demo Pro', 'blog-reflection' ),/*Title*/ 'is_pro' => true,/*Is Premium : Support Premium Version*/ 'pro_url' => 'https://checkout.freemius.com/mode/dialog/plugin/16758/plan/27963/',/*Premium version/Pricing Url*/ 'author' => __( 'MyCodeCare', 'blog-reflection' ),/*Author Name*/ 'keywords' => array( 'Lifestyle', ),/*Search keyword*/ 'categories' => array( 'lifestyle', ),/*Categories*/ 'template_url' => array(/* Optional for premium theme, you can add your own logic by hook*/ 'content' => '#',/*Full URL Path to content.json*/ 'options' => '#',/*Full URL Path to options.json*/ 'widgets' => '#'/*Full URL Path to widgets.json*/ ), 'screenshot_url' => $demo_image_link.'/lifestyle.jpg',/*Full URL Path to demo screenshot image*/ 'demo_url' => $live_preview_demo.'/demo-lifestyle',/*Full URL Path to Live Demo*/ ), 'pro-demo7' =>array( 'title' => __( 'Lifestyle Two Demo Pro', 'blog-reflection' ),/*Title*/ 'is_pro' => true,/*Is Premium : Support Premium Version*/ 'pro_url' => 'https://checkout.freemius.com/mode/dialog/plugin/16758/plan/27963/',/*Premium version/Pricing Url*/ 'author' => __( 'MyCodeCare', 'blog-reflection' ),/*Author Name*/ 'keywords' => array( 'Lifestyle', ),/*Search keyword*/ 'categories' => array( 'lifestyle', ),/*Categories*/ 'template_url' => array(/* Optional for premium theme, you can add your own logic by hook*/ 'content' => '#',/*Full URL Path to content.json*/ 'options' => '#',/*Full URL Path to options.json*/ 'widgets' => '#'/*Full URL Path to widgets.json*/ ), 'screenshot_url' => $demo_image_link.'/lifestyle-two.jpg',/*Full URL Path to demo screenshot image*/ 'demo_url' => $live_preview_demo.'/demo-lifestyle-two',/*Full URL Path to Live Demo*/ ), 'pro-demo8' =>array( 'title' => __( 'Technology Demo Pro', 'blog-reflection' ),/*Title*/ 'is_pro' => true,/*Is Premium : Support Premium Version*/ 'pro_url' => 'https://checkout.freemius.com/mode/dialog/plugin/16758/plan/27963/',/*Premium version/Pricing Url*/ 'author' => __( 'MyCodeCare', 'blog-reflection' ),/*Author Name*/ 'keywords' => array( 'Technology', ),/*Search keyword*/ 'categories' => array( 'technology', ),/*Categories*/ 'template_url' => array(/* Optional for premium theme, you can add your own logic by hook*/ 'content' => '#',/*Full URL Path to content.json*/ 'options' => '#',/*Full URL Path to options.json*/ 'widgets' => '#'/*Full URL Path to widgets.json*/ ), 'screenshot_url' =>$demo_image_link.'/technology.jpg',/*Full URL Path to demo screenshot image*/ 'demo_url' => $live_preview_demo.'/technology',/*Full URL Path to Live Demo*/ ), 'pro-demo9' =>array( 'title' => __( 'Technology Two Demo Pro', 'blog-reflection' ),/*Title*/ 'is_pro' => true,/*Is Premium : Support Premium Version*/ 'pro_url' => 'https://checkout.freemius.com/mode/dialog/plugin/16758/plan/27963/',/*Premium version/Pricing Url*/ 'author' => __( 'MyCodeCare', 'blog-reflection' ),/*Author Name*/ 'keywords' => array( 'Technology', ),/*Search keyword*/ 'categories' => array( 'technology', ),/*Categories*/ 'template_url' => array(/* Optional for premium theme, you can add your own logic by hook*/ 'content' => '#',/*Full URL Path to content.json*/ 'options' => '#',/*Full URL Path to options.json*/ 'widgets' => '#'/*Full URL Path to widgets.json*/ ), 'screenshot_url' => $demo_image_link.'/technology-two.jpg',/*Full URL Path to demo screenshot image*/ 'demo_url' => $live_preview_demo.'/demo-technology-two',/*Full URL Path to Live Demo*/ ), 'pro-demo10' =>array( 'title' => __( 'Technology Three Demo Pro', 'blog-reflection' ),/*Title*/ 'is_pro' => true,/*Is Premium : Support Premium Version*/ 'pro_url' => 'https://checkout.freemius.com/mode/dialog/plugin/16758/plan/27963/',/*Premium version/Pricing Url*/ 'author' => __( 'MyCodeCare', 'blog-reflection' ),/*Author Name*/ 'keywords' => array( 'Technology', ),/*Search keyword*/ 'categories' => array( 'technology', ),/*Categories*/ 'template_url' => array(/* Optional for premium theme, you can add your own logic by hook*/ 'content' => '#',/*Full URL Path to content.json*/ 'options' => '#',/*Full URL Path to options.json*/ 'widgets' => '#'/*Full URL Path to widgets.json*/ ), 'screenshot_url' => $demo_image_link.'/technology-three.jpg',/*Full URL Path to demo screenshot image*/ 'demo_url' => $live_preview_demo.'/demo-technology-three',/*Full URL Path to Live Demo*/ ), ); return $blog_reflection_demo_lists; } if (!class_exists('Blog_Reflection_Pro')) { add_filter('advanced_import_demo_lists','blog_reflection_prefix_demo_import_lists'); }