本文整理汇总了PHP中AQ_Block::transform_span_to_gs方法的典型用法代码示例。如果您正苦于以下问题:PHP AQ_Block::transform_span_to_gs方法的具体用法?PHP AQ_Block::transform_span_to_gs怎么用?PHP AQ_Block::transform_span_to_gs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AQ_Block
的用法示例。
在下文中一共展示了AQ_Block::transform_span_to_gs方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: block
function block($instance)
{
extract($instance);
$width = AQ_Block::transform_span_to_gs($size);
$randID = rand(1, 99);
if (!empty($members)) {
$args = array('post_type' => array('team'), 'showposts' => $limit, 'post__in' => $members);
} else {
$args = array('post_type' => array('team'), 'showposts' => $limit);
}
$wp_query = new WP_Query($args);
?>
<div class="team showbiz-container">
<h3 class="headline"><?php
echo $title;
?>
</h3>
<span class="line" style="margin-bottom:0;"></span>
<!-- Navigation -->
<div class="showbiz-navigation">
<div id="showbiz_left_<?php
echo $randID;
?>
" class="sb-navigation-left"><i class="icon-angle-left"></i></div>
<div id="showbiz_right_<?php
echo $randID;
?>
" class="sb-navigation-right"><i class="icon-angle-right"></i></div>
</div>
<div class="clearfix"></div>
<!-- Entries -->
<div class="showbiz" data-left="#showbiz_left_<?php
echo $randID;
?>
" data-right="#showbiz_right_<?php
echo $randID;
?>
">
<div class="overflowholder">
<ul>
<?php
if ($wp_query->have_posts()) {
while ($wp_query->have_posts()) {
$wp_query->the_post();
$id = $wp_query->post->ID;
$position = get_post_meta($id, 'pp_position', true);
$social = get_post_meta($id, 'pp_socialicons', true);
echo '<li>';
if (has_post_thumbnail()) {
echo '<a href="' . get_permalink() . '">';
echo get_the_post_thumbnail($wp_query->post->ID, 'portfolio-3col', array('class' => 'mediaholder team-img'));
echo "</a>";
}
echo '<div class="team-name"><h5><a href="' . get_permalink() . '">' . get_the_title() . '</a></h5> <span>' . $position . '</span></div>
<div class="team-about"><p>' . get_the_content() . '</p></div>';
if (!empty($social)) {
echo '<ol class="social-icons">';
foreach ($social as $icon) {
echo '<li><a class="' . $icon['icons_service'] . '" href="' . $icon['icons_url'] . '"><i class="icon-' . $icon['icons_service'] . '"></i></a></li>';
}
echo '</ol>';
}
echo '<div class="clearfix"></div></li>';
}
// close the Loop
}
wp_reset_query();
?>
</ul>
<div class="clearfix"></div>
</div>
<div class="clearfix"></div>
</div>
</div>
<?php
}
示例2: block
function block($instance)
{
extract($instance);
$randID = rand(1, 99);
$size = substr($size, 4);
$insidewidth = $size - 2;
$temp_width = "span" . floor($insidewidth);
$new_witdh = AQ_Block::transform_span_to_gs($temp_width);
?>
<!-- Headline -->
<div>
<h3 class="headline"><?php
echo $title;
?>
</h3>
<span class="line" style="margin-bottom:0;"></span>
</div>
<!-- Navigation / Left -->
<div class="one alpha carousel column"><div id="showbiz_left_<?php
echo $randID;
?>
" class="sb-navigation-left-2"><i class="icon-angle-left"></i></div></div>
<!-- ShowBiz Carousel -->
<div class="our-clients-cont showbiz-container <?php
echo $new_witdh;
?>
carousel columns" >
<!-- Portfolio Entries -->
<div class="showbiz our-clients" data-left="#showbiz_left_<?php
echo $randID;
?>
" data-right="#showbiz_right_<?php
echo $randID;
?>
">
<div class="overflowholder">
<ul>
<?php
$output = '';
foreach ($clients as $client) {
if ($client['url']) {
$output .= '<li><a href="' . $client['url'] . '"><img src="' . $client['image'] . '" alt="' . $client['title'] . '" /></a></li>';
} else {
$output .= '<li><img src="' . $client['image'] . '" alt="' . $client['title'] . '" /></li>';
}
}
echo $output;
?>
</ul>
<div class="clearfix"></div>
</div>
<div class="clearfix"></div>
</div>
</div>
<!-- Navigation / Right -->
<div class="one carousel omega column"><div id="showbiz_right_<?php
echo $randID;
?>
" class="sb-navigation-right-2"><i class="icon-angle-right"></i></div></div>
<?php
}
示例3: block
function block($instance)
{
extract($instance);
$width = AQ_Block::transform_span_to_gs($size);
$randID = rand(1, 99);
?>
<div class="">
<h3 class="headline"><?php
echo $title;
?>
</h3>
<span class="line" style="margin-bottom:0;"></span>
</div>
<!-- ShowBiz Carousel -->
<div class="showbiz-container recent-work">
<!-- Navigation -->
<div class="showbiz-navigation">
<div id="showbiz_left_<?php
echo $randID;
?>
" class="sb-navigation-left"><i class="icon-angle-left"></i></div>
<div id="showbiz_right_<?php
echo $randID;
?>
" class="sb-navigation-right"><i class="icon-angle-right"></i></div>
</div>
<div class="clearfix"></div>
<!-- Portfolio Entries -->
<div class="showbiz" data-left="#showbiz_left_<?php
echo $randID;
?>
" data-right="#showbiz_right_<?php
echo $randID;
?>
">
<div class="overflowholder">
<ul>
<?php
$args = array('post_type' => 'post', 'posts_per_page' => $limit, 'orderby' => $orderby, 'order' => $order);
if ($categories) {
$args['category__in'] = $categories;
}
if ($tags) {
$args['tag__in'] = $tags;
}
$wp_query = new WP_Query($args);
if ($wp_query->found_posts > 1) {
$mfpclass = "mfp-gallery";
} else {
$mfpclass = "mfp-image";
}
if ($wp_query->have_posts()) {
while ($wp_query->have_posts()) {
$wp_query->the_post();
?>
<!-- Item -->
<li>
<div class="blog-item media">
<figure>
<div class="mediaholder <?php
if (!has_post_thumbnail()) {
echo "textholder";
}
?>
">
<?php
$thumb = get_post_thumbnail_id();
$img_url = wp_get_attachment_url($thumb);
?>
<?php
if (has_post_thumbnail()) {
?>
<a href="<?php
the_permalink();
?>
" title="<?php
the_title();
?>
">
<?php
the_post_thumbnail('portfolio-4col');
?>
<div class="hovercover">
<div class="hovericon"><i class="hoverlink"></i></div>
</div>
</a>
<?php
}
?>
<?php
if (!has_post_thumbnail()) {
$excerpt = get_the_excerpt();
$short_excerpt = string_limit_words($excerpt, 30);
echo '<p>' . $short_excerpt . '..</p>';
}
?>
//.........这里部分代码省略.........
示例4: block
function block($instance)
{
extract($instance);
$width = AQ_Block::transform_span_to_gs($size);
$randID = rand(1, 99);
if (!empty($testimonials)) {
$args = array('post_type' => array('testimonial'), 'showposts' => $limit, 'orderby' => $orderby, 'post__in' => $testimonials);
} else {
$args = array('post_type' => array('testimonial'), 'showposts' => $limit, 'orderby' => $orderby);
}
$wp_query = new WP_Query($args);
if ($type == 'standard') {
?>
<div class="testimonials_wrap showbiz-container">
<h3 class="headline"><?php
echo $title;
?>
</h3>
<span class="line" style="margin-bottom:0;"></span>
<!-- Navigation -->
<div class="showbiz-navigation">
<div id="showbiz_left_<?php
echo $randID;
?>
" class="sb-navigation-left"><i class="icon-angle-left"></i></div>
<div id="showbiz_right_<?php
echo $randID;
?>
" class="sb-navigation-right"><i class="icon-angle-right"></i></div>
</div>
<div class="clearfix"></div>
<!-- Entries -->
<div class="showbiz" data-left="#showbiz_left_<?php
echo $randID;
?>
" data-right="#showbiz_right_<?php
echo $randID;
?>
">
<div class="overflowholder">
<ul>
<?php
if ($wp_query->have_posts()) {
while ($wp_query->have_posts()) {
$wp_query->the_post();
$id = $wp_query->post->ID;
$author = get_post_meta($id, 'pp_author', true);
$link = get_post_meta($id, 'pp_link', true);
$position = get_post_meta($id, 'pp_position', true);
echo '<li class="testimonial">';
echo '<div class="testimonials">' . get_the_content() . '</div><div class="testimonials-bg"></div>';
if ($link) {
echo ' <div class="testimonials-author"><a href="' . $link . '">' . $author . '</a>';
} else {
echo ' <div class="testimonials-author">' . $author;
}
if ($position) {
echo ', <span>' . $position . '</span>';
}
echo '</div></li>';
}
wp_reset_query();
// close the Loop
}
?>
</ul>
<div class="clearfix"></div>
</div>
<div class="clearfix"></div>
</div>
</div>
<?php
} else {
?>
<div class="happywrapper ">
<!-- Navigation / Left -->
<div id="showbiz_left_<?php
echo $randID;
?>
" class="sb-navigation-left-2 alt"><i class="icon-angle-left"></i></div>
<!-- ShowBiz Carousel -->
<div id="happy-clients" class="happy-clients showbiz-container carousel " >
<!-- Portfolio Entries -->
<div class="showbiz our-clients" data-left="#showbiz_left_<?php
echo $randID;
?>
" data-right="#showbiz_right_<?php
echo $randID;
?>
">
<div class="overflowholder">
<ul>
<?php
if ($wp_query->have_posts()) {
while ($wp_query->have_posts()) {
$wp_query->the_post();
//.........这里部分代码省略.........
示例5: block
function block($instance)
{
extract($instance);
$size = substr($size, 4);
$boxes_number = count($boxes);
$columns = $size / $boxes_number;
if ($boxes_number == 3 && $size == 16) {
$new_col = "one-third";
} else {
$new_width = "span" . floor($columns);
$new_col = AQ_Block::transform_span_to_gs($new_width);
}
$output = '';
$count = 0;
$posclass = '';
foreach ($boxes as $box) {
$count++;
if ($count == 1) {
$posclass = "alpha";
} elseif ($count == $boxes_number) {
$posclass = "omega";
} else {
$posclass = "";
}
$output .= '<div class="' . $new_col . ' ' . $posclass . ' columns">';
if ($box['icon'] == 'none' && empty($box['upload'])) {
$output .= '<div class="featured-box no-margin">';
} else {
$output .= '<div class="featured-box">';
}
if (!empty($box['upload'])) {
$output .= '<div class="circle-image"><img src="' . $box['upload'] . '"/></div>';
} else {
if ($box['icon'] != 'none') {
$output .= '<div class="' . $box['style'] . '"><i class="' . $box['icon'] . '"></i><span></span></div>';
}
}
$output .= '<div class="featured-desc">';
if (isset($box['url']) && !empty($box['url'])) {
$output .= '<h3><a href="' . $box['url'] . '">' . $box['title'] . '</a></h3>';
} else {
$output .= '<h3>' . $box['title'] . '</h3>';
}
$output .= wpautop(do_shortcode(htmlspecialchars_decode($box['content'])));
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';
}
echo $output;
}
示例6: block
function block($instance)
{
extract($instance);
$width = AQ_Block::transform_span_to_gs($size);
$randID = rand(1, 99);
?>
<div class="">
<h3 class="headline"><?php
echo $title;
?>
</h3>
<span class="line" style="margin-bottom:0;"></span>
</div>
<!-- ShowBiz Carousel -->
<div class="showbiz-container recent-work">
<!-- Navigation -->
<div class="showbiz-navigation">
<div id="showbiz_left_<?php
echo $randID;
?>
" class="sb-navigation-left"><i class="icon-angle-left"></i></div>
<div id="showbiz_right_<?php
echo $randID;
?>
" class="sb-navigation-right"><i class="icon-angle-right"></i></div>
</div>
<div class="clearfix"></div>
<!-- Portfolio Entries -->
<div class="showbiz" data-left="#showbiz_left_<?php
echo $randID;
?>
" data-right="#showbiz_right_<?php
echo $randID;
?>
">
<div class="overflowholder">
<ul>
<?php
$args = array('post_type' => 'portfolio', 'posts_per_page' => $limit, 'orderby' => $orderby, 'order' => $order);
if (!empty($filters)) {
$args['tax_query'] = array(array('taxonomy' => 'filters', 'field' => 'id', 'terms' => $filters));
}
$wp_query = new WP_Query($args);
if ($wp_query->found_posts > 1) {
$mfpclass = "mfp-gallery";
} else {
$mfpclass = "mfp-image";
}
if ($wp_query->have_posts()) {
while ($wp_query->have_posts()) {
$wp_query->the_post();
?>
<!-- Item -->
<li>
<div class="portfolio-item media">
<figure>
<div class="mediaholder">
<?php
$thumb = get_post_thumbnail_id();
$img_url = wp_get_attachment_url($thumb);
$lightbox = get_post_meta($wp_query->post->ID, 'pp_pf_lightbox', true);
if ($lightbox == 'lightbox') {
$fullsize = wp_get_attachment_image_src($thumb, 'full');
?>
<a href="<?php
echo $fullsize[0];
?>
" class="<?php
echo $mfpclass;
?>
" title="<?php
the_title();
?>
">
<?php
the_post_thumbnail('portfolio-4col');
?>
<div class="hovercover">
<div class="hovericon"><i class="hoverzoom"></i></div>
</div>
</a>
<?php
} else {
?>
<a href="<?php
the_permalink();
?>
" title="<?php
the_title();
?>
">
<?php
the_post_thumbnail('portfolio-4col');
?>
<div class="hovercover">
<div class="hovericon"><i class="hoverlink"></i></div>
//.........这里部分代码省略.........