khaihihi
483
wp-content/themes/ekko/core/assets/css/admin-styles.css
Normal file
@@ -0,0 +1,483 @@
|
||||
/*
|
||||
Admin custom CSS
|
||||
@package ekko
|
||||
by KeyDesign
|
||||
*/
|
||||
|
||||
/* --------------------------------------
|
||||
Meta box custom styles
|
||||
-----------------------------------------*/
|
||||
.kd_meta_block_prim {
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px dashed #ddd;
|
||||
}
|
||||
|
||||
.meta_block_top {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.meta_block_bottom {
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.kd_meta_block_prim label {
|
||||
width: 20%;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
.kd_meta_block_prim .kd-meta-desc {
|
||||
display: block;
|
||||
width: 18%;
|
||||
padding-top: 6px;
|
||||
clear: both;
|
||||
font-style: italic;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.kd_meta_block_prim input {
|
||||
color: #000;
|
||||
font-size: 12px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.kd_meta_block_prim .page_subtitle_box {
|
||||
width: 73%;
|
||||
}
|
||||
|
||||
.kd_meta_block_prim input[type=checkbox] {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
#redux-sticky .button {
|
||||
background: #fff;
|
||||
border-color: #25b15f;
|
||||
box-shadow: none;
|
||||
text-decoration: none;
|
||||
text-shadow: none;
|
||||
height: 35px;
|
||||
color: #25b15f;
|
||||
font-weight: 700;
|
||||
line-height: 33px;
|
||||
padding: 0 20px;
|
||||
margin: 0 5px;
|
||||
float: left;
|
||||
border-radius: 30px;
|
||||
border-width: 2px;
|
||||
}
|
||||
|
||||
#redux-sticky .button:hover {
|
||||
background: #333;
|
||||
border-color: #333;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#redux-sticky .button-primary {
|
||||
background: #25b15f;
|
||||
border-color: #25b15f;
|
||||
box-shadow: none;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
text-shadow: none;
|
||||
height: 35px;
|
||||
font-weight: 700;
|
||||
line-height: 33px;
|
||||
}
|
||||
|
||||
#redux-sticky .button-primary:hover {
|
||||
background: #333;
|
||||
border-color: #333;
|
||||
}
|
||||
|
||||
#redux-footer .button {
|
||||
background: #fff;
|
||||
border-color: #25b15f;
|
||||
box-shadow: none;
|
||||
text-decoration: none;
|
||||
text-shadow: none;
|
||||
height: 35px;
|
||||
color: #25b15f;
|
||||
font-weight: 700;
|
||||
line-height: 33px;
|
||||
padding: 0 20px;
|
||||
margin: 0 5px;
|
||||
border-width: 2px;
|
||||
border-radius: 30px;
|
||||
}
|
||||
|
||||
#redux-footer .button:hover {
|
||||
background: #333;
|
||||
border-color: #333;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#redux-footer .button-primary {
|
||||
background: #25b15f;
|
||||
border-color: #25b15f;
|
||||
box-shadow: none;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
text-shadow: none;
|
||||
height: 35px;
|
||||
font-weight: 700;
|
||||
line-height: 33px;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
#redux-footer .button-primary:hover {
|
||||
background: #333;
|
||||
border-color: #333;
|
||||
}
|
||||
|
||||
#redux-form-wrapper input:focus {
|
||||
box-shadow: none;
|
||||
border-color: #25b15f;
|
||||
}
|
||||
|
||||
#redux-form-wrapper .select2-container .select2-choice {
|
||||
display: block;
|
||||
height: 33px;
|
||||
padding: 0 0 0 8px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
border: 1px solid #ddd;
|
||||
white-space: nowrap;
|
||||
line-height: 33px;
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
border-radius: 4px;
|
||||
background-clip: padding-box;
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
background-color: #fff;
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.5, #fff));
|
||||
background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 50%);
|
||||
background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 50%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr ='#ffffff', endColorstr ='#eeeeee', GradientType = 0);
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
#redux-form-wrapper .el-icon-question-sign {
|
||||
color: #25b15f;
|
||||
}
|
||||
|
||||
#redux-form-wrapper .wp-color-result-text {
|
||||
background: #fff;
|
||||
border-radius: 0 2px 2px 0;
|
||||
border-left: 1px solid #ddd;
|
||||
color: #333;
|
||||
display: block;
|
||||
line-height: 22px;
|
||||
padding: 0 6px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#redux-form-wrapper .select2-container .select2-choice .select2-arrow {
|
||||
display: inline-block;
|
||||
width: 18px;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
line-height: 35px;
|
||||
top: 0;
|
||||
border-left: 1px solid #ddd;
|
||||
border-radius: 0 4px 4px 0;
|
||||
background-clip: padding-box;
|
||||
background: #fff;
|
||||
background-image: none;
|
||||
background-image: none;
|
||||
background-image: none;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr ='#eeeeee', endColorstr ='#cccccc', GradientType = 0);
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.redux-container {
|
||||
background-color: #f5f5f5;
|
||||
background-repeat: repeat-x;
|
||||
background-image: -moz-linear-gradient(top, #f2f2f2 0, #f5f5f5 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #f2f2f2), color-stop(100%, #f5f5f5));
|
||||
background-image: -webkit-linear-gradient(top, #f2f2f2 0, #f5f5f5 100%);
|
||||
background-image: -ms-linear-gradient(top, #f2f2f2 0, #f5f5f5 100%);
|
||||
background-image: -o-linear-gradient(top, #f2f2f2 0, #f5f5f5 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#eeeeee', GradientType=0);
|
||||
background-image: linear-gradient(top, #f2f2f2 0, #f5f5f5 100%);
|
||||
border: 1px solid #dedede;
|
||||
box-shadow: none;
|
||||
-moz-box-shadow: 0 1px 5px rgba(0, 0, 0, .4);
|
||||
margin-top: 5px;
|
||||
overflow: hidden;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.redux-container #redux-header, .redux-container #redux-footer {
|
||||
text-align: right;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.redux-container #redux-footer {
|
||||
border-top: 1px solid #ddd!important;
|
||||
z-index: 9999;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.redux-container .notice-yellow {
|
||||
margin: 0;
|
||||
border-bottom: 1px solid #E7E7E7;
|
||||
background-color: #f3f3f3;
|
||||
color: red;
|
||||
padding: 15px 35px 15px 14px;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.redux-container #info_bar {
|
||||
background: #f4f4f4;
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding: 7px;
|
||||
text-align: right;
|
||||
-moz-box-shadow: inset 0 1px 0 #fcfcfc;
|
||||
-webkit-box-shadow: inset 0 1px 0 #fcfcfc;
|
||||
box-shadow: inset 0 1px 0 #fcfcfc;
|
||||
height: 34px!important;
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
.redux-container .expand_options {
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
height: 22px;
|
||||
width: 21px;
|
||||
float: left;
|
||||
font-size: 0;
|
||||
text-indent: -9999px;
|
||||
display: none;
|
||||
margin: 1px 0 0 5px;
|
||||
border: 1px solid #bbb;
|
||||
-webkit-border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
/*background: url(../img/toggle_tabs.png) no-repeat -2px -26px;*/
|
||||
}
|
||||
|
||||
.redux-main .form-table tr {
|
||||
border-bottom: none!important;
|
||||
}
|
||||
|
||||
.redux-main input {
|
||||
line-height: 27px!important;
|
||||
box-shadow: none!important;
|
||||
border-radius: 4px;
|
||||
background: #fff;
|
||||
box-shadow: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.redux-main .input-append .add-on, .redux-main .input-prepend .add-on {
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
min-width: 16px;
|
||||
padding: 3px 4px;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
text-shadow: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid #dedede;
|
||||
}
|
||||
|
||||
.redux-container .redux-main .input-append .add-on, .redux-container .redux-main .input-prepend .add-on {
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
min-width: 16px;
|
||||
padding: 7px 4px;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
line-height: 27px;
|
||||
text-align: center;
|
||||
text-shadow: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.redux-container .redux-main .input-prepend .add-on {
|
||||
line-height:20px;
|
||||
}
|
||||
|
||||
.redux-sidebar .redux-group-menu li a {
|
||||
display: block;
|
||||
padding: 15px 4px 15px 14px;
|
||||
background: #e0e0e0;
|
||||
background: 0 0;
|
||||
border-width: 1px 0;
|
||||
border-style: solid;
|
||||
border-bottom-color: #E7E7E7;
|
||||
border-top-color: #F9F9F9;
|
||||
opacity: 1;
|
||||
color: #333;
|
||||
font-weight: 700;
|
||||
text-decoration: none;
|
||||
-webkit-transition: none;
|
||||
transition: none;
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.redux-sidebar .redux-group-menu li a:hover {
|
||||
background: #eaeaea;
|
||||
color: #25b15f;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.redux-sidebar .redux-group-tab-link-a i {
|
||||
vertical-align: middle;
|
||||
font-size: 1em;
|
||||
position: absolute;
|
||||
line-height: 1.4em;
|
||||
color: #25b15f;
|
||||
}
|
||||
|
||||
.admin-color-fresh .redux-container-switch .cb-disable, .admin-color-fresh .redux-container-switch .cb-enable, .admin-color-fresh .ui-state-default, .admin-color-fresh .ui-widget-content .ui-state-default, .admin-color-fresh .ui-widget-header .ui-state-default {
|
||||
background-color: #f5f5f5;
|
||||
background-image: -khtml-gradient(linear, left top, left bottom, from(#f8f8f8), to(#f5f5f5));
|
||||
background-image: -moz-linear-gradient(top, #f8f8f8, #f5f5f5);
|
||||
background-image: -ms-linear-gradient(top, #f8f8f8, #f5f5f5);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #f8f8f8), color-stop(100%, #f5f5f5));
|
||||
background-image: -webkit-linear-gradient(top, #f8f8f8, #f5f5f5);
|
||||
background-image: -o-linear-gradient(top, #f8f8f8, #f5f5f5);
|
||||
background-image: linear-gradient(top, #f8f8f8, #f5f5f5);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='@from', endColorstr='@to', GradientType=0);
|
||||
border-color: #ddd;
|
||||
box-shadow: none;
|
||||
line-height: 22px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.admin-color-fresh .redux-container-switch .cb-disable.selected {
|
||||
background: #32373c !important;
|
||||
background-image: -khtml-gradient(linear, left top, left bottom, from(#929292), to(#646464));
|
||||
background-image: -moz-linear-gradient(top, #929292, #646464);
|
||||
background-image: -ms-linear-gradient(top, #929292, #646464);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #929292), color-stop(100%, #646464));
|
||||
background-image: -webkit-linear-gradient(top, #929292, #646464);
|
||||
background-image: -o-linear-gradient(top, #929292, #646464);
|
||||
background-image: linear-gradient(top, #929292, #646464);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='@from', endColorstr='@to', GradientType=0);
|
||||
border-color: #32373c!important;
|
||||
}
|
||||
|
||||
#wpbody .redux-container-switch .cb-enable.selected, #wpbody .ui-buttonset .ui-state-active {
|
||||
background: #25b15f!important;
|
||||
background-image: -khtml-gradient(linear, left top, left bottom, from(#008ec6), to(#0074a2));
|
||||
background-image: -moz-linear-gradient(top, #008ec6, #0074a2);
|
||||
background-image: -ms-linear-gradient(top, #008ec6, #0074a2);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #008ec6), color-stop(100%, #0074a2));
|
||||
background-image: -webkit-linear-gradient(top, #008ec6, #0074a2);
|
||||
background-image: -o-linear-gradient(top, #008ec6, #0074a2);
|
||||
background-image: linear-gradient(top, #008ec6, #0074a2);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='@from', endColorstr='@to', GradientType=0);
|
||||
border-color: #25b15f!important;
|
||||
border-color: #25b15f!important;
|
||||
-webkit-box-shadow: inset 0 1px 0 #00abef, 0 1px 0 rgba(0, 0, 0, .15);
|
||||
box-shadow: none!important;
|
||||
}
|
||||
|
||||
.redux-main .redux-typography-container .input_wrapper input.mini {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-o-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
width: 78%;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
height: 35px;
|
||||
top: 3px;
|
||||
padding: 0 2px 0 5px;
|
||||
text-decoration: none;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.redux-container .form-table>tbody>tr>th {
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
.admin-color-fresh #redux-header {
|
||||
background: #25b15f;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.redux-container #redux-header .display_header .redux-dev-mode-notice-container {display:none;}
|
||||
|
||||
.admin-color-fresh .redux-sidebar .redux-group-menu li.active a, .admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild a {
|
||||
color: #222;
|
||||
box-shadow: none;
|
||||
text-shadow: none!important;
|
||||
}
|
||||
|
||||
.admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections a, .admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a {
|
||||
background: #fff;
|
||||
-webkit-transition: all .2s;
|
||||
-moz-transition: all .2s;
|
||||
transition: all .2s;
|
||||
color: #333;
|
||||
width: auto;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li, .admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li {
|
||||
border-top: 0 none !important
|
||||
}
|
||||
|
||||
.admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a, .admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a {
|
||||
background: #e5e5e5!important;
|
||||
width: auto;
|
||||
border-top: 0 !important;
|
||||
padding: 7px;
|
||||
color: #333;
|
||||
padding-left: 15px;
|
||||
-webkit-transition: all .2;
|
||||
-moz-transition: all .2;
|
||||
-ms-transition: all .2;
|
||||
-o-transition: all .2;
|
||||
transition: all .2;
|
||||
}
|
||||
|
||||
.admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a, .wp-customizer .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a {
|
||||
background: #25b15f!important;
|
||||
color: #fff!important;
|
||||
}
|
||||
|
||||
.admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections .active a:after, .admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .active a:after, .wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections .active a:after, .wp-customizer .redux-sidebar .redux-group-menu li.activeChild.hasSubSections .active a:after {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a:hover, .admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a:hover {
|
||||
color: #25b15f!important;
|
||||
background: #e5e5e5!important;
|
||||
}
|
||||
|
||||
.admin-color-fresh .ui-state-default {
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.redux-main .wp-picker-container .wp-color-result {
|
||||
outline: 0;
|
||||
margin: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.redux-container .wp-picker-container {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.redux-message.redux-notice {
|
||||
display: none!important;
|
||||
}
|
||||
1770
wp-content/themes/ekko/core/assets/css/bbpress.css
Normal file
5779
wp-content/themes/ekko/core/assets/css/bootstrap.min.css
vendored
Normal file
4
wp-content/themes/ekko/core/assets/css/font-awesome.min.css
vendored
Normal file
1
wp-content/themes/ekko/core/assets/css/iconsmind.min.css
vendored
Normal file
@@ -0,0 +1,483 @@
|
||||
/*! PhotoSwipe Default UI CSS by Dmitry Semenov | photoswipe.com | MIT license */
|
||||
/*
|
||||
|
||||
Contents:
|
||||
|
||||
1. Buttons
|
||||
2. Share modal and links
|
||||
3. Index indicator ("1 of X" counter)
|
||||
4. Caption
|
||||
5. Loading indicator
|
||||
6. Additional styles (root element, top bar, idle state, hidden state, etc.)
|
||||
|
||||
*/
|
||||
/*
|
||||
|
||||
1. Buttons
|
||||
|
||||
*/
|
||||
/* <button> css reset */
|
||||
.pswp__button {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
position: relative;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
overflow: visible;
|
||||
-webkit-appearance: none;
|
||||
display: block;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
float: right;
|
||||
opacity: 0.75;
|
||||
-webkit-transition: opacity 0.2s;
|
||||
transition: opacity 0.2s;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none; }
|
||||
.pswp__button:focus,
|
||||
.pswp__button:hover {
|
||||
opacity: 1; }
|
||||
.pswp__button:active {
|
||||
outline: none;
|
||||
opacity: 0.9; }
|
||||
.pswp__button::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border: 0; }
|
||||
|
||||
/* pswp__ui--over-close class it added when mouse is over element that should close gallery */
|
||||
.pswp__ui--over-close .pswp__button--close {
|
||||
opacity: 1; }
|
||||
|
||||
.pswp__button,
|
||||
.pswp__button--arrow--left:before,
|
||||
.pswp__button--arrow--right:before {
|
||||
background: url("../images/photoswipe/default-skin.png") 0 0 no-repeat;
|
||||
background-size: 264px 88px;
|
||||
width: 44px;
|
||||
height: 44px; }
|
||||
|
||||
@media (-webkit-min-device-pixel-ratio: 1.1), (-webkit-min-device-pixel-ratio: 1.09375), (min-resolution: 105dpi), (min-resolution: 1.1dppx) {
|
||||
/* Serve SVG sprite if browser supports SVG and resolution is more than 105dpi */
|
||||
.pswp--svg .pswp__button,
|
||||
.pswp--svg .pswp__button--arrow--left:before,
|
||||
.pswp--svg .pswp__button--arrow--right:before {
|
||||
background-image: url("../images/photoswipe/default-skin.svg"); }
|
||||
.pswp--svg .pswp__button--arrow--left,
|
||||
.pswp--svg .pswp__button--arrow--right {
|
||||
background: none; } }
|
||||
|
||||
.pswp__button--close {
|
||||
background-position: 0 -44px; }
|
||||
|
||||
.pswp__button--share {
|
||||
background-position: -44px -44px; }
|
||||
|
||||
.pswp__button--fs {
|
||||
display: none; }
|
||||
|
||||
.pswp--supports-fs .pswp__button--fs {
|
||||
display: block; }
|
||||
|
||||
.pswp--fs .pswp__button--fs {
|
||||
background-position: -44px 0; }
|
||||
|
||||
.pswp__button--zoom {
|
||||
display: none;
|
||||
background-position: -88px 0; }
|
||||
|
||||
.pswp--zoom-allowed .pswp__button--zoom {
|
||||
display: block; }
|
||||
|
||||
.pswp--zoomed-in .pswp__button--zoom {
|
||||
background-position: -132px 0; }
|
||||
|
||||
/* no arrows on touch screens */
|
||||
.pswp--touch .pswp__button--arrow--left,
|
||||
.pswp--touch .pswp__button--arrow--right {
|
||||
visibility: hidden; }
|
||||
|
||||
/*
|
||||
Arrow buttons hit area
|
||||
(icon is added to :before pseudo-element)
|
||||
*/
|
||||
.pswp__button--arrow--left,
|
||||
.pswp__button--arrow--right {
|
||||
background: none;
|
||||
top: 50%;
|
||||
margin-top: -50px;
|
||||
width: 70px;
|
||||
height: 100px;
|
||||
position: absolute; }
|
||||
|
||||
.pswp__button--arrow--left {
|
||||
left: 0; }
|
||||
|
||||
.pswp__button--arrow--right {
|
||||
right: 0; }
|
||||
|
||||
.pswp__button--arrow--left:before,
|
||||
.pswp__button--arrow--right:before {
|
||||
content: '';
|
||||
top: 35px;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
height: 30px;
|
||||
width: 32px;
|
||||
position: absolute; }
|
||||
|
||||
.pswp__button--arrow--left:before {
|
||||
left: 6px;
|
||||
background-position: -138px -44px; }
|
||||
|
||||
.pswp__button--arrow--right:before {
|
||||
right: 6px;
|
||||
background-position: -94px -44px; }
|
||||
|
||||
/*
|
||||
|
||||
2. Share modal/popup and links
|
||||
|
||||
*/
|
||||
.pswp__counter,
|
||||
.pswp__share-modal {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none; }
|
||||
|
||||
.pswp__share-modal {
|
||||
display: block;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding: 10px;
|
||||
position: absolute;
|
||||
z-index: 1600;
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.25s ease-out;
|
||||
transition: opacity 0.25s ease-out;
|
||||
-webkit-backface-visibility: hidden;
|
||||
will-change: opacity; }
|
||||
|
||||
.pswp__share-modal--hidden {
|
||||
display: none; }
|
||||
|
||||
.pswp__share-tooltip {
|
||||
z-index: 1620;
|
||||
position: absolute;
|
||||
background: #FFF;
|
||||
top: 56px;
|
||||
border-radius: 2px;
|
||||
display: block;
|
||||
width: auto;
|
||||
right: 44px;
|
||||
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
|
||||
-webkit-transform: translateY(6px);
|
||||
-ms-transform: translateY(6px);
|
||||
transform: translateY(6px);
|
||||
-webkit-transition: -webkit-transform 0.25s;
|
||||
transition: transform 0.25s;
|
||||
-webkit-backface-visibility: hidden;
|
||||
will-change: transform; }
|
||||
.pswp__share-tooltip a {
|
||||
display: block;
|
||||
padding: 8px 12px;
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
line-height: 18px; }
|
||||
.pswp__share-tooltip a:hover {
|
||||
text-decoration: none;
|
||||
color: #000; }
|
||||
.pswp__share-tooltip a:first-child {
|
||||
/* round corners on the first/last list item */
|
||||
border-radius: 2px 2px 0 0; }
|
||||
.pswp__share-tooltip a:last-child {
|
||||
border-radius: 0 0 2px 2px; }
|
||||
|
||||
.pswp__share-modal--fade-in {
|
||||
opacity: 1; }
|
||||
.pswp__share-modal--fade-in .pswp__share-tooltip {
|
||||
-webkit-transform: translateY(0);
|
||||
-ms-transform: translateY(0);
|
||||
transform: translateY(0); }
|
||||
|
||||
/* increase size of share links on touch devices */
|
||||
.pswp--touch .pswp__share-tooltip a {
|
||||
padding: 16px 12px; }
|
||||
|
||||
a.pswp__share--facebook:before {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
position: absolute;
|
||||
top: -12px;
|
||||
right: 15px;
|
||||
border: 6px solid transparent;
|
||||
border-bottom-color: #FFF;
|
||||
-webkit-pointer-events: none;
|
||||
-moz-pointer-events: none;
|
||||
pointer-events: none; }
|
||||
|
||||
a.pswp__share--facebook:hover {
|
||||
background: #3E5C9A;
|
||||
color: #FFF; }
|
||||
a.pswp__share--facebook:hover:before {
|
||||
border-bottom-color: #3E5C9A; }
|
||||
|
||||
a.pswp__share--twitter:hover {
|
||||
background: #55ACEE;
|
||||
color: #FFF; }
|
||||
|
||||
a.pswp__share--pinterest:hover {
|
||||
background: #CCC;
|
||||
color: #CE272D; }
|
||||
|
||||
a.pswp__share--download:hover {
|
||||
background: #DDD; }
|
||||
|
||||
/*
|
||||
|
||||
3. Index indicator ("1 of X" counter)
|
||||
|
||||
*/
|
||||
.pswp__counter {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 44px;
|
||||
font-size: 13px;
|
||||
line-height: 44px;
|
||||
color: #FFF;
|
||||
opacity: 0.75;
|
||||
padding: 0 10px; }
|
||||
|
||||
/*
|
||||
|
||||
4. Caption
|
||||
|
||||
*/
|
||||
.pswp__caption {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
min-height: 44px; }
|
||||
.pswp__caption small {
|
||||
font-size: 11px;
|
||||
color: #BBB; }
|
||||
|
||||
.pswp__caption__center {
|
||||
text-align: left;
|
||||
max-width: 420px;
|
||||
margin: 0 auto;
|
||||
font-size: 13px;
|
||||
padding: 10px;
|
||||
line-height: 20px;
|
||||
color: #CCC; }
|
||||
|
||||
.pswp__caption--empty {
|
||||
display: none; }
|
||||
|
||||
/* Fake caption element, used to calculate height of next/prev image */
|
||||
.pswp__caption--fake {
|
||||
visibility: hidden; }
|
||||
|
||||
/*
|
||||
|
||||
5. Loading indicator (preloader)
|
||||
|
||||
You can play with it here - http://codepen.io/dimsemenov/pen/yyBWoR
|
||||
|
||||
*/
|
||||
.pswp__preloader {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
margin-left: -22px;
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.25s ease-out;
|
||||
transition: opacity 0.25s ease-out;
|
||||
will-change: opacity;
|
||||
direction: ltr; }
|
||||
|
||||
.pswp__preloader__icn {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 12px; }
|
||||
|
||||
.pswp__preloader--active {
|
||||
opacity: 1; }
|
||||
.pswp__preloader--active .pswp__preloader__icn {
|
||||
/* We use .gif in browsers that don't support CSS animation */
|
||||
background: url("../images/photoswipe/preloader.gif") 0 0 no-repeat; }
|
||||
|
||||
.pswp--css_animation .pswp__preloader--active {
|
||||
opacity: 1; }
|
||||
.pswp--css_animation .pswp__preloader--active .pswp__preloader__icn {
|
||||
-webkit-animation: clockwise 500ms linear infinite;
|
||||
animation: clockwise 500ms linear infinite; }
|
||||
.pswp--css_animation .pswp__preloader--active .pswp__preloader__donut {
|
||||
-webkit-animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite;
|
||||
animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite; }
|
||||
|
||||
.pswp--css_animation .pswp__preloader__icn {
|
||||
background: none;
|
||||
opacity: 0.75;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
position: absolute;
|
||||
left: 15px;
|
||||
top: 15px;
|
||||
margin: 0; }
|
||||
|
||||
.pswp--css_animation .pswp__preloader__cut {
|
||||
/*
|
||||
The idea of animating inner circle is based on Polymer ("material") loading indicator
|
||||
by Keanu Lee https://blog.keanulee.com/2014/10/20/the-tale-of-three-spinners.html
|
||||
*/
|
||||
position: relative;
|
||||
width: 7px;
|
||||
height: 14px;
|
||||
overflow: hidden; }
|
||||
|
||||
.pswp--css_animation .pswp__preloader__donut {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
border: 2px solid #FFF;
|
||||
border-radius: 50%;
|
||||
border-left-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: none;
|
||||
margin: 0; }
|
||||
|
||||
@media screen and (max-width: 1024px) {
|
||||
.pswp__preloader {
|
||||
position: relative;
|
||||
left: auto;
|
||||
top: auto;
|
||||
margin: 0;
|
||||
float: right; } }
|
||||
|
||||
@-webkit-keyframes clockwise {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg); }
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg); } }
|
||||
|
||||
@keyframes clockwise {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg); }
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg); } }
|
||||
|
||||
@-webkit-keyframes donut-rotate {
|
||||
0% {
|
||||
-webkit-transform: rotate(0);
|
||||
transform: rotate(0); }
|
||||
50% {
|
||||
-webkit-transform: rotate(-140deg);
|
||||
transform: rotate(-140deg); }
|
||||
100% {
|
||||
-webkit-transform: rotate(0);
|
||||
transform: rotate(0); } }
|
||||
|
||||
@keyframes donut-rotate {
|
||||
0% {
|
||||
-webkit-transform: rotate(0);
|
||||
transform: rotate(0); }
|
||||
50% {
|
||||
-webkit-transform: rotate(-140deg);
|
||||
transform: rotate(-140deg); }
|
||||
100% {
|
||||
-webkit-transform: rotate(0);
|
||||
transform: rotate(0); } }
|
||||
|
||||
/*
|
||||
|
||||
6. Additional styles
|
||||
|
||||
*/
|
||||
/* root element of UI */
|
||||
.pswp__ui {
|
||||
-webkit-font-smoothing: auto;
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
z-index: 1550; }
|
||||
|
||||
/* top black bar with buttons and "1 of X" indicator */
|
||||
.pswp__top-bar {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 44px;
|
||||
width: 100%; }
|
||||
|
||||
.pswp__caption,
|
||||
.pswp__top-bar,
|
||||
.pswp--has_mouse .pswp__button--arrow--left,
|
||||
.pswp--has_mouse .pswp__button--arrow--right {
|
||||
-webkit-backface-visibility: hidden;
|
||||
will-change: opacity;
|
||||
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
|
||||
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
|
||||
|
||||
/* pswp--has_mouse class is added only when two subsequent mousemove events occur */
|
||||
.pswp--has_mouse .pswp__button--arrow--left,
|
||||
.pswp--has_mouse .pswp__button--arrow--right {
|
||||
visibility: visible; }
|
||||
|
||||
.pswp__top-bar,
|
||||
.pswp__caption {
|
||||
background-color: rgba(0, 0, 0, 0.5); }
|
||||
|
||||
/* pswp__ui--fit class is added when main image "fits" between top bar and bottom bar (caption) */
|
||||
.pswp__ui--fit .pswp__top-bar,
|
||||
.pswp__ui--fit .pswp__caption {
|
||||
background-color: rgba(0, 0, 0, 0.3); }
|
||||
|
||||
/* pswp__ui--idle class is added when mouse isn't moving for several seconds (JS option timeToIdle) */
|
||||
.pswp__ui--idle .pswp__top-bar {
|
||||
opacity: 0; }
|
||||
|
||||
.pswp__ui--idle .pswp__button--arrow--left,
|
||||
.pswp__ui--idle .pswp__button--arrow--right {
|
||||
opacity: 0; }
|
||||
|
||||
/*
|
||||
pswp__ui--hidden class is added when controls are hidden
|
||||
e.g. when user taps to toggle visibility of controls
|
||||
*/
|
||||
.pswp__ui--hidden .pswp__top-bar,
|
||||
.pswp__ui--hidden .pswp__caption,
|
||||
.pswp__ui--hidden .pswp__button--arrow--left,
|
||||
.pswp__ui--hidden .pswp__button--arrow--right {
|
||||
/* Force paint & create composition layer for controls. */
|
||||
opacity: 0.001; }
|
||||
|
||||
/* pswp__ui--one-slide class is added when there is just one item in gallery */
|
||||
.pswp__ui--one-slide .pswp__button--arrow--left,
|
||||
.pswp__ui--one-slide .pswp__button--arrow--right,
|
||||
.pswp__ui--one-slide .pswp__counter {
|
||||
display: none; }
|
||||
|
||||
.pswp__element--disabled {
|
||||
display: none !important; }
|
||||
|
||||
.pswp--minimal--dark .pswp__top-bar {
|
||||
background: none; }
|
||||
178
wp-content/themes/ekko/core/assets/css/photoswipe.css
Normal file
@@ -0,0 +1,178 @@
|
||||
/*! PhotoSwipe main CSS by Dmitry Semenov | photoswipe.com | MIT license */
|
||||
/*
|
||||
Styles for basic PhotoSwipe functionality (sliding area, open/close transitions)
|
||||
*/
|
||||
/* pswp = photoswipe */
|
||||
.pswp {
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
overflow: hidden;
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
z-index: 1500;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
/* create separate layer, to avoid paint on window.onscroll in webkit/blink */
|
||||
-webkit-backface-visibility: hidden;
|
||||
outline: none; }
|
||||
.pswp * {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box; }
|
||||
.pswp img {
|
||||
max-width: none; }
|
||||
|
||||
/* style is added when JS option showHideOpacity is set to true */
|
||||
.pswp--animate_opacity {
|
||||
/* 0.001, because opacity:0 doesn't trigger Paint action, which causes lag at start of transition */
|
||||
opacity: 0.001;
|
||||
will-change: opacity;
|
||||
/* for open/close transition */
|
||||
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
|
||||
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
|
||||
|
||||
.pswp--open {
|
||||
display: block; }
|
||||
|
||||
.pswp--zoom-allowed .pswp__img {
|
||||
/* autoprefixer: off */
|
||||
cursor: -webkit-zoom-in;
|
||||
cursor: -moz-zoom-in;
|
||||
cursor: zoom-in; }
|
||||
|
||||
.pswp--zoomed-in .pswp__img {
|
||||
/* autoprefixer: off */
|
||||
cursor: -webkit-grab;
|
||||
cursor: -moz-grab;
|
||||
cursor: grab; }
|
||||
|
||||
.pswp--dragging .pswp__img {
|
||||
/* autoprefixer: off */
|
||||
cursor: -webkit-grabbing;
|
||||
cursor: -moz-grabbing;
|
||||
cursor: grabbing; }
|
||||
|
||||
/*
|
||||
Background is added as a separate element.
|
||||
As animating opacity is much faster than animating rgba() background-color.
|
||||
*/
|
||||
.pswp__bg {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #000;
|
||||
opacity: 0;
|
||||
transform: translateZ(0);
|
||||
-webkit-backface-visibility: hidden;
|
||||
will-change: opacity; }
|
||||
|
||||
.pswp__scroll-wrap {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden; }
|
||||
|
||||
.pswp__container,
|
||||
.pswp__zoom-wrap {
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0; }
|
||||
|
||||
/* Prevent selection and tap highlights */
|
||||
.pswp__container,
|
||||
.pswp__img {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-webkit-touch-callout: none; }
|
||||
|
||||
.pswp__zoom-wrap {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
-webkit-transform-origin: left top;
|
||||
-ms-transform-origin: left top;
|
||||
transform-origin: left top;
|
||||
/* for open/close transition */
|
||||
-webkit-transition: -webkit-transform 333ms cubic-bezier(0.4, 0, 0.22, 1);
|
||||
transition: transform 333ms cubic-bezier(0.4, 0, 0.22, 1); }
|
||||
|
||||
.pswp__bg {
|
||||
will-change: opacity;
|
||||
/* for open/close transition */
|
||||
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
|
||||
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
|
||||
|
||||
.pswp--animated-in .pswp__bg,
|
||||
.pswp--animated-in .pswp__zoom-wrap {
|
||||
-webkit-transition: none;
|
||||
transition: none; }
|
||||
|
||||
.pswp__container,
|
||||
.pswp__zoom-wrap {
|
||||
-webkit-backface-visibility: hidden; }
|
||||
|
||||
.pswp__item {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
overflow: hidden; }
|
||||
|
||||
.pswp__img {
|
||||
position: absolute;
|
||||
width: auto;
|
||||
height: auto;
|
||||
top: 0;
|
||||
left: 0; }
|
||||
|
||||
/*
|
||||
stretched thumbnail or div placeholder element (see below)
|
||||
style is added to avoid flickering in webkit/blink when layers overlap
|
||||
*/
|
||||
.pswp__img--placeholder {
|
||||
-webkit-backface-visibility: hidden; }
|
||||
|
||||
/*
|
||||
div element that matches size of large image
|
||||
large image loads on top of it
|
||||
*/
|
||||
.pswp__img--placeholder--blank {
|
||||
background: #222; }
|
||||
|
||||
.pswp--ie .pswp__img {
|
||||
width: 100% !important;
|
||||
height: auto !important;
|
||||
left: 0;
|
||||
top: 0; }
|
||||
|
||||
/*
|
||||
Error message appears when image is not loaded
|
||||
(JS option errorMsg controls markup)
|
||||
*/
|
||||
.pswp__error-msg {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
margin-top: -8px;
|
||||
color: #CCC; }
|
||||
|
||||
.pswp__error-msg a {
|
||||
color: #CCC;
|
||||
text-decoration: underline; }
|
||||
24
wp-content/themes/ekko/core/assets/css/shortcodes.css
Normal file
@@ -0,0 +1,24 @@
|
||||
i.mce-i-wp_code {
|
||||
padding: 0;
|
||||
vertical-align: top;
|
||||
speak: none;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
margin-left: -2px;
|
||||
padding-right: 2px;
|
||||
background-image: url('../../../images/fav-icon.png');
|
||||
}
|
||||
|
||||
.select-icon {
|
||||
position: fixed;
|
||||
float: left;
|
||||
width: 400px;
|
||||
margin-left: -200px;
|
||||
background: #fff;
|
||||
border: 1px solid #ccc;
|
||||
padding: 20px;
|
||||
left: 50%;
|
||||
height: 300px;
|
||||
z-index: 999;
|
||||
top: 50%;
|
||||
margin-top: -150px; }
|
||||
4994
wp-content/themes/ekko/core/assets/css/woocommerce.css
Normal file
@@ -0,0 +1,187 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class Name: wp_bootstrap_navwalker
|
||||
* GitHub URI: https://github.com/twittem/wp-bootstrap-navwalker
|
||||
* Description: A custom WordPress nav walker class to implement the Bootstrap 3 navigation style in a custom theme using the WordPress built in menu manager.
|
||||
* Version: 2.0.4
|
||||
* Author: Edward McIntyre - @twittem
|
||||
* License: GPL-2.0+
|
||||
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
||||
*/
|
||||
|
||||
class wp_bootstrap_navwalker extends Walker_Nav_Menu {
|
||||
|
||||
/**
|
||||
* @see Walker::start_lvl()
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param string $output Passed by reference. Used to append additional content.
|
||||
* @param int $depth Depth of page. Used for padding.
|
||||
*/
|
||||
public function start_lvl( &$output, $depth = 0, $args = array() ) {
|
||||
$indent = str_repeat( "\t", $depth );
|
||||
$output .= "\n$indent<ul role=\"menu\" class=\" dropdown-menu\">\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Walker::start_el()
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param string $output Passed by reference. Used to append additional content.
|
||||
* @param object $item Menu item data object.
|
||||
* @param int $depth Depth of menu item. Used for padding.
|
||||
* @param int $current_page Menu item ID.
|
||||
* @param object $args
|
||||
*/
|
||||
public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
|
||||
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
|
||||
|
||||
/**
|
||||
* Dividers, Headers or Disabled
|
||||
* =============================
|
||||
* Determine whether the item is a Divider, Header, Disabled or regular
|
||||
* menu item. To prevent errors we use the strcasecmp() function to so a
|
||||
* comparison that is not case sensitive. The strcasecmp() function returns
|
||||
* a 0 if the strings are equal.
|
||||
*/
|
||||
if ( strcasecmp( $item->attr_title, 'divider' ) == 0 && $depth === 1 ) {
|
||||
$output .= $indent . '<li role="presentation" class="divider">';
|
||||
} else if ( strcasecmp( $item->title, 'divider') == 0 && $depth === 1 ) {
|
||||
$output .= $indent . '<li role="presentation" class="divider">';
|
||||
} else if ( strcasecmp( $item->attr_title, 'dropdown-header') == 0 && $depth === 1 ) {
|
||||
$output .= $indent . '<li role="presentation" class="dropdown-header">' . esc_attr( $item->title );
|
||||
} else if ( strcasecmp($item->attr_title, 'disabled' ) == 0 ) {
|
||||
$output .= $indent . '<li role="presentation" class="disabled"><a href="#">' . esc_attr( $item->title ) . '</a>';
|
||||
} else {
|
||||
|
||||
$class_names = $value = '';
|
||||
|
||||
$classes = empty( $item->classes ) ? array() : (array) $item->classes;
|
||||
$classes[] = 'menu-item-' . $item->ID;
|
||||
|
||||
$class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args ) );
|
||||
|
||||
if ( $args->has_children )
|
||||
$class_names .= ' dropdown';
|
||||
|
||||
if ( in_array( 'current-menu-item', $classes ) )
|
||||
$class_names .= ' active';
|
||||
|
||||
$class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
|
||||
|
||||
$id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args );
|
||||
$id = $id ? ' id="' . esc_attr( $id ) . '"' : '';
|
||||
|
||||
$output .= $indent . '<li' . $id . $value . $class_names .'>';
|
||||
|
||||
$atts = array();
|
||||
if ( empty( $item->attr_title ) ) {
|
||||
$atts['title'] = ! empty( $item->title ) ? strip_tags( $item->title ) : '';
|
||||
} else {
|
||||
$atts['title'] = $item->attr_title;
|
||||
}
|
||||
$atts['target'] = ! empty( $item->target ) ? $item->target : '';
|
||||
$atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : '';
|
||||
|
||||
// If item has_children add atts to a.
|
||||
if ( $args->has_children && $depth === 0 ) {
|
||||
$atts['href'] = ! empty( $item->url ) ? $item->url : '';
|
||||
$atts['data-toggle'] = '';
|
||||
$atts['class'] = '';
|
||||
$atts['aria-haspopup'] = '';
|
||||
} else if ( $depth === 0 ) {
|
||||
$atts['href'] = ! empty( $item->url ) ? $item->url : '';
|
||||
}
|
||||
|
||||
else {
|
||||
$atts['href'] = ! empty( $item->url ) ? $item->url : '';
|
||||
}
|
||||
|
||||
|
||||
$atts = apply_filters( 'nav_menu_link_attributes', $atts, $item, $args );
|
||||
|
||||
$attributes = '';
|
||||
foreach ( $atts as $attr => $value ) {
|
||||
if ( ! empty( $value ) ) {
|
||||
$value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value );
|
||||
$attributes .= ' ' . $attr . '="' . $value . '"';
|
||||
}
|
||||
}
|
||||
|
||||
$item_output = $args->before;
|
||||
|
||||
/*
|
||||
* Glyphicons
|
||||
* ===========
|
||||
* Since the the menu item is NOT a Divider or Header we check the see
|
||||
* if there is a value in the attr_title property. If the attr_title
|
||||
* property is NOT null we apply it as the class name for the glyphicon.
|
||||
*/
|
||||
if ( ! empty( $item->attr_title ) )
|
||||
$item_output .= '<a'. $attributes .'><span class="glyphicon ' . esc_attr( $item->attr_title ) . '"></span> ';
|
||||
else
|
||||
$item_output .= '<a'. $attributes .'>';
|
||||
|
||||
$item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after;
|
||||
$item_output .= ( $args->has_children && 0 === $depth ) ? '</a>' : '</a>';
|
||||
$item_output .= $args->after;
|
||||
|
||||
$output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Traverse elements to create list from elements.
|
||||
*
|
||||
* Display one element if the element doesn't have any children otherwise,
|
||||
* display the element and its children. Will only traverse up to the max
|
||||
* depth and no ignore elements under that depth.
|
||||
*
|
||||
* This method shouldn't be called directly, use the walk() method instead.
|
||||
*
|
||||
* @see Walker::start_el()
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @param object $element Data object
|
||||
* @param array $children_elements List of elements to continue traversing.
|
||||
* @param int $max_depth Max depth to traverse.
|
||||
* @param int $depth Depth of current element.
|
||||
* @param array $args
|
||||
* @param string $output Passed by reference. Used to append additional content.
|
||||
* @return null Null on failure with no changes to parameters.
|
||||
*/
|
||||
public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) {
|
||||
if ( ! $element )
|
||||
return;
|
||||
|
||||
$id_field = $this->db_fields['id'];
|
||||
|
||||
// Display this element.
|
||||
if ( is_object( $args[0] ) )
|
||||
$args[0]->has_children = ! empty( $children_elements[ $element->$id_field ] );
|
||||
|
||||
parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );
|
||||
}
|
||||
|
||||
/**
|
||||
* Menu Fallback
|
||||
* =============
|
||||
* If this function is assigned to the wp_nav_menu's fallback_cb variable
|
||||
* and a manu has not been assigned to the theme location in the WordPress
|
||||
* menu manager the function with display nothing to a non-logged in user,
|
||||
* and will add a link to the WordPress menu manager if logged in as an admin.
|
||||
*
|
||||
* @param array $args passed from the wp_nav_menu function.
|
||||
*
|
||||
*/
|
||||
public static function fallback( $args ) {
|
||||
if ( current_user_can( 'manage_options' ) ) {
|
||||
|
||||
extract( $args );
|
||||
echo '<ul class="nav navbar-nav"><li><a href="' . esc_url(admin_url( 'nav-menus.php' )) . '">Add a menu</a></li></ul>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BIN
wp-content/themes/ekko/core/assets/fonts/fontawesome-webfont.eot
Normal file
BIN
wp-content/themes/ekko/core/assets/fonts/fontawesome-webfont.otf
Normal file
2671
wp-content/themes/ekko/core/assets/fonts/fontawesome-webfont.svg
Normal file
|
After Width: | Height: | Size: 434 KiB |
BIN
wp-content/themes/ekko/core/assets/fonts/fontawesome-webfont.ttf
Normal file
BIN
wp-content/themes/ekko/core/assets/fonts/iconsmind.eot
Normal file
BIN
wp-content/themes/ekko/core/assets/fonts/iconsmind.ttf
Normal file
BIN
wp-content/themes/ekko/core/assets/fonts/iconsmind.woff
Normal file
BIN
wp-content/themes/ekko/core/assets/fonts/star.eot
Normal file
19
wp-content/themes/ekko/core/assets/fonts/star.svg
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>
|
||||
This is a custom SVG font generated by IcoMoon.
|
||||
<iconset grid="16"></iconset>
|
||||
</metadata>
|
||||
<defs>
|
||||
<font id="icomoon" horiz-adv-x="512" >
|
||||
<font-face units-per-em="512" ascent="480" descent="-32" />
|
||||
<missing-glyph horiz-adv-x="512" />
|
||||
<glyph unicode="S" d="M 269.474,480.00L 352.509,311.757L 538.171,284.777L 403.822,153.824L 435.54-31.095L 269.474,56.21L 103.408-31.095L 135.119,153.824L 0.771,284.777L 186.438,311.757 z" horiz-adv-x="538.9473684210526" />
|
||||
<glyph unicode="s" d="M 269.474,406.94l 54.04-109.487l 7.524-15.247l 16.821-2.447l 120.827-17.559L 381.251,176.982l-12.18-11.868l 2.873-16.756l 20.647-120.336
|
||||
L 284.521,84.833L 269.474,92.745l-15.047-7.912L 146.351,28.017l 20.642,120.336l 2.873,16.756l-12.175,11.868L 70.263,262.201l 120.827,17.559
|
||||
l 16.826,2.447l 7.524,15.247L 269.474,406.94 M 269.474,480.00L 186.438,311.757l-185.667-26.98l 134.349-130.953l-31.717-184.918L 269.474,56.21l 166.066-87.304
|
||||
l-31.722,184.918l 134.354,130.953l-185.662,26.98L 269.474,480.00L 269.474,480.00z" horiz-adv-x="538.9473684210526" />
|
||||
<glyph unicode=" " horiz-adv-x="256" />
|
||||
<glyph class="hidden" unicode="" d="M0,480L 512 -32L0 -32 z" horiz-adv-x="0" />
|
||||
</font></defs></svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
BIN
wp-content/themes/ekko/core/assets/fonts/star.ttf
Normal file
BIN
wp-content/themes/ekko/core/assets/fonts/star.woff
Normal file
33
wp-content/themes/ekko/core/assets/images/contact-loader.svg
Normal file
@@ -0,0 +1,33 @@
|
||||
<!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL -->
|
||||
<svg width="120" height="30" viewBox="0 0 120 30" xmlns="http://www.w3.org/2000/svg" fill="#fff">
|
||||
<circle cx="15" cy="15" r="15">
|
||||
<animate attributeName="r" from="15" to="15"
|
||||
begin="0s" dur="0.8s"
|
||||
values="15;9;15" calcMode="linear"
|
||||
repeatCount="indefinite" />
|
||||
<animate attributeName="fill-opacity" from="1" to="1"
|
||||
begin="0s" dur="0.8s"
|
||||
values="1;.5;1" calcMode="linear"
|
||||
repeatCount="indefinite" />
|
||||
</circle>
|
||||
<circle cx="60" cy="15" r="9" fill-opacity="0.3">
|
||||
<animate attributeName="r" from="9" to="9"
|
||||
begin="0s" dur="0.8s"
|
||||
values="9;15;9" calcMode="linear"
|
||||
repeatCount="indefinite" />
|
||||
<animate attributeName="fill-opacity" from="0.5" to="0.5"
|
||||
begin="0s" dur="0.8s"
|
||||
values=".5;1;.5" calcMode="linear"
|
||||
repeatCount="indefinite" />
|
||||
</circle>
|
||||
<circle cx="105" cy="15" r="15">
|
||||
<animate attributeName="r" from="15" to="15"
|
||||
begin="0s" dur="0.8s"
|
||||
values="15;9;15" calcMode="linear"
|
||||
repeatCount="indefinite" />
|
||||
<animate attributeName="fill-opacity" from="1" to="1"
|
||||
begin="0s" dur="0.8s"
|
||||
values="1;.5;1" calcMode="linear"
|
||||
repeatCount="indefinite" />
|
||||
</circle>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
BIN
wp-content/themes/ekko/core/assets/images/favicon.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 91.3 91.1" enable-background="new 0 0 91.3 91.1" xml:space="preserve">
|
||||
<circle cx="45.7" cy="45.7" r="45.7"/>
|
||||
<circle fill="#FFFFFF" cx="45.7" cy="24.4" r="12.5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 545 B |
BIN
wp-content/themes/ekko/core/assets/images/icons/select-arrow.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 547 B |
@@ -0,0 +1 @@
|
||||
<svg width="264" height="88" viewBox="0 0 264 88" xmlns="http://www.w3.org/2000/svg"><title>default-skin 2</title><g fill="none" fill-rule="evenodd"><g><path d="M67.002 59.5v3.768c-6.307.84-9.184 5.75-10.002 9.732 2.22-2.83 5.564-5.098 10.002-5.098V71.5L73 65.585 67.002 59.5z" id="Shape" fill="#fff"/><g fill="#fff"><path d="M13 29v-5h2v3h3v2h-5zM13 15h5v2h-3v3h-2v-5zM31 15v5h-2v-3h-3v-2h5zM31 29h-5v-2h3v-3h2v5z" id="Shape"/></g><g fill="#fff"><path d="M62 24v5h-2v-3h-3v-2h5zM62 20h-5v-2h3v-3h2v5zM70 20v-5h2v3h3v2h-5zM70 24h5v2h-3v3h-2v-5z"/></g><path d="M20.586 66l-5.656-5.656 1.414-1.414L22 64.586l5.656-5.656 1.414 1.414L23.414 66l5.656 5.656-1.414 1.414L22 67.414l-5.656 5.656-1.414-1.414L20.586 66z" fill="#fff"/><path d="M111.785 65.03L110 63.5l3-3.5h-10v-2h10l-3-3.5 1.785-1.468L117 59l-5.215 6.03z" fill="#fff"/><path d="M152.215 65.03L154 63.5l-3-3.5h10v-2h-10l3-3.5-1.785-1.468L147 59l5.215 6.03z" fill="#fff"/><g><path id="Rectangle-11" fill="#fff" d="M160.957 28.543l-3.25-3.25-1.413 1.414 3.25 3.25z"/><path d="M152.5 27c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5-5.5 2.462-5.5 5.5 2.462 5.5 5.5 5.5z" id="Oval-1" stroke="#fff" stroke-width="1.5"/><path fill="#fff" d="M150 21h5v1h-5z"/></g><g><path d="M116.957 28.543l-1.414 1.414-3.25-3.25 1.414-1.414 3.25 3.25z" fill="#fff"/><path d="M108.5 27c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5-5.5 2.462-5.5 5.5 2.462 5.5 5.5 5.5z" stroke="#fff" stroke-width="1.5"/><path fill="#fff" d="M106 21h5v1h-5z"/><path fill="#fff" d="M109.043 19.008l-.085 5-1-.017.085-5z"/></g></g></g></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 866 B |
788
wp-content/themes/ekko/core/assets/js/SmoothScroll.js
Normal file
@@ -0,0 +1,788 @@
|
||||
//
|
||||
// SmoothScroll for websites v1.4.9 (Balazs Galambosi)
|
||||
// http://www.smoothscroll.net/
|
||||
//
|
||||
// Licensed under the terms of the MIT license.
|
||||
//
|
||||
// You may use it in your theme if you credit me.
|
||||
// It is also free to use on any individual website.
|
||||
//
|
||||
// Exception:
|
||||
// The only restriction is to not publish any
|
||||
// extension for browsers or native application
|
||||
// without getting a written permission first.
|
||||
//
|
||||
|
||||
(function () {
|
||||
|
||||
// Scroll Variables (tweakable)
|
||||
var defaultOptions = {
|
||||
|
||||
// Scrolling Core
|
||||
frameRate : 150, // [Hz]
|
||||
animationTime : 400, // [ms]
|
||||
stepSize : 100, // [px]
|
||||
|
||||
// Pulse (less tweakable)
|
||||
// ratio of "tail" to "acceleration"
|
||||
pulseAlgorithm : true,
|
||||
pulseScale : 4,
|
||||
pulseNormalize : 1,
|
||||
|
||||
// Acceleration
|
||||
accelerationDelta : 50, // 50
|
||||
accelerationMax : 3, // 3
|
||||
|
||||
// Keyboard Settings
|
||||
keyboardSupport : true, // option
|
||||
arrowScroll : 50, // [px]
|
||||
|
||||
// Other
|
||||
fixedBackground : true,
|
||||
excluded : ''
|
||||
};
|
||||
|
||||
var options = defaultOptions;
|
||||
|
||||
|
||||
// Other Variables
|
||||
var isExcluded = false;
|
||||
var isFrame = false;
|
||||
var direction = { x: 0, y: 0 };
|
||||
var initDone = false;
|
||||
var root = document.documentElement;
|
||||
var activeElement;
|
||||
var observer;
|
||||
var refreshSize;
|
||||
var deltaBuffer = [];
|
||||
var deltaBufferTimer;
|
||||
var isMac = /^Mac/.test(navigator.platform);
|
||||
|
||||
var key = { left: 37, up: 38, right: 39, down: 40, spacebar: 32,
|
||||
pageup: 33, pagedown: 34, end: 35, home: 36 };
|
||||
var arrowKeys = { 37: 1, 38: 1, 39: 1, 40: 1 };
|
||||
|
||||
/***********************************************
|
||||
* INITIALIZE
|
||||
***********************************************/
|
||||
|
||||
/**
|
||||
* Tests if smooth scrolling is allowed. Shuts down everything if not.
|
||||
*/
|
||||
function initTest() {
|
||||
if (options.keyboardSupport) {
|
||||
addEvent('keydown', keydown);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up scrolls array, determines if frames are involved.
|
||||
*/
|
||||
function init() {
|
||||
|
||||
if (initDone || !document.body) return;
|
||||
|
||||
initDone = true;
|
||||
|
||||
var body = document.body;
|
||||
var html = document.documentElement;
|
||||
var windowHeight = window.innerHeight;
|
||||
var scrollHeight = body.scrollHeight;
|
||||
|
||||
// check compat mode for root element
|
||||
root = (document.compatMode.indexOf('CSS') >= 0) ? html : body;
|
||||
activeElement = body;
|
||||
|
||||
initTest();
|
||||
|
||||
// Checks if this script is running in a frame
|
||||
if (top != self) {
|
||||
isFrame = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Safari 10 fixed it, Chrome fixed it in v45:
|
||||
* This fixes a bug where the areas left and right to
|
||||
* the content does not trigger the onmousewheel event
|
||||
* on some pages. e.g.: html, body { height: 100% }
|
||||
*/
|
||||
else if (isOldSafari &&
|
||||
scrollHeight > windowHeight &&
|
||||
(body.offsetHeight <= windowHeight ||
|
||||
html.offsetHeight <= windowHeight)) {
|
||||
|
||||
var fullPageElem = document.createElement('div');
|
||||
fullPageElem.style.cssText = 'position:absolute; z-index:-10000; ' +
|
||||
'top:0; left:0; right:0; height:' +
|
||||
root.scrollHeight + 'px';
|
||||
document.body.appendChild(fullPageElem);
|
||||
|
||||
// DOM changed (throttled) to fix height
|
||||
var pendingRefresh;
|
||||
refreshSize = function () {
|
||||
if (pendingRefresh) return; // could also be: clearTimeout(pendingRefresh);
|
||||
pendingRefresh = setTimeout(function () {
|
||||
if (isExcluded) return; // could be running after cleanup
|
||||
fullPageElem.style.height = '0';
|
||||
fullPageElem.style.height = root.scrollHeight + 'px';
|
||||
pendingRefresh = null;
|
||||
}, 500); // act rarely to stay fast
|
||||
};
|
||||
|
||||
setTimeout(refreshSize, 10);
|
||||
|
||||
addEvent('resize', refreshSize);
|
||||
|
||||
// TODO: attributeFilter?
|
||||
var config = {
|
||||
attributes: true,
|
||||
childList: true,
|
||||
characterData: false
|
||||
// subtree: true
|
||||
};
|
||||
|
||||
observer = new MutationObserver(refreshSize);
|
||||
observer.observe(body, config);
|
||||
|
||||
if (root.offsetHeight <= windowHeight) {
|
||||
var clearfix = document.createElement('div');
|
||||
clearfix.style.clear = 'both';
|
||||
body.appendChild(clearfix);
|
||||
}
|
||||
}
|
||||
|
||||
// disable fixed background
|
||||
if (!options.fixedBackground && !isExcluded) {
|
||||
body.style.backgroundAttachment = 'scroll';
|
||||
html.style.backgroundAttachment = 'scroll';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes event listeners and other traces left on the page.
|
||||
*/
|
||||
function cleanup() {
|
||||
observer && observer.disconnect();
|
||||
removeEvent(wheelEvent, wheel);
|
||||
removeEvent('mousedown', mousedown);
|
||||
removeEvent('keydown', keydown);
|
||||
removeEvent('resize', refreshSize);
|
||||
removeEvent('load', init);
|
||||
}
|
||||
|
||||
|
||||
/************************************************
|
||||
* SCROLLING
|
||||
************************************************/
|
||||
|
||||
var que = [];
|
||||
var pending = false;
|
||||
var lastScroll = Date.now();
|
||||
|
||||
/**
|
||||
* Pushes scroll actions to the scrolling queue.
|
||||
*/
|
||||
function scrollArray(elem, left, top) {
|
||||
|
||||
directionCheck(left, top);
|
||||
|
||||
if (options.accelerationMax != 1) {
|
||||
var now = Date.now();
|
||||
var elapsed = now - lastScroll;
|
||||
if (elapsed < options.accelerationDelta) {
|
||||
var factor = (1 + (50 / elapsed)) / 2;
|
||||
if (factor > 1) {
|
||||
factor = Math.min(factor, options.accelerationMax);
|
||||
left *= factor;
|
||||
top *= factor;
|
||||
}
|
||||
}
|
||||
lastScroll = Date.now();
|
||||
}
|
||||
|
||||
// push a scroll command
|
||||
que.push({
|
||||
x: left,
|
||||
y: top,
|
||||
lastX: (left < 0) ? 0.99 : -0.99,
|
||||
lastY: (top < 0) ? 0.99 : -0.99,
|
||||
start: Date.now()
|
||||
});
|
||||
|
||||
// don't act if there's a pending queue
|
||||
if (pending) {
|
||||
return;
|
||||
}
|
||||
|
||||
var scrollRoot = getScrollRoot();
|
||||
var isWindowScroll = (elem === scrollRoot || elem === document.body);
|
||||
|
||||
// if we haven't already fixed the behavior,
|
||||
// and it needs fixing for this sesh
|
||||
if (elem.$scrollBehavior == null && isScrollBehaviorSmooth(elem)) {
|
||||
elem.$scrollBehavior = elem.style.scrollBehavior;
|
||||
elem.style.scrollBehavior = 'auto';
|
||||
}
|
||||
|
||||
var step = function (time) {
|
||||
|
||||
var now = Date.now();
|
||||
var scrollX = 0;
|
||||
var scrollY = 0;
|
||||
|
||||
for (var i = 0; i < que.length; i++) {
|
||||
|
||||
var item = que[i];
|
||||
var elapsed = now - item.start;
|
||||
var finished = (elapsed >= options.animationTime);
|
||||
|
||||
// scroll position: [0, 1]
|
||||
var position = (finished) ? 1 : elapsed / options.animationTime;
|
||||
|
||||
// easing [optional]
|
||||
if (options.pulseAlgorithm) {
|
||||
position = pulse(position);
|
||||
}
|
||||
|
||||
// only need the difference
|
||||
var x = (item.x * position - item.lastX) >> 0;
|
||||
var y = (item.y * position - item.lastY) >> 0;
|
||||
|
||||
// add this to the total scrolling
|
||||
scrollX += x;
|
||||
scrollY += y;
|
||||
|
||||
// update last values
|
||||
item.lastX += x;
|
||||
item.lastY += y;
|
||||
|
||||
// delete and step back if it's over
|
||||
if (finished) {
|
||||
que.splice(i, 1); i--;
|
||||
}
|
||||
}
|
||||
|
||||
// scroll left and top
|
||||
if (isWindowScroll) {
|
||||
window.scrollBy(scrollX, scrollY);
|
||||
}
|
||||
else {
|
||||
if (scrollX) elem.scrollLeft += scrollX;
|
||||
if (scrollY) elem.scrollTop += scrollY;
|
||||
}
|
||||
|
||||
// clean up if there's nothing left to do
|
||||
if (!left && !top) {
|
||||
que = [];
|
||||
}
|
||||
|
||||
if (que.length) {
|
||||
requestFrame(step, elem, (1000 / options.frameRate + 1));
|
||||
} else {
|
||||
pending = false;
|
||||
// restore default behavior at the end of scrolling sesh
|
||||
if (elem.$scrollBehavior != null) {
|
||||
elem.style.scrollBehavior = elem.$scrollBehavior;
|
||||
elem.$scrollBehavior = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// start a new queue of actions
|
||||
requestFrame(step, elem, 0);
|
||||
pending = true;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************
|
||||
* EVENTS
|
||||
***********************************************/
|
||||
|
||||
/**
|
||||
* Mouse wheel handler.
|
||||
* @param {Object} event
|
||||
*/
|
||||
function wheel(event) {
|
||||
|
||||
if (!initDone) {
|
||||
init();
|
||||
}
|
||||
|
||||
var target = event.target;
|
||||
|
||||
// leave early if default action is prevented
|
||||
// or it's a zooming event with CTRL
|
||||
if (event.defaultPrevented || event.ctrlKey) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// leave embedded content alone (flash & pdf)
|
||||
if (isNodeName(activeElement, 'embed') ||
|
||||
(isNodeName(target, 'embed') && /\.pdf/i.test(target.src)) ||
|
||||
isNodeName(activeElement, 'object') ||
|
||||
target.shadowRoot) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var deltaX = -event.wheelDeltaX || event.deltaX || 0;
|
||||
var deltaY = -event.wheelDeltaY || event.deltaY || 0;
|
||||
|
||||
if (isMac) {
|
||||
if (event.wheelDeltaX && isDivisible(event.wheelDeltaX, 120)) {
|
||||
deltaX = -120 * (event.wheelDeltaX / Math.abs(event.wheelDeltaX));
|
||||
}
|
||||
if (event.wheelDeltaY && isDivisible(event.wheelDeltaY, 120)) {
|
||||
deltaY = -120 * (event.wheelDeltaY / Math.abs(event.wheelDeltaY));
|
||||
}
|
||||
}
|
||||
|
||||
// use wheelDelta if deltaX/Y is not available
|
||||
if (!deltaX && !deltaY) {
|
||||
deltaY = -event.wheelDelta || 0;
|
||||
}
|
||||
|
||||
// line based scrolling (Firefox mostly)
|
||||
if (event.deltaMode === 1) {
|
||||
deltaX *= 40;
|
||||
deltaY *= 40;
|
||||
}
|
||||
|
||||
var overflowing = overflowingAncestor(target);
|
||||
|
||||
// nothing to do if there's no element that's scrollable
|
||||
if (!overflowing) {
|
||||
// except Chrome iframes seem to eat wheel events, which we need to
|
||||
// propagate up, if the iframe has nothing overflowing to scroll
|
||||
if (isFrame && isChrome) {
|
||||
// change target to iframe element itself for the parent frame
|
||||
Object.defineProperty(event, "target", {value: window.frameElement});
|
||||
return parent.wheel(event);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// check if it's a touchpad scroll that should be ignored
|
||||
if (isTouchpad(deltaY)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// scale by step size
|
||||
// delta is 120 most of the time
|
||||
// synaptics seems to send 1 sometimes
|
||||
if (Math.abs(deltaX) > 1.2) {
|
||||
deltaX *= options.stepSize / 120;
|
||||
}
|
||||
if (Math.abs(deltaY) > 1.2) {
|
||||
deltaY *= options.stepSize / 120;
|
||||
}
|
||||
|
||||
scrollArray(overflowing, deltaX, deltaY);
|
||||
event.preventDefault();
|
||||
scheduleClearCache();
|
||||
}
|
||||
|
||||
/**
|
||||
* Keydown event handler.
|
||||
* @param {Object} event
|
||||
*/
|
||||
function keydown(event) {
|
||||
|
||||
var target = event.target;
|
||||
var modifier = event.ctrlKey || event.altKey || event.metaKey ||
|
||||
(event.shiftKey && event.keyCode !== key.spacebar);
|
||||
|
||||
// our own tracked active element could've been removed from the DOM
|
||||
if (!document.body.contains(activeElement)) {
|
||||
activeElement = document.activeElement;
|
||||
}
|
||||
|
||||
// do nothing if user is editing text
|
||||
// or using a modifier key (except shift)
|
||||
// or in a dropdown
|
||||
// or inside interactive elements
|
||||
var inputNodeNames = /^(textarea|select|embed|object)$/i;
|
||||
var buttonTypes = /^(button|submit|radio|checkbox|file|color|image)$/i;
|
||||
if ( event.defaultPrevented ||
|
||||
inputNodeNames.test(target.nodeName) ||
|
||||
isNodeName(target, 'input') && !buttonTypes.test(target.type) ||
|
||||
isNodeName(activeElement, 'video') ||
|
||||
isInsideYoutubeVideo(event) ||
|
||||
target.isContentEditable ||
|
||||
modifier ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// [spacebar] should trigger button press, leave it alone
|
||||
if ((isNodeName(target, 'button') ||
|
||||
isNodeName(target, 'input') && buttonTypes.test(target.type)) &&
|
||||
event.keyCode === key.spacebar) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// [arrwow keys] on radio buttons should be left alone
|
||||
if (isNodeName(target, 'input') && target.type == 'radio' &&
|
||||
arrowKeys[event.keyCode]) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var shift, x = 0, y = 0;
|
||||
var overflowing = overflowingAncestor(activeElement);
|
||||
|
||||
if (!overflowing) {
|
||||
// Chrome iframes seem to eat key events, which we need to
|
||||
// propagate up, if the iframe has nothing overflowing to scroll
|
||||
return (isFrame && isChrome) ? parent.keydown(event) : true;
|
||||
}
|
||||
|
||||
var clientHeight = overflowing.clientHeight;
|
||||
|
||||
if (overflowing == document.body) {
|
||||
clientHeight = window.innerHeight;
|
||||
}
|
||||
|
||||
switch (event.keyCode) {
|
||||
case key.up:
|
||||
y = -options.arrowScroll;
|
||||
break;
|
||||
case key.down:
|
||||
y = options.arrowScroll;
|
||||
break;
|
||||
case key.spacebar: // (+ shift)
|
||||
shift = event.shiftKey ? 1 : -1;
|
||||
y = -shift * clientHeight * 0.9;
|
||||
break;
|
||||
case key.pageup:
|
||||
y = -clientHeight * 0.9;
|
||||
break;
|
||||
case key.pagedown:
|
||||
y = clientHeight * 0.9;
|
||||
break;
|
||||
case key.home:
|
||||
if (overflowing == document.body && document.scrollingElement)
|
||||
overflowing = document.scrollingElement;
|
||||
y = -overflowing.scrollTop;
|
||||
break;
|
||||
case key.end:
|
||||
var scroll = overflowing.scrollHeight - overflowing.scrollTop;
|
||||
var scrollRemaining = scroll - clientHeight;
|
||||
y = (scrollRemaining > 0) ? scrollRemaining + 10 : 0;
|
||||
break;
|
||||
case key.left:
|
||||
x = -options.arrowScroll;
|
||||
break;
|
||||
case key.right:
|
||||
x = options.arrowScroll;
|
||||
break;
|
||||
default:
|
||||
return true; // a key we don't care about
|
||||
}
|
||||
|
||||
scrollArray(overflowing, x, y);
|
||||
event.preventDefault();
|
||||
scheduleClearCache();
|
||||
}
|
||||
|
||||
/**
|
||||
* Mousedown event only for updating activeElement
|
||||
*/
|
||||
function mousedown(event) {
|
||||
activeElement = event.target;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************
|
||||
* OVERFLOW
|
||||
***********************************************/
|
||||
|
||||
var uniqueID = (function () {
|
||||
var i = 0;
|
||||
return function (el) {
|
||||
return el.uniqueID || (el.uniqueID = i++);
|
||||
};
|
||||
})();
|
||||
|
||||
var cacheX = {}; // cleared out after a scrolling session
|
||||
var cacheY = {}; // cleared out after a scrolling session
|
||||
var clearCacheTimer;
|
||||
var smoothBehaviorForElement = {};
|
||||
|
||||
//setInterval(function () { cache = {}; }, 10 * 1000);
|
||||
|
||||
function scheduleClearCache() {
|
||||
clearTimeout(clearCacheTimer);
|
||||
clearCacheTimer = setInterval(function () {
|
||||
cacheX = cacheY = smoothBehaviorForElement = {};
|
||||
}, 1*1000);
|
||||
}
|
||||
|
||||
function setCache(elems, overflowing, x) {
|
||||
var cache = x ? cacheX : cacheY;
|
||||
for (var i = elems.length; i--;)
|
||||
cache[uniqueID(elems[i])] = overflowing;
|
||||
return overflowing;
|
||||
}
|
||||
|
||||
function getCache(el, x) {
|
||||
return (x ? cacheX : cacheY)[uniqueID(el)];
|
||||
}
|
||||
|
||||
// (body) (root)
|
||||
// | hidden | visible | scroll | auto |
|
||||
// hidden | no | no | YES | YES |
|
||||
// visible | no | YES | YES | YES |
|
||||
// scroll | no | YES | YES | YES |
|
||||
// auto | no | YES | YES | YES |
|
||||
|
||||
function overflowingAncestor(el) {
|
||||
var elems = [];
|
||||
var body = document.body;
|
||||
var rootScrollHeight = root.scrollHeight;
|
||||
do {
|
||||
var cached = getCache(el, false);
|
||||
if (cached) {
|
||||
return setCache(elems, cached);
|
||||
}
|
||||
elems.push(el);
|
||||
if (rootScrollHeight === el.scrollHeight) {
|
||||
var topOverflowsNotHidden = overflowNotHidden(root) && overflowNotHidden(body);
|
||||
var isOverflowCSS = topOverflowsNotHidden || overflowAutoOrScroll(root);
|
||||
if (isFrame && isContentOverflowing(root) ||
|
||||
!isFrame && isOverflowCSS) {
|
||||
return setCache(elems, getScrollRoot());
|
||||
}
|
||||
} else if (isContentOverflowing(el) && overflowAutoOrScroll(el)) {
|
||||
return setCache(elems, el);
|
||||
}
|
||||
} while ((el = el.parentElement));
|
||||
}
|
||||
|
||||
function isContentOverflowing(el) {
|
||||
return (el.clientHeight + 10 < el.scrollHeight);
|
||||
}
|
||||
|
||||
// typically for <body> and <html>
|
||||
function overflowNotHidden(el) {
|
||||
var overflow = getComputedStyle(el, '').getPropertyValue('overflow-y');
|
||||
return (overflow !== 'hidden');
|
||||
}
|
||||
|
||||
// for all other elements
|
||||
function overflowAutoOrScroll(el) {
|
||||
var overflow = getComputedStyle(el, '').getPropertyValue('overflow-y');
|
||||
return (overflow === 'scroll' || overflow === 'auto');
|
||||
}
|
||||
|
||||
// for all other elements
|
||||
function isScrollBehaviorSmooth(el) {
|
||||
var id = uniqueID(el);
|
||||
if (smoothBehaviorForElement[id] == null) {
|
||||
var scrollBehavior = getComputedStyle(el, '')['scroll-behavior'];
|
||||
smoothBehaviorForElement[id] = ('smooth' == scrollBehavior);
|
||||
}
|
||||
return smoothBehaviorForElement[id];
|
||||
}
|
||||
|
||||
|
||||
/***********************************************
|
||||
* HELPERS
|
||||
***********************************************/
|
||||
|
||||
function addEvent(type, fn, arg) {
|
||||
window.addEventListener(type, fn, arg || false);
|
||||
}
|
||||
|
||||
function removeEvent(type, fn, arg) {
|
||||
window.removeEventListener(type, fn, arg || false);
|
||||
}
|
||||
|
||||
function isNodeName(el, tag) {
|
||||
return el && (el.nodeName||'').toLowerCase() === tag.toLowerCase();
|
||||
}
|
||||
|
||||
function directionCheck(x, y) {
|
||||
x = (x > 0) ? 1 : -1;
|
||||
y = (y > 0) ? 1 : -1;
|
||||
if (direction.x !== x || direction.y !== y) {
|
||||
direction.x = x;
|
||||
direction.y = y;
|
||||
que = [];
|
||||
lastScroll = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (window.localStorage && localStorage.SS_deltaBuffer) {
|
||||
try { // #46 Safari throws in private browsing for localStorage
|
||||
deltaBuffer = localStorage.SS_deltaBuffer.split(',');
|
||||
} catch (e) { }
|
||||
}
|
||||
|
||||
function isTouchpad(deltaY) {
|
||||
if (!deltaY) return;
|
||||
if (!deltaBuffer.length) {
|
||||
deltaBuffer = [deltaY, deltaY, deltaY];
|
||||
}
|
||||
deltaY = Math.abs(deltaY);
|
||||
deltaBuffer.push(deltaY);
|
||||
deltaBuffer.shift();
|
||||
clearTimeout(deltaBufferTimer);
|
||||
deltaBufferTimer = setTimeout(function () {
|
||||
try { // #46 Safari throws in private browsing for localStorage
|
||||
localStorage.SS_deltaBuffer = deltaBuffer.join(',');
|
||||
} catch (e) { }
|
||||
}, 1000);
|
||||
var dpiScaledWheelDelta = deltaY > 120 && allDeltasDivisableBy(deltaY); // win64
|
||||
return !allDeltasDivisableBy(120) && !allDeltasDivisableBy(100) && !dpiScaledWheelDelta;
|
||||
}
|
||||
|
||||
function isDivisible(n, divisor) {
|
||||
return (Math.floor(n / divisor) == n / divisor);
|
||||
}
|
||||
|
||||
function allDeltasDivisableBy(divisor) {
|
||||
return (isDivisible(deltaBuffer[0], divisor) &&
|
||||
isDivisible(deltaBuffer[1], divisor) &&
|
||||
isDivisible(deltaBuffer[2], divisor));
|
||||
}
|
||||
|
||||
function isInsideYoutubeVideo(event) {
|
||||
var elem = event.target;
|
||||
var isControl = false;
|
||||
if (document.URL.indexOf ('www.youtube.com/watch') != -1) {
|
||||
do {
|
||||
isControl = (elem.classList &&
|
||||
elem.classList.contains('html5-video-controls'));
|
||||
if (isControl) break;
|
||||
} while ((elem = elem.parentNode));
|
||||
}
|
||||
return isControl;
|
||||
}
|
||||
|
||||
var requestFrame = (function () {
|
||||
return (window.requestAnimationFrame ||
|
||||
window.webkitRequestAnimationFrame ||
|
||||
window.mozRequestAnimationFrame ||
|
||||
function (callback, element, delay) {
|
||||
window.setTimeout(callback, delay || (1000/60));
|
||||
});
|
||||
})();
|
||||
|
||||
var MutationObserver = (window.MutationObserver ||
|
||||
window.WebKitMutationObserver ||
|
||||
window.MozMutationObserver);
|
||||
|
||||
var getScrollRoot = (function() {
|
||||
var SCROLL_ROOT = document.scrollingElement;
|
||||
return function() {
|
||||
if (!SCROLL_ROOT) {
|
||||
var dummy = document.createElement('div');
|
||||
dummy.style.cssText = 'height:10000px;width:1px;';
|
||||
document.body.appendChild(dummy);
|
||||
var bodyScrollTop = document.body.scrollTop;
|
||||
var docElScrollTop = document.documentElement.scrollTop;
|
||||
window.scrollBy(0, 3);
|
||||
if (document.body.scrollTop != bodyScrollTop)
|
||||
(SCROLL_ROOT = document.body);
|
||||
else
|
||||
(SCROLL_ROOT = document.documentElement);
|
||||
window.scrollBy(0, -3);
|
||||
document.body.removeChild(dummy);
|
||||
}
|
||||
return SCROLL_ROOT;
|
||||
};
|
||||
})();
|
||||
|
||||
|
||||
/***********************************************
|
||||
* PULSE (by Michael Herf)
|
||||
***********************************************/
|
||||
|
||||
/**
|
||||
* Viscous fluid with a pulse for part and decay for the rest.
|
||||
* - Applies a fixed force over an interval (a damped acceleration), and
|
||||
* - Lets the exponential bleed away the velocity over a longer interval
|
||||
* - Michael Herf, http://stereopsis.com/stopping/
|
||||
*/
|
||||
function pulse_(x) {
|
||||
var val, start, expx;
|
||||
// test
|
||||
x = x * options.pulseScale;
|
||||
if (x < 1) { // acceleartion
|
||||
val = x - (1 - Math.exp(-x));
|
||||
} else { // tail
|
||||
// the previous animation ended here:
|
||||
start = Math.exp(-1);
|
||||
// simple viscous drag
|
||||
x -= 1;
|
||||
expx = 1 - Math.exp(-x);
|
||||
val = start + (expx * (1 - start));
|
||||
}
|
||||
return val * options.pulseNormalize;
|
||||
}
|
||||
|
||||
function pulse(x) {
|
||||
if (x >= 1) return 1;
|
||||
if (x <= 0) return 0;
|
||||
|
||||
if (options.pulseNormalize == 1) {
|
||||
options.pulseNormalize /= pulse_(1);
|
||||
}
|
||||
return pulse_(x);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************
|
||||
* FIRST RUN
|
||||
***********************************************/
|
||||
|
||||
var userAgent = window.navigator.userAgent;
|
||||
var isEdge = /Edge/.test(userAgent); // thank you MS
|
||||
var isChrome = /chrome/i.test(userAgent) && !isEdge;
|
||||
var isSafari = /safari/i.test(userAgent) && !isEdge;
|
||||
var isMobile = /mobile/i.test(userAgent);
|
||||
var isIEWin7 = /Windows NT 6.1/i.test(userAgent) && /rv:11/i.test(userAgent);
|
||||
var isOldSafari = isSafari && (/Version\/8/i.test(userAgent) || /Version\/9/i.test(userAgent));
|
||||
var isEnabledForBrowser = (isChrome || isSafari || isIEWin7) && !isMobile;
|
||||
|
||||
var supportsPassive = false;
|
||||
try {
|
||||
window.addEventListener("test", null, Object.defineProperty({}, 'passive', {
|
||||
get: function () {
|
||||
supportsPassive = true;
|
||||
}
|
||||
}));
|
||||
} catch(e) {}
|
||||
|
||||
var wheelOpt = supportsPassive ? { passive: false } : false;
|
||||
var wheelEvent = 'onwheel' in document.createElement('div') ? 'wheel' : 'mousewheel';
|
||||
|
||||
if (wheelEvent && isEnabledForBrowser) {
|
||||
addEvent(wheelEvent, wheel, wheelOpt);
|
||||
addEvent('mousedown', mousedown);
|
||||
addEvent('load', init);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************
|
||||
* PUBLIC INTERFACE
|
||||
***********************************************/
|
||||
|
||||
function SmoothScroll(optionsToSet) {
|
||||
for (var key in optionsToSet)
|
||||
if (defaultOptions.hasOwnProperty(key))
|
||||
options[key] = optionsToSet[key];
|
||||
}
|
||||
SmoothScroll.destroy = cleanup;
|
||||
|
||||
if (window.SmoothScrollOptions) // async API
|
||||
SmoothScroll(window.SmoothScrollOptions);
|
||||
|
||||
if (typeof define === 'function' && define.amd)
|
||||
define(function() {
|
||||
return SmoothScroll;
|
||||
});
|
||||
else if ('object' == typeof exports)
|
||||
module.exports = SmoothScroll;
|
||||
else
|
||||
window.SmoothScroll = SmoothScroll;
|
||||
|
||||
})();
|
||||
9
wp-content/themes/ekko/core/assets/js/admin-scripts.js
Normal file
@@ -0,0 +1,9 @@
|
||||
jQuery(document).ready(function($) {
|
||||
"use strict";
|
||||
$( "a:contains('import-demo-full-custom')" ).parent().remove();
|
||||
$("#import-content").change(function() {
|
||||
var id = $(this).children(":selected").attr("id");
|
||||
$('#import-link-value').val(id);
|
||||
});
|
||||
$("#vc_settings-templatera #submit_btn").attr('value', 'Import ekko Templates');
|
||||
});
|
||||
7
wp-content/themes/ekko/core/assets/js/bootstrap.min.js
vendored
Normal file
4
wp-content/themes/ekko/core/assets/js/photoswipe-ui-default.min.js
vendored
Normal file
4
wp-content/themes/ekko/core/assets/js/photoswipe.min.js
vendored
Normal file
645
wp-content/themes/ekko/core/assets/js/scripts.js
Normal file
@@ -0,0 +1,645 @@
|
||||
// ------------------------------------------------------------------------
|
||||
// Check if element is in ViewPort
|
||||
// ------------------------------------------------------------------------
|
||||
(function($) {
|
||||
"use strict";
|
||||
$.belowthefold = function(element, settings) {
|
||||
var fold = $(window).height() + $(window).scrollTop();
|
||||
return fold <= $(element).offset().top - settings.threshold;
|
||||
};
|
||||
$.abovethetop = function(element, settings) {
|
||||
var top = $(window).scrollTop();
|
||||
return top >= $(element).offset().top + $(element).height() - settings.threshold;
|
||||
};
|
||||
$.rightofscreen = function(element, settings) {
|
||||
var fold = $(window).width() + $(window).scrollLeft();
|
||||
return fold <= $(element).offset().left - settings.threshold;
|
||||
};
|
||||
$.leftofscreen = function(element, settings) {
|
||||
var left = $(window).scrollLeft();
|
||||
return left >= $(element).offset().left + $(element).width() - settings.threshold;
|
||||
};
|
||||
$.inviewport = function(element, settings) {
|
||||
return !$.rightofscreen(element, settings) && !$.leftofscreen(element, settings) && !$.belowthefold(element, settings) && !$.abovethetop(element, settings);
|
||||
};
|
||||
$.extend($.expr[':'], {
|
||||
"below-the-fold": function(a, i, m) {
|
||||
return $.belowthefold(a, {
|
||||
threshold: 0
|
||||
});
|
||||
},
|
||||
"above-the-top": function(a, i, m) {
|
||||
return $.abovethetop(a, {
|
||||
threshold: 0
|
||||
});
|
||||
},
|
||||
"left-of-screen": function(a, i, m) {
|
||||
return $.leftofscreen(a, {
|
||||
threshold: 0
|
||||
});
|
||||
},
|
||||
"right-of-screen": function(a, i, m) {
|
||||
return $.rightofscreen(a, {
|
||||
threshold: 0
|
||||
});
|
||||
},
|
||||
"in-viewport": function(a, i, m) {
|
||||
return $.inviewport(a, {
|
||||
threshold: 0
|
||||
});
|
||||
}
|
||||
});
|
||||
// ------------------------------------------------------------------------
|
||||
// Preload Effect
|
||||
// ------------------------------------------------------------------------
|
||||
$(window).load(function() {
|
||||
"use strict";
|
||||
$('body').removeClass('fade-in');
|
||||
});
|
||||
window.addEventListener("beforeunload", function () {
|
||||
$("body a[href]").click(function(){
|
||||
var $anchor = $(this);
|
||||
|
||||
// Don't fade for links that open in new window
|
||||
if ( $anchor.attr('target') && $anchor.attr('target').indexOf('_blank') >=0 ) {
|
||||
return;
|
||||
}
|
||||
// Don't fade for email
|
||||
if ( $anchor.attr('href').indexOf('mailto:') >=0 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't fade for telephone links
|
||||
if ( $anchor.attr('href').indexOf('tel:') >=0 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't fade for links to anchor tags
|
||||
if ( $anchor.attr('href').indexOf('#') >=0 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Fade out
|
||||
document.body.classList.add("fade-out");
|
||||
});
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
"use strict";
|
||||
$(".wpb_wrapper:empty").parent().addClass('hide-on-mobile');
|
||||
|
||||
$('.parallax-overlay').each(function() {
|
||||
var size = $(this).attr('data-vc-kd-parallax');
|
||||
var height = $(this).closest('.kd_vc_parallax').innerHeight();
|
||||
$(this).css('height', size * height + 'px');
|
||||
});
|
||||
|
||||
if ($('.entry-header .breadcrumbs').length > 0) {
|
||||
var str = $(".entry-header .breadcrumbs").html();
|
||||
$(".entry-header .breadcrumbs").html(str.replace(/>/g, '<span class="fa fa-angle-right"></span>'));
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// 3rd level menu off screen
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
$(".navbar-nav .dropdown").on("mouseover", function () {
|
||||
var dropdown = $(this).find('.dropdown-menu');
|
||||
var off = dropdown.offset();
|
||||
var l = off.left;
|
||||
var w = dropdown.width();
|
||||
var docW = $(window).width();
|
||||
var isEntirelyVisible = (l + w < docW);
|
||||
if (!isEntirelyVisible) {
|
||||
console.log(l + w - docW);
|
||||
dropdown.addClass('align-menu-right');
|
||||
}
|
||||
});
|
||||
$(window).on('resize', function(){
|
||||
$(".dropdown-menu").removeClass('align-menu-right');
|
||||
});
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Mega menu effects
|
||||
// ------------------------------------------------------------------------
|
||||
if ($('.transparent-navigation').length > 0) {
|
||||
$( ".navbar-nav .mega-menu" ).hover(
|
||||
function () {
|
||||
$('body').removeClass( "transparent-navigation" );
|
||||
},
|
||||
function () {
|
||||
$('body').addClass( "transparent-navigation" );
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
$( ".navbar-nav .mega-menu" ).hover(
|
||||
function () {
|
||||
$('.navbar-nav').addClass( "no-transition" );
|
||||
},
|
||||
function () {
|
||||
$('.navbar-nav').removeClass( "no-transition" );
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
if ($('#single-page').length > 0) {
|
||||
$('body').addClass('single-post');
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Side panel
|
||||
// ------------------------------------------------------------------------
|
||||
var $html_wrapper = $('html'),
|
||||
scrollDisabled = false,
|
||||
scrollTop;
|
||||
|
||||
function scrollDisable() {
|
||||
if (scrollDisabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
scrollTop = $(window).scrollTop();
|
||||
|
||||
$html_wrapper.addClass('scrollLock')
|
||||
.css({
|
||||
top: -1 * scrollTop
|
||||
});
|
||||
|
||||
scrollDisabled = true;
|
||||
}
|
||||
|
||||
function scrollEnable() {
|
||||
if (!scrollDisabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
$html_wrapper.removeClass('scrollLock');
|
||||
$(window).scrollTop(scrollTop);
|
||||
|
||||
scrollDisabled = false;
|
||||
}
|
||||
|
||||
if ($(".panel-trigger-btn").length) {
|
||||
$(".panel-trigger-btn").click(function() {
|
||||
scrollDisable();
|
||||
$(".kd-side-panel, .panel-screen-overlay").addClass("active");
|
||||
$(".navbar.navbar-default.fixed-menu").addClass("panel-enabled");
|
||||
});
|
||||
$(".kd-side-panel .panel-close").click(function() {
|
||||
scrollEnable();
|
||||
$(".kd-side-panel, .panel-screen-overlay").removeClass("active");
|
||||
$(".navbar.navbar-default.fixed-menu").removeClass("panel-enabled");
|
||||
});
|
||||
|
||||
$('.panel-screen-overlay').on("click", function(){
|
||||
$(".kd-side-panel .panel-close").trigger("click");
|
||||
});
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Live Preview Customizer
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
$("#customizer .switcher, .demo-switcher ").click(function() {
|
||||
$("#customizer").toggleClass('active');
|
||||
});
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Topbar search
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
$(".topbar-search .toggle-search").click(function() {
|
||||
$(".topbar-search .topbar-search-container").toggleClass('active');
|
||||
$(this).toggleClass('fa-times');
|
||||
});
|
||||
|
||||
function draw() {
|
||||
requestAnimationFrame(draw);
|
||||
scrollEvent();
|
||||
}
|
||||
draw();
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Fixed Footer
|
||||
// ------------------------------------------------------------------------
|
||||
if ($("#footer.fixed").length) {
|
||||
var footerHeight = $("#footer.fixed").height();
|
||||
$("#wrapper").css("margin-bottom", footerHeight);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Custom Search Field
|
||||
// ------------------------------------------------------------------------
|
||||
$("#s").each(function(index, elem) {
|
||||
var eId = $(elem).attr("id");
|
||||
var label = null;
|
||||
if (eId && (label = $(elem).parents("form").find("label[for=" + eId + "]")).length == 1) {
|
||||
$(elem).attr("placeholder", 'Search');
|
||||
$(label).remove();
|
||||
}
|
||||
});
|
||||
$(".search-submit, .blog_widget #bbp_search_submit").val('');
|
||||
$(".woocommerce-product-search input[type='submit']").val('');
|
||||
// ------------------------------------------------------------------------
|
||||
// Contact Form Buttons
|
||||
// ------------------------------------------------------------------------
|
||||
$(document).on("click", ".section .wpcf7-not-valid-tip,.section .wpcf7-mail-sent-ok, .blog-header-form .wpcf7-not-valid-tip, .blog-header-form .wpcf7-mail-sent-ok, .subscribe-form header .wpcf7-response-output, .modal-content-inner .wpcf7-not-valid-tip, .kd-side-panel .wpcf7-not-valid-tip", function() {
|
||||
$(this).fadeOut();
|
||||
});
|
||||
// ------------------------------------------------------------------------
|
||||
// Reset reCaptcha for modal window
|
||||
// ------------------------------------------------------------------------
|
||||
if ($('.wpcf7-recaptcha').length > 0) {
|
||||
$(document).on("click", ".modal-menu-item", function() {
|
||||
grecaptcha.reset();
|
||||
});
|
||||
}
|
||||
// ------------------------------------------------------------------------
|
||||
// Blog video cover
|
||||
// ------------------------------------------------------------------------
|
||||
$('.background-video-image').each(function() {
|
||||
var imgSrc = $(this).children('img').attr('src');
|
||||
$(this).css('background', 'url("' + imgSrc + '")').css('background-position', 'initial');
|
||||
});
|
||||
|
||||
|
||||
$('.video-cover').each(function(){
|
||||
var videoCover = $(this);
|
||||
if(videoCover.find('iframe').length){
|
||||
videoCover.find('iframe').attr('data-src', videoCover.find('iframe').attr('src'));
|
||||
videoCover.find('iframe').attr('src','');
|
||||
}
|
||||
});
|
||||
|
||||
$('.video-cover .play-video').on("click", function(){
|
||||
var playIcon = $(this);
|
||||
var videoCover = playIcon.closest('.video-cover');
|
||||
if(videoCover.find('video').length){
|
||||
var video = videoCover.find('video').get(0);
|
||||
videoCover.addClass('show-video');
|
||||
video.play();
|
||||
return false;
|
||||
} else if(videoCover.find('iframe').length){
|
||||
var iframe = videoCover.find('iframe');
|
||||
var videoSrc = iframe.attr('data-src');
|
||||
var videoSrcAuto = videoSrc.replace('?feature=oembed', '?autoplay=1');
|
||||
iframe.attr('src', videoSrcAuto);
|
||||
videoCover.addClass('show-video');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Main Menu One Page Links
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
$( "<span class='mobile-dropdown'></span>" ).appendTo( $( ".navbar-nav .menu-item-has-children" ) );
|
||||
|
||||
$(".navbar-nav .menu-item-has-children .mobile-dropdown").click(function() {
|
||||
$(this).closest(".menu-item-has-children").toggleClass('mobile-visible');
|
||||
});
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Bbpress Breadcrumbs
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if ($('.bbp-breadcrumb').length > 0) {
|
||||
$( '.bbp-breadcrumb' ).appendTo( $(".bbpress-breadcrumbs"));
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Main Smooth Scroll and Scroll Spy
|
||||
// ------------------------------------------------------------------------
|
||||
$('.navbar-collapse ul li a, .navbar-collapse .modal-menu-item.scroll-section').click(function() {
|
||||
$('.navbar-toggle:visible').click();
|
||||
});
|
||||
$(function() {
|
||||
$('.navbar-nav .one-page-link a, .footer_widget .menu li a, .scroll-section a, .btn-smooth-scroll, .modal-menu-item.scroll-section, .demo-button').bind('click', function(event) {
|
||||
if ($("body").hasClass("home")) {
|
||||
var $anchor = $(this);
|
||||
$('html, body').stop().animate({
|
||||
scrollTop: $($anchor.attr('href')).offset().top - 90
|
||||
}, 1500, 'easeInOutExpo');
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
});
|
||||
$(function() {
|
||||
$('.portfolio-demo-button').bind('click', function(event) {
|
||||
var $anchor = $(this);
|
||||
$('html, body').stop().animate({
|
||||
scrollTop: $($anchor.attr('href')).offset().top - 250
|
||||
}, 1500, 'easeInOutExpo');
|
||||
event.preventDefault();
|
||||
});
|
||||
});
|
||||
$('body').scrollspy({
|
||||
offset: 100,
|
||||
target: '.navbar-fixed-top'
|
||||
});
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// WPGlobus compatibility - NavWalker conflict
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if ($('.wpglobus-selector-link').length > 0) {
|
||||
$('.wpglobus-selector-link .dropdown-menu').addClass('sub-menu');
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Back to top button
|
||||
// ------------------------------------------------------------------------
|
||||
$(window).bind("scroll", function() {
|
||||
if ($(window).scrollTop() > $(window).height()) {
|
||||
$('.back-to-top').addClass('active');
|
||||
}
|
||||
if ($(window).scrollTop() < $(window).height()) {
|
||||
$('.back-to-top').removeClass('active');
|
||||
}
|
||||
});
|
||||
$('.back-to-top').click(function(event) {
|
||||
event.preventDefault();
|
||||
$('html, body').animate({
|
||||
scrollTop: 0
|
||||
}, 500);
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Blog image carousel
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if (jQuery().owlCarousel) {
|
||||
jQuery('.post .entry-gallery .gallery').addClass('post-gallery-carousel');
|
||||
jQuery('.single-post .gallery').addClass('post-gallery-carousel');
|
||||
}
|
||||
|
||||
if ($(".post .entry-gallery .post-gallery-carousel").length || $(".single-post .post-gallery-carousel").length) {
|
||||
$(".post .entry-gallery .post-gallery-carousel, .single-post .post-gallery-carousel").owlCarousel({
|
||||
stageClass: "owl-wrapper",
|
||||
stageOuterClass: "owl-wrapper-outer",
|
||||
loadedClass: "owl-carousel",
|
||||
items: 1,
|
||||
dots: true,
|
||||
dotsSpeed: 500,
|
||||
dotsEach: true,
|
||||
});
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Portfolio & Blog related posts slider
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if ($(".related-content.owlslider-related-posts").length) {
|
||||
$(".related-content.owlslider-related-posts").owlCarousel({
|
||||
stageClass: "owl-wrapper",
|
||||
stageOuterClass: "owl-wrapper-outer",
|
||||
loadedClass: "owl-carousel",
|
||||
responsive:{
|
||||
0:{
|
||||
items: 1,
|
||||
nav: false,
|
||||
dots: true,
|
||||
},
|
||||
767:{
|
||||
items: 3,
|
||||
nav: false,
|
||||
dots: true,
|
||||
},
|
||||
960:{
|
||||
nav: true,
|
||||
navSpeed: 500,
|
||||
dots: false,
|
||||
}
|
||||
},
|
||||
nav: true,
|
||||
navSpeed: 500,
|
||||
dots: false,
|
||||
rewind: true,
|
||||
loop: true,
|
||||
});
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Portfolio photoSwipe init
|
||||
// ------------------------------------------------------------------------
|
||||
var PhotoSwipe = window.PhotoSwipe,
|
||||
PhotoSwipeUI_Default = window.PhotoSwipeUI_Default;
|
||||
|
||||
$('body').on('click', 'a[data-size]', function(e) {
|
||||
if (!PhotoSwipe || !PhotoSwipeUI_Default) {
|
||||
return;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
openPhotoSwipe(this);
|
||||
});
|
||||
|
||||
var parseThumbnailElements = function(gallery, el) {
|
||||
var elements = $(gallery).find('a[data-size]').has('img'),
|
||||
galleryItems = [],
|
||||
index;
|
||||
|
||||
elements.each(function(i) {
|
||||
var $el = $(this),
|
||||
size = $el.data('size').split('x'),
|
||||
caption;
|
||||
|
||||
if ($el.next().is('.wp-caption-text')) {
|
||||
// image with caption
|
||||
caption = $el.next().text();
|
||||
} else if ($el.parent().next().is('.wp-caption-text')) {
|
||||
// gallery icon with caption
|
||||
caption = $el.parent().next().text();
|
||||
} else {
|
||||
caption = $el.attr('title');
|
||||
}
|
||||
|
||||
galleryItems.push({
|
||||
src: $el.attr('href'),
|
||||
w: parseInt(size[0], 10),
|
||||
h: parseInt(size[1], 10),
|
||||
title: caption,
|
||||
msrc: $el.find('img').attr('src'),
|
||||
el: $el
|
||||
});
|
||||
if (el === $el.get(0)) {
|
||||
index = i;
|
||||
}
|
||||
});
|
||||
|
||||
return [galleryItems, parseInt(index, 10)];
|
||||
};
|
||||
|
||||
var openPhotoSwipe = function(element, disableAnimation) {
|
||||
var pswpElement = $('.pswp').get(0),
|
||||
galleryElement = $(element).parents('.gallery, .hentry, .main, body').first(),
|
||||
gallery,
|
||||
options,
|
||||
items, index;
|
||||
|
||||
items = parseThumbnailElements(galleryElement, element);
|
||||
index = items[1];
|
||||
items = items[0];
|
||||
|
||||
options = {
|
||||
index: index,
|
||||
getThumbBoundsFn: function(index) {
|
||||
var image = items[index].el.find('img'),
|
||||
offset = image.offset();
|
||||
|
||||
return {
|
||||
x: offset.left,
|
||||
y: offset.top,
|
||||
w: image.width()
|
||||
};
|
||||
},
|
||||
showHideOpacity: true,
|
||||
history: false
|
||||
};
|
||||
|
||||
if (disableAnimation) {
|
||||
options.showAnimationDuration = 0;
|
||||
}
|
||||
|
||||
// Pass data to PhotoSwipe and initialize it
|
||||
gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, options);
|
||||
gallery.init();
|
||||
};
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Classie Script
|
||||
// ------------------------------------------------------------------------
|
||||
(function(window) {
|
||||
|
||||
function classReg(className) {
|
||||
return new RegExp("(^|\\s+)" + className + "(\\s+|$)");
|
||||
}
|
||||
var hasClass, addClass, removeClass;
|
||||
if ('classList' in document.documentElement) {
|
||||
hasClass = function(elem, c) {
|
||||
return elem.classList.contains(c);
|
||||
};
|
||||
addClass = function(elem, c) {
|
||||
elem.classList.add(c);
|
||||
};
|
||||
removeClass = function(elem, c) {
|
||||
elem.classList.remove(c);
|
||||
};
|
||||
} else {
|
||||
hasClass = function(elem, c) {
|
||||
return classReg(c).test(elem.className);
|
||||
};
|
||||
addClass = function(elem, c) {
|
||||
if (!hasClass(elem, c)) {
|
||||
elem.className = elem.className + ' ' + c;
|
||||
}
|
||||
};
|
||||
removeClass = function(elem, c) {
|
||||
elem.className = elem.className.replace(classReg(c), ' ');
|
||||
};
|
||||
}
|
||||
|
||||
function toggleClass(elem, c) {
|
||||
var fn = hasClass(elem, c) ? removeClass : addClass;
|
||||
fn(elem, c);
|
||||
}
|
||||
var classie = {
|
||||
hasClass: hasClass,
|
||||
addClass: addClass,
|
||||
removeClass: removeClass,
|
||||
toggleClass: toggleClass,
|
||||
has: hasClass,
|
||||
add: addClass,
|
||||
remove: removeClass,
|
||||
toggle: toggleClass
|
||||
};
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(classie);
|
||||
} else {
|
||||
window.classie = classie;
|
||||
}
|
||||
|
||||
})(window);
|
||||
// ------------------------------------------------------------------------
|
||||
// Animated Header
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
var cbpAnimatedHeader = (function() {
|
||||
var docElem = document.documentElement,
|
||||
header = document.querySelector('.navbar-default'),
|
||||
didScroll = false,
|
||||
changeHeaderOn = 50;
|
||||
|
||||
function init() {
|
||||
window.addEventListener('scroll', function(event) {
|
||||
if (!didScroll) {
|
||||
didScroll = true;
|
||||
setTimeout(scrollPage, 100);
|
||||
}
|
||||
}, false);
|
||||
window.addEventListener('load', function(event) {
|
||||
if (!didScroll) {
|
||||
didScroll = true;
|
||||
setTimeout(scrollPage, 100);
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
|
||||
function scrollPage() {
|
||||
var sy = scrollY();
|
||||
if (sy >= changeHeaderOn) {
|
||||
classie.add(header, 'navbar-shrink');
|
||||
$(".topbar-search-container").removeClass('active');
|
||||
$(".topbar-search .toggle-search").removeClass('fa-times');
|
||||
} else {
|
||||
if (!$(".panel-screen-overlay.active").length) {
|
||||
classie.remove(header, 'navbar-shrink');
|
||||
}
|
||||
}
|
||||
didScroll = false;
|
||||
}
|
||||
|
||||
function scrollY() {
|
||||
return window.pageYOffset || docElem.scrollTop;
|
||||
}
|
||||
if (!$(header).hasClass("fixed-menu")) {
|
||||
init();
|
||||
}
|
||||
})();
|
||||
|
||||
|
||||
})(jQuery);
|
||||
|
||||
|
||||
|
||||
function scrollEvent() {
|
||||
|
||||
if (!is_touch_device()) {
|
||||
viewportTop = jQuery(window).scrollTop();
|
||||
|
||||
if (jQuery(window).width())
|
||||
|
||||
jQuery('.parallax-overlay').each(function() {
|
||||
elementOffset = jQuery(this).offset().top;
|
||||
var size = jQuery(this).attr('data-vc-kd-parallax');
|
||||
distance = (elementOffset - viewportTop) * ( 1 - size );
|
||||
jQuery(this).css('transform', 'translate3d(0, ' + distance + 'px,0)');
|
||||
});
|
||||
|
||||
jQuery('.kd-parallax-image .vc_figure img').each(function() {
|
||||
elementOffset = jQuery(this).offset().top;
|
||||
distance = (elementOffset - viewportTop) * -0.5;
|
||||
jQuery(this).css('transform', 'translateY(' + distance + 'px)');
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function is_touch_device() {
|
||||
return 'ontouchstart' in window || 'onmsgesturechange' in window;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
(function($){
|
||||
"use strict";
|
||||
|
||||
function get_cart(){
|
||||
if(window.wc_add_to_cart_params!=undefined){
|
||||
$.post({
|
||||
url: wc_add_to_cart_params.ajax_url,
|
||||
dataType: 'JSON',
|
||||
data: {action: 'woomenucart_ajax', nonce: keydesign_menucart_ajax.nonce},
|
||||
success: function(data, textStatus, XMLHttpRequest){
|
||||
$('.keydesign-cart-dropdown').html(data.cart);
|
||||
if(data.articles < 1) { $('.keydesign-cart-dropdown').html('<li><span class="empty-cart">Your cart is currently empty</span></li>'); }
|
||||
if(data!='') {
|
||||
if($('.keydesign-cart .badge, .mobile-shopping-cart .badge').length){
|
||||
if(data.articles>0){
|
||||
$('.keydesign-cart .badge, .mobile-shopping-cart .badge').html(data.articles);
|
||||
$('.keydesign-cart .badge, .mobile-shopping-cart .badge').show();
|
||||
} else {
|
||||
$('.keydesign-cart .badge, .mobile-shopping-cart .badge').hide();
|
||||
}
|
||||
} else $('.keydesign-cart .cart-icon-container').append('<span class="badge">'+data.articles+'</span>');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$('body').bind("added_to_cart",get_cart);
|
||||
$('body').bind("wc_fragments_refreshed",get_cart);
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
1610
wp-content/themes/ekko/core/dynamic-styles.css.php
Normal file
502
wp-content/themes/ekko/core/init.php
Normal file
@@ -0,0 +1,502 @@
|
||||
<?php
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Add Redux Framework & extras
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
|
||||
define( 'KEYDESIGN_THEME_PATH', get_template_directory() );
|
||||
define( 'KEYDESIGN_THEME_PLUGINS_DIR', KEYDESIGN_THEME_PATH . '/core/plugins' );
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Theme includes
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
// Wordpress Bootstrap Menu
|
||||
require_once( get_template_directory() . '/core/assets/extra/wp_bootstrap_navwalker.php');
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// WooCommerce
|
||||
// ------------------------------------------------------------------------
|
||||
if( class_exists( 'WooCommerce' )) {
|
||||
add_theme_support( 'woocommerce', array(
|
||||
'thumbnail_image_width' => 800,
|
||||
'gallery_thumbnail_image_width' => 800,
|
||||
'single_image_width' => 800,
|
||||
) );
|
||||
|
||||
require_once( get_template_directory() . '/core/theme-woocommerce.php' );
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Enqueue scripts and styles front and admin
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if( !function_exists('keydesign_enqueue_front') ) {
|
||||
function keydesign_enqueue_front() {
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
// Bootstrap CSS
|
||||
wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/core/assets/css/bootstrap.min.css', '', '' );
|
||||
// Theme main style CSS
|
||||
wp_enqueue_style( 'keydesign-style', get_stylesheet_uri(), array('bootstrap'), '' );
|
||||
// Font Awesome
|
||||
wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/core/assets/css/font-awesome.min.css', '', '' );
|
||||
// Iconsmind
|
||||
wp_enqueue_style( 'keydesign-iconsmind', get_template_directory_uri() . '/core/assets/css/iconsmind.min.css', '', '' );
|
||||
|
||||
wp_enqueue_style( 'keydesign-default-fonts', keydesign_default_fonts_url(), array(), '' );
|
||||
// Bootstrap JS
|
||||
wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/core/assets/js/bootstrap.min.js', array('jquery'), '', true );
|
||||
// Masonry
|
||||
if( is_front_page() || is_page_template('portfolio.php') ) {
|
||||
wp_enqueue_script( 'masonry' );
|
||||
}
|
||||
|
||||
if ( function_exists('is_product') ) {
|
||||
if ( is_product() ) {
|
||||
wp_enqueue_style( 'photoswipe', get_template_directory_uri() . '/core/assets/css/photoswipe.css', '', '' );
|
||||
wp_enqueue_style( 'photoswipe-skin', get_template_directory_uri() . '/core/assets/css/photoswipe-default-skin.css', '', '' );
|
||||
wp_enqueue_script( 'photoswipejs', get_template_directory_uri() . '/core/assets/js/photoswipe.min.js', array('jquery'), '', true );
|
||||
wp_enqueue_script( 'photoswipejs-ui', get_template_directory_uri() . '/core/assets/js/photoswipe-ui-default.min.js', array('jquery'), '', true );
|
||||
}
|
||||
}
|
||||
|
||||
// Smooth mouse scrolling
|
||||
wp_register_script( 'keydesign-smooth-scroll', get_template_directory_uri() . '/core/assets/js/SmoothScroll.js', array('jquery'), '', true );
|
||||
if ( isset($redux_ThemeTek['tek-smooth-scroll']) && $redux_ThemeTek['tek-smooth-scroll'] != false ) {
|
||||
wp_enqueue_script( 'keydesign-smooth-scroll' );
|
||||
}
|
||||
|
||||
// Theme main scripts
|
||||
wp_enqueue_script( 'keydesign-scripts', get_template_directory_uri() . '/core/assets/js/scripts.js', array(), '', true );
|
||||
|
||||
// Visual composer - move styles to head
|
||||
wp_enqueue_style( 'js_composer_front' );
|
||||
wp_enqueue_style( 'js_composer_custom_css' );
|
||||
|
||||
}
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'keydesign_enqueue_front' );
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// bbPress
|
||||
// ------------------------------------------------------------------------
|
||||
function keydesign_bbpress_css_enqueue(){
|
||||
if( function_exists( 'is_bbpress' ) ) {
|
||||
// Deregister default bbPress CSS
|
||||
wp_deregister_style( 'bbp-default' );
|
||||
|
||||
$file = 'core/assets/css/bbpress.css';
|
||||
|
||||
// Check child theme
|
||||
if ( file_exists( trailingslashit( get_stylesheet_directory() ) . $file ) ) {
|
||||
$location = trailingslashit( get_stylesheet_directory_uri() );
|
||||
$handle = 'bbp-child-bbpress';
|
||||
|
||||
// Check parent theme
|
||||
} elseif ( file_exists( trailingslashit( get_template_directory() ) . $file ) ) {
|
||||
$location = trailingslashit( get_template_directory_uri() );
|
||||
$handle = 'bbp-parent-bbpress';
|
||||
}
|
||||
|
||||
// Enqueue the bbPress styling
|
||||
wp_enqueue_style( $handle, $location . $file, 'screen' );
|
||||
}
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'keydesign_bbpress_css_enqueue' );
|
||||
|
||||
function keydesign_default_fonts_url() {
|
||||
$font_url = add_query_arg( 'family', urlencode( 'Open Sans:300,400,600,700&subset=latin-ext' ), "//fonts.googleapis.com/css" );
|
||||
return $font_url;
|
||||
}
|
||||
|
||||
if( !function_exists('keydesign_enqueue_admin') ) {
|
||||
function keydesign_enqueue_admin() {
|
||||
wp_enqueue_style( 'keydesign-wp-admin-css', get_template_directory_uri() . '/core/assets/css/admin-styles.css', '', '' );
|
||||
wp_enqueue_script( 'keydesign-wp-admin-js', get_template_directory_uri() . '/core/assets/js/admin-scripts.js', '', '1.0.0' );
|
||||
}
|
||||
}
|
||||
add_action( 'admin_enqueue_scripts', 'keydesign_enqueue_admin' );
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Theme Setup
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
function keydesign_setup(){
|
||||
// Localization
|
||||
load_theme_textdomain( 'ekko', get_template_directory() . '/languages' );
|
||||
|
||||
// Add theme support for feed links
|
||||
add_theme_support( 'automatic-feed-links' );
|
||||
|
||||
// Enable support for Post Thumbnails on posts and pages.
|
||||
add_theme_support( 'post-thumbnails' );
|
||||
add_image_size( 'keydesign-grid-image', 400, 250, true );
|
||||
add_image_size( 'keydesign-left-image', 320, 320, true );
|
||||
|
||||
// Let WordPress manage the document title.
|
||||
add_theme_support( 'title-tag' );
|
||||
|
||||
// Enable support for page excerpts
|
||||
add_post_type_support( 'page', 'excerpt' );
|
||||
|
||||
// Set up theme navigation locations
|
||||
if ( function_exists( 'register_nav_menus' ) ) {
|
||||
register_nav_menus(
|
||||
array(
|
||||
'header-menu' => 'Header Menu',
|
||||
'topbar-menu' => 'Topbar Menu',
|
||||
'footer-menu' => 'Footer Menu',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Enable support for Post Formats
|
||||
add_theme_support( 'post-formats', array(
|
||||
'gallery',
|
||||
'video',
|
||||
'audio',
|
||||
'quote',
|
||||
) );
|
||||
|
||||
// Switch default core markup for search form, comment form, and comments to output valid HTML5.
|
||||
add_theme_support( 'html5', array(
|
||||
'search-form',
|
||||
'comment-form',
|
||||
'comment-list',
|
||||
'gallery',
|
||||
'caption',
|
||||
) );
|
||||
}
|
||||
add_action( 'after_setup_theme', 'keydesign_setup' );
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Include plugin check, meta boxes, widgets, custom posts
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
// Redux theme options config
|
||||
include_once( get_template_directory() . '/core/options-init.php' );
|
||||
|
||||
// Theme activation and plugin check
|
||||
include_once( get_template_directory() . '/core/theme-activation.php' );
|
||||
|
||||
// Add post meta boxes
|
||||
include_once( get_template_directory() . '/core/theme-pagemeta.php' );
|
||||
|
||||
// Register widgetized areas
|
||||
include_once( get_template_directory() . '/core/theme-sidebars.php' );
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Content Width
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if ( ! isset( $content_width ) ) $content_width = 1240;
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Blog functionality
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
// Custom blog navigation
|
||||
function keydesign_link_attributes_1($themetek_output) {
|
||||
return str_replace('<a href=', '<a class="next" href=', $themetek_output);
|
||||
}
|
||||
function keydesign_link_attributes_2($themetek_output) {
|
||||
return str_replace('<a href=', '<a class="prev" href=', $themetek_output);
|
||||
}
|
||||
|
||||
add_filter('next_post_link', 'keydesign_link_attributes_1');
|
||||
add_filter('previous_post_link', 'keydesign_link_attributes_2');
|
||||
|
||||
// Comment reply script enqueued
|
||||
function keydesign_enqueue_comments_reply() {
|
||||
if( get_option( 'thread_comments' ) ) {
|
||||
wp_enqueue_script( 'comment-reply' );
|
||||
}
|
||||
}
|
||||
add_action( 'comment_form_before', 'keydesign_enqueue_comments_reply' );
|
||||
|
||||
// Excerpt length
|
||||
if( class_exists( 'ReduxFramework' )) {
|
||||
function keydesign_excerpt_length( $length ) {
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
return $redux_ThemeTek['tek-blog-excerpt'];
|
||||
}
|
||||
add_filter( 'excerpt_length', 'keydesign_excerpt_length', 999 );
|
||||
}
|
||||
|
||||
// Post tags
|
||||
if ( ! function_exists( 'keydesign_output_post_tags' ) ) {
|
||||
function keydesign_output_post_tags() {
|
||||
get_template_part( 'core/templates/post/partials/content', 'tags' );
|
||||
}
|
||||
}
|
||||
add_action( 'keydesign_post_after_main_content', 'keydesign_output_post_tags', 10, 0 );
|
||||
|
||||
// Post author box
|
||||
if ( ! function_exists( 'keydesign_output_post_author_box' ) ) {
|
||||
function keydesign_output_post_author_box() {
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
if (isset($redux_ThemeTek['tek-author-box']) && $redux_ThemeTek['tek-author-box'] == true) {
|
||||
get_template_part( 'core/templates/post/partials/content', 'author' );
|
||||
}
|
||||
}
|
||||
}
|
||||
add_action( 'keydesign_post_after_main_content', 'keydesign_output_post_author_box', 20, 0 );
|
||||
|
||||
// Post navigation
|
||||
if ( ! function_exists( 'keydesign_output_post_nav' ) ) {
|
||||
function keydesign_output_post_nav() {
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
if (isset($redux_ThemeTek['tek-blog-single-nav']) && $redux_ThemeTek['tek-blog-single-nav'] == true) {
|
||||
get_template_part( 'core/templates/post/partials/content', 'navigation' );
|
||||
}
|
||||
}
|
||||
}
|
||||
add_action( 'keydesign_post_after_main_content', 'keydesign_output_post_nav', 40, 0 );
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Output Theme Options custom code
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
function keydesign_vc_custom_colors() {
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
ob_start();
|
||||
include_once( get_template_directory() . '/core/dynamic-styles.css.php' );
|
||||
$keydesign_custom_colors = ob_get_clean();
|
||||
if (class_exists('KEYDESIGN_ADDON_CLASS')) {
|
||||
wp_add_inline_style('kd-addon-style', $keydesign_custom_colors);
|
||||
} else {
|
||||
wp_add_inline_style('keydesign-style', $keydesign_custom_colors);
|
||||
}
|
||||
}
|
||||
|
||||
add_action('wp_enqueue_scripts', 'keydesign_vc_custom_colors');
|
||||
|
||||
|
||||
function keydesign_custom_theme_styles() {
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
if ( isset($redux_ThemeTek['tek-css']) ) {
|
||||
if (class_exists('KEYDESIGN_ADDON_CLASS')) {
|
||||
wp_add_inline_style( 'kd-addon-style', $redux_ThemeTek['tek-css'] );
|
||||
} else {
|
||||
wp_add_inline_style( 'keydesign-style', $redux_ThemeTek['tek-css'] );
|
||||
}
|
||||
}
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'keydesign_custom_theme_styles' );
|
||||
|
||||
function keydesign_hook_javascript() {
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
if( ! empty( $redux_ThemeTek['tek-javascript'] ) || isset( $redux_ThemeTek['tek-javascript'] ) ) {
|
||||
wp_add_inline_script( 'keydesign-scripts', $redux_ThemeTek['tek-javascript'] );
|
||||
}
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'keydesign_hook_javascript' );
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Output Typekit Custom Javascript
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
function keydesign_custom_typekit() {
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
if ( isset($redux_ThemeTek['tek-typekit']) && $redux_ThemeTek['tek-typekit'] != '' ) {
|
||||
wp_enqueue_script( 'keydesign-typekit', '//use.typekit.net/'.esc_js($redux_ThemeTek['tek-typekit']).'.js', array(), '1.0' );
|
||||
wp_add_inline_script( 'keydesign-typekit', 'try{Typekit.load({ async: true });}catch(e){}' );
|
||||
}
|
||||
}
|
||||
add_action('wp_enqueue_scripts', 'keydesign_custom_typekit');
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Theme activation
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
add_option( 'keydesign-verify', 'no', '', 'yes' );
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Load maintenance page template
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
add_action( 'template_include', 'keydesign_maintenance_mode', 1 );
|
||||
function keydesign_maintenance_mode( $template ) {
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
if ( ! class_exists( 'ReduxFramework' ) ) {
|
||||
return $template;
|
||||
}
|
||||
|
||||
$new_template = locate_template( array( '/core/templates/maintenance-page-template.php' ) );
|
||||
|
||||
if ( $redux_ThemeTek['tek-maintenance-mode'] && !is_user_logged_in() ) {
|
||||
return $new_template;
|
||||
}
|
||||
|
||||
return $template;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Add boxed body class
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if (isset($redux_ThemeTek['tek-layout-style'])) {
|
||||
if ($redux_ThemeTek['tek-layout-style'] == 'boxed') {
|
||||
add_filter( 'body_class','keydesign_body_class' );
|
||||
function keydesign_body_class( $classes ) {
|
||||
$classes[] = 'boxed';
|
||||
return $classes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Preloader effect
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if (isset($redux_ThemeTek['tek-preloader'])) {
|
||||
if ($redux_ThemeTek['tek-preloader'] == true) {
|
||||
add_filter( 'body_class','keydesign_preloader' );
|
||||
function keydesign_preloader( $classes ) {
|
||||
$classes[] = 'loading-effect';
|
||||
$classes[] = 'fade-in';
|
||||
return $classes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Page transparent navigation
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
|
||||
function keydesign_transparent_nav($classes) {
|
||||
if( class_exists( 'WooCommerce' ) && is_shop() ) {
|
||||
$post_id = wc_get_page_id( 'shop' );
|
||||
} else {
|
||||
$post_id = get_the_ID();
|
||||
}
|
||||
|
||||
$page_transparent_navigation = get_post_meta( $post_id, '_themetek_page_transparent_navbar', true );
|
||||
if ( !empty($page_transparent_navigation)) {
|
||||
$classes[] = 'transparent-navigation';
|
||||
}
|
||||
return $classes;
|
||||
}
|
||||
add_filter('body_class', 'keydesign_transparent_nav');
|
||||
|
||||
if (isset($redux_ThemeTek['tek-blog-transparent-nav'])) {
|
||||
if ($redux_ThemeTek['tek-blog-transparent-nav'] == true) {
|
||||
add_filter( 'body_class','keydesign_blog_transparent_nav' );
|
||||
function keydesign_blog_transparent_nav( $classes ) {
|
||||
$classes[] = '';
|
||||
if (is_home() || is_search() || is_category() || is_tag() || is_author()) {
|
||||
$classes[] = 'transparent-navigation';
|
||||
}
|
||||
return $classes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Replace blog post video structure
|
||||
// ------------------------------------------------------------------------
|
||||
if( class_exists( 'KEYDESIGN_ADDON_CLASS' ) ) {
|
||||
function keydesign_embed_oembed_html($html, $url, $args) {
|
||||
global $post;
|
||||
|
||||
if( false !== strpos( $html, 'youtube.com' ) && has_post_thumbnail() && is_single() ){
|
||||
$html = '<div class="entry-video"><div class="video-cover">
|
||||
<div class="background-video-image">'. wp_get_attachment_image(get_post_thumbnail_id(), 'large') .'</div>
|
||||
<div class="play-video"><span class="fa fa-play"></span></div>'. $html .'</div></div>';
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
add_filter('embed_oembed_html','keydesign_embed_oembed_html', 10, 3);
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Add numeric pagination to blog listing pages
|
||||
// ------------------------------------------------------------------------
|
||||
function keydesign_numeric_posts_nav() {
|
||||
|
||||
if( is_singular() )
|
||||
return;
|
||||
|
||||
global $wp_query;
|
||||
|
||||
/** Stop execution if there's only 1 page */
|
||||
if( $wp_query->max_num_pages <= 1 )
|
||||
return;
|
||||
|
||||
$paged = get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1;
|
||||
$max = intval( $wp_query->max_num_pages );
|
||||
|
||||
/** Add current page to the array */
|
||||
if ( $paged >= 1 )
|
||||
$links[] = $paged;
|
||||
|
||||
/** Add the pages around the current page to the array */
|
||||
if ( $paged >= 3 ) {
|
||||
$links[] = $paged - 1;
|
||||
$links[] = $paged - 2;
|
||||
}
|
||||
|
||||
if ( ( $paged + 2 ) <= $max ) {
|
||||
$links[] = $paged + 2;
|
||||
$links[] = $paged + 1;
|
||||
}
|
||||
|
||||
echo '<nav class="blog-pagination"><ul class="blog-page-numbers">' . "\n";
|
||||
|
||||
/** Previous Post Link */
|
||||
if ( get_previous_posts_link() )
|
||||
printf( '<li class="prev-post-link">%s</li>' . "\n", get_previous_posts_link() );
|
||||
|
||||
/** Link to first page, plus ellipses if necessary */
|
||||
if ( ! in_array( 1, $links ) ) {
|
||||
$class = 1 == $paged ? ' class="active"' : '';
|
||||
|
||||
printf( '<li%s><a href="%s">%s</a></li>' . "\n", $class, esc_url( get_pagenum_link( 1 ) ), '1' );
|
||||
|
||||
if ( ! in_array( 2, $links ) )
|
||||
echo '<li>...</li>';
|
||||
}
|
||||
|
||||
/** Link to current page, plus 2 pages in either direction if necessary */
|
||||
sort( $links );
|
||||
foreach ( (array) $links as $link ) {
|
||||
$class = $paged == $link ? ' class="active"' : '';
|
||||
printf( '<li%s><a href="%s">%s</a></li>' . "\n", $class, esc_url( get_pagenum_link( $link ) ), $link );
|
||||
}
|
||||
|
||||
/** Link to last page, plus ellipses if necessary */
|
||||
if ( ! in_array( $max, $links ) ) {
|
||||
if ( ! in_array( $max - 1, $links ) )
|
||||
echo '<li>...</li>' . "\n";
|
||||
|
||||
$class = $paged == $max ? ' class="active"' : '';
|
||||
printf( '<li%s><a href="%s">%s</a></li>' . "\n", $class, esc_url( get_pagenum_link( $max ) ), $max );
|
||||
}
|
||||
|
||||
/** Next Post Link */
|
||||
if ( get_next_posts_link() )
|
||||
printf( '<li class="next-post-link">%s</li>' . "\n", get_next_posts_link() );
|
||||
|
||||
echo '</ul></nav>' . "\n";
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Deactivate OCDI on theme activation
|
||||
// ------------------------------------------------------------------------
|
||||
add_action('admin_init','keydesign_deactivate_ocdi');
|
||||
function keydesign_deactivate_ocdi() {
|
||||
if( class_exists('OCDI_Plugin') ) {
|
||||
deactivate_plugins('one-click-demo-import/one-click-demo-import.php');
|
||||
}
|
||||
}
|
||||
2300
wp-content/themes/ekko/core/options-init.php
Normal file
BIN
wp-content/themes/ekko/core/plugins/js_composer.zip
Normal file
BIN
wp-content/themes/ekko/core/plugins/revslider.zip
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
|
||||
$modal_wrapper_class = $modal_css_class = $modal_template_class = '';
|
||||
|
||||
if (isset($redux_ThemeTek['tek-modal-css-class']) && $redux_ThemeTek['tek-modal-css-class'] != '' ) {
|
||||
$modal_css_class = $redux_ThemeTek['tek-modal-css-class'];
|
||||
}
|
||||
|
||||
$modal_wrapper_class = implode(' ', array('modal', 'fade', 'popup-modal', $modal_css_class));
|
||||
?>
|
||||
<div class="<?php echo esc_attr($modal_wrapper_class); ?>" id="popup-modal" role="dialog">
|
||||
<div class="modal-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-6 modal-content-contact">
|
||||
<?php if (isset($redux_ThemeTek['tek-modal-title']) && $redux_ThemeTek['tek-modal-title'] != '' ) : ?>
|
||||
<h3><?php echo esc_html($redux_ThemeTek['tek-modal-title']); ?></h3>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($redux_ThemeTek['tek-modal-subtitle']) && $redux_ThemeTek['tek-modal-subtitle'] != '' ) : ?>
|
||||
<p><?php echo wp_kses_post($redux_ThemeTek['tek-modal-subtitle']); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($redux_ThemeTek['tek-business-phone']) && $redux_ThemeTek['tek-business-phone'] != '' ) : ?>
|
||||
<div class="key-icon-box icon-default icon-left cont-left">
|
||||
<i class="iconsmind-Phone fa"></i>
|
||||
<h4 class="service-heading"><a href="tel:<?php echo esc_attr($redux_ThemeTek['tek-business-phone']); ?>"><?php echo esc_html($redux_ThemeTek['tek-business-phone']); ?></a></h4>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($redux_ThemeTek['tek-business-email']) && $redux_ThemeTek['tek-business-email'] != '' ) : ?>
|
||||
<div class="key-icon-box icon-default icon-left cont-left">
|
||||
<i class="iconsmind-Mail fa"></i>
|
||||
<h4 class="service-heading"><a href="mailto:<?php echo esc_attr($redux_ThemeTek['tek-business-email']); ?>"><?php echo esc_html($redux_ThemeTek['tek-business-email']); ?></a></h4>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($redux_ThemeTek['tek-modal-socials']) && $redux_ThemeTek['tek-modal-socials']) : ?>
|
||||
<div class="kd-modal-social-list">
|
||||
<?php echo do_shortcode('[social_profiles]'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="col-sm-6 modal-content-inner" style="background-image: url('<?php if (isset($redux_ThemeTek['tek-modal-bg-image']) && $redux_ThemeTek['tek-modal-bg-image'] != '' ) { echo esc_url($redux_ThemeTek['tek-modal-bg-image']['url']); } ?>')">
|
||||
<?php if (isset($redux_ThemeTek['tek-modal-form-select']) && $redux_ThemeTek['tek-modal-form-select'] != '' ) : ?>
|
||||
<?php if ($redux_ThemeTek['tek-modal-form-select'] == '1' && $redux_ThemeTek['tek-modal-contactf7-formid'] != '') : ?>
|
||||
<?php echo do_shortcode('[contact-form-7 id="'. esc_attr($redux_ThemeTek['tek-modal-contactf7-formid']).'"]'); ?>
|
||||
<?php elseif ($redux_ThemeTek['tek-modal-form-select'] == '2' && $redux_ThemeTek['tek-modal-ninja-formid'] != '') : ?>
|
||||
<?php echo do_shortcode('[ninja_form id="'. esc_attr($redux_ThemeTek['tek-modal-ninja-formid']).'"]'); ?>
|
||||
<?php elseif ($redux_ThemeTek['tek-modal-form-select'] == '3' && $redux_ThemeTek['tek-modal-gravity-formid'] != '') : ?>
|
||||
<?php echo do_shortcode('[gravityform id="'. esc_attr($redux_ThemeTek['tek-modal-gravity-formid']).'"]'); ?>
|
||||
<?php elseif ($redux_ThemeTek['tek-modal-form-select'] == '4' && $redux_ThemeTek['tek-modal-wp-formid'] != '') : ?>
|
||||
<?php echo do_shortcode('[wpforms id="'. esc_attr($redux_ThemeTek['tek-modal-wp-formid']).'"]'); ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
|
||||
/* Button style and color scheme */
|
||||
$btn_wrapper_class = $button_style_class = $button_color_class = $button_hover_class = '';
|
||||
if (isset($redux_ThemeTek['tek-header-button-style'])) {
|
||||
if ($redux_ThemeTek['tek-header-button-style'] == 'solid-button') {
|
||||
$button_style_class .= 'tt_primary_button';
|
||||
} elseif ($redux_ThemeTek['tek-header-button-style'] == 'outline-button') {
|
||||
$button_style_class .= 'tt_secondary_button';
|
||||
} else {
|
||||
$button_style_class .= 'tt_primary_button';
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($redux_ThemeTek['tek-header-button-color'])) {
|
||||
if ($redux_ThemeTek['tek-header-button-color'] == 'primary-color') {
|
||||
$button_color_class .= 'btn_primary_color';
|
||||
} elseif ($redux_ThemeTek['tek-header-button-color'] == 'secondary-color') {
|
||||
$button_color_class .= 'btn_secondary_color';
|
||||
} else {
|
||||
$button_color_class .= 'btn_primary_color';
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($redux_ThemeTek['tek-header-button-hover-style'])) {
|
||||
$button_hover_class .= $redux_ThemeTek['tek-header-button-hover-style'];
|
||||
}
|
||||
|
||||
$btn_wrapper_class = implode(' ', array('modal-menu-item', 'tt_button', $button_style_class, $button_color_class, $button_hover_class));
|
||||
?>
|
||||
|
||||
<?php if ($redux_ThemeTek['tek-modal-button'] && ($redux_ThemeTek['tek-header-button-action'] == '1')) : ?>
|
||||
<a class="<?php echo esc_attr($btn_wrapper_class); ?>" data-toggle="modal" data-target="#popup-modal"><?php echo esc_html($redux_ThemeTek['tek-header-button-text']);?></a>
|
||||
<?php elseif ($redux_ThemeTek['tek-modal-button'] && ($redux_ThemeTek['tek-header-button-action'] == '2')) : ?>
|
||||
<?php if (isset($redux_ThemeTek['tek-scroll-id']) && $redux_ThemeTek['tek-scroll-id'] != '' ) : ?>
|
||||
<a class="<?php echo esc_attr($btn_wrapper_class); ?> scroll-section" href="<?php if( is_page('Home')) { echo esc_attr($redux_ThemeTek['tek-scroll-id']); } else { echo esc_url(site_url()) . esc_attr($redux_ThemeTek['tek-scroll-id']);} ?>"><?php echo esc_html($redux_ThemeTek['tek-header-button-text']);?></a>
|
||||
<?php endif; ?>
|
||||
<?php elseif ($redux_ThemeTek['tek-modal-button'] && ($redux_ThemeTek['tek-header-button-action'] == '3')) : ?>
|
||||
<?php if (isset($redux_ThemeTek['tek-button-new-page']) && $redux_ThemeTek['tek-button-new-page'] != '' ) : ?>
|
||||
<a class="<?php echo esc_attr($btn_wrapper_class); ?>" <?php echo (isset($redux_ThemeTek['tek-button-target']) && $redux_ThemeTek['tek-button-target'] == 'new-page') ? 'target="_blank"' : 'target="_self"'; ?> href="<?php echo esc_url($redux_ThemeTek['tek-button-new-page']); ?>"><?php echo esc_html($redux_ThemeTek['tek-header-button-text']);?></a>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
|
||||
/* Button style and color scheme */
|
||||
$btn_wrapper_class = $button_style_class = $button_color_class = $button_hover_class = '';
|
||||
if (isset($redux_ThemeTek['tek-panel-button-style'])) {
|
||||
if ($redux_ThemeTek['tek-panel-button-style'] == 'solid-button') {
|
||||
$button_style_class .= 'tt_primary_button';
|
||||
} elseif ($redux_ThemeTek['tek-panel-button-style'] == 'outline-button') {
|
||||
$button_style_class .= 'tt_secondary_button';
|
||||
} else {
|
||||
$button_style_class .= 'tt_primary_button';
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($redux_ThemeTek['tek-panel-button-color'])) {
|
||||
if ($redux_ThemeTek['tek-panel-button-color'] == 'primary-color') {
|
||||
$button_color_class .= 'btn_primary_color';
|
||||
} elseif ($redux_ThemeTek['tek-panel-button-color'] == 'secondary-color') {
|
||||
$button_color_class .= 'btn_secondary_color';
|
||||
} else {
|
||||
$button_color_class .= 'btn_primary_color';
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($redux_ThemeTek['tek-panel-button-hover-style'])) {
|
||||
$button_hover_class .= $redux_ThemeTek['tek-panel-button-hover-style'];
|
||||
}
|
||||
|
||||
$btn_wrapper_class = implode(' ', array('modal-menu-item', 'tt_button', $button_style_class, $button_color_class, $button_hover_class));
|
||||
?>
|
||||
|
||||
<?php if ($redux_ThemeTek['tek-panel-button'] && ($redux_ThemeTek['tek-panel-button-action'] == '1')) : ?>
|
||||
<a class="<?php echo esc_attr($btn_wrapper_class); ?> panel-trigger-btn"><?php echo esc_html($redux_ThemeTek['tek-panel-button-text']);?></a>
|
||||
<?php elseif ($redux_ThemeTek['tek-panel-button'] && ($redux_ThemeTek['tek-panel-button-action'] == '2')) : ?>
|
||||
<?php if (isset($redux_ThemeTek['tek-panel-scroll-id']) && $redux_ThemeTek['tek-panel-scroll-id'] != '' ) : ?>
|
||||
<a class="<?php echo esc_attr($btn_wrapper_class); ?> scroll-section" href="<?php if( is_page('Home')) { echo esc_attr($redux_ThemeTek['tek-panel-scroll-id']); } else { echo esc_url(site_url()) . esc_attr($redux_ThemeTek['tek-panel-scroll-id']);} ?>"><?php echo esc_html($redux_ThemeTek['tek-panel-button-text']);?></a>
|
||||
<?php endif; ?>
|
||||
<?php elseif ($redux_ThemeTek['tek-panel-button'] && ($redux_ThemeTek['tek-panel-button-action'] == '3')) : ?>
|
||||
<?php if (isset($redux_ThemeTek['tek-panel-button-new-page']) && $redux_ThemeTek['tek-panel-button-new-page'] != '' ) : ?>
|
||||
<a class="<?php echo esc_attr($btn_wrapper_class); ?>" <?php echo (isset($redux_ThemeTek['tek-panel-button-target']) && $redux_ThemeTek['tek-panel-button-target'] == 'new-page') ? 'target="_blank"' : 'target="_self"'; ?> href="<?php echo esc_url($redux_ThemeTek['tek-panel-button-new-page']); ?>"><?php echo esc_html($redux_ThemeTek['tek-panel-button-text']);?></a>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
|
||||
$panel_wrapper_class = $button_hover_class = $panel_css_class = '';
|
||||
|
||||
if (isset($redux_ThemeTek['tek-panel-css-class']) && $redux_ThemeTek['tek-panel-css-class'] != '' ) {
|
||||
$panel_css_class = $redux_ThemeTek['tek-panel-css-class'];
|
||||
}
|
||||
|
||||
if (isset($redux_ThemeTek['tek-btn-effect']) && $redux_ThemeTek['tek-btn-effect'] != '' ) {
|
||||
$button_hover_class = $redux_ThemeTek['tek-btn-effect'];
|
||||
}
|
||||
|
||||
$panel_wrapper_class = implode(' ', array('kd-side-panel', $button_hover_class, $panel_css_class));
|
||||
?>
|
||||
<div class="panel-screen-overlay"></div>
|
||||
<div class="<?php echo esc_attr($panel_wrapper_class); ?>">
|
||||
<div class="kd-panel-wrapper">
|
||||
<div class="kd-panel-header">
|
||||
<?php if (isset($redux_ThemeTek['tek-panel-title']) && $redux_ThemeTek['tek-panel-title'] != '' ) : ?>
|
||||
<h3 class="kd-panel-title"><?php echo esc_html($redux_ThemeTek['tek-panel-title']); ?></h3>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($redux_ThemeTek['tek-panel-subtitle']) && $redux_ThemeTek['tek-panel-subtitle'] != '' ) : ?>
|
||||
<div class="kd-panel-subtitle">
|
||||
<?php echo wp_kses_post($redux_ThemeTek['tek-panel-subtitle']); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="kd-panel-phone-email">
|
||||
<?php if (isset($redux_ThemeTek['tek-business-phone']) && $redux_ThemeTek['tek-business-phone'] != '' ) : ?>
|
||||
<div class="kd-panel-phone">
|
||||
<i class="fa fa-phone"></i>
|
||||
<a href="tel:<?php echo esc_attr($redux_ThemeTek['tek-business-phone']); ?>"><?php echo esc_html($redux_ThemeTek['tek-business-phone']); ?></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($redux_ThemeTek['tek-business-email']) && $redux_ThemeTek['tek-business-email'] != '' ) : ?>
|
||||
<div class="kd-panel-email">
|
||||
<i class="fa fa-envelope"></i>
|
||||
<a href="mailto:<?php echo esc_attr($redux_ThemeTek['tek-business-email']); ?>"><?php echo esc_html($redux_ThemeTek['tek-business-email']); ?></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="kd-panel-contact">
|
||||
<?php if (isset($redux_ThemeTek['tek-panel-form-select']) && $redux_ThemeTek['tek-panel-form-select'] != '' ) : ?>
|
||||
<?php if ($redux_ThemeTek['tek-panel-form-select'] == '1' && $redux_ThemeTek['tek-panel-contactf7-formid'] != '') : ?>
|
||||
<?php echo do_shortcode('[contact-form-7 id="'. esc_attr($redux_ThemeTek['tek-panel-contactf7-formid']).'"]'); ?>
|
||||
<?php elseif ($redux_ThemeTek['tek-panel-form-select'] == '2' && $redux_ThemeTek['tek-panel-ninja-formid'] != '') : ?>
|
||||
<?php echo do_shortcode('[ninja_form id="'. esc_attr($redux_ThemeTek['tek-panel-ninja-formid']).'"]'); ?>
|
||||
<?php elseif ($redux_ThemeTek['tek-panel-form-select'] == '3' && $redux_ThemeTek['tek-panel-gravity-formid'] != '') : ?>
|
||||
<?php echo do_shortcode('[gravityform id="'. esc_attr($redux_ThemeTek['tek-panel-gravity-formid']).'"]'); ?>
|
||||
<?php elseif ($redux_ThemeTek['tek-panel-form-select'] == '4' && $redux_ThemeTek['tek-panel-wp-formid'] != '') : ?>
|
||||
<?php echo do_shortcode('[wpforms id="'. esc_attr($redux_ThemeTek['tek-panel-wp-formid']).'"]'); ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (isset($redux_ThemeTek['tek-panel-socials']) && $redux_ThemeTek['tek-panel-socials']) : ?>
|
||||
<div class="kd-panel-social-list">
|
||||
<?php echo do_shortcode('[social_profiles]'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<button type="button" class="panel-close" data-dismiss="side-panel">×</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,239 @@
|
||||
<?php
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
$title_align_class = $single_page_title_align = $values = $titlebar_bg = $shop_titlebar_bg = $shop_title_bar_text_align = '';
|
||||
|
||||
$blog_title = get_the_title( get_option('page_for_posts', true) );
|
||||
$keydesign_header_image = wp_get_attachment_image_src( get_post_thumbnail_id(get_option('page_for_posts')), 'full', false );
|
||||
|
||||
if (is_home() && is_front_page()) {
|
||||
$blog_title = get_bloginfo();
|
||||
$description = get_bloginfo( 'description', 'display' );
|
||||
}
|
||||
|
||||
$themetek_page_subtitle = get_post_meta( get_the_ID(), '_themetek_page_subtitle', true );
|
||||
$themetek_page_showhide_title_section = get_post_meta( get_the_ID(), '_themetek_page_showhide_title_section', true );
|
||||
$themetek_page_showhide_breadcrumbs = get_post_meta( get_the_ID(), '_themetek_page_showhide_breadcrumbs', true );
|
||||
$themetek_page_title_color = get_post_meta( get_the_ID(), '_themetek_page_title_color', true );
|
||||
$themetek_page_title_subtitle_color = ' color:'.$themetek_page_title_color;
|
||||
$themetek_page_titlebar_background = get_post_meta( get_the_ID(), '_themetek_page_titlebar_background', true );
|
||||
$themetek_post_id = get_the_ID();
|
||||
$themetek_header_image = wp_get_attachment_image_src( get_post_thumbnail_id($themetek_post_id), 'full', false );
|
||||
|
||||
if ( class_exists( 'WooCommerce' ) && is_post_type_archive( 'product' ) ) {
|
||||
$shop_page_id = wc_get_page_id( 'shop' );
|
||||
/* Shop page title color */
|
||||
$shop_page_title_color = get_post_meta( $shop_page_id, '_themetek_page_title_color', true );
|
||||
$shop_title_color = 'color:'.$shop_page_title_color;
|
||||
|
||||
/* Shop page title align */
|
||||
$values = get_post_custom( $shop_page_id );
|
||||
$shop_page_title_align = isset( $values['page_title_align'] ) ? esc_attr( $values['page_title_align'][0] ) : '';
|
||||
if ( $shop_page_title_align == "left-align" ) {
|
||||
$shop_title_bar_text_align = 'blog-title-left';
|
||||
} elseif ( $shop_page_title_align == "center-align" ) {
|
||||
$shop_title_bar_text_align = 'blog-title-center';
|
||||
} elseif ( $shop_page_title_align == "right-align" ) {
|
||||
$shop_title_bar_text_align = 'blog-title-right';
|
||||
}
|
||||
|
||||
/* Shop page header image */
|
||||
$shop_page_header_image = wp_get_attachment_image_src( get_post_thumbnail_id($shop_page_id), 'full', false );
|
||||
|
||||
/* Shop page title bar background color */
|
||||
$shop_page_titlebar_background = get_post_meta( $shop_page_id, '_themetek_page_titlebar_background', true );
|
||||
if ($shop_page_titlebar_background != '') {
|
||||
$shop_titlebar_bg = $shop_page_titlebar_background;
|
||||
}
|
||||
|
||||
/* Shop page show/hide title */
|
||||
$shop_page_showhide_title_section = get_post_meta( $shop_page_id, '_themetek_page_showhide_title_section', true );
|
||||
|
||||
/* Shop page show/hide breadcrumbs */
|
||||
$shop_page_showhide_breadcrumbs = get_post_meta( $shop_page_id, '_themetek_page_showhide_breadcrumbs', true );
|
||||
|
||||
/* Shop page subtitle */
|
||||
$shop_page_subtitle = get_post_meta( $shop_page_id, '_themetek_page_subtitle', true );
|
||||
}
|
||||
|
||||
/* Single Page title bar background color */
|
||||
if ($themetek_page_titlebar_background != '') {
|
||||
$titlebar_bg = $themetek_page_titlebar_background;
|
||||
}
|
||||
|
||||
if (!is_404()) {
|
||||
$values = get_post_custom( get_the_ID() );
|
||||
$keydesign_page_title_align = isset( $values['page_title_align'] ) ? esc_attr( $values['page_title_align'][0] ) : '';
|
||||
if ( $keydesign_page_title_align == "left-align" ) {
|
||||
$single_page_title_align = 'blog-title-left';
|
||||
} elseif ( $keydesign_page_title_align == "center-align" ) {
|
||||
$single_page_title_align = 'blog-title-center';
|
||||
} elseif ( $keydesign_page_title_align == "right-align" ) {
|
||||
$single_page_title_align = 'blog-title-right';
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($redux_ThemeTek['tek-blog-header-text-align']) && $redux_ThemeTek['tek-blog-header-text-align'] != '') {
|
||||
$title_align_class = $redux_ThemeTek['tek-blog-header-text-align'];
|
||||
}
|
||||
|
||||
if (!isset($redux_ThemeTek['tek-blog-single-sidebar'])) {
|
||||
$redux_ThemeTek['tek-blog-single-sidebar'] = 1;
|
||||
}
|
||||
|
||||
if (is_single() && $redux_ThemeTek['tek-blog-single-sidebar'] == 0) {
|
||||
$title_align_class = 'blog-title-center';
|
||||
} elseif (is_single() && $redux_ThemeTek['tek-blog-single-sidebar'] == 1) {
|
||||
$title_align_class = 'blog-title-left';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<?php if ( class_exists( 'bbPress' ) && is_bbpress() ) : ?>
|
||||
<header class="entry-header blog-header bbpress-header">
|
||||
<div class="container">
|
||||
<h2 class="section-heading">
|
||||
<?php the_title(); ?>
|
||||
</h2>
|
||||
<div class="bbpress-breadcrumbs"></div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<?php elseif (class_exists( 'WooCommerce' ) && is_woocommerce()) : ?>
|
||||
<?php if ( empty($shop_page_showhide_title_section)) : ?>
|
||||
<header class="entry-header blog-header <?php if (isset($redux_ThemeTek['tek-topbar'])) { if ($redux_ThemeTek['tek-topbar'] == '1') { echo esc_attr('with-topbar'); }} ?>" <?php if ($shop_titlebar_bg != '') { echo 'style="background-color: '.$shop_titlebar_bg.';"'; } ?>>
|
||||
<div class="row blog-page-heading <?php if (is_shop()) { echo esc_attr($shop_title_bar_text_align); } ?>">
|
||||
<?php if ( is_shop() && $shop_page_header_image != '' ) : ?>
|
||||
<div class="header-overlay parallax-overlay" style="background-image:url('<?php echo esc_url($shop_page_header_image[0]); ?>')"></div>
|
||||
<?php endif; ?>
|
||||
<div class="container">
|
||||
<?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?>
|
||||
<h1 class="section-heading" <?php if (!empty($shop_title_color)) : ?> style="<?php echo esc_attr($shop_title_color); ?>" <?php endif; ?>><?php woocommerce_page_title(); ?></h1>
|
||||
<?php do_action( 'woocommerce_archive_description' ); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (is_shop() && $shop_page_subtitle != '') : ?>
|
||||
<p class="section-subheading" <?php if (!empty($shop_title_color)) : ?> style="<?php echo esc_attr($shop_title_color); ?>" <?php endif; ?>><?php echo esc_html($shop_page_subtitle); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php if(function_exists('bcn_display') && empty($shop_page_showhide_breadcrumbs)) : ?>
|
||||
<div class="breadcrumbs" typeof="BreadcrumbList" vocab="https://schema.org/" <?php if (!empty($shop_title_color)) : ?> style="<?php echo esc_attr($shop_title_color); ?>" <?php endif; ?>>
|
||||
<?php bcn_display(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php elseif(is_home() || is_search() || is_archive() || is_single() && !is_singular( 'portfolio' )) : ?>
|
||||
<header class="entry-header blog-header <?php if (isset($redux_ThemeTek['tek-topbar'])) { if ($redux_ThemeTek['tek-topbar'] == '1') { echo esc_attr('with-topbar'); }} ?>">
|
||||
<div class="row blog-page-heading <?php echo esc_attr($title_align_class); ?>">
|
||||
<?php if (!is_single()) : ?>
|
||||
<?php if (isset($redux_ThemeTek['tek-blog-header-template']) && $redux_ThemeTek['tek-blog-header-template'] == 'blog-header-titlebar') : ?>
|
||||
<div class="header-overlay parallax-overlay" style="background-image:url('<?php echo esc_url($keydesign_header_image[0]); ?>')"></div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<div class="container">
|
||||
<?php if( is_home() ) : ?>
|
||||
<?php if (isset($redux_ThemeTek['tek-blog-title-switch'])) : ?>
|
||||
<?php if ($redux_ThemeTek['tek-blog-title-switch'] != '0') : ?>
|
||||
<h1 class="section-heading"><?php echo esc_html($blog_title); ?></h1>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<h1 class="section-heading"><?php echo esc_html($blog_title); ?></h1>
|
||||
<p class="site-description"><?php echo esc_html($description); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php elseif ( is_search() ) : ?>
|
||||
<h1 class="section-heading">
|
||||
<?php echo apply_filters( 'kd_search_query_title', esc_html__("Search results for", "ekko") ); ?>: <?php the_search_query(); ?>
|
||||
</h1>
|
||||
<?php elseif ( is_category() ) : ?>
|
||||
<h1 class="section-heading">
|
||||
<?php echo apply_filters( 'kd_single_cat_title', esc_html__("Currently browsing", "ekko") ); ?>: <?php single_cat_title(); ?>
|
||||
</h1>
|
||||
<?php elseif ( is_tag() ) : ?>
|
||||
<h1 class="section-heading">
|
||||
<?php echo apply_filters( 'kd_single_tag_title', esc_html__("All posts tagged", "ekko") ); ?>: <?php single_tag_title(); ?>
|
||||
</h1>
|
||||
<?php elseif ( is_author() ) : ?>
|
||||
<h1 class="section-heading">
|
||||
<?php echo apply_filters( 'kd_author_archive_title', esc_html__("All posts by", "ekko") ); ?> <?php echo esc_html(get_userdata(get_query_var('author'))->display_name); ?>
|
||||
</h1>
|
||||
<?php elseif ( is_day() ) : ?>
|
||||
<h1 class="section-heading">
|
||||
<?php echo apply_filters( 'kd_day_archive_title', esc_html__("Posts archive for", "ekko") ); ?> <?php echo get_the_date('F jS, Y'); ?>
|
||||
</h1>
|
||||
<?php elseif ( is_month() ) : ?>
|
||||
<h1 class="section-heading">
|
||||
<?php echo apply_filters( 'kd_month_archive_title', esc_html__("Posts archive for", "ekko") ); ?> <?php echo get_the_date('F, Y'); ?>
|
||||
</h1>
|
||||
<?php elseif ( is_year() ) : ?>
|
||||
<h1 class="section-heading">
|
||||
<?php echo apply_filters( 'kd_year_archive_title', esc_html__("Posts archive for", "ekko") ); ?> <?php echo get_the_date('Y'); ?>
|
||||
</h1>
|
||||
<?php elseif ( get_page( get_option('page_for_posts') ) && !is_single() ) : ?>
|
||||
<h1 class="section-heading">
|
||||
<?php echo apply_filters('the_title',get_page( get_option('page_for_posts') )->post_title); ?>
|
||||
</h1>
|
||||
<?php elseif (!is_single()) : ?>
|
||||
<h1 class="section-heading"><?php echo esc_html(get_the_title(get_queried_object_id())); ?></h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($redux_ThemeTek['tek-blog-subtitle']) && ($redux_ThemeTek['tek-blog-subtitle'] != '') && is_home() ) : ?>
|
||||
<p class="section-subheading"><?php echo esc_html($redux_ThemeTek['tek-blog-subtitle']); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(function_exists('bcn_display')) : ?>
|
||||
<div class="breadcrumbs" typeof="BreadcrumbList" vocab="https://schema.org/">
|
||||
<?php bcn_display(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($redux_ThemeTek['tek-blog-header-form']) && is_home()) : ?>
|
||||
<?php if( !empty($redux_ThemeTek['tek-blog-header-form-id']) && $redux_ThemeTek['tek-blog-header-form'] == 1 ) : ?>
|
||||
<div class="blog-header-form">
|
||||
<?php echo do_shortcode('[contact-form-7 id="'. esc_attr($redux_ThemeTek['tek-blog-header-form-id']).'"]'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<?php elseif(!is_404() && !is_singular( 'portfolio' )) : ?>
|
||||
<?php if ( empty($themetek_page_showhide_title_section) && !is_single()) : ?>
|
||||
<header class="entry-header single-page-header <?php if (isset($redux_ThemeTek['tek-topbar'])) { if ($redux_ThemeTek['tek-topbar'] == '1') { echo esc_attr('with-topbar'); }} ?>" <?php if ($titlebar_bg != '') { echo 'style="background-color: '.$titlebar_bg.';"'; } ?>>
|
||||
<div class="row single-page-heading <?php echo esc_attr($single_page_title_align); ?>">
|
||||
<?php if (!empty($themetek_header_image) && !is_single()) : ?>
|
||||
<div class="header-overlay parallax-overlay" style="background-image:url('<?php echo esc_url($themetek_header_image[0]); ?>')"></div>
|
||||
<?php endif; ?>
|
||||
<div class="container">
|
||||
<h1 class="section-heading" <?php if (!empty($themetek_page_title_color)) : ?> style="<?php echo esc_attr($themetek_page_title_subtitle_color); ?>" <?php endif; ?>><?php the_title(); ?></h1>
|
||||
<?php if (($themetek_page_subtitle) && !is_single()) : ?>
|
||||
<p class="section-subheading" <?php if (!empty($themetek_page_title_color)) : ?> style="<?php echo esc_attr($themetek_page_title_subtitle_color); ?>" <?php endif; ?>><?php echo esc_html($themetek_page_subtitle); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php if(function_exists('bcn_display') && empty($themetek_page_showhide_breadcrumbs)) : ?>
|
||||
<div <?php echo (!empty($themetek_page_title_color) ? 'style="color: '.$themetek_page_title_color.';"' : ''); ?> class="breadcrumbs" typeof="BreadcrumbList" vocab="https://schema.org/">
|
||||
<?php bcn_display(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<?php endif; ?>
|
||||
<?php elseif(is_singular( 'portfolio' )) : ?>
|
||||
<?php if ( empty($themetek_page_showhide_title_section)) : ?>
|
||||
<header class="entry-header single-page-header <?php if (isset($redux_ThemeTek['tek-topbar'])) { if ($redux_ThemeTek['tek-topbar'] == '1') { echo esc_attr('with-topbar'); }} ?>" <?php if ($titlebar_bg != '') { echo 'style="background-color: '.$titlebar_bg.';"'; } ?>>
|
||||
<div class="row single-page-heading <?php echo esc_attr($single_page_title_align); ?>">
|
||||
<div class="container">
|
||||
<h1 class="section-heading" <?php if (!empty($themetek_page_title_color)) : ?> style="<?php echo esc_attr($themetek_page_title_subtitle_color); ?>" <?php endif; ?>><?php the_title(); ?></h1>
|
||||
<?php if (($themetek_page_subtitle)) : ?>
|
||||
<p class="section-subheading" <?php if (!empty($themetek_page_title_color)) : ?> style="<?php echo esc_attr($themetek_page_title_subtitle_color); ?>" <?php endif; ?>><?php echo esc_html($themetek_page_subtitle); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php if(function_exists('bcn_display')) : ?>
|
||||
<div <?php echo (!empty($themetek_page_title_color) ? 'style="color: '.$themetek_page_title_color.';"' : ''); ?> class="breadcrumbs" typeof="BreadcrumbList" vocab="https://schema.org/">
|
||||
<?php bcn_display(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
112
wp-content/themes/ekko/core/templates/header/content-topbar.php
Normal file
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
// Do not allow directly accessing this file.
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit( 'Direct script access denied.' );
|
||||
}
|
||||
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
$social_icon_class = $content_to_display = $topbar_left_content = $topbar_right_content = $topbar_content_design = $topbar_left_empty = $topbar_right_empty = '';
|
||||
|
||||
if ( ! function_exists( 'kd_topbar_content' ) ) {
|
||||
function kd_topbar_content ( $topbar_section ) {
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
$section_content = '';
|
||||
$content_to_display = $redux_ThemeTek[$topbar_section];
|
||||
|
||||
if ( 'contact-info' === $content_to_display ) {
|
||||
$section_content = '<div class="topbar-contact">';
|
||||
if (isset($redux_ThemeTek['tek-business-phone']) && $redux_ThemeTek['tek-business-phone'] != '' ) {
|
||||
$section_content .= '<span class="topbar-phone"><i class="fa fa-phone"></i><a href="tel:'. esc_attr($redux_ThemeTek['tek-business-phone']) .'">'. esc_html($redux_ThemeTek['tek-business-phone']) .'</a></span>';
|
||||
}
|
||||
if (isset($redux_ThemeTek['tek-business-email']) && $redux_ThemeTek['tek-business-email'] != '' ) {
|
||||
$section_content .= '<span class="topbar-email"><i class="fa fa-envelope-o"></i><a href="mailto:'. esc_attr($redux_ThemeTek['tek-business-email']) .'">'. esc_html($redux_ThemeTek['tek-business-email']) .'</a></span>';
|
||||
}
|
||||
if (isset($redux_ThemeTek['tek-business-opening-hours']) && $redux_ThemeTek['tek-business-opening-hours'] != '' ) {
|
||||
$section_content .= '<span class="topbar-opening-hours"><i class="fa fa-clock-o"></i>'. esc_html($redux_ThemeTek['tek-business-opening-hours']) .'</span>';
|
||||
}
|
||||
$section_content .= '</div>';
|
||||
} elseif ( 'social-links' === $content_to_display ) {
|
||||
$section_content = '<div class="topbar-socials">';
|
||||
if( class_exists( 'ReduxFramework' )) {
|
||||
$section_content .= do_shortcode('[social_profiles]');
|
||||
}
|
||||
$section_content .= '</div>';
|
||||
} elseif ( 'navigation' === $content_to_display ) {
|
||||
$section_content = '<div class="topbar-menu">';
|
||||
if ( has_nav_menu( 'topbar-menu' ) ) {
|
||||
$section_content .= wp_nav_menu( array( 'theme_location' => 'topbar-menu', 'depth' => 1, 'container' => false, 'menu_class' => 'navbar-topbar', 'fallback_cb' => 'false', 'echo' => false ) );
|
||||
}
|
||||
$section_content .= '</div>';
|
||||
}
|
||||
|
||||
return $section_content;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($redux_ThemeTek['tek-topbar-content-design']) && 'empty' != $redux_ThemeTek['tek-topbar-content-design']) {
|
||||
$topbar_content_design = $redux_ThemeTek['tek-topbar-content-design'];
|
||||
}
|
||||
|
||||
$topbar_left_content = kd_topbar_content( 'tek-topbar-left-content' );
|
||||
$topbar_right_content = kd_topbar_content( 'tek-topbar-right-content' );
|
||||
|
||||
if ( $redux_ThemeTek['tek-topbar-left-content'] == 'empty' ) {
|
||||
$topbar_left_empty = 'content-empty';
|
||||
}
|
||||
if ( $redux_ThemeTek['tek-topbar-right-content'] == 'empty' ) {
|
||||
$topbar_right_empty = 'content-empty';
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ($redux_ThemeTek['tek-topbar']) : ?>
|
||||
<?php if ( 'empty' != $redux_ThemeTek['tek-topbar-left-content'] || 'empty' != $redux_ThemeTek['tek-topbar-right-content'] ) : ?>
|
||||
<div class="topbar <?php echo esc_attr($topbar_content_design); ?>">
|
||||
<div class="container">
|
||||
<div class="topbar-left-content <?php echo esc_attr($topbar_left_empty); ?>">
|
||||
<?php
|
||||
// This variable ($topbar_left_content) has been safely escaped in the following file: ekko/core/templates/header/content-topbar.php Lines: 10-44
|
||||
?>
|
||||
<?php echo $topbar_left_content; ?>
|
||||
</div>
|
||||
<div class="topbar-right-content <?php echo esc_attr($topbar_right_empty); ?>">
|
||||
<?php
|
||||
// This variable ($topbar_right_content) has been safely escaped in the following file: ekko/core/templates/header/content-topbar.php Lines: 10-44
|
||||
?>
|
||||
<?php echo $topbar_right_content; ?>
|
||||
</div>
|
||||
<div class="topbar-extra-content">
|
||||
<?php if( !empty($redux_ThemeTek['tek-topbar-search']) && $redux_ThemeTek['tek-topbar-search'] == 1 ) : ?>
|
||||
<div class="topbar-search">
|
||||
<span class="toggle-search fa-search fa"></span>
|
||||
<div class="topbar-search-container">
|
||||
<?php get_search_form(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( function_exists('wpml_loaded') ) : ?>
|
||||
<div class="topbar-lang-switcher">
|
||||
<div class="lang-switcher-wpml">
|
||||
<?php do_action( 'wpml_add_language_selector' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php elseif ( class_exists('Polylang') && function_exists('pll_the_languages')) : ?>
|
||||
<div class="topbar-lang-switcher">
|
||||
<ul class="lang-switcher-polylang">
|
||||
<?php pll_the_languages( array( 'show_flags' => 1,'show_names' => 1) ); ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (class_exists( 'WooCommerce' )) {
|
||||
if( isset($redux_ThemeTek['tek-woo-display-cart-icon']) && ($redux_ThemeTek['tek-woo-display-cart-icon'] == '1')) {
|
||||
$keydesign_minicart = '';
|
||||
$keydesign_minicart = keydesign_add_cart_in_menu();
|
||||
echo do_shortcode( shortcode_unautop( $keydesign_minicart ) );
|
||||
}
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
?>
|
||||
<!doctype html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta charset="<?php echo esc_attr( get_bloginfo( 'charset' ) ) ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="profile" href="http://gmpg.org/xfn/11">
|
||||
<?php if ( ! function_exists( 'has_site_icon' ) || ! has_site_icon() ) : ?>
|
||||
<link href="<?php echo esc_url($redux_ThemeTek['tek-favicon']['url']); ?>" rel="icon">
|
||||
<?php endif; ?>
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
<body <?php body_class('maintenance-mode'); ?> style="background-image: url('<?php if (isset($redux_ThemeTek['tek-maintenance-bg-image']) && $redux_ThemeTek['tek-maintenance-bg-image'] != '' ) { echo esc_url($redux_ThemeTek['tek-maintenance-bg-image']['url']); } ?>')">
|
||||
<div class="container section">
|
||||
<?php if ($redux_ThemeTek['tek-maintenance-title']) :?>
|
||||
<h2 class="maintenance-title"><?php echo esc_html($redux_ThemeTek['tek-maintenance-title']); ?></h2>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($redux_ThemeTek['tek-maintenance-content']) :?>
|
||||
<div class="maintenance-content"><?php echo wp_kses_post($redux_ThemeTek['tek-maintenance-content']); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($redux_ThemeTek['tek-maintenance-countdown']) :?>
|
||||
<?php if ($redux_ThemeTek['tek-maintenance-count-day'] && $redux_ThemeTek['tek-maintenance-count-month'] && $redux_ThemeTek['tek-maintenance-count-year']) : ?>
|
||||
<?php echo do_shortcode('[tek_countdown starting_year="'.esc_attr($redux_ThemeTek['tek-maintenance-count-year']).'" starting_month="'.esc_attr($redux_ThemeTek['tek-maintenance-count-month']).'" starting_day="'.esc_attr($redux_ThemeTek['tek-maintenance-count-day']).'" cd_text_days="Days" cd_text_hours="Hours" cd_text_minutes="Minutes" cd_text_seconds="Seconds"]'); ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($redux_ThemeTek['tek-maintenance-subscribe']) : ?>
|
||||
<?php if ($redux_ThemeTek['tek-maintenance-form-select'] == '1' && isset($redux_ThemeTek['tek-maintenance-contactf7-formid'])) : ?>
|
||||
<div class="inline-cf">
|
||||
<?php echo do_shortcode('[contact-form-7 id="'. esc_attr($redux_ThemeTek['tek-maintenance-contactf7-formid']).'"]'); ?>
|
||||
</div>
|
||||
<?php elseif ($redux_ThemeTek['tek-maintenance-form-select'] == '2' && $redux_ThemeTek['tek-maintenance-ninja-formid'] != '') : ?>
|
||||
<?php echo do_shortcode('[ninja_form id="'. esc_attr($redux_ThemeTek['tek-maintenance-ninja-formid']).'"]'); ?>
|
||||
<?php elseif ($redux_ThemeTek['tek-maintenance-form-select'] == '3' && $redux_ThemeTek['tek-maintenance-gravity-formid'] != '') : ?>
|
||||
<?php echo do_shortcode('[gravityform id="'. esc_attr($redux_ThemeTek['tek-maintenance-gravity-formid']).'"]'); ?>
|
||||
<?php elseif ($redux_ThemeTek['tek-maintenance-form-select'] == '4' && $redux_ThemeTek['tek-maintenance-wp-formid'] != '') : ?>
|
||||
<?php echo do_shortcode('[wpforms id="'. esc_attr($redux_ThemeTek['tek-maintenance-wp-formid']).'"]'); ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php wp_footer(); ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* Displays content for front page
|
||||
*
|
||||
* @package ekko
|
||||
* by KeyDesign
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
$themetek_page_bgcolor = get_post_meta( get_the_ID(), '_themetek_page_bgcolor', true );
|
||||
$themetek_page_background_color = ' background-color:'.$themetek_page_bgcolor.';';
|
||||
?>
|
||||
<section id="<?php echo esc_attr($post->post_name);?>" class="section" style="<?php echo ( !empty($themetek_page_bgcolor) ? esc_attr($themetek_page_background_color) : '' ); ?>">
|
||||
<div class="container" >
|
||||
<div class="row">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
41
wp-content/themes/ekko/core/templates/page/content-page.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying page content in page.php
|
||||
*
|
||||
* @link https://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package ekko
|
||||
* by KeyDesign
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
$themetek_page_bgcolor = get_post_meta( get_the_ID(), '_themetek_page_bgcolor', true );
|
||||
$themetek_page_background_color = ' background-color:'.$themetek_page_bgcolor.';';
|
||||
?>
|
||||
|
||||
<section id="single-page" class="section <?php echo esc_attr($post->post_name);?>" style="<?php echo ( !empty($themetek_page_bgcolor) ? esc_attr($themetek_page_background_color) : '' ); ?>">
|
||||
<div class="container">
|
||||
<div class="row single-page-content">
|
||||
<?php if ( is_active_sidebar( 'bbpress-sidebar' ) && class_exists( 'bbPress' ) && is_bbpress() ) : ?>
|
||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
|
||||
<?php endif; ?>
|
||||
<?php the_content(); ?>
|
||||
<?php wp_link_pages(
|
||||
array(
|
||||
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'ekko' ),
|
||||
'after' => '</div>',
|
||||
)
|
||||
); ?>
|
||||
<?php if ( is_active_sidebar( 'bbpress-sidebar' ) && class_exists( 'bbPress' ) && is_bbpress() ) : ?>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="right-sidebar">
|
||||
<?php dynamic_sidebar( 'bbpress-sidebar' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php /**
|
||||
* The template for displaying the navigation area for Portfolio post types
|
||||
*/ ?>
|
||||
|
||||
<div class="row portfolio-navigation-links col-lg-12">
|
||||
<div class="container">
|
||||
<div class="port-nav-prev col-sm-6 col-lg-6">
|
||||
<?php
|
||||
$prev_post = get_adjacent_post(false, '', true);
|
||||
if(!empty($prev_post)) {
|
||||
echo '<a class="port-prev tt_button" href="' . esc_url(get_permalink($prev_post->ID)) . '" title="' . esc_attr($prev_post->post_title) . '">' . esc_html__("Previous project", "ekko") . '</a>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="port-nav-next col-sm-6 col-lg-6">
|
||||
<?php $next_post = get_adjacent_post(false, '', false);
|
||||
if(!empty($next_post)) {
|
||||
echo '<a class="port-next tt_button" href="' . esc_url(get_permalink($next_post->ID)) . '" title="' . esc_attr($next_post->post_title) . '">' . esc_html__("Next project", "ekko") . '</a>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying Related posts for Portfolio post types
|
||||
*/
|
||||
|
||||
if(!( 'portfolio' == get_post_type() )) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
$carousel_class = '';
|
||||
$terms = get_the_terms( $post->ID , 'portfolio-category', 'string');
|
||||
if ($terms == 0) {
|
||||
return false;
|
||||
}
|
||||
$term_ids = array_values( wp_list_pluck( $terms,'term_id' ) );
|
||||
|
||||
$related_query = new WP_Query(
|
||||
array(
|
||||
'post_type' => 'portfolio',
|
||||
'tax_query' => array(
|
||||
array(
|
||||
'taxonomy' => 'portfolio-category',
|
||||
'field' => 'id',
|
||||
'terms' => $term_ids,
|
||||
'operator'=> 'IN'
|
||||
)
|
||||
),
|
||||
'posts_per_page' => $redux_ThemeTek['tek-portfolio-related-posts-number'],
|
||||
'ignore_sticky_posts' => 1,
|
||||
'orderby' => 'rand',
|
||||
'post__not_in' => array($post->ID)
|
||||
)
|
||||
);
|
||||
|
||||
if( $related_query->found_posts == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($related_query->found_posts > 3 && $redux_ThemeTek['tek-portfolio-related-posts-number'] > 3) {
|
||||
$carousel_class = 'owlslider-related-posts';
|
||||
}
|
||||
?>
|
||||
|
||||
<section class="related-posts">
|
||||
<div class="container">
|
||||
<?php if (isset($redux_ThemeTek['tek-portfolio-related-posts-title']) && $redux_ThemeTek['tek-portfolio-related-posts-title'] != '') : ?>
|
||||
<div class="related-title">
|
||||
<h3><?php echo esc_html($redux_ThemeTek['tek-portfolio-related-posts-title']); ?></h3>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="related-content <?php echo esc_attr($carousel_class); ?>">
|
||||
<?php
|
||||
if ( $related_query->have_posts() ) : while ( $related_query->have_posts() ) : $related_query->the_post();
|
||||
get_template_part('core/templates/portfolio/project', 'minimal-grid');
|
||||
endwhile;
|
||||
else :
|
||||
get_template_part('core/templates/post/content','none');
|
||||
endif;
|
||||
|
||||
wp_reset_postdata();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying the portfolio page content
|
||||
*
|
||||
* @package ekko
|
||||
* by KeyDesign
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
$load_nav = $load_related = $load_comments = '';
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
$themetek_page_bgcolor = get_post_meta( get_the_ID(), '_themetek_page_bgcolor', true );
|
||||
$themetek_page_background_color = ' background-color:'.$themetek_page_bgcolor.';';
|
||||
$themetek_page_top_padding = get_post_meta( get_the_ID(), '_themetek_page_top_padding', true );
|
||||
$themetek_page_bottom_padding = get_post_meta( get_the_ID(), '_themetek_page_bottom_padding', true );
|
||||
if (isset($redux_ThemeTek['tek-portfolio-single-nav']) && $redux_ThemeTek['tek-portfolio-single-nav'] == true ) {
|
||||
$load_nav = true;
|
||||
}
|
||||
if (isset($redux_ThemeTek['tek-portfolio-related-posts']) && $redux_ThemeTek['tek-portfolio-related-posts'] == true ) {
|
||||
$load_related = true;
|
||||
}
|
||||
if (isset($redux_ThemeTek['tek-portfolio-comments']) && $redux_ThemeTek['tek-portfolio-comments'] == true ) {
|
||||
$load_comments = true;
|
||||
}
|
||||
?>
|
||||
|
||||
<section id="single-page" class="section portfolio-wrapper <?php echo esc_attr($post->post_name);?>" style="
|
||||
<?php echo ( !empty($themetek_page_bgcolor) ? esc_attr($themetek_page_background_color) : '' ); ?>
|
||||
<?php echo ( !empty($themetek_page_top_padding) ? ' padding-top:'. esc_attr($themetek_page_top_padding) .';' : '' );?>
|
||||
<?php echo ( !empty($themetek_page_bottom_padding) ? ' padding-bottom:'. esc_attr($themetek_page_bottom_padding) .';' : '' );?> ">
|
||||
<div class="container">
|
||||
<div class="row single-page-content portfolio-single">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php if ($load_nav) : ?>
|
||||
<?php get_template_part( 'core/templates/portfolio/content', 'project-nav' ); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($load_related) : ?>
|
||||
<?php get_template_part( 'core/templates/portfolio/content', 'project-related' ); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
// If comments are open or we have at least one comment, load up the comment template.
|
||||
if ( $load_comments ) :
|
||||
if ( comments_open() || get_comments_number() ) : ?>
|
||||
<div class="page-content comments-content container">
|
||||
<?php comments_template(); ?>
|
||||
</div>
|
||||
<?php endif;
|
||||
endif;
|
||||
?>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying portfolio item boxes
|
||||
*
|
||||
* @link https://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package ekko
|
||||
* by KeyDesign
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
$without_image_class = '';
|
||||
|
||||
if (!has_post_thumbnail()) {
|
||||
$without_image_class .= 'without-image';
|
||||
}
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> >
|
||||
<?php if (has_post_thumbnail()) : ?>
|
||||
<div class="entry-image">
|
||||
<a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('keydesign-grid-image'); ?></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="entry-wrapper <?php echo esc_attr($without_image_class); ?>">
|
||||
<div class="entry-meta">
|
||||
<span class="blog-label"><span class="fa fa-folder-open-o"></span>
|
||||
<?php
|
||||
$terms_slug_str = '';
|
||||
$terms = get_the_terms($post->ID, 'portfolio-category' );
|
||||
if ($terms && ! is_wp_error($terms)) :
|
||||
$term_slugs_arr = array();
|
||||
foreach ($terms as $term) {
|
||||
$term_slugs_arr[] = $term->name;
|
||||
}
|
||||
$terms_slug_str = join(", ", $term_slugs_arr);
|
||||
endif;
|
||||
echo esc_attr($terms_slug_str);
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
<h5 class="blog-single-title"><a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h5>
|
||||
<div class="entry-content">
|
||||
<a class="post-link" href="<?php esc_url(the_permalink()); ?>"><?php esc_html_e( 'View project', 'ekko' ); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying standard posts
|
||||
*
|
||||
* @link https://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package ekko
|
||||
* by KeyDesign
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
$without_image_class = '';
|
||||
|
||||
if (!isset($redux_ThemeTek['tek-blog-sidebar'])) {
|
||||
$redux_ThemeTek['tek-blog-sidebar'] = 0;
|
||||
}
|
||||
|
||||
if (!has_post_thumbnail()) {
|
||||
$without_image_class .= 'without-image';
|
||||
}
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> >
|
||||
<?php if (has_post_thumbnail()) : ?>
|
||||
<div class="entry-image">
|
||||
<a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('keydesign-grid-image'); ?></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="entry-wrapper <?php echo esc_attr($without_image_class); ?>">
|
||||
<h4 class="blog-single-title"><a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4>
|
||||
<div class="entry-meta">
|
||||
<?php if ( is_sticky() ) echo '<span class="fa fa-thumb-tack"></span> Sticky <span class="blog-separator">|</span> '; ?>
|
||||
<div class="post-meta-child">
|
||||
<span class="published"><span class="fa fa-clock-o"></span><a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><?php the_time( get_option('date_format') ); ?></a></span>
|
||||
<span class="blog-label"><span class="fa fa-folder-open-o"></span><?php the_category(', '); ?></span>
|
||||
</div>
|
||||
<div class="post-meta-child">
|
||||
<span class="author"><span class="fa fa-keyboard-o"></span><?php the_author_posts_link(); ?></span>
|
||||
<span class="comment-count"><span class="fa fa-comment-o"></span><?php comments_popup_link( esc_html__('No comments yet', 'ekko'), esc_html__('1 comment', 'ekko'), esc_html__('% comments', 'ekko') ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="entry-content">
|
||||
<?php the_excerpt(); ?>
|
||||
<?php wp_link_pages(); ?>
|
||||
<a class="post-link" href="<?php esc_url(the_permalink()); ?>"><?php esc_html_e( 'Read more', 'ekko' ); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying standard posts
|
||||
*
|
||||
* @link https://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package ekko
|
||||
* by KeyDesign
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
$url = $entry_class = '';
|
||||
if (!isset($redux_ThemeTek['tek-blog-sidebar'])) {
|
||||
$redux_ThemeTek['tek-blog-sidebar'] = 0;
|
||||
}
|
||||
|
||||
if ( !has_post_thumbnail() ) {
|
||||
$entry_class .="without-image";
|
||||
}
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<div class="entry-image">
|
||||
<a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('keydesign-left-image'); ?></a>
|
||||
</div>
|
||||
<div class="entry-wrapper <?php echo esc_attr($entry_class); ?>">
|
||||
<div class="entry-meta">
|
||||
<?php if ( is_sticky() ) echo '<span class="fa fa-thumb-tack"></span> Sticky <span class="blog-separator">|</span> '; ?>
|
||||
<span class="published"><span class="fa fa-clock-o"></span><a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><?php the_time( get_option('date_format') ); ?></a></span>
|
||||
<span class="blog-label"><span class="fa fa-folder-open-o"></span><?php the_category(', '); ?></span>
|
||||
</div>
|
||||
<?php if ('quote' === get_post_format()) : ?>
|
||||
<h2 class="blog-single-title quote"><?php the_title(); ?></h2>
|
||||
<?php else : ?>
|
||||
<h2 class="blog-single-title"><a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
|
||||
<?php endif; ?>
|
||||
<div class="entry-content">
|
||||
<?php the_excerpt(); ?>
|
||||
<?php wp_link_pages(); ?>
|
||||
<a class="post-link" href="<?php esc_url(the_permalink()); ?>"><?php esc_html_e( 'Read more', 'ekko' ); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying standard posts
|
||||
*
|
||||
* @link https://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package ekko
|
||||
* by KeyDesign
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
|
||||
if (!isset($redux_ThemeTek['tek-blog-sidebar'])) {
|
||||
$redux_ThemeTek['tek-blog-sidebar'] = 0;
|
||||
}
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> >
|
||||
<?php if ('quote' === get_post_format()) : ?>
|
||||
<h2 class="blog-single-title quote"><?php the_title(); ?></h2>
|
||||
<?php else : ?>
|
||||
<h2 class="blog-single-title"><a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
|
||||
<?php endif; ?>
|
||||
<div class="entry-meta">
|
||||
<?php if ( is_sticky() ) echo '<span class="fa fa-thumb-tack"></span> Sticky <span class="blog-separator">|</span> '; ?>
|
||||
<span class="published"><span class="fa fa-clock-o"></span><a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><?php the_time( get_option('date_format') ); ?></a></span>
|
||||
<span class="author"><span class="fa fa-keyboard-o"></span><?php the_author_posts_link(); ?></span>
|
||||
<span class="blog-label"><span class="fa fa-folder-open-o"></span><?php the_category(', '); ?></span>
|
||||
<span class="comment-count"><span class="fa fa-comment-o"></span><?php comments_popup_link( esc_html__('No comments yet', 'ekko'), esc_html__('1 comment', 'ekko'), esc_html__('% comments', 'ekko') ); ?></span>
|
||||
</div>
|
||||
<?php get_template_part( 'core/templates/post/post-type/content', get_post_format() ); ?>
|
||||
<div class="entry-content">
|
||||
<div class="page-content">
|
||||
<?php the_excerpt(); ?>
|
||||
</div>
|
||||
<?php wp_link_pages(); ?>
|
||||
<a class="post-link" href="<?php esc_url(the_permalink()); ?>"><?php esc_html_e( 'Read more', 'ekko' ); ?></a>
|
||||
</div>
|
||||
</article>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying standard posts
|
||||
*
|
||||
* @link https://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package ekko
|
||||
* by KeyDesign
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
$without_image_class = '';
|
||||
|
||||
if (!isset($redux_ThemeTek['tek-blog-sidebar'])) {
|
||||
$redux_ThemeTek['tek-blog-sidebar'] = 0;
|
||||
}
|
||||
|
||||
if (!has_post_thumbnail()) {
|
||||
$without_image_class .= 'without-image';
|
||||
}
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> >
|
||||
<?php if (has_post_thumbnail()) : ?>
|
||||
<div class="entry-image">
|
||||
<a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('keydesign-grid-image'); ?></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="entry-wrapper <?php echo esc_attr($without_image_class); ?>">
|
||||
<div class="entry-meta">
|
||||
<?php if ( is_sticky() ) echo '<span class="fa fa-thumb-tack"></span> Sticky <span class="blog-separator">|</span> '; ?>
|
||||
<span class="published"><span class="fa fa-clock-o"></span><a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><?php the_time( get_option('date_format') ); ?></a></span>
|
||||
<span class="blog-label"><span class="fa fa-folder-open-o"></span><?php the_category(', '); ?></span>
|
||||
</div>
|
||||
<h5 class="blog-single-title"><a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h5>
|
||||
<div class="entry-content">
|
||||
<a class="post-link" href="<?php esc_url(the_permalink()); ?>"><?php esc_html_e( 'Read more', 'ekko' ); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying standard posts
|
||||
*
|
||||
* @link https://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package ekko
|
||||
* by KeyDesign
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
|
||||
if (!isset($redux_ThemeTek['tek-blog-sidebar'])) {
|
||||
$redux_ThemeTek['tek-blog-sidebar'] = 0;
|
||||
}
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> >
|
||||
<h2 class="blog-single-title"><a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
|
||||
<div class="entry-meta">
|
||||
<?php if ( is_sticky() ) echo '<span class="fa fa-thumb-tack"></span> Sticky <span class="blog-separator">|</span> '; ?>
|
||||
<span class="published"><span class="fa fa-clock-o"></span><a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><?php the_time( get_option('date_format') ); ?></a></span>
|
||||
<span class="author"><span class="fa fa-keyboard-o"></span><?php the_author_posts_link(); ?></span>
|
||||
<span class="blog-label"><span class="fa fa-folder-open-o"></span><?php the_category(', '); ?></span>
|
||||
<span class="comment-count"><span class="fa fa-comment-o"></span><?php comments_popup_link( esc_html__('No comments yet', 'ekko'), esc_html__('1 comment', 'ekko'), esc_html__('% comments', 'ekko') ); ?></span>
|
||||
</div>
|
||||
<div class="entry-content">
|
||||
<?php the_excerpt(); ?>
|
||||
<?php wp_link_pages(); ?>
|
||||
</div>
|
||||
</article>
|
||||
27
wp-content/themes/ekko/core/templates/post/content-none.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying a message that posts cannot be found
|
||||
*
|
||||
* @link https://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package ekko
|
||||
* by KeyDesign
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<section id="posts-content" class="container">
|
||||
<div class="row">
|
||||
<h2 class="section-title"><?php esc_html_e( 'Nothing Found', 'ekko' ); ?></h2>
|
||||
<?php
|
||||
if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
|
||||
<p><?php printf( wp_kses( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'ekko' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
|
||||
<?php elseif ( is_search() ) : ?>
|
||||
<p class="section-subheading"><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again using different keywords.', 'ekko' ); ?></p>
|
||||
<?php get_search_form();
|
||||
else : ?>
|
||||
<p><?php esc_html_e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'ekko' ); ?></p>
|
||||
<?php get_search_form();
|
||||
endif; ?>
|
||||
</div>
|
||||
</section><!-- .no-results -->
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying posts with excerpts
|
||||
*
|
||||
* @link https://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package ekko
|
||||
* by KeyDesign
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
|
||||
if (!isset($redux_ThemeTek['tek-blog-sidebar'])) {
|
||||
$redux_ThemeTek['tek-blog-sidebar'] = 0;
|
||||
}
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> >
|
||||
<h2 class="blog-single-title"><a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
|
||||
<?php if ( 'post' === get_post_type() ) : ?>
|
||||
<div class="entry-meta">
|
||||
<span class="page-type"><span class="fa fa-file-text-o"></span><?php esc_html_e( 'Post', 'ekko' ); ?></span>
|
||||
<span class="published"><span class="fa fa-clock-o"></span><a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><?php the_time( get_option('date_format') ); ?></a></span>
|
||||
<span class="author"><span class="fa fa-keyboard-o"></span><?php the_author_posts_link(); ?></span>
|
||||
<span class="blog-label"><span class="fa fa-folder-open-o"></span><?php the_category(', '); ?></span>
|
||||
<span class="comment-count"><span class="fa fa-comment-o"></span><?php comments_popup_link( esc_html__('No comments yet', 'ekko'), esc_html__('1 comment', 'ekko'), esc_html__('% comments', 'ekko') ); ?></span>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="entry-meta">
|
||||
<?php if ( 'page' === get_post_type() ) : ?>
|
||||
<span class="page-type"><span class="fa fa-file-text-o"></span><?php esc_html_e( 'Page', 'ekko' ); ?></span>
|
||||
<?php elseif ( 'portfolio' === get_post_type() ) : ?>
|
||||
<span class="page-type"><span class="fa fa-file-image-o"></span><?php esc_html_e( 'Portfolio', 'ekko' ); ?></span>
|
||||
<?php elseif ( 'product' === get_post_type() ) : ?>
|
||||
<span class="page-type"><span class="fa fa-shopping-cart"></span><?php esc_html_e( 'Product', 'ekko' ); ?></span>
|
||||
<?php endif; ?>
|
||||
<span class="published"><span class="fa fa-clock-o"></span><a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><?php the_time( get_option('date_format') ); ?></a></span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="entry-content">
|
||||
<?php if ( has_excerpt() ) {
|
||||
the_excerpt();
|
||||
} ?>
|
||||
<a class="post-link" href="<?php esc_url(the_permalink()); ?>"><?php esc_html_e( 'Read more', 'ekko' ); ?></a>
|
||||
</div>
|
||||
</article>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* The Template for displaying all single posts.
|
||||
* @package ekko
|
||||
* by KeyDesign
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
?>
|
||||
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<div class="blog-single-content">
|
||||
<div class="blog-content">
|
||||
<?php the_content(); ?>
|
||||
<?php wp_link_pages(); ?>
|
||||
</div>
|
||||
<div class="meta-content">
|
||||
<?php do_action( 'keydesign_post_after_main_content' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying standard posts
|
||||
*
|
||||
* @link https://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package ekko
|
||||
* by KeyDesign
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
|
||||
if (!isset($redux_ThemeTek['tek-blog-sidebar'])) {
|
||||
$redux_ThemeTek['tek-blog-sidebar'] = 0;
|
||||
}
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> >
|
||||
<a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><h2 class="blog-single-title"><?php the_title(); ?></h2></a>
|
||||
<div class="entry-meta">
|
||||
<?php if ( is_sticky() ) echo '<span class="fa fa-thumb-tack"></span> Sticky <span class="blog-separator">|</span> '; ?>
|
||||
<span class="published"><span class="fa fa-clock-o"></span><a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><?php the_time( get_option('date_format') ); ?></a></span>
|
||||
<span class="author"><span class="fa fa-keyboard-o"></span><?php the_author_posts_link(); ?></span>
|
||||
<span class="blog-label"><span class="fa fa-folder-open-o"></span><?php the_category(', '); ?></span>
|
||||
<span class="comment-count"><span class="fa fa-comment-o"></span><?php comments_popup_link( esc_html__('No comments yet', 'ekko'), esc_html__('1 comment', 'ekko'), esc_html__('% comments', 'ekko') ); ?></span>
|
||||
</div>
|
||||
<a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('large'); ?></a>
|
||||
<div class="entry-content">
|
||||
<?php if(has_excerpt()) : ?>
|
||||
<?php the_excerpt(); ?>
|
||||
<?php else : ?>
|
||||
<div class="page-content"><?php the_content(); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php wp_link_pages(); ?>
|
||||
<a class="post-link" href="<?php esc_url(the_permalink()); ?>"><?php echo apply_filters( 'blog-readmore-text', esc_html__("Read more", "ekko") ); ?><span class="fa fa-chevron-right"></span></a>
|
||||
</div>
|
||||
</article>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying Author info box
|
||||
*/
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
if( false === $redux_ThemeTek['tek-author-box'] ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Initialize needed variables
|
||||
global $authordata;
|
||||
$author_id = is_object( $authordata ) ? $authordata->ID : -1;
|
||||
?>
|
||||
<?php if ('' != get_the_author_meta( 'description', $author_id )) : ?>
|
||||
<div class="author-box-wrapper">
|
||||
<figure class="author-avatar">
|
||||
<?php echo get_avatar( get_the_author_meta( 'user_email' ), 85 ); ?>
|
||||
</figure>
|
||||
<div class="author-desc-wrapper">
|
||||
<div class="author-name">
|
||||
<h6><?php esc_html_e('Author:', 'ekko'); ?> <?php the_author_posts_link(); ?></h6>
|
||||
</div>
|
||||
<?php if ('' != get_the_author_meta( 'user_url', $author_id )) : ?>
|
||||
<div class="author-website">
|
||||
<p><?php esc_html_e('Website:', 'ekko'); ?> <a href="<?php echo get_the_author_meta( 'user_url', $author_id ); ?>"><?php echo get_the_author_meta( 'user_url', $author_id ); ?></a></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="author-desc">
|
||||
<?php echo get_the_author_meta( 'description', $author_id ); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* The template used for displaying comments for single Blog posts
|
||||
*/
|
||||
?>
|
||||
|
||||
<section class="page-content comments-content">
|
||||
<div class="container">
|
||||
<?php
|
||||
// If comments are open or we have at least one comment, load up the comment template
|
||||
if ( comments_open() || '0' != get_comments_number() ) {
|
||||
comments_template();
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* The template used for displaying meta information for single Blog posts
|
||||
*/
|
||||
?>
|
||||
|
||||
<div class="entry-meta">
|
||||
<?php if ( is_sticky() ) echo '<span class="fa fa-thumb-tack"></span> Sticky <span class="blog-separator">|</span> '; ?>
|
||||
<span class="published"><span class="fa fa-clock-o"></span><?php the_time( get_option('date_format') ); ?></span>
|
||||
<span class="author"><span class="fa fa-keyboard-o"></span><?php the_author_posts_link(); ?></span>
|
||||
<span class="blog-label"><span class="fa fa-folder-open-o"></span><?php the_category(', '); ?></span>
|
||||
</div>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
/**
|
||||
* The template used for displaying navigation for single Blog posts
|
||||
*/
|
||||
?>
|
||||
|
||||
<div class="navigation pagination">
|
||||
<?php previous_post_link('%link', esc_html__('Previous', 'ekko')); ?>
|
||||
<?php next_post_link('%link', esc_html__('Next', 'ekko')); ?>
|
||||
</div>
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying Related posts for Blog posts
|
||||
*/
|
||||
|
||||
if(!( 'post' == get_post_type() )) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$carousel_class = '';
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
$terms = get_the_terms( $post->ID , 'category', 'string');
|
||||
if ($terms == 0) {
|
||||
return false;
|
||||
}
|
||||
$term_ids = array_values( wp_list_pluck( $terms,'term_id' ) );
|
||||
|
||||
$related_query = new WP_Query(
|
||||
array(
|
||||
'post_type' => 'post',
|
||||
'tax_query' => array(
|
||||
array(
|
||||
'taxonomy' => 'category',
|
||||
'field' => 'id',
|
||||
'terms' => $term_ids,
|
||||
'operator'=> 'IN'
|
||||
)
|
||||
),
|
||||
'posts_per_page' => $redux_ThemeTek['tek-related-posts-number'],
|
||||
'ignore_sticky_posts' => 1,
|
||||
'orderby' => 'date',
|
||||
'post__not_in' => array($post->ID)
|
||||
)
|
||||
);
|
||||
|
||||
if( $related_query->found_posts == 0) {
|
||||
return false;
|
||||
}
|
||||
if ($related_query->found_posts > 3 && $redux_ThemeTek['tek-related-posts-number'] > 3) {
|
||||
$carousel_class = 'owlslider-related-posts';
|
||||
}
|
||||
?>
|
||||
|
||||
<section class="related-posts">
|
||||
<div class="container">
|
||||
<?php if (isset($redux_ThemeTek['tek-related-posts-title']) && $redux_ThemeTek['tek-related-posts-title'] != '') : ?>
|
||||
<div class="related-title">
|
||||
<h3><?php echo esc_html($redux_ThemeTek['tek-related-posts-title']); ?></h3>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="related-content <?php echo esc_attr($carousel_class); ?>">
|
||||
<?php
|
||||
if ( $related_query->have_posts() ) : while ( $related_query->have_posts() ) : $related_query->the_post();
|
||||
get_template_part('core/templates/post/blog', 'minimal-grid');
|
||||
endwhile;
|
||||
else :
|
||||
get_template_part('core/templates/post/content','none');
|
||||
endif;
|
||||
|
||||
wp_reset_postdata();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/**
|
||||
* The template used for displaying tags for single Blog posts
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php
|
||||
the_tags(
|
||||
'<div class="tags">',
|
||||
' ',
|
||||
'</div>'
|
||||
);
|
||||
?>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* The template used for displaying titles for single Blog posts
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php if ('quote' === get_post_format()) : ?>
|
||||
<h1 class="blog-single-title quote"><?php the_title(); ?></h1>
|
||||
<?php else : ?>
|
||||
<h1 class="blog-single-title"><?php the_title(); ?></h1>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
$content = apply_filters( 'the_content', get_the_content() );
|
||||
$audio = false;
|
||||
|
||||
// Only get video from the content if a playlist isn't present.
|
||||
if ( false === strpos( $content, 'wp-playlist-script' ) ) {
|
||||
$audio = get_media_embedded_in_content( $content, array( 'audio', 'iframe' ) );
|
||||
}
|
||||
?>
|
||||
<?php if ( '' !== get_the_post_thumbnail() && empty( $audio ) ) : ?>
|
||||
<div class="entry-image">
|
||||
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
|
||||
<?php the_post_thumbnail('large'); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ( !empty( $audio ) && !is_single() ) {
|
||||
foreach ( $audio as $audio_html ) {
|
||||
echo '<div class="entry-audio">'.$audio_html.'</div>';
|
||||
}
|
||||
}; ?>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php if ( '' !== get_the_post_thumbnail() && ! get_post_gallery() ) : ?>
|
||||
<div class="entry-image">
|
||||
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
|
||||
<?php the_post_thumbnail('large'); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php elseif (get_post_gallery() && !is_single()) : ?>
|
||||
<div class="entry-gallery">
|
||||
<?php echo get_post_gallery(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
<?php if ('quote' === get_post_format()) : ?>
|
||||
<h3 class="blog-single-title quote"><?php the_title(); ?></h3>
|
||||
<?php else : ?>
|
||||
<h3 class="blog-single-title"><a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
$content = apply_filters( 'the_content', get_the_content() );
|
||||
$video = false;
|
||||
|
||||
// Only get video from the content if a playlist isn't present.
|
||||
if ( false === strpos( $content, 'wp-playlist-script' ) ) {
|
||||
$video = get_media_embedded_in_content( $content, array( 'video', 'object', 'embed', 'iframe' ) );
|
||||
}
|
||||
?>
|
||||
<?php if ( '' !== get_the_post_thumbnail() && empty( $video ) ) : ?>
|
||||
<div class="entry-image">
|
||||
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
|
||||
<?php the_post_thumbnail('large'); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ( !empty( $video ) && !is_single() && class_exists('KEYDESIGN_ADDON_CLASS') ) {
|
||||
foreach ( $video as $video_html ) {
|
||||
echo '<div class="entry-video">
|
||||
<div class="video-cover">
|
||||
<div class="background-video-image">'. wp_get_attachment_image(get_post_thumbnail_id(), 'large') .'</div>
|
||||
<div class="play-video"><span class="fa fa-play"></span></div>';
|
||||
echo '<div class="kd-esc-video">'.$video_html.'</div>';
|
||||
echo '</div>
|
||||
</div>';
|
||||
}
|
||||
} elseif (!class_exists('KEYDESIGN_ADDON_CLASS')) {
|
||||
foreach ( $video as $video_html ) {
|
||||
echo '<div class="entry-video simple-video-iframe">'.$video_html.'</div>';
|
||||
}
|
||||
} ?>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php if (has_post_thumbnail()) : ?>
|
||||
<div class="entry-image">
|
||||
<?php if (is_single()) :
|
||||
the_post_thumbnail('large');
|
||||
else: ?>
|
||||
<a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('large'); ?></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
101
wp-content/themes/ekko/core/theme-activation.php
Normal file
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
// ------------------------------------------------------------------------
|
||||
// Include the TGM_Plugin_Activation class
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
include_once (get_template_directory() . '/core/assets/extra/class-tgm-plugin-activation.php');
|
||||
|
||||
// Register the required plugins for this theme.
|
||||
|
||||
if (!function_exists('keydesign_register_plugins'))
|
||||
{
|
||||
function keydesign_register_plugins()
|
||||
{
|
||||
$plugins = array(
|
||||
array(
|
||||
'name' => esc_html__('Redux Framework', 'ekko'),
|
||||
'slug' => 'redux-framework',
|
||||
'required' => true,
|
||||
),
|
||||
array(
|
||||
'name' => esc_html__('WPBakery Page Builder', 'ekko'),
|
||||
'slug' => 'js_composer',
|
||||
'source' => KEYDESIGN_THEME_PLUGINS_DIR . '/js_composer.zip',
|
||||
'required' => true,
|
||||
'version' => '6.1',
|
||||
'force_activation' => false,
|
||||
'force_deactivation' => false,
|
||||
),
|
||||
array(
|
||||
'name' => esc_html__('KeyDesign Addon', 'ekko'),
|
||||
'slug' => 'keydesign-addon',
|
||||
'source' => 'http://www.ekko-wp.com/external/keydesign-addon.zip',
|
||||
'required' => true,
|
||||
'version' => '2.9',
|
||||
'force_activation' => false,
|
||||
'force_deactivation' => false,
|
||||
'external_url' => 'http://www.ekko-wp.com/external/keydesign-addon.zip',
|
||||
),
|
||||
array(
|
||||
'name' => esc_html__('Slider Revolution', 'ekko'),
|
||||
'slug' => 'revslider',
|
||||
'source' => KEYDESIGN_THEME_PLUGINS_DIR . '/revslider.zip',
|
||||
'required' => true,
|
||||
'version' => '6.1.8',
|
||||
'force_activation' => false,
|
||||
'force_deactivation' => false,
|
||||
),
|
||||
array(
|
||||
'name' => esc_html__('WooCommerce', 'ekko'),
|
||||
'slug' => 'woocommerce',
|
||||
'required' => false,
|
||||
),
|
||||
array(
|
||||
'name' => esc_html__('Contact Form 7', 'ekko'),
|
||||
'slug' => 'contact-form-7',
|
||||
'required' => true,
|
||||
),
|
||||
array(
|
||||
'name' => esc_html__('Breadcrumb NavXT', 'ekko'),
|
||||
'slug' => 'breadcrumb-navxt',
|
||||
'required' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$config = array(
|
||||
'id' => 'tgmpa',
|
||||
'domain' => 'ekko',
|
||||
'default_path' => '',
|
||||
'parent_slug' => 'themes.php',
|
||||
'capability' => 'edit_theme_options',
|
||||
'menu' => 'install-required-plugins',
|
||||
'has_notices' => true,
|
||||
'is_automatic' => false,
|
||||
'message' => '',
|
||||
'strings' => array(
|
||||
'page_title' => esc_html__('Install Required Plugins', 'ekko'),
|
||||
'menu_title' => esc_html__('Install Plugins', 'ekko'),
|
||||
'installing' => esc_html__('Installing Plugin: %s', 'ekko'),
|
||||
'oops' => esc_html__('Something went wrong with the plugin API.', 'ekko') ,
|
||||
'notice_can_install_required' => esc_html__('This theme requires the following plugin: %1$s.', 'ekko'),
|
||||
'notice_can_install_recommended' => esc_html__('This theme recommends the following plugin: %1$s.', 'ekko'),
|
||||
'notice_cannot_install' => esc_html__('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.', 'ekko'),
|
||||
'notice_can_activate_required' => esc_html__('The following required plugin is currently inactive: %1$s.', 'ekko'),
|
||||
'notice_can_activate_recommended' => esc_html__('The following recommended plugin is currently inactive: %1$s.', 'ekko'),
|
||||
'notice_cannot_activate' => esc_html__('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.', 'ekko'),
|
||||
'notice_ask_to_update' => esc_html__('The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'ekko'),
|
||||
'notice_cannot_update' => esc_html__('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.', 'ekko'),
|
||||
'install_link' => esc_html__('Begin installing plugin', 'ekko') ,
|
||||
'activate_link' => esc_html__('Activate installed plugin', 'ekko') ,
|
||||
'return' => esc_html__('Return to Required Plugins Installer', 'ekko') ,
|
||||
'plugin_activated' => esc_html__('Plugin activated successfully.', 'ekko') ,
|
||||
'complete' => esc_html__('All plugins installed and activated successfully. %s', 'ekko'),
|
||||
'nag_type' => 'updated'
|
||||
)
|
||||
);
|
||||
tgmpa($plugins, $config);
|
||||
}
|
||||
}
|
||||
|
||||
add_action('tgmpa_register', 'keydesign_register_plugins');
|
||||
?>
|
||||
258
wp-content/themes/ekko/core/theme-pagemeta.php
Normal file
@@ -0,0 +1,258 @@
|
||||
<?php
|
||||
// ------------------------------------------------------------------------
|
||||
// Create metaboxes in pages
|
||||
// ------------------------------------------------------------------------
|
||||
// Adds meta boxes to the main column on the Page edit screens.
|
||||
function themetek_add_meta_box() {
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
$screens = array( 'page', 'portfolio' );
|
||||
foreach ( $screens as $screen ) {
|
||||
// Header
|
||||
add_meta_box(
|
||||
'themetek_pageheader',
|
||||
esc_html__( 'Header', 'ekko' ), 'themetek_meta_box_page_header', $screen, 'normal', 'high' );
|
||||
|
||||
// Page title
|
||||
add_meta_box(
|
||||
'themetek_pagetitle',
|
||||
esc_html__( 'Title Section', 'ekko' ), 'themetek_meta_box_title_section', $screen, 'normal', 'high' );
|
||||
|
||||
// Page settings
|
||||
add_meta_box(
|
||||
'themetek_pagesettings',
|
||||
esc_html__( 'Page Settings', 'ekko' ), 'themetek_meta_box_pagesettings', $screen, 'normal', 'high' );
|
||||
}
|
||||
|
||||
}
|
||||
add_action( 'add_meta_boxes', 'themetek_add_meta_box' );
|
||||
|
||||
// Print page header meta box content.
|
||||
function themetek_meta_box_page_header($post) {
|
||||
// Add an nonce field so we can check for it later
|
||||
wp_nonce_field( 'themetek_meta_box_page_header', 'themetek_meta_box_page_header_nonce' );
|
||||
// Retrieve an existing value from the database and use the value for the form.
|
||||
$themetek_page_transparent_navbar = get_post_meta( $post->ID, '_themetek_page_transparent_navbar', true );
|
||||
|
||||
// Show/hide title on pages
|
||||
echo '<div class="kd_meta_block_prim meta_block_bottom">';
|
||||
echo '<label for="page_transparent_navbar">';
|
||||
esc_html_e( 'Transparent navbar', 'ekko' );
|
||||
echo '</label>';
|
||||
$page_transparent_navbar_checked = '';
|
||||
if ($themetek_page_transparent_navbar == "yes") {
|
||||
$page_transparent_navbar_checked = 'checked="checked"';
|
||||
}
|
||||
echo '<input type="checkbox" id="page_transparent_navbar" name="page_transparent_navbar" value="yes" ' . esc_attr($page_transparent_navbar_checked) . ' />';
|
||||
echo '<span class="kd-meta-desc">';
|
||||
esc_html_e( 'If checked, the navbar section will take a transparent color. This option is linked with the homepage transparent settings.', 'ekko' );
|
||||
echo '</span>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
// Print page title meta box content.
|
||||
function themetek_meta_box_title_section($post) {
|
||||
// Add an nonce field so we can check for it later
|
||||
wp_nonce_field( 'themetek_meta_box_title_section', 'themetek_meta_box_title_section_nonce' );
|
||||
// Retrieve an existing value from the database and use the value for the form.
|
||||
$themetek_page_showhide_title_section = get_post_meta( $post->ID, '_themetek_page_showhide_title_section', true );
|
||||
$themetek_page_showhide_breadcrumbs = get_post_meta( $post->ID, '_themetek_page_showhide_breadcrumbs', true );
|
||||
$themetek_page_subtitle = get_post_meta( $post->ID, '_themetek_page_subtitle', true );
|
||||
$themetek_page_title_color = get_post_meta( $post->ID, '_themetek_page_title_color', true );
|
||||
$themetek_page_titlebar_background = get_post_meta( $post->ID, '_themetek_page_titlebar_background', true );
|
||||
|
||||
// Show/hide title on pages
|
||||
echo '<div class="kd_meta_block_prim meta_block_top">';
|
||||
echo '<label for="page_showhide_title_section">';
|
||||
esc_html_e( 'Hide page title section', 'ekko' );
|
||||
echo '</label>';
|
||||
$page_showhide_title_section_checked = '';
|
||||
if ($themetek_page_showhide_title_section == "yes") {
|
||||
$page_showhide_title_section_checked = 'checked="checked"';
|
||||
}
|
||||
echo '<input type="checkbox" id="page_showhide_title_section" name="page_showhide_title_section" value="yes" ' . esc_attr($page_showhide_title_section_checked) . ' />';
|
||||
echo '<span class="kd-meta-desc">';
|
||||
esc_html_e( 'If checked, title section will be hidden.', 'ekko' );
|
||||
echo '</span>';
|
||||
echo '</div>';
|
||||
// Show/hide breadcrumbs on pages
|
||||
echo '<div class="kd_meta_block_prim">';
|
||||
echo '<label for="page_showhide_breadcrumbs">';
|
||||
esc_html_e( 'Hide breadcrumbs', 'ekko' );
|
||||
echo '</label>';
|
||||
$page_showhide_breadcrumbs_checked = '';
|
||||
if ($themetek_page_showhide_breadcrumbs == "yes") {
|
||||
$page_showhide_breadcrumbs_checked = 'checked="checked"';
|
||||
}
|
||||
echo '<input type="checkbox" id="page_showhide_breadcrumbs" name="page_showhide_breadcrumbs" value="yes" ' . esc_attr($page_showhide_breadcrumbs_checked) . ' />';
|
||||
echo '<span class="kd-meta-desc">';
|
||||
esc_html_e( 'If checked, breadcrumbs will be hidden.', 'ekko' );
|
||||
echo '</span>';
|
||||
echo '</div>';
|
||||
// Page subtitle text
|
||||
echo '<div class="kd_meta_block_prim">';
|
||||
echo '<label for="page_subtitle">';
|
||||
esc_html_e( 'Page subtitle', 'ekko' );
|
||||
echo '</label>';
|
||||
echo '<input type="text" class="page_subtitle_box" id="page_subtitle" name="page_subtitle" value="' . esc_attr( $themetek_page_subtitle ) . '"/>';
|
||||
echo '<span class="kd-meta-desc">';
|
||||
esc_html_e( 'Write the section subtitle. Displayed under the main page title.', 'ekko' );
|
||||
echo '</span>';
|
||||
echo '</div>';
|
||||
// Text align
|
||||
$values_text_align = get_post_custom( $post->ID );
|
||||
$selected_text_align = isset( $values_text_align['page_title_align'] ) ? esc_attr( $values_text_align['page_title_align'][0] ) :'';
|
||||
|
||||
echo '<div class="kd_meta_block_prim">';
|
||||
echo '<label for="page_title_align">';
|
||||
esc_html_e( 'Title text align', 'ekko' );
|
||||
echo '</label>';
|
||||
echo '<select name="page_title_align" id="page_title_align">';
|
||||
echo '<option value="left-align" '.esc_attr(selected( $selected_text_align, 'left-align' )).'>Left</option>';
|
||||
echo '<option value="center-align" '.esc_attr(selected( $selected_text_align, 'center-align' )).'>Center</option>';
|
||||
echo '</select>';
|
||||
echo '</div>';
|
||||
// Page title and subtitle text color
|
||||
echo '<div class="kd_meta_block_prim">';
|
||||
echo '<label for="page_title_color">';
|
||||
esc_html_e( 'Title and subtitle color', 'ekko' );
|
||||
echo '</label>';
|
||||
echo '<input type="text" class="page_title_color_box" id="page_title_color" name="page_title_color" value="' . esc_attr( $themetek_page_title_color ) . '"/>';
|
||||
echo '<span class="kd-meta-desc">';
|
||||
esc_html_e( 'Specify the page title and subtitle color. Eg. #FFFFFF', 'ekko' );
|
||||
echo '</span>';
|
||||
echo '</div>';
|
||||
// Title bar background color
|
||||
echo '<div class="kd_meta_block_prim meta_block_bottom">';
|
||||
echo '<label for="page_titlebar_background">';
|
||||
esc_html_e( 'Title bar background color', 'ekko' );
|
||||
echo '</label>';
|
||||
echo '<input type="text" class="page_titlebar_background_box" id="page_titlebar_background" name="page_titlebar_background" value="' . esc_attr( $themetek_page_titlebar_background ) . '"/>';
|
||||
echo '<span class="kd-meta-desc">';
|
||||
esc_html_e( 'Specify the title bar background color. Eg. #FFFFFF', 'ekko' );
|
||||
echo '</span>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
// Print page settings meta box content.
|
||||
function themetek_meta_box_pagesettings($post) {
|
||||
// Add an nonce field so we can check for it later
|
||||
wp_nonce_field( 'themetek_meta_box_pagesettings', 'themetek_meta_box_pagesettings_nonce' );
|
||||
// Retrieve an existing value from the database and use the value for the form.
|
||||
$themetek_page_bgcolor = get_post_meta( $post->ID, '_themetek_page_bgcolor', true );
|
||||
$themetek_page_top_padding = get_post_meta( $post->ID, '_themetek_page_top_padding', true );
|
||||
$themetek_page_bottom_padding = get_post_meta( $post->ID, '_themetek_page_bottom_padding', true );
|
||||
|
||||
// Get page background color
|
||||
echo '<div class="kd_meta_block_prim meta_block">';
|
||||
echo '<label for="page_bgcolor">';
|
||||
esc_html_e( 'Background color', 'ekko' );
|
||||
echo '</label>';
|
||||
echo '<input class="themetek-meta-color" type="text" id="page_bgcolor" name="page_bgcolor" value="' . esc_attr( $themetek_page_bgcolor ) . '" />';
|
||||
echo '<span class="kd-meta-desc">';
|
||||
esc_html_e( 'Specify the page background color. Eg. #FFFFFF', 'ekko' );
|
||||
echo '</span>';
|
||||
echo '</div>';
|
||||
// Get page top padding
|
||||
echo '<div class="kd_meta_block_prim">';
|
||||
echo '<label for="page_top_padding">';
|
||||
esc_html_e( 'Top padding', 'ekko' );
|
||||
echo '</label>';
|
||||
echo '<input type="text" id="page_top_padding" name="page_top_padding" value="' . esc_attr( $themetek_page_top_padding ) . '" />';
|
||||
echo '<span class="kd-meta-desc">';
|
||||
esc_html_e( 'Specify the page top padding value. Eg. 10px', 'ekko' );
|
||||
echo '</span>';
|
||||
echo '</div>';
|
||||
// Get page bottom padding
|
||||
echo '<div class="kd_meta_block_prim meta_block_bottom">';
|
||||
echo '<label for="page_bottom_padding">';
|
||||
esc_html_e( 'Bottom padding', 'ekko' );
|
||||
echo '</label>';
|
||||
echo '<input type="text" id="page_bottom_padding" name="page_bottom_padding" value="' . esc_attr( $themetek_page_bottom_padding ) . '" />';
|
||||
echo '<span class="kd-meta-desc">';
|
||||
esc_html_e( 'Specify the page bottom padding value. Eg. 10px', 'ekko' );
|
||||
echo '</span>';
|
||||
echo '</div>';
|
||||
|
||||
}
|
||||
|
||||
|
||||
// When the post is saved, saves our custom data. (Regular pages)
|
||||
function themetek_save_meta_box_data( $post_id ) {
|
||||
// Check if our nonce is set.
|
||||
if ( ! isset( $_POST['themetek_meta_box_page_header_nonce'] ) ) {
|
||||
return $post_id;
|
||||
}
|
||||
if ( ! isset( $_POST['themetek_meta_box_title_section_nonce'] ) ) {
|
||||
return $post_id;
|
||||
}
|
||||
if ( ! isset( $_POST['themetek_meta_box_pagesettings_nonce'] ) ) {
|
||||
return $post_id;
|
||||
}
|
||||
|
||||
$nonce_pageheader = $_POST['themetek_meta_box_page_header_nonce'];
|
||||
$nonce_pagesettings = $_POST['themetek_meta_box_pagesettings_nonce'];
|
||||
$nonce_pagetitle = $_POST['themetek_meta_box_title_section_nonce'];
|
||||
// Verify that the nonce is valid.
|
||||
if ( ! wp_verify_nonce( $nonce_pageheader, 'themetek_meta_box_page_header' ) ) {
|
||||
return $post_id;
|
||||
}
|
||||
if ( ! wp_verify_nonce( $nonce_pagetitle, 'themetek_meta_box_title_section' ) ) {
|
||||
return $post_id;
|
||||
}
|
||||
if ( ! wp_verify_nonce( $nonce_pagesettings, 'themetek_meta_box_pagesettings' ) ) {
|
||||
return $post_id;
|
||||
}
|
||||
// If this is an autosave, our form has not been submitted, so we don't want to do anything.
|
||||
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
|
||||
return $post_id;
|
||||
}
|
||||
// Check the user's permissions.
|
||||
if ( 'page' == $_POST['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;
|
||||
}
|
||||
/* OK, it's safe for us to save the data now. */
|
||||
// Sanitize user input and update the meta field in the database.
|
||||
if( isset( $_POST[ 'page_transparent_navbar' ] ) ) {
|
||||
update_post_meta( $post_id, '_themetek_page_transparent_navbar', 'yes' );
|
||||
} else {
|
||||
update_post_meta( $post_id, '_themetek_page_transparent_navbar', '' );
|
||||
}
|
||||
if( isset( $_POST[ 'page_bgcolor' ] ) ) {
|
||||
update_post_meta( $post_id, '_themetek_page_bgcolor', sanitize_text_field( $_POST[ 'page_bgcolor' ] ) );
|
||||
}
|
||||
if( isset( $_POST[ 'page_top_padding' ] ) ) {
|
||||
update_post_meta( $post_id, '_themetek_page_top_padding', sanitize_text_field( $_POST[ 'page_top_padding' ] ) );
|
||||
}
|
||||
if( isset( $_POST[ 'page_bottom_padding' ] ) ) {
|
||||
update_post_meta( $post_id, '_themetek_page_bottom_padding', sanitize_text_field( $_POST[ 'page_bottom_padding' ] ) );
|
||||
}
|
||||
if( isset( $_POST[ 'page_showhide_title_section' ] ) ) {
|
||||
update_post_meta( $post_id, '_themetek_page_showhide_title_section', 'yes' );
|
||||
} else {
|
||||
update_post_meta( $post_id, '_themetek_page_showhide_title_section', '' );
|
||||
}
|
||||
if( isset( $_POST[ 'page_showhide_breadcrumbs' ] ) ) {
|
||||
update_post_meta( $post_id, '_themetek_page_showhide_breadcrumbs', 'yes' );
|
||||
} else {
|
||||
update_post_meta( $post_id, '_themetek_page_showhide_breadcrumbs', '' );
|
||||
}
|
||||
if( isset( $_POST[ 'page_subtitle' ] ) ) {
|
||||
update_post_meta( $post_id, '_themetek_page_subtitle', sanitize_text_field( $_POST[ 'page_subtitle' ] ) );
|
||||
}
|
||||
if( isset( $_POST['page_title_align'] ) ) {
|
||||
update_post_meta( $post_id, 'page_title_align', esc_attr( $_POST['page_title_align'] ) );
|
||||
}
|
||||
if( isset( $_POST[ 'page_title_color' ] ) ) {
|
||||
update_post_meta( $post_id, '_themetek_page_title_color', sanitize_text_field( $_POST[ 'page_title_color' ] ) );
|
||||
}
|
||||
if( isset( $_POST[ 'page_titlebar_background' ] ) ) {
|
||||
update_post_meta( $post_id, '_themetek_page_titlebar_background', sanitize_text_field( $_POST[ 'page_titlebar_background' ] ) );
|
||||
}
|
||||
}
|
||||
add_action( 'save_post', 'themetek_save_meta_box_data' );
|
||||
|
||||
?>
|
||||
95
wp-content/themes/ekko/core/theme-sidebars.php
Normal file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
// ------------------------------------------------------------------------
|
||||
// Register widgetized areas
|
||||
// ------------------------------------------------------------------------
|
||||
function keydesign_sidebars_register() {
|
||||
register_sidebar( array(
|
||||
'name' => esc_html__( 'Blog Sidebar', 'ekko' ),
|
||||
'id' => 'blog-sidebar',
|
||||
'class' => '',
|
||||
'description' => esc_html__( 'Add widgets for the blog sidebar area. If none added, default sidebar widgets will be used.', 'ekko' ),
|
||||
'before_widget' => '<div id="%1$s" class="blog_widget widget %2$s">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h5 class="widget-title"><span>',
|
||||
'after_title' => '</span></h5>',
|
||||
) );
|
||||
register_sidebar( array(
|
||||
'name' => esc_html__( 'Shop Sidebar', 'ekko' ),
|
||||
'id' => 'shop-sidebar',
|
||||
'class' => '',
|
||||
'description' => esc_html__( 'A sidebar that only appears on WooCommerce Shop pages.', 'ekko' ),
|
||||
'before_widget' => '<div id="%1$s" class="blog_widget widget %2$s">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h5 class="widget-title"><span>',
|
||||
'after_title' => '</span></h5>',
|
||||
) );
|
||||
if ( class_exists( 'bbPress' ) ) {
|
||||
register_sidebar( array(
|
||||
'name' => esc_html__( 'bbPress Sidebar', 'ekko' ),
|
||||
'id' => 'bbpress-sidebar',
|
||||
'class' => '',
|
||||
'description' => esc_html__( 'A sidebar that only appears on bbPress pages.', 'ekko' ),
|
||||
'before_widget' => '<div id="%1$s" class="blog_widget widget %2$s">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h5 class="widget-title"><span>',
|
||||
'after_title' => '</span></h5>',
|
||||
) );
|
||||
}
|
||||
register_sidebar( array(
|
||||
'name' => esc_html__( 'Page Sidebar', 'ekko' ),
|
||||
'id' => 'page-sidebar',
|
||||
'class' => '',
|
||||
'description' => esc_html__( 'Add widgets for the single page sidebar area.', 'ekko' ),
|
||||
'before_widget' => '<div id="%1$s" class="blog_widget widget %2$s">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h5 class="widget-title"><span>',
|
||||
'after_title' => '</span></h5>',
|
||||
) );
|
||||
|
||||
register_sidebar( array(
|
||||
'name' => esc_html__( 'Footer first widget area', 'ekko' ),
|
||||
'id' => 'footer-first-widget-area',
|
||||
'class' => '',
|
||||
'description' => esc_html__( 'Add one widget for the first footer widget area.', 'ekko' ),
|
||||
'before_widget' => '<div id="%1$s" class="footer_widget widget %2$s">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h5 class="widget-title"><span>',
|
||||
'after_title' => '</span></h5>',
|
||||
) );
|
||||
|
||||
register_sidebar( array(
|
||||
'name' => esc_html__( 'Footer second widget area', 'ekko' ),
|
||||
'id' => 'footer-second-widget-area',
|
||||
'class' => '',
|
||||
'description' => esc_html__( 'Add one widget for the second footer widget area.', 'ekko' ),
|
||||
'before_widget' => '<div id="%1$s" class="footer_widget widget %2$s">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h5 class="widget-title"><span>',
|
||||
'after_title' => '</span></h5>',
|
||||
) );
|
||||
|
||||
register_sidebar( array(
|
||||
'name' => esc_html__( 'Footer third widget area', 'ekko' ),
|
||||
'id' => 'footer-third-widget-area',
|
||||
'class' => '',
|
||||
'description' => esc_html__( 'Add one widget for the third footer widget area.', 'ekko' ),
|
||||
'before_widget' => '<div id="%1$s" class="footer_widget widget %2$s">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h5 class="widget-title"><span>',
|
||||
'after_title' => '</span></h5>',
|
||||
) );
|
||||
|
||||
register_sidebar( array(
|
||||
'name' => esc_html__( 'Footer fourth widget area', 'ekko' ),
|
||||
'id' => 'footer-fourth-widget-area',
|
||||
'class' => '',
|
||||
'description' => esc_html__( 'Add one widget for the fourth footer widget area.', 'ekko' ),
|
||||
'before_widget' => '<div id="%1$s" class="footer_widget widget %2$s">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h5 class="widget-title"><span>',
|
||||
'after_title' => '</span></h5>',
|
||||
) );
|
||||
}
|
||||
|
||||
add_action( 'widgets_init', 'keydesign_sidebars_register' );
|
||||
?>
|
||||
189
wp-content/themes/ekko/core/theme-woocommerce.php
Normal file
@@ -0,0 +1,189 @@
|
||||
<?php
|
||||
|
||||
// Remove WooCommerce enqueued styles
|
||||
add_filter( 'woocommerce_enqueue_styles', '__return_empty_array' );
|
||||
|
||||
// Remove WooCommerce prettyPhoto
|
||||
add_action( 'wp_enqueue_scripts', 'keydesign_remove_woo_scripts', 99 );
|
||||
|
||||
function keydesign_remove_woo_scripts() {
|
||||
wp_dequeue_style( 'woocommerce_prettyPhoto_css' );
|
||||
wp_dequeue_script( 'prettyPhoto' );
|
||||
wp_dequeue_script( 'prettyPhoto-init' );
|
||||
}
|
||||
|
||||
function keydesign_remove_customizer($wp_customize) {
|
||||
$wp_customize->remove_control('woocommerce_catalog_columns');
|
||||
}
|
||||
add_action('customize_register', 'keydesign_remove_customizer', 20, 1);
|
||||
|
||||
|
||||
// Add product template style to post class
|
||||
add_filter( 'wc_product_class', 'keydesign_woo_catalog_style' );
|
||||
function keydesign_woo_catalog_style( $classes ) {
|
||||
if (!is_admin()) {
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
|
||||
global $product;
|
||||
$product_id = wc_get_product();
|
||||
|
||||
if( $product_id && !isset($redux_ThemeTek['tek-woo-catalog-style']) ) {
|
||||
$classes[] = 'woo-detailed-style';
|
||||
} elseif ( $product_id ) {
|
||||
$classes[] = $redux_ThemeTek['tek-woo-catalog-style'];
|
||||
}
|
||||
return $classes;
|
||||
}
|
||||
}
|
||||
|
||||
// Add wrappers for product listing
|
||||
function keydesign_woo_start_image_wrapper() {
|
||||
echo '<div class="woo-entry-image">';
|
||||
};
|
||||
add_action( 'woocommerce_before_shop_loop_item_title', 'keydesign_woo_start_image_wrapper', 5, 2 );
|
||||
|
||||
function keydesign_woo_end_image_wrapper() {
|
||||
echo '</div><div class="woo-entry-wrapper">';
|
||||
};
|
||||
add_action( 'woocommerce_before_shop_loop_item_title', 'keydesign_woo_end_image_wrapper', 12, 2 );
|
||||
|
||||
function keydesign_woo_end_entry_wrapper() {
|
||||
echo '</div>';
|
||||
};
|
||||
add_action( 'woocommerce_after_shop_loop_item', 'keydesign_woo_end_entry_wrapper', 12, 2 );
|
||||
|
||||
|
||||
// Return 3 related products
|
||||
add_filter( 'woocommerce_output_related_products_args', 'keydesign_woo_related_products' );
|
||||
function keydesign_woo_related_products( $args ) {
|
||||
$args['posts_per_page'] = 3;
|
||||
$args['columns'] = 3;
|
||||
return $args;
|
||||
}
|
||||
|
||||
// Return number of products in shop page
|
||||
add_filter( 'loop_shop_per_page', 'keydesign_loop_shop_per_page' );
|
||||
function keydesign_loop_shop_per_page( $product_number ) {
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
$product_number = $redux_ThemeTek['tek-woo-products-number'];
|
||||
return $product_number;
|
||||
}
|
||||
|
||||
function kd_get_gallery_image_html( $attachment_id, $main_image = false ) {
|
||||
$flexslider = (bool) apply_filters( 'woocommerce_single_product_flexslider_enabled', get_theme_support( 'wc-product-gallery-slider' ) );
|
||||
$gallery_thumbnail = wc_get_image_size( 'gallery_thumbnail' );
|
||||
$thumbnail_size = apply_filters( 'woocommerce_gallery_thumbnail_size', array( $gallery_thumbnail['width'], $gallery_thumbnail['height'] ) );
|
||||
$image_size = apply_filters( 'woocommerce_gallery_image_size', $flexslider || $main_image ? 'woocommerce_single' : $thumbnail_size );
|
||||
$full_size = apply_filters( 'woocommerce_gallery_full_size', apply_filters( 'woocommerce_product_thumbnails_large_size', 'full' ) );
|
||||
$thumbnail_src = wp_get_attachment_image_src( $attachment_id, $thumbnail_size );
|
||||
$full_src = wp_get_attachment_image_src( $attachment_id, $full_size );
|
||||
$image = wp_get_attachment_image( $attachment_id, $image_size, false, array(
|
||||
'title' => get_post_field( 'post_title', $attachment_id ),
|
||||
'data-caption' => get_post_field( 'post_excerpt', $attachment_id ),
|
||||
'data-src' => $full_src[0],
|
||||
'data-large_image' => $full_src[0],
|
||||
'data-large_image_width' => $full_src[1],
|
||||
'data-large_image_height' => $full_src[2],
|
||||
'class' => $main_image ? 'wp-post-image' : '',
|
||||
) );
|
||||
|
||||
return '<div data-thumb="' . esc_url( $thumbnail_src[0] ) . '" class="woocommerce-product-gallery__image"><a href="' . esc_url( $full_src[0] ) . '" data-size="' . esc_attr($full_src[1]) . 'x' . esc_attr($full_src[2]) . '">' . $image . '</a></div>';
|
||||
}
|
||||
|
||||
// Move position of related and upsells products
|
||||
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );
|
||||
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );
|
||||
|
||||
add_action ( 'woocommerce_after_main_content', 'woocommerce_output_related_products', 2);
|
||||
add_action ( 'woocommerce_after_main_content', 'woocommerce_upsell_display', 5);
|
||||
|
||||
function keydesign_enqueue_woocommerce() {
|
||||
wp_enqueue_style( 'keydesign-woocommerce', get_template_directory_uri() . '/core/assets/css/woocommerce.css', array(), null, 'all' );
|
||||
wp_register_script( 'keydesign-ajaxcart', get_template_directory_uri() . '/core/assets/js/woocommerce-keydesign.js', array() , null );
|
||||
|
||||
wp_localize_script(
|
||||
'keydesign-ajaxcart',
|
||||
'keydesign_menucart_ajax',array('nonce' => wp_create_nonce('keydesign-ajaxcart'))
|
||||
);
|
||||
wp_enqueue_script( 'keydesign-ajaxcart' );
|
||||
}
|
||||
add_action('wp_enqueue_scripts', 'keydesign_enqueue_woocommerce', 98 );
|
||||
|
||||
function keydesign_get_cart_items() {
|
||||
global $woocommerce;
|
||||
$articles = sizeof( $woocommerce->cart->get_cart() );
|
||||
$cart = $items_total = '';
|
||||
|
||||
if ( $articles > 0 ) {
|
||||
$items_total = $woocommerce->cart->cart_contents_count;
|
||||
foreach ( $woocommerce->cart->get_cart() as $cart_item_key => $cart_item ) {
|
||||
$_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
|
||||
$product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key );
|
||||
if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_widget_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
|
||||
$product_name = apply_filters( 'woocommerce_cart_item_name', $_product->get_title(), $cart_item, $cart_item_key );
|
||||
$thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key );
|
||||
$product_price = apply_filters( 'woocommerce_cart_item_price', $woocommerce->cart->get_product_price( $_product ), $cart_item, $cart_item_key );
|
||||
|
||||
$cart .= '<li class="cart-item-list clearfix">';
|
||||
if ( ! $_product->is_visible() ) {
|
||||
$cart .= str_replace( array( 'http:', 'https:' ), '', $thumbnail );
|
||||
} else {
|
||||
$cart .= '<a class="cart-thumb" href="'.esc_url(get_permalink( $product_id )).'">
|
||||
'.str_replace( array( 'http:', 'https:' ), '', $thumbnail ) . '
|
||||
</a>';
|
||||
}
|
||||
|
||||
$cart .= '<div class="cart-desc"><a class="cart-item" href="'.esc_url(get_permalink( $product_id )).'">' . $product_name . '</a>';
|
||||
$cart .= '<span class="product-quantity">'. apply_filters( 'woocommerce_widget_cart_item_quantity', '<span class="quantity-container">' . sprintf( '%s × %s',$cart_item['quantity'] , '</span>' . $product_price ) , $cart_item, $cart_item_key ) . '</span>';
|
||||
$cart .= '</div>';
|
||||
$cart .= '</li>';
|
||||
}
|
||||
}
|
||||
|
||||
$cart .= '<li class="subtotal"><span><strong>' . esc_html__('Subtotal:', 'ekko') . '</strong> ' . $woocommerce->cart->get_cart_total() . '</span></li>';
|
||||
$cart .= '<li class="buttons clearfix">
|
||||
<a href="'.wc_get_cart_url().'" class="tt_button tt_secondary_button btn_primary_color hover_outline_secondary kd_cart_btn"><i class="fa fa-bag"></i>'.esc_html__( 'View Cart', 'ekko' ).'</a>
|
||||
<a href="'.wc_get_checkout_url().'" class="tt_button tt_primary_button btn_primary_color kd_checkout_btn"><i class="fa fa-square-check"></i>'.esc_html__( 'Checkout', 'ekko' ).'</a>
|
||||
</li>';
|
||||
}
|
||||
return array('cart' => $cart, 'articles' => $items_total);
|
||||
}
|
||||
|
||||
function keydesign_woomenucart_ajax() {
|
||||
if ( !wp_verify_nonce( $_REQUEST['nonce'], "keydesign-ajaxcart")) {
|
||||
exit();
|
||||
}
|
||||
|
||||
$cart = keydesign_get_cart_items();
|
||||
echo json_encode($cart);
|
||||
die();
|
||||
}
|
||||
|
||||
add_action( 'wp_ajax_woomenucart_ajax', 'keydesign_woomenucart_ajax');
|
||||
add_action( 'wp_ajax_nopriv_woomenucart_ajax', 'keydesign_woomenucart_ajax' );
|
||||
|
||||
function keydesign_add_cart_in_menu() {
|
||||
global $woocommerce;
|
||||
$redux_ThemeTek = get_option( 'redux_ThemeTek' );
|
||||
$items_total = $woocommerce->cart->cart_contents_count;
|
||||
$get_cart_items = keydesign_get_cart_items();
|
||||
$cart_container ='';
|
||||
if ((isset($get_cart_items['cart'])) && ($get_cart_items['cart'] !=='')) {
|
||||
$cart_container = '<ul role="menu" class="drop-menu cart_list product_list_widget keydesign-cart-dropdown">'.((isset($get_cart_items['cart']) && $get_cart_items['cart'] !=='') ? $get_cart_items['cart'] : '<li><span class="empty-cart">' . esc_html__('Your cart is currently empty','ekko') . '</span></li>').'</ul>';
|
||||
}
|
||||
$kd_cart_items = '<div class="keydesign-cart menu-item menu-item-has-children dropdown">
|
||||
<a href="'.wc_get_cart_url().'" class="dropdown-toggle" title="cart">
|
||||
<span class="cart-icon-container">';
|
||||
if (isset($redux_ThemeTek['tek-woo-cart-icon-selector']) && $redux_ThemeTek['tek-woo-cart-icon-selector'] == 'shopping-cart') {
|
||||
$kd_cart_items .= '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 19.5c0 .829-.672 1.5-1.5 1.5s-1.5-.671-1.5-1.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5zm3.5-1.5c-.828 0-1.5.671-1.5 1.5s.672 1.5 1.5 1.5 1.5-.671 1.5-1.5c0-.828-.672-1.5-1.5-1.5zm1.336-5l1.977-7h-16.813l2.938 7h11.898zm4.969-10l-3.432 12h-12.597l.839 2h13.239l3.474-12h1.929l.743-2h-4.195z"/></svg>';
|
||||
} elseif ($redux_ThemeTek['tek-woo-cart-icon-selector'] == 'shopping-bag') {
|
||||
$kd_cart_items .= '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M16 6v-2c0-2.209-1.791-4-4-4s-4 1.791-4 4v2h-5v18h18v-18h-5zm-7-2c0-1.654 1.346-3 3-3s3 1.346 3 3v2h-6v-2zm10 18h-14v-14h3v1.5c0 .276.224.5.5.5s.5-.224.5-.5v-1.5h6v1.5c0 .276.224.5.5.5s.5-.224.5-.5v-1.5h3v14z"/></svg>';
|
||||
} elseif ($redux_ThemeTek['tek-woo-cart-icon-selector'] == 'shopping-basket') {
|
||||
$kd_cart_items .= '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M4.558 7l4.701-4.702c.199-.198.46-.298.721-.298.613 0 1.02.505 1.02 1.029 0 .25-.092.504-.299.711l-3.26 3.26h-2.883zm12.001 0h2.883l-4.701-4.702c-.199-.198-.46-.298-.721-.298-.613 0-1.02.505-1.02 1.029 0 .25.092.504.299.711l3.26 3.26zm3.703 4l-.016.041-3.598 8.959h-9.296l-3.597-8.961-.016-.039h16.523zm3.738-2h-24v2h.643c.534 0 1.021.304 1.256.784l4.101 10.216h12l4.102-10.214c.233-.481.722-.786 1.256-.786h.642v-2z"/></svg>';
|
||||
}
|
||||
$kd_cart_items .= (( $items_total !== 0 ) ? '<span class="badge">'.$items_total.'</span>' : '<span class="badge" style="display: none;"></span>').'</span></a>'. $cart_container.'</div>';
|
||||
return $kd_cart_items;
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||