', 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() {
echo '
';
}
endif;
// get letest post function
function brighter_blog_get_latest_posts() {
$brighter_blog_posts_per_page = 10; // Define the number of posts per page
$brighter_blog_page = 1;
$brighter_blog_all_posts = array();
do {
$brighter_blog_args = array(
'posts_per_page' => $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;
}
function brighter_blog_admin_notice_script() {
?>
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) {
?>
term_id, 'icon_for_category', true);
?>
|
|
|