本文整理汇总了PHP中colabs_image函数的典型用法代码示例。如果您正苦于以下问题:PHP colabs_image函数的具体用法?PHP colabs_image怎么用?PHP colabs_image使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了colabs_image函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: colabsthemes_uploader_custom_fields
function colabsthemes_uploader_custom_fields($pID, $id, $std, $desc)
{
// Start Uploader
$upload = get_post_meta($pID, $id, true);
$href = $upload;
$uploader = '';
$uploader .= '<input class="colabs_input_text" name="' . $id . '" type="text" value="' . esc_attr($upload) . '" />';
$uploader .= '<div class="clear"></div>' . "\n";
$uploader .= '<input type="file" name="attachement_' . $id . '" />';
$uploader .= '<input type="submit" class="button button-highlighted" value="Save" name="save"/>';
if ($href) {
$uploader .= '<span class="colabs_metabox_desc description">' . $desc . '</span></td>' . "\n" . '<td class="colabs_metabox_image"><a href="' . $upload . '">';
$uploader .= colabs_image('width=300&height=200&link=img&return=true&src=' . $href);
$uploader .= '</a>';
}
return $uploader;
}
示例2: _e
<tr class="item_property_bookmark" id="bookmark-row-<?php
echo $id;
?>
">
<td class="item-remove"><a href="javascript:void(0)" onClick="remove_item_from_bookmark(bookmark_ajax_web_url,<?php
echo $values->ID;
?>
, <?php
echo $id;
?>
);" class="remove" title="<?php
_e('Remove this item', 'colabsthemes');
?>
">×</a></td>
<td class="aligncenter"><?php
colabs_image('width=100&height=100&single=true&id=' . $id);
?>
</td>
<td class="center"><h5><a href="<?php
echo get_permalink($id);
?>
"><?php
echo get_the_title($id);
?>
</a></h5><p><?php
echo get_the_term_list($id, 'property_type', '', ', ', '');
?>
</p><p><?php
echo $address . ' ' . $citystate;
?>
</p></td>
示例3: _e
<span class="as-feature"><?php
_e('Sold', 'colabsthemes');
?>
</span>
<?php
} elseif (is_sticky($post->ID)) {
?>
<span class="as-feature"><?php
_e('Featured', 'colabsthemes');
?>
</span>
<?php
}
?>
<?php
colabs_image('width=300&before=<figure class=entry-media>&after=</figure>');
?>
<header class="entry-header">
<h2 class="entry-title"><a href="<?php
the_permalink();
?>
"><?php
the_title();
?>
</a></h2>
<?php
if (get_post_meta($post->ID, 'colabs_property_sold', true) != 'true') {
?>
<?php
$terms = wp_get_object_terms($post->ID, 'property_status');
?>
示例4: colabs_image
<div class="gallery-details">
<a href="<?php
colabs_image('link=url&size=full');
?>
" rel="lightbox"><i class="icon-eye-open"></i></a>
<a href="<?php
the_permalink();
?>
"><i class="icon-link"></i></a>
<?php
echo '<div class="like">
<p class="entry-likes" data-like="' . get_like(get_the_ID()) . '_' . get_the_ID() . '">
<i class="icon-heart ' . $_COOKIE['like_' . get_the_ID()] . '"></i>
<span>' . get_like(get_the_ID()) . '</span>
' . __("Loves", "colabsthemes") . '
</p>
</div>';
echo '<div class="time">
<p class="entry-time">
<i class="icon-time"></i>
<span>' . get_the_date() . '</span>
</p>
</div>';
?>
</div>
<?php
colabs_image('width=300&link=img');
?>
</li>
<?php
}
示例5: elseif
} elseif ($single_top[0] == 'single_image') {
$content .= '
<a href="' . colabs_image('link=url&return=true') . '" title="' . $meta . '"class="grouped" rel="lightbox">
' . colabs_image('width=626&link=img&return=true') . '
</a>';
$check_src = colabs_image('link=url&return=true');
}
}
$attachments = get_children(array('post_parent' => get_the_ID(), 'numberposts' => 100, 'post_type' => 'attachment', 'post_mime_type' => 'image'));
if (!empty($attachments)) {
$count = 0;
foreach ($attachments as $att_id => $attachment) {
$count++;
$url = wp_get_attachment_image_src($att_id, 'full', true);
if ($check_src != $url[0]) {
$content .= '<a href="' . $url[0] . '" title="' . $meta . '"class="grouped" rel="lightbox">' . colabs_image('width=626&link=img&return=true&src=' . $url[0]) . '</a>';
}
}
}
if ($content != '') {
?>
<div class="entry-top">
<div class="innercontainer">
<div class="slider">
<?php
echo $content;
?>
</div>
<div class="single-slider-nav">
示例6: file_get_contents
<?php
$content = file_get_contents("https://picasaweb.google.com/data/feed/base/user/" . get_option('colabs_username_picasa') . "?alt=rss&kind=photo&hl=id&imgmax=1600&max-results=" . get_option('colabs_piccount_picasa') . "&start-index=1");
$x = new SimpleXmlElement($content);
foreach ($x->channel->item as $entry => $value) {
$title = $value->title;
$image = $value->enclosure->attributes()->url;
$urlimg = $image[0];
$urlimgori = $image[0];
$date = str_ireplace('+0000', '', $value->pubDate);
echo '<li class="gallery-item">
<a href="' . $urlimgori . '" title="' . $title . '" rel="lightbox">
' . colabs_image('width=280&link=img&return=true&src=' . $urlimg) . '
</a>
<div class="time">
<p class="entry-time">
<i class="icon-time"></i>
<span>' . $date . '</span>
</p>
</div>
</li>';
}
示例7: get_post_custom_values
?>
</a></span>
</p>
</header>
<div class="entry-media">
<?php
$single_top = get_post_custom_values("colabs_single_top");
if ($single_top[0] != '' || $single_top[0] == 'none') {
if ($single_top[0] == 'single_video') {
$embed = colabs_get_embed('colabs_embed', 664, 350, 'single_video', $post->ID);
if ($embed != '') {
echo $embed;
}
} elseif ($single_top[0] == 'single_image') {
colabs_image('width=664');
}
}
?>
</div>
<div class="entry-content">
<?php
the_content();
?>
<div class="entry-tags"><?php
the_tags();
?>
</div>
<?php
echo colabs_share();
示例8: while
<?php
while (have_posts()) {
the_post();
if (colabs_image('link=url&return=false') == '') {
continue;
}
?>
<li class="gallery-item"><a href="<?php
colabs_image('link=url');
?>
" rel="lightbox"><?php
colabs_image('width=157&height=157&link=img');
?>
</a></li>
<?php
}
示例9: post_class
post_class('entry-post');
?>
>
<?php
$single_top = get_post_custom_values("colabs_single_top");
if ($single_top[0] != '' || $single_top[0] == 'none') {
if ($single_top[0] == 'single_video') {
$embed = colabs_get_embed('colabs_embed', '626', '200', 'single_video', $post->ID);
if ($embed != '') {
echo '<div class="entry-top"><div class="innercontainer">' . $embed . '</div></div>';
}
} elseif ($single_top[0] == 'single_image') {
colabs_image('width=626&height=200&link=img&before=<div class=entry-top><div class=innercontainer>&after=</div></div>');
}
} else {
colabs_image('width=626&height=200&link=img&before=<div class=entry-top><div class=innercontainer>&after=</div></div>');
}
?>
<div class="entry-content row">
<div class="entry-text">
<h3 class="entry-title"><a href="<?php
the_permalink();
?>
"><?php
the_title();
?>
</a></h3>
<ul class="entry-meta clearfix">
<?php
colabs_post_meta();
示例10: colabs_background_slideshow
function colabs_background_slideshow()
{
echo '<script type="text/javascript">';
query_posts(array('post_type' => 'photograph', 'meta_key' => 'colabs_feature_photograph', 'meta_value' => 'true'));
$slide = '';
while (have_posts()) {
the_post();
$slide .= "{ \n image :'" . colabs_image('link=url&return=true') . "', \n title :'" . wptexturize(get_the_title()) . "',\n url :'" . get_permalink() . "', \n caption :'" . addslashes(wptexturize(get_the_excerpt())) . "'\n },";
}
wp_reset_query();
if ($slide != '') {
echo 'slides = [' . rtrim($slide, ",") . ']';
}
echo '</script>';
}
示例11: colabsthemes_medialibrary_uploader
function colabsthemes_medialibrary_uploader($_id, $_value, $_mode = 'full', $_desc = '', $_postid = 0)
{
$output = '';
$id = '';
$class = '';
$int = '';
$value = '';
$id = strip_tags(strtolower($_id));
// If a post id is present, use it. Otherwise, search for one based on the $_id.
if ($_postid != 0) {
$int = $_postid;
} else {
$int = colabsthemes_mlu_get_silentpost($id);
// Change for each field, using a "silent" post. If no post is present, one will be created.
}
// End IF Statement
// If we're on a post add/edit screen, call the post meta value.
if ('postmeta' == $_mode) {
$value = get_post_meta($_postid, $id, true);
} else {
$value = get_option($id);
}
// End IF Statement
// If a value is passed and we don't have a stored value, use the value that's passed through.
if ($_value != '' && '' == $value) {
$value = $_value;
}
// End IF Statement
if ($value) {
$class = ' has-file';
}
// End IF Statement
$output .= '<input type="text" name="' . $id . '" id="' . $id . '" value="' . $value . '" class="upload' . $class . '" />' . "\n";
$output .= '<input id="upload_' . $id . '" class="upload_button button" type="button" value="' . __('Upload', 'colabsthemes') . '" rel="' . $int . '" />' . "\n";
if ($_desc != '') {
$output .= '<span class="colabs_metabox_desc description">' . $_desc . '</span>' . "\n";
}
// End IF Statement
$output .= '<div class="screenshot" id="' . $id . '_image">' . "\n";
if ($value != '') {
$remove = '<a href="javascript:(void);" class="mlu_remove button">Remove</a>';
$image = preg_match('/(^.*\\.jpg|jpeg|png|gif|ico*)/i', $value);
if ($image) {
$value = colabs_image('width=334&height=223&return=true&link=url&src=' . $value);
$output .= '<img src="' . $value . '" alt="" />' . $remove . '';
} else {
$parts = explode("/", $value);
for ($i = 0; $i < sizeof($parts); ++$i) {
$title = $parts[$i];
}
// End FOR Loop
// No output preview if it's not an image.
$output .= '';
// Standard generic output if it's not an image.
$title = __('View File', 'colabsthemes');
$output .= '<div class="no_image"><span class="file_link"><a href="' . $value . '" target="_blank" rel="external">' . $title . '</a></span>' . $remove . '</div>';
}
// End IF Statement
}
// End IF Statement
$output .= '</div>' . "\n";
return $output;
}
示例12: while
while ($query_products->have_posts()) {
$query_products->the_post();
$product = get_product(get_the_ID());
?>
<tr class="cart_table_item">
<td class="product-remove">
<a href="#" class="btn-delete" data-id="<?php
echo $product->id;
?>
" data-action="delete_user_product">×</a>
</td>
<td class="product-thumbnail">
<?php
colabs_image('width=90&height=90&single=false');
?>
</td>
<!-- Product Name -->
<td class="product-name">
<a href="<?php
the_permalink();
?>
"><?php
the_title();
?>
</a>
</td>
<!-- Product price -->
示例13: _e
?>
</a></li>
<?php
}
?>
<li><a href="#property-facilities"><i class="icon-tasks"></i> <?php
_e('Facilities', 'colabsthemes');
?>
</a></li>
</ul>
<div class="property-info-panel" id="property-gallery">
<div class="property-gallery-large">
<?php
colabs_image('width=600&link=img&id=' . $property->ID);
?>
</div>
</div>
<?php
if ($maps_active == 'on') {
?>
<div class="property-info-panel" id="property-maps">
<?php
$mode = get_post_meta($id, 'colabs_maps_mode', true);
$streetview = get_post_meta($id, 'colabs_maps_streetview', true);
$address = get_post_meta($id, 'colabs_maps_address', true);
$long = get_post_meta($id, 'colabs_maps_long', true);
$lat = get_post_meta($id, 'colabs_maps_lat', true);
$pov = get_post_meta($id, 'colabs_maps_pov', true);
示例14: while
</thead>
<tbody>
<?php
while ($publish_query->have_posts()) {
$publish_query->the_post();
$pending_payment = colabs_get_pending_payment($post->ID);
$expire_date = '';
$poststatus = colabs_get_post_status($post);
global $wpdb;
$total_cost = $wpdb->get_var($wpdb->prepare("SELECT cost FROM " . $wpdb->prefix . "colabs_orders WHERE property_id=%d;", $post->ID));
?>
<tr>
<td class="property-col-image text-center"><?php
colabs_image('key=property_image&width=100&height=100');
?>
</td>
<td class="property-col-title">
<h5>
<?php
if ($post->post_status == 'pending' || $post->post_status == 'draft' || $poststatus == 'ended' || $poststatus == 'offline') {
?>
<?php
the_title();
?>
<?php
} else {
?>
<a href="<?php
示例15: colabs_shortcode_pinterest
function colabs_shortcode_pinterest($atts, $content = null)
{
global $post;
$defaults = array('count' => 'horizontal', 'float' => 'none', 'url' => '', 'image_url' => '', 'description' => '', 'use_post' => 'false');
$atts = shortcode_atts($defaults, $atts);
extract($atts);
$allowed_floats = array('left' => ' fl', 'right' => ' fr', 'none' => '');
if (!in_array($float, array_keys($allowed_floats))) {
$float = 'none';
}
$allowed_counts = array('horizontal', 'vertical', 'none');
if (!in_array($count, array_keys($allowed_counts))) {
$count = 'horizontal';
}
$output = '';
// Use the custom URL, if it has been specified.
if ($atts['url'] != '') {
$url = esc_url($atts['url']);
} else {
// Use the URL to the current $post in the loop.
$url = esc_url(get_permalink($post));
}
// Use the custom image URL, if it has been specified.
if ($atts['image_url'] != '') {
$image_url = esc_url($atts['image_url']);
} else {
// Use the image of the current $post in the loop.
$image_url = esc_url(colabs_image('link=url&return=true'));
}
// Use the custom description, if it has been specified.
if ($atts['description'] != '') {
$description = esc_attr($atts['description']);
} else {
// Use the excerpt of the current $post in the loop, if no description is set and if instructed to do so.
if ('true' == $atts['use_post']) {
$description = esc_attr(strip_shortcodes(apply_filters('get_the_excerpt', $post->post_excerpt)));
}
}
$output = apply_filters('colabs_shortcode_pinterest', '<div class="shortcode-pinterest' . $allowed_floats[$float] . '"><a href="http://pinterest.com/pin/create/button/?url=' . urlencode($url) . '&media=' . urlencode($image_url) . '&description=' . urlencode($description) . '" class="pin-it-button" count-layout="' . $count . '">' . __('Pin It', 'colabsthemes') . '</a></div><!--/.shortcode-pinterest-->' . "\n", $atts);
// Enqueue the Pinterest button JavaScript from their API.
add_action('wp_footer', 'colabs_shortcode_pinterest_javascript');
add_action('colabs_shortcode_generator_preview_footer', 'colabs_shortcode_pinterest_javascript');
return $output . "\n";
}