/** * * This file is a core Ultimatum file and should not be edited. * * @package Ultimatum * @author Wonder Foundry http://www.wonderfoundry.com * @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later) * @link http://ultimatumtheme.com * @version 2.50 */ function ultimatum_web_app_meta(){ wp_enqueue_script('jquery'); ?> <!-- iPhone --> <?php if(get_ultimatum_option('general', 'touchicon')):?> <link href="<?php echo get_ultimatum_option('general', 'touchicon');?>" sizes="57x57" rel="apple-touch-icon" /> <?php endif; ?> <?php if(get_ultimatum_option('general', 'startimage')):?> <link href="<?php echo get_ultimatum_option('general', 'startimage');?>" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image" /> <?php endif; ?> <!-- iPhone (Retina) --> <?php if(get_ultimatum_option('general', 'iphoneretina')):?> <link href="<?php echo get_ultimatum_option('general', 'iphoneretina');?>" sizes="114x114" rel="apple-touch-icon" /> <?php endif; ?> <?php if(get_ultimatum_option('general', 'iphoneretinastart')):?> <link href="<?php echo get_ultimatum_option('general', 'iphoneretinastart');?>" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image" /> <!-- iPhone 5 --> <?php endif; ?> <?php if(get_ultimatum_option('general', 'iphone5start')):?> <link href="<?php echo get_ultimatum_option('general', 'iphone5start');?>" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image" /> <!-- iPad --> <?php endif; ?> <?php if(get_ultimatum_option('general', 'ipad')):?> <link href="<?php echo get_ultimatum_option('general', 'ipad');?>" sizes="72x72" rel="apple-touch-icon" /> <?php endif; ?> <?php if(get_ultimatum_option('general', 'ipadportrait')):?> <link href="<?php echo get_ultimatum_option('general', 'ipadportrait');?>" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image" /> <?php endif; ?> <?php if(get_ultimatum_option('general', 'ipadlandscape')):?> <link href="<?php echo get_ultimatum_option('general', 'ipadlandscape');?>" media="(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image" /> <!-- iPad (Retina) --> <?php endif; ?> <?php if(get_ultimatum_option('general', 'ipadretina')):?> <link href="<?php echo get_ultimatum_option('general', 'ipadretina');?>" sizes="144x144" rel="apple-touch-icon" /> <?php endif; ?> <?php if(get_ultimatum_option('general', 'ipadrportrait')):?> <link href="<?php echo get_ultimatum_option('general', 'ipadrportrait');?>" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image" /> <?php endif; ?> <?php if(get_ultimatum_option('general', 'ipadrlandscape')):?> <link href="<?php echo get_ultimatum_option('general', 'ipadrlandscape');?>" media="(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image" /> <?php endif; ?> <?php echo '<meta content="yes" name="apple-mobile-web-app-capable" />'; echo '<meta content="600" name="MobileOptimized" />'; echo '<meta content="telephone=no" name="format-detection" />'; echo '<meta content="true" name="HandheldFriendly" />'; echo '<meta content="black" name="apple-mobile-web-app-status-bar-style" />'; }
function widget($args, $instance) { if(is_single()){ $ltag = (get_ultimatum_option('tags', 'single_logo') ? get_ultimatum_option('tags', 'single_logo') : 'h1'); $stag = (get_ultimatum_option('tags', 'single_slogan') ? get_ultimatum_option('tags', 'single_slogan') : 'span'); } else { $ltag = (get_ultimatum_option('tags', 'multi_logo') ? get_ultimatum_option('tags', 'multi_logo') : 'h1'); $stag = (get_ultimatum_option('tags', 'multi_slogan') ? get_ultimatum_option('tags', 'multi_slogan') : 'span'); } echo '<div id="logo-container">'; if(get_ultimatum_option('general', 'text_logo')!=0 && !$instance["logoimage"]){ if($instance["logotext"]){ echo '<'.$ltag.' id="logo"><a id="logo" class="logo" href="'.get_bloginfo('url').'">'.$instance["logotext"].'</a></'.$ltag.'>'; } else { echo '<'.$ltag.' id="logo"><a class="logo" href="'.get_bloginfo('url').'">'.get_bloginfo().'</a></'.$ltag.'>'; } if(get_ultimatum_option('general', 'display_site_desc')){ if($instance["logotag"]){ echo '<'.$stag.' id="tagline">'.$instance["logotag"].'</'.$stag.'>'; } else { echo '<'.$stag.' id="tagline">'.get_bloginfo ( 'description' ).'</'.$stag.'>'; } } // } else { if($instance["logoimage"]){ $logo_src=$instance["logoimage"]; } else { $logo_src=get_ultimatum_option('general', 'logo'); } echo '<'.$ltag.'><a href="'.get_bloginfo('url').'" class="logo"><img src="'.$logo_src.'" alt="'.get_bloginfo().'" class="img-responsive"/></a></'.$ltag.'>'; } echo '</div>'; }
<!--[if lt IE 7]> <html class="no-js ie6 oldie" <?php language_attributes(); ?>> <![endif]--> <!--[if IE 7]> <html class="no-js ie7 oldie" <?php language_attributes(); ?>> <![endif]--> <!--[if IE 8]> <html class="no-js ie8 oldie" <?php language_attributes(); ?>> <![endif]--> <!--[if gt IE 8]><!--> <html <?php language_attributes(); ?>> <!--<![endif]--> <head> <?php do_action('ultimatum_after_head_open'); ?> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta charset="<?php bloginfo( 'charset' ); ?>" /> <?php do_action( 'ultimatum_meta' ); ?> <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS2 Feed" href="<?php bloginfo('rss2_url'); ?>" /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> <title><?php wp_title( '|', true, 'right' ); ?></title> <?php do_action('ultimatum_before_wp_head');?> <?php wp_head(); ?> <?php if(get_ultimatum_option('scripts', 'head_scripts')){ $text = stripslashes(get_ultimatum_option('scripts', 'head_scripts')); ob_start(); eval('?>'.$text); $text = ob_get_contents(); ob_end_clean(); echo $text; } echo "\n"; ?> <?php do_action('ultimatum_before_head_close');?> </head> <body <?php body_class(); ?>> <?php do_action('ultimatum_after_body_open');?> <div class="clear"></div> <?php do_action('ultimatum_print_header'); ?>
/** * * This file is a core Ultimatum file and should not be edited. * * @category Ultimatum * @package Templates * @author Wonder Foundry http://www.wonderfoundry.com * @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later) * @link http://ultimatumtheme.com * @version 2.38 */ function ultimate_dynamic_sidebar($responsive=false,$index = 1,$grid=null) { global $wp_registered_sidebars, $wp_registered_widgets; if ( is_int($index) ) { $index = "sidebar-$index"; echo $index; } else { $index = sanitize_title($index); foreach ( (array) $wp_registered_sidebars as $key => $value ) { if ( sanitize_title($value['name']) == $index ) { $index = $key; break; } } } $ultimatum_sidebars_widgets = ultimatum_get_sidebars_widgets(); $sidebar["name"] = $index; $sidebar["id"] = $index; $did_one = false; if(isset($ultimatum_sidebars_widgets[$index])): foreach ( (array) $ultimatum_sidebars_widgets[$index] as $id ) { if ( !isset($wp_registered_widgets[$id]) ) continue; $params = array_merge( array( array_merge( $sidebar, array('widget_id' => $id, 'widget_name' => $wp_registered_widgets[$id]['name']) ) ), (array) $wp_registered_widgets[$id]['params'] ); $classname_ = ''; foreach ( (array) $wp_registered_widgets[$id]['classname'] as $cn ) { if ( is_string($cn) ) $classname_ .= '_' . $cn; elseif ( is_object($cn) ) $classname_ .= '_' . get_class($cn); } $classname_ = ltrim($classname_, '_'); $col = str_replace('sidebar', 'col',$index); global $wpdb; $csstable = $wpdb->prefix.ULTIMATUM_PREFIX.'_css'; $query = "SELECT * FROM $csstable WHERE `container`='$col' AND `element`='general'"; $fecth = $wpdb->get_row($query,ARRAY_A); if($fecth){ $properties =unserialize($fecth['properties']); } $lw=0; $rw=0; if(isset($properties['padding-left'])){ $lw = str_replace('px','', $properties['padding-left']); } if(isset($properties['padding-right'])){ $rw = str_replace('px','', $properties['padding-right']); } $tag = (get_ultimatum_option('tags', 'multi_widget') ? get_ultimatum_option('tags', 'multi_widget') : 'h3'); if(is_singular()){ $tag = (get_ultimatum_option('tags', 'single_widget') ? get_ultimatum_option('tags', 'single_widget') :'h3'); } $params[0]['grid_width']=$grid-($lw+$rw); $params[0]['before_widget']='<div class="widget '.$classname_.' inner-container">'; $params[0]['after_widget']='</div>'; $params[0]['before_title']=' <'.$tag.' class="element-title">'; $params[0]['after_title'] = '</'.$tag.'>'; $params[0]['responsivetheme']=$responsive; $params = apply_filters( 'dynamic_sidebar_params', $params ); /* We will visit this again in Ultimatum 3.0 echo '<pre>'; print_r($wp_registered_widgets[$id]); echo '</pre>'; $wopt = $wp_registered_widgets[$id]['callback'][0]->option_name; $nr = $wp_registered_widgets[$id]['params'][0]['number']; $opt = get_option($wopt); echo '<pre>'; print_r($opt[$nr]); echo '</pre>'; */ $callback = $wp_registered_widgets[$id]['callback']; do_action( 'dynamic_sidebar', $wp_registered_widgets[$id] ); if ( is_callable($callback) ) { call_user_func_array($callback, $params); $did_one = true; } //3954 } endif; return $did_one; }
static public function saveCSS($id,$type= null) { $content=''; if(!$type) { $type='layout'; $setter='_'.$id.'_css'; $css_disabler = getLayoutInfo($id); } else { $setter='_template_'.$id.'_css'; $css_disabler = getTemplateInfo($id); } $option = THEME_SLUG.$setter; $data = get_option($option); if($css_disabler->dcss == 'yes'){ unset($data); } if (is_writable(THEME_CACHE_DIR)) { $file = THEME_CACHE_DIR.'/'.$type.'_'.$id.'.css'; if($data && is_array($data) && count($data)!=0): foreach($data as $el=>$values){ $cssvar = array( "cssvar1" => "body", "cssvar2" => "#logo-container", "cssvar3" => "h1, h1 a, h1 a:hover, h1 a:visited", "cssvar4" => "h2, h2 a, h2 a:hover, h2 a:visited", "cssvar5" => "h3, h3 a, h3 a:hover, h3 a:visited", "cssvar6" => "h4, h4 a, h4 a:hover, h4 a:visited", "cssvar7" => "h5, h5 a, h5 a:hover, h5 a:visited", "cssvar8" => "h6, h6 a, h6 a:hover, h6 a:visited", "cssvar9" => "a", "cssvar10" => "a:hover", "cssvar11" => ".multi-post-title, .multi-post-title a, .multi-post-title a:hover, .multi-post-title a:visited", "cssvar12" => ".multi-post-title", "cssvar13" => ".post-inner, .post-inner-single", "cssvar14" => ".post-inner, .post-inner-single", "cssvar15" => ".post-header", "cssvar16" => "div.post-meta", "cssvar17" => ".post-meta", "cssvar18" => ".post-header, .post-header a, .post-header a:hover, .post-header a:visited", "cssvar19" => "div.post-meta, div.post-meta a", "cssvar20" => "div.post-taxonomy span", "cssvar21" => "div.post-taxonomy a", "cssvar22" => "a.readmorecontent", "cssvar23" => "#comments h3, #comments h3 a, #comments h3 a:hover, #comments h3 a:visited", "cssvar24" => ".comment-author, .comment-author a, .comment-author a:hover, .comment-author a:visited", "cssvar25" => ".comment-meta a", "cssvar26" => ".comment-content", "cssvar27" => "a.comment-reply-link, a.cancel-comment-reply-link", "cssvar28" => "h3.respond, h3.respond a, h3.respond a:hover, h3.respond a:visited", "cssvar29" => "form#commentform label", "cssvar30" => "div.breadcrumbs-plus p span, div.breadcrumbs-plus p, div.breadcrumbs-plus p a", "cssvar31" => "div.breadcrumbs-plus p span.breadcrumbs-title", "cssvar32" => "div.breadcrumbs-plus p strong", "cssvar33" => ".wp-pagenavi a, .wp-pagenavi span", "cssvar34" => ".wp-pagenavi span.current", "cssvar35" => "div.wp-pagenavi a, div.wp-pagenavi span", "cssvar36" => "div.wp-pagenavi span.current", "cssvar37" => ".wfm-mega-menu", "cssvar38" => ".wfm-mega-menu ul li:hover, .wfm-mega-menu ul li .sub-container", "cssvar39" => ".wfm-mega-menu ul li .sub li.mega-hdr a.mega-hdr-a", "cssvar40" => ".wfm-mega-menu ul li .sub-container.non-mega li a:hover, .wfm-mega-menu ul li .sub ul.sub-menu li a:hover", "cssvar41" => ".wfm-mega-menu ul.menu li a", "cssvar42" => ".wfm-mega-menu ul.menu li:hover a", "cssvar43" => ".wfm-mega-menu ul li .sub li.mega-hdr a.mega-hdr-a:hover", "cssvar44" => ".wfm-mega-menu ul li .sub ul.sub-menu li a", "cssvar45" => ".wfm-mega-menu ul li .sub ul.sub-menu li a:hover", "cssvar46" => ".wfm-mega-menu ul li .sub-container.non-mega li a", "cssvar47" => ".wfm-mega-menu ul li .sub-container.non-mega li a:hover", "cssvar48" => ".ddsmoothmenuh", "cssvar49" => ".ddsmoothmenuh ul li ul", "cssvar50" => ".ddsmoothmenuh ul li a", "cssvar51" => ".ddsmoothmenuh ul li:hover,.ddsmoothmenuh ul li a.selected,.ddsmoothmenuh ul li a:hover,.ddsmoothmenuh ul li ul.sub-menu li, .ddsmoothmenuh ul li ul.sub-menu li a", "cssvar52" => ".ddsmoothmenuh ul li ul li:hover, .ddsmoothmenuh ul li ul li a:hover", "cssvar53" => ".ddsmoothmenuh ul li a:link,.ddsmoothmenuh ul li a:visited", "cssvar54" => ".ddsmoothmenuh ul li a:hover", "cssvar55" => ".ddsmoothmenuh ul li ul li a:link,.ddsmoothmenuh ul li ul li a:visited", "cssvar56" => ".ddsmoothmenuh ul li ul li a:hover", "cssvar57" => "div.horizontal-menu", "cssvar58" => "div.horizontal-menu ul li a", "cssvar59" => "div.horizontal-menu ul li:hover", "cssvar60" => "div.horizontal-menu ul li", "cssvar61" => "div.horizontal-menu ul li, div.horizontal-menu ul li a:link,div.horizontal-menu ul li a:visited", "cssvar62" => "div.horizontal-menu ul li:hover a", "cssvar63" => ".wfm-vertical-mega-menu", "cssvar64" => ".wfm-vertical-mega-menu ul li:hover, .wfm-vertical-mega-menu ul li .sub-container", "cssvar65" => ".wfm-vertical-mega-menu ul li .sub li.mega-hdr a.mega-hdr-a", "cssvar66" => ".wfm-vertical-mega-menu ul li .sub-container.non-mega li a:hover, .wfm-vertical-mega-menu ul li .sub ul.sub-menu li a:hover", "cssvar67" => ".wfm-vertical-mega-menu ul li a", "cssvar68" => ".wfm-vertical-mega-menu ul li a:hover", "cssvar69" => ".wfm-vertical-mega-menu ul li .sub li.mega-hdr a.mega-hdr-a:hover", "cssvar70" => ".wfm-vertical-mega-menu ul li .sub ul.sub-menu li a", "cssvar71" => ".wfm-vertical-mega-menu ul li .sub ul.sub-menu li a:hover", "cssvar72" => ".wfm-vertical-mega-menu ul li .sub-container.non-mega li a", "cssvar73" => ".wfm-vertical-mega-menu ul li .sub-container.non-mega li a:hover", "cssvar74" => ".ddsmoothmenuv", "cssvar75" => ".ddsmoothmenuv ul li a:link,.ddsmoothmenuv ul li a:visited,.ddsmoothmenuv ul li a:active", "cssvar76" => ".ddsmoothmenuv ul li:hover,.ddsmoothmenuv ul li a.selected,.ddsmoothmenuv ul li a:hover,.ddsmoothmenuv ul li ul.sub-menu li, .ddsmoothmenuv ul li ul.sub-menu li a", "cssvar77" => ".ddsmoothmenuv ul li ul li:hover, .ddsmoothmenuv ul li ul li a:hover", "cssvar78" => ".ddsmoothmenuv ul li a:link,.ddsmoothmenuv ul li a:visited", "cssvar79" => ".ddsmoothmenuv ul li a:hover", "cssvar80" => ".ddsmoothmenuv ul li ul li a:link,.ddsmoothmenuv ul li ul li a:visited", "cssvar81" => ".ddsmoothmenuv ul li ul li a:hover", "cssvar82" => ".vertical-menu a", "cssvar83" => "div.vertical-menu a:hover", "cssvar84" => ".vertical-menu a:link,.vertical-menu a:visited", "cssvar85" => ".vertical-menu a:hover", "cssvar86" => ".ult_tabs ul.ult_tablinks li a", "cssvar87" => ".ult_tabs ul.ult_tablinks li a:hover", "cssvar88" => ".ult_tabs ul.ult_tablinks li.active a", "cssvar89" => "div.tabs-wrapper.ult_tabs", "cssvar90" => ".ult_accordion .accordion-toggle", "cssvar91" => ".ult_accordion .accordion-toggle.active", "cssvar92" => ".ult_accordion .accordion-inner", "cssvar93" => ".ult_accordion .accordion-toggle", "cssvar94" => ".toggler .accordion-toggle.collapsed", "cssvar95" => ".toggler .accordion-toggle", "cssvar96" => ".toggler .accordion-inner", "cssvar97" => ".toggler .accordion-toggle", "cssvar98" => ".toggler .accordion-inner", "cssvar99" => ".slidertitle, .slidertitle a, .slidertitle a:hover, .slidertitle a:visited", "cssvar100" => "p.slidertext", "cssvar101" => ".slidedeck > dt", "cssvar102" => "h1.super-title, h1.super-title a, h1.super-title a:hover, h1.super-title a:visited", "cssvar103" => ".element-title, .element-title a, .element-title a:hover, .element-title a:visited", "cssvar104" => ".element-title", "cssvar105" => "h3.slidertitle, h3.slidertitle a, h3.slidertitle a:hover, h3.slidertitle a:visited", "cssvar106" => ".anyCaption h3.slidertitle, .s3caption h3.slidertitle, .anyCaption h3.slidertitle, .s3caption h3.slidertitle a, .anyCaption h3.slidertitle, .s3caption h3.slidertitle a:hover, .anyCaption h3.slidertitle, .s3caption h3.slidertitle a:visited", "cssvar107" => ".anyCaption p.slidertext, .s3caption p.slidertext", "cssvar108" => "#logo,#logo a", "cssvar109" => "span#tagline", "cssvar110" => "blockquote *", "cssvar111" => ".wfm-mega-menu ul li.current-menu-ancestor, .wfm-mega-menu ul li.current-menu-item", "cssvar112" => ".wfm-mega-menu ul li.current-menu-ancestor a, .wfm-mega-menu ul li.current-menu-item a", "cssvar113" => ".wfm-vertical-mega-menu ul li.current-menu-ancestor, .wfm-vertical-mega-menu ul li.current-menu-item", "cssvar114" => ".wfm-vertical-mega-menu ul li.current-menu-ancestor a, .wfm-vertical-mega-menu ul li.current-menu-item a", "cssvar115" => ".ddsmoothmenuh ul li.current-menu-ancestor a, .ddsmoothmenuh ul li.current-menu-item a", "cssvar116" => ".ddsmoothmenuh ul li.current-menu-ancestor a, .ddsmoothmenuh ul li.current-menu-item a", "cssvar117" => ".ddsmoothmenuv ul li.current-menu-ancestor a, .ddsmoothmenuv ul li.current-menu-item a", "cssvar118" => ".ddsmoothmenuv ul li.current-menu-ancestor a, .ddsmoothmenuv ul li.current-menu-item a", "cssvar119" => "div.horizontal-menu ul li.current-menu-ancestor , div.horizontal-menu ul li.current-menu-item ", "cssvar120" => "div.horizontal-menu ul li.current-menu-ancestor a, div.horizontal-menu ul li.current-menu-item a ", "cssvar121" => ".vertical-menu ul li.current-menu-item>a", "cssvar122" => ".vertical-menu ul li.current-menu-item>a", "cssvar123" => ".ultimatum-menu", "cssvar127" => ".ultimatum-menu .nav-holder .ultimatum-megamenu-wrapper .ultimatum-megamenu-title ,.ultimatum-menu .nav-holder h3.widget-title.element-title", 'cssvar128' => ".ultimatum-menu .nav-holder .navigation > li >a", 'cssvar129' => ".ultimatum-menu .nav-holder .navigation > li:hover >a,.ultimatum-menu .nav-holder .navigation > li.current-menu-ancestor > a,.ultimatum-menu .nav-holder .navigation > li.current_page_item > a,.ultimatum-menu .nav-holder .navigation > li.current-menu-item > a,.ultimatum-menu .nav-holder .navigation > li.current-menu-parent > a", "cssvar130" => '.ultimatum-menu .nav-holder ul li ul li > a', "cssvar131" => '.ultimatum-menu .nav-holder ul li ul li > a:hover', "cssvar132" => '.ultimatum-menu .nav-holder ul ul,.ultimatum-menu .nav-holder .ultimatum-megamenu-wrapper .ultimatum-megamenu-holder,.ultimatum-menu .nav-holder ul .login-box,.ultimatum-menu .nav-holder ul .cart-contents,.ultimatum-menu .nav-holder .nav-search-form', "cssvar133" => '.ultimatum-menu .nav-holder ul li ul li > a:hover, .ultimatum-menu .nav-holder ul li ul li.current-menu-item > a,.ultimatum-menu .nav-holder .ultimatum-menu-nav > li .sub-menu .current-menu-ancestor', "cssvar134" => '.ultimatum-menu .nav-holder .ultimatum-megamenu-wrapper .ultimatum-megamenu-submenu,.ultimatum-menu .nav-holder .ultimatum-megamenu-wrapper .ultimatum-megamenu-border,.ultimatum-menu .nav-holder .ultimatum-menu-nav .ultimatum-megamenu-wrapper ul ul,.ultimatum-menu .nav-holder .ultimatum-menu-nav .ultimatum-megamenu-wrapper ul ul li', 'cssvar135' => 'a.sidr-toggler, a.sidr-toggler:hover', 'cssvar136' => '.slicknav_menu .slicknav_menutxt', 'cssvar137' => 'a.slicknav_btn', 'cssvar138' => 'ul.slicknav_nav a', 'cssvar139' => 'ul.slicknav_nav a:hover,ul.slicknav_nav li:hover,ul.slicknav_nav .slicknav_row:hover', 'cssvar140' => '#content article.hentry', 'cssvar141' => 'header.headwrapper', 'cssvar142' => 'footer.footwrapper', ); if($el!='save_options' && $el!='bg_pattern'){ $umm_fix = $el; $el = $cssvar[$el]; foreach ($values as $property=>$value){ // add px and # if($umm_fix == 'cssvar124' && strlen($value)!=0 && $value !='inherit'){ $content .= '.ultimatum-menu .nav-holder .navigation > li > a{height:'.$value.'px;line-height:'.$value.'px;}'; } elseif($umm_fix == 'cssvar125' && strlen($value)!=0 && $value !='inherit'){ $content .= '.ultimatum-menu .nav-holder > .ultimatum-menu-nav > li{ padding-right: '.$value.'px; }.rtl .ultimatum-menu .nav-holder > .ultimatum-menu-nav > li{ padding-left: '.$value.'px; }'; } elseif($umm_fix == 'cssvar126' && strlen($value)!=0 && $value !='inherit'){ $content .= '.ultimatum-menu .nav-holder ul ul.sub-menu{width:'.$value.'px;}.ultimatum-menu .nav-holder ul ul.sub-menu li ul{left:'.$value.'px;} ul.navigation > li:last-child ul.sub-menu ul{left:-'.$value.'px;}.ultimatum-menu .nav-holder .ultimatum-megamenu-wrapper ul{left:auto;}.rtl .ultimatum-menu .nav-holder ul ul.sub-menu li:hover ul {right:'.$value.'px;left: auto;}.rtl ul.navigation > li:last-child ul.sub-menu ul{right:-'.$value.'px;left: auto;}'; } else { if(strlen($value)!=0 && $value !='inherit'){ if($umm_fix == 'cssvar134'){ $content .= ".ultimatum-menu .nav-holder ul li ul li > a,.ultimatum-menu .nav-holder .nav-search-form{border-bottom:1px solid #".str_replace('#', '',$value).";}"; } elseif ($umm_fix=='cssvar136') { $content .= '.slicknav_menu .slicknav_icon-bar{background-color:#'.str_replace('#','',$value).'}'; } if(preg_match('/color/i',$property)){ //empty # fix if(stripslashes(str_replace('#', '',$value))!=""){ if(preg_match('/rgba/i',$value)){ $element[]=$property.': '.stripslashes(str_replace('#', '',$value)); } else { $element[]=$property.': #'.stripslashes(str_replace('#', '',$value)); } } } elseif (preg_match('/letter-spacing/i',$property) || preg_match('/width/i',$property) || preg_match('/word-spacing/i',$property) || preg_match('/size/i',$property) || preg_match('/height/i',$property) || preg_match('/margin/i',$property) || preg_match('/padding/i',$property )){ if($property != 'background-size') { $element[]=$property.': '.stripslashes($value).'px'; } } elseif (preg_match('/image/i',$property)){ $element[]=$property.': url('.stripslashes($value).')'; } elseif (preg_match('/family/i',$property)){ // cufon fontface google if(preg_match('/cufon-/i',$value)){ //cufon $cf = str_replace('cufon-', '', $value); $cfonts = explode('-js-',$cf); $cufonjs[]=$cfonts[1]; $cufonreplace[$cfonts[0]][]=$el; unset($cfonts); $element[]=$property.': Arial,sans-serif'; }elseif(preg_match('/google-/i',$value)){ //google $gfont=explode('-css-',str_replace('google-','',$value)); $font = $gfont[0]; $googlecss[] = $gfont[1]; unset($gfont); $element[]=$property.': "'.stripslashes($font).'", Arial, sans-serif'; }elseif(preg_match('/fontface-/i',$value)){ //fontface $ffont=explode('-css-',str_replace('fontface-','',$value)); $font = $ffont[0]; $fontfacer[] = $ffont[1]; unset($ffont); $element[]=$property.': "'.stripslashes($font).'", Arial, sans-serif'; } else { $element[]=$property.': '.stripslashes($value); } } else { $element[]=$property.': '.stripslashes($value); } } }//ummfix end } $linebreak=';'."\n"; if(isset($element) && is_array($element)){ $content.= $el.' {'."\n".@implode($linebreak, $element).';'."\n".'}'."\n\n"; } unset($element); } } // Intelligent Google $googleCss = false; if(isset($googlecss)){ $gcss = array_unique($googlecss); if(count($gcss)>=1){ foreach($gcss as $google_css){ $google_css=str_replace(' ', '+', $google_css); $charsets = get_ultimatum_option('scripts','google_charset'); if(is_array($charsets) && ($charsets)!=0){ $subset="&subset=".implode(',',$charsets); $google_css .=$subset; } $googleCss .= '@import url(//fonts.googleapis.com/css?family='.$google_css.');'."\n"; } } } //Intelligent @font-face $fontfacecss=false; if(isset($fontfacer)){ $fcss = array_unique($fontfacer); if(count($fcss)!=0){ $url = str_replace('http:','',ULTIMATUM_LIBRARY_URI.'/fonts/fontface'); $url = str_replace('https:','',$url); foreach ($fcss as $font_str){ $font_info = explode("|", $font_str); $stylesheet = THEME_FONTFACE_DIR.'/'.$font_info[0].'/stylesheet.css'; if(file_exists($stylesheet)){ $file_content = file_get_contents($stylesheet); if( preg_match("/@font-face\s*{[^}]*?font-family\s*:\s*('|\")$font_info[1]\\1.*?}/is", $file_content, $match) ){ $fontfacecss .= preg_replace("/url\s*\(\s*['|\"]\s*/is","\\0$url/$font_info[0]/",$match[0])."\n"; } } } } } endif; if($type == "layout"){ $fffile = THEME_CACHE_DIR.'/fontface'.$setter.'.css'; if(file_exists($fffile)){ unlink($fffile); } if($fontfacecss){ $ffhandle2 = @fopen($fffile, 'w+'); if ($ffhandle2) fwrite($ffhandle2, $fontfacecss, strlen($fontfacecss)); $ffinclude = "@import url('".THEME_CACHE_URL.'/fontface'.$setter.".css');"."\n"; $content = $ffinclude.$content; } if(isset($googleCss)){ $content = $googleCss.$content; } $content .= WonderWorksCSS::partCSS($id);// the original row // add the included layouts as well $includedLayouts = WonderWorksCSS::getLayoutsIncluded($id); foreach ($includedLayouts as $includedLayout){ $content .= WonderWorksCSS::partCSS($includedLayout); } if(strlen($content)!=0){ $content = preg_replace( '!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $content ); $content = str_replace( array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $content ); $fhandle = @fopen($file, 'w+'); if ($fhandle) fwrite($fhandle, $content, strlen($content)); } $custom_css= stripslashes(get_option(THEME_SLUG.'_custom_css_'.$id)); if(strlen($custom_css)){ $file2 = THEME_CACHE_DIR.'/layout_custom_'.$id.'.css'; $fhandle2 = @fopen($file2, 'w+'); if ($fhandle2) fwrite($fhandle2, $custom_css, strlen($custom_css)); } } elseif($type!='layout'){ // do the grid $grid = WonderWorksCSS::gridParser($id); $content = $grid.$content; if(strlen($googleCss)!=0){ $content = $googleCss.$content; } // do the fontface inclusion $fffile = THEME_CACHE_DIR.'/fontface'.$setter.'.css'; if(file_exists($fffile)){ unlink($fffile); } if($fontfacecss){ $ffhandle2 = @fopen($fffile, 'w+'); if ($ffhandle2) fwrite($ffhandle2, $fontfacecss, strlen($fontfacecss)); $ffinclude = "@import url('".THEME_CACHE_URL.'/fontface'.$setter.".css');"."\n"; $content = $ffinclude.$content; } if(strlen($content)!=0){ $content = preg_replace( '!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $content ); $content = str_replace( array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $content ); $fhandle = @fopen($file, 'w+'); if ($fhandle) fwrite($fhandle, $content, strlen($content)); } $custom_css= stripslashes(get_option(THEME_SLUG.'_custom_template_css_'.$id)); if(strlen($custom_css)){ $file2 = THEME_CACHE_DIR.'/template_custom_'.$id.'.css'; $fhandle2 = @fopen($file2, 'w+'); if ($fhandle2) fwrite($fhandle2, $custom_css, strlen($custom_css)); } } $cfile = THEME_CACHE_DIR.'/cufon'.$setter.'.php'; if(file_exists($cfile)){ unlink($cfile); } if(isset($cufonjs)){ $cufjs = array_unique($cufonjs); if(count($cufjs)>=1){ $phpcontent = '<script type="text/javascript" src="'.ULTIMATUM_URL.'/assets/js/plugins/cufon-yui.js"></script>'."\n"; foreach ($cufjs as $cjsi){ $phpcontent.='<script type="text/javascript" src="'.ULTIMATUM_LIBRARY_URI.'/fonts/cufon/'.$cjsi.'"></script>'."\n"; } $phpcontent.='<script type="text/javascript">'."\n"; foreach($cufonreplace as $font=>$item){ $phpcontent .= 'Cufon.replace("'.implode(', ',$item).'", {fontFamily : "'.$font.'",hover:true});'."\n"; } $phpcontent .= '</script>'; $fhandler = @fopen($cfile, 'w+'); if ($fhandler){ fwrite($fhandler, $phpcontent, strlen($phpcontent)); } } } } return false; }
/** * * This file is a core Ultimatum file and should not be edited. * * @package Ultimatum * @author Wonder Foundry http://www.wonderfoundry.com * @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later) * @link http://ultimatumtheme.com * @version 2.50 */ do_action('ultimatum_print_footer'); wp_footer(); do_action('ultimatum_before_body_close'); if(get_ultimatum_option('scripts', 'footer_scripts')){ $text = stripslashes(get_ultimatum_option('scripts', 'footer_scripts')); ob_start(); eval('?>'.$text); $text = ob_get_contents(); ob_end_clean(); echo $text; } echo "\n"; ?> <?php /* global $ultimatumlayout; echo'<pre>'; print_r($ultimatumlayout); echo'</pre>'; */
function ultimatum_custom_loop_image( $args, $instance, $imgw, $rel, $align, $gallery ) { global $post; extract( $args ); $img = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large' ); $imgsrc = false; if ( ! $img && $instance["mnoimage"] == 'true' ) { $img[0] = null; if ( get_ultimatum_option( 'general', 'noimage' ) ) { $img[0] = get_ultimatum_option( 'general', 'noimage' ); } $imgsrc = UltimatumImageResizer( null, $img[0], $imgw, $instance["multipleh"], true ); } elseif ( is_array( $img ) ) { $imgsrc = UltimatumImageResizer( get_post_thumbnail_id(), null, $imgw, $instance["multipleh"], true ); } if ( $imgsrc ) { ?> <div class="featured-image <?php echo $align;?>" <?php if ($gallery){ ?>style="position: relative"<?php } ?>> <?php $video = get_post_meta( $post->ID, 'ultimatum_video', true ); if ( $gallery ) { if ( $video ) { $link = $video . ''; } else { $link = $img[0]; if ( preg_match( '/holder.js/i', $imgsrc ) ) { $link = ''; $rel = ''; } } } if ( $instance["mvideo"] == 'true' ) { if ( get_post_meta( $post->ID, '_image_ids', true ) && ! $gallery && $instance['ult_full_image'] ) { post_gallery( $imgw, $instance["multipleh"], $instance ); } elseif ( get_post_meta( $post->ID, 'ultimatum_video', true ) && ! $gallery ) { $sc = '[ult_video width="' . $imgw . '" height="' . $instance["multipleh"] . '"]' . $video . '[/ult_video]'; echo do_shortcode( $sc ); } else { ?> <a href="<?php if ( $gallery ) { echo $link; } else { the_permalink(); } ?>" <?php echo $rel ?> class="preload <?php if ( $gallery ) { echo ' overlayed_image'; } ?>" <?php if ( $gallery ) { if ( $video ) { echo ' data-overlay="play"'; } else { echo ' data-overlay="image"'; } } ?>> <img src="<?php echo $imgsrc; ?>" alt="<?php the_title(); ?>"/> </a><?php } } else { ?> <a href="<?php if ( $gallery ) { echo $link; } else { the_permalink(); } ?>" <?php echo $rel ?> class="preload <?php if ( $gallery ) { echo ' overlayed_image'; } ?>" <?php if ( $gallery ) { if ( $video ) { echo ' data-overlay="play"'; } else { echo ' data-overlay="image"'; } } ?>> <img src="<?php echo $imgsrc; ?>" alt="<?php the_title(); ?>"/> </a><?php } ?> </div><?php } }
function ultimatum_standard_loop($args=null,$instance=null) { global $ultimatum_inline_css; extract( $args ); $per_page = $instance["perpage"]; $loop_text_vars = $instance['loop_text_vars']; $gallery=false; $noimage=false; $imgw=false; $clear=true; $rel=''; $instance['ult_full_image']= true; if(is_singular()){ // Build the Loop structure for single content pages if(preg_match('/.php/i', $instance["single"])) { $loopfile = $instance["single"]; } switch ($instance["single"]){ case 'rimage': $image = true; $align = "fimage-align-right"; $imgw=$instance["singlew"]; $instance['ult_full_image']= false; break; case 'limage': $image = true; $align = "fimage-align-left"; $imgw=$instance["singlew"]; $instance['ult_full_image']= false; break; case 'fimage': $image = true; $imgw = $grid_width; $align=''; break; default: $image= false; $align=''; break; } } else { global $wp_query; $paged = (get_query_var('paged') && get_query_var('paged') > 1) ? get_query_var('paged') : 1; $args = array_merge( $wp_query->query, array( 'posts_per_page' =>$per_page, "paged"=>$paged, ) ); query_posts( $args ); if(preg_match('/.php/i', $instance["multiple"])) { $loopfile = $instance["multiple"]; } $title = apply_filters('widget_title', $instance['title']); $colprops = explode('-', $instance["multiple"]); $colcount = $colprops[0]; switch ($colcount){ case '1': $imgw = $grid_width; $cols = 1; break; case '2': $imgw = $grid_width/2; $cols = 2; add_filter( 'post_class', 'ultimatum_entry_post_class_half' ); break; case '3': $imgw = $grid_width/3; $cols = 3; add_filter( 'post_class', 'ultimatum_entry_post_class_third' ); break; case '4': $imgw = $grid_width/4; $cols = 4; add_filter( 'post_class', 'ultimatum_entry_post_class_fourth' ); break; } $colcount=$cols; if($colcount==1 && ($colprops[2]=='ri' || $colprops[2]=='li' || $colprops[2]=='gl' || $colprops[2]=='gr') ){ $imgw=$instance["multiplew"]; $instance['ult_full_image']= false; } $gallery =false; switch($colprops[2]){ case 'ri': $align = "fimage-align-right"; $image = true; break; case 'li': $align = "fimage-align-left"; $image = true; break; case 'gl': $align = "fimage-align-left"; $rel = 'rel="prettyPhoto[]"'; $gallery =true; $image = true; break; case 'gr': $align = "fimage-align-right";; $rel = 'rel="prettyPhoto[]"'; $gallery =true; $image = true; break; case 'g': $rel = 'rel="prettyPhoto[]"'; $gallery =true; $align=''; $image = true; break; case 'i': $align=''; $image = true; break; default: $image = false; $align=''; break; } } include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if(isset($loopfile) && file_exists(THEME_LOOPS_DIR.DS.$loopfile)){ include(THEME_LOOPS_DIR.DS.$loopfile); } elseif (is_plugin_active( 'wonderloops/wonderloops.php' ) && isset($loopfile) && file_exists(ULTLOOPBUILDER_DIR.DS.$loopfile) ) { //Wonder Loop include include(ULTLOOPBUILDER_DIR.DS.$loopfile); } else { global $loop_counter; $loop_counter = 0; $igogrid=1; ?> <div id="content" role="main"> <?php if(!is_singular() && $instance['atitle']=='ON') { $tag = (get_ultimatum_option('tags', 'archive_title') ? get_ultimatum_option('tags', 'archive_title') : 'h1'); ?> <<?php echo $tag;?> class="multi-post-title"> <?php if ( is_day() ) : ?> <?php printf( $loop_text_vars['daily'], '<span>' . get_the_date() . '</span>' ); ?> <?php elseif ( is_month() ) : ?> <?php printf( $loop_text_vars['monthly'], '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'ultimatum' ) ) . '</span>' ); ?> <?php elseif ( is_year() ) : ?> <?php printf( $loop_text_vars['yearly'], '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'ultimatum' ) ) . '</span>' ); ?> <?php elseif(is_search()) : ?> <?php printf( $loop_text_vars['search'], '<span>' . get_search_query() . '</span>' ); ?> <?php elseif(is_author()) : ?> <?php printf( $loop_text_vars['author'], '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( "ID" ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?> <?php else: if(single_term_title( '', false )) { printf($loop_text_vars['archives'], '<span>' . single_term_title('', false) . '</span>'); } endif; ?> </<?php echo $tag;?>> <?php } ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); if($instance['postnavigation']=='ontop'){ ultimatum_prev_next_post_nav(); } $currentpostbefore = 'ultimatum_before_post_'.$loop_counter; $currentpostafter = 'ultimatum_after_post_'.$loop_counter; do_action( 'ultimatum_before_post' ); if(!is_singular()){ do_action($currentpostbefore); $clear=true; if($colcount!=1)://gridd if($igogrid==1){ $igogrid++; remove_filter( 'post_class', 'ultimatum_entry_post_class_last' ); $clear=false; } elseif($igogrid==$colcount){ add_filter( 'post_class', 'ultimatum_entry_post_class_last' ); $clear=true; $igogrid=1; } else{ $igogrid++; remove_filter( 'post_class', 'ultimatum_entry_post_class_last' ); $clear=false; } endif;//gridd } if($image){ if(is_singular()){ if($instance['imgpos']!='btitle'){ add_action('ultimatum_after_post_title','ultimatum_content_item_image',10,6); } else { add_action('ultimatum_before_post_title','ultimatum_content_item_image',10,6); } } else { if($instance['mimgpos']!='btitle'){ add_action('ultimatum_after_post_title','ultimatum_content_item_image',10,6); } else { add_action('ultimatum_before_post_title','ultimatum_content_item_image',10,6); } } } else { //controller for meta if((is_singular() && $instance['meta']=='aimage')){ $instance['meta']='atitle'; } if((is_singular() && $instance['meta']=='bimage')){ $instance['meta']='atitle'; } if((!is_singular() && $instance['mmeta']=='aimage')){ $instance['mmeta']='atitle'; } } if((is_singular() && $instance['meta']=='atext')){ add_action( 'ultimatum_after_post_content', 'ultimatum_post_meta',10,2); } if((is_singular() && $instance['meta']=='atitle')){ add_action( 'ultimatum_after_post_title', 'ultimatum_post_meta',10,2); } if((is_singular() && $instance['meta']=='aimage')){ add_action( 'ultimatum_after_featured_image', 'ultimatum_post_meta',10,2); } if((is_singular() && $instance['meta']=='bimage')){ add_action( 'ultimatum_before_featured_image', 'ultimatum_post_meta',10,2); } if((is_singular() && $instance['cats']=='acontent')){ add_action( 'ultimatum_after_post_content', 'ultimatum_post_tax' ); } if((!is_singular() && $instance['mmeta']=='atitle')){ add_action( 'ultimatum_after_post_title', 'ultimatum_post_meta',10,2 ); } if((!is_singular() && $instance['mmeta']=='atext')){ add_action( 'ultimatum_after_post_content', 'ultimatum_post_meta',10,2 ); } if((!is_singular() && $instance['mmeta']=='aimage')){ add_action( 'ultimatum_after_featured_image', 'ultimatum_post_meta',10,2 ); } if((!is_singular() && $instance['mcats']=='acontent')){ add_action( 'ultimatum_after_post_content', 'ultimatum_post_tax' ); } ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php do_action( 'ultimatum_before_post_title',$args,$instance,$imgw,$rel,$align,$gallery); ?> <?php do_action( 'ultimatum_post_title',$args,$instance ); ?> <?php do_action( 'ultimatum_after_post_title',$args,$instance,$imgw,$rel,$align,$gallery); ?> <?php do_action( 'ultimatum_before_post_content',$args,$instance ); ?> <div class="entry-content"> <?php do_action( 'ultimatum_post_content',$instance ); ?> </div> <?php do_action( 'ultimatum_after_post_content',$args,$instance ); ?> <div class="clearfix"></div> </article> <?php if($instance['postnavigation']=='atbottom'){ ultimatum_prev_next_post_nav(); } do_action( 'ultimatum_after_post',$instance ); if(!is_singular()){do_action($currentpostafter);} if($clear) echo '<div class="clearfix"></div>'; $loop_counter++; endwhile; /** end of one post **/ do_action( 'ultimatum_after_endwhile',$instance ); else : /** if no posts exist **/ do_action( 'ultimatum_loop_else' ); endif; /** end loop **/ ?> </div> <?php } }
function ultimatum_do_post_title($args,$instance) { $title = get_the_title(); $tag = (get_ultimatum_option('tags', 'multi_article') ? get_ultimatum_option('tags', 'multi_article') : 'h2'); $stag = (get_ultimatum_option('tags', 'single_article') ? get_ultimatum_option('tags', 'single_article') : 'h1'); if ( 0 == strlen( $title ) ) return; if ( is_singular() && $instance["title"]=='true' ){ $title = sprintf( '<'.$stag.' class="entry-title post-header">%s</'.$stag.'>', $title ); echo "$title \n"; } if ( !is_singular() && $instance["mtitle"]=='true' ) { $title = sprintf( '<'.$tag.' class="entry-title post-header"><a href="%s" title="%s" rel="bookmark" class="post-title">%s</a></'.$tag.'>', get_permalink(), the_title_attribute( 'echo=0' ), apply_filters( 'ultimatum_post_title_text', $title ) ); echo "$title \n"; } elseif(!is_singular() && $instance["mtitle"]=='nolink') { $title = sprintf( '<'.$tag.' class="entry-title post-header">%s</'.$tag.'>', $title ); echo "$title \n"; } }
function ultimatum_base_scripts(){ $scripts = array( array( 'handle' => 'stellar-js', 'filename' => 'stellar.js', 'version' => '0.6.2', 'directory' => 'plugins', 'cdn' => '//cdn.jsdelivr.net/jquery.stellar/0.6.2/jquery.stellar.min.js', 'bottom' => true ), array( 'handle' => 'jquery-tweets', 'filename' => 'jquery.tweet.js', 'version' => '2.38', 'directory' => 'plugins', 'bottom' => true ), array( 'handle' => 'swfobject', 'filename' => 'swfobject.js', 'version' => '2.38', 'directory' => 'plugins', 'cdn' => '//cdn.jsdelivr.net/swfobject/2.2/swfobject.js', 'bottom' => true ), array( 'handle' => 'jquery-google-maps', 'filename' => 'jquery.gmap.js', 'version' => '2.38', 'bottom' => true, 'directory' => 'plugins', ), array( 'handle' => 'ios-bubble', 'directory' => 'pro', 'filename' => 'bmb.js', 'version' => '2.38', 'bottom' => false ), array( 'handle' => 'mobile-js', 'directory' => 'pro', 'filename' => 'ultimatum-mobile.js', 'version' => '2.38', 'bottom' => false ), array( 'handle' => 'slider-anything', 'directory' => 'slideshows', 'filename' => 'jquery.anythingslider.min.js', 'version' => '2.38', 'bottom' => true ), array( 'handle' => 'slider-anything-fx', 'directory' => 'slideshows', 'filename' => 'jquery.anthingslider.fx.min.js', 'version' => '2.38', 'bottom' => true ), array( 'handle' => 'slider-elastic', 'directory' => 'slideshows', 'filename' => 'jquery.eislideshow.js', 'version' => '2.38', 'bottom' => true ), array( 'handle' => 'slider-anything-video', 'directory' => 'slideshows', 'filename' => 'jquery.anthingslider.video.min.js', 'version' => '2.38', 'bottom' => true ), array( 'handle' => 'slider-flex', 'directory' => 'slideshows', 'filename' => 'jquery.flexslider-min.js', 'version' => '2.38', 'bottom' => true ), array( 'handle' => 'slider-nivo', 'directory' => 'slideshows', 'filename' => 'jquery.nivo.slider.pack.js', 'version' => '3.2', 'cdn' => '//cdn.jsdelivr.net/nivoslider/3.2/jquery.nivo.slider.pack.js', 'bottom' => true ), array( 'handle' => 'slider-s3', 'directory' => 'slideshows', 'filename' => 'jquery.s3slider.js', 'version' => '2.38', 'bottom' => true ), array( 'handle' => 'slider-zaccordion', 'directory' => 'slideshows', 'filename' => 'jquery.zaccordion.min.js', 'version' => '2.38', 'bottom' => true ), array( 'handle' => 'slider-slidedeck', 'directory' => 'slideshows', 'filename' => 'slidedeck.jquery.lite.js', 'version' => '2.38', 'bottom' => true ), array( 'handle' => 'slider-supersized', 'directory' => 'slideshows', 'filename' => 'supersized.3.2.7.min.js', 'version' => '2.38', 'bottom' => true ), array( 'handle' => 'slider-supersized-shutter', 'directory' => 'slideshows', 'filename' => 'supersized.shutter.min.js', 'version' => '2.38', 'bottom' => true ), array( 'handle' => 'menu-ddsmooth', 'directory' => 'menus', 'filename' => 'ddsmoothmenu.js', 'version' => '2.38', 'bottom' => true ), array( 'handle' => 'menu-hmega', 'directory' => 'menus', 'filename' => 'jquery.dcmegamenu.1.3.3.js', 'version' => '2.38', 'bottom' => true ), array( 'handle' => 'menu-vmega', 'directory' => 'menus', 'filename' => 'jquery.dcverticalmegamenu.1.3.js', 'version' => '2.38', 'bottom' => true ), array( 'handle' => 'jquery-easing', 'directory' => 'plugins', 'filename' => 'jquery.easing.min.js', 'version' => '2.38', 'bottom' => true ), array( 'handle' => 'jquery-mousewheel', 'directory' => 'plugins', 'filename' => 'jquery.mousewheel.min.js', 'version' => '3.0.6', 'cdn' => '//cdn.jsdelivr.net/mousewheel/3.0.6/jquery.mousewheel.min.js', 'bottom' => true ), array( 'handle' => 'jquery-hoverIntent', 'directory' => 'plugins', 'filename' => 'jquery.hoverIntent.min.js', 'version' => 'r7', 'cdn' => '//cdn.jsdelivr.net/jquery.hoverintent/r7/jquery.hoverIntent.minified.js', 'bottom' => true ), array( 'handle' => 'theme-global', 'filename' => 'theme.global.tbs2.min.js', 'version' => '2', 'bottom' => true ), array( 'handle' => 'theme-global-3', 'filename' => 'theme.global.tbs3.min.js', 'version' => '2', 'bottom' => true ), array( 'handle' => 'bootstrap-2', 'filename' => 'bootstrap.2.3.2.min.js', 'version' => '2.3.2', 'directory' => 'src', 'cdn' => '//maxcdn.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js', 'bottom' => true ), array( 'handle' => 'bootstrap-3', 'filename' => 'bootstrap.3.3.4.min.js', 'version' => '3.3.4', 'directory' => 'src', 'cdn' => '//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js', 'bottom' => true ), array( 'handle' => 'jquery-fidvids', 'filename' => 'jquery.fitvids.js', 'version' => '1.1', 'directory' => 'src', 'cdn' => '//cdn.jsdelivr.net/fitvids/1.1.0/jquery.fitvids.js', 'bottom' => true ), array( 'handle' => 'prettyphoto', 'filename' => 'jquery.prettyPhoto.js', 'version' => '3.1.5', 'directory' => 'src', 'cdn' => '//cdn.jsdelivr.net/prettyphoto/3.1.5/js/jquery.prettyPhoto.js', 'bottom' => true ), array( 'handle' => 'jquery-sidr', 'filename' => 'jquery.sidr.min.js', 'version' => '1.2.1', 'directory' => 'src', 'cdn' => '//cdn.jsdelivr.net/jquery.sidr/1.2.1/jquery.sidr.js', 'bottom' => true ), array( 'handle' => 'jquery-slicknav', 'filename' => 'jquery.slicknav.js', 'version' => '1.0.2', 'directory' => 'src', 'cdn' => '//cdn.jsdelivr.net/jquery.slicknav/1.0.2/jquery.slicknav.min.js', 'bottom' => true ), array( 'handle' => 'ult-menu-js', 'filename' => 'ult.menu.js', 'version' => '2.8.0', 'directory' => 'src', 'bottom' => true ), array( 'handle' => 'theme-js', 'filename' => 'theme.js', 'version' => '2.8.0', 'directory' => 'src', 'bottom' => true ), array( 'handle' => 'holder', 'directory' => 'plugins', 'filename' => 'holder.js', 'version' => '1.9.0', 'cdn' => '//cdn.jsdelivr.net/holder/1.9.0/holder.js', 'bottom' => false ), ); foreach($scripts as $script){ // Set Script source // if we are to use CDN and script has CDN source do it and go if(get_ultimatum_option('scripts', 'cdnsource') && isset($script['cdn'])){ $src = $script['cdn']; } else { if (isset($script['directory'])) { $fsrc = $script['directory'] . DS . $script['filename']; $src = $script['directory'] . '/' . $script['filename']; } else { $fsrc = $script['filename']; $src = $script['filename']; } // check if replacement file is on place if (CHILD_THEME && file_exists(THEME_DIR . DS . 'js' . DS . $fsrc)) { $src = THEME_URL . '/js/' . $src; } else { $src = ULTIMATUM_URL . '/assets/js/' . $src; } } wp_register_script($script['handle'], $src,array(),$script['version'],$script['bottom']); } }
function ultimatum_layout_generator() { require_once('ultimatum-widgets.php'); global $wpdb; $table = $wpdb->prefix.ULTIMATUM_PREFIX.'_layout'; $tablerows = $wpdb->prefix.ULTIMATUM_PREFIX.'_rows'; $layoutid=$_GET["layoutid"]; $query = "SELECT * FROM $table WHERE `id`='$layoutid'"; $layout = $wpdb->get_row($query,ARRAY_A); ?> <style>td{vertical-align: top;}</style> <div id="blocker"> <div><h1><i class="fa fa-save"></i> Saving..</h1></div> </div> <div class="ultadmnavi" style="position:absolute;top:0;width:100%;margin-right:25px;"> <div class="navbar"> <div class="navbar-inner"> <a class="brand" href="">EDIT LAYOUT</a> <ul class="nav"> <li> <a class="thickbox" href="<?php echo admin_url(); ?>?page=ultimatum-row-layouts&layout_id=<?php echo $_GET["layoutid"];?>&template_id=<?php echo $_GET['theme'];?>&TB_iframe=1&width=770&height=480" title="<?php _e('Click on row style you want to insert and then click insert button','ultimatum');?>"><?php _e('Insert Row','ultimatum');?></a> </li> <?php if($layout['type']=='full'){ ?> <li class="dropdown" > <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php _e('EDIT CSS','ultimatum');?><b class="caret"></b></a> <ul class="dropdown-menu" role="menu" > <li><a tabindex="-1" href="./admin.php?page=wonder-css&template_id=<?php echo $layout['theme'];?>"><?php _e('Template CSS','ultimatum');?></a></li> <li><a tabindex="-1" href="./admin.php?page=wonder-css&layout_id=<?php echo $layout['id'];?>"><?php _e('Layout Specific CSS','ultimatum');?></a></li> </ul> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php _e('Custom CSS','ultimatum');?><b class="caret"></b></a> <ul class="dropdown-menu" role="menu" > <li><a href="./index.php?page=ultimatum-custom-css&template_id=<?php echo $layout['theme'];?>&modal=true&TB_iframe=1&width=640&height=380" class="thickbox" title="<?php _e('Type your Custom CSS','ultimatum');?>"><?php _e('Template wide Custom CSS','ultimatum');?></a></li> <li><a class="thickbox" href="./index.php?page=ultimatum-custom-css&layout_id=<?php echo $layout["id"];?>&modal=true&TB_iframe=1&width=640&height=380" title="<?php _e('Type your Custom CSS','ultimatum');?>"> <?php _e('Layout Specific Custom CSS','ultimatum');?></a></li> </ul> </li> <?php } ?> <?php if($layout['type']!='part'){ ?> <li> <a class="thickbox" id="layout-opts-link" href="<?php echo admin_url(); ?>?page=ultimatum-layout-options&layout_id=<?php echo $_GET["layoutid"];?>&template_id=<?php echo $_GET['theme'];?>&TB_iframe=1&width=770&height=480" title="<?php _e('Layout Options and extra classes','ultimatum');?>"><?php _e('Layout Options','ultimatum');?></a> </li> <?php } ?> <li> <a href="admin.php?page=wonder-layout&theme=<?php echo $layout["theme"];?>"><?php _e('Back to Layouts Screen','ultimatum');?></a> </li> </ul> </div> </div> </div> <form action="" method="post" id="layout-form"> <label for="layout-name"><?php _e('Layout Name','ultimatum');?>: </label> <input type="hidden" name="id" id="layoutid" value="<?php echo $layout["id"];?>"/> <input type="text" name="layoutname" id="layoutname" value="<?php echo $layout["title"];?>" size="50" /> <input type="hidden" name="rows" id="layout_row_ids" value="<?php echo $layout["rows"];?>"/> <input type="hidden" name="before" id="before_main" value="<?php echo $layout["before"];?>"/> <input type="hidden" name="after" id="after_main" value="<?php echo $layout["after"];?>"/> <input type="hidden" name="type" id="layout_type" value="<?php echo $layout['type'];?>" /> <input type="hidden" name="default" id="isdefault" value="<?php echo $layout['default'];?>" /> <input type="hidden" name="theme" id="theme" value="<?php echo $layout['theme'];?>" /> <input type="hidden" name="saveandcontinue" value="no" /> <input class="button-primary autowidth" type="submit" id="layosavebutton" value="<?php _e('Save Layout','ultimatum');?>"/> </form> <h2><?php _e('The Layout Body','ultimatum');?></h2> <div class="lay-gen-container <?php if(get_ultimatum_option('extras', 'element_position')){ echo 'bottom-elements'; }?>"> <?php if($layoutid){?> <div class="widget-liquid-left"> <div id="widgets-right" > <?php if($layout['type']=='part'){ ?> <div id="body_cont" class="connectedSortable" > <?php if(strlen($layout['rows'])>>1): $rows = explode(',',$layout["rows"]); if(count($rows)!=0): foreach ($rows as $row){ $rowito= explode('-',$row); $row_id = $rowito[1]; $query = "SELECT * FROM $tablerows WHERE id='$row_id'"; $row = $wpdb->get_row($query,ARRAY_A); include (ULTIMATUM_ADMIN.DS.'ajax'.DS.'row-generator.php'); } endif; endif; ?> </div> <?php } else { ?> <div style="width:100%;float:left;background-color:#FCF8E3;"> <div style="padding:0 10px 10px 10px;"> <small>Header</small> <div id="header_cont" class="connectedSortable" style="min-height: 10px;"> <?php if(strlen($layout['before'])>>1): $rows = explode(',',$layout["before"]); foreach ($rows as $row){ $rowito= explode('-',$row); if($rowito[0]=='row'){ $row_id = $rowito[1]; $query = "SELECT * FROM $tablerows WHERE id='$row_id'"; $row = $wpdb->get_row($query,ARRAY_A); include (ULTIMATUM_ADMIN.DS.'ajax'.DS.'row-generator.php'); } else { printLayoutasRow($rowito[1]); } } endif; ?> </div> </div> </div> <div style="width:100%;float:left;background-color:#D9EDF7;"> <div style="padding:0 10px 10px 10px;"> <small>Body</small> <div id="body_cont" class="connectedSortable" style="min-height: 10px;"> <?php if(strlen($layout['rows'])>>1): $rows = explode(',',$layout["rows"]); foreach ($rows as $row){ $rowito= explode('-',$row); if($rowito[0]=='row'){ $row_id = $rowito[1]; $query = "SELECT * FROM $tablerows WHERE id='$row_id'"; $row = $wpdb->get_row($query,ARRAY_A); include (ULTIMATUM_ADMIN.DS.'ajax'.DS.'row-generator.php'); } else { printLayoutasRow($rowito[1]); } } endif; ?> </div> </div> </div> <div style="width:100%;float:left;background-color:#DFF0D8;"> <div style="padding:0 10px 10px 10px;"> <small>Footer</small> <div id="footer_cont" class="connectedSortable" style="min-height: 10px;"> <?php if(strlen($layout['after'])>>1): $rows = explode(',',$layout["after"]); foreach ($rows as $row){ $rowito= explode('-',$row); if($rowito[0]=='row'){ $row_id = $rowito[1]; $query = "SELECT * FROM $tablerows WHERE id='$row_id'"; $row = $wpdb->get_row($query,ARRAY_A); include (ULTIMATUM_ADMIN.DS.'ajax'.DS.'row-generator.php'); } else { printLayoutasRow($rowito[1]); } } endif; ?> </div> </div> </div> <?php } ?> </div> </div> <div class="widget-liquid-right"> <div id="widgets-left"> <?php if($layout["type"]=='full'){?> <div id="partial-layos" class="widgets-holder-wrap"> <div class="sidebar-name"> <div class="sidebar-name-arrow"><br /></div> <h3><?php _e('Available Parts','ultimatum');?></h3></div> <div class="layout-holder"> <div id="parts"> <?php printPartial($layout);?> </div> <br class='clear' /> </div> <br class="clear" /> </div> <?php } ?> <div id="available-widgets" class="widgets-holder-wrap"> <div class="sidebar-name"> <div class="sidebar-name-arrow"><br /></div> <h3><?php _e('Widgets','ultimatum');?> <span id="removing-widget"><?php _ex('Deactivate', 'removing-widget', 'ultimatum'); ?> <span></span></span></h3></div> <div class="widget-holder"> <div id="widget-list"> <?php ultimatum_list_widgets(); ?> </div> <br class='clear' /> </div> <br class="clear" /> </div> </div> </div> <br class="clear" /> <form action="" method="post"> <?php wp_nonce_field( 'save-sidebar-widgets', '_wpnonce_widgets', false ); ?> </form> <?php } ?> </div> <?php do_action('ult_layout_builder_after'); }
<?php if(get_ultimatum_option('extras','ultimatum_slideshows')){ class UltimatumSlide extends WP_Widget { function UltimatumSlide() { parent::WP_Widget(false, $name = 'Ultimatum SlideShow'); } function widget($args, $instance) { global $wpdb; $uslider=false; extract( $args ); $instance["Width"]=$grid_width; if(preg_match('/ptype-/i',$instance["slide"])){ $post_type= str_replace('ptype-', '', $instance["slide"]); $query = array( 'post_type' => $post_type, 'showposts'=>$instance["number"], 'orderby'=>'date', 'order'=>'DESC', 'meta_key'=>'_thumbnail_id', ); $loop = new WP_Query($query); $images = array(); while ( $loop->have_posts() ) : $loop->the_post(); $image_id = get_post_thumbnail_id(); $images[] = array( 'image_id'=>$image_id, 'id' => get_the_ID(), 'title' => get_the_title(),
} /* * Enable Posts Type Order */ if(get_ultimatum_option('extras', 'ultimatum_pto')){ add_action('admin_notices', 'ult_pto_notice'); } if(get_ultimatum_option('extras', 'ultimatum_slideshows')){ $sliders= ULTIMATUM_PLUGINS.DS.'ult-sliders'.DS.'usliders.php'; include $sliders; } /* * Enable Multiple Featured Images */ if(get_ultimatum_option('extras', 'ultimatum_postgals')) { require_once (ULTIMATUM_ADMIN_HELPERS.'/metabox.generator.php'); require_once (ULTIMATUM_ADMIN_HELPERS.'/metaboxes/gallery.php'); } /* * PTO Notice */ function ult_pto_notice() { $function = is_multisite() ? 'network_admin_url' : 'admin_url'; $installurl = wp_nonce_url($function("update.php?action=install-plugin&plugin=post-types-order"), "install-plugin_post-types-order"); echo '<div class="updated"><p>'; printf(__('Post Ordering is not included in Ultimatum anymore you can install it clicking <a href="%2$s">here</a> | <a href="%1$s">Hide Notice</a>', 'ultimatum'), '?ult_pto_nag_ignore=0',$installurl); echo "</p></div>"; }
function codeGeneratorHome(){ ?> <h2><?php _e('Click on the ShortCode to Create Yours', 'ultimatum');?></h2> <table class="mce-start" width="100%"> <tr> <td><a href="<?php echo curPageURL().'&task=mcols'?>"><img src="images/column-layout.png" /><?php _e('Columns', 'ultimatum');?></a></td> <td><a href="<?php echo curPageURL().'&task=tabsh'?>"><img src="images/toggle.png" /><?php _e('Toggle/Accordion/Tabs', 'ultimatum');?></a></td> </tr> <tr> <td><a href="<?php echo curPageURL().'&task=typo'?>"><img src="images/typography.png" /><?php _e('Typography', 'ultimatum');?></a></td> <td><?php if(get_ultimatum_option('extras','ultimatum_forms')){?><a href="<?php echo curPageURL().'&task=forms'?>"><img src="images/forms.png" /><?php _e('Forms', 'ultimatum');?></a><?php } ?></td> </tr> <tr> <td><a href="<?php echo curPageURL().'&task=gmap'?>"><img src="images/map.png" /><?php _e('Google Map', 'ultimatum');?></a></td> <td><a href="<?php echo curPageURL().'&task=chart'?>"><img src="images/googlecharts.png" /><?php _e('Google Chart', 'ultimatum');?></a></td> </tr> <tr> <td><a href="<?php echo curPageURL().'&task=video'?>"><img src="images/video.png" /><?php _e('Videos', 'ultimatum');?></a></td> <td></td> </tr> </table> <?php }
function theGeneralSettings(){ global $theme_options; $defpage = 'admin.php?page='.THEME_SLUG; include_once ULTIMATUM_ADMIN_HELPERS.'/class.options.php'; echo '<div class="wrap ultwrap">'; $tbg = array(); if(isset($_GET['task'])): $task = $_GET['task']; if(file_exists(ULTIMATUM_ADMIN_OPTIONS.'/'.$_GET['task'].'-options.php')){ $tbg = include_once ULTIMATUM_ADMIN_OPTIONS.'/'.$_GET['task'].'-options.php'; } $tbg = apply_filters('ultimatum_settings_filter', $tbg); else: $task = false; $tbg = include_once ULTIMATUM_ADMIN_OPTIONS.'/theme-defaults.php'; endif; $onur = new optionGenerator($tbg["name"], $tbg["options"]);?> <div class="ultadmnavi" style="position:absolute;top:0;width:100%;margin-right:25px;"> <div class="navbar" id="ult-nav"> <div class="navbar-inner"> <a class="brand" href="<?php echo $defpage; ?>"><?php _e('Theme Settings','ultimatum');?></a> <ul class="nav"> <li <?php if(!$task) echo ' class="active"' ;?>><a href="<?php echo $defpage; ?>"><?php _e('General Settings','ultimatum');?></a></li> <li><a href="<?php echo $defpage.'&task=sidebar'; ?>"><?php _e('Sidebar Settings','ultimatum');?></a></li> <?php if(get_ultimatum_option('extras', 'ultimatum_seo')){?> <li ><a href="<?php echo $defpage.'&task=seo'; ?>"><?php _e('SEO Settings','ultimatum');?></a></li> <?php } ?> <li class="dropdown <?php if($task=="extra" || $task=="woo"|| $task=="dev"|| $task=="mobapp"|| $task=="script"|| $task=="tag") {echo ' active' ;}?>" > <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php _e('Advanced Settings','ultimatum');?><b class="caret"></b></a> <ul class="dropdown-menu" role="menu" > <li <?php if($task=="extra") echo ' class="active"' ;?>><a tabindex="-1" href="<?php echo $defpage.'&task=extra'; ?>"><?php _e('Extras Settings','ultimatum');?></a></li> <li <?php if($task=="script") echo ' class="active"' ;?>><a tabindex="-1" href="<?php echo $defpage.'&task=script'; ?>"><?php _e('Script & API Settings','ultimatum');?></a></li> <li <?php if($task=="tag") echo ' class="active"' ;?>><a tabindex="-1" href="<?php echo $defpage.'&task=tag'; ?>"><?php _e('Tag Settings','ultimatum');?></a></li> <?php if(get_ultimatum_option('extras', 'ultimatum_postgals')) { ?> <li <?php if($task=="pgallery") echo ' class="active"' ;?>><a tabindex="-1" href="<?php echo $defpage.'&task=pgallery'; ?>"><?php _e('Post Galleries','ultimatum');?></a></li> <?php } ?> <?php if(function_exists('devsettings')){ devsettings($defpage,$task); } ?> </ul> </li> <?php // Add The Connect Menu $connect = array(); $connect = apply_filters('ultimatum_connect_menu', $connect); if(count($connect)!=0){ foreach($connect as $name => $connecttask){ $connecttasks[] = $connecttask; $connectitems .='<li><a tabindex="-1" href="'.$defpage.'&task='.$connecttask.'">'.$name.'</a></li>'; } ?> <li class="dropdown <?php if(in_array($task, $connecttasks)) {echo ' active' ;}?>" > <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php _e('Connect','ultimatum');?><b class="caret"></b></a> <ul class="dropdown-menu" role="menu" > <?php echo $connectitems; ?> </ul> </li> <?php } ?> </ul> <ul class="nav pull-right"> <li class=""><button class="btn-info btn" id="setting-submit"><i class="fa fa-save"></i> Save Changes</button></li> </ul> </div> </div> </div> <?php echo '</div>'; }
$themesettings = get_option(THEME_SLUG.'_'.$type); if(isset($themesettings[$key])){ $value = $themesettings[$key]; return $value; } else { return false; } } // Add widgets Sidebars $sidebars = get_theme_option('sidebars', 'sidebars'); $sidebars = explode(';',$sidebars); if(is_array($sidebars)){ $tag = (get_ultimatum_option('tags', 'multi_widget') ? get_ultimatum_option('tags', 'multi_widget') : 'h3'); if(is_singular()){ $tag = (get_ultimatum_option('tags', 'single_widget') ? get_ultimatum_option('tags', 'single_widget') :'h3'); } foreach($sidebars as $sidbar){ register_sidebar( array( 'name' => __( $sidbar, 'ultimatum' ), 'id' => 'ultimatum-'.strtolower(str_replace(' ','',$sidbar)), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => "</div>", 'before_title' => '<'.$tag.' class="widget-title element-title">', 'after_title' => '</'.$tag.'>', ) ); } } /** * Recursive alternative to str_replace that supports replacing keys as well *
$accordion_toggle_array = array(); // clear the array $randomnr=rand(1,1000000); $accordion_output = '<div class="clear"></div>'; $accordion_output .= '<div class="panel-group accordion ult_accordion" id="'.$randomnr.'">'; do_shortcode($content); // execute the '[accordion_toggle]' shortcode first to get the title and content $i=0; foreach ($accordion_toggle_array as $tab => $accordion_toggle_attr_array) { $tabid= str_replace(' ','',preg_replace("/[^A-Za-z0-9 ]/", '', $accordion_toggle_attr_array['title'])); $in=''; $active=''; if($i==0){ $in=' in'; $active =' active'; } $accordion_output .= '<div class="panel panel-default accordion-group"> <div class="panel-heading accordion-heading"> <a href="#'.$randomnr.$tabid.'" class="accordion-toggle'.$active.'" data-toggle="collapse" data-parent="#'.$randomnr.'">'.$accordion_toggle_attr_array['title'].'</a> </div>'; $accordion_output .= '<div id="'.$randomnr.$tabid.'" class="panel-collapse accordion-body collapse'.$in.'"> <div class="panel-body accordion-inner">'.$accordion_toggle_attr_array['content'].'</div> </div></div>'; $i++; } $accordion_output .= '</div>'; $accordion_output .= '<div class="clear"></div>'; return $accordion_output; } add_shortcode('ult_accordion', 'shortcode_accordion'); if(get_ultimatum_option('extras', 'ultimatum_shortcodes_legacy')){ add_shortcode('accordion', 'shortcode_accordion'); }
function wonderNotes(){ ?> <style> table.ult_status_table { font-family: monospace; } table.ult_status_table td:first-child { width: 20%; border-right:0; } table.ult_status_table td { padding: 6px 9px; font-size: 1.1em; } table.ult_status_table td mark{background:transparent none} table.ult_status_table td mark.yes{color:green} table.ult_status_table td mark.no{color:#999} table.ult_status_table td mark.error{color:red} table.ult_status_table td ul{margin:0} </style> <div class="wrap about-wrap ult-wrap"> <h2><?php _e('ULTIMATUM SYSTEM REPORT','ultimatum')?></h2> <p class="submit"><?php _e( 'Please include this information when requesting support:', 'ultimatum' ); ?> <a href="#" download="ultimatum_report.txt" class="button-primary debug-report"><?php _e( 'Download System Report File', 'ultimatum' ); ?></a></p> <br/> <table class="widefat ult-tables ult_status_table"> <thead> <tr> <th colspan="2"><?php _e( 'Environment', 'ultimatum' ); ?></th> </tr> </thead> <tbody> <tr> <td><?php _e( 'Home URL','ultimatum' ); ?>:</td> <td><?php echo home_url(); ?></td> </tr> <tr> <td><?php _e( 'Site URL','ultimatum' ); ?>:</td> <td><?php echo site_url(); ?></td> </tr> <tr> <td><?php _e( 'Ultimatum Version','ultimatum' ); ?>:</td> <td><?php echo esc_html( ULTIMATUM_VERSION ); ?></td> </tr> <tr> <td><?php _e( 'WP Version','ultimatum' ); ?>:</td> <td><?php if ( is_multisite() ) echo 'WPMU'; else echo 'WP'; ?> <?php bloginfo('version'); ?></td> </tr> <tr> <td><?php _e( 'Web Server Info','ultimatum' ); ?>:</td> <td><?php echo esc_html( $_SERVER['SERVER_SOFTWARE'] ); ?></td> </tr> <tr> <td><?php _e( 'PHP Version','ultimatum' ); ?>:</td> <td><?php if ( function_exists( 'phpversion' ) ) echo esc_html( phpversion() ); ?></td> </tr> <tr> <td><?php _e( 'MySQL Version','ultimatum' ); ?>:</td> <td> <?php global $wpdb; echo $wpdb->db_version(); ?> </td> </tr> <tr> <td><?php _e( 'WP Memory Limit','ultimatum' ); ?>:</td> <td> <?php ultimatum_mem_check(true);?> </td> </tr> <tr> <td><?php _e( 'WP Debug Mode','ultimatum' ); ?>:</td> <td><?php if ( defined('WP_DEBUG') && WP_DEBUG ) echo '<mark class="yes">' . __( 'Yes', 'ultimatum' ) . '</mark>'; else echo '<mark class="no">' . __( 'No', 'ultimatum' ) . '</mark>'; ?></td> </tr> <tr> <td><?php _e( 'WP Max Upload Size','ultimatum' ); ?>:</td> <td><?php echo size_format( wp_max_upload_size() ); ?></td> </tr> <tr> <td><?php _e('PHP Post Max Size','ultimatum' ); ?>:</td> <td><?php if ( function_exists( 'ini_get' ) ) echo size_format( ultimatum_let_to_num( ini_get('post_max_size') ) ); ?></td> </tr> <tr> <td><?php _e('PHP Time Limit','ultimatum' ); ?>:</td> <td><?php if ( function_exists( 'ini_get' ) ) echo ini_get('max_execution_time'); ?></td> </tr> <tr> <td><?php _e( 'Default Timezone','ultimatum' ); ?>:</td> <td><?php $default_timezone = date_default_timezone_get(); $phpini_timezone = ini_get('date.timezone'); if ( 'UTC' !== $default_timezone ) { echo '<mark class="error">' . sprintf( __( 'Default timezone is %s - it should be UTC', 'ultimatum' ), $default_timezone ) . '</mark>'; } else { echo '<mark class="yes">' . sprintf( __( 'Default timezone is %s', 'ultimatum' ), $default_timezone ) . sprintf( __( ', php.ini timezone is %s', 'ultimatum' ), $phpini_timezone ) . '</mark>'; } ?> </td> </tr> <?php //Do posting tests and echo results ultimatum_remote_post_test(true); ?> </tbody> <thead> <tr> <th colspan="2"><?php _e( 'Folder Permissions','ultimatum' ); ?></th> </tr> </thead> <tbody> <?php ultimatum_folder_permissions_check(true); ?> </tbody> <thead> <tr> <th colspan="2"><?php _e( 'Activated Extras','ultimatum' ); ?></th> </tr> </thead> <tbody> <tr> <td><?php _e( 'Ultimatum Forms','ultimatum' ); ?>:</td> <td> <?php if(get_ultimatum_option('extras', 'ultimatum_forms')){ _e('ON','ultimatum'); } else { _e('OFF','ultimatum'); } ?> </td> </tr> <tr> <td><?php _e( 'Ultimatum Slideshows','ultimatum' ); ?>:</td> <td> <?php if(get_ultimatum_option('extras', 'ultimatum_slideshows')){ _e('ON','ultimatum'); } else { _e('OFF','ultimatum'); } ?> </td> </tr> <tr> <td><?php _e( 'Ultimatum Shortcodes','ultimatum' ); ?>:</td> <td> <?php if(get_ultimatum_option('extras', 'ultimatum_shortcodes')){ _e('ON','ultimatum'); } else { _e('OFF','ultimatum'); } ?> </td> </tr> <tr> <td><?php _e( 'Post Galleries','ultimatum' ); ?>:</td> <td> <?php if(get_ultimatum_option('extras', 'ultimatum_postgals')){ _e('ON','ultimatum'); } else { _e('OFF','ultimatum'); } ?> </td> </tr> <tr> <td><?php _e( 'Post Ordering','ultimatum' ); ?>:</td> <td> <?php if(get_ultimatum_option('extras', 'ultimatum_pto')){ _e('ON','ultimatum'); } else { _e('OFF','ultimatum'); } ?> </td> </tr> </tbody> <thead> <tr> <th colspan="2"><?php _e( 'Plugins','ultimatum' ); ?></th> </tr> </thead> <tbody> <tr> <td><?php _e( 'Installed Plugins','ultimatum' ); ?>:</td> <td><?php $active_plugins = (array) get_option( 'active_plugins', array() ); if ( is_multisite() ) $active_plugins = array_merge( $active_plugins, get_site_option( 'active_sitewide_plugins', array() ) ); $wc_plugins = array(); foreach ( $active_plugins as $plugin ) { $plugin_data = @get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ); $dirname = dirname( $plugin ); $version_string = ''; if ( ! empty( $plugin_data['Name'] ) ) { $wc_plugins[] = $plugin_data['Name'] . ' ' . __( 'by', 'ultimatum' ) . ' ' . $plugin_data['Author'] . ' ' . __( 'version', 'ultimatum' ) . ' ' . $plugin_data['Version'] . $version_string; } } if ( sizeof( $wc_plugins ) == 0 ) echo '-'; else echo implode( ', <br/>', $wc_plugins ); ?></td> </tr> </tbody> </table> <script type="text/javascript"> jQuery.ult_strPad = function(i,l,s) { var o = i.toString(); if (!s) { s = '0'; } while (o.length < l) { o = o + s; } return o; }; jQuery('a.debug-report').click(function(){ var report = ""; jQuery('.ult_status_table thead, .ult_status_table tbody').each(function(){ $this = jQuery( this ); if ( $this.is('thead') ) { report = report + "\n### " + jQuery.trim( $this.text() ) + " ###\n\n"; } else { jQuery('tr', $this).each(function(){ $this = jQuery( this ); name = jQuery.ult_strPad( jQuery.trim( $this.find('td:eq(0)').text() ), 25, ' ' ); value = jQuery.trim( $this.find('td:eq(1)').text() ); report = report + '' + name + value + "\n\n"; }); } } ); var blob = new Blob( [report] ); jQuery(this).attr( 'href', window.URL.createObjectURL( blob ) ); return true; }); </script> </div> <?php }
private function getTwitterJSON() { require $this->lib.'tmhOAuth.php'; require $this->lib.'tmhUtilities.php'; if(get_ultimatum_option('scripts', 'tw_consumer_key') && get_ultimatum_option('scripts', 'tw_consumer_secret') && get_ultimatum_option('scripts', 'tw_access_token') && get_ultimatum_option('scripts', 'tw_access_secret')){ $tmhOAuth = new tmhOAuth(array( 'host' => $_POST['request']['host'], 'consumer_key' => get_ultimatum_option('scripts', 'tw_consumer_key'), 'consumer_secret' => get_ultimatum_option('scripts', 'tw_consumer_secret'), 'user_token' => get_ultimatum_option('scripts', 'tw_access_token'), 'user_secret' => get_ultimatum_option('scripts', 'tw_access_secret'), 'curl_ssl_verifypeer' => false )); } else { $tmhOAuth = new tmhOAuth(array( 'host' => $_POST['request']['host'], 'consumer_key' => $this->consumer_key, 'consumer_secret' => $this->consumer_secret, 'user_token' => $this->user_token, 'user_secret' => $this->user_secret, 'curl_ssl_verifypeer' => false )); } $url = $_POST['request']['url']; $params = $_POST['request']['parameters']; $tmhOAuth->request('GET', $tmhOAuth->url($url), $params); return $tmhOAuth->response; }
} if($instance['tbsposition'] !='false') $classes[]=$instance['tbsposition']; ?> <nav class="<?php echo implode(' ',$classes);?>" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-navbar-collapse-<?php echo $this->id; ?>"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <?php if($instance['tbslogo']!=0) { ?> <?php $logoimage = get_ultimatum_option('general','logo'); $textlogo = get_ultimatum_option('general','text_logo'); if($textlogo!='true' && $logoimage){ ?> <a class="navbar-brand" href="<?php echo get_bloginfo('url');?>"><img src="<?php echo $logoimage;?>" title="<?php echo get_bloginfo();?>"/></a> <?php } else {?> <a class="navbar-brand" href="<?php echo get_bloginfo('url');?>"><?php echo get_bloginfo();?></a> <?php } ?> <?php } ?> </div> <div class="collapse navbar-collapse" id="bs-navbar-collapse-<?php echo $this->id; ?>"> <?php wp_nav_menu( array( 'menu' => $nav_menu, 'depth' => 4, 'container' => false, 'menu_class' => 'nav navbar-nav',
/** * * This file is a core Ultimatum file and should not be edited. * * @package Ultimatum * @author Wonder Foundry http://www.wonderfoundry.com * @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later) * @link http://ultimatumtheme.com * @version 2.38 */ function ultimatum_base_styles(){ $styles = array( array( 'handle' => 'theme-global', 'filename' => 'theme.global.css', ), array( 'handle' => 'font-awesome', 'filename' => 'font-awesome.min.css', 'cdn' => '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css', ), /* Bootstrap from bootstrapCDN */ array( 'handle' => 'tbs3-default', 'source' => '//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css' ), array( 'handle' => 'tbs3-cerulean', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/3.3.4/cerulean/bootstrap.min.css' ), array( 'handle' => 'tbs3-cosmo', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/3.3.4/cosmo/bootstrap.min.css' ), array( 'handle' => 'tbs3-cyborg', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/3.3.4/cyborg/bootstrap.min.css' ), array( 'handle' => 'tbs3-darkly', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/3.3.4/darkly/bootstrap.min.css' ), array( 'handle' => 'tbs3-flatly', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/3.3.4/flatly/bootstrap.min.css' ), array( 'handle' => 'tbs3-journal', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/3.3.4/journal/bootstrap.min.css' ), array( 'handle' => 'tbs3-lumen', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/3.3.4/lumen/bootstrap.min.css' ), array( 'handle' => 'tbs3-paper', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/3.3.4/paper/bootstrap.min.css' ), array( 'handle' => 'tbs3-readable', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/3.3.4/readable/bootstrap.min.css' ), array( 'handle' => 'tbs3-sandstone', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/3.3.4/sandstone/bootstrap.min.css' ), array( 'handle' => 'tbs3-simplex', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/3.3.4/simplex/bootstrap.min.css' ), array( 'handle' => 'tbs3-slate', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/3.3.4/slate/bootstrap.min.css' ), array( 'handle' => 'tbs3-spacelab', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/3.3.4/spacelab/bootstrap.min.css' ), array( 'handle' => 'tbs3-superhero', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/3.3.4/superhero/bootstrap.min.css' ), array( 'handle' => 'tbs3-united', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/3.3.4/united/bootstrap.min.css' ), array( 'handle' => 'tbs3-yeti', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/3.3.4/yeti/bootstrap.min.css' ), array( 'handle' => 'tbs-default', 'source' => '//maxcdn.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css' ), array( 'handle' => 'tbs-amelia', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/2.3.2/amelia/bootstrap.min.css' ), array( 'handle' => 'tbs-cerulean', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/2.3.2/cerulean/bootstrap.min.css' ), array( 'handle' => 'tbs-cosmo', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/2.3.2/cosmo/bootstrap.min.css' ), array( 'handle' => 'tbs-cyborg', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/2.3.2/cyborg/bootstrap.min.css' ), array( 'handle' => 'tbs-flatly', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/2.3.2/flatly/bootstrap.min.css' ), array( 'handle' => 'tbs-journal', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/2.3.2/journal/bootstrap.min.css' ), array( 'handle' => 'tbs-readable', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/2.3.2/readable/bootstrap.min.css' ), array( 'handle' => 'tbs-simplex', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/2.3.2/simplex/bootstrap.min.css' ), array( 'handle' => 'tbs-slate', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/2.3.2/slate/bootstrap.min.css' ), array( 'handle' => 'tbs-spacelab', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/2.3.2/spacelab/bootstrap.min.css' ), array( 'handle' => 'tbs-spruce', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/2.3.2/spruce/bootstrap.min.css' ), array( 'handle' => 'tbs-superhero', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/2.3.2/superhero/bootstrap.min.css' ), array( 'handle' => 'tbs-united', 'source' => '//maxcdn.bootstrapcdn.com/bootswatch/2.3.2/united/bootstrap.min.css' ), ); foreach($styles as $style){ // Set Script source if(!isset($style['source'])) { if(get_ultimatum_option('scripts', 'cdnsource') && isset($style['cdn'])){ $src = $style['cdn']; } else { if (isset($style['directory'])) { $fsrc = $style['directory'] . DS . $style['filename']; $src = $style['directory'] . '/' . $style['filename']; } else { $fsrc = $style['filename']; $src = $style['filename']; } // check if replacement file is on place if (CHILD_THEME && file_exists(THEME_DIR . DS . 'js' . DS . $fsrc)) { $src = THEME_URL . '/css/' . $src; } else { $src = ULTIMATUM_URL . '/assets/css/' . $src; } } } else { $src = $style['source']; } wp_register_style($style['handle'], $src); } }
function ult_favicon_placer(){ if(get_ultimatum_option('general', 'favicon')){ echo '<link rel="shortcut" href="'.get_ultimatum_option('general', 'favicon').'" type="image/x-icon" />'."\n"; echo '<link rel="shortcut icon" href="'.get_ultimatum_option('general', 'favicon').'" type="image/x-icon" />'."\n"; } else { echo '<link rel="shortcut" href="'.ULTIMATUM_URL.'/assets/images/ultimatum-icon.png" type="image/x-icon" />'."\n"; echo '<link rel="shortcut icon" href="'.ULTIMATUM_URL.'/assets/images/ultimatum-icon.png" type="image/x-icon" />'."\n"; } }