Ejemplo n.º 1
0
             <?php 
 $override_with_theme_options = ot_get_option('uxbarn_to_setting_override_post_meta_info');
 // Meta info settings from Theme Options
 $show_meta_theme_options = ot_get_option('uxbarn_to_post_single_post_element_display');
 // Single page's elements
 $show_author_box = '';
 if ($override_with_theme_options) {
     $show_author_box = !empty($show_meta_theme_options) ? isset($show_meta_theme_options[0]) ? $show_meta_theme_options[0] : '' : '';
 } else {
     $show_author_box = uxbarn_get_array_value(uxbarn_get_array_value(get_post_meta($post->ID, 'uxbarn_post_single_post_element_display'), 0), 0);
 }
 $show_tags = '';
 if ($override_with_theme_options) {
     $show_tags = !empty($show_meta_theme_options) ? isset($show_meta_theme_options[1]) ? $show_meta_theme_options[1] : '' : '';
 } else {
     $show_tags = uxbarn_get_array_value(uxbarn_get_array_value(get_post_meta($post->ID, 'uxbarn_post_single_post_element_display'), 0), 1);
 }
 ?>
             
             <?php 
 if ($show_author_box) {
     ?>
                 
                 <!-- Author Box -->
                 <div id="author-box">
                     <?php 
     echo get_avatar(get_the_author_meta('user_email'), 90, '', get_the_author());
     ?>
                     <div id="author-info">
                         <h3>About <?php 
     echo get_the_author();
Ejemplo n.º 2
0
                     if ($tax_image) {
                         $custom_header_image_url = $tax_image;
                         //$attachment = uxbarn_get_attachment(uxbarn_get_attachment_id_from_src($tax_image));
                         //$header_image_img = '<img src="' . $tax_image . '" alt="' . $attachment['alt'] . '" class="stretch-image" />';
                     }
                 }
             }
         } else {
             if (is_404()) {
                 $custom_header_image_url = ot_get_option('uxbarn_to_setting_upload_404_header_image');
             } else {
                 if (is_search()) {
                     $custom_header_image_url = ot_get_option('uxbarn_to_setting_upload_search_header_image');
                 } else {
                     // Normal page
                     $custom_header_image_url = uxbarn_get_array_value(get_post_meta($post->ID, 'uxbarn_page_header_image_upload'), 0);
                 }
             }
         }
     }
 }
 $attachment = uxbarn_get_attachment(uxbarn_get_attachment_id_from_src($custom_header_image_url));
 $header_width = '2000';
 $header_height = '330';
 $final_image_url = $custom_header_image_url;
 // [0] = requested size, [1] = width, [2] = height
 $image_array = wp_get_attachment_image_src(uxbarn_get_attachment_id_from_src($custom_header_image_url), 'header-image');
 if ($image_array) {
     $final_image_url = $image_array[0];
     $header_width = $image_array[1];
     $header_height = $image_array[2];