getThemeMod( 'header_contact_info_phone_number' );
$header_contact_info_message_above_number = ace()->getThemeMod( 'header_contact_info_message_above_number' );
$header_contact_info_message_below_number = ace()->getThemeMod( 'header_contact_info_message_below_number' );
echo '
';
}
/**
* Nav
**/
public static function headerNavi()
{
}
/**
* Archive
**/
/**
* Blog
*/
public static function renderBlogArticles( $article_type = '' )
{
echo self::getBlogArticles( $article_type );
}
public static function getBlogArticles( $article_type = '' )
{
ob_start();
if ( in_array( $article_type, array( 'slider' ) ) ) {
if ( have_posts() ) {
$article_container_class = array( 'article-container', 'swiper-container' );
echo '';
$articles_class = array( 'articles', 'post-list', 'list-in-slider', 'swiper-wrapper' );
echo '
';
while( have_posts() ) { the_post();
do_action( ace()->getPrefixedActionHook( 'render_archive_article' ), $article_type );
}
echo '
';
echo '
';
do_action( ace()->getPrefixedActionHook( 'render_pagination' ) );
} else {
echo '' . esc_html__( 'Please try to search for the page with keywords.', 'ace' ) . '
';
get_search_form();
}
} else {
if ( have_posts() ) {
$articles_class = array( 'articles', 'post-list', 'list-in-' . $article_type );
echo '';
while( have_posts() ) { the_post();
do_action( ace()->getPrefixedActionHook( 'render_archive_article' ), $article_type );
}
echo '
';
do_action( ace()->getPrefixedActionHook( 'render_pagination' ) );
} else {
echo '' . esc_html__( 'Please try to search for the page with keywords.', 'ace' ) . '
';
get_search_form();
}
}
$blog_articles = ob_get_clean();
return $blog_articles;
}
/**
* Blog Article
*/
public static function renderBlogArticle( $article_type = '' )
{
echo self::getBlogArticles( $article_type );
}
public static function getBlogArticle( $article_type = '' )
{
ob_start();
self::loadTemplatePart( 'archive/article', $type );
$article = ob_get_clean();
}
/**
* Post Item Data
**/
/**
* Thumbnail
**/
public static function renderArchiveArticleThumbnail()
{
echo self::getArchiveArticleThumbnail();
}
public static function getArchiveArticleThumbnail()
{
global $post;
ob_start();
echo '', implode( ' ', $card_classes ) );
printf( '
', implode( ' ', $card_inner_classes ) );
echo '
';
echo '';
echo '
';
echo '
';
echo $avatar_img;
echo '
';
echo '
';
echo '
';
echo '
';
if ( $has_related_posts ) {
echo '
';
}
if ( $has_belongs_data ) {
echo '
';
echo '
';
}
echo '
';
if ( $has_related_posts ) {
echo '
';
}
echo '
';
}
/**
* Print Pagination Template for Archive Page
*
* @see self::getPagination()
**/
public static function pagination() {
echo self::getPagination();
}
/**
* Get Pagination Template for Archive Page
*
* @return string
**/
public static function getPagination( $args = array() ) {
if ( ! wp_is_mobile() ) {
global $wp_query;
$total = (
isset( $wp_query->max_num_pages )
&& $wp_query->max_num_pages > 1
? $wp_query->max_num_pages
: 1
);
$current = (
get_query_var( 'paged' )
? get_query_var( 'paged' )
: 1
);
$default_args = array(
'end_size' => 3,
'mid_size' => 3,
'prev_text' => esc_html__( '« Previous', 'ace' ),
'next_text' => esc_html__( 'Next »', 'ace' ),
);
$args = wp_parse_args( $args, $default_args );
return apply_filters( ace()->getPrefixedFilterHook( 'render_pagination' ), sprintf( '', absint( $current ), absint( $total ), paginate_links( $args ) ), 'pc' );
} else {
$prev = get_previous_posts_link( esc_html__( 'To Prev', 'ace' ) );
$next = get_next_posts_link( esc_html__( 'To Next', 'ace' ) );
if ( ! $prev && ! $next ) {
return apply_filters(
ace()->getPrefixedFilterHook( 'render_pagination' ),
'',
'mobile'
);
} else {
if ( $prev ) {
$prev = '' . $prev . '
';
}
if ( $next ) {
$next = '' . $next . '
' ;
}
}
return apply_filters(
ace()->getPrefixedFilterHook( 'render_pagination' ),
'',
'mobile'
);
}
}
/**
* Singular
**/
/**
* Render Thumbnail HTML
**/
public static function singularThumbnail()
{
echo self::getSingularThumbnail();
}
/**
* Get Thumbnail HTML
**/
public static function getSingularThumbnail()
{
global $post;
$thumbnailURL = esc_url( wp_get_attachment_url( get_post_thumbnail_id() ) );
if ( false === $thumbnailURL ) {
return '';
}
$classes = array( 'singular-thumbnail' );
$post_title = wp_strip_all_tags( get_the_title( $post->ID ) );
$alt = $post_title = (
'' !== $post_title
? $post_title
: sprintf( esc_html__( 'No Titles - %s', 'ace' ), esc_html( ACE_SITE_NAME ) )
);
$atts = array(
'class' => implode( ' ', $classes ),
'alt' => $alt,
'title' => $post_title,
);
$width = 100;//absint( ace()->getThemeMod( 'archive_page_post_thumbnail_width' ) );
$height = 100;//absint( ace()->getThemeMod( 'archive_page_post_thumbnail_height' ) );
$size = $width . 'px ' . $height . 'px';
ob_start();
echo '';
self::loadTemplatePart( 'singular/tax-' . $post->post_type );
echo '
';
$html = ob_get_clean();
return apply_filters( ace()->getPrefixedFilterHook( 'render_singular_post_tax' ), $html, 'singular' );
}
/**
* Footer
**/
public static function singularFooterPrevNext()
{
echo self::getSingularFooterPrevNext();
}
public static function getSingularFooterPrevNext()
{
global $post;
$post_type = get_post_type( $post );
if ( 'post' !== $post_type || is_home() || is_front_page() ) {
return '';
}
ob_start();
self::loadTemplatePart( 'singular/prevnext' );
$html = ob_get_clean();
return apply_filters( ace()->getPrefixedFilterHook( 'render_singular_footer_prev_next' ), $html, 'singular' );
}
/**
* Footer
**/
/**
* Footer Description
**/
public static function footerNameDescription()
{
echo self::getFooterNameDescription();
}
/**
* Get Footer Description
**/
public static function getFooterNameDescription()
{
ob_start();
echo '';
$html = ob_get_clean();
return apply_filters( ace()->getPrefixedFilterHook( 'render_footer_description' ), $html );
}
/**
* Footer License
**/
public static function footerLicense()
{
echo self::getFooterLicense();
}
/**
* Get Footer Description
**/
public static function getFooterLicense()
{
$license_type = AceDataMethods::getFooterLicenseType();
if ( '' === $license_type
&& ! is_customize_preview()
) {
return '';
}
ob_start();
echo '';
$html = ob_get_clean();
return apply_filters( ace()->getPrefixedFilterHook( 'render_footer_license' ), $html );
}
/**
* Footer Theme
**/
public static function footerThemeURI()
{
echo self::getFooterThemeURI();
}
/**
* Get Footer Description
**/
public static function getFooterThemeURI()
{
ob_start();
echo '';
$html = ob_get_clean();
return apply_filters( ace()->getPrefixedFilterHook( 'render_footer_theme_uri' ), $html );
}
/**
* Footer Theme
**/
public static function footerCustomSiteInfo()
{
echo self::getFooterCustomSiteInfo();
}
/**
* Get Footer Description
**/
public static function getFooterCustomSiteInfo()
{
$custom_site_info = html_entity_decode( ace()->getThemeMod( 'footer_custom_site_info' ) );
if ( ( ! is_string( $custom_site_info ) || '' === $custom_site_info ) && ! is_customize_preview() ) return '';
ob_start();
echo '';
$html = ob_get_clean();
return apply_filters( ace()->getPrefixedFilterHook( 'render_footer_custom_site_info' ), $html );
}
// Buttons
/**
* Footer Button Set
**/
public static function footerButtonSet()
{
echo self::getFooterButtonSet();
}
public static function getFooterButtonSet()
{
$icon_set = apply_filters( ace()->getPrefixedFilterHook( 'footer_menu_icons' ), array(
'search' => array(
'xlink' => esc_attr( '#iconSearch' ),
'text' => esc_html__( 'Search', 'ace' ),
),
'go-to-home' => array(
'xlink' => esc_attr( '#iconHome' ),
'text' => esc_html__( 'Home', 'ace' ),
),
'scroll-to-top' => array(
'xlink' => esc_attr( '#iconChevronTop' ),
'text' => esc_html__( 'Top', 'ace' ),
),
'right-menu' => array(
'xlink' => esc_attr( '#iconMenuDots' ),
'text' => esc_html__( 'Widgets', 'ace' ),
),
) );
if ( ! is_array( $icon_set ) || 0 >= count( $icon_set ) ) {
return;
}
ob_start();
echo '';
$html = ob_get_clean();
return apply_filters( ace()->getPrefixedFilterHook( 'render_footer_buttons' ), $html );
}
/**
*
**/
public static function buttonWithIcon( $action, $xlink, $text, $atts = array() )
{
echo self::getButtonWithIcon( $action, $xlink, $text, $atts );
}
public static function getButtonWithIcon( $action, $xlink, $text, $atts = array() )
{
ob_start();
printf( '' );
$html = ob_get_clean();
return apply_filters( ace()->getPrefixedFilterHook( 'render_button_with_icon' ), $html, $action, $xlink, $text );
}
/**
* Mods
**/
// Content
/**
* Hooked in Filter "the_content"
* @param string $the_content
* @return string $the_content
**/
public static function contentFilter( $content ) {
// IMG Tags
$content = preg_replace_callback(
'/