} $image_id = get_post_thumbnail_id(); $image_url = wp_get_attachment_image_src($image_id, 'full'); $image_url = $image_url[0]; echo '<img src="' . $image_url . '" style="max-height: ' . $height . 'px;" class="logo" />'; echo '</a>'; ?> </li> <?php } wp_reset_query(); ?> </ul> </div> <div class="clear"></div> <div class="clear"></div> </div> <div class="clear"></div> </div> <div class="clear"></div> <?php yit_enqueue_script('jquery-imagesloaded', YIT_Logos()->plugin_assets_url . '/js/jquery.imagesloaded.min.js', array('jquery'), '', true); yit_enqueue_script('owl-carousel', YIT_Logos()->plugin_assets_url . '/js/owl.carousel.min.js', array('jquery'), '', true); if ($active_bw == 'yes') { yit_enqueue_script('black-and-white', YIT_Logos()->plugin_assets_url . '/js/jQuery.BlackAndWhite.js', array('jquery'), '', true); } echo $html; add_action('wp_footer', array(YIT_Logos(), 'add_handler'), 30);
} //combines with user attributes $atts = shortcode_atts($default_atts, $atts); $atts['content'] = $content; } // remove validate attrs foreach ($atts as $att => $v) { unset($all_atts[$att]); } ob_start(); yit_plugin_get_template($this->plugin_path, 'shortcodes/' . $shortcode . '.php', $atts); $shortcode_html = ob_get_clean(); return apply_filters('yit_shortcode_' . $shortcode, $shortcode_html, $shortcode); } } /** * Main instance of plugin * * @return object * @since 1.0 * @author Emanuela Castorina <*****@*****.**> */ function YIT_Logos() { return YIT_Logos::instance(); } /** * Create a new YIT_LOGOS object */ YIT_Logos();
<?php if ($logo_link != '') { echo '<a href="' . esc_url($logo_link) . '" class="bwWrapper">'; } else { echo '<a href="#" class="bwWrapper" >'; } $image_id = get_post_thumbnail_id(); $image_url = wp_get_attachment_image_src($image_id, 'full'); echo '<img src="' . esc_url($image_url[0]) . '" style="max-height:' . $height . 'px; width:auto" class="logo" width="' . $image_url[1] . '" height="' . $image_url[2] . '" alt="' . get_the_title() . '" />'; echo '</a>'; ?> </li> <?php } wp_reset_query(); ?> </ul> </div> <div class="clear"></div> <div class="clear"></div> </div> <div class="clear"></div> </div> <div class="clear"></div> <?php if ($active_bw == 'yes') { yit_enqueue_script('black-and-white', YIT_Logos()->plugin_assets_url . '/js/jQuery.BlackAndWhite.js', array('jquery'), '', true); } echo $html;