', esc_url( get_bloginfo( 'pingback_url' ) ) ); } } add_action( 'wp_head', 'brighter_blog_pingback_header' ); /** * Fallback for primary navigation. */ if( ! function_exists( 'brighter_blog_primary_navigation_fallback' ) ) : /** * Fallback for primary navigation. * * @since 1.0.0 */ function brighter_blog_primary_navigation_fallback() { ?>
$brighter_blog_posts_per_page, 'paged' => $brighter_blog_page, 'post_type' => 'post' ); $brighter_blog_query = new WP_Query($brighter_blog_args); $brighter_blog_posts = $brighter_blog_query->posts; if (!empty($brighter_blog_posts)) { $brighter_blog_all_posts = array_merge($brighter_blog_all_posts, $brighter_blog_posts); } $brighter_blog_page++; } while (!empty($brighter_blog_posts)); $brighter_blog_choices = array(); foreach ($brighter_blog_all_posts as $brighter_blog_post) { $brighter_blog_choices[$brighter_blog_post->ID] = get_the_title($brighter_blog_post->ID); } return $brighter_blog_choices; } /** * Brighter Blog Theme Purchase Link */ if ( ! function_exists( 'brighter_blog_purchase_url' ) ) { function brighter_blog_purchase_url() { $brighter_blog_theme_purchase = 'https://checkout.freemius.com/plugin/17755/plan/29511/'; $description = sprintf( __( 'Purchase the Pro Version for More Features. Purchase Now', 'brighter-blog' ), esc_url( $brighter_blog_theme_purchase ) ); return $description; } } /** * Brighter Blog Theme Purchase Link */ if ( ! function_exists( 'brighter_blog_purchase_link' ) ) { function brighter_blog_purchase_link() { $brighter_blog_purchase = 'https://checkout.freemius.com/plugin/17755/plan/29511/'; return $brighter_blog_purchase; } } function brighter_blog_admin_notice() { // Check if the notification should be hidden $hide_notice = isset($_COOKIE['brighter_blog_admin_notice']) ? intval($_COOKIE['brighter_blog_admin_notice']) : 0; $brighter_blog_ads_banner_img = get_template_directory_uri() . '/assets/images/ads/upgrade-pro.jpg'; // Get current admin page URL $current_screen = get_current_screen(); $brighter_blog_ad_url = home_url() . '/wp-admin/admin.php?page=brighter-blog-addons'; // Check if we are on the 'brighter-blog-addons' page $is_brighter_blog_addons_page = isset($_GET['page']) && $_GET['page'] === 'brighter-blog-addons'; if (!$hide_notice && !$is_brighter_blog_addons_page) { ?> ID,true); } } add_action( 'ocdi/before_content_import', 'ocdi_before_content_import' ); /** * Add span tag in archive list count number */ function brighter_blog_span_archive_count($brighter_blog_links) { $brighter_blog_links = str_replace(' (', ' (', $brighter_blog_links); $brighter_blog_links = str_replace(')', ')', $brighter_blog_links); return $brighter_blog_links; } add_filter('get_archives_link', 'brighter_blog_span_archive_count'); /** * Add span tag in category list count number */ function brighter_blog_span_category_count($brighter_blog_links) { $brighter_blog_links = str_replace(' (', ' (', $brighter_blog_links); $brighter_blog_links = str_replace(')', ')', $brighter_blog_links); return $brighter_blog_links; } add_filter('wp_list_categories', 'brighter_blog_span_category_count'); // author social media share code function brighter_blog_author_custom_social_media_share() { global $post; $brighter_blog_author_social_post_url = urlencode(get_permalink($post->ID)); $brighter_blog_author_social_post_title = urlencode(get_the_title($post->ID)); $brighter_blog_author_social_post_url_fb = "https://www.facebook.com/sharer.php?u=".$brighter_blog_author_social_post_url; $brighter_blog_author_social_post_url_tw = "https://twitter.com/share?url=".$brighter_blog_author_social_post_url."&text=" .$brighter_blog_author_social_post_title; $brighter_blog_author_social_post_url_in = "https://www.linkedin.com/shareArticle?mini=true&url=" .$brighter_blog_author_social_post_url."&title=".$brighter_blog_author_social_post_title; $brighter_blog_author_social_post_url_insta = "https://www.instagram.com/?url=".$brighter_blog_author_social_post_url; ?> ID)); $brighter_blog_custom_social_media_post_title_no_author = urlencode(get_the_title($post->ID)); $brighter_blog_author_social_post_url_fb_no_author = "https://www.facebook.com/sharer.php?u=" .$brighter_blog_custom_social_media_post_url_no_author; $brighter_blog_author_social_post_url_tw_no_author = "https://x.com/share?url=" .$brighter_blog_custom_social_media_post_url_no_author."&text=".$brighter_blog_custom_social_media_post_title_no_author; $brighter_blog_author_social_post_url_in_no_author = "https://www.linkedin.com/shareArticle?mini=true&url=" .$brighter_blog_custom_social_media_post_url_no_author."&title=".$brighter_blog_custom_social_media_post_title_no_author; $brighter_blog_author_social_post_url_vimeo_no_author = "https://vimeo.com?u=" .$brighter_blog_custom_social_media_post_url_no_author; $brighter_blog_author_social_post_url_instagram_no_author = "https://www.instagram.com/?url=" .$brighter_blog_custom_social_media_post_url_no_author; $brighter_blog_author_social_post_url_youtube_no_author = "https://www.youtube.com/share?url=" .$brighter_blog_custom_social_media_post_url_no_author; ?> '', 'next_text' => '', 'type' => 'array', // Set type to array to customize the output. )); if ($brighter_blog_paginate_links) { ?>