' . esc_html( get_bloginfo( 'description', 'display' ) ) . '
';
}
}
if ( ! $echo ) {
return $html;
}
echo $html;
}
}
if ( ! function_exists( 'azonbooster_get_sidebar' ) ) {
/**
* Display azonbooster sidebar
*
* @uses get_sidebar()
* @since 1.0.0
*/
function azonbooster_get_sidebar() {
get_sidebar();
}
}
if ( ! function_exists( 'azonbooster_page_header' ) ) {
/**
* Display the page header
*
* @since 1.0.0
*/
function azonbooster_page_header() {
?>
'
' . __( 'Pages:', 'azonbooster' ),
'after' => '
',
) );
?>
' . get_the_title() . ''
)
);
}
do_action( 'azonbooster_post_content_after' );
wp_link_pages( array(
'before' => '
' . __( 'Pages:', 'azonbooster' ),
'after' => '
',
) );
?>
%3$s', $position, $link , $label);
}
}
if ( ! function_exists( 'azonbooster_related_posts' ) ) {
/**
* Display related post
*
* @since 1.2.3
* @return void
*/
function azonbooster_related_posts() {
global $post;
$show_related_posts = apply_filters('azonbooster_show_related_posts', true);
// Return if hide related posts
if ( ! $show_related_posts || ! is_single() ) return;
$style = apply_filters('azonbooster_show_related_posts_style', 'grid' );
$num_posts = apply_filters('azonbooster_show_related_posts_num_posts', 8 );
$related_by = apply_filters('azonbooster_show_related_posts_by', 'cat' );
$order_by = apply_filters('azonbooster_show_related_posts_orderby', 'date' );
$order = apply_filters('azonbooster_show_related_posts_order', 'DESC' );
$args = array(
'posts_per_page' => $num_posts,
'post__not_in' => array( $post->ID ),
'no_found_rows' => true,
'order' => $order,
'orderby' => $order_by
);
/**
* Render by option
*/
if ( $related_by == 'author' ) {
$args['author'] = get_the_author_meta('ID');
} elseif ( $related_by == 'tag' ) {
$tags = wp_get_post_tags( $post->ID, array( 'fields' => 'ids' ) );
$args['tag__in'] = $tags;
} elseif ( $related_by == 'rand') {
$args['orderby'] = 'rand';
} else {
$args['category__in'] = wp_get_post_categories( $post->ID );
}
$posts = get_posts( $args );
if ( $posts ) {
$rlp = AzonBooster_Related_Posts::instance();
$rlp->render_related_posts( $posts, $style );
}
}
}
if ( ! function_exists( 'azonbooster_post_nav' ) ) {
/**
* Display navigation to next/previous post when applicable.
*/
function azonbooster_post_nav() {
$show_post_nav = apply_filters('azonbooster_show_post_nav', true);
if ( $show_post_nav ) {
$args = array(
'next_text' => '%title',
'prev_text' => '%title',
);
the_post_navigation( $args );
}
}
}
if ( ! function_exists( 'azonbooster_paging_nav' ) ) {
/**
* Display navigation to next/previous set of posts when applicable.
*/
function azonbooster_paging_nav() {
global $wp_query;
$args = array(
'type' => 'list',
'next_text' => _x( 'Next', 'Next post', 'azonbooster' ),
'prev_text' => _x( 'Previous', 'Previous post', 'azonbooster' ),
);
the_posts_pagination( $args );
}
}
if ( ! function_exists( 'azonbooster_footer_widgets' ) ) {
/**
* Display the footer widget regions.
*
* @since 1.0.0
* @return void
*/
function azonbooster_footer_widgets() {
$rows = intval( apply_filters( 'azonbooster_footer_widget_rows', 2 ) );
$regions = intval( apply_filters( 'azonbooster_footer_widget_columns', 4 ) );
for ( $row = 1; $row <= $rows; $row++ ) :
// Defines the number of active columns in this footer row.
for ( $region = $regions; 0 < $region; $region-- ) {
if ( is_active_sidebar( 'footer-' . strval( $region + $regions * ( $row - 1 ) ) ) ) {
$columns = $region;
break;
}
}
if ( isset( $columns ) ) : ?>
AzonBooster %3$s %4$s', 'https://boosterwp.com', esc_attr__('AzonBooster Theme - The Best Free Amazon Affiliate WordPress Themes', 'azonbooster'), esc_html__('Designed by', 'azonbooster'), $credit_url ); ?>
'',
'modified' => __('Last updated', 'azonbooster'),
'author' => __('By ', 'azonbooster'),
'category' => '',
'comment' => '',
'tag' => '',
));
$postmeta = '';
/**
* Allow theme author enable or disable post meta data
*
* @var [type]
*/
$metadata = apply_filters('azonbooster_enable_post_metadata', array(
'date',
'author',
'category',
'tag',
'comment'
));
foreach ( $metadata as $md) {
switch ( $md ) {
case 'date':
$postmeta .= azonbooster_meta_date( $prefix );
break;
case 'author':
$postmeta .= azonbooster_meta_author( $prefix[$md] );
break;
case 'category':
$postmeta .= azonbooster_meta_category( $prefix[$md] );
break;
case 'tag':
$postmeta .= azonbooster_meta_tag( $prefix[$md] );
break;
case 'comment':
$postmeta .= azonbooster_meta_comments( $prefix[$md] );
break;
}
}
if ( $postmeta ) { ?>
'
' . __( 'Pages:', 'azonbooster' ),
'after' => '
',
) );
?>