function landx_testimonial_single($atts, $content = NULL) { extract(shortcode_atts(array('name' => '', 'title' => '', 'website' => '', 'image' => ''), $atts)); if ($image > 0) { $arr = explode(',', $image); //print_r($arr); $image_attributes = wp_get_attachment_image_src(intval($arr[0]), 'full'); $image_url = $image_attributes[0]; } else { $image_url = ''; } $html = '<div class="single-feedback"> <div class="client-pic">'; if ($image_url != '') { $resize_image_url = landx_image_resize($image_url, 71, 71, true, '', false); $html .= '<img src="' . $resize_image_url . '" alt="client image">'; } else { $html .= '<img src=" http://placehold.it/71x71" alt="client image">'; } $html .= '</div> <div class="box"> <p class="message">' . $content . '</p> </div> <div class="client-info"> <div class="client-name colored-text strong">' . $name . '</div> <div class="company">' . $title . '</div> </div> </div>'; return $html; }
function fix_caps_gallery_wpse43558($output, $attr) { global $post; static $instance = 0; $instance++; $size_class = ''; /** * will remove this since we don't want an endless loop going on here */ // Allow plugins/themes to override the default gallery template. //$output = apply_filters('post_gallery', '', $attr); // We're trusting author input, so let's at least make sure it looks like a valid orderby statement if (isset($attr['orderby'])) { $attr['orderby'] = sanitize_sql_orderby($attr['orderby']); if (!$attr['orderby']) { unset($attr['orderby']); } } extract(shortcode_atts(array('order' => 'ASC', 'orderby' => 'menu_order ID', 'id' => $post->ID, 'itemtag' => 'div', 'icontag' => 'dt', 'captiontag' => 'dd', 'columns' => 3, 'size' => '', 'include' => '', 'exclude' => ''), $attr)); $id = intval($id); if ('RAND' == $order) { $orderby = 'none'; } if (!empty($include)) { $include = preg_replace('/[^0-9,]+/', '', $include); $_attachments = get_posts(array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby)); $attachments = array(); foreach ($_attachments as $key => $val) { $attachments[$val->ID] = $_attachments[$key]; } } elseif (!empty($exclude)) { $exclude = preg_replace('/[^0-9,]+/', '', $exclude); $attachments = get_children(array('post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby)); } else { $attachments = get_children(array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby)); } if (empty($attachments)) { return ''; } if (is_feed()) { $output = "\n"; foreach ($attachments as $att_id => $attachment) { $output .= wp_get_attachment_link($att_id, $size, true) . "\n"; } return $output; } $itemtag = tag_escape($itemtag); $captiontag = tag_escape($captiontag); $columns = intval($columns); $itemwidth = $columns > 0 ? floor(100 / $columns) : 100; $float = is_rtl() ? 'right' : 'left'; $selector = "gallery-{$instance}"; $gallery_style = $gallery_div = ''; if (apply_filters('use_default_gallery_style', true)) { /** * this is the css you want to remove * #1 in question */ /* */ $size_class = $size != '' ? sanitize_html_class($size) : 'normal'; } $gallery_div = "<div id='{$selector}' class='gallery galleryid-{$id} gallery-size-{$size_class}'><div class='row'>"; $output = apply_filters('gallery_style', $gallery_style . "\n\t\t" . $gallery_div); $i = 1; $col = 12 / $columns; $width = round(1180 / $columns); $height = $width; foreach ($attachments as $id => $attachment) { $link = isset($attr['link']) && 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false); $image_url = wp_get_attachment_url($id, $size, false, false); $attatchement_image = landx_image_resize($image_url, $width, $height, true, false, false); $class = $i % $columns == 0 ? ' last' : ''; $output .= "<{$itemtag} class='col-xs-12 col-sm-6 col-md-{$col} col-lg-{$col}{$class}'><div class='gallery-item'>"; $output .= "<a data-lightbox-gallery='screenshots-gallery' href='" . $image_url . "' ><img src='" . $attatchement_image . "' alt='images thumb' /></a><h5>" . $attachment->post_excerpt . "</h5></div>\n </{$itemtag}>"; $i++; } $output .= "</div></div>\n"; return $output; }