| Server IP : 194.30.32.123 / Your IP : 216.73.216.89 Web Server : Apache System : Linux 4f6650a08421 5.10.0-44-amd64 #1 SMP Debian 5.10.257-1 (2026-05-27) x86_64 User : ftpbegirale ( 1001) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,curl_multi_exec,show_source MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /expert/htwebs/www.begirale.com/public/wp-content/themes/perspective-theme/include/ |
Upload File : |
<?php
// adding mce custom button for short codes start
class ShortcodesEditorSelector {
var $buttonName = 'shortcode';
function addSelector() {
add_filter('mce_external_plugins', array($this, 'registerTmcePlugin'));
add_filter('mce_buttons', array($this, 'registerButton'));
}
function registerButton($buttons) {
array_push($buttons, "separator", $this->buttonName);
return $buttons;
}
function registerTmcePlugin($plugin_array) {
//$plugin_array[$this->buttonName] = get_template_directory_uri() . '/include/mce_editor_plugin.js.php';
//var_dump($plugin_array);
return $plugin_array;
}
}
if (!isset($shortcodesES)) {
$shortcodesES = new ShortcodesEditorSelector();
add_action('admin_head', array($shortcodesES, 'addSelector'));
}
// adding mce custom button for short codes end
//adding shortcode start
// adding toggle start
function cs_shortcode_pb_toggle($atts, $content = "") {
global $toggle_counter;
$toggle_counter++;
$active = "";
if (!isset($atts['style'])){ $atts['style'] = '';}
if (!isset($atts['title'])){ $atts['title'] = '';}
if ( $atts["active"] == "yes" ){ $active = "in";}
$html = '<a class="collapsed" data-toggle="collapse" data-target="#toggle' . $toggle_counter . '">' . $atts["title"] . '</a>';
$html .= '<div class="togglebox '.$active.' collapse" id="toggle' . $toggle_counter . '">' . $content . '</div>';
$html = '<div class="toggle-sectn">' . $html . '</div>';
return do_shortcode($html) . '<div class="clear"></div>';
}
add_shortcode('toggle', 'cs_shortcode_pb_toggle');
// adding toggle end
// adding tabs start
function cs_shortcode_pb_tabs($atts, $content = "") {
global $node, $tab_counter;
if (!isset($atts['style'])){ $atts['style'] = '';}
$tab_counter++;
$content = str_replace("Â ", "", htmlentities($content));
$content = html_entity_decode($content);
$content = htmlspecialchars($content, ENT_NOQUOTES, "UTF-8");
$content = str_replace("[tab_item", "<tab_item", $content);
$content = str_replace("[/tab_item]", "</tab_item>", $content);
$content = str_replace('tabs="tabs"]', ">", $content);
$content = str_replace("<br />", "", $content);
$content = str_replace("<p>", "", $content);
$content = str_replace("</p>", "", $content);
$content = "<tab>" . $content . "</tab>";
$node = new stdClass();
$node->tabs_element_size = "";
$node->tabs_content = $content;
$node->tabs_style = $atts['style'];
return cs_tabs_page();
}
add_shortcode('tab', 'cs_shortcode_pb_tabs');
// adding tabs end
// adding accordion start
function cs_shortcode_pb_accordion($atts, $content = "") {
global $node, $acc_counter;
$content = str_replace("Â ", "", htmlentities($content));
$content = html_entity_decode($content);
$content = htmlspecialchars($content, ENT_NOQUOTES, "UTF-8");
$content = str_replace("[accordion_item", "<accordion_item", $content);
$content = str_replace("[/accordion_item]", "</accordion_item>", $content);
$content = str_replace('accordion="accordion"]', ">", $content);
$content = str_replace("<br />", "", $content);
$content = str_replace("<p>", "", $content);
$content = str_replace("</p>", "", $content);
$content = "<accordion>" . $content . "</accordion>";
$node = new stdClass();
$node->accordion_element_size = "";
$node->accordion_content = $content;
return cs_accordions_page();
}
add_shortcode('accordion', 'cs_shortcode_pb_accordion');
// adding accordion end
// adding divider start
//[divider style="1" backtotop="yes/no"]
function cs_shortcode_pb_divider($atts) {
global $node;
if (!isset($atts['backtotop'])){ $atts['backtotop'] = '';}
if (!isset($atts['style'])){ $atts['style'] = '';}
if (!isset($atts['top_margin'])){ $atts['top_margin'] = '';}
if (!isset($atts['bottom_margin'])){ $atts['bottom_margin'] = '';}
$node = new stdClass();
$node->divider_element_size = '';
$node->divider_backtotop = $atts['backtotop'];
$node->divider_style = $atts['style'];
$node->divider_mrg_top = $atts['top_margin'];
$node->divider_mrg_bottom = $atts['bottom_margin'];
return cs_divider_page();
}
add_shortcode('divider', 'cs_shortcode_pb_divider');
// adding divider end
// adding quote start
function cs_shortcode_pb_quote($atts, $content = "") {
global $node;
if (!isset($atts['color'])){ $atts['color'] = '';}
if (!isset($atts['align'])){ $atts['align'] = '';}
$node = new stdClass();
$node->quote_element_size = '';
$node->quote_text_color = $atts['color'];
$node->quote_align = $atts['align'];
$node->quote_content = $content;
return cs_quote_page();
}
add_shortcode('quote', 'cs_shortcode_pb_quote');
// adding quote end
// adding button start
function cs_shortcode_pb_button($atts, $content = "") {
if (!isset($atts['src'])){ $atts['src'] = '';}
if (!isset($atts['color'])){ $atts['color'] = '';}
if (!isset($atts['background'])){ $atts['background'] = '';}
if (!isset($atts['style'])){ $atts['style'] = '';}
if (!isset($atts['type'])){ $atts['type'] = '';}
if (!isset($atts['target'])){ $atts['target'] = '';}else{ $atts['target'] = '_self'; }
$html = '<a href="' . $atts['src'] . '" class="' . $atts['style']. '-btn ' . $atts['type'] . '" target="' . $atts['target'] . '" style=" cursor:pointer; color:' . $atts['color'] . ' ;background-color:' . $atts['background'] . '">' . $content . '</a>';
$html = '<div class="button">'.$html.'</div>';
return do_shortcode($html);
}
add_shortcode('button', 'cs_shortcode_pb_button');
// adding button end
// adding column start
function cs_shortcode_pb_column($atts, $content = "") {
if (!isset($atts['size'])){ $atts['size'] = '';}
list($top, $bottom) = explode('/', $atts['size']);
$width = $top / $bottom * 100;
$html = '<div class="shortgrid" style="width:' . $width . '%">'.$content.'</div>';
return do_shortcode(htmlspecialchars_decode($html));
}
add_shortcode('column', 'cs_shortcode_pb_column');
// adding column end
// adding dropcap start
function cs_shortcode_pb_dropcap($atts, $content = "") {
global $node;
$node = new stdClass();
$node->dropcap_element_size = '';
$node->dropcap_content = $content;
return cs_dropcap_page();
}
add_shortcode('dropcap', 'cs_shortcode_pb_dropcap');
// adding dropcap end
// adding message_box start
function cs_shortcode_pb_message_box($atts, $content = "") {
if (!isset($atts['background'])){ $atts['background'] = '';}
if (!isset($atts['color'])){ $atts['color'] = '';}
if (!isset($atts['border_color'])){ $atts['border_color'] = '';}
if (!isset($atts['title'])){ $atts['title'] = '';}
if (!isset($atts['align'])){ $atts['align'] = '';}
if (!isset($atts['icon'])){ $atts['icon'] = '';}
if (!isset($atts['close'])){ $atts['close'] = '';}
$html = "";
$html .= '<div class="messagebox alert alert-info" style="align:' . $atts["align"] . '; background:' . $atts["background"] . '; color:' . $atts["color"] . '; border:1px solid ' . $atts["border_color"] . '">';
if (isset($atts['close']) && $atts['close']=='yes'){
$html .= '<button type="button" class="close" data-dismiss="alert"><i class="icon-remove-sign"></i></button>';
}
if(isset($atts["title"]) && $atts["title"]<>''){
$html .= '<h4>' . $atts["title"] . '</h4>';
}
if(isset($content) && $content<>''){
$html .= '<i class="' . $atts["icon"] . '"></i>';
$html .= $content;
}
$html .= '</div>';
return do_shortcode($html) . '<div class="clear"></div>';
}
add_shortcode('message_box', 'cs_shortcode_pb_message_box');
// adding message_box end
// adding list start
function cs_shortcode_pb_list($atts, $content = "") {
if (!isset($atts['type'])){ $atts['type'] = '';}
if (!isset($atts['icon'])){ $atts['icon'] = '';}
$content = "<ul class='".$atts["type"]."'>" . $content . "</ul>";
if(isset($atts['icon']) && $atts['icon']<>''){
$content = str_replace("[list_item]", "<li><i class='".$atts['icon']."'></i>", $content);
} else {
$content = str_replace("[list_item]", "<li>", $content);
}
$content = str_replace("[/list_item]", "</li>", $content);
$content = str_replace("<br />", "", $content);
$html = '<div class="list_styles">' . $content . '</div>';
return do_shortcode($html) . '<div class="clear"></div>';
}
add_shortcode('list', 'cs_shortcode_pb_list');
// adding list end
// adding table start
function cs_shortcode_pb_table($atts, $content = "") {
if (!isset($atts['color'])){ $atts['color'] = '';}
$table_class = "table_" . str_replace("#", "", $atts["color"]);
$content = "<table class='table table-condensed " . $table_class . "'>" . $content . "</table>";
$content = str_replace("[thead]", "<thead>", $content);
$content = str_replace("[/thead]", "</thead>", $content);
$content = str_replace("[tr]", "<tr>", $content);
$content = str_replace("[/tr]", "</tr>", $content);
$content = str_replace("[th]", "<th>", $content);
$content = str_replace("[/th]", "</th>", $content);
$content = str_replace("[tbody]", "<tbody>", $content);
$content = str_replace("[/tbody]", "</tbody>", $content);
$content = str_replace("[td]", "<td>", $content);
$content = str_replace("[/td]", "</td>", $content);
$content = str_replace("<br />", "", $content);
//$content = do_shortcode(htmlspecialchars_decode($content));
$html = '
<style>
.' . $table_class . ' {border:1px solid ' . $atts["color"] . ';}
.' . $table_class . ' td {border-top: 1px solid ' . $atts["color"] . '; border-left: 1px solid ' . $atts["color"] . ';}
.' . $table_class . ' tr {border-bottom: 1px solid ' . $atts["color"] . '; border-left: 1px solid ' . $atts["color"] . ';}
.' . $table_class . ' thead {background:' . $atts["color"] . ';}
</style>
';
$html .= '<div class="tables-code">' . $content . '</div>';
return do_shortcode(htmlspecialchars_decode($html)) . '<div class="clear"></div>';
}
add_shortcode('table', 'cs_shortcode_pb_table');
// adding table end
// adding hightlight start
function cs_shortcode_pb_hightlight($atts, $content = "") {
if (!isset($atts['background'])){ $atts['background'] = '';}
if (!isset($atts['color'])){ $atts['color'] = '';}
$html = '<span style="background:'.$atts["background"].'; color:'.$atts["color"].';" class="highlights">'.$content.'</span>';
return $html;
}
add_shortcode('hightlight', 'cs_shortcode_pb_hightlight');
// adding hightlight end
// adding heading start
function cs_shortcode_pb_heading($atts, $content = "") {
if (!isset($atts['size'])){ $atts['size'] = '';}
if (!isset($atts['color'])){ $atts['color'] = '';}
$html = '<h'.$atts["size"].' style="color:'.$atts["color"].';">'.$content.'</h'.$atts["size"].'>';
return $html;
}
add_shortcode('heading', 'cs_shortcode_pb_heading');
// adding heading end
// adding image start
function cs_shortcode_pb_image($atts, $content = "") {
global $node;
if (!isset($atts['style'])){ $atts['style'] = '';}
if (!isset($atts['width'])){ $atts['width'] = '';}
if (!isset($atts['height'])){ $atts['height'] = '';}
if (!isset($atts['lightbox'])){ $atts['lightbox'] = '';}
if (!isset($atts['source'])){ $atts['source'] = '';}
if (!isset($atts['caption'])){ $atts['caption'] = '';}
$node = new stdClass();
$node->image_element_size = '';
$node->image_style = $atts['style'];
$node->image_width = $atts['width'];
$node->image_height = $atts['height'];
$node->image_lightbox = $atts['lightbox'];
$node->image_source = $atts['source'];
$node->image_caption = $atts['caption'];
return cs_image_page();
}
add_shortcode('image-frame', 'cs_shortcode_pb_image');
// adding image end
// adding icon start
function cs_shortcode_pb_icon($atts, $content = "") {
if (!isset($atts['border'])){ $atts['border'] = '';}
if (!isset($atts['color'])){ $atts['color'] = '';}
if (!isset($atts['bgcolor'])){ $atts['bgcolor'] = '';}
if (!isset($atts['type'])){ $atts['type'] = '';}
if (!isset($atts['class'])){ $atts['class'] = '';}
$icon_border = "";
if ( $atts["border"] == "yes" ){ $icon_border = "icon-border";}
$html = '<i class="'.$atts["class"].' '.$atts["type"].' '.$atts["size"].' '.$icon_border.'" style="color:'.$atts["color"].'; background-color:'.$atts["bgcolor"].'"></i>';
return $html;
}
add_shortcode('icon', 'cs_shortcode_pb_icon');
// adding icon end
// adding video start
function cs_shortcode_pb_video($atts, $content = "") {
global $node;
if (!isset($atts['url'])){ $atts['url'] = '';}
if (!isset($atts['width'])){ $atts['width'] = '';}
if (!isset($atts['height'])){ $atts['height'] = '';}
$node = new stdClass();
$node->video_element_size= '';
$node->video_url = $atts['url'];
$node->video_width = $atts['width'];
$node->video_height = $atts['height'];
return cs_video_page();
}
add_shortcode('video-item', 'cs_shortcode_pb_video');
// adding video end
// adding map shortcode
function cs_shortcode_pb_map($atts, $content = "") {
global $node, $counter_node;
$counter_node++;
if ( !isset($atts['height']) ) $atts['height'] = '';
if ( !isset($atts['latitude']) ) $atts['latitude'] = '';
if ( !isset($atts['longitude']) ) $atts['longitude'] = '';
if ( !isset($atts['zoom']) ) $atts['zoom'] = '';
if ( !isset($atts['type']) ) $atts['type'] = '';
if ( !isset($atts['info_text']) ) $atts['info_text'] = '';
if ( !isset($atts['info_width']) ) $atts['info_width'] = '';
if ( !isset($atts['info_height']) ) $atts['info_height'] = '';
if ( !isset($atts['marker_icon_url']) ) $atts['marker_icon_url'] = '';
if ( !isset($atts['marker']) ) $atts['marker'] = '';
if ( !isset($atts['draggable']) ) $atts['draggable'] = '';
if ( !isset($atts['disable_controls']) ) $atts['disable_controls'] = '';
if ( !isset($atts['scrollwheel']) ) $atts['scrollwheel'] = '';
if ( !isset($atts['map_view']) ) $atts['map_view'] = 'content';
$node = new stdClass();
$node->map_title = '';
$node->map_element_size = '';
$node->map_height = $atts['height'];
$node->map_lat = $atts['latitude'];
$node->map_lon = $atts['longitude'];
$node->map_zoom = $atts['zoom'];
$node->map_type = $atts['type'];
$node->map_info = $atts['info_text'];
$node->map_info_width = $atts['info_width'];
$node->map_info_height = $atts['info_height'];
$node->map_marker_icon = $atts['marker_icon_url'];
$node->map_show_marker = $atts['marker'];
$node->map_draggable = $atts['draggable'];
$node->map_controls = $atts['disable_controls'];
$node->map_scrollwheel = $atts['scrollwheel'];
$node->map_view = $atts['map_view'];
return cs_map_page();
}
add_shortcode('map', 'cs_shortcode_pb_map');
// adding map end
// adding code start
function cs_shortcode_pb_code($atts, $content = "") {
$content = str_replace("<br />", "", $content);
if (!isset($atts['title'])){ $title = '';}else{ $title ='<header class="heading"><h2 class="colr section-title">'.$atts["title"].'</h2></header>';}
$html = $title.'<div class="code-element"><pre>' . $content . '</pre></div>';
return $html . '<div class="clear"></div>';
}
add_shortcode('code', 'cs_shortcode_pb_code');
// adding code end
//Testimonials Shortcode
function cs_shortcode_pb_testimonials($atts, $content = "") {
global $testimonial_counter;
$testimonial_counter++;
cs_enqueue_flexslider_script();
if (!isset($atts['type'])){ $atts['type'] = '';}
if (!isset($atts['show_nav'])){ $atts['show_nav'] = 'no';}
if (!isset($atts["autoplay"])){ $atts['autoplay'] = 'false';}
if (!isset($atts['delay'])){ $atts['delay'] = '800';}
$content = str_replace("Â ", "", htmlentities($content));
$content = html_entity_decode($content);
$content = htmlspecialchars($content, ENT_NOQUOTES, "UTF-8");
$content = str_replace("[testimonial_item", "<testimonial_item", $content);
$content = str_replace("[/testimonial_item]", "</testimonial_item>", $content);
$content = str_replace('testimonial="testimonial"]', ">", $content);
$content = str_replace("<br />", "", $content);
$content = str_replace("<p>", "", $content);
$content = str_replace("</p>", "", $content);
$content = "<testimonials>" . $content . "</testimonials>";
$autoplay=$atts["autoplay"];
$delay=$atts["delay"];
$show_nav_class='';
if (isset($atts['show_nav']) && strtolower($atts['show_nav'])=='yes'){
$show_nav = 'true';
$show_nav_class='testimonial-slide show-nav-testimonial';
} else {
$show_nav = 'false';
if ( $atts['type'] <> "avatar" ){
$show_nav_class='testimonial-slide no-image';
}
else {
$show_nav_class='testimonial-slide';
}
}
$html = "";
$html .= "<script>jQuery(window).load(function(){
jQuery('.flexslider').flexslider({
animation: 'fade',
slideshowSpeed: 2500,
animationSpeed: $delay,
controlNav: $show_nav,
slideshow: $autoplay,
start: function(slider){
jQuery('body').removeClass('loading');
}
});
});
</script>";
$xmlObject = simplexml_load_string($content);
$testimonial_count = 0;
$html .= '<div class="flexslider"><ul class="slides">';
foreach ($xmlObject as $node) {
$testimonial_count++;
if (!isset($node["image"])){ $node["image"] = '';}
if (!isset($node["name"])){ $node["name"] = '';}
if (!isset($node["job"])){ $node["job"] = '';}
$html .= '<li><div class="testimonial-shortcode">';
$html .= '<article>';
if(isset($node["image"]) && $atts["type"]=='avatar'){
$html .= '<figure><img src="' . $node["image"] . '" alt="' . $node["name"] . '"></figure>';
}
$html .= '<div class="testimonial-text">';
$html .= '<div class="quotation"><p>'.html_entity_decode($node).'</p></div>';
$html .= '<p class="testimonial-author">'.$node["name"].' <span>-'.$node["job"].'</span></p>';
$html .= '</div>';
$html .= '</article></div></li>';
}
$html .= '</ul></div>';
$html = '<div class="'.$show_nav_class.'">' . $html . '</div>';
return do_shortcode($html) . '<div class="clear"></div>';
}
add_shortcode('testimonials', 'cs_shortcode_pb_testimonials');
//Testimonials Shortcode end
//Skills Shortcode
function cs_shortcode_pb_skills($atts, $content = "") {
$content = str_replace("[skill", "<skill", $content);
$content = str_replace("]", "></skill>", $content);
$content = str_replace("<br />", "", $content);
$content = str_replace("<p>", "", $content);
$content = str_replace("</p>", "", $content);
$content = "<skills>" . $content . "</skills>";
$html = "";
?>
<script type="text/javascript">
jQuery(document).ready(function(){
cs_skills_shortcode_script();
});
</script>
<?php
$xmlObject = simplexml_load_string($content);
$skills_count = 0;
foreach ($xmlObject as $node) {
$skills_count++;
$style='';
if (!isset($node["bg_color"])) {
$node["bg_color"] = '';
}
if (!isset($node["percent"])) {
$node["percent"] = '';
}
if (!isset($node["name"])) {
$node["name"] = '';
}
if (!isset($node["text"])) {
$node["text"] = '';
}
$percentage = $data_text = '';
if (isset($node["text"]) && $node["text"] <> '') {
$data_text .= $node["text"];
}
if (isset($node["percent"]) && $node["percent"] <> '') {
$percentage .= $node["percent"];
}
if (isset($node["bg_color"])) {
$style = 'style="background-color:' . $node["bg_color"] . ';"';
}
$html .= '<div class="tiny-green" data-loadbar="'.$percentage.'" data-loadbar-text="'.$data_text.'"><p>'.$node["name"].'</p><div '.$style.'></div><span class="infotxt"></span></div>';
}
$html = '<div class="skills"><div class="progress_bar">' . $html . '</div></div>';
return do_shortcode($html) . '<div class="clear"></div>';
}
add_shortcode('skills', 'cs_shortcode_pb_skills');
//Skills Shortcode end
//Team Shortcode
function cs_shortcode_pb_team($atts, $content = "") {
cs_enqueue_jcarousel_style_script();
$content = str_replace(']', ">", $content);
$content = str_replace("[team", "<team", $content);
$content = str_replace("[/team", "</team", $content);
$content = str_replace("[content", "<content", $content);
$content = str_replace("[/content", "</content", $content);
$content = str_replace("[social_links", "<social_links", $content);
$content = str_replace("[/social_links", "</social_links", $content);
$content = str_replace('tabs="tabs"', "></social", $content);
$content = str_replace("[social", "<social", $content);
$content = str_replace("<br />", "", $content);
$content = str_replace(' =""', "", $content);
$content = str_replace("<p>", "", $content);
$content = str_replace("</p>", "", $content);
$content = "<team-sec>" . $content . "</team-sec>";
$html = "";
$xmlObject = simplexml_load_string($content);
$team_count = 0;
$node["image"]='';
foreach ($xmlObject as $node) {
if (!isset($node["style"])){ $node["style"] = '';}
if (!isset($node["name"])){ $node["name"] = '';}
if (!isset($node["image"])){ $node["image"] = '';}
if (!isset($node["job"])){ $node["job"] = '';}
$html .= '<article class="'.$node["style"].'">';
if(isset($node["image"]) && $node["image"]<>''){
$html .= '<figure><a ><img src="'.$node["image"].'" alt=""></a></figure>';
}
$html .= '<div class="text">';
$html .= '<h3 class="uppercase heading-color"><a class="colrhover">'.$node["name"].'</a></h3>';
$html .= '<span>'.$node["job"].'</span>';
$html .= '<p>'.$node->content.'</p>';
$html .= '<div class="social-network">';
foreach ($node as $node1) {
foreach ($node1 as $node2) {
if (!isset($node2["link"])){ $node2["link"] = '';}
if (!isset($node2["icon"])){ $node2["icon"] = '';}
$html .= '<a href="'.$node2["link"].'" target="'.$node2["link"].'"><i class="'.$node2["icon"].' icon-2x"></i></a>';
}
}
$html .= '</div></div>';
$html .= '<span class="cuting_border"></span></article>';
}
$html = '<div class="team-shortcode">' . $html . '</div>';
return do_shortcode($html) . '<div class="clear"></div>';
}
add_shortcode('team-sec', 'cs_shortcode_pb_team');
//Team Shortcode end
?>