Ejemplo n.º 1
0
                ?>
last<?php 
            }
            ?>
">
							<div class="image-border small">
								<div class="image-wrap">
									<a href="<?php 
            echo get_permalink($product);
            ?>
" title="<?php 
            echo get_the_title($product);
            ?>
">
										<img src="<?php 
            echo themex_resize($thumbnail, 150, 150);
            ?>
" alt="" />
									</a>
								</div>
							</div>
						</div>
					<?php 
            if ($counter == 3) {
                $counter = 0;
                ?>
					</li>
					<?php 
            }
        }
    }
Ejemplo n.º 2
0
">
								<span class="fa fa-plus"></span>
							</label>
							<?php 
                foreach (ThemexWoo::$data['product']['images'] as $image) {
                    ?>
							<a href="#image_<?php 
                    echo $image;
                    ?>
" title="<?php 
                    _e('Remove Image', 'makery');
                    ?>
" class="gallery-image element-submit">
								<div class="image-border none">
									<img src="<?php 
                    echo themex_resize(wp_get_attachment_url($image), 150, 150);
                    ?>
" class="fullwidth" alt="" />
								</div>
							</a>
							<?php 
                }
                ?>
						</div>
					</td>
				</tr>
				<?php 
                if (ThemexCore::getOption('product_type', 'all') == 'all') {
                    ?>
				<tr>
					<th><?php 
Ejemplo n.º 3
0
 /**
  * Gets image
  *
  * @access public
  * @param int $ID
  * @param int $size
  * @param string $default
  * @return string
  */
 public static function getImage($ID, $size, $default)
 {
     $current = get_post_thumbnail_id($ID);
     $url = wp_get_attachment_url($current);
     $image = $default;
     if ($url !== false) {
         $thumb = themex_resize($url, $size, $size);
         if (!empty($thumb)) {
             $image = $thumb;
         }
     }
     $out = '<img src="' . $image . '" alt="" />';
     return $out;
 }
Ejemplo n.º 4
0
 /**
  * Filters default avatar
  *
  * @access public
  * @param string $avatar
  * @param int $user_id
  * @param int $size
  * @param string $default
  * @param string $alt
  * @return string
  */
 public static function getAvatar($avatar, $user, $size, $default, $alt)
 {
     if (isset($user->user_id)) {
         $user = $user->user_id;
     }
     $avatar_id = ThemexCore::getUserMeta($user, 'avatar');
     $default = wp_get_attachment_image_src($avatar_id, 'preview');
     $image = THEME_URI . 'images/avatar.png';
     if (isset($default[0])) {
         $image = themex_resize($default[0], $size, $size, true, true);
     }
     return '<img src="' . $image . '" class="avatar" width="' . $size . '" alt="' . $alt . '" />';
 }
Ejemplo n.º 5
0
 /**
  * Filters default avatar
  *
  * @access public
  * @param string $avatar
  * @param int $user_id
  * @param int $size
  * @param string $default
  * @param string $alt
  * @return string
  */
 public static function getAvatar($avatar, $user, $size, $default, $alt)
 {
     if (isset($user->user_id)) {
         $user = $user->user_id;
     }
     $avatar_id = ThemexCore::getUserMeta($user, 'avatar');
     $default = wp_get_attachment_url($avatar_id);
     $image = THEME_URI . 'images/avatar.png';
     if ($default !== false) {
         $thumbnail = themex_resize($default, $size, $size);
         if (!empty($thumbnail)) {
             $image = $thumbnail;
         }
     }
     $out = '<img src="' . $image . '" class="avatar" width="' . $size . '" alt="' . $alt . '" />';
     return $out;
 }