first commit
158
wp-content/themes/nuzi/framework/aq_resizer.php
Normal file
@@ -0,0 +1,158 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Title : Aqua Resizer
|
||||
* Description : Resizes WordPress images on the fly
|
||||
* Version : 1.1.7
|
||||
* Author : Syamil MJ
|
||||
* Author URI : http://aquagraphite.com
|
||||
* License : WTFPL - http://sam.zoy.org/wtfpl/
|
||||
* Documentation : https://github.com/sy4mil/Aqua-Resizer/
|
||||
*
|
||||
* @param string $url - (required) must be uploaded using wp media uploader
|
||||
* @param int $width - (required)
|
||||
* @param int $height - (optional)
|
||||
* @param bool $crop - (optional) default to soft crop
|
||||
* @param bool $single - (optional) returns an array if false
|
||||
* @uses wp_upload_dir()
|
||||
* @uses image_resize_dimensions() | image_resize()
|
||||
* @uses wp_get_image_editor()
|
||||
*
|
||||
* @return str|array
|
||||
*/
|
||||
if (!function_exists('aq_resize')) {
|
||||
function aq_resize( $url, $width = null, $height = null, $crop = null, $single = true, $upscale = false) {
|
||||
|
||||
//validate inputs
|
||||
if(!$url || (!$width && !$height)) return false;
|
||||
|
||||
// caipt'n, ready to hook
|
||||
if($upscale === true) add_filter('image_resize_dimensions', 'aq_upscale', 10, 6);
|
||||
|
||||
//define upload path & dir
|
||||
$upload_info = wp_upload_dir();
|
||||
$upload_dir = $upload_info['basedir'];
|
||||
$upload_url = $upload_info['baseurl'];
|
||||
|
||||
//check if $img_url is local
|
||||
if(strpos( $url, $upload_url ) === false) return false;
|
||||
|
||||
//define path of image
|
||||
$rel_path = str_replace( $upload_url, '', $url);
|
||||
$img_path = $upload_dir . $rel_path;
|
||||
|
||||
//check if img path exists, and is an image indeed
|
||||
if( !file_exists($img_path) OR !getimagesize($img_path) ) return false;
|
||||
|
||||
//get image info
|
||||
$info = pathinfo($img_path);
|
||||
$ext = $info['extension'];
|
||||
list($orig_w,$orig_h) = getimagesize($img_path);
|
||||
|
||||
//get image size after cropping
|
||||
$dims = image_resize_dimensions($orig_w, $orig_h, $width, $height, $crop);
|
||||
$dst_w = $dims[4];
|
||||
$dst_h = $dims[5];
|
||||
|
||||
// return the original image only if it exactly fits the needed measures
|
||||
if(!$dims && ((($height === null && $orig_w == $width) xor ($width === null && $orig_h == $height)) xor ($height == $orig_h && $width == $orig_w))) {
|
||||
$img_url = $url;
|
||||
$dst_w = $orig_w;
|
||||
$dst_h = $orig_h;
|
||||
} else {
|
||||
//use this to check if cropped image already exists, so we can return that instead
|
||||
$suffix = "{$dst_w}x{$dst_h}";
|
||||
$dst_rel_path = str_replace( '.'.$ext, '', $rel_path);
|
||||
$destfilename = "{$upload_dir}{$dst_rel_path}-{$suffix}.{$ext}";
|
||||
|
||||
if(!$dims || ($crop == true && $upscale == false && ($dst_w < $width || $dst_h < $height))) {
|
||||
//can't resize, so return false saying that the action to do could not be processed as planned.
|
||||
return false;
|
||||
}
|
||||
//else check if cache exists
|
||||
elseif(file_exists($destfilename) && getimagesize($destfilename)) {
|
||||
$img_url = "{$upload_url}{$dst_rel_path}-{$suffix}.{$ext}";
|
||||
}
|
||||
//else, we resize the image and return the new resized image url
|
||||
else {
|
||||
|
||||
// Note: This pre-3.5 fallback check will edited out in subsequent version
|
||||
if(function_exists('wp_get_image_editor')) {
|
||||
|
||||
$editor = wp_get_image_editor($img_path);
|
||||
|
||||
if ( is_wp_error( $editor ) || is_wp_error( $editor->resize( $width, $height, $crop ) ) )
|
||||
return false;
|
||||
|
||||
$resized_file = $editor->save();
|
||||
|
||||
if(!is_wp_error($resized_file)) {
|
||||
$resized_rel_path = str_replace( $upload_dir, '', $resized_file['path']);
|
||||
$img_url = $upload_url . $resized_rel_path;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
$resized_img_path = image_resize( $img_path, $width, $height, $crop ); // Fallback foo
|
||||
if(!is_wp_error($resized_img_path)) {
|
||||
$resized_rel_path = str_replace( $upload_dir, '', $resized_img_path);
|
||||
$img_url = $upload_url . $resized_rel_path;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// okay, leave the ship
|
||||
if($upscale === true) remove_filter('image_resize_dimensions', 'aq_upscale');
|
||||
|
||||
//return the output
|
||||
if($single) {
|
||||
//str return
|
||||
$image = $img_url;
|
||||
} else {
|
||||
//array return
|
||||
$image = array (
|
||||
0 => $img_url,
|
||||
1 => $dst_w,
|
||||
2 => $dst_h
|
||||
);
|
||||
}
|
||||
|
||||
return $image;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('aq_upscale')) {
|
||||
function aq_upscale($default, $orig_w, $orig_h, $dest_w, $dest_h, $crop) {
|
||||
if (!$crop) return null; // let the wordpress default function handle this
|
||||
|
||||
// here is the point we allow to use larger image size than the original one
|
||||
$aspect_ratio = $orig_w / $orig_h;
|
||||
$new_w = $dest_w;
|
||||
$new_h = $dest_h;
|
||||
|
||||
if ( !$new_w ) {
|
||||
$new_w = intval($new_h * $aspect_ratio);
|
||||
}
|
||||
|
||||
if ( !$new_h ) {
|
||||
$new_h = intval($new_w / $aspect_ratio);
|
||||
}
|
||||
|
||||
$size_ratio = max($new_w / $orig_w, $new_h / $orig_h);
|
||||
|
||||
$crop_w = round($new_w / $size_ratio);
|
||||
$crop_h = round($new_h / $size_ratio);
|
||||
|
||||
$s_x = floor( ($orig_w - $crop_w) / 2 );
|
||||
$s_y = floor( ($orig_h - $crop_h) / 2 );
|
||||
|
||||
return array( 0, 0, (int) $s_x, (int) $s_y, (int) $new_w, (int) $new_h, (int) $crop_w, (int) $crop_h );
|
||||
}
|
||||
}
|
||||
29
wp-content/themes/nuzi/framework/assets/css/colorpicker.css
Normal file
@@ -0,0 +1,29 @@
|
||||
.colorpicker{width:356px;height:176px;overflow:hidden;position:absolute;background:url(../images/colorpicker/colorpicker_background.png);font-family:Arial, Helvetica, sans-serif;z-index:9999;display:none;}
|
||||
.colorpicker_color{width:150px;height:150px;left:14px;top:13px;position:absolute;background:#f00;overflow:hidden;cursor:crosshair;}
|
||||
.colorpicker_color div{position:absolute;top:0;left:0;width:150px;height:150px;background:url(../images/colorpicker/colorpicker_overlay.png);}
|
||||
.colorpicker_color div div{position:absolute;top:0;left:0;width:11px;height:11px;overflow:hidden;background:url(../images/colorpicker/colorpicker_select.gif);margin:-5px 0 0 -5px;}
|
||||
.colorpicker_hue{position:absolute;top:13px;left:171px;width:35px;height:150px;cursor:n-resize;}
|
||||
.colorpicker_hue div{position:absolute;width:35px;height:9px;overflow:hidden;background:url(../images/colorpicker/colorpicker_indic.gif) left top;margin:-4px 0 0 0;left:0px;}
|
||||
.colorpicker_new_color{position:absolute;width:60px;height:30px;left:213px;top:13px;background:#f00;}
|
||||
.colorpicker_current_color{position:absolute;width:60px;height:30px;left:283px;top:13px;background:#f00;}
|
||||
.colorpicker input{background-color:transparent;border:1px solid transparent;position:absolute;font-size:10px;font-family:Arial, Helvetica, sans-serif;color:#898989;top:4px;right:11px;text-align:right;margin:0;padding:0;height:15px;}
|
||||
.colorpicker_hex{position:absolute;width:72px;height:22px;background:url(../images/colorpicker/colorpicker_hex.png) top;left:212px;top:142px;}
|
||||
.colorpicker_hex input{right:6px;}
|
||||
.colorpicker_field{height:22px;width:62px;background-position:top;position:absolute;}
|
||||
.colorpicker_field span{position:absolute;width:12px;height:22px;overflow:hidden;top:0;right:0;cursor:n-resize;}
|
||||
.colorpicker_rgb_r{background-image:url(../images/colorpicker/colorpicker_rgb_r.png);top:52px;left:212px;}
|
||||
.colorpicker_rgb_g{background-image:url(../images/colorpicker/colorpicker_rgb_g.png);top:82px;left:212px;}
|
||||
.colorpicker_rgb_b{background-image:url(../images/colorpicker/colorpicker_rgb_b.png);top:112px;left:212px;}
|
||||
.colorpicker_hsb_h{background-image:url(../images/colorpicker/colorpicker_hsb_h.png);top:52px;left:282px;}
|
||||
.colorpicker_hsb_s{background-image:url(../images/colorpicker/colorpicker_hsb_s.png);top:82px;left:282px;}
|
||||
.colorpicker_hsb_b{background-image:url(../images/colorpicker/colorpicker_hsb_b.png);top:112px;left:282px;}
|
||||
.colorpicker_submit{position:absolute;width:22px;height:22px;background:url(../images/colorpicker/colorpicker_submit.png) top;left:322px;top:142px;overflow:hidden;}
|
||||
.colorpicker_focus{background-position:center;}
|
||||
.colorpicker_hex.colorpicker_focus{background-position:bottom;}
|
||||
.colorpicker_submit.colorpicker_focus{background-position:bottom;}
|
||||
.colorpicker_slider{background-position:bottom;}
|
||||
|
||||
.color_selector{width:104px;height:33px;background:url('../images/colorpicker/color-picker-container.png') no-repeat center center;}
|
||||
.color_selector .color_picker{position:relative;float:left;width:34px;height:33px;background:url("../images/colorpicker/color_picker.png") no-repeat center center;}
|
||||
.color_selector .color_picker div{position:absolute;top:8px;left:9px;width:16px;height:16px;background:url("../images/colorpicker/colocpicker_select.png") center;}
|
||||
.color_selector input[type=text]{margin: 1px 1px 1px 1px;padding: 0px;width: 60px;min-width: 60px;height: 31px;border: 0px;border-radius: 0px;background: none;text-align: center;font-size: 11px;}
|
||||
39
wp-content/themes/nuzi/framework/assets/css/metaboxes.css
Normal file
@@ -0,0 +1,39 @@
|
||||
.tw-metaboxes th span {
|
||||
display: block;
|
||||
margin-top: 5px;
|
||||
color: #B9B9B9;
|
||||
}
|
||||
.tw-metaboxes input[type="text"], .tw-metaboxes textarea {
|
||||
width: 75%;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.gallery-thumbs li {
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.tw-metaboxes .type_layout a {
|
||||
text-indent: -9999px;
|
||||
height: 92px;
|
||||
width: 92px;
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
background: url(../images/select_layout.png) no-repeat;
|
||||
}
|
||||
.type_layout a.left-sidebar {
|
||||
background-position: 0 0;
|
||||
}
|
||||
.type_layout a.without-sidebar {
|
||||
background-position: -111px 0;
|
||||
}
|
||||
.type_layout a.right-sidebar {
|
||||
background-position: -220px 0;
|
||||
}
|
||||
.type_layout .left-sidebar.active {
|
||||
background-position: 0 -94px;
|
||||
}
|
||||
.type_layout .without-sidebar.active {
|
||||
background-position: -111px -94px;
|
||||
}
|
||||
.type_layout .right-sidebar.active {
|
||||
background-position: -220px -94px;
|
||||
}
|
||||
997
wp-content/themes/nuzi/framework/assets/css/pagebuilder.css
Normal file
@@ -0,0 +1,997 @@
|
||||
/* START - Clearfix */
|
||||
.clearfix:after {
|
||||
content: ".";
|
||||
display: block;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
line-height: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.clearfix {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
html[xmlns] .clearfix {
|
||||
display: block;
|
||||
}
|
||||
|
||||
* html .clearfix {
|
||||
height: 1%;
|
||||
}
|
||||
a:focus, a:active{
|
||||
outline: none;
|
||||
}
|
||||
/* END - Clearfix */
|
||||
/* START - Pagebuilder */
|
||||
#cmeta_pagebuilder h3.hndle span{
|
||||
font-family: Arial;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
color:#333;
|
||||
}
|
||||
#cmeta_pagebuilder h3.hndle{
|
||||
|
||||
}
|
||||
#pagebuilder-select-layout label strong{
|
||||
font-family: Arial;
|
||||
font-size: 14px;
|
||||
line-height: 28px;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
#pagebuilder-select-layout label span{
|
||||
font-family: Arial;
|
||||
font-size: 11px;
|
||||
line-height: 18px;
|
||||
color: #9c9c9c;
|
||||
}
|
||||
#pagebuilder-area{
|
||||
border-top: 1px solid #DFDFDF;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
#pagebuilder-area>div{
|
||||
padding: 1%;
|
||||
position: relative;
|
||||
min-height: 200px;
|
||||
float: left;
|
||||
}
|
||||
#pagebuilder-area>div.builder-area.size-1-4>.item{
|
||||
width: 97.8%;
|
||||
}
|
||||
#pagebuilder-area>div.builder-area.size-1-4>.item>.list>.size-sizer-container{
|
||||
display: none;
|
||||
}
|
||||
#pagebuilder-area>div.builder-area.size-1-4>.item>.list>.name{
|
||||
margin-left: -35px;
|
||||
}
|
||||
#pagebuilder-area>div.builder-area.left-sidebar{
|
||||
border-left: 1px solid #DFDFDF;
|
||||
}
|
||||
#pagebuilder-area>div.builder-area.right-sidebar{
|
||||
border-right: 1px solid #DFDFDF;
|
||||
}
|
||||
#pagebuilder-area>div.placeholder.size-1-1{
|
||||
border: none;
|
||||
position: relative;
|
||||
display: block;
|
||||
}
|
||||
#pagebuilder-elements-container>.item>.list, #pagebuilder-elements-container>.item>.data,
|
||||
#pagebuilder-area .builder-area>.item>.thumb, #pagebuilder-area .builder-area>.item>.data{
|
||||
display: none;
|
||||
}
|
||||
/* Themewaves pb Start*/
|
||||
#poststuff #cmeta_pagebuilder .inside{
|
||||
background-color: #f9f9f9;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.pagebuilder-head-container{
|
||||
padding: 30px 20px 10px 20px;
|
||||
}
|
||||
.tw-template-container{
|
||||
padding: 0 20px;
|
||||
}
|
||||
div.tw-one{
|
||||
vertical-align: top;
|
||||
display: inline-block;
|
||||
max-width: 20%;
|
||||
margin-right: 4%;
|
||||
}
|
||||
div.tw-one h4{
|
||||
color:#333;
|
||||
font-family: Arial;
|
||||
font-size: 14px;
|
||||
line-height: 28px;
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
div.tw-two{
|
||||
display: inline-block;
|
||||
max-width: 74%;
|
||||
}
|
||||
div.tw-two .sidebar{
|
||||
text-indent: -9999px;
|
||||
height: 92px;
|
||||
width: 92px;
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
background: url(../images/select_layout.png) no-repeat;
|
||||
}
|
||||
div.tw-two .sidebar.left-sidebar{
|
||||
background-position: 0 0;
|
||||
}
|
||||
div.tw-two .sidebar.right-sidebar{
|
||||
background-position: -220px 0;
|
||||
}
|
||||
div.tw-two .sidebar.full{
|
||||
background-position: -111px 0;
|
||||
}
|
||||
div.tw-two .sidebar.left-sidebar.active{
|
||||
background-position: 0 -94px;
|
||||
}
|
||||
div.tw-two .sidebar.right-sidebar.active{
|
||||
background-position: -220px -94px;
|
||||
}
|
||||
div.tw-two .sidebar.full.active{
|
||||
background-position: -111px -94px;
|
||||
}
|
||||
/* Themewaves Items CSS*/
|
||||
#pagebuilder-elements-container>.item{
|
||||
width: auto;
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
cursor: pointer;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
|
||||
background: #333;
|
||||
background: -webkit-gradient(linear, left bottom, left top, from(#65b6fc), to(#b3e1ff));
|
||||
background: -moz-linear-gradient(bottom, #65b6fc, #b3e1ff);
|
||||
color: #ffffff;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#65b6fc', endColorstr='#b3e1ff');
|
||||
|
||||
-webkit-box-shadow: 0 2px 4px rgba(1,1,1,.1), inset 0 1px rgba(255,255,255,.6);
|
||||
-moz-box-shadow: 0 2px 4px rgba(1,1,1,.1), inset 0 1px rgba(255,255,255,.6);
|
||||
box-shadow: 0 2px 4px rgba(1,1,1,.1), inset 0 1px rgba(255,255,255,.6);
|
||||
border: solid 1px #6395c0;
|
||||
}
|
||||
#pagebuilder-elements-container>.item:active{
|
||||
background-color: #8ac8fc;
|
||||
-webkit-box-shadow: 0 2px 4px rgba(1,1,1,.1), inset 0 1px 6px rgba(0,0,0,.25);
|
||||
-moz-box-shadow: 0 2px 4px rgba(1,1,1,.1), inset 0 1px 6px rgba(0,0,0,.25);
|
||||
box-shadow: 0 2px 4px rgba(1,1,1,.1), inset 0 1px 6px rgba(0,0,0,.25);
|
||||
cursor: move;
|
||||
}
|
||||
#pagebuilder-elements-container>.item:hover,.ui-dialog-buttonpane.ui-widget-content.ui-helper-clearfix .ui-dialog-buttonset button.ui-state-default:hover, .tw-pb-main-container input[type="button"]:hover{
|
||||
background: -webkit-gradient(linear, left bottom, left top, from(#78befb), to(#c6e9ff));
|
||||
background: -moz-linear-gradient(bottom, #78befb, #b3e1ff);
|
||||
color: #ffffff;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#78befb', endColorstr='#c6e9ff');
|
||||
|
||||
-webkit-box-shadow: 0 1px #fff, inset 0 1px rgba(255,255,255,.6);
|
||||
-moz-box-shadow: 0 1px #fff, inset 0 1px rgba(255,255,255,.6);
|
||||
box-shadow: 0 1px #fff, inset 0 1px rgba(255,255,255,.6);
|
||||
}
|
||||
#pagebuilder-elements-container>.item .thumb{
|
||||
position: relative;
|
||||
color: #FFF;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
font-family: Arial;
|
||||
line-height: 28px;
|
||||
padding: 4px 12px 4px 37px;
|
||||
|
||||
}
|
||||
#pagebuilder-elements-container>.item span{
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background: url(../images/themewaves-elements.png) no-repeat center left;
|
||||
text-indent: -99999px;
|
||||
background-position: -10px -14px;
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
}
|
||||
#pagebuilder-elements-container>.item span.blog{
|
||||
background-position: -140px -14px;
|
||||
}
|
||||
#pagebuilder-elements-container>.item span.carousel{
|
||||
background-position: -453px -14px;
|
||||
}
|
||||
#pagebuilder-elements-container>.item span.callout{
|
||||
background-position: -11px -50px;
|
||||
}
|
||||
#pagebuilder-elements-container>.item span.column{
|
||||
background-position: -229px -14px;
|
||||
}
|
||||
#pagebuilder-elements-container>.item span.column_service{
|
||||
background-position: -272px -50px;
|
||||
}
|
||||
#pagebuilder-elements-container>.item span.content{
|
||||
background-position: -50px -50px;
|
||||
}
|
||||
#pagebuilder-elements-container>.item span.divider{
|
||||
background-position: -95px -50px;
|
||||
}
|
||||
#pagebuilder-elements-container>.item span.image_slider{
|
||||
background-position: -187px -50px;
|
||||
}
|
||||
#pagebuilder-elements-container>.item span.message_box{
|
||||
background-position: -410px -14px;
|
||||
}
|
||||
#pagebuilder-elements-container>.item span.portfolio{
|
||||
background-position: -365px -50px;
|
||||
}
|
||||
#pagebuilder-elements-container>.item span.pricing_table{
|
||||
background-position: -498px -14px;
|
||||
}
|
||||
#pagebuilder-elements-container>.item span.progress_bar{
|
||||
background-position: -278px -14px;
|
||||
}
|
||||
#pagebuilder-elements-container>.item span.recent_posts{
|
||||
background-position: -141px -50px;
|
||||
}
|
||||
#pagebuilder-elements-container>.item span.sidebar{
|
||||
background-position: -365px -14px;
|
||||
}
|
||||
#pagebuilder-elements-container>.item span.slider{
|
||||
background-position: -232px -50px;
|
||||
}
|
||||
#pagebuilder-elements-container>.item span.tab{
|
||||
background-position: -322px -14px;
|
||||
}
|
||||
#pagebuilder-elements-container>.item span.team{
|
||||
background-position: -52px -14px;
|
||||
}
|
||||
#pagebuilder-elements-container>.item span.testimonials{
|
||||
background-position: -95px -14px;
|
||||
}
|
||||
#pagebuilder-elements-container>.item span.toggle{
|
||||
background-position: -410px -50px;
|
||||
}
|
||||
#pagebuilder-elements-container>.item span.twitter{
|
||||
background-position: -322px -50px;
|
||||
}
|
||||
#pagebuilder-elements-container>.item span.toggle{
|
||||
background-position: -187px -14px;
|
||||
}
|
||||
#pagebuilder-elements-container>.item span.video{
|
||||
background-position: -187px -14px;
|
||||
}
|
||||
|
||||
#pagebuilder-area .builder-area>.item{
|
||||
position: relative;
|
||||
float: left;
|
||||
margin-left: 0.9%;
|
||||
margin-right: 0.9%;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
font-family: sans-serif;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
color: #737373;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
background-color: #f3f3f3;
|
||||
-webkit-box-shadow: 0 2px 4px rgba(1,1,1,.1), inset 0 3px rgba(255,255,255,.4);
|
||||
-moz-box-shadow: 0 2px 4px rgba(1,1,1,.1), inset 0 3px rgba(255,255,255,.4);
|
||||
box-shadow: 0 2px 4px rgba(1,1,1,.1), inset 0 3px rgba(255,255,255,.4);
|
||||
border: solid 1px #bebebe;
|
||||
height: 38px;
|
||||
min-width: 22.75%;
|
||||
}
|
||||
#pagebuilder-area .builder-area>.item a,#pagebuilder-area .builder-area>.item div.size{
|
||||
display: block;
|
||||
text-indent: -9999px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: url(../images/tw-page-builder-actions.png);
|
||||
}
|
||||
#pagebuilder-area .builder-area>.item div.size{
|
||||
text-align: center;
|
||||
color: #FFF;
|
||||
line-height: 20px;
|
||||
width: 40px;
|
||||
text-indent: inherit;
|
||||
background-position: -83px -6px;
|
||||
}
|
||||
#pagebuilder-area .builder-area>.item a.up{
|
||||
float: left;
|
||||
background-position: 0 0;
|
||||
}
|
||||
#pagebuilder-area .builder-area>.item a.up:hover{
|
||||
background-position: 0 -20px;
|
||||
}
|
||||
#pagebuilder-area .builder-area>.item a.down{
|
||||
background-position: -20px 0;
|
||||
float: right;
|
||||
width: 19px;
|
||||
}
|
||||
#pagebuilder-area .builder-area>.item a.down:hover{
|
||||
background-position: -20px -20px;
|
||||
}
|
||||
#pagebuilder-area .builder-area>.item a.action-delete{
|
||||
float: right;
|
||||
background-position: -59px 0;
|
||||
}
|
||||
#pagebuilder-area .builder-area>.item a.action-delete:hover{
|
||||
background-position: -59px -20px;
|
||||
}
|
||||
#pagebuilder-area .builder-area>.item a.action-duplicate{
|
||||
float: left;
|
||||
background-position: -40px 0;
|
||||
width: 19px;
|
||||
}
|
||||
#pagebuilder-area .builder-area>.item a.action-duplicate:hover{
|
||||
background-position: -40px -20px;
|
||||
}
|
||||
#pagebuilder-area .builder-area>.item a.action-edit{
|
||||
width: 39px;
|
||||
background-position: -127px -6px;
|
||||
}
|
||||
#pagebuilder-area .builder-area>.item a.action-edit:hover{
|
||||
background-position: -171px -6px;
|
||||
}
|
||||
#pagebuilder-area .builder-area>.item>.list>div.name{
|
||||
line-height: 36px;
|
||||
color: #333;
|
||||
font-family: Arial;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: 50px;
|
||||
}
|
||||
#pagebuilder-area .builder-area>.item.size-1-4>.list>div.name{
|
||||
max-width: 82px;
|
||||
padding-left: 0px;
|
||||
overflow: hidden;
|
||||
}
|
||||
#pagebuilder-area .builder-area>.item>.list>div{
|
||||
height: 100%;
|
||||
float: left;
|
||||
}
|
||||
#pagebuilder-area .builder-area>.item>.list .sizer{
|
||||
width: 39px;
|
||||
}
|
||||
#pagebuilder-area .builder-area>.item>.list>div.actions{
|
||||
float: right;
|
||||
width: 39px;
|
||||
position: relative;
|
||||
right: -1px;
|
||||
top: -1px;
|
||||
}
|
||||
#pagebuilder-area .builder-area>.item>.list>div.size-sizer-container{
|
||||
position: relative;
|
||||
left: -1px;
|
||||
top: -1px;
|
||||
}
|
||||
/* ThemeWaves Template Start */
|
||||
.tw-template-container #template-save div.template{
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
*display: inline;
|
||||
padding: 10px 20px 10px 30px;
|
||||
color: #fff;
|
||||
background-color: #65b6fc;
|
||||
-webkit-box-shadow: inset 0 1px rgba(255,255,255,.6);
|
||||
-moz-box-shadow: inset 0 1px rgba(255,255,255,.6);
|
||||
box-shadow: inset 0 1px rgba(255,255,255,.6);
|
||||
border: solid 1px #6395c0;
|
||||
background-image: -webkit-linear-gradient(bottom, #65b6fc, #b3e1ff);
|
||||
background-image: -moz-linear-gradient(bottom, #65b6fc, #b3e1ff);
|
||||
background-image: -o-linear-gradient(bottom, #65b6fc, #b3e1ff);
|
||||
background-image: -ms-linear-gradient(bottom, #65b6fc, #b3e1ff);
|
||||
background-image: linear-gradient(to top, #65b6fc, #b3e1ff);
|
||||
border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
font-family: Arial;
|
||||
font-size: 13px;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
.tw-template-container #template-save span.image-save{
|
||||
left: 10px;
|
||||
top: 12px;
|
||||
position: absolute;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
background: url(../images/template-save.png) no-repeat;
|
||||
}
|
||||
#template-save {
|
||||
position: relative;
|
||||
}
|
||||
#template-save>.template-container{
|
||||
display: none;
|
||||
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .15);
|
||||
-moz-box-shadow: inset 0 1px 3px rgba(0,0,0,.15);
|
||||
box-shadow: inset 0 1px 3px rgba(0, 0, 0, .15);
|
||||
border: solid 1px #8F8F8F;
|
||||
background-image: -webkit-linear-gradient(bottom, #969696, #C5C5C5);
|
||||
background-image: -moz-linear-gradient(bottom, #969696, #C5C5C5);
|
||||
background-image: -o-linear-gradient(bottom, #969696, #C5C5C5);
|
||||
background-image: -ms-linear-gradient(bottom, #969696, #C5C5C5);
|
||||
background-image: linear-gradient(to top, #969696, #C5C5C5);
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
margin: 0;
|
||||
top: 36px;
|
||||
color: #ed1c24;
|
||||
padding: 15px 15px 15px 10px;
|
||||
}
|
||||
#template-save>.template-container a{
|
||||
color: #fff;
|
||||
font-family: Arial;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
line-height: 28px;
|
||||
font-weight: bold;
|
||||
}
|
||||
#template-save>.template-container li{
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding-left: 10px;
|
||||
padding-right: 30px;
|
||||
}
|
||||
#template-save>.template-container li span{
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
right: 10px;
|
||||
top: 6px;
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
#template-save>.template-container li:hover{
|
||||
background: #333;
|
||||
border-radius: 3px;
|
||||
}
|
||||
/* Grid */
|
||||
.size-1-1{width:97.8%;}
|
||||
.size-1-2{width:47.89%;}
|
||||
.size-1-4{width:22.92%;}
|
||||
.size-3-4{width:72.9%;}
|
||||
.size-1-3{width:31.25%;}
|
||||
.size-2-3{width:64.5%;}
|
||||
|
||||
.left-sidebar .size-1-1,.right-sidebar .size-1-1{width:97.5%;}
|
||||
.left-sidebar .size-1-2,.right-sidebar .size-1-2{width:47.7%;}
|
||||
.left-sidebar .size-1-4,.right-sidebar .size-1-4{width:22.75%;}
|
||||
.left-sidebar .size-3-4,.right-sidebar .size-3-4{width:72.5%;}
|
||||
.left-sidebar .size-1-3,.right-sidebar .size-1-3{width:31.05%;}
|
||||
.left-sidebar .size-2-3,.right-sidebar .size-2-3{width:63.5%;}
|
||||
|
||||
/* Delete Modal */
|
||||
#pb-delete-modal-container{
|
||||
background: #FFF;
|
||||
padding-top: 50px;
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
color: #333;
|
||||
min-height: 50px !important;
|
||||
font-size: 19px;
|
||||
font-weight: bold;
|
||||
}
|
||||
/* Modal */
|
||||
.ui-dialog.tw-pb-main-container{
|
||||
padding: 9px;
|
||||
background-color: rgba(0, 0, 0, .6);
|
||||
width: 660px !important;
|
||||
font-family: Arial, "Lucida Grande", sans-serif;
|
||||
font-weight: normal;
|
||||
border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
}
|
||||
.field-item>.field-data .field .container-item{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.tw-pb-main-container .ui-dialog-titlebar{
|
||||
height: 44px;
|
||||
font-size: 14px;
|
||||
font-family: Arial;
|
||||
font-weight: bold;
|
||||
color:#333;
|
||||
-webkit-border-radius: 3px 3px 0 0;
|
||||
-moz-border-radius: 3px 3px 0 0;
|
||||
border-radius: 3px 3px 0 0;
|
||||
background-color: #fbfbfb;
|
||||
-webkit-box-shadow: 0 1px #6395c0, inset 0 1px rgba(255,255,255,.6);
|
||||
-moz-box-shadow: 0 1px #6395c0, inset 0 1px rgba(255,255,255,.6);
|
||||
box-shadow: 0 1px #6395c0, inset 0 1px rgba(255,255,255,.6);
|
||||
background-image: -webkit-linear-gradient(bottom, #65b6fc, #b3e1ff);
|
||||
background-image: -moz-linear-gradient(bottom, #65b6fc, #b3e1ff);
|
||||
background-image: -o-linear-gradient(bottom, #65b6fc, #b3e1ff);
|
||||
background-image: -ms-linear-gradient(bottom, #65b6fc, #b3e1ff);
|
||||
background-image: linear-gradient(to top, #65b6fc, #b3e1ff);
|
||||
}
|
||||
.tw-pb-main-container .ui-dialog-titlebar span.ui-dialog-title{
|
||||
padding: 14px 30px;
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
}
|
||||
.tw-pb-main-container .ui-dialog-titlebar-close{float: right;}
|
||||
.tw-pb-main-container .ui-dialog-titlebar-close,.tw-pb-main-container .ui-dialog-titlebar-close>span,
|
||||
.container-item .action-delete,.container-item>.list .action-expand>.closed,.container-item .action-duplicate, .container-item.expanded>.list .action-expand>.opened,.category-list-item .actions .action-delete{
|
||||
padding: 10px;
|
||||
background:url(../images/pb-close.png) no-repeat 15px 17px;
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
text-indent: -9999px;}
|
||||
.category-list-item .actions .action-delete{
|
||||
padding: 0;
|
||||
background-position: 9px 6px;
|
||||
}
|
||||
.container-item .action-delete,.container-item .action-duplicate{
|
||||
padding: 0;
|
||||
margin-top: 10px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
}
|
||||
.container-item .action-delete{
|
||||
background-position: 4px -30px;
|
||||
right: 5px;
|
||||
}
|
||||
.container-item .action-duplicate{
|
||||
background-position: 4px -66px;
|
||||
right: 25px;
|
||||
}
|
||||
.container-item>.list .action-expand>.closed{
|
||||
padding: 0;
|
||||
margin-top: 10px;
|
||||
background-position: -29px -26px;
|
||||
}
|
||||
.container-item.expanded>.list .action-expand>.opened{
|
||||
padding: 0;
|
||||
margin-top: 10px;
|
||||
background-position: -29px 2px;
|
||||
}
|
||||
.ui-dialog-buttonpane.ui-widget-content.ui-helper-clearfix{
|
||||
position: relative;
|
||||
border-top: 1px solid #e0e0e0;
|
||||
background: #F5F5F5;
|
||||
height: 78px;
|
||||
}
|
||||
.ui-dialog-buttonpane.ui-widget-content.ui-helper-clearfix .ui-dialog-buttonset{
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
top: 20px;
|
||||
}
|
||||
.ui-dialog-buttonpane .watch-tutorial{
|
||||
display: block;
|
||||
position: absolute;
|
||||
text-indent: -9999px;
|
||||
width: 173px;
|
||||
height: 16px;
|
||||
left: 30px;
|
||||
top: 30px;
|
||||
background: url(../images/watch-tutorial.png) no-repeat 0 0;
|
||||
}
|
||||
.ui-dialog-buttonpane.ui-widget-content.ui-helper-clearfix .ui-dialog-buttonset button.ui-state-default,.tw-pb-main-container input[type="button"]{
|
||||
position: relative;
|
||||
padding: 10px 17px;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
color: #fff;
|
||||
margin: 0;
|
||||
margin-left: 10px;
|
||||
background-color: #333;
|
||||
-webkit-box-shadow: 0 2px 4px rgba(1, 1, 1, .1), inset 0 1px rgba(255, 255, 255, .6);
|
||||
-moz-box-shadow: 0 2px 4px rgba(1,1,1,.1), inset 0 1px rgba(255,255,255,.6);
|
||||
box-shadow: 0 2px 4px rgba(1, 1, 1, .1), inset 0 1px rgba(255, 255, 255, .6);
|
||||
border: solid 1px #6395C0;
|
||||
background-image: -webkit-linear-gradient(bottom, #65B6FC, #B3E1FF);
|
||||
background-image: -moz-linear-gradient(bottom, #65B6FC, #B3E1FF);
|
||||
background-image: -o-linear-gradient(bottom, #65B6FC, #B3E1FF);
|
||||
background-image: -ms-linear-gradient(bottom, #65B6FC, #B3E1FF);
|
||||
background-image: linear-gradient(to top, #65B6FC, #B3E1FF);
|
||||
cursor: pointer;
|
||||
}
|
||||
.tw-pb-main-container input[type="button"]{
|
||||
margin: 0;
|
||||
}
|
||||
.ui-dialog-buttonpane.ui-widget-content.ui-helper-clearfix .ui-dialog-buttonset button.ui-state-default span{
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
font-family: Arial;
|
||||
color: #FFF;
|
||||
}
|
||||
.tw-pb-main-container .field-data input[type="text"]{
|
||||
border: 1px solid #bebebe;
|
||||
padding: 8px 10px;
|
||||
min-width: 220px;
|
||||
}
|
||||
.tw-pb-main-container .general-field-container .field-data input[type="text"]{
|
||||
min-width: 203px;
|
||||
}
|
||||
.tw-pb-main-container .general-field-container div.field-title,.tw-pb-main-container .general-field-container .field-item>.field-data{
|
||||
width: auto;
|
||||
}
|
||||
.tw-pb-main-container .general-field-container{
|
||||
position: relative;
|
||||
border-bottom: 1px solid #e0e0e0;
|
||||
background: #f5f5f5;
|
||||
padding: 18px 0px 18px 30px;
|
||||
}
|
||||
.tw-pb-main-container .general-field-container .field-item{
|
||||
width: 310px;
|
||||
display: inline-block;
|
||||
}
|
||||
.tw-pb-main-container .general-field-container .field-desc{
|
||||
display: none;
|
||||
}
|
||||
.field-item>div{
|
||||
display: inline-block;
|
||||
}
|
||||
.field-item>div.field-title{
|
||||
width: 120px;
|
||||
font-family: Arial;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
line-height: 28px;
|
||||
color: #333;
|
||||
}
|
||||
.custom-field-container .field-item>div.field-title{
|
||||
display: block;
|
||||
width: auto;
|
||||
vertical-align: top;
|
||||
}
|
||||
#shortcode_container_dialog.loading-shortcode .custom-field-container{
|
||||
background-image: url('../../../assets/img/prettyPhoto/loader.gif');
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
min-height: 100px;
|
||||
}
|
||||
#shortcode_container_dialog .custom-field-container{
|
||||
background: #fff;
|
||||
margin-bottom: -20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
#shortcode_container_dialog .general-field-container div.field-title{
|
||||
line-height: 15px;
|
||||
vertical-align: top;
|
||||
margin-right: 30px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.content .custom-field-container .field-item>div.field-data{
|
||||
display: none;
|
||||
}
|
||||
.content .custom-field-container .field-item>div.field-title{
|
||||
text-align: center;
|
||||
}
|
||||
.field-item>div.field-desc{
|
||||
font-family: Arial;
|
||||
font-size: 11px;
|
||||
color: #9c9c9c;
|
||||
vertical-align: top;
|
||||
float: right;
|
||||
width: 280px;
|
||||
}
|
||||
.field-item>.field-data{
|
||||
width: 250px;
|
||||
}
|
||||
.field-item.type-color>.field-data{width: auto; position: relative;}
|
||||
.field-item.type-color>.field-data>.color-view{position: absolute;display: none;z-index: 9999;left: 50%;}
|
||||
.field-item.type-color>.field-data>.color-info{
|
||||
background: url(../images/colorpicker/select.png) no-repeat;
|
||||
width: 27px;
|
||||
height: 27px;
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 3px;
|
||||
}
|
||||
.field-item.type-color>.field-data>[data-type="color"]{background-color: #fff !important;color:#bebebe !important;}
|
||||
.container-item>.list{
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
z-index: 9;
|
||||
position: relative;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
background-color: #f3f3f3;
|
||||
-webkit-box-shadow: inset 0 4px rgba(255,255,255,.4);
|
||||
-moz-box-shadow: inset 0 4px rgba(255,255,255,.4);
|
||||
box-shadow: inset 0 4px rgba(255,255,255,.4);
|
||||
border: solid 1px #bebebe;
|
||||
padding: 0px 20px 0px 40px;
|
||||
color: #333333;
|
||||
cursor: move;
|
||||
}
|
||||
.container-item>.content{
|
||||
width: 558px;
|
||||
position: relative;
|
||||
top: -2px;
|
||||
display: none;
|
||||
border: 1px solid #dfdfdf;
|
||||
background-color: #fff;
|
||||
border-top: none;
|
||||
padding: 20px;
|
||||
}
|
||||
.container-item.expanded>.content{
|
||||
display: block;
|
||||
}
|
||||
.container-item>.list .name{
|
||||
float: left;
|
||||
font-family: Arial;
|
||||
font-size: 13px;
|
||||
line-height: 36px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.container-item>.list .actions{
|
||||
position: absolute;
|
||||
width: 95%;
|
||||
left: 20px;
|
||||
}
|
||||
/* Font awesome on Page Builder */
|
||||
#pb-modal-container .custom-field-container .field-item .field-data .fa-viewer{
|
||||
display: inline-block;
|
||||
}
|
||||
#fontawesome_container_dialog .general-field-container .field-item{
|
||||
width: 200px;
|
||||
}
|
||||
#fontawesome_container_dialog .general-field-container .field-item .field-data input[type="text"]{
|
||||
width: 150px;
|
||||
min-width: 100px;
|
||||
}
|
||||
#fontawesome_container_dialog .general-field-container div.field-title{
|
||||
width: 140px;
|
||||
}
|
||||
.custom-field-container > div.field-item.type-fa .field-title{
|
||||
display: none;
|
||||
}
|
||||
.custom-field-container > div.field-item{
|
||||
padding: 20px 30px 0px 30px;
|
||||
}
|
||||
.custom-field-container > div.field-item:last-child{
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.custom-field-container .content div.field-item{
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
margin: 5px 0;
|
||||
}
|
||||
/* Column Editor Styling */
|
||||
.tw-pb-main-container .field-item.type-textArea.editor>.field-data{
|
||||
width: 600px;
|
||||
}
|
||||
.tw-pb-main-container .field-item.type-textArea.editor>.field-data textarea{
|
||||
width: 597px;
|
||||
border: none;
|
||||
min-height: 200px;
|
||||
}
|
||||
.tw-pb-main-container .field-item.type-textArea.editor>.field-data .tw-editor-content{
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
-webkit-border-top-right-radius: 3px;
|
||||
-webkit-border-top-left-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
border-top-left-radius: 3px;
|
||||
border-color: #CCC #CCC #DFDFDF;
|
||||
}
|
||||
/* DropDown Styling */
|
||||
.tw-pb-main-container .field-item>.field-data{
|
||||
position: relative;
|
||||
min-height: 35px;
|
||||
}
|
||||
.tw-pb-main-container .field-item>.field-data>select{
|
||||
position: absolute;
|
||||
z-index: 8888;
|
||||
opacity: 0;
|
||||
width: 220px;
|
||||
height: 36px;
|
||||
left: 0;
|
||||
}
|
||||
.tw-pb-main-container .field-item>.field-data>.select-text{
|
||||
left: 0;
|
||||
color: #9c9c9c;
|
||||
position: absolute;
|
||||
padding: 10px 45px 10px 15px;
|
||||
background: #FFF url('../images/pb-dropdown.png') no-repeat right 1px top 0px;
|
||||
}
|
||||
.tw-pb-main-container .field-item>.field-data>.category-list-container{
|
||||
margin-top: 35px;
|
||||
width: 600px;
|
||||
}
|
||||
/* List Item Styling */
|
||||
.category-list-container .category-list-item{
|
||||
position: relative;
|
||||
min-width: 145px;
|
||||
display: inline-block !important;
|
||||
padding: 8px 20px;
|
||||
color: #FFF;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
margin-top: 10px;
|
||||
margin-right: 10px;
|
||||
background-color: #333;
|
||||
-webkit-box-shadow: inset 0 1px 5px rgba(0, 0, 0, .15);
|
||||
-moz-box-shadow: inset 0 1px 5px rgba(0,0,0,.15);
|
||||
box-shadow: inset 0 1px 5px rgba(0, 0, 0, .15);
|
||||
border: solid 1px #8F8F8F;
|
||||
background-image: -webkit-linear-gradient(bottom, #969696, #C5C5C5);
|
||||
background-image: -moz-linear-gradient(bottom, #969696, #C5C5C5);
|
||||
background-image: -o-linear-gradient(bottom, #969696, #C5C5C5);
|
||||
background-image: -ms-linear-gradient(bottom, #969696, #C5C5C5);
|
||||
background-image: linear-gradient(to top, #969696, #C5C5C5);
|
||||
}
|
||||
.category-list-container .category-list-item .name,.category-list-container .category-list-item .actions{
|
||||
display: inline-block;
|
||||
font-family: Arial;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
line-height: 18px;
|
||||
color: #FFF;
|
||||
}
|
||||
.category-list-container .category-list-item .actions{
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
}
|
||||
/* CheckBox Styling */
|
||||
.tw-pb-main-container .field-item.type-checkbox>.field-data>.checkbox-text{
|
||||
width: 90px;
|
||||
height: 36px;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
background-color: #f3f3f3;
|
||||
-webkit-box-shadow: 0 2px 4px rgba(1,1,1,.1), inset 0 4px rgba(255,255,255,.4);
|
||||
-moz-box-shadow: 0 2px 4px rgba(1,1,1,.1), inset 0 4px rgba(255,255,255,.4);
|
||||
box-shadow: 0 2px 4px rgba(1,1,1,.1), inset 0 4px rgba(255,255,255,.4);
|
||||
}
|
||||
.tw-pb-main-container .field-item.type-checkbox>.field-data>.checkbox-text>div{
|
||||
height: 34px;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: #bebebe;
|
||||
float: left;
|
||||
font-family: Arial;
|
||||
font-size: 12px;
|
||||
line-height: 34px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
.tw-pb-main-container .field-item.type-checkbox>.field-data>.checkbox-text.checked-true>.checkbox-true{
|
||||
width: 43px;
|
||||
-webkit-border-radius: 3px 0 0 3px;
|
||||
-moz-border-radius: 3px 0 0 3px;
|
||||
border-radius: 3px 0 0 3px;
|
||||
background-color: #fff;
|
||||
-webkit-box-shadow: inset 0 2px rgba(255,255,255,.2);
|
||||
-moz-box-shadow: inset 0 2px rgba(255,255,255,.2);
|
||||
box-shadow: inset 0 2px rgba(255,255,255,.2);
|
||||
border: solid 1px #6395c0;
|
||||
background-image: -webkit-linear-gradient(bottom, #65b6fc, #b3e1ff);
|
||||
background-image: -moz-linear-gradient(bottom, #65b6fc, #b3e1ff);
|
||||
background-image: -o-linear-gradient(bottom, #65b6fc, #b3e1ff);
|
||||
background-image: -ms-linear-gradient(bottom, #65b6fc, #b3e1ff);
|
||||
background-image: linear-gradient(to top, #65b6fc, #b3e1ff);
|
||||
}
|
||||
.tw-pb-main-container .field-item.type-checkbox>.field-data>.checkbox-text.checked-true>.checkbox-false{
|
||||
width: 44px;
|
||||
border-left-width: 0px;
|
||||
-webkit-border-radius: 0 3px 3px 0;
|
||||
-moz-border-radius: 0 3px 3px 0;
|
||||
border-radius: 0 3px 3px 0;
|
||||
}
|
||||
.tw-pb-main-container .field-item.type-checkbox>.field-data>.checkbox-text.checked-false>.checkbox-true{
|
||||
width: 44px;
|
||||
border-right-width: 0px;
|
||||
-webkit-border-radius: 3px 0 0 3px;
|
||||
-moz-border-radius: 3px 0 0 3px;
|
||||
border-radius: 3px 0 0 3px;
|
||||
}
|
||||
.tw-pb-main-container .field-item.type-checkbox>.field-data>.checkbox-text.checked-false>.checkbox-false{
|
||||
width: 43px;
|
||||
border-color: #8f8f8f;
|
||||
-webkit-border-radius: 0 3px 3px 0;
|
||||
-moz-border-radius: 0 3px 3px 0;
|
||||
border-radius: 0 3px 3px 0;
|
||||
background-color: #fff;
|
||||
-webkit-box-shadow: inset 0 1px 4px rgba(0,0,0,.15);
|
||||
-moz-box-shadow: inset 0 1px 4px rgba(0,0,0,.15);
|
||||
box-shadow: inset 0 1px 4px rgba(0,0,0,.15);
|
||||
border: solid 1px #8f8f8f;
|
||||
background-image: -webkit-linear-gradient(bottom, #969696, #c5c5c5);
|
||||
background-image: -moz-linear-gradient(bottom, #969696, #c5c5c5);
|
||||
background-image: -o-linear-gradient(bottom, #969696, #c5c5c5);
|
||||
background-image: -ms-linear-gradient(bottom, #969696, #c5c5c5);
|
||||
background-image: linear-gradient(to top, #969696, #c5c5c5);
|
||||
}
|
||||
.tw-pb-main-container .field-item.type-checkbox>.field-data{
|
||||
display: inline-block;
|
||||
float: right;
|
||||
width: 90px;
|
||||
height: 36px;
|
||||
min-height: 24px;
|
||||
cursor: pointer;
|
||||
}
|
||||
/* List Styling */
|
||||
.list .custom-field-container .field-item>.field-title{
|
||||
display: none;
|
||||
}
|
||||
.list .custom-field-container .content>.field-item.type-text>.field-desc{
|
||||
display: block;
|
||||
}
|
||||
.list .custom-field-container .content>.field-item.type-text>.field-data{
|
||||
width:250px;
|
||||
}
|
||||
/* Accordion Styling */
|
||||
.accordion .custom-field-container .field-item>div.field-title,.accordion .custom-field-container .field-item>div.field-desc{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.field-item.type-container>.field-data{
|
||||
width: 600px;
|
||||
}
|
||||
.tw-pb-main-container textarea{
|
||||
padding: 10px;
|
||||
min-height: 85px;
|
||||
min-width: 550px;
|
||||
border: 1px solid #bebebe;
|
||||
}
|
||||
.tw-pb-main-container .custom-field-container textarea{
|
||||
min-width: 550px;
|
||||
}
|
||||
.tw-pb-main-container .custom-field-container .type-container .type-checkbox{
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
top: 18px;
|
||||
width: auto;
|
||||
}
|
||||
.tw-pb-main-container .custom-field-container .type-container .type-checkbox .field-title{
|
||||
position: absolute;
|
||||
right: 100px;
|
||||
top: 4px;
|
||||
width: 200px;
|
||||
text-align: right;
|
||||
display: block;
|
||||
}
|
||||
#pb-modal-container{
|
||||
display: inline-block !important;
|
||||
min-height: 400px !important;
|
||||
width: 660px !important;
|
||||
background: #FFF;
|
||||
}
|
||||
.ui-widget-overlay{
|
||||
opacity: 0 !important;
|
||||
}
|
||||
/* Container Item - Toggle Styling */
|
||||
.container-item>.list .action-expand>.opened,.container-item.expanded>.list .action-expand>.closed{display: none;}
|
||||
.container-item>.list .action-expand>.closed,.container-item.expanded>.list .action-expand>.opened{display: block;}
|
||||
/* Container Item - Image Slider Styling */
|
||||
[data-container-type="image_slider"]>.container-item{
|
||||
display: inline-block;
|
||||
width: 100px;
|
||||
}
|
||||
[data-container-type="image_slider"]>.container-item>.content{
|
||||
padding: 0px;
|
||||
height: 99px;
|
||||
width: 99px;
|
||||
margin: 0;
|
||||
}
|
||||
.image .container-item .action-delete{
|
||||
right: 25px;
|
||||
}
|
||||
[data-container-type="image_slider"]>.container-item>.content>.image-src{
|
||||
width: 99px;
|
||||
height: 99px;
|
||||
}
|
||||
[data-container-type="image_slider"]>.container-item>.list>.name,
|
||||
[data-container-type="image_slider"]>.container-item>.list>.actions>.action-expand{
|
||||
display: none;
|
||||
}
|
||||
.placeholding{
|
||||
line-height: 42px !important;
|
||||
}
|
||||
/* END - Pagebuilder */
|
||||
.pagebuilder-container .hidden,.pagebuilder-container .size-0-0,.field-item.hidden{display: none !important;}
|
||||
|
After Width: | Height: | Size: 49 B |
|
After Width: | Height: | Size: 130 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 532 B |
|
After Width: | Height: | Size: 970 B |
|
After Width: | Height: | Size: 1012 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 86 B |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 970 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 78 B |
|
After Width: | Height: | Size: 984 B |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 562 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 970 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 86 B |
|
After Width: | Height: | Size: 1008 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1018 B |
|
After Width: | Height: | Size: 997 B |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 518 B |
|
After Width: | Height: | Size: 315 B |
|
After Width: | Height: | Size: 12 KiB |
BIN
wp-content/themes/nuzi/framework/assets/images/partner.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
wp-content/themes/nuzi/framework/assets/images/pb-close.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
wp-content/themes/nuzi/framework/assets/images/pb-dropdown.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
wp-content/themes/nuzi/framework/assets/images/portfolio.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
wp-content/themes/nuzi/framework/assets/images/price.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
wp-content/themes/nuzi/framework/assets/images/select_layout.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
wp-content/themes/nuzi/framework/assets/images/team.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
wp-content/themes/nuzi/framework/assets/images/template-save.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
wp-content/themes/nuzi/framework/assets/images/testimonial.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
485
wp-content/themes/nuzi/framework/assets/js/colorpicker.js
Normal file
@@ -0,0 +1,485 @@
|
||||
/**
|
||||
*
|
||||
* Color picker
|
||||
* Author: Stefan Petre www.eyecon.ro
|
||||
*
|
||||
* Dual licensed under the MIT and GPL licenses
|
||||
*
|
||||
*/
|
||||
(function ($) {
|
||||
var ColorPicker = function () {
|
||||
var
|
||||
ids = {},
|
||||
inAction,
|
||||
charMin = 65,
|
||||
visible,
|
||||
tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',
|
||||
defaults = {
|
||||
eventName: 'click',
|
||||
onShow: function () {},
|
||||
onBeforeShow: function(){},
|
||||
onHide: function () {},
|
||||
onChange: function () {},
|
||||
onSubmit: function () {},
|
||||
color: 'ff0000',
|
||||
livePreview: true,
|
||||
flat: false
|
||||
},
|
||||
fillRGBFields = function (hsb, cal) {
|
||||
var rgb = HSBToRGB(hsb);
|
||||
$(cal).data('colorpicker').fields
|
||||
.eq(1).val(rgb.r).end()
|
||||
.eq(2).val(rgb.g).end()
|
||||
.eq(3).val(rgb.b).end();
|
||||
},
|
||||
fillHSBFields = function (hsb, cal) {
|
||||
$(cal).data('colorpicker').fields
|
||||
.eq(4).val(hsb.h).end()
|
||||
.eq(5).val(hsb.s).end()
|
||||
.eq(6).val(hsb.b).end();
|
||||
},
|
||||
fillHexFields = function (hsb, cal) {
|
||||
$(cal).data('colorpicker').fields
|
||||
.eq(0).val(HSBToHex(hsb)).end();
|
||||
},
|
||||
setSelector = function (hsb, cal) {
|
||||
$(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100}));
|
||||
$(cal).data('colorpicker').selectorIndic.css({
|
||||
left: parseInt(150 * hsb.s/100, 10),
|
||||
top: parseInt(150 * (100-hsb.b)/100, 10)
|
||||
});
|
||||
},
|
||||
setHue = function (hsb, cal) {
|
||||
$(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10));
|
||||
},
|
||||
setCurrentColor = function (hsb, cal) {
|
||||
$(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb));
|
||||
},
|
||||
setNewColor = function (hsb, cal) {
|
||||
$(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb));
|
||||
},
|
||||
keyDown = function (ev) {
|
||||
var pressedKey = ev.charCode || ev.keyCode || -1;
|
||||
if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) {
|
||||
return false;
|
||||
}
|
||||
var cal = $(this).parent().parent();
|
||||
if (cal.data('colorpicker').livePreview === true) {
|
||||
change.apply(this);
|
||||
}
|
||||
},
|
||||
change = function (ev) {
|
||||
var cal = $(this).parent().parent(), col;
|
||||
if (this.parentNode.className.indexOf('_hex') > 0) {
|
||||
cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value));
|
||||
} else if (this.parentNode.className.indexOf('_hsb') > 0) {
|
||||
cal.data('colorpicker').color = col = fixHSB({
|
||||
h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10),
|
||||
s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10),
|
||||
b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10)
|
||||
});
|
||||
} else {
|
||||
cal.data('colorpicker').color = col = RGBToHSB(fixRGB({
|
||||
r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10),
|
||||
g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10),
|
||||
b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10)
|
||||
}));
|
||||
}
|
||||
if (ev) {
|
||||
fillRGBFields(col, cal.get(0));
|
||||
fillHexFields(col, cal.get(0));
|
||||
fillHSBFields(col, cal.get(0));
|
||||
}
|
||||
setSelector(col, cal.get(0));
|
||||
setHue(col, cal.get(0));
|
||||
setNewColor(col, cal.get(0));
|
||||
//cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]);
|
||||
cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el]);
|
||||
},
|
||||
blur = function (ev) {
|
||||
var cal = $(this).parent().parent();
|
||||
cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus');
|
||||
},
|
||||
focus = function () {
|
||||
charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65;
|
||||
$(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus');
|
||||
$(this).parent().addClass('colorpicker_focus');
|
||||
},
|
||||
downIncrement = function (ev) {
|
||||
var field = $(this).parent().find('input').focus();
|
||||
var current = {
|
||||
el: $(this).parent().addClass('colorpicker_slider'),
|
||||
max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255),
|
||||
y: ev.pageY,
|
||||
field: field,
|
||||
val: parseInt(field.val(), 10),
|
||||
preview: $(this).parent().parent().data('colorpicker').livePreview
|
||||
};
|
||||
$(document).bind('mouseup', current, upIncrement);
|
||||
$(document).bind('mousemove', current, moveIncrement);
|
||||
},
|
||||
moveIncrement = function (ev) {
|
||||
ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10))));
|
||||
if (ev.data.preview) {
|
||||
change.apply(ev.data.field.get(0), [true]);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
upIncrement = function (ev) {
|
||||
change.apply(ev.data.field.get(0), [true]);
|
||||
ev.data.el.removeClass('colorpicker_slider').find('input').focus();
|
||||
$(document).unbind('mouseup', upIncrement);
|
||||
$(document).unbind('mousemove', moveIncrement);
|
||||
return false;
|
||||
},
|
||||
downHue = function (ev) {
|
||||
var current = {
|
||||
cal: $(this).parent(),
|
||||
y: $(this).offset().top
|
||||
};
|
||||
current.preview = current.cal.data('colorpicker').livePreview;
|
||||
$(document).bind('mouseup', current, upHue);
|
||||
$(document).bind('mousemove', current, moveHue);
|
||||
},
|
||||
moveHue = function (ev) {
|
||||
change.apply(
|
||||
ev.data.cal.data('colorpicker')
|
||||
.fields
|
||||
.eq(4)
|
||||
.val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10))
|
||||
.get(0),
|
||||
[ev.data.preview]
|
||||
);
|
||||
return false;
|
||||
},
|
||||
upHue = function (ev) {
|
||||
fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
||||
fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
||||
$(document).unbind('mouseup', upHue);
|
||||
$(document).unbind('mousemove', moveHue);
|
||||
return false;
|
||||
},
|
||||
downSelector = function (ev) {
|
||||
var current = {
|
||||
cal: $(this).parent(),
|
||||
pos: $(this).offset()
|
||||
};
|
||||
current.preview = current.cal.data('colorpicker').livePreview;
|
||||
$(document).bind('mouseup', current, upSelector);
|
||||
$(document).bind('mousemove', current, moveSelector);
|
||||
},
|
||||
moveSelector = function (ev) {
|
||||
change.apply(
|
||||
ev.data.cal.data('colorpicker')
|
||||
.fields
|
||||
.eq(6)
|
||||
.val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10))
|
||||
.end()
|
||||
.eq(5)
|
||||
.val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10))
|
||||
.get(0),
|
||||
[ev.data.preview]
|
||||
);
|
||||
return false;
|
||||
},
|
||||
upSelector = function (ev) {
|
||||
fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
||||
fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
||||
$(document).unbind('mouseup', upSelector);
|
||||
$(document).unbind('mousemove', moveSelector);
|
||||
return false;
|
||||
},
|
||||
enterSubmit = function (ev) {
|
||||
$(this).addClass('colorpicker_focus');
|
||||
},
|
||||
leaveSubmit = function (ev) {
|
||||
$(this).removeClass('colorpicker_focus');
|
||||
},
|
||||
clickSubmit = function (ev) {
|
||||
var cal = $(this).parent();
|
||||
var col = cal.data('colorpicker').color;
|
||||
cal.data('colorpicker').origColor = col;
|
||||
setCurrentColor(col, cal.get(0));
|
||||
cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el);
|
||||
},
|
||||
show = function (ev) {
|
||||
var cal = $('#' + $(this).data('colorpickerId'));
|
||||
cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]);
|
||||
var pos = $(this).offset();
|
||||
var viewPort = getViewport();
|
||||
var top = pos.top + this.offsetHeight;
|
||||
var left = pos.left;
|
||||
if (top + 176 > viewPort.t + viewPort.h) {
|
||||
top -= this.offsetHeight + 176;
|
||||
}
|
||||
if (left + 356 > viewPort.l + viewPort.w) {
|
||||
left -= 356;
|
||||
}
|
||||
cal.css({left: left + 'px', top: top + 'px'});
|
||||
if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) {
|
||||
cal.show();
|
||||
}
|
||||
$(document).bind('mousedown', {cal: cal}, hide);
|
||||
return false;
|
||||
},
|
||||
hide = function (ev) {
|
||||
if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) {
|
||||
if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) {
|
||||
ev.data.cal.hide();
|
||||
}
|
||||
$(document).unbind('mousedown', hide);
|
||||
}
|
||||
},
|
||||
isChildOf = function(parentEl, el, container) {
|
||||
if (parentEl == el) {
|
||||
return true;
|
||||
}
|
||||
if (parentEl.contains) {
|
||||
return parentEl.contains(el);
|
||||
}
|
||||
if ( parentEl.compareDocumentPosition ) {
|
||||
return !!(parentEl.compareDocumentPosition(el) & 16);
|
||||
}
|
||||
var prEl = el.parentNode;
|
||||
while(prEl && prEl != container) {
|
||||
if (prEl == parentEl)
|
||||
return true;
|
||||
prEl = prEl.parentNode;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
getViewport = function () {
|
||||
var m = document.compatMode == 'CSS1Compat';
|
||||
return {
|
||||
l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft),
|
||||
t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop),
|
||||
w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth),
|
||||
h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight)
|
||||
};
|
||||
},
|
||||
fixHSB = function (hsb) {
|
||||
return {
|
||||
h: Math.min(360, Math.max(0, hsb.h)),
|
||||
s: Math.min(100, Math.max(0, hsb.s)),
|
||||
b: Math.min(100, Math.max(0, hsb.b))
|
||||
};
|
||||
},
|
||||
fixRGB = function (rgb) {
|
||||
return {
|
||||
r: Math.min(255, Math.max(0, rgb.r)),
|
||||
g: Math.min(255, Math.max(0, rgb.g)),
|
||||
b: Math.min(255, Math.max(0, rgb.b))
|
||||
};
|
||||
},
|
||||
fixHex = function (hex) {
|
||||
var len = 6 - hex.length;
|
||||
if (len > 0) {
|
||||
var o = [];
|
||||
for (var i=0; i<len; i++) {
|
||||
o.push('0');
|
||||
}
|
||||
o.push(hex);
|
||||
hex = o.join('');
|
||||
}
|
||||
return hex;
|
||||
},
|
||||
HexToRGB = function (hex) {
|
||||
var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
|
||||
return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
|
||||
},
|
||||
HexToHSB = function (hex) {
|
||||
return RGBToHSB(HexToRGB(hex));
|
||||
},
|
||||
RGBToHSB = function (rgb) {
|
||||
var hsb = {
|
||||
h: 0,
|
||||
s: 0,
|
||||
b: 0
|
||||
};
|
||||
var min = Math.min(rgb.r, rgb.g, rgb.b);
|
||||
var max = Math.max(rgb.r, rgb.g, rgb.b);
|
||||
var delta = max - min;
|
||||
hsb.b = max;
|
||||
if (max != 0) {
|
||||
|
||||
}
|
||||
hsb.s = max != 0 ? 255 * delta / max : 0;
|
||||
if (hsb.s != 0) {
|
||||
if (rgb.r == max) {
|
||||
hsb.h = (rgb.g - rgb.b) / delta;
|
||||
} else if (rgb.g == max) {
|
||||
hsb.h = 2 + (rgb.b - rgb.r) / delta;
|
||||
} else {
|
||||
hsb.h = 4 + (rgb.r - rgb.g) / delta;
|
||||
}
|
||||
} else {
|
||||
hsb.h = -1;
|
||||
}
|
||||
hsb.h *= 60;
|
||||
if (hsb.h < 0) {
|
||||
hsb.h += 360;
|
||||
}
|
||||
hsb.s *= 100/255;
|
||||
hsb.b *= 100/255;
|
||||
return hsb;
|
||||
},
|
||||
HSBToRGB = function (hsb) {
|
||||
var rgb = {};
|
||||
var h = Math.round(hsb.h);
|
||||
var s = Math.round(hsb.s*255/100);
|
||||
var v = Math.round(hsb.b*255/100);
|
||||
if(s == 0) {
|
||||
rgb.r = rgb.g = rgb.b = v;
|
||||
} else {
|
||||
var t1 = v;
|
||||
var t2 = (255-s)*v/255;
|
||||
var t3 = (t1-t2)*(h%60)/60;
|
||||
if(h==360) h = 0;
|
||||
if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3}
|
||||
else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3}
|
||||
else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3}
|
||||
else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3}
|
||||
else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3}
|
||||
else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3}
|
||||
else {rgb.r=0; rgb.g=0; rgb.b=0}
|
||||
}
|
||||
return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};
|
||||
},
|
||||
RGBToHex = function (rgb) {
|
||||
var hex = [
|
||||
rgb.r.toString(16),
|
||||
rgb.g.toString(16),
|
||||
rgb.b.toString(16)
|
||||
];
|
||||
$.each(hex, function (nr, val) {
|
||||
if (val.length == 1) {
|
||||
hex[nr] = '0' + val;
|
||||
}
|
||||
});
|
||||
return hex.join('');
|
||||
},
|
||||
HSBToHex = function (hsb) {
|
||||
return RGBToHex(HSBToRGB(hsb));
|
||||
},
|
||||
restoreOriginal = function () {
|
||||
var cal = $(this).parent();
|
||||
var col = cal.data('colorpicker').origColor;
|
||||
cal.data('colorpicker').color = col;
|
||||
fillRGBFields(col, cal.get(0));
|
||||
fillHexFields(col, cal.get(0));
|
||||
fillHSBFields(col, cal.get(0));
|
||||
setSelector(col, cal.get(0));
|
||||
setHue(col, cal.get(0));
|
||||
setNewColor(col, cal.get(0));
|
||||
};
|
||||
return {
|
||||
init: function (opt) {
|
||||
opt = $.extend({}, defaults, opt||{});
|
||||
if (typeof opt.color == 'string') {
|
||||
opt.color = HexToHSB(opt.color);
|
||||
} else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) {
|
||||
opt.color = RGBToHSB(opt.color);
|
||||
} else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) {
|
||||
opt.color = fixHSB(opt.color);
|
||||
} else {
|
||||
return this;
|
||||
}
|
||||
return this.each(function () {
|
||||
if (!$(this).data('colorpickerId')) {
|
||||
var options = $.extend({}, opt);
|
||||
options.origColor = opt.color;
|
||||
var id = 'collorpicker_' + parseInt(Math.random() * 1000);
|
||||
$(this).data('colorpickerId', id);
|
||||
var cal = $(tpl).attr('id', id);
|
||||
if (options.flat) {
|
||||
cal.appendTo(this).show();
|
||||
} else {
|
||||
cal.appendTo(document.body);
|
||||
}
|
||||
options.fields = cal
|
||||
.find('input')
|
||||
.bind('keyup', keyDown)
|
||||
.bind('change', change)
|
||||
.bind('blur', blur)
|
||||
.bind('focus', focus);
|
||||
cal
|
||||
.find('span').bind('mousedown', downIncrement).end()
|
||||
.find('>div.colorpicker_current_color').bind('click', restoreOriginal);
|
||||
options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector);
|
||||
options.selectorIndic = options.selector.find('div div');
|
||||
options.el = this;
|
||||
options.hue = cal.find('div.colorpicker_hue div');
|
||||
cal.find('div.colorpicker_hue').bind('mousedown', downHue);
|
||||
options.newColor = cal.find('div.colorpicker_new_color');
|
||||
options.currentColor = cal.find('div.colorpicker_current_color');
|
||||
cal.data('colorpicker', options);
|
||||
cal.find('div.colorpicker_submit')
|
||||
.bind('mouseenter', enterSubmit)
|
||||
.bind('mouseleave', leaveSubmit)
|
||||
.bind('click', clickSubmit);
|
||||
fillRGBFields(options.color, cal.get(0));
|
||||
fillHSBFields(options.color, cal.get(0));
|
||||
fillHexFields(options.color, cal.get(0));
|
||||
setHue(options.color, cal.get(0));
|
||||
setSelector(options.color, cal.get(0));
|
||||
setCurrentColor(options.color, cal.get(0));
|
||||
setNewColor(options.color, cal.get(0));
|
||||
if (options.flat) {
|
||||
cal.css({
|
||||
position: 'relative',
|
||||
display: 'block'
|
||||
});
|
||||
} else {
|
||||
$(this).bind(options.eventName, show);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
showPicker: function() {
|
||||
return this.each( function () {
|
||||
if ($(this).data('colorpickerId')) {
|
||||
show.apply(this);
|
||||
}
|
||||
});
|
||||
},
|
||||
hidePicker: function() {
|
||||
return this.each( function () {
|
||||
if ($(this).data('colorpickerId')) {
|
||||
$('#' + $(this).data('colorpickerId')).hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
setColor: function(col) {
|
||||
if (typeof col == 'string') {
|
||||
col = HexToHSB(col);
|
||||
} else if (col.r != undefined && col.g != undefined && col.b != undefined) {
|
||||
col = RGBToHSB(col);
|
||||
} else if (col.h != undefined && col.s != undefined && col.b != undefined) {
|
||||
col = fixHSB(col);
|
||||
} else {
|
||||
return this;
|
||||
}
|
||||
return this.each(function(){
|
||||
if ($(this).data('colorpickerId')) {
|
||||
var cal = $('#' + $(this).data('colorpickerId'));
|
||||
cal.data('colorpicker').color = col;
|
||||
cal.data('colorpicker').origColor = col;
|
||||
fillRGBFields(col, cal.get(0));
|
||||
fillHSBFields(col, cal.get(0));
|
||||
fillHexFields(col, cal.get(0));
|
||||
setHue(col, cal.get(0));
|
||||
setSelector(col, cal.get(0));
|
||||
setCurrentColor(col, cal.get(0));
|
||||
setNewColor(col, cal.get(0));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}();
|
||||
$.fn.extend({
|
||||
ColorPicker: ColorPicker.init,
|
||||
ColorPickerHide: ColorPicker.hidePicker,
|
||||
ColorPickerShow: ColorPicker.showPicker,
|
||||
ColorPickerSetColor: ColorPicker.setColor
|
||||
});
|
||||
})(jQuery)
|
||||
262
wp-content/themes/nuzi/framework/assets/js/metaboxes.js
Normal file
@@ -0,0 +1,262 @@
|
||||
function showHidePostFormatField(){
|
||||
jQuery('#normal-sortables>[id*="tw-format-"]').each(function(){
|
||||
if(jQuery(this).attr('id').replace("tw","post")===jQuery('#post-formats-select input:radio:checked').attr('id').replace('image', '0')){
|
||||
jQuery(this).css('display', 'block');
|
||||
} else {
|
||||
jQuery(this).css('display', 'none');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
jQuery(function(){
|
||||
|
||||
/* Color Picker */
|
||||
jQuery(".color_picker").ColorPicker({
|
||||
onShow: function (colpkr) {
|
||||
jQuery(colpkr).fadeIn(500);
|
||||
return false;
|
||||
},
|
||||
onHide: function (colpkr) {
|
||||
jQuery(colpkr).fadeOut(500);
|
||||
return false;
|
||||
},
|
||||
onChange: function (hsb, hex, rgb, el) {
|
||||
jQuery(el).parent().find('.color_picker_inner').css('backgroundColor', '#' + hex);
|
||||
jQuery(el).parent().find('.color_picker_value').val('#' + hex);
|
||||
}
|
||||
});
|
||||
|
||||
/* Check show hide */
|
||||
jQuery('.check-show-hide').change(function() {
|
||||
var datashow = jQuery(this).attr('data-show');
|
||||
var datahide = jQuery(this).attr('data-hide');
|
||||
if(jQuery(this).is(':checked')) {
|
||||
jQuery(datashow).fadeIn();
|
||||
jQuery(datahide).fadeOut();
|
||||
} else {
|
||||
jQuery(datashow).fadeOut();
|
||||
jQuery(datahide).fadeIn();
|
||||
}
|
||||
});
|
||||
jQuery('.check-show-hide').each(function() {
|
||||
jQuery(this).change();
|
||||
});
|
||||
|
||||
|
||||
/* Select options */
|
||||
jQuery(".tw-metaboxes select").each(function(){
|
||||
$this = jQuery(this);
|
||||
if( $this.attr("data-value") != "" ){
|
||||
$this.val($this.attr("data-value"));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
jQuery("#header_type select").change(function(){
|
||||
$this = jQuery(this);
|
||||
if( $this.val() == "subtitle" ){
|
||||
jQuery(".tw-metaboxes #subtitle").fadeIn();
|
||||
jQuery(".tw-metaboxes #bg_image").fadeIn();
|
||||
jQuery(".tw-metaboxes #slider_id").fadeOut();
|
||||
jQuery(".tw-metaboxes #googlemap").fadeOut();
|
||||
} else if($this.val() == "slider") {
|
||||
jQuery(".tw-metaboxes #slider_id").fadeIn();
|
||||
jQuery(".tw-metaboxes #subtitle").fadeOut();
|
||||
jQuery(".tw-metaboxes #bg_image").fadeOut();
|
||||
jQuery(".tw-metaboxes #googlemap").fadeOut();
|
||||
} else if($this.val() == "map") {
|
||||
jQuery(".tw-metaboxes #googlemap").fadeIn();
|
||||
jQuery(".tw-metaboxes #slider_id").fadeOut();
|
||||
jQuery(".tw-metaboxes #subtitle").fadeOut();
|
||||
jQuery(".tw-metaboxes #bg_image").fadeOut();
|
||||
} else {
|
||||
jQuery(".tw-metaboxes #googlemap").fadeOut();
|
||||
jQuery(".tw-metaboxes #slider_id").fadeOut();
|
||||
jQuery(".tw-metaboxes #subtitle").fadeOut();
|
||||
jQuery(".tw-metaboxes #bg_image").fadeOut();
|
||||
}
|
||||
});
|
||||
jQuery("#header_type select").change();
|
||||
|
||||
|
||||
/* Page layout options */
|
||||
jQuery(".tw-metaboxes .type_layout a").each(function(){
|
||||
$val = jQuery(".tw-metaboxes .type_layout input").val();
|
||||
$this = jQuery(this);
|
||||
if( $this.data("value") == $val ){
|
||||
$this.addClass("active");
|
||||
}
|
||||
});
|
||||
jQuery(".tw-metaboxes .type_layout a").click(function(){
|
||||
jQuery(".tw-metaboxes .type_layout a").removeClass("active");
|
||||
$val = jQuery(this).data('value');
|
||||
jQuery(".tw-metaboxes .type_layout input").val($val);
|
||||
jQuery(this).addClass("active");
|
||||
})
|
||||
|
||||
|
||||
|
||||
/* Post format */
|
||||
showHidePostFormatField();
|
||||
jQuery('#post-formats-select input').change(showHidePostFormatField);
|
||||
|
||||
|
||||
/* Gallery */
|
||||
|
||||
var frame;
|
||||
var images = script_data.image_ids;
|
||||
var selection = loadImages(images);
|
||||
|
||||
jQuery('#gallery_images_upload').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
// Set options for 1st frame render
|
||||
var options = {
|
||||
title: script_data.label_create,
|
||||
state: 'gallery-edit',
|
||||
frame: 'post',
|
||||
selection: selection
|
||||
};
|
||||
|
||||
// Check if frame or gallery already exist
|
||||
if( frame || selection ) {
|
||||
options['title'] = script_data.label_edit;
|
||||
}
|
||||
|
||||
frame = wp.media(options).open();
|
||||
|
||||
// Tweak views
|
||||
frame.menu.get('view').unset('cancel');
|
||||
frame.menu.get('view').unset('separateCancel');
|
||||
frame.menu.get('view').get('gallery-edit').el.innerHTML = script_data.label_edit;
|
||||
frame.content.get('view').sidebar.unset('gallery'); // Hide Gallery Settings in sidebar
|
||||
|
||||
// When we are editing a gallery
|
||||
overrideGalleryInsert();
|
||||
frame.on( 'toolbar:render:gallery-edit', function() {
|
||||
overrideGalleryInsert();
|
||||
});
|
||||
|
||||
frame.on( 'content:render:browse', function( browser ) {
|
||||
if ( !browser ) return;
|
||||
// Hide Gallery Setting in sidebar
|
||||
browser.sidebar.on('ready', function(){
|
||||
browser.sidebar.unset('gallery');
|
||||
});
|
||||
// Hide filter/search as they don't work
|
||||
browser.toolbar.on('ready', function(){
|
||||
if(browser.toolbar.controller._state == 'gallery-library'){
|
||||
browser.toolbar.$el.hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// All images removed
|
||||
frame.state().get('library').on( 'remove', function() {
|
||||
var models = frame.state().get('library');
|
||||
if(models.length == 0){
|
||||
selection = false;
|
||||
jQuery.post(ajaxurl, {
|
||||
ids: '',
|
||||
action: 'themewaves_save_images',
|
||||
post_id: script_data.post_id,
|
||||
nonce: script_data.nonce
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Override insert button
|
||||
function overrideGalleryInsert() {
|
||||
frame.toolbar.get('view').set({
|
||||
insert: {
|
||||
style: 'primary',
|
||||
text: script_data.label_save,
|
||||
|
||||
click: function() {
|
||||
var models = frame.state().get('library'),
|
||||
ids = '';
|
||||
|
||||
models.each( function( attachment ) {
|
||||
ids += attachment.id + ','
|
||||
});
|
||||
|
||||
this.el.innerHTML = script_data.label_saving;
|
||||
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
ids: ids,
|
||||
action: 'themewaves_save_images',
|
||||
post_id: script_data.post_id,
|
||||
nonce: script_data.nonce
|
||||
},
|
||||
success: function(){
|
||||
selection = loadImages(ids);
|
||||
jQuery('#gallery_image_ids').val( ids );
|
||||
frame.close();
|
||||
},
|
||||
dataType: 'html'
|
||||
}).done( function( data ) {
|
||||
jQuery('.gallery-thumbs').html( data );
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Load images
|
||||
function loadImages(images) {
|
||||
if( images ){
|
||||
var shortcode = new wp.shortcode({
|
||||
tag: 'gallery',
|
||||
attrs: { ids: images },
|
||||
type: 'single'
|
||||
});
|
||||
|
||||
var attachments = wp.media.gallery.attachments( shortcode );
|
||||
|
||||
var selection = new wp.media.model.Selection( attachments.models, {
|
||||
props: attachments.props.toJSON(),
|
||||
multiple: true
|
||||
});
|
||||
|
||||
selection.gallery = attachments.gallery;
|
||||
|
||||
// Fetch the query's attachments, and then break ties from the
|
||||
// query to allow for sorting.
|
||||
selection.more().done( function() {
|
||||
// Break ties with the query.
|
||||
selection.props.set({ query: false });
|
||||
selection.unmirror();
|
||||
selection.props.unset('orderby');
|
||||
});
|
||||
|
||||
return selection;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
function browseimage(id){
|
||||
var elementId = id;
|
||||
window.original_send_to_editor = window.send_to_editor;
|
||||
window.custom_editor = true;
|
||||
window.send_to_editor = function(html){
|
||||
if (elementId != undefined) {
|
||||
jQuery(html).find('img').each(function(){
|
||||
var imgurl = jQuery(this).attr('src');
|
||||
jQuery('input[name="'+elementId+'"]').val(imgurl);
|
||||
return;
|
||||
});
|
||||
} else {
|
||||
window.original_send_to_editor(html);
|
||||
}
|
||||
elementId = undefined;
|
||||
};
|
||||
wp.media.editor.open();
|
||||
}
|
||||
|
||||
window.original_send_to_editor = window.send_to_editor;
|
||||
window.custom_editor = true;
|
||||
914
wp-content/themes/nuzi/framework/assets/js/pagebuilder.js
Normal file
@@ -0,0 +1,914 @@
|
||||
var $currentContentEditor='content';
|
||||
var $currentDeleteModal=false;
|
||||
var $pbSavingDone=true;
|
||||
// Reset Content width
|
||||
jQuery(function(){
|
||||
$homeURI+='/';
|
||||
if($homeURI[$homeURI.length-1]==='/'){$homeURI=$homeURI.substring(0,$homeURI.length-1);}
|
||||
twSortDragg();
|
||||
// init Source Datas
|
||||
twInitSourceDatas(jQuery('#pagebuilder-area-source>div'));
|
||||
// Click to Add Item
|
||||
jQuery('#pagebuilder-elements-container>.item').click(function(){
|
||||
jQuery('#pagebuilder-area>div').eq(1).append(jQuery(this).clone());
|
||||
pbSaveData();
|
||||
pbInitEvents();
|
||||
});
|
||||
// Layout Change
|
||||
jQuery('#pagebuilder-select-layout>.sidebar').bind('click').bind('click',function(e){e.preventDefault();
|
||||
var $currentLayout = jQuery(this);
|
||||
var $currentValueArray = $currentLayout.attr('data-value').split(',');
|
||||
var $currentLayoutInput=$currentLayout.siblings('.page-layout');
|
||||
$currentLayout.addClass('active').siblings('.sidebar').removeClass('active');
|
||||
$currentLayoutInput.attr("value",$currentLayout.attr('data-input'));
|
||||
if($currentValueArray[0]!==''){
|
||||
var $currentBuilderArea='';
|
||||
var $currentBuilderAreaClasses='';
|
||||
for(var i = 0, length=$currentValueArray.length ; i<length; i++){
|
||||
$currentBuilderArea=jQuery('#pagebuilder-area').children('.builder-area').eq(i);
|
||||
$currentBuilderAreaClasses=$currentBuilderArea.attr('class').split(' ');
|
||||
for(var ind=0,len=$currentBuilderAreaClasses.length;ind<len;ind++){if($currentBuilderAreaClasses[ind].search('size-')!==-1){$currentBuilderArea.removeClass($currentBuilderAreaClasses[ind]).addClass('size-'+$currentValueArray[i]);break;}}
|
||||
}
|
||||
//START - Sidebar elements moving
|
||||
var $oldSidebar=false;
|
||||
var $newSidebar=false;
|
||||
if($currentLayoutInput.val()=='left'){
|
||||
jQuery('#pagebuilder-area').children('.builder-area').eq(1).removeClass('right-sidebar').removeClass('no-sidebar').addClass('left-sidebar');
|
||||
$oldSidebar=jQuery('#pagebuilder-area').children('.builder-area').eq(-1);
|
||||
$newSidebar=jQuery('#pagebuilder-area').children('.builder-area').eq(0);
|
||||
}else if($currentLayoutInput.val()=='right'){
|
||||
jQuery('#pagebuilder-area').children('.builder-area').eq(1).removeClass('left-sidebar').removeClass('no-sidebar').addClass('right-sidebar');
|
||||
$oldSidebar=jQuery('#pagebuilder-area').children('.builder-area').eq(0);
|
||||
$newSidebar=jQuery('#pagebuilder-area').children('.builder-area').eq(-1);
|
||||
}else{
|
||||
jQuery('#pagebuilder-area').children('.builder-area').eq(1).removeClass('left-sidebar').removeClass('right-sidebar').addClass('no-sidebar');
|
||||
}
|
||||
if($oldSidebar&&$newSidebar){
|
||||
if($newSidebar.children().length===0){
|
||||
$newSidebar.html($oldSidebar.html());
|
||||
$oldSidebar.html('');
|
||||
}
|
||||
}
|
||||
//END - Sidebar elements moving
|
||||
pbSaveData();
|
||||
pbInitEvents();
|
||||
}
|
||||
});
|
||||
jQuery('#pagebuilder-select-layout>.sidebar.active').click();
|
||||
pbInitEvents();
|
||||
pbInitTemplateEvents();
|
||||
pbSaveData();
|
||||
});
|
||||
function pbInitTemplateEvents(){
|
||||
// Template Action
|
||||
jQuery('.template-add').unbind('click').bind('click',function(e){e.preventDefault();
|
||||
var $currentTemplateName = prompt('Template Name?');
|
||||
var $currentTemplateLayout = jQuery('input[name="pb-page-layout"]') .val();
|
||||
var $currentTemplateContent=encodeURIComponent(jQuery('#pagebuilder-area').html());
|
||||
if($currentTemplateName==null){
|
||||
return false;
|
||||
}else if($currentTemplateName!='' && $currentTemplateLayout!=''){
|
||||
jQuery.ajax({
|
||||
type: "POST",
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
'action':'template_add',
|
||||
'template_name':$currentTemplateName,
|
||||
'template_content':$currentTemplateContent,
|
||||
'template_layout':$currentTemplateLayout
|
||||
},
|
||||
success: function(response){
|
||||
if(jQuery('.succes',response).text()!=''){
|
||||
jQuery('ul.template-container').append('<li class="template-item"><a class="template-name">'+$currentTemplateName+'</a><span class="template-delete">X</span></li>');
|
||||
pbInitTemplateEvents();
|
||||
// alert(jQuery('.succes',response).text());
|
||||
}else if(jQuery('.error',response).text()!=''){
|
||||
alert(jQuery('.error',response).text());
|
||||
}
|
||||
}
|
||||
});
|
||||
}else{
|
||||
alert('Template name is empty!!! Try again.');
|
||||
}
|
||||
jQuery('#template-save').removeClass('active').children('.template-container').slideUp();
|
||||
});
|
||||
jQuery('.template-name').unbind('click').bind('click',function(e){e.preventDefault();
|
||||
var $currentTemplateName = jQuery(this).text();
|
||||
var $currentResponse = 'waitingajax';
|
||||
if($currentTemplateName){
|
||||
jQuery.ajax({
|
||||
type: "POST",
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
'action':'template_get',
|
||||
'template_name':$currentTemplateName
|
||||
},
|
||||
success: function(response){
|
||||
$currentResponse=response;
|
||||
}
|
||||
});
|
||||
if(confirm("Your old contents are will delete ?")){
|
||||
var templateAjaxInt=setInterval(function(){
|
||||
if($currentResponse!=='waitingajax'){
|
||||
clearInterval(templateAjaxInt);
|
||||
if(jQuery('.data',$currentResponse).html()!=''){
|
||||
jQuery('#pagebuilder-select-layout>[data-input="'+jQuery('.data>.layout',$currentResponse).text()+'"]').click();
|
||||
jQuery('#pagebuilder-area').html('');
|
||||
var tmp=jQuery($currentResponse).clone();
|
||||
jQuery('>.data>.content>div',tmp).each(function(){
|
||||
jQuery('#pagebuilder-area').append(jQuery(this).html(''));
|
||||
});
|
||||
twSortDragg();
|
||||
// init Source Datas
|
||||
twInitSourceDatas(jQuery('>.data>.content>div',$currentResponse));
|
||||
pbSaveData();
|
||||
pbInitEvents();
|
||||
}else if(jQuery('.error',$currentResponse).text()!=''){
|
||||
alert(jQuery('.error',$currentResponse).text());
|
||||
}
|
||||
}
|
||||
},100);
|
||||
}
|
||||
}
|
||||
jQuery('#template-save').removeClass('active').children('.template-container').slideUp();
|
||||
});
|
||||
jQuery('.template-delete').unbind('click').bind('click',function(e){e.preventDefault();
|
||||
var $this = jQuery(this);
|
||||
var $currentTemplateName = $this.closest('.template-item').find('.template-name').text();
|
||||
if($currentTemplateName && confirm("Are you delete this template ?")){
|
||||
jQuery.ajax({
|
||||
type: "POST",
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
'action':'template_remove',
|
||||
'template_name':$currentTemplateName
|
||||
},
|
||||
success: function(response){
|
||||
$this.closest('.template-item').remove();
|
||||
if(jQuery('.error',response).text()!=''){
|
||||
alert(jQuery('.error',response).text());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
jQuery('#template-save').removeClass('active').children('.template-container').slideUp();
|
||||
});
|
||||
// Template Style
|
||||
jQuery('#template-save>.template').unbind('click').bind('click',function(e){e.preventDefault();
|
||||
if(jQuery('#template-save').hasClass('active')){
|
||||
jQuery('#template-save').removeClass('active').children('.template-container').slideUp();
|
||||
}else{
|
||||
jQuery('#template-save').addClass('active').children('.template-container').slideDown();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function pbInitEvents(){
|
||||
// height repaire
|
||||
var $builderMaxHeight=0;
|
||||
jQuery('#pagebuilder-area>div').css('min-height','');
|
||||
jQuery('#pagebuilder-area>div').each(function(){if(jQuery(this).height()>$builderMaxHeight){$builderMaxHeight=jQuery(this).height();}});
|
||||
jQuery('#pagebuilder-area>div').css('min-height',$builderMaxHeight+'px');
|
||||
// Sortable Draggable
|
||||
twSortDragg();
|
||||
//resize
|
||||
jQuery(".builder-area>.item>.list>.size-sizer-container>.sizer>a.down").unbind("click").bind("click",function(e){e.preventDefault();
|
||||
var $this = jQuery(this);
|
||||
var $sizeList=jQuery('#size-list').clone();
|
||||
var $currentItem = $this.closest('.item');
|
||||
var $currentSizeText = jQuery('.list>.size-sizer-container>.size',$currentItem).text();
|
||||
var $currentSizeList = jQuery('li[data-text="'+$currentSizeText+'"]',$sizeList);
|
||||
$currentItem.removeClass($currentSizeList.attr('data-class'));
|
||||
if($currentItem.attr('data-min')){$sizeList.find('[data-class="'+$currentItem.attr('data-min')+'"]').addClass('min').siblings('.min').removeClass('min');}
|
||||
if($currentSizeList.hasClass('min')){
|
||||
// $currentSizeList=$currentSizeList.siblings('.max');
|
||||
}else{
|
||||
$currentSizeList=$currentSizeList.prev();
|
||||
}
|
||||
$currentItem.addClass($currentSizeList.attr('data-class'));
|
||||
jQuery('.list>.size-sizer-container>.size',$currentItem).text($currentSizeList.attr('data-text'));
|
||||
pbSaveData();
|
||||
});
|
||||
|
||||
jQuery(".builder-area>.item>.list>.size-sizer-container>.sizer>a.up").unbind("click").bind("click",function(e){e.preventDefault();
|
||||
var $this = jQuery(this);
|
||||
var $sizeList=jQuery('#size-list').clone();
|
||||
var $currentItem = $this.closest('.item');
|
||||
var $currentSizeText = jQuery('.list>.size-sizer-container>.size',$currentItem).text();
|
||||
var $currentSizeList = jQuery('li[data-text="'+$currentSizeText+'"]',$sizeList);
|
||||
$currentItem.removeClass($currentSizeList.attr('data-class'));
|
||||
if($currentItem.attr('data-min')){$sizeList.find('[data-class="'+$currentItem.attr('data-min')+'"]').addClass('min').siblings('.min').removeClass('min');}
|
||||
if($currentSizeList.hasClass('max')){
|
||||
// $currentSizeList=$currentSizeList.siblings('.min');
|
||||
}else{
|
||||
$currentSizeList=$currentSizeList.next();
|
||||
}
|
||||
$currentItem.addClass($currentSizeList.attr('data-class'));
|
||||
jQuery('.list>.size-sizer-container>.size',$currentItem).text($currentSizeList.attr('data-text'));
|
||||
pbSaveData();
|
||||
});
|
||||
|
||||
//duplicate
|
||||
jQuery(".builder-area>.item>.list>.actions>a.action-duplicate").unbind("click").bind("click",function(e){e.preventDefault();
|
||||
var $parent = jQuery(this).closest('.item');
|
||||
var $newItem = $parent.clone().addClass('hidded').css('display','none');
|
||||
$parent.after($newItem).promise().done(function(){
|
||||
jQuery('.builder-area>.item.hidded').removeClass('hidded').fadeIn('slow').promise().done(function(){
|
||||
pbSaveData();pbInitEvents();
|
||||
});
|
||||
});
|
||||
});
|
||||
//edit
|
||||
jQuery(".builder-area>.item>.list>.actions>a.action-edit").unbind("click").bind("click",function(e){e.preventDefault();
|
||||
$parent = jQuery(this).closest('.item');
|
||||
$parent.addClass('item-modalled').siblings('.item-modalled').removeClass('item-modalled');
|
||||
var $videoURL = jQuery(this).attr('data-video');
|
||||
html = $parent.children('.data').html();
|
||||
//pbInitModalSave
|
||||
jQuery( '<div id="pb-modal-container" class="'+$parent.attr('data-slug')+'" />' ).append(html).dialog({
|
||||
closeOnEscape: true,
|
||||
title: $parent.children('.list').children('.name').text(),
|
||||
resizable: false,
|
||||
width: 800,
|
||||
modal: true,
|
||||
open: function(event, ui){
|
||||
jQuery(this).closest('.ui-dialog').addClass('tw-pb-main-container');
|
||||
jQuery(this).closest('.ui-dialog').focus();
|
||||
if($parent.attr('data-help')){jQuery(this).closest('.ui-dialog').find('.ui-dialog-buttonpane').prepend('<a href="'+$parent.attr('data-help')+'" target="_blank" class="watch-tutorial">LINK</a>');}
|
||||
pbModalInitActions(jQuery(this));
|
||||
},
|
||||
close: function(){
|
||||
$currentContentEditor='content';
|
||||
jQuery('#pb-modal-container').closest('.ui-dialog').remove();
|
||||
jQuery('body>#pb-modal-container').remove();
|
||||
},
|
||||
buttons: {
|
||||
"Save": function() {
|
||||
pbModalSave(jQuery(this));
|
||||
jQuery(this).dialog("close");
|
||||
pbSaveData();
|
||||
},
|
||||
"Cancel": function() {
|
||||
jQuery(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
//remove item
|
||||
jQuery(".builder-area>.item>.list>.actions>a.action-delete").unbind("click").bind("click",function(e){e.preventDefault();
|
||||
$currentDeleteModal = jQuery(this).closest('.item');
|
||||
//pbInitModalSave
|
||||
jQuery( '<div id="pb-delete-modal-container" />' ).append('Are you sure to delete this?').dialog({
|
||||
closeOnEscape: true,
|
||||
title: 'Confirm',
|
||||
resizable: false,
|
||||
width: 800,
|
||||
modal: true,
|
||||
open: function(event, ui){
|
||||
jQuery(this).closest('.ui-dialog').addClass('tw-pb-main-container');
|
||||
jQuery(this).closest('.ui-dialog').find('.ui-dialog-buttonset>.ui-button').first().focus();
|
||||
},
|
||||
close: function(){
|
||||
$currentDeleteModal=false;
|
||||
jQuery('#pb-delete-modal-container').closest('.ui-dialog').remove();
|
||||
jQuery('body>#pb-delete-modal-container').remove();
|
||||
},
|
||||
buttons: {
|
||||
"Yes": function() {
|
||||
$currentDeleteModal.remove();
|
||||
$currentDeleteModal=false;
|
||||
pbSaveData();
|
||||
jQuery(this).dialog("close");
|
||||
},
|
||||
"No": function() {
|
||||
jQuery(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function pbSaveData(){
|
||||
var savingInt=setInterval(function(){
|
||||
if($pbSavingDone){
|
||||
$pbSavingDone=false;
|
||||
clearInterval(savingInt);
|
||||
var item = '';
|
||||
jQuery('#pagebuilder-area>div').each(function(iCont){
|
||||
var $currentContainer=jQuery(this);
|
||||
var $size='';
|
||||
var $classes=$currentContainer.attr('class').split(' ');
|
||||
for(var i=0,len=$classes.length;i<len;i++){
|
||||
if($classes[i].search('size-')!==-1){
|
||||
$size=$classes[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(iCont){item += ',';}
|
||||
item += '"'+iCont+'":{"size":"'+$size+'","items":{';
|
||||
$currentContainer.children('.item').each(function(i){
|
||||
var $currentItem=jQuery(this);
|
||||
if(i){item += ',';}
|
||||
item += '"'+i+'":{"slug":"'+$currentItem.attr('data-slug')+'","size":"' + jQuery('.list>.size-sizer-container>.size',$currentItem).text() + '",';
|
||||
jQuery('.data .general-field-container>.field-item>.field-data>.field',$currentItem).each(function(){
|
||||
var $currentField=jQuery(this);
|
||||
item += '"'+$currentField.attr('data-name')+'":"'+$currentField.val()+'",';
|
||||
}).promise().done(function(){
|
||||
item += '"settings":{';
|
||||
jQuery('.data .custom-field-container>.field-item>.field-data>.field',$currentItem).each(function(index){
|
||||
var $currentField=jQuery(this);
|
||||
if(index){item += ',';}
|
||||
if($currentField.attr('data-type')==='container'){
|
||||
item += '"'+$currentField.attr('data-name')+'":{';
|
||||
$currentField.children('.container-item').each(function(itemIndex){
|
||||
var $currentContainerItem=jQuery(this);
|
||||
if(itemIndex){item += ',';}
|
||||
item += '"'+itemIndex+'":{';
|
||||
jQuery('.content>.field-item>.field-data>.field',$currentContainerItem).each(function(fieldIndex){
|
||||
var $currentContainerItemField = jQuery(this);
|
||||
if(fieldIndex){item += ',';}
|
||||
item += '"'+$currentContainerItemField.attr('data-name')+'":"'+encodeURIComponent($currentContainerItemField.val())+'"';
|
||||
});
|
||||
item += '}';
|
||||
});
|
||||
item += '}';
|
||||
}else{
|
||||
item += '"'+$currentField.attr('data-name')+'":"'+encodeURIComponent($currentField.val())+'"';
|
||||
}
|
||||
}).promise().done(function(){
|
||||
item += '}}';
|
||||
});
|
||||
});
|
||||
}).promise().done(function(){
|
||||
item += '}}';
|
||||
});
|
||||
}).promise().done(function(){
|
||||
// jQuery('textarea#pb_content').val('{'+item+'}');
|
||||
jQuery('textarea#pb_content').val(encodeURIComponent('{'+item+'}'));
|
||||
$pbSavingDone=true;
|
||||
});
|
||||
}
|
||||
},500);
|
||||
}
|
||||
function pbModalInitActions($currentModal){
|
||||
//Font Awesome Actions
|
||||
jQuery('[data-name="fa_icon"]',$currentModal).each(function(){
|
||||
var $currIconField = jQuery(this).closest('.field-item');
|
||||
var $currFa = $currIconField.siblings('.field-item.type-fa').hasClass('type-fa')?$currIconField.siblings('.field-item.type-fa'):$currentModal;
|
||||
var $currFaFields = $currIconField.parent().children('.field-item');
|
||||
//Font Awesome Viewer
|
||||
jQuery('[data-name="fa_icon"]',$currFaFields).unbind('input').bind('input',function(){
|
||||
var $style='display:block; text-align:center; margin: 0 auto;';
|
||||
$style +='font-size:' +jQuery('[data-name="fa_size"]', $currFaFields).val()+';';
|
||||
$style +='width:' +jQuery('[data-name="fa_size"]', $currFaFields).val()+';';
|
||||
$style +='line-height:' +jQuery('[data-name="fa_size"]', $currFaFields).val()+';';
|
||||
$style +='padding:' +jQuery('[data-name="fa_padding"]', $currFaFields).val()+';';
|
||||
$style +='color:' +jQuery('[data-name="fa_color"]', $currFaFields).val()+';';
|
||||
$style +='border-color:'+jQuery('[data-name="fa_bg_color"]',$currFaFields).val()+';';
|
||||
$style +='border-width:' +jQuery('[data-name="fa_rounded"]', $currFaFields).val()+';';
|
||||
jQuery('.fa-viewer',$currFa).html('<i class="'+jQuery('[data-name="fa_icon"]', $currFaFields).val()+'" style="border-radius: 50%;-moz-border-radius: 50%;-webkit-border-radius: 50%; border-style: solid; '+$style+'"></i>').css('padding',jQuery('[data-name="fa_padding"]',$currFaFields).val());
|
||||
});
|
||||
jQuery('[data-name="fa_icon"]',$currFaFields).trigger('input');
|
||||
//Font Awesome Modal
|
||||
jQuery('.remove-fa',$currFa).unbind('click').bind('click',function(e){e.preventDefault();
|
||||
jQuery('[data-name="fa_size"]', $currFaFields).val('');
|
||||
jQuery('[data-name="fa_padding"]', $currFaFields).val('');
|
||||
jQuery('[data-name="fa_color"]', $currFaFields).val('');
|
||||
jQuery('[data-name="fa_bg_color"]',$currFaFields).val('');
|
||||
jQuery('[data-name="fa_rounded"]', $currFaFields).val('');
|
||||
jQuery('[data-name="fa_icon"]', $currFaFields).val('').trigger('input');
|
||||
});
|
||||
//Font Awesome Modal
|
||||
jQuery('.show-fa-modal',$currFa).unbind('click').bind('click',function(e){e.preventDefault();
|
||||
var $currentButton=jQuery(this);
|
||||
if($currentButton.not('.loading')){
|
||||
$currentButton.addClass('loading');
|
||||
jQuery.ajax({
|
||||
type: "POST",
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
'action':'get_fontawesome'
|
||||
},
|
||||
success: function(response){
|
||||
if(jQuery(response).hasClass('fontawesome-ajax-data')){
|
||||
jQuery( '<div id="fontawesome_container_dialog" data-current="none" />').append(jQuery(response).html()).dialog({
|
||||
title: 'Font Awesome',
|
||||
resizable: true,
|
||||
width: 800,
|
||||
// height: 500,
|
||||
modal: true,
|
||||
open: function(){
|
||||
jQuery(this).closest('.ui-dialog').addClass('tw-pb-main-container');
|
||||
jQuery(this).closest('.ui-dialog').focus();
|
||||
pbModalSaveField($currFaFields,jQuery(this).find('.general-field-container').children('.field-item'));
|
||||
pbModalInitActions(jQuery(this));
|
||||
pbFaModalInitActions(jQuery(this));
|
||||
},
|
||||
close: function(){
|
||||
jQuery('#fontawesome_container_dialog').closest('.ui-dialog').remove();
|
||||
jQuery('body>#fontawesome_container_dialog').remove();
|
||||
},
|
||||
buttons: {
|
||||
"Insert": function() {
|
||||
pbModalSaveField(jQuery(this).find('.general-field-container').children('.field-item'),$currentButton.closest('.field-item').parent().children('.field-item'));
|
||||
$currentButton.closest('.field-item').parent().find('[data-name="fa_icon"]').trigger('input');
|
||||
jQuery(this).dialog("close");
|
||||
},
|
||||
"Cancel": function() {
|
||||
jQuery(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
$currentButton.removeClass('loading');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
//Upload Button Item
|
||||
jQuery('.field-item>.field-data>[data-type="button"]',$currentModal).each(function(){
|
||||
var $currentButton=jQuery(this);
|
||||
var $currentButtonSaveTo=$currentButton.attr('data-save-to');
|
||||
if($currentButtonSaveTo!==''){
|
||||
$currentButton.unbind('click').bind('click',function(){
|
||||
var $currentSaveField = $currentButton.closest('.field-item').siblings('.field-item').find('>.field-data>[data-name="'+$currentButtonSaveTo+'"]',$currentModal);
|
||||
window.original_send_to_editor = window.send_to_editor;
|
||||
window.custom_editor = true;
|
||||
window.send_to_editor = function(html){
|
||||
html = jQuery("<div />").html(html);
|
||||
$currentSaveField.val(jQuery(html).find('img').attr('src'));
|
||||
tb_remove();
|
||||
};
|
||||
tb_show('Upload', $homeURI+'/wp-admin/media-upload.php?post_ID=' + pID + '&type=image&TB_iframe=true',false);
|
||||
jQuery('#TB_overlay').css('z-index','9998');
|
||||
jQuery('#TB_window').css('z-index','9999');
|
||||
});
|
||||
}
|
||||
});
|
||||
//TextEditor Item
|
||||
jQuery('.field-item>.field-data>[data-tinymce="true"]',$currentModal).each(function(){
|
||||
var $currentEditor=jQuery(this);
|
||||
var $currentEditorName=$currentEditor.attr('data-name');
|
||||
pbModalContentEditor($currentEditorName,$currentEditor);
|
||||
$currentContentEditor=$currentEditorName;
|
||||
});
|
||||
//CheckBox Item
|
||||
jQuery('.field-item>.field-data>[data-type="checkbox"]',$currentModal).each(function(){
|
||||
var $currentCheck=jQuery(this);
|
||||
var $currentCheckText=$currentCheck.next('.checkbox-text');
|
||||
$currentCheckText.children('.checkbox-true').unbind('click').bind('click',function(){
|
||||
$currentCheck.attr("value",true).attr("checked",true).change();
|
||||
if($currentCheck.closest('.ui-dialog-content.ui-widget-content').hasClass('accordion')){
|
||||
$currentCheck.closest('.container-item').siblings('.container-item').find('.field-item>.field-data>[data-name="'+$currentCheck.attr('data-name')+'"]').next('.checkbox-text').children('.checkbox-false').click();
|
||||
}
|
||||
});
|
||||
$currentCheckText.children('.checkbox-false').unbind('click').bind('click',function(){
|
||||
$currentCheck.attr("value",false).attr("checked",false).change();
|
||||
});
|
||||
$currentCheck.unbind('change').bind('change',function(){
|
||||
var $checked=$currentCheck.is(':checked');
|
||||
var $styleON={
|
||||
color: '#333333',
|
||||
borderColor: '#bebebe',
|
||||
backgroundColor: '#fff'
|
||||
};
|
||||
var $styleOFF=$styleON;
|
||||
|
||||
if($checked){
|
||||
$currentCheckText.removeClass('checked-false').addClass('checked-true');
|
||||
$styleON={
|
||||
color: '#ffffff',
|
||||
borderColor: '#6395c0',
|
||||
backgroundColor: '#9ed5fe'
|
||||
};
|
||||
}else{
|
||||
$currentCheckText.removeClass('checked-true').addClass('checked-false');
|
||||
$styleOFF={
|
||||
color: '#ffffff',
|
||||
borderColor: '#8f8f8f',
|
||||
backgroundColor: '#a4a4a4'
|
||||
};
|
||||
}
|
||||
$currentCheckText.children('.checkbox-true') .animate($styleON, 300);
|
||||
$currentCheckText.children('.checkbox-false').animate($styleOFF,300);
|
||||
});
|
||||
$currentCheck.change();
|
||||
});
|
||||
//Select Item
|
||||
jQuery('.field-item>.field-data>select',$currentModal).each(function(){
|
||||
var $currentSelect=jQuery(this);
|
||||
var $currentSelectText=$currentSelect.next('.select-text');
|
||||
$currentSelectText.width(pbItemRL($currentSelect)+$currentSelect.width()-pbItemRL($currentSelectText));
|
||||
});
|
||||
jQuery('.field-item>.field-data>select',$currentModal).unbind('change').bind('change',function(){
|
||||
var $currentSelect=jQuery(this);
|
||||
var $currentVal=$currentSelect.val();
|
||||
var $currentSelectText=$currentSelect.next('.select-text');
|
||||
var $currentSelectOption=$currentSelect.find('option[value="'+$currentVal+'"]');
|
||||
var $currentHideArray= $currentSelectOption.attr('hide')?$currentSelectOption.attr('hide').split(','):[""];
|
||||
$currentSelectOption.attr('selected','selected').siblings().removeAttr('selected');
|
||||
if($currentHideArray[0]!==''){
|
||||
$currentSelect.closest('.field-item').parent().children('.field-item.hide-for-select').removeClass('hide-for-select').show();
|
||||
for(var i = 0, length=$currentHideArray.length ; i<length; i++){
|
||||
if($currentHideArray[i]==='fa'){
|
||||
$currentSelect.closest('.field-item').siblings('.field-item.type-fa').addClass('hide-for-select').hide();
|
||||
}else{
|
||||
$currentSelect.closest('.field-item').siblings('.field-item').find('>.field-data>[data-name="'+$currentHideArray[i]+'"]').closest('.field-item').addClass('hide-for-select').hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
$currentSelectText.text($currentSelectOption.text());
|
||||
if($currentSelect.attr('id')==='style_shortcode'&&$currentVal!=='none'){
|
||||
$currentSelect.children('option[value="none"]').attr('selected','selected').siblings().removeAttr('selected');
|
||||
twGetShortcode($currentVal);
|
||||
}
|
||||
});
|
||||
jQuery('.field-item>.field-data>select',$currentModal).change();
|
||||
//Color Picker Item
|
||||
jQuery('.field-item>.field-data>[data-type="color"]',$currentModal).each(function(){
|
||||
var $currentInput=jQuery(this);
|
||||
jQuery($currentInput.siblings(".color-info")).ColorPicker({
|
||||
onShow: function (colpkr) {
|
||||
jQuery(colpkr).find('.colorpicker_hex>input').val($currentInput.val().replace('#','')).change();
|
||||
jQuery(colpkr).fadeIn(500);
|
||||
return false;
|
||||
},
|
||||
onHide: function (colpkr) {
|
||||
jQuery(colpkr).fadeOut(500);
|
||||
return false;
|
||||
},
|
||||
onChange: function (hsb, hex, rgb, el) {
|
||||
$currentInput.siblings('.color-info').css('background-color','#' + hex);
|
||||
$currentInput.val('#' + hex).change().trigger('input');
|
||||
}
|
||||
});
|
||||
$currentInput.unbind('input change').bind('input change',function(){
|
||||
if(jQuery(this).val()===''){jQuery(this).val(' ');}
|
||||
$currentInput.siblings('.color-info').css('background-color',jQuery(this).val());
|
||||
});
|
||||
jQuery(this).change();
|
||||
});
|
||||
//Container Item
|
||||
jQuery('.field-item>.field-data>[data-type="container"]',$currentModal).each(function(){
|
||||
var $currentContainer = jQuery(this);
|
||||
jQuery('.field-item>.field-data>[data-name="'+$currentContainer.attr('data-add-button')+'"]',$currentModal).unbind('click').bind('click',function(e){e.preventDefault();
|
||||
var $currentButton=jQuery(this);
|
||||
var $newElement = $currentButton.next('.data').find('[data-type="container"]');
|
||||
if($currentContainer.attr('data-container-type')==='toggle'){
|
||||
$currentContainer.append($newElement.html());
|
||||
pbModalInitActions($currentModal);
|
||||
}else{
|
||||
window.original_send_to_editor = window.send_to_editor;
|
||||
window.custom_editor = true;
|
||||
window.send_to_editor = function(html){
|
||||
html = jQuery("<div />").html(html);
|
||||
jQuery(html).find('img').each(function(){
|
||||
$newElement.find('.image-src').attr('src',jQuery(this).attr('src'));
|
||||
$newElement.find('[data-name="'+$newElement.attr('data-title-as')+'"]').attr('value',jQuery(this).attr('src'));
|
||||
$currentContainer.append($newElement.html());
|
||||
}).promise().done(function(){
|
||||
tb_remove();
|
||||
pbModalInitActions($currentModal);
|
||||
});
|
||||
};
|
||||
tb_show('Upload', $homeURI+'/wp-admin/media-upload.php?post_ID=' + pID + '&type=image&TB_iframe=true',false);
|
||||
jQuery('#TB_overlay').css('z-index','9998');
|
||||
jQuery('#TB_window').css('z-index','9999');
|
||||
}
|
||||
});
|
||||
if($currentContainer.attr('data-container-type')==='toggle'){
|
||||
jQuery('.container-item>.content>.field-item>.field-data>[data-name="'+$currentContainer.attr('data-title-as')+'"]',$currentContainer).each(function(){
|
||||
var $currentChanger=jQuery(this);
|
||||
var $currentChangerType=$currentChanger.attr('data-type');
|
||||
if($currentChangerType==='select'){
|
||||
$currentChanger.bind('change',function(){
|
||||
$currentChanger.closest('.container-item').children('.list').children('.name').text($currentChanger.val());
|
||||
});
|
||||
$currentChanger.change();
|
||||
}else{
|
||||
$currentChanger.unbind('input').bind('input',function(e){e.preventDefault();
|
||||
$currentChanger.closest('.container-item').children('.list').children('.name').text($currentChanger.val());
|
||||
});
|
||||
$currentChanger.trigger('input');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
jQuery('.container-item>.list',$currentModal).unbind('click').bind('click',function(e){e.preventDefault();
|
||||
var $containerItem = jQuery(this).closest('.container-item');
|
||||
if($containerItem.closest('.container').attr('data-container-type')==='toggle'){
|
||||
if($containerItem.hasClass('expanded')){
|
||||
jQuery(this).next('.content').slideUp("normal", function(){$containerItem.removeClass('expanded');});
|
||||
}else{
|
||||
jQuery(this).next('.content').slideDown("normal", function(){$containerItem.addClass('expanded');});
|
||||
}
|
||||
}
|
||||
});
|
||||
jQuery('.container-item>.list>.actions>.action-delete',$currentModal).unbind('click').bind('click',function(e){e.preventDefault();
|
||||
jQuery(this).closest('.container-item').remove();
|
||||
});
|
||||
jQuery('.container-item>.list>.actions>.action-duplicate',$currentModal).unbind('click').bind('click',function(e){e.preventDefault();
|
||||
var $parent = jQuery(this).closest('.container-item');
|
||||
|
||||
var $newItem = $parent.clone().addClass('hidded').css('display','none');
|
||||
$parent.after($newItem).promise().done(function(){
|
||||
$newItem.removeClass('hidded').fadeIn('slow').promise().done(function(){
|
||||
pbModalInitActions($currentModal);
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
jQuery('.field-item>.field-data>[data-type="container"]',$currentModal).sortable({placeholder: 'container-item placeholding'});
|
||||
//Category Item
|
||||
function catReseter($currentCategorySelector, $currentSaveTo){
|
||||
var $currentCategoryList = $currentCategorySelector.siblings('.category-list-container');
|
||||
var $currentSaveToArray=$currentSaveTo.val().split(',');
|
||||
$currentCategorySelector.find('option').show();
|
||||
$currentCategoryList.html('');
|
||||
for (var i = 0, length=$currentSaveToArray.length ; i<length; i++){
|
||||
if($currentSaveToArray[i]!==''){
|
||||
$currentCategoryList.append('<div class="category-list-item clearfix" data-value="'+$currentSaveToArray[i]+'"><div class="name">'+$currentCategorySelector.find('option[value="'+$currentSaveToArray[i]+'"]').hide().text()+'</div><div class="actions"><a href="#" class="action-delete">X</a></div></div>');
|
||||
}
|
||||
}
|
||||
$currentCategoryList.find(".category-list-item .action-delete").unbind('click').bind('click',function(){
|
||||
var $oldArray=$currentSaveTo.val().split(',');
|
||||
var $newArray=[];
|
||||
var $delValue=jQuery(this).closest(".category-list-item").attr('data-value');
|
||||
jQuery(this).closest(".category-list-item").remove();
|
||||
for (var i = 0, length=$oldArray.length ; i<length; i++){
|
||||
if($oldArray[i]!==$delValue && $oldArray[i]!==''){
|
||||
$newArray.push($oldArray[i]);
|
||||
}
|
||||
}
|
||||
$currentSaveTo.val($newArray.join(','));
|
||||
catReseter($currentCategorySelector, $currentSaveTo)
|
||||
});
|
||||
}
|
||||
jQuery('.field-item>.field-data>[data-type="category"]',$currentModal).each(function(){
|
||||
var $currentCategorySelector = jQuery(this);
|
||||
var $currentCategoryList = $currentCategorySelector.siblings('.category-list-container');
|
||||
var $currentSaveTo = jQuery('.field-item>.field-data>[data-selector="'+$currentCategorySelector.attr('data-name')+'"]',$currentModal);
|
||||
$currentCategorySelector.change(function(){
|
||||
var $val = $currentCategorySelector.val();
|
||||
var $noProblem = true;
|
||||
$currentCategoryList.children(".category-list-item").each(function(){
|
||||
if(jQuery(this).attr('data-value') == $val) {
|
||||
$noProblem = false;
|
||||
}
|
||||
});
|
||||
if($val == 0 || $val == '0'){
|
||||
return false;
|
||||
}else{
|
||||
$currentCategorySelector.children('option[value="0"]').attr('selected','selected').siblings().removeAttr('selected');
|
||||
$currentCategorySelector.change();
|
||||
if($noProblem){
|
||||
var $currentSaveToArray = $currentSaveTo.val().split(',');
|
||||
if($currentSaveToArray.indexOf($val)<0){
|
||||
if($currentSaveToArray[0]===''){
|
||||
$currentSaveToArray[0]=$val;
|
||||
}else{
|
||||
$currentSaveToArray.push($val);
|
||||
}
|
||||
$currentSaveTo.val($currentSaveToArray.join(','));
|
||||
}
|
||||
catReseter($currentCategorySelector,$currentSaveTo);
|
||||
}
|
||||
}
|
||||
});
|
||||
catReseter($currentCategorySelector,$currentSaveTo);
|
||||
});
|
||||
jQuery('textarea',$currentModal).each(function(){
|
||||
var $currTextArea=jQuery(this);
|
||||
$currTextArea.unbind('input').bind('input',function(){$currTextArea.html($currTextArea.val());});
|
||||
});
|
||||
}
|
||||
function pbFaModalInitActions($currentFaModal){
|
||||
jQuery('ul.unstyled>li',$currentFaModal).unbind('click').bind('click',function(e){e.preventDefault();
|
||||
var $iconClass=jQuery(this).children('span').not('.muted');
|
||||
|
||||
jQuery('[data-name="fa_icon"]',$currentFaModal).val($iconClass.text().replace(' ','')).trigger('input');
|
||||
});
|
||||
jQuery('[data-name="fa_size"],[data-name="fa_padding"],[data-name="fa_color"],[data-name="fa_bg_color"],[data-name="fa_rounded"]',$currentFaModal).unbind('input').bind('input',function(){
|
||||
jQuery('[data-name="fa_icon"]',$currentFaModal).trigger('input');
|
||||
});
|
||||
}
|
||||
function pbModalSaveField($from,$to){
|
||||
$from.each(function(){
|
||||
var $currentField = jQuery(this).children('.field-data').children('.field');
|
||||
var $currentFieldSlug = $currentField.attr('data-name');
|
||||
var $currentFieldType = $currentField.attr('data-type');
|
||||
var $currentFieldAddButton= $currentField.attr('data-add-button');
|
||||
var $currentFieldValue = $currentField.val();
|
||||
switch($currentFieldType){
|
||||
case 'select':{
|
||||
jQuery('>.field-data>.field[data-name="'+$currentFieldSlug+'"] option[value="'+$currentFieldValue+'"]',$to).attr('selected','selected').siblings().removeAttr('selected');
|
||||
break;
|
||||
}
|
||||
case 'textArea':{
|
||||
if($currentField.attr('data-tinyMCE')==='true'){
|
||||
tinyMCE.execCommand('mceAddControl', false, $currentContentEditor);
|
||||
jQuery('>.field-data>.field[data-name="'+$currentFieldSlug+'"]',$to).html(tinyMCE.get($currentContentEditor).getContent());
|
||||
}else{
|
||||
jQuery('>.field-data>.field[data-name="'+$currentFieldSlug+'"]',$to).html($currentFieldValue);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'container':{
|
||||
var $newContainer = jQuery('>.field-data>.field[data-name="'+$currentFieldSlug+'"]',$to);
|
||||
var $template=jQuery('>.field-data>.field[data-name="'+$currentFieldAddButton+'"]',$from).next('.data').children('.field-item').children('.field-data').children('.field').html();
|
||||
$template = jQuery('<div/>').append($template);
|
||||
$newContainer.html('');
|
||||
$currentField.children('.container-item').each(function(){
|
||||
jQuery(this).find('>.content>.field-item>.field-data>.field').each(function(){
|
||||
var $cField = jQuery(this);
|
||||
var $cFieldSlug = $cField.attr('data-name');
|
||||
var $cFieldType = $cField.attr('data-type');
|
||||
var $cFieldValue = $cField.val();
|
||||
switch($cFieldType){
|
||||
case 'select':{
|
||||
jQuery('.field[data-name="'+$cFieldSlug+'"] option[value="'+$cFieldValue+'"]',$template).attr('selected','selected').siblings().removeAttr('selected');
|
||||
break;
|
||||
}
|
||||
case 'textArea':{
|
||||
jQuery('.field[data-name="'+$cFieldSlug+'"]',$template).html($cFieldValue);
|
||||
break;
|
||||
}
|
||||
case 'checkbox':{
|
||||
jQuery('.field[data-name="'+$cFieldSlug+'"]',$template).attr("value",$cField.is(':checked')).attr("checked",$cField.is(':checked'));
|
||||
break;
|
||||
}
|
||||
default:{
|
||||
jQuery('.field[data-name="'+$cFieldSlug+'"]',$template).attr("value",$cFieldValue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
$newContainer.append($template.html());
|
||||
});
|
||||
break;
|
||||
}
|
||||
case 'checkbox':{
|
||||
jQuery('>.field-data>.field[data-name="'+$currentFieldSlug+'"]',$to).attr("value",$currentField.is(':checked')).attr("checked",$currentField.is(':checked'));
|
||||
break;
|
||||
}
|
||||
default:{
|
||||
jQuery('>.field-data>.field[data-name="'+$currentFieldSlug+'"]',$to).attr("value",$currentFieldValue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function pbModalSave($item){
|
||||
var $saveTo = jQuery('.item.item-modalled');
|
||||
$saveTo.removeClass('item-modalled');
|
||||
pbModalSaveField($item.find('.general-field-container').children('.field-item'),$saveTo.find('.general-field-container').children('.field-item'));
|
||||
pbModalSaveField($item.find('.custom-field-container') .children('.field-item'),$saveTo.find('.custom-field-container') .children('.field-item'));
|
||||
}
|
||||
/* Item Right Left Width */
|
||||
/* ------------------------------------------------------------------- */
|
||||
function pbItemRL($item){
|
||||
$item=jQuery($item);
|
||||
var $itemMarginRL = parseInt($item.css('margin-left') .replace('px','')) + parseInt($item.css('margin-right').replace('px',''));
|
||||
var $itemPaddingRL = parseInt($item.css('padding-left').replace('px','')) + parseInt($item.css('padding-right').replace('px',''));
|
||||
var $itemBorderRL = parseInt($item.css('border-left-width').replace('px','')) + parseInt($item.css('border-right-width').replace('px',''));
|
||||
var $itemRL = $itemMarginRL+$itemPaddingRL+$itemBorderRL;
|
||||
return $itemRL;
|
||||
}
|
||||
/* Content Editor */
|
||||
function pbModalContentEditor($id,$currentEditor){
|
||||
var $language = jQuery('html').attr('lang');
|
||||
var $currentField = $currentEditor.closest('.field-data');
|
||||
$language = $language.substr(0,$language.indexOf('-'));
|
||||
var $wpFullscreenContentCSS=$homeURI+"/wp-includes/js/tinymce/plugins/wpfullscreen/css/wp-fullscreen.css";
|
||||
var $newEditorDiv= jQuery('<div />').append($currentEditor.clone().attr('id',$id));
|
||||
$currentEditor.hide().closest('.field-data').append(
|
||||
'<div id="wp-content-editor-tools" class="wp-editor-tools tw-editor-menu hide-if-no-js">'+
|
||||
'<a id="content-tmce" class="change-to-html wp-switch-editor switch-html" onclick="switchEditors.switchto(this);">Text</a>'+
|
||||
'<a id="content-html" class="change-to-visual disabled wp-switch-editor switch-tmce" onclick="switchEditors.switchto(this);">Visual</a>'+
|
||||
'</div>'+
|
||||
'<div id="wp-content-editor-container" class="tw-editor-content">'+
|
||||
$newEditorDiv.html()+
|
||||
'</div>'
|
||||
).promise().done(function(){
|
||||
tinyMCE.init({
|
||||
mode:"exact",
|
||||
width:"100%",
|
||||
theme:"advanced",
|
||||
skin:"wp_theme",
|
||||
language:$language,
|
||||
theme_advanced_toolbar_location:"top",
|
||||
theme_advanced_toolbar_align:"left",
|
||||
theme_advanced_statusbar_location:"bottom",
|
||||
theme_advanced_resizing:true,
|
||||
theme_advanced_resize_horizontal:false,
|
||||
dialog_type:"modal",
|
||||
formats:{
|
||||
alignleft:[{
|
||||
selector:'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li',
|
||||
styles:{
|
||||
textAlign:'left'
|
||||
}
|
||||
},{
|
||||
selector:'img,table',
|
||||
classes:'alignleft'
|
||||
}],
|
||||
aligncenter:[{
|
||||
selector:'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li',
|
||||
styles:{
|
||||
textAlign:'center'
|
||||
}
|
||||
},{
|
||||
selector:'img,table',
|
||||
classes:'aligncenter'
|
||||
}],
|
||||
alignright:[{
|
||||
selector:'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li',
|
||||
styles:{
|
||||
textAlign:'right'
|
||||
}
|
||||
},{
|
||||
selector:'img,table',
|
||||
classes:'alignright'
|
||||
}],
|
||||
strikethrough:{
|
||||
inline:'del'
|
||||
}
|
||||
},
|
||||
relative_urls:false,
|
||||
remove_script_host:false,
|
||||
convert_urls:false,
|
||||
remove_linebreaks:true,
|
||||
fix_list_elements:true,
|
||||
keep_styles:false,
|
||||
entities:"38,amp,60,lt,62,gt",
|
||||
accessibility_focus:true,
|
||||
media_strict:false,
|
||||
paste_remove_styles:true,
|
||||
paste_remove_spans:true,
|
||||
paste_strip_class_attributes:"all",
|
||||
paste_text_use_dialog:true,
|
||||
webkit_fake_resize:false,
|
||||
schema:"html5",
|
||||
wpeditimage_disable_captions:false,
|
||||
wp_fullscreen_content_css:$wpFullscreenContentCSS,
|
||||
// plugins:"inlinepopups,spellchecker,tabfocus,paste,media,wordpress,wpeditimage,wpgallery,wplink,wpdialogs,-twshortcodegenerator",
|
||||
plugins:"inlinepopups,tabfocus,paste,media,wpeditimage,wpgallery,wplink,wpdialogs,-twshortcodegenerator",
|
||||
elements:$id,
|
||||
wpautop:true,
|
||||
apply_source_formatting:false,
|
||||
theme_advanced_buttons1:"bold,italic,strikethrough,bullist,numlist,blockquote,justifyleft,justifycenter,justifyright,link,unlink,wp_more,wp_fullscreen,wp_adv,|,twshortcodegenerator",
|
||||
theme_advanced_buttons2:"formatselect,underline,justifyfull,forecolor,pastetext,pasteword,removeformat,charmap,outdent,indent,undo,redo,wp_help",
|
||||
theme_advanced_buttons3:"",
|
||||
theme_advanced_buttons4:"",
|
||||
tabfocus_elements:"sample-permalink,post-preview",
|
||||
body_class:"content post-type-page",
|
||||
theme_advanced_resizing_use_cookie:false
|
||||
});
|
||||
jQuery('a.change-to-html',$currentField).unbind('click').bind('click',function() {
|
||||
jQuery(this).addClass('disabled').siblings('a').removeClass('disabled');
|
||||
tinyMCE.execCommand('mceRemoveControl', false, $id);
|
||||
});
|
||||
jQuery('a.change-to-visual',$currentField).unbind('click').bind('click',function() {
|
||||
jQuery(this).addClass('disabled').siblings('a').removeClass('disabled');
|
||||
tinyMCE.execCommand('mceAddControl', false, $id);
|
||||
});
|
||||
});
|
||||
}
|
||||
function twInitSourceDatas($from){
|
||||
jQuery('#pagebuilder-area>div').each(function(i){
|
||||
jQuery(this).html($from.eq(i).html());
|
||||
});
|
||||
}
|
||||
function twSortDragg(){
|
||||
//Sortables
|
||||
jQuery("#pagebuilder-area>div").sortable({
|
||||
placeholder: 'item placeholding',
|
||||
connectWith: "#pagebuilder-area>div",
|
||||
// helper:'original',
|
||||
revert: true,
|
||||
update: function(event, ui){
|
||||
pbSaveData();
|
||||
pbInitEvents();
|
||||
},
|
||||
start: function(event, ui) {
|
||||
var plus;
|
||||
if(ui.item.hasClass('size-1-4')) plus = 'size-1-4';
|
||||
else if(ui.item.hasClass('size-1-3')) plus = 'size-1-3';
|
||||
else if(ui.item.hasClass('size-1-2')) plus = 'size-1-2';
|
||||
else if(ui.item.hasClass('size-2-3')) plus = 'size-2-3';
|
||||
else if(ui.item.hasClass('size-3-4')) plus = 'size-3-4';
|
||||
else if(ui.item.hasClass('size-1-1')) plus = 'size-1-1';
|
||||
else plus = 'size-1-3';
|
||||
ui.placeholder.addClass(plus);
|
||||
}
|
||||
});
|
||||
// Draggable
|
||||
try{
|
||||
jQuery('#pagebuilder-elements-container>.item').draggable({
|
||||
connectToSortable: '#pagebuilder-area>div',
|
||||
helper: 'clone',
|
||||
revert: "invalid"
|
||||
});
|
||||
}catch(err){}
|
||||
}
|
||||
89
wp-content/themes/nuzi/framework/assets/js/post-format.js
Normal file
@@ -0,0 +1,89 @@
|
||||
function showHidePostFormatField(){
|
||||
selectedFrmt=(''+jQuery('#post-formats-select input:radio:checked').val());
|
||||
jQuery('#themewaves_custom_post_format > div').each(function(){
|
||||
if(jQuery(this).hasClass('themewaves_format_'+jQuery('#post-formats-select input:radio:checked').val())){
|
||||
jQuery(this).show('fast');
|
||||
}else{
|
||||
jQuery(this).hide('fast');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
jQuery(document).ready(function(){
|
||||
// active tab
|
||||
showHidePostFormatField();
|
||||
jQuery('#post-formats-select input:radio').change(showHidePostFormatField);
|
||||
|
||||
|
||||
jQuery(".gallery-images").sortable({
|
||||
update: function(event, ui){
|
||||
var newimages = '';
|
||||
jQuery('.gallery-images img').each(function(){
|
||||
newimages += jQuery(this).attr('src')+'""';
|
||||
});
|
||||
jQuery("input#gallery_images").val(newimages);
|
||||
}
|
||||
});
|
||||
deleteGalleryImage();
|
||||
|
||||
});
|
||||
|
||||
function deleteGalleryImage() {
|
||||
var elementId = '.gallery-images';
|
||||
var elementVal = '#gallery_images';
|
||||
jQuery('.gallery-delete').unbind('click').bind('click',function(){
|
||||
var newimages = '';
|
||||
jQuery(this).closest('.gallery-block').fadeOut('slow',function(){
|
||||
jQuery(this).remove();
|
||||
jQuery(elementId+' img').each(function(){
|
||||
newimages += jQuery(this).attr('src')+'""';
|
||||
});
|
||||
jQuery("input"+elementVal).val(newimages);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function browseAudio(id){
|
||||
var elementIdd = id;
|
||||
window.original_send_to_editor = window.send_to_editor;
|
||||
window.custom_editor = true;
|
||||
window.send_to_editor = function(html){
|
||||
if (elementIdd != undefined) {
|
||||
var $audio = jQuery(html).attr('href');
|
||||
jQuery('input[name="'+elementIdd+'"]').val($audio);
|
||||
return;
|
||||
} else {
|
||||
window.original_send_to_editor(html);
|
||||
}
|
||||
elementIdd = undefined;
|
||||
};
|
||||
wp.media.editor.open();
|
||||
}
|
||||
|
||||
function browseMediaGallery(post_id){
|
||||
var elementId = '.gallery-images';
|
||||
var elementVal = '#gallery_images';
|
||||
var pID=post_id;
|
||||
window.original_send_to_editor = window.send_to_editor;
|
||||
window.custom_editor = true;
|
||||
window.send_to_editor = function(html){
|
||||
jQuery(elementVal).parent().find('img').fadeIn();
|
||||
if (elementId != undefined) {
|
||||
html = jQuery("<div />").html(html);
|
||||
jQuery(html).find('img').each(function(){
|
||||
var imgurl = jQuery(this).attr('src');
|
||||
var images = imgurl+'""'+jQuery(elementVal).val();
|
||||
jQuery(elementVal).val(images);
|
||||
jQuery(elementId).prepend('<div class="gallery-block" style="position: relative;"><img src="'+imgurl+'" height="100"/><div class="gallery-delete" style="position: absolute;cursor: pointer;top: 0px;width: 15px;height: 15px;background: red;"></div></div>');
|
||||
deleteGalleryImage();
|
||||
}).promise().done( function(){ jQuery(elementVal).parent().find('img').fadeOut(); } );
|
||||
} else {
|
||||
window.original_send_to_editor(html);
|
||||
}
|
||||
elementId = undefined;
|
||||
};
|
||||
wp.media.editor.open();
|
||||
}
|
||||
|
||||
window.original_send_to_editor = window.send_to_editor;
|
||||
window.custom_editor = true;
|
||||
139
wp-content/themes/nuzi/framework/breadcrumbs.php
Normal file
@@ -0,0 +1,139 @@
|
||||
<?php
|
||||
/*
|
||||
|
||||
Source: http://dimox.net/wordpress-breadcrumbs-without-a-plugin/
|
||||
|
||||
*/
|
||||
|
||||
if (!function_exists('breadcrumbs')) {
|
||||
function breadcrumbs() {
|
||||
|
||||
/* === OPTIONS === */
|
||||
$text['location'] = __('', 'themewaves'); // text for the 'Home' link
|
||||
$text['home'] = __('Home', 'themewaves'); // text for the 'Home' link
|
||||
$text['category'] = __('Archive by Category "%s"', 'themewaves'); // text for a category page
|
||||
$text['search'] = __('Search Results for "%s" query', 'themewaves'); // text for a search results page
|
||||
$text['tag'] = __('Posts Tagged "%s"', 'themewaves'); // text for a tag page
|
||||
$text['author'] = __('Articles Posted by %s', 'themewaves'); // text for an author page
|
||||
$text['404'] = __('Error 404', 'themewaves'); // text for the 404 page
|
||||
|
||||
$showCurrent = 1; // 1 - show current post/page title in breadcrumbs, 0 - don't show
|
||||
$showOnHome = 1; // 1 - show breadcrumbs on the homepage, 0 - don't show
|
||||
$delimiter = '/'; // delimiter between crumbs
|
||||
$before = '<span class="current">'; // tag before the current crumb
|
||||
$after = '</span>'; // tag after the current crumb
|
||||
/* === END OF OPTIONS === */
|
||||
|
||||
global $post;
|
||||
$homeLink = home_url() . '/';
|
||||
$linkBefore = '<span>';
|
||||
$linkAfter = '</span>';
|
||||
$linkAttr = '';
|
||||
$link = $linkBefore . '<a' . $linkAttr . ' href="%1$s">%2$s</a>' . $linkAfter;
|
||||
|
||||
|
||||
echo '<div id="crumbs" class="tw-breadcrumb pull-right">'.$text['location'];
|
||||
|
||||
if (is_home() || is_front_page()) {
|
||||
|
||||
if ($showOnHome == 1) echo '<span><a href="' . $homeLink . '">' . $text['home'] . '</a></span>';
|
||||
|
||||
} else {
|
||||
|
||||
echo sprintf($link, $homeLink, $text['home']) . $delimiter;
|
||||
|
||||
if ( is_category() ) {
|
||||
$thisCat = get_category(get_query_var('cat'), false);
|
||||
if ($thisCat->parent != 0) {
|
||||
$cats = get_category_parents($thisCat->parent, TRUE, $delimiter);
|
||||
$cats = str_replace('<a', $linkBefore . '<a' . $linkAttr, $cats);
|
||||
$cats = str_replace('</a>', '</a>' . $linkAfter, $cats);
|
||||
echo $cats;
|
||||
}
|
||||
echo $before . sprintf($text['category'], single_cat_title('', false)) . $after;
|
||||
|
||||
} elseif ( is_search() ) {
|
||||
echo $before . sprintf($text['search'], get_search_query()) . $after;
|
||||
|
||||
} elseif ( is_day() ) {
|
||||
echo sprintf($link, get_year_link(get_the_time('Y')), get_the_time('Y')) . $delimiter;
|
||||
echo sprintf($link, get_month_link(get_the_time('Y'),get_the_time('m')), get_the_time('F')) . $delimiter;
|
||||
echo $before . get_the_time('d') . $after;
|
||||
|
||||
} elseif ( is_month() ) {
|
||||
echo sprintf($link, get_year_link(get_the_time('Y')), get_the_time('Y')) . $delimiter;
|
||||
echo $before . get_the_time('F') . $after;
|
||||
|
||||
} elseif ( is_year() ) {
|
||||
echo $before . get_the_time('Y') . $after;
|
||||
|
||||
} elseif ( is_single() && !is_attachment() ) {
|
||||
if ( get_post_type() != 'post' ) {
|
||||
$post_type = get_post_type_object(get_post_type());
|
||||
$slug = $post_type->rewrite;
|
||||
printf($link, $homeLink . '/' . $slug['slug'] . '/', $post_type->labels->singular_name);
|
||||
if ($showCurrent == 1) echo $delimiter . $before . get_the_title() . $after;
|
||||
} else {
|
||||
$cat = get_the_category(); $cat = $cat[0];
|
||||
$cats = get_category_parents($cat, TRUE, $delimiter);
|
||||
if ($showCurrent == 0) $cats = preg_replace("#^(.+)$delimiter$#", "$1", $cats);
|
||||
$cats = str_replace('<a', $linkBefore . '<a' . $linkAttr, $cats);
|
||||
$cats = str_replace('</a>', '</a>' . $linkAfter, $cats);
|
||||
echo $cats;
|
||||
if ($showCurrent == 1) echo $before . get_the_title() . $after;
|
||||
}
|
||||
|
||||
} elseif ( !is_single() && !is_page() && get_post_type() != 'post' && !is_404() ) {
|
||||
$post_type = get_post_type_object(get_post_type());
|
||||
echo $before . $post_type->labels->singular_name . $after;
|
||||
|
||||
} elseif ( is_attachment() ) {
|
||||
$parent = get_post($post->post_parent);
|
||||
$cat = get_the_category($parent->ID); $cat = $cat[0];
|
||||
$cats = get_category_parents($cat, TRUE, $delimiter);
|
||||
$cats = str_replace('<a', $linkBefore . '<a' . $linkAttr, $cats);
|
||||
$cats = str_replace('</a>', '</a>' . $linkAfter, $cats);
|
||||
echo $cats;
|
||||
printf($link, get_permalink($parent), $parent->post_title);
|
||||
if ($showCurrent == 1) echo $delimiter . $before . get_the_title() . $after;
|
||||
|
||||
} elseif ( is_page() && !$post->post_parent ) {
|
||||
if ($showCurrent == 1) echo $before . get_the_title() . $after;
|
||||
|
||||
} elseif ( is_page() && $post->post_parent ) {
|
||||
$parent_id = $post->post_parent;
|
||||
$breadcrumbs = array();
|
||||
while ($parent_id) {
|
||||
$page = get_page($parent_id);
|
||||
$breadcrumbs[] = sprintf($link, get_permalink($page->ID), get_the_title($page->ID));
|
||||
$parent_id = $page->post_parent;
|
||||
}
|
||||
$breadcrumbs = array_reverse($breadcrumbs);
|
||||
for ($i = 0; $i < count($breadcrumbs); $i++) {
|
||||
echo $breadcrumbs[$i];
|
||||
if ($i != count($breadcrumbs)-1) echo $delimiter;
|
||||
}
|
||||
if ($showCurrent == 1) echo $delimiter . $before . get_the_title() . $after;
|
||||
|
||||
} elseif ( is_tag() ) {
|
||||
echo $before . sprintf($text['tag'], single_tag_title('', false)) . $after;
|
||||
|
||||
} elseif ( is_author() ) {
|
||||
global $tw_author;
|
||||
$userdata = get_userdata($tw_author);
|
||||
echo $before . sprintf($text['author'], $userdata->display_name) . $after;
|
||||
|
||||
} elseif ( is_404() ) {
|
||||
echo $before . $text['404'] . $after;
|
||||
}
|
||||
|
||||
if ( get_query_var('paged') ) {
|
||||
if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ' (';
|
||||
echo __('Page', 'themewaves') . ' ' . get_query_var('paged');
|
||||
if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ')';
|
||||
}
|
||||
|
||||
}
|
||||
echo '</div>';
|
||||
} // end breadcrumbs()
|
||||
} ?>
|
||||
653
wp-content/themes/nuzi/framework/googlefonts.php
Normal file
@@ -0,0 +1,653 @@
|
||||
<?php
|
||||
global $tw_googlefonts;
|
||||
$tw_googlefonts = array(
|
||||
"ABeeZee" => "ABeeZee",
|
||||
"Abel" => "Abel",
|
||||
"Abril Fatface" => "Abril Fatface",
|
||||
"Aclonica" => "Aclonica",
|
||||
"Acme" => "Acme",
|
||||
"Actor" => "Actor",
|
||||
"Adamina" => "Adamina",
|
||||
"Advent Pro" => "Advent Pro",
|
||||
"Aguafina Script" => "Aguafina Script",
|
||||
"Akronim" => "Akronim",
|
||||
"Aladin" => "Aladin",
|
||||
"Aldrich" => "Aldrich",
|
||||
"Alegreya" => "Alegreya",
|
||||
"Alegreya SC" => "Alegreya SC",
|
||||
"Alex Brush" => "Alex Brush",
|
||||
"Alfa Slab One" => "Alfa Slab One",
|
||||
"Alice" => "Alice",
|
||||
"Alike" => "Alike",
|
||||
"Alike Angular" => "Alike Angular",
|
||||
"Allan" => "Allan",
|
||||
"Allerta" => "Allerta",
|
||||
"Allerta Stencil" => "Allerta Stencil",
|
||||
"Allura" => "Allura",
|
||||
"Almendra" => "Almendra",
|
||||
"Almendra Display" => "Almendra Display",
|
||||
"Almendra SC" => "Almendra SC",
|
||||
"Amarante" => "Amarante",
|
||||
"Amaranth" => "Amaranth",
|
||||
"Amatic SC" => "Amatic SC",
|
||||
"Amethysta" => "Amethysta",
|
||||
"Anaheim" => "Anaheim",
|
||||
"Andada" => "Andada",
|
||||
"Andika" => "Andika",
|
||||
"Angkor" => "Angkor",
|
||||
"Annie Use Your Telescope" => "Annie Use Your Telescope",
|
||||
"Anonymous Pro" => "Anonymous Pro",
|
||||
"Antic" => "Antic",
|
||||
"Antic Didone" => "Antic Didone",
|
||||
"Antic Slab" => "Antic Slab",
|
||||
"Anton" => "Anton",
|
||||
"Arapey" => "Arapey",
|
||||
"Arbutus" => "Arbutus",
|
||||
"Arbutus Slab" => "Arbutus Slab",
|
||||
"Architects Daughter" => "Architects Daughter",
|
||||
"Archivo Black" => "Archivo Black",
|
||||
"Archivo Narrow" => "Archivo Narrow",
|
||||
"Arimo" => "Arimo",
|
||||
"Arizonia" => "Arizonia",
|
||||
"Armata" => "Armata",
|
||||
"Artifika" => "Artifika",
|
||||
"Arvo" => "Arvo",
|
||||
"Asap" => "Asap",
|
||||
"Asset" => "Asset",
|
||||
"Astloch" => "Astloch",
|
||||
"Asul" => "Asul",
|
||||
"Atomic Age" => "Atomic Age",
|
||||
"Aubrey" => "Aubrey",
|
||||
"Audiowide" => "Audiowide",
|
||||
"Autour One" => "Autour One",
|
||||
"Average" => "Average",
|
||||
"Average Sans" => "Average Sans",
|
||||
"Averia Gruesa Libre" => "Averia Gruesa Libre",
|
||||
"Averia Libre" => "Averia Libre",
|
||||
"Averia Sans Libre" => "Averia Sans Libre",
|
||||
"Averia Serif Libre" => "Averia Serif Libre",
|
||||
"Bad Script" => "Bad Script",
|
||||
"Balthazar" => "Balthazar",
|
||||
"Bangers" => "Bangers",
|
||||
"Basic" => "Basic",
|
||||
"Battambang" => "Battambang",
|
||||
"Baumans" => "Baumans",
|
||||
"Bayon" => "Bayon",
|
||||
"Belgrano" => "Belgrano",
|
||||
"Belleza" => "Belleza",
|
||||
"BenchNine" => "BenchNine",
|
||||
"Bentham" => "Bentham",
|
||||
"Berkshire Swash" => "Berkshire Swash",
|
||||
"Bevan" => "Bevan",
|
||||
"Bigelow Rules" => "Bigelow Rules",
|
||||
"Bigshot One" => "Bigshot One",
|
||||
"Bilbo" => "Bilbo",
|
||||
"Bilbo Swash Caps" => "Bilbo Swash Caps",
|
||||
"Bitter" => "Bitter",
|
||||
"Black Ops One" => "Black Ops One",
|
||||
"Bokor" => "Bokor",
|
||||
"Bonbon" => "Bonbon",
|
||||
"Boogaloo" => "Boogaloo",
|
||||
"Bowlby One" => "Bowlby One",
|
||||
"Bowlby One SC" => "Bowlby One SC",
|
||||
"Brawler" => "Brawler",
|
||||
"Bree Serif" => "Bree Serif",
|
||||
"Bubblegum Sans" => "Bubblegum Sans",
|
||||
"Bubbler One" => "Bubbler One",
|
||||
"Buda" => "Buda",
|
||||
"Buenard" => "Buenard",
|
||||
"Butcherman" => "Butcherman",
|
||||
"Butterfly Kids" => "Butterfly Kids",
|
||||
"Cabin" => "Cabin",
|
||||
"Cabin Condensed" => "Cabin Condensed",
|
||||
"Cabin Sketch" => "Cabin Sketch",
|
||||
"Caesar Dressing" => "Caesar Dressing",
|
||||
"Cagliostro" => "Cagliostro",
|
||||
"Calligraffitti" => "Calligraffitti",
|
||||
"Cambo" => "Cambo",
|
||||
"Candal" => "Candal",
|
||||
"Cantarell" => "Cantarell",
|
||||
"Cantata One" => "Cantata One",
|
||||
"Cantora One" => "Cantora One",
|
||||
"Capriola" => "Capriola",
|
||||
"Cardo" => "Cardo",
|
||||
"Carme" => "Carme",
|
||||
"Carrois Gothic" => "Carrois Gothic",
|
||||
"Carrois Gothic SC" => "Carrois Gothic SC",
|
||||
"Carter One" => "Carter One",
|
||||
"Caudex" => "Caudex",
|
||||
"Cedarville Cursive" => "Cedarville Cursive",
|
||||
"Ceviche One" => "Ceviche One",
|
||||
"Changa One" => "Changa One",
|
||||
"Chango" => "Chango",
|
||||
"Chau Philomene One" => "Chau Philomene One",
|
||||
"Chela One" => "Chela One",
|
||||
"Chelsea Market" => "Chelsea Market",
|
||||
"Chenla" => "Chenla",
|
||||
"Cherry Cream Soda" => "Cherry Cream Soda",
|
||||
"Cherry Swash" => "Cherry Swash",
|
||||
"Chewy" => "Chewy",
|
||||
"Chicle" => "Chicle",
|
||||
"Chivo" => "Chivo",
|
||||
"Cinzel" => "Cinzel",
|
||||
"Cinzel Decorative" => "Cinzel Decorative",
|
||||
"Clicker Script" => "Clicker Script",
|
||||
"Coda" => "Coda",
|
||||
"Coda Caption" => "Coda Caption",
|
||||
"Codystar" => "Codystar",
|
||||
"Combo" => "Combo",
|
||||
"Comfortaa" => "Comfortaa",
|
||||
"Coming Soon" => "Coming Soon",
|
||||
"Concert One" => "Concert One",
|
||||
"Condiment" => "Condiment",
|
||||
"Content" => "Content",
|
||||
"Contrail One" => "Contrail One",
|
||||
"Convergence" => "Convergence",
|
||||
"Cookie" => "Cookie",
|
||||
"Copse" => "Copse",
|
||||
"Corben" => "Corben",
|
||||
"Courgette" => "Courgette",
|
||||
"Cousine" => "Cousine",
|
||||
"Coustard" => "Coustard",
|
||||
"Covered By Your Grace" => "Covered By Your Grace",
|
||||
"Crafty Girls" => "Crafty Girls",
|
||||
"Creepster" => "Creepster",
|
||||
"Crete Round" => "Crete Round",
|
||||
"Crimson Text" => "Crimson Text",
|
||||
"Croissant One" => "Croissant One",
|
||||
"Crushed" => "Crushed",
|
||||
"Cuprum" => "Cuprum",
|
||||
"Cutive" => "Cutive",
|
||||
"Cutive Mono" => "Cutive Mono",
|
||||
"Damion" => "Damion",
|
||||
"Dancing Script" => "Dancing Script",
|
||||
"Dangrek" => "Dangrek",
|
||||
"Dawning of a New Day" => "Dawning of a New Day",
|
||||
"Days One" => "Days One",
|
||||
"Delius" => "Delius",
|
||||
"Delius Swash Caps" => "Delius Swash Caps",
|
||||
"Delius Unicase" => "Delius Unicase",
|
||||
"Della Respira" => "Della Respira",
|
||||
"Denk One" => "Denk One",
|
||||
"Devonshire" => "Devonshire",
|
||||
"Didact Gothic" => "Didact Gothic",
|
||||
"Diplomata" => "Diplomata",
|
||||
"Diplomata SC" => "Diplomata SC",
|
||||
"Domine" => "Domine",
|
||||
"Donegal One" => "Donegal One",
|
||||
"Doppio One" => "Doppio One",
|
||||
"Dorsa" => "Dorsa",
|
||||
"Dosis" => "Dosis",
|
||||
"Dr Sugiyama" => "Dr Sugiyama",
|
||||
"Droid Sans" => "Droid Sans",
|
||||
"Droid Sans Mono" => "Droid Sans Mono",
|
||||
"Droid Serif" => "Droid Serif",
|
||||
"Duru Sans" => "Duru Sans",
|
||||
"Dynalight" => "Dynalight",
|
||||
"EB Garamond" => "EB Garamond",
|
||||
"Eagle Lake" => "Eagle Lake",
|
||||
"Eater" => "Eater",
|
||||
"Economica" => "Economica",
|
||||
"Electrolize" => "Electrolize",
|
||||
"Elsie" => "Elsie",
|
||||
"Elsie Swash Caps" => "Elsie Swash Caps",
|
||||
"Emblema One" => "Emblema One",
|
||||
"Emilys Candy" => "Emilys Candy",
|
||||
"Engagement" => "Engagement",
|
||||
"Englebert" => "Englebert",
|
||||
"Enriqueta" => "Enriqueta",
|
||||
"Erica One" => "Erica One",
|
||||
"Esteban" => "Esteban",
|
||||
"Euphoria Script" => "Euphoria Script",
|
||||
"Ewert" => "Ewert",
|
||||
"Exo" => "Exo",
|
||||
"Expletus Sans" => "Expletus Sans",
|
||||
"Fanwood Text" => "Fanwood Text",
|
||||
"Fascinate" => "Fascinate",
|
||||
"Fascinate Inline" => "Fascinate Inline",
|
||||
"Faster One" => "Faster One",
|
||||
"Fasthand" => "Fasthand",
|
||||
"Federant" => "Federant",
|
||||
"Federo" => "Federo",
|
||||
"Felipa" => "Felipa",
|
||||
"Fenix" => "Fenix",
|
||||
"Finger Paint" => "Finger Paint",
|
||||
"Fjalla One" => "Fjalla One",
|
||||
"Fjord One" => "Fjord One",
|
||||
"Flamenco" => "Flamenco",
|
||||
"Flavors" => "Flavors",
|
||||
"Fondamento" => "Fondamento",
|
||||
"Fontdiner Swanky" => "Fontdiner Swanky",
|
||||
"Forum" => "Forum",
|
||||
"Francois One" => "Francois One",
|
||||
"Freckle Face" => "Freckle Face",
|
||||
"Fredericka the Great" => "Fredericka the Great",
|
||||
"Fredoka One" => "Fredoka One",
|
||||
"Freehand" => "Freehand",
|
||||
"Fresca" => "Fresca",
|
||||
"Frijole" => "Frijole",
|
||||
"Fruktur" => "Fruktur",
|
||||
"Fugaz One" => "Fugaz One",
|
||||
"GFS Didot" => "GFS Didot",
|
||||
"GFS Neohellenic" => "GFS Neohellenic",
|
||||
"Gabriela" => "Gabriela",
|
||||
"Gafata" => "Gafata",
|
||||
"Galdeano" => "Galdeano",
|
||||
"Galindo" => "Galindo",
|
||||
"Gentium Basic" => "Gentium Basic",
|
||||
"Gentium Book Basic" => "Gentium Book Basic",
|
||||
"Geo" => "Geo",
|
||||
"Geostar" => "Geostar",
|
||||
"Geostar Fill" => "Geostar Fill",
|
||||
"Germania One" => "Germania One",
|
||||
"Gilda Display" => "Gilda Display",
|
||||
"Give You Glory" => "Give You Glory",
|
||||
"Glass Antiqua" => "Glass Antiqua",
|
||||
"Glegoo" => "Glegoo",
|
||||
"Gloria Hallelujah" => "Gloria Hallelujah",
|
||||
"Goblin One" => "Goblin One",
|
||||
"Gochi Hand" => "Gochi Hand",
|
||||
"Gorditas" => "Gorditas",
|
||||
"Goudy Bookletter 1911" => "Goudy Bookletter 1911",
|
||||
"Graduate" => "Graduate",
|
||||
"Grand Hotel" => "Grand Hotel",
|
||||
"Gravitas One" => "Gravitas One",
|
||||
"Great Vibes" => "Great Vibes",
|
||||
"Griffy" => "Griffy",
|
||||
"Gruppo" => "Gruppo",
|
||||
"Gudea" => "Gudea",
|
||||
"Habibi" => "Habibi",
|
||||
"Hammersmith One" => "Hammersmith One",
|
||||
"Hanalei" => "Hanalei",
|
||||
"Hanalei Fill" => "Hanalei Fill",
|
||||
"Handlee" => "Handlee",
|
||||
"Hanuman" => "Hanuman",
|
||||
"Happy Monkey" => "Happy Monkey",
|
||||
"Headland One" => "Headland One",
|
||||
"Henny Penny" => "Henny Penny",
|
||||
"Herr Von Muellerhoff" => "Herr Von Muellerhoff",
|
||||
"Holtwood One SC" => "Holtwood One SC",
|
||||
"Homemade Apple" => "Homemade Apple",
|
||||
"Homenaje" => "Homenaje",
|
||||
"IM Fell DW Pica" => "IM Fell DW Pica",
|
||||
"IM Fell DW Pica SC" => "IM Fell DW Pica SC",
|
||||
"IM Fell Double Pica" => "IM Fell Double Pica",
|
||||
"IM Fell Double Pica SC" => "IM Fell Double Pica SC",
|
||||
"IM Fell English" => "IM Fell English",
|
||||
"IM Fell English SC" => "IM Fell English SC",
|
||||
"IM Fell French Canon" => "IM Fell French Canon",
|
||||
"IM Fell French Canon SC" => "IM Fell French Canon SC",
|
||||
"IM Fell Great Primer" => "IM Fell Great Primer",
|
||||
"IM Fell Great Primer SC" => "IM Fell Great Primer SC",
|
||||
"Iceberg" => "Iceberg",
|
||||
"Iceland" => "Iceland",
|
||||
"Imprima" => "Imprima",
|
||||
"Inconsolata" => "Inconsolata",
|
||||
"Inder" => "Inder",
|
||||
"Indie Flower" => "Indie Flower",
|
||||
"Inika" => "Inika",
|
||||
"Irish Grover" => "Irish Grover",
|
||||
"Istok Web" => "Istok Web",
|
||||
"Italiana" => "Italiana",
|
||||
"Italianno" => "Italianno",
|
||||
"Jacques Francois" => "Jacques Francois",
|
||||
"Jacques Francois Shadow" => "Jacques Francois Shadow",
|
||||
"Jim Nightshade" => "Jim Nightshade",
|
||||
"Jockey One" => "Jockey One",
|
||||
"Jolly Lodger" => "Jolly Lodger",
|
||||
"Josefin Sans" => "Josefin Sans",
|
||||
"Josefin Slab" => "Josefin Slab",
|
||||
"Joti One" => "Joti One",
|
||||
"Judson" => "Judson",
|
||||
"Julee" => "Julee",
|
||||
"Julius Sans One" => "Julius Sans One",
|
||||
"Junge" => "Junge",
|
||||
"Jura" => "Jura",
|
||||
"Just Another Hand" => "Just Another Hand",
|
||||
"Just Me Again Down Here" => "Just Me Again Down Here",
|
||||
"Kameron" => "Kameron",
|
||||
"Karla" => "Karla",
|
||||
"Kaushan Script" => "Kaushan Script",
|
||||
"Kavoon" => "Kavoon",
|
||||
"Keania One" => "Keania One",
|
||||
"Kelly Slab" => "Kelly Slab",
|
||||
"Kenia" => "Kenia",
|
||||
"Khmer" => "Khmer",
|
||||
"Kite One" => "Kite One",
|
||||
"Knewave" => "Knewave",
|
||||
"Kotta One" => "Kotta One",
|
||||
"Koulen" => "Koulen",
|
||||
"Kranky" => "Kranky",
|
||||
"Kreon" => "Kreon",
|
||||
"Kristi" => "Kristi",
|
||||
"Krona One" => "Krona One",
|
||||
"La Belle Aurore" => "La Belle Aurore",
|
||||
"Lancelot" => "Lancelot",
|
||||
"Lato" => "Lato",
|
||||
"League Script" => "League Script",
|
||||
"Leckerli One" => "Leckerli One",
|
||||
"Ledger" => "Ledger",
|
||||
"Lekton" => "Lekton",
|
||||
"Lemon" => "Lemon",
|
||||
"Libre Baskerville" => "Libre Baskerville",
|
||||
"Life Savers" => "Life Savers",
|
||||
"Lilita One" => "Lilita One",
|
||||
"Limelight" => "Limelight",
|
||||
"Linden Hill" => "Linden Hill",
|
||||
"Lobster" => "Lobster",
|
||||
"Lobster Two" => "Lobster Two",
|
||||
"Londrina Outline" => "Londrina Outline",
|
||||
"Londrina Shadow" => "Londrina Shadow",
|
||||
"Londrina Sketch" => "Londrina Sketch",
|
||||
"Londrina Solid" => "Londrina Solid",
|
||||
"Lora" => "Lora",
|
||||
"Love Ya Like A Sister" => "Love Ya Like A Sister",
|
||||
"Loved by the King" => "Loved by the King",
|
||||
"Lovers Quarrel" => "Lovers Quarrel",
|
||||
"Luckiest Guy" => "Luckiest Guy",
|
||||
"Lusitana" => "Lusitana",
|
||||
"Lustria" => "Lustria",
|
||||
"Macondo" => "Macondo",
|
||||
"Macondo Swash Caps" => "Macondo Swash Caps",
|
||||
"Magra" => "Magra",
|
||||
"Maiden Orange" => "Maiden Orange",
|
||||
"Mako" => "Mako",
|
||||
"Marcellus" => "Marcellus",
|
||||
"Marcellus SC" => "Marcellus SC",
|
||||
"Marck Script" => "Marck Script",
|
||||
"Margarine" => "Margarine",
|
||||
"Marko One" => "Marko One",
|
||||
"Marmelad" => "Marmelad",
|
||||
"Marvel" => "Marvel",
|
||||
"Mate" => "Mate",
|
||||
"Mate SC" => "Mate SC",
|
||||
"Maven Pro" => "Maven Pro",
|
||||
"McLaren" => "McLaren",
|
||||
"Meddon" => "Meddon",
|
||||
"MedievalSharp" => "MedievalSharp",
|
||||
"Medula One" => "Medula One",
|
||||
"Megrim" => "Megrim",
|
||||
"Meie Script" => "Meie Script",
|
||||
"Merienda" => "Merienda",
|
||||
"Merienda One" => "Merienda One",
|
||||
"Merriweather" => "Merriweather",
|
||||
"Merriweather Sans" => "Merriweather Sans",
|
||||
"Metal" => "Metal",
|
||||
"Metal Mania" => "Metal Mania",
|
||||
"Metamorphous" => "Metamorphous",
|
||||
"Metrophobic" => "Metrophobic",
|
||||
"Michroma" => "Michroma",
|
||||
"Milonga" => "Milonga",
|
||||
"Miltonian" => "Miltonian",
|
||||
"Miltonian Tattoo" => "Miltonian Tattoo",
|
||||
"Miniver" => "Miniver",
|
||||
"Miss Fajardose" => "Miss Fajardose",
|
||||
"Modern Antiqua" => "Modern Antiqua",
|
||||
"Molengo" => "Molengo",
|
||||
"Molle" => "Molle",
|
||||
"Monda" => "Monda",
|
||||
"Monofett" => "Monofett",
|
||||
"Monoton" => "Monoton",
|
||||
"Monsieur La Doulaise" => "Monsieur La Doulaise",
|
||||
"Montaga" => "Montaga",
|
||||
"Montez" => "Montez",
|
||||
"Montserrat" => "Montserrat",
|
||||
"Montserrat Alternates" => "Montserrat Alternates",
|
||||
"Montserrat Subrayada" => "Montserrat Subrayada",
|
||||
"Moul" => "Moul",
|
||||
"Moulpali" => "Moulpali",
|
||||
"Mountains of Christmas" => "Mountains of Christmas",
|
||||
"Mouse Memoirs" => "Mouse Memoirs",
|
||||
"Mr Bedfort" => "Mr Bedfort",
|
||||
"Mr Dafoe" => "Mr Dafoe",
|
||||
"Mr De Haviland" => "Mr De Haviland",
|
||||
"Mrs Saint Delafield" => "Mrs Saint Delafield",
|
||||
"Mrs Sheppards" => "Mrs Sheppards",
|
||||
"Muli" => "Muli",
|
||||
"Mystery Quest" => "Mystery Quest",
|
||||
"Neucha" => "Neucha",
|
||||
"Neuton" => "Neuton",
|
||||
"New Rocker" => "New Rocker",
|
||||
"News Cycle" => "News Cycle",
|
||||
"Niconne" => "Niconne",
|
||||
"Nixie One" => "Nixie One",
|
||||
"Nobile" => "Nobile",
|
||||
"Nokora" => "Nokora",
|
||||
"Norican" => "Norican",
|
||||
"Nosifer" => "Nosifer",
|
||||
"Nothing You Could Do" => "Nothing You Could Do",
|
||||
"Noticia Text" => "Noticia Text",
|
||||
"Noto Sans" => "Noto Sans",
|
||||
"Noto Serif" => "Noto Serif",
|
||||
"Nova Cut" => "Nova Cut",
|
||||
"Nova Flat" => "Nova Flat",
|
||||
"Nova Mono" => "Nova Mono",
|
||||
"Nova Oval" => "Nova Oval",
|
||||
"Nova Round" => "Nova Round",
|
||||
"Nova Script" => "Nova Script",
|
||||
"Nova Slim" => "Nova Slim",
|
||||
"Nova Square" => "Nova Square",
|
||||
"Numans" => "Numans",
|
||||
"Nunito" => "Nunito",
|
||||
"Odor Mean Chey" => "Odor Mean Chey",
|
||||
"Offside" => "Offside",
|
||||
"Old Standard TT" => "Old Standard TT",
|
||||
"Oldenburg" => "Oldenburg",
|
||||
"Oleo Script" => "Oleo Script",
|
||||
"Oleo Script Swash Caps" => "Oleo Script Swash Caps",
|
||||
"Open Sans" => "Open Sans",
|
||||
"Open Sans Condensed" => "Open Sans Condensed",
|
||||
"Oranienbaum" => "Oranienbaum",
|
||||
"Orbitron" => "Orbitron",
|
||||
"Oregano" => "Oregano",
|
||||
"Orienta" => "Orienta",
|
||||
"Original Surfer" => "Original Surfer",
|
||||
"Oswald" => "Oswald",
|
||||
"Over the Rainbow" => "Over the Rainbow",
|
||||
"Overlock" => "Overlock",
|
||||
"Overlock SC" => "Overlock SC",
|
||||
"Ovo" => "Ovo",
|
||||
"Oxygen" => "Oxygen",
|
||||
"Oxygen Mono" => "Oxygen Mono",
|
||||
"PT Mono" => "PT Mono",
|
||||
"PT Sans" => "PT Sans",
|
||||
"PT Sans Caption" => "PT Sans Caption",
|
||||
"PT Sans Narrow" => "PT Sans Narrow",
|
||||
"PT Serif" => "PT Serif",
|
||||
"PT Serif Caption" => "PT Serif Caption",
|
||||
"Pacifico" => "Pacifico",
|
||||
"Paprika" => "Paprika",
|
||||
"Parisienne" => "Parisienne",
|
||||
"Passero One" => "Passero One",
|
||||
"Passion One" => "Passion One",
|
||||
"Patrick Hand" => "Patrick Hand",
|
||||
"Patrick Hand SC" => "Patrick Hand SC",
|
||||
"Patua One" => "Patua One",
|
||||
"Paytone One" => "Paytone One",
|
||||
"Peralta" => "Peralta",
|
||||
"Permanent Marker" => "Permanent Marker",
|
||||
"Petit Formal Script" => "Petit Formal Script",
|
||||
"Petrona" => "Petrona",
|
||||
"Philosopher" => "Philosopher",
|
||||
"Piedra" => "Piedra",
|
||||
"Pinyon Script" => "Pinyon Script",
|
||||
"Pirata One" => "Pirata One",
|
||||
"Plaster" => "Plaster",
|
||||
"Play" => "Play",
|
||||
"Playball" => "Playball",
|
||||
"Playfair Display" => "Playfair Display",
|
||||
"Playfair Display SC" => "Playfair Display SC",
|
||||
"Podkova" => "Podkova",
|
||||
"Poiret One" => "Poiret One",
|
||||
"Poller One" => "Poller One",
|
||||
"Poly" => "Poly",
|
||||
"Pompiere" => "Pompiere",
|
||||
"Pontano Sans" => "Pontano Sans",
|
||||
"Port Lligat Sans" => "Port Lligat Sans",
|
||||
"Port Lligat Slab" => "Port Lligat Slab",
|
||||
"Prata" => "Prata",
|
||||
"Preahvihear" => "Preahvihear",
|
||||
"Press Start 2P" => "Press Start 2P",
|
||||
"Princess Sofia" => "Princess Sofia",
|
||||
"Prociono" => "Prociono",
|
||||
"Prosto One" => "Prosto One",
|
||||
"Puritan" => "Puritan",
|
||||
"Purple Purse" => "Purple Purse",
|
||||
"Quando" => "Quando",
|
||||
"Quantico" => "Quantico",
|
||||
"Quattrocento" => "Quattrocento",
|
||||
"Quattrocento Sans" => "Quattrocento Sans",
|
||||
"Questrial" => "Questrial",
|
||||
"Quicksand" => "Quicksand",
|
||||
"Quintessential" => "Quintessential",
|
||||
"Qwigley" => "Qwigley",
|
||||
"Racing Sans One" => "Racing Sans One",
|
||||
"Radley" => "Radley",
|
||||
"Raleway" => "Raleway",
|
||||
"Raleway Dots" => "Raleway Dots",
|
||||
"Rambla" => "Rambla",
|
||||
"Rammetto One" => "Rammetto One",
|
||||
"Ranchers" => "Ranchers",
|
||||
"Rancho" => "Rancho",
|
||||
"Rationale" => "Rationale",
|
||||
"Redressed" => "Redressed",
|
||||
"Reenie Beanie" => "Reenie Beanie",
|
||||
"Revalia" => "Revalia",
|
||||
"Ribeye" => "Ribeye",
|
||||
"Ribeye Marrow" => "Ribeye Marrow",
|
||||
"Righteous" => "Righteous",
|
||||
"Risque" => "Risque",
|
||||
"Roboto" => "Roboto",
|
||||
"Roboto Condensed" => "Roboto Condensed",
|
||||
"Roboto Slab" => "Roboto Slab",
|
||||
"Rochester" => "Rochester",
|
||||
"Rock Salt" => "Rock Salt",
|
||||
"Rokkitt" => "Rokkitt",
|
||||
"Romanesco" => "Romanesco",
|
||||
"Ropa Sans" => "Ropa Sans",
|
||||
"Rosario" => "Rosario",
|
||||
"Rosarivo" => "Rosarivo",
|
||||
"Rouge Script" => "Rouge Script",
|
||||
"Ruda" => "Ruda",
|
||||
"Rufina" => "Rufina",
|
||||
"Ruge Boogie" => "Ruge Boogie",
|
||||
"Ruluko" => "Ruluko",
|
||||
"Rum Raisin" => "Rum Raisin",
|
||||
"Ruslan Display" => "Ruslan Display",
|
||||
"Russo One" => "Russo One",
|
||||
"Ruthie" => "Ruthie",
|
||||
"Rye" => "Rye",
|
||||
"Sacramento" => "Sacramento",
|
||||
"Sail" => "Sail",
|
||||
"Salsa" => "Salsa",
|
||||
"Sanchez" => "Sanchez",
|
||||
"Sancreek" => "Sancreek",
|
||||
"Sansita One" => "Sansita One",
|
||||
"Sarina" => "Sarina",
|
||||
"Satisfy" => "Satisfy",
|
||||
"Scada" => "Scada",
|
||||
"Schoolbell" => "Schoolbell",
|
||||
"Seaweed Script" => "Seaweed Script",
|
||||
"Sevillana" => "Sevillana",
|
||||
"Seymour One" => "Seymour One",
|
||||
"Shadows Into Light" => "Shadows Into Light",
|
||||
"Shadows Into Light Two" => "Shadows Into Light Two",
|
||||
"Shanti" => "Shanti",
|
||||
"Share" => "Share",
|
||||
"Share Tech" => "Share Tech",
|
||||
"Share Tech Mono" => "Share Tech Mono",
|
||||
"Shojumaru" => "Shojumaru",
|
||||
"Short Stack" => "Short Stack",
|
||||
"Siemreap" => "Siemreap",
|
||||
"Sigmar One" => "Sigmar One",
|
||||
"Signika" => "Signika",
|
||||
"Signika Negative" => "Signika Negative",
|
||||
"Simonetta" => "Simonetta",
|
||||
"Sintony" => "Sintony",
|
||||
"Sirin Stencil" => "Sirin Stencil",
|
||||
"Six Caps" => "Six Caps",
|
||||
"Skranji" => "Skranji",
|
||||
"Slackey" => "Slackey",
|
||||
"Smokum" => "Smokum",
|
||||
"Smythe" => "Smythe",
|
||||
"Sniglet" => "Sniglet",
|
||||
"Snippet" => "Snippet",
|
||||
"Snowburst One" => "Snowburst One",
|
||||
"Sofadi One" => "Sofadi One",
|
||||
"Sofia" => "Sofia",
|
||||
"Sonsie One" => "Sonsie One",
|
||||
"Sorts Mill Goudy" => "Sorts Mill Goudy",
|
||||
"Source Code Pro" => "Source Code Pro",
|
||||
"Source Sans Pro" => "Source Sans Pro",
|
||||
"Special Elite" => "Special Elite",
|
||||
"Spicy Rice" => "Spicy Rice",
|
||||
"Spinnaker" => "Spinnaker",
|
||||
"Spirax" => "Spirax",
|
||||
"Squada One" => "Squada One",
|
||||
"Stalemate" => "Stalemate",
|
||||
"Stalinist One" => "Stalinist One",
|
||||
"Stardos Stencil" => "Stardos Stencil",
|
||||
"Stint Ultra Condensed" => "Stint Ultra Condensed",
|
||||
"Stint Ultra Expanded" => "Stint Ultra Expanded",
|
||||
"Stoke" => "Stoke",
|
||||
"Strait" => "Strait",
|
||||
"Sue Ellen Francisco" => "Sue Ellen Francisco",
|
||||
"Sunshiney" => "Sunshiney",
|
||||
"Supermercado One" => "Supermercado One",
|
||||
"Suwannaphum" => "Suwannaphum",
|
||||
"Swanky and Moo Moo" => "Swanky and Moo Moo",
|
||||
"Syncopate" => "Syncopate",
|
||||
"Tangerine" => "Tangerine",
|
||||
"Taprom" => "Taprom",
|
||||
"Tauri" => "Tauri",
|
||||
"Telex" => "Telex",
|
||||
"Tenor Sans" => "Tenor Sans",
|
||||
"Text Me One" => "Text Me One",
|
||||
"The Girl Next Door" => "The Girl Next Door",
|
||||
"Tienne" => "Tienne",
|
||||
"Tinos" => "Tinos",
|
||||
"Titan One" => "Titan One",
|
||||
"Titillium Web" => "Titillium Web",
|
||||
"Trade Winds" => "Trade Winds",
|
||||
"Trocchi" => "Trocchi",
|
||||
"Trochut" => "Trochut",
|
||||
"Trykker" => "Trykker",
|
||||
"Tulpen One" => "Tulpen One",
|
||||
"Ubuntu" => "Ubuntu",
|
||||
"Ubuntu Condensed" => "Ubuntu Condensed",
|
||||
"Ubuntu Mono" => "Ubuntu Mono",
|
||||
"Ultra" => "Ultra",
|
||||
"Uncial Antiqua" => "Uncial Antiqua",
|
||||
"Underdog" => "Underdog",
|
||||
"Unica One" => "Unica One",
|
||||
"UnifrakturCook" => "UnifrakturCook",
|
||||
"UnifrakturMaguntia" => "UnifrakturMaguntia",
|
||||
"Unkempt" => "Unkempt",
|
||||
"Unlock" => "Unlock",
|
||||
"Unna" => "Unna",
|
||||
"VT323" => "VT323",
|
||||
"Vampiro One" => "Vampiro One",
|
||||
"Varela" => "Varela",
|
||||
"Varela Round" => "Varela Round",
|
||||
"Vast Shadow" => "Vast Shadow",
|
||||
"Vibur" => "Vibur",
|
||||
"Vidaloka" => "Vidaloka",
|
||||
"Viga" => "Viga",
|
||||
"Voces" => "Voces",
|
||||
"Volkhov" => "Volkhov",
|
||||
"Vollkorn" => "Vollkorn",
|
||||
"Voltaire" => "Voltaire",
|
||||
"Waiting for the Sunrise" => "Waiting for the Sunrise",
|
||||
"Wallpoet" => "Wallpoet",
|
||||
"Walter Turncoat" => "Walter Turncoat",
|
||||
"Warnes" => "Warnes",
|
||||
"Wellfleet" => "Wellfleet",
|
||||
"Wendy One" => "Wendy One",
|
||||
"Wire One" => "Wire One",
|
||||
"Yanone Kaffeesatz" => "Yanone Kaffeesatz",
|
||||
"Yellowtail" => "Yellowtail",
|
||||
"Yeseva One" => "Yeseva One",
|
||||
"Yesteryear" => "Yesteryear",
|
||||
"Zeyada" => "Zeyada",
|
||||
);
|
||||
?>
|
||||
1191
wp-content/themes/nuzi/framework/pagebuilder/elements.php
Normal file
379
wp-content/themes/nuzi/framework/pagebuilder/font-awesome.php
Normal file
@@ -0,0 +1,379 @@
|
||||
<div class="fontawesome-ajax-data">
|
||||
<style>
|
||||
.fontawesome-field-container {margin: 0;font-family: proxima-nova,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size: 14px;line-height: 20px;color: #333;background-color: #fff;}
|
||||
.fontawesome-field-container .container {margin-right: auto;margin-left: auto;}
|
||||
.fontawesome-field-container .container::before,.fontawesome-field-container .container::after {display: table;content: "";line-height: 0;}
|
||||
.fontawesome-field-container .container::after {clear: both;}
|
||||
.fontawesome-field-container h1,.fontawesome-field-container h2,.fontawesome-field-container h3,.fontawesome-field-container h4,.fontawesome-field-container h5,.fontawesome-field-container h6 {font-family: museo-slab,"Helvetica Neue",Helvetica,Arial,sans-serif;}
|
||||
.fontawesome-field-container section {padding-top: 40px;}
|
||||
.fontawesome-field-container ul.unstyled,.fontawesome-field-container ol.unstyled {margin-left: 0;list-style: none;}
|
||||
.fontawesome-field-container li {color: #555; line-height: 22px; margin-left: 15px; margin-right: 14px; font-size: 14px; display: inline-block;}
|
||||
.fontawesome-field-container li span {display: none;}
|
||||
.fontawesome-field-container .muted {color: #999;}
|
||||
.fontawesome-field-container .fa-viewer{margin: 20px auto; text-align: center;}
|
||||
.fontawesome-field-container .unstyled li:hover{background-color: #fbf4f4;}
|
||||
.fontawesome-field-container .unstyled li:hover i{-webkit-transform: rotate(0deg) scale(2.5);-o-transform: rotate(0deg) scale(2.5);-moz-transform: rotate(0deg) scale(2.5);-ms-transform: rotate(0deg) scale(2.5);transform: rotate(0deg) scale(2.5);}
|
||||
[class^="icon-"], [class*=" icon-"]{display: inline-block;}
|
||||
</style>
|
||||
<div class="general-field-container">
|
||||
<div class="field-item type-text">
|
||||
<div class="field-title">Font Size</div>
|
||||
<div class="field-data">
|
||||
<input data-name="fa_size" data-type="text" class="field" value="" placeholder="" data-selector="" data-save-to="" type="text" />
|
||||
</div>
|
||||
<div class="field-desc">Size.</div>
|
||||
</div>
|
||||
<div class="field-item type-text">
|
||||
<div class="field-title">Font Padding</div>
|
||||
<div class="field-data">
|
||||
<input data-name="fa_padding" data-type="text" class="field" value="" placeholder="" data-selector="" data-save-to="" type="text" />
|
||||
</div>
|
||||
<div class="field-desc">Padding.</div>
|
||||
</div>
|
||||
<div class="field-item type-color">
|
||||
<div class="field-title">Font Color</div>
|
||||
<div class="field-data">
|
||||
<input data-name="fa_color" data-type="color" class="field" value="" placeholder="" type="text" />
|
||||
<div class="color-info"></div>
|
||||
<div class="color-view"></div>
|
||||
</div>
|
||||
<div class="field-desc">Color.</div>
|
||||
</div>
|
||||
<div class="field-item type-color">
|
||||
<div class="field-title">Border Color</div>
|
||||
<div class="field-data">
|
||||
<input data-name="fa_bg_color" data-type="color" class="field" value="" placeholder="" type="text" />
|
||||
<div class="color-info"></div>
|
||||
<div class="color-view"></div>
|
||||
</div>
|
||||
<div class="field-desc">Background Color.</div>
|
||||
</div>
|
||||
<div class="field-item type-text">
|
||||
<div class="field-title">Border width Size</div>
|
||||
<div class="field-data">
|
||||
<input data-name="fa_rounded" data-type="text" class="field" value="" placeholder="" data-selector="" data-save-to="" type="text" />
|
||||
</div>
|
||||
<div class="field-desc">Border width Size.</div>
|
||||
</div>
|
||||
<div class="field-item hidden type-hidden">
|
||||
<div class="field-title">Icon</div>
|
||||
<div class="field-data">
|
||||
<input data-name="fa_icon" data-type="hidden" class="field" value="" placeholder="" data-selector="" data-save-to="" type="hidden" />
|
||||
</div>
|
||||
<div class="field-desc">Icon.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fontawesome-field-container">
|
||||
<div class="container">
|
||||
<div class="fa-viewer"></div>
|
||||
<ul class="unstyled">
|
||||
<li><i class="icon-"></i><span> icon-glass </span><span class="muted">(&#xf000;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-music </span><span class="muted">(&#xf001;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-search </span><span class="muted">(&#xf002;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-envelope </span><span class="muted">(&#xf003;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-heart </span><span class="muted">(&#xf004;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-star </span><span class="muted">(&#xf005;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-star-empty </span><span class="muted">(&#xf006;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-user </span><span class="muted">(&#xf007;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-film </span><span class="muted">(&#xf008;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-th-large </span><span class="muted">(&#xf009;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-th </span><span class="muted">(&#xf00a;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-th-list </span><span class="muted">(&#xf00b;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-ok </span><span class="muted">(&#xf00c;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-remove </span><span class="muted">(&#xf00d;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-zoom-in </span><span class="muted">(&#xf00e;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-zoom-out </span><span class="muted">(&#xf010;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-off </span><span class="muted">(&#xf011;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-signal </span><span class="muted">(&#xf012;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-cog </span><span class="muted">(&#xf013;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-trash </span><span class="muted">(&#xf014;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-home </span><span class="muted">(&#xf015;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-file </span><span class="muted">(&#xf016;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-time </span><span class="muted">(&#xf017;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-road </span><span class="muted">(&#xf018;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-download-alt </span><span class="muted">(&#xf019;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-download </span><span class="muted">(&#xf01a;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-upload </span><span class="muted">(&#xf01b;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-inbox </span><span class="muted">(&#xf01c;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-play-circle </span><span class="muted">(&#xf01d;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-repeat </span><span class="muted">(&#xf01e;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-refresh </span><span class="muted">(&#xf021;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-list-alt </span><span class="muted">(&#xf022;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-lock </span><span class="muted">(&#xf023;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-flag </span><span class="muted">(&#xf024;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-headphones </span><span class="muted">(&#xf025;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-volume-off </span><span class="muted">(&#xf026;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-volume-down </span><span class="muted">(&#xf027;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-volume-up </span><span class="muted">(&#xf028;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-qrcode </span><span class="muted">(&#xf029;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-barcode </span><span class="muted">(&#xf02a;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-tag </span><span class="muted">(&#xf02b;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-tags </span><span class="muted">(&#xf02c;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-book </span><span class="muted">(&#xf02d;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-bookmark </span><span class="muted">(&#xf02e;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-print </span><span class="muted">(&#xf02f;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-camera </span><span class="muted">(&#xf030;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-font </span><span class="muted">(&#xf031;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-bold </span><span class="muted">(&#xf032;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-italic </span><span class="muted">(&#xf033;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-text-height </span><span class="muted">(&#xf034;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-text-width </span><span class="muted">(&#xf035;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-align-left </span><span class="muted">(&#xf036;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-align-center </span><span class="muted">(&#xf037;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-align-right </span><span class="muted">(&#xf038;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-align-justify </span><span class="muted">(&#xf039;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-list </span><span class="muted">(&#xf03a;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-indent-left </span><span class="muted">(&#xf03b;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-indent-right </span><span class="muted">(&#xf03c;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-facetime-video </span><span class="muted">(&#xf03d;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-picture </span><span class="muted">(&#xf03e;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-pencil </span><span class="muted">(&#xf040;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-map-marker </span><span class="muted">(&#xf041;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-adjust </span><span class="muted">(&#xf042;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-tint </span><span class="muted">(&#xf043;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-edit </span><span class="muted">(&#xf044;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-share </span><span class="muted">(&#xf045;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-check </span><span class="muted">(&#xf046;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-move </span><span class="muted">(&#xf047;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-step-backward </span><span class="muted">(&#xf048;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-fast-backward </span><span class="muted">(&#xf049;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-backward </span><span class="muted">(&#xf04a;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-play </span><span class="muted">(&#xf04b;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-pause </span><span class="muted">(&#xf04c;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-stop </span><span class="muted">(&#xf04d;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-forward </span><span class="muted">(&#xf04e;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-fast-forward </span><span class="muted">(&#xf050;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-step-forward </span><span class="muted">(&#xf051;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-eject </span><span class="muted">(&#xf052;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-chevron-left </span><span class="muted">(&#xf053;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-chevron-right </span><span class="muted">(&#xf054;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-plus-sign </span><span class="muted">(&#xf055;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-minus-sign </span><span class="muted">(&#xf056;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-remove-sign </span><span class="muted">(&#xf057;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-ok-sign </span><span class="muted">(&#xf058;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-question-sign </span><span class="muted">(&#xf059;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-info-sign </span><span class="muted">(&#xf05a;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-screenshot </span><span class="muted">(&#xf05b;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-remove-circle </span><span class="muted">(&#xf05c;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-ok-circle </span><span class="muted">(&#xf05d;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-ban-circle </span><span class="muted">(&#xf05e;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-arrow-left </span><span class="muted">(&#xf060;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-arrow-right </span><span class="muted">(&#xf061;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-arrow-up </span><span class="muted">(&#xf062;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-arrow-down </span><span class="muted">(&#xf063;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-share-alt </span><span class="muted">(&#xf064;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-resize-full </span><span class="muted">(&#xf065;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-resize-small </span><span class="muted">(&#xf066;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-plus </span><span class="muted">(&#xf067;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-minus </span><span class="muted">(&#xf068;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-asterisk </span><span class="muted">(&#xf069;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-exclamation-sign </span><span class="muted">(&#xf06a;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-gift </span><span class="muted">(&#xf06b;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-leaf </span><span class="muted">(&#xf06c;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-fire </span><span class="muted">(&#xf06d;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-eye-open </span><span class="muted">(&#xf06e;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-eye-close </span><span class="muted">(&#xf070;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-warning-sign </span><span class="muted">(&#xf071;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-plane </span><span class="muted">(&#xf072;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-calendar </span><span class="muted">(&#xf073;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-random </span><span class="muted">(&#xf074;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-comment </span><span class="muted">(&#xf075;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-magnet </span><span class="muted">(&#xf076;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-chevron-up </span><span class="muted">(&#xf077;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-chevron-down </span><span class="muted">(&#xf078;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-retweet </span><span class="muted">(&#xf079;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-shopping-cart </span><span class="muted">(&#xf07a;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-folder-close </span><span class="muted">(&#xf07b;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-folder-open </span><span class="muted">(&#xf07c;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-resize-vertical </span><span class="muted">(&#xf07d;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-resize-horizontal </span><span class="muted">(&#xf07e;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-bar-chart </span><span class="muted">(&#xf080;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-twitter-sign </span><span class="muted">(&#xf081;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-facebook-sign </span><span class="muted">(&#xf082;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-camera-retro </span><span class="muted">(&#xf083;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-key </span><span class="muted">(&#xf084;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-cogs </span><span class="muted">(&#xf085;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-comments </span><span class="muted">(&#xf086;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-thumbs-up </span><span class="muted">(&#xf087;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-thumbs-down </span><span class="muted">(&#xf088;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-star-half </span><span class="muted">(&#xf089;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-heart-empty </span><span class="muted">(&#xf08a;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-signout </span><span class="muted">(&#xf08b;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-linkedin-sign </span><span class="muted">(&#xf08c;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-pushpin </span><span class="muted">(&#xf08d;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-external-link </span><span class="muted">(&#xf08e;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-signin </span><span class="muted">(&#xf090;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-trophy </span><span class="muted">(&#xf091;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-github-sign </span><span class="muted">(&#xf092;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-upload-alt </span><span class="muted">(&#xf093;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-lemon </span><span class="muted">(&#xf094;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-phone </span><span class="muted">(&#xf095;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-check-empty </span><span class="muted">(&#xf096;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-bookmark-empty </span><span class="muted">(&#xf097;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-phone-sign </span><span class="muted">(&#xf098;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-twitter </span><span class="muted">(&#xf099;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-facebook </span><span class="muted">(&#xf09a;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-github </span><span class="muted">(&#xf09b;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-unlock </span><span class="muted">(&#xf09c;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-credit-card </span><span class="muted">(&#xf09d;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-rss </span><span class="muted">(&#xf09e;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-hdd </span><span class="muted">(&#xf0a0;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-bullhorn </span><span class="muted">(&#xf0a1;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-bell </span><span class="muted">(&#xf0a2;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-certificate </span><span class="muted">(&#xf0a3;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-hand-right </span><span class="muted">(&#xf0a4;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-hand-left </span><span class="muted">(&#xf0a5;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-hand-up </span><span class="muted">(&#xf0a6;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-hand-down </span><span class="muted">(&#xf0a7;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-circle-arrow-left </span><span class="muted">(&#xf0a8;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-circle-arrow-right </span><span class="muted">(&#xf0a9;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-circle-arrow-up </span><span class="muted">(&#xf0aa;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-circle-arrow-down </span><span class="muted">(&#xf0ab;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-globe </span><span class="muted">(&#xf0ac;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-wrench </span><span class="muted">(&#xf0ad;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-tasks </span><span class="muted">(&#xf0ae;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-filter </span><span class="muted">(&#xf0b0;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-briefcase </span><span class="muted">(&#xf0b1;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-fullscreen </span><span class="muted">(&#xf0b2;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-group </span><span class="muted">(&#xf0c0;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-link </span><span class="muted">(&#xf0c1;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-cloud </span><span class="muted">(&#xf0c2;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-beaker </span><span class="muted">(&#xf0c3;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-cut </span><span class="muted">(&#xf0c4;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-copy </span><span class="muted">(&#xf0c5;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-paper-clip </span><span class="muted">(&#xf0c6;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-save </span><span class="muted">(&#xf0c7;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-sign-blank </span><span class="muted">(&#xf0c8;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-reorder </span><span class="muted">(&#xf0c9;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-list-ul </span><span class="muted">(&#xf0ca;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-list-ol </span><span class="muted">(&#xf0cb;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-strikethrough </span><span class="muted">(&#xf0cc;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-underline </span><span class="muted">(&#xf0cd;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-table </span><span class="muted">(&#xf0ce;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-magic </span><span class="muted">(&#xf0d0;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-truck </span><span class="muted">(&#xf0d1;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-pinterest </span><span class="muted">(&#xf0d2;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-pinterest-sign </span><span class="muted">(&#xf0d3;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-google-plus-sign </span><span class="muted">(&#xf0d4;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-google-plus </span><span class="muted">(&#xf0d5;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-money </span><span class="muted">(&#xf0d6;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-caret-down </span><span class="muted">(&#xf0d7;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-caret-up </span><span class="muted">(&#xf0d8;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-caret-left </span><span class="muted">(&#xf0d9;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-caret-right </span><span class="muted">(&#xf0da;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-columns </span><span class="muted">(&#xf0db;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-sort </span><span class="muted">(&#xf0dc;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-sort-down </span><span class="muted">(&#xf0dd;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-sort-up </span><span class="muted">(&#xf0de;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-envelope-alt </span><span class="muted">(&#xf0e0;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-linkedin </span><span class="muted">(&#xf0e1;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-undo </span><span class="muted">(&#xf0e2;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-legal </span><span class="muted">(&#xf0e3;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-dashboard </span><span class="muted">(&#xf0e4;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-comment-alt </span><span class="muted">(&#xf0e5;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-comments-alt </span><span class="muted">(&#xf0e6;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-bolt </span><span class="muted">(&#xf0e7;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-sitemap </span><span class="muted">(&#xf0e8;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-umbrella </span><span class="muted">(&#xf0e9;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-paste </span><span class="muted">(&#xf0ea;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-lightbulb </span><span class="muted">(&#xf0eb;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-exchange </span><span class="muted">(&#xf0ec;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-cloud-download </span><span class="muted">(&#xf0ed;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-cloud-upload </span><span class="muted">(&#xf0ee;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-user-md </span><span class="muted">(&#xf0f0;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-stethoscope </span><span class="muted">(&#xf0f1;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-suitcase </span><span class="muted">(&#xf0f2;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-bell-alt </span><span class="muted">(&#xf0f3;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-coffee </span><span class="muted">(&#xf0f4;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-food </span><span class="muted">(&#xf0f5;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-file-alt </span><span class="muted">(&#xf0f6;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-building </span><span class="muted">(&#xf0f7;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-hospital </span><span class="muted">(&#xf0f8;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-ambulance </span><span class="muted">(&#xf0f9;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-medkit </span><span class="muted">(&#xf0fa;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-fighter-jet </span><span class="muted">(&#xf0fb;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-beer </span><span class="muted">(&#xf0fc;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-h-sign </span><span class="muted">(&#xf0fd;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-plus-sign-alt </span><span class="muted">(&#xf0fe;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-double-angle-left </span><span class="muted">(&#xf100;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-double-angle-right </span><span class="muted">(&#xf101;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-double-angle-up </span><span class="muted">(&#xf102;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-double-angle-down </span><span class="muted">(&#xf103;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-angle-left </span><span class="muted">(&#xf104;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-angle-right </span><span class="muted">(&#xf105;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-angle-up </span><span class="muted">(&#xf106;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-angle-down </span><span class="muted">(&#xf107;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-desktop </span><span class="muted">(&#xf108;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-laptop </span><span class="muted">(&#xf109;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-tablet </span><span class="muted">(&#xf10a;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-mobile-phone </span><span class="muted">(&#xf10b;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-circle-blank </span><span class="muted">(&#xf10c;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-quote-left </span><span class="muted">(&#xf10d;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-quote-right </span><span class="muted">(&#xf10e;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-spinner </span><span class="muted">(&#xf110;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-circle </span><span class="muted">(&#xf111;)</span></li>
|
||||
<li><i class="icon-"></i><span> icon-reply </span><span class="muted">(&#xf112;)</span></li>
|
||||
|
||||
<li><i class="icon-expand-alt"></i><span> icon-expand-alt</span></li>
|
||||
<li><i class="icon-collapse-alt"></i><span> icon-collapse-alt</span></li>
|
||||
<li><i class="icon-smile"></i><span> icon-smile</span></li>
|
||||
<li><i class="icon-frown"></i><span> icon-frown</span></li>
|
||||
<li><i class="icon-meh"></i><span> icon-meh</span></li>
|
||||
<li><i class="icon-gamepad"></i><span> icon-gamepad</span></li>
|
||||
<li><i class="icon-keyboard"></i><span> icon-keyboard</span></li>
|
||||
<li><i class="icon-flag-alt"></i><span> icon-flag-alt</span></li>
|
||||
<li><i class="icon-flag-checkered"></i><span> icon-flag-checkered</span></li>
|
||||
<li><i class="icon-terminal"></i><span> icon-terminal</span></li>
|
||||
<li><i class="icon-code"></i><span> icon-code</span></li>
|
||||
<li><i class="icon-mail-forward"></i><span> icon-mail-forward</span> <span class="muted">(alias)</span></li>
|
||||
<li><i class="icon-mail-reply"></i><span> icon-mail-reply</span> <span class="muted">(alias)</span></li>
|
||||
<li><i class="icon-reply-all"></i><span> icon-reply-all</span></li>
|
||||
<li><i class="icon-mail-reply-all"></i><span> icon-mail-reply-all</span> <span class="muted">(alias)</span></li>
|
||||
<li><i class="icon-star-half-empty"></i><span> icon-star-half-empty</span></li>
|
||||
<li><i class="icon-star-half-full"></i><span> icon-star-half-full </span><span class="muted">(alias)</span></li>
|
||||
<li><i class="icon-location-arrow"></i><span> icon-location-arrow</span></li>
|
||||
<li><i class="icon-rotate-left"></i><span> icon-rotate-left </span><span class="muted">(alias)</span></li>
|
||||
<li><i class="icon-rotate-right"></i><span> icon-rotate-right </span><span class="muted">(alias)</span></li>
|
||||
<li><i class="icon-crop"></i><span> icon-crop</span></li>
|
||||
<li><i class="icon-code-fork"></i><span> icon-code-fork</span></li>
|
||||
<li><i class="icon-unlink"></i><span> icon-unlink</span></li>
|
||||
<li><i class="icon-question"></i><span> icon-question</span></li>
|
||||
<li><i class="icon-info"></i><span> icon-info</span></li>
|
||||
<li><i class="icon-exclamation"></i><span> icon-exclamation</span></li>
|
||||
<li><i class="icon-superscript"></i><span> icon-superscript</span></li>
|
||||
<li><i class="icon-subscript"></i><span> icon-subscript</span></li>
|
||||
<li><i class="icon-eraser"></i><span> icon-eraser</span></li>
|
||||
<li><i class="icon-puzzle-piece"></i><span> icon-puzzle-piece</span></li>
|
||||
<li><i class="icon-microphone"></i><span> icon-microphone</span></li>
|
||||
<li><i class="icon-microphone-off"></i><span> icon-microphone-off</span></li>
|
||||
<li><i class="icon-shield"></i><span> icon-shield</span></li>
|
||||
<li><i class="icon-calendar-empty"></i><span> icon-calendar-empty</span></li>
|
||||
<li><i class="icon-fire-extinguisher"></i><span> icon-fire-extinguisher</span></li>
|
||||
<li><i class="icon-rocket"></i><span> icon-rocket</span></li>
|
||||
<li><i class="icon-maxcdn"></i><span> icon-maxcdn</span></li>
|
||||
<li><i class="icon-chevron-sign-left"></i><span> icon-chevron-sign-left</span></li>
|
||||
<li><i class="icon-chevron-sign-right"></i><span> icon-chevron-sign-right</span></li>
|
||||
<li><i class="icon-chevron-sign-up"></i><span> icon-chevron-sign-up</span></li>
|
||||
<li><i class="icon-chevron-sign-down"></i><span> icon-chevron-sign-down</span></li>
|
||||
<li><i class="icon-html5"></i><span> icon-html5</span></li>
|
||||
<li><i class="icon-css3"></i><span> icon-css3</span></li>
|
||||
<li><i class="icon-anchor"></i><span> icon-anchor</span></li>
|
||||
<li><i class="icon-unlock-alt"></i><span> icon-unlock-alt</span></li>
|
||||
<li><i class="icon-bullseye"></i><span> icon-bullseye</span></li>
|
||||
<li><i class="icon-ellipsis-horizontal"></i><span> icon-ellipsis-horizontal</span></li>
|
||||
<li><i class="icon-ellipsis-vertical"></i><span> icon-ellipsis-vertical</span></li>
|
||||
<li><i class="icon-rss-sign"></i><span> icon-rss-sign</span></li>
|
||||
<li><i class="icon-play-sign"></i><span> icon-play-sign</span></li>
|
||||
<li><i class="icon-ticket"></i><span> icon-ticket</span></li>
|
||||
<li><i class="icon-minus-sign-alt"></i><span> icon-minus-sign-alt</span></li>
|
||||
<li><i class="icon-check-minus"></i><span> icon-check-minus</span></li>
|
||||
<li><i class="icon-level-up"></i><span> icon-level-up</span></li>
|
||||
<li><i class="icon-level-down"></i><span> icon-level-down</span></li>
|
||||
<li><i class="icon-check-sign"></i><span> icon-check-sign</span></li>
|
||||
<li><i class="icon-edit-sign"></i><span> icon-edit-sign</span></li>
|
||||
<li><i class="icon-external-link-sign"></i><span> icon-external-link-sign</span></li>
|
||||
<li><i class="icon-share-sign"></i><span> icon-share-sign</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
590
wp-content/themes/nuzi/framework/pagebuilder/pagebuilder.php
Normal file
@@ -0,0 +1,590 @@
|
||||
<?php
|
||||
add_action('admin_print_scripts', 'pagebuilder_admin_scripts');
|
||||
add_action('admin_print_styles', 'pagebuilder_admin_styles');
|
||||
if (!function_exists('pagebuilder_admin_scripts')) {
|
||||
function pagebuilder_admin_scripts() {
|
||||
global $pagenow,$post_type;
|
||||
if (current_user_can('edit_posts') && ($pagenow == 'post-new.php' || $pagenow == 'post.php') && ($post_type==='page'||$post_type==='post'||$post_type==='portfolio'||$post_type==='partner'||$post_type==='price'||$post_type==='testimonial')) {
|
||||
wp_register_script('post-pagebuilder', THEME_DIR . '/framework/assets/js/pagebuilder.js');
|
||||
wp_enqueue_script('post-pagebuilder');
|
||||
wp_enqueue_script('farbtastic');
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!function_exists('pagebuilder_admin_styles')) {
|
||||
function pagebuilder_admin_styles() {
|
||||
global $pagenow,$post_type;
|
||||
if (current_user_can('edit_posts') && ($pagenow == 'post-new.php' || $pagenow == 'post.php') && ($post_type==='page'||$post_type==='post'||$post_type==='portfolio'||$post_type==='partner'||$post_type==='price'||$post_type==='testimonial')) {
|
||||
wp_enqueue_style('farbtastic');
|
||||
wp_register_style('post-pagebuilder', THEME_DIR . '/framework/assets/css/pagebuilder.css', false, '1.00', 'screen');
|
||||
wp_register_style('font-awesome', THEME_DIR . '/assets/css/font-awesome/font-awesome.min.css', false, '1.00', 'screen');
|
||||
wp_enqueue_style('post-pagebuilder');
|
||||
wp_enqueue_style('font-awesome');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//====== START - Globals ======
|
||||
global $tw_pbItems, $tw_pbHeadSettings;
|
||||
//Sidebar
|
||||
$arraySidebar = array("Default sidebar" => "Default sidebar");
|
||||
$sidebars = get_option('sbg_sidebars');
|
||||
if (!empty($sidebars)) {
|
||||
foreach ($sidebars as $sidebar) {
|
||||
$arraySidebar[$sidebar] = $sidebar;
|
||||
}
|
||||
}
|
||||
//Slider
|
||||
global $wpdb;
|
||||
$table_name = $wpdb->prefix . "revslider_sliders";
|
||||
$sliders = $wpdb->get_results( "SELECT * FROM $table_name" );
|
||||
$arraySlider = array("0" => "Select Slider");
|
||||
if(!empty($sliders)) {
|
||||
foreach($sliders as $item) {
|
||||
$name = empty($item->title) ? ('Unnamed('.$item->id.')') : $item->title;
|
||||
$arraySlider[$item->id]=$name;
|
||||
}
|
||||
}
|
||||
//Link Target
|
||||
$linkTarget = array("_blank" => "Blank", "_self" => "Self");
|
||||
//Yes No
|
||||
$arrayYesNo = array("true" => "Yes", "false" => "No");
|
||||
//Post Type
|
||||
$arrayPostType = array("post" => "Post", "portfolio" => "Portfolio");
|
||||
//Post Catigories
|
||||
$categories = get_categories("hide_empty=0");
|
||||
$post_categories = array("0" => "Select Category");
|
||||
if(!empty($categories)) {
|
||||
foreach ($categories as $category) {
|
||||
$post_categories["$category->term_id"] = $category->name;
|
||||
}
|
||||
}
|
||||
//Portfolio Catigories
|
||||
$portfolios = get_terms('portfolios', 'hide_empty=0');
|
||||
$port_categories = array("0" => "Select Category");
|
||||
if(!empty($portfolios)) {
|
||||
foreach ($portfolios as $portfolio) {
|
||||
$port_categories["$portfolio->term_id"] = $portfolio->name;
|
||||
}
|
||||
}
|
||||
//Pricing Table Catigories
|
||||
$prices = get_terms('prices', 'hide_empty=0');
|
||||
$price_categories = array("0" => "Select Category");
|
||||
if(!empty($prices)) {
|
||||
foreach ($prices as $price) {
|
||||
$price_categories["$price->term_id"] = $price->name;
|
||||
}
|
||||
}
|
||||
//Team Catigories
|
||||
$teams = get_terms('position', 'hide_empty=0');
|
||||
$team_categories = array("0" => "Select Category");
|
||||
if(!empty($teams)) {
|
||||
foreach ($teams as $team) {
|
||||
$team_categories["$team->term_id"] = $team->name;
|
||||
}
|
||||
}
|
||||
//Testimonials Catigories
|
||||
$testimonials = get_terms('testimonials', 'hide_empty=0');
|
||||
$testim_categories = array("0" => "Select Category");
|
||||
if(!empty($testimonials)) {
|
||||
foreach ($testimonials as $testimonial) {
|
||||
$testim_categories["$testimonial->term_id"] = $testimonial->name;
|
||||
}
|
||||
}
|
||||
//includes
|
||||
require_once (THEME_PATH . "/framework/pagebuilder/elements.php");
|
||||
require_once (THEME_PATH . "/framework/pagebuilder/pagebuilder_render.php");
|
||||
//====== END - Globals ======
|
||||
//====== START - Functions ======
|
||||
if (!function_exists('pbInitGlobalScripts')) {
|
||||
function pbInitGlobalScripts() {
|
||||
global $post;
|
||||
$pID='';
|
||||
if(isset($post->ID)){
|
||||
$pID=$post->ID;
|
||||
}
|
||||
echo'<script type="text/javascript">var $homeURI="' . home_url() . '";var pID="' . $pID . '";</script>';
|
||||
}
|
||||
} add_action('admin_footer', 'pbInitGlobalScripts');
|
||||
|
||||
if (!function_exists('pbTextToFoundation')) {
|
||||
function pbTextToFoundation($size = '1 / 3') {
|
||||
switch ($size) {
|
||||
case'size-1-4' :
|
||||
case'1 / 4' : {
|
||||
$size = 'span3';
|
||||
break;
|
||||
}
|
||||
case'size-1-3' :
|
||||
case'1 / 3' : {
|
||||
$size = 'span4';
|
||||
break;
|
||||
}
|
||||
case'size-1-2' :
|
||||
case'1 / 2' : {
|
||||
$size = 'span6';
|
||||
break;
|
||||
}
|
||||
case'size-2-3' :
|
||||
case'2 / 3' : {
|
||||
$size = 'span8';
|
||||
break;
|
||||
}
|
||||
case'size-3-4' :
|
||||
case'3 / 4' : {
|
||||
$size = 'span9';
|
||||
break;
|
||||
}
|
||||
case'size-1-1' :
|
||||
case'1 / 1' : {
|
||||
$size = 'span12';
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $size;
|
||||
}
|
||||
}
|
||||
if (!function_exists('pbTextToInt')) {
|
||||
function pbTextToInt($size = '1 / 3') {
|
||||
switch ($size) {
|
||||
case'size-1-4' :
|
||||
case'1 / 4' : {
|
||||
$size = 3;
|
||||
break;
|
||||
}
|
||||
case'size-1-3' :
|
||||
case'1 / 3' : {
|
||||
$size = 4;
|
||||
break;
|
||||
}
|
||||
case'size-1-2' :
|
||||
case'1 / 2' : {
|
||||
$size = 6;
|
||||
break;
|
||||
}
|
||||
case'size-2-3' :
|
||||
case'2 / 3' : {
|
||||
$size = 8;
|
||||
break;
|
||||
}
|
||||
case'size-3-4' :
|
||||
case'3 / 4' : {
|
||||
$size = 9;
|
||||
break;
|
||||
}
|
||||
case'size-1-1' :
|
||||
case'1 / 1' : {
|
||||
$size = 12;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $size;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('pbSizeToText')) {
|
||||
function pbSizeToText($size = 'size-1-3') {
|
||||
switch ($size) {
|
||||
case'size-1-4' : {
|
||||
$size = '1 / 4';
|
||||
break;
|
||||
}
|
||||
case'size-1-3' : {
|
||||
$size = '1 / 3';
|
||||
break;
|
||||
}
|
||||
case'size-1-2' : {
|
||||
$size = '1 / 2';
|
||||
break;
|
||||
}
|
||||
case'size-2-3' : {
|
||||
$size = '2 / 3';
|
||||
break;
|
||||
}
|
||||
case'size-3-4' : {
|
||||
$size = '3 / 4';
|
||||
break;
|
||||
}
|
||||
case'size-1-1' : {
|
||||
$size = '1 / 1';
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $size;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('pbTextToSize')) {
|
||||
function pbTextToSize($size = '1 / 3') {
|
||||
switch ($size) {
|
||||
case'1 / 4' : {
|
||||
$size = 'size-1-4';
|
||||
break;
|
||||
}
|
||||
case'1 / 3' : {
|
||||
$size = 'size-1-3';
|
||||
break;
|
||||
}
|
||||
case'1 / 2' : {
|
||||
$size = 'size-1-2';
|
||||
break;
|
||||
}
|
||||
case'2 / 3' : {
|
||||
$size = 'size-2-3';
|
||||
break;
|
||||
}
|
||||
case'3 / 4' : {
|
||||
$size = 'size-3-4';
|
||||
break;
|
||||
}
|
||||
case'1 / 1' : {
|
||||
$size = 'size-1-1';
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $size;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('getItemField')) {
|
||||
function getItemField($itemSlug, $itemArray) {
|
||||
$title = isset($itemArray['title']) ? $itemArray['title'] : '';
|
||||
$type = isset($itemArray['type']) ? $itemArray['type'] : '';
|
||||
$default = isset($itemArray['default']) ? $itemArray['default'] : '';
|
||||
$desc = isset($itemArray['desc']) ? $itemArray['desc'] : '';
|
||||
$holder = isset($itemArray['holder']) ? $itemArray['holder'] : '';
|
||||
$selector = isset($itemArray['selector']) ? $itemArray['selector'] : '';
|
||||
$save_to = isset($itemArray['save_to']) ? $itemArray['save_to'] : '';
|
||||
$tinyMCE = isset($itemArray['tinyMCE']) ? $itemArray['tinyMCE'] : '';
|
||||
$class = 'field'; ?>
|
||||
<div class="field-item<?php echo $type === 'hidden' ? ' hidden' : ''; echo' type-' . $type; echo $tinyMCE?' editor':''; ?>"><?php
|
||||
if($type!='container'){
|
||||
echo '<div class="field-title">'.$title.'</div>';
|
||||
$default = rawUrlDecode($default);
|
||||
} ?>
|
||||
<div class="field-data"><?php
|
||||
switch ($type) {
|
||||
case 'fa' : { ?>
|
||||
<div class="button show-fa-modal"><?php _e('Add Icon','themewaves'); ?></div>
|
||||
<div class="button remove-fa"><?php _e('Delete Icon','themewaves'); ?></div>
|
||||
<div class="fa-viewer"></div>
|
||||
<?php
|
||||
break;
|
||||
}
|
||||
case 'hidden':
|
||||
case 'button':
|
||||
case 'text' : { ?>
|
||||
<input data-name="<?php echo $itemSlug; ?>" data-type="<?php echo $type; ?>" class="<?php echo $class; ?>" value="<?php echo $default; ?>" placeholder="<?php echo $holder; ?>" data-selector="<?php echo $selector; ?>" data-save-to="<?php echo $save_to; ?>" type="<?php echo $type; ?>" /><?php
|
||||
if (!empty($itemArray['data'])) {
|
||||
global $tw_pbItems;
|
||||
echo '<div class="data hidden">';
|
||||
$tmpItem = $itemArray['data']['item'];
|
||||
$tmpSettings = $itemArray['data']['settings'];
|
||||
getItemField($tmpSettings, $tw_pbItems[$tmpItem]['settings'][$tmpSettings]);
|
||||
echo '</div>';
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'color': { ?>
|
||||
<div style="background-color: <?php echo empty($default)?'':$default; ?>;" class="color-info"></div>
|
||||
<input data-name="<?php echo $itemSlug; ?>" data-type="<?php echo $type; ?>" class="<?php echo $class; ?>" value="<?php echo empty($default)?'':$default; ?>" placeholder="<?php echo $holder; ?>" type="text" /><?php
|
||||
break;
|
||||
}
|
||||
case 'checkbox': { ?>
|
||||
<input data-name="<?php echo $itemSlug; ?>" data-type="<?php echo $type; ?>" class="<?php echo $class; ?> hidden" value="<?php echo $default; ?>" placeholder="<?php echo $holder; ?>" type="checkbox" <?php echo $default==='true'?'checked':''; ?> />
|
||||
<div class="checkbox-text clearfix"><div class="checkbox-true"><?php _e('ON','themewaves'); ?></div><div class="checkbox-false"><?php _e('OFF','themewaves'); ?></div></div><?php
|
||||
break;
|
||||
}
|
||||
case 'textArea': { ?>
|
||||
<textarea data-name="<?php echo $itemSlug; ?>" data-type="<?php echo $type; ?>" class="<?php echo $class; ?>" placeholder="<?php echo $holder; ?>" data-tinyMCE="<?php echo $tinyMCE; ?>" ><?php echo $default; ?></textarea><?php
|
||||
break;
|
||||
}
|
||||
case 'category':
|
||||
case 'select': { ?>
|
||||
<select data-name="<?php echo $itemSlug; ?>" data-type="<?php echo $type; ?>" class="<?php echo $class; ?>"><?php
|
||||
$hide = isset($itemArray['hide']) ? $itemArray['hide'] : '';
|
||||
foreach ($itemArray['options'] as $val => $text) {
|
||||
echo '<option value="' . $val . '"' . ($default === strval($val) ? ' selected="selected"' : '') . ' hide="' . (isset($hide[$val]) ? $hide[$val] : '') . '">' . $text . '</option>';
|
||||
} ?>
|
||||
</select>
|
||||
<span class="select-text"></span><?php
|
||||
if($type === 'category'){
|
||||
echo '<div class="category-list-container"></div>';
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'container': {
|
||||
$title_as = isset($itemArray['title_as']) ? $itemArray['title_as'] : '';
|
||||
$add_button = isset($itemArray['add_button']) ? $itemArray['add_button'] : '';
|
||||
$container_type = isset($itemArray['container_type']) ? $itemArray['container_type'] : ''; ?>
|
||||
<div data-name="<?php echo $itemSlug; ?>" data-type="<?php echo $type; ?>" data-container-type="<?php echo $container_type; ?>" class="<?php echo $class; ?> container" placeholder="<?php echo $holder; ?>" data-title-as="<?php echo $title_as; ?>" data-add-button="<?php echo $add_button; ?>" ><?php
|
||||
if(!empty($default)) {
|
||||
foreach ($default as $data) { ?>
|
||||
<div class="container-item<?php echo $container_type==='image_slider'?' expanded':''; ?>">
|
||||
<div class="list clearfix">
|
||||
<div class="name"><?php echo $data[$title_as]['default']; ?></div>
|
||||
<div class="actions">
|
||||
<a href="#" class="action-expand"><span class="opened">-</span><span class="closed">+</span></a>
|
||||
<a href="#" class="action-duplicate" title="Duplicate">D</a>
|
||||
<a href="#" class="action-delete" title="Delete">X</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content"><?php
|
||||
if($container_type==='image_slider'){
|
||||
echo '<img class="image-src" src="'.rawUrlDecode($data[$title_as]['default']).'" />';
|
||||
}
|
||||
$faPrint=true;
|
||||
foreach ($data as $slug => $setting) {
|
||||
if(isset($setting['need_fa'])&&$setting['need_fa']==='true'&&$faPrint){
|
||||
echo getItemField('fa', array("type"=> "fa"));
|
||||
}
|
||||
if($slug==='fa'){$faPrint=false;}
|
||||
echo getItemField($slug, $setting);
|
||||
} ?>
|
||||
</div>
|
||||
</div><?php
|
||||
}
|
||||
}?>
|
||||
</div><?php
|
||||
break;
|
||||
}
|
||||
} ?>
|
||||
</div><?php
|
||||
if($type!='container'){ echo '<div class="field-desc">'.$desc.'</div>';} ?>
|
||||
</div><?php
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('pbGetItem')) {
|
||||
function pbGetItem($itemSlug, $itemNewData = array()) {
|
||||
global $tw_pbHeadSettings, $tw_pbItems;
|
||||
$itemArray = $tw_pbItems[$itemSlug];
|
||||
$itemArray['size'] = empty($itemNewData['size']) ? $itemArray['size'] : pbTextToSize($itemNewData['size']);
|
||||
ob_start();
|
||||
?>
|
||||
<div class="item <?php echo $itemArray['size']; ?>" data-slug="<?php echo $itemSlug; ?>"<?php if(isset($itemArray['min-size'])){echo ' data-min="'.$itemArray['min-size'].'"';} ?> data-help="<?php echo isset($itemArray['help'])?$itemArray['help']:''; ?>" title="<?php echo $itemSlug; ?>">
|
||||
<div class="thumb"><span class="<?php echo $itemSlug; ?>"></span><?php echo $itemArray['name']; ?></div>
|
||||
<div class="list clearfix">
|
||||
<div class="size-sizer-container">
|
||||
<div class="size"><?php echo pbSizeToText($itemArray['size']); ?></div>
|
||||
<div class="sizer"><a class="up" href="#">+</a><a class="down" href="#">-</a></div>
|
||||
</div>
|
||||
<div class="name"><?php echo $itemArray['name']; ?></div>
|
||||
<div class="actions">
|
||||
<a href="#" class="action-edit">E</a>
|
||||
<a href="#" class="action-duplicate">D</a>
|
||||
<a href="#" class="action-delete">X</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="data">
|
||||
<div class="general-field-container"><?php
|
||||
foreach ($tw_pbHeadSettings as $pbHeadSettingSlug => $pbHeadSetting) {
|
||||
$pbHeadSetting['default'] = isset($itemNewData[$pbHeadSettingSlug]) ? $itemNewData[$pbHeadSettingSlug] : $pbHeadSetting['default'];
|
||||
echo getItemField($pbHeadSettingSlug, $pbHeadSetting);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="custom-field-container"><?php
|
||||
foreach ($itemArray['settings'] as $pbItemSettingSlug => $pbItemSetting) {
|
||||
if ($pbItemSetting['type'] === 'container' && isset($itemNewData['settings'][$pbItemSettingSlug])) {
|
||||
$templateContainerItem = $pbItemSetting['default'][0];
|
||||
foreach ($itemNewData['settings'][$pbItemSettingSlug] as $index => $containerItemNewData) {
|
||||
foreach ($containerItemNewData as $containerItemNewFieldSlug => $containerItemNewFieldValue) {
|
||||
$templateContainerItem[$containerItemNewFieldSlug]['default'] = $containerItemNewFieldValue;
|
||||
$itemNewData['settings'][$pbItemSettingSlug][$index][$containerItemNewFieldSlug] = $templateContainerItem[$containerItemNewFieldSlug];
|
||||
}
|
||||
}
|
||||
}
|
||||
$pbItemSetting['default'] = isset($itemNewData['settings'][$pbItemSettingSlug]) ? $itemNewData['settings'][$pbItemSettingSlug] : $pbItemSetting['default'];
|
||||
echo getItemField($pbItemSettingSlug, $pbItemSetting);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div><?php
|
||||
$output = ob_get_clean();
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
if (!function_exists('pbSection')) {
|
||||
function pbSection() {
|
||||
add_meta_box('cmeta_pagebuilder', __('Page Builder', 'cmeta_pagebuilder_td'), 'pbSectionBox', 'page', 'normal', 'high');
|
||||
}
|
||||
}
|
||||
if (tw_option('pagebuilder')){
|
||||
add_action('admin_print_styles', 'pbSection', 1);
|
||||
}
|
||||
|
||||
if (!function_exists('pbSectionBox')) {
|
||||
function pbSectionBox() {
|
||||
global $post, $tw_pbItems;
|
||||
$items = '';
|
||||
$_pb_content_area = '';
|
||||
$_pb_content_area_layouts = '';
|
||||
$_pb_content = get_post_meta($post->ID, '_pb_content', true);
|
||||
$_pb_layout_array = json_decode(rawUrlDecode($_pb_content), true);
|
||||
$pbLayoutCount=0;
|
||||
if(!empty($_pb_layout_array)){
|
||||
foreach($_pb_layout_array as $_pb_layout){
|
||||
$pbLayoutCount++;
|
||||
$_layout_open='<div class="clearfix builder-area '.$_pb_layout['size'].'">';
|
||||
$_pb_content_area_layouts .= $_layout_open;
|
||||
$_pb_content_area .= $_layout_open;
|
||||
foreach ($_pb_layout['items'] as $item_array) {
|
||||
$_pb_content_area .= pbGetItem($item_array['slug'], $item_array);
|
||||
}
|
||||
$_layout_close='</div>';
|
||||
$_pb_content_area_layouts .= $_layout_close;
|
||||
$_pb_content_area .= $_layout_close;
|
||||
}
|
||||
}
|
||||
while($pbLayoutCount++<3){
|
||||
$_empty_layout = '<div class="clearfix 2 builder-area size-"></div>';
|
||||
$_pb_content_area .= $_empty_layout;
|
||||
$_pb_content_area_layouts .= $_empty_layout;
|
||||
}
|
||||
$templates = '<div class="tw-template-container">';
|
||||
$templates .= '<div id="template-save" class="dropdown" tabindex="1">';
|
||||
$templates .= '<div class="template"><span class="image-save"></span>Templates</div>';
|
||||
$templates .= '<ul class="dropdown template-container">';
|
||||
$templates .= '<li class="template-item"><a class="template-add">Save this to Template</a></li>';
|
||||
$templates_array = get_option('tw_pb_'.strtolower(THEMENAME).'_templates');
|
||||
if ($templates_array !== false) {
|
||||
foreach ($templates_array as $templates_name => $templates_content) {
|
||||
$templates .= '<li class="template-item"><a class="template-name">' . $templates_name . '</a><span class="template-delete">X</span></li>';
|
||||
}
|
||||
}
|
||||
$templates .= '</ul>';
|
||||
$templates .= '</div>';
|
||||
$templates .= '</div>';
|
||||
|
||||
wp_nonce_field(plugin_basename(__FILE__), 'myplugin_noncename');
|
||||
foreach ($tw_pbItems as $pbItemSlug => $pbItemArray) {
|
||||
if(empty($pbItemArray['only']) || $pbItemArray['only']==='builder'){
|
||||
$items .= pbGetItem($pbItemSlug);
|
||||
}
|
||||
}
|
||||
$pbLayout = get_metabox('layout');
|
||||
if($pbLayout===''){$pbLayout='full';};
|
||||
$pbLayouts = '<a href="#" class="sidebar left-sidebar'.($pbLayout==='left'?' active':'').'" data-value="1-4,3-4,0-0" data-input="left">Left Sidebar</a>
|
||||
<a href="#" class="sidebar full'.($pbLayout==='full'?' active':'').'" data-value="0-0,1-1,0-0" data-input="full">Full</a>
|
||||
<a href="#" class="sidebar right-sidebar'.($pbLayout==='right'?' active':'').'" data-value="0-0,3-4,1-4" data-input="right">Right Sidebar</a>';
|
||||
echo '<div class="pagebuilder-container">
|
||||
<div class="pagebuilder-head-container">
|
||||
<div class="tw-one">
|
||||
<h4>Select Page Layout</h4>
|
||||
<span>Choose the layout for this page.</span>
|
||||
</div>
|
||||
<div class="tw-two" id="pagebuilder-select-layout" class="clearfix">
|
||||
<input name="pb-page-layout" class="page-layout" type="hidden" value="'.$pbLayout.'" />' . $pbLayouts . '
|
||||
</div>
|
||||
</div>
|
||||
<div class="pagebuilder-head-container">
|
||||
<div class="tw-one">
|
||||
<h4>Select Your Element</h4>
|
||||
<span>Choose the layout for this page.</span>
|
||||
</div>
|
||||
<div class="tw-two" class="clearfix">
|
||||
<div id="pagebuilder-elements-container" class="clearfix">' . $items . '</div>
|
||||
</div>
|
||||
</div>
|
||||
<textarea id="pb_content" name="pb_content" class="hidden">' . $_pb_content . '</textarea>
|
||||
<ul id="size-list" class="hidden">
|
||||
<li data-class="size-1-4" data-text="1 / 4" class="min"></li>
|
||||
<li data-class="size-1-3" data-text="1 / 3"></li>
|
||||
<li data-class="size-1-2" data-text="1 / 2"></li>
|
||||
<li data-class="size-2-3" data-text="2 / 3"></li>
|
||||
<li data-class="size-3-4" data-text="3 / 4"></li>
|
||||
<li data-class="size-1-1" data-text="1 / 1" class="max"></li>
|
||||
</ul>
|
||||
' . $templates . '
|
||||
<div id="pagebuilder-area" class="clearfix">'.$_pb_content_area_layouts.'</div>
|
||||
<div id="pagebuilder-area-source" class="hidden">' . $_pb_content_area . '</div>
|
||||
</div>';
|
||||
}
|
||||
}
|
||||
|
||||
// Save fields data
|
||||
if (!function_exists('pbSectionBoxSavePostData')) {
|
||||
function pbSectionBoxSavePostData($post_id) {
|
||||
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
|
||||
return $post_id;
|
||||
if (isset($_GET['post_type']) && 'page' == $_GET['post_type']) {
|
||||
if (!current_user_can('edit_page', $post_id))
|
||||
return $post_id;
|
||||
} else {
|
||||
if (!current_user_can('edit_post', $post_id))
|
||||
return $post_id;
|
||||
}
|
||||
if (isset($_POST['pb_content'])) {
|
||||
update_post_meta($post_id, '_pb_content', $_POST['pb_content']);
|
||||
}
|
||||
if (isset($_POST['pb_content'])) {
|
||||
set_metabox('layout',$_POST['pb-page-layout']);
|
||||
}
|
||||
}
|
||||
} add_action('save_post', 'pbSectionBoxSavePostData');
|
||||
|
||||
// Template Ajax Action
|
||||
if (!function_exists('pbTemplateAdd') && is_user_logged_in()) {
|
||||
function pbTemplateAdd() {
|
||||
if (isset($_REQUEST['template_name']) && isset($_REQUEST['template_layout']) && isset($_REQUEST['template_content'])) {
|
||||
$response = '';
|
||||
$templates_array = get_option('tw_pb_'.strtolower(THEMENAME).'_templates');
|
||||
if (isset($templates_array[$_REQUEST['template_name']])) {
|
||||
$response .= '<div class="error">' . __('Template name is allready exist. Please insert the template name and try again', 'themewaves') . '</div>';
|
||||
} else {
|
||||
$templates_array[$_REQUEST['template_name']] = array(
|
||||
'layout' => $_REQUEST['template_layout'],
|
||||
'content' => $_REQUEST['template_content']
|
||||
);
|
||||
update_option('tw_pb_'.strtolower(THEMENAME).'_templates', $templates_array);
|
||||
$response .= '<div class="succes">' . __('Template added', 'themewaves') . '</div>';
|
||||
}
|
||||
die('<div class="response">' . $response . '</div>');
|
||||
}
|
||||
}
|
||||
} add_action('wp_ajax_template_add', 'pbTemplateAdd');
|
||||
|
||||
if (!function_exists('pbTemplateGet') && is_user_logged_in()) {
|
||||
function pbTemplateGet() {
|
||||
if (isset($_REQUEST['template_name'])) {
|
||||
$response = '';
|
||||
$templates_array = get_option('tw_pb_'.strtolower(THEMENAME).'_templates');
|
||||
if (isset($templates_array[$_REQUEST['template_name']])) {
|
||||
$template = $templates_array[$_REQUEST['template_name']];
|
||||
$response .= '<div class="data">';
|
||||
$response .= '<div class="layout">' . $template['layout'] . '</div>';
|
||||
$response .= '<div class="content">'. rawUrlDecode($template['content']) . '</div>';
|
||||
$response .= '</div>';
|
||||
} else {
|
||||
$response .= '<div class="error">' . __('Template name not exsist', 'themewaves') . '</div>';
|
||||
}
|
||||
die('<div class="response">' . $response . '</div>');
|
||||
}
|
||||
}
|
||||
} add_action('wp_ajax_template_get', 'pbTemplateGet');
|
||||
|
||||
if (!function_exists('pbTemplateRemove') && is_user_logged_in()) {
|
||||
function pbTemplateRemove() {
|
||||
if (isset($_REQUEST['template_name'])) {
|
||||
$response = '';
|
||||
$templates_array = get_option('tw_pb_'.strtolower(THEMENAME).'_templates');
|
||||
if (isset($templates_array[$_REQUEST['template_name']])) {
|
||||
unset($templates_array[$_REQUEST['template_name']]);
|
||||
update_option('tw_pb_'.strtolower(THEMENAME).'_templates', $templates_array);
|
||||
} else {
|
||||
$response .= '<div class="error">' . __('Template name not exsist', 'themewaves') . '</div>';
|
||||
}
|
||||
die('<div class="response">' . $response . '</div>');
|
||||
}
|
||||
}
|
||||
} add_action('wp_ajax_template_remove', 'pbTemplateRemove');
|
||||
|
||||
if (!function_exists('pbGetFontawesome') && is_user_logged_in()) {
|
||||
function pbGetFontawesome() {
|
||||
require_once (THEME_PATH . "/framework/pagebuilder/font-awesome.php");
|
||||
die();
|
||||
}
|
||||
} add_action('wp_ajax_get_fontawesome', 'pbGetFontawesome');
|
||||
//====== END - Functions ====== ?>
|
||||
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
if (!function_exists('rowStart')) {
|
||||
function rowStart($colCounter,$size){
|
||||
if($colCounter===0||$colCounter===12||$colCounter+$size>12 ){return array($size,'true');}
|
||||
return array($colCounter+$size,'false');
|
||||
}
|
||||
}
|
||||
if (!function_exists('pbGetContentBuilderItem')) {
|
||||
function pbGetContentBuilderItem($item_array) {
|
||||
global $tw_pbItems,$tw_layoutSize;
|
||||
ob_start();
|
||||
$itemSlug = $item_array['slug'];
|
||||
$itemSettingsArray = $item_array['settings'];
|
||||
$defaultItem=$tw_pbItems[$itemSlug];
|
||||
$defaultItemSettingsArray=$defaultItem['settings'];
|
||||
$itemClass = !empty($item_array['item_custom_class']) ? $item_array['item_custom_class'] : '';
|
||||
if($item_array['size']!=='shortcode-size'){
|
||||
echo '[tw_item size="'. pbTextToFoundation($item_array['size']).'" class="'.$itemClass.'" layout_size="'.pbTextToFoundation($tw_layoutSize).'" row_type="'.(isset($item_array['row-type'])?$item_array['row-type']:'row-fluid').'"]';
|
||||
}
|
||||
if(!empty($item_array['item_title'])){
|
||||
echo'[tw_item_title title="'.$item_array['item_title'].'"]';
|
||||
}
|
||||
$content_slug= empty($defaultItem['content'])?'':$defaultItem['content'];
|
||||
echo '[tw_'.$itemSlug;
|
||||
if($itemSlug==='portfolio'){echo ' layout_size="'.pbTextToFoundation($tw_layoutSize).'"';}
|
||||
foreach($defaultItemSettingsArray as $settings_slug=>$default_settings_array){
|
||||
if($content_slug!==$settings_slug&&$default_settings_array['type']!='category'&&$default_settings_array['type']!='button'&&$default_settings_array['type']!='fa'){
|
||||
$settings_val=isset($itemSettingsArray[$settings_slug])?$itemSettingsArray[$settings_slug]:(isset($default_settings_array['default'])?$default_settings_array['default']:'');
|
||||
echo ' '.$settings_slug.'="'.rawUrlDecode($settings_val).'"';
|
||||
}
|
||||
}
|
||||
echo ']';
|
||||
if($content_slug){
|
||||
$settings_val='';
|
||||
if($defaultItemSettingsArray[$content_slug]['type']==='container'&&isset($defaultItemSettingsArray[$content_slug]['default'][0])){
|
||||
$defaultContainarItem=$defaultItemSettingsArray[$content_slug]['default'][0];
|
||||
$containarItemArray =$itemSettingsArray[$content_slug];
|
||||
foreach($containarItemArray as $index=>$containarItem){
|
||||
$containarItemContent='';
|
||||
$settings_val .= '[tw_'.$itemSlug.'_item';
|
||||
foreach($containarItem as $slug=>$value){
|
||||
if($defaultContainarItem[$slug]['type']!='category'&&$defaultContainarItem[$slug]['type']!='button'&&$defaultContainarItem[$slug]['type']!='fa'){
|
||||
if($defaultContainarItem[$slug]['type']==='textArea'){
|
||||
$containarItemContent=rawUrlDecode($value);
|
||||
}else{
|
||||
$settings_val .= ' '.$slug.'="'.rawUrlDecode($value).'"';
|
||||
}
|
||||
}
|
||||
}
|
||||
$settings_val .= ']';
|
||||
if(!empty($containarItemContent)){
|
||||
$settings_val .= $containarItemContent.'[/tw_'.$itemSlug.'_item]';
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$settings_val=isset($itemSettingsArray[$content_slug])?$itemSettingsArray[$content_slug]:$defaultItemSettingsArray[$content_slug]['default'];
|
||||
$settings_val=rawUrlDecode($settings_val);
|
||||
}
|
||||
echo $settings_val.'[/tw_'.$itemSlug.']';
|
||||
}
|
||||
if($item_array['size']!=='shortcode-size'){ echo '[/tw_item]';}
|
||||
$output = ob_get_clean();
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
if (!function_exists('pbGetContentBuilder')) {
|
||||
function pbGetContentBuilder() {
|
||||
global $post, $tw_startPrinted,$tw_pbItems;
|
||||
$endPrint=false;
|
||||
ob_start();
|
||||
$_pb_layout_array=json_decode(rawUrlDecode(get_post_meta($post->ID, '_pb_content', true)),true);
|
||||
if(empty($_pb_layout_array)){
|
||||
return false;
|
||||
echo $post->post_content;
|
||||
}else{
|
||||
$layoutsEcho='';
|
||||
$layoutColCounter=0;
|
||||
$layoutStart='true';
|
||||
foreach($_pb_layout_array as $_pb_layout){
|
||||
$tw_startPrinted = false;
|
||||
if($_pb_layout['size']!=='size-0-0'){
|
||||
global $tw_layoutSize;
|
||||
$tw_layoutSize = $_pb_layout['size'];
|
||||
list($layoutColCounter,$layoutStart)=rowStart($layoutColCounter,$tw_layoutSize);
|
||||
$layoutsEcho .= '[tw_layout size="'.pbTextToFoundation($_pb_layout['size']).'" start="'.$layoutStart.'"]';
|
||||
$tw_startPrinted=false;
|
||||
$colCounter=0;
|
||||
$start='true';
|
||||
foreach ($_pb_layout['items'] as $item_array){
|
||||
list($colCounter,$start)=rowStart($colCounter,pbTextToFoundation($_pb_layout['size'])==='span3'?12:pbTextToInt($item_array['size']));
|
||||
$endPrint=true;
|
||||
$rowClass = $item_array['row-type'] = !empty($tw_pbItems[$item_array['slug']]['row-type'])?$tw_pbItems[$item_array['slug']]['row-type']:'row-fluid';
|
||||
if($start === "true") {
|
||||
if($tw_startPrinted){
|
||||
$layoutsEcho .= '</div><div class="'.$rowClass.'">';
|
||||
}else{
|
||||
$tw_startPrinted=true;
|
||||
$layoutsEcho .= '<div class="'.$rowClass.'">';
|
||||
}
|
||||
}
|
||||
$layoutsEcho .= pbGetContentBuilderItem($item_array);
|
||||
}
|
||||
//row Close
|
||||
if($tw_startPrinted){$layoutsEcho.="</div>";}
|
||||
$layoutsEcho .= '[/tw_layout]';
|
||||
|
||||
}
|
||||
}
|
||||
if($endPrint){
|
||||
echo $layoutsEcho;
|
||||
}else{
|
||||
return false;
|
||||
echo $post->post_content;
|
||||
}
|
||||
}
|
||||
$output = ob_get_clean();
|
||||
return $output;
|
||||
}
|
||||
} ?>
|
||||
102
wp-content/themes/nuzi/framework/plugins/install-plugin.php
Normal file
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
/**
|
||||
* This file represents an example of the code that themes would use to register
|
||||
* the required plugins.
|
||||
*
|
||||
* It is expected that theme authors would copy and paste this code into their
|
||||
* functions.php file, and amend to suit.
|
||||
*
|
||||
* @package TGM-Plugin-Activation
|
||||
* @subpackage Example
|
||||
* @version 2.3.6
|
||||
* @author Thomas Griffin <thomas@thomasgriffinmedia.com>
|
||||
* @author Gary Jones <gamajo@gamajo.com>
|
||||
* @copyright Copyright (c) 2012, Thomas Griffin
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GPL v2 or later
|
||||
* @link https://github.com/thomasgriffin/TGM-Plugin-Activation
|
||||
*/
|
||||
|
||||
/**
|
||||
* Include the TGM_Plugin_Activation class.
|
||||
*/
|
||||
require_once dirname( __FILE__ ) . '/class-tgm-plugin-activation.php';
|
||||
|
||||
add_action( 'tgmpa_register', 'my_theme_register_required_plugins' );
|
||||
/**
|
||||
* Register the required plugins for this theme.
|
||||
*
|
||||
* In this example, we register two plugins - one included with the TGMPA library
|
||||
* and one from the .org repo.
|
||||
*
|
||||
* The variable passed to tgmpa_register_plugins() should be an array of plugin
|
||||
* arrays.
|
||||
*
|
||||
* This function is hooked into tgmpa_init, which is fired within the
|
||||
* TGM_Plugin_Activation class constructor.
|
||||
*/
|
||||
function my_theme_register_required_plugins() {
|
||||
|
||||
/**
|
||||
* Array of plugin arrays. Required keys are name and slug.
|
||||
* If the source is NOT from the .org repo, then source is also required.
|
||||
*/
|
||||
$plugins = array(
|
||||
|
||||
// This is an example of how to include a plugin pre-packaged with a theme
|
||||
array(
|
||||
'name' => 'Revolution Slider', // The plugin name
|
||||
'slug' => 'revslider', // The plugin slug (typically the folder name)
|
||||
'source' => get_template_directory_uri() . '/framework/plugins/revslider.zip', // The plugin source
|
||||
'required' => true, // If false, the plugin is only 'recommended' instead of required
|
||||
'version' => '2.3.91', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented
|
||||
'force_activation' => true, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch
|
||||
'force_deactivation' => true, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins
|
||||
'external_url' => '', // If set, overrides default API URL and points to an external URL
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
// Change this to your theme text domain, used for internationalising strings
|
||||
$theme_text_domain = 'themewaves';
|
||||
|
||||
/**
|
||||
* Array of configuration settings. Amend each line as needed.
|
||||
* If you want the default strings to be available under your own theme domain,
|
||||
* leave the strings uncommented.
|
||||
* Some of the strings are added into a sprintf, so see the comments at the
|
||||
* end of each line for what each argument will be.
|
||||
*/
|
||||
$config = array(
|
||||
'domain' => $theme_text_domain, // Text domain - likely want to be the same as your theme.
|
||||
'default_path' => '', // Default absolute path to pre-packaged plugins
|
||||
'parent_menu_slug' => 'themes.php', // Default parent menu slug
|
||||
'parent_url_slug' => 'themes.php', // Default parent URL slug
|
||||
'menu' => 'install-required-plugins', // Menu slug
|
||||
'has_notices' => true, // Show admin notices or not
|
||||
'is_automatic' => false, // Automatically activate plugins after installation or not
|
||||
'message' => '', // Message to output right before the plugins table
|
||||
'strings' => array(
|
||||
'page_title' => __( 'Install Required Plugins', $theme_text_domain ),
|
||||
'menu_title' => __( 'Install Plugins', $theme_text_domain ),
|
||||
'installing' => __( 'Installing Plugin: %s', $theme_text_domain ), // %1$s = plugin name
|
||||
'oops' => __( 'Something went wrong with the plugin API.', $theme_text_domain ),
|
||||
'notice_can_install_required' => _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.' ), // %1$s = plugin name(s)
|
||||
'notice_can_install_recommended' => _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.' ), // %1$s = plugin name(s)
|
||||
'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' ), // %1$s = plugin name(s)
|
||||
'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s)
|
||||
'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s)
|
||||
'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' ), // %1$s = plugin name(s)
|
||||
'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.' ), // %1$s = plugin name(s)
|
||||
'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' ), // %1$s = plugin name(s)
|
||||
'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins' ),
|
||||
'activate_link' => _n_noop( 'Activate installed plugin', 'Activate installed plugins' ),
|
||||
'return' => __( 'Return to Required Plugins Installer', $theme_text_domain ),
|
||||
'plugin_activated' => __( 'Plugin activated successfully.', $theme_text_domain ),
|
||||
'complete' => __( 'All plugins installed and activated successfully. %s', $theme_text_domain ), // %1$s = dashboard link
|
||||
'nag_type' => 'updated' // Determines admin notice type - can only be 'updated' or 'error'
|
||||
)
|
||||
);
|
||||
|
||||
tgmpa( $plugins, $config );
|
||||
|
||||
}
|
||||
BIN
wp-content/themes/nuzi/framework/plugins/revslider.zip
Normal file
167
wp-content/themes/nuzi/framework/post-format.php
Normal file
@@ -0,0 +1,167 @@
|
||||
<?php
|
||||
|
||||
add_theme_support('post-formats', array('aside', 'video', 'audio', 'gallery', 'image', 'quote', 'status', 'link'));
|
||||
|
||||
$tw_image = array(
|
||||
// array( "name" => __('Enable Lightbox','framework'),
|
||||
// "desc" => __('Check this to enable the lightbox.','framework'),
|
||||
// "id" => "format_image_lightbox",
|
||||
// "type" => "select",
|
||||
// 'std' => 'no',
|
||||
// 'options' => array('yes' => 'Yes', 'no' => 'No'),
|
||||
// ),
|
||||
array( "name" => __('Upload images', 'framework'),
|
||||
"desc" => __('Select the images that should be upload to this gallery', 'framework'),
|
||||
"id" => "gallery_image_ids",
|
||||
"type" => 'gallery'
|
||||
),
|
||||
array( "name" => __('Image height', 'framework'),
|
||||
"desc" => __('Slider height', 'framework'),
|
||||
"id" => "format_image_height",
|
||||
"type" => 'text'
|
||||
)
|
||||
);
|
||||
|
||||
$tw_audio = array(
|
||||
array( "name" => __('MP3 File URL','framework'),
|
||||
"desc" => __('The URL to the .mp3 audio file','framework'),
|
||||
"id" => "format_audio_mp3",
|
||||
"type" => "text",
|
||||
'std' => ''
|
||||
),
|
||||
array( "name" => __('Embeded Code','framework'),
|
||||
"desc" => __('The embed code','framework'),
|
||||
"id" => "format_audio_embed",
|
||||
"type" => "textarea",
|
||||
'std' => ''
|
||||
)
|
||||
);
|
||||
|
||||
$tw_video = array(
|
||||
array( "name" => __('M4V File URL','framework'),
|
||||
"desc" => __('The URL to the .m4v video file','framework'),
|
||||
"id" => "format_video_m4v",
|
||||
"type" => "text",
|
||||
'std' => ''
|
||||
),
|
||||
array( "name" => __('Video Thumbnail Image','framework'),
|
||||
"desc" => __('The preivew image.','framework'),
|
||||
"id" => "format_video_thumb",
|
||||
"type" => "text",
|
||||
'std' => ''
|
||||
),
|
||||
array( "name" => __('Embeded Code','framework'),
|
||||
"desc" => __('If you\'re not using self hosted video then you can include embeded code here.','framework'),
|
||||
"id" => "format_video_embed",
|
||||
"type" => "textarea",
|
||||
'std' => ''
|
||||
)
|
||||
);
|
||||
|
||||
$tw_quote = array(
|
||||
array( "name" => __('The Quote','framework'),
|
||||
"desc" => __('Write your quote in this field.','framework'),
|
||||
"id" => "format_quote_text",
|
||||
"type" => "textarea",
|
||||
'std' => ''
|
||||
),
|
||||
array( "name" => __('The Author','framework'),
|
||||
"desc" => __('Write your author name of this.','framework'),
|
||||
"id" => "format_quote_author",
|
||||
"type" => "text",
|
||||
'std' => ''
|
||||
)
|
||||
);
|
||||
|
||||
$tw_link = array(
|
||||
array( "name" => __('The URL','framework'),
|
||||
"desc" => __('Insert the URL you wish to link to.','framework'),
|
||||
"id" => "format_link_url",
|
||||
"type" => "text",
|
||||
'std' => ''
|
||||
)
|
||||
);
|
||||
|
||||
$tw_status = array(
|
||||
array( "name" => __('The URL','framework'),
|
||||
"desc" => __('Insert the status URL.','framework'),
|
||||
"id" => "format_status_url",
|
||||
"type" => "text",
|
||||
'std' => ''
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
/* ================================================================================== */
|
||||
/* Add Metabox
|
||||
/* ================================================================================== */
|
||||
|
||||
add_action('admin_init', 'tw_post_format_add_box');
|
||||
if (!function_exists('tw_post_format_add_box')) {
|
||||
function tw_post_format_add_box() {
|
||||
global $tw_quote, $tw_image, $tw_link, $tw_audio, $tw_video, $tw_status;
|
||||
add_meta_box('tw-format-quote', __('Quote Settings', 'themewaves'), 'post_format_metabox', 'post', 'normal', 'high', $tw_quote);
|
||||
add_meta_box('tw-format-gallery', __('Gallery Settings', 'themewaves'), 'post_format_metabox', 'post', 'normal', 'high', $tw_image);
|
||||
add_meta_box('tw-format-link', __('Link Settings', 'themewaves'), 'post_format_metabox', 'post', 'normal', 'high', $tw_link);
|
||||
add_meta_box('tw-format-audio', __('Audio Settings', 'themewaves'), 'post_format_metabox', 'post', 'normal', 'high', $tw_audio);
|
||||
add_meta_box('tw-format-video', __('Video Settings', 'themewaves'), 'post_format_metabox', 'post', 'normal', 'high', $tw_video);
|
||||
add_meta_box('tw-format-status', __('Status Settings', 'themewaves'), 'post_format_metabox', 'post', 'normal', 'high', $tw_status);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* ================================================================================== */
|
||||
/* Callback function to show fields in meta box
|
||||
/* ================================================================================== */
|
||||
if (!function_exists('post_format_metabox')) {
|
||||
function post_format_metabox($post, $metabox) {
|
||||
global $post; ?>
|
||||
<input type="hidden" name="themewaves_postformat_box_nonce" value="<?php echo wp_create_nonce(basename(__FILE__));?>" />
|
||||
<table class="form-table tw-metaboxes">
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($metabox['args'] as $settings) {
|
||||
$options = get_post_meta($post->ID, $settings['id'], true);
|
||||
|
||||
$settings['value'] = !empty($options) ? $options : (isset($settings['std']) ? $settings['std'] : '');
|
||||
call_user_func('settings_'.$settings['type'], $settings);
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table><?php
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* ================================================================================== */
|
||||
/* Save post data
|
||||
/* ================================================================================== */
|
||||
|
||||
add_action('save_post', 'postformat_save_postdata');
|
||||
if (!function_exists('postformat_save_postdata')) {
|
||||
function postformat_save_postdata($post_id) {
|
||||
global $tw_image, $tw_audio, $tw_video, $tw_quote, $tw_link, $tw_status;
|
||||
|
||||
// verify nonce
|
||||
if (!isset($_POST['themewaves_postformat_box_nonce']) || !wp_verify_nonce($_POST['themewaves_postformat_box_nonce'], basename(__FILE__))) {
|
||||
return $post_id;
|
||||
}
|
||||
|
||||
// check autosave
|
||||
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
|
||||
return $post_id;
|
||||
}
|
||||
|
||||
// check permissions
|
||||
if (!current_user_can('edit_post', $post_id)) {
|
||||
return $post_id;
|
||||
}
|
||||
|
||||
$metaboxes = array_merge($tw_link, $tw_quote, $tw_audio, $tw_image, $tw_video, $tw_status);
|
||||
foreach ($metaboxes as $metabox) {
|
||||
$value = ( isset($_POST[$metabox['id']]) ) ? $_POST[$metabox['id']] : false;
|
||||
update_post_meta($post_id, $metabox['id'], stripslashes(htmlspecialchars($value)));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
230
wp-content/themes/nuzi/framework/post-type/metaboxes.php
Normal file
@@ -0,0 +1,230 @@
|
||||
<?php
|
||||
if (!function_exists('settings_checkbox')) {
|
||||
function settings_checkbox($settings){
|
||||
$default = $settings['value'];
|
||||
$datashow = $datahide = $klass = "";
|
||||
if (!empty($settings['hide'])) {
|
||||
$klass = " check-show-hide";
|
||||
$datahide = $settings['hide'];
|
||||
}
|
||||
if (!empty($settings['show'])) {
|
||||
$klass = " check-show-hide";
|
||||
$datashow = $settings['show'];
|
||||
} ?>
|
||||
<tr id="field_<?php echo $settings['id']; ?>">
|
||||
<th>
|
||||
<label for="<?php echo $settings['id']; ?>">
|
||||
<strong><?php echo $settings['name']; ?></strong>
|
||||
<span><?php echo $settings['desc']; ?></span>
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="hidden" name="<?php echo $settings['id']; ?>" id="<?php echo $settings['id']; ?>" value="0"/>
|
||||
<input type="checkbox" class="yesno<?php echo $klass;?>" id="<?php echo $settings['id']; ?>" data-show="<?php echo $datashow;?>" data-hide="<?php echo $datahide;?>" name="<?php echo $settings['id']; ?>" value="1" <?php echo checked($default, 1, false);?> />
|
||||
</td>
|
||||
</tr><?php
|
||||
}
|
||||
}
|
||||
if (!function_exists('settings_textarea')) {
|
||||
function settings_textarea($settings){ ?>
|
||||
<tr id="<?php echo $settings['id']; ?>">
|
||||
<th>
|
||||
<label for="<?php echo $settings['id']; ?>">
|
||||
<strong><?php echo $settings['name']; ?></strong>
|
||||
<span><?php echo $settings['desc']; ?></span>
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<textarea rows="5" name="<?php echo $settings['id']; ?>"><?php echo $settings['value']; ?></textarea>
|
||||
</td>
|
||||
</tr><?php
|
||||
}
|
||||
}
|
||||
if (!function_exists('settings_text')) {
|
||||
function settings_text($settings){ ?>
|
||||
<tr id="<?php echo $settings['id']; ?>">
|
||||
<th>
|
||||
<label for="<?php echo $settings['id']; ?>">
|
||||
<strong><?php echo $settings['name']; ?></strong>
|
||||
<span><?php echo $settings['desc']; ?></span>
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" name="<?php echo $settings['id']; ?>" id="<?php echo $settings['id']; ?>" value="<?php echo $settings['value']; ?>" />
|
||||
</td>
|
||||
</tr><?php
|
||||
}
|
||||
}
|
||||
if (!function_exists('settings_file')) {
|
||||
function settings_file($settings){ ?>
|
||||
<tr id="<?php echo $settings['id']; ?>">
|
||||
<th>
|
||||
<label for="<?php echo $settings['id']; ?>">
|
||||
<strong><?php echo $settings['name']; ?></strong>
|
||||
<span><?php echo $settings['desc']; ?></span>
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" id="<?php echo $settings['id']; ?>" name="<?php echo $settings['id']; ?>" value="<?php echo $settings['value']; ?>" placeholder="Your Custom BG Image URL" size=""/>
|
||||
<a href="#" class="button insert-images theme_button format" onclick="browseimage('<?php echo $settings['id']; ?>')"><?php _e('Insert image', "themewaves"); ?></a>
|
||||
</td>
|
||||
</tr><?php
|
||||
}
|
||||
}
|
||||
if (!function_exists('settings_selectbox')) {
|
||||
function settings_selectbox($settings){
|
||||
$settings['options'] = array('true', 'default', 'false'); ?>
|
||||
<tr id="<?php echo $settings['id']; ?>">
|
||||
<th>
|
||||
<label for="<?php echo $settings['id']; ?>">
|
||||
<strong><?php echo $settings['name']; ?></strong>
|
||||
<span><?php echo $settings['desc']; ?></span>
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<select class="selectbox" name="<?php echo $settings['id']; ?>" data-value="<?php print $settings['value'];?>"><?php
|
||||
foreach ($settings['options'] as $meta) {
|
||||
echo '<option value="' . $meta . '" ';
|
||||
echo $meta == $settings['value'] ? 'selected ' : '';
|
||||
echo '>' . $meta . '</option>';
|
||||
} ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr><?php
|
||||
}
|
||||
}
|
||||
if (!function_exists('settings_layoutpage')) {
|
||||
function settings_layoutpage($settings){}
|
||||
}
|
||||
if (!function_exists('settings_layout')) {
|
||||
function settings_layout($settings){ ?>
|
||||
<tr id="<?php echo $settings['id']; ?>">
|
||||
<th>
|
||||
<label for="<?php echo $settings['id']; ?>">
|
||||
<strong><?php echo $settings['name']; ?></strong>
|
||||
<span><?php echo $settings['desc']; ?></span>
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<div class="type_layout">
|
||||
<a href="javascript:;" data-value="left" class="left-sidebar"></a>
|
||||
<a href="javascript:;" data-value="right" class="right-sidebar"></a>
|
||||
<a href="javascript:;" data-value="full" class="without-sidebar"></a>
|
||||
<input name="<?php echo $settings['id'];?>" type="hidden" value="<?php echo $settings['value'];?>" />
|
||||
</div>
|
||||
</td>
|
||||
</tr><?php
|
||||
}
|
||||
}
|
||||
if (!function_exists('settings_radio')) {
|
||||
function settings_radio($settings){ ?>
|
||||
<tr id="<?php echo $settings['id']; ?>">
|
||||
<td>
|
||||
<label for="<?php echo $settings['id']; ?>"><?php echo $settings['name']; ?></label>
|
||||
<div class="type_radio"><?php
|
||||
foreach ($settings['options'] as $option) {
|
||||
print '<input type="radio" style="margin-right:5px;" name="' . $settings['name'] . '" value="' . $option . '" ';
|
||||
print $option == $settings['value'] ? 'checked ' : '';
|
||||
print '><span style="margin-right:20px;">' . $option . '</span><br />';
|
||||
} ?>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo $settings['desc']; ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr><?php
|
||||
}
|
||||
}
|
||||
if (!function_exists('settings_color')) {
|
||||
function settings_color($settings){ ?>
|
||||
<tr id="<?php echo $settings['id']; ?>">
|
||||
<th>
|
||||
<label for="<?php echo $settings['id']; ?>">
|
||||
<strong><?php echo $settings['name']; ?></strong>
|
||||
<span><?php echo $settings['desc']; ?></span>
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<div class="color_selector">
|
||||
<div class="color_picker"><div style="background-color: <?php echo $settings['value']; ?>;" class="color_picker_inner"></div></div>
|
||||
<input type="text" class="color_picker_value" id="<?php echo $settings['id']; ?>" name="<?php echo $settings['id']; ?>" value="<?php echo $settings['value']; ?>" />
|
||||
</div>
|
||||
</td>
|
||||
</tr><?php
|
||||
}
|
||||
}
|
||||
if (!function_exists('settings_select')) {
|
||||
function settings_select($settings){ ?>
|
||||
<tr id="<?php echo $settings['id']; ?>">
|
||||
<th>
|
||||
<label for="<?php echo $settings['id']; ?>">
|
||||
<strong><?php echo $settings['name']; ?></strong>
|
||||
<span><?php echo $settings['desc']; ?></span>
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<div class="type_select add_item_medium">
|
||||
<select class="medium" name="<?php echo $settings['id']; ?>" data-value="<?php print $settings['value'];?>"><?php
|
||||
foreach($settings['options'] as $key=>$value) {
|
||||
echo '<option value="'.$key.'">'.$value.'</option>';
|
||||
} ?>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr><?php
|
||||
}
|
||||
}
|
||||
if (!function_exists('settings_gallery')) {
|
||||
function settings_gallery($settings){
|
||||
global $post;
|
||||
$meta = get_post_meta( $post->ID, 'gallery_image_ids', true );
|
||||
$gallery_thumbs = '';
|
||||
$button_text = ($meta) ? __('Edit Gallery', 'themewaves') : __('Upload Images', 'themewaves');
|
||||
if( $meta ) {
|
||||
$thumbs = explode(',', $meta);
|
||||
foreach( $thumbs as $thumb ) {
|
||||
$gallery_thumbs .= '<li>' . wp_get_attachment_image( $thumb, array(32,32) ) . '</li>';
|
||||
}
|
||||
} ?>
|
||||
<tr id="<?php //echo $settings['id']; ?>">
|
||||
<th>
|
||||
<label for="<?php echo $settings['id']; ?>">
|
||||
<strong><?php echo $settings['name']; ?></strong>
|
||||
<span><?php echo $settings['desc']; ?></span>
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="button" class="button" name="<?php echo $settings['id']; ?>" id="gallery_images_upload" value="<?php echo $button_text; ?>" />
|
||||
<input type="hidden" name="gallery_image_ids" id="gallery_image_ids" value="<?php echo $meta ? $meta : 'false'; ?>" />
|
||||
<ul class="gallery-thumbs"><?php echo $gallery_thumbs;?></ul>
|
||||
</td>
|
||||
</tr><?php
|
||||
}
|
||||
}
|
||||
if (!function_exists('settings_slideshow')) {
|
||||
function settings_slideshow($settings){
|
||||
global $wpdb;
|
||||
$table_name = $wpdb->prefix . "revslider_sliders";
|
||||
$sliders = $wpdb->get_results( "SELECT * FROM $table_name" );?>
|
||||
<tr id="<?php echo $settings['id']; ?>">
|
||||
<th>
|
||||
<label for="<?php echo $settings['id']; ?>">
|
||||
<strong><?php echo $settings['name']; ?></strong>
|
||||
<span><?php echo $settings['desc']; ?></span>
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<select class="medium" name="<?php echo $settings['id']; ?>" data-value="<?php print $settings['value'];?>"><?php
|
||||
if(!empty($sliders)) {
|
||||
foreach($sliders as $key => $item) {
|
||||
$name = empty($item->title) ? ('Unnamed('.$item->id.')') : $item->title;
|
||||
echo '<option value="[rev_slider '.$item->id.']">'.$name.'</option>';
|
||||
}
|
||||
} ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr><?php
|
||||
}
|
||||
}?>
|
||||
349
wp-content/themes/nuzi/framework/post-type/post-options.php
Normal file
@@ -0,0 +1,349 @@
|
||||
<?php
|
||||
$selectsidebar = array();
|
||||
$selectsidebar["Default sidebar"] = "Default sidebar";
|
||||
$sidebars = get_option('sbg_sidebars');
|
||||
if (!empty($sidebars)) {
|
||||
foreach ($sidebars as $sidebar) {
|
||||
$selectsidebar[$sidebar] = $sidebar;
|
||||
}
|
||||
}
|
||||
$header_type = array(
|
||||
'subtitle'=>'Title and Subtitle',
|
||||
'slider'=>'Slider',
|
||||
'image'=>'Featured Image',
|
||||
'map'=>'Google Map',
|
||||
'none'=>'None');
|
||||
$header_layout = array(
|
||||
'default'=> 'Default',
|
||||
'Header style 1'=> 'Header style 1',
|
||||
'Header style 2'=> 'Header style 2',
|
||||
'Header style 3'=> 'Header style 3');
|
||||
/* * *********************** */
|
||||
/* Post options */
|
||||
/* * *********************** */
|
||||
$tw_post_settings = Array(
|
||||
Array(
|
||||
'name' => __('Post Author Show?', 'themewaves'),
|
||||
'desc' => __('Default setting will take from theme options.', 'themewaves'),
|
||||
'id' => 'post_authorr',
|
||||
'std' => 'default',
|
||||
'type' => 'selectbox'),
|
||||
Array(
|
||||
'name' => __('Featured Media Show?', 'themewaves'),
|
||||
'desc' => __('Default setting will take from theme options.', 'themewaves'),
|
||||
'id' => 'feature_show',
|
||||
'std' => 'default',
|
||||
'type' => 'selectbox'),
|
||||
Array(
|
||||
'name' => __('Featured Image Height?', 'themewaves'),
|
||||
'desc' => __('Image height (px).', 'themewaves'),
|
||||
'id' => 'image_height',
|
||||
'std' => '350',
|
||||
'type' => 'text'),
|
||||
Array(
|
||||
'name' => __('Breadcrumbs on this page?', 'themewaves'),
|
||||
'desc' => __('Default setting will take from theme options.', 'themewaves'),
|
||||
'id' => 'breadcrumps',
|
||||
'std' => 'default',
|
||||
'type' => 'selectbox'),
|
||||
Array(
|
||||
'name' => __('Choose Post Layout?', 'themewaves'),
|
||||
'desc' => __('', 'themewaves'),
|
||||
'id' => 'layout',
|
||||
'std' => 'right',
|
||||
'type' => 'layout'),
|
||||
Array(
|
||||
'name' => __('Choose Sidebar ?', 'themewaves'),
|
||||
'desc' => __('', 'themewaves'),
|
||||
'id' => 'sidebar',
|
||||
'options' => $selectsidebar,
|
||||
'std' => 'Default sidebar',
|
||||
'type' => 'select')
|
||||
);
|
||||
|
||||
|
||||
/* * *********************** */
|
||||
/* Page options */
|
||||
/* * *********************** */
|
||||
$tw_page_settings = Array(
|
||||
Array(
|
||||
'name' => __('Header style ?', 'themewaves'),
|
||||
'desc' => __('', 'themewaves'),
|
||||
'id' => 'header_layout',
|
||||
'std' => 'default',
|
||||
'options' => $header_layout,
|
||||
'type' => 'select'),
|
||||
Array(
|
||||
'name' => __('Header type ?', 'themewaves'),
|
||||
'desc' => __('', 'themewaves'),
|
||||
'id' => 'header_type',
|
||||
'std' => 'subtitle',
|
||||
'options' => $header_type,
|
||||
'type' => 'select'),
|
||||
Array(
|
||||
'name' => __('Select Slideshow', 'themewaves'),
|
||||
'desc' => __('All of your created sliders will be included here.', 'themewaves'),
|
||||
'id' => 'slider_id',
|
||||
'type' => 'slideshow'),
|
||||
Array(
|
||||
'name' => __('Sub Title', 'themewaves'),
|
||||
'desc' => __('', 'themewaves'),
|
||||
'id' => 'subtitle',
|
||||
'type' => 'text'),
|
||||
Array(
|
||||
'name' => __('Background image of page title', 'themewaves'),
|
||||
'desc' => __('', 'themewaves'),
|
||||
'id' => 'bg_image',
|
||||
'type' => 'file'),
|
||||
Array(
|
||||
'name' => __('Google Map', 'themewaves'),
|
||||
'desc' => __('', 'themewaves'),
|
||||
'id' => 'googlemap',
|
||||
'type' => 'textarea'),
|
||||
Array(
|
||||
'name' => __('Breadcrumbs on this post?', 'themewaves'),
|
||||
'desc' => __('Default setting will take from theme options.', 'themewaves'),
|
||||
'id' => 'breadcrumps',
|
||||
'std' => 'default',
|
||||
'type' => 'selectbox'),
|
||||
);
|
||||
if(!tw_option("pagebuilder")){
|
||||
$tw_page_settings[] = Array(
|
||||
'name' => __('Page Layout ?', 'themewaves'),
|
||||
'desc' => __('Layout-aa songono uu', 'themewaves'),
|
||||
'id' => 'layout',
|
||||
'std' => 'full',
|
||||
'type' => 'layout');
|
||||
$tw_page_settings[] = Array(
|
||||
'name' => __('Sidebar ?', 'themewaves'),
|
||||
'desc' => __('Sidebar-aa songono uu', 'themewaves'),
|
||||
'id' => 'sidebar',
|
||||
'options' => $selectsidebar,
|
||||
'std' => 'Default sidebar',
|
||||
'type' => 'select');
|
||||
}
|
||||
|
||||
|
||||
/* * *********************** */
|
||||
/* Portfolio options */
|
||||
/* * *********************** */
|
||||
$tw_portfolio_settings = Array(
|
||||
Array(
|
||||
'name' => __('Preview url', 'themewaves'),
|
||||
'desc' => __('Preview url', 'themewaves'),
|
||||
'id' => 'preview_url',
|
||||
'type' => 'text'),
|
||||
Array(
|
||||
'name' => __('Image height', 'themewaves'),
|
||||
'desc' => __('Image height on single portfolio', 'themewaves'),
|
||||
'id' => 'image_height',
|
||||
'type' => 'text'),
|
||||
);
|
||||
$tw_portfolio_gallery = array(
|
||||
// array( "name" => __('Enable Lightbox','framework'),
|
||||
// "desc" => __('Check this to enable the lightbox.','framework'),
|
||||
// "id" => "format_image_lightbox",
|
||||
// "type" => "select",
|
||||
// 'std' => 'no',
|
||||
// 'options' => array('yes' => 'Yes', 'no' => 'No'),
|
||||
// ),
|
||||
array( "name" => __('Upload images', 'framework'),
|
||||
"desc" => __('Select the images that should be upload to this gallery', 'framework'),
|
||||
"id" => "gallery_image_ids",
|
||||
"type" => 'gallery'
|
||||
),
|
||||
array( "name" => __('Gallery height', 'framework'),
|
||||
"desc" => __('Gallery height on single portfolio', 'framework'),
|
||||
"id" => "format_image_height",
|
||||
"type" => 'text'
|
||||
)
|
||||
);
|
||||
$tw_portfolio_video = array(
|
||||
array( "name" => __('M4V File URL','framework'),
|
||||
"desc" => __('The URL to the .m4v video file','framework'),
|
||||
"id" => "format_video_m4v",
|
||||
"type" => "text",
|
||||
'std' => ''
|
||||
),
|
||||
array( "name" => __('Video Thumbnail Image','framework'),
|
||||
"desc" => __('The preivew image.','framework'),
|
||||
"id" => "format_video_thumb",
|
||||
"type" => "text",
|
||||
'std' => ''
|
||||
),
|
||||
array( "name" => __('Embeded Code','framework'),
|
||||
"desc" => __('If you\'re not using self hosted video then you can include embeded code here.','framework'),
|
||||
"id" => "format_video_embed",
|
||||
"type" => "textarea",
|
||||
'std' => ''
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
/* * *********************** */
|
||||
/* Testimonial options */
|
||||
/* * *********************** */
|
||||
$tw_testimonial_settings = Array(
|
||||
Array(
|
||||
'name' => __('Name', 'themewaves'),
|
||||
'desc' => __('', 'themewaves'),
|
||||
'id' => 'name',
|
||||
'type' => 'text'),
|
||||
Array(
|
||||
'name' => __('Company name', 'themewaves'),
|
||||
'desc' => __('', 'themewaves'),
|
||||
'id' => 'company',
|
||||
'type' => 'text'),
|
||||
Array(
|
||||
'name' => __('Link to url', 'themewaves'),
|
||||
'desc' => __('', 'themewaves'),
|
||||
'id' => 'url',
|
||||
'type' => 'text'),
|
||||
);
|
||||
|
||||
|
||||
/* * *********************** */
|
||||
/* Team options */
|
||||
/* * *********************** */
|
||||
$tw_team_settings = Array(
|
||||
Array(
|
||||
'name' => __('Position', 'themewaves'),
|
||||
'desc' => __('Member position', 'themewaves'),
|
||||
'id' => 'position',
|
||||
'type' => 'text'),
|
||||
Array(
|
||||
'name' => __('Facebook url', 'themewaves'),
|
||||
'desc' => __('Facebook url', 'themewaves'),
|
||||
'id' => 'facebook',
|
||||
'type' => 'text'),
|
||||
Array(
|
||||
'name' => __('Google Plus url', 'themewaves'),
|
||||
'desc' => __('Google Plus url', 'themewaves'),
|
||||
'id' => 'google',
|
||||
'type' => 'text'),
|
||||
Array(
|
||||
'name' => __('Twitter url', 'themewaves'),
|
||||
'desc' => __('Twitter url', 'themewaves'),
|
||||
'id' => 'twitter',
|
||||
'type' => 'text'),
|
||||
Array(
|
||||
'name' => __('Linkedin url', 'themewaves'),
|
||||
'desc' => __('Linkedin url', 'themewaves'),
|
||||
'id' => 'linkedin',
|
||||
'type' => 'text'),
|
||||
Array(
|
||||
'name' => __('Dribbble url', 'themewaves'),
|
||||
'desc' => __('Dribbble url', 'themewaves'),
|
||||
'id' => 'dribbble',
|
||||
'type' => 'text'),
|
||||
);
|
||||
|
||||
|
||||
/* * *********************** */
|
||||
/* Partner options */
|
||||
/* * *********************** */
|
||||
$tw_partner_settings = Array(
|
||||
Array(
|
||||
'name' => __('Partner Link to URL', 'themewaves'),
|
||||
'desc' => __('', 'themewaves'),
|
||||
'id' => 'link',
|
||||
'type' => 'text'),
|
||||
);
|
||||
|
||||
|
||||
/* * *********************** */
|
||||
/* Pricing table options */
|
||||
/* * *********************** */
|
||||
$tw_price_settings = Array(
|
||||
Array(
|
||||
'name' => __('Type', 'themewaves'),
|
||||
'desc' => __('', 'themewaves'),
|
||||
'id' => 'type',
|
||||
'options' => array('general' => 'General', 'featured' => 'Featured'),
|
||||
'type' => 'select'),
|
||||
Array(
|
||||
'name' => __('SubTitle', 'themewaves'),
|
||||
'desc' => __('This will displayed bottom of your Pricing Table title.', 'themewaves'),
|
||||
'id' => 'subtitle',
|
||||
'type' => 'text'),
|
||||
Array(
|
||||
'name' => __('Price', 'themewaves'),
|
||||
'desc' => __('Please insert with $ symbol.', 'themewaves'),
|
||||
'id' => 'price',
|
||||
'type' => 'text'),
|
||||
Array(
|
||||
'name' => __('Price Time', 'themewaves'),
|
||||
'desc' => __('Price time option. Example: Month, Day, Year etc.', 'themewaves'),
|
||||
'id' => 'time',
|
||||
'std' => __("Month", "themewaves"),
|
||||
'type' => 'text'),
|
||||
Array(
|
||||
'name' => __('Button text', 'themewaves'),
|
||||
'desc' => __('', 'themewaves'),
|
||||
'id' => 'buttontext',
|
||||
'type' => 'text'),
|
||||
Array(
|
||||
'name' => __('Button URL', 'themewaves'),
|
||||
'desc' => __('', 'themewaves'),
|
||||
'id' => 'buttonlink',
|
||||
'type' => 'text'),
|
||||
);
|
||||
|
||||
|
||||
add_action('admin_init', 'post_settings_custom_box', 1);
|
||||
if (!function_exists('post_settings_custom_box')) {
|
||||
function post_settings_custom_box() {
|
||||
global $tw_post_settings;
|
||||
add_meta_box('post_meta_settings',__( 'Post settings', 'themewaves' ),'metabox_render','post','normal','core',$tw_post_settings);
|
||||
}
|
||||
}
|
||||
|
||||
add_action('admin_init', 'page_settings_custom_box', 1);
|
||||
if (!function_exists('page_settings_custom_box')) {
|
||||
function page_settings_custom_box() {
|
||||
global $tw_page_settings;
|
||||
add_meta_box('page_meta_settings',__( 'Page settings', 'themewaves' ),'metabox_render','page','normal','core',$tw_page_settings);
|
||||
}
|
||||
}
|
||||
|
||||
add_action('admin_init', 'portfolio_settings_custom_box');
|
||||
if (!function_exists('portfolio_settings_custom_box')) {
|
||||
function portfolio_settings_custom_box() {
|
||||
global $tw_portfolio_settings,$tw_portfolio_gallery,$tw_portfolio_video;
|
||||
add_meta_box('portfolio_meta_settings',__( 'Portfolio settings', 'themewaves' ),'metabox_render','portfolio','normal','high',$tw_portfolio_settings);
|
||||
add_meta_box('portfolio_gallery_settings',__( 'Portfolio gallery settings', 'themewaves' ),'metabox_render','portfolio','normal','high',$tw_portfolio_gallery);
|
||||
add_meta_box('portfolio_video_settings',__( 'Portfolio video settings', 'themewaves' ),'metabox_render','portfolio','normal','high',$tw_portfolio_video);
|
||||
}
|
||||
}
|
||||
|
||||
add_action('admin_init', 'testimonial_settings_custom_box');
|
||||
if (!function_exists('testimonial_settings_custom_box')) {
|
||||
function testimonial_settings_custom_box() {
|
||||
global $tw_testimonial_settings;
|
||||
add_meta_box('testimonial_meta_settings',__( 'Testimonial settings', 'themewaves' ),'metabox_render','testimonial','normal','high',$tw_testimonial_settings);
|
||||
}
|
||||
}
|
||||
|
||||
add_action('admin_init', 'team_settings_custom_box');
|
||||
if (!function_exists('team_settings_custom_box')) {
|
||||
function team_settings_custom_box() {
|
||||
global $tw_team_settings;
|
||||
add_meta_box('team_meta_settings',__( 'Team settings', 'themewaves' ),'metabox_render','team','normal','high',$tw_team_settings);
|
||||
}
|
||||
}
|
||||
|
||||
add_action('admin_init', 'partner_settings_custom_box');
|
||||
if (!function_exists('partner_settings_custom_box')) {
|
||||
function partner_settings_custom_box() {
|
||||
global $tw_partner_settings;
|
||||
add_meta_box('partner_meta_settings',__( 'Partner settings', 'themewaves' ),'metabox_render','partner','normal','high',$tw_partner_settings);
|
||||
}
|
||||
}
|
||||
|
||||
add_action('admin_init', 'price_settings_custom_box');
|
||||
if (!function_exists('price_settings_custom_box')) {
|
||||
function price_settings_custom_box() {
|
||||
global $tw_price_settings;
|
||||
add_meta_box('price_meta_settings',__( 'Price settings', 'themewaves' ),'metabox_render','price','normal','high',$tw_price_settings);
|
||||
}
|
||||
} ?>
|
||||
410
wp-content/themes/nuzi/framework/post-type/post-type.php
Normal file
@@ -0,0 +1,410 @@
|
||||
<?php
|
||||
add_action('admin_print_scripts', 'postsettings_admin_scripts');
|
||||
add_action('admin_print_styles', 'postsettings_admin_styles');
|
||||
if (!function_exists('postsettings_admin_scripts')) {
|
||||
function postsettings_admin_scripts(){
|
||||
global $post,$pagenow;
|
||||
|
||||
if (current_user_can('edit_posts') && ($pagenow == 'post-new.php' || $pagenow == 'post.php')) {
|
||||
if( isset($post) ) {
|
||||
wp_localize_script( 'jquery', 'script_data', array(
|
||||
'post_id' => $post->ID,
|
||||
'nonce' => wp_create_nonce( 'themewaves-ajax' ),
|
||||
'image_ids' => get_post_meta( $post->ID, 'gallery_image_ids', true ),
|
||||
'label_create' => __("Create Featured Gallery", "waves"),
|
||||
'label_edit' => __("Edit Featured Gallery", "waves"),
|
||||
'label_save' => __("Save Featured Gallery", "waves"),
|
||||
'label_saving' => __("Saving...", "waves")
|
||||
));
|
||||
}
|
||||
|
||||
wp_register_script('post-colorpicker', THEME_DIR.'/framework/assets/js/colorpicker.js');
|
||||
wp_register_script('post-metaboxes', THEME_DIR.'/framework/assets/js/metaboxes.js');
|
||||
|
||||
wp_enqueue_script('post-colorpicker');
|
||||
wp_enqueue_script('post-metaboxes');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('postsettings_admin_styles')) {
|
||||
function postsettings_admin_styles(){
|
||||
global $pagenow;
|
||||
if (current_user_can('edit_posts') && ($pagenow == 'post-new.php' || $pagenow == 'post.php')) {
|
||||
wp_register_style('post-colorpicker', THEME_DIR.'/framework/assets/css/colorpicker.css', false, '1.00', 'screen');
|
||||
wp_register_style('post-metaboxes', THEME_DIR.'/framework/assets/css/metaboxes.css', false, '1.00', 'screen');
|
||||
|
||||
wp_enqueue_style('post-colorpicker');
|
||||
wp_enqueue_style('post-metaboxes');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
add_action("manage_posts_custom_column", "posttype_custom_columns");
|
||||
if (!function_exists('posttype_custom_columns')) {
|
||||
function posttype_custom_columns($column) {
|
||||
global $post;
|
||||
switch ($column) {
|
||||
case "thumbnail":
|
||||
echo post_image_show() ? post_image_show(45,45) : ("<img src='".THEME_DIR."/resources/images/no-thumb.png'>");
|
||||
break;
|
||||
case "portfolio":
|
||||
echo get_the_term_list($post->ID, 'portfolios', '', ', ', '');
|
||||
break;
|
||||
case "price":
|
||||
echo get_the_term_list($post->ID, 'prices', '', ', ', '');
|
||||
break;
|
||||
case "team":
|
||||
echo get_the_term_list($post->ID, 'position', '', ', ', '');
|
||||
break;
|
||||
case "testimonial":
|
||||
echo get_the_term_list($post->ID, 'testimonials', '', ', ', '');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* * *********************** */
|
||||
/* Custom post type: Portfolio */
|
||||
/* * *********************** */
|
||||
|
||||
add_action('init', 'portfolio_register');
|
||||
if (!function_exists('portfolio_register')) {
|
||||
function portfolio_register() {
|
||||
$labels = array(
|
||||
'name' => __('Portfolio', 'themewaves'),
|
||||
'singular_name' => __('Portfolio', 'themewaves'),
|
||||
'add_new' => __('Add New', 'themewaves'),
|
||||
'add_new_item' => __('Add New Portfolio', 'themewaves'),
|
||||
'edit_item' => __('Edit Portfolio', 'themewaves'),
|
||||
'new_item' => __('New Portfolio', 'themewaves'),
|
||||
'all_items' => __('All Portfolios', 'themewaves'),
|
||||
'view_item' => __('View Portfolio', 'themewaves'),
|
||||
'search_items' => __('Search Portfolios', 'themewaves'),
|
||||
'not_found' => __('No Portfolio found', 'themewaves'),
|
||||
'not_found_in_trash' => __('No Portfolio found in Trash', 'themewaves'),
|
||||
'menu_name' => __('Portfolios', 'themewaves')
|
||||
);
|
||||
$args = array(
|
||||
'labels' => $labels,
|
||||
'public' => true,
|
||||
'_builtin' => false,
|
||||
'capability_type' => 'post',
|
||||
'menu_icon' => THEME_DIR . '/framework/assets/images/portfolio.png',
|
||||
'hierarchical' => false,
|
||||
'rewrite' => array( 'slug' => 'portfolio'),
|
||||
'supports' => array('title', 'editor', 'thumbnail')
|
||||
);
|
||||
register_post_type('portfolio', $args);
|
||||
flush_rewrite_rules();
|
||||
}
|
||||
}
|
||||
|
||||
register_taxonomy("portfolios", array("portfolio"), array("hierarchical" => true, "label" => __("Categories", "themewaves"), "singular_label" => __("Portfolio Category", "themewaves"), "rewrite" => true));
|
||||
|
||||
add_filter('manage_edit-portfolio_columns', 'portfolio_edit_columns');
|
||||
if (!function_exists('portfolio_edit_columns')) {
|
||||
function portfolio_edit_columns($columns){
|
||||
$columns = array(
|
||||
"cb" => "<input type=\"checkbox\" />",
|
||||
"title" => __("Portfolio Title", "themewaves"),
|
||||
"portfolio" => __("Categories", "themewaves"),
|
||||
"date" => __("Date", "themewaves"),
|
||||
);
|
||||
return $columns;
|
||||
}
|
||||
}
|
||||
|
||||
/* * *********************** */
|
||||
/* Custom post type: Pricing Table */
|
||||
/* * *********************** */
|
||||
|
||||
add_action('init', 'price_register');
|
||||
if (!function_exists('price_register')) {
|
||||
function price_register() {
|
||||
$labels = array(
|
||||
'name' => __('Pricing Tables', 'themewaves'),
|
||||
'singular_name' => __('Price Item', 'themewaves'),
|
||||
'add_new' => __('Add New', 'themewaves'),
|
||||
'add_new_item' => __('Add New Item', 'themewaves'),
|
||||
'edit_item' => __('Edit Item', 'themewaves'),
|
||||
'new_item' => __('New Item', 'themewaves'),
|
||||
'all_items' => __('All Tables', 'themewaves'),
|
||||
'view_item' => __('View Price Item', 'themewaves'),
|
||||
'search_items' => __('Search Pricing Tables', 'themewaves'),
|
||||
'not_found' => __('No Tables found', 'themewaves'),
|
||||
'not_found_in_trash' => __('No Tables in Trash', 'themewaves'),
|
||||
'menu_name' => __('Pricing Tables', 'themewaves')
|
||||
);
|
||||
$args = array(
|
||||
'labels' => $labels,
|
||||
'public' => true,
|
||||
'_builtin' => false,
|
||||
'capability_type' => 'post',
|
||||
'menu_icon' => THEME_DIR . '/framework/assets/images/price.png',
|
||||
'hierarchical' => false,
|
||||
'rewrite' => array( 'slug' => 'price'),
|
||||
'supports' => array('title', 'editor', 'thumbnail')
|
||||
);
|
||||
register_post_type('price', $args);
|
||||
flush_rewrite_rules();
|
||||
}
|
||||
}
|
||||
|
||||
register_taxonomy("prices", array("price"), array("hierarchical" => true, "label" => __("Categories", "themewaves"), "singular_label" => __("Price Category","themewaves"), "rewrite" => true));
|
||||
|
||||
add_filter('manage_edit-price_columns', 'price_edit_columns');
|
||||
if (!function_exists('price_edit_columns')) {
|
||||
function price_edit_columns($columns){
|
||||
$columns = array(
|
||||
"cb" => "<input type=\"checkbox\" />",
|
||||
"title" => __("Table name", "themewaves"),
|
||||
"price" => __("Categories", "themewaves"),
|
||||
"date" => __("Date", "themewaves"),
|
||||
);
|
||||
return $columns;
|
||||
}
|
||||
}
|
||||
|
||||
/* * *********************** */
|
||||
/* Custom post type: Team */
|
||||
/* * *********************** */
|
||||
|
||||
add_action('init', 'team_register');
|
||||
function team_register() {
|
||||
$labels = array(
|
||||
'name' => __('Member', 'themewaves'),
|
||||
'singular_name' => __('Member', 'themewaves'),
|
||||
'add_new' => __('Add New', 'themewaves'),
|
||||
'add_new_item' => __('Add New Member', 'themewaves'),
|
||||
'edit_item' => __('Edit Member', 'themewaves'),
|
||||
'new_item' => __('New Member', 'themewaves'),
|
||||
'all_items' => __('All Members', 'themewaves'),
|
||||
'view_item' => __('View Member', 'themewaves'),
|
||||
'search_items' => __('Search Member', 'themewaves'),
|
||||
'not_found' => __('No member found', 'themewaves'),
|
||||
'not_found_in_trash' => __('No member found in Trash', 'themewaves'),
|
||||
'menu_name' => __('Team', 'themewaves')
|
||||
);
|
||||
$args = array(
|
||||
'labels' => $labels,
|
||||
'public' => true,
|
||||
'_builtin' => false,
|
||||
'capability_type' => 'post',
|
||||
'menu_icon' => THEME_DIR . '/framework/assets/images/team.png',
|
||||
'hierarchical' => false,
|
||||
'rewrite' => array( 'slug' => 'team'),
|
||||
'supports' => array('title', 'thumbnail')
|
||||
);
|
||||
register_post_type('team', $args);
|
||||
flush_rewrite_rules();
|
||||
}
|
||||
|
||||
register_taxonomy("position", array("team"), array("hierarchical" => true, "label" => __("Categories", "themewaves"), "singular_label" => __("Category", "themewaves"), "rewrite" => true));
|
||||
|
||||
add_filter('manage_edit-team_columns', 'team_edit_columns');
|
||||
function team_edit_columns($columns){
|
||||
$columns = array(
|
||||
"cb" => "<input type=\"checkbox\" />",
|
||||
"thumbnail" => __("Image", "themewaves"),
|
||||
"title" => __("Name", "themewaves"),
|
||||
"team" => __("Categories", "themewaves"),
|
||||
"date" => __("Date", "themewaves"),
|
||||
);
|
||||
return $columns;
|
||||
}
|
||||
|
||||
/* * *********************** */
|
||||
/* Custom post type: Testimonial */
|
||||
/* * *********************** */
|
||||
|
||||
add_action('init', 'testimonial_register');
|
||||
function testimonial_register() {
|
||||
$labels = array(
|
||||
'name' => __('Testimonial', 'themewaves'),
|
||||
'singular_name' => __('Testimonial', 'themewaves'),
|
||||
'add_new' => __('Add New', 'themewaves'),
|
||||
'add_new_item' => __('Add New Testimonial', 'themewaves'),
|
||||
'edit_item' => __('Edit Testimonial', 'themewaves'),
|
||||
'new_item' => __('New Testimonial', 'themewaves'),
|
||||
'all_items' => __('All Testimonials', 'themewaves'),
|
||||
'view_item' => __('View Testimonial', 'themewaves'),
|
||||
'search_items' => __('Search Testimonials', 'themewaves'),
|
||||
'not_found' => __('No testimonial found', 'themewaves'),
|
||||
'not_found_in_trash' => __('No testimonial found in Trash', 'themewaves'),
|
||||
'menu_name' => __('Testimonials', 'themewaves')
|
||||
);
|
||||
$args = array(
|
||||
'labels' => $labels,
|
||||
'public' => true,
|
||||
'_builtin' => false,
|
||||
'capability_type' => 'post',
|
||||
'menu_icon' => THEME_DIR . '/framework/assets/images/testimonial.png',
|
||||
'hierarchical' => false,
|
||||
'rewrite' => array( 'slug' => 'testimonial'),
|
||||
'supports' => array('title', 'editor', 'thumbnail')
|
||||
);
|
||||
register_post_type('testimonial', $args);
|
||||
flush_rewrite_rules();
|
||||
}
|
||||
|
||||
register_taxonomy("testimonials", array("testimonial"), array("hierarchical" => true, "label" => __("Categories", "themewaves"), "singular_label" => __("Testimonial Category", "themewaves"), "rewrite" => true));
|
||||
|
||||
add_filter('manage_edit-testimonial_columns', 'testimonial_edit_columns');
|
||||
function testimonial_edit_columns($columns){
|
||||
$columns = array(
|
||||
"cb" => "<input type=\"checkbox\" />",
|
||||
"title" => __("Name", "themewaves"),
|
||||
"testimonial" => __("Categories", "themewaves"),
|
||||
"date" => __("Date", "themewaves"),
|
||||
);
|
||||
return $columns;
|
||||
}
|
||||
|
||||
|
||||
/* * *********************** */
|
||||
/* Custom post type: Partner */
|
||||
/* * *********************** */
|
||||
|
||||
add_action('init', 'partner_register');
|
||||
function partner_register() {
|
||||
$labels = array(
|
||||
'name' => __('Our Partners', 'themewaves'),
|
||||
'singular_name' => __('Partner', 'themewaves'),
|
||||
'add_new' => __('Add New', 'themewaves'),
|
||||
'add_new_item' => __('Add New Partner', 'themewaves'),
|
||||
'edit_item' => __('Edit Item', 'themewaves'),
|
||||
'new_item' => __('New Item', 'themewaves'),
|
||||
'all_items' => __('All Partners', 'themewaves'),
|
||||
'view_item' => __('View Partner', 'themewaves'),
|
||||
'search_items' => __('Search Partners', 'themewaves'),
|
||||
'not_found' => __('No Partner found', 'themewaves'),
|
||||
'not_found_in_trash' => __('No partner in Trash', 'themewaves'),
|
||||
'menu_name' => __('Partners', 'themewaves')
|
||||
);
|
||||
$args = array(
|
||||
'labels' => $labels,
|
||||
'public' => true,
|
||||
'_builtin' => false,
|
||||
'capability_type' => 'post',
|
||||
'menu_icon' => THEME_DIR . '/framework/assets/images/partner.png',
|
||||
'hierarchical' => false,
|
||||
'rewrite' => array( 'slug' => 'partner'),
|
||||
'supports' => array('title', 'editor', 'thumbnail')
|
||||
);
|
||||
register_post_type('partner', $args);
|
||||
flush_rewrite_rules();
|
||||
}
|
||||
|
||||
add_filter('manage_edit-partner_columns', 'partner_edit_columns');
|
||||
function partner_edit_columns($columns){
|
||||
$columns = array(
|
||||
"cb" => "<input type=\"checkbox\" />",
|
||||
"thumbnail" => __("Image", "themewaves"),
|
||||
"title" => __("Partners", "themewaves"),
|
||||
"date" => __("Date", "themewaves"),
|
||||
);
|
||||
return $columns;
|
||||
}
|
||||
|
||||
require_once ( THEME_PATH . '/framework/post-type/metaboxes.php');
|
||||
require_once ( THEME_PATH . '/framework/post-type/post-options.php');
|
||||
|
||||
function metabox_render($post, $metabox) {
|
||||
global $post;
|
||||
$options = get_post_meta($post->ID, 'themewaves_'.strtolower(THEMENAME).'_options', true);?>
|
||||
<input type="hidden" name="themewaves_meta_box_nonce" value="<?php echo wp_create_nonce(basename(__FILE__));?>" />
|
||||
<table class="form-table tw-metaboxes">
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($metabox['args'] as $settings) {
|
||||
$settings['value'] = isset($options[$settings['id']]) ? $options[$settings['id']] : (isset($settings['std']) ? $settings['std'] : '');
|
||||
call_user_func('settings_'.$settings['type'], $settings);
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
|
||||
add_action('save_post', 'savePostMeta');
|
||||
function savePostMeta($post_id) {
|
||||
global $tw_post_settings, $tw_page_settings, $tw_portfolio_settings, $tw_portfolio_gallery, $tw_portfolio_video, $tw_price_settings, $tw_testimonial_settings, $tw_team_settings, $tw_partner_settings;
|
||||
|
||||
$meta = 'themewaves_'.strtolower(THEMENAME).'_options';
|
||||
|
||||
// verify nonce
|
||||
if (!isset($_POST['themewaves_meta_box_nonce']) || !wp_verify_nonce($_POST['themewaves_meta_box_nonce'], basename(__FILE__))) {
|
||||
return $post_id;
|
||||
}
|
||||
|
||||
// check autosave
|
||||
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
|
||||
return $post_id;
|
||||
}
|
||||
// check permissions
|
||||
if ('page' == $_POST['post_type']) {
|
||||
if (!current_user_can('edit_page', $post_id)) {
|
||||
return $post_id;
|
||||
}
|
||||
} elseif (!current_user_can('edit_post', $post_id)) {
|
||||
return $post_id;
|
||||
}
|
||||
|
||||
if($_POST['post_type']=='post')
|
||||
$metaboxes = $tw_post_settings;
|
||||
elseif($_POST['post_type']=='page')
|
||||
$metaboxes = $tw_page_settings;
|
||||
elseif($_POST['post_type']=='portfolio')
|
||||
$metaboxes = array_merge($tw_portfolio_settings,$tw_portfolio_gallery,$tw_portfolio_video);
|
||||
elseif($_POST['post_type']=='team')
|
||||
$metaboxes = $tw_team_settings;
|
||||
elseif($_POST['post_type']=='testimonial')
|
||||
$metaboxes = $tw_testimonial_settings;
|
||||
elseif($_POST['post_type']=='price')
|
||||
$metaboxes = $tw_price_settings;
|
||||
elseif($_POST['post_type']=='partner')
|
||||
$metaboxes = $tw_partner_settings;
|
||||
|
||||
if(!empty($metaboxes)) {
|
||||
$myMeta = array();
|
||||
|
||||
foreach ($metaboxes as $metabox) {
|
||||
$myMeta[$metabox['id']] = isset($_POST[$metabox['id']]) ? $_POST[$metabox['id']] : "";
|
||||
}
|
||||
|
||||
update_post_meta($post_id, $meta, $myMeta);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* ================================================================================== */
|
||||
/* Save gallery images
|
||||
/* ================================================================================== */
|
||||
|
||||
function themewaves_save_images() {
|
||||
|
||||
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
|
||||
return;
|
||||
|
||||
if ( !isset($_POST['ids']) || !isset($_POST['nonce']) || !wp_verify_nonce( $_POST['nonce'], 'themewaves-ajax' ) )
|
||||
return;
|
||||
|
||||
if ( !current_user_can( 'edit_posts' ) ) return;
|
||||
|
||||
$ids = strip_tags(rtrim($_POST['ids'], ','));
|
||||
update_post_meta($_POST['post_id'], 'gallery_image_ids', $ids);
|
||||
|
||||
// update thumbs
|
||||
$thumbs = explode(',', $ids);
|
||||
$gallery_thumbs = '';
|
||||
foreach( $thumbs as $thumb ) {
|
||||
$gallery_thumbs .= '<li>' . wp_get_attachment_image( $thumb, array(32,32) ) . '</li>';
|
||||
}
|
||||
|
||||
echo $gallery_thumbs;
|
||||
|
||||
die();
|
||||
}
|
||||
add_action('wp_ajax_themewaves_save_images', 'themewaves_save_images');
|
||||
?>
|
||||
BIN
wp-content/themes/nuzi/framework/shortcode/images/iconsmall.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
103
wp-content/themes/nuzi/framework/shortcode/js/shortcode.js
Normal file
@@ -0,0 +1,103 @@
|
||||
(function() {
|
||||
tinymce.PluginManager.requireLangPack('twshortcodegenerator');
|
||||
tinymce.create('tinymce.plugins.twshortcodegenerator', {
|
||||
init : function(ed, url) {
|
||||
ed.addCommand('twshortcodegenerator', function() {
|
||||
jQuery( '<div id="shortcode_container_dialog" data-current="none" />').append(jQuery('#tw-shortcode-template').html()).dialog({
|
||||
title: 'Select the Shortcode',
|
||||
resizable: true,
|
||||
width: 800,
|
||||
// height: 500,
|
||||
modal: true,
|
||||
open: function(){
|
||||
jQuery(this).closest('.ui-dialog').addClass('tw-pb-main-container');
|
||||
jQuery(this).closest('.ui-dialog').focus();
|
||||
pbModalInitActions(jQuery(this));
|
||||
},
|
||||
close: function(){
|
||||
jQuery('#shortcode_container_dialog').closest('.ui-dialog').remove();
|
||||
jQuery('body>#shortcode_container_dialog').remove();
|
||||
},
|
||||
buttons: {
|
||||
"Done": function() {
|
||||
twInsertShortcode();
|
||||
jQuery(this).dialog("close");
|
||||
},
|
||||
"Cancel": function() {
|
||||
jQuery(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
ed.addButton('twshortcodegenerator', {title : 'ThemeWaves Shortcode Generator',cmd : 'twshortcodegenerator',image : url + '/../images/iconsmall.png'})
|
||||
},
|
||||
createControl : function(n, cm) {return null;},
|
||||
getInfo : function() {return {longname : "Shortcode",author : '',authorurl : '',infourl : '',version : "1.0"};}
|
||||
});
|
||||
tinymce.PluginManager.add('twshortcodegenerator', tinymce.plugins.twshortcodegenerator);
|
||||
})();
|
||||
// Functions
|
||||
function twGetShortcode($itemSlug){
|
||||
jQuery('#shortcode_container_dialog').addClass('loading-shortcode');
|
||||
jQuery('#shortcode_container_dialog>.custom-field-container').html('');
|
||||
jQuery.ajax({
|
||||
type: "POST",
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
'action':'get_modal_shortcode',
|
||||
'shortcode_name':$itemSlug
|
||||
},
|
||||
success: function(response){
|
||||
jQuery('#shortcode_container_dialog>.custom-field-container').html(jQuery(response).find('.data>.custom-field-container').first().html());
|
||||
jQuery("#shortcode_container_dialog").attr('data-current',$itemSlug).removeClass('loading-shortcode');
|
||||
pbModalInitActions(jQuery("#shortcode_container_dialog"));
|
||||
}
|
||||
});
|
||||
}
|
||||
function twInsertShortcode(){
|
||||
var $shortcodeContainer = jQuery("#shortcode_container_dialog");
|
||||
var $itemSlug = $shortcodeContainer.attr('data-current');
|
||||
if($itemSlug!=='none'){
|
||||
var item = '';
|
||||
$shortcodeContainer.each(function(){
|
||||
var $currentItem=jQuery(this);
|
||||
item += '{"slug":"'+$itemSlug+'","size":"shortcode-size",';
|
||||
item += '"settings":{';
|
||||
jQuery('.custom-field-container>.field-item>.field-data>.field',$currentItem).each(function(index){
|
||||
var $currentField=jQuery(this);
|
||||
if(index){item += ',';}
|
||||
if($currentField.attr('data-type')==='container'){
|
||||
item += '"'+$currentField.attr('data-name')+'":{';
|
||||
$currentField.children('.container-item').each(function(itemIndex){
|
||||
var $currentContainerItem=jQuery(this);
|
||||
if(itemIndex){item += ',';}
|
||||
item += '"'+itemIndex+'":{';
|
||||
jQuery('.content>.field-item>.field-data>.field',$currentContainerItem).each(function(fieldIndex){
|
||||
var $currentContainerItemField = jQuery(this);
|
||||
if(fieldIndex){item += ',';}
|
||||
item += '"'+$currentContainerItemField.attr('data-name')+'":"'+encodeURIComponent($currentContainerItemField.val())+'"';
|
||||
});
|
||||
item += '}';
|
||||
});
|
||||
item += '}';
|
||||
}else{
|
||||
item += '"'+$currentField.attr('data-name')+'":"'+encodeURIComponent($currentField.val())+'"';
|
||||
}
|
||||
}).promise().done(function(){
|
||||
item +='}}';
|
||||
});
|
||||
}).promise().done(function(){
|
||||
jQuery.ajax({
|
||||
type: "POST",
|
||||
url : ajaxurl,
|
||||
data: {
|
||||
'action':'get_printed_item',
|
||||
'data':encodeURIComponent(item)
|
||||
},
|
||||
success: function(response){
|
||||
window.tinyMCE.execInstanceCommand($currentContentEditor, 'mceInsertContent', false, response);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
89
wp-content/themes/nuzi/framework/shortcode/shortcode.php
Normal file
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
if (!function_exists('add_tw_tinymce_plugin')){
|
||||
function add_tw_tinymce_plugin($plugin_array) {
|
||||
$plugin_array['twshortcodegenerator'] = get_template_directory_uri().'/framework/shortcode/js/shortcode.js';
|
||||
return $plugin_array;
|
||||
}
|
||||
}
|
||||
if (!function_exists('register_tw_button')){
|
||||
function register_tw_button($buttons) {
|
||||
array_push($buttons, "|", "twshortcodegenerator");
|
||||
return $buttons;
|
||||
}
|
||||
}
|
||||
if (!function_exists('add_tw_button')){
|
||||
function add_tw_button() {
|
||||
if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') )
|
||||
return;
|
||||
if ( get_user_option('rich_editing') == 'true') {
|
||||
add_filter('mce_external_plugins', 'add_tw_tinymce_plugin');
|
||||
add_filter('mce_buttons', 'register_tw_button');
|
||||
}
|
||||
}
|
||||
}
|
||||
add_action('init', 'add_tw_button');
|
||||
|
||||
if (!function_exists('my_refresh_mce')){
|
||||
function my_refresh_mce($ver) {
|
||||
$ver += 3;
|
||||
return $ver;
|
||||
}
|
||||
}
|
||||
add_filter( 'tiny_mce_version', 'my_refresh_mce');
|
||||
require_once (THEME_PATH . "/framework/shortcode/shortcode_render.php");
|
||||
//====== START - Functions ======
|
||||
if (!function_exists('init_admin_shortcode_html')){
|
||||
function init_admin_shortcode_html(){
|
||||
global $tw_pbItems; ?>
|
||||
<div id="tw-shortcode-template" style="display: none;">
|
||||
<div class="general-field-container">
|
||||
<div class="field-item clearfix type-select">
|
||||
<div class="field-title">Select Shortcode</div>
|
||||
<div class="field-data">
|
||||
<select id="style_shortcode" data-type="select" class="field">
|
||||
<option value="none"><?php _e('Select Shortcode','themewaves'); ?></option><?php
|
||||
if(!empty($tw_pbItems)){
|
||||
foreach ($tw_pbItems as $pbItemSlug => $pbItemArray) {
|
||||
if(empty($pbItemArray['only']) || $pbItemArray['only']==='shortcode'){
|
||||
echo '<option value="' . $pbItemSlug . '" >' . $pbItemArray['name'] . '</option>';
|
||||
}
|
||||
}
|
||||
} ?>
|
||||
</select>
|
||||
<span class="select-text"></span>
|
||||
</div>
|
||||
<div class="field-desc">Select Shortcode</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-field-container"></div>
|
||||
</div><?php
|
||||
}
|
||||
}
|
||||
add_action( 'admin_head', 'init_admin_shortcode_html', 1 );
|
||||
|
||||
if (!function_exists('getModalShortcode')) {
|
||||
function getModalShortcode() {
|
||||
if (!empty($_REQUEST['shortcode_name'])) {
|
||||
die(pbGetItem($_REQUEST['shortcode_name']));
|
||||
}
|
||||
}
|
||||
} add_action('wp_ajax_get_modal_shortcode', 'getModalShortcode');
|
||||
|
||||
if (!function_exists('getPrintShortcode')) {
|
||||
function getPrintShortcode() {
|
||||
if (!empty($_REQUEST['get_print_shortcode'])) {
|
||||
die(pbGetItem($_REQUEST['get_print_shortcode']));
|
||||
}
|
||||
die('<div class="error">Empty Reqeist</div>');
|
||||
}
|
||||
} add_action('wp_ajax_get_print_shortcode', 'getPrintShortcode');
|
||||
|
||||
if (!function_exists('getPrintedItem')) {
|
||||
function getPrintedItem(){
|
||||
if (!empty($_REQUEST['data'])) {
|
||||
$item_array = json_decode(rawUrlDecode($_REQUEST['data']), true);
|
||||
die(pbGetContentBuilderItem($item_array));
|
||||
}
|
||||
die('<div class="error">Empty Reqeist</div>');
|
||||
}
|
||||
} add_action('wp_ajax_get_printed_item', 'getPrintedItem');
|
||||
1281
wp-content/themes/nuzi/framework/shortcode/shortcode_render.php
Normal file
253
wp-content/themes/nuzi/framework/sidebar_generator.php
Normal file
@@ -0,0 +1,253 @@
|
||||
<?php
|
||||
/*
|
||||
Plugin Name: Sidebar Generator
|
||||
Plugin URI: http://www.getson.info
|
||||
Description: This plugin generates as many sidebars as you need. Then allows you to place them on any page you wish. Version 1.1 now supports themes with multiple sidebars.
|
||||
Version: 1.1.0
|
||||
Author: Kyle Getson
|
||||
Author URI: http://www.kylegetson.com
|
||||
Copyright (C) 2009 Kyle Robert Getson
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright (C) 2009 Kyle Robert Getson, kylegetson.com and getson.info
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
class sidebar_generator {
|
||||
|
||||
function sidebar_generator(){
|
||||
add_action('init',array('sidebar_generator','init'));
|
||||
add_action('admin_menu',array('sidebar_generator','admin_menu'));
|
||||
add_action('admin_print_scripts', array('sidebar_generator','admin_print_scripts'));
|
||||
add_action('wp_ajax_add_sidebar', array('sidebar_generator','add_sidebar') );
|
||||
add_action('wp_ajax_remove_sidebar', array('sidebar_generator','remove_sidebar') );
|
||||
}
|
||||
|
||||
function init(){
|
||||
//go through each sidebar and register it
|
||||
$sidebars = sidebar_generator::get_sidebars();
|
||||
|
||||
|
||||
if(is_array($sidebars)){
|
||||
foreach($sidebars as $sidebar){
|
||||
$sidebar_class = sidebar_generator::name_to_class($sidebar);
|
||||
register_sidebar(array(
|
||||
'name'=>$sidebar,
|
||||
'before_widget' => '<aside class="widget '.$sidebar_class.'" id="%1$s">',
|
||||
'after_widget' => '</aside>',
|
||||
'before_title' => '<div class="widget-title-container"><h3 class="widget-title">',
|
||||
'after_title' => '</h3></div>',
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function admin_print_scripts(){
|
||||
wp_print_scripts( array( 'sack' ));
|
||||
?>
|
||||
<script>
|
||||
function add_sidebar( sidebar_name )
|
||||
{
|
||||
|
||||
var mysack = new sack("<?php echo site_url(); ?>/wp-admin/admin-ajax.php" );
|
||||
|
||||
mysack.execute = 1;
|
||||
mysack.method = 'POST';
|
||||
mysack.setVar( "action", "add_sidebar" );
|
||||
mysack.setVar( "sidebar_name", sidebar_name );
|
||||
mysack.encVar( "cookie", document.cookie, false );
|
||||
mysack.onError = function() { alert('Ajax error. Cannot add sidebar' )};
|
||||
mysack.runAJAX();
|
||||
return true;
|
||||
}
|
||||
|
||||
function remove_sidebar( sidebar_name,num )
|
||||
{
|
||||
|
||||
var mysack = new sack("<?php echo site_url(); ?>/wp-admin/admin-ajax.php" );
|
||||
|
||||
mysack.execute = 1;
|
||||
mysack.method = 'POST';
|
||||
mysack.setVar( "action", "remove_sidebar" );
|
||||
mysack.setVar( "sidebar_name", sidebar_name );
|
||||
mysack.setVar( "row_number", num );
|
||||
mysack.encVar( "cookie", document.cookie, false );
|
||||
mysack.onError = function() { alert('Ajax error. Cannot add sidebar' )};
|
||||
mysack.runAJAX();
|
||||
//alert('hi!:::'+sidebar_name);
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
function add_sidebar(){
|
||||
$sidebars = sidebar_generator::get_sidebars();
|
||||
$name = str_replace(array("\n","\r","\t"),'',$_POST['sidebar_name']);
|
||||
$id = sidebar_generator::name_to_class($name);
|
||||
if(isset($sidebars[$id])){
|
||||
die("alert('Sidebar already exists, please use a different name.')");
|
||||
}
|
||||
|
||||
$sidebars[$id] = $name;
|
||||
sidebar_generator::update_sidebars($sidebars);
|
||||
|
||||
$js = "
|
||||
var tbl = document.getElementById('sbg_table');
|
||||
var lastRow = tbl.rows.length;
|
||||
// if there's no header row in the table, then iteration = lastRow + 1
|
||||
var iteration = lastRow;
|
||||
var row = tbl.insertRow(lastRow);
|
||||
|
||||
// left cell
|
||||
var cellLeft = row.insertCell(0);
|
||||
var textNode = document.createTextNode('$name');
|
||||
cellLeft.appendChild(textNode);
|
||||
|
||||
//middle cell
|
||||
var cellLeft = row.insertCell(1);
|
||||
var textNode = document.createTextNode('$id');
|
||||
cellLeft.appendChild(textNode);
|
||||
|
||||
//var cellLeft = row.insertCell(2);
|
||||
//var textNode = document.createTextNode('[<a href=\'javascript:void(0);\' onclick=\'return remove_sidebar_link($name);\'>Remove</a>]');
|
||||
//cellLeft.appendChild(textNode)
|
||||
|
||||
var cellLeft = row.insertCell(2);
|
||||
removeLink = document.createElement('a');
|
||||
linkText = document.createTextNode('remove');
|
||||
removeLink.setAttribute('onclick', 'remove_sidebar_link(\'$name\')');
|
||||
removeLink.setAttribute('href', 'javacript:void(0)');
|
||||
|
||||
removeLink.appendChild(linkText);
|
||||
cellLeft.appendChild(removeLink);
|
||||
|
||||
|
||||
";
|
||||
|
||||
|
||||
die( "$js");
|
||||
}
|
||||
|
||||
function remove_sidebar(){
|
||||
$sidebars = sidebar_generator::get_sidebars();
|
||||
$name = str_replace(array("\n","\r","\t"),'',$_POST['sidebar_name']);
|
||||
$id = sidebar_generator::name_to_class($name);
|
||||
if(!isset($sidebars[$id])){
|
||||
die("alert('Sidebar does not exist.')");
|
||||
}
|
||||
$row_number = $_POST['row_number'];
|
||||
unset($sidebars[$id]);
|
||||
sidebar_generator::update_sidebars($sidebars);
|
||||
$js = "
|
||||
var tbl = document.getElementById('sbg_table');
|
||||
tbl.deleteRow($row_number)
|
||||
|
||||
";
|
||||
die($js);
|
||||
}
|
||||
|
||||
function admin_menu(){
|
||||
add_theme_page('Sidebars', 'Sidebars', 'manage_options', 'multiple_sidebars', array('sidebar_generator','admin_page'));
|
||||
}
|
||||
|
||||
function admin_page(){
|
||||
?>
|
||||
<script>
|
||||
function remove_sidebar_link(name,num){
|
||||
answer = confirm("Are you sure you want to remove " + name + "?\nThis will remove any widgets you have assigned to this sidebar.");
|
||||
if(answer){
|
||||
//alert('AJAX REMOVE');
|
||||
remove_sidebar(name,num);
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function add_sidebar_link(){
|
||||
var sidebar_name = prompt("Sidebar Name:","");
|
||||
//alert(sidebar_name);
|
||||
add_sidebar(sidebar_name);
|
||||
}
|
||||
</script>
|
||||
<div class="wrap">
|
||||
<h2>Sidebar Generator</h2>
|
||||
<p>
|
||||
The sidebar name is for your use only. It will not be visible to any of your visitors.
|
||||
A CSS class is assigned to each of your sidebar, use this styling to customize the sidebars.
|
||||
</p>
|
||||
<br />
|
||||
<div class="add_sidebar">
|
||||
<a href="javascript:void(0);" onclick="return add_sidebar_link()" title="Add a sidebar">+ Add Sidebar</a>
|
||||
</div>
|
||||
<br />
|
||||
<table class="widefat page" id="sbg_table" style="width:600px;">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>CSS class</th>
|
||||
<th>Remove</th>
|
||||
</tr>
|
||||
<?php
|
||||
$sidebars = sidebar_generator::get_sidebars();
|
||||
//$sidebars = array('bob','john','mike','asdf');
|
||||
if(is_array($sidebars) && !empty($sidebars)){
|
||||
$cnt=0;
|
||||
foreach($sidebars as $sidebar){
|
||||
$alt = ($cnt%2 == 0 ? 'alternate' : '');
|
||||
?>
|
||||
<tr class="<?php echo $alt?>">
|
||||
<td><?php echo $sidebar; ?></td>
|
||||
<td><?php echo sidebar_generator::name_to_class($sidebar); ?></td>
|
||||
<td><a href="javascript:void(0);" onclick="return remove_sidebar_link('<?php echo $sidebar; ?>',<?php echo $cnt+1; ?>);" title="Remove this sidebar">remove</a></td>
|
||||
</tr>
|
||||
<?php
|
||||
$cnt++;
|
||||
}
|
||||
}else{
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="3">No Sidebars defined</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* replaces array of sidebar names
|
||||
*/
|
||||
function update_sidebars($sidebar_array){
|
||||
$sidebars = update_option('sbg_sidebars',$sidebar_array);
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the generated sidebars
|
||||
*/
|
||||
function get_sidebars(){
|
||||
$sidebars = get_option('sbg_sidebars');
|
||||
return $sidebars;
|
||||
}
|
||||
function name_to_class($name){
|
||||
$class = str_replace(array(' ',',','.','"',"'",'/',"\\",'+','=',')','(','*','&','^','%','$','#','@','!','~','`','<','>','?','[',']','{','}','|',':',),'',$name);
|
||||
return $class;
|
||||
}
|
||||
|
||||
}
|
||||
new sidebar_generator;
|
||||
?>
|
||||
121
wp-content/themes/nuzi/framework/theme_css.php
Normal file
@@ -0,0 +1,121 @@
|
||||
<?php
|
||||
|
||||
function theme_option_styles() {
|
||||
|
||||
function hex2rgb($hex) {
|
||||
$hex = str_replace("#", "", $hex);
|
||||
|
||||
if (strlen($hex) == 3) {
|
||||
$r = hexdec(substr($hex, 0, 1) . substr($hex, 0, 1));
|
||||
$g = hexdec(substr($hex, 1, 1) . substr($hex, 1, 1));
|
||||
$b = hexdec(substr($hex, 2, 1) . substr($hex, 2, 1));
|
||||
} else {
|
||||
$r = hexdec(substr($hex, 0, 2));
|
||||
$g = hexdec(substr($hex, 2, 2));
|
||||
$b = hexdec(substr($hex, 4, 2));
|
||||
}
|
||||
$rgb = array($r, $g, $b);
|
||||
return implode(",", $rgb); // returns the rgb values separated by commas
|
||||
//return $rgb; // returns an array with the rgb values
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- Custom CSS -->
|
||||
|
||||
<style>
|
||||
body {
|
||||
font-family: <?php echo tw_option('body_text_font', 'face'); ?>, Arial, Helvetica, sans-serif;
|
||||
font-size: <?php echo tw_option('body_text_font', 'size'); ?>;
|
||||
font-weight: <?php echo tw_option('body_text_font', 'style'); ?>;
|
||||
color: <?php echo tw_option('body_text_font', 'color'); ?>;
|
||||
<?php
|
||||
if (tw_option('theme_layout') == 'Boxed Layout') {
|
||||
if (tw_option('background_color') != "") {
|
||||
echo 'background-color: ' . tw_option('background_color') . ';';
|
||||
}
|
||||
if (tw_option('background_image') != "") {
|
||||
echo 'background-image: url(' . tw_option('background_image') . ');';
|
||||
}
|
||||
if (tw_option('background_repeat') != 'Strech Image') {
|
||||
echo 'background-repeat: ' . tw_option('background_repeat') . ';';
|
||||
} else {
|
||||
echo '-webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;';
|
||||
}
|
||||
echo "background-attachment: fixed;";
|
||||
echo "margin-top:" . tw_option('margin_top') . "px;";
|
||||
echo "margin-bottom:" . tw_option('margin_bottom') . "px";
|
||||
}
|
||||
?>
|
||||
}
|
||||
h1,h2,h3,h4,h5,h6,
|
||||
.btn,button,
|
||||
.loop-media blockquote p,
|
||||
input[type="submit"],
|
||||
input[type="reset"],
|
||||
input[type="button"]{font-family: <?php echo tw_option('heading_font'); ?>;}
|
||||
h1{ font-size: <?php echo tw_option('h1_spec_font', 'size'); ?>; color: <?php echo tw_option('h1_spec_font', 'color'); ?>; }
|
||||
h2{ font-size: <?php echo tw_option('h2_spec_font', 'size'); ?>; color: <?php echo tw_option('h2_spec_font', 'color'); ?>; }
|
||||
h3{ font-size: <?php echo tw_option('h3_spec_font', 'size'); ?>; color: <?php echo tw_option('h3_spec_font', 'color'); ?>; }
|
||||
h4{ font-size: <?php echo tw_option('h4_spec_font', 'size'); ?>; color: <?php echo tw_option('h4_spec_font', 'color'); ?>; }
|
||||
h5{ font-size: <?php echo tw_option('h5_spec_font', 'size'); ?>; color: <?php echo tw_option('h5_spec_font', 'color'); ?>; }
|
||||
h6{ font-size: <?php echo tw_option('h6_spec_font', 'size'); ?>; color: <?php echo tw_option('h6_spec_font', 'color'); ?>; }
|
||||
|
||||
a,.header_3 ul.sf-menu > li:hover > a,.header_3 .sf-menu > li.current-menu-item > a,.sf-menu > li.current-menu-item > a,.tw-callout h1 a,.tw-service-content a,#sidebar ul.menu .current_page_item a{ color: <?php echo tw_option('link_color'); ?>; }
|
||||
a:hover, a:focus,.loop-meta a:hover,article .loop-content a.more-link:hover{ color: <?php echo tw_option('link_hover_color'); ?>; }
|
||||
|
||||
/* Top Bar ------------------------------------------------------------------------ */
|
||||
|
||||
.tw-top-bar{ background: <?php echo tw_option('top_bar_bg'); ?>;}
|
||||
|
||||
/* Header ------------------------------------------------------------------------ */
|
||||
|
||||
#header .logo{ margin-top: <?php echo tw_option('logo_top'); ?>; margin-bottom: <?php echo tw_option('logo_bottom'); ?>; }
|
||||
#header { background-color: <?php echo tw_option('header_background'); ?>; }
|
||||
|
||||
/* Navigation ------------------------------------------------------------------------ */
|
||||
|
||||
#header .tw-menu-container{ background-color: <?php echo tw_option('menu_background'); ?>; }
|
||||
ul.sf-menu > li a{ font-family: <?php echo tw_option('menu_font', 'face'); ?>, Arial, Helvetica, sans-serif; font-size: <?php echo tw_option('menu_font', 'size'); ?>; font-weight: <?php echo tw_option('menu_font', 'style'); ?>; color: <?php echo tw_option('menu_font', 'color'); ?>; }
|
||||
ul.sf-menu > li{ background-color: <?php echo tw_option('menu_hover_background'); ?>; }
|
||||
.sf-menu > li.current-page-item > a, ul.sf-menu > li a:hover,.sf-menu > li.current-menu-item > a,.sf-menu > li.current-menu-item[class^="icon-"]:before, .sf-menu > li.current-menu-item[class*=" icon-"]:before,.sf-menu > li.current_page_ancestor > a,.sf-menu > li.current_page_ancestor[class^="icon-"]:before, .sf-menu > li.current_page_ancestor[class*=" icon-"]:before{ color: <?php echo tw_option('menu_hover'); ?>; }
|
||||
ul.sf-menu li ul li { background: <?php echo tw_option('submenu_bg'); ?>; }
|
||||
ul.sf-menu li ul li:hover { background: <?php echo tw_option('submenu_hover_background'); ?>; }
|
||||
ul.sf-menu li ul li.current-menu-item a,ul.sf-menu li ul li a { color: <?php echo tw_option('submenu_link'); ?>; }
|
||||
ul.sf-menu li ul li a:hover,ul.sf-menu li ul li.current-menu-item a,ul.sf-menu li ul li.current_page_item a { color: <?php echo tw_option('submenu_hover'); ?>; }
|
||||
|
||||
/* Main ------------------------------------------------------------------------ */
|
||||
#main { background: <?php echo tw_option('body_background'); ?>; }
|
||||
|
||||
/* Footer ------------------------------------------------------------------------ */
|
||||
|
||||
#footer{ background: <?php echo tw_option('footer_background'); ?>; }
|
||||
#footer{ color: <?php echo tw_option('footer_text_color'); ?>; }
|
||||
#footer a{ color: <?php echo tw_option('footer_link_color'); ?>; }
|
||||
#footer a:hover, #footer .tw-recent-posts-widget h4 a:hover{ color: <?php echo tw_option('footer_link_hover_color'); ?>; }
|
||||
#sidebar h3.widget-title, .sidebar-container .tw-title-container h3 { font-family: <?php echo tw_option('sidebar_widgets_title', 'face'); ?>, Arial, Helvetica, sans-serif; font-size: <?php echo tw_option('sidebar_widgets_title', 'size'); ?>; font-weight: <?php echo tw_option('sidebar_widgets_title', 'style'); ?>; color: <?php echo tw_option('sidebar_widgets_title', 'color'); ?>; }
|
||||
.sidebar-container .tw-title-container h3 span { color: <?php echo tw_option('sidebar_widgets_title', 'color'); ?>;}
|
||||
#footer h3.widget-title { font-family: <?php echo tw_option('footer_widgets_title', 'face'); ?>, Arial, Helvetica, sans-serif; font-size: <?php echo tw_option('footer_widgets_title', 'size'); ?>; font-weight: <?php echo tw_option('footer_widgets_title', 'style'); ?>; color: <?php echo tw_option('footer_widgets_title', 'color'); ?>; }
|
||||
|
||||
/* General Color ------------------------------------------------------------------------ */
|
||||
|
||||
::selection{ background: <?php echo tw_option('primary_color'); ?>; }
|
||||
::-moz-selection{ background: <?php echo tw_option('primary_color'); ?>; }
|
||||
.tagcloud a:hover, #footer .tagcloud a:hover{ background: <?php echo tw_option('primary_color'); ?> !important; }
|
||||
button,input[type="submit"],input[type="reset"],input[type="button"],.content-meta,.comment-block .comment span.comment-splash,.tw-pagination.pagination ul>li>a.selected{ background: <?php echo tw_option('primary_color'); ?>; }
|
||||
.team-member ul.tw-social-icon li a:hover,ul.tw-social-icon li a:hover,.carousel-arrow a:hover,.list_carousel a.carousel-prev:hover,.list_carousel a.carousel-next:hover{ background-color: <?php echo tw_option('primary_color'); ?>; }
|
||||
.featured,.tw-dropcap,.progress .bar,div.jp-jplayer.jp-jplayer-video,.pagination ul>li>a.current, .pagination ul>li>span.current,.carousel-content .post-format,span.post-format{ background-color: <?php echo tw_option('primary_color'); ?>; }
|
||||
footer#footer .tw-recent-posts-widget .meta a,.highlight,.tw-top-bar-info a,#bottom a,.tw-title-container h3 span{ color: <?php echo tw_option('primary_color'); ?>; }
|
||||
.tw-top-service-text div:last-child,h2.loop-title a:hover,#sidebar a:hover{ color: <?php echo tw_option('primary_color'); ?>; }
|
||||
blockquote,.pagination ul>li>a.current, .pagination ul>li>span.current,ul.sf-menu > li > ul,.team-member .loop-image{ border-color: <?php echo tw_option('primary_color'); ?>; }
|
||||
.sf-menu > li:hover,.sf-menu > li.current-menu-item,.sf-menu > li.current-page-item,.sf-menu > li.current_page_ancestor{ background:<?php echo tw_option('primary_color'); ?>; }
|
||||
.btn,#page-title h3, .tw-breadcrumb,ul.sf-menu > li:hover,.sf-menu > li.current_page_item {background-color:<?php echo tw_option('primary_color'); ?>;}
|
||||
|
||||
.image-overlay{background-color: <?php echo "rgba(" . hex2rgb(tw_option('primary_color')) . ",.7)" ?> ; }
|
||||
<?php echo tw_option('custom_css'); ?>
|
||||
</style>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
add_action('wp_head', 'theme_option_styles', 100);
|
||||
?>
|
||||
845
wp-content/themes/nuzi/framework/theme_functions.php
Normal file
@@ -0,0 +1,845 @@
|
||||
<?php
|
||||
global $tw_socials;
|
||||
$tw_socials = array(
|
||||
'facebook' => array(
|
||||
'name' => 'facebook_username',
|
||||
'link' => 'http://www.facebook.com/*',
|
||||
),
|
||||
'flickr' => array(
|
||||
'name' => 'flickr_username',
|
||||
'link' => 'http://www.flickr.com/photos/*'
|
||||
),
|
||||
'gplus' => array(
|
||||
'name' => 'googleplus_username',
|
||||
'link' => 'https://plus.google.com/u/0/*'
|
||||
),
|
||||
'twitter' => array(
|
||||
'name' => 'twitter_username',
|
||||
'link' => 'http://twitter.com/*',
|
||||
),
|
||||
'instagram' => array(
|
||||
'name' => 'instagram_username',
|
||||
'link' => 'http://instagram.com/*',
|
||||
),
|
||||
'pinterest' => array(
|
||||
'name' => 'pinterest_username',
|
||||
'link' => 'http://pinterest.com/*',
|
||||
),
|
||||
'skype' => array(
|
||||
'name' => 'skype_username',
|
||||
'link' => 'skype:*'
|
||||
),
|
||||
'vimeo' => array(
|
||||
'name' => 'vimeo_username',
|
||||
'link' => 'http://vimeo.com/*',
|
||||
),
|
||||
'youtube' => array(
|
||||
'name' => 'youtube_username',
|
||||
'link' => 'http://www.youtube.com/user/*',
|
||||
),
|
||||
'dribbble' => array(
|
||||
'name' => 'dribbble_username',
|
||||
'link' => 'http://dribbble.com/*',
|
||||
),
|
||||
'linkedin' => array(
|
||||
'name' => 'linkedin_username',
|
||||
'link' => '*'
|
||||
),
|
||||
'rss' => array(
|
||||
'name' => 'rss_username',
|
||||
'link' => 'http://*/feed'
|
||||
)
|
||||
);
|
||||
// To excerpt
|
||||
//=======================================================
|
||||
if (!function_exists('to_excerpt')) {
|
||||
|
||||
function to_excerpt($str, $length) {
|
||||
$str = strip_tags($str);
|
||||
$str = explode(" ", $str);
|
||||
return implode(" ", array_slice($str, 0, $length));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Go url
|
||||
//=======================================================
|
||||
if (!function_exists('to_url')) {
|
||||
|
||||
function to_url($url) {
|
||||
if (!preg_match_all('!https?://[\S]+!', $url, $matches))
|
||||
$url = "http://" . $url;
|
||||
return $url;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Page,Post get, print content
|
||||
//=======================================================
|
||||
|
||||
function loop_content() {
|
||||
global $tw_options, $more;
|
||||
$more = 0;
|
||||
$readMore = !empty($tw_options['more_text']) ? $tw_options['more_text'] : __('Continue Reading -', 'themewaves');
|
||||
|
||||
if (has_excerpt()) {
|
||||
the_excerpt();
|
||||
} elseif (has_more()) {
|
||||
the_content("");
|
||||
echo '<a href="' . get_permalink() . '" class="more-link">' . $readMore . '</a>';
|
||||
} elseif (!empty($tw_options['excerpt_count'])) {
|
||||
echo apply_filters("the_content", to_excerpt(strip_shortcodes(get_the_content()), $tw_options['excerpt_count']));
|
||||
echo '<a href="' . get_permalink() . '" class="more-link">' . $readMore . '</a>';
|
||||
} else {
|
||||
echo apply_filters("the_content", strip_shortcodes(get_the_content("")));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function tw_option($index1, $index2=false) {
|
||||
global $smof_data;
|
||||
if($index2){
|
||||
$output = isset($smof_data[$index1][$index2]) ? $smof_data[$index1][$index2] : false;
|
||||
return $output;
|
||||
}
|
||||
$output = isset($smof_data[$index1]) ? $smof_data[$index1] : false;
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
// Page, Post custom metaboxes
|
||||
//=======================================================
|
||||
function get_metabox($name) {
|
||||
global $post;
|
||||
if ($post) {
|
||||
$metabox = get_post_meta($post->ID, 'themewaves_' . strtolower(THEMENAME) . '_options', true);
|
||||
return isset($metabox[$name]) ? $metabox[$name] : "";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function set_metabox($name,$val) {
|
||||
global $post;
|
||||
if ($post) {
|
||||
$metabox = get_post_meta($post->ID, 'themewaves_' . strtolower(THEMENAME) . '_options', true);
|
||||
$metabox[$name] = $val;
|
||||
return update_post_meta($post->ID, 'themewaves_' . strtolower(THEMENAME) . '_options', $metabox);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Print menu
|
||||
//=======================================================
|
||||
function theme_menu(){
|
||||
wp_nav_menu( array(
|
||||
'container' => 'div',
|
||||
'container_class' => 'tw-menu-container clearfix',
|
||||
'menu_id' => 'menu',
|
||||
'menu_class' => 'sf-menu',
|
||||
'fallback_cb' => 'no_main',
|
||||
'theme_location' => 'main' )
|
||||
);
|
||||
}
|
||||
function no_main(){
|
||||
echo "<div class='tw-menu-container clearfix'><ul id='menu' class='sf-menu'>";
|
||||
wp_list_pages(array('title_li' => ''));
|
||||
echo "</ul></div>";
|
||||
}
|
||||
function mobile_menu(){
|
||||
wp_nav_menu( array(
|
||||
'container' => false,
|
||||
'menu_id' => '',
|
||||
'menu_class' => 'clearfix',
|
||||
'fallback_cb' => 'no_mobile',
|
||||
'theme_location' => 'main' )
|
||||
);
|
||||
}
|
||||
function no_mobile(){
|
||||
echo "<ul class='clearfix'>";
|
||||
wp_list_pages(array('title_li' => ''));
|
||||
echo "</ul>";
|
||||
}
|
||||
|
||||
// Footer menu
|
||||
//=======================================================
|
||||
function footer_menu(){
|
||||
wp_nav_menu( array('container' => false,
|
||||
'menu_class' => 'footer-menu inline',
|
||||
'fallback_cb' => 'no_footer',
|
||||
'depth' => 1,
|
||||
'theme_location' => 'footer' ) );
|
||||
}
|
||||
function no_footer(){
|
||||
//echo "<ul class='footer-menu inline'>"; wp_list_pages(array('depth'=>1,'title_li'=>'')); echo "</ul>";
|
||||
}
|
||||
|
||||
|
||||
// Print logo
|
||||
//=======================================================
|
||||
function theme_logo() {
|
||||
$top = tw_option('logo_top')!="" ? (' margin-top:'.tw_option('logo_top').'px;') : '';
|
||||
$bottom = tw_option('logo_bottom')!="" ? (' margin-bottom:'.tw_option('logo_bottom').'px;') : '';
|
||||
echo '<div class="tw-logo" style="'.$top.$bottom.'">';
|
||||
echo '<a class="logo" href="' . home_url() . '">';
|
||||
if (tw_option("theme_logo")=="") {
|
||||
bloginfo('name');
|
||||
} else {
|
||||
if(tw_option("logo_retina"))
|
||||
echo '<img class="logo-img" src="' . tw_option("theme_logo_retina") . '" style="width:'.tw_option('logo_width').'px" alt="' . get_bloginfo('name') . '" />';
|
||||
else
|
||||
echo '<img class="logo-img" src="' . tw_option("theme_logo") . '" alt="' . get_bloginfo('name') . '" />';
|
||||
}
|
||||
echo '</a>';
|
||||
echo '</div>';
|
||||
//echo '<div class="site-description">' . get_bloginfo('description') . '</div>';
|
||||
}
|
||||
|
||||
// Get featured text
|
||||
//=======================================================
|
||||
function get_featuredtext() {
|
||||
global $post;
|
||||
|
||||
if (is_singular()) {
|
||||
$return = "<h2>" . $post->post_title . "</h2>";
|
||||
return $return;
|
||||
} elseif (is_category()) {
|
||||
$return = "<h2>";
|
||||
$return .= __("Category", "themewaves") . " : " . single_cat_title("", false);
|
||||
$return .= "</h2>";
|
||||
return $return;
|
||||
} elseif (is_tax('portfolios')) {
|
||||
$return = "<h2>";
|
||||
$return .= __("Portfolio", "themewaves") . " : " . single_cat_title("", false);
|
||||
$return .= "</h2>";
|
||||
return $return;
|
||||
} elseif (is_tag()) {
|
||||
$return = "<h2>";
|
||||
$return .= __("Tag", "themewaves") . " : " . single_tag_title("", false);
|
||||
$return .= "</h2>";
|
||||
return $return;
|
||||
} elseif (is_404()) {
|
||||
$return = "<h2>" . __("Nothing Found!", "themewaves") . "</h1>";
|
||||
return $return;
|
||||
} elseif (is_author()) {
|
||||
global $tw_author;
|
||||
$userdata = get_userdata($tw_author);
|
||||
$return = "<h2>" . __("Author: ", "themewaves") . $userdata->display_name . "</h1>";
|
||||
return $return;
|
||||
} elseif (is_archive()) {
|
||||
$return = "<h2>";
|
||||
if (is_day()){
|
||||
$return .= __("Daily Archives", "themewaves") . " : " . get_the_date();
|
||||
}elseif (is_month()) {
|
||||
$return .= __("Monthly Archives", "themewaves") . " : " . get_the_date("F Y");
|
||||
}elseif (is_year()) {
|
||||
$return .= __("Yearly Archives", "themewaves") . " : " . get_the_date("Y");
|
||||
}else {
|
||||
$return .= __("Blog Archives", "themewaves");
|
||||
}
|
||||
$return .= "</h2>";
|
||||
return $return;
|
||||
} elseif (is_search()) {
|
||||
$return = "<h2>" . __("Search results for", "themewaves") . " : " . get_search_query() . "</h2>";
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
|
||||
// Sidebar
|
||||
//=======================================================
|
||||
function sidebar($sidebar = 'sidebar') {
|
||||
if (function_exists('dynamic_sidebar') && dynamic_sidebar($sidebar)) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function print_styles($links) {
|
||||
for ($i = 0; $i < count($links); $i++) {
|
||||
echo '<link type="text/css" rel="stylesheet" href="' . file_require(get_template_directory_uri() . '/' . $links[$i], true) . '" />';
|
||||
}
|
||||
|
||||
echo '<link type="text/css" rel="stylesheet" href="http://fonts.googleapis.com/css?family=' . str_replace(" ", "+", get_settings_value('head_felement')) . ':300,300italic,400,400italic,700,700italic,600,600italic" />';
|
||||
if (get_settings_value('body_felement') != get_settings_value('head_felement')) {
|
||||
echo '<link type="text/css" rel="stylesheet" href="http://fonts.googleapis.com/css?family=' . str_replace(" ", "+", get_settings_value('body_felement')) . ':400,400italic,700,700italic" />';
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists("current_title")) {
|
||||
|
||||
function current_title() {
|
||||
global $page, $paged;
|
||||
echo "<title>";
|
||||
wp_title('|', true, 'right');
|
||||
bloginfo('name');
|
||||
$site_description = get_bloginfo('description', 'display');
|
||||
if ($site_description && ( is_home() || is_front_page() ))
|
||||
echo " | $site_description";
|
||||
if ($paged >= 2 || $page >= 2)
|
||||
echo ' | ' . sprintf(__('Page %s', 'themewaves'), max($paged, $page));
|
||||
echo "</title>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function favicon() {
|
||||
if (tw_option('theme_favicon')=="") {
|
||||
echo '<link rel="shortcut icon" href="' . THEME_DIR . '/assets/img/favicon.ico"/>';
|
||||
} else {
|
||||
echo '<link rel="shortcut icon" href="' . tw_option('theme_favicon') . '"/>';
|
||||
}
|
||||
if(tw_option('favicon_retina')) {
|
||||
echo tw_option('favicon_iphone')!="" ? ('<link rel="apple-touch-icon" href="' . tw_option('favicon_iphone') . '"/>') : '';
|
||||
echo tw_option('favicon_iphone_retina')!="" ? ('<link rel="apple-touch-icon" sizes="114x114" href="' . tw_option('favicon_iphone_retina') . '"/>') : '';
|
||||
echo tw_option('favicon_ipad')!="" ? ('<link rel="apple-touch-icon" sizes="72x72" href="' . tw_option('favicon_ipad') . '"/>') : '';
|
||||
echo tw_option('favicon_ipad_retina')!="" ? ('<link rel="apple-touch-icon" sizes="144x144" href="' . tw_option('favicon_ipad_retina') . '"/>') : '';
|
||||
}
|
||||
}
|
||||
|
||||
function portfolio_image($height="", $width=270, $title=false) {
|
||||
global $post;
|
||||
$class = $title ? ' with-title' : '';
|
||||
if (has_post_thumbnail($post->ID)) { ?>
|
||||
<div class="loop-image">
|
||||
<div class="without-a<?php echo $class;?>">
|
||||
<?php echo post_image_show($width,$height); ?>
|
||||
<div class="image-overlay">
|
||||
<div class="image-links">
|
||||
<?php if($title) { ?>
|
||||
<h2 class="portfolio-title"><a href="<?php the_permalink();?>"><?php the_title(); ?></a><span></span></h2>
|
||||
<?php } ?>
|
||||
<a class="hover-zoom" rel="prettyPhoto" href="<?php echo post_image_show(0,0,true);?>"></a>
|
||||
<a class="hover-link" href="<?php the_permalink();?>"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
function format_standard($portfolio=false, $height="", $width=270) {
|
||||
global $post;
|
||||
if (has_post_thumbnail($post->ID)) {
|
||||
$overlay = "hover-link";
|
||||
$link = get_permalink();
|
||||
$rell = '';
|
||||
$width = $portfolio ? $width : 870;
|
||||
$height = $portfolio ? $height : get_metabox('image_height');
|
||||
if(is_single()) {
|
||||
$lrg_img = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full');
|
||||
$link = $lrg_img[0];
|
||||
$overlay = "hover-zoom";
|
||||
$rell = ' rel="prettyPhoto"';
|
||||
if($portfolio) {
|
||||
$width = 770;
|
||||
$height = get_metabox('image_height');
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="loop-image">
|
||||
<a href="<?php echo $link; ?>"<?php echo $rell ;?>>
|
||||
<?php echo post_image_show($width,$height); ?>
|
||||
<div class="image-overlay <?php echo $overlay; ?>"></div>
|
||||
</a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
function format_gallery($portfolio=false,$height="",$width=270,$title=false) {
|
||||
global $post;
|
||||
$ids = get_post_meta($post->ID, 'gallery_image_ids', true);
|
||||
$gallery_height = get_post_meta($post->ID, 'format_image_height', true);
|
||||
$class = $title ? ' with-title' : '';
|
||||
if(!empty($ids)) {
|
||||
?>
|
||||
<div class="loop-gallery gallery-container clearfix">
|
||||
<div class="without-a<?php echo $class;?>">
|
||||
<div class="gallery-slide">
|
||||
<?php
|
||||
$width = $portfolio ? $width : 870;
|
||||
$height = $portfolio ? $height : $gallery_height;
|
||||
if(is_single()&&$portfolio) {
|
||||
$width = 770;
|
||||
$height = get_metabox('format_image_height');
|
||||
}
|
||||
$i = 0;
|
||||
foreach(explode( ',', $ids ) as $id) {
|
||||
if(!empty($id)) {
|
||||
$i++;
|
||||
$imgurl0 = aq_resize(wp_get_attachment_url($id), $width, $height, true);
|
||||
$imgurl = !empty($imgurl0) ? $imgurl0 : wp_get_attachment_url($id);
|
||||
?>
|
||||
<div class="slide-item">
|
||||
<img src="<?php echo $imgurl;?>" alt="<?php the_title(); ?>">
|
||||
<?php if($i > 1) { echo '<a href="'.wp_get_attachment_url($id).'" rel="prettyPhoto['.$post->ID.']"></a>'; } else {$img_url = wp_get_attachment_url($id);}?>
|
||||
</div>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php if(is_single()) { ?>
|
||||
<a class="gallery-zoom" rel="prettyPhoto[<?php echo $post->ID;?>]" href="<?php echo isset($img_url) ? $img_url : '';?>">
|
||||
<div class="image-overlay hover-zoom"></div>
|
||||
</a>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<div class="image-overlay">
|
||||
<div class="image-links">
|
||||
<?php if($title) { ?>
|
||||
<h2 class="portfolio-title"><a href="<?php the_permalink();?>"><?php the_title(); ?></a><span></span></h2>
|
||||
<?php } ?>
|
||||
<a class="hover-zoom" rel="prettyPhoto[<?php echo $post->ID;?>]" href="<?php echo isset($img_url) ? $img_url : '';?>"></a>
|
||||
<a class="hover-link" href="<?php the_permalink();?>"></a>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="carousel-arrow">
|
||||
<a class="carousel-prev" href="#"><i class="icon-chevron-left"></i></a>
|
||||
<a class="carousel-next" href="#"><i class="icon-chevron-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
function format_image() {
|
||||
format_standard();
|
||||
}
|
||||
|
||||
function jplayer_script() {
|
||||
wp_enqueue_script('jplayer_script', THEME_DIR.'/assets/js/jquery.jplayer.min.js', false, false, true);
|
||||
}
|
||||
|
||||
function format_audio() {
|
||||
global $post;
|
||||
|
||||
$audio_url = get_post_meta($post->ID, 'format_audio_mp3', true);
|
||||
$embed = get_post_meta($post->ID, 'format_audio_embed', true);
|
||||
if (!empty($embed)) {
|
||||
echo apply_filters("the_content", htmlspecialchars_decode($embed));
|
||||
} else {
|
||||
echo post_image_show();
|
||||
if (!empty($audio_url)) {
|
||||
add_action('wp_footer', 'jplayer_script');
|
||||
?>
|
||||
<div id="jquery_jplayer_<?php echo $post->ID; ?>" class="jp-jplayer jp-jplayer-audio" data-pid="<?php echo $post->ID; ?>" data-mp3="<?php echo $audio_url; ?>"></div>
|
||||
<div class="jp-audio-container">
|
||||
<div class="jp-audio">
|
||||
<div class="jp-type-single">
|
||||
<div id="jp_interface_<?php echo $post->ID; ?>" class="jp-interface">
|
||||
<ul class="jp-controls">
|
||||
<li><div class="seperator-first"></div></li>
|
||||
<li><div class="seperator-second"></div></li>
|
||||
<li><a href="#" class="jp-play" tabindex="1">play</a></li>
|
||||
<li><a href="#" class="jp-pause" tabindex="1">pause</a></li>
|
||||
<li><a href="#" class="jp-mute" tabindex="1">mute</a></li>
|
||||
<li><a href="#" class="jp-unmute" tabindex="1">unmute</a></li>
|
||||
</ul>
|
||||
<div class="jp-progress-container">
|
||||
<div class="jp-progress">
|
||||
<div class="jp-seek-bar">
|
||||
<div class="jp-play-bar"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="jp-volume-bar-container">
|
||||
<div class="jp-volume-bar">
|
||||
<div class="jp-volume-bar-value"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function format_video($portfolio=false,$video_embed="",$video_thumb="",$video_m4v="",$height="") {
|
||||
global $post;
|
||||
$start = $end = '';
|
||||
if($portfolio){
|
||||
if(!empty($height)) { $start = '<div class="video-height" style="height:'.$height.'px;">'; $end = '</div>'; }
|
||||
} else {
|
||||
$video_embed = get_post_meta($post->ID, 'format_video_embed', true);
|
||||
$video_thumb = get_post_meta($post->ID, 'format_video_thumb', true);
|
||||
$video_m4v = get_post_meta($post->ID, 'format_video_m4v', true);
|
||||
}
|
||||
|
||||
if (!empty($video_embed)) {
|
||||
echo $start;
|
||||
if($portfolio && !is_single()){
|
||||
echo '<a href="'.get_permalink().'">';
|
||||
echo vimeo_youtube_image(htmlspecialchars_decode($video_embed));
|
||||
echo '<div class="image-overlay hover-link"></div>';
|
||||
echo '</a>';
|
||||
} else {
|
||||
echo apply_filters("the_content", htmlspecialchars_decode($video_embed));
|
||||
}
|
||||
echo $end;
|
||||
} elseif (!empty($video_m4v)) {
|
||||
add_action('wp_footer', 'jplayer_script');
|
||||
?>
|
||||
|
||||
<div id="jquery_jplayer_<?php echo $post->ID; ?>" class="jp-jplayer jp-jplayer-video" data-pid="<?php echo $post->ID; ?>" data-m4v="<?php echo $video_m4v; ?>" data-thumb="<?php echo $video_thumb; ?>"></div>
|
||||
<div class="jp-video-container">
|
||||
<div class="jp-video">
|
||||
<div class="jp-type-single">
|
||||
<div id="jp_interface_<?php echo $post->ID; ?>" class="jp-interface">
|
||||
<ul class="jp-controls">
|
||||
<li><div class="seperator-first"></div></li>
|
||||
<li><div class="seperator-second"></div></li>
|
||||
<li><a href="#" class="jp-play" tabindex="1">play</a></li>
|
||||
<li><a href="#" class="jp-pause" tabindex="1">pause</a></li>
|
||||
<li><a href="#" class="jp-mute" tabindex="1">mute</a></li>
|
||||
<li><a href="#" class="jp-unmute" tabindex="1">unmute</a></li>
|
||||
</ul>
|
||||
<div class="jp-progress-container">
|
||||
<div class="jp-progress">
|
||||
<div class="jp-seek-bar">
|
||||
<div class="jp-play-bar"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="jp-volume-bar-container">
|
||||
<div class="jp-volume-bar">
|
||||
<div class="jp-volume-bar-value"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
function format_quote() {
|
||||
global $post;
|
||||
|
||||
$quote_text = get_post_meta($post->ID, 'format_quote_text', true);
|
||||
$quote_author = get_post_meta($post->ID, 'format_quote_author', true);
|
||||
|
||||
if (!empty($quote_text)) {
|
||||
echo '<blockquote>';
|
||||
echo "<p>" . $quote_text . "</p>";
|
||||
if (!empty($quote_author)) {
|
||||
echo "<span>- " . $quote_author . "</span>";
|
||||
}
|
||||
echo "</blockquote>";
|
||||
}
|
||||
}
|
||||
|
||||
function format_link() {
|
||||
global $post;
|
||||
|
||||
$link_url = get_post_meta($post->ID, 'format_link_url', true);
|
||||
$url = !empty($link_url) ? to_url($link_url) : "#";
|
||||
echo '<div class="link-content">';
|
||||
echo '<h2 class="link-text"><a href="' . $url . '" target="_blank">' . get_the_title() . '</a></h2>';
|
||||
echo '<a href="' . $url . '" target="_blank"><span class="sub-title">- ' . $url . '</span></a></div>';
|
||||
}
|
||||
|
||||
function format_status() {
|
||||
global $post;
|
||||
|
||||
$status_url = get_post_meta($post->ID, 'format_status_url', true);
|
||||
if (!empty($status_url)) {
|
||||
echo apply_filters("the_content", $status_url);
|
||||
}
|
||||
}
|
||||
|
||||
function pagination() {
|
||||
global $wp_query;
|
||||
|
||||
$pages = $wp_query->max_num_pages;
|
||||
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
|
||||
|
||||
if (empty($pages)) {
|
||||
$pages = 1;
|
||||
}
|
||||
|
||||
if (1 != $pages) {
|
||||
|
||||
$big = 9999; // need an unlikely integer
|
||||
echo "<div class='tw-pagination pagination'>";
|
||||
|
||||
$pagination = paginate_links(
|
||||
array(
|
||||
'base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))),
|
||||
'end_size' => 3,
|
||||
'mid_size' => 6,
|
||||
'format' => '?paged=%#%',
|
||||
'current' => max(1, get_query_var('paged')),
|
||||
'total' => $wp_query->max_num_pages,
|
||||
'type' => 'list',
|
||||
'prev_text' => __('«', 'themewaves'),
|
||||
'next_text' => __('»', 'themewaves'),
|
||||
));
|
||||
|
||||
echo $pagination;
|
||||
|
||||
echo "</div>";
|
||||
|
||||
}
|
||||
}
|
||||
if (!function_exists('infinite')) {
|
||||
|
||||
function infinite() {
|
||||
global $wp_query;
|
||||
$pages = intval($wp_query->max_num_pages);
|
||||
$paged = (get_query_var('paged')) ? intval(get_query_var('paged')) : 1;
|
||||
if (empty($pages)) {
|
||||
$pages = 1;
|
||||
}
|
||||
if (1 != $pages) {
|
||||
echo '<div class="tw-pagination tw-infinite-scroll" data-has-next="'.($paged===$pages?'false':'true').'">';
|
||||
echo '<a class="btn btn-small no-more" href="#">' . __('No more posts', 'themewaves') . '</a>';
|
||||
echo '<a class="btn btn-small loading" href="#">' . __('Loading posts ...', 'themewaves') . '</a>';
|
||||
echo '<a class="btn btn-small next" href="' . get_pagenum_link($paged + 1) . '"><i class="icon-repeat"></i>' . __('Load More Items', 'themewaves') . '</a>';
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
function comment_count() {
|
||||
|
||||
if (comments_open()) {
|
||||
|
||||
if (tw_option('facebook_comment')) {
|
||||
return '';//'<fb:comments-count data-href="' . get_permalink() . '"></fb:comments-count>';
|
||||
} else {
|
||||
|
||||
$comment_count = get_comments_number('0', '1', '%');
|
||||
if ($comment_count == 0) {
|
||||
$comment_trans = __('No comment', 'themewaves');
|
||||
} elseif ($comment_count == 1) {
|
||||
$comment_trans = __('One comment', 'themewaves');
|
||||
} else {
|
||||
$comment_trans = $comment_count . ' ' . __('comments', 'themewaves');
|
||||
}
|
||||
return "<li class='comments'><i class='icon-comments'></i><a href='" . get_comments_link() . "' title='" . $comment_trans . "' class='comment-count'>" . $comment_trans . "</a></li>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('mytheme_comment')) {
|
||||
|
||||
function mytheme_comment($comment, $args, $depth) {
|
||||
|
||||
$GLOBALS['comment'] = $comment;
|
||||
print '<div class="comment-block">';
|
||||
?>
|
||||
<div class="comment" id="comment-<?php comment_ID();?>">
|
||||
<div class="comment-author"><span class="reply-line"></span>
|
||||
<?php echo get_avatar($comment, $size = '50'); ?>
|
||||
<div class="comment-meta">
|
||||
<span class="comment-author-link">
|
||||
<?php echo __('By','themewaves'). " " . get_comment_author_link() . " - "; ?>
|
||||
</span>
|
||||
<span class="comment-date">
|
||||
<?php printf(__('%1$s', 'themewaves'), get_comment_date('j F Y'));?>
|
||||
</span>
|
||||
<span class="comment-replay-link"><?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="comment-body">
|
||||
<?php comment_text() ?>
|
||||
</div>
|
||||
</div><?php
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (!function_exists('tw_comment_form')) {
|
||||
|
||||
function tw_comment_form($fields) {
|
||||
global $id, $post_id;
|
||||
if (null === $post_id)
|
||||
$post_id = $id;
|
||||
else
|
||||
$id = $post_id;
|
||||
|
||||
$commenter = wp_get_current_commenter();
|
||||
|
||||
$req = get_option('require_name_email');
|
||||
$aria_req = ( $req ? " aria-required='true'" : '' );
|
||||
$fields = array(
|
||||
'author' => '<div class="row-fluid"><p class="comment-form-author span4">' .
|
||||
'<input placeholder="' . __('Name', 'themewaves') . '" id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_req . ' /></p>',
|
||||
'email' => '<p class="comment-form-email span4">' .
|
||||
'<input placeholder="' . __('Email', 'themewaves') . '" id="email" name="email" type="text" value="' . esc_attr($commenter['comment_author_email']) . '" size="30"' . $aria_req . ' /></p>',
|
||||
'url' => '<p class="comment-form-url span4">' .
|
||||
'<input placeholder="' . __('Website', 'themewaves') . '" id="url" name="url" type="text" value="' . esc_attr($commenter['comment_author_url']) . '" size="30" /></p></div>',
|
||||
);
|
||||
return $fields;
|
||||
}
|
||||
|
||||
add_filter('comment_form_default_fields', 'tw_comment_form');
|
||||
|
||||
}
|
||||
if (!function_exists('post_image_show')) {
|
||||
function post_image_show($width = 0, $height = "", $returnURL=false) {
|
||||
global $post;
|
||||
if (has_post_thumbnail($post->ID)) {
|
||||
$attachment = get_post(get_post_thumbnail_id($post->ID));
|
||||
if (isset($attachment)) {
|
||||
$alt = get_post_meta($attachment->ID, '_wp_attachment_image_alt', true);
|
||||
$alt = !empty($alt) ? $alt : $attachment->post_title;
|
||||
$lrg_img = wp_get_attachment_image_src($attachment->ID, 'full');
|
||||
$url = $lrg_img[0];
|
||||
if ($width != 0) {
|
||||
$url = aq_resize($url, $width, $height, true);
|
||||
}
|
||||
$urll = !empty($url)?$url:$lrg_img[0];
|
||||
if($returnURL){
|
||||
return $urll;
|
||||
}else{
|
||||
return '<img src="' . $urll . '" alt="' . $alt . '"/>';
|
||||
}
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!function_exists('about_author')) {
|
||||
function about_author() {
|
||||
$tw_author = false;
|
||||
if (get_metabox("post_authorr") == "true") {
|
||||
$tw_author = true;
|
||||
} else if (get_metabox("post_authorr") != "false") {
|
||||
if (tw_option('post_author')) {
|
||||
$tw_author = true;
|
||||
}
|
||||
}
|
||||
if ($tw_author) { ?>
|
||||
<div class="tw-author clearfix">
|
||||
<div class="author-image"><?php
|
||||
$tw_author_email = get_the_author_meta('email');
|
||||
echo get_avatar($tw_author_email, $size = '56'); ?>
|
||||
</div>
|
||||
<h3><?php _e("Written by ", "themewaves");
|
||||
if (is_author())
|
||||
the_author();
|
||||
else
|
||||
the_author_posts_link(); ?>
|
||||
</h3>
|
||||
<div class="author-title-line"></div>
|
||||
<p><?php
|
||||
$description = get_the_author_meta('description');
|
||||
if ($description != '')
|
||||
echo $description;
|
||||
else
|
||||
_e('The author didnt add any Information to his profile yet', 'themewaves'); ?>
|
||||
</p>
|
||||
</div><?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function related_portfolios() {
|
||||
|
||||
global $post, $tw_options;
|
||||
|
||||
|
||||
$tags = wp_get_post_terms($post->ID, 'portfolios', array("fields" => "ids"));
|
||||
|
||||
if ($tags) {
|
||||
$rel_title = __("Related portfolio items", "themewaves");
|
||||
echo do_shortcode('[tw_item_title title="' . $rel_title . '"]');
|
||||
$tag_ids = "";
|
||||
foreach ($tags as $tag)
|
||||
$tag_ids .= $tag . ",";
|
||||
|
||||
|
||||
$query = Array(
|
||||
'post_type' => 'portfolio',
|
||||
'posts_per_page' => '4',
|
||||
'post__not_in' => array($post->ID),
|
||||
'tax_query' => Array(Array(
|
||||
'taxonomy' => 'portfolios',
|
||||
'terms' => $tag_ids,
|
||||
'field' => 'id'
|
||||
))
|
||||
);
|
||||
query_posts($query);
|
||||
$tw_options['pagination'] = 'none';
|
||||
echo '<div class="tw-portfolio">';
|
||||
get_template_part("loop", "portfolio");
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function tw_social() {
|
||||
global $tw_socials;
|
||||
foreach ($tw_socials as $key => $social) {
|
||||
if(tw_option($social['name'])!=""){
|
||||
echo '<a href="'.str_replace('*',tw_option($social['name']),$social['link']).'" target="_blank" title="'.$key.'" class="'.$key.'"><span class="tw-icon-'.$key.'"></span></a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function vimeo_youtube_image($embed) {
|
||||
|
||||
preg_match('/src=\"(.*?)\"/si', $embed, $filteredContent);
|
||||
|
||||
if(!empty($filteredContent[1])) {
|
||||
$url = $filteredContent[1];
|
||||
$youtube = strpos($url, 'youtube.com');
|
||||
$youtu = strpos($url, 'youtu.be');
|
||||
$vimeo = strpos($url, 'vimeo.com');
|
||||
|
||||
$video_id = '';
|
||||
$spliturl = split("/", $url);
|
||||
$video_id = $spliturl[count($spliturl) - 1];
|
||||
if ($video_id == "") {
|
||||
$video_id = $spliturl[count($spliturl) - 2];
|
||||
}
|
||||
} else {
|
||||
$url = $embed;
|
||||
$youtube = strpos($url, 'youtube.com');
|
||||
$youtu = strpos($url, 'youtu.be');
|
||||
$vimeo = strpos($url, 'vimeo.com');
|
||||
|
||||
$video_id = '';
|
||||
$spliturl = split("/", $url);
|
||||
$video_id = $spliturl[count($spliturl) - 1];
|
||||
if ($video_id == "") {
|
||||
$video_id = $spliturl[count($spliturl) - 2];
|
||||
} else {
|
||||
$spliturl = split("=", $url);
|
||||
$video_id = $spliturl[count($spliturl) - 1];
|
||||
}
|
||||
}
|
||||
|
||||
$video_img = '';
|
||||
|
||||
if ($youtube || $youtu) {
|
||||
$video_img = '<img src="http://img.youtube.com/vi/' . $video_id . '/0.jpg" class="image_youtube" />';
|
||||
} else if ($vimeo) {
|
||||
$json = @file_get_contents("http://vimeo.com/api/oembed.json?url=http%3A//vimeo.com/" . $video_id, true);
|
||||
if (strpos($http_response_header[0], "200")) {
|
||||
$data = json_decode($json, true);
|
||||
$video_thumb = $data['thumbnail_url'];
|
||||
$video_thumb = str_replace("_1280", "_640", $video_thumb);
|
||||
$video_img = '<img src="' . $video_thumb . '" class="image_vimeo" />';
|
||||
}
|
||||
if (strlen($video_img) < 1) {
|
||||
$video_img = "";
|
||||
}
|
||||
}
|
||||
|
||||
return $video_img;
|
||||
}
|
||||
1130
wp-content/themes/nuzi/framework/twitteroauth.php
Normal file
126
wp-content/themes/nuzi/framework/widget/contact_widget.php
Normal file
@@ -0,0 +1,126 @@
|
||||
<?php
|
||||
class contactinfo extends WP_Widget {
|
||||
|
||||
function contactinfo() {
|
||||
$widget_ops = array(
|
||||
'classname' => 'flickr_widget',
|
||||
'description' => 'Contact info.'
|
||||
);
|
||||
$control_ops = array('width' => 80, 'height' => 80);
|
||||
parent::WP_Widget(false, 'Themewaves contact info', $widget_ops, $control_ops);
|
||||
}
|
||||
|
||||
function form($instance) {
|
||||
$instance = wp_parse_args((array) $instance, array('contact_title' => ''));
|
||||
$contact_title = isset($instance['contact_title']) ? strip_tags($instance['contact_title']) : '';
|
||||
$contact_address = isset($instance['contact_address']) ? strip_tags($instance['contact_address']) : '';
|
||||
$contact_phone = isset($instance['contact_phone']) ? strip_tags($instance['contact_phone']) : '';
|
||||
$contact_email_url = isset($instance['contact_email_url']) ? strip_tags($instance['contact_email_url']) : '';
|
||||
$contact_email = isset($instance['contact_email']) ? strip_tags($instance['contact_email']) : '';
|
||||
$contact_web_url = isset($instance['contact_web_url']) ? strip_tags($instance['contact_web_url']) : '';
|
||||
$contact_web = isset($instance['contact_web']) ? strip_tags($instance['contact_web']) : '';
|
||||
$contact_facebook_url = isset($instance['contact_facebook_url']) ? strip_tags($instance['contact_facebook_url']) : '';
|
||||
$contact_facebook = isset($instance['contact_facebook']) ? strip_tags($instance['contact_facebook']) : '';
|
||||
?>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('contact_title'); ?>"><?php _e('Title:', 'themewaves'); ?></label>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('contact_title'); ?>" name="<?php echo $this->get_field_name('contact_title'); ?>" type="text" value="<?php echo esc_attr($contact_title); ?>" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('contact_address'); ?>"><?php _e('Content address:', 'themewaves'); ?></label>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('contact_address'); ?>" name="<?php echo $this->get_field_name('contact_address'); ?>" type="text" value="<?php echo esc_attr($contact_address); ?>" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('contact_phone'); ?>"><?php _e('Contact phone number:', 'themewaves'); ?></label>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('contact_phone'); ?>" name="<?php echo $this->get_field_name('contact_phone'); ?>" type="text" value="<?php echo esc_attr($contact_phone); ?>" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('contact_email_url'); ?>"><?php _e('Contact email link url:', 'themewaves'); ?></label>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('contact_email_url'); ?>" name="<?php echo $this->get_field_name('contact_email_url'); ?>" type="text" value="<?php echo esc_attr($contact_email_url); ?>" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('contact_email'); ?>"><?php _e('Contact email:', 'themewaves'); ?></label>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('contact_email'); ?>" name="<?php echo $this->get_field_name('contact_email'); ?>" type="text" value="<?php echo esc_attr($contact_email); ?>" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('contact_web_url'); ?>"><?php _e('Contact web link url:', 'themewaves'); ?></label>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('contact_web_url'); ?>" name="<?php echo $this->get_field_name('contact_web_url'); ?>" type="text" value="<?php echo esc_attr($contact_web_url); ?>" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('contact_web'); ?>"><?php _e('Contact web:', 'themewaves'); ?></label>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('contact_web'); ?>" name="<?php echo $this->get_field_name('contact_web'); ?>" type="text" value="<?php echo esc_attr($contact_web); ?>" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('contact_facebook_url'); ?>"><?php _e('Contact facebook link url:', 'themewaves'); ?></label>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('contact_facebook_url'); ?>" name="<?php echo $this->get_field_name('contact_facebook_url'); ?>" type="text" value="<?php echo esc_attr($contact_facebook_url); ?>" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('contact_facebook'); ?>"><?php _e('Contact facebook:', 'themewaves'); ?></label>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('contact_facebook'); ?>" name="<?php echo $this->get_field_name('contact_facebook'); ?>" type="text" value="<?php echo esc_attr($contact_facebook); ?>" />
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
|
||||
function update($new_instance, $old_instance) {
|
||||
$instance = $old_instance;
|
||||
$instance['contact_title'] = strip_tags($new_instance['contact_title']);
|
||||
$instance['contact_address'] = strip_tags($new_instance['contact_address']);
|
||||
$instance['contact_phone'] = strip_tags($new_instance['contact_phone']);
|
||||
$instance['contact_email'] = strip_tags($new_instance['contact_email']);
|
||||
$instance['contact_email_url'] = strip_tags($new_instance['contact_email_url']);
|
||||
$instance['contact_web'] = strip_tags($new_instance['contact_web']);
|
||||
$instance['contact_web_url'] = strip_tags($new_instance['contact_web_url']);
|
||||
$instance['contact_facebook'] = strip_tags($new_instance['contact_facebook']);
|
||||
$instance['contact_facebook_url'] = strip_tags($new_instance['contact_facebook_url']);
|
||||
return $instance;
|
||||
}
|
||||
|
||||
function widget($args, $instance) {
|
||||
extract($args);
|
||||
$contact_title = apply_filters('widget_contact_title', empty($instance['contact_title']) ? '' : $instance['contact_title'], $instance);
|
||||
$contact_address = apply_filters('widget_contact_address', empty($instance['contact_address']) ? '' : $instance['contact_address'], $instance);
|
||||
$contact_phone = apply_filters('widget_contact_phone', empty($instance['contact_phone']) ? '' : $instance['contact_phone'], $instance);
|
||||
$contact_email = apply_filters('widget_contact_email', empty($instance['contact_email']) ? '' : $instance['contact_email'], $instance);
|
||||
$contact_email_url = apply_filters('widget_contact_email_url', empty($instance['contact_email_url']) ? '' : $instance['contact_email_url'], $instance);
|
||||
$contact_web = apply_filters('widget_contact_web', empty($instance['contact_web']) ? '' : $instance['contact_web'], $instance);
|
||||
$contact_web_url = apply_filters('widget_contact_web_url', empty($instance['contact_web_url']) ? '' : $instance['contact_web_url'], $instance);
|
||||
$contact_facebook = apply_filters('widget_contact_facebook', empty($instance['contact_facebook']) ? '' : $instance['contact_facebook'], $instance);
|
||||
$contact_facebook_url = apply_filters('widget_contact_facebook_url', empty($instance['contact_facebook_url']) ? '' : $instance['contact_facebook_url'], $instance);
|
||||
$class = apply_filters('widget_class', empty($instance['class']) ? '' : $instance['class'], $instance);
|
||||
|
||||
echo $before_widget;
|
||||
|
||||
$contact_title = $contact_title;
|
||||
|
||||
if (!empty($contact_title)) {
|
||||
echo $before_title . $contact_title . $after_title;
|
||||
}
|
||||
echo '<div class="contact-info-widget">';
|
||||
echo '<ul>';
|
||||
if(!empty($contact_address)){
|
||||
echo '<li><i class="icon-map-marker"></i><div>'.$contact_address.'</div></li>';
|
||||
}
|
||||
if(!empty($contact_phone)){
|
||||
echo '<li><i class="icon-phone"></i><div>'.$contact_phone.'</div></li>';
|
||||
}
|
||||
if(!empty($contact_email)){
|
||||
echo '<li><i class="icon-envelope-alt"></i><div><a target="_blank" href="'. to_url($contact_email_url).'">'.$contact_email.'</a></div></li>';
|
||||
}
|
||||
if(!empty($contact_web)){
|
||||
echo '<li><i class="icon-globe"></i><div><a target="_blank" href="'. to_url($contact_web_url).'">'.$contact_web.'</a></div></li>';
|
||||
}
|
||||
if(!empty($contact_facebook)){
|
||||
echo '<li><i class="icon-facebook"></i><div><a target="_blank" href="'. to_url($contact_facebook_url).'">'.$contact_facebook.'</a></div></li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
echo '</div>';
|
||||
?>
|
||||
|
||||
<?php
|
||||
echo $after_widget;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
add_action('widgets_init', create_function('', 'return register_widget("contactinfo");'));
|
||||
?>
|
||||
78
wp-content/themes/nuzi/framework/widget/dribbble_widget.php
Normal file
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
class dribbblewidget extends WP_Widget {
|
||||
|
||||
function dribbblewidget() {
|
||||
$widget_ops = array(
|
||||
'classname' => 'dribbble_widget',
|
||||
'description' => 'Images from your dribbble account.'
|
||||
);
|
||||
$control_ops = array('width' => 80, 'height' => 80);
|
||||
parent::WP_Widget(false, 'Themewaves dribbble', $widget_ops, $control_ops);
|
||||
}
|
||||
|
||||
function form($instance) {
|
||||
$instance = wp_parse_args((array) $instance, array('dribbble_title' => ''));
|
||||
$dribbble_title = isset($instance['dribbble_title']) ? strip_tags($instance['dribbble_title']) : '';
|
||||
$dribbble_userid = isset($instance['dribbble_userid']) ? strip_tags($instance['dribbble_userid']) : '';
|
||||
$dribbble_num = isset($instance['dribbble_num']) ? strip_tags($instance['dribbble_num']) : '';
|
||||
?>
|
||||
<p><label for="<?php echo $this->get_field_id('dribbble_title'); ?>"><?php _e('Title:', 'themewaves'); ?></label>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('dribbble_title'); ?>" name="<?php echo $this->get_field_name('dribbble_title'); ?>" type="text" value="<?php echo esc_attr($dribbble_title); ?>" /></p>
|
||||
<p><label for="<?php echo $this->get_field_id('dribbble_userid'); ?>"><?php _e('dribbble user ID:', 'themewaves'); ?></label>
|
||||
<br>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('dribbble_userid'); ?>" name="<?php echo $this->get_field_name('dribbble_userid'); ?>" type="text" value="<?php echo esc_attr($dribbble_userid); ?>" />
|
||||
<br>
|
||||
<small><em>Find ID <a href="http://dribbble.com/" target="_blank">http://dribbble.com/</a></em></small>
|
||||
</p>
|
||||
|
||||
<p><label for="<?php echo $this->get_field_id('dribbble_num'); ?>"><?php _e('How many dribbble display:', 'themewaves'); ?></label>
|
||||
<input maxlength="3" class="widefat" id="<?php echo $this->get_field_id('dribbble_num'); ?>" name="<?php echo $this->get_field_name('dribbble_num'); ?>" type="text" value="<?php echo esc_attr($dribbble_num); ?>" />
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
|
||||
function update($new_instance, $old_instance) {
|
||||
$instance = $old_instance;
|
||||
$instance['dribbble_title'] = strip_tags($new_instance['dribbble_title']);
|
||||
$instance['dribbble_userid'] = strip_tags($new_instance['dribbble_userid']);
|
||||
$instance['dribbble_num'] = strip_tags($new_instance['dribbble_num']);
|
||||
return $instance;
|
||||
}
|
||||
|
||||
function widget($args, $instance) {
|
||||
extract($args);
|
||||
$dribbble_title = apply_filters('widget_dribbble_title', empty($instance['dribbble_title']) ? '' : $instance['dribbble_title'], $instance);
|
||||
$dribbble_userid = apply_filters('widget_dribbble_userid', empty($instance['dribbble_userid']) ? '' : $instance['dribbble_userid'], $instance);
|
||||
$dribbble_num = apply_filters('widget_dribbble_num', empty($instance['dribbble_num']) ? '' : $instance['dribbble_num'], $instance);
|
||||
$class = apply_filters('widget_class', empty($instance['class']) ? '' : $instance['class'], $instance);
|
||||
echo $before_widget;
|
||||
if (!empty($dribbble_title)) {echo $before_title . $dribbble_title . $after_title;}
|
||||
echo '<div class="dribbble-widget">';
|
||||
$shots=false;
|
||||
$response = wp_remote_get( 'http://api.dribbble.com/players/' . $dribbble_userid . '/shots/?per_page='.$dribbble_num );
|
||||
if( !is_wp_error( $response ) ){
|
||||
$xml = wp_remote_retrieve_body( $response );
|
||||
if( !is_wp_error( $xml ) ){
|
||||
if( $response['headers']['status'] == 200 ) {
|
||||
$json = json_decode( $xml );
|
||||
$shots = $json->shots;
|
||||
}
|
||||
}
|
||||
}
|
||||
if( $shots ) {
|
||||
foreach( $shots as $shot ){
|
||||
echo '<a href="' . $shot->url . '" target="_blank">';
|
||||
echo '<img src="' . $shot->image_teaser_url . '" alt="' . $shot->title . '" />';
|
||||
echo '</a>';
|
||||
}
|
||||
} else {
|
||||
echo __('Error', 'themewaves');
|
||||
}
|
||||
echo '</div>';
|
||||
echo $after_widget;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
add_action('widgets_init', create_function('', 'return register_widget("dribbblewidget");'));
|
||||
?>
|
||||
77
wp-content/themes/nuzi/framework/widget/flickr_widget.php
Normal file
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
class flickrwidget extends WP_Widget {
|
||||
|
||||
function flickrwidget() {
|
||||
$widget_ops = array(
|
||||
'classname' => 'flickr_widget',
|
||||
'description' => 'Images from your Flickr account.'
|
||||
);
|
||||
$control_ops = array('width' => 80, 'height' => 80);
|
||||
parent::WP_Widget(false, 'Themewaves flickr', $widget_ops, $control_ops);
|
||||
}
|
||||
|
||||
function form($instance) {
|
||||
$instance = wp_parse_args((array) $instance, array('flickr_title' => ''));
|
||||
$flickr_title = isset($instance['flickr_title']) ? strip_tags($instance['flickr_title']) : '';
|
||||
$flickr_type = isset($instance['flickr_type']) ? strip_tags($instance['flickr_type']) : '';
|
||||
$flickr_userid = isset($instance['flickr_userid']) ? strip_tags($instance['flickr_userid']) : '';
|
||||
$flickr_num = isset($instance['flickr_num']) ? strip_tags($instance['flickr_num']) : '';
|
||||
?>
|
||||
<p><label for="<?php echo $this->get_field_id('flickr_title'); ?>"><?php _e('Title:', 'themewaves'); ?></label>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('flickr_title'); ?>" name="<?php echo $this->get_field_name('flickr_title'); ?>" type="text" value="<?php echo esc_attr($flickr_title); ?>" /></p>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('flickr_type'); ?>">Type (user or group):</label>
|
||||
<select id="<?php echo $this->get_field_id('flickr_type'); ?>" name="<?php echo $this->get_field_name('flickr_type'); ?>" class="widefat">
|
||||
<option <?php if ('user' == $flickr_type) echo 'selected="selected"'; ?>>user</option>
|
||||
<option <?php if ('group' == $flickr_type) echo 'selected="selected"'; ?>>group</option>
|
||||
</select>
|
||||
</p>
|
||||
<p><label for="<?php echo $this->get_field_id('flickr_userid'); ?>"><?php _e('Flickr user ID:', 'themewaves'); ?></label>
|
||||
<br>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('flickr_userid'); ?>" name="<?php echo $this->get_field_name('flickr_userid'); ?>" type="text" value="<?php echo esc_attr($flickr_userid); ?>" />
|
||||
<br>
|
||||
<small><em>Find ID <a href="http://idgettr.com/" target="_blank">http://idgettr.com/</a></em></small>
|
||||
</p>
|
||||
|
||||
<p><label for="<?php echo $this->get_field_id('flickr_num'); ?>"><?php _e('How many pictures display:', 'themewaves'); ?></label>
|
||||
<input maxlength="3" class="widefat" id="<?php echo $this->get_field_id('flickr_num'); ?>" name="<?php echo $this->get_field_name('flickr_num'); ?>" type="text" value="<?php echo esc_attr($flickr_num); ?>" />
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
|
||||
function update($new_instance, $old_instance) {
|
||||
$instance = $old_instance;
|
||||
$instance['flickr_title'] = strip_tags($new_instance['flickr_title']);
|
||||
$instance['flickr_type'] = strip_tags($new_instance['flickr_type']);
|
||||
$instance['flickr_userid'] = strip_tags($new_instance['flickr_userid']);
|
||||
$instance['flickr_num'] = strip_tags($new_instance['flickr_num']);
|
||||
return $instance;
|
||||
}
|
||||
|
||||
function widget($args, $instance) {
|
||||
extract($args);
|
||||
$flickr_title = apply_filters('widget_flickr_title', empty($instance['flickr_title']) ? '' : $instance['flickr_title'], $instance);
|
||||
$flickr_type = apply_filters('widget_flickr_type', empty($instance['flickr_type']) ? '' : $instance['flickr_type'], $instance);
|
||||
$flickr_userid = apply_filters('widget_flickr_userid', empty($instance['flickr_userid']) ? '' : $instance['flickr_userid'], $instance);
|
||||
$flickr_num = apply_filters('widget_flickr_num', empty($instance['flickr_num']) ? '' : $instance['flickr_num'], $instance);
|
||||
$class = apply_filters('widget_class', empty($instance['class']) ? '' : $instance['class'], $instance);
|
||||
|
||||
echo $before_widget;
|
||||
|
||||
$flickr_title = $flickr_title;
|
||||
|
||||
if (!empty($flickr_title)) {
|
||||
echo $before_title . $flickr_title . $after_title;
|
||||
}
|
||||
echo '<div class="flickr-widget">';
|
||||
echo '<div class="flickr-channel">'; ?>
|
||||
<script type="text/javascript" src="http://www.flickr.com/badge_code_v2.gne?count=<?php echo $flickr_num ?>&size=s&layout=v&source=<?php echo $flickr_type ?>&<?php echo $flickr_type ?>=<?php echo $flickr_userid ?>"></script><?php
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo $after_widget;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
add_action('widgets_init', create_function('', 'return register_widget("flickrwidget");'));
|
||||
?>
|
||||
174
wp-content/themes/nuzi/framework/widget/recent_posts_widget.php
Normal file
@@ -0,0 +1,174 @@
|
||||
<?php
|
||||
class TWRecentPostWidget extends WP_Widget {
|
||||
function TWRecentPostWidget() {
|
||||
$widget_ops = array('classname' => 'TWRecentPostWidget', 'description' => 'Themewaves recent posts.');
|
||||
parent::WP_Widget(false, 'Themewaves recent posts', $widget_ops);
|
||||
}
|
||||
function widget($args, $instance) {
|
||||
global $post;
|
||||
extract(array(
|
||||
'title' => '',
|
||||
'number_posts' => 5,
|
||||
'theme' => 'post_nothumbnailed',
|
||||
'post_order' => 'latest',
|
||||
'post_type' => 'post'
|
||||
));
|
||||
extract($args);
|
||||
$title = apply_filters('widget_title', $instance['title']);
|
||||
$post_count = 5;
|
||||
if (isset($instance['number_posts']))
|
||||
$post_count = $instance['number_posts'];
|
||||
$q['posts_per_page'] = $post_count;
|
||||
$cats = (array) $instance['post_category'];
|
||||
$q['paged'] = 1;
|
||||
$q['post_type'] = $instance['post_type'];
|
||||
if (count($cats) > 0) {
|
||||
$typ = 'category';
|
||||
if ($instance['post_type'] != 'post')
|
||||
$typ = 'catalog';
|
||||
$catq = '';
|
||||
$sp = '';
|
||||
foreach ($cats as $mycat) {
|
||||
$catq = $catq . $sp . $mycat;
|
||||
$sp = ',';
|
||||
}
|
||||
$catq = split(',', $catq);
|
||||
$q['tax_query'] = Array(Array(
|
||||
'taxonomy' => $typ,
|
||||
'terms' => $catq,
|
||||
'field' => 'id'
|
||||
)
|
||||
);
|
||||
}
|
||||
if ($instance['post_order'] == 'commented')
|
||||
$q['orderby'] = 'comment_count';
|
||||
query_posts($q);
|
||||
if (isset($before_widget))
|
||||
echo $before_widget;
|
||||
if ($title != '')
|
||||
echo $args['before_title'] . $title . $args['after_title'];
|
||||
echo '<div class="tw-recent-posts-widget">';
|
||||
echo '<ul>';
|
||||
while (have_posts ()) : the_post();
|
||||
echo '<li>';
|
||||
$class = "with-thumb";
|
||||
if (isset($instance['theme']) && $instance['theme'] == 'post_thumbnailed') {
|
||||
if (has_post_thumbnail($post->ID)) {
|
||||
$lrg_img = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'thumbnail');
|
||||
$feat_img = $lrg_img[0];
|
||||
$thumb_width = 48;
|
||||
$thumb_height = 48;
|
||||
echo '<div class="recent-thumb image"><img style="width:' . $thumb_width . 'px; height:' . $thumb_height . 'px" src="' . $feat_img . '" alt="' . get_the_title() . '"/></div>';
|
||||
} else {
|
||||
$class = "no-thumb";
|
||||
}
|
||||
} else {
|
||||
$format = get_post_format() == "" ? "standard" : get_post_format();
|
||||
echo '<div class="recent-thumb"><span class="post-format '.$format.'"></span></div>';
|
||||
}
|
||||
echo '<div class="tw-recent-content '.$class.'">';
|
||||
echo '<h4><a href="'.get_permalink().'">'.get_the_title().'</a></h4>';
|
||||
echo '<div class="meta">';
|
||||
_e("On ", "themewaves");
|
||||
echo '<span class="date"><span class="day">'.get_the_date('j').'</span> <span class="month">'.get_the_date('M').'</span></span>';
|
||||
// _e(", In ", "themewaves");
|
||||
// echo get_the_category_list(', ');
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '</li>';
|
||||
endwhile;
|
||||
echo '</ul>';
|
||||
echo '</div>';
|
||||
if (isset($after_widget))
|
||||
echo $after_widget;
|
||||
wp_reset_query();
|
||||
}
|
||||
|
||||
function update($new_instance, $old_instance) {
|
||||
$instance = $old_instance;
|
||||
/* Strip tags (if needed) and update the widget settings. */
|
||||
$instance['title'] = strip_tags($new_instance['title']);
|
||||
if ($new_instance['post_type'] == 'post') {
|
||||
$instance['post_category'] = $_REQUEST['post_category'];
|
||||
} else {
|
||||
$tax = get_object_taxonomies($new_instance['post_type']);
|
||||
$instance['post_category'] = $_REQUEST['tax_input'][$tax[0]];
|
||||
}
|
||||
$instance['number_posts'] = strip_tags($new_instance['number_posts']);
|
||||
$instance['post_type'] = strip_tags($new_instance['post_type']);
|
||||
$instance['post_order'] = strip_tags($new_instance['post_order']);
|
||||
$instance['theme'] = strip_tags($new_instance['theme']);
|
||||
return $instance;
|
||||
}
|
||||
|
||||
function form($instance) {
|
||||
//Output admin widget options form
|
||||
extract(shortcode_atts(array(
|
||||
'title' => '',
|
||||
'theme' => 'post_nothumbnailed',
|
||||
'number_posts' => 5,
|
||||
'post_order' => 'latest',
|
||||
'post_type' => 'post'
|
||||
), $instance));
|
||||
$defaultThemes = Array(
|
||||
Array("name" => 'Thumbnailed posts', 'user_func' => 'post_thumbnailed'),
|
||||
Array("name" => 'Default posts', 'user_func' => 'post_nonthumbnailed')
|
||||
);
|
||||
$themes = apply_filters('tw_recent_posts_widget_theme_list', $defaultThemes);
|
||||
$defaultPostTypes = Array(Array("name" => 'Post', 'post_type' => 'post')); ?>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e("Title:", "themewaves");?></label>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo $title; ?>" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('post_order'); ?>">Post order:</label>
|
||||
<select class="widefat" id="<?php echo $this->get_field_id('post_order'); ?>" name="<?php echo $this->get_field_name('post_order'); ?>">
|
||||
<option value="latest" <?php if ($post_order == 'latest') print 'selected="selected"'; ?>>Latest posts</option>
|
||||
<option value="commented" <?php if ($post_order == 'commented') print 'selected="selected"'; ?>>Most commented posts</option>
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('theme'); ?>">Post theme:</label>
|
||||
<select class="widefat" id="<?php echo $this->get_field_id('theme'); ?>" name="<?php echo $this->get_field_name('theme'); ?>">
|
||||
<option value="post_thumbnailed" <?php if ($theme == 'post_thumbnailed') print 'selected="selected"'; ?>>Thumbnail</option>
|
||||
<option value="post_nothumbnailed" <?php if ($theme == 'post_nothumbnailed') print 'selected="selected"'; ?>>No Thumbnail</option>
|
||||
</select>
|
||||
</p><?php
|
||||
$customTypes = apply_filters('tw_recent_posts_widget_type_list', $defaultPostTypes);
|
||||
if (count($customTypes) > 0) { ?>
|
||||
<p style="display: none;">
|
||||
<label for="<?php echo $this->get_field_id('post_type'); ?>">Post from:</label>
|
||||
<select rel="<?php echo $this->get_field_id('post_cats'); ?>" onChange="tw_get_post_terms(this);" class="widefat" id="<?php echo $this->get_field_id('post_type'); ?>" name="<?php echo $this->get_field_name('post_type'); ?>"><?php
|
||||
foreach ($customTypes as $postType) { ?>
|
||||
<option value="<?php print $postType['post_type'] ?>" <?php echo selected($post_type, $postType['post_type']); ?>><?php print $postType['name'] ?></option><?php
|
||||
} ?>
|
||||
</select>
|
||||
</p><?php
|
||||
} ?>
|
||||
<p>If you were not selected for cats, it will show all categories.</p>
|
||||
<div id="<?php echo $this->get_field_id('post_cats'); ?>" style="height:150px; overflow:auto; border:1px solid #dfdfdf;"><?php
|
||||
$post_type='post';
|
||||
$tax = get_object_taxonomies($post_type);
|
||||
|
||||
$selctedcat = false;
|
||||
if (isset($instance['post_category']) && $instance['post_category'] != ''){
|
||||
$selctedcat = $instance['post_category'];
|
||||
}
|
||||
wp_terms_checklist(0, array('taxonomy' => $tax[0], 'checked_ontop' => false, 'selected_cats' => $selctedcat)); ?>
|
||||
</div>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('number_posts'); ?>">Number of posts to show:</label>
|
||||
<input id="<?php echo $this->get_field_id('number_posts'); ?>" name="<?php echo $this->get_field_name('number_posts'); ?>" value="<?php echo $number_posts; ?>" size="3" />
|
||||
</p><?php
|
||||
}
|
||||
}
|
||||
add_action('widgets_init', create_function('', 'return register_widget("TWRecentPostWidget");'));
|
||||
add_action('wp_ajax_themewave_recent_post_terms', 'get_post_type_terms');
|
||||
function get_post_type_terms() {
|
||||
$cat = 'post';
|
||||
if (isset($_REQUEST['post_format']) && $_REQUEST['post_format'] != '')
|
||||
$cat = $_REQUEST['post_format'];
|
||||
$tax = get_object_taxonomies($cat);
|
||||
wp_terms_checklist(0, array('taxonomy' => $tax[0], 'checked_ontop' => false, 'selected_cats' => false));
|
||||
die;
|
||||
} ?>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
class sociallinkswidget extends WP_Widget {
|
||||
|
||||
function sociallinkswidget() {
|
||||
$widget_ops = array('classname' => 'sociallinkswidget', 'description' => 'Displays your social profile.');
|
||||
|
||||
parent::WP_Widget(false, 'Themewaves Social', $widget_ops);
|
||||
}
|
||||
|
||||
function widget($args, $instance) {
|
||||
extract($args);
|
||||
$title = apply_filters('widget_title', $instance['title']);
|
||||
echo $before_widget;
|
||||
if ($title){echo $before_title . $title . $after_title;}
|
||||
global $tw_socials;
|
||||
echo '<div class="tw-social-icon clearfix">';
|
||||
foreach ($tw_socials as $key => $social) {
|
||||
if(!empty($instance[$social['name']])){
|
||||
echo '<a href="'.str_replace('*',$instance[$social['name']],$social['link']).'" target="_blank" title="'.$key.'" class="'.$key.'"><span class="tw-icon-'.$key.'"></span></a>';
|
||||
}
|
||||
}
|
||||
echo '</div>';
|
||||
echo $after_widget;
|
||||
}
|
||||
|
||||
function update($new_instance, $old_instance) {
|
||||
$instance = $old_instance;
|
||||
$instance = $new_instance;
|
||||
/* Strip tags (if needed) and update the widget settings. */
|
||||
$instance['title'] = strip_tags($new_instance['title']);
|
||||
return $instance;
|
||||
}
|
||||
|
||||
function form($instance) {
|
||||
global $tw_socials; ?>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('title'); ?>">Title:</label>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo isset($instance['title']) ? $instance['title'] : ''; ?>" />
|
||||
</p> <?php
|
||||
foreach ($tw_socials as $key => $social) { ?>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id($social['name']); ?>"><?php echo $key; ?>:</label>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id($social['name']); ?>" name="<?php echo $this->get_field_name($social['name']); ?>" value="<?php echo isset($instance[$social['name']]) ? $instance[$social['name']] : ''; ?>" />
|
||||
</p><?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
add_action('widgets_init', create_function('', 'return register_widget("sociallinkswidget");'));
|
||||
?>
|
||||
46
wp-content/themes/nuzi/framework/widget/twitter_widget.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
class twitterwidget extends WP_Widget {
|
||||
function twitterwidget() {
|
||||
$widget_ops = array('classname' => 'twitterwidget', 'description' => 'Displays your Tweets.');
|
||||
parent::WP_Widget(false, 'Themewaves Twitter', $widget_ops);
|
||||
}
|
||||
function form($instance){ ?>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('title'); ?>">Title:</label>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo isset($instance['title']) ? $instance['title'] : ''; ?>" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('username'); ?>">User Name:</label>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('username'); ?>" name="<?php echo $this->get_field_name('username'); ?>" value="<?php echo isset($instance['username']) ? $instance['username'] : ''; ?>" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('tweetstoshow'); ?>">Tweets to display:</label>
|
||||
<select class="widefat" id="<?php echo $this->get_field_id('tweetstoshow'); ?>" name="<?php echo $this->get_field_name('tweetstoshow'); ?>"><?php
|
||||
for($i=1;$i<=10;$i++){
|
||||
echo '<option value="'.$i.'"'.(isset($instance['tweetstoshow'])&&$instance['tweetstoshow'] == $i?' selected="selected"':'').'>'.$i.'</option>';
|
||||
} ?>
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('cachetime'); ?>">cachetime:</label>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id('cachetime'); ?>" name="<?php echo $this->get_field_name('cachetime'); ?>" value="<?php echo isset($instance['cachetime']) ? $instance['cachetime'] : ''; ?>" />
|
||||
</p><?php
|
||||
}
|
||||
function update($new_instance, $old_instance) {
|
||||
$instance = $old_instance;
|
||||
$instance = $new_instance;
|
||||
/* Strip tags (if needed) and update the widget settings. */
|
||||
$instance['title'] = strip_tags($new_instance['title']);
|
||||
return $instance;
|
||||
}
|
||||
function widget($args, $instance) {
|
||||
extract($args);
|
||||
$title = apply_filters('widget_title', $instance['title']);
|
||||
echo $before_widget;
|
||||
if ($title){echo $before_title . $title . $after_title;}
|
||||
echo do_shortcode('[tw_twitter username="'.$instance['username'].'" tweetstoshow="'.$instance['tweetstoshow'].'" cachetime="'.$instance['cachetime'].'"]');
|
||||
echo $after_widget;
|
||||
}
|
||||
}
|
||||
add_action('widgets_init', create_function('', 'return register_widget("twitterwidget");'));
|
||||
?>
|
||||