controlNav: true,
    				slideshowSpeed: <?php 
            echo $pp_portfolio_slider_timer * 1000;
            ?>
    		    });
    		});
    		</script>
    		
    		<?php 
        }
    }
    ?>
	
    			<div class="ajax_content">
    				<?php 
    echo pp_apply_content($portfolio_item['content']);
    ?>
    			</div>
		</div>
    
<?php 
}
if (have_posts()) {
    ?>
<div id="portfolio_filter_wrapper" class="three_columns portfolio-content section content clearfix"> 
    <?php 
    while ($wp_query->have_posts()) {
        $wp_query->the_post();
        $image_url = '';
        $portfolio_ID = get_the_ID();
        $portfolio_title = get_the_title();
Пример #2
0
</div>
<br class="clear"/>

<!-- Begin content -->
<div id="content_wrapper">

    <div class="inner">
    
    	<!-- Begin main content -->
    	<div class="inner_wrapper">
    	
    		<div class="standard_wrapper">

		    	<?php 
if (!empty($page->post_content)) {
    echo pp_apply_content($page->post_content);
}
?>
		    	
		    	<!-- Begin portfolio content -->
		    	
		    	<?php 
$menu_sets_query = '';
$portfolio_items = -1;
$portfolio_sort = get_option('pp_gallery_sort');
if (empty($portfolio_sort)) {
    $portfolio_sort = 'DESC';
}
$args = array('post_type' => 'attachment', 'numberposts' => $portfolio_items, 'post_status' => null, 'post_parent' => $post->ID, 'order' => 'ASC', 'orderby' => 'menu_order');
$all_photo_arr = get_posts($args);
if (isset($all_photo_arr) && !empty($all_photo_arr)) {
        ?>
    		           
    		           <?php 
        if (!empty($slide_display_content)) {
            ?>
    		           <ul data-type="captions">
						    <li class="caption_<?php 
            echo $key + 1;
            ?>
 caption_bg" data-delay="200" data-effect="fade">
						        <h4><?php 
            echo htmlentities($gallery_item->post_title);
            ?>
</h4>
						        <?php 
            echo pp_apply_content($gallery_item->post_content);
            ?>
						    </li>
    		           </ul>
    		           <?php 
        }
        ?>
    		           
    		           </li>
    		   
    		  <?php 
    }
    //end foreach
    ?>
    		</ul>
    		
Пример #4
0
                <?php 
                if ($add_sidebar) {
                    ?>
                    <div class="sidebar_content <?php 
                    echo $sidebar_class;
                    ?>
">
                <?php 
                }
                ?>

                <?php 
                $ppb_enable = get_post_meta($pp_homepage, 'ppb_enable', true);
                if (!$ppb_enable) {
                    echo pp_apply_content($pp_home_content);
                } else {
                    pp_apply_builder($pp_homepage);
                }
                ?>
                <br class="clear"/>

                <?php 
                if ($add_sidebar) {
                    ?>
                    </div>
                <?php 
                }
                ?>

                <?php 
function pp_ajax_portfolio()
{
    if (isset($_GET['portfolio_id'])) {
        $single_portoflio_post = get_post($_GET['portfolio_id']);
        echo pp_apply_content(do_shortcode($single_portoflio_post->post_content));
    }
    die;
}
Пример #6
0
function tab_func($atts, $content)
{
    //extract short code attr
    extract(shortcode_atts(array('id' => ''), $atts));
    $return_html = '';
    $return_html .= '<div id="tabs-' . $id . '" class="tab_wrapper"><br class="clear"/>' . pp_apply_content($content) . '</div>';
    return $return_html;
}
Пример #7
0
function pp_apply_builder($page_id)
{
    $ppb_form_data_order = get_post_meta($page_id, 'ppb_form_data_order');
    if (isset($ppb_form_data_order[0])) {
        $ppb_form_item_arr = explode(',', $ppb_form_data_order[0]);
    }
    include get_template_directory() . "/lib/contentbuilder.shortcode.lib.php";
    //pp_debug($ppb_shortcodes);
    if (isset($ppb_form_item_arr[0]) && !empty($ppb_form_item_arr[0])) {
        $ppb_shortcode_code = '';
        foreach ($ppb_form_item_arr as $key => $ppb_form_item) {
            $ppb_form_item_data = get_post_meta($page_id, $ppb_form_item . '_data');
            $ppb_form_item_size = get_post_meta($page_id, $ppb_form_item . '_size');
            $ppb_form_item_data_obj = json_decode($ppb_form_item_data[0]);
            //pp_debug($ppb_form_item_data_obj);
            $ppb_shortcode_content_name = $ppb_form_item_data_obj->shortcode . '_content';
            if (isset($ppb_form_item_data_obj->{$ppb_shortcode_content_name})) {
                $ppb_shortcode_code = '[' . $ppb_form_item_data_obj->shortcode . ' size="' . $ppb_form_item_size[0] . '" ';
                //Get shortcode title
                $ppb_shortcode_title_name = $ppb_form_item_data_obj->shortcode . '_title';
                if (isset($ppb_form_item_data_obj->{$ppb_shortcode_title_name})) {
                    $ppb_shortcode_code .= 'title="' . urldecode($ppb_form_item_data_obj->{$ppb_shortcode_title_name}) . '" ';
                }
                //Get shortcode attributes
                $ppb_shortcode_arr = $ppb_shortcodes[$ppb_form_item_data_obj->shortcode];
                foreach ($ppb_shortcode_arr['attr'] as $attr_name => $attr_item) {
                    $ppb_shortcode_attr_name = $ppb_form_item_data_obj->shortcode . '_' . $attr_name;
                    if (isset($ppb_form_item_data_obj->{$ppb_shortcode_attr_name})) {
                        $ppb_shortcode_code .= $attr_name . '="' . $ppb_form_item_data_obj->{$ppb_shortcode_attr_name} . '" ';
                    }
                }
                $ppb_shortcode_code .= ']' . urldecode($ppb_form_item_data_obj->{$ppb_shortcode_content_name}) . '[/' . $ppb_form_item_data_obj->shortcode . ']';
            } else {
                $ppb_shortcode_code = '[' . $ppb_form_item_data_obj->shortcode . ' size="' . $ppb_form_item_size[0] . '" ';
                //Get shortcode title
                $ppb_shortcode_title_name = $ppb_form_item_data_obj->shortcode . '_title';
                if (isset($ppb_form_item_data_obj->{$ppb_shortcode_title_name})) {
                    $ppb_shortcode_code .= 'title="' . urldecode($ppb_form_item_data_obj->{$ppb_shortcode_title_name}) . '" ';
                }
                //Get shortcode attributes
                $ppb_shortcode_arr = $ppb_shortcodes[$ppb_form_item_data_obj->shortcode];
                foreach ($ppb_shortcode_arr['attr'] as $attr_name => $attr_item) {
                    $ppb_shortcode_attr_name = $ppb_form_item_data_obj->shortcode . '_' . $attr_name;
                    if (isset($ppb_form_item_data_obj->{$ppb_shortcode_attr_name})) {
                        $ppb_shortcode_code .= $attr_name . '="' . $ppb_form_item_data_obj->{$ppb_shortcode_attr_name} . '" ';
                    }
                }
                $ppb_shortcode_code .= ']';
            }
            echo pp_apply_content($ppb_shortcode_code);
            //echo $ppb_shortcode_code.'<hr/>';
        }
    }
    return false;
}
function ppb_toggle_func($atts, $content)
{
    extract(shortcode_atts(array('toggle1_title' => '', 'toggle1_content' => '', 'toggle2_title' => '', 'toggle2_content' => '', 'toggle3_title' => '', 'toggle3_content' => '', 'toggle4_title' => '', 'toggle4_content' => '', 'toggle5_title' => '', 'toggle5_content' => '', 'title' => '', 'size' => 'one'), $atts));
    $toggles_arr = array();
    $toggles_arr[1]['title'] = $toggle1_title;
    $toggles_arr[2]['title'] = $toggle2_title;
    $toggles_arr[3]['title'] = $toggle3_title;
    $toggles_arr[4]['title'] = $toggle4_title;
    $toggles_arr[5]['title'] = $toggle5_title;
    $toggles_arr[1]['content'] = $toggle1_content;
    $toggles_arr[2]['content'] = $toggle2_content;
    $toggles_arr[3]['content'] = $toggle3_content;
    $toggles_arr[4]['content'] = $toggle4_content;
    $toggles_arr[5]['content'] = $toggle5_content;
    $return_html = '<div class="' . $size . '">';
    if (!empty($title)) {
        $return_html .= '<div class="ppb_title"><h4>' . $title . '</h4></div>';
        $return_html .= '<br class="clear"/>';
    }
    for ($i = 1; $i <= 5; $i++) {
        if (!empty($toggles_arr[$i]['title'])) {
            $return_html .= '<div class="pp_accordion_close"><h3><a href="#">' . urldecode($toggles_arr[$i]['title']) . '</a></h3>';
            $return_html .= '<div><p>';
            $return_html .= pp_apply_content(urldecode($toggles_arr[$i]['content']));
            $return_html .= '</p></div></div>';
        }
    }
    $return_html .= '</div>';
    return $return_html;
}