';
if ( 'post' === get_post_type() ) {
$tags_list = get_the_tag_list( '', esc_html__( ' ', 'blaskan' ) );
if ( $tags_list ) {
printf( '%1$s', $tags_list ); // WPCS: XSS OK.
}
}
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
esc_html__( 'Edit %s', 'blaskan' ),
the_title( '"', '"', false )
),
'',
''
);
echo '
';
echo '';
$url = urlencode( esc_url(get_permalink()) );
$title = urlencode( esc_attr(get_the_title()) );
echo '
';
echo '
';
if ( has_post_thumbnail() ) {
$image = urlencode( esc_url((get_the_post_thumbnail_url( get_the_ID(), 'full' ))) );
echo '
';
}
echo '
';
echo '
';
}
endif;
/**
* Returns true if a blog has more than 1 category.
*
* @return bool
*/
function blaskan_categorized_blog() {
if ( false === ( $all_the_cool_cats = get_transient( 'blaskan_categories' ) ) ) {
// Create an array of all the categories that are attached to posts.
$all_the_cool_cats = get_categories( array(
'fields' => 'ids',
'hide_empty' => 1,
// We only need to know if there is more than one category.
'number' => 2,
) );
// Count the number of categories that are attached to the posts.
$all_the_cool_cats = count( $all_the_cool_cats );
set_transient( 'blaskan_categories', $all_the_cool_cats );
}
if ( $all_the_cool_cats > 1 ) {
// This blog has more than 1 category so blaskan_categorized_blog should return true.
return true;
} else {
// This blog has only 1 category so blaskan_categorized_blog should return false.
return false;
}
}
/**
* Flush out the transients used in blaskan_categorized_blog.
*/
function blaskan_category_transient_flusher() {
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
return;
}
// Like, beat it. Dig?
delete_transient( 'blaskan_categories' );
}
add_action( 'edit_category', 'blaskan_category_transient_flusher' );
add_action( 'save_post', 'blaskan_category_transient_flusher' );
function blaskan_jetpack_featured_image() {
if ( ! function_exists( 'jetpack_featured_images_remove_post_thumbnail' ) ) {
return true;
}
$options = get_theme_support( 'jetpack-content-options' );
if ( ! isset( $options[0]['featured-images'] ) ) {
return true;
}
$featured_image_options = $options[0]['featured-images'];
if ( ( is_home() || is_archive() ) && $featured_image_options['archive'] ) {
return true;
} elseif ( is_page() && $featured_image_options['page'] ) {
return true;
} elseif ( is_single() && $featured_image_options['post'] ) {
return true;
}
return false;
}
add_filter( 'the_content_more_link', 'blaskan_create_read_more_link' );
function blaskan_create_read_more_link( $more_link ){
$output = '';
return $output;
}