File manager - Edit - /home/verseaumee/www/plugins/system/bluejoomla/shortcodes/statistic.php
Back
<?php /** * @author Bluejoomla * @date: 01-04-2014 * * @copyright Copyright (C) 2013 Bluejoomla.com . All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ //no direct accees defined ('_JEXEC') or die('resticted aceess'); //[statistics] if(!function_exists('statistic_func')) { $statisticArray = array(); function statistic_func( $atts, $content="" ){ global $statisticArray; extract(shortcode_atts(array( 'title' => 'Title', 'id' => 'statistic-section', 'desc' =>'', 'background' =>'' ), $atts)); $bg_image = ''; if (!empty($background)) $bg_image= 'style="background-image: url('.JUri::root().$background.');"'; $html = '<div class="section" > <div id="statistic-section" '.$bg_image.'> <div class="container"> <div class="skills-bar"> <div class="row">'; do_shortcode( $content ); //item if (count($statisticArray) == 4) $class = ' col-md-3 '; if (count($statisticArray) == 3) $class = ' col-md-4 '; if (count($statisticArray) == 2) $class = ' col-md-6 '; if (count($statisticArray) == 6) $class = ' col-md-2 '; foreach ($statisticArray as $key=>$val) { $html .='<div class="'.$class.'"> <div class="statistic-post triggerAnimation animated" data-animate="'.$val['animate'].'"> <h2>'.$val['title'].'</h2> <div id="circle'.$key.'" class="circle-skill" data-percent="'.$val['percent'].'"></div> <p>'.$val['desc'].'</p> </div> </div>'; } $html .=' </div></div></div></div></div>'; $statisticArray = array(); return $html; } add_shortcode( 'statistic', 'statistic_func' ); //statistic Item function statistic_item_func( $atts, $content="" ){ global $statisticArray; extract(shortcode_atts(array( 'title' =>'', 'percent' =>'fadeInUp', 'animate' =>'' , 'desc' =>'' ), $atts)); $statisticArray[] = array( 'content'=>$content, 'title'=>$title, 'percent'=>$percent, 'animate'=>$animate, 'desc' =>$desc ); } add_shortcode( 'statistic_item', 'statistic_item_func' ); }
| ver. 1.4 |
Github
|
.
| PHP 8.5.7 | Generation time: 0 |
proxy
|
phpinfo
|
Settings