Exemplo n.º 1
0
 function axiom_post_get_stream_page_title($title, $page)
 {
     if (!empty($title)) {
         return $title;
     }
     if (in_array($page, array('blog', 'error', 'search', 'archives_day', 'archives_month', 'archives_year', 'category', 'tag', 'author', 'attachment', 'single'))) {
         //, 'page', 'home'
         if (($page_id = axiom_post_get_stream_page_id(0, 'blog')) > 0) {
             $title = axiom_get_post_title($page_id);
         } else {
             $title = __('All posts', 'axiom');
         }
     }
     return $title;
 }
Exemplo n.º 2
0
 function axiom_woocommerce_get_stream_page_title($title, $page)
 {
     if (!empty($title)) {
         return $title;
     }
     if (axiom_strpos($page, 'woocommerce') !== false) {
         if (($page_id = axiom_woocommerce_get_stream_page_id(0, $page)) > 0) {
             $title = axiom_get_post_title($page_id);
         } else {
             $title = __('Shop', 'axiom');
         }
     }
     return $title;
 }
Exemplo n.º 3
0
 function axiom_tribe_events_get_stream_page_title($title, $page)
 {
     if (!empty($title)) {
         return $title;
     }
     if (axiom_strpos($page, 'tribe') !== false) {
         if (($page_id = axiom_tribe_events_get_stream_page_id(0, $page)) > 0) {
             $title = axiom_get_post_title($page_id);
         } else {
             $title = __('All Events', 'axiom');
         }
     }
     return $title;
 }
Exemplo n.º 4
0
 function axiom_get_resized_image_tag($post, $w = null, $h = null, $c = null, $u = true, $find_thumb = false, $itemprop = false)
 {
     static $mult = 0;
     if ($mult == 0) {
         $mult = min(2, max(1, axiom_get_theme_option("retina_ready")));
     }
     if (is_object($post)) {
         $alt = axiom_get_post_title($post->ID);
     } else {
         if ((int) $post > 0) {
             $alt = axiom_get_post_title($post);
         } else {
             $alt = basename($post);
         }
     }
     $url = axiom_get_resized_image_url($post, $w ? $w * $mult : $w, $h ? $h * $mult : $h, $c, $u, $find_thumb);
     return $url != '' ? '<img class="wp-post-image"' . ($w ? ' width="' . esc_attr($w) . '"' : '') . ($h ? ' height="' . esc_attr($h) . '"' : '') . ' alt="' . esc_attr($alt) . '" src="' . esc_url($url) . '"' . ($itemprop ? ' itemprop="image"' : '') . '>' : '';
 }