">
ID}\" class=\"more-link\">" .__('Read More','arilewp')."";
}
add_filter( 'the_content_more_link', 'arilewp_read_more_button_class' );
function arilewp_post_thumbnail() {
if(has_post_thumbnail()){
echo '';
the_post_thumbnail( '', array( 'class'=>'img-fluid' ) );
echo '';
}
}
// theme page header title functions
function arilewp_theme_page_header_title(){
if( is_archive() )
{
echo '';
}
elseif( is_404() )
{
echo '';
}
elseif( is_search() )
{
echo '';
}
else
{
echo '';
}
}
// theme page header Url functions
function arilewp_page_url() {
$page_url = 'http';
if ( key_exists("HTTPS", $_SERVER) && ( $_SERVER["HTTPS"] == "on" ) ){
$page_url .= "s";
}
$page_url .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$page_url .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$page_url .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $page_url;
}
// theme page header breadcrumbs functions
if( !function_exists('arilewp_page_header_breadcrumbs') ):
function arilewp_page_header_breadcrumbs() {
global $post;
$home_Link = home_url();
echo '';
if (is_home() || is_front_page()) :
echo '- '.esc_html__('Home','arilewp').'
';
echo '- '; echo single_post_title(); echo '
';
else:
echo '- '.esc_html__('Home','arilewp').'
';
if ( is_category() ) {
echo '- ' . esc_html__('Archive by category','arilewp').' "' . single_cat_title('', false) . '"
';
} elseif ( is_day() ) {
echo '- '. esc_html ( get_the_time('Y') ).'';
echo '
- '.esc_html ( get_the_time('F') ).'';
echo '
- '. esc_html ( get_the_time('d') ).'
';
} elseif ( is_month() ) {
echo '- ' . esc_html ( get_the_time('Y') ). '';
echo '
- '. esc_html ( get_the_time('F') ) .'
';
} elseif ( is_year() ) {
echo '- '. esc_html ( get_the_time('Y') ) .'
';
} elseif ( is_single() && !is_attachment() && is_page('single-product') ) {
if ( get_post_type() != 'post' ) {
$cat = get_the_category();
$cat = $cat[0];
echo '- ';
echo esc_html ( get_category_parents($cat, TRUE, '') );
echo '
';
echo '- '. wp_title( '',false ) .'
';
} }
elseif ( is_page() && $post->post_parent ) {
$parent_id = $post->post_parent;
$breadcrumbs = array();
while ($parent_id) {
$page = get_page($parent_id);
$breadcrumbs[] = '- ' . get_the_title($page->ID) . '';
$parent_id = $page->post_parent;
}
$breadcrumbs = array_reverse($breadcrumbs);
foreach ($breadcrumbs as $crumb) echo esc_html( $crumb );
echo '
- '. esc_html( get_the_title() ) .'
';
}
elseif( is_search() )
{
echo '- '. get_search_query() .'
';
}
elseif( is_404() )
{
echo '- '.esc_html__('Error 404','arilewp').'
';
}
else {
echo '- '. esc_html( get_the_title() ) .'
';
}
endif;
echo '
';
}
endif;
if ( ! function_exists( 'arilewp_sanitize_select' ) ) :
/**
* Sanitize select, radio.
*
*/
function arilewp_sanitize_select( $input, $setting ) {
// Get list of choices from the control associated with the setting.
$choices = $setting->manager->get_control( $setting->id )->choices;
// If the input is a valid key, return it; otherwise, return the default.
return ( array_key_exists( $input, $choices ) ? $input : $setting->default );
}
endif;
function arilewp_sanitize_text( $input ) {
return wp_kses_post( force_balance_tags( $input ) );
}
function arilewp_custom_customizer_options() {
$arilewp_testomonial_background_image = get_theme_mod('arilewp_testomonial_background_image');
$arilewp_page_header_background_image = get_theme_mod('arilewp_page_header_background_image');
$arilewp_sticky_bar_logo = get_theme_mod('arilewp_sticky_bar_logo');
?>