| Server IP : 34.87.99.72 / Your IP : 216.73.217.31 Web Server : Apache/2.4.46 (Unix) OpenSSL/1.1.1n System : Linux zlock-bitnami-lamp-prod-v2-vm 4.19.0-16-cloud-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 User : bitnami ( 1000) PHP Version : 7.4.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /opt/bitnami/apache/htdocs/web/wp-content/themes/kalium/vc_templates/ |
Upload File : |
<?php
/**
* Masonry Portfolio Items
*
* Laborator.co
* www.laborator.co
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Direct access not allowed.
}
// Atts
if( function_exists( 'vc_map_get_attributes' ) ) {
$masonry_atts = vc_map_get_attributes( $this->getShortcode(), $atts );
}
$masonry_items = array();
$masonry_items_ids = array();
if ( preg_match_all( '/' . get_shortcode_regex() . '/', $content, $portfolio_items ) ) {
foreach ( $portfolio_items[0] as $portfolio_item ) {
$portfolio_item = preg_replace( '/^\[[^\s]+/i', '', substr( $portfolio_item, 0, -1 ) );
$portfolio_item = $this->prepareAtts( shortcode_parse_atts( $portfolio_item ) );
if ( ! isset( $portfolio_item['portfolio_id'] ) ) {
continue;
}
$id = $portfolio_item['portfolio_id'];
if ( ! isset( $portfolio_item['box_size'] ) ) {
$portfolio_item['box_size'] = '8x3';
}
// WPML translate object IDs
$id = apply_filters( 'wpml_object_id', $id, 'portfolio', true );
// Add Masonry Item to Array
$masonry_items_ids[] = $id;
$masonry_items[ $id ] = $portfolio_item;
}
}
// Use Portfolio Items shortcode to parse Masonry Items
include locate_template( 'vc_templates/lab_portfolio_items.php' );