Beispiel #1
0
                            echo '<img src="' . get_template_directory_uri() . '/img/no-portfolio-item.jpg" alt="no image added yet." />';
                        }
                    }
                }
            }
        }
        ?>
						
						<?php 
        //extra content
        $options = get_option('salient');
        if (!post_password_required()) {
            $portfolio_extra_content = get_post_meta($post->ID, '_nectar_portfolio_extra_content', true);
            if (!empty($portfolio_extra_content)) {
                echo '<div id="portfolio-extra">';
                $extra_content = shortcode_empty_paragraph_fix(apply_filters('the_content', $portfolio_extra_content));
                echo do_shortcode($extra_content);
                echo '</div>';
            }
        } else {
            if ($fwp == 'enabled') {
                the_content();
            }
        }
        $theme_skin = !empty($options['theme-skin']) && $options['theme-skin'] == 'ascend' ? 'ascend' : 'default';
        if (comments_open() && $theme_skin != 'ascend') {
            ?>
						
							<div class="comments-section">
				   			   <?php 
            comments_template();
Beispiel #2
0
function hb_list_shortcode($params = array(), $content = null)
{
    extract(shortcode_atts(array('type' => 'unordered', 'lined' => 'no', 'animation' => '', 'animation_delay' => '', 'class' => ''), $params));
    if ($class != '') {
        $class = ' ' . $class;
    }
    if ($animation != '') {
        $animation = ' hb-animate-element ' . $animation;
    }
    if ($animation_delay != '') {
        // Remove ms or s, if entered in the attribute
        if (substr($height, -2) == 'ms') {
            $animation_delay = substr($height, 0, -2);
        }
        if (substr($height, -1) == 's') {
            $animation_delay = substr($height, 0, -1);
        }
        $animation_delay = ' data-delay="' . $animation_delay . '"';
    }
    if ($lined == 'yes') {
        $lined = ' line-list';
    } else {
        $lined = '';
    }
    $output = '';
    if ($type == 'ordered') {
        $output = '<div class="shortcode-wrapper shortcode-list clearfix' . $class . $animation . '"' . $animation_delay . '>';
        $output .= '<ol class="hb-ordered-list' . $lined . '">';
        $output .= shortcode_empty_paragraph_fix(do_shortcode($content));
        $output .= '</ol>';
        $output .= '</div>';
    } else {
        if ($type == 'unordered') {
            $output = '<div class="shortcode-wrapper shortcode-list clearfix' . $class . $animation . '"' . $animation_delay . '>';
            $output .= '<ul class="hb-unordered-list' . $lined . '">';
            $output .= shortcode_empty_paragraph_fix(do_shortcode($content));
            $output .= '</ul>';
            $output .= '</div>';
        } else {
            $output = '<div class="shortcode-wrapper shortcode-list clearfix' . $class . $animation . '"' . $animation_delay . '>';
            $output .= '<ul class="hb-ul-list' . $lined . '">';
            $output .= shortcode_empty_paragraph_fix(do_shortcode($content));
            $output .= '</ul>';
            $output .= '</div>';
        }
    }
    wpautop($output, false);
    return $output;
}