ID ) ) . '" class="more-link text-uppercase small">'.__('Continue Reading','serenity-lite').' ';
}
}
add_filter( 'excerpt_more', 'serenity_lite_excerpt_read_more_link' );
/**
* Add Bootstrap img-fluid to all content images
*/
function serenity_lite_add_image_responsive_class($content) {
global $post;
$pattern ="//i";
$replacement = '';
$content = preg_replace($pattern, $replacement, $content);
return $content;
}
add_filter('the_content', 'serenity_lite_add_image_responsive_class');
/**
* Handles JavaScript detection.
* Adds a js class to the root element when JavaScript is detected.
*/
function serenity_lite_javascript_detection() {
echo "\n";
}
add_action( 'wp_head', 'serenity_lite_javascript_detection', 0 );
/**
* Add postMessage & partials support for site title and description for the Theme Customizer.
*/
function serenity_lite_site_identity_partials_register( $wp_customize ) {
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
if ( isset( $wp_customize->selective_refresh ) ) {
$wp_customize->selective_refresh->add_partial( 'blogname', array(
'selector' => '.site-title',
'container_inclusive' => false,
'render_callback' => function() {
return bloginfo( 'name' );
},
) );
$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
'selector' => '.site-description',
'container_inclusive' => false,
'render_callback' => function() {
return bloginfo( 'description' );
},
) );
}
}
add_action( 'customize_register', 'serenity_lite_site_identity_partials_register', 11 );
/**
* Content class depending if sidebar is active or not.
*/
function serenity_lite_content_class() {
return is_active_sidebar( 'sidebar-1' )
? 'col-md-12 col-lg-8'
: 'col-md-12';
}
/**
* Internal linking in the WordPress Theme Customizer
*/
function serenity_lite_customizer_internal_links() {
?>