?>
" data-projectid="<?php 
echo isset($project_id) ? $project_id : '';
?>
">
	<div class="id-product-infobox">
		<div class="product-wrapper">
			<?php 
echo do_action('id_widget_before', $project_id, $mini_deck);
?>
			<?php 
echo do_action('id_mini_widget_before', $project_id);
?>
			<div class="pledge">
				<?php 
$mini_image = ID_Project::get_project_thumbnail($mini_deck->post_id);
?>
				<?php 
if (!$custom || $custom && isset($attrs['project_title'])) {
    ?>
					<h2 class="id-product-title"><a href="<?php 
    echo getProjectURLfromType($project_id);
    ?>
"><?php 
    echo stripslashes(get_the_title($mini_deck->post_id));
    ?>
</a></h2>
				<?php 
}
?>
				<?php 
Ejemplo n.º 2
0
            echo '<div id="fb-root"></div><div id="share-fb" class="fb-like social-share social-button" data-send="false" data-layout="button_count" data-width="100" data-show-faces="false"></div>';
        }
        if (isset($settings->prod_page_twitter) && $settings->prod_page_twitter) {
            //$post_output .= '<div style="float:right;"><a href="http://twitter.com/share" target="_new" class="twitter-share-button button twitter" data-count="vertical">tweet</a></div>';
            echo '<div id="share-twitter" class="social-share social-button"><a href="https://twitter.com/share" class="twitter-share-button">' . __('Tweet', 'fivehundred') . '</a>
			<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></div>';
        }
        if (isset($settings->prod_page_linkedin) && $settings->prod_page_linkedin) {
            echo '<div id="share-linkedin" class="social-share social-button"><script src="//platform.linkedin.com/in.js" type="text/javascript"></script>
			<script type="IN/Share"></script></div>';
        }
        if (isset($settings->prod_page_google) && $settings->prod_page_google) {
            echo '<div id="share-google" class="social-share social-button"><script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script><g:plusone size="medium"></g:plusone></div>';
        }
        if (isset($settings->prod_page_pinterest) && $settings->prod_page_pinterest) {
            echo '<div id="share-pinterest" class="social-share social-button"><a href="http://pinterest.com/pin/create/button/?url=' . currentPageURL() . '&media=' . ID_Project::get_project_thumbnail($post_id) . '" class="pin-it-button" count-layout="horizontal"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a><script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script></div>';
        }
    }
}
?>
<div id="share-embed" class="social-share"><i class="fa fa-code"></i></div>
<div class="embed-box social-share" style="display: none;">
	<code>&#60;iframe frameBorder="0" scrolling="no" src="<?php 
echo home_url();
?>
/?ig_embed_widget=1&product_no=<?php 
echo isset($project_id) ? $project_id : '';
?>
" width="214" height="366"&#62;&#60;/iframe&#62;</code>
</div>
<div class="clear"></div>
<?php

echo isset($float) ? '<div class="id-content-wrap id-complete-projcont" data-projectid="' . (isset($project_id) ? $project_id : '') . '">' : '<div class="id-content-wrap" data-projectid="' . (isset($project_id) ? $project_id : '') . '">';
?>
<div class="product-post-output" style="clear: both;">
	<?php 
echo do_action('id_content_before', $project_id);
$video = get_post_meta($post_id, "ign_product_video", true);
?>
	<div class="product-video-container <?php 
echo !empty($video) ? 'hasvideo' : '';
?>
">
		<div class="aspect-ratio-maker"></div>
		<?php 
$id_project_thumbnail = ID_Project::get_project_thumbnail($post_id);
if (empty($id_project_thumbnail)) {
    //$id_project_thumbnail = idcf_project_placeholder_image();
}
?>
		<div class="id_thevideo" style="background-image: url(<?php 
echo $id_project_thumbnail;
?>
)"> <?php 
echo html_entity_decode(stripslashes($video));
?>
</div>
	</div>
	<?php 
include ID_PATH . 'templates/_socialButtons.php';
?>
function id_projectImage($attrs)
{
    global $wpdb;
    if (isset($attrs['product']) && isset($attrs['image'])) {
        $project_id = $attrs['product'];
        $image_no = $attrs['image'];
        $project = new ID_Project($project_id);
        $post_id = $project->get_project_postid();
        if ($image_no == 1) {
            $image = ID_Project::get_project_thumbnail($post_id);
        } else {
            $image = get_post_meta($post_id, "ign_product_image" . $image_no, true);
        }
        return '<div class="product-image-container" style="clear: both;"><img src="' . $image . '" /></div>';
    } else {
        return null;
    }
}
Ejemplo n.º 5
0
function the_project_image($id, $num)
{
    if ($num == 1) {
        if (method_exists('ID_Project', 'get_project_thumbnail')) {
            $image = ID_Project::get_project_thumbnail($id, 'fivehundred_featured');
        } else {
            $project_id = get_post_meta($id, 'ign_project_id', true);
            global $wpdb;
            $url = get_post_meta($id, 'ign_product_image1', true);
            $sql = $wpdb->prepare('SELECT ID FROM ' . $wpdb->prefix . 'posts WHERE guid = %s', $url);
            $res = $wpdb->get_row($sql);
            if (isset($res->ID)) {
                $src = wp_get_attachment_image_src($res->ID, 'fivehundred_featured');
                $image = $src[0];
            } else {
                $image = $url;
            }
        }
    } else {
        if ($num == 2) {
            $project_id = get_post_meta($id, 'ign_project_id', true);
            global $wpdb;
            $url = get_post_meta($id, 'ign_product_image2', true);
            $sql = $wpdb->prepare('SELECT ID FROM ' . $wpdb->prefix . 'posts WHERE guid = %s', $url);
            $res = $wpdb->get_row($sql);
            if (isset($res->ID)) {
                $src = wp_get_attachment_image_src($res->ID, '');
                $image = $src[0];
            } else {
                $image = $url;
            }
        } else {
            $key = 'ign_product_image' . $num;
            $image = get_post_meta($id, $key, true);
        }
    }
    return $image;
}
function ide_add_project_order_thumbnail($thumbnail, $last_order)
{
    $order_id = $last_order->id;
    $mdid_order = mdid_by_orderid($order_id);
    if (!empty($mdid_order)) {
        $pay_id = $mdid_order->pay_info_id;
        $id_order = new ID_Order($pay_id);
        $get_order = $id_order->get_order();
        if (!empty($get_order)) {
            $project_id = $get_order->product_id;
            $project = new ID_Project($project_id);
            $post_id = $project->get_project_postid();
            if ($post_id > 0) {
                $thumbnail = ID_Project::get_project_thumbnail($post_id);
            }
        }
    }
    return $thumbnail;
}
function idc_checkout_image($post_id)
{
    global $wpdb;
    $image = ID_Project::get_project_thumbnail($post_id, 'id_checkout_image');
    if (empty($image)) {
        // $image = idcf_project_placeholder_image('checkout');
    }
    return $image;
}