post_parent ) : get_adjacent_post( false, '', true );
$next = get_adjacent_post( false, '', false );
if ( ! $next && ! $previous ) {
return;
}
?>
%2$s';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string .= '';
}
$time_string = sprintf(
$time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);
printf(
/* translators: 1 - Publish date, 2 - Author */
__( 'Posted on %1$s by %2$s', 'zerif-lite' ),
sprintf(
'%2$s',
esc_url( get_permalink() ),
$time_string
),
sprintf(
'%2$s',
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
esc_html( get_the_author() )
)
);
}
endif;
if ( ! function_exists( 'zerif_categorized_blog' ) ) :
/**
* Returns true if a blog has more than 1 category.
*
* @return bool
*/
function zerif_categorized_blog() {
if ( false === ( $all_the_cool_cats = get_transient( 'zerif_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( 'zerif_categories', $all_the_cool_cats );
}
if ( $all_the_cool_cats > 1 ) {
// This blog has more than 1 category so zerif_categorized_blog should return true.
return true;
} else {
// This blog has only 1 category so zerif_categorized_blog should return false.
return false;
}
}
endif;
if ( ! function_exists( 'zerif_category_transient_flusher' ) ) :
/**
* Flush out the transients used in zerif_categorized_blog.
*/
function zerif_category_transient_flusher() {
delete_transient( 'zerif_categories' );
}
endif;
add_action( 'edit_category', 'zerif_category_transient_flusher' );
add_action( 'save_post', 'zerif_category_transient_flusher' );
if ( ! function_exists( 'zerif_404_title_function' ) ) :
/**
* Add title on 404 pages
*/
function zerif_404_title_function() {
echo '
' . __( 'Oops! That page can’t be found.', 'zerif-lite' ) . '
';
}
endif;
if ( ! function_exists( 'zerif_404_content_function' ) ) :
/**
* Add content on 4040 pages
*/
function zerif_404_content_function() {
echo '' . __( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'zerif-lite' ) . '
';
}
endif;
if ( ! function_exists( 'zerif_page_header_function' ) ) :
/**
* Add header title on pages
*/
function zerif_page_header_function() {
?>
', '' );
}
endif;
if ( ! function_exists( 'zerif_page_term_description_archive_function' ) ) :
/**
* Add archive description
*/
function zerif_page_term_description_archive_function() {
the_archive_description( '', '
' );
}
endif;
if ( ! function_exists( 'zerif_footer_widgets_function' ) ) :
/**
* Footer widgets areas
*/
function zerif_footer_widgets_function() {
if ( is_active_sidebar( 'zerif-sidebar-footer' ) || is_active_sidebar( 'zerif-sidebar-footer-2' ) || is_active_sidebar( 'zerif-sidebar-footer-3' ) ) :
echo '';
endif;
}
endif;
if ( ! function_exists( 'zerif_our_focus_header_title_function' ) ) :
/**
* Title in the header area of the Our Focus section
*/
function zerif_our_focus_header_title_function() {
$zerif_ourfocus_title_default = get_theme_mod( 'zerif_ourfocus_title' );
if ( ! empty( $zerif_ourfocus_title_default ) ) {
$zerif_ourfocus_title = get_theme_mod( 'zerif_ourfocus_title_2', $zerif_ourfocus_title_default );
} elseif ( current_user_can( 'edit_theme_options' ) ) {
$zerif_ourfocus_title = get_theme_mod( 'zerif_ourfocus_title_2', sprintf( '%2$s', esc_url( admin_url( 'customize.php?autofocus[control]=zerif_ourfocus_title' ) ), __( 'FEATURES', 'zerif-lite' ) ) );
} else {
$zerif_ourfocus_title = get_theme_mod( 'zerif_ourfocus_title_2' );
}
if ( ! empty( $zerif_ourfocus_title ) ) :
echo '' . wp_kses_post( $zerif_ourfocus_title ) . '
';
elseif ( is_customize_preview() ) :
echo '';
endif;
}
endif;
if ( ! function_exists( 'zerif_our_focus_header_subtitle_function' ) ) :
/**
* Subtitle in the header area of the Our Focus section
*/
function zerif_our_focus_header_subtitle_function() {
if ( current_user_can( 'edit_theme_options' ) ) {
/* translators: Our focus section in customizer */
$zerif_ourfocus_subtitle = get_theme_mod( 'zerif_ourfocus_subtitle', sprintf( __( 'Change this subtitle in %s', 'zerif-lite' ), sprintf( '%2$s', esc_url( admin_url( 'customize.php?autofocus[control]=zerif_ourfocus_subtitle' ) ), __( 'Our focus section', 'zerif-lite' ) ) ) );
} else {
$zerif_ourfocus_subtitle = get_theme_mod( 'zerif_ourfocus_subtitle' );
}
if ( ! empty( $zerif_ourfocus_subtitle ) ) :
echo '' . wp_kses_post( $zerif_ourfocus_subtitle ) . '
';
elseif ( is_customize_preview() ) :
echo '';
endif;
}
endif;
if ( ! function_exists( 'zerif_our_team_header_title_function' ) ) :
/**
* Title in the header area of the Our Team section
*/
function zerif_our_team_header_title_function() {
if ( current_user_can( 'edit_theme_options' ) ) {
$zerif_ourteam_title = get_theme_mod( 'zerif_ourteam_title', sprintf( '%2$s', esc_url( admin_url( 'customize.php?autofocus[control]=zerif_ourteam_title' ) ), __( 'YOUR TEAM', 'zerif-lite' ) ) );
} else {
$zerif_ourteam_title = get_theme_mod( 'zerif_ourteam_title' );
}
if ( ! empty( $zerif_ourteam_title ) ) :
echo '' . wp_kses_post( $zerif_ourteam_title ) . '
';
elseif ( is_customize_preview() ) :
echo '';
endif;
}
endif;
if ( ! function_exists( 'zerif_our_team_header_subtitle_function' ) ) :
/**
* Subtitle in the header area of the Our Team section
*/
function zerif_our_team_header_subtitle_function() {
if ( current_user_can( 'edit_theme_options' ) ) {
/* translators: Our team section in customizer */
$zerif_ourteam_subtitle = get_theme_mod( 'zerif_ourteam_subtitle', sprintf( __( 'Change this subtitle in %s', 'zerif-lite' ), sprintf( '%2$s', esc_url( admin_url( 'customize.php?autofocus[control]=zerif_ourteam_subtitle' ) ), __( 'Our team section', 'zerif-lite' ) ) ) );
} else {
$zerif_ourteam_subtitle = get_theme_mod( 'zerif_ourteam_subtitle' );
}
if ( ! empty( $zerif_ourteam_subtitle ) ) :
echo '' . wp_kses_post( $zerif_ourteam_subtitle ) . '
';
elseif ( is_customize_preview() ) :
echo '';
endif;
}
endif;
if ( ! function_exists( 'zerif_testimonials_header_title_function' ) ) :
/**
* Title in the header area of the Testimonials section
*/
function zerif_testimonials_header_title_function() {
if ( current_user_can( 'edit_theme_options' ) ) {
$zerif_testimonials_title = get_theme_mod( 'zerif_testimonials_title', sprintf( '%2$s', esc_url( admin_url( 'customize.php?autofocus[control]=zerif_testimonials_title' ) ), __( 'Testimonials', 'zerif-lite' ) ) );
} else {
$zerif_testimonials_title = get_theme_mod( 'zerif_testimonials_title' );
}
if ( ! empty( $zerif_testimonials_title ) ) :
echo '' . wp_kses_post( $zerif_testimonials_title ) . '
';
elseif ( is_customize_preview() ) :
echo '';
endif;
}
endif;
if ( ! function_exists( 'zerif_testimonials_header_subtitle_function' ) ) :
/**
* Subtitle in the header area of the Testimonials section
*/
function zerif_testimonials_header_subtitle_function() {
$zerif_testimonials_subtitle = get_theme_mod( 'zerif_testimonials_subtitle' );
if ( ! empty( $zerif_testimonials_subtitle ) ) :
echo '' . wp_kses_post( $zerif_testimonials_subtitle ) . '
';
elseif ( is_customize_preview() ) :
echo '';
endif;
}
endif;
if ( ! function_exists( 'zerif_latest_news_header_title_function' ) ) :
/**
* Title in the header area of the Latest News section
*/
function zerif_latest_news_header_title_function() {
$zerif_latestnews_title = get_theme_mod( 'zerif_latestnews_title' );
if ( ! empty( $zerif_latestnews_title ) ) :
echo '' . wp_kses_post( $zerif_latestnews_title ) . '
';
else :
echo '' . __( 'Latest news', 'zerif-lite' ) . '
';
endif;
}
endif;
if ( ! function_exists( 'zerif_latest_news_header_subtitle_function' ) ) :
/**
* Subtitle in the header area of the Latest News section
*/
function zerif_latest_news_header_subtitle_function() {
$zerif_latestnews_subtitle = get_theme_mod( 'zerif_latestnews_subtitle' );
if ( ! empty( $zerif_latestnews_subtitle ) ) :
echo '' . wp_kses_post( $zerif_latestnews_subtitle ) . '
';
elseif ( is_customize_preview() ) :
echo '';
endif;
}
endif;
if ( ! function_exists( 'zerif_big_title_text_function' ) ) :
/**
* Title in the header area of the Big title section
*/
function zerif_big_title_text_function() {
$zerif_bigtitle_title_default = get_theme_mod( 'zerif_bigtitle_title' );
if ( ! empty( $zerif_bigtitle_title_default ) ) {
$zerif_bigtitle_title = get_theme_mod( 'zerif_bigtitle_title_2', $zerif_bigtitle_title_default );
} elseif ( current_user_can( 'edit_theme_options' ) ) {
/* translators: Customizer link for Big title section */
$zerif_bigtitle_title = get_theme_mod( 'zerif_bigtitle_title_2', sprintf( __( 'This piece of text can be changed in %s', 'zerif-lite' ), sprintf( '%2$s', esc_url( admin_url( 'customize.php?autofocus[control]=zerif_bigtitle_title_2' ) ), __( 'Big title section', 'zerif-lite' ) ) ) );
} else {
$zerif_bigtitle_title = get_theme_mod( 'zerif_bigtitle_title_2' );
}
if ( ! empty( $zerif_bigtitle_title ) ) :
echo '' . wp_kses_post( $zerif_bigtitle_title ) . '
';
elseif ( is_customize_preview() ) :
echo '';
endif;
}
endif;
if ( ! function_exists( 'zerif_about_us_header_title_function' ) ) :
/**
* Title in the header area of the About us section
*/
function zerif_about_us_header_title_function() {
if ( current_user_can( 'edit_theme_options' ) ) {
$zerif_aboutus_title = get_theme_mod( 'zerif_aboutus_title', sprintf( '%2$s', esc_url( admin_url( 'customize.php?autofocus[control]=zerif_aboutus_title' ) ), __( 'About', 'zerif-lite' ) ) );
} else {
$zerif_aboutus_title = get_theme_mod( 'zerif_aboutus_title' );
}
if ( ! empty( $zerif_aboutus_title ) ) :
echo '' . wp_kses_post( $zerif_aboutus_title ) . '
';
elseif ( is_customize_preview() ) :
echo '';
endif;
}
endif;
if ( ! function_exists( 'zerif_about_us_header_subtitle_function' ) ) :
/**
* Subtitle in the header area of the About us section
*/
function zerif_about_us_header_subtitle_function() {
if ( current_user_can( 'edit_theme_options' ) ) {
/* translators: About us section in customizer */
$zerif_aboutus_subtitle = get_theme_mod( 'zerif_aboutus_subtitle', sprintf( __( 'Change this subtitle in %s', 'zerif-lite' ), sprintf( '%2$s', esc_url( admin_url( 'customize.php?autofocus[control]=zerif_aboutus_subtitle' ) ), __( 'About us section', 'zerif-lite' ) ) ) );
} else {
$zerif_aboutus_subtitle = get_theme_mod( 'zerif_aboutus_subtitle' );
}
if ( ! empty( $zerif_aboutus_subtitle ) ) :
echo '';
echo wp_kses_post( $zerif_aboutus_subtitle );
echo '
';
elseif ( is_customize_preview() ) :
echo '' . wp_kses_post( $zerif_aboutus_subtitle ) . '
';
endif;
}
endif;
if ( ! function_exists( 'zerif_sidebar_function' ) ) :
/**
* Get the sidebar
*/
function zerif_sidebar_function() {
?>
'primary' ) );
echo '';
?>