Version Description
- Feature - Integration with Flash Pro version
Download this release
Release Info
Developer | ThemeGrill |
Plugin | Flash Toolkit |
Version | 1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.0 to 1.1.0
- assets/css/admin.css +1 -0
- assets/css/admin.scss +534 -0
- assets/css/menu.css +1 -0
- assets/css/menu.scss +38 -0
- assets/css/widgets.css +1 -1
- assets/css/widgets.scss +37 -0
- assets/js/admin/admin.js +22 -0
- assets/js/admin/admin.min.js +1 -0
- assets/js/admin/meta-boxes-layout.js +11 -0
- assets/js/admin/meta-boxes-layout.min.js +1 -0
- assets/js/admin/meta-boxes.js +18 -0
- assets/js/admin/meta-boxes.min.js +1 -0
- assets/js/admin/sidebars.js +58 -0
- assets/js/admin/sidebars.min.js +1 -0
- assets/js/admin/widgets.js +26 -0
- assets/js/admin/widgets.min.js +1 -1
- assets/js/jquery-tiptip/jquery.tipTip.js +191 -0
- assets/js/jquery-tiptip/jquery.tipTip.min.js +1 -0
- composer.lock +295 -0
- flash-toolkit.php +8 -2
- includes/abstracts/abstract-flash-widget.php +5 -1
- includes/abstracts/views/html-admin-tmpl-repeater.php +1 -1
- includes/admin/class-flash-admin-assets.php +47 -2
- includes/admin/class-flash-admin-meta-boxes.php +172 -0
- includes/admin/class-flash-admin-notices.php +3 -3
- includes/admin/class-flash-admin-post-types.php +144 -0
- includes/admin/class-flash-admin.php +36 -0
- includes/admin/functions-flash-admin.php +21 -0
- includes/admin/functions-flash-meta-box.php +254 -0
- includes/admin/meta-boxes/class-flash-meta-box-layout-data.php +89 -0
- includes/admin/meta-boxes/class-flash-meta-box-portfolio-data.php +118 -0
- includes/admin/views/html-admin-tmpl-sidebars.php +18 -0
- includes/admin/views/html-notice-custom.php +1 -1
- includes/admin/views/html-notice-updated.php +1 -1
- includes/class-flash-ajax.php +84 -0
- includes/class-flash-autoloader.php +83 -0
- includes/class-flash-install.php +1 -1
- includes/class-flash-post-types.php +8 -0
- includes/class-flash-sidebars.php +130 -0
- includes/functions-flash-core.php +160 -72
- includes/functions-flash-formatting.php +21 -0
- includes/widgets/class-flash-widget-about.php +4 -9
- includes/widgets/class-flash-widget-blog.php +3 -8
- includes/widgets/class-flash-widget-counter.php +3 -7
- includes/widgets/class-flash-widget-cta.php +3 -10
- includes/widgets/class-flash-widget-heading.php +3 -5
- includes/widgets/class-flash-widget-image.php +3 -5
- includes/widgets/class-flash-widget-logo.php +3 -9
- includes/widgets/class-flash-widget-portfolio.php +5 -8
- includes/widgets/class-flash-widget-service.php +3 -11
- includes/widgets/class-flash-widget-slider.php +8 -7
- includes/widgets/class-flash-widget-team.php +3 -11
- includes/widgets/class-flash-widget-testimonial.php +3 -19
- phpcs.ruleset.xml +193 -0
- readme.txt +5 -2
- templates/content-widget-about.php +6 -2
- templates/content-widget-blog.php +8 -4
- templates/content-widget-counter.php +6 -1
- templates/content-widget-cta.php +9 -1
- templates/content-widget-heading.php +5 -2
- templates/content-widget-image.php +7 -3
- templates/content-widget-logo.php +13 -12
- templates/content-widget-portfolio.php +8 -1
- templates/content-widget-service.php +12 -2
- templates/content-widget-slider.php +13 -2
- templates/content-widget-team.php +30 -20
- templates/content-widget-testimonial.php +2 -1
assets/css/admin.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
@charset "UTF-8";.select2-container .select2-choice,.select2-results .select2-result-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-touch-callout:none}.select2-container{margin:0;position:relative;display:block!important;zoom:1;vertical-align:middle}.select2-container,.select2-drop,.select2-search,.select2-search input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.select2-container .select2-choice{display:block;padding:0 0 0 8px;overflow:hidden;position:relative;border:1px solid #ccc;white-space:nowrap;color:#444;text-decoration:none;border-radius:3px;background-clip:padding-box;user-select:none;background-color:#fff;font-weight:400}html[dir=rtl] .select2-container .select2-choice{padding:0 8px 0 0}.select2-container.select2-drop-above .select2-choice{border-bottom-color:#ccc;border-radius:0 0 4px 4px}.select2-container.select2-allowclear .select2-choice .select2-chosen{margin-right:42px}.select2-container .select2-choice>.select2-chosen{margin-right:26px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;float:none;width:auto}html[dir=rtl] .select2-container .select2-choice>.select2-chosen{margin-left:26px;margin-right:0}.select2-container .select2-choice abbr{display:none;width:12px;height:12px;position:absolute;right:24px;top:5px;font-size:1px;text-decoration:none;border:0;background:url(../images/select2.png) right top no-repeat;cursor:pointer;outline:0}.select2-container.select2-allowclear .select2-choice abbr{display:inline-block}.select2-container .select2-choice abbr:hover{background-position:right -11px;cursor:pointer}.select2-drop-mask{border:0;margin:0;padding:0;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:9998;background-color:#fff;filter:alpha(opacity=0)}.select2-drop{width:100%;margin-top:-1px;position:absolute;top:100%;background:#fff;color:#000;border:1px solid #ccc;border-top:0;border-radius:0 0 3px 3px}.select2-drop.select2-drop-above{margin-top:1px;border-top:1px solid #ccc;border-bottom:0;border-radius:3px 3px 0 0}.select2-drop-active{border:1px solid #666;border-top:none}.select2-drop.select2-drop-above.select2-drop-active{border-top:1px solid #666}.select2-drop-auto-width{border-top:1px solid #ccc;width:auto}.select2-drop-auto-width .select2-search{padding-top:4px}.select2-container .select2-choice .select2-arrow{display:inline-block;width:18px;height:100%;position:absolute;right:0;top:0;border-radius:0 3px 3px 0;background-clip:padding-box}html[dir=rtl] .select2-container .select2-choice .select2-arrow{left:0;right:auto;border-radius:3px 0 0 3px}.select2-container .select2-choice .select2-arrow b{display:block;width:100%;height:100%;position:relative}.select2-container .select2-choice .select2-arrow b:after{position:absolute;display:block;content:"";top:50%;left:50%;border:4px solid transparent;border-top-color:#666;margin-left:-7px;margin-top:-2px}.select2-search{display:inline-block;width:100%;margin:0;padding-left:4px;padding-right:4px;position:relative;z-index:10000;white-space:nowrap;padding-bottom:4px}.select2-search input{width:100%;height:auto!important;padding:4px 20px 4px 5px!important;margin:0;outline:0;font-family:sans-serif;font-size:1em;border:1px solid #ccc;-webkit-box-shadow:none;box-shadow:none;background:url(../images/select2.png) 100% -22px no-repeat #fff}html[dir=rtl] .select2-search input{padding:4px 5px 4px 20px;background:url(../images/select2.png) -37px -22px no-repeat #fff}.select2-drop.select2-drop-above .select2-search input{margin-top:4px}.select2-search input.select2-active{background:url(../images/select2-spinner.gif) 100% no-repeat #fff}.select2-container-active .select2-choice,.select2-container-active .select2-choices{border:1px solid #666;outline:0}.select2-dropdown-open .select2-choice{border-bottom-color:transparent;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-dropdown-open .select2-choice .select2-arrow b:after{border-top-color:transparent;border-bottom-color:#666;margin-top:-6px}.select2-dropdown-open.select2-drop-above .select2-choice,.select2-dropdown-open.select2-drop-above .select2-choices{border:1px solid #666;border-top-color:transparent}.select2-dropdown-open .select2-choice .select2-arrow{background:0 0;border-left:none;filter:none}html[dir=rtl] .select2-dropdown-open .select2-choice .select2-arrow{border-right:none}.select2-dropdown-open .select2-choice .select2-arrow b{background-position:-18px 1px}html[dir=rtl] .select2-dropdown-open .select2-choice .select2-arrow b{background-position:-16px 1px}.select2-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.select2-results{max-height:200px;padding:4px;margin:0;position:relative;overflow-x:hidden;overflow-y:auto;-webkit-tap-highlight-color:transparent;background:#fafafa}html[dir=rtl] .select2-results{padding:0 4px 0 0;margin:4px 0 4px 4px}.select2-results ul.select2-result-sub{margin:0;padding-left:0}.select2-results li{list-style:none;display:list-item;background-image:none;margin:3px 0}.select2-results li.select2-result-with-children>.select2-result-label{font-weight:700}.select2-results .select2-result-label{padding:5px 7px;margin:0;cursor:pointer;min-height:1em;user-select:none}.select2-results-dept-1 .select2-result-label{padding-left:20px}.select2-results-dept-2 .select2-result-label{padding-left:40px}.select2-results-dept-3 .select2-result-label{padding-left:60px}.select2-results-dept-4 .select2-result-label{padding-left:80px}.select2-results-dept-5 .select2-result-label{padding-left:100px}.select2-results-dept-6 .select2-result-label{padding-left:110px}.select2-results-dept-7 .select2-result-label{padding-left:120px}.select2-results .select2-highlighted{background:#f1f1f1;color:#000;border-radius:3px}.select2-results li em{background:#feffde;font-style:normal}.select2-results .select2-highlighted em{background:0 0}.select2-results .select2-highlighted ul{background:#fff;color:#000}.select2-results .select2-ajax-error,.select2-results .select2-no-results,.select2-results .select2-searching,.select2-results .select2-selection-limit{background:#f4f4f4;display:list-item;padding-left:5px}.select2-results .select2-disabled.select2-highlighted{color:#666;background:#f4f4f4;display:list-item;cursor:default}.select2-results .select2-disabled{background:#f4f4f4;display:list-item;cursor:default}.select2-results .select2-selected{display:none}.select2-more-results.select2-active{background:url(../images/select2-spinner.gif) 100% no-repeat #f4f4f4}.select2-results .select2-ajax-error{background:rgba(255,50,50,.2)}.select2-more-results{background:#f4f4f4;display:list-item}.select2-container.select2-container-disabled .select2-choice{background-color:#f4f4f4;background-image:none;border:1px solid #ddd;cursor:default}.select2-container.select2-container-disabled .select2-choice .select2-arrow{background-color:#f4f4f4;background-image:none;border-left:0}.select2-container.select2-container-disabled .select2-choice abbr{display:none}.select2-container-multi .select2-choices{height:auto!important;height:1%;margin:0;padding:0 5px 0 0;position:relative;border:1px solid #ccc;cursor:text;overflow:hidden;background-color:#fff;min-height:26px}html[dir=rtl] .select2-container-multi .select2-choices{padding:0 0 0 5px}.select2-locked{padding:3px 5px!important}.select2-container-multi.select2-container-active .select2-choices{border:1px solid #666;outline:0}.select2-container-multi .select2-choices li{float:left;list-style:none}html[dir=rtl] .select2-container-multi .select2-choices li{float:right}.select2-container-multi .select2-choices .select2-search-field{margin:0;padding:0;white-space:nowrap}.select2-container-multi .select2-choices .select2-search-field:first-child{width:100%}.select2-container-multi .select2-choices .select2-search-field input{margin:1px 0;outline:0;border:0;-webkit-box-shadow:none;box-shadow:none;background:0 0!important}.select2-container-multi .select2-choices .select2-search-field input.select2-active{background:url(../images/select2-spinner.gif) 100% no-repeat #fff!important}.select2-default{color:#999!important}.select2-container-multi .select2-choices .select2-search-choice{padding:5px 8px 5px 24px;margin:3px 0 3px 5px;position:relative;line-height:15px;color:#333;cursor:default;border-radius:2px;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:#e4e4e4}html[dir=rtl] .select2-container-multi .select2-choices .select2-search-choice{margin:3px 5px 3px 0;padding:5px 24px 5px 8px}.select2-container-multi .ui-sortable .select2-search-choice{cursor:move}.select2-container-multi .select2-choices .select2-search-choice .select2-chosen{cursor:default}.select2-container-multi .select2-choices .select2-search-choice-focus{background:#d4d4d4}.select2-search-choice-close{display:block;width:12px;height:13px;position:absolute;right:7px;top:6px;font-size:1px;outline:0;background:url(../images/select2.png) right top no-repeat}html[dir=rtl] .select2-search-choice-close{right:auto;left:7px}.select2-container-multi .select2-search-choice-close{left:7px}html[dir=rtl] .select2-container-multi .select2-search-choice-close{left:auto;right:7px}.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover,.select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close{background-position:right -11px}.select2-container-multi.select2-container-disabled .select2-choices{background-color:#f4f4f4;background-image:none;border:1px solid #ddd;cursor:default}.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice{padding:3px 5px;border:1px solid #ddd;background-image:none;background-color:#f4f4f4}.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close{display:none;background:0 0}.select2-result-selectable .select2-match,.select2-result-unselectable .select2-match{text-decoration:underline}.select2-offscreen,.select2-offscreen:focus{clip:rect(0 0 0 0)!important;width:1px!important;height:1px!important;border:0!important;margin:0!important;padding:0!important;overflow:hidden!important;position:absolute!important;outline:0!important;left:0!important;top:0!important}.select2-display-none{display:none}.select2-measure-scrollbar{position:absolute;top:-10000px;left:-10000px;width:100px;height:100px;overflow:scroll}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:2dppx){.select2-search input{background-image:url(../images/select2x2.png)!important;background-repeat:no-repeat!important;background-size:60px 40px!important;background-position:100% -21px!important}}#flash-toolkit-portfolio-data .panel-wrap,.flash-toolkit .panel-wrap{overflow:hidden}#flash-toolkit-portfolio-data ul.ft-tabs,.flash-toolkit ul.ft-tabs{margin:0;width:20%;float:left;line-height:1em;padding:0 0 10px;position:relative;background-color:#fafafa;border-right:1px solid #eee;box-sizing:border-box}#flash-toolkit-portfolio-data ul.ft-tabs:after,.flash-toolkit ul.ft-tabs:after{content:"";display:block;width:100%;height:9999em;position:absolute;bottom:-9999em;left:0;background-color:#fafafa;border-right:1px solid #eee}#flash-toolkit-portfolio-data ul.ft-tabs li,.flash-toolkit ul.ft-tabs li{margin:0;padding:0;display:block;position:relative}#flash-toolkit-portfolio-data ul.ft-tabs li a,.flash-toolkit ul.ft-tabs li a{margin:0;padding:10px;display:block;box-shadow:none;text-decoration:none;line-height:20px!important;border-bottom:1px solid #eee}#flash-toolkit-portfolio-data ul.ft-tabs li a:before,.flash-toolkit ul.ft-tabs li a:before{font-family:Dashicons;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin-right:.618em;content:"";text-decoration:none}#flash-toolkit-portfolio-data ul.ft-tabs li.general_options a:before,.flash-toolkit ul.ft-tabs li.general_options a:before{content:"\f107"}#flash-toolkit-portfolio-data ul.ft-tabs li.description_options a::before,.flash-toolkit ul.ft-tabs li.description_options a::before{content:'\f103'}#flash-toolkit-portfolio-data ul.ft-tabs li.active a,.flash-toolkit ul.ft-tabs li.active a{color:#555;position:relative;background-color:#eee}#flash-toolkit-portfolio-data .inside{margin:0;padding:0}.flash_toolkit_options_panel,.panel{padding:0;color:#555}.flash_toolkit_options_panel .form-field .flash-toolkit-help-tip,.panel .form-field .flash-toolkit-help-tip{font-size:1.4em}.flash_toolkit_options_panel fieldset.form-field,.flash_toolkit_options_panel p{margin:0 0 9px;font-size:12px;padding:5px 9px;line-height:24px}.flash_toolkit_options_panel fieldset.form-field:after,.flash_toolkit_options_panel p:after{content:".";display:block;height:0;clear:both;visibility:hidden}.flash_toolkit_options_panel .checkbox{width:auto;margin:3px 0;vertical-align:middle}.flash_toolkit_options_panel{min-height:175px;box-sizing:border-box}.flash_toolkit_options_panel p{margin:9px 0}.flash_toolkit_options_panel fieldset.form-field,.flash_toolkit_options_panel p.form-field{padding:5px 20px 5px 162px!important}.flash_toolkit_options_panel label,.flash_toolkit_options_panel legend{float:left;width:150px;padding:0;margin:0 0 0 -150px}.flash_toolkit_options_panel label .req,.flash_toolkit_options_panel legend .req{font-weight:700;font-style:normal;color:red}.flash_toolkit_options_panel .description{padding:0;margin:0 0 0 7px;clear:none;display:inline}.flash_toolkit_options_panel .description-block{margin-left:0;display:block}.flash_toolkit_options_panel input,.flash_toolkit_options_panel select,.flash_toolkit_options_panel textarea{margin:0}.flash_toolkit_options_panel textarea{height:3.5em;line-height:1.5em;vertical-align:top}.flash_toolkit_options_panel input[type=number],.flash_toolkit_options_panel input[type=password],.flash_toolkit_options_panel input[type=text],.flash_toolkit_options_panel input[type=email]{width:50%;float:left}.flash_toolkit_options_panel input.button{width:auto;margin-left:8px}.flash_toolkit_options_panel select{float:left}.flash_toolkit_options_panel .short,.flash_toolkit_options_panel input[type=number].short,.flash_toolkit_options_panel input[type=password].short,.flash_toolkit_options_panel input[type=text].short,.flash_toolkit_options_panel input[type=email].short{width:50%}.flash_toolkit_options_panel .sized{width:auto!important;margin-right:6px}.flash_toolkit_options_panel .options_group{border-top:1px solid #fff;border-bottom:1px solid #eee}.flash_toolkit_options_panel .options_group:first-child{border-top:0}.flash_toolkit_options_panel .options_group:last-child{border-bottom:0}.flash_toolkit_options_panel .options_group fieldset{margin:9px 0;font-size:12px;padding:5px 9px;line-height:24px}.flash_toolkit_options_panel .options_group fieldset label{width:auto;float:none}.flash_toolkit_options_panel .options_group fieldset ul{float:left;width:50%;margin:0;padding:0}.flash_toolkit_options_panel .options_group fieldset ul li{margin:0;width:auto}.flash_toolkit_options_panel .options_group fieldset ul li input{width:auto;float:none;margin-right:4px}.flash_toolkit_options_panel .options_group fieldset ul.ft-radios label{margin-left:0}.flash_toolkit_options_panel.padded{padding:1em}.flash_toolkit_options_panel .select2-container{float:left}#flash-toolkit-portfolio-data .panel-wrap{background:#fff}#flash-toolkit-portfolio-data .flash_toolkit_options_panel{float:left;width:80%}#flash-toolkit-portfolio-data .flash_toolkit_options_panel .flash-toolkit-radios{display:block;float:left;margin:0}#flash-toolkit-portfolio-data .flash_toolkit_options_panel .flash-toolkit-radios li{display:block;padding:0 0 10px}#flash-toolkit-portfolio-data .flash_toolkit_options_panel .flash-toolkit-radios li input{width:auto}img.help_tip{margin:0 0 0 9px;vertical-align:middle}.postbox img.help_tip{margin-top:0}.postbox .flash-toolkit-help-tip{margin:0 0 0 9px}.tips{cursor:help;text-decoration:none}img.tips{padding:5px 0 0}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:9999999}#tiptip_holder.tip_top{padding-bottom:5px}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#333}#tiptip_holder.tip_bottom{padding-top:5px}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#333}#tiptip_holder.tip_right{padding-left:5px}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#333}#tiptip_holder.tip_left{padding-right:5px}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#333}#tiptip_content,.ft_error_tip{color:#fff;font-size:.8em;max-width:150px;background:#333;text-align:center;border-radius:3px;padding:.618em 1em;box-shadow:0 1px 3px rgba(0,0,0,.2)}#tiptip_content code,.ft_error_tip code{padding:1px;background:#888}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}.ft_error_tip{max-width:20em;line-height:1.8em;position:absolute;white-space:normal;background:#d82223;margin:1.5em 1px 0 -1em;z-index:9999999}.ft_error_tip::after{content:'';display:block;border:8px solid #d82223;border-right-color:transparent;border-left-color:transparent;border-top-color:transparent;position:absolute;top:-3px;left:50%;margin:-1em 0 0 -3px}.flash-toolkit-help-tip{color:#666;display:inline-block;font-size:1.1em;font-style:normal;height:16px;line-height:16px;position:relative;vertical-align:middle;width:16px}.flash-toolkit-help-tip:after{font-family:Dashicons;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";cursor:help}@media only screen and (max-width:1280px){.flash_toolkit_options_panel .description{display:block;clear:both;margin-left:0}.flash_toolkit_options_panel .dimensions_field .wrap,.flash_toolkit_options_panel .short,.flash_toolkit_options_panel input[type=password].short,.flash_toolkit_options_panel input[type=email].short,.flash_toolkit_options_panel input[type=number].short,.flash_toolkit_options_panel input[type=text].short{width:80%}}@media only screen and (max-width:900px){#flash-toolkit-portfolio-data ul.portfolio_data_tabs{width:10%}#flash-toolkit-portfolio-data .flash_toolkit_options_panel{width:90%}#flash-toolkit-portfolio-data ul.portfolio_data_tabs li a{position:relative;text-indent:-999px;padding:10px}#flash-toolkit-portfolio-data ul.portfolio_data_tabs li a:before{position:absolute;top:0;right:0;bottom:0;left:0;text-indent:0;text-align:center;line-height:40px;width:100%;height:40px}}@media only screen and (max-width:782px){#flash-toolkit-portfolio-data .checkbox{width:25px}}@media only screen and (max-width:500px){.flash_toolkit_options_panel label,.flash_toolkit_options_panel legend{float:none;width:auto;display:block;margin:0}.flash_toolkit_options_panel fieldset.form-field,.flash_toolkit_options_panel p.form-field{padding:5px 20px!important}}.select2-drop{z-index:999999!important}.select2-container-multi .select2-choices .select2-search-field input{font-family:inherit;font-size:inherit;font-weight:inherit;padding:3px 5px;width:100%!important}.select2-container{line-height:1.85em;font-size:14px}
|
assets/css/admin.scss
ADDED
@@ -0,0 +1,534 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* admin.scss
|
3 |
+
* General FlashToolkit admin styles.
|
4 |
+
*/
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Imports
|
8 |
+
*/
|
9 |
+
@import "bourbon";
|
10 |
+
@import "mixins";
|
11 |
+
@import "variables";
|
12 |
+
@import "select2";
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Styling begins
|
16 |
+
*/
|
17 |
+
#flash-toolkit-portfolio-data,
|
18 |
+
.flash-toolkit {
|
19 |
+
.panel-wrap {
|
20 |
+
overflow: hidden;
|
21 |
+
}
|
22 |
+
|
23 |
+
ul.ft-tabs {
|
24 |
+
margin: 0;
|
25 |
+
width: 20%;
|
26 |
+
float: left;
|
27 |
+
line-height: 1em;
|
28 |
+
padding: 0 0 10px;
|
29 |
+
position: relative;
|
30 |
+
background-color: #fafafa;
|
31 |
+
border-right: 1px solid #eee;
|
32 |
+
box-sizing: border-box;
|
33 |
+
|
34 |
+
&:after {
|
35 |
+
content: "";
|
36 |
+
display: block;
|
37 |
+
width: 100%;
|
38 |
+
height: 9999em;
|
39 |
+
position: absolute;
|
40 |
+
bottom: -9999em;
|
41 |
+
left: 0;
|
42 |
+
background-color: #fafafa;
|
43 |
+
border-right: 1px solid #eee;
|
44 |
+
}
|
45 |
+
|
46 |
+
li {
|
47 |
+
margin: 0;
|
48 |
+
padding: 0;
|
49 |
+
display: block;
|
50 |
+
position: relative;
|
51 |
+
|
52 |
+
a {
|
53 |
+
margin: 0;
|
54 |
+
padding: 10px;
|
55 |
+
display: block;
|
56 |
+
box-shadow: none;
|
57 |
+
text-decoration: none;
|
58 |
+
line-height: 20px !important;
|
59 |
+
border-bottom: 1px solid #eee;
|
60 |
+
|
61 |
+
&:before {
|
62 |
+
@include iconbeforedashicons( "\f107" );
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
&.general_options {
|
67 |
+
a:before {
|
68 |
+
content: "\f107";
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
&.description_options {
|
73 |
+
a::before {
|
74 |
+
content: '\f103';
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
&.active {
|
79 |
+
a {
|
80 |
+
color: #555;
|
81 |
+
position: relative;
|
82 |
+
background-color: #eee;
|
83 |
+
}
|
84 |
+
}
|
85 |
+
}
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
#flash-toolkit-portfolio-data {
|
90 |
+
.inside {
|
91 |
+
margin: 0;
|
92 |
+
padding: 0;
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
.flash_toolkit_options_panel,
|
97 |
+
.panel {
|
98 |
+
padding: 0;
|
99 |
+
color: #555;
|
100 |
+
|
101 |
+
.form-field {
|
102 |
+
.flash-toolkit-help-tip {
|
103 |
+
font-size: 1.4em;
|
104 |
+
}
|
105 |
+
}
|
106 |
+
}
|
107 |
+
|
108 |
+
.flash_toolkit_options_panel p,
|
109 |
+
.flash_toolkit_options_panel fieldset.form-field {
|
110 |
+
margin: 0 0 9px;
|
111 |
+
font-size: 12px;
|
112 |
+
padding: 5px 9px;
|
113 |
+
line-height: 24px;
|
114 |
+
|
115 |
+
&:after {
|
116 |
+
content: ".";
|
117 |
+
display: block;
|
118 |
+
height: 0;
|
119 |
+
clear: both;
|
120 |
+
visibility: hidden;
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
.flash_toolkit_options_panel .checkbox {
|
125 |
+
width: auto;
|
126 |
+
margin: 3px 0;
|
127 |
+
vertical-align: middle;
|
128 |
+
}
|
129 |
+
|
130 |
+
.flash_toolkit_options_panel {
|
131 |
+
min-height: 175px;
|
132 |
+
box-sizing: border-box;
|
133 |
+
|
134 |
+
p {
|
135 |
+
margin: 9px 0;
|
136 |
+
}
|
137 |
+
|
138 |
+
p.form-field,
|
139 |
+
fieldset.form-field {
|
140 |
+
padding: 5px 20px 5px 162px !important; /** Padding for aligning labels left - 12px + 150 label width **/
|
141 |
+
}
|
142 |
+
|
143 |
+
label,
|
144 |
+
legend {
|
145 |
+
float: left;
|
146 |
+
width: 150px;
|
147 |
+
padding: 0;
|
148 |
+
margin: 0 0 0 -150px;
|
149 |
+
|
150 |
+
.req {
|
151 |
+
font-weight: 700;
|
152 |
+
font-style: normal;
|
153 |
+
color: $red;
|
154 |
+
}
|
155 |
+
}
|
156 |
+
|
157 |
+
.description {
|
158 |
+
padding: 0;
|
159 |
+
margin: 0 0 0 7px;
|
160 |
+
clear: none;
|
161 |
+
display: inline;
|
162 |
+
}
|
163 |
+
|
164 |
+
.description-block {
|
165 |
+
margin-left: 0;
|
166 |
+
display: block;
|
167 |
+
}
|
168 |
+
|
169 |
+
textarea,
|
170 |
+
input,
|
171 |
+
select {
|
172 |
+
margin: 0;
|
173 |
+
}
|
174 |
+
|
175 |
+
textarea {
|
176 |
+
height: 3.5em;
|
177 |
+
line-height: 1.5em;
|
178 |
+
vertical-align: top;
|
179 |
+
}
|
180 |
+
|
181 |
+
input[type="text"],
|
182 |
+
input[type="email"],
|
183 |
+
input[type="number"],
|
184 |
+
input[type="password"] {
|
185 |
+
width: 50%;
|
186 |
+
float: left;
|
187 |
+
}
|
188 |
+
|
189 |
+
input.button {
|
190 |
+
width: auto;
|
191 |
+
margin-left: 8px;
|
192 |
+
}
|
193 |
+
|
194 |
+
select {
|
195 |
+
float: left;
|
196 |
+
}
|
197 |
+
|
198 |
+
input[type="text"].short,
|
199 |
+
input[type="email"].short,
|
200 |
+
input[type="number"].short,
|
201 |
+
input[type="password"].short,
|
202 |
+
.short {
|
203 |
+
width: 50%;
|
204 |
+
}
|
205 |
+
|
206 |
+
.sized {
|
207 |
+
width: auto !important;
|
208 |
+
margin-right: 6px;
|
209 |
+
}
|
210 |
+
|
211 |
+
.options_group {
|
212 |
+
border-top: 1px solid white;
|
213 |
+
border-bottom: 1px solid #eee;
|
214 |
+
|
215 |
+
&:first-child {
|
216 |
+
border-top: 0;
|
217 |
+
}
|
218 |
+
|
219 |
+
&:last-child {
|
220 |
+
border-bottom: 0;
|
221 |
+
}
|
222 |
+
|
223 |
+
fieldset {
|
224 |
+
margin: 9px 0;
|
225 |
+
font-size: 12px;
|
226 |
+
padding: 5px 9px;
|
227 |
+
line-height: 24px;
|
228 |
+
|
229 |
+
label {
|
230 |
+
width: auto;
|
231 |
+
float: none;
|
232 |
+
}
|
233 |
+
|
234 |
+
ul {
|
235 |
+
float: left;
|
236 |
+
width: 50%;
|
237 |
+
margin: 0;
|
238 |
+
padding: 0;
|
239 |
+
|
240 |
+
li {
|
241 |
+
margin: 0;
|
242 |
+
width: auto;
|
243 |
+
|
244 |
+
input {
|
245 |
+
width: auto;
|
246 |
+
float: none;
|
247 |
+
margin-right: 4px;
|
248 |
+
}
|
249 |
+
}
|
250 |
+
}
|
251 |
+
|
252 |
+
ul.ft-radios {
|
253 |
+
label {
|
254 |
+
margin-left: 0;
|
255 |
+
}
|
256 |
+
}
|
257 |
+
}
|
258 |
+
}
|
259 |
+
|
260 |
+
&.padded {
|
261 |
+
padding: 1em;
|
262 |
+
}
|
263 |
+
|
264 |
+
.select2-container {
|
265 |
+
float: left;
|
266 |
+
}
|
267 |
+
}
|
268 |
+
|
269 |
+
#flash-toolkit-portfolio-data {
|
270 |
+
.panel-wrap {
|
271 |
+
background: #fff;
|
272 |
+
}
|
273 |
+
|
274 |
+
.flash_toolkit_options_panel {
|
275 |
+
float: left;
|
276 |
+
width: 80%;
|
277 |
+
|
278 |
+
.flash-toolkit-radios {
|
279 |
+
display: block;
|
280 |
+
float: left;
|
281 |
+
margin: 0;
|
282 |
+
|
283 |
+
li {
|
284 |
+
display: block;
|
285 |
+
padding: 0 0 10px 0;
|
286 |
+
|
287 |
+
input {
|
288 |
+
width: auto;
|
289 |
+
}
|
290 |
+
}
|
291 |
+
}
|
292 |
+
}
|
293 |
+
}
|
294 |
+
|
295 |
+
img.help_tip {
|
296 |
+
margin: 0 0 0 9px;
|
297 |
+
vertical-align: middle;
|
298 |
+
}
|
299 |
+
|
300 |
+
.postbox img.help_tip {
|
301 |
+
margin-top: 0;
|
302 |
+
}
|
303 |
+
|
304 |
+
.postbox .flash-toolkit-help-tip {
|
305 |
+
margin: 0 0 0 9px;
|
306 |
+
}
|
307 |
+
|
308 |
+
/**
|
309 |
+
* Tooltips
|
310 |
+
*/
|
311 |
+
.tips {
|
312 |
+
cursor: help;
|
313 |
+
text-decoration: none;
|
314 |
+
}
|
315 |
+
|
316 |
+
img.tips {
|
317 |
+
padding: 5px 0 0 0;
|
318 |
+
}
|
319 |
+
|
320 |
+
#tiptip_holder {
|
321 |
+
display: none;
|
322 |
+
position: absolute;
|
323 |
+
top: 0;
|
324 |
+
left: 0;
|
325 |
+
z-index: 9999999;
|
326 |
+
}
|
327 |
+
|
328 |
+
#tiptip_holder {
|
329 |
+
&.tip_top {
|
330 |
+
padding-bottom: 5px;
|
331 |
+
|
332 |
+
#tiptip_arrow_inner {
|
333 |
+
margin-top: -7px;
|
334 |
+
margin-left: -6px;
|
335 |
+
border-top-color: #333;
|
336 |
+
}
|
337 |
+
}
|
338 |
+
|
339 |
+
&.tip_bottom {
|
340 |
+
padding-top: 5px;
|
341 |
+
|
342 |
+
#tiptip_arrow_inner {
|
343 |
+
margin-top: -5px;
|
344 |
+
margin-left: -6px;
|
345 |
+
border-bottom-color: #333;
|
346 |
+
}
|
347 |
+
}
|
348 |
+
|
349 |
+
&.tip_right {
|
350 |
+
padding-left: 5px;
|
351 |
+
|
352 |
+
#tiptip_arrow_inner {
|
353 |
+
margin-top: -6px;
|
354 |
+
margin-left: -5px;
|
355 |
+
border-right-color: #333;
|
356 |
+
}
|
357 |
+
}
|
358 |
+
|
359 |
+
&.tip_left {
|
360 |
+
padding-right: 5px;
|
361 |
+
|
362 |
+
#tiptip_arrow_inner {
|
363 |
+
margin-top: -6px;
|
364 |
+
margin-left: -7px;
|
365 |
+
border-left-color: #333;
|
366 |
+
}
|
367 |
+
}
|
368 |
+
}
|
369 |
+
|
370 |
+
#tiptip_content,
|
371 |
+
.ft_error_tip {
|
372 |
+
color: #fff;
|
373 |
+
font-size: .8em;
|
374 |
+
max-width: 150px;
|
375 |
+
background: #333;
|
376 |
+
text-align: center;
|
377 |
+
border-radius: 3px;
|
378 |
+
padding: .618em 1em;
|
379 |
+
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
|
380 |
+
|
381 |
+
code {
|
382 |
+
padding: 1px;
|
383 |
+
background: #888;
|
384 |
+
}
|
385 |
+
}
|
386 |
+
|
387 |
+
#tiptip_arrow,
|
388 |
+
#tiptip_arrow_inner {
|
389 |
+
position: absolute;
|
390 |
+
border-color: transparent;
|
391 |
+
border-style: solid;
|
392 |
+
border-width: 6px;
|
393 |
+
height: 0;
|
394 |
+
width: 0;
|
395 |
+
}
|
396 |
+
|
397 |
+
.ft_error_tip {
|
398 |
+
max-width: 20em;
|
399 |
+
line-height: 1.8em;
|
400 |
+
position: absolute;
|
401 |
+
white-space: normal;
|
402 |
+
background: #d82223;
|
403 |
+
margin: 1.5em 1px 0 -1em;
|
404 |
+
z-index: 9999999;
|
405 |
+
|
406 |
+
&::after {
|
407 |
+
content: '';
|
408 |
+
display: block;
|
409 |
+
border: 8px solid #d82223;
|
410 |
+
border-right-color: transparent;
|
411 |
+
border-left-color: transparent;
|
412 |
+
border-top-color: transparent;
|
413 |
+
position: absolute;
|
414 |
+
top: -3px;
|
415 |
+
left: 50%;
|
416 |
+
margin: -1em 0 0 -3px;
|
417 |
+
}
|
418 |
+
}
|
419 |
+
|
420 |
+
/**
|
421 |
+
* Help Tip
|
422 |
+
*/
|
423 |
+
.flash-toolkit-help-tip {
|
424 |
+
color: #666;
|
425 |
+
display: inline-block;
|
426 |
+
font-size: 1.1em;
|
427 |
+
font-style: normal;
|
428 |
+
height: 16px;
|
429 |
+
line-height: 16px;
|
430 |
+
position: relative;
|
431 |
+
vertical-align: middle;
|
432 |
+
width: 16px;
|
433 |
+
|
434 |
+
&:after {
|
435 |
+
@include icon_dashicons( "\f223" );
|
436 |
+
cursor: help;
|
437 |
+
}
|
438 |
+
}
|
439 |
+
|
440 |
+
/**
|
441 |
+
* Small screen optimisation
|
442 |
+
*/
|
443 |
+
@media only screen and (max-width: 1280px) {
|
444 |
+
.flash_toolkit_options_panel {
|
445 |
+
.description {
|
446 |
+
display: block;
|
447 |
+
clear: both;
|
448 |
+
margin-left: 0;
|
449 |
+
}
|
450 |
+
|
451 |
+
.short,
|
452 |
+
input[type=text].short,
|
453 |
+
input[type=email].short,
|
454 |
+
input[type=number].short,
|
455 |
+
input[type="password"].short,
|
456 |
+
.dimensions_field .wrap {
|
457 |
+
width: 80%;
|
458 |
+
}
|
459 |
+
}
|
460 |
+
}
|
461 |
+
|
462 |
+
/**
|
463 |
+
* Optimisation for screens 900px and smaller
|
464 |
+
*/
|
465 |
+
@media only screen and (max-width: 900px) {
|
466 |
+
#flash-toolkit-portfolio-data ul.portfolio_data_tabs {
|
467 |
+
width: 10%;
|
468 |
+
}
|
469 |
+
|
470 |
+
#flash-toolkit-portfolio-data .flash_toolkit_options_panel {
|
471 |
+
width: 90%;
|
472 |
+
}
|
473 |
+
|
474 |
+
#flash-toolkit-portfolio-data ul.portfolio_data_tabs li a {
|
475 |
+
position: relative;
|
476 |
+
text-indent: -999px;
|
477 |
+
padding: 10px;
|
478 |
+
|
479 |
+
&:before {
|
480 |
+
position: absolute;
|
481 |
+
top: 0;
|
482 |
+
right: 0;
|
483 |
+
bottom: 0;
|
484 |
+
left: 0;
|
485 |
+
text-indent: 0;
|
486 |
+
text-align: center;
|
487 |
+
line-height: 40px;
|
488 |
+
width: 100%;
|
489 |
+
height: 40px;
|
490 |
+
}
|
491 |
+
}
|
492 |
+
}
|
493 |
+
|
494 |
+
/**
|
495 |
+
* Optimisation for screens 782px and smaller
|
496 |
+
*/
|
497 |
+
@media only screen and (max-width: 782px) {
|
498 |
+
#flash-toolkit-portfolio-data .checkbox {
|
499 |
+
width: 25px;
|
500 |
+
}
|
501 |
+
}
|
502 |
+
|
503 |
+
@media only screen and (max-width: 500px) {
|
504 |
+
.flash_toolkit_options_panel label,
|
505 |
+
.flash_toolkit_options_panel legend {
|
506 |
+
float: none;
|
507 |
+
width: auto;
|
508 |
+
display: block;
|
509 |
+
margin: 0;
|
510 |
+
}
|
511 |
+
|
512 |
+
.flash_toolkit_options_panel fieldset.form-field,
|
513 |
+
.flash_toolkit_options_panel p.form-field {
|
514 |
+
padding: 5px 20px 5px 20px !important;
|
515 |
+
}
|
516 |
+
}
|
517 |
+
|
518 |
+
/**
|
519 |
+
* Select2
|
520 |
+
*/
|
521 |
+
.select2-drop {
|
522 |
+
z-index: 999999 !important;
|
523 |
+
}
|
524 |
+
.select2-container-multi .select2-choices .select2-search-field input {
|
525 |
+
font-family: inherit;
|
526 |
+
font-size: inherit;
|
527 |
+
font-weight: inherit;
|
528 |
+
padding: 3px 5px;
|
529 |
+
width: 100% !important;
|
530 |
+
}
|
531 |
+
.select2-container {
|
532 |
+
line-height: 1.85em;
|
533 |
+
font-size: 14px;
|
534 |
+
}
|
assets/css/menu.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
ul.layout_data p.form-field{margin:15px 0}ul.layout_data p.form-field label,ul.layout_data p.form-field select,ul.layout_data p.form-field span{width:100%}ul.layout_data p.form-field label{float:left;font-weight:600}ul.layout_data p.form-field span.side{color:#777;display:block;font-style:normal;margin-bottom:5px}
|
assets/css/menu.scss
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* menu.scss
|
3 |
+
* Styles applied to dashboard menu items added via FlashToolkit.
|
4 |
+
*/
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Imports
|
8 |
+
*/
|
9 |
+
@import 'bourbon';
|
10 |
+
@import 'mixins';
|
11 |
+
@import 'variables';
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Styling begins
|
15 |
+
*/
|
16 |
+
ul.layout_data {
|
17 |
+
p.form-field {
|
18 |
+
margin: 15px 0;
|
19 |
+
|
20 |
+
span,
|
21 |
+
label,
|
22 |
+
select {
|
23 |
+
width: 100%;
|
24 |
+
}
|
25 |
+
|
26 |
+
label {
|
27 |
+
float: left;
|
28 |
+
font-weight: 600;
|
29 |
+
}
|
30 |
+
|
31 |
+
span.side {
|
32 |
+
color: #777;
|
33 |
+
display: block;
|
34 |
+
font-style: normal;
|
35 |
+
margin-bottom: 5px;
|
36 |
+
}
|
37 |
+
}
|
38 |
+
}
|
assets/css/widgets.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@charset "UTF-8";.select2-container{margin:0;position:relative;display:block!important;zoom:1;vertical-align:middle}.select2-container,.select2-drop,.select2-search,.select2-search input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.select2-container .select2-choice{display:block;padding:0 0 0 8px;overflow:hidden;position:relative;border:1px solid #ccc;white-space:nowrap;color:#444;text-decoration:none;border-radius:3px;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;font-weight:400}html[dir=rtl] .select2-container .select2-choice{padding:0 8px 0 0}.select2-container.select2-drop-above .select2-choice{border-bottom-color:#ccc;border-radius:0 0 4px 4px}.select2-container.select2-allowclear .select2-choice .select2-chosen{margin-right:42px}.select2-container .select2-choice>.select2-chosen{margin-right:26px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;float:none;width:auto}html[dir=rtl] .select2-container .select2-choice>.select2-chosen{margin-left:26px;margin-right:0}.select2-container .select2-choice abbr{display:none;width:12px;height:12px;position:absolute;right:24px;top:5px;font-size:1px;text-decoration:none;border:0;background:url(../images/select2.png) right top no-repeat;cursor:pointer;outline:0}.select2-container.select2-allowclear .select2-choice abbr{display:inline-block}.select2-container .select2-choice abbr:hover{background-position:right -11px;cursor:pointer}.select2-drop-mask{border:0;margin:0;padding:0;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:9998;background-color:#fff;filter:alpha(opacity=0)}.select2-drop{width:100%;margin-top:-1px;position:absolute;top:100%;background:#fff;color:#000;border:1px solid #ccc;border-top:0;border-radius:0 0 3px 3px}.select2-drop.select2-drop-above{margin-top:1px;border-top:1px solid #ccc;border-bottom:0;border-radius:3px 3px 0 0}.select2-drop-active{border:1px solid #666;border-top:none}.select2-drop.select2-drop-above.select2-drop-active{border-top:1px solid #666}.select2-drop-auto-width{border-top:1px solid #ccc;width:auto}.select2-drop-auto-width .select2-search{padding-top:4px}.select2-container .select2-choice .select2-arrow{display:inline-block;width:18px;height:100%;position:absolute;right:0;top:0;border-radius:0 3px 3px 0;background-clip:padding-box}html[dir=rtl] .select2-container .select2-choice .select2-arrow{left:0;right:auto;border-radius:3px 0 0 3px}.select2-container .select2-choice .select2-arrow b{display:block;width:100%;height:100%;position:relative}.select2-container .select2-choice .select2-arrow b:after{position:absolute;display:block;content:"";top:50%;left:50%;border:4px solid transparent;border-top-color:#666;margin-left:-7px;margin-top:-2px}.select2-search{display:inline-block;width:100%;margin:0;padding-left:4px;padding-right:4px;position:relative;z-index:10000;white-space:nowrap;padding-bottom:4px}.select2-search input{width:100%;height:auto!important;padding:4px 20px 4px 5px!important;margin:0;outline:0;font-family:sans-serif;font-size:1em;border:1px solid #ccc;-webkit-box-shadow:none;box-shadow:none;background:url(../images/select2.png) 100% -22px no-repeat #fff}html[dir=rtl] .select2-search input{padding:4px 5px 4px 20px;background:url(../images/select2.png) -37px -22px no-repeat #fff}.select2-drop.select2-drop-above .select2-search input{margin-top:4px}.select2-search input.select2-active{background:url(../images/select2-spinner.gif) 100% no-repeat #fff}.select2-container-active .select2-choice,.select2-container-active .select2-choices{border:1px solid #666;outline:0}.select2-dropdown-open .select2-choice{border-bottom-color:transparent;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-dropdown-open .select2-choice .select2-arrow b:after{border-top-color:transparent;border-bottom-color:#666;margin-top:-6px}.select2-dropdown-open.select2-drop-above .select2-choice,.select2-dropdown-open.select2-drop-above .select2-choices{border:1px solid #666;border-top-color:transparent}.select2-dropdown-open .select2-choice .select2-arrow{background:0 0;border-left:none;filter:none}html[dir=rtl] .select2-dropdown-open .select2-choice .select2-arrow{border-right:none}.select2-dropdown-open .select2-choice .select2-arrow b{background-position:-18px 1px}html[dir=rtl] .select2-dropdown-open .select2-choice .select2-arrow b{background-position:-16px 1px}.select2-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.select2-results{max-height:200px;padding:4px;margin:0;position:relative;overflow-x:hidden;overflow-y:auto;-webkit-tap-highlight-color:transparent;background:#fafafa}html[dir=rtl] .select2-results{padding:0 4px 0 0;margin:4px 0 4px 4px}.select2-results ul.select2-result-sub{margin:0;padding-left:0}.select2-results li{list-style:none;display:list-item;background-image:none;margin:3px 0}.select2-results li.select2-result-with-children>.select2-result-label{font-weight:700}.select2-results .select2-result-label{padding:5px 7px;margin:0;cursor:pointer;min-height:1em;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.select2-results-dept-1 .select2-result-label{padding-left:20px}.select2-results-dept-2 .select2-result-label{padding-left:40px}.select2-results-dept-3 .select2-result-label{padding-left:60px}.select2-results-dept-4 .select2-result-label{padding-left:80px}.select2-results-dept-5 .select2-result-label{padding-left:100px}.select2-results-dept-6 .select2-result-label{padding-left:110px}.select2-results-dept-7 .select2-result-label{padding-left:120px}.select2-results .select2-highlighted{background:#f1f1f1;color:#000;border-radius:3px}.select2-results li em{background:#feffde;font-style:normal}.select2-results .select2-highlighted em{background:0 0}.select2-results .select2-highlighted ul{background:#fff;color:#000}.select2-results .select2-ajax-error,.select2-results .select2-no-results,.select2-results .select2-searching,.select2-results .select2-selection-limit{background:#f4f4f4;display:list-item;padding-left:5px}.select2-results .select2-disabled.select2-highlighted{color:#666;background:#f4f4f4;display:list-item;cursor:default}.select2-results .select2-disabled{background:#f4f4f4;display:list-item;cursor:default}.select2-results .select2-selected{display:none}.select2-more-results.select2-active{background:url(../images/select2-spinner.gif) 100% no-repeat #f4f4f4}.select2-results .select2-ajax-error{background:rgba(255,50,50,.2)}.select2-more-results{background:#f4f4f4;display:list-item}.select2-container.select2-container-disabled .select2-choice{background-color:#f4f4f4;background-image:none;border:1px solid #ddd;cursor:default}.select2-container.select2-container-disabled .select2-choice .select2-arrow{background-color:#f4f4f4;background-image:none;border-left:0}.select2-container.select2-container-disabled .select2-choice abbr{display:none}.select2-container-multi .select2-choices{height:auto!important;height:1%;margin:0;padding:0 5px 0 0;position:relative;border:1px solid #ccc;cursor:text;overflow:hidden;background-color:#fff;min-height:26px}html[dir=rtl] .select2-container-multi .select2-choices{padding:0 0 0 5px}.select2-locked{padding:3px 5px!important}.select2-container-multi.select2-container-active .select2-choices{border:1px solid #666;outline:0}.select2-container-multi .select2-choices li{float:left;list-style:none}html[dir=rtl] .select2-container-multi .select2-choices li{float:right}.select2-container-multi .select2-choices .select2-search-field{margin:0;padding:0;white-space:nowrap}.select2-container-multi .select2-choices .select2-search-field:first-child{width:100%}.select2-container-multi .select2-choices .select2-search-field input{margin:1px 0;outline:0;border:0;-webkit-box-shadow:none;box-shadow:none;background:0 0!important}.select2-container-multi .select2-choices .select2-search-field input.select2-active{background:url(../images/select2-spinner.gif) 100% no-repeat #fff!important}.select2-default{color:#999!important}.select2-container-multi .select2-choices .select2-search-choice{padding:5px 8px 5px 24px;margin:3px 0 3px 5px;position:relative;line-height:15px;color:#333;cursor:default;border-radius:2px;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:#e4e4e4}html[dir=rtl] .select2-container-multi .select2-choices .select2-search-choice{margin:3px 5px 3px 0;padding:5px 24px 5px 8px}.select2-container-multi .ui-sortable .select2-search-choice{cursor:move}.select2-container-multi .select2-choices .select2-search-choice .select2-chosen{cursor:default}.select2-container-multi .select2-choices .select2-search-choice-focus{background:#d4d4d4}.select2-search-choice-close{display:block;width:12px;height:13px;position:absolute;right:7px;top:6px;font-size:1px;outline:0;background:url(../images/select2.png) right top no-repeat}html[dir=rtl] .select2-search-choice-close{right:auto;left:7px}.select2-container-multi .select2-search-choice-close{left:7px}html[dir=rtl] .select2-container-multi .select2-search-choice-close{left:auto;right:7px}.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover,.select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close{background-position:right -11px}.select2-container-multi.select2-container-disabled .select2-choices{background-color:#f4f4f4;background-image:none;border:1px solid #ddd;cursor:default}.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice{padding:3px 5px;border:1px solid #ddd;background-image:none;background-color:#f4f4f4}.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close{display:none;background:0 0}.select2-result-selectable .select2-match,.select2-result-unselectable .select2-match{text-decoration:underline}.select2-offscreen,.select2-offscreen:focus{clip:rect(0 0 0 0)!important;width:1px!important;height:1px!important;border:0!important;margin:0!important;padding:0!important;overflow:hidden!important;position:absolute!important;outline:0!important;left:0!important;top:0!important}.select2-display-none{display:none}.select2-measure-scrollbar{position:absolute;top:-10000px;left:-10000px;width:100px;height:100px;overflow:scroll}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:2dppx){.select2-search input{background-image:url(../images/select2x2.png)!important;background-repeat:no-repeat!important;background-size:60px 40px!important;background-position:100% -21px!important}}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item{margin:0 auto;position:relative;box-sizing:border-box}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item .accordion-inside,ul.tg-widget-repeater-field-items li.tg-widget-accordion-item .accordion-title{border:1px solid #e5e5e5;border-top:none}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item .accordion-top{cursor:move;font-size:13px;font-weight:600;line-height:1.4em;background:#fafafa}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item .accordion-top .accordion-title h3{margin:0;padding:10px;font-size:1em;line-height:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item .accordion-top .accordion-title .in-accordion-title{color:#666}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item .accordion-top .accordion-title-action{float:right;padding:0 8px;cursor:pointer;position:relative}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item .accordion-top .accordion-title-action a.accordion-action{color:#555;outline:0;display:block;box-shadow:none;text-decoration:none}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item .accordion-top .accordion-title-action a.accordion-action:after{font-family:Dashicons;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;top:0;left:0;width:100%;height:100%;text-align:center;content:"";font-size:20px;line-height:1.7em;position:relative}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item .accordion-inside{display:none;padding:1px 15px 15px}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item .accordion-inside .accordion-control-actions a{box-shadow:none}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item .accordion-inside .accordion-control-actions a.accordion-control-remove:hover{color:red}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item.open .accordion-top .accordion-title{box-shadow:0 1px 1px rgba(0,0,0,.04)}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item.open .accordion-top .accordion-title-action a.accordion-action:after{content:"\f142"}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item.open .accordion-inside{display:block}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item:first-child .accordion-title{border-top:1px solid #e5e5e5}ul.tg-widget-repeater-field-items li.tg-widget-sortable-placeholder{margin:0;width:100%;height:35px;box-sizing:border-box;border:1px dashed #b4b9be}ul.tg-widget-repeater-field-items li.tg-widget-repeater-field-blank-state{margin:0;overflow:hidden;position:relative;text-align:center;padding:2.5em 7.5%;background:#fafafa;border:1px solid #e5e5e5}ul.tg-widget-repeater-field-items li.tg-widget-repeater-field-blank-state .tg-widget-repeater-field-BlankState-message{color:#aaa;margin:0 auto 1.5em;line-height:1.5em;font-size:1.2em;max-width:500px}ul.tg-widget-repeater-field-items li.tg-widget-repeater-field-blank-state .tg-widget-repeater-field-BlankState-message::before{content:'\f456';font-family:dashicons;color:#ddd;font-size:4em;display:block;position:relative!important;top:auto;left:auto;line-height:1em;margin:0 0 .1875em}ul.tg-widget-repeater-field-items li.tg-widget-repeater-field-blank-state .tg-widget-repeater-field-BlankState-cta{font-size:1.2em;padding:.5em 1.5em;height:auto}.tg-widget-repeater-field-button .tg-widget-repeater-field-add{width:100%;margin:3px 0 0;text-align:center}#tg-widget-image-uploader .tg-media-preview{display:none;height:auto;margin-top:10px;border:1px solid #ddd;padding:4px;position:relative}#tg-widget-image-uploader .tg-media-preview:hover .tg-media-remove{opacity:1}#tg-widget-image-uploader .tg-media-preview img{max-width:100%;height:auto;display:block}#tg-widget-image-uploader .tg-media-remove{height:32px;width:32px;position:absolute;top:4px;right:4px;background:rgba(0,0,0,.3);cursor:pointer;color:#fff;border:none;opacity:.6}#tg-widget-image-uploader .tg-media-remove:hover{background:rgba(0,0,0,.6)}#tg-widget-image-uploader .tg-media-remove:active,#tg-widget-image-uploader .tg-media-remove:focus{outline:0}.select2-drop{z-index:999999!important}.select2-container-multi .select2-choices .select2-search-field input{font-family:inherit;font-size:inherit;font-weight:inherit;padding:3px 5px}.select2-container{line-height:1.85em;font-size:14px}.widget-content .select2-container{margin-bottom:1em}.select2-results .fa{float:right;position:relative;line-height:20px}
|
1 |
+
@charset "UTF-8";.select2-container{margin:0;position:relative;display:block!important;zoom:1;vertical-align:middle}.select2-container,.select2-drop,.select2-search,.select2-search input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.select2-container .select2-choice{display:block;padding:0 0 0 8px;overflow:hidden;position:relative;border:1px solid #ccc;white-space:nowrap;color:#444;text-decoration:none;border-radius:3px;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;font-weight:400}html[dir=rtl] .select2-container .select2-choice{padding:0 8px 0 0}.select2-container.select2-drop-above .select2-choice{border-bottom-color:#ccc;border-radius:0 0 4px 4px}.select2-container.select2-allowclear .select2-choice .select2-chosen{margin-right:42px}.select2-container .select2-choice>.select2-chosen{margin-right:26px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;float:none;width:auto}html[dir=rtl] .select2-container .select2-choice>.select2-chosen{margin-left:26px;margin-right:0}.select2-container .select2-choice abbr{display:none;width:12px;height:12px;position:absolute;right:24px;top:5px;font-size:1px;text-decoration:none;border:0;background:url(../images/select2.png) right top no-repeat;cursor:pointer;outline:0}.select2-container.select2-allowclear .select2-choice abbr{display:inline-block}.select2-container .select2-choice abbr:hover{background-position:right -11px;cursor:pointer}.select2-drop-mask{border:0;margin:0;padding:0;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:9998;background-color:#fff;filter:alpha(opacity=0)}.select2-drop{width:100%;margin-top:-1px;position:absolute;top:100%;background:#fff;color:#000;border:1px solid #ccc;border-top:0;border-radius:0 0 3px 3px}.select2-drop.select2-drop-above{margin-top:1px;border-top:1px solid #ccc;border-bottom:0;border-radius:3px 3px 0 0}.select2-drop-active{border:1px solid #666;border-top:none}.select2-drop.select2-drop-above.select2-drop-active{border-top:1px solid #666}.select2-drop-auto-width{border-top:1px solid #ccc;width:auto}.select2-drop-auto-width .select2-search{padding-top:4px}.select2-container .select2-choice .select2-arrow{display:inline-block;width:18px;height:100%;position:absolute;right:0;top:0;border-radius:0 3px 3px 0;background-clip:padding-box}html[dir=rtl] .select2-container .select2-choice .select2-arrow{left:0;right:auto;border-radius:3px 0 0 3px}.select2-container .select2-choice .select2-arrow b{display:block;width:100%;height:100%;position:relative}.select2-container .select2-choice .select2-arrow b:after{position:absolute;display:block;content:"";top:50%;left:50%;border:4px solid transparent;border-top-color:#666;margin-left:-7px;margin-top:-2px}.select2-search{display:inline-block;width:100%;margin:0;padding-left:4px;padding-right:4px;position:relative;z-index:10000;white-space:nowrap;padding-bottom:4px}.select2-search input{width:100%;height:auto!important;padding:4px 20px 4px 5px!important;margin:0;outline:0;font-family:sans-serif;font-size:1em;border:1px solid #ccc;-webkit-box-shadow:none;box-shadow:none;background:url(../images/select2.png) 100% -22px no-repeat #fff}html[dir=rtl] .select2-search input{padding:4px 5px 4px 20px;background:url(../images/select2.png) -37px -22px no-repeat #fff}.select2-drop.select2-drop-above .select2-search input{margin-top:4px}.select2-search input.select2-active{background:url(../images/select2-spinner.gif) 100% no-repeat #fff}.select2-container-active .select2-choice,.select2-container-active .select2-choices{border:1px solid #666;outline:0}.select2-dropdown-open .select2-choice{border-bottom-color:transparent;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-dropdown-open .select2-choice .select2-arrow b:after{border-top-color:transparent;border-bottom-color:#666;margin-top:-6px}.select2-dropdown-open.select2-drop-above .select2-choice,.select2-dropdown-open.select2-drop-above .select2-choices{border:1px solid #666;border-top-color:transparent}.select2-dropdown-open .select2-choice .select2-arrow{background:0 0;border-left:none;filter:none}html[dir=rtl] .select2-dropdown-open .select2-choice .select2-arrow{border-right:none}.select2-dropdown-open .select2-choice .select2-arrow b{background-position:-18px 1px}html[dir=rtl] .select2-dropdown-open .select2-choice .select2-arrow b{background-position:-16px 1px}.select2-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.select2-results{max-height:200px;padding:4px;margin:0;position:relative;overflow-x:hidden;overflow-y:auto;-webkit-tap-highlight-color:transparent;background:#fafafa}html[dir=rtl] .select2-results{padding:0 4px 0 0;margin:4px 0 4px 4px}.select2-results ul.select2-result-sub{margin:0;padding-left:0}.select2-results li{list-style:none;display:list-item;background-image:none;margin:3px 0}.select2-results li.select2-result-with-children>.select2-result-label{font-weight:700}.select2-results .select2-result-label{padding:5px 7px;margin:0;cursor:pointer;min-height:1em;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.select2-results-dept-1 .select2-result-label{padding-left:20px}.select2-results-dept-2 .select2-result-label{padding-left:40px}.select2-results-dept-3 .select2-result-label{padding-left:60px}.select2-results-dept-4 .select2-result-label{padding-left:80px}.select2-results-dept-5 .select2-result-label{padding-left:100px}.select2-results-dept-6 .select2-result-label{padding-left:110px}.select2-results-dept-7 .select2-result-label{padding-left:120px}.select2-results .select2-highlighted{background:#f1f1f1;color:#000;border-radius:3px}.select2-results li em{background:#feffde;font-style:normal}.select2-results .select2-highlighted em{background:0 0}.select2-results .select2-highlighted ul{background:#fff;color:#000}.select2-results .select2-ajax-error,.select2-results .select2-no-results,.select2-results .select2-searching,.select2-results .select2-selection-limit{background:#f4f4f4;display:list-item;padding-left:5px}.select2-results .select2-disabled.select2-highlighted{color:#666;background:#f4f4f4;display:list-item;cursor:default}.select2-results .select2-disabled{background:#f4f4f4;display:list-item;cursor:default}.select2-results .select2-selected{display:none}.select2-more-results.select2-active{background:url(../images/select2-spinner.gif) 100% no-repeat #f4f4f4}.select2-results .select2-ajax-error{background:rgba(255,50,50,.2)}.select2-more-results{background:#f4f4f4;display:list-item}.select2-container.select2-container-disabled .select2-choice{background-color:#f4f4f4;background-image:none;border:1px solid #ddd;cursor:default}.select2-container.select2-container-disabled .select2-choice .select2-arrow{background-color:#f4f4f4;background-image:none;border-left:0}.select2-container.select2-container-disabled .select2-choice abbr{display:none}.select2-container-multi .select2-choices{height:auto!important;height:1%;margin:0;padding:0 5px 0 0;position:relative;border:1px solid #ccc;cursor:text;overflow:hidden;background-color:#fff;min-height:26px}html[dir=rtl] .select2-container-multi .select2-choices{padding:0 0 0 5px}.select2-locked{padding:3px 5px!important}.select2-container-multi.select2-container-active .select2-choices{border:1px solid #666;outline:0}.select2-container-multi .select2-choices li{float:left;list-style:none}html[dir=rtl] .select2-container-multi .select2-choices li{float:right}.select2-container-multi .select2-choices .select2-search-field{margin:0;padding:0;white-space:nowrap}.select2-container-multi .select2-choices .select2-search-field:first-child{width:100%}.select2-container-multi .select2-choices .select2-search-field input{margin:1px 0;outline:0;border:0;-webkit-box-shadow:none;box-shadow:none;background:0 0!important}.select2-container-multi .select2-choices .select2-search-field input.select2-active{background:url(../images/select2-spinner.gif) 100% no-repeat #fff!important}.select2-default{color:#999!important}.select2-container-multi .select2-choices .select2-search-choice{padding:5px 8px 5px 24px;margin:3px 0 3px 5px;position:relative;line-height:15px;color:#333;cursor:default;border-radius:2px;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:#e4e4e4}html[dir=rtl] .select2-container-multi .select2-choices .select2-search-choice{margin:3px 5px 3px 0;padding:5px 24px 5px 8px}.select2-container-multi .ui-sortable .select2-search-choice{cursor:move}.select2-container-multi .select2-choices .select2-search-choice .select2-chosen{cursor:default}.select2-container-multi .select2-choices .select2-search-choice-focus{background:#d4d4d4}.select2-search-choice-close{display:block;width:12px;height:13px;position:absolute;right:7px;top:6px;font-size:1px;outline:0;background:url(../images/select2.png) right top no-repeat}html[dir=rtl] .select2-search-choice-close{right:auto;left:7px}.select2-container-multi .select2-search-choice-close{left:7px}html[dir=rtl] .select2-container-multi .select2-search-choice-close{left:auto;right:7px}.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover,.select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close{background-position:right -11px}.select2-container-multi.select2-container-disabled .select2-choices{background-color:#f4f4f4;background-image:none;border:1px solid #ddd;cursor:default}.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice{padding:3px 5px;border:1px solid #ddd;background-image:none;background-color:#f4f4f4}.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close{display:none;background:0 0}.select2-result-selectable .select2-match,.select2-result-unselectable .select2-match{text-decoration:underline}.select2-offscreen,.select2-offscreen:focus{clip:rect(0 0 0 0)!important;width:1px!important;height:1px!important;border:0!important;margin:0!important;padding:0!important;overflow:hidden!important;position:absolute!important;outline:0!important;left:0!important;top:0!important}.select2-display-none{display:none}.select2-measure-scrollbar{position:absolute;top:-10000px;left:-10000px;width:100px;height:100px;overflow:scroll}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:2dppx){.select2-search input{background-image:url(../images/select2x2.png)!important;background-repeat:no-repeat!important;background-size:60px 40px!important;background-position:100% -21px!important}}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item{margin:0 auto;position:relative;box-sizing:border-box}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item .accordion-inside,ul.tg-widget-repeater-field-items li.tg-widget-accordion-item .accordion-title{border:1px solid #e5e5e5;border-top:none}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item .accordion-top{cursor:move;font-size:13px;font-weight:600;line-height:1.4em;background:#fafafa}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item .accordion-top .accordion-title h3{margin:0;padding:10px;font-size:1em;line-height:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item .accordion-top .accordion-title .in-accordion-title{color:#666}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item .accordion-top .accordion-title-action{float:right;padding:0 8px;cursor:pointer;position:relative}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item .accordion-top .accordion-title-action a.accordion-action{color:#555;outline:0;display:block;box-shadow:none;text-decoration:none}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item .accordion-top .accordion-title-action a.accordion-action:after{font-family:Dashicons;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;top:0;left:0;width:100%;height:100%;text-align:center;content:"";font-size:20px;line-height:1.7em;position:relative}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item .accordion-inside{display:none;padding:1px 15px 15px}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item .accordion-inside .accordion-control-actions a{box-shadow:none}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item .accordion-inside .accordion-control-actions a.accordion-control-remove:hover{color:red}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item.open .accordion-top .accordion-title{box-shadow:0 1px 1px rgba(0,0,0,.04)}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item.open .accordion-top .accordion-title-action a.accordion-action:after{content:"\f142"}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item.open .accordion-inside{display:block}ul.tg-widget-repeater-field-items li.tg-widget-accordion-item:first-child .accordion-title{border-top:1px solid #e5e5e5}ul.tg-widget-repeater-field-items li.tg-widget-sortable-placeholder{margin:0;width:100%;height:35px;box-sizing:border-box;border:1px dashed #b4b9be}ul.tg-widget-repeater-field-items li.tg-widget-repeater-field-blank-state{margin:0;overflow:hidden;position:relative;text-align:center;padding:2.5em 7.5%;background:#fafafa;border:1px solid #e5e5e5}ul.tg-widget-repeater-field-items li.tg-widget-repeater-field-blank-state .tg-widget-repeater-field-BlankState-message{color:#aaa;margin:0 auto 1.5em;line-height:1.5em;font-size:1.2em;max-width:500px}ul.tg-widget-repeater-field-items li.tg-widget-repeater-field-blank-state .tg-widget-repeater-field-BlankState-message::before{content:'\f456';font-family:dashicons;color:#ddd;font-size:4em;display:block;position:relative!important;top:auto;left:auto;line-height:1em;margin:0 0 .1875em}ul.tg-widget-repeater-field-items li.tg-widget-repeater-field-blank-state .tg-widget-repeater-field-BlankState-cta{font-size:1.2em;padding:.5em 1.5em;height:auto}.tg-widget-repeater-field-button .tg-widget-repeater-field-add{width:100%;margin:3px 0 0;text-align:center}#tg-widget-image-uploader .tg-media-preview{display:none;height:auto;margin-top:10px;border:1px solid #ddd;padding:4px;position:relative}#tg-widget-image-uploader .tg-media-preview:hover .tg-media-remove{opacity:1}#tg-widget-image-uploader .tg-media-preview img{max-width:100%;height:auto;display:block}#tg-widget-image-uploader .tg-media-remove{height:32px;width:32px;position:absolute;top:4px;right:4px;background:rgba(0,0,0,.3);cursor:pointer;color:#fff;border:none;opacity:.6}#tg-widget-image-uploader .tg-media-remove:hover{background:rgba(0,0,0,.6)}#tg-widget-image-uploader .tg-media-remove:active,#tg-widget-image-uploader .tg-media-remove:focus{outline:0}.flash-toolkit-add-sidebar{padding:10px;max-width:900px;text-align:center;background-color:#fff;border:1px solid #e5e5e5;box-shadow:0,1px 0,0,rgba(0,0,0,.04)}.flash-toolkit-add-sidebar input[type=text]{max-width:25em;margin:0 0 15px;padding:5px 10px;line-height:19px;vertical-align:top}.flash-toolkit-delete-sidebar{color:#aaa;z-index:100;position:absolute;top:12px;right:45px}.flash-toolkit-delete-sidebar::before{font-family:Dashicons;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;content:"";text-decoration:none;font-size:20px;margin-right:0}.flash-toolkit-delete-sidebar:hover{color:#d54e21;cursor:pointer}.select2-drop{z-index:999999!important}.select2-container-multi .select2-choices .select2-search-field input{font-family:inherit;font-size:inherit;font-weight:inherit;padding:3px 5px}.select2-container{line-height:1.85em;font-size:14px}.widget-content .select2-container{margin-bottom:1em}.select2-results .fa{float:right;position:relative;line-height:20px}
|
assets/css/widgets.scss
CHANGED
@@ -215,6 +215,43 @@ ul.tg-widget-repeater-field-items {
|
|
215 |
}
|
216 |
}
|
217 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
/**
|
219 |
* Select2
|
220 |
*/
|
215 |
}
|
216 |
}
|
217 |
|
218 |
+
/**
|
219 |
+
* Custom Sidebar
|
220 |
+
*/
|
221 |
+
.flash-toolkit-add-sidebar {
|
222 |
+
padding: 10px;
|
223 |
+
max-width: 900px;
|
224 |
+
text-align: center;
|
225 |
+
background-color: #fff;
|
226 |
+
border: 1px solid #e5e5e5;
|
227 |
+
box-shadow: 0, 1px 0, 0, rgba(0, 0, 0, 0.04);
|
228 |
+
|
229 |
+
input[type='text'] {
|
230 |
+
max-width: 25em;
|
231 |
+
margin: 0 0 15px;
|
232 |
+
padding: 5px 10px;
|
233 |
+
line-height: 19px;
|
234 |
+
vertical-align: top;
|
235 |
+
}
|
236 |
+
}
|
237 |
+
|
238 |
+
.flash-toolkit-delete-sidebar {
|
239 |
+
color: #aaa;
|
240 |
+
z-index: 100;
|
241 |
+
@include position(absolute, 12px 45px null null);
|
242 |
+
|
243 |
+
&::before {
|
244 |
+
@include iconbeforedashicons( '\f158' );
|
245 |
+
font-size: 20px;
|
246 |
+
margin-right: 0;
|
247 |
+
}
|
248 |
+
|
249 |
+
&:hover {
|
250 |
+
color: #d54e21;
|
251 |
+
cursor: pointer;
|
252 |
+
}
|
253 |
+
}
|
254 |
+
|
255 |
/**
|
256 |
* Select2
|
257 |
*/
|
assets/js/admin/admin.js
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* FlashToolkit Admin JS
|
3 |
+
*/
|
4 |
+
jQuery( function ( $ ) {
|
5 |
+
|
6 |
+
// Tooltips
|
7 |
+
$( document.body ).on( 'init_tooltips', function() {
|
8 |
+
var tiptip_args = {
|
9 |
+
'attribute': 'data-tip',
|
10 |
+
'fadeIn': 50,
|
11 |
+
'fadeOut': 50,
|
12 |
+
'delay': 200
|
13 |
+
};
|
14 |
+
|
15 |
+
$( '.tips, .help_tip, .flash-toolkit-help-tip' ).tipTip( tiptip_args );
|
16 |
+
|
17 |
+
// Add tiptip to parent element for widefat tables
|
18 |
+
$( '.parent-tips' ).each( function() {
|
19 |
+
$( this ).closest( 'a, th' ).attr( 'data-tip', $( this ).data( 'tip' ) ).tipTip( tiptip_args ).css( 'cursor', 'help' );
|
20 |
+
});
|
21 |
+
}).trigger( 'init_tooltips' );
|
22 |
+
});
|
assets/js/admin/admin.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
jQuery(function(a){a(document.body).on("init_tooltips",function(){var b={attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200};a(".tips, .help_tip, .flash-toolkit-help-tip").tipTip(b),a(".parent-tips").each(function(){a(this).closest("a, th").attr("data-tip",a(this).data("tip")).tipTip(b).css("cursor","help")})}).trigger("init_tooltips")});
|
assets/js/admin/meta-boxes-layout.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function ( $ ) {
|
2 |
+
|
3 |
+
$( 'select.show_if_sidebar' ).change( function() {
|
4 |
+
if ( $( this ).val() === 'full-width' || $( this ).val() === 'full-width-center' ) {
|
5 |
+
$( this ).parent().next( 'p.form-field' ).slideUp( 300 );
|
6 |
+
} else {
|
7 |
+
$( this ).parent().next( 'p.form-field' ).slideDown( 300 );
|
8 |
+
}
|
9 |
+
}).change();
|
10 |
+
|
11 |
+
});
|
assets/js/admin/meta-boxes-layout.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
jQuery(function(a){a("select.show_if_sidebar").change(function(){"full-width"===a(this).val()||"full-width-center"===a(this).val()?a(this).parent().next("p.form-field").slideUp(300):a(this).parent().next("p.form-field").slideDown(300)}).change()});
|
assets/js/admin/meta-boxes.js
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function ( $ ) {
|
2 |
+
|
3 |
+
// Tabbed Panels
|
4 |
+
$( document.body ).on( 'ft-init-tabbed-panels', function() {
|
5 |
+
$( 'ul.ft-tabs' ).show();
|
6 |
+
$( 'ul.ft-tabs a' ).click( function() {
|
7 |
+
var panel_wrap = $( this ).closest( 'div.panel-wrap' );
|
8 |
+
$( 'ul.ft-tabs li', panel_wrap ).removeClass( 'active' );
|
9 |
+
$( this ).parent().addClass( 'active' );
|
10 |
+
$( 'div.panel', panel_wrap ).hide();
|
11 |
+
$( $( this ).attr( 'href' ) ).show();
|
12 |
+
return false;
|
13 |
+
});
|
14 |
+
$( 'div.panel-wrap' ).each( function() {
|
15 |
+
$( this ).find( 'ul.ft-tabs li' ).eq( 0 ).find( 'a' ).click();
|
16 |
+
});
|
17 |
+
}).trigger( 'ft-init-tabbed-panels' );
|
18 |
+
});
|
assets/js/admin/meta-boxes.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
jQuery(function(a){a(document.body).on("ft-init-tabbed-panels",function(){a("ul.ft-tabs").show(),a("ul.ft-tabs a").click(function(){var b=a(this).closest("div.panel-wrap");return a("ul.ft-tabs li",b).removeClass("active"),a(this).parent().addClass("active"),a("div.panel",b).hide(),a(a(this).attr("href")).show(),!1}),a("div.panel-wrap").each(function(){a(this).find("ul.ft-tabs li").eq(0).find("a").click()})}).trigger("ft-init-tabbed-panels")});
|
assets/js/admin/sidebars.js
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global flash_toolkit_admin_sidebars */
|
2 |
+
jQuery( function( $ ) {
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Custom Sidebars Actions.
|
6 |
+
*/
|
7 |
+
var flash_toolkit_custom_sidebars_actions = {
|
8 |
+
init: function() {
|
9 |
+
this.initial_load();
|
10 |
+
$( '.widget-liquid-right' ).on( 'click', '.flash-toolkit-delete-sidebar', this.delete_sidebar );
|
11 |
+
},
|
12 |
+
initial_load: function() {
|
13 |
+
$( '#widgets-right' ).prepend( $( '#tmpl-flash-toolkit-form-create-sidebar' ).html() );
|
14 |
+
|
15 |
+
// Add trash icon for custom sidebars.
|
16 |
+
$( '#widgets-right .sidebar-flash-toolkit-custom-widgets-area' ).css({
|
17 |
+
'position': 'relative'
|
18 |
+
}).append( '<div class="flash-toolkit-delete-sidebar"></div>' );
|
19 |
+
},
|
20 |
+
delete_sidebar: function( e ) {
|
21 |
+
var widgets = $( e.currentTarget ).parents( '.widgets-holder-wrap:eq(0)' ),
|
22 |
+
title = widgets.find( '.sidebar-name h2, .sidebar-name h3' ); // Since WP 4.4, Sidebar name is stored in h2 tag.
|
23 |
+
|
24 |
+
// Confirmation dialog for deleting a custom sidebar.
|
25 |
+
if ( ! window.confirm( flash_toolkit_admin_sidebars.i18n_confirm_delete_custom_sidebar ) ) {
|
26 |
+
return;
|
27 |
+
}
|
28 |
+
|
29 |
+
$.ajax( {
|
30 |
+
url: flash_toolkit_admin_sidebars.ajax_url,
|
31 |
+
data: {
|
32 |
+
sidebar: $.trim( title.text() ),
|
33 |
+
action: 'flash_toolkit_delete_custom_sidebar',
|
34 |
+
security: flash_toolkit_admin_sidebars.delete_custom_sidebar_nonce
|
35 |
+
},
|
36 |
+
type: 'POST',
|
37 |
+
beforeSend: function() {
|
38 |
+
title.find( '.spinner' ).addClass( 'is-active' );
|
39 |
+
},
|
40 |
+
success: function( response ) {
|
41 |
+
if ( response.success === true ) {
|
42 |
+
$( '.widget-control-remove', widgets ).trigger( 'click' );
|
43 |
+
widgets.slideUp( 250, function() {
|
44 |
+
widgets.remove();
|
45 |
+
});
|
46 |
+
|
47 |
+
// Finally, reload the window.
|
48 |
+
window.setTimeout( function() {
|
49 |
+
window.location.reload();
|
50 |
+
}, 100 );
|
51 |
+
}
|
52 |
+
}
|
53 |
+
});
|
54 |
+
}
|
55 |
+
};
|
56 |
+
|
57 |
+
flash_toolkit_custom_sidebars_actions.init();
|
58 |
+
});
|
assets/js/admin/sidebars.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
jQuery(function(a){var b={init:function(){this.initial_load(),a(".widget-liquid-right").on("click",".flash-toolkit-delete-sidebar",this.delete_sidebar)},initial_load:function(){a("#widgets-right").prepend(a("#tmpl-flash-toolkit-form-create-sidebar").html()),a("#widgets-right .sidebar-flash-toolkit-custom-widgets-area").css({position:"relative"}).append('<div class="flash-toolkit-delete-sidebar"></div>')},delete_sidebar:function(b){var c=a(b.currentTarget).parents(".widgets-holder-wrap:eq(0)"),d=c.find(".sidebar-name h2, .sidebar-name h3");window.confirm(flash_toolkit_admin_sidebars.i18n_confirm_delete_custom_sidebar)&&a.ajax({url:flash_toolkit_admin_sidebars.ajax_url,data:{sidebar:a.trim(d.text()),action:"flash_toolkit_delete_custom_sidebar",security:flash_toolkit_admin_sidebars.delete_custom_sidebar_nonce},type:"POST",beforeSend:function(){d.find(".spinner").addClass("is-active")},success:function(b){b.success===!0&&(a(".widget-control-remove",c).trigger("click"),c.slideUp(250,function(){c.remove()}),window.setTimeout(function(){window.location.reload()},100))}})}};b.init()});
|
assets/js/admin/widgets.js
CHANGED
@@ -77,6 +77,32 @@ jQuery( function ( $ ) {
|
|
77 |
}
|
78 |
}).change();
|
79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
$( 'input.availability' ).change( function() {
|
81 |
if ( $( this ).is( ':checked' ) ) {
|
82 |
$( this ).closest( 'p' ).next( 'p' ).hide();
|
77 |
}
|
78 |
}).change();
|
79 |
|
80 |
+
$( 'select.media_chooser' ).change( function() {
|
81 |
+
if ( $( this ).val() === 'image' ) {
|
82 |
+
$( this ).closest( '.widget-content' ).find( '.show_if_image' ).show();
|
83 |
+
$( this ).closest( '.widget-content' ).find( '.show_if_video' ).closest( 'p' ).hide();
|
84 |
+
} else {
|
85 |
+
$( this ).closest( '.widget-content' ).find( '.show_if_image' ).hide();
|
86 |
+
$( this ).closest( '.widget-content' ).find( '.show_if_video' ).closest( 'p' ).show();
|
87 |
+
}
|
88 |
+
}).change();
|
89 |
+
|
90 |
+
$( 'select.filter_availability' ).change( function() {
|
91 |
+
if ( $( this ).val() === '0' ) {
|
92 |
+
$( this ).closest( '.widget-content' ).find( '.show_if_all_category' ).closest( 'p' ).show();
|
93 |
+
} else {
|
94 |
+
$( this ).closest( '.widget-content' ).find( '.show_if_all_category' ).closest( 'p' ).hide();
|
95 |
+
}
|
96 |
+
}).change();
|
97 |
+
|
98 |
+
$( 'select.availability' ).change( function() {
|
99 |
+
if ( $( this ).val() === 'latest' ) {
|
100 |
+
$( this ).closest( 'p' ).next( 'p' ).hide();
|
101 |
+
} else {
|
102 |
+
$( this ).closest( 'p' ).next( 'p' ).show();
|
103 |
+
}
|
104 |
+
}).change();
|
105 |
+
|
106 |
$( 'input.availability' ).change( function() {
|
107 |
if ( $( this ).is( ':checked' ) ) {
|
108 |
$( this ).closest( 'p' ).next( 'p' ).hide();
|
assets/js/admin/widgets.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(a){function b(a){var b=a.find(".tg-widget-repeater-field-items"),c=b.find("li.tg-widget-accordion-item"),d=wp.template("tg-widget-repeater-field-blank");c.length?(a.find(".tg-widget-repeater-field-button").show(),c.length<flashToolkitLocalizeScript.i18n_max_field_entries&&a.find(".tg-widget-repeater-field-button a").removeClass("disabled")):(a.find(".tg-widget-repeater-field-button").hide(),a.find(".tg-widget-repeater-field-blank-state").remove(),b.append(d))}function c(b){b.find(".tg-widget-repeater-field-items").sortable({items:"> li",handle:"> .accordion-top > .accordion-title",cursor:"move",axis:"y",distance:2,opacity:.65,scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,placeholder:"tg-widget-sortable-placeholder",start:function(b,c){var d=c.item.children(".accordion-inside");"block"===d.css("display")&&(c.item.removeClass("open"),d.hide(),a(this).sortable("refreshPositions"))},stop:function(a,b){b.item.removeAttr("style")}})}var d;a(document.body).on("click",".tg-image-upload",function(b){var c=a(this),e=c.parent().find(".tg-media-input"),f=c.parent().parent().find(".tg-media-preview");b.preventDefault(),d=wp.media.frames.media_file=wp.media({title:c.data("choose"),button:{text:c.data("update")},states:[new wp.media.controller.Library({title:c.data("choose"),library:wp.media.query({type:"image"})})]}),d.on("select",function(){var a=d.state().get("selection").first().toJSON();e.val(a.url),f.css({display:"none"}).find("img").remove(),f.css({display:"block"}).append('<img src="'+a.url+'">')}),d.open()}),a(document.body).on("click",".tg-media-remove",function(){var b=a(this).closest(".media-uploader");return b.find(".tg-media-input").val(""),b.find(".tg-media-preview").css({display:"none"}).find("img").remove(),!1}),a(document.body).on("flash-toolkit-init-media-preview",function(){a("input.tg-media-input").each(function(){var b=a(this).val(),c=a(this).parent().siblings(".tg-media-preview");""!==b&&(c.find("img.tg-media-preview-default").remove(),c.css({display:"block"}).append('<img src="'+b+'">'))})}).trigger("flash-toolkit-init-media-preview"),a(document.body).on("flash-toolkit-init-availability",function(){a("select.icon_chooser").change(function(){"image"===a(this).val()?(a(this).closest("p").next(".show_if_icon").hide(),a(this).closest("p").next().next(".show_if_image").show()):(a(this).closest("p").next(".show_if_icon").show(),a(this).closest("p").next().next(".show_if_image").hide())}).change(),a("input.availability").change(function(){a(this).is(":checked")?a(this).closest("p").next("p").hide():a(this).closest("p").next("p").show()}).change()}).trigger("flash-toolkit-init-availability"),a(document.body).on("flash-toolkit-init-accordion-title",function(){a(".tg-widget-repeater-field-items").children("li").each(function(){var b=a('input[id*="-title"]',this).val()||"";b&&(b=": "+b.replace(/<[^<>]+>/g,"").replace(/</g,"<").replace(/>/g,">")),a(this).children(".accordion-top").children(".accordion-title").children().children(".in-accordion-title").html(b)})}).trigger("flash-toolkit-init-accordion-title"),a(document.body).on("click",".tg-widget-repeater-field-add",function(b){if(b.preventDefault(),a(this).is(".disabled"))return void window.alert(flashToolkitLocalizeScript.i18n_max_field_message);var c=a(this).parents(".widget-content"),d=c.find("li.tg-widget-accordion-item").length+1,e=c.find(".tg-widget-repeater-field-items").data("widget_id"),f=wp.template("tg-widget-repeater-field-"+e);c.find("li.tg-widget-accordion-item").each(function(b,c){d===parseInt(a(c).data("id").replace(/[^0-9\.]/g,""),10)&&d++}),c.find(".tg-widget-repeater-field-button").show(),c.find(".tg-widget-repeater-field-blank-state").remove(),c.find(".tg-widget-repeater-field-items").append(f({field_id:d})),d>=flashToolkitLocalizeScript.i18n_max_field_entries&&c.find(".tg-widget-repeater-field-button a").addClass("disabled")}),a(document.body).on("click.accordion-toggle",function(c){var d,e,f,g=a(c.target);g.parents(".accordion-top").length&&!g.parents("#available-fields").length?(d=g.closest("li.tg-widget-accordion-item"),e=d.children(".accordion-inside"),e.is(":hidden")?(d.addClass("open"),e.slideDown("fast")):e.slideUp("fast",function(){d.attr("style",""),d.removeClass("open")}),c.preventDefault()):g.hasClass("accordion-control-close")?(d=g.closest("li.tg-widget-accordion-item"),d.children(".accordion-inside").slideUp("fast",function(){d.attr("style",""),d.removeClass("open")}),c.preventDefault()):g.hasClass("accordion-control-remove")&&(d=g.closest("li.tg-widget-accordion-item"),f=g.parents(".widget[id*=themegrill_flash], .widget-content"),d.remove(),b(f),c.preventDefault())}),a(document.body).on("panelsopen",function(d){var e=a(d.target);return!!e.has(".tg-widget-repeater-field-items")&&(e.addClass("widget-content"),b(e),c(e),a(document.body).trigger("flash-enhanced-select-init"),a(document.body).trigger("flash-toolkit-init-availability"),a(document.body).trigger("flash-toolkit-init-media-preview"),void a(document.body).trigger("flash-toolkit-init-accordion-title"))}),a(document.body).on("click",".so-close",function(){a(document.body).trigger("flash-toolkit-init-accordion-title")}),a(document.body).on("click","div.widget[id*=themegrill_flash] .widget-title, div.widget[id*=themegrill_flash] .widget-title-action",function(){a(this).parents("#available-widgets").length||(b(a(this).parents(".widget[id*=themegrill_flash]")),c(a(this).parents(".widget[id*=themegrill_flash]")))}),a(document).on("widget-added widget-updated",function(d,e){e.is("[id*=themegrill_flash]")&&(d.preventDefault(),b(e),c(e),a(document.body).trigger("flash-enhanced-select-init"),a(document.body).trigger("flash-toolkit-init-availability"),a(document.body).trigger("flash-toolkit-init-media-preview"),a(document.body).trigger("flash-toolkit-init-accordion-title"))})});
|
1 |
+
jQuery(function(a){function b(a){var b=a.find(".tg-widget-repeater-field-items"),c=b.find("li.tg-widget-accordion-item"),d=wp.template("tg-widget-repeater-field-blank");c.length?(a.find(".tg-widget-repeater-field-button").show(),c.length<flashToolkitLocalizeScript.i18n_max_field_entries&&a.find(".tg-widget-repeater-field-button a").removeClass("disabled")):(a.find(".tg-widget-repeater-field-button").hide(),a.find(".tg-widget-repeater-field-blank-state").remove(),b.append(d))}function c(b){b.find(".tg-widget-repeater-field-items").sortable({items:"> li",handle:"> .accordion-top > .accordion-title",cursor:"move",axis:"y",distance:2,opacity:.65,scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,placeholder:"tg-widget-sortable-placeholder",start:function(b,c){var d=c.item.children(".accordion-inside");"block"===d.css("display")&&(c.item.removeClass("open"),d.hide(),a(this).sortable("refreshPositions"))},stop:function(a,b){b.item.removeAttr("style")}})}var d;a(document.body).on("click",".tg-image-upload",function(b){var c=a(this),e=c.parent().find(".tg-media-input"),f=c.parent().parent().find(".tg-media-preview");b.preventDefault(),d=wp.media.frames.media_file=wp.media({title:c.data("choose"),button:{text:c.data("update")},states:[new wp.media.controller.Library({title:c.data("choose"),library:wp.media.query({type:"image"})})]}),d.on("select",function(){var a=d.state().get("selection").first().toJSON();e.val(a.url),f.css({display:"none"}).find("img").remove(),f.css({display:"block"}).append('<img src="'+a.url+'">')}),d.open()}),a(document.body).on("click",".tg-media-remove",function(){var b=a(this).closest(".media-uploader");return b.find(".tg-media-input").val(""),b.find(".tg-media-preview").css({display:"none"}).find("img").remove(),!1}),a(document.body).on("flash-toolkit-init-media-preview",function(){a("input.tg-media-input").each(function(){var b=a(this).val(),c=a(this).parent().siblings(".tg-media-preview");""!==b&&(c.find("img.tg-media-preview-default").remove(),c.css({display:"block"}).append('<img src="'+b+'">'))})}).trigger("flash-toolkit-init-media-preview"),a(document.body).on("flash-toolkit-init-availability",function(){a("select.icon_chooser").change(function(){"image"===a(this).val()?(a(this).closest("p").next(".show_if_icon").hide(),a(this).closest("p").next().next(".show_if_image").show()):(a(this).closest("p").next(".show_if_icon").show(),a(this).closest("p").next().next(".show_if_image").hide())}).change(),a("select.media_chooser").change(function(){"image"===a(this).val()?(a(this).closest(".widget-content").find(".show_if_image").show(),a(this).closest(".widget-content").find(".show_if_video").closest("p").hide()):(a(this).closest(".widget-content").find(".show_if_image").hide(),a(this).closest(".widget-content").find(".show_if_video").closest("p").show())}).change(),a("select.filter_availability").change(function(){"0"===a(this).val()?a(this).closest(".widget-content").find(".show_if_all_category").closest("p").show():a(this).closest(".widget-content").find(".show_if_all_category").closest("p").hide()}).change(),a("select.availability").change(function(){"latest"===a(this).val()?a(this).closest("p").next("p").hide():a(this).closest("p").next("p").show()}).change(),a("input.availability").change(function(){a(this).is(":checked")?a(this).closest("p").next("p").hide():a(this).closest("p").next("p").show()}).change()}).trigger("flash-toolkit-init-availability"),a(document.body).on("flash-toolkit-init-accordion-title",function(){a(".tg-widget-repeater-field-items").children("li").each(function(){var b=a('input[id*="-title"]',this).val()||"";b&&(b=": "+b.replace(/<[^<>]+>/g,"").replace(/</g,"<").replace(/>/g,">")),a(this).children(".accordion-top").children(".accordion-title").children().children(".in-accordion-title").html(b)})}).trigger("flash-toolkit-init-accordion-title"),a(document.body).on("click",".tg-widget-repeater-field-add",function(b){if(b.preventDefault(),a(this).is(".disabled"))return void window.alert(flashToolkitLocalizeScript.i18n_max_field_message);var c=a(this).parents(".widget-content"),d=c.find("li.tg-widget-accordion-item").length+1,e=c.find(".tg-widget-repeater-field-items").data("widget_id"),f=wp.template("tg-widget-repeater-field-"+e);c.find("li.tg-widget-accordion-item").each(function(b,c){d===parseInt(a(c).data("id").replace(/[^0-9\.]/g,""),10)&&d++}),c.find(".tg-widget-repeater-field-button").show(),c.find(".tg-widget-repeater-field-blank-state").remove(),c.find(".tg-widget-repeater-field-items").append(f({field_id:d})),d>=flashToolkitLocalizeScript.i18n_max_field_entries&&c.find(".tg-widget-repeater-field-button a").addClass("disabled")}),a(document.body).on("click.accordion-toggle",function(c){var d,e,f,g=a(c.target);g.parents(".accordion-top").length&&!g.parents("#available-fields").length?(d=g.closest("li.tg-widget-accordion-item"),e=d.children(".accordion-inside"),e.is(":hidden")?(d.addClass("open"),e.slideDown("fast")):e.slideUp("fast",function(){d.attr("style",""),d.removeClass("open")}),c.preventDefault()):g.hasClass("accordion-control-close")?(d=g.closest("li.tg-widget-accordion-item"),d.children(".accordion-inside").slideUp("fast",function(){d.attr("style",""),d.removeClass("open")}),c.preventDefault()):g.hasClass("accordion-control-remove")&&(d=g.closest("li.tg-widget-accordion-item"),f=g.parents(".widget[id*=themegrill_flash], .widget-content"),d.remove(),b(f),c.preventDefault())}),a(document.body).on("panelsopen",function(d){var e=a(d.target);return!!e.has(".tg-widget-repeater-field-items")&&(e.addClass("widget-content"),b(e),c(e),a(document.body).trigger("flash-enhanced-select-init"),a(document.body).trigger("flash-toolkit-init-availability"),a(document.body).trigger("flash-toolkit-init-media-preview"),void a(document.body).trigger("flash-toolkit-init-accordion-title"))}),a(document.body).on("click",".so-close",function(){a(document.body).trigger("flash-toolkit-init-accordion-title")}),a(document.body).on("click","div.widget[id*=themegrill_flash] .widget-title, div.widget[id*=themegrill_flash] .widget-title-action",function(){a(this).parents("#available-widgets").length||(b(a(this).parents(".widget[id*=themegrill_flash]")),c(a(this).parents(".widget[id*=themegrill_flash]")))}),a(document).on("widget-added widget-updated",function(d,e){e.is("[id*=themegrill_flash]")&&(d.preventDefault(),b(e),c(e),a(document.body).trigger("flash-enhanced-select-init"),a(document.body).trigger("flash-toolkit-init-availability"),a(document.body).trigger("flash-toolkit-init-media-preview"),a(document.body).trigger("flash-toolkit-init-accordion-title"))})});
|
assets/js/jquery-tiptip/jquery.tipTip.js
ADDED
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* TipTip
|
3 |
+
* Copyright 2010 Drew Wilson
|
4 |
+
* www.drewwilson.com
|
5 |
+
* code.drewwilson.com/entry/tiptip-jquery-plugin
|
6 |
+
*
|
7 |
+
* Version 1.3 - Updated: Mar. 23, 2010
|
8 |
+
*
|
9 |
+
* This Plug-In will create a custom tooltip to replace the default
|
10 |
+
* browser tooltip. It is extremely lightweight and very smart in
|
11 |
+
* that it detects the edges of the browser window and will make sure
|
12 |
+
* the tooltip stays within the current window size. As a result the
|
13 |
+
* tooltip will adjust itself to be displayed above, below, to the left
|
14 |
+
* or to the right depending on what is necessary to stay within the
|
15 |
+
* browser window. It is completely customizable as well via CSS.
|
16 |
+
*
|
17 |
+
* This TipTip jQuery plug-in is dual licensed under the MIT and GPL licenses:
|
18 |
+
* http://www.opensource.org/licenses/mit-license.php
|
19 |
+
* http://www.gnu.org/licenses/gpl.html
|
20 |
+
*/
|
21 |
+
|
22 |
+
(function($){
|
23 |
+
$.fn.tipTip = function(options) {
|
24 |
+
var defaults = {
|
25 |
+
activation: "hover",
|
26 |
+
keepAlive: false,
|
27 |
+
maxWidth: "200px",
|
28 |
+
edgeOffset: 3,
|
29 |
+
defaultPosition: "bottom",
|
30 |
+
delay: 400,
|
31 |
+
fadeIn: 200,
|
32 |
+
fadeOut: 200,
|
33 |
+
attribute: "title",
|
34 |
+
content: false, // HTML or String to fill TipTIp with
|
35 |
+
enter: function(){},
|
36 |
+
exit: function(){}
|
37 |
+
};
|
38 |
+
var opts = $.extend(defaults, options);
|
39 |
+
|
40 |
+
// Setup tip tip elements and render them to the DOM
|
41 |
+
if($("#tiptip_holder").length <= 0){
|
42 |
+
var tiptip_holder = $('<div id="tiptip_holder" style="max-width:'+ opts.maxWidth +';"></div>');
|
43 |
+
var tiptip_content = $('<div id="tiptip_content"></div>');
|
44 |
+
var tiptip_arrow = $('<div id="tiptip_arrow"></div>');
|
45 |
+
$("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>')));
|
46 |
+
} else {
|
47 |
+
var tiptip_holder = $("#tiptip_holder");
|
48 |
+
var tiptip_content = $("#tiptip_content");
|
49 |
+
var tiptip_arrow = $("#tiptip_arrow");
|
50 |
+
}
|
51 |
+
|
52 |
+
return this.each(function(){
|
53 |
+
var org_elem = $(this);
|
54 |
+
if(opts.content){
|
55 |
+
var org_title = opts.content;
|
56 |
+
} else {
|
57 |
+
var org_title = org_elem.attr(opts.attribute);
|
58 |
+
}
|
59 |
+
if(org_title != ""){
|
60 |
+
if(!opts.content){
|
61 |
+
org_elem.removeAttr(opts.attribute); //remove original Attribute
|
62 |
+
}
|
63 |
+
var timeout = false;
|
64 |
+
|
65 |
+
if(opts.activation == "hover"){
|
66 |
+
org_elem.hover(function(){
|
67 |
+
active_tiptip();
|
68 |
+
}, function(){
|
69 |
+
if(!opts.keepAlive){
|
70 |
+
deactive_tiptip();
|
71 |
+
}
|
72 |
+
});
|
73 |
+
if(opts.keepAlive){
|
74 |
+
tiptip_holder.hover(function(){}, function(){
|
75 |
+
deactive_tiptip();
|
76 |
+
});
|
77 |
+
}
|
78 |
+
} else if(opts.activation == "focus"){
|
79 |
+
org_elem.focus(function(){
|
80 |
+
active_tiptip();
|
81 |
+
}).blur(function(){
|
82 |
+
deactive_tiptip();
|
83 |
+
});
|
84 |
+
} else if(opts.activation == "click"){
|
85 |
+
org_elem.click(function(){
|
86 |
+
active_tiptip();
|
87 |
+
return false;
|
88 |
+
}).hover(function(){},function(){
|
89 |
+
if(!opts.keepAlive){
|
90 |
+
deactive_tiptip();
|
91 |
+
}
|
92 |
+
});
|
93 |
+
if(opts.keepAlive){
|
94 |
+
tiptip_holder.hover(function(){}, function(){
|
95 |
+
deactive_tiptip();
|
96 |
+
});
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
function active_tiptip(){
|
101 |
+
opts.enter.call(this);
|
102 |
+
tiptip_content.html(org_title);
|
103 |
+
tiptip_holder.hide().removeAttr("class").css("margin","0");
|
104 |
+
tiptip_arrow.removeAttr("style");
|
105 |
+
|
106 |
+
var top = parseInt(org_elem.offset()['top']);
|
107 |
+
var left = parseInt(org_elem.offset()['left']);
|
108 |
+
var org_width = parseInt(org_elem.outerWidth());
|
109 |
+
var org_height = parseInt(org_elem.outerHeight());
|
110 |
+
var tip_w = tiptip_holder.outerWidth();
|
111 |
+
var tip_h = tiptip_holder.outerHeight();
|
112 |
+
var w_compare = Math.round((org_width - tip_w) / 2);
|
113 |
+
var h_compare = Math.round((org_height - tip_h) / 2);
|
114 |
+
var marg_left = Math.round(left + w_compare);
|
115 |
+
var marg_top = Math.round(top + org_height + opts.edgeOffset);
|
116 |
+
var t_class = "";
|
117 |
+
var arrow_top = "";
|
118 |
+
var arrow_left = Math.round(tip_w - 12) / 2;
|
119 |
+
|
120 |
+
if(opts.defaultPosition == "bottom"){
|
121 |
+
t_class = "_bottom";
|
122 |
+
} else if(opts.defaultPosition == "top"){
|
123 |
+
t_class = "_top";
|
124 |
+
} else if(opts.defaultPosition == "left"){
|
125 |
+
t_class = "_left";
|
126 |
+
} else if(opts.defaultPosition == "right"){
|
127 |
+
t_class = "_right";
|
128 |
+
}
|
129 |
+
|
130 |
+
var right_compare = (w_compare + left) < parseInt($(window).scrollLeft());
|
131 |
+
var left_compare = (tip_w + left) > parseInt($(window).width());
|
132 |
+
|
133 |
+
if((right_compare && w_compare < 0) || (t_class == "_right" && !left_compare) || (t_class == "_left" && left < (tip_w + opts.edgeOffset + 5))){
|
134 |
+
t_class = "_right";
|
135 |
+
arrow_top = Math.round(tip_h - 13) / 2;
|
136 |
+
arrow_left = -12;
|
137 |
+
marg_left = Math.round(left + org_width + opts.edgeOffset);
|
138 |
+
marg_top = Math.round(top + h_compare);
|
139 |
+
} else if((left_compare && w_compare < 0) || (t_class == "_left" && !right_compare)){
|
140 |
+
t_class = "_left";
|
141 |
+
arrow_top = Math.round(tip_h - 13) / 2;
|
142 |
+
arrow_left = Math.round(tip_w);
|
143 |
+
marg_left = Math.round(left - (tip_w + opts.edgeOffset + 5));
|
144 |
+
marg_top = Math.round(top + h_compare);
|
145 |
+
}
|
146 |
+
|
147 |
+
var top_compare = (top + org_height + opts.edgeOffset + tip_h + 8) > parseInt($(window).height() + $(window).scrollTop());
|
148 |
+
var bottom_compare = ((top + org_height) - (opts.edgeOffset + tip_h + 8)) < 0;
|
149 |
+
|
150 |
+
if(top_compare || (t_class == "_bottom" && top_compare) || (t_class == "_top" && !bottom_compare)){
|
151 |
+
if(t_class == "_top" || t_class == "_bottom"){
|
152 |
+
t_class = "_top";
|
153 |
+
} else {
|
154 |
+
t_class = t_class+"_top";
|
155 |
+
}
|
156 |
+
arrow_top = tip_h;
|
157 |
+
marg_top = Math.round(top - (tip_h + 5 + opts.edgeOffset));
|
158 |
+
} else if(bottom_compare | (t_class == "_top" && bottom_compare) || (t_class == "_bottom" && !top_compare)){
|
159 |
+
if(t_class == "_top" || t_class == "_bottom"){
|
160 |
+
t_class = "_bottom";
|
161 |
+
} else {
|
162 |
+
t_class = t_class+"_bottom";
|
163 |
+
}
|
164 |
+
arrow_top = -12;
|
165 |
+
marg_top = Math.round(top + org_height + opts.edgeOffset);
|
166 |
+
}
|
167 |
+
|
168 |
+
if(t_class == "_right_top" || t_class == "_left_top"){
|
169 |
+
marg_top = marg_top + 5;
|
170 |
+
} else if(t_class == "_right_bottom" || t_class == "_left_bottom"){
|
171 |
+
marg_top = marg_top - 5;
|
172 |
+
}
|
173 |
+
if(t_class == "_left_top" || t_class == "_left_bottom"){
|
174 |
+
marg_left = marg_left + 5;
|
175 |
+
}
|
176 |
+
tiptip_arrow.css({"margin-left": arrow_left+"px", "margin-top": arrow_top+"px"});
|
177 |
+
tiptip_holder.css({"margin-left": marg_left+"px", "margin-top": marg_top+"px"}).attr("class","tip"+t_class);
|
178 |
+
|
179 |
+
if (timeout){ clearTimeout(timeout); }
|
180 |
+
timeout = setTimeout(function(){ tiptip_holder.stop(true,true).fadeIn(opts.fadeIn); }, opts.delay);
|
181 |
+
}
|
182 |
+
|
183 |
+
function deactive_tiptip(){
|
184 |
+
opts.exit.call(this);
|
185 |
+
if (timeout){ clearTimeout(timeout); }
|
186 |
+
tiptip_holder.fadeOut(opts.fadeOut);
|
187 |
+
}
|
188 |
+
}
|
189 |
+
});
|
190 |
+
}
|
191 |
+
})(jQuery);
|
assets/js/jquery-tiptip/jquery.tipTip.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(a){a.fn.tipTip=function(b){var c={activation:"hover",keepAlive:!1,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:!1,enter:function(){},exit:function(){}},d=a.extend(c,b);if(a("#tiptip_holder").length<=0){var e=a('<div id="tiptip_holder" style="max-width:'+d.maxWidth+';"></div>'),f=a('<div id="tiptip_content"></div>'),g=a('<div id="tiptip_arrow"></div>');a("body").append(e.html(f).prepend(g.html('<div id="tiptip_arrow_inner"></div>')))}else var e=a("#tiptip_holder"),f=a("#tiptip_content"),g=a("#tiptip_arrow");return this.each(function(){function b(){d.enter.call(this),f.html(i),e.hide().removeAttr("class").css("margin","0"),g.removeAttr("style");var b=parseInt(h.offset().top),c=parseInt(h.offset().left),k=parseInt(h.outerWidth()),l=parseInt(h.outerHeight()),m=e.outerWidth(),n=e.outerHeight(),o=Math.round((k-m)/2),p=Math.round((l-n)/2),q=Math.round(c+o),r=Math.round(b+l+d.edgeOffset),s="",t="",u=Math.round(m-12)/2;"bottom"==d.defaultPosition?s="_bottom":"top"==d.defaultPosition?s="_top":"left"==d.defaultPosition?s="_left":"right"==d.defaultPosition&&(s="_right");var v=o+c<parseInt(a(window).scrollLeft()),w=m+c>parseInt(a(window).width());v&&o<0||"_right"==s&&!w||"_left"==s&&c<m+d.edgeOffset+5?(s="_right",t=Math.round(n-13)/2,u=-12,q=Math.round(c+k+d.edgeOffset),r=Math.round(b+p)):(w&&o<0||"_left"==s&&!v)&&(s="_left",t=Math.round(n-13)/2,u=Math.round(m),q=Math.round(c-(m+d.edgeOffset+5)),r=Math.round(b+p));var x=b+l+d.edgeOffset+n+8>parseInt(a(window).height()+a(window).scrollTop()),y=b+l-(d.edgeOffset+n+8)<0;x||"_bottom"==s&&x||"_top"==s&&!y?("_top"==s||"_bottom"==s?s="_top":s+="_top",t=n,r=Math.round(b-(n+5+d.edgeOffset))):(y|("_top"==s&&y)||"_bottom"==s&&!x)&&("_top"==s||"_bottom"==s?s="_bottom":s+="_bottom",t=-12,r=Math.round(b+l+d.edgeOffset)),"_right_top"==s||"_left_top"==s?r+=5:"_right_bottom"!=s&&"_left_bottom"!=s||(r-=5),"_left_top"!=s&&"_left_bottom"!=s||(q+=5),g.css({"margin-left":u+"px","margin-top":t+"px"}),e.css({"margin-left":q+"px","margin-top":r+"px"}).attr("class","tip"+s),j&&clearTimeout(j),j=setTimeout(function(){e.stop(!0,!0).fadeIn(d.fadeIn)},d.delay)}function c(){d.exit.call(this),j&&clearTimeout(j),e.fadeOut(d.fadeOut)}var h=a(this);if(d.content)var i=d.content;else var i=h.attr(d.attribute);if(""!=i){d.content||h.removeAttr(d.attribute);var j=!1;"hover"==d.activation?(h.hover(function(){b()},function(){d.keepAlive||c()}),d.keepAlive&&e.hover(function(){},function(){c()})):"focus"==d.activation?h.focus(function(){b()}).blur(function(){c()}):"click"==d.activation&&(h.click(function(){return b(),!1}).hover(function(){},function(){d.keepAlive||c()}),d.keepAlive&&e.hover(function(){},function(){c()}))}})}}(jQuery);
|
composer.lock
ADDED
@@ -0,0 +1,295 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_readme": [
|
3 |
+
"This file locks the dependencies of your project to a known state",
|
4 |
+
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
5 |
+
"This file is @generated automatically"
|
6 |
+
],
|
7 |
+
"hash": "a036dcf98866c4e6f927fb4b751f95bc",
|
8 |
+
"content-hash": "4b3caead5fc9eb100d3eb6d2e3ac86d3",
|
9 |
+
"packages": [
|
10 |
+
{
|
11 |
+
"name": "composer/installers",
|
12 |
+
"version": "v1.2.0",
|
13 |
+
"source": {
|
14 |
+
"type": "git",
|
15 |
+
"url": "https://github.com/composer/installers.git",
|
16 |
+
"reference": "d78064c68299743e0161004f2de3a0204e33b804"
|
17 |
+
},
|
18 |
+
"dist": {
|
19 |
+
"type": "zip",
|
20 |
+
"url": "https://api.github.com/repos/composer/installers/zipball/d78064c68299743e0161004f2de3a0204e33b804",
|
21 |
+
"reference": "d78064c68299743e0161004f2de3a0204e33b804",
|
22 |
+
"shasum": ""
|
23 |
+
},
|
24 |
+
"require": {
|
25 |
+
"composer-plugin-api": "^1.0"
|
26 |
+
},
|
27 |
+
"replace": {
|
28 |
+
"roundcube/plugin-installer": "*",
|
29 |
+
"shama/baton": "*"
|
30 |
+
},
|
31 |
+
"require-dev": {
|
32 |
+
"composer/composer": "1.0.*@dev",
|
33 |
+
"phpunit/phpunit": "4.1.*"
|
34 |
+
},
|
35 |
+
"type": "composer-plugin",
|
36 |
+
"extra": {
|
37 |
+
"class": "Composer\\Installers\\Plugin",
|
38 |
+
"branch-alias": {
|
39 |
+
"dev-master": "1.0-dev"
|
40 |
+
}
|
41 |
+
},
|
42 |
+
"autoload": {
|
43 |
+
"psr-4": {
|
44 |
+
"Composer\\Installers\\": "src/Composer/Installers"
|
45 |
+
}
|
46 |
+
},
|
47 |
+
"notification-url": "https://packagist.org/downloads/",
|
48 |
+
"license": [
|
49 |
+
"MIT"
|
50 |
+
],
|
51 |
+
"authors": [
|
52 |
+
{
|
53 |
+
"name": "Kyle Robinson Young",
|
54 |
+
"email": "kyle@dontkry.com",
|
55 |
+
"homepage": "https://github.com/shama"
|
56 |
+
}
|
57 |
+
],
|
58 |
+
"description": "A multi-framework Composer library installer",
|
59 |
+
"homepage": "https://composer.github.io/installers/",
|
60 |
+
"keywords": [
|
61 |
+
"Craft",
|
62 |
+
"Dolibarr",
|
63 |
+
"Hurad",
|
64 |
+
"ImageCMS",
|
65 |
+
"MODX Evo",
|
66 |
+
"Mautic",
|
67 |
+
"OXID",
|
68 |
+
"Plentymarkets",
|
69 |
+
"RadPHP",
|
70 |
+
"SMF",
|
71 |
+
"Thelia",
|
72 |
+
"WolfCMS",
|
73 |
+
"agl",
|
74 |
+
"aimeos",
|
75 |
+
"annotatecms",
|
76 |
+
"attogram",
|
77 |
+
"bitrix",
|
78 |
+
"cakephp",
|
79 |
+
"chef",
|
80 |
+
"cockpit",
|
81 |
+
"codeigniter",
|
82 |
+
"concrete5",
|
83 |
+
"croogo",
|
84 |
+
"dokuwiki",
|
85 |
+
"drupal",
|
86 |
+
"elgg",
|
87 |
+
"expressionengine",
|
88 |
+
"fuelphp",
|
89 |
+
"grav",
|
90 |
+
"installer",
|
91 |
+
"joomla",
|
92 |
+
"kohana",
|
93 |
+
"laravel",
|
94 |
+
"lithium",
|
95 |
+
"magento",
|
96 |
+
"mako",
|
97 |
+
"mediawiki",
|
98 |
+
"modulework",
|
99 |
+
"moodle",
|
100 |
+
"phpbb",
|
101 |
+
"piwik",
|
102 |
+
"ppi",
|
103 |
+
"puppet",
|
104 |
+
"reindex",
|
105 |
+
"roundcube",
|
106 |
+
"shopware",
|
107 |
+
"silverstripe",
|
108 |
+
"symfony",
|
109 |
+
"typo3",
|
110 |
+
"wordpress",
|
111 |
+
"yawik",
|
112 |
+
"zend",
|
113 |
+
"zikula"
|
114 |
+
],
|
115 |
+
"time": "2016-08-13 20:53:52"
|
116 |
+
}
|
117 |
+
],
|
118 |
+
"packages-dev": [
|
119 |
+
{
|
120 |
+
"name": "simplyadmire/composer-plugins",
|
121 |
+
"version": "2.1.0",
|
122 |
+
"source": {
|
123 |
+
"type": "git",
|
124 |
+
"url": "https://github.com/SimplyAdmire/ComposerPlugins.git",
|
125 |
+
"reference": "d8380f670694c1c2330b22591ca74adc82cffe19"
|
126 |
+
},
|
127 |
+
"dist": {
|
128 |
+
"type": "zip",
|
129 |
+
"url": "https://api.github.com/repos/SimplyAdmire/ComposerPlugins/zipball/d8380f670694c1c2330b22591ca74adc82cffe19",
|
130 |
+
"reference": "d8380f670694c1c2330b22591ca74adc82cffe19",
|
131 |
+
"shasum": ""
|
132 |
+
},
|
133 |
+
"require": {
|
134 |
+
"composer-plugin-api": "^1.0",
|
135 |
+
"squizlabs/php_codesniffer": "*"
|
136 |
+
},
|
137 |
+
"type": "composer-plugin",
|
138 |
+
"extra": {
|
139 |
+
"class": [
|
140 |
+
"SimplyAdmire\\ComposerPlugins\\PhpCodesnifferStandardInstallerPlugin"
|
141 |
+
]
|
142 |
+
},
|
143 |
+
"autoload": {
|
144 |
+
"psr-0": {
|
145 |
+
"SimplyAdmire\\ComposerPlugins": ""
|
146 |
+
}
|
147 |
+
},
|
148 |
+
"notification-url": "https://packagist.org/downloads/",
|
149 |
+
"license": [
|
150 |
+
"LGPL-3.0+"
|
151 |
+
],
|
152 |
+
"authors": [
|
153 |
+
{
|
154 |
+
"name": "Rens Admiraal",
|
155 |
+
"email": "rens@simplyadmire.com",
|
156 |
+
"role": "lead"
|
157 |
+
}
|
158 |
+
],
|
159 |
+
"description": "Composer plugin for installing PHP_CodeSniffer standards",
|
160 |
+
"keywords": [
|
161 |
+
"PHP_CodeSniffer",
|
162 |
+
"TYPO3 CMS",
|
163 |
+
"TYPO3 Flow",
|
164 |
+
"TYPO3 Neos",
|
165 |
+
"phpcs",
|
166 |
+
"standards",
|
167 |
+
"typo3"
|
168 |
+
],
|
169 |
+
"time": "2016-05-12 11:58:38"
|
170 |
+
},
|
171 |
+
{
|
172 |
+
"name": "squizlabs/php_codesniffer",
|
173 |
+
"version": "2.7.0",
|
174 |
+
"source": {
|
175 |
+
"type": "git",
|
176 |
+
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
177 |
+
"reference": "571e27b6348e5b3a637b2abc82ac0d01e6d7bbed"
|
178 |
+
},
|
179 |
+
"dist": {
|
180 |
+
"type": "zip",
|
181 |
+
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/571e27b6348e5b3a637b2abc82ac0d01e6d7bbed",
|
182 |
+
"reference": "571e27b6348e5b3a637b2abc82ac0d01e6d7bbed",
|
183 |
+
"shasum": ""
|
184 |
+
},
|
185 |
+
"require": {
|
186 |
+
"ext-simplexml": "*",
|
187 |
+
"ext-tokenizer": "*",
|
188 |
+
"ext-xmlwriter": "*",
|
189 |
+
"php": ">=5.1.2"
|
190 |
+
},
|
191 |
+
"require-dev": {
|
192 |
+
"phpunit/phpunit": "~4.0"
|
193 |
+
},
|
194 |
+
"bin": [
|
195 |
+
"scripts/phpcs",
|
196 |
+
"scripts/phpcbf"
|
197 |
+
],
|
198 |
+
"type": "library",
|
199 |
+
"extra": {
|
200 |
+
"branch-alias": {
|
201 |
+
"dev-master": "2.x-dev"
|
202 |
+
}
|
203 |
+
},
|
204 |
+
"autoload": {
|
205 |
+
"classmap": [
|
206 |
+
"CodeSniffer.php",
|
207 |
+
"CodeSniffer/CLI.php",
|
208 |
+
"CodeSniffer/Exception.php",
|
209 |
+
"CodeSniffer/File.php",
|
210 |
+
"CodeSniffer/Fixer.php",
|
211 |
+
"CodeSniffer/Report.php",
|
212 |
+
"CodeSniffer/Reporting.php",
|
213 |
+
"CodeSniffer/Sniff.php",
|
214 |
+
"CodeSniffer/Tokens.php",
|
215 |
+
"CodeSniffer/Reports/",
|
216 |
+
"CodeSniffer/Tokenizers/",
|
217 |
+
"CodeSniffer/DocGenerators/",
|
218 |
+
"CodeSniffer/Standards/AbstractPatternSniff.php",
|
219 |
+
"CodeSniffer/Standards/AbstractScopeSniff.php",
|
220 |
+
"CodeSniffer/Standards/AbstractVariableSniff.php",
|
221 |
+
"CodeSniffer/Standards/IncorrectPatternException.php",
|
222 |
+
"CodeSniffer/Standards/Generic/Sniffs/",
|
223 |
+
"CodeSniffer/Standards/MySource/Sniffs/",
|
224 |
+
"CodeSniffer/Standards/PEAR/Sniffs/",
|
225 |
+
"CodeSniffer/Standards/PSR1/Sniffs/",
|
226 |
+
"CodeSniffer/Standards/PSR2/Sniffs/",
|
227 |
+
"CodeSniffer/Standards/Squiz/Sniffs/",
|
228 |
+
"CodeSniffer/Standards/Zend/Sniffs/"
|
229 |
+
]
|
230 |
+
},
|
231 |
+
"notification-url": "https://packagist.org/downloads/",
|
232 |
+
"license": [
|
233 |
+
"BSD-3-Clause"
|
234 |
+
],
|
235 |
+
"authors": [
|
236 |
+
{
|
237 |
+
"name": "Greg Sherwood",
|
238 |
+
"role": "lead"
|
239 |
+
}
|
240 |
+
],
|
241 |
+
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
|
242 |
+
"homepage": "http://www.squizlabs.com/php-codesniffer",
|
243 |
+
"keywords": [
|
244 |
+
"phpcs",
|
245 |
+
"standards"
|
246 |
+
],
|
247 |
+
"time": "2016-09-01 23:53:02"
|
248 |
+
},
|
249 |
+
{
|
250 |
+
"name": "wp-coding-standards/wpcs",
|
251 |
+
"version": "0.10.0",
|
252 |
+
"source": {
|
253 |
+
"type": "git",
|
254 |
+
"url": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git",
|
255 |
+
"reference": "b39490465f6fd7375743a395019cd597e12119c9"
|
256 |
+
},
|
257 |
+
"dist": {
|
258 |
+
"type": "zip",
|
259 |
+
"url": "https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/zipball/b39490465f6fd7375743a395019cd597e12119c9",
|
260 |
+
"reference": "b39490465f6fd7375743a395019cd597e12119c9",
|
261 |
+
"shasum": ""
|
262 |
+
},
|
263 |
+
"require": {
|
264 |
+
"squizlabs/php_codesniffer": "^2.6"
|
265 |
+
},
|
266 |
+
"type": "library",
|
267 |
+
"notification-url": "https://packagist.org/downloads/",
|
268 |
+
"license": [
|
269 |
+
"MIT"
|
270 |
+
],
|
271 |
+
"authors": [
|
272 |
+
{
|
273 |
+
"name": "Contributors",
|
274 |
+
"homepage": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/graphs/contributors"
|
275 |
+
}
|
276 |
+
],
|
277 |
+
"description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions",
|
278 |
+
"keywords": [
|
279 |
+
"phpcs",
|
280 |
+
"standards",
|
281 |
+
"wordpress"
|
282 |
+
],
|
283 |
+
"time": "2016-08-29 20:04:47"
|
284 |
+
}
|
285 |
+
],
|
286 |
+
"aliases": [],
|
287 |
+
"minimum-stability": "stable",
|
288 |
+
"stability-flags": {
|
289 |
+
"simplyadmire/composer-plugins": 20
|
290 |
+
},
|
291 |
+
"prefer-stable": true,
|
292 |
+
"prefer-lowest": false,
|
293 |
+
"platform": [],
|
294 |
+
"platform-dev": []
|
295 |
+
}
|
flash-toolkit.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Flash Toolkit
|
4 |
* Plugin URI: http://themegrill.com/theme/flash
|
5 |
* Description: Flash Toolkit is a companion for Flash WordPress theme by ThemeGrill
|
6 |
-
* Version: 1.
|
7 |
* Author: ThemeGrill
|
8 |
* Author URI: http://themegrill.com
|
9 |
* License: GPLv3 or later
|
@@ -29,7 +29,7 @@ final class FlashToolkit {
|
|
29 |
* Plugin version.
|
30 |
* @var string
|
31 |
*/
|
32 |
-
public $version = '1.
|
33 |
|
34 |
/**
|
35 |
* Instance of this class.
|
@@ -129,12 +129,18 @@ final class FlashToolkit {
|
|
129 |
private function includes() {
|
130 |
include_once( FT_ABSPATH . 'includes/functions-flash-core.php' );
|
131 |
include_once( FT_ABSPATH . 'includes/functions-flash-widget.php' );
|
|
|
132 |
include_once( FT_ABSPATH . 'includes/class-flash-install.php' );
|
|
|
133 |
|
134 |
if ( $this->is_request( 'admin' ) ) {
|
135 |
include_once( FT_ABSPATH . 'includes/admin/class-flash-admin.php' );
|
136 |
}
|
137 |
|
|
|
|
|
|
|
|
|
138 |
include_once( FT_ABSPATH . 'includes/class-flash-post-types.php' ); // Registers post types
|
139 |
}
|
140 |
|
3 |
* Plugin Name: Flash Toolkit
|
4 |
* Plugin URI: http://themegrill.com/theme/flash
|
5 |
* Description: Flash Toolkit is a companion for Flash WordPress theme by ThemeGrill
|
6 |
+
* Version: 1.1.0
|
7 |
* Author: ThemeGrill
|
8 |
* Author URI: http://themegrill.com
|
9 |
* License: GPLv3 or later
|
29 |
* Plugin version.
|
30 |
* @var string
|
31 |
*/
|
32 |
+
public $version = '1.1.0';
|
33 |
|
34 |
/**
|
35 |
* Instance of this class.
|
129 |
private function includes() {
|
130 |
include_once( FT_ABSPATH . 'includes/functions-flash-core.php' );
|
131 |
include_once( FT_ABSPATH . 'includes/functions-flash-widget.php' );
|
132 |
+
include_once( FT_ABSPATH . 'includes/class-flash-autoloader.php' );
|
133 |
include_once( FT_ABSPATH . 'includes/class-flash-install.php' );
|
134 |
+
include_once( FT_ABSPATH . 'includes/class-flash-ajax.php' );
|
135 |
|
136 |
if ( $this->is_request( 'admin' ) ) {
|
137 |
include_once( FT_ABSPATH . 'includes/admin/class-flash-admin.php' );
|
138 |
}
|
139 |
|
140 |
+
if ( is_flash_pro_active() ) {
|
141 |
+
include_once( FT_ABSPATH . 'includes/class-flash-sidebars.php' );
|
142 |
+
}
|
143 |
+
|
144 |
include_once( FT_ABSPATH . 'includes/class-flash-post-types.php' ); // Registers post types
|
145 |
}
|
146 |
|
includes/abstracts/abstract-flash-widget.php
CHANGED
@@ -173,7 +173,11 @@ abstract class FT_Widget extends WP_Widget {
|
|
173 |
}
|
174 |
break;
|
175 |
case 'textarea' :
|
176 |
-
|
|
|
|
|
|
|
|
|
177 |
break;
|
178 |
case 'checkbox' :
|
179 |
$instance[ $key ] = empty( $new_instance[ $key ] ) ? 0 : 1;
|
173 |
}
|
174 |
break;
|
175 |
case 'textarea' :
|
176 |
+
if ( current_user_can( 'unfiltered_html' ) ) {
|
177 |
+
$instance[ $key ] = $new_instance[ $key ];
|
178 |
+
} else {
|
179 |
+
$instance[ $key ] = wp_kses( trim( wp_unslash( $new_instance[ $key ] ) ), wp_kses_allowed_html( 'post' ) );
|
180 |
+
}
|
181 |
break;
|
182 |
case 'checkbox' :
|
183 |
$instance[ $key ] = empty( $new_instance[ $key ] ) ? 0 : 1;
|
includes/abstracts/views/html-admin-tmpl-repeater.php
CHANGED
@@ -8,7 +8,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
8 |
}
|
9 |
|
10 |
$repeater_field_id = strtolower( str_replace( ' ', '-', $setting['title'] ) ) . '-{{ data.field_id }}';
|
11 |
-
$max_field_entries = count( $value )
|
12 |
|
13 |
?>
|
14 |
<div id="tg-widget-repeater-field" class="accordion-sortables">
|
8 |
}
|
9 |
|
10 |
$repeater_field_id = strtolower( str_replace( ' ', '-', $setting['title'] ) ) . '-{{ data.field_id }}';
|
11 |
+
$max_field_entries = count( $value ) >= apply_filters( 'flash_toolkit_maximum_repeater_field_entries', 5 ) ? 'disabled' : 'enabled';
|
12 |
|
13 |
?>
|
14 |
<div id="tg-widget-repeater-field" class="accordion-sortables">
|
includes/admin/class-flash-admin-assets.php
CHANGED
@@ -33,13 +33,28 @@ class FT_Admin_Assets {
|
|
33 |
* Enqueue styles.
|
34 |
*/
|
35 |
public function admin_styles() {
|
36 |
-
$
|
37 |
-
|
|
|
|
|
|
|
38 |
|
39 |
// Register admin styles.
|
40 |
wp_register_style( 'font-awesome', FT()->plugin_url() . '/assets/css/fontawesome.css', array(), '4.6.3' );
|
|
|
|
|
|
|
41 |
wp_register_style( 'flash-toolkit-admin-widgets', FT()->plugin_url() . '/assets/css/widgets.css', array( 'font-awesome' ), FT_VERSION );
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
// Widgets Specific enqueue.
|
44 |
if ( in_array( $screen_id, array( 'widgets', 'customize' ) ) ) {
|
45 |
wp_enqueue_style( 'flash-toolkit-admin-widgets' );
|
@@ -55,7 +70,11 @@ class FT_Admin_Assets {
|
|
55 |
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
56 |
|
57 |
// Register admin scripts.
|
|
|
58 |
wp_register_script( 'flash-toolkit-admin-widgets', FT()->plugin_url() . '/assets/js/admin/widgets' . $suffix . '.js', array( 'jquery', 'jquery-ui-sortable', 'wp-util', 'underscore', 'backbone', 'flash-enhanced-select' ), FT_VERSION );
|
|
|
|
|
|
|
59 |
wp_register_script( 'select2', FT()->plugin_url() . '/assets/js/select2/select2' . $suffix . '.js', array( 'jquery' ), '3.5.4' );
|
60 |
wp_register_script( 'flash-enhanced-select', FT()->plugin_url() . '/assets/js/admin/enhanced-select' . $suffix . '.js', array( 'jquery', 'select2' ), FT_VERSION );
|
61 |
wp_localize_script( 'flash-enhanced-select', 'flash_enhanced_select_params', array(
|
@@ -77,10 +96,36 @@ class FT_Admin_Assets {
|
|
77 |
'i18n_max_field_message' => esc_js( sprintf( __( 'You can add upto %s fields.', 'flash-toolkit' ), apply_filters( 'flash_toolkit_maximum_repeater_field_entries', 5 ) ) ),
|
78 |
) );
|
79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
// Widgets Specific enqueue.
|
81 |
if ( in_array( $screen_id, array( 'widgets', 'customize' ) ) ) {
|
82 |
wp_enqueue_media();
|
83 |
wp_enqueue_script( 'flash-toolkit-admin-widgets' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
}
|
85 |
}
|
86 |
|
33 |
* Enqueue styles.
|
34 |
*/
|
35 |
public function admin_styles() {
|
36 |
+
global $wp_scripts;
|
37 |
+
|
38 |
+
$screen = get_current_screen();
|
39 |
+
$screen_id = $screen ? $screen->id : '';
|
40 |
+
$jquery_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.9.2';
|
41 |
|
42 |
// Register admin styles.
|
43 |
wp_register_style( 'font-awesome', FT()->plugin_url() . '/assets/css/fontawesome.css', array(), '4.6.3' );
|
44 |
+
wp_register_style( 'jquery-ui-style', '//code.jquery.com/ui/' . $jquery_version . '/themes/smoothness/jquery-ui.css', array(), $jquery_version );
|
45 |
+
wp_register_style( 'flash-toolkit-menu', FT()->plugin_url() . '/assets/css/menu.css', array(), FT_VERSION );
|
46 |
+
wp_register_style( 'flash-toolkit-admin', FT()->plugin_url() . '/assets/css/admin.css', array(), FT_VERSION );
|
47 |
wp_register_style( 'flash-toolkit-admin-widgets', FT()->plugin_url() . '/assets/css/widgets.css', array( 'font-awesome' ), FT_VERSION );
|
48 |
|
49 |
+
// Sitewide menu CSS
|
50 |
+
wp_enqueue_style( 'flash-toolkit-menu' );
|
51 |
+
|
52 |
+
// Admin styles for FT pages only
|
53 |
+
if ( in_array( $screen_id, array( $screen_id, flash_toolkit_get_screen_ids() ) ) ) {
|
54 |
+
wp_enqueue_style( 'flash-toolkit-admin' );
|
55 |
+
wp_enqueue_style( 'jquery-ui-style' );
|
56 |
+
}
|
57 |
+
|
58 |
// Widgets Specific enqueue.
|
59 |
if ( in_array( $screen_id, array( 'widgets', 'customize' ) ) ) {
|
60 |
wp_enqueue_style( 'flash-toolkit-admin-widgets' );
|
70 |
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
71 |
|
72 |
// Register admin scripts.
|
73 |
+
wp_register_script( 'flash-toolkit-admin', FT()->plugin_url() . '/assets/js/admin/admin' . $suffix . '.js', array( 'jquery', 'jquery-ui-sortable', 'jquery-ui-widget', 'jquery-ui-core', 'jquery-tiptip' ), FT_VERSION );
|
74 |
wp_register_script( 'flash-toolkit-admin-widgets', FT()->plugin_url() . '/assets/js/admin/widgets' . $suffix . '.js', array( 'jquery', 'jquery-ui-sortable', 'wp-util', 'underscore', 'backbone', 'flash-enhanced-select' ), FT_VERSION );
|
75 |
+
wp_register_script( 'flash-toolkit-admin-sidebars', FT()->plugin_url() . '/assets/js/admin/sidebars' . $suffix . '.js', array( 'jquery' ), FT_VERSION );
|
76 |
+
wp_register_script( 'flash-toolkit-admin-meta-boxes', FT()->plugin_url() . '/assets/js/admin/meta-boxes' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker', 'jquery-ui-sortable', 'jquery-tiptip', 'flash-enhanced-select' ), FT_VERSION );
|
77 |
+
wp_register_script( 'jquery-tiptip', FT()->plugin_url() . '/assets/js/jquery-tiptip/jquery.tipTip' . $suffix . '.js', array( 'jquery' ), FT_VERSION, true );
|
78 |
wp_register_script( 'select2', FT()->plugin_url() . '/assets/js/select2/select2' . $suffix . '.js', array( 'jquery' ), '3.5.4' );
|
79 |
wp_register_script( 'flash-enhanced-select', FT()->plugin_url() . '/assets/js/admin/enhanced-select' . $suffix . '.js', array( 'jquery', 'select2' ), FT_VERSION );
|
80 |
wp_localize_script( 'flash-enhanced-select', 'flash_enhanced_select_params', array(
|
96 |
'i18n_max_field_message' => esc_js( sprintf( __( 'You can add upto %s fields.', 'flash-toolkit' ), apply_filters( 'flash_toolkit_maximum_repeater_field_entries', 5 ) ) ),
|
97 |
) );
|
98 |
|
99 |
+
// FlashToolkit admin pages.
|
100 |
+
if ( in_array( $screen_id, flash_toolkit_get_screen_ids() ) ) {
|
101 |
+
wp_enqueue_script( 'flash-toolkit-admin' );
|
102 |
+
wp_enqueue_script( 'jquery-ui-sortable' );
|
103 |
+
wp_enqueue_script( 'jquery-ui-autocomplete' );
|
104 |
+
}
|
105 |
+
|
106 |
+
// Meta boxes
|
107 |
+
if ( in_array( $screen_id, array( 'portfolio', 'edit-portfolio' ) ) ) {
|
108 |
+
wp_enqueue_script( 'flash-toolkit-admin-meta-boxes' );
|
109 |
+
}
|
110 |
+
|
111 |
+
if ( in_array( $screen_id, flash_toolkit_get_layout_supported_screens() ) ) {
|
112 |
+
wp_register_script( 'flash-toolkit-admin-layout-meta-boxes', FT()->plugin_url() . '/assets/js/admin/meta-boxes-layout' . $suffix . '.js', array( 'flash-toolkit-admin-meta-boxes' ), FT_VERSION );
|
113 |
+
wp_enqueue_script( 'flash-toolkit-admin-layout-meta-boxes' );
|
114 |
+
}
|
115 |
+
|
116 |
// Widgets Specific enqueue.
|
117 |
if ( in_array( $screen_id, array( 'widgets', 'customize' ) ) ) {
|
118 |
wp_enqueue_media();
|
119 |
wp_enqueue_script( 'flash-toolkit-admin-widgets' );
|
120 |
+
|
121 |
+
if ( 'widgets' === $screen_id && is_flash_pro_active() ) {
|
122 |
+
wp_enqueue_script( 'flash-toolkit-admin-sidebars' );
|
123 |
+
wp_localize_script( 'flash-toolkit-admin-sidebars', 'flash_toolkit_admin_sidebars', array(
|
124 |
+
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
125 |
+
'delete_custom_sidebar_nonce' => wp_create_nonce( 'delete-custom-sidebar' ),
|
126 |
+
'i18n_confirm_delete_custom_sidebar' => __( 'Delete this Sidebar Permanently and store all widgets in Inactive Sidebar. Are you positive you want to delete this Sidebar?', 'flash-toolkit' ),
|
127 |
+
) );
|
128 |
+
}
|
129 |
}
|
130 |
}
|
131 |
|
includes/admin/class-flash-admin-meta-boxes.php
ADDED
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* FlashToolkit Meta Boxes
|
4 |
+
*
|
5 |
+
* Sets up the write panels used by custom post types.
|
6 |
+
*
|
7 |
+
* @class FT_Admin_Meta_Boxes
|
8 |
+
* @version 1.1.0
|
9 |
+
* @package FlashToolkit/Admin/Meta Boxes
|
10 |
+
* @category Admin
|
11 |
+
* @author ThemeGrill
|
12 |
+
*/
|
13 |
+
|
14 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
15 |
+
exit;
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* FT_Admin_Meta_Boxes Class
|
20 |
+
*/
|
21 |
+
class FT_Admin_Meta_Boxes {
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Is meta boxes saved once?
|
25 |
+
*
|
26 |
+
* @var boolean
|
27 |
+
*/
|
28 |
+
private static $saved_meta_boxes = false;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Meta box error messages.
|
32 |
+
*
|
33 |
+
* @var array
|
34 |
+
*/
|
35 |
+
public static $meta_box_errors = array();
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Hook in tabs.
|
39 |
+
*/
|
40 |
+
public function __construct() {
|
41 |
+
add_action( 'add_meta_boxes', array( $this, 'remove_meta_boxes' ), 10 );
|
42 |
+
add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ), 20 );
|
43 |
+
add_action( 'save_post', array( $this, 'save_meta_boxes' ), 1, 2 );
|
44 |
+
|
45 |
+
// Save Portfolio Meta Boxes
|
46 |
+
add_action( 'flash_toolkit_process_portfolio_meta', 'FT_Meta_Box_Portfolio_Data::save', 10, 2 );
|
47 |
+
|
48 |
+
// Save Layout Meta Boxes
|
49 |
+
add_action( 'flash_toolkit_process_layout_meta', 'FT_Meta_Box_Layout_Data::save', 10, 2 );
|
50 |
+
|
51 |
+
// Error handling (for showing errors from meta boxes on next page load)
|
52 |
+
add_action( 'admin_notices', array( $this, 'output_errors' ) );
|
53 |
+
add_action( 'shutdown', array( $this, 'save_errors' ) );
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Add an error message.
|
58 |
+
* @param string $text
|
59 |
+
*/
|
60 |
+
public static function add_error( $text ) {
|
61 |
+
self::$meta_box_errors[] = $text;
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Save errors to an option.
|
66 |
+
*/
|
67 |
+
public function save_errors() {
|
68 |
+
update_option( 'flash_toolkit_meta_box_errors', self::$meta_box_errors );
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Show any stored error messages.
|
73 |
+
*/
|
74 |
+
public function output_errors() {
|
75 |
+
$errors = maybe_unserialize( get_option( 'flash_toolkit_meta_box_errors' ) );
|
76 |
+
|
77 |
+
if ( ! empty( $errors ) ) {
|
78 |
+
|
79 |
+
echo '<div id="flash-toolkit_errors" class="error notice is-dismissible">';
|
80 |
+
|
81 |
+
foreach ( $errors as $error ) {
|
82 |
+
echo '<p>' . wp_kses_post( $error ) . '</p>';
|
83 |
+
}
|
84 |
+
|
85 |
+
echo '</div>';
|
86 |
+
|
87 |
+
// Clear
|
88 |
+
delete_option( 'flash_toolkit_meta_box_errors' );
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Add SI Meta boxes.
|
94 |
+
*/
|
95 |
+
public function add_meta_boxes() {
|
96 |
+
// Portfolio
|
97 |
+
add_meta_box( 'flash-toolkit-portfolio-data', __( 'Portfolio Data', 'flash-toolkit' ), 'FT_Meta_Box_Portfolio_Data::output', 'portfolio', 'normal', 'high' );
|
98 |
+
|
99 |
+
// Layouts
|
100 |
+
foreach ( flash_toolkit_get_layout_supported_screens() as $post_type ) {
|
101 |
+
if ( post_type_exists( $post_type ) && is_flash_pro_active() ) {
|
102 |
+
$post_type_object = get_post_type_object( $post_type );
|
103 |
+
add_meta_box( 'flash-toolkit-layout-data', sprintf( __( '%s Layout', 'flash-toolkit' ), $post_type_object->labels->singular_name ), 'FT_Meta_Box_Layout_Data::output', $post_type, 'side', 'default' );
|
104 |
+
}
|
105 |
+
}
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Remove bloat.
|
110 |
+
*/
|
111 |
+
public function remove_meta_boxes() {
|
112 |
+
global $post;
|
113 |
+
|
114 |
+
if ( is_flash_pro_active() ) {
|
115 |
+
remove_meta_box( 'page-layout', 'post', 'side' );
|
116 |
+
remove_meta_box( 'page-layout', 'page', 'side' );
|
117 |
+
remove_meta_box( 'header-transparency', 'page', 'side' );
|
118 |
+
}
|
119 |
+
|
120 |
+
if ( 'portfolio' === $post->post_type && 0 === count( get_page_templates( $post ) ) ) {
|
121 |
+
remove_meta_box( 'pageparentdiv', 'portfolio', 'side' );
|
122 |
+
}
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Check if we're saving, the trigger an action based on the post type.
|
127 |
+
* @param int $post_id
|
128 |
+
* @param object $post
|
129 |
+
*/
|
130 |
+
public function save_meta_boxes( $post_id, $post ) {
|
131 |
+
// $post_id and $post are required
|
132 |
+
if ( empty( $post_id ) || empty( $post ) || self::$saved_meta_boxes ) {
|
133 |
+
return;
|
134 |
+
}
|
135 |
+
|
136 |
+
// Don't save meta boxes for revisions or autosaves
|
137 |
+
if ( defined( 'DOING_AUTOSAVE' ) || is_int( wp_is_post_revision( $post ) ) || is_int( wp_is_post_autosave( $post ) ) ) {
|
138 |
+
return;
|
139 |
+
}
|
140 |
+
|
141 |
+
// Check the nonce
|
142 |
+
if ( empty( $_POST['flash_toolkit_meta_nonce'] ) || ! wp_verify_nonce( $_POST['flash_toolkit_meta_nonce'], 'flash_toolkit_save_data' ) ) {
|
143 |
+
return;
|
144 |
+
}
|
145 |
+
|
146 |
+
// Check the post being saved == the $post_id to prevent triggering this call for other save_post events
|
147 |
+
if ( empty( $_POST['post_ID'] ) || $_POST['post_ID'] != $post_id ) {
|
148 |
+
return;
|
149 |
+
}
|
150 |
+
|
151 |
+
// Check user has permission to edit
|
152 |
+
if ( ! current_user_can( 'edit_post', $post_id ) ) {
|
153 |
+
return;
|
154 |
+
}
|
155 |
+
|
156 |
+
// We need this save event to run once to avoid potential endless loops. This would have been perfect:
|
157 |
+
self::$saved_meta_boxes = true;
|
158 |
+
|
159 |
+
// Check the post type
|
160 |
+
if ( in_array( $post->post_type, array( 'portfolio' ) ) ) {
|
161 |
+
do_action( 'flash_toolkit_process_' . $post->post_type . '_meta', $post_id, $post );
|
162 |
+
}
|
163 |
+
|
164 |
+
// Trigger action
|
165 |
+
$process_actions = array( 'layout' );
|
166 |
+
foreach ( $process_actions as $process_action ) {
|
167 |
+
do_action( 'flash_toolkit_process_' . $process_action . '_meta', $post_id, $post );
|
168 |
+
}
|
169 |
+
}
|
170 |
+
}
|
171 |
+
|
172 |
+
new FT_Admin_Meta_Boxes();
|
includes/admin/class-flash-admin-notices.php
CHANGED
@@ -98,8 +98,8 @@ class FT_Admin_Notices {
|
|
98 |
* Hide a notice if the GET variable is set.
|
99 |
*/
|
100 |
public static function hide_notices() {
|
101 |
-
if ( isset( $_GET['flash-hide-notice'] ) && isset( $_GET['
|
102 |
-
if ( ! wp_verify_nonce( $_GET['
|
103 |
wp_die( __( 'Action failed. Please refresh the page and retry.', 'flash-toolkit' ) );
|
104 |
}
|
105 |
|
@@ -107,7 +107,7 @@ class FT_Admin_Notices {
|
|
107 |
wp_die( __( 'Cheatin’ huh?', 'flash-toolkit' ) );
|
108 |
}
|
109 |
|
110 |
-
$hide_notice = sanitize_text_field( $_GET['flash-hide-notice'] );
|
111 |
self::remove_notice( $hide_notice );
|
112 |
do_action( 'flash_toolkit_hide_' . $hide_notice . '_notice' );
|
113 |
}
|
98 |
* Hide a notice if the GET variable is set.
|
99 |
*/
|
100 |
public static function hide_notices() {
|
101 |
+
if ( isset( $_GET['flash-toolkit-hide-notice'] ) && isset( $_GET['_flash_toolkit_notice_nonce'] ) ) {
|
102 |
+
if ( ! wp_verify_nonce( $_GET['_flash_toolkit_notice_nonce'], 'flash_toolkit_hide_notices_nonce' ) ) {
|
103 |
wp_die( __( 'Action failed. Please refresh the page and retry.', 'flash-toolkit' ) );
|
104 |
}
|
105 |
|
107 |
wp_die( __( 'Cheatin’ huh?', 'flash-toolkit' ) );
|
108 |
}
|
109 |
|
110 |
+
$hide_notice = sanitize_text_field( $_GET['flash-toolkit-hide-notice'] );
|
111 |
self::remove_notice( $hide_notice );
|
112 |
do_action( 'flash_toolkit_hide_' . $hide_notice . '_notice' );
|
113 |
}
|
includes/admin/class-flash-admin-post-types.php
ADDED
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Post Types Admin
|
4 |
+
*
|
5 |
+
* @class FT_Admin_Post_Types
|
6 |
+
* @version 1.1.0
|
7 |
+
* @package FlashToolkit/Admin
|
8 |
+
* @category Admin
|
9 |
+
* @author ThemeGrill
|
10 |
+
*/
|
11 |
+
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* FT_Admin_Post_Types Class
|
18 |
+
*
|
19 |
+
* Handles the edit posts views and some functionality on the edit post screen for FT post types.
|
20 |
+
*/
|
21 |
+
class FT_Admin_Post_Types {
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Constructor.
|
25 |
+
*/
|
26 |
+
public function __construct() {
|
27 |
+
add_filter( 'post_updated_messages', array( $this, 'post_updated_messages' ) );
|
28 |
+
add_filter( 'bulk_post_updated_messages', array( $this, 'bulk_post_updated_messages' ), 10, 2 );
|
29 |
+
|
30 |
+
// Edit post screens
|
31 |
+
add_filter( 'enter_title_here', array( $this, 'enter_title_here' ), 1, 2 );
|
32 |
+
add_filter( 'default_hidden_meta_boxes', array( $this, 'hidden_meta_boxes' ), 10, 2 );
|
33 |
+
|
34 |
+
// Meta-Box Class
|
35 |
+
include_once( dirname( __FILE__ ) . '/class-flash-admin-meta-boxes.php' );
|
36 |
+
|
37 |
+
// Disable DFW feature pointer
|
38 |
+
add_action( 'admin_footer', array( $this, 'disable_dfw_feature_pointer' ) );
|
39 |
+
|
40 |
+
// Disable post type view mode options
|
41 |
+
add_filter( 'view_mode_post_types', array( $this, 'disable_view_mode_options' ) );
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Change messages when a post type is updated.
|
46 |
+
* @param array $messages
|
47 |
+
* @return array
|
48 |
+
*/
|
49 |
+
public function post_updated_messages( $messages ) {
|
50 |
+
global $post, $post_ID;
|
51 |
+
|
52 |
+
$messages['portfolio'] = array(
|
53 |
+
0 => '', // Unused. Messages start at index 1.
|
54 |
+
1 => sprintf( __( 'Project updated. <a href="%s">View Project</a>', 'flash-toolkit' ), esc_url( get_permalink( $post_ID ) ) ),
|
55 |
+
2 => __( 'Custom field updated.', 'flash-toolkit' ),
|
56 |
+
3 => __( 'Custom field deleted.', 'flash-toolkit' ),
|
57 |
+
4 => __( 'Project updated.', 'flash-toolkit' ),
|
58 |
+
5 => isset( $_GET['revision'] ) ? sprintf( __( 'Project restored to revision from %s', 'flash-toolkit' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
|
59 |
+
6 => sprintf( __( 'Project published. <a href="%s">View Project</a>', 'flash-toolkit' ), esc_url( get_permalink( $post_ID ) ) ),
|
60 |
+
7 => __( 'Project saved.', 'flash-toolkit' ),
|
61 |
+
8 => sprintf( __( 'Project submitted. <a target="_blank" href="%s">Preview project</a>', 'flash-toolkit' ), esc_url( add_query_arg( 'preview', 'true', get_permalink( $post_ID ) ) ) ),
|
62 |
+
9 => sprintf( __( 'Project scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview project</a>', 'flash-toolkit' ),
|
63 |
+
date_i18n( __( 'M j, Y @ G:i', 'flash-toolkit' ), strtotime( $post->post_date ) ), esc_url( get_permalink( $post_ID ) ) ),
|
64 |
+
10 => sprintf( __( 'Project draft updated. <a target="_blank" href="%s">Preview project</a>', 'flash-toolkit' ), esc_url( add_query_arg( 'preview', 'true', get_permalink( $post_ID ) ) ) ),
|
65 |
+
);
|
66 |
+
|
67 |
+
return $messages;
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Specify custom bulk actions messages for different post types.
|
72 |
+
* @param array $bulk_messages
|
73 |
+
* @param array $bulk_counts
|
74 |
+
* @return array
|
75 |
+
*/
|
76 |
+
public function bulk_post_updated_messages( $bulk_messages, $bulk_counts ) {
|
77 |
+
|
78 |
+
$bulk_messages['portfolio'] = array(
|
79 |
+
'updated' => _n( '%s project updated.', '%s projects updated.', $bulk_counts['updated'], 'flash-toolkit' ),
|
80 |
+
'locked' => _n( '%s project not updated, somebody is editing it.', '%s projects not updated, somebody is editing them.', $bulk_counts['locked'], 'flash-toolkit' ),
|
81 |
+
'deleted' => _n( '%s project permanently deleted.', '%s projects permanently deleted.', $bulk_counts['deleted'], 'flash-toolkit' ),
|
82 |
+
'trashed' => _n( '%s project moved to the Trash.', '%s projects moved to the Trash.', $bulk_counts['trashed'], 'flash-toolkit' ),
|
83 |
+
'untrashed' => _n( '%s project restored from the Trash.', '%s projects restored from the Trash.', $bulk_counts['untrashed'], 'flash-toolkit' ),
|
84 |
+
);
|
85 |
+
|
86 |
+
return $bulk_messages;
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Change title boxes in admin.
|
91 |
+
* @param string $text
|
92 |
+
* @param object $post
|
93 |
+
* @return string
|
94 |
+
*/
|
95 |
+
public function enter_title_here( $text, $post ) {
|
96 |
+
switch ( $post->post_type ) {
|
97 |
+
case 'portfolio' :
|
98 |
+
$text = __( 'Project name', 'flash-toolkit' );
|
99 |
+
break;
|
100 |
+
}
|
101 |
+
|
102 |
+
return $text;
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Hidden default Meta-Boxes.
|
107 |
+
* @param array $hidden
|
108 |
+
* @param object $screen
|
109 |
+
* @return array
|
110 |
+
*/
|
111 |
+
public function hidden_meta_boxes( $hidden, $screen ) {
|
112 |
+
if ( 'portfolio' === $screen->post_type && 'post' === $screen->base ) {
|
113 |
+
$hidden = array_merge( $hidden, array( 'postcustom' ) );
|
114 |
+
}
|
115 |
+
|
116 |
+
return $hidden;
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Disable DFW feature pointer.
|
121 |
+
*/
|
122 |
+
public function disable_dfw_feature_pointer() {
|
123 |
+
$screen = get_current_screen();
|
124 |
+
|
125 |
+
if ( $screen && 'portfolio' === $screen->id && 'post' === $screen->base ) {
|
126 |
+
remove_action( 'admin_print_footer_scripts', array( 'WP_Internal_Pointers', 'pointer_wp410_dfw' ) );
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Removes portfolio from the list of post types that support "View Mode" switching.
|
132 |
+
* View mode is seen on posts where you can switch between list or excerpt. Our post types don't support
|
133 |
+
* it, so we want to hide the useless UI from the screen options tab.
|
134 |
+
*
|
135 |
+
* @param array $post_types Array of post types supporting view mode
|
136 |
+
* @return array Array of post types supporting view mode, without portfolio
|
137 |
+
*/
|
138 |
+
public function disable_view_mode_options( $post_types ) {
|
139 |
+
unset( $post_types['portfolio'] );
|
140 |
+
return $post_types;
|
141 |
+
}
|
142 |
+
}
|
143 |
+
|
144 |
+
new FT_Admin_Post_Types();
|
includes/admin/class-flash-admin.php
CHANGED
@@ -24,14 +24,19 @@ class FT_Admin {
|
|
24 |
public function __construct() {
|
25 |
add_action( 'init', array( $this, 'includes' ) );
|
26 |
add_action( 'current_screen', array( $this, 'conditional_includes' ) );
|
|
|
|
|
27 |
}
|
28 |
|
29 |
/**
|
30 |
* Includes any classes we need within admin.
|
31 |
*/
|
32 |
public function includes() {
|
|
|
|
|
33 |
include_once( dirname( __FILE__ ) . '/class-flash-admin-notices.php' );
|
34 |
include_once( dirname( __FILE__ ) . '/class-flash-admin-assets.php' );
|
|
|
35 |
}
|
36 |
|
37 |
/**
|
@@ -47,6 +52,37 @@ class FT_Admin {
|
|
47 |
include( 'class-flash-admin-permalink-settings.php' );
|
48 |
}
|
49 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
|
52 |
new FT_Admin();
|
24 |
public function __construct() {
|
25 |
add_action( 'init', array( $this, 'includes' ) );
|
26 |
add_action( 'current_screen', array( $this, 'conditional_includes' ) );
|
27 |
+
add_action( 'admin_footer', 'flash_toolkit_print_js', 25 );
|
28 |
+
add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 1 );
|
29 |
}
|
30 |
|
31 |
/**
|
32 |
* Includes any classes we need within admin.
|
33 |
*/
|
34 |
public function includes() {
|
35 |
+
include_once( dirname( __FILE__ ) . '/functions-flash-admin.php' );
|
36 |
+
include_once( dirname( __FILE__ ) . '/functions-flash-meta-box.php' );
|
37 |
include_once( dirname( __FILE__ ) . '/class-flash-admin-notices.php' );
|
38 |
include_once( dirname( __FILE__ ) . '/class-flash-admin-assets.php' );
|
39 |
+
include_once( dirname( __FILE__ ) . '/class-flash-admin-post-types.php' );
|
40 |
}
|
41 |
|
42 |
/**
|
52 |
include( 'class-flash-admin-permalink-settings.php' );
|
53 |
}
|
54 |
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Change the admin footer text on Flash Toolkit admin pages.
|
58 |
+
* @param string $footer_text
|
59 |
+
* @return string
|
60 |
+
*/
|
61 |
+
public function admin_footer_text( $footer_text ) {
|
62 |
+
if ( ! current_user_can( 'manage_options' ) || ! function_exists( 'flash_toolkit_get_screen_ids' ) ) {
|
63 |
+
return $footer_text;
|
64 |
+
}
|
65 |
+
$current_screen = get_current_screen();
|
66 |
+
$ft_pages = flash_toolkit_get_screen_ids();
|
67 |
+
|
68 |
+
// Check to make sure we're on a Flash Toolkit admin page.
|
69 |
+
if ( isset( $current_screen->id ) && apply_filters( 'flash_toolkit_display_admin_footer_text', in_array( $current_screen->id, $ft_pages ) ) ) {
|
70 |
+
// Change the footer text.
|
71 |
+
if ( ! get_option( 'flash_toolkit_admin_footer_text_rated' ) ) {
|
72 |
+
$footer_text = sprintf( __( 'If you like <strong>Flash Toolkit</strong> please leave us a %s★★★★★%s rating. A huge thanks in advance!', 'flash-toolkit' ), '<a href="https://wordpress.org/support/view/plugin-reviews/flash-toolkit?filter=5#postform" target="_blank" class="flash-toolkit-rating-link" data-rated="' . esc_attr__( 'Thanks :)', 'flash-toolkit' ) . '">', '</a>' );
|
73 |
+
flash_toolkit_enqueue_js( "
|
74 |
+
jQuery( 'a.flash-toolkit-rating-link' ).click( function() {
|
75 |
+
jQuery.post( '" . FT()->ajax_url() . "', { action: 'flash_toolkit_rated' } );
|
76 |
+
jQuery( this ).parent().text( jQuery( this ).data( 'rated' ) );
|
77 |
+
});
|
78 |
+
" );
|
79 |
+
} else {
|
80 |
+
$footer_text = __( 'Thank you for creating with Flash Toolkit.', 'flash-toolkit' );
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
return $footer_text;
|
85 |
+
}
|
86 |
}
|
87 |
|
88 |
new FT_Admin();
|
includes/admin/functions-flash-admin.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* FlashToolkit Admin Functions
|
4 |
+
*
|
5 |
+
* @author ThemeGrill
|
6 |
+
* @category Core
|
7 |
+
* @package FlashToolkit/Admin/Functions
|
8 |
+
* @version 1.1.0
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
exit;
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Get all FlashToolkit screen ids.
|
17 |
+
* @return array
|
18 |
+
*/
|
19 |
+
function flash_toolkit_get_screen_ids() {
|
20 |
+
return apply_filters( 'flash_toolkit_screen_ids', array( 'edit-portfolio', 'portfolio' ) );
|
21 |
+
}
|
includes/admin/functions-flash-meta-box.php
ADDED
@@ -0,0 +1,254 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* FlashToolkit Meta Box Functions
|
4 |
+
*
|
5 |
+
* @author ThemeGrill
|
6 |
+
* @category Core
|
7 |
+
* @package FlashToolkit/Admin/Functions
|
8 |
+
* @version 1.1.0
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
exit;
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Output a text input box.
|
17 |
+
* @param array $field
|
18 |
+
*/
|
19 |
+
function flash_toolkit_wp_text_input( $field ) {
|
20 |
+
global $thepostid, $post;
|
21 |
+
|
22 |
+
$thepostid = empty( $thepostid ) ? $post->ID : $thepostid;
|
23 |
+
$field['placeholder'] = isset( $field['placeholder'] ) ? $field['placeholder'] : '';
|
24 |
+
$field['class'] = isset( $field['class'] ) ? $field['class'] : 'short';
|
25 |
+
$field['style'] = isset( $field['style'] ) ? $field['style'] : '';
|
26 |
+
$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
|
27 |
+
$field['value'] = isset( $field['value'] ) ? $field['value'] : get_post_meta( $thepostid, $field['id'], true );
|
28 |
+
$field['name'] = isset( $field['name'] ) ? $field['name'] : $field['id'];
|
29 |
+
$field['type'] = isset( $field['type'] ) ? $field['type'] : 'text';
|
30 |
+
$data_type = empty( $field['data_type'] ) ? '' : $field['data_type'];
|
31 |
+
|
32 |
+
switch ( $data_type ) {
|
33 |
+
case 'url' :
|
34 |
+
$field['class'] .= ' ft_input_url';
|
35 |
+
$field['value'] = esc_url( $field['value'] );
|
36 |
+
break;
|
37 |
+
|
38 |
+
default :
|
39 |
+
break;
|
40 |
+
}
|
41 |
+
|
42 |
+
// Custom attribute handling
|
43 |
+
$custom_attributes = array();
|
44 |
+
|
45 |
+
if ( ! empty( $field['custom_attributes'] ) && is_array( $field['custom_attributes'] ) ) {
|
46 |
+
|
47 |
+
foreach ( $field['custom_attributes'] as $attribute => $value ){
|
48 |
+
$custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $value ) . '"';
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
echo '<p class="form-field ' . esc_attr( $field['id'] ) . '_field ' . esc_attr( $field['wrapper_class'] ) . '"><label for="' . esc_attr( $field['id'] ) . '">' . wp_kses_post( $field['label'] ) . '</label><input type="' . esc_attr( $field['type'] ) . '" class="' . esc_attr( $field['class'] ) . '" style="' . esc_attr( $field['style'] ) . '" name="' . esc_attr( $field['name'] ) . '" id="' . esc_attr( $field['id'] ) . '" value="' . esc_attr( $field['value'] ) . '" placeholder="' . esc_attr( $field['placeholder'] ) . '" ' . implode( ' ', $custom_attributes ) . ' /> ';
|
53 |
+
|
54 |
+
if ( ! empty( $field['description'] ) ) {
|
55 |
+
|
56 |
+
if ( isset( $field['desc_tip'] ) && false !== $field['desc_tip'] ) {
|
57 |
+
echo flash_toolkit_help_tip( $field['description'] );
|
58 |
+
} else {
|
59 |
+
echo '<span class="description">' . wp_kses_post( $field['description'] ) . '</span>';
|
60 |
+
}
|
61 |
+
}
|
62 |
+
echo '</p>';
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Output a hidden input box.
|
67 |
+
* @param array $field
|
68 |
+
*/
|
69 |
+
function flash_toolkit_wp_hidden_input( $field ) {
|
70 |
+
global $thepostid, $post;
|
71 |
+
|
72 |
+
$thepostid = empty( $thepostid ) ? $post->ID : $thepostid;
|
73 |
+
$field['value'] = isset( $field['value'] ) ? $field['value'] : get_post_meta( $thepostid, $field['id'], true );
|
74 |
+
$field['class'] = isset( $field['class'] ) ? $field['class'] : '';
|
75 |
+
|
76 |
+
echo '<input type="hidden" class="' . esc_attr( $field['class'] ) . '" name="' . esc_attr( $field['id'] ) . '" id="' . esc_attr( $field['id'] ) . '" value="' . esc_attr( $field['value'] ) . '" /> ';
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Output a textarea input box.
|
81 |
+
* @param array $field
|
82 |
+
*/
|
83 |
+
function flash_toolkit_wp_textarea_input( $field ) {
|
84 |
+
global $thepostid, $post;
|
85 |
+
|
86 |
+
$thepostid = empty( $thepostid ) ? $post->ID : $thepostid;
|
87 |
+
$field['placeholder'] = isset( $field['placeholder'] ) ? $field['placeholder'] : '';
|
88 |
+
$field['class'] = isset( $field['class'] ) ? $field['class'] : 'short';
|
89 |
+
$field['style'] = isset( $field['style'] ) ? $field['style'] : '';
|
90 |
+
$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
|
91 |
+
$field['value'] = isset( $field['value'] ) ? $field['value'] : get_post_meta( $thepostid, $field['id'], true );
|
92 |
+
|
93 |
+
// Custom attribute handling
|
94 |
+
$custom_attributes = array();
|
95 |
+
|
96 |
+
if ( ! empty( $field['custom_attributes'] ) && is_array( $field['custom_attributes'] ) ) {
|
97 |
+
|
98 |
+
foreach ( $field['custom_attributes'] as $attribute => $value ){
|
99 |
+
$custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $value ) . '"';
|
100 |
+
}
|
101 |
+
}
|
102 |
+
|
103 |
+
echo '<p class="form-field ' . esc_attr( $field['id'] ) . '_field ' . esc_attr( $field['wrapper_class'] ) . '"><label for="' . esc_attr( $field['id'] ) . '">' . wp_kses_post( $field['label'] ) . '</label><textarea class="' . esc_attr( $field['class'] ) . '" style="' . esc_attr( $field['style'] ) . '" name="' . esc_attr( $field['id'] ) . '" id="' . esc_attr( $field['id'] ) . '" placeholder="' . esc_attr( $field['placeholder'] ) . '" rows="2" cols="20" ' . implode( ' ', $custom_attributes ) . '>' . esc_textarea( $field['value'] ) . '</textarea> ';
|
104 |
+
|
105 |
+
if ( ! empty( $field['description'] ) ) {
|
106 |
+
|
107 |
+
if ( isset( $field['desc_tip'] ) && false !== $field['desc_tip'] ) {
|
108 |
+
echo flash_toolkit_help_tip( $field['description'] );
|
109 |
+
} else {
|
110 |
+
echo '<span class="description">' . wp_kses_post( $field['description'] ) . '</span>';
|
111 |
+
}
|
112 |
+
}
|
113 |
+
echo '</p>';
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Output a checkbox input box.
|
118 |
+
* @param array $field
|
119 |
+
*/
|
120 |
+
function flash_toolkit_wp_checkbox( $field ) {
|
121 |
+
global $thepostid, $post;
|
122 |
+
|
123 |
+
$thepostid = empty( $thepostid ) ? $post->ID : $thepostid;
|
124 |
+
$field['class'] = isset( $field['class'] ) ? $field['class'] : 'checkbox';
|
125 |
+
$field['style'] = isset( $field['style'] ) ? $field['style'] : '';
|
126 |
+
$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
|
127 |
+
$field['value'] = isset( $field['value'] ) ? $field['value'] : get_post_meta( $thepostid, $field['id'], true );
|
128 |
+
$field['cbvalue'] = isset( $field['cbvalue'] ) ? $field['cbvalue'] : 'yes';
|
129 |
+
$field['name'] = isset( $field['name'] ) ? $field['name'] : $field['id'];
|
130 |
+
|
131 |
+
// Custom attribute handling
|
132 |
+
$custom_attributes = array();
|
133 |
+
|
134 |
+
if ( ! empty( $field['custom_attributes'] ) && is_array( $field['custom_attributes'] ) ) {
|
135 |
+
|
136 |
+
foreach ( $field['custom_attributes'] as $attribute => $value ){
|
137 |
+
$custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $value ) . '"';
|
138 |
+
}
|
139 |
+
}
|
140 |
+
|
141 |
+
echo '<p class="form-field ' . esc_attr( $field['id'] ) . '_field ' . esc_attr( $field['wrapper_class'] ) . '"><label for="' . esc_attr( $field['id'] ) . '">' . wp_kses_post( $field['label'] ) . '</label><input type="checkbox" class="' . esc_attr( $field['class'] ) . '" style="' . esc_attr( $field['style'] ) . '" name="' . esc_attr( $field['name'] ) . '" id="' . esc_attr( $field['id'] ) . '" value="' . esc_attr( $field['cbvalue'] ) . '" ' . checked( $field['value'], $field['cbvalue'], false ) . ' ' . implode( ' ', $custom_attributes ) . '/> ';
|
142 |
+
|
143 |
+
if ( ! empty( $field['description'] ) ) {
|
144 |
+
|
145 |
+
if ( isset( $field['desc_tip'] ) && false !== $field['desc_tip'] ) {
|
146 |
+
echo flash_toolkit_help_tip( $field['description'] );
|
147 |
+
} else {
|
148 |
+
echo '<span class="description">' . wp_kses_post( $field['description'] ) . '</span>';
|
149 |
+
}
|
150 |
+
}
|
151 |
+
|
152 |
+
echo '</p>';
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Output a select input box.
|
157 |
+
* @param array $field
|
158 |
+
*/
|
159 |
+
function flash_toolkit_wp_select( $field ) {
|
160 |
+
global $thepostid, $post;
|
161 |
+
|
162 |
+
$thepostid = empty( $thepostid ) ? $post->ID : $thepostid;
|
163 |
+
$field['class'] = isset( $field['class'] ) ? $field['class'] : 'select short';
|
164 |
+
$field['style'] = isset( $field['style'] ) ? $field['style'] : '';
|
165 |
+
$field['desc_side'] = isset( $field['desc_side'] ) ? $field['desc_side'] : false;
|
166 |
+
$field['desc_class'] = isset( $field['desc_class'] ) ? $field['desc_class'] : '';
|
167 |
+
$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
|
168 |
+
$field['value'] = isset( $field['value'] ) ? $field['value'] : get_post_meta( $thepostid, $field['id'], true );
|
169 |
+
$field['name'] = isset( $field['name'] ) ? $field['name'] : $field['id'];
|
170 |
+
|
171 |
+
// Custom attribute handling
|
172 |
+
$custom_attributes = array();
|
173 |
+
|
174 |
+
if ( ! empty( $field['custom_attributes'] ) && is_array( $field['custom_attributes'] ) ) {
|
175 |
+
|
176 |
+
foreach ( $field['custom_attributes'] as $attribute => $value ){
|
177 |
+
$custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $value ) . '"';
|
178 |
+
}
|
179 |
+
}
|
180 |
+
|
181 |
+
// Description handling
|
182 |
+
$description = '';
|
183 |
+
|
184 |
+
if ( ! empty( $field['description'] ) ) {
|
185 |
+
|
186 |
+
if ( isset( $field['desc_tip'] ) && false !== $field['desc_tip'] ) {
|
187 |
+
$description = flash_toolkit_help_tip( $field['description'] );
|
188 |
+
} else {
|
189 |
+
$description = '<span class="description ' . esc_attr( $field['desc_class'] ) . '">' . wp_kses_post( $field['description'] ) . '</span>';
|
190 |
+
}
|
191 |
+
}
|
192 |
+
|
193 |
+
echo '<p class="form-field ' . esc_attr( $field['id'] ) . '_field ' . esc_attr( $field['wrapper_class'] ) . '"><label for="' . esc_attr( $field['id'] ) . '">' . wp_kses_post( $field['label'] ) . '</label>';
|
194 |
+
|
195 |
+
if ( isset( $field['desc_side'] ) && true === $field['desc_side'] ) {
|
196 |
+
echo $description;
|
197 |
+
}
|
198 |
+
|
199 |
+
echo '<select id="' . esc_attr( $field['id'] ) . '" name="' . esc_attr( $field['name'] ) . '" class="' . esc_attr( $field['class'] ) . '" style="' . esc_attr( $field['style'] ) . '" ' . implode( ' ', $custom_attributes ) . '>';
|
200 |
+
|
201 |
+
foreach ( $field['options'] as $key => $value ) {
|
202 |
+
echo '<option value="' . esc_attr( $key ) . '" ' . selected( esc_attr( $field['value'] ), esc_attr( $key ), false ) . '>' . esc_html( $value ) . '</option>';
|
203 |
+
}
|
204 |
+
|
205 |
+
echo '</select> ';
|
206 |
+
|
207 |
+
if ( isset( $field['desc_side'] ) && false === $field['desc_side'] ) {
|
208 |
+
echo $description;
|
209 |
+
}
|
210 |
+
|
211 |
+
echo '</p>';
|
212 |
+
}
|
213 |
+
|
214 |
+
/**
|
215 |
+
* Output a radio input box.
|
216 |
+
* @param array $field
|
217 |
+
*/
|
218 |
+
function flash_toolkit_wp_radio( $field ) {
|
219 |
+
global $thepostid, $post;
|
220 |
+
|
221 |
+
$thepostid = empty( $thepostid ) ? $post->ID : $thepostid;
|
222 |
+
$field['class'] = isset( $field['class'] ) ? $field['class'] : 'select short';
|
223 |
+
$field['style'] = isset( $field['style'] ) ? $field['style'] : '';
|
224 |
+
$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
|
225 |
+
$field['value'] = isset( $field['value'] ) ? $field['value'] : get_post_meta( $thepostid, $field['id'], true );
|
226 |
+
$field['name'] = isset( $field['name'] ) ? $field['name'] : $field['id'];
|
227 |
+
|
228 |
+
echo '<fieldset class="form-field ' . esc_attr( $field['id'] ) . '_field ' . esc_attr( $field['wrapper_class'] ) . '"><legend>' . wp_kses_post( $field['label'] ) . '</legend><ul class="ft-radios">';
|
229 |
+
|
230 |
+
foreach ( $field['options'] as $key => $value ) {
|
231 |
+
|
232 |
+
echo '<li><label><input
|
233 |
+
name="' . esc_attr( $field['name'] ) . '"
|
234 |
+
value="' . esc_attr( $key ) . '"
|
235 |
+
type="radio"
|
236 |
+
class="' . esc_attr( $field['class'] ) . '"
|
237 |
+
style="' . esc_attr( $field['style'] ) . '"
|
238 |
+
' . checked( esc_attr( $field['value'] ), esc_attr( $key ), false ) . '
|
239 |
+
/> ' . esc_html( $value ) . '</label>
|
240 |
+
</li>';
|
241 |
+
}
|
242 |
+
echo '</ul>';
|
243 |
+
|
244 |
+
if ( ! empty( $field['description'] ) ) {
|
245 |
+
|
246 |
+
if ( isset( $field['desc_tip'] ) && false !== $field['desc_tip'] ) {
|
247 |
+
echo flash_toolkit_help_tip( $field['description'] );
|
248 |
+
} else {
|
249 |
+
echo '<span class="description">' . wp_kses_post( $field['description'] ) . '</span>';
|
250 |
+
}
|
251 |
+
}
|
252 |
+
|
253 |
+
echo '</fieldset>';
|
254 |
+
}
|
includes/admin/meta-boxes/class-flash-meta-box-layout-data.php
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Layout Data
|
4 |
+
*
|
5 |
+
* Display the layout data meta box.
|
6 |
+
*
|
7 |
+
* @class FT_Meta_Box_Layout_Data
|
8 |
+
* @version 1.1.0
|
9 |
+
* @package FlashToolkit/Admin/Meta Boxes
|
10 |
+
* @category Admin
|
11 |
+
* @author ThemeGrill
|
12 |
+
*/
|
13 |
+
|
14 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
15 |
+
exit;
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* FT_Meta_Box_Layout_Data Class
|
20 |
+
*/
|
21 |
+
class FT_Meta_Box_Layout_Data {
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Output the meta box.
|
25 |
+
* @param WP_Post $post
|
26 |
+
*/
|
27 |
+
public static function output( $post ) {
|
28 |
+
wp_nonce_field( 'flash_toolkit_save_data', 'flash_toolkit_meta_nonce' );
|
29 |
+
|
30 |
+
?>
|
31 |
+
<ul class="layout_data">
|
32 |
+
|
33 |
+
<?php
|
34 |
+
do_action( 'flash_toolkit_layout_data_start', $post->ID );
|
35 |
+
|
36 |
+
// Layout
|
37 |
+
flash_toolkit_wp_select( array( 'id' => 'flash_page_layout', 'class' => 'select side show_if_sidebar', 'label' => __( 'Layout Settings', 'flash-toolkit' ), 'options' => array(
|
38 |
+
'default-layout' => __( 'Default Layout', 'flash-toolkit' ),
|
39 |
+
'left-sidebar' => __( 'Left Sidebar', 'flash-toolkit' ),
|
40 |
+
'right-sidebar' => __( 'Right Sidebar', 'flash-toolkit' ),
|
41 |
+
'full-width' => __( 'Full Width', 'flash-toolkit' ),
|
42 |
+
'full-width-center' => __( 'Full Width Center', 'flash-toolkit' ),
|
43 |
+
), 'desc_side' => true, 'desc_tip' => false, 'desc_class' => 'side', 'description' => __( 'Select the specific layout for this entry.', 'flash-toolkit' ) ) );
|
44 |
+
|
45 |
+
// Sidebar
|
46 |
+
flash_toolkit_wp_select( array( 'id' => 'flash_sidebar', 'class' => 'select side', 'label' => __( 'Sidebar Settings', 'flash-toolkit' ), 'desc_side' => true, 'desc_tip' => false, 'desc_class' => 'side', 'description' => __( 'Choose a custom sidebar for this entry.', 'flash-toolkit' ), 'options' => flash_toolkit_get_sidebars( array( 'default' => 'Default Sidebar' ) ) ) );
|
47 |
+
|
48 |
+
// Footer
|
49 |
+
flash_toolkit_wp_select( array( 'id' => 'flash_footer', 'class' => 'select side', 'label' => __( 'Footer Settings', 'flash-toolkit' ), 'options' => array(
|
50 |
+
'default' => __( 'Default Socket and Widgets', 'flash-toolkit' ),
|
51 |
+
'footer_both' => __( 'Both Socket and Widgets', 'flash-toolkit' ),
|
52 |
+
'widget_only' => __( 'Only Widgets (No Socket)', 'flash-toolkit' ),
|
53 |
+
'socket_only' => __( 'Only Socket (No Widgets)', 'flash-toolkit' ),
|
54 |
+
'footer_hide' => __( 'Hide Socket and Widgets', 'flash-toolkit' )
|
55 |
+
), 'desc_side' => true, 'desc_tip' => false, 'desc_class' => 'side', 'description' => __( 'Display the socket and footer widgets?', 'flash-toolkit' ) ) );
|
56 |
+
|
57 |
+
// Header Transparency
|
58 |
+
flash_toolkit_wp_select( array( 'id' => 'flash_transparency', 'class' => 'select side', 'label' => __( 'Header Transparency', 'flash-toolkit' ), 'options' => array(
|
59 |
+
'non-transparent' => __( 'No Transparency', 'flash-toolkit' ),
|
60 |
+
'transparent' => __( 'Transparent Header', 'flash-toolkit' ),
|
61 |
+
), 'desc_side' => true, 'desc_tip' => false, 'desc_class' => 'side', 'description' => __( 'Header transparency options on this page.', 'flash-toolkit' ) ) );
|
62 |
+
|
63 |
+
// Top Sidebar Position
|
64 |
+
flash_toolkit_wp_select( array( 'id' => 'flash_top_sidebar_position', 'class' => 'select side', 'label' => __( 'Top Sidebar Position', 'flash-toolkit' ), 'options' => array(
|
65 |
+
'none' => __( 'None', 'flash-toolkit' ),
|
66 |
+
'above_header' => __( 'Above Header', 'flash-toolkit' ),
|
67 |
+
'below_header' => __( 'Below Header', 'flash-toolkit' ),
|
68 |
+
), 'desc_side' => true, 'desc_tip' => false, 'desc_class' => 'side', 'description' => __( 'Top Sidebar Position options on this page.', 'flash-toolkit' ) ) );
|
69 |
+
|
70 |
+
do_action( 'flash_toolkit_layout_data_end', $post->ID );
|
71 |
+
?>
|
72 |
+
</ul>
|
73 |
+
<?php
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Save meta box data.
|
78 |
+
* @param int $post_id
|
79 |
+
*/
|
80 |
+
public static function save( $post_id ) {
|
81 |
+
$layout_post_meta = array( 'flash_page_layout', 'flash_sidebar', 'flash_footer', 'flash_transparency', 'flash_top_sidebar_position' );
|
82 |
+
|
83 |
+
foreach ( $layout_post_meta as $post_meta ) {
|
84 |
+
if ( isset( $_POST[ $post_meta ] ) ) {
|
85 |
+
update_post_meta( $post_id, $post_meta, $_POST[ $post_meta ] );
|
86 |
+
}
|
87 |
+
}
|
88 |
+
}
|
89 |
+
}
|
includes/admin/meta-boxes/class-flash-meta-box-portfolio-data.php
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Portfolio Data.
|
4 |
+
*
|
5 |
+
* @class FT_Meta_Box_Portfolio_Data
|
6 |
+
* @version 1.1.0
|
7 |
+
* @package FlashToolkit/Admin/Meta Boxes
|
8 |
+
* @category Admin
|
9 |
+
* @author ThemeGrill
|
10 |
+
*/
|
11 |
+
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* FT_Meta_Box_Portfolio_Data Class
|
18 |
+
*/
|
19 |
+
class FT_Meta_Box_Portfolio_Data {
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Output the meta box.
|
23 |
+
* @param WP_Post $post
|
24 |
+
*/
|
25 |
+
public static function output( $post ) {
|
26 |
+
wp_nonce_field( 'flash_toolkit_save_data', 'flash_toolkit_meta_nonce' );
|
27 |
+
|
28 |
+
?>
|
29 |
+
<div id="portfolio_options" class="panel-wrap portfolio_data">
|
30 |
+
<ul class="portfolio_data_tabs ft-tabs">
|
31 |
+
<?php
|
32 |
+
$portfolio_data_tabs = apply_filters( 'flash-toolkit_portfolio_data_tabs', array(
|
33 |
+
'general' => array(
|
34 |
+
'label' => __( 'General', 'flash-toolkit' ),
|
35 |
+
'target' => 'general_portfolio_data',
|
36 |
+
'class' => array(),
|
37 |
+
),
|
38 |
+
'description' => array(
|
39 |
+
'label' => __( 'Description', 'flash-toolkit' ),
|
40 |
+
'target' => 'description_portfolio_data',
|
41 |
+
'class' => array(),
|
42 |
+
),
|
43 |
+
) );
|
44 |
+
|
45 |
+
foreach ( $portfolio_data_tabs as $key => $tab ) {
|
46 |
+
?><li class="<?php echo $key; ?>_options <?php echo $key; ?>_tab <?php echo implode( ' ', (array) $tab['class'] ); ?>">
|
47 |
+
<a href="#<?php echo $tab['target']; ?>"><?php echo esc_html( $tab['label'] ); ?></a>
|
48 |
+
</li><?php
|
49 |
+
}
|
50 |
+
|
51 |
+
do_action( 'flash_toolkit_portfolio_write_panel_tabs' );
|
52 |
+
?>
|
53 |
+
</ul>
|
54 |
+
<div id="general_portfolio_data" class="panel flash_toolkit_options_panel hidden"><?php
|
55 |
+
|
56 |
+
echo '<div class="options_group">';
|
57 |
+
|
58 |
+
// Layout Type
|
59 |
+
flash_toolkit_wp_select( array(
|
60 |
+
'id' => 'layout_type',
|
61 |
+
'label' => __( 'Layout Type', 'flash-toolkit' ),
|
62 |
+
'options' => array(
|
63 |
+
'one_column' => __( 'One Column', 'flash-toolkit' ),
|
64 |
+
'two_column' => __( 'Two Column', 'flash-toolkit' ),
|
65 |
+
),
|
66 |
+
'desc_tip' => 'true',
|
67 |
+
'description' => __( 'Define whether or not the entire layout should be one or two column based.', 'flash-toolkit' )
|
68 |
+
) );
|
69 |
+
|
70 |
+
echo '</div>';
|
71 |
+
|
72 |
+
echo '<div class="options_group">';
|
73 |
+
|
74 |
+
// Example Checkbox
|
75 |
+
flash_toolkit_wp_checkbox( array( 'id' => '_example_cb', 'wrapper_class' => 'show_to_all_layout', 'label' => __( 'Sample Checkbox', 'flash-toolkit' ), 'description' => __( 'Enable example checkbox.', 'flash-toolkit' ) ) );
|
76 |
+
|
77 |
+
echo '</div>';
|
78 |
+
|
79 |
+
do_action( 'flash_toolkit_portfolio_options_general' );
|
80 |
+
|
81 |
+
?></div>
|
82 |
+
<div id="description_portfolio_data" class="panel flash_toolkit_options_panel hidden"><?php
|
83 |
+
|
84 |
+
echo '<div class="options_group">';
|
85 |
+
|
86 |
+
// Description Textarea
|
87 |
+
flash_toolkit_wp_textarea_input( array(
|
88 |
+
'id' => 'layout_desc',
|
89 |
+
'label' => __( 'Description', 'flash-toolkit' ),
|
90 |
+
) );
|
91 |
+
|
92 |
+
echo '</div>';
|
93 |
+
|
94 |
+
?></div>
|
95 |
+
<?php do_action( 'flash_toolkit_portfolio_data_panels' ); ?>
|
96 |
+
<div class="clear"></div>
|
97 |
+
</div>
|
98 |
+
<?php
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Save meta box data.
|
103 |
+
* @param int $post_id
|
104 |
+
*/
|
105 |
+
public static function save( $post_id ) {
|
106 |
+
// Add/replace data to array
|
107 |
+
$layout_type = flash_clean( $_POST['layout_type'] );
|
108 |
+
$layout_desc = esc_textarea( $_POST['layout_desc'] );
|
109 |
+
$_example_cb = isset( $_POST['_example_cb'] ) ? 'yes' : 'no';
|
110 |
+
|
111 |
+
// Save
|
112 |
+
update_post_meta( $post_id, 'layout_type', $layout_type );
|
113 |
+
update_post_meta( $post_id, 'layout_desc', $layout_desc );
|
114 |
+
update_post_meta( $post_id, '_example_cb', $_example_cb );
|
115 |
+
|
116 |
+
do_action( 'flash_toolkit_portfolio_options_save', $post_id );
|
117 |
+
}
|
118 |
+
}
|
includes/admin/views/html-admin-tmpl-sidebars.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin View: Template - Sidebars
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
?>
|
11 |
+
<script type="text/template" id="tmpl-flash-toolkit-form-create-sidebar">
|
12 |
+
<form class="flash-toolkit-add-sidebar" action="<?php echo self_admin_url( 'widgets.php' ); ?>" method="post">
|
13 |
+
<h2><?php _e( 'Custom Widget Area Builder', 'flash-toolkit' ) ?></h2>
|
14 |
+
<?php wp_nonce_field( 'flash_toolkit_add_sidebar', '_flash_toolkit_sidebar_nonce' ); ?>
|
15 |
+
<input name="flash-toolkit-add-sidebar" type="text" id="flash-toolkit-add-sidebar" class="widefat" autocomplete="off" value="" placeholder="<?php esc_attr_e( 'Enter New Widget Area Name', 'flash-toolkit' ) ?>" />
|
16 |
+
<?php submit_button( __( 'Add Widget Area', 'flash-toolkit' ), 'button button-primary button-large', 'add-sidebar-submit', false ); ?>
|
17 |
+
</form>
|
18 |
+
</script>
|
includes/admin/views/html-notice-custom.php
CHANGED
@@ -9,6 +9,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
9 |
|
10 |
?>
|
11 |
<div id="message" class="updated flash-toolkit-message">
|
12 |
-
<a class="flash-toolkit-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'flash-hide-notice', $notice ), 'flash_toolkit_hide_notices_nonce', '
|
13 |
<?php echo wp_kses_post( wpautop( $notice_html ) ); ?>
|
14 |
</div>
|
9 |
|
10 |
?>
|
11 |
<div id="message" class="updated flash-toolkit-message">
|
12 |
+
<a class="flash-toolkit-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'flash-toolkit-hide-notice', $notice ), 'flash_toolkit_hide_notices_nonce', '_flash_toolkit_notice_nonce' ) ); ?>"><?php _e( 'Dismiss', 'flash-toolkit' ); ?></a>
|
13 |
<?php echo wp_kses_post( wpautop( $notice_html ) ); ?>
|
14 |
</div>
|
includes/admin/views/html-notice-updated.php
CHANGED
@@ -9,7 +9,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
9 |
|
10 |
?>
|
11 |
<div id="message" class="updated flash-toolkit-message flash-connect flash-toolkit-message--success">
|
12 |
-
<a class="flash-toolkit-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'flash-hide-notice', 'update', remove_query_arg( 'do_update_flash_toolkit' ) ), 'flash_toolkit_hide_notices_nonce', '
|
13 |
|
14 |
<p><?php _e( 'FlashToolkit data update complete. Thank you for updating to the latest version!', 'flash-toolkit' ); ?></p>
|
15 |
</div>
|
9 |
|
10 |
?>
|
11 |
<div id="message" class="updated flash-toolkit-message flash-connect flash-toolkit-message--success">
|
12 |
+
<a class="flash-toolkit-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'flash-toolkit-hide-notice', 'update', remove_query_arg( 'do_update_flash_toolkit' ) ), 'flash_toolkit_hide_notices_nonce', '_flash_toolkit_notice_nonce' ) ); ?>"><?php _e( 'Dismiss', 'flash-toolkit' ); ?></a>
|
13 |
|
14 |
<p><?php _e( 'FlashToolkit data update complete. Thank you for updating to the latest version!', 'flash-toolkit' ); ?></p>
|
15 |
</div>
|
includes/class-flash-ajax.php
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* FlashToolkit FT_AJAX
|
4 |
+
*
|
5 |
+
* AJAX Event Handler
|
6 |
+
*
|
7 |
+
* @class FT_AJAX
|
8 |
+
* @version 1.0.0
|
9 |
+
* @package FlashToolkit/Classes
|
10 |
+
* @category Class
|
11 |
+
* @author ThemeGrill
|
12 |
+
*/
|
13 |
+
|
14 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
15 |
+
exit;
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* FT_AJAX Class
|
20 |
+
*/
|
21 |
+
class FT_AJAX {
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Hooks in ajax handlers.
|
25 |
+
*/
|
26 |
+
public static function init() {
|
27 |
+
self::add_ajax_events();
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Hook in methods - uses WordPress ajax handlers (admin-ajax).
|
32 |
+
*/
|
33 |
+
public static function add_ajax_events() {
|
34 |
+
// flash_toolkit_EVENT => nopriv
|
35 |
+
$ajax_events = array(
|
36 |
+
'delete_custom_sidebar' => false,
|
37 |
+
'rated' => false,
|
38 |
+
);
|
39 |
+
|
40 |
+
foreach ( $ajax_events as $ajax_event => $nopriv ) {
|
41 |
+
add_action( 'wp_ajax_flash_toolkit_' . $ajax_event, array( __CLASS__, $ajax_event ) );
|
42 |
+
|
43 |
+
if ( $nopriv ) {
|
44 |
+
add_action( 'wp_ajax_nopriv_flash_toolkit_' . $ajax_event, array( __CLASS__, $ajax_event ) );
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* AJAX Delete Custom Sidebar on Widgets Page.
|
51 |
+
*/
|
52 |
+
public static function delete_custom_sidebar() {
|
53 |
+
ob_start();
|
54 |
+
|
55 |
+
check_ajax_referer( 'delete-custom-sidebar', 'security' );
|
56 |
+
|
57 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
58 |
+
die(-1);
|
59 |
+
}
|
60 |
+
|
61 |
+
$sidebar = flash_clean( stripslashes( $_POST['sidebar'] ) );
|
62 |
+
|
63 |
+
if ( ! empty( $sidebar ) ) {
|
64 |
+
FT_Sidebars::remove_sidebar( $sidebar );
|
65 |
+
wp_send_json_success( array( $sidebar ) );
|
66 |
+
}
|
67 |
+
|
68 |
+
die();
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Triggered when clicking the rating footer.
|
73 |
+
*/
|
74 |
+
public static function rated() {
|
75 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
76 |
+
die( -1 );
|
77 |
+
}
|
78 |
+
|
79 |
+
update_option( 'flash_toolkit_admin_footer_text_rated', 1 );
|
80 |
+
die();
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
FT_AJAX::init();
|
includes/class-flash-autoloader.php
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* FlashToolkit Autoloader.
|
4 |
+
*
|
5 |
+
* @class FT_Autoloader
|
6 |
+
* @version 1.1.0
|
7 |
+
* @package FlashToolkit/Classes
|
8 |
+
* @category Class
|
9 |
+
* @author ThemeGrill
|
10 |
+
*/
|
11 |
+
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* FT_Autoloader Class
|
18 |
+
*/
|
19 |
+
class FT_Autoloader {
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Path to the includes directory.
|
23 |
+
* @var string
|
24 |
+
*/
|
25 |
+
private $include_path = '';
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Class Constructor Method.
|
29 |
+
*/
|
30 |
+
public function __construct() {
|
31 |
+
if ( function_exists( "__autoload" ) ) {
|
32 |
+
spl_autoload_register( "__autoload" );
|
33 |
+
}
|
34 |
+
|
35 |
+
spl_autoload_register( array( $this, 'autoload' ) );
|
36 |
+
|
37 |
+
$this->include_path = untrailingslashit( plugin_dir_path( FT_PLUGIN_FILE ) ) . '/includes/';
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Take a class name and turn it into a file name.
|
42 |
+
* @param string $class
|
43 |
+
* @return string
|
44 |
+
*/
|
45 |
+
private function get_file_name_from_class( $class ) {
|
46 |
+
return 'class-' . str_replace( array( '_', 'ft' ), array( '-', 'flash' ), $class ) . '.php';
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Include a class file.
|
51 |
+
* @param string $path
|
52 |
+
* @return bool successful or not
|
53 |
+
*/
|
54 |
+
private function load_file( $path ) {
|
55 |
+
if ( $path && is_readable( $path ) ) {
|
56 |
+
include_once( $path );
|
57 |
+
return true;
|
58 |
+
}
|
59 |
+
return false;
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Auto-load FT classes on demand to reduce memory consumption.
|
64 |
+
* @param string $class
|
65 |
+
*/
|
66 |
+
public function autoload( $class ) {
|
67 |
+
$class = strtolower( $class );
|
68 |
+
$file = $this->get_file_name_from_class( $class );
|
69 |
+
$path = '';
|
70 |
+
|
71 |
+
if ( strpos( $class, 'ft_meta_box' ) === 0 ) {
|
72 |
+
$path = $this->include_path . 'admin/meta-boxes/';
|
73 |
+
} elseif ( strpos( $class, 'ft_admin' ) === 0 ) {
|
74 |
+
$path = $this->include_path . 'admin/';
|
75 |
+
}
|
76 |
+
|
77 |
+
if ( empty( $path ) || ( ! $this->load_file( $path . $file ) && strpos( $class, 'ft_' ) === 0 ) ) {
|
78 |
+
$this->load_file( $this->include_path . $file );
|
79 |
+
}
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
new FT_Autoloader();
|
includes/class-flash-install.php
CHANGED
@@ -113,7 +113,7 @@ class FT_Install {
|
|
113 |
self::update_ft_version();
|
114 |
|
115 |
// Flush rules after install
|
116 |
-
|
117 |
|
118 |
/*
|
119 |
* Deletes all expired transients. The multi-table delete syntax is used
|
113 |
self::update_ft_version();
|
114 |
|
115 |
// Flush rules after install
|
116 |
+
do_action( 'flash_toolkit_flush_rewrite_rules' );
|
117 |
|
118 |
/*
|
119 |
* Deletes all expired transients. The multi-table delete syntax is used
|
includes/class-flash-post-types.php
CHANGED
@@ -28,6 +28,7 @@ class FT_Post_Types {
|
|
28 |
add_action( 'init', array( __CLASS__, 'register_post_types' ), 5 );
|
29 |
add_action( 'init', array( __CLASS__, 'support_jetpack_omnisearch' ) );
|
30 |
add_filter( 'rest_api_allowed_post_types', array( __CLASS__, 'rest_api_allowed_post_types' ) );
|
|
|
31 |
}
|
32 |
|
33 |
/**
|
@@ -196,6 +197,13 @@ class FT_Post_Types {
|
|
196 |
|
197 |
return $post_types;
|
198 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
}
|
200 |
|
201 |
FT_Post_Types::init();
|
28 |
add_action( 'init', array( __CLASS__, 'register_post_types' ), 5 );
|
29 |
add_action( 'init', array( __CLASS__, 'support_jetpack_omnisearch' ) );
|
30 |
add_filter( 'rest_api_allowed_post_types', array( __CLASS__, 'rest_api_allowed_post_types' ) );
|
31 |
+
add_action( 'flash_toolkit_flush_rewrite_rules', array( __CLASS__, 'flush_rewrite_rules' ) );
|
32 |
}
|
33 |
|
34 |
/**
|
197 |
|
198 |
return $post_types;
|
199 |
}
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Flush rewrite rules.
|
203 |
+
*/
|
204 |
+
public static function flush_rewrite_rules() {
|
205 |
+
flush_rewrite_rules();
|
206 |
+
}
|
207 |
}
|
208 |
|
209 |
FT_Post_Types::init();
|
includes/class-flash-sidebars.php
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Flash Sidebars
|
4 |
+
*
|
5 |
+
* Handles the building of the Sidebars on the fly.
|
6 |
+
*
|
7 |
+
* @class FT_Sidebars
|
8 |
+
* @version 1.0.0
|
9 |
+
* @package FlashToolkit/Classes
|
10 |
+
* @category Class
|
11 |
+
* @author ThemeGrill
|
12 |
+
*/
|
13 |
+
|
14 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
15 |
+
exit;
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* FT_Sidebars Class
|
20 |
+
*/
|
21 |
+
class FT_Sidebars {
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Hook in tabs.
|
25 |
+
*/
|
26 |
+
public function __construct() {
|
27 |
+
add_action( 'widgets_admin_page', array( $this, 'output_sidebar_tmpl' ) );
|
28 |
+
add_action( 'load-widgets.php', array( $this, 'add_custom_sidebars' ), 100 );
|
29 |
+
add_action( 'widgets_init', array( $this, 'register_custom_sidebars' ), 1000 );
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Add a sidebar.
|
34 |
+
* @param string $name
|
35 |
+
*/
|
36 |
+
public static function add_sidebar( $name ) {
|
37 |
+
$sidebars = array_unique( array_merge( get_option( 'flash_toolkit_custom_sidebars', array() ), array( $name ) ) );
|
38 |
+
update_option( 'flash_toolkit_custom_sidebars', $sidebars );
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Remove a sidebar.
|
43 |
+
* @param string $name
|
44 |
+
*/
|
45 |
+
public static function remove_sidebar( $name ) {
|
46 |
+
$sidebars = array_diff( get_option( 'flash_toolkit_custom_sidebars', array() ), array( $name ) );
|
47 |
+
update_option( 'flash_toolkit_custom_sidebars', $sidebars );
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Remove all sidebars.
|
52 |
+
*/
|
53 |
+
public static function remove_all_sidebars() {
|
54 |
+
delete_option( 'flash_toolkit_custom_sidebars' );
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Validate sidebar name to prevent collisions.
|
59 |
+
* @param string $sidebar_name Raw sidebar name.
|
60 |
+
* @return string $sidebar_name Valid sidebar name.
|
61 |
+
*/
|
62 |
+
public static function validate_sidebar_name( $sidebar_name ) {
|
63 |
+
global $wp_registered_sidebars;
|
64 |
+
|
65 |
+
// Get the existing sidebars.
|
66 |
+
$existing_sidebars = array();
|
67 |
+
foreach ( $wp_registered_sidebars as $sidebar ) {
|
68 |
+
$existing_sidebars[] = $sidebar['name'];
|
69 |
+
}
|
70 |
+
|
71 |
+
// Rename if sidebar exists.
|
72 |
+
if ( in_array( $sidebar_name, $existing_sidebars ) ) {
|
73 |
+
$count = substr( $sidebar_name, -1 );
|
74 |
+
$rename = is_numeric( $count ) ? ( substr( $sidebar_name, 0, -1 ) . ( (int) $count + 1 ) ) : ( $sidebar_name . ' - 1' );
|
75 |
+
$sidebar_name = self::validate_sidebar_name( $rename );
|
76 |
+
}
|
77 |
+
|
78 |
+
return $sidebar_name;
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Output Sidebar Templates.
|
83 |
+
*/
|
84 |
+
public function output_sidebar_tmpl() {
|
85 |
+
include_once( 'admin/views/html-admin-tmpl-sidebars.php' );
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Add a sidebar if the POST variable is set.
|
90 |
+
*/
|
91 |
+
public function add_custom_sidebars() {
|
92 |
+
if ( ! empty( $_POST['flash-toolkit-add-sidebar'] ) && isset( $_POST['_flash_toolkit_sidebar_nonce'] ) ) {
|
93 |
+
if ( ! wp_verify_nonce( $_POST['_flash_toolkit_sidebar_nonce'], 'flash_toolkit_add_sidebar' ) ) {
|
94 |
+
wp_die( __( 'Action failed. Please refresh the page and retry.', 'flash-toolkit' ) );
|
95 |
+
}
|
96 |
+
|
97 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
98 |
+
wp_die( __( 'Cheatin’ huh?', 'flash-toolkit' ) );
|
99 |
+
}
|
100 |
+
|
101 |
+
$sidebar_name = flash_clean( $_POST['flash-toolkit-add-sidebar'] );
|
102 |
+
self::add_sidebar( self::validate_sidebar_name( $sidebar_name ) );
|
103 |
+
wp_redirect( admin_url( 'widgets.php' ) );
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Register Custom Widgets Area (Sidebars).
|
109 |
+
*/
|
110 |
+
public function register_custom_sidebars() {
|
111 |
+
$args = apply_filters( 'flash_toolkit_custom_widget_args', array(
|
112 |
+
'before_widget' => '<aside id="%1$s" class="widget clearfix %2$s">',
|
113 |
+
'after_widget' => '<span class="seperator extralight-border"></span></aside>',
|
114 |
+
'before_title' => '<h3 class="widget-title">',
|
115 |
+
'after_title' => '</h3>'
|
116 |
+
) );
|
117 |
+
|
118 |
+
$sidebars = get_option( 'flash_toolkit_custom_sidebars', array() );
|
119 |
+
|
120 |
+
foreach ( (array) $sidebars as $id => $name ) {
|
121 |
+
$args['name'] = $name;
|
122 |
+
$args['id'] = 'flash-toolkit-sidebar-' . ++$id;
|
123 |
+
$args['class'] = 'flash-toolkit-custom-widgets-area';
|
124 |
+
$args['description'] = sprintf( __( 'Custom Widget Area of the site - %s ', 'flash-toolkit' ), $name );
|
125 |
+
register_sidebar( $args );
|
126 |
+
}
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
new FT_Sidebars();
|
includes/functions-flash-core.php
CHANGED
@@ -19,6 +19,166 @@ include( 'functions-flash-deprecated.php' );
|
|
19 |
include( 'functions-flash-formatting.php' );
|
20 |
include( 'functions-flash-portfolio.php' );
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
/**
|
23 |
* Get fontawesome icon lists.
|
24 |
* @return array
|
@@ -743,75 +903,3 @@ function flash_get_fontawesome_icons() {
|
|
743 |
'fa-youtube-square' => __( 'Youtube Square', 'flash-toolkit' ),
|
744 |
) );
|
745 |
}
|
746 |
-
|
747 |
-
/**
|
748 |
-
* Get and include template files.
|
749 |
-
*
|
750 |
-
* @param string $template_name
|
751 |
-
* @param array $args (default: array())
|
752 |
-
* @param string $template_path (default: '')
|
753 |
-
* @param string $default_path (default: '')
|
754 |
-
*/
|
755 |
-
function flash_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) {
|
756 |
-
if ( ! empty( $args ) && is_array( $args ) ) {
|
757 |
-
extract( $args );
|
758 |
-
}
|
759 |
-
|
760 |
-
$located = flash_locate_template( $template_name, $template_path, $default_path );
|
761 |
-
|
762 |
-
if ( ! file_exists( $located ) ) {
|
763 |
-
_doing_it_wrong( __FUNCTION__, sprintf( '<code>%s</code> does not exist.', $located ), '1.0' );
|
764 |
-
return;
|
765 |
-
}
|
766 |
-
|
767 |
-
// Allow 3rd party plugin filter template file from their plugin.
|
768 |
-
$located = apply_filters( 'flash_get_template', $located, $template_name, $args, $template_path, $default_path );
|
769 |
-
|
770 |
-
do_action( 'flash_toolkit_before_template_part', $template_name, $template_path, $located, $args );
|
771 |
-
|
772 |
-
include( $located );
|
773 |
-
|
774 |
-
do_action( 'flash_toolkit_after_template_part', $template_name, $template_path, $located, $args );
|
775 |
-
}
|
776 |
-
|
777 |
-
/**
|
778 |
-
* Locate a template and return the path for inclusion.
|
779 |
-
*
|
780 |
-
* Note: FT_TEMPLATE_DEBUG_MODE will prevent overrides in themes from taking priority.
|
781 |
-
*
|
782 |
-
* This is the load order:
|
783 |
-
*
|
784 |
-
* yourtheme / $template_path / $template_name
|
785 |
-
* yourtheme / $template_name
|
786 |
-
* $default_path / $template_name
|
787 |
-
*
|
788 |
-
* @param string $template_name
|
789 |
-
* @param string $template_path (default: '')
|
790 |
-
* @param string $default_path (default: '')
|
791 |
-
* @return string
|
792 |
-
*/
|
793 |
-
function flash_locate_template( $template_name, $template_path = '', $default_path = '' ) {
|
794 |
-
if ( ! $template_path ) {
|
795 |
-
$template_path = FT()->template_path();
|
796 |
-
}
|
797 |
-
|
798 |
-
if ( ! $default_path ) {
|
799 |
-
$default_path = FT()->plugin_path() . '/templates/';
|
800 |
-
}
|
801 |
-
|
802 |
-
// Look within passed path within the theme - this is priority.
|
803 |
-
$template = locate_template(
|
804 |
-
array(
|
805 |
-
trailingslashit( $template_path ) . $template_name,
|
806 |
-
$template_name,
|
807 |
-
)
|
808 |
-
);
|
809 |
-
|
810 |
-
// Get default template/
|
811 |
-
if ( ! $template || FT_TEMPLATE_DEBUG_MODE ) {
|
812 |
-
$template = $default_path . $template_name;
|
813 |
-
}
|
814 |
-
|
815 |
-
// Return what we found.
|
816 |
-
return apply_filters( 'flash_toolkit_locate_template', $template, $template_name, $template_path );
|
817 |
-
}
|
19 |
include( 'functions-flash-formatting.php' );
|
20 |
include( 'functions-flash-portfolio.php' );
|
21 |
|
22 |
+
/**
|
23 |
+
* is_flash_pro_active - Check if Flash Pro is active.
|
24 |
+
* @return bool
|
25 |
+
*/
|
26 |
+
function is_flash_pro_active() {
|
27 |
+
return false !== strpos( get_option( 'template' ), 'flash-pro' );
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Queue some JavaScript code to be output in the footer.
|
32 |
+
* @param string $code
|
33 |
+
*/
|
34 |
+
function flash_toolkit_enqueue_js( $code ) {
|
35 |
+
global $flash_toolkit_queued_js;
|
36 |
+
|
37 |
+
if ( empty( $flash_toolkit_queued_js ) ) {
|
38 |
+
$flash_toolkit_queued_js = '';
|
39 |
+
}
|
40 |
+
|
41 |
+
$flash_toolkit_queued_js .= "\n" . $code . "\n";
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Output any queued javascript code in the footer.
|
46 |
+
*/
|
47 |
+
function flash_toolkit_print_js() {
|
48 |
+
global $flash_toolkit_queued_js;
|
49 |
+
|
50 |
+
if ( ! empty( $flash_toolkit_queued_js ) ) {
|
51 |
+
// Sanitize.
|
52 |
+
$flash_toolkit_queued_js = wp_check_invalid_utf8( $flash_toolkit_queued_js );
|
53 |
+
$flash_toolkit_queued_js = preg_replace( '/&#(x)?0*(?(1)27|39);?/i', "'", $flash_toolkit_queued_js );
|
54 |
+
$flash_toolkit_queued_js = str_replace( "\r", '', $flash_toolkit_queued_js );
|
55 |
+
|
56 |
+
$js = "<!-- Flash Toolkit JavaScript -->\n<script type=\"text/javascript\">\njQuery(function($) { $flash_toolkit_queued_js });\n</script>\n";
|
57 |
+
|
58 |
+
/**
|
59 |
+
* social_icons_queued_js filter.
|
60 |
+
* @param string $js JavaScript code.
|
61 |
+
*/
|
62 |
+
echo apply_filters( 'flash_toolkit_queued_js', $js );
|
63 |
+
|
64 |
+
unset( $flash_toolkit_queued_js );
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Display a FlashToolkit help tip.
|
70 |
+
*
|
71 |
+
* @param string $tip Help tip text
|
72 |
+
* @param bool $allow_html Allow sanitized HTML if true or escape
|
73 |
+
* @return string
|
74 |
+
*/
|
75 |
+
function flash_toolkit_help_tip( $tip, $allow_html = false ) {
|
76 |
+
if ( $allow_html ) {
|
77 |
+
$tip = flash_toolkit_sanitize_tooltip( $tip );
|
78 |
+
} else {
|
79 |
+
$tip = esc_attr( $tip );
|
80 |
+
}
|
81 |
+
|
82 |
+
return '<span class="flash-toolkit-help-tip" data-tip="' . $tip . '"></span>';
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Get all available sidebars.
|
87 |
+
* @param array $sidebars
|
88 |
+
* @return array
|
89 |
+
*/
|
90 |
+
function flash_toolkit_get_sidebars( $sidebars = array() ) {
|
91 |
+
global $wp_registered_sidebars;
|
92 |
+
|
93 |
+
foreach ( $wp_registered_sidebars as $sidebar ) {
|
94 |
+
if ( ! in_array( $sidebar['name'], apply_filters( 'flash_toolkit_sidebars_exclude', array( 'Display Everywhere' ) ) ) ) {
|
95 |
+
$sidebars[ $sidebar['id'] ] = $sidebar['name'];
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
+
return $sidebars;
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* FlashToolkit Layout Supported Screens or Post types.
|
104 |
+
* @return array
|
105 |
+
*/
|
106 |
+
function flash_toolkit_get_layout_supported_screens() {
|
107 |
+
return (array) apply_filters( 'flash_toolkit_layout_supported_screens', array( 'post', 'page', 'portfolio', 'jetpack-portfolio' ) );
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Get and include template files.
|
112 |
+
*
|
113 |
+
* @param string $template_name
|
114 |
+
* @param array $args (default: array())
|
115 |
+
* @param string $template_path (default: '')
|
116 |
+
* @param string $default_path (default: '')
|
117 |
+
*/
|
118 |
+
function flash_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) {
|
119 |
+
if ( ! empty( $args ) && is_array( $args ) ) {
|
120 |
+
extract( $args );
|
121 |
+
}
|
122 |
+
|
123 |
+
$located = flash_locate_template( $template_name, $template_path, $default_path );
|
124 |
+
|
125 |
+
if ( ! file_exists( $located ) ) {
|
126 |
+
_doing_it_wrong( __FUNCTION__, sprintf( '<code>%s</code> does not exist.', $located ), '1.0' );
|
127 |
+
return;
|
128 |
+
}
|
129 |
+
|
130 |
+
// Allow 3rd party plugin filter template file from their plugin.
|
131 |
+
$located = apply_filters( 'flash_get_template', $located, $template_name, $args, $template_path, $default_path );
|
132 |
+
|
133 |
+
do_action( 'flash_toolkit_before_template_part', $template_name, $template_path, $located, $args );
|
134 |
+
|
135 |
+
include( $located );
|
136 |
+
|
137 |
+
do_action( 'flash_toolkit_after_template_part', $template_name, $template_path, $located, $args );
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Locate a template and return the path for inclusion.
|
142 |
+
*
|
143 |
+
* Note: FT_TEMPLATE_DEBUG_MODE will prevent overrides in themes from taking priority.
|
144 |
+
*
|
145 |
+
* This is the load order:
|
146 |
+
*
|
147 |
+
* yourtheme / $template_path / $template_name
|
148 |
+
* yourtheme / $template_name
|
149 |
+
* $default_path / $template_name
|
150 |
+
*
|
151 |
+
* @param string $template_name
|
152 |
+
* @param string $template_path (default: '')
|
153 |
+
* @param string $default_path (default: '')
|
154 |
+
* @return string
|
155 |
+
*/
|
156 |
+
function flash_locate_template( $template_name, $template_path = '', $default_path = '' ) {
|
157 |
+
if ( ! $template_path ) {
|
158 |
+
$template_path = FT()->template_path();
|
159 |
+
}
|
160 |
+
|
161 |
+
if ( ! $default_path ) {
|
162 |
+
$default_path = FT()->plugin_path() . '/templates/';
|
163 |
+
}
|
164 |
+
|
165 |
+
// Look within passed path within the theme - this is priority.
|
166 |
+
$template = locate_template(
|
167 |
+
array(
|
168 |
+
trailingslashit( $template_path ) . $template_name,
|
169 |
+
$template_name,
|
170 |
+
)
|
171 |
+
);
|
172 |
+
|
173 |
+
// Get default template/
|
174 |
+
if ( ! $template || FT_TEMPLATE_DEBUG_MODE ) {
|
175 |
+
$template = $default_path . $template_name;
|
176 |
+
}
|
177 |
+
|
178 |
+
// Return what we found.
|
179 |
+
return apply_filters( 'flash_toolkit_locate_template', $template, $template_name, $template_path );
|
180 |
+
}
|
181 |
+
|
182 |
/**
|
183 |
* Get fontawesome icon lists.
|
184 |
* @return array
|
903 |
'fa-youtube-square' => __( 'Youtube Square', 'flash-toolkit' ),
|
904 |
) );
|
905 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/functions-flash-formatting.php
CHANGED
@@ -23,6 +23,27 @@ function flash_clean( $var ) {
|
|
23 |
return is_array( $var ) ? array_map( 'flash_clean', $var ) : sanitize_text_field( $var );
|
24 |
}
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
/**
|
27 |
* Sanitize permalink values before insertion into DB.
|
28 |
*
|
23 |
return is_array( $var ) ? array_map( 'flash_clean', $var ) : sanitize_text_field( $var );
|
24 |
}
|
25 |
|
26 |
+
/**
|
27 |
+
* Sanitize a string destined to be a tooltip.
|
28 |
+
*
|
29 |
+
* @since 1.1.0 Tooltips are encoded with htmlspecialchars to prevent XSS. Should not be used in conjunction with esc_attr()
|
30 |
+
* @param string $var
|
31 |
+
* @return string
|
32 |
+
*/
|
33 |
+
function flash_toolkit_sanitize_tooltip( $var ) {
|
34 |
+
return htmlspecialchars( wp_kses( html_entity_decode( $var ), array(
|
35 |
+
'br' => array(),
|
36 |
+
'em' => array(),
|
37 |
+
'strong' => array(),
|
38 |
+
'small' => array(),
|
39 |
+
'span' => array(),
|
40 |
+
'ul' => array(),
|
41 |
+
'li' => array(),
|
42 |
+
'ol' => array(),
|
43 |
+
'p' => array(),
|
44 |
+
) ) );
|
45 |
+
}
|
46 |
+
|
47 |
/**
|
48 |
* Sanitize permalink values before insertion into DB.
|
49 |
*
|
includes/widgets/class-flash-widget-about.php
CHANGED
@@ -29,7 +29,7 @@ class FT_Widget_About extends FT_Widget {
|
|
29 |
$this->widget_id = 'themegrill_flash_about';
|
30 |
$this->widget_name = __( 'FT: About', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
-
$this->settings = array(
|
33 |
'about-title' => array(
|
34 |
'type' => 'text',
|
35 |
'std' => '',
|
@@ -52,10 +52,11 @@ class FT_Widget_About extends FT_Widget {
|
|
52 |
),
|
53 |
'image' => array(
|
54 |
'type' => 'image',
|
|
|
55 |
'std' => '',
|
56 |
'label' => __( 'Image', 'flash-toolkit' )
|
57 |
),
|
58 |
-
);
|
59 |
|
60 |
parent::__construct();
|
61 |
}
|
@@ -69,16 +70,10 @@ class FT_Widget_About extends FT_Widget {
|
|
69 |
* @param array $instance
|
70 |
*/
|
71 |
public function widget( $args, $instance ) {
|
72 |
-
$title = isset( $instance[ 'about-title' ] ) ? $instance[ 'about-title' ] : '';
|
73 |
-
$text = isset( $instance[ 'text' ] ) ? $instance[ 'text' ] : '';
|
74 |
-
$more_text = isset( $instance[ 'more_text' ] ) ? $instance[ 'more_text' ] : '';
|
75 |
-
$more_url = isset( $instance[ 'more_url' ] ) ? $instance[ 'more_url' ] : '';
|
76 |
-
$image = isset( $instance[ 'image' ] ) ? $instance[ 'image' ] : '';
|
77 |
-
|
78 |
|
79 |
$this->widget_start( $args, $instance );
|
80 |
|
81 |
-
flash_get_template( 'content-widget-about.php', array( '
|
82 |
|
83 |
$this->widget_end( $args );
|
84 |
}
|
29 |
$this->widget_id = 'themegrill_flash_about';
|
30 |
$this->widget_name = __( 'FT: About', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
+
$this->settings = apply_filters( 'flash_toolkit_widget_settings_' . $this->widget_id, array(
|
33 |
'about-title' => array(
|
34 |
'type' => 'text',
|
35 |
'std' => '',
|
52 |
),
|
53 |
'image' => array(
|
54 |
'type' => 'image',
|
55 |
+
'class' => 'show_if_image',
|
56 |
'std' => '',
|
57 |
'label' => __( 'Image', 'flash-toolkit' )
|
58 |
),
|
59 |
+
) );
|
60 |
|
61 |
parent::__construct();
|
62 |
}
|
70 |
* @param array $instance
|
71 |
*/
|
72 |
public function widget( $args, $instance ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
$this->widget_start( $args, $instance );
|
75 |
|
76 |
+
flash_get_template( 'content-widget-about.php', array( 'args' => $args, 'instance' => $instance ) );
|
77 |
|
78 |
$this->widget_end( $args );
|
79 |
}
|
includes/widgets/class-flash-widget-blog.php
CHANGED
@@ -29,7 +29,7 @@ class FT_Widget_Blog extends FT_Widget {
|
|
29 |
$this->widget_id = 'themegrill_flash_blog';
|
30 |
$this->widget_name = __( 'FT: Blog', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
-
$this->settings = array(
|
33 |
'number' => array(
|
34 |
'type' => 'number',
|
35 |
'step' => 1,
|
@@ -66,7 +66,7 @@ class FT_Widget_Blog extends FT_Widget {
|
|
66 |
'tg-blog-widget-layout-2' => __( 'Style 2', 'flash-toolkit' ),
|
67 |
)
|
68 |
),
|
69 |
-
);
|
70 |
|
71 |
parent::__construct();
|
72 |
}
|
@@ -80,15 +80,10 @@ class FT_Widget_Blog extends FT_Widget {
|
|
80 |
* @param array $instance
|
81 |
*/
|
82 |
public function widget( $args, $instance ) {
|
83 |
-
$number = isset( $instance[ 'number' ] ) ? $instance[ 'number' ] : '';
|
84 |
-
$source = isset( $instance[ 'source' ] ) ? $instance[ 'source' ] : '';
|
85 |
-
$category = isset( $instance[ 'category' ] ) ? $instance[ 'category' ] : '';
|
86 |
-
$style = isset( $instance[ 'style' ] ) ? $instance[ 'style' ] : '';
|
87 |
-
|
88 |
|
89 |
$this->widget_start( $args, $instance );
|
90 |
|
91 |
-
flash_get_template( 'content-widget-blog.php', array( '
|
92 |
|
93 |
$this->widget_end( $args );
|
94 |
}
|
29 |
$this->widget_id = 'themegrill_flash_blog';
|
30 |
$this->widget_name = __( 'FT: Blog', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
+
$this->settings = apply_filters( 'flash_toolkit_widget_settings_' . $this->widget_id, array(
|
33 |
'number' => array(
|
34 |
'type' => 'number',
|
35 |
'step' => 1,
|
66 |
'tg-blog-widget-layout-2' => __( 'Style 2', 'flash-toolkit' ),
|
67 |
)
|
68 |
),
|
69 |
+
) );
|
70 |
|
71 |
parent::__construct();
|
72 |
}
|
80 |
* @param array $instance
|
81 |
*/
|
82 |
public function widget( $args, $instance ) {
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
$this->widget_start( $args, $instance );
|
85 |
|
86 |
+
flash_get_template( 'content-widget-blog.php', array( 'instance' => $instance ) );
|
87 |
|
88 |
$this->widget_end( $args );
|
89 |
}
|
includes/widgets/class-flash-widget-counter.php
CHANGED
@@ -29,7 +29,7 @@ class FT_Widget_Counter extends FT_Widget {
|
|
29 |
$this->widget_id = 'themegrill_flash_counter';
|
30 |
$this->widget_name = __( 'FT: Animated Number Counter', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
-
$this->settings = array(
|
33 |
'counter-title' => array(
|
34 |
'type' => 'text',
|
35 |
'std' => '',
|
@@ -58,7 +58,7 @@ class FT_Widget_Counter extends FT_Widget {
|
|
58 |
'tg-fun-facts-layout-2' => __( 'Style 2', 'flash-toolkit' ),
|
59 |
)
|
60 |
),
|
61 |
-
);
|
62 |
|
63 |
parent::__construct();
|
64 |
|
@@ -85,14 +85,10 @@ class FT_Widget_Counter extends FT_Widget {
|
|
85 |
* @param array $instance
|
86 |
*/
|
87 |
public function widget( $args, $instance ) {
|
88 |
-
$text = isset( $instance[ 'counter-title' ] ) ? $instance[ 'counter-title' ] : '';
|
89 |
-
$icon = isset( $instance[ 'icon' ] ) ? $instance[ 'icon' ] : '';
|
90 |
-
$number = isset( $instance[ 'number' ] ) ? $instance[ 'number' ] : '';
|
91 |
-
$style = isset( $instance[ 'style' ] ) ? $instance[ 'style' ] : '';
|
92 |
|
93 |
$this->widget_start( $args, $instance );
|
94 |
|
95 |
-
flash_get_template( 'content-widget-counter.php', array( '
|
96 |
|
97 |
$this->widget_end( $args );
|
98 |
}
|
29 |
$this->widget_id = 'themegrill_flash_counter';
|
30 |
$this->widget_name = __( 'FT: Animated Number Counter', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
+
$this->settings = apply_filters( 'flash_toolkit_widget_settings_' . $this->widget_id, array(
|
33 |
'counter-title' => array(
|
34 |
'type' => 'text',
|
35 |
'std' => '',
|
58 |
'tg-fun-facts-layout-2' => __( 'Style 2', 'flash-toolkit' ),
|
59 |
)
|
60 |
),
|
61 |
+
) );
|
62 |
|
63 |
parent::__construct();
|
64 |
|
85 |
* @param array $instance
|
86 |
*/
|
87 |
public function widget( $args, $instance ) {
|
|
|
|
|
|
|
|
|
88 |
|
89 |
$this->widget_start( $args, $instance );
|
90 |
|
91 |
+
flash_get_template( 'content-widget-counter.php', array( 'args' => $args, 'instance' => $instance ) );
|
92 |
|
93 |
$this->widget_end( $args );
|
94 |
}
|
includes/widgets/class-flash-widget-cta.php
CHANGED
@@ -29,7 +29,7 @@ class FT_Widget_CTA extends FT_Widget {
|
|
29 |
$this->widget_id = 'themegrill_flash_cta';
|
30 |
$this->widget_name = __( 'FT: CTA', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
-
$this->settings = array(
|
33 |
'cta-title' => array(
|
34 |
'type' => 'text',
|
35 |
'std' => '',
|
@@ -69,7 +69,7 @@ class FT_Widget_CTA extends FT_Widget {
|
|
69 |
'call-to-action-section-layout-2' => __( 'Style 2', 'flash-toolkit' ),
|
70 |
)
|
71 |
)
|
72 |
-
);
|
73 |
|
74 |
parent::__construct();
|
75 |
}
|
@@ -83,17 +83,10 @@ class FT_Widget_CTA extends FT_Widget {
|
|
83 |
* @param array $instance
|
84 |
*/
|
85 |
public function widget( $args, $instance ) {
|
86 |
-
$title = isset( $instance[ 'cta-title' ] ) ? $instance[ 'cta-title' ] : '';
|
87 |
-
$subtitle = isset( $instance[ 'cta-subtitle' ] ) ? $instance[ 'cta-subtitle' ] : '';
|
88 |
-
$btn1 = isset( $instance[ 'cta-btn1' ] ) ? $instance[ 'cta-btn1' ] : '';
|
89 |
-
$btn1_link = isset( $instance[ 'cta-btn1-link' ] ) ? $instance[ 'cta-btn1-link' ] : '';
|
90 |
-
$btn2 = isset( $instance[ 'cta-btn2' ] ) ? $instance[ 'cta-btn2' ] : '';
|
91 |
-
$btn2_link = isset( $instance[ 'cta-btn2-link' ] ) ? $instance[ 'cta-btn2-link' ] : '';
|
92 |
-
$style = isset( $instance[ 'style' ] ) ? $instance[ 'style' ] : 'tg-cta-layout-1';
|
93 |
|
94 |
$this->widget_start( $args, $instance );
|
95 |
|
96 |
-
flash_get_template( 'content-widget-cta.php', array( '
|
97 |
|
98 |
$this->widget_end( $args );
|
99 |
}
|
29 |
$this->widget_id = 'themegrill_flash_cta';
|
30 |
$this->widget_name = __( 'FT: CTA', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
+
$this->settings = apply_filters( 'flash_toolkit_widget_settings_' . $this->widget_id, array(
|
33 |
'cta-title' => array(
|
34 |
'type' => 'text',
|
35 |
'std' => '',
|
69 |
'call-to-action-section-layout-2' => __( 'Style 2', 'flash-toolkit' ),
|
70 |
)
|
71 |
)
|
72 |
+
) );
|
73 |
|
74 |
parent::__construct();
|
75 |
}
|
83 |
* @param array $instance
|
84 |
*/
|
85 |
public function widget( $args, $instance ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
$this->widget_start( $args, $instance );
|
88 |
|
89 |
+
flash_get_template( 'content-widget-cta.php', array( 'args' => $args, 'instance' => $instance ) );
|
90 |
|
91 |
$this->widget_end( $args );
|
92 |
}
|
includes/widgets/class-flash-widget-heading.php
CHANGED
@@ -29,7 +29,7 @@ class FT_Widget_Heading extends FT_Widget {
|
|
29 |
$this->widget_id = 'themegrill_flash_heading';
|
30 |
$this->widget_name = __( 'FT: Heading', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
-
$this->settings = array(
|
33 |
'heading-title' => array(
|
34 |
'type' => 'text',
|
35 |
'std' => '',
|
@@ -40,7 +40,7 @@ class FT_Widget_Heading extends FT_Widget {
|
|
40 |
'std' => '',
|
41 |
'label' => __( 'Sub Heading', 'flash-toolkit' )
|
42 |
),
|
43 |
-
);
|
44 |
|
45 |
parent::__construct();
|
46 |
}
|
@@ -54,12 +54,10 @@ class FT_Widget_Heading extends FT_Widget {
|
|
54 |
* @param array $instance
|
55 |
*/
|
56 |
public function widget( $args, $instance ) {
|
57 |
-
$heading = isset( $instance[ 'heading-title' ] ) ? $instance[ 'heading-title' ] : '';
|
58 |
-
$subheading = isset( $instance[ 'subheading' ] ) ? $instance[ 'subheading' ] : '';
|
59 |
|
60 |
$this->widget_start( $args, $instance );
|
61 |
|
62 |
-
flash_get_template( 'content-widget-heading.php', array( '
|
63 |
|
64 |
$this->widget_end( $args );
|
65 |
}
|
29 |
$this->widget_id = 'themegrill_flash_heading';
|
30 |
$this->widget_name = __( 'FT: Heading', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
+
$this->settings = apply_filters( 'flash_toolkit_widget_settings_' . $this->widget_id, array(
|
33 |
'heading-title' => array(
|
34 |
'type' => 'text',
|
35 |
'std' => '',
|
40 |
'std' => '',
|
41 |
'label' => __( 'Sub Heading', 'flash-toolkit' )
|
42 |
),
|
43 |
+
) );
|
44 |
|
45 |
parent::__construct();
|
46 |
}
|
54 |
* @param array $instance
|
55 |
*/
|
56 |
public function widget( $args, $instance ) {
|
|
|
|
|
57 |
|
58 |
$this->widget_start( $args, $instance );
|
59 |
|
60 |
+
flash_get_template( 'content-widget-heading.php', array( 'args' => $args, 'instance' => $instance ) );
|
61 |
|
62 |
$this->widget_end( $args );
|
63 |
}
|
includes/widgets/class-flash-widget-image.php
CHANGED
@@ -29,7 +29,7 @@ class FT_Widget_Image extends FT_Widget {
|
|
29 |
$this->widget_id = 'themegrill_flash_image';
|
30 |
$this->widget_name = __( 'FT: Image', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
-
$this->settings = array(
|
33 |
'image' => array(
|
34 |
'type' => 'image',
|
35 |
'std' => '',
|
@@ -40,7 +40,7 @@ class FT_Widget_Image extends FT_Widget {
|
|
40 |
'std' => '',
|
41 |
'label' => __( 'Image Link', 'flash-toolkit' )
|
42 |
),
|
43 |
-
);
|
44 |
|
45 |
parent::__construct();
|
46 |
}
|
@@ -54,12 +54,10 @@ class FT_Widget_Image extends FT_Widget {
|
|
54 |
* @param array $instance
|
55 |
*/
|
56 |
public function widget( $args, $instance ) {
|
57 |
-
$image = isset( $instance[ 'image' ] ) ? $instance[ 'image' ] : '';
|
58 |
-
$link = isset( $instance[ 'image_link' ] ) ? $instance[ 'image_link' ] : '';
|
59 |
|
60 |
$this->widget_start( $args, $instance );
|
61 |
|
62 |
-
flash_get_template( 'content-widget-image.php', array( '
|
63 |
|
64 |
$this->widget_end( $args );
|
65 |
}
|
29 |
$this->widget_id = 'themegrill_flash_image';
|
30 |
$this->widget_name = __( 'FT: Image', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
+
$this->settings = apply_filters( 'flash_toolkit_widget_settings_' . $this->widget_id, array(
|
33 |
'image' => array(
|
34 |
'type' => 'image',
|
35 |
'std' => '',
|
40 |
'std' => '',
|
41 |
'label' => __( 'Image Link', 'flash-toolkit' )
|
42 |
),
|
43 |
+
) );
|
44 |
|
45 |
parent::__construct();
|
46 |
}
|
54 |
* @param array $instance
|
55 |
*/
|
56 |
public function widget( $args, $instance ) {
|
|
|
|
|
57 |
|
58 |
$this->widget_start( $args, $instance );
|
59 |
|
60 |
+
flash_get_template( 'content-widget-image.php', array( 'args' => $args, 'instance' => $instance ) );
|
61 |
|
62 |
$this->widget_end( $args );
|
63 |
}
|
includes/widgets/class-flash-widget-logo.php
CHANGED
@@ -29,12 +29,7 @@ class FT_Widget_Logo extends FT_Widget {
|
|
29 |
$this->widget_id = 'themegrill_flash_logo';
|
30 |
$this->widget_name = __( 'FT: Logo', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
-
$this->settings = array(
|
33 |
-
'title' => array(
|
34 |
-
'type' => 'text',
|
35 |
-
'std' => '',
|
36 |
-
'label' => __( 'Title', 'flash-toolkit' ),
|
37 |
-
),
|
38 |
'repeatable_logo' => array(
|
39 |
'type' => 'repeater',
|
40 |
'label' => __( 'Sortable Logos', 'flash-toolkit' ),
|
@@ -63,7 +58,7 @@ class FT_Widget_Logo extends FT_Widget {
|
|
63 |
),
|
64 |
),
|
65 |
),
|
66 |
-
);
|
67 |
|
68 |
parent::__construct();
|
69 |
|
@@ -90,11 +85,10 @@ class FT_Widget_Logo extends FT_Widget {
|
|
90 |
* @param array $instance
|
91 |
*/
|
92 |
public function widget( $args, $instance ) {
|
93 |
-
$repeatable_logo = isset( $instance['repeatable_logo'] ) ? $instance['repeatable_logo'] : array();
|
94 |
|
95 |
$this->widget_start( $args, $instance );
|
96 |
|
97 |
-
flash_get_template( 'content-widget-logo.php', array( '
|
98 |
|
99 |
$this->widget_end( $args );
|
100 |
}
|
29 |
$this->widget_id = 'themegrill_flash_logo';
|
30 |
$this->widget_name = __( 'FT: Logo', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
+
$this->settings = apply_filters( 'flash_toolkit_widget_settings_' . $this->widget_id, array(
|
|
|
|
|
|
|
|
|
|
|
33 |
'repeatable_logo' => array(
|
34 |
'type' => 'repeater',
|
35 |
'label' => __( 'Sortable Logos', 'flash-toolkit' ),
|
58 |
),
|
59 |
),
|
60 |
),
|
61 |
+
) );
|
62 |
|
63 |
parent::__construct();
|
64 |
|
85 |
* @param array $instance
|
86 |
*/
|
87 |
public function widget( $args, $instance ) {
|
|
|
88 |
|
89 |
$this->widget_start( $args, $instance );
|
90 |
|
91 |
+
flash_get_template( 'content-widget-logo.php', array( 'args' => $args, 'instance' => $instance ) );
|
92 |
|
93 |
$this->widget_end( $args );
|
94 |
}
|
includes/widgets/class-flash-widget-portfolio.php
CHANGED
@@ -29,10 +29,11 @@ class FT_Widget_Portfolio extends FT_Widget {
|
|
29 |
$this->widget_id = 'themegrill_flash_portfolio';
|
30 |
$this->widget_name = __( 'FT: Portfolio', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
-
$this->settings = array(
|
33 |
'categories' => array(
|
34 |
'type' => 'select_categories',
|
35 |
'std' => '',
|
|
|
36 |
'label' => __( 'Select Project Category', 'flash-toolkit' ),
|
37 |
'args' => array(
|
38 |
'hide_empty' => 0,
|
@@ -52,6 +53,7 @@ class FT_Widget_Portfolio extends FT_Widget {
|
|
52 |
'filter' => array(
|
53 |
'type' => 'checkbox',
|
54 |
'std' => 0,
|
|
|
55 |
'label' => __( 'Show navigation filter.', 'flash-toolkit' ),
|
56 |
),
|
57 |
'style' => array(
|
@@ -73,7 +75,7 @@ class FT_Widget_Portfolio extends FT_Widget {
|
|
73 |
'tg-column-4' => __( '4 Column', 'flash-toolkit' ),
|
74 |
)
|
75 |
),
|
76 |
-
);
|
77 |
|
78 |
parent::__construct();
|
79 |
|
@@ -99,15 +101,10 @@ class FT_Widget_Portfolio extends FT_Widget {
|
|
99 |
* @param array $instance
|
100 |
*/
|
101 |
public function widget( $args, $instance ) {
|
102 |
-
$categories = isset( $instance[ 'categories' ] ) ? $instance[ 'categories' ] : '';
|
103 |
-
$number = isset( $instance[ 'number' ] ) ? $instance[ 'number' ] : '';
|
104 |
-
$filter = empty( $instance[ 'filter' ] ) ? 0 : 1;
|
105 |
-
$style = isset( $instance[ 'style' ] ) ? $instance[ 'style' ] : 'tg-feature-product-layout-1';
|
106 |
-
$column = isset( $instance[ 'column' ] ) ? $instance[ 'column' ] : 'tg-column-3';
|
107 |
|
108 |
$this->widget_start( $args, $instance );
|
109 |
|
110 |
-
flash_get_template( 'content-widget-portfolio.php', array( '
|
111 |
|
112 |
$this->widget_end( $args );
|
113 |
}
|
29 |
$this->widget_id = 'themegrill_flash_portfolio';
|
30 |
$this->widget_name = __( 'FT: Portfolio', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
+
$this->settings = apply_filters( 'flash_toolkit_widget_settings_' . $this->widget_id, array(
|
33 |
'categories' => array(
|
34 |
'type' => 'select_categories',
|
35 |
'std' => '',
|
36 |
+
'class' => 'filter_availability',
|
37 |
'label' => __( 'Select Project Category', 'flash-toolkit' ),
|
38 |
'args' => array(
|
39 |
'hide_empty' => 0,
|
53 |
'filter' => array(
|
54 |
'type' => 'checkbox',
|
55 |
'std' => 0,
|
56 |
+
'class' => 'show_if_all_category',
|
57 |
'label' => __( 'Show navigation filter.', 'flash-toolkit' ),
|
58 |
),
|
59 |
'style' => array(
|
75 |
'tg-column-4' => __( '4 Column', 'flash-toolkit' ),
|
76 |
)
|
77 |
),
|
78 |
+
) );
|
79 |
|
80 |
parent::__construct();
|
81 |
|
101 |
* @param array $instance
|
102 |
*/
|
103 |
public function widget( $args, $instance ) {
|
|
|
|
|
|
|
|
|
|
|
104 |
|
105 |
$this->widget_start( $args, $instance );
|
106 |
|
107 |
+
flash_get_template( 'content-widget-portfolio.php', array( 'instance' => $instance ) );
|
108 |
|
109 |
$this->widget_end( $args );
|
110 |
}
|
includes/widgets/class-flash-widget-service.php
CHANGED
@@ -29,7 +29,7 @@ class FT_Widget_Service extends FT_Widget {
|
|
29 |
$this->widget_id = 'themegrill_flash_service';
|
30 |
$this->widget_name = __( 'FT: Service', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
-
$this->settings = array(
|
33 |
'service-title' => array(
|
34 |
'type' => 'text',
|
35 |
'std' => '',
|
@@ -82,7 +82,7 @@ class FT_Widget_Service extends FT_Widget {
|
|
82 |
'tg-service-layout-2' => __( 'Style 2', 'flash-toolkit' ),
|
83 |
)
|
84 |
),
|
85 |
-
);
|
86 |
|
87 |
parent::__construct();
|
88 |
}
|
@@ -96,18 +96,10 @@ class FT_Widget_Service extends FT_Widget {
|
|
96 |
* @param array $instance
|
97 |
*/
|
98 |
public function widget( $args, $instance ) {
|
99 |
-
$title = isset( $instance[ 'service-title' ] ) ? $instance[ 'service-title' ] : '';
|
100 |
-
$icon_type = isset( $instance[ 'icon_type' ] ) ? $instance[ 'icon_type' ] : 'icon';
|
101 |
-
$icon = isset( $instance[ 'icon' ] ) ? $instance[ 'icon' ] : '';
|
102 |
-
$image = isset( $instance[ 'image' ] ) ? $instance[ 'image' ] : '';
|
103 |
-
$text = isset( $instance[ 'text' ] ) ? $instance[ 'text' ] : '';
|
104 |
-
$more_text = isset( $instance[ 'more_text' ] ) ? $instance[ 'more_text' ] : '';
|
105 |
-
$more_url = isset( $instance[ 'more_url' ] ) ? $instance[ 'more_url' ] : '';
|
106 |
-
$style = isset( $instance[ 'style' ] ) ? $instance[ 'style' ] : '';
|
107 |
|
108 |
$this->widget_start( $args, $instance );
|
109 |
|
110 |
-
flash_get_template( 'content-widget-service.php', array( '
|
111 |
|
112 |
$this->widget_end( $args );
|
113 |
}
|
29 |
$this->widget_id = 'themegrill_flash_service';
|
30 |
$this->widget_name = __( 'FT: Service', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
+
$this->settings = apply_filters( 'flash_toolkit_widget_settings_' . $this->widget_id, array(
|
33 |
'service-title' => array(
|
34 |
'type' => 'text',
|
35 |
'std' => '',
|
82 |
'tg-service-layout-2' => __( 'Style 2', 'flash-toolkit' ),
|
83 |
)
|
84 |
),
|
85 |
+
) );
|
86 |
|
87 |
parent::__construct();
|
88 |
}
|
96 |
* @param array $instance
|
97 |
*/
|
98 |
public function widget( $args, $instance ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
|
100 |
$this->widget_start( $args, $instance );
|
101 |
|
102 |
+
flash_get_template( 'content-widget-service.php', array( 'args' => $args, 'instance' => $instance ) );
|
103 |
|
104 |
$this->widget_end( $args );
|
105 |
}
|
includes/widgets/class-flash-widget-slider.php
CHANGED
@@ -29,7 +29,7 @@ class FT_Widget_Slider extends FT_Widget {
|
|
29 |
$this->widget_id = 'themegrill_flash_slider';
|
30 |
$this->widget_name = __( 'FT: Slider', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
-
$this->settings = array(
|
33 |
'repeatable_slider' => array(
|
34 |
'type' => 'repeater',
|
35 |
'label' => __( 'Sortable Sliders', 'flash-toolkit' ),
|
@@ -98,7 +98,12 @@ class FT_Widget_Slider extends FT_Widget {
|
|
98 |
'slider-control-bottom-right' => __( 'Bottom Right Align', 'flash-toolkit' ),
|
99 |
)
|
100 |
),
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
102 |
|
103 |
parent::__construct();
|
104 |
|
@@ -125,14 +130,10 @@ class FT_Widget_Slider extends FT_Widget {
|
|
125 |
* @param array $instance
|
126 |
*/
|
127 |
public function widget( $args, $instance ) {
|
128 |
-
$color = isset( $instance['color'] ) ? $instance['color'] : 'slider-dark';
|
129 |
-
$align = isset( $instance['align'] ) ? $instance['align'] : 'slider-content-center';
|
130 |
-
$controls = isset( $instance['controls'] ) ? $instance['controls'] : 'slider-control-center';
|
131 |
-
$repeatable_slider = isset( $instance['repeatable_slider'] ) ? $instance['repeatable_slider'] : array();
|
132 |
|
133 |
$this->widget_start( $args, $instance );
|
134 |
|
135 |
-
flash_get_template( 'content-widget-slider.php', array( '
|
136 |
|
137 |
$this->widget_end( $args );
|
138 |
}
|
29 |
$this->widget_id = 'themegrill_flash_slider';
|
30 |
$this->widget_name = __( 'FT: Slider', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
+
$this->settings = apply_filters( 'flash_toolkit_widget_settings_' . $this->widget_id, array(
|
33 |
'repeatable_slider' => array(
|
34 |
'type' => 'repeater',
|
35 |
'label' => __( 'Sortable Sliders', 'flash-toolkit' ),
|
98 |
'slider-control-bottom-right' => __( 'Bottom Right Align', 'flash-toolkit' ),
|
99 |
)
|
100 |
),
|
101 |
+
'full-screen' => array(
|
102 |
+
'type' => 'checkbox',
|
103 |
+
'std' => '',
|
104 |
+
'label' => __( 'Check to make slide full screen.', 'flash-toolkit' ),
|
105 |
+
),
|
106 |
+
) );
|
107 |
|
108 |
parent::__construct();
|
109 |
|
130 |
* @param array $instance
|
131 |
*/
|
132 |
public function widget( $args, $instance ) {
|
|
|
|
|
|
|
|
|
133 |
|
134 |
$this->widget_start( $args, $instance );
|
135 |
|
136 |
+
flash_get_template( 'content-widget-slider.php', array( 'args' => $args, 'instance' => $instance ) );
|
137 |
|
138 |
$this->widget_end( $args );
|
139 |
}
|
includes/widgets/class-flash-widget-team.php
CHANGED
@@ -29,7 +29,7 @@ class FT_Widget_Team extends FT_Widget {
|
|
29 |
$this->widget_id = 'themegrill_flash_team';
|
30 |
$this->widget_name = __( 'FT: Team', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
-
$this->settings = array(
|
33 |
'team-title' => array(
|
34 |
'type' => 'text',
|
35 |
'std' => '',
|
@@ -75,7 +75,7 @@ class FT_Widget_Team extends FT_Widget {
|
|
75 |
'tg-team-layout-3' => __( 'Style 3', 'flash-toolkit' )
|
76 |
)
|
77 |
),
|
78 |
-
);
|
79 |
|
80 |
parent::__construct();
|
81 |
}
|
@@ -89,18 +89,10 @@ class FT_Widget_Team extends FT_Widget {
|
|
89 |
* @param array $instance
|
90 |
*/
|
91 |
public function widget( $args, $instance ) {
|
92 |
-
$title = isset( $instance[ 'team-title' ] ) ? $instance[ 'team-title' ] : '';
|
93 |
-
$image = isset( $instance[ 'image' ] ) ? $instance[ 'image' ] : '';
|
94 |
-
$text = isset( $instance[ 'text' ] ) ? $instance[ 'text' ] : '';
|
95 |
-
$designation = isset( $instance[ 'designation' ] ) ? $instance[ 'designation' ] : '';
|
96 |
-
$facebook = isset( $instance[ 'facebook' ] ) ? $instance[ 'facebook' ] : '';
|
97 |
-
$twitter = isset( $instance[ 'twitter' ] ) ? $instance[ 'twitter' ] : '';
|
98 |
-
$linkedin = isset( $instance[ 'linkedin' ] ) ? $instance[ 'linkedin' ] : '';
|
99 |
-
$style = isset( $instance[ 'style' ] ) ? $instance[ 'style' ] : '';
|
100 |
|
101 |
$this->widget_start( $args, $instance );
|
102 |
|
103 |
-
flash_get_template( 'content-widget-team.php', array( '
|
104 |
|
105 |
$this->widget_end( $args );
|
106 |
}
|
29 |
$this->widget_id = 'themegrill_flash_team';
|
30 |
$this->widget_name = __( 'FT: Team', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
+
$this->settings = apply_filters( 'flash_toolkit_widget_settings_' . $this->widget_id, array(
|
33 |
'team-title' => array(
|
34 |
'type' => 'text',
|
35 |
'std' => '',
|
75 |
'tg-team-layout-3' => __( 'Style 3', 'flash-toolkit' )
|
76 |
)
|
77 |
),
|
78 |
+
) );
|
79 |
|
80 |
parent::__construct();
|
81 |
}
|
89 |
* @param array $instance
|
90 |
*/
|
91 |
public function widget( $args, $instance ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
$this->widget_start( $args, $instance );
|
94 |
|
95 |
+
flash_get_template( 'content-widget-team.php', array( 'args' => $args, 'instance' => $instance ) );
|
96 |
|
97 |
$this->widget_end( $args );
|
98 |
}
|
includes/widgets/class-flash-widget-testimonial.php
CHANGED
@@ -29,7 +29,7 @@ class FT_Widget_Testimonial extends FT_Widget {
|
|
29 |
$this->widget_id = 'themegrill_flash_testimonial';
|
30 |
$this->widget_name = __( 'FT: Testimonial', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
-
$this->settings = array(
|
33 |
'repeatable_testimonial' => array(
|
34 |
'type' => 'repeater',
|
35 |
'label' => __( 'Sortable Testimonials', 'flash-toolkit' ),
|
@@ -66,21 +66,7 @@ class FT_Widget_Testimonial extends FT_Widget {
|
|
66 |
),
|
67 |
),
|
68 |
),
|
69 |
-
|
70 |
-
'type' => 'checkbox',
|
71 |
-
'class' => 'availability',
|
72 |
-
'std' => 1,
|
73 |
-
'label' => __( 'Check to make the testimonial slider.', 'flash-toolkit' ),
|
74 |
-
),
|
75 |
-
'carousel_num' => array(
|
76 |
-
'type' => 'number',
|
77 |
-
'step' => 1,
|
78 |
-
'min' => 1,
|
79 |
-
'max' => 4,
|
80 |
-
'std' => 3,
|
81 |
-
'label' => __( 'Carousel Number', 'flash-toolkit' )
|
82 |
-
),
|
83 |
-
);
|
84 |
|
85 |
parent::__construct();
|
86 |
|
@@ -107,12 +93,10 @@ class FT_Widget_Testimonial extends FT_Widget {
|
|
107 |
* @param array $instance
|
108 |
*/
|
109 |
public function widget( $args, $instance ) {
|
110 |
-
$enable_slider = empty( $instance['enable_slider'] ) ? 0 : 1;
|
111 |
-
$repeatable_testimonial = isset( $instance['repeatable_testimonial'] ) ? $instance['repeatable_testimonial'] : array();
|
112 |
|
113 |
$this->widget_start( $args, $instance );
|
114 |
|
115 |
-
flash_get_template( 'content-widget-testimonial.php', array( '
|
116 |
|
117 |
$this->widget_end( $args );
|
118 |
}
|
29 |
$this->widget_id = 'themegrill_flash_testimonial';
|
30 |
$this->widget_name = __( 'FT: Testimonial', 'flash-toolkit' );
|
31 |
$this->control_ops = array( 'width' => 400, 'height' => 350 );
|
32 |
+
$this->settings = apply_filters( 'flash_toolkit_widget_settings_' . $this->widget_id, array(
|
33 |
'repeatable_testimonial' => array(
|
34 |
'type' => 'repeater',
|
35 |
'label' => __( 'Sortable Testimonials', 'flash-toolkit' ),
|
66 |
),
|
67 |
),
|
68 |
),
|
69 |
+
) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
parent::__construct();
|
72 |
|
93 |
* @param array $instance
|
94 |
*/
|
95 |
public function widget( $args, $instance ) {
|
|
|
|
|
96 |
|
97 |
$this->widget_start( $args, $instance );
|
98 |
|
99 |
+
flash_get_template( 'content-widget-testimonial.php', array( 'args' => $args, 'instance' => $instance ) );
|
100 |
|
101 |
$this->widget_end( $args );
|
102 |
}
|
phpcs.ruleset.xml
ADDED
@@ -0,0 +1,193 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<ruleset name="WordPress Coding Standards">
|
3 |
+
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
|
4 |
+
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml -->
|
5 |
+
|
6 |
+
<!-- Set a description for this ruleset. -->
|
7 |
+
<description>A custom set of code standard rules to check for WordPress themes and plugins.</description>
|
8 |
+
|
9 |
+
<!-- Include the WordPress ruleset, with exclusions. -->
|
10 |
+
<rule ref="WordPress">
|
11 |
+
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCATCH" />
|
12 |
+
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedIF" />
|
13 |
+
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedELSE" />
|
14 |
+
<exclude name="Generic.CodeAnalysis.ForLoopWithTestFunctionalCall.NotAllowed" />
|
15 |
+
<exclude name="Generic.Commenting.DocComment.LongNotCapital" />
|
16 |
+
<exclude name="Generic.Commenting.DocComment.MissingShort" />
|
17 |
+
<exclude name="Generic.Commenting.DocComment.ShortNotCapital" />
|
18 |
+
<exclude name="Generic.Commenting.DocComment.SpacingAfter" />
|
19 |
+
<exclude name="Generic.Commenting.DocComment.SpacingBeforeTags" />
|
20 |
+
<exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed" />
|
21 |
+
<!-- <exclude name="Generic.Files.EndFileNewline.NotFound" /> -->
|
22 |
+
<exclude name="Generic.Files.LineEndings.InvalidEOLChar" />
|
23 |
+
<exclude name="Generic.Files.LowercasedFilename.NotFound" />
|
24 |
+
<!-- <exclude name="Generic.Formatting.DisallowMultipleStatements.SameLine" /> -->
|
25 |
+
<!-- <exclude name="Generic.Formatting.SpaceAfterCast.NoSpace" /> -->
|
26 |
+
<exclude name="Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine" />
|
27 |
+
<exclude name="Generic.Functions.OpeningFunctionBraceKernighanRitchie.ContentAfterBrace" />
|
28 |
+
<exclude name="Generic.Functions.OpeningFunctionBraceKernighanRitchie.SpaceBeforeBrace" />
|
29 |
+
<exclude name="Generic.PHP.DeprecatedFunctions.Deprecated" />
|
30 |
+
<exclude name="Generic.PHP.ForbiddenFunctions.FoundWithAlternative" />
|
31 |
+
<exclude name="Generic.PHP.LowerCaseKeyword.Found" />
|
32 |
+
<exclude name="Generic.PHP.NoSilencedErrors.Discouraged" />
|
33 |
+
<exclude name="Generic.Strings.UnnecessaryStringConcat.Found" />
|
34 |
+
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed" />
|
35 |
+
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
|
36 |
+
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact" />
|
37 |
+
<exclude name="PEAR.Functions.FunctionCallSignature.Indent" />
|
38 |
+
<!-- <exclude name="PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket" /> -->
|
39 |
+
<!-- <exclude name="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket" /> -->
|
40 |
+
<!-- <exclude name="PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket" /> -->
|
41 |
+
<!-- <exclude name="PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket" /> -->
|
42 |
+
<!-- <exclude name="Squiz.Commenting.BlockComment.NoEmptyLineBefore" /> -->
|
43 |
+
<!-- <exclude name="Squiz.Commenting.BlockComment.NoNewLine" /> -->
|
44 |
+
<exclude name="Squiz.Commenting.BlockComment.WrongEnd" />
|
45 |
+
<exclude name="Squiz.Commenting.ClassComment.SpacingAfter" />
|
46 |
+
<exclude name="Squiz.Commenting.ClassComment.Missing" />
|
47 |
+
<exclude name="Squiz.Commenting.ClosingDeclarationComment.Abstract" />
|
48 |
+
<!-- <exclude name="Squiz.Commenting.DocCommentAlignment.SpaceBeforeStar" /> -->
|
49 |
+
<exclude name="Squiz.Commenting.EmptyCatchComment.Missing" />
|
50 |
+
<exclude name="Squiz.Commenting.FileComment.Missing" />
|
51 |
+
<exclude name="Squiz.Commenting.FileComment.MissingPackageTag" />
|
52 |
+
<exclude name="Squiz.Commenting.FileComment.SpacingAfterComment" />
|
53 |
+
<exclude name="Squiz.Commenting.FileComment.SpacingAfterOpen" />
|
54 |
+
<exclude name="Squiz.Commenting.FileComment.WrongStyle" />
|
55 |
+
<exclude name="Squiz.Commenting.FunctionComment.EmptyThrows" />
|
56 |
+
<exclude name="Squiz.Commenting.FunctionComment.ExtraParamComment" />
|
57 |
+
<exclude name="Squiz.Commenting.FunctionComment.InvalidNoReturn" />
|
58 |
+
<exclude name="Squiz.Commenting.FunctionComment.InvalidReturnVoid" />
|
59 |
+
<exclude name="Squiz.Commenting.FunctionComment.Missing" />
|
60 |
+
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment" />
|
61 |
+
<exclude name="Squiz.Commenting.FunctionComment.MissingParamName" />
|
62 |
+
<exclude name="Squiz.Commenting.FunctionComment.MissingParamTag" />
|
63 |
+
<exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop" />
|
64 |
+
<exclude name="Squiz.Commenting.FunctionComment.ParamNameNoCaseMatch" />
|
65 |
+
<exclude name="Squiz.Commenting.FunctionComment.ParamNameNoMatch" />
|
66 |
+
<exclude name="Squiz.Commenting.FunctionComment.ScalarTypeHintMissing" />
|
67 |
+
<!-- <exclude name="Squiz.Commenting.FunctionComment.SpacingAfter" /> -->
|
68 |
+
<exclude name="Squiz.Commenting.FunctionComment.SpacingAfterParamType" />
|
69 |
+
<exclude name="Squiz.Commenting.FunctionComment.ThrowsNoFullStop" />
|
70 |
+
<exclude name="Squiz.Commenting.FunctionComment.ThrowsNotCapital" />
|
71 |
+
<exclude name="Squiz.Commenting.FunctionCommentThrowTag.Missing" />
|
72 |
+
<exclude name="Squiz.Commenting.FunctionCommentThrowTag.WrongNumber" />
|
73 |
+
<exclude name="Squiz.Commenting.FunctionComment.WrongStyle" />
|
74 |
+
<exclude name="Squiz.Commenting.InlineComment.Empty" />
|
75 |
+
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar" />
|
76 |
+
<!-- <exclude name="Squiz.Commenting.InlineComment.NoSpaceBefore" /> -->
|
77 |
+
<exclude name="Squiz.Commenting.InlineComment.NotCapital" />
|
78 |
+
<!-- <exclude name="Squiz.Commenting.InlineComment.SpacingAfter" /> -->
|
79 |
+
<!-- <exclude name="Squiz.Commenting.InlineComment.SpacingBefore" /> -->
|
80 |
+
<exclude name="Squiz.Commenting.InlineComment.WrongStyle" />
|
81 |
+
<exclude name="Squiz.Commenting.VariableComment.Missing" />
|
82 |
+
<exclude name="Squiz.Commenting.VariableComment.MissingVar" />
|
83 |
+
<exclude name="Squiz.Commenting.VariableComment.WrongStyle" />
|
84 |
+
<!-- <exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace" /> -->
|
85 |
+
<!-- <exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis" /> -->
|
86 |
+
<exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword" />
|
87 |
+
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpaceAfterDefault" />
|
88 |
+
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterOpen" />
|
89 |
+
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterOpenHint" />
|
90 |
+
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpaceBeforeEquals" />
|
91 |
+
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingBeforeClose" />
|
92 |
+
<exclude name="Squiz.PHP.CommentedOutCode.Found" />
|
93 |
+
<exclude name="Squiz.Strings.DoubleQuoteUsage.NotRequired" />
|
94 |
+
<!-- <exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" /> -->
|
95 |
+
<!-- <exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine" /> -->
|
96 |
+
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.CloseBraceNewLine" /> -->
|
97 |
+
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.FirstIndexNoNewline" /> -->
|
98 |
+
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.FirstValueNoNewline" /> -->
|
99 |
+
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.IndexNoNewline" /> -->
|
100 |
+
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.NoComma" /> -->
|
101 |
+
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.NoCommaAfterLast" /> -->
|
102 |
+
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.NoSpaceAfterComma" /> -->
|
103 |
+
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.NoSpaceAfterDoubleArrow" /> -->
|
104 |
+
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.NoSpaceAfterOpenParenthesis" /> -->
|
105 |
+
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.NoSpaceBeforeDoubleArrow" /> -->
|
106 |
+
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.SpaceAfterArrayOpener" /> -->
|
107 |
+
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.SpaceAfterDoubleArrow" /> -->
|
108 |
+
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.SpaceAfterKeyword" /> -->
|
109 |
+
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.SpaceBeforeComma" /> -->
|
110 |
+
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.SpaceInEmptyArray" /> -->
|
111 |
+
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.ValueNoNewline" /> -->
|
112 |
+
<!-- <exclude name="WordPress.Arrays.ArrayKeySpacingRestrictions.NoSpacesAroundArrayKeys" /> -->
|
113 |
+
<!-- <exclude name="WordPress.Arrays.ArrayKeySpacingRestrictions.SpacesAroundArrayKeys" /> -->
|
114 |
+
<exclude name="WordPress.Classes.ClassOpeningStatement.BraceOnNewLine" />
|
115 |
+
<exclude name="WordPress.CSRF.NonceVerification.NoNonceVerification" />
|
116 |
+
<exclude name="WordPress.DB.RestrictedFunctions.mysql" />
|
117 |
+
<exclude name="WordPress.Files.FileName.UnderscoresNotAllowed" />
|
118 |
+
<exclude name="WordPress.Functions.DontExtract.extract" />
|
119 |
+
<exclude name="WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid" />
|
120 |
+
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid" />
|
121 |
+
<exclude name="WordPress.NamingConventions.ValidHookName.UseUnderscores" />
|
122 |
+
<exclude name="WordPress.NamingConventions.ValidVariableName.MemberNotSnakeCase" />
|
123 |
+
<exclude name="WordPress.NamingConventions.ValidVariableName.NotSnakeCase" />
|
124 |
+
<exclude name="WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar" />
|
125 |
+
<exclude name="WordPress.NamingConventions.ValidVariableName.StringNotSnakeCase" />
|
126 |
+
<exclude name="WordPress.PHP.DiscouragedFunctions.Discouraged" />
|
127 |
+
<exclude name="WordPress.PHP.DiscouragedFunctions.DiscouragedWithAlternative" />
|
128 |
+
<exclude name="WordPress.PHP.StrictComparisons.LooseComparison" />
|
129 |
+
<exclude name="WordPress.PHP.StrictInArray.MissingTrueStrict" />
|
130 |
+
<!-- <exclude name="WordPress.PHP.YodaConditions.NotYoda" /> -->
|
131 |
+
<exclude name="WordPress.VIP.AdminBarRemoval.RemovalDetected" />
|
132 |
+
<exclude name="WordPress.VIP.CronInterval.ChangeDetected" />
|
133 |
+
<exclude name="WordPress.VIP.DirectDatabaseQuery.DirectQuery" />
|
134 |
+
<exclude name="WordPress.VIP.DirectDatabaseQuery.NoCaching" />
|
135 |
+
<exclude name="WordPress.VIP.DirectDatabaseQuery.SchemaChange" />
|
136 |
+
<exclude name="WordPress.VIP.FileSystemWritesDisallow.FileWriteDetected" />
|
137 |
+
<exclude name="WordPress.VIP.OrderByRand.orderby" />
|
138 |
+
<exclude name="WordPress.VIP.PostsPerPage.posts_per_page" />
|
139 |
+
<exclude name="WordPress.VIP.RestrictedFunctions.count_user_posts" />
|
140 |
+
<exclude name="WordPress.VIP.RestrictedFunctions.custom_role" />
|
141 |
+
<exclude name="WordPress.VIP.RestrictedFunctions.cookies" />
|
142 |
+
<exclude name="WordPress.VIP.RestrictedFunctions.curl" />
|
143 |
+
<exclude name="WordPress.VIP.RestrictedFunctions.error_log" />
|
144 |
+
<exclude name="WordPress.VIP.RestrictedFunctions.extract" />
|
145 |
+
<exclude name="WordPress.VIP.RestrictedFunctions.file_get_contents" />
|
146 |
+
<exclude name="WordPress.VIP.RestrictedFunctions.get_pages" />
|
147 |
+
<exclude name="WordPress.VIP.RestrictedFunctions.get_posts" />
|
148 |
+
<exclude name="WordPress.VIP.RestrictedFunctions.get_term_by" />
|
149 |
+
<exclude name="WordPress.VIP.RestrictedFunctions.get_term_link" />
|
150 |
+
<exclude name="WordPress.VIP.RestrictedFunctions.parse_url" />
|
151 |
+
<exclude name="WordPress.VIP.RestrictedFunctions.prevent_path_disclosure" />
|
152 |
+
<exclude name="WordPress.VIP.RestrictedFunctions.runtime_configuration" />
|
153 |
+
<exclude name="WordPress.VIP.RestrictedFunctions.serialize" />
|
154 |
+
<exclude name="WordPress.VIP.RestrictedFunctions.urlencode" />
|
155 |
+
<exclude name="WordPress.VIP.RestrictedFunctions.url_to_postid" />
|
156 |
+
<exclude name="WordPress.VIP.RestrictedFunctions.user_meta" />
|
157 |
+
<exclude name="WordPress.VIP.RestrictedFunctions.wp_get_post_terms" />
|
158 |
+
<exclude name="WordPress.VIP.RestrictedFunctions.wp_redirect" />
|
159 |
+
<exclude name="WordPress.VIP.RestrictedFunctions.wp_remote_get" />
|
160 |
+
<exclude name="WordPress.VIP.RestrictedVariables.user_meta" />
|
161 |
+
<exclude name="WordPress.VIP.RestrictedVariables.cache_constraints" />
|
162 |
+
<exclude name="WordPress.VIP.SessionFunctionsUsage.session_write_close" />
|
163 |
+
<exclude name="WordPress.VIP.SlowDBQuery.slow_db_query" />
|
164 |
+
<exclude name="WordPress.VIP.SuperGlobalInputUsage.AccessDetected" />
|
165 |
+
<exclude name="WordPress.VIP.ValidatedSanitizedInput.InputNotSanitized" />
|
166 |
+
<exclude name="WordPress.VIP.ValidatedSanitizedInput.InputNotValidated" />
|
167 |
+
<exclude name="WordPress.VIP.ValidatedSanitizedInput.MissingUnslash" />
|
168 |
+
<exclude name="WordPress.Variables.GlobalVariables.OverrideProhibited" />
|
169 |
+
<exclude name="WordPress.WP.EnqueuedResources.NonEnqueuedScript" />
|
170 |
+
<exclude name="WordPress.WP.I18n.MissingSingularPlaceholder" />
|
171 |
+
<exclude name="WordPress.WP.I18n.MismatchedPlaceholders" />
|
172 |
+
<exclude name="WordPress.WP.I18n.NonSingularStringLiteralPlural" />
|
173 |
+
<exclude name="WordPress.WP.I18n.NonSingularStringLiteralText" />
|
174 |
+
<exclude name="WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet" />
|
175 |
+
<exclude name="WordPress.WP.PreparedSQL.NotPrepared" />
|
176 |
+
<!-- <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.BlankLineAfterEnd" /> -->
|
177 |
+
<!-- <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.ExtraSpaceAfterCloseParenthesis" /> -->
|
178 |
+
<!-- <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterCloseParenthesis" /> -->
|
179 |
+
<!-- <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterOpenParenthesis" /> -->
|
180 |
+
<!-- <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterStructureOpen" /> -->
|
181 |
+
<!-- <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBetweenStructureColon" /> -->
|
182 |
+
<!-- <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeCloseParenthesis" /> -->
|
183 |
+
<!-- <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeOpenParenthesis" /> -->
|
184 |
+
<!-- <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.OpenBraceNotSameLine" /> -->
|
185 |
+
<!-- <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.SpaceBeforeFunctionOpenParenthesis" /> -->
|
186 |
+
<!-- <exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter" /> -->
|
187 |
+
<!-- <exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceBefore" /> -->
|
188 |
+
<!-- <exclude name="WordPress.WhiteSpace.OperatorSpacing.SpacingAfter" /> -->
|
189 |
+
<!-- <exclude name="WordPress.WhiteSpace.OperatorSpacing.SpacingBefore" /> -->
|
190 |
+
<exclude name="WordPress.XSS.EscapeOutput.OutputNotEscaped" />
|
191 |
+
<exclude name="WordPress.XSS.EscapeOutput.UnsafePrintingFunction" />
|
192 |
+
</rule>
|
193 |
+
</ruleset>
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== Flash Toolkit ===
|
2 |
-
Contributors: ThemeGrill
|
3 |
Tags: theme, flash, toolkit, themegrill
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.6
|
6 |
-
Stable tag: 1.0
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
@@ -32,5 +32,8 @@ Get free support at http://themegrill.com/support-forum/
|
|
32 |
|
33 |
== Changelog ==
|
34 |
|
|
|
|
|
|
|
35 |
= 1.0.0 =
|
36 |
* Initial Public Release
|
1 |
=== Flash Toolkit ===
|
2 |
+
Contributors: ThemeGrill, shivapoudel
|
3 |
Tags: theme, flash, toolkit, themegrill
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.6
|
6 |
+
Stable tag: 1.1.0
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
32 |
|
33 |
== Changelog ==
|
34 |
|
35 |
+
= 1.1.0 =
|
36 |
+
* Feature - Integration with Flash Pro version
|
37 |
+
|
38 |
= 1.0.0 =
|
39 |
* Initial Public Release
|
templates/content-widget-about.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* The template for displaying about widget.
|
4 |
*
|
5 |
-
* This template can be overridden by copying it to yourtheme/flash-toolkit/content-widget-
|
6 |
*
|
7 |
* HOWEVER, on occasion FlashToolkit will need to update template files and you
|
8 |
* (the theme developer) will need to copy the new files to your theme to
|
@@ -19,8 +19,12 @@
|
|
19 |
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
exit;
|
21 |
}
|
|
|
|
|
|
|
|
|
|
|
22 |
?>
|
23 |
-
|
24 |
<div class="tg-column-wrapper">
|
25 |
<div class="about-content-wrapper tg-column-2">
|
26 |
<?php if( !empty( $title ) ) { ?>
|
2 |
/**
|
3 |
* The template for displaying about widget.
|
4 |
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/flash-toolkit/content-widget-about.php.
|
6 |
*
|
7 |
* HOWEVER, on occasion FlashToolkit will need to update template files and you
|
8 |
* (the theme developer) will need to copy the new files to your theme to
|
19 |
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
exit;
|
21 |
}
|
22 |
+
$title = isset( $instance[ 'about-title' ] ) ? $instance[ 'about-title' ] : '';
|
23 |
+
$text = isset( $instance[ 'text' ] ) ? $instance[ 'text' ] : '';
|
24 |
+
$more_text = isset( $instance[ 'more_text' ] ) ? $instance[ 'more_text' ] : '';
|
25 |
+
$more_url = isset( $instance[ 'more_url' ] ) ? $instance[ 'more_url' ] : '';
|
26 |
+
$image = isset( $instance[ 'image' ] ) ? $instance[ 'image' ] : '';
|
27 |
?>
|
|
|
28 |
<div class="tg-column-wrapper">
|
29 |
<div class="about-content-wrapper tg-column-2">
|
30 |
<?php if( !empty( $title ) ) { ?>
|
templates/content-widget-blog.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* The template for displaying blog widget.
|
4 |
*
|
5 |
-
* This template can be overridden by copying it to yourtheme/flash-toolkit/content-widget-
|
6 |
*
|
7 |
* HOWEVER, on occasion FlashToolkit will need to update template files and you
|
8 |
* (the theme developer) will need to copy the new files to your theme to
|
@@ -19,8 +19,12 @@
|
|
19 |
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
exit;
|
21 |
}
|
22 |
-
?>
|
23 |
|
|
|
|
|
|
|
|
|
|
|
24 |
<?php
|
25 |
if($style == 'tg-blog-widget-layout-1' ) {
|
26 |
$image_size = 'flash-square';
|
@@ -63,7 +67,7 @@ $get_featured_posts = new WP_Query( array(
|
|
63 |
</figure>
|
64 |
<?php if($style == 'tg-blog-widget-layout-2' ) { ?>
|
65 |
<span class="entry-date">
|
66 |
-
<i class="fa fa-clock-o"></i><a href="<?php echo esc_url( get_permalink() ); ?>" rel="bookmark"><?php echo esc_html (
|
67 |
</span>
|
68 |
<?php } ?>
|
69 |
</div>
|
@@ -72,7 +76,7 @@ $get_featured_posts = new WP_Query( array(
|
|
72 |
<?php if($style == 'tg-blog-widget-layout-1' ) { ?>
|
73 |
<div class="entry-meta">
|
74 |
<span class="entry-date">
|
75 |
-
<i class="fa fa-clock-o"></i><a href="<?php echo esc_url( get_permalink() ); ?>" rel="bookmark"><?php echo esc_html (
|
76 |
</span>
|
77 |
<span class="entry-author">
|
78 |
<i class="fa fa-user"></i><a class="url fn n" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>"><?php echo esc_html( get_the_author() ); ?></a>
|
2 |
/**
|
3 |
* The template for displaying blog widget.
|
4 |
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/flash-toolkit/content-widget-blog.php.
|
6 |
*
|
7 |
* HOWEVER, on occasion FlashToolkit will need to update template files and you
|
8 |
* (the theme developer) will need to copy the new files to your theme to
|
19 |
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
exit;
|
21 |
}
|
|
|
22 |
|
23 |
+
$number = isset( $instance[ 'number' ] ) ? $instance[ 'number' ] : '';
|
24 |
+
$source = isset( $instance[ 'source' ] ) ? $instance[ 'source' ] : '';
|
25 |
+
$category = isset( $instance[ 'category' ] ) ? $instance[ 'category' ] : '';
|
26 |
+
$style = isset( $instance[ 'style' ] ) ? $instance[ 'style' ] : '';
|
27 |
+
?>
|
28 |
<?php
|
29 |
if($style == 'tg-blog-widget-layout-1' ) {
|
30 |
$image_size = 'flash-square';
|
67 |
</figure>
|
68 |
<?php if($style == 'tg-blog-widget-layout-2' ) { ?>
|
69 |
<span class="entry-date">
|
70 |
+
<i class="fa fa-clock-o"></i><a href="<?php echo esc_url( get_permalink() ); ?>" rel="bookmark"><?php echo esc_html ( get_the_date() ); ?></a>
|
71 |
</span>
|
72 |
<?php } ?>
|
73 |
</div>
|
76 |
<?php if($style == 'tg-blog-widget-layout-1' ) { ?>
|
77 |
<div class="entry-meta">
|
78 |
<span class="entry-date">
|
79 |
+
<i class="fa fa-clock-o"></i><a href="<?php echo esc_url( get_permalink() ); ?>" rel="bookmark"><?php echo esc_html ( get_the_date() ); ?></a>
|
80 |
</span>
|
81 |
<span class="entry-author">
|
82 |
<i class="fa fa-user"></i><a class="url fn n" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>"><?php echo esc_html( get_the_author() ); ?></a>
|
templates/content-widget-counter.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* The template for displaying animated numbers counter widget.
|
4 |
*
|
5 |
-
* This template can be overridden by copying it to yourtheme/flash-toolkit/content-widget-
|
6 |
*
|
7 |
* HOWEVER, on occasion FlashToolkit will need to update template files and you
|
8 |
* (the theme developer) will need to copy the new files to your theme to
|
@@ -19,6 +19,11 @@
|
|
19 |
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
exit;
|
21 |
}
|
|
|
|
|
|
|
|
|
|
|
22 |
?>
|
23 |
<div class="fun-facts-section">
|
24 |
<div class="tg-fun-facts-widget <?php echo esc_attr( $style ); ?>">
|
2 |
/**
|
3 |
* The template for displaying animated numbers counter widget.
|
4 |
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/flash-toolkit/content-widget-counter.php.
|
6 |
*
|
7 |
* HOWEVER, on occasion FlashToolkit will need to update template files and you
|
8 |
* (the theme developer) will need to copy the new files to your theme to
|
19 |
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
exit;
|
21 |
}
|
22 |
+
|
23 |
+
$text = isset( $instance[ 'counter-title' ] ) ? $instance[ 'counter-title' ] : '';
|
24 |
+
$icon = isset( $instance[ 'icon' ] ) ? $instance[ 'icon' ] : '';
|
25 |
+
$number = isset( $instance[ 'number' ] ) ? $instance[ 'number' ] : '';
|
26 |
+
$style = isset( $instance[ 'style' ] ) ? $instance[ 'style' ] : '';
|
27 |
?>
|
28 |
<div class="fun-facts-section">
|
29 |
<div class="tg-fun-facts-widget <?php echo esc_attr( $style ); ?>">
|
templates/content-widget-cta.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* The template for displaying cta widget.
|
4 |
*
|
5 |
-
* This template can be overridden by copying it to yourtheme/flash-toolkit/content-widget-
|
6 |
*
|
7 |
* HOWEVER, on occasion FlashToolkit will need to update template files and you
|
8 |
* (the theme developer) will need to copy the new files to your theme to
|
@@ -19,6 +19,14 @@
|
|
19 |
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
exit;
|
21 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
?>
|
23 |
<div class="cta-wrapper <?php echo esc_attr( $style ); ?>">
|
24 |
<div class="section-title-wrapper">
|
2 |
/**
|
3 |
* The template for displaying cta widget.
|
4 |
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/flash-toolkit/content-widget-cta.php.
|
6 |
*
|
7 |
* HOWEVER, on occasion FlashToolkit will need to update template files and you
|
8 |
* (the theme developer) will need to copy the new files to your theme to
|
19 |
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
exit;
|
21 |
}
|
22 |
+
|
23 |
+
$title = isset( $instance[ 'cta-title' ] ) ? $instance[ 'cta-title' ] : '';
|
24 |
+
$subtitle = isset( $instance[ 'cta-subtitle' ] ) ? $instance[ 'cta-subtitle' ] : '';
|
25 |
+
$btn1 = isset( $instance[ 'cta-btn1' ] ) ? $instance[ 'cta-btn1' ] : '';
|
26 |
+
$btn1_link = isset( $instance[ 'cta-btn1-link' ] ) ? $instance[ 'cta-btn1-link' ] : '';
|
27 |
+
$btn2 = isset( $instance[ 'cta-btn2' ] ) ? $instance[ 'cta-btn2' ] : '';
|
28 |
+
$btn2_link = isset( $instance[ 'cta-btn2-link' ] ) ? $instance[ 'cta-btn2-link' ] : '';
|
29 |
+
$style = isset( $instance[ 'style' ] ) ? $instance[ 'style' ] : 'tg-cta-layout-1';
|
30 |
?>
|
31 |
<div class="cta-wrapper <?php echo esc_attr( $style ); ?>">
|
32 |
<div class="section-title-wrapper">
|
templates/content-widget-heading.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* The template for displaying heading widget.
|
4 |
*
|
5 |
-
* This template can be overridden by copying it to yourtheme/flash-toolkit/content-widget-
|
6 |
*
|
7 |
* HOWEVER, on occasion FlashToolkit will need to update template files and you
|
8 |
* (the theme developer) will need to copy the new files to your theme to
|
@@ -19,7 +19,10 @@
|
|
19 |
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
exit;
|
21 |
}
|
22 |
-
|
|
|
|
|
|
|
23 |
if( !empty( $heading ) ) { ?>
|
24 |
<h3 class="section-title"><?php echo esc_html($heading); ?></h3>
|
25 |
<?php } ?>
|
2 |
/**
|
3 |
* The template for displaying heading widget.
|
4 |
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/flash-toolkit/content-widget-heading.php.
|
6 |
*
|
7 |
* HOWEVER, on occasion FlashToolkit will need to update template files and you
|
8 |
* (the theme developer) will need to copy the new files to your theme to
|
19 |
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
exit;
|
21 |
}
|
22 |
+
$heading = isset( $instance[ 'heading-title' ] ) ? $instance[ 'heading-title' ] : '';
|
23 |
+
$subheading = isset( $instance[ 'subheading' ] ) ? $instance[ 'subheading' ] : '';
|
24 |
+
?>
|
25 |
+
<?php
|
26 |
if( !empty( $heading ) ) { ?>
|
27 |
<h3 class="section-title"><?php echo esc_html($heading); ?></h3>
|
28 |
<?php } ?>
|
templates/content-widget-image.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The template for displaying
|
4 |
*
|
5 |
-
* This template can be overridden by copying it to yourtheme/flash-toolkit/content-widget-
|
6 |
*
|
7 |
* HOWEVER, on occasion FlashToolkit will need to update template files and you
|
8 |
* (the theme developer) will need to copy the new files to your theme to
|
@@ -20,8 +20,12 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
20 |
exit;
|
21 |
}
|
22 |
|
|
|
|
|
|
|
|
|
23 |
if( !empty( $link ) ) { ?>
|
24 |
-
<a href="<?php echo esc_url( $link );
|
25 |
<?php } else { ?>
|
26 |
<img src="<?php echo esc_url( $image ); ?>" />
|
27 |
<?php } ?>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The template for displaying image widget.
|
4 |
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/flash-toolkit/content-widget-image.php.
|
6 |
*
|
7 |
* HOWEVER, on occasion FlashToolkit will need to update template files and you
|
8 |
* (the theme developer) will need to copy the new files to your theme to
|
20 |
exit;
|
21 |
}
|
22 |
|
23 |
+
$image = isset( $instance[ 'image' ] ) ? $instance[ 'image' ] : '';
|
24 |
+
$link = isset( $instance[ 'image_link' ] ) ? $instance[ 'image_link' ] : '';
|
25 |
+
?>
|
26 |
+
<?php
|
27 |
if( !empty( $link ) ) { ?>
|
28 |
+
<a href="<?php echo esc_url( $link ); ?>"><img src="<?php echo esc_url( $image ); ?>" /></a>
|
29 |
<?php } else { ?>
|
30 |
<img src="<?php echo esc_url( $image ); ?>" />
|
31 |
<?php } ?>
|
templates/content-widget-logo.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* The template for displaying logo widget entries
|
4 |
*
|
5 |
-
* This template can be overridden by copying it to yourtheme/flash-toolkit/content-widget-
|
6 |
*
|
7 |
* HOWEVER, on occasion FlashToolkit will need to update template files and you
|
8 |
* (the theme developer) will need to copy the new files to your theme to
|
@@ -19,21 +19,22 @@
|
|
19 |
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
exit;
|
21 |
}
|
22 |
-
?>
|
23 |
|
|
|
|
|
24 |
<div class="tg-client-widget">
|
25 |
<div class="client-container swiper-container">
|
26 |
<div class="client-wrapper swiper-wrapper">
|
27 |
-
<?php
|
28 |
-
foreach ($repeatable_logo as $logo) {
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
}
|
36 |
-
?>
|
37 |
</div>
|
38 |
</div>
|
39 |
</div>
|
2 |
/**
|
3 |
* The template for displaying logo widget entries
|
4 |
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/flash-toolkit/content-widget-logo.php.
|
6 |
*
|
7 |
* HOWEVER, on occasion FlashToolkit will need to update template files and you
|
8 |
* (the theme developer) will need to copy the new files to your theme to
|
19 |
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
exit;
|
21 |
}
|
|
|
22 |
|
23 |
+
$repeatable_logo = isset( $instance['repeatable_logo'] ) ? $instance['repeatable_logo'] : array();
|
24 |
+
?>
|
25 |
<div class="tg-client-widget">
|
26 |
<div class="client-container swiper-container">
|
27 |
<div class="client-wrapper swiper-wrapper">
|
28 |
+
<?php
|
29 |
+
foreach ($repeatable_logo as $logo) {
|
30 |
+
if( $logo['image'] != '' ) { ?>
|
31 |
+
<div class="client-slide swiper-slide">
|
32 |
+
<img src="<?php echo $logo['image']; ?>" alt="<?php echo $logo['title']; ?>" />
|
33 |
+
</div>
|
34 |
+
<?php
|
35 |
+
}
|
36 |
+
}
|
37 |
+
?>
|
38 |
</div>
|
39 |
</div>
|
40 |
</div>
|
templates/content-widget-portfolio.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* The template for displaying portfolio widget.
|
4 |
*
|
5 |
-
* This template can be overridden by copying it to yourtheme/flash-toolkit/content-widget-
|
6 |
*
|
7 |
* HOWEVER, on occasion FlashToolkit will need to update template files and you
|
8 |
* (the theme developer) will need to copy the new files to your theme to
|
@@ -20,6 +20,13 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
20 |
exit;
|
21 |
}
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
$output = ''; //Start output
|
24 |
$output .= '<div class="'.$style.' tg-feature-product-filter-layout">';
|
25 |
$output .= '<div class="tg-container">';
|
2 |
/**
|
3 |
* The template for displaying portfolio widget.
|
4 |
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/flash-toolkit/content-widget-portfolio.php.
|
6 |
*
|
7 |
* HOWEVER, on occasion FlashToolkit will need to update template files and you
|
8 |
* (the theme developer) will need to copy the new files to your theme to
|
20 |
exit;
|
21 |
}
|
22 |
|
23 |
+
$categories = isset( $instance[ 'categories' ] ) ? $instance[ 'categories' ] : '';
|
24 |
+
$number = isset( $instance[ 'number' ] ) ? $instance[ 'number' ] : '';
|
25 |
+
$filter = empty( $instance[ 'filter' ] ) ? 0 : 1;
|
26 |
+
$style = isset( $instance[ 'style' ] ) ? $instance[ 'style' ] : 'tg-feature-product-layout-1';
|
27 |
+
$column = isset( $instance[ 'column' ] ) ? $instance[ 'column' ] : 'tg-column-3';
|
28 |
+
?>
|
29 |
+
<?php
|
30 |
$output = ''; //Start output
|
31 |
$output .= '<div class="'.$style.' tg-feature-product-filter-layout">';
|
32 |
$output .= '<div class="tg-container">';
|
templates/content-widget-service.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The template for displaying
|
4 |
*
|
5 |
-
* This template can be overridden by copying it to yourtheme/flash-toolkit/content-widget-
|
6 |
*
|
7 |
* HOWEVER, on occasion FlashToolkit will need to update template files and you
|
8 |
* (the theme developer) will need to copy the new files to your theme to
|
@@ -19,7 +19,17 @@
|
|
19 |
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
exit;
|
21 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
?>
|
|
|
23 |
<div class="tg-service-widget <?php echo esc_attr( $style ); ?>">
|
24 |
<div class="service-wrapper">
|
25 |
<div class="service-icon-title-wrapper clearfix">
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The template for displaying service widget.
|
4 |
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/flash-toolkit/content-widget-service.php.
|
6 |
*
|
7 |
* HOWEVER, on occasion FlashToolkit will need to update template files and you
|
8 |
* (the theme developer) will need to copy the new files to your theme to
|
19 |
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
exit;
|
21 |
}
|
22 |
+
|
23 |
+
$title = isset( $instance[ 'service-title' ] ) ? $instance[ 'service-title' ] : '';
|
24 |
+
$icon_type = isset( $instance[ 'icon_type' ] ) ? $instance[ 'icon_type' ] : 'icon';
|
25 |
+
$icon = isset( $instance[ 'icon' ] ) ? $instance[ 'icon' ] : '';
|
26 |
+
$image = isset( $instance[ 'image' ] ) ? $instance[ 'image' ] : '';
|
27 |
+
$text = isset( $instance[ 'text' ] ) ? $instance[ 'text' ] : '';
|
28 |
+
$more_text = isset( $instance[ 'more_text' ] ) ? $instance[ 'more_text' ] : '';
|
29 |
+
$more_url = isset( $instance[ 'more_url' ] ) ? $instance[ 'more_url' ] : '';
|
30 |
+
$style = isset( $instance[ 'style' ] ) ? $instance[ 'style' ] : '';
|
31 |
?>
|
32 |
+
|
33 |
<div class="tg-service-widget <?php echo esc_attr( $style ); ?>">
|
34 |
<div class="service-wrapper">
|
35 |
<div class="service-icon-title-wrapper clearfix">
|
templates/content-widget-slider.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* The template for displaying slider widget entries
|
4 |
*
|
5 |
-
* This template can be overridden by copying it to yourtheme/flash-toolkit/content-widget-
|
6 |
*
|
7 |
* HOWEVER, on occasion FlashToolkit will need to update template files and you
|
8 |
* (the theme developer) will need to copy the new files to your theme to
|
@@ -19,8 +19,19 @@
|
|
19 |
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
exit;
|
21 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
?>
|
23 |
-
<div class="tg-slider-widget <?php echo esc_attr( $color ); ?> <?php echo esc_attr( $align ); ?> <?php echo esc_attr( $controls ); ?>">
|
24 |
<div class="swiper-container">
|
25 |
<div class="swiper-wrapper">
|
26 |
<?php foreach ($repeatable_slider as $slider) {
|
2 |
/**
|
3 |
* The template for displaying slider widget entries
|
4 |
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/flash-toolkit/content-widget-slider.php.
|
6 |
*
|
7 |
* HOWEVER, on occasion FlashToolkit will need to update template files and you
|
8 |
* (the theme developer) will need to copy the new files to your theme to
|
19 |
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
exit;
|
21 |
}
|
22 |
+
$screen = isset( $instance[ 'full-screen'] ) ? $instance[ 'full-screen' ] : '' ;
|
23 |
+
$color = isset( $instance['color'] ) ? $instance['color'] : 'slider-dark';
|
24 |
+
$align = isset( $instance['align'] ) ? $instance['align'] : 'slider-content-center';
|
25 |
+
$controls = isset( $instance['controls'] ) ? $instance['controls'] : 'slider-control-center';
|
26 |
+
$repeatable_slider = isset( $instance['repeatable_slider'] ) ? $instance['repeatable_slider'] : array();
|
27 |
+
|
28 |
+
if($screen) {
|
29 |
+
$slide_status = 'full-screen';
|
30 |
+
} else {
|
31 |
+
$slide_status = 'full-width';
|
32 |
+
}
|
33 |
?>
|
34 |
+
<div class="tg-slider-widget <?php echo esc_attr( $color ); ?> <?php echo esc_attr( $align ); ?> <?php echo esc_attr( $controls ); ?> <?php echo esc_attr( $slide_status) ; ?>">
|
35 |
<div class="swiper-container">
|
36 |
<div class="swiper-wrapper">
|
37 |
<?php foreach ($repeatable_slider as $slider) {
|
templates/content-widget-team.php
CHANGED
@@ -19,8 +19,16 @@
|
|
19 |
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
exit;
|
21 |
}
|
22 |
-
?>
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
<div class="tg-team-widget <?php echo esc_attr( $style ); ?>">
|
25 |
<div class="team-wrapper">
|
26 |
<?php if(!empty($image)) { ?>
|
@@ -42,30 +50,32 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
42 |
</div>
|
43 |
</div>
|
44 |
<?php } } ?>
|
45 |
-
<img src="<?php echo esc_url($image); ?>" alt="<?php echo esc_attr($
|
46 |
</div>
|
47 |
<?php } ?>
|
48 |
<div class="team-content-wrapper">
|
49 |
-
<
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
<div class="team-social
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
|
|
|
|
66 |
</div>
|
67 |
-
</div>
|
68 |
<?php } } ?>
|
|
|
69 |
</div>
|
70 |
</div>
|
71 |
</div>
|
19 |
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
exit;
|
21 |
}
|
|
|
22 |
|
23 |
+
$title = isset( $instance[ 'team-title' ] ) ? $instance[ 'team-title' ] : '';
|
24 |
+
$image = isset( $instance[ 'image' ] ) ? $instance[ 'image' ] : '';
|
25 |
+
$text = isset( $instance[ 'text' ] ) ? $instance[ 'text' ] : '';
|
26 |
+
$designation = isset( $instance[ 'designation' ] ) ? $instance[ 'designation' ] : '';
|
27 |
+
$facebook = isset( $instance[ 'facebook' ] ) ? $instance[ 'facebook' ] : '';
|
28 |
+
$twitter = isset( $instance[ 'twitter' ] ) ? $instance[ 'twitter' ] : '';
|
29 |
+
$linkedin = isset( $instance[ 'linkedin' ] ) ? $instance[ 'linkedin' ] : '';
|
30 |
+
$style = isset( $instance[ 'style' ] ) ? $instance[ 'style' ] : '';
|
31 |
+
?>
|
32 |
<div class="tg-team-widget <?php echo esc_attr( $style ); ?>">
|
33 |
<div class="team-wrapper">
|
34 |
<?php if(!empty($image)) { ?>
|
50 |
</div>
|
51 |
</div>
|
52 |
<?php } } ?>
|
53 |
+
<img src="<?php echo esc_url($image); ?>" alt="<?php echo esc_attr($title); ?>"/>
|
54 |
</div>
|
55 |
<?php } ?>
|
56 |
<div class="team-content-wrapper">
|
57 |
+
<div class="team-desc-wrapper">
|
58 |
+
<h3 class="team-title"><?php echo esc_html($title); ?></h3>
|
59 |
+
<div class="team-designation"><?php echo esc_html($designation); ?></div>
|
60 |
+
<div class="team-content"><?php echo esc_html($text); ?></div>
|
61 |
+
<?php
|
62 |
+
if( $style != 'tg-team-layout-3') {
|
63 |
+
if( (!empty($facebook) || !empty($twitter) || !empty($linkedin) ) ) { ?>
|
64 |
+
<div class="team-social">
|
65 |
+
<div class="team-social-block">
|
66 |
+
<?php if(!empty($facebook)) { ?>
|
67 |
+
<a href="<?php echo esc_url($facebook); ?>"><i class="fa fa-facebook"></i></a>
|
68 |
+
<?php } ?>
|
69 |
+
<?php if(!empty($twitter)) { ?>
|
70 |
+
<a href="<?php echo esc_url($twitter); ?>"><i class="fa fa-twitter"></i></a>
|
71 |
+
<?php } ?>
|
72 |
+
<?php if(!empty($linkedin)) { ?>
|
73 |
+
<a href="<?php echo esc_url($linkedin); ?>"><i class="fa fa-linkedin"></i></a>
|
74 |
+
<?php } ?>
|
75 |
+
</div>
|
76 |
</div>
|
|
|
77 |
<?php } } ?>
|
78 |
+
</div>
|
79 |
</div>
|
80 |
</div>
|
81 |
</div>
|
templates/content-widget-testimonial.php
CHANGED
@@ -19,13 +19,14 @@
|
|
19 |
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
exit;
|
21 |
}
|
|
|
22 |
?>
|
23 |
<div class="tg-testimonial-widget">
|
24 |
<div class="testimonial-container swiper-container">
|
25 |
<div class="testimonial-wrapper swiper-wrapper">
|
26 |
<?php foreach ($repeatable_testimonial as $testimonial) { ?>
|
27 |
<div class="testimonial-slide swiper-slide">
|
28 |
-
<div class="
|
29 |
<div class="testimonial-icon"><i class="fa fa-quote-left"></i> </div>
|
30 |
<?php if( !empty( $testimonial['description'] ) ) { ?>
|
31 |
<div class="testimonial-content"><?php echo esc_html($testimonial['description']); ?></div>
|
19 |
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
exit;
|
21 |
}
|
22 |
+
$repeatable_testimonial = isset( $instance['repeatable_testimonial'] ) ? $instance['repeatable_testimonial'] : array();
|
23 |
?>
|
24 |
<div class="tg-testimonial-widget">
|
25 |
<div class="testimonial-container swiper-container">
|
26 |
<div class="testimonial-wrapper swiper-wrapper">
|
27 |
<?php foreach ($repeatable_testimonial as $testimonial) { ?>
|
28 |
<div class="testimonial-slide swiper-slide">
|
29 |
+
<div class="testimonial-content-wrapper">
|
30 |
<div class="testimonial-icon"><i class="fa fa-quote-left"></i> </div>
|
31 |
<?php if( !empty( $testimonial['description'] ) ) { ?>
|
32 |
<div class="testimonial-content"><?php echo esc_html($testimonial['description']); ?></div>
|